@@ -5185,6 +5185,24 @@ def circumradius(n, a):
5185
5185
vs [3 ].toTuple (), approx ((a , - a * math .tan (math .radians (45 )), 0 ))
5186
5186
)
5187
5187
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
+
5188
5206
def test_MergeTags (self ):
5189
5207
5190
5208
a = Workplane ().box (1 , 1 , 1 )
@@ -5246,21 +5264,3 @@ def test_MergeTags(self):
5246
5264
a = a .union (b )
5247
5265
a = a .workplaneFromTagged ("zface" ).circle (0.2 )
5248
5266
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