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