[OpenSCAD] OpenSCAD Tutorial - Google Season of Docs

Ronaldo Persiano rcmpersiano at gmail.com
Thu Oct 24 13:02:16 EDT 2019


Em qui, 24 de out de 2019 às 17:33, Torsten Paul <Torsten.Paul at gmx.de>
escreveu:

> On 24.10.19 16:34, Ronaldo Persiano wrote:
> F) Introduce cube() and other primitives as functions
>
> I don't understand that point. I can't find the word
> "function" in any of the PDFs.
>

For instance, at the beginning of sphere() description we find:

Sphere[edit
<https://en.wikibooks.org/w/index.php?title=OpenSCAD_Tutorial/Chapter_2&action=edit&section=2>
]

A sphere is always created centered on the origin. In complete relation to
the circle, there are 3 ways in which a sphere can be defined using
different inputs to the sphere() function.

Functions in OpenSCAD return a value and never a geometric object. Modules
never returns a value and may have children and may output a geometric
objects. sphere() is a module, not a function.

I understand that abstractly sphere() may be regarded as a function.
However, both syntactically and semantically they are different animals in
OpenSCAD.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20191024/cff91af9/attachment.html>


More information about the Discuss mailing list