2024-05-25 19:48:08 +02:00
|
|
|
include <globals.scad>
|
|
|
|
|
|
|
|
use <headband.scad>
|
2024-01-27 19:28:54 +01:00
|
|
|
|
2024-11-21 21:21:55 +01:00
|
|
|
RENDER_PLA = true;
|
|
|
|
RENDER_PETG = true;
|
|
|
|
|
2024-01-27 19:28:54 +01:00
|
|
|
module inserticle() {
|
2024-11-21 21:21:55 +01:00
|
|
|
cube([INSERTICLE_X, INSERTICLE_Y, INSERTICLE_Z], center=true);
|
2024-01-27 19:28:54 +01:00
|
|
|
}
|
|
|
|
|
2024-11-21 21:21:55 +01:00
|
|
|
module anchored_inserticle() {
|
|
|
|
translate([-1, 0, 0]) rotate(90, [0, 1, 0]) inserticle();
|
|
|
|
rotate(90, [0, 1, 0]) {
|
|
|
|
cube([INSERTICLE_X-2*CHAMFER, INSERTICLE_Y, INSERTICLE_Z], center=true);
|
|
|
|
translate([0, 0, INSERTICLE_Z/2+0.5])
|
|
|
|
cube([INSERTICLE_X/2, INSERTICLE_Y+2, 1], center=true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module pla_parts(size, a) {
|
|
|
|
color("pink") {
|
|
|
|
for (i=[-1, 1]) {
|
|
|
|
union() {
|
|
|
|
rotate(i*a, [0, 0, 1]) {
|
|
|
|
translate([-size-3, 0, 0]) anchored_inserticle();
|
|
|
|
// translate([-size-4, 0,]) rotate(90, [0, 1, 0]) inserticle();
|
|
|
|
// translate([-size-3, 0,]) rotate(90, [0, 1, 0]) {
|
|
|
|
// cube([INSERTICLE_X-2*CHAMFER, INSERTICLE_Y, INSERTICLE_Z], center=true);
|
|
|
|
// translate([0, 0, INSERTICLE_Z/2+0.5])
|
|
|
|
// cube([INSERTICLE_X/2, INSERTICLE_Y+2, 1], center=true);
|
|
|
|
// }
|
2024-01-27 19:28:54 +01:00
|
|
|
}
|
2024-11-21 21:21:55 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module petg_parts(size, height, thickness, part, stretch_len, tip_len, tip_bend) {
|
|
|
|
headband(
|
|
|
|
size=size,
|
|
|
|
height=height,
|
|
|
|
thickness=thickness,
|
|
|
|
part=part,
|
|
|
|
stretch_len=stretch_len,
|
|
|
|
tip_len=tip_len,
|
|
|
|
tip_bend=tip_bend
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
module pressfit_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKNESS, part=PART, stretch_len=STRETCH_LEN, tip_len=TIP_LEN, tip_bend=TIP_BEND, a=48) {
|
|
|
|
if (RENDER_PLA && RENDER_PETG) {
|
|
|
|
union() {
|
|
|
|
petg_parts(size, height, thickness, part, stretch_len, tip_len, tip_bend);
|
|
|
|
pla_parts(size, a);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (RENDER_PETG) {
|
|
|
|
difference() {
|
|
|
|
petg_parts(size, height, thickness, part, stretch_len, tip_len, tip_bend);
|
|
|
|
pla_parts(size, a);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (RENDER_PLA) {
|
|
|
|
pla_parts(size, a);
|
|
|
|
}
|
|
|
|
}
|
2024-01-27 19:28:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
pressfit_headband();
|