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

Method testSection

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

Source from the content-addressed store, hash-verified

4691 assert obj.val().isValid()
4692
4693 def testSection(self):
4694
4695 box = Workplane("XY", origin=(1, 2, 3)).box(1, 1, 1)
4696
4697 s1 = box.section()
4698 s2 = box.section(0.5)
4699
4700 self.assertAlmostEqual(s1.faces().val().Area(), 1)
4701 self.assertAlmostEqual(s2.faces().val().Area(), 1)
4702
4703 line = Workplane("XY").hLine(1)
4704
4705 with self.assertRaises(ValueError):
4706 line.section()
4707
4708 def testGlue(self):
4709

Callers

nothing calls this directly

Calls 7

WorkplaneClass · 0.85
boxMethod · 0.80
sectionMethod · 0.80
hLineMethod · 0.80
AreaMethod · 0.45
valMethod · 0.45
facesMethod · 0.45

Tested by

no test coverage detected