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

Method dist

cadquery/selectors.py:83–84  ·  view source on GitHub ↗
(tShape)

Source from the content-addressed store, hash-verified

81
82 def filter(self, objectList: Sequence[Shape]):
83 def dist(tShape):
84 return tShape.Center().sub(Vector(*self.pnt)).Length
85
86 return [min(objectList, key=dist)]
87

Callers

nothing calls this directly

Calls 3

VectorClass · 0.85
subMethod · 0.80
CenterMethod · 0.45

Tested by

no test coverage detected