MCPcopy Index your code
hub / github.com/CadQuery/cadquery / __getitem__

Method __getitem__

cadquery/assembly.py:800–812  ·  view source on GitHub ↗

[] based access to children.

(self, name: str)

Source from the content-addressed store, hash-verified

798 return self
799
800 def __getitem__(self, name: str) -> Union["Assembly", Shape]:
801 """
802 [] based access to children.
803
804 """
805
806 if name in self.objects:
807 return self.objects[name]
808 elif name in self._subshape_names.inv:
809 rv = self._subshape_names.inv[name]
810 return rv[0] if len(rv) == 1 else compound(rv)
811
812 raise KeyError
813
814 def _ipython_key_completions_(self) -> List[str]:
815 """

Callers

nothing calls this directly

Calls 1

compoundFunction · 0.85

Tested by

no test coverage detected