@@ -201,8 +201,6 @@ std::vector<std::vector<int>> map_mesh_with_automatic_parameterization(
201201
202202 rescale (target_uv);
203203
204- // Compute pattern mesh UV parameterization using simple method
205- // Eigen::MatrixXd pattern_uv = pattern_v.leftCols(2); // Use the first two columns (X and Y coordinates)
206204
207205 Eigen::MatrixXd pattern_uv;
208206 pattern_uv.setZero ();
@@ -214,46 +212,8 @@ std::vector<std::vector<int>> map_mesh_with_automatic_parameterization(
214212 return map_mesh (target_v, target_f, target_uv, pattern_v, pattern_f, pattern_uv);
215213}
216214
217- Eigen::MatrixXd parametrization_check (
218- Eigen::Ref<const compas::RowMatrixXd> target_v,
219- Eigen::Ref<const compas::RowMatrixXi> target_f)
220- {
221- // Compute target mesh UV parameterization using LSCM
222- Eigen::MatrixXd target_uv;
223-
224- // Find the open boundary
225- Eigen::VectorXi B;
226- igl::boundary_loop (target_f, B);
227-
228- // Fix two points on the boundary
229- Eigen::VectorXi fixed (2 , 1 );
230- fixed (0 ) = B (0 );
231- fixed (1 ) = B (B.size () / 2 );
232-
233- Eigen::MatrixXd fixed_uv (2 , 2 );
234- fixed_uv << 0 , 0 , 1 , 0 ;
235-
236- // LSCM parametrization
237- igl::lscm (target_v, target_f, fixed, fixed_uv, target_uv);
238-
239- rescale (target_uv);
240-
241- return target_uv;
242-
243- }
244-
245215NB_MODULE (_mapping, m)
246216{
247- m.def (
248- " map_mesh" ,
249- &map_mesh,
250- " Map a 2D pattern mesh onto a 3D target mesh." ,
251- " target_v" _a,
252- " target_f" _a,
253- " target_uv" _a,
254- " pattern_v" _a,
255- " pattern_f" _a,
256- " pattern_uv" _a);
257217
258218 m.def (
259219 " map_mesh_with_automatic_parameterization" ,
@@ -263,11 +223,4 @@ NB_MODULE(_mapping, m)
263223 " target_f" _a,
264224 " pattern_v" _a,
265225 " pattern_f" _a);
266-
267- m.def (
268- " parametrization_check" ,
269- ¶metrization_check,
270- " Compute target mesh UV parameterization using LSCM." ,
271- " target_v" _a,
272- " target_f" _a);
273226}
0 commit comments