discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] general extrusion (imperfect)

DE
David Eccles (gringer)
Thu, Nov 26, 2015 7:03 PM

I've also written an 'extrude along path' script. It's a Perl script to
generate an OpenSCAD polyhedron definition that extrudes a polygon
along a specified path. The path and polygon can be specified as
explicit points, or as a function on the parameter t (t = 0 .. 2*pi).

http://www.thingiverse.com/thing:186660

Now that I'm aware how powerful OpenSCAD code can be (see for example
[http://www.thingiverse.com/thing:942566]), I realise it can be
converted to pure OpenSCAD code, but need to put in some more time to
do the porting.

Unfortunately, I can't work out how to get rid of ugly twists in the
extrusion.

I've also written an 'extrude along path' script. It's a Perl script to generate an OpenSCAD polyhedron definition that extrudes a polygon along a specified path. The path and polygon can be specified as explicit points, or as a function on the parameter t (t = 0 .. 2*pi). http://www.thingiverse.com/thing:186660 Now that I'm aware how powerful OpenSCAD code can be (see for example [http://www.thingiverse.com/thing:942566]), I realise it can be converted to pure OpenSCAD code, but need to put in some more time to do the porting. Unfortunately, I can't work out how to get rid of ugly twists in the extrusion.
P
Parkinbot
Thu, Nov 26, 2015 7:39 PM

David Eccles (gringer) wrote

I've also written an 'extrude along path' script. It's a Perl script to
generate an OpenSCAD polyhedron definition that extrudes a polygon along a
specified path.

Welcome to the club. Wouldn't it be nicer, to be able to just call out?

David Eccles (gringer) wrote

I realise it can be converted to pure OpenSCAD code, but need to put in
some more time to do the porting.

Coming from Perl, you might be lucky. But I doubt. My port took twice the
time of developing the whole code at first hand.

David Eccles (gringer) wrote

Unfortunately, I can't work out how to get rid of ugly twists in the
extrusion.

Refine your mesh, if you calc all in Perl. If you use linear_extrude() there
is a slices parameter to do this. Or you use some interpolation technique
like nSplines() or vduplicate_bezier4()

  • Rudolf

--
View this message in context: http://forum.openscad.org/general-extrusion-imperfect-tp14740p14768.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

David Eccles (gringer) wrote > I've also written an 'extrude along path' script. It's a Perl script to > generate an OpenSCAD polyhedron definition that extrudes a polygon along a > specified path. Welcome to the club. Wouldn't it be nicer, to be able to just call out? David Eccles (gringer) wrote > I realise it can be converted to pure OpenSCAD code, but need to put in > some more time to do the porting. Coming from Perl, you might be lucky. But I doubt. My port took twice the time of developing the whole code at first hand. David Eccles (gringer) wrote > Unfortunately, I can't work out how to get rid of ugly twists in the > extrusion. Refine your mesh, if you calc all in Perl. If you use linear_extrude() there is a slices parameter to do this. Or you use some interpolation technique like nSplines() or vduplicate_bezier4() - Rudolf -- View this message in context: http://forum.openscad.org/general-extrusion-imperfect-tp14740p14768.html Sent from the OpenSCAD mailing list archive at Nabble.com.
N
Neon22
Thu, Nov 26, 2015 9:38 PM

Given the choice I personally would prefer a Bspline based approach over a
Bezier.

  • due to the control points affecting the curve locally.

Extrude along path has to make local transformations at each step to avoid
the flipping problem created by gimbal locking (Euler interp and fixed
rotation order). Else its quaternions and off we go...

So making each extrude be a local coordinate offset from previous one is
ideal solution.
Also means we can make adjustments each extrusion - like scale, shape
change,...

--
View this message in context: http://forum.openscad.org/general-extrusion-imperfect-tp14740p14774.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Given the choice I personally would prefer a Bspline based approach over a Bezier. - due to the control points affecting the curve locally. Extrude along path has to make local transformations at each step to avoid the flipping problem created by gimbal locking (Euler interp and fixed rotation order). Else its quaternions and off we go... So making each extrude be a local coordinate offset from previous one is ideal solution. Also means we can make adjustments each extrusion - like scale, shape change,... -- View this message in context: http://forum.openscad.org/general-extrusion-imperfect-tp14740p14774.html Sent from the OpenSCAD mailing list archive at Nabble.com.