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

Method edges

cadquery/cq.py:861–893  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

859 return self._selectObjects("Faces", selector, tag)
860
861 def edges(
862 self: T,
863 selector: Optional[Union[Selector, str]] = None,
864 tag: Optional[str] = None,
865 ) -> T:
866 """
867 Select the edges of objects on the stack, optionally filtering the selection. If there are
868 multiple objects on the stack, the edges of all objects are collected and a list of all the
869 distinct edges is returned.
870
871 :param selector: optional Selector object, or string selector expression
872 (see :class:`StringSyntaxSelector`)
873 :param tag: if set, search the tagged object instead of self
874 :return: a CQ object whose stack contains all of the *distinct* edges of *all* objects on
875 the current stack, filtered by the provided selector.
876
877 If there are no edges for any objects on the current stack, an empty CQ object is returned
878
879 The typical use is to select the edges of a single object on the stack. For example::
880
881 Workplane().box(1, 1, 1).faces("+Z").edges().size()
882
883 returns 4, because the topmost face of a cube will contain four edges. Similarly::
884
885 Workplane().box(1, 1, 1).edges().size()
886
887 returns 12, because a cube has a total of 12 edges, And::
888
889 Workplane().box(1, 1, 1).edges("|Z").size()
890
891 returns 4, because a cube has 4 edges parallel to the z direction
892 """
893 return self._selectObjects("Edges", selector, tag)
894
895 def wires(
896 self: T,

Callers 15

filletMethod · 0.95
chamferMethod · 0.95
testCenterNthSelectorMethod · 0.95
interpPlateMethod · 0.45
test_bad_plane_inputMethod · 0.45
test_face_interfaceFunction · 0.45
test_distributeFunction · 0.45
test_modifiersFunction · 0.45
test_deleteFunction · 0.45
test_selectorsFunction · 0.45
test_mixed_closeFunction · 0.45
test_siblingsFunction · 0.45

Calls 1

_selectObjectsMethod · 0.95

Tested by 15

testCenterNthSelectorMethod · 0.76
test_bad_plane_inputMethod · 0.36
test_face_interfaceFunction · 0.36
test_distributeFunction · 0.36
test_modifiersFunction · 0.36
test_deleteFunction · 0.36
test_selectorsFunction · 0.36
test_mixed_closeFunction · 0.36
test_siblingsFunction · 0.36
testImportDXFMethod · 0.36
test_splineMethod · 0.36
testDXFMethod · 0.36