Select compounds on the stack, optionally filtering the selection. If there are multiple objects on the stack, they are collected and a list of all the distinct compounds is returned. :param selector: optional Selector object, or string selector expression
(
self: T,
selector: Optional[Union[Selector, str]] = None,
tag: Optional[str] = None,
)
| 971 | return self._selectObjects("Shells", selector, tag) |
| 972 | |
| 973 | def compounds( |
| 974 | self: T, |
| 975 | selector: Optional[Union[Selector, str]] = None, |
| 976 | tag: Optional[str] = None, |
| 977 | ) -> T: |
| 978 | """ |
| 979 | Select compounds on the stack, optionally filtering the selection. If there are multiple |
| 980 | objects on the stack, they are collected and a list of all the distinct compounds |
| 981 | is returned. |
| 982 | |
| 983 | :param selector: optional Selector object, or string selector expression |
| 984 | (see :class:`StringSyntaxSelector`) |
| 985 | :param tag: if set, search the tagged object instead of self |
| 986 | :return: a CQ object whose stack contains all of the *distinct* compounds of *all* objects on |
| 987 | the current stack, filtered by the provided selector. |
| 988 | |
| 989 | A compound contains multiple CAD primitives that resulted from a single operation, such as |
| 990 | a union, cut, split, or fillet. Compounds can contain multiple edges, wires, or solids. |
| 991 | """ |
| 992 | return self._selectObjects("Compounds", selector, tag) |
| 993 | |
| 994 | def ancestors(self: T, kind: Shapes, tag: Optional[str] = None) -> T: |
| 995 | """ |