added version numbers into the catears model
This commit is contained in:
parent
8c0588eaf5
commit
df7c90ec26
5 changed files with 66675 additions and 3 deletions
31
scad/base/binary.scad
Normal file
31
scad/base/binary.scad
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
module lcyl(size, depth){
|
||||||
|
translate([size/2,depth/2,size/2])
|
||||||
|
rotate([90,0,0])
|
||||||
|
cylinder(h = depth, d = size, center = true, $fn = 32);
|
||||||
|
}
|
||||||
|
|
||||||
|
module binary(n, size, depth = size, sep = size/2){
|
||||||
|
cube([sep,depth,size]);
|
||||||
|
translate([0,0,-size/4])
|
||||||
|
lcyl(size = sep, depth = depth);
|
||||||
|
translate([0,0,3*size/4])
|
||||||
|
lcyl(size = sep, depth = depth);
|
||||||
|
translate([2*sep,0,0])
|
||||||
|
binary_rec(n = n, size = size, depth = depth, sep = sep);
|
||||||
|
}
|
||||||
|
|
||||||
|
module binary_rec(n, size, depth, sep){
|
||||||
|
if(n != 0){
|
||||||
|
if(n % 2 == 0){
|
||||||
|
translate([size+sep,0,0])
|
||||||
|
binary_rec(n = n/2, size = size, depth = depth, sep = sep);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
lcyl(size = size, depth = depth);
|
||||||
|
translate([size+sep,0,0])
|
||||||
|
binary_rec(n = (n-1)/2, size = size, depth = depth, sep = sep);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
binary(n = 23, size = 2, depth = 2, sep = 1);
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use <bezier_extrusion.scad>;
|
use <bezier_extrusion.scad>;
|
||||||
|
use <binary.scad>
|
||||||
|
|
||||||
module headband(thickness, height){
|
module headband(thickness, height, vers = false, vers_number = 0){
|
||||||
rake_length = 3;
|
rake_length = 3;
|
||||||
|
|
||||||
shape_band = [[thickness/2,height/2-0.4],
|
shape_band = [[thickness/2,height/2-0.4],
|
||||||
|
|
@ -29,7 +30,14 @@ module headband(thickness, height){
|
||||||
ctrl_rake = [[-52,86],[-40,139.5],[40,139.5],[52,86]];
|
ctrl_rake = [[-52,86],[-40,139.5],[40,139.5],[52,86]];
|
||||||
|
|
||||||
union(){
|
union(){
|
||||||
bezier_extrude(ctrl = ctrl_band, shape = shape_band, sections = 64);
|
difference(){
|
||||||
|
bezier_extrude(ctrl = ctrl_band, shape = shape_band, sections = 64);
|
||||||
|
if(vers){
|
||||||
|
translate([23,-1,-1])
|
||||||
|
rotate([0,0,49])
|
||||||
|
binary(n = vers_number, size = 2, depth = 1.5, sep = 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
mirror([1,0,0]) bezier_extrude(ctrl = ctrl_band, shape = shape_band, sections = 64);
|
mirror([1,0,0]) bezier_extrude(ctrl = ctrl_band, shape = shape_band, sections = 64);
|
||||||
bezier_extrude(ctrl = ctrl_end, shape = shape_band, sections = 16);
|
bezier_extrude(ctrl = ctrl_end, shape = shape_band, sections = 16);
|
||||||
translate([17,-8]){
|
translate([17,-8]){
|
||||||
|
|
@ -43,4 +51,5 @@ module headband(thickness, height){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
headband(thickness = 2.7, height = 5.5);
|
headband(thickness = 2.7, height = 5.5);
|
||||||
|
|
@ -7,6 +7,10 @@ height = 5.5;
|
||||||
epsilon = 0.001; //needs to be small but greater 0 so that the model doesn't break
|
epsilon = 0.001; //needs to be small but greater 0 so that the model doesn't break
|
||||||
smoothing = true;
|
smoothing = true;
|
||||||
|
|
||||||
|
vers_number = 1;
|
||||||
|
vers = false;
|
||||||
|
|
||||||
|
|
||||||
module catear(){
|
module catear(){
|
||||||
|
|
||||||
ctrl_ear1 = [[49,96],[58,112],[63,137],[61.5,141]];
|
ctrl_ear1 = [[49,96],[58,112],[63,137],[61.5,141]];
|
||||||
|
|
@ -55,7 +59,7 @@ module catear(){
|
||||||
|
|
||||||
module catears(){
|
module catears(){
|
||||||
union(){
|
union(){
|
||||||
headband(thickness = thickness, height = height);
|
headband(thickness = thickness, height = height, vers = vers, vers_number = vers_number);
|
||||||
catear();
|
catear();
|
||||||
mirror([1,0,0]) catear();
|
mirror([1,0,0]) catear();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
BIN
stl/catears.stl
BIN
stl/catears.stl
Binary file not shown.
66628
stl/test/catears_v1.stl
Normal file
66628
stl/test/catears_v1.stl
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue