| 12345678910111213141516171819202122 |
- module pinch(pinchRadius, circleRadius, centerWidth=0, round=false, center=true) {
- zero = 0.0001;
- height=circleRadius*2;
- width = max(zero, centerWidth);
- cube(1,1,1,center=true);
- hull() {
- translate([0,0,center ? -circleRadius : 0]) {
- intersection() {
- translate([pinchRadius,0,circleRadius]) sphere(circleRadius);
- difference() {
- cylinder(height, r=pinchRadius);
- translate([0,0,-1]) cylinder(height + 2, r=pinchRadius - zero);
- }
- }
- translate([0,-.5*width,0]) cube([zero,1*width,height]);
- }
- }
- }
|