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

Method test_workplane_iter

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

Source from the content-addressed store, hash-verified

5856 assert Workplane().add(c).extrude(1).val().Volume() == approx(1)
5857
5858 def test_workplane_iter(self):
5859
5860 s = Workplane().sketch().rarray(5, 0, 5, 1).rect(1, 1).finalize()
5861 w1 = Workplane().pushPoints([(-10, 0), (10, 0)])
5862 w2 = w1.box(1, 1, 1) # NB this results in Compound of two Solids
5863 w3 = w1.box(1, 1, 1, combine=False)
5864
5865 assert len(list(s)) == 5
5866 assert len(list(w1)) == 0
5867 assert len(list(w2)) == 2 # 2 beacuase __iter__ unpacks Compounds
5868 assert len(list(w3)) == 2
5869
5870 def test_loft_face(self):
5871

Callers

nothing calls this directly

Calls 7

WorkplaneClass · 0.85
finalizeMethod · 0.80
sketchMethod · 0.80
pushPointsMethod · 0.80
boxMethod · 0.80
rectMethod · 0.45
rarrayMethod · 0.45

Tested by

no test coverage detected