[OpenSCAD] Proposal for extensions to the OpenSCAD syntax

Torsten Paul Torsten.Paul at gmx.de
Mon Oct 28 14:04:25 EDT 2019


On 28.10.19 09:51, nop head wrote:
> Why don't you simply define two modules foo_union()
> and foo_diff()? 

That's of cause possible but means there's no way
to automatically select those.

> In conventional programming it is bonkers to have
> combine two completely different bits of code in one
> function and pass a global variable to decide which
> one is executed.

True, but if we can find a way to hide that extra
logic in a sensible way, that could make objects
easier to compose. People have asked for that all
the time.
The main question is probably if this kind of
relation can be expressed in a general, independent
from a specific design.

ciao,
  Torsten.



More information about the Discuss mailing list