[WIP] pressfit_headband.scad
This commit is contained in:
parent
4e965fb242
commit
b393f5ebbc
|
@ -2,22 +2,41 @@ include <globals.scad>
|
|||
|
||||
use <headband.scad>
|
||||
|
||||
RENDER_PLA = true;
|
||||
RENDER_PETG = true;
|
||||
|
||||
module inserticle() {
|
||||
cube([INSERTICLE_X, INSERTICLE_Y, INSERTICLE_Z], center=true);
|
||||
}
|
||||
|
||||
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) {
|
||||
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() {
|
||||
color("pink") { $a=48;
|
||||
rotate( $a, [0, 0, 1]) {
|
||||
translate([-size-4, 0,]) rotate(90, [0, 1, 0]) inserticle();
|
||||
translate([-size-3, 0,]) rotate(90, [0, 1, 0]) inserticle();
|
||||
}
|
||||
rotate(-$a, [0, 0, 1]) {
|
||||
translate([-size-4, 0,]) rotate(90, [0, 1, 0]) inserticle();
|
||||
translate([-size-3, 0,]) rotate(90, [0, 1, 0]) inserticle();
|
||||
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);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module petg_parts(size, height, thickness, part, stretch_len, tip_len, tip_bend) {
|
||||
headband(
|
||||
size=size,
|
||||
height=height,
|
||||
|
@ -27,7 +46,25 @@ module pressfit_headband(debug=DEBUG, size=SIZE, height=HEIGHT, thickness=THICKN
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pressfit_headband();
|
||||
|
|
Loading…
Reference in a new issue