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

Method testUnionCompound

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

Source from the content-addressed store, hash-verified

4675 self.assertAlmostEqual(bb.zlen, h, 1)
4676
4677 def testUnionCompound(self):
4678
4679 box1 = Workplane("XY").box(10, 20, 30)
4680 box2 = Workplane("YZ").box(10, 20, 30)
4681 shape_to_cut = Workplane("XY").box(15, 15, 15).translate((8, 8, 8))
4682
4683 list_of_shapes = []
4684 for o in box1.all():
4685 list_of_shapes.extend(o.vals())
4686 for o in box2.all():
4687 list_of_shapes.extend(o.vals())
4688
4689 obj = Workplane("XY").newObject(list_of_shapes).cut(shape_to_cut)
4690
4691 assert obj.val().isValid()
4692
4693 def testSection(self):
4694

Callers

nothing calls this directly

Calls 10

WorkplaneClass · 0.85
boxMethod · 0.80
allMethod · 0.80
extendMethod · 0.80
newObjectMethod · 0.80
isValidMethod · 0.80
translateMethod · 0.45
valsMethod · 0.45
cutMethod · 0.45
valMethod · 0.45

Tested by

no test coverage detected