55
66namespace py = pybind11;
77
8- PYBIND11_MODULE (loop_cgal, m)
9- {
10-
11- m.def (" clip_surface" , &clip_surface,
12- py::arg (" tm" ),
13- py::arg (" clipper" ),
14- py::arg (" target_edge_length" ) = 10.0 ,
15- py::arg (" remesh_before_clipping" ) = true ,
16- py::arg (" remesh_after_clipping" ) = true ,
17- py::arg (" remove_degenerate_faces" ) = true ,
18- py::arg (" duplicate_vertex_threshold" ) = 1e-6 ,
19- py::arg (" area_threshold" ) = 1e-6 ,
20- py::arg (" protect_constraints" ) = false ,
21- py::arg (" relax_constraints" ) = true ,
22- py::arg (" verbose" ) = false ,
23- " Clip one surface with another." );
24- m.def (" clip_plane" , &clip_plane,
25- py::arg (" tm" ),
26- py::arg (" clipper" ),
27- py::arg (" target_edge_length" ) = 10.0 ,
28- py::arg (" remesh_before_clipping" ) = true ,
29- py::arg (" remesh_after_clipping" ) = true ,
30- py::arg (" remove_degenerate_faces" ) = true ,
31- py::arg (" duplicate_vertex_threshold" ) = 1e-6 ,
32- py::arg (" area_threshold" ) = 1e-6 ,
33- py::arg (" protect_constraints" ) = false ,
34- py::arg (" relax_constraints" ) = true ,
35- py::arg (" verbose" ) = false ,
8+ PYBIND11_MODULE (loop_cgal, m) {
369
37- " Clip a surface with a plane." );
38- m.def (" corefine_mesh" , &corefine_mesh,
39- py::arg (" tm1" ),
40- py::arg (" tm2" ),
41- py::arg (" target_edge_length" ) = 10.0 ,
42- py::arg (" duplicate_vertex_threshold" ) = 1e-6 ,
43- py::arg (" area_threshold" ) = 1e-6 ,
44- py::arg (" number_of_iterations" ) = 3 ,
45- py::arg (" relax_constraints" ) = true ,
46- py::arg (" protect_constraints" ) = false ,
47- py::arg (" verbose" ) = false ,
48- " Corefine two meshes." );
49- py::class_<NumpyMesh>(m, " NumpyMesh" )
50- .def (py::init<>())
51- .def_readwrite (" vertices" , &NumpyMesh::vertices)
52- .def_readwrite (" triangles" , &NumpyMesh::triangles);
53- py::class_<NumpyPlane>(m, " NumpyPlane" )
54- .def (py::init<>())
55- .def_readwrite (" normal" , &NumpyPlane::normal)
56- .def_readwrite (" origin" , &NumpyPlane::origin);
10+ m.def (" clip_surface" , &clip_surface, py::arg (" tm" ), py::arg (" clipper" ),
11+ py::arg (" target_edge_length" ) = 10.0 ,
12+ py::arg (" remesh_before_clipping" ) = true ,
13+ py::arg (" remesh_after_clipping" ) = true ,
14+ py::arg (" remove_degenerate_faces" ) = true ,
15+ py::arg (" duplicate_vertex_threshold" ) = 1e-6 ,
16+ py::arg (" area_threshold" ) = 1e-6 ,
17+ py::arg (" protect_constraints" ) = false ,
18+ py::arg (" relax_constraints" ) = true , py::arg (" verbose" ) = false ,
19+ " Clip one surface with another." );
20+ m.def (" clip_plane" , &clip_plane, py::arg (" tm" ), py::arg (" clipper" ),
21+ py::arg (" target_edge_length" ) = 10.0 ,
22+ py::arg (" remesh_before_clipping" ) = true ,
23+ py::arg (" remesh_after_clipping" ) = true ,
24+ py::arg (" remove_degenerate_faces" ) = true ,
25+ py::arg (" duplicate_vertex_threshold" ) = 1e-6 ,
26+ py::arg (" area_threshold" ) = 1e-6 ,
27+ py::arg (" protect_constraints" ) = false ,
28+ py::arg (" relax_constraints" ) = true , py::arg (" verbose" ) = false ,
29+
30+ " Clip a surface with a plane." );
31+ m.def (" corefine_mesh" , &corefine_mesh, py::arg (" tm1" ), py::arg (" tm2" ),
32+ py::arg (" target_edge_length" ) = 10.0 ,
33+ py::arg (" duplicate_vertex_threshold" ) = 1e-6 ,
34+ py::arg (" area_threshold" ) = 1e-6 , py::arg (" number_of_iterations" ) = 3 ,
35+ py::arg (" relax_constraints" ) = true ,
36+ py::arg (" protect_constraints" ) = false , py::arg (" verbose" ) = false ,
37+ " Corefine two meshes." );
38+ py::class_<NumpyMesh>(m, " NumpyMesh" )
39+ .def (py::init<>())
40+ .def_readwrite (" vertices" , &NumpyMesh::vertices)
41+ .def_readwrite (" triangles" , &NumpyMesh::triangles);
42+ py::class_<NumpyPlane>(m, " NumpyPlane" )
43+ .def (py::init<>())
44+ .def_readwrite (" normal" , &NumpyPlane::normal)
45+ .def_readwrite (" origin" , &NumpyPlane::origin);
5746}
0 commit comments