Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,24 @@ is the same as:
cylinder(r=2, h=30)
)

To assist with debugging:

.. code:: python

c = ~cylinder(r=10, h=5)

is the same as:

.. code:: python

c = cylinder(r=10, h=5).set_modifier("#")

which in OpenSCAD would be:

.. code:: openscad

#cylinder(r=10, h=5)

First-class Negative Space (Holes)
----------------------------------

Expand Down
6 changes: 6 additions & 0 deletions solid/solidpython.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,12 @@ def __call__(self, *args: "OpenSCADObject") -> "OpenSCADObject":
"""
return self.add(args)

def __invert__(self):
"""
Same as .set_modifier("#")
"""
return self.set_modifier("#")

def __add__(self, x: "OpenSCADObject") -> "OpenSCADObject":
"""
This makes u = a+b identical to:
Expand Down