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

Method initialize_mesh

tools/Wires/Parameters/ParameterDerivative.cpp:23–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23void ParameterDerivative::initialize_mesh() {
24 assert(m_mesh->get_vertex_per_face() == 3);
25 if (!m_mesh->has_attribute("face_voronoi_area")) {
26 m_mesh->add_attribute("face_voronoi_area");
27 }
28
29 if (!m_mesh->has_attribute("face_source")) {
30 throw RuntimeError("Mesh does not have face source attribute");
31 }
32 m_face_source = m_mesh->get_attribute("face_source").cast<int>();
33}
34
35void ParameterDerivative::initialize_normals() {
36 const size_t dim = m_mesh->get_dim();

Callers

nothing calls this directly

Calls 5

RuntimeErrorClass · 0.85
get_vertex_per_faceMethod · 0.45
has_attributeMethod · 0.45
add_attributeMethod · 0.45
get_attributeMethod · 0.45

Tested by

no test coverage detected