Another newbie question about the use of %, # and producing single objects

15 views
Skip to first unread message

Matthieu Hendriks

unread,
Jun 6, 2025, 1:37:46 AMJun 6
to PythonSCAD
Is there an equivalent in pythonscad for the use of % and # ?

When rendering 3 different objects in python scad to 1 stl file, the slicer will see this as one object instead of three.
In openscad there is an option lazy union for multiple objects. Is this the same in pythonscad?

Guenther Sohler

unread,
Jun 6, 2025, 2:26:00 AMJun 6
to Matthieu Hendriks, PythonSCAD
Yes, there are equivalents of % and # in pythonSCAD.

you can instead use


object.highlight()
object.background()
object.only()

Same functionality is available at

+object (unary op)
-object(unary op)
!object(unary op)


PythonSCAD does not need to use workarounds like Lazy Union, as you can decide yourself when to apply variables.
When  "imitating"   lazy Union for export you can simply export 2 different models into one file  like

export({"mod1": model1, "mod2" : model2},"mydesign.3mf")

hope that helps.

ps: OpenSCAD devs don't support/like  lazy Union either







--
You received this message because you are subscribed to the Google Groups "PythonSCAD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pythonscad+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/pythonscad/8aae4f21-6d9f-43cc-a5a1-a44950549934n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages