Final version for now (3.1)

This commit is contained in:
Quinn
2022-04-27 10:44:10 -07:00
parent 4516981892
commit 85c738c57e
6 changed files with 33 additions and 29 deletions
+15 -11
View File
@@ -1,18 +1,22 @@
$fn = 100;
gate_height = 50;
gate_height = 28;
include<math.scad>;
include<round_poly.scad>;
module shape_gate (shape, throw, shaft_r, sharpness = 0) {
function throw_travel(throw) = gate_height * tan(throw);
hull(){
translate([0,0, -(shaft_r / tan(throw))])
linear_extrude(0.1)
round_poly(shape, 0, 0, sharpness);
translate([0,0,gate_height])
linear_extrude(0.00001)
round_poly(shape, shaft_r, throw_travel(throw), sharpness);
module shape_gate (shape, throw, shaft_r, sharpness = 0, collar_h, pivot_depth, bevel) {
function throw_travel(throw, height) = height * tan(throw);
union(){
translate([0,0, pivot_depth])
linear_extrude(bevel[0] + 1)
round_poly(shape, shaft_r, throw_travel(throw, pivot_depth + bevel[0]), sharpness);
hull(){
translate([0,0, pivot_depth + bevel[0]])
linear_extrude(0.00001)
round_poly(shape, shaft_r, throw_travel(throw, pivot_depth + bevel[0]), sharpness);
translate([0,0,collar_h + pivot_depth - bevel[1]])
linear_extrude(1)
round_poly(shape, shaft_r, throw_travel(throw, pivot_depth + collar_h - bevel[1]), sharpness);
}
}
}