70 lines
No EOL
2 KiB
OpenSCAD
70 lines
No EOL
2 KiB
OpenSCAD
include <BOSL2/std.scad>
|
|
|
|
// wymiary cAP Lite
|
|
cap_size = [51,20,87];
|
|
cap_holes = [7,63]; // distance measured from the top
|
|
cap_hole_d = 3.5;
|
|
cap_eth = [14,12,77.5]; // x,y,distance
|
|
cap_h = 20;
|
|
|
|
cap_in_size = [47,13,47];
|
|
cap_in_h = 4; // distance from 1st hole
|
|
cap_in_w = 17; // width of the thin part
|
|
|
|
// wymiary zewnątrz
|
|
box_t = 2;
|
|
box_size = [80,60,105];
|
|
box_down = 20;
|
|
box_roof_h = 20;
|
|
box_side_h = 125;
|
|
box_side_dist = 30;
|
|
|
|
spacer = 5; // sapcer length
|
|
|
|
$fn = 36;
|
|
|
|
|
|
module cAP() {
|
|
color("red") cuboid(cap_size, rounding=10, edges="Y", anchor=BOTTOM+BACK);
|
|
cAP_inner();
|
|
}
|
|
|
|
module cAP_inner() {
|
|
color("green") up(cap_size[2]) down(cap_holes[0] + cap_in_h) cuboid(cap_in_size, anchor=TOP+BACK);
|
|
color("green") up(cap_size[2]) cuboid([cap_in_w, box_t, cap_size[2]], anchor=TOP+BACK);
|
|
color("blue") up(cap_size[2]) union() {
|
|
for(i = cap_holes) down(i) xrot(90) up(box_t*2) cyl(d=cap_hole_d, h=cap_h, anchor=TOP);
|
|
down(cap_eth[2]) fwd(box_t*2) cuboid([cap_eth[0], cap_h, cap_eth[1]], anchor=FWD);
|
|
}
|
|
}
|
|
|
|
diff("R") {
|
|
cuboid([box_size[0], box_t, box_size[2]], anchor=BOTTOM+BACK);
|
|
cuboid([box_size[0], box_t, box_down], anchor=TOP+BACK);
|
|
up(box_size[2]) chain_hull() {
|
|
cuboid([box_size[0], box_t, box_t], anchor=BOTTOM+BACK);
|
|
fwd(box_size[1]) down(box_roof_h)
|
|
cuboid([box_size[0], box_t, box_t], anchor=BOTTOM+BACK);
|
|
}
|
|
for(i = [-box_size[0]/2 + box_t/2, box_size[0]/2 - box_t/2]) {
|
|
up(box_size[2]) left(i) chain_hull() {
|
|
union() {
|
|
cuboid([box_t, box_t, box_side_h], anchor=TOP+BACK);
|
|
down(box_side_h) fwd(box_side_dist)
|
|
cuboid([box_t, box_t, box_t], anchor=TOP+BACK);
|
|
}
|
|
fwd(box_size[1]) down(box_roof_h)
|
|
cuboid([box_t, box_t, box_t], anchor=BOTTOM+BACK);
|
|
|
|
}
|
|
}
|
|
// tag("R")
|
|
fwd(box_t + spacer) cAP();
|
|
// tag("R")
|
|
fwd(box_t + spacer) cAP_inner();
|
|
}
|
|
|
|
fwd(50) diff("R") {
|
|
cyl(h=spacer, d=cap_hole_d + 2*box_t);
|
|
tag("R") cyl(h=spacer, d=cap_hole_d);
|
|
} |