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

Method compute

tools/Wires/Attributes/WireVertexMinAngleAttribute.cpp:72–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70using namespace WireVertexMinAngleAttributeHelper;
71
72void WireVertexMinAngleAttribute::compute(const WireNetwork& network) {
73 if (!network.with_connectivity()) {
74 throw RuntimeError("Min angle attribute requires wire connectivity.");
75 }
76
77 const size_t dim = network.get_dim();
78 if (dim == 2) {
79 Angle<2> angle;
80 compute_min_angles(network, m_values, angle);
81 } else if (dim == 3) {
82 Angle<3> angle;
83 compute_min_angles(network, m_values, angle);
84 } else {
85 std::stringstream err_msg;
86 err_msg << "Unsupported dim: " << dim;
87 throw NotImplementedError(err_msg.str());
88 }
89}

Callers

nothing calls this directly

Calls 6

RuntimeErrorClass · 0.85
compute_min_anglesFunction · 0.85
NotImplementedErrorClass · 0.85
with_connectivityMethod · 0.80
get_dimMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected