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

Function get_opposite_vertex_index

tools/MeshUtils/EdgeSplitter.cpp:33–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 }
32
33 size_t get_opposite_vertex_index(const Eigen::Ref<VectorI>& f,
34 size_t vi, size_t vj) {
35 if (f[0] != vi && f[0] != vj) return f[0];
36 if (f[1] != vi && f[1] != vj) return f[1];
37 if (f[2] != vi && f[2] != vj) return f[2];
38 std::stringstream err_msg;
39 err_msg << "Invalid face: <"
40 << f[0] << ", "
41 << f[1] << ", "
42 << f[2] << "> encountered when looking for opposite vertex of edge <"
43 << vi << ", " << vj << ">";
44 throw RuntimeError(err_msg.str());
45 }
46
47 bool has_same_orientation(const Eigen::Ref<VectorI>& f,
48 size_t v0, size_t v1, size_t v2) {

Callers 1

split_edgeMethod · 0.85

Calls 2

RuntimeErrorClass · 0.85
strMethod · 0.45

Tested by

no test coverage detected