bolex_90_degree_prism/bolex_90_degree_prism.scad

56 lines
2.2 KiB
OpenSCAD

PrismSize = 12; //12.75 = original
X = 12.85;
Y = 43.6;
Z = 11.6;
PostD = 4.3;
EndD = 6.2;
PrismXOffset = -0.426;
PrismYOffset = 5.5; //for 12mm
PrismX = PrismXOffset + ((PrismSize - 12) / 2) + 0.75;
PrismY = (Y / 2) - (PrismSize / 2) - (PrismYOffset - ((PrismSize - 12) / 2) - 0.5);
OffsetZ = (Z / 2) + (PrismSize - 12) + 0.39 + 2.7;
module prism (pos = [0, 0, 0], rot = [0, 0, 0], scl = [1, 1, 1]) {
translate(pos) rotate(rot) scale(scl) {
rotate([0, 0, -45]) difference () {
rotate([0, 0, 45]) cube([PrismSize, PrismSize, PrismSize], center = true);
translate([PrismSize, 0, 0]) cube([PrismSize * 2, PrismSize * 2, PrismSize + 1], center = true);
}
}
}
module bolex_90_degree_prism () {
difference () {
translate([0, 0, ]) cube([X, Y, Z], center = true);
//prism void
prism([PrismX, PrismY, (PrismSize / 2) - OffsetZ], rot = [90, 0, 0], [1, 1.05, 1]);
translate([PrismX, PrismY, (PrismSize / 2) - OffsetZ + 12.25]) scale([1, 0.9, 1]) cube([12, 12, 12], center = true);
translate([PrismX - 11, PrismY, (PrismSize / 2) - OffsetZ]) scale([1, 1, 1.5]) cube([12, 12, 12], center = true);
//remove corner
translate([-X / 2, 0, Z / 2]) rotate([0, 45, 0]) cube([2, Y + 1, 2], center = true);
//post void
translate([(X / 2) - (PostD / 2) - 1, (-Y / 2) + (PostD / 2) + 1, 0]) cylinder(r = PostD / 2, h = Z + 1, center = true, $fn = 40);
//post void bevel
translate([(X / 2) - (PostD / 2) - 1, (-Y / 2) + (PostD / 2) + 1, (-Z / 2) + 0.4]) cylinder(r1 = (PostD / 2) + (1 / 2), r2 = (PostD / 2) - 0.1, h = 2, center = true, $fn = 40);
//angled cut
translate([-9.5, (-Y / 2) + (25 / 2), 0]) rotate([0, 0, 17.7]) color("red") cube([X, 50, Z + 1], center = true);
//rounded end
translate([(X / 2) - (PostD / 2) - 1, (-Y / 2) + (PostD / 2) + 1, 0]) difference () {
translate([0, -8 / 2, 0]) cube([8, 8, Z + 1], center = true);
translate([-8 / 2, (8 / 2) - 1, 0]) cube([8, 8, Z + 1], center = true);
cylinder(r = EndD / 2, h = Z + 2, center = true, $fn = 40);
}
}
}
//color("red") prism([PrismX, PrismY, (PrismSize / 2) - OffsetZ], rot = [90, 0, 0]);
bolex_90_degree_prism();