4444}
4545
4646
47- def map_mesh (target_mesh , pattern_mesh , clip_boundaries = True , simplify_borders = True , fixed_vertices = None , tolerance = 1e-6 , unify_cycles = True ):
47+ def map_mesh (target_mesh , pattern_mesh , clip_boundaries = True , simplify_borders = True , fixed_vertices = None , tolerance = 1e-6 ):
4848 """
4949 Map a 2D pattern mesh onto a 3D target.
5050
@@ -66,9 +66,6 @@ def map_mesh(target_mesh, pattern_mesh, clip_boundaries=True, simplify_borders=T
6666 tolerance : float, optional
6767 The tolerance for point comparison, to remove duplicates.
6868 Default is 1e-6.
69- unify_cycles : bool, optional
70- Whether to unify cycles of the pattern mesh.
71- Default is True.
7269
7370 Returns
7471 -------
@@ -109,17 +106,11 @@ def map_mesh(target_mesh, pattern_mesh, clip_boundaries=True, simplify_borders=T
109106 v_numpy , f_numpy , pattern_v_numpy , pattern_f_vec , clip_boundaries , simplify_borders , fixed_vertices_vectorint , tolerance
110107 )
111108
112- # LIBIGL has no BFS orienting for polygons, only triangles, so we copy here data several times:
113- if unify_cycles :
114- mesh = Mesh .from_vertices_and_faces (pv_numpy_copy , pf_numpy_cleaned )
115- mesh .unify_cycles ()
116- pv_numpy_copy , pf_numpy_cleaned = mesh .to_vertices_and_faces ()
117-
118109 # Return the result as a tuple
119110 return pv_numpy_copy , pf_numpy_cleaned , p_normals , pattern_is_boundary , pattern_groups
120111
121112
122- def map_pattern_to_mesh (name , mesh , clip_boundaries = True , tolerance = 1e-6 , pattern_u = 16 , pattern_v = 16 , simplify_borders = True , fixed_vertices = None , unify_cycles = True ):
113+ def map_pattern_to_mesh (name , mesh , clip_boundaries = True , tolerance = 1e-6 , pattern_u = 16 , pattern_v = 16 , simplify_borders = True , fixed_vertices = None ):
123114 """
124115 Map a 2D pattern mesh onto a 3D target.
125116
@@ -167,9 +158,7 @@ def map_pattern_to_mesh(name, mesh, clip_boundaries=True, tolerance=1e-6, patter
167158 fixed_vertices : list[list[float]], optional
168159 A list of fixed points on the target mesh.
169160 Default is None.
170- unify_cycles : bool, optional
171- Whether to unify cycles of the pattern mesh.
172- Default is True.
161+
173162 Returns
174163 -------
175164 compas.datastructures.Mesh
@@ -206,7 +195,7 @@ def map_pattern_to_mesh(name, mesh, clip_boundaries=True, tolerance=1e-6, patter
206195
207196 v , f = mesh .to_vertices_and_faces ()
208197 mapped_vertices , mapped_faces , mapped_normals , mapped_is_boundary , mapped_groups = map_mesh (
209- (v , f ), (pv , pf ), clip_boundaries = clip_boundaries , simplify_borders = simplify_borders , fixed_vertices = fixed_vertices , tolerance = tolerance , unify_cycles = unify_cycles
198+ (v , f ), (pv , pf ), clip_boundaries = clip_boundaries , simplify_borders = simplify_borders , fixed_vertices = fixed_vertices , tolerance = tolerance
210199 )
211200
212201 return Mesh .from_vertices_and_faces (mapped_vertices , mapped_faces )
0 commit comments