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

Function test_reverse

tests/test_shapes.py:416–429  ·  view source on GitHub ↗
(simple_box)

Source from the content-addressed store, hash-verified

414
415
416def test_reverse(simple_box):
417
418 simple_box = box(1, 1, 1)
419
420 assert simple_box.Volume() > 0
421
422 br = simple_box.reverse()
423
424 # reversed solid will have a negative volume
425 assert br.Volume() < 0
426
427 # normals will be pointing in opposite direction
428 delta = simple_box.face().normalAt() + br.face().normalAt()
429 assert delta.Length == approx(0)
430
431
432def test_siblings(simple_box):

Callers

nothing calls this directly

Calls 5

boxFunction · 0.90
VolumeMethod · 0.80
reverseMethod · 0.80
normalAtMethod · 0.45
faceMethod · 0.45

Tested by

no test coverage detected