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

Method solids

cadquery/cq.py:921–948  ·  view source on GitHub ↗

Select the solids of objects on the stack, optionally filtering the selection. If there are multiple objects on the stack, the solids of all objects are collected and a list of all the distinct solids is returned. :param selector: optional Selector object, or string

(
        self: T,
        selector: Optional[Union[Selector, str]] = None,
        tag: Optional[str] = None,
    )

Source from the content-addressed store, hash-verified

919 return self._selectObjects("Wires", selector, tag)
920
921 def solids(
922 self: T,
923 selector: Optional[Union[Selector, str]] = None,
924 tag: Optional[str] = None,
925 ) -> T:
926 """
927 Select the solids of objects on the stack, optionally filtering the selection. If there are
928 multiple objects on the stack, the solids of all objects are collected and a list of all the
929 distinct solids is returned.
930
931 :param selector: optional Selector object, or string selector expression
932 (see :class:`StringSyntaxSelector`)
933 :param tag: if set, search the tagged object instead of self
934 :return: a CQ object whose stack contains all of the *distinct* solids of *all* objects on
935 the current stack, filtered by the provided selector.
936
937 If there are no solids for any objects on the current stack, an empty CQ object is returned
938
939 The typical use is to select a single object on the stack. For example::
940
941 Workplane().box(1, 1, 1).solids().size()
942
943 returns 1, because a cube consists of one solid.
944
945 It is possible for a single CQ object ( or even a single CAD primitive ) to contain
946 multiple solids.
947 """
948 return self._selectObjects("Solids", selector, tag)
949
950 def shells(
951 self: T,

Callers 15

testBaseDirSelectorMethod · 0.95
testCenterNthSelectorMethod · 0.95
unionMethod · 0.45
testImportDXFMethod · 0.45
test_step_optionsFunction · 0.45
test_fused_assemblyFunction · 0.45

Calls 1

_selectObjectsMethod · 0.95