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

Method apply

cadquery/sketch.py:1297–1307  ·  view source on GitHub ↗

Apply a callable to all items at once. :param f: Callable to be applied. :return: Sketch object with f applied to all items.

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

Source from the content-addressed store, hash-verified

1295 return self
1296
1297 def apply(self: T, f: Callable[[Iterable[SketchVal]], Iterable[SketchVal]]):
1298 """
1299 Apply a callable to all items at once.
1300
1301 :param f: Callable to be applied.
1302 :return: Sketch object with f applied to all items.
1303 """
1304
1305 self._selection = list(f(self.vals()))
1306
1307 return self
1308
1309 def sort(self: T, key: Callable[[SketchVal], Any]) -> T:
1310 """

Callers

nothing calls this directly

Calls 2

valsMethod · 0.95
fFunction · 0.50

Tested by

no test coverage detected