Skip to content

Commit f9b5b07

Browse files
committed
added test
1 parent 4bf22a9 commit f9b5b07

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/test_cadquery.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5246,3 +5246,21 @@ def test_MergeTags(self):
52465246
a = a.union(b)
52475247
a = a.workplaneFromTagged("zface").circle(0.2)
52485248
assert a.edges("%CIRCLE").val().Center().toTuple() == approx((0, 0, 0.5))
5249+
5250+
def test_combineWithBase(self):
5251+
# Test the helper mehod _combinewith
5252+
5253+
box = Workplane().box(10,10,10)
5254+
sphere = box.faces(">Z").sphere(2)
5255+
new_box = box._combineWithBase(sphere.val())
5256+
5257+
self.assertGreater(new_box.val().Volume(), box.val().Volume())
5258+
5259+
def test_cutFromBase(self):
5260+
# Test the helper method _cutFromBase
5261+
5262+
box = Workplane().box(10,10,10)
5263+
sphere = Workplane().sphere(2)
5264+
hoolow_box = box._cutFromBase(sphere.val())
5265+
5266+
self.assertGreater(box.val().Volume(), hoolow_box.val().Volume())

0 commit comments

Comments
 (0)