Make a shape like a pipebend.
Sent from: http://forum.openscad.org/
There were many discussions about this here. A starting list may be:
http://forum.openscad.org/Curved-Cylinders-td18425.html
http://forum.openscad.org/Curved-bent-conical-tubing-td20686.html
If you're feeling silly and have OpenSCAD 2015 or more recent, you can do
something like this:
function flatten(list) = [for (a=list) for (b=a) b];module pipebend (
curve_radius=10, bend_angle=30, pipe_od=2, pipe_id=1.8, $fn=36 ) {
$fbend=$fn; $fpipe=$fn; or=pipe_od/2; ir=pipe_id/2;
c_step=360/$fpipe; b_steps=ceil(bend_angle/360*$fbend);
b_step=bend_angle/b_steps; opoints= flatten([for
(theta=[0:b_step:bend_angle]) [for (phi=[c_step:c_step:360])
[ cos(theta) * (curve_radius+orcos(phi)),
sin(theta) * (curve_radius+orcos(phi)),
orsin(phi) ] ] ]) ;
ofaces=flatten([concat( [[for (i=[$fpipe-1:-1:0]) i]],
flatten([for (j=[0:b_steps]) [for (i=[$fpipe-1:-1:0])
[j$fpipe+i,j*$fpipe+(i+1)%$fpipe,(j+1)$fpipe+(i+1)%$fpipe,(j+1)$fpipe+i]
] ]), [[for (i=[$fpipe:-1:0]) ($fpipe*(b_steps+1))-i]] )]);
ipoints= flatten([for (theta=[-b_step:b_step:bend_angle+b_step])
[for (phi=[c_step:c_step:360]) [ cos(theta)
--
Sent from: http://forum.openscad.org/
From OpenSCAD 2016.XX, there is a more home grown version:
pipebend($fn=36, bend_angle=60, curve_radius=5, pipe_od=5, pipe_id=4);
module pipebend (curve_radius=10,bend_angle=30,pipe_od=2,pipe_id=1.8,$fn=36)
rotate_extrude(angle=bend_angle)
translate([curve_radius, 0])
difference()
{
circle(d=pipe_od);
circle(d=pipe_id);
}
--
Sent from: http://forum.openscad.org/
pity there isn't a "native" (built in) path extrude I find it so useful
in blender...
On 22/03/18 11:25, Parkinbot wrote:
From OpenSCAD 2016.XX, there is a more home grown version:
pipebend($fn=36, bend_angle=60, curve_radius=5, pipe_od=5, pipe_id=4);
module pipebend (curve_radius=10,bend_angle=30,pipe_od=2,pipe_id=1.8,$fn=36)
rotate_extrude(angle=bend_angle)
translate([curve_radius, 0])
difference()
{
circle(d=pipe_od);
circle(d=pipe_id);
}
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
well there are some sweep libs out there that allow for this kind stuff.
How does blender treat selfintersections?
codifies wrote
pity there isn't a "native" (built in) path extrude I find it so useful
in blender...
--
Sent from: http://forum.openscad.org/
ignores them, if you're just rendering a soup of tri's - start to
attempt boolean ops on something self intersecting it aint gonna end
well...
On 22/03/18 12:42, Parkinbot wrote:
well there are some sweep libs out there that allow for this kind stuff.
How does blender treat selfintersections?
codifies wrote
pity there isn't a "native" (built in) path extrude I find it so useful
in blender...
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org