MCPcopy Create free account
hub / github.com/CadQuery/cadquery / map

Method map

cadquery/sketch.py:1285–1295  ·  view source on GitHub ↗

Apply a callable to every item separately. :param f: Callable to be applied to every item separately. :return: Sketch object with f applied to all items.

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

Source from the content-addressed store, hash-verified

1283 return self
1284
1285 def map(self: T, f: Callable[[SketchVal], SketchVal]):
1286 """
1287 Apply a callable to every item separately.
1288
1289 :param f: Callable to be applied to every item separately.
1290 :return: Sketch object with f applied to all items.
1291 """
1292
1293 self._selection = list(map(f, self.vals()))
1294
1295 return self
1296
1297 def apply(self: T, f: Callable[[Iterable[SketchVal]], Iterable[SketchVal]]):
1298 """

Callers

nothing calls this directly

Calls 1

valsMethod · 0.95

Tested by

no test coverage detected