47 lines
No EOL
1.2 KiB
OpenSCAD
47 lines
No EOL
1.2 KiB
OpenSCAD
include <BOSL2/std.scad>
|
|
|
|
pencil_size = 7.55; // diameter
|
|
end_slop = 0.3;
|
|
len_shaft = 70;
|
|
len_end = 10;
|
|
bot = [3, 0.2]; // bottom
|
|
|
|
t = 0.8;
|
|
slit = [3,1.5];
|
|
|
|
ring_h = 5;
|
|
ring_slop = 0.2;
|
|
|
|
r = 0.6;
|
|
|
|
|
|
diff("R", "K") {
|
|
// inside for the pencil
|
|
tag("R")
|
|
chain_hull() {
|
|
linear_extrude(1) hexagon(id=pencil_size);
|
|
up(len_shaft) linear_extrude(1) hexagon(id=pencil_size);
|
|
up(len_shaft + len_end) linear_extrude(1) hexagon(id=pencil_size - end_slop*2);
|
|
}
|
|
|
|
// main body
|
|
linear_extrude(len_shaft+len_end + 1) hexagon(id=pencil_size+2*t, rounding=r);
|
|
|
|
// bottom
|
|
difference() {
|
|
linear_extrude(bot[0]) hexagon(id=pencil_size+2*t+bot[1]*2, rounding=r);
|
|
fwd(pencil_size/2) cuboid(pencil_size, anchor=BACK);
|
|
}
|
|
|
|
// slit
|
|
tag("R") up(len_shaft) union() {
|
|
xcyl(d=slit[0], h=pencil_size*2, $fn=36);
|
|
cuboid([pencil_size*2, slit[1], len_end*2], anchor=BOT);
|
|
}
|
|
|
|
// ring
|
|
left(20) tag("K") up(len_shaft) difference() {
|
|
linear_extrude(ring_h) hexagon(id=pencil_size+4*t + ring_slop, rounding=r);
|
|
linear_extrude(ring_h*2) hexagon(id=pencil_size+2*t + ring_slop);
|
|
}
|
|
} |