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

Method compounds

cadquery/cq.py:973–992  ·  view source on GitHub ↗

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,
    )

Source from the content-addressed store, hash-verified

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 """

Callers 5

testTagSelectorsMethod · 0.80
testCompoundsMethod · 0.80
testSolidMethod · 0.80
testBaseDirSelectorMethod · 0.80

Calls 1

_selectObjectsMethod · 0.95

Tested by 5

testTagSelectorsMethod · 0.64
testCompoundsMethod · 0.64
testSolidMethod · 0.64
testBaseDirSelectorMethod · 0.64