pinch.scad 646 B

1234567891011121314151617181920
  1. module pinch(pinchRadius, circleRadius, centerWidth=0, round=false, center=true) {
  2. zero = 0.0001;
  3. height=circleRadius*2;
  4. width = max(zero, centerWidth);
  5. hull() {
  6. rotate([0,0,-90]) translate([0,0,center ? -circleRadius : 0]) {
  7. intersection() {
  8. translate([pinchRadius,0,circleRadius]) sphere(circleRadius);
  9. difference() {
  10. cylinder(height, r=pinchRadius);
  11. translate([0,0,-1]) cylinder(height + 2, r=pinchRadius - zero);
  12. }
  13. }
  14. translate([0,-.5*width,0]) cube([zero,1*width,height]);
  15. }
  16. }
  17. }