[OpenSCAD] Proposal for extensions to the OpenSCAD syntax

nop head nop.head at gmail.com
Mon Oct 28 14:11:38 EDT 2019

Why do you need to automatic select between drawing an object and making a
hole for it? To me they are completely separate operations and I am quite
happy to code two separate modules and call them from different places.
E.g. I normally subtract the holes from a  panel and then later on I add
the object to the panel to make an assembly. If the panel is part of a 3D
printed object then the hole subtraction is done in 3D but if it is a
milled sheet then the the subtraction is done in 2D and extruded for the
assembly view.

On Mon, 28 Oct 2019 at 18:05, Torsten Paul <Torsten.Paul at gmx.de> wrote:

> 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.
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20191028/8eeac172/attachment.html>

More information about the Discuss mailing list