MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / extract_bd_faces

Method extract_bd_faces

tools/Wires/Misc/BoundaryRemesher.cpp:99–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void BoundaryRemesher::extract_bd_faces(IndicatorFunc f) {
100 SubMesh::Ptr submesh = SubMesh::create_raw(m_vertices, m_faces);
101 submesh->filter_vertex_with_custom_function(f);
102 submesh->finalize();
103 m_bd_vertices = submesh->get_selected_vertices();
104 m_bd_faces = submesh->get_selected_faces();
105 m_non_bd_vertices = submesh->get_unselected_vertices();
106 m_non_bd_faces = submesh->get_unselected_faces();
107
108 if (m_bd_vertices.rows() == 0) {
109 throw RuntimeError("Cannot remesh, zero vertex selected!");
110 }
111 if (m_bd_faces.rows() == 0) {
112 throw RuntimeError("Cannot remesh, zero face selected!");
113 }
114
115 assert((m_bd_faces.col(0).array() != m_bd_faces.col(1).array()).all());
116 assert((m_bd_faces.col(0).array() != m_bd_faces.col(2).array()).all());
117 assert((m_bd_faces.col(1).array() != m_bd_faces.col(2).array()).all());
118}
119
120void BoundaryRemesher::remesh_bd_faces(Float max_area) {
121 Boundary::Ptr loop_extractor = Boundary::extract_surface_boundary_raw(

Callers

nothing calls this directly

Calls 7

RuntimeErrorClass · 0.85
get_selected_verticesMethod · 0.80
get_selected_facesMethod · 0.80
get_unselected_facesMethod · 0.80
finalizeMethod · 0.45

Tested by

no test coverage detected