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

Method sort

cadquery/sketch.py:1309–1319  ·  view source on GitHub ↗

Sort items using a callable. :param key: Callable to be used for sorting. :return: Sketch object with items sorted.

(self: T, key: Callable[[SketchVal], Any])

Source from the content-addressed store, hash-verified

1307 return self
1308
1309 def sort(self: T, key: Callable[[SketchVal], Any]) -> T:
1310 """
1311 Sort items using a callable.
1312
1313 :param key: Callable to be used for sorting.
1314 :return: Sketch object with items sorted.
1315 """
1316
1317 self._selection = list(sorted(self.vals(), key=key))
1318
1319 return self
1320
1321 def invoke(
1322 self: T, f: Union[Callable[[T], T], Callable[[T], None], Callable[[], None]]

Callers

nothing calls this directly

Calls 1

valsMethod · 0.95

Tested by

no test coverage detected