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

Method filter

cadquery/sketch.py:1273–1283  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

1271 return self
1272
1273 def filter(self: T, f: Callable[[SketchVal], bool]) -> T:
1274 """
1275 Filter items using a boolean predicate.
1276
1277 :param f: Callable to be used for filtering.
1278 :return: Sketch object with filtered items.
1279 """
1280
1281 self._selection = list(filter(f, self.vals()))
1282
1283 return self
1284
1285 def map(self: T, f: Callable[[SketchVal], SketchVal]):
1286 """

Callers 1

_selectMethod · 0.45

Calls 1

valsMethod · 0.95

Tested by

no test coverage detected