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

Method key

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

Source from the content-addressed store, hash-verified

368 """
369
370 def key(self, obj: Shape) -> float:
371 if obj.ShapeType() in ("Edge", "Wire"):
372 return cast(Shape1DProtocol, obj).radius()
373 else:
374 raise ValueError("Can not get a radius from this object")
375
376
377class CenterNthSelector(_NthSelector):

Callers 1

testRadiusNthSelectorMethod · 0.95

Calls 2

ShapeTypeMethod · 0.45
radiusMethod · 0.45

Tested by 1

testRadiusNthSelectorMethod · 0.76