diff --git a/poly_gates.scad b/poly_gates.scad deleted file mode 100644 index 7a06889..0000000 --- a/poly_gates.scad +++ /dev/null @@ -1,17 +0,0 @@ -$fn = 32; -gate_height = 50; - -include; -include; -include; - -function throw_travel(throw) = gate_height * tan(throw); - -module shape_gate (shape, throw, shaft_r, sharpness = 0) { - hull(){ - round_poly(shape, shaft_r, sharpness); - } -} - -shape_gate(sqr_poly, 10, 9 / 2, 1); - diff --git a/shape_gate.scad b/shape_gate.scad new file mode 100644 index 0000000..161be45 --- /dev/null +++ b/shape_gate.scad @@ -0,0 +1,17 @@ +$fn = 100; +gate_height = 50; + +include; +include; + +module shape_gate (shape, throw, shaft_r, sharpness = 0) { + function throw_travel(throw) = gate_height * tan(throw); + + hull(){ + linear_extrude(0.1) + round_poly(shape, shaft_r, 0, sharpness); + translate([0,0,gate_height]) + linear_extrude(0.00001) + round_poly(shape, shaft_r, throw_travel(throw), sharpness); + } +}