Filters objects of the selected type with the specified selector,and returns results :param objType: the type of object we are searching for :type objType: string: (Vertex|Edge|Wire|Solid|Shell|Compound|CompSolid) :param tag: if set, search the tagged CQ object inst
(
self: T,
objType: Any,
selector: Optional[Union[Selector, str]] = None,
tag: Optional[str] = None,
)
| 751 | return found |
| 752 | |
| 753 | def _selectObjects( |
| 754 | self: T, |
| 755 | objType: Any, |
| 756 | selector: Optional[Union[Selector, str]] = None, |
| 757 | tag: Optional[str] = None, |
| 758 | ) -> T: |
| 759 | """ |
| 760 | Filters objects of the selected type with the specified selector,and returns results |
| 761 | |
| 762 | :param objType: the type of object we are searching for |
| 763 | :type objType: string: (Vertex|Edge|Wire|Solid|Shell|Compound|CompSolid) |
| 764 | :param tag: if set, search the tagged CQ object instead of self |
| 765 | :return: a CQ object with the selected objects on the stack. |
| 766 | |
| 767 | **Implementation Note**: This is the base implementation of the vertices,edges,faces, |
| 768 | solids,shells, and other similar selector methods. It is a useful extension point for |
| 769 | plugin developers to make other selector methods. |
| 770 | """ |
| 771 | cq_obj = self._getTagged(tag) if tag else self |
| 772 | |
| 773 | # A single list of all faces from all objects on the stack |
| 774 | toReturn = cq_obj._collectProperty(objType) |
| 775 | |
| 776 | return self.newObject(self._filter(toReturn, selector)) |
| 777 | |
| 778 | def _filter(self, objs, selector: Optional[Union[Selector, str]]): |
| 779 |