mirror of
https://github.com/gumyr/build123d.git
synced 2026-01-04 00:03:14 -08:00
Convert Shape methods to properties: is_null, is_valid, shape_type
This commit is contained in:
parent
f445de32c9
commit
560a5369b7
14 changed files with 75 additions and 82 deletions
|
|
@ -41,12 +41,12 @@ class TestShells(unittest.TestCase):
|
|||
def test_shell_init(self):
|
||||
box_faces = Solid.make_box(1, 1, 1).faces()
|
||||
box_shell = Shell(box_faces)
|
||||
self.assertTrue(box_shell.is_valid())
|
||||
self.assertTrue(box_shell.is_valid)
|
||||
|
||||
def test_shell_init_single_face(self):
|
||||
face = Solid.make_cone(1, 0, 2).faces().filter_by(GeomType.CONE).first
|
||||
shell = Shell(face)
|
||||
self.assertTrue(shell.is_valid())
|
||||
self.assertTrue(shell.is_valid)
|
||||
|
||||
def test_center(self):
|
||||
box_faces = Solid.make_box(1, 1, 1).faces()
|
||||
|
|
@ -71,9 +71,9 @@ class TestShells(unittest.TestCase):
|
|||
x_section = Rot(90) * Spline((0, -5), (-3, -2), (-2, 0), (-3, 2), (0, 5))
|
||||
surface = sweep(x_section, Circle(5).wire())
|
||||
single_face = Shell(surface.face())
|
||||
self.assertTrue(single_face.is_valid())
|
||||
self.assertTrue(single_face.is_valid)
|
||||
single_face = Shell(surface.faces())
|
||||
self.assertTrue(single_face.is_valid())
|
||||
self.assertTrue(single_face.is_valid)
|
||||
|
||||
def test_sweep(self):
|
||||
path_c1 = JernArc((0, 0), (-1, 0), 1, 180)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue