Skip to content

Commit 699ffa1

Browse files
committed
Update test_cadquery.py
1 parent db070a9 commit 699ffa1

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

tests/test_cadquery.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5185,6 +5185,24 @@ def circumradius(n, a):
51855185
vs[3].toTuple(), approx((a, -a * math.tan(math.radians(45)), 0))
51865186
)
51875187

5188+
def test_combineWithBase(self):
5189+
# Test the helper mehod _combinewith
5190+
5191+
box = Workplane().box(10, 10, 10)
5192+
sphere = box.faces(">Z").sphere(2)
5193+
new_box = box._combineWithBase(sphere.val())
5194+
5195+
self.assertGreater(new_box.val().Volume(), box.val().Volume())
5196+
5197+
def test_cutFromBase(self):
5198+
# Test the helper method _cutFromBase
5199+
5200+
box = Workplane().box(10, 10, 10)
5201+
sphere = Workplane().sphere(2)
5202+
hoolow_box = box._cutFromBase(sphere.val())
5203+
5204+
self.assertGreater(box.val().Volume(), hoolow_box.val().Volume())
5205+
51885206
def test_MergeTags(self):
51895207

51905208
a = Workplane().box(1, 1, 1)
@@ -5246,21 +5264,3 @@ def test_MergeTags(self):
52465264
a = a.union(b)
52475265
a = a.workplaneFromTagged("zface").circle(0.2)
52485266
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)