Wait, what's the syntax? To make this happen? You're just using "-" for both operations, which memory tells me it's just a standard difference. This stand useful, but not if it messes with existing difference syntax.
Also, if I eventually do want to put something in the center, how do I tell it to stop enforcing negative space.
Might I suggest giving every object a sub variable "negative". The "negative" gets subtracted at the show cycle, every time two shapes get unioned, their "negatives" get unioned.
for each csg operation the input operands come with pos and neg, so this are 4:
how to calculate union, intersection, and difference with 4 inputs and each pos and neg output ..
and to continuie, whats about hull, offset, minkowski ...
negatives just getting unionied all the way is probably yields to a negative monster with nothing remaining .. i figured out quite obicvous equations which a remarkable pattern which can be found in my code
Lazy union is an effective method to keep toplevel objects separate, In any case its an openscad experimental feature and according to teepee, it has a 1% probabliy to get elevated in status.
PythonSCAD does not depend on that. It can collect all toplevel parts in separate variables and e.g use them in an export command to write separete named objects into an 3MF file.
As for negative space: If someone has his own perception on how negative space shall work, python is a very effective language to subclass the 'openscad' module, have a "positive" , a "negative" or maybe other members and an own set of methods to work on them.
3
u/Alacritous13 Sep 11 '25
Wait, what's the syntax? To make this happen? You're just using "-" for both operations, which memory tells me it's just a standard difference. This stand useful, but not if it messes with existing difference syntax.
Also, if I eventually do want to put something in the center, how do I tell it to stop enforcing negative space.
2
u/garblesnarky Sep 11 '25
I have definitely wanted this in openscad in the past, but I've adjusted my thinking to avoid needing it.
I'm not sure if it matches the implementation, but would "lazy difference" make sense as a name for the behavior?