| 231 | } |
| 232 | |
| 233 | void PhantomMeshGenerator::inflate() { |
| 234 | assert(m_phantom_param_manager); |
| 235 | MatrixFr thickness = m_phantom_wires->get_attribute("thickness"); |
| 236 | InflatorEngine::ThicknessType thickness_type = InflatorEngine::PER_VERTEX; |
| 237 | if (m_phantom_param_manager->get_thickness_type() == |
| 238 | ParameterCommon::EDGE) { |
| 239 | thickness_type = InflatorEngine::PER_EDGE; |
| 240 | } |
| 241 | |
| 242 | SimpleInflator inflator(m_phantom_wires); |
| 243 | inflator.set_thickness_type(thickness_type); |
| 244 | inflator.set_thickness(thickness); |
| 245 | inflator.set_profile(m_profile); |
| 246 | inflator.with_rel_geometry_correction(m_rel_geometry_correction); |
| 247 | inflator.with_abs_geometry_correction(m_abs_geometry_correction); |
| 248 | inflator.set_geometry_correction_cap(m_geometry_correction_cap); |
| 249 | inflator.self_intersection_is_fatal(); |
| 250 | inflator.inflate(); |
| 251 | |
| 252 | m_vertices = inflator.get_vertices(); |
| 253 | m_faces = inflator.get_faces(); |
| 254 | update_face_sources(inflator.get_face_sources()); |
| 255 | compute_phantom_shape_velocities(); |
| 256 | |
| 257 | //VectorF debug_face_sources = m_face_sources_from_ori_wires.cast<Float>(); |
| 258 | //save_mesh("phantom_debug.msh", m_vertices, m_faces, debug_face_sources); |
| 259 | } |
| 260 | |
| 261 | void PhantomMeshGenerator::update_face_sources( |
| 262 | const VectorI& face_sources) { |
nothing calls this directly
no test coverage detected