MCPcopy
hub / github.com/CadQuery/cadquery / delete

Method delete

cadquery/sketch.py:751–769  ·  view source on GitHub ↗

Delete selected object.

(self: T)

Source from the content-addressed store, hash-verified

749 return self
750
751 def delete(self: T) -> T:
752 """
753 Delete selected object.
754 """
755
756 if self._selection:
757 for obj in self._selection:
758 if isinstance(obj, Face):
759 self._faces.remove(obj)
760 elif isinstance(obj, Edge):
761 self._edges.remove(obj)
762 else:
763 raise ValueError(f"Deletion of {obj} not supported")
764 else:
765 raise ValueError("Selection is needed to delete")
766
767 self.reset()
768
769 return self
770
771 # edge based interface
772

Callers 15

test_deleteFunction · 0.80
test_missing_selectionFunction · 0.80
KmFunction · 0.80
pbFunction · 0.80
oAFunction · 0.80
hAFunction · 0.80
mIFunction · 0.80
XBFunction · 0.80
TVFunction · 0.80
jUFunction · 0.80
LKFunction · 0.80
eFunction · 0.80

Calls 2

resetMethod · 0.95
removeMethod · 0.45

Tested by 2

test_deleteFunction · 0.64
test_missing_selectionFunction · 0.64