Reputation: 6343
How can I create this shape? The depicted shape can be interpreted as one of the following:
-- The curve on the face of the circle would be ideal for accuracy, but not strictly necessary.
Approximation in OpenSCAD using this code:
Shape achieved in Fusion360:
Upvotes: 1
Views: 852
Reputation: 4286
You can simply extrude a circle and scale it over the length of extrusion to a flat line. The scale-parameter s. documentation of linear_extrude can be a scalar or a vector with x- and y-scale-factor. Set one of them to 1 and the other to 0:
$fs = 0.01;
$fa = 0.01;
linear_extrude(height = 15, scale =[0, 1]) circle(d = 10);
Upvotes: 5
Reputation: 6343
I learned you can do a convex loft using hull.
module pinch(h=1,r1=1,r2=1,r3=0) {
zero = 0.00000000001;
steps = $fn ? $fn : $fa;
res = h/steps;
r1 = r1 ? r1 : res;
r2 = r2 ? r2 : res;
r3 = r3 ? r3 : zero;
hull() {
cylinder(h=zero,r=r1,r2=res,r3=0,center=false);
translate([-r2, -r3, h - zero]) cube([
r2 * 2,
r3 * 2,
zero
]);
}
}
translate([1,0,.5]) rotate([0,-90,0]) pinch(1, .5, .5, $fn=50);
Upvotes: 0