From 76c9a21e662b8face9ca6140ba9b45a3df98cd1b Mon Sep 17 00:00:00 2001 From: Elena of Valhalla'' Grandi Date: Sat, 19 Apr 2014 15:28:07 +0200 Subject: Migrated foot to modular design --- lib/connectors.scad | 37 +++++++++++++++++++++++++++++++++++++ parts/foot-60-end.scad | 18 ++++++++++++++++++ parts/foot-60.scad | 18 ++++++++++++++++++ parts/foot-90.scad | 18 ++++++++++++++++++ parts/foot.scad | 39 --------------------------------------- 5 files changed, 91 insertions(+), 39 deletions(-) create mode 100644 lib/connectors.scad create mode 100644 parts/foot-60-end.scad create mode 100644 parts/foot-60.scad create mode 100644 parts/foot-90.scad delete mode 100644 parts/foot.scad diff --git a/lib/connectors.scad b/lib/connectors.scad new file mode 100644 index 0000000..063bcaa --- /dev/null +++ b/lib/connectors.scad @@ -0,0 +1,37 @@ + +module foot(radius,wall,len,foot_radius,foot_height,angle,hole_radius,hole_dist,end=true,hole=true,circlet=true) { + + cut_h = (radius+wall)*sin(angle); + cut_r = (radius+wall)/cos(angle); + + difference() { + union() { + difference() { + rotate([0,angle,0]) cylinder(r=radius + wall, h = len); + translate([0,0,-cut_h]) cylinder(r=cut_r, h=cut_h); + } + translate([0,0,-0.01]) cylinder(r = foot_radius, h = foot_height); + if (circlet) { + translate([-(wall+radius),0,foot_height+2]) rotate([90, 0, 0]) difference() { + cylinder(r=8, h=4, center=true); + cylinder(r=4, h=5, center=true); + } + } + if (end) { + translate([cut_r,0,radius+wall]) rotate([0,90,0]) + cylinder(r=radius + wall, h = len); + } + } + if (circlet) { + rotate([0, angle, 0]) translate([0,0, radius * sin(angle) + foot_height]) cylinder(r = radius, h = len); + } + if (hole) { + translate([0,foot_radius - hole_dist,-1]) cylinder(r=hole_radius, h=foot_height + 2); + translate([0,-foot_radius + hole_dist,-1]) cylinder(r=hole_radius, h=foot_height + 2); + } + if (end) { + translate([cut_r+wall/2,0,radius+wall]) rotate([0,90,0]) + translate([0,0,wall]) cylinder(r=radius, h=len); + } + } +} diff --git a/parts/foot-60-end.scad b/parts/foot-60-end.scad new file mode 100644 index 0000000..1b49d59 --- /dev/null +++ b/parts/foot-60-end.scad @@ -0,0 +1,18 @@ + +include <../lib/connectors.scad> + +radius = 8.25; +wall = 6; +len = 40; +foot_radius = 30; +foot_height = 8; +angle = 30; +hole_radius = 3; +hole_dist = 8; + +end = true; +hole = true; +circlet = true; + +foot(radius,wall,len,foot_radius,foot_height,angle,hole_radius,hole_dist,end=end,hole=hole,circlet=circlet); + diff --git a/parts/foot-60.scad b/parts/foot-60.scad new file mode 100644 index 0000000..5aa11e5 --- /dev/null +++ b/parts/foot-60.scad @@ -0,0 +1,18 @@ + +include <../lib/connectors.scad> + +radius = 8.25; +wall = 6; +len = 40; +foot_radius = 30; +foot_height = 8; +angle = 30; +hole_radius = 3; +hole_dist = 8; + +end = false; +hole = true; +circlet = true; + +foot(radius,wall,len,foot_radius,foot_height,angle,hole_radius,hole_dist,end=end,hole=hole,circlet=circlet); + diff --git a/parts/foot-90.scad b/parts/foot-90.scad new file mode 100644 index 0000000..e4a58f7 --- /dev/null +++ b/parts/foot-90.scad @@ -0,0 +1,18 @@ + +include <../lib/connectors.scad> + +radius = 8.25; +wall = 6; +len = 40; +foot_radius = 30; +foot_height = 8; +angle = 00; +hole_radius = 3; +hole_dist = 8; + +end = false; +hole = true; +circlet = true; + +foot(radius,wall,len,foot_radius,foot_height,angle,hole_radius,hole_dist,end=end,hole=hole,circlet=circlet); + diff --git a/parts/foot.scad b/parts/foot.scad deleted file mode 100644 index 59a1f2e..0000000 --- a/parts/foot.scad +++ /dev/null @@ -1,39 +0,0 @@ - -radius = 8.25; -wall = 6; -len = 40; -foot_radius = 30; -foot_height = 8; -angle = 30; -hole_radius = 3; -hole_dist = 8; - -end = true; - -cut_h = (radius+wall)*sin(angle) + 1; -cut_r = (radius+wall)/cos(angle) + 1; - -difference() { - union() { - difference() { - rotate([0,angle,0]) cylinder(r=radius + wall, h = len); - translate([0,0,-cut_h]) cylinder(r=cut_r, h=cut_h); - } - translate([0,0,-0.01]) cylinder(r = foot_radius, h = foot_height); - translate([-cut_r+3.5,0,cut_h+2]) rotate([90, 0, 0]) difference() { - cylinder(r=8, h = 4, center=true); - cylinder(r=4, h=5, center=true); - } - if (end) { - translate([cut_r+wall/2,0,radius+wall]) rotate([0,90,0]) - cylinder(r=radius + wall, h = len); - } - } - rotate([0, angle, 0]) translate([0,0, radius * sin(angle) + foot_height]) cylinder(r = radius, h = len); - translate([0,foot_radius - hole_dist,-1]) cylinder(r=hole_radius, h=foot_height + 2); - translate([0,-foot_radius + hole_dist,-1]) cylinder(r=hole_radius, h=foot_height + 2); - if (end) { - translate([cut_r+wall/2,0,radius+wall]) rotate([0,90,0]) - translate([0,0,wall]) cylinder(r=radius, h=len); - } -} -- cgit v1.2.3