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

Method test_distance

tests/test_cadquery.py:5634–5647  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5632 )
5633
5634 def test_distance(self):
5635
5636 w1 = Face.makePlane(2, 2).Wires()[0]
5637 w2 = Face.makePlane(1, 1).Wires()[0]
5638 w3 = Face.makePlane(3, 3).Wires()[0]
5639
5640 d12 = w1.distance(w2)
5641
5642 assert d12 == approx(0.5)
5643
5644 d12, d13 = w1.distances(w2, w3)
5645
5646 assert d12 == approx(0.5)
5647 assert d13 == approx(0.5)
5648
5649 def test_project(self):
5650

Callers

nothing calls this directly

Calls 4

WiresMethod · 0.80
makePlaneMethod · 0.80
distancesMethod · 0.80
distanceMethod · 0.45

Tested by

no test coverage detected