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

Method testConstructionWire

tests/test_cadquery.py:1652–1667  ·  view source on GitHub ↗

Tests a wire with several holes, that are based on the vertices of a square also tests using a workplane plane other than XY

(self)

Source from the content-addressed store, hash-verified

1650 self.assertEqual(7, r.faces().size())
1651
1652 def testConstructionWire(self):
1653 """
1654 Tests a wire with several holes, that are based on the vertices of a square
1655 also tests using a workplane plane other than XY
1656 """
1657 s = Workplane(Plane.YZ())
1658 r = (
1659 s.rect(2.0, 2.0)
1660 .rect(1.3, 1.3, forConstruction=True)
1661 .vertices()
1662 .circle(0.125)
1663 .extrude(0.5)
1664 )
1665 self.saveModel(r)
1666 # 10 faces-- 6 plus 4 holes, the vertices of the second rect.
1667 self.assertEqual(10, r.faces().size())
1668
1669 def testTwoWorkplanes(self):
1670 """

Callers

nothing calls this directly

Calls 9

rectMethod · 0.95
saveModelMethod · 0.95
WorkplaneClass · 0.85
YZMethod · 0.80
extrudeMethod · 0.80
circleMethod · 0.45
verticesMethod · 0.45
sizeMethod · 0.45
facesMethod · 0.45

Tested by

no test coverage detected