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

Method periodic_inflate

tools/Wires/Interfaces/PeriodicExploration.cpp:70–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void PeriodicExploration::periodic_inflate(bool use_reflective_inflator) {
71 ParameterCommon::Variables vars;
72 MatrixFr offset = m_parameters->evaluate_offset(vars);
73 MatrixFr ori_vertices = m_wire_network->get_vertices();
74 m_wire_network->set_vertices(ori_vertices+ offset);
75
76 InflatorEngine::Ptr inflator;
77 if (use_reflective_inflator) {
78 inflator = InflatorEngine::create_isotropic_parametric(
79 m_wire_network, m_parameters);
80 } else {
81 inflator = InflatorEngine::create_parametric(m_wire_network, m_parameters);
82 }
83 inflator->set_profile(m_profile);
84 inflator->with_shape_velocities();
85 if (m_refine_order > 0)
86 inflator->with_refinement(m_refine_algorithm, m_refine_order);
87
88 try {
89 inflator->inflate();
90 } catch (...) {
91 m_wire_network->set_vertices(ori_vertices);
92 throw;
93 }
94
95 m_wire_network->set_vertices(ori_vertices);
96
97 m_vertices = inflator->get_vertices();
98 m_faces = inflator->get_faces();
99 m_voxels = MatrixIr::Zero(0, 4);
100 m_face_sources = inflator->get_face_sources();
101 m_shape_velocities = inflator->get_shape_velocities();
102 update_mesh();
103}
104
105bool PeriodicExploration::run_tetgen(Float max_tet_vol) {
106#ifdef WITH_TETGEN

Callers 1

TEST_FFunction · 0.80

Calls 10

evaluate_offsetMethod · 0.80
get_verticesMethod · 0.45
set_verticesMethod · 0.45
set_profileMethod · 0.45
with_shape_velocitiesMethod · 0.45
with_refinementMethod · 0.45
inflateMethod · 0.45
get_facesMethod · 0.45
get_face_sourcesMethod · 0.45
get_shape_velocitiesMethod · 0.45

Tested by 1

TEST_FFunction · 0.64