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

Method testGlue

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

Source from the content-addressed store, hash-verified

4706 line.section()
4707
4708 def testGlue(self):
4709
4710 box1 = Workplane("XY").rect(1, 1).extrude(2)
4711 box2 = Workplane("XY", origin=(0, 1, 0)).rect(1, 1).extrude(1)
4712 res = box1.union(box2, glue=True)
4713
4714 self.assertEqual(res.faces().size(), 8)
4715
4716 obj = obj = (
4717 Workplane("XY").rect(1, 1).extrude(2).moveTo(0, 2).rect(1, 1).extrude(2)
4718 )
4719 res = obj.union(box2, glue=True)
4720
4721 self.assertEqual(res.faces().size(), 10)
4722
4723 def testFuzzyBoolOp(self):
4724

Callers

nothing calls this directly

Calls 7

WorkplaneClass · 0.85
extrudeMethod · 0.80
unionMethod · 0.80
moveToMethod · 0.80
rectMethod · 0.45
sizeMethod · 0.45
facesMethod · 0.45

Tested by

no test coverage detected