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

Method key

cadquery/selectors.py:463–469  ·  view source on GitHub ↗
(self, obj: Shape)

Source from the content-addressed store, hash-verified

461 """
462
463 def key(self, obj: Shape) -> float:
464 if obj.ShapeType() in ("Edge", "Wire"):
465 return cast(Shape1DProtocol, obj).Length()
466 else:
467 raise ValueError(
468 f"LengthNthSelector supports only Edges and Wires, not {type(obj).__name__}"
469 )
470
471
472class AreaNthSelector(_NthSelector):

Callers

nothing calls this directly

Calls 2

ShapeTypeMethod · 0.45
LengthMethod · 0.45

Tested by

no test coverage detected