Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
|
892899c511 |
3 changed files with 72 additions and 30 deletions
|
@ -3,7 +3,7 @@ include <globals.scad>;
|
||||||
use <headband.scad>;
|
use <headband.scad>;
|
||||||
use <chamfer.scad>;
|
use <chamfer.scad>;
|
||||||
|
|
||||||
module catear(height, thickness, fractal=0, side_len=30, bend_factor=0.5, stretch_factor=1.2, debug=false, chamfer=CHAMFER, chamfer_shape=CHAMFER_SHAPE, details=true) {
|
module catear(height, thickness, fractal=0, side_len=30, bend_factor=0.5, stretch_factor=1.2, debug=false, chamfer=CHAMFER, chamfer_shape=CHAMFER_SHAPE, details=true, end_caps=true) {
|
||||||
$A=[0, side_len/2];
|
$A=[0, side_len/2];
|
||||||
$B=[0,-side_len/2];
|
$B=[0,-side_len/2];
|
||||||
$C=[-(side_len/2/sin(120))*1.5*stretch_factor, 0];
|
$C=[-(side_len/2/sin(120))*1.5*stretch_factor, 0];
|
||||||
|
@ -42,15 +42,17 @@ module catear(height, thickness, fractal=0, side_len=30, bend_factor=0.5, stretc
|
||||||
thickness=thickness,
|
thickness=thickness,
|
||||||
height=height
|
height=height
|
||||||
);
|
);
|
||||||
translate($A) color("#aaaaaa")
|
if (end_caps) {
|
||||||
chamfer(size=chamfer, child_h=height, child_bot=-height/2, shape=chamfer_shape)
|
translate($A) color("#aaaaaa")
|
||||||
cylinder(h=height, d=thickness, center=true);
|
chamfer(size=chamfer, child_h=height, child_bot=-height/2, shape=chamfer_shape)
|
||||||
translate($B) color("#bbbbbb")
|
cylinder(h=height, d=thickness, center=true);
|
||||||
chamfer(size=chamfer, child_h=height, child_bot=-height/2, shape=chamfer_shape)
|
translate($B) color("#bbbbbb")
|
||||||
cylinder(h=height, d=thickness, center=true);
|
chamfer(size=chamfer, child_h=height, child_bot=-height/2, shape=chamfer_shape)
|
||||||
translate($C) color("#cccccc")
|
cylinder(h=height, d=thickness, center=true);
|
||||||
chamfer(size=chamfer, child_h=height, child_bot=-height/2, shape=chamfer_shape)
|
translate($C) color("#cccccc")
|
||||||
cylinder(h=height, d=thickness, center=true);
|
chamfer(size=chamfer, child_h=height, child_bot=-height/2, shape=chamfer_shape)
|
||||||
|
cylinder(h=height, d=thickness, center=true);
|
||||||
|
}
|
||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
echo("A", $A, "a", $a, "alpha", $alpha);
|
echo("A", $A, "a", $a, "alpha", $alpha);
|
||||||
|
|
38
pressfit_bunnyears.scad
Normal file
38
pressfit_bunnyears.scad
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
include <globals.scad>;
|
||||||
|
|
||||||
|
use <catear_headband.scad>;
|
||||||
|
use <pressfit_headband.scad>;
|
||||||
|
use <chamfer.scad>;
|
||||||
|
|
||||||
|
$fn=90;
|
||||||
|
EAR_SCALE = 0.5;
|
||||||
|
EAR_BEND_FACTOR = 0.2;
|
||||||
|
EAR_STRETCH_FACTOR = 8;
|
||||||
|
STEP_SIZE = .5;
|
||||||
|
|
||||||
|
//difference() {
|
||||||
|
translate([20*pow(0.99, SIZE/2*EAR_SCALE-1-THICKNESS), 0, -THICKNESS/2])
|
||||||
|
/*union()*/ for (i=[0:STEP_SIZE:SIZE/2*EAR_SCALE-1]) {
|
||||||
|
j=pow(0.99, i);
|
||||||
|
chamfer_ = floor(abs(2*i/(SIZE/2*EAR_SCALE-1)-1));
|
||||||
|
translate([-j*20, 0, 0])
|
||||||
|
rotate(90, [0, 1, 0])
|
||||||
|
/*chamfer(size=1, child_h=1, child_bot=-0.5, shape=CHAMFER_SHAPE)*/ {
|
||||||
|
echo("i", i, "j", j, "chamfer_", chamfer_);
|
||||||
|
catear(
|
||||||
|
debug=DEBUG,
|
||||||
|
height=INSERTICLE_Z*1.2,
|
||||||
|
thickness=THICKNESS,
|
||||||
|
side_len=SIZE/2*EAR_SCALE-i,
|
||||||
|
bend_factor=EAR_BEND_FACTOR,
|
||||||
|
stretch_factor=EAR_STRETCH_FACTOR,
|
||||||
|
chamfer=0, //chamfer_,
|
||||||
|
chamfer_shape=CHAMFER_SHAPE,
|
||||||
|
details=false,
|
||||||
|
end_caps=false
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// translate([0, 0, -THICKNESS]) cube([100, 100, THICKNESS], center=true);
|
||||||
|
// scale([1, 1, 2]) inserticle();
|
||||||
|
//}
|
|
@ -7,26 +7,28 @@ use <chamfer.scad>;
|
||||||
EAR_SCALE = 1.5;
|
EAR_SCALE = 1.5;
|
||||||
EAR_BEND_FACTOR = 0.15;
|
EAR_BEND_FACTOR = 0.15;
|
||||||
EAR_STRETCH_FACTOR = 1.2;
|
EAR_STRETCH_FACTOR = 1.2;
|
||||||
|
STEP_SIZE = 1;
|
||||||
|
|
||||||
difference() {
|
difference() {
|
||||||
translate([20*pow(0.99, SIZE/2*EAR_SCALE-1-THICKNESS), 0, -THICKNESS/2])
|
translate([20*pow(0.99, SIZE/2*EAR_SCALE-1-THICKNESS), 0, -THICKNESS/2])
|
||||||
union() for (i=[0:SIZE/2*EAR_SCALE-1]) {
|
union() for (i=[0:STEP_SIZE:SIZE/2*EAR_SCALE-1]) {
|
||||||
j=pow(0.99, i);
|
j=pow(0.99, i);
|
||||||
chamfer_ = floor(abs(2*i/(SIZE/2*EAR_SCALE-1)-1));
|
chamfer_ = floor(abs(2*i/(SIZE/2*EAR_SCALE-1)-1));
|
||||||
translate([-j*20, 0, 0])
|
translate([-j*20, 0, 0])
|
||||||
rotate(90, [0, 1, 0])
|
rotate(90, [0, 1, 0])
|
||||||
/*chamfer(size=1, child_h=1, child_bot=-0.5, shape=CHAMFER_SHAPE)*/
|
/*chamfer(size=1, child_h=1, child_bot=-0.5, shape=CHAMFER_SHAPE)*/
|
||||||
catear(
|
catear(
|
||||||
debug=DEBUG,
|
debug=DEBUG,
|
||||||
height=INSERTICLE_Z*1.2,
|
height=INSERTICLE_Z*1.2,
|
||||||
thickness=THICKNESS,
|
thickness=THICKNESS,
|
||||||
side_len=SIZE/2*EAR_SCALE-i,
|
side_len=SIZE/2*EAR_SCALE-i,
|
||||||
bend_factor=EAR_BEND_FACTOR,
|
bend_factor=EAR_BEND_FACTOR,
|
||||||
stretch_factor=EAR_STRETCH_FACTOR,
|
stretch_factor=EAR_STRETCH_FACTOR,
|
||||||
chamfer=chamfer_,
|
chamfer=0, //chamfer_,
|
||||||
chamfer_shape=CHAMFER_SHAPE
|
chamfer_shape=CHAMFER_SHAPE,
|
||||||
);
|
end_caps=false
|
||||||
}
|
);
|
||||||
translate([0, 0, -THICKNESS]) cube([100, 100, THICKNESS], center=true);
|
}
|
||||||
scale([1, 1, 2]) inserticle();
|
translate([0, 0, -THICKNESS]) cube([100, 100, THICKNESS], center=true);
|
||||||
|
scale([1, 1, 2]) inserticle();
|
||||||
}
|
}
|
Loading…
Reference in a new issue