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

Method remesh_boundary

tools/Wires/Inflator/IsotropicPeriodicInflator.cpp:161–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161void IsotropicPeriodicInflator::remesh_boundary() {
162 typedef std::function<bool(const VectorF&)> IndicatorFunc;
163 const Float tol = get_distance_threshold();
164 std::vector<IndicatorFunc> bd_indicators;
165 bd_indicators.push_back([=](const VectorF& v)
166 { return fabs(v[0] - m_octa_cell_bbox_max[0]) < tol; });
167 bd_indicators.push_back([=](const VectorF& v)
168 { return fabs(v[1] - m_octa_cell_bbox_max[1]) < tol; });
169 bd_indicators.push_back([=](const VectorF& v)
170 { return fabs(v[2] - m_octa_cell_bbox_max[2]) < tol; });
171
172 size_t count = 0;
173 for (auto f : bd_indicators) {
174 BoundaryRemesher remesher(m_vertices, m_faces);
175 remesher.remesh(f, 0.05);
176 m_vertices = remesher.get_vertices();
177 m_faces = remesher.get_faces();
178 assert(m_vertices.rows() > 0);
179 assert(m_faces.rows() > 0);
180
181 count++;
182 }
183}
184
185void IsotropicPeriodicInflator::reflect() {
186 const Float tol = get_distance_threshold();

Callers

nothing calls this directly

Calls 3

remeshMethod · 0.45
get_verticesMethod · 0.45
get_facesMethod · 0.45

Tested by

no test coverage detected