[OpenSCAD] Not understanding things

NateTG nate-openscadforum at pedantic.org
Fri Jan 26 22:27:18 EST 2018

The trick with skin() and sweep() is that they don't use the geometry engine,
and do calculations in "user space" instead.  That means that they don't
really play well with other stuff.  In particular, you can't use them with
geometry that's produced by 'module' constructions.

This might be a simpler example to look at for how they work:


> I see in the code and the picture that it ends with a
> rounded_rectangle_profile; but I don't understand why it starts with a
> square one since that isn't specified in the skin example ...

The function rounded_rectangle_profile() generates a rectangle with rounded
corners.  In the example you quote, the "i/mylen*2" changes the radius of
the rounded corners from being 0 (so they're sharp) to being 2 (so that the
'square' is now only rounded corners.)  It's not just generating the start
and end points, but also a bunch of intermediate ones.

You can see what rounded_rectangle_profile() does here:

Sent from: http://forum.openscad.org/

More information about the Discuss mailing list