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

Method filter

cadquery/cq.py:4460–4468  ·  view source on GitHub ↗

Filter items using a boolean predicate. :param f: Callable to be used for filtering. :return: Workplane object with filtered items.

(self: T, f: Callable[[CQObject], bool])

Source from the content-addressed store, hash-verified

4458 yield from el
4459
4460 def filter(self: T, f: Callable[[CQObject], bool]) -> T:
4461 """
4462 Filter items using a boolean predicate.
4463
4464 :param f: Callable to be used for filtering.
4465 :return: Workplane object with filtered items.
4466 """
4467
4468 return self.newObject(filter(f, self.objects))
4469
4470 def map(self: T, f: Callable[[CQObject], CQObject]) -> T:
4471 """

Callers 15

test_filterFunction · 0.45
test_specialFunction · 0.45
PFunction · 0.45
vtk.jsFile · 0.45
LFunction · 0.45
geFunction · 0.45
VnFunction · 0.45
QnFunction · 0.45
erFunction · 0.45
drFunction · 0.45
_rFunction · 0.45

Calls 1

newObjectMethod · 0.95

Tested by 3

test_filterFunction · 0.36
test_specialFunction · 0.36