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

Method check_mesh

tools/Assembler/Elements/TriangleElements.cpp:56–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void TriangleElements::check_mesh() {
57 if (m_mesh->get_num_faces() == 0) {
58 throw RuntimeError("Mesh contains zero faces.");
59 }
60 if (m_mesh->get_vertex_per_face() != 3) {
61 throw RuntimeError("Mesh is not a triangle mesh.");
62 }
63 if (!m_mesh->has_attribute("face_area")) {
64 m_mesh->add_attribute("face_area");
65 }
66}

Callers

nothing calls this directly

Calls 5

RuntimeErrorClass · 0.85
get_num_facesMethod · 0.45
get_vertex_per_faceMethod · 0.45
has_attributeMethod · 0.45
add_attributeMethod · 0.45

Tested by

no test coverage detected