From cd2c11ac7ca17135a72bea511d05e1a855fffac4 Mon Sep 17 00:00:00 2001 From: Mohamed Abouagour Date: Fri, 27 Dec 2024 00:33:46 -0500 Subject: [PATCH 1/6] NF: added box actor w/ faces fixed --- fury/actor.py | 90 +++++++++++++++++++++++++++++++++++++++++++++++ fury/primitive.py | 65 ++++++++++++++++++---------------- 2 files changed, 124 insertions(+), 31 deletions(-) diff --git a/fury/actor.py b/fury/actor.py index fbeb0498c..fec2437db 100644 --- a/fury/actor.py +++ b/fury/actor.py @@ -95,8 +95,98 @@ def sphere( colors=big_colors.astype("float32"), ) + mat = _create_mesh_material( + material=material, + enable_picking=enable_picking) + obj = create_mesh(geometry=geo, material=mat) + obj.local.position = centers[0] + obj.prim_count = prim_count + return obj + + +def box( + centers, + *, + directions=(1, 0, 0), + colors=(1, 0, 0), + scales=(1, 1, 1), + opacity=None, + material="phong", + enable_picking=True, +): + """Visualize one or many boxes with different features. + + Parameters + ---------- + centers : ndarray, shape (N, 3) + Box positions. + directions : ndarray, shape (N, 3), optional + The orientation vector of the box. + colors : ndarray (N,3) or (N, 4) or tuple (3,) or tuple (4,), optional + RGB or RGBA (for opacity) R, G, B and A should be at the range [0, 1]. + scales : int or ndarray (N,3) or tuple (3,), optional + The size of the box in each dimension. If a single value is provided, + the same size will be used for all boxes. + opacity : float, optional + Takes values from 0 (fully transparent) to 1 (opaque). + If both `opacity` and RGBA are provided, the final alpha will be: + final_alpha = alpha_in_RGBA * opacity + material : str, optional + The material type for the boxes. Options are 'phong' and 'basic'. + enable_picking : bool, optional + Whether the boxes should be pickable in a 3D scene. + + Returns + ------- + mesh_actor : Actor + A mesh actor containing the generated boxes, with the specified + material and properties. + + Examples + -------- + >>> from fury import window, actor + >>> import numpy as np + >>> scene = window.Scene() + >>> centers = np.random.rand(5, 3) * 10 + >>> directions = np.random.rand(5, 3) + >>> colors = np.random.rand(5, 3) + >>> scales = np.random.rand(5, 3) + >>> box_actor = actor.box(centers=centers, directions=directions, colors=colors, scales=scales) + >>> scene.add(box_actor) + >>> show_manager = window.ShowManager(scene=scene, size=(600, 600)) + >>> show_manager.start() + """ + vertices, faces = fp.prim_box() + res = fp.repeat_primitive( + vertices, + faces, + directions=directions, + centers=centers, + colors=colors, + scales=scales, + ) + big_vertices, big_faces, big_colors, _ = res + prim_count = len(centers) + big_colors = big_colors / 255.0 + + if isinstance(opacity, (int, float)): + if big_colors.shape[1] == 3: + big_colors = np.hstack( + (big_colors, np.full((big_colors.shape[0], 1), opacity)) + ) + else: + big_colors[:, 3] *= opacity + + geo = buffer_to_geometry( + indices=big_faces.astype("int32"), + positions=big_vertices.astype("float32"), + texcoords=big_vertices.astype("float32"), + colors=big_colors.astype("float32"), + ) mat = _create_mesh_material(material=material, enable_picking=enable_picking) obj = create_mesh(geometry=geo, material=mat) obj.local.position = centers[0] + obj.prim_count = prim_count + return obj diff --git a/fury/primitive.py b/fury/primitive.py index 67a94663d..c5e996a29 100644 --- a/fury/primitive.py +++ b/fury/primitive.py @@ -262,42 +262,45 @@ def prim_box(): Returns ------- vertices: ndarray - 8 vertices coords that composed our box + 24 vertices coords that composed our box triangles: ndarray 12 triangles that composed our box + normals: ndarray + 24 normals for each vertex of the box """ - vertices = np.array( - [ - [-0.5, -0.5, -0.5], - [-0.5, -0.5, 0.5], - [-0.5, 0.5, -0.5], - [-0.5, 0.5, 0.5], - [0.5, -0.5, -0.5], - [0.5, -0.5, 0.5], - [0.5, 0.5, -0.5], - [0.5, 0.5, 0.5], - ] - ) - triangles = np.array( - [ - [0, 6, 4], - [0, 2, 6], - [0, 3, 2], - [0, 1, 3], - [2, 7, 6], - [2, 3, 7], - [4, 6, 7], - [4, 7, 5], - [0, 4, 5], - [0, 5, 1], - [1, 5, 7], - [1, 7, 3], - ], - dtype="i8", - ) - return vertices, triangles + vertices = np.array([ + # Back + [-1, -1, -1], [1, -1, -1], [1, 1, -1], [-1, 1, -1], + # Front + [-1, -1, 1], [1, -1, 1], [1, 1, 1], [-1, 1, 1], + # Left + [-1, -1, -1], [-1, 1, -1], [-1, 1, 1], [-1, -1, 1], + # Right + [1, -1, -1], [1, 1, -1], [1, 1, 1], [1, -1, 1], + # Top + [-1, 1, -1], [1, 1, -1], [1, 1, 1], [-1, 1, 1], + # Bottom + [-1, -1, -1], [1, -1, -1], [1, -1, 1], [-1, -1, 1], + ], dtype=np.float32) * 0.5 + + faces = np.array([ + # Back + [2, 1, 0], [3, 2, 0], + # Front + [4, 5, 6], [4, 6, 7], + # Left + [8, 10, 9], [11, 10, 8], + # Right + [12, 13, 14], [12, 14, 15], + # Top + [16, 17, 18], [16, 18, 19], + # Bottom + [20, 21, 22], [20, 22, 23], + ], dtype=np.uint32) + + return vertices, faces @warn_on_args_to_kwargs() def prim_sphere(*, name="symmetric362", gen_faces=False, phi=None, theta=None): From 91098b3680b17986d8362d762c537079bc6c619f Mon Sep 17 00:00:00 2001 From: Mohamed Abouagour Date: Fri, 27 Dec 2024 16:08:58 -0500 Subject: [PATCH 2/6] TEST: added a simple box test a simple box test to be updated when record is available --- fury/tests/test_actor.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/fury/tests/test_actor.py b/fury/tests/test_actor.py index f46a202c4..ac4dcf057 100644 --- a/fury/tests/test_actor.py +++ b/fury/tests/test_actor.py @@ -72,3 +72,21 @@ def test_sphere(): assert len(vertices) == len(colors) npt.assert_array_almost_equal(len(faces), (2 * phi * (theta - 2))) + +def test_box(): + scene = window.Scene() + centers = np.array([[0, 0, 0]]) + colors = np.array([[1, 0, 0]]) + scales = np.array([[1, 1, 7]]) + + box_actor = actor.box(centers=centers, colors=colors, scales=scales) + scene.add(box_actor) + + npt.assert_array_equal(box_actor.local.position, centers[0]) + + mean_vertex = np.mean(box_actor.geometry.positions.view, axis=0) + npt.assert_array_almost_equal(mean_vertex, centers[0]) + + assert box_actor.prim_count == 1 + + scene.remove(box_actor) From 29a87637c060c843c64cc37a4b2d4cf784946b1a Mon Sep 17 00:00:00 2001 From: Mohamed Abouagour Date: Fri, 27 Dec 2024 16:15:06 -0500 Subject: [PATCH 3/6] RF: fix pep8 issues --- fury/actor.py | 24 +++++------ fury/primitive.py | 92 +++++++++++++++++++++++++++------------- fury/tests/test_actor.py | 1 + 3 files changed, 74 insertions(+), 43 deletions(-) diff --git a/fury/actor.py b/fury/actor.py index fec2437db..f7621aa0c 100644 --- a/fury/actor.py +++ b/fury/actor.py @@ -95,9 +95,7 @@ def sphere( colors=big_colors.astype("float32"), ) - mat = _create_mesh_material( - material=material, - enable_picking=enable_picking) + mat = _create_mesh_material(material=material, enable_picking=enable_picking) obj = create_mesh(geometry=geo, material=mat) obj.local.position = centers[0] obj.prim_count = prim_count @@ -105,14 +103,14 @@ def sphere( def box( - centers, - *, - directions=(1, 0, 0), - colors=(1, 0, 0), - scales=(1, 1, 1), - opacity=None, - material="phong", - enable_picking=True, + centers, + *, + directions=(1, 0, 0), + colors=(1, 0, 0), + scales=(1, 1, 1), + opacity=None, + material="phong", + enable_picking=True, ): """Visualize one or many boxes with different features. @@ -148,10 +146,8 @@ def box( >>> import numpy as np >>> scene = window.Scene() >>> centers = np.random.rand(5, 3) * 10 - >>> directions = np.random.rand(5, 3) - >>> colors = np.random.rand(5, 3) >>> scales = np.random.rand(5, 3) - >>> box_actor = actor.box(centers=centers, directions=directions, colors=colors, scales=scales) + >>> box_actor = actor.box(centers=centers, scales=scales) >>> scene.add(box_actor) >>> show_manager = window.ShowManager(scene=scene, size=(600, 600)) >>> show_manager.start() diff --git a/fury/primitive.py b/fury/primitive.py index c5e996a29..0b2030250 100644 --- a/fury/primitive.py +++ b/fury/primitive.py @@ -270,38 +270,72 @@ def prim_box(): """ - vertices = np.array([ - # Back - [-1, -1, -1], [1, -1, -1], [1, 1, -1], [-1, 1, -1], - # Front - [-1, -1, 1], [1, -1, 1], [1, 1, 1], [-1, 1, 1], - # Left - [-1, -1, -1], [-1, 1, -1], [-1, 1, 1], [-1, -1, 1], - # Right - [1, -1, -1], [1, 1, -1], [1, 1, 1], [1, -1, 1], - # Top - [-1, 1, -1], [1, 1, -1], [1, 1, 1], [-1, 1, 1], - # Bottom - [-1, -1, -1], [1, -1, -1], [1, -1, 1], [-1, -1, 1], - ], dtype=np.float32) * 0.5 - - faces = np.array([ - # Back - [2, 1, 0], [3, 2, 0], - # Front - [4, 5, 6], [4, 6, 7], - # Left - [8, 10, 9], [11, 10, 8], - # Right - [12, 13, 14], [12, 14, 15], - # Top - [16, 17, 18], [16, 18, 19], - # Bottom - [20, 21, 22], [20, 22, 23], - ], dtype=np.uint32) + vertices = ( + np.array( + [ + # Back + [-1, -1, -1], + [1, -1, -1], + [1, 1, -1], + [-1, 1, -1], + # Front + [-1, -1, 1], + [1, -1, 1], + [1, 1, 1], + [-1, 1, 1], + # Left + [-1, -1, -1], + [-1, 1, -1], + [-1, 1, 1], + [-1, -1, 1], + # Right + [1, -1, -1], + [1, 1, -1], + [1, 1, 1], + [1, -1, 1], + # Top + [-1, 1, -1], + [1, 1, -1], + [1, 1, 1], + [-1, 1, 1], + # Bottom + [-1, -1, -1], + [1, -1, -1], + [1, -1, 1], + [-1, -1, 1], + ], + dtype=np.float32, + ) + * 0.5 + ) + + faces = np.array( + [ + # Back + [2, 1, 0], + [3, 2, 0], + # Front + [4, 5, 6], + [4, 6, 7], + # Left + [8, 10, 9], + [11, 10, 8], + # Right + [12, 13, 14], + [12, 14, 15], + # Top + [16, 17, 18], + [16, 18, 19], + # Bottom + [20, 21, 22], + [20, 22, 23], + ], + dtype=np.uint32, + ) return vertices, faces + @warn_on_args_to_kwargs() def prim_sphere(*, name="symmetric362", gen_faces=False, phi=None, theta=None): """Provide vertices and triangles of the spheres. diff --git a/fury/tests/test_actor.py b/fury/tests/test_actor.py index ac4dcf057..c39e6d425 100644 --- a/fury/tests/test_actor.py +++ b/fury/tests/test_actor.py @@ -73,6 +73,7 @@ def test_sphere(): npt.assert_array_almost_equal(len(faces), (2 * phi * (theta - 2))) + def test_box(): scene = window.Scene() centers = np.array([[0, 0, 0]]) From 0eb04429d95e5fbd913ff607c95e8579ce1d166d Mon Sep 17 00:00:00 2001 From: Mohamed Abouagour Date: Sun, 29 Dec 2024 11:45:09 -0500 Subject: [PATCH 4/6] RF: added both versions of the `prim_box`; 24 and 8 vertices also fixed tests --- fury/primitive.py | 115 ++++++++++++++--------------------- fury/tests/test_primitive.py | 17 +++--- 2 files changed, 56 insertions(+), 76 deletions(-) diff --git a/fury/primitive.py b/fury/primitive.py index 0b2030250..4892150d0 100644 --- a/fury/primitive.py +++ b/fury/primitive.py @@ -256,84 +256,63 @@ def prim_square(): return vertices, triangles -def prim_box(): - """Return vertices and triangle for a box geometry. +def prim_box(shared_vertices=False): + """Return vertices and triangles for a box geometry. + + Parameters + ---------- + shared_vertices : bool, optional + If False, returns 24 vertices (no shared vertices between orthogonal faces). + If True, returns 8 unique vertices. Returns ------- - vertices: ndarray - 24 vertices coords that composed our box - triangles: ndarray - 12 triangles that composed our box - normals: ndarray - 24 normals for each vertex of the box + vertices : ndarray + Array of vertex coordinates. + triangles : ndarray + Array of triangle indices. """ + if not shared_vertices: + vertices = np.array( + [ + [-1, -1, -1], [1, -1, -1], [1, 1, -1], [-1, 1, -1], + [-1, -1, 1], [1, -1, 1], [1, 1, 1], [-1, 1, 1], + [-1, -1, -1], [-1, 1, -1], [-1, 1, 1], [-1, -1, 1], + [1, -1, -1], [1, 1, -1], [1, 1, 1], [1, -1, 1], + [-1, 1, -1], [1, 1, -1], [1, 1, 1], [-1, 1, 1], + [-1, -1, -1], [1, -1, -1], [1, -1, 1], [-1, -1, 1], + ], dtype=np.float32 + ) * 0.5 - vertices = ( - np.array( + triangles = np.array( [ - # Back - [-1, -1, -1], - [1, -1, -1], - [1, 1, -1], - [-1, 1, -1], - # Front - [-1, -1, 1], - [1, -1, 1], - [1, 1, 1], - [-1, 1, 1], - # Left - [-1, -1, -1], - [-1, 1, -1], - [-1, 1, 1], - [-1, -1, 1], - # Right - [1, -1, -1], - [1, 1, -1], - [1, 1, 1], - [1, -1, 1], - # Top - [-1, 1, -1], - [1, 1, -1], - [1, 1, 1], - [-1, 1, 1], - # Bottom - [-1, -1, -1], - [1, -1, -1], - [1, -1, 1], - [-1, -1, 1], - ], - dtype=np.float32, + [2, 1, 0], [3, 2, 0], [4, 5, 6], [4, 6, 7], + [8, 10, 9], [11, 10, 8], [12, 13, 14], [12, 14, 15], + [16, 17, 18], [16, 18, 19], [20, 21, 22], [20, 22, 23], + ], dtype=np.uint32 ) - * 0.5 - ) - faces = np.array( - [ - # Back - [2, 1, 0], - [3, 2, 0], - # Front - [4, 5, 6], - [4, 6, 7], - # Left - [8, 10, 9], - [11, 10, 8], - # Right - [12, 13, 14], - [12, 14, 15], - # Top - [16, 17, 18], - [16, 18, 19], - # Bottom - [20, 21, 22], - [20, 22, 23], - ], - dtype=np.uint32, - ) + else: + vertices = np.array( + [ + [-1, -1, -1], [-1, -1, 1], + [-1, 1, -1], [-1, 1, 1], + [1, -1, -1], [1, -1, 1], + [1, 1, -1], [1, 1, 1], + ], dtype=np.float32 + ) * 0.5 + + triangles = np.array( + [ + [0, 6, 4], [0, 2, 6], [0, 3, 2], [0, 1, 3], + [2, 7, 6], [2, 3, 7], [4, 6, 7], [4, 7, 5], + [0, 4, 5], [0, 5, 1], [1, 5, 7], [1, 7, 3], + ], dtype=np.uint32 + ) + + return vertices, triangles - return vertices, faces @warn_on_args_to_kwargs() diff --git a/fury/tests/test_primitive.py b/fury/tests/test_primitive.py index 9325eaa34..d3136ddc3 100644 --- a/fury/tests/test_primitive.py +++ b/fury/tests/test_primitive.py @@ -9,16 +9,17 @@ def test_vertices_primitives(): # Tests the default vertices of all the built in primitive shapes. l_primitives = [ - (fp.prim_square, (4, 3), -0.5, 0.5, 0), - (fp.prim_box, (8, 3), -0.5, 0.5, 0), - (fp.prim_tetrahedron, (4, 3), -0.5, 0.5, 0), - (fp.prim_star, (10, 3), -3, 3, -0.0666666666), - (fp.prim_rhombicuboctahedron, (24, 3), -0.5, 0.5, 0), - (fp.prim_frustum, (8, 3), -0.5, 0.5, 0), + (fp.prim_square, (4, 3), -0.5, 0.5, 0, {}), + (fp.prim_box, (24, 3), -0.5, 0.5, 0, {"shared_vertices": False}), + (fp.prim_box, (8, 3), -0.5, 0.5, 0, {"shared_vertices": True}), + (fp.prim_tetrahedron, (4, 3), -0.5, 0.5, 0, {}), + (fp.prim_star, (10, 3), -3, 3, -0.0666666666, {}), + (fp.prim_rhombicuboctahedron, (24, 3), -0.5, 0.5, 0, {}), + (fp.prim_frustum, (8, 3), -0.5, 0.5, 0, {}), ] - for func, shape, e_min, e_max, e_mean in l_primitives: - vertices, _ = func() + for func, shape, e_min, e_max, e_mean, kwargs in l_primitives: + vertices, _ = func(**kwargs) npt.assert_equal(vertices.shape, shape) npt.assert_almost_equal(np.mean(vertices), e_mean) npt.assert_equal(vertices.min(), e_min) From 4ec89a005732875214f79c05e8c8b47d6e11a290 Mon Sep 17 00:00:00 2001 From: Mohamed Abouagour Date: Sun, 29 Dec 2024 11:47:57 -0500 Subject: [PATCH 5/6] STYLE: fixed arrays structures --- fury/primitive.py | 103 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 76 insertions(+), 27 deletions(-) diff --git a/fury/primitive.py b/fury/primitive.py index 4892150d0..d7a0385e0 100644 --- a/fury/primitive.py +++ b/fury/primitive.py @@ -274,47 +274,96 @@ def prim_box(shared_vertices=False): """ if not shared_vertices: - vertices = np.array( - [ - [-1, -1, -1], [1, -1, -1], [1, 1, -1], [-1, 1, -1], - [-1, -1, 1], [1, -1, 1], [1, 1, 1], [-1, 1, 1], - [-1, -1, -1], [-1, 1, -1], [-1, 1, 1], [-1, -1, 1], - [1, -1, -1], [1, 1, -1], [1, 1, 1], [1, -1, 1], - [-1, 1, -1], [1, 1, -1], [1, 1, 1], [-1, 1, 1], - [-1, -1, -1], [1, -1, -1], [1, -1, 1], [-1, -1, 1], - ], dtype=np.float32 - ) * 0.5 + vertices = ( + np.array( + [ + [-1, -1, -1], + [1, -1, -1], + [1, 1, -1], + [-1, 1, -1], + [-1, -1, 1], + [1, -1, 1], + [1, 1, 1], + [-1, 1, 1], + [-1, -1, -1], + [-1, 1, -1], + [-1, 1, 1], + [-1, -1, 1], + [1, -1, -1], + [1, 1, -1], + [1, 1, 1], + [1, -1, 1], + [-1, 1, -1], + [1, 1, -1], + [1, 1, 1], + [-1, 1, 1], + [-1, -1, -1], + [1, -1, -1], + [1, -1, 1], + [-1, -1, 1], + ], + dtype=np.float32, + ) + * 0.5 + ) triangles = np.array( [ - [2, 1, 0], [3, 2, 0], [4, 5, 6], [4, 6, 7], - [8, 10, 9], [11, 10, 8], [12, 13, 14], [12, 14, 15], - [16, 17, 18], [16, 18, 19], [20, 21, 22], [20, 22, 23], - ], dtype=np.uint32 + [2, 1, 0], + [3, 2, 0], + [4, 5, 6], + [4, 6, 7], + [8, 10, 9], + [11, 10, 8], + [12, 13, 14], + [12, 14, 15], + [16, 17, 18], + [16, 18, 19], + [20, 21, 22], + [20, 22, 23], + ], + dtype=np.uint32, ) else: - vertices = np.array( - [ - [-1, -1, -1], [-1, -1, 1], - [-1, 1, -1], [-1, 1, 1], - [1, -1, -1], [1, -1, 1], - [1, 1, -1], [1, 1, 1], - ], dtype=np.float32 - ) * 0.5 + vertices = ( + np.array( + [ + [-1, -1, -1], + [-1, -1, 1], + [-1, 1, -1], + [-1, 1, 1], + [1, -1, -1], + [1, -1, 1], + [1, 1, -1], + [1, 1, 1], + ], + dtype=np.float32, + ) + * 0.5 + ) triangles = np.array( [ - [0, 6, 4], [0, 2, 6], [0, 3, 2], [0, 1, 3], - [2, 7, 6], [2, 3, 7], [4, 6, 7], [4, 7, 5], - [0, 4, 5], [0, 5, 1], [1, 5, 7], [1, 7, 3], - ], dtype=np.uint32 + [0, 6, 4], + [0, 2, 6], + [0, 3, 2], + [0, 1, 3], + [2, 7, 6], + [2, 3, 7], + [4, 6, 7], + [4, 7, 5], + [0, 4, 5], + [0, 5, 1], + [1, 5, 7], + [1, 7, 3], + ], + dtype=np.uint32, ) return vertices, triangles - @warn_on_args_to_kwargs() def prim_sphere(*, name="symmetric362", gen_faces=False, phi=None, theta=None): """Provide vertices and triangles of the spheres. From 0508366d9425f879817bfe81f1b60852cc801ef7 Mon Sep 17 00:00:00 2001 From: Mohamed Abouagour Date: Sun, 29 Dec 2024 11:58:07 -0500 Subject: [PATCH 6/6] RF: simplified the argument to choose between different triangulation approaches (24 vs 8 vertices)) --- fury/actor.py | 6 +++++- fury/primitive.py | 10 +++++----- fury/tests/test_primitive.py | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/fury/actor.py b/fury/actor.py index f7621aa0c..4ddd8d0b0 100644 --- a/fury/actor.py +++ b/fury/actor.py @@ -111,6 +111,7 @@ def box( opacity=None, material="phong", enable_picking=True, + detailed=True, ): """Visualize one or many boxes with different features. @@ -133,6 +134,9 @@ def box( The material type for the boxes. Options are 'phong' and 'basic'. enable_picking : bool, optional Whether the boxes should be pickable in a 3D scene. + detailed : bool, optional + Whether to create a detailed box with 24 vertices or a simple box with + 8 vertices. Returns ------- @@ -152,7 +156,7 @@ def box( >>> show_manager = window.ShowManager(scene=scene, size=(600, 600)) >>> show_manager.start() """ - vertices, faces = fp.prim_box() + vertices, faces = fp.prim_box(detailed=detailed) res = fp.repeat_primitive( vertices, faces, diff --git a/fury/primitive.py b/fury/primitive.py index d7a0385e0..7ce5bcd5e 100644 --- a/fury/primitive.py +++ b/fury/primitive.py @@ -256,14 +256,14 @@ def prim_square(): return vertices, triangles -def prim_box(shared_vertices=False): +def prim_box(detailed=True): """Return vertices and triangles for a box geometry. Parameters ---------- - shared_vertices : bool, optional - If False, returns 24 vertices (no shared vertices between orthogonal faces). - If True, returns 8 unique vertices. + detailed : bool, optional + If True, returns 24 vertices (no shared vertices between orthogonal faces). + If False, returns 8 unique vertices. Returns ------- @@ -273,7 +273,7 @@ def prim_box(shared_vertices=False): Array of triangle indices. """ - if not shared_vertices: + if detailed: vertices = ( np.array( [ diff --git a/fury/tests/test_primitive.py b/fury/tests/test_primitive.py index d3136ddc3..2d451f34a 100644 --- a/fury/tests/test_primitive.py +++ b/fury/tests/test_primitive.py @@ -10,8 +10,8 @@ def test_vertices_primitives(): # Tests the default vertices of all the built in primitive shapes. l_primitives = [ (fp.prim_square, (4, 3), -0.5, 0.5, 0, {}), - (fp.prim_box, (24, 3), -0.5, 0.5, 0, {"shared_vertices": False}), - (fp.prim_box, (8, 3), -0.5, 0.5, 0, {"shared_vertices": True}), + (fp.prim_box, (24, 3), -0.5, 0.5, 0, {"detailed": True}), + (fp.prim_box, (8, 3), -0.5, 0.5, 0, {"detailed": False}), (fp.prim_tetrahedron, (4, 3), -0.5, 0.5, 0, {}), (fp.prim_star, (10, 3), -3, 3, -0.0666666666, {}), (fp.prim_rhombicuboctahedron, (24, 3), -0.5, 0.5, 0, {}),