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

Method compute

tools/Wires/Attributes/WireVertexSupportAttribute.cpp:16–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14using namespace WireVertexSupportAttributeHelper;
15
16void WireVertexSupportAttribute::compute(const WireNetwork& network) {
17 if (network.get_dim() != 3) {
18 throw NotImplementedError("Vertex support is only available to 3D wires");
19 }
20
21 if (!network.with_connectivity()) {
22 throw RuntimeError("Vertex support attribute requires wire connectivity");
23 }
24
25 const size_t num_vertices = network.get_num_vertices();
26
27 m_values = MatrixFr::Constant(num_vertices, 1, NOT_SUPPORTED);
28 mark_directly_supported_vertices(network, m_values);
29 propagate_supports(network, m_values);
30}
31
32/**
33 * Directly supported vertices are vertices on bbox faces that we support

Callers

nothing calls this directly

Calls 5

NotImplementedErrorClass · 0.85
RuntimeErrorClass · 0.85
with_connectivityMethod · 0.80
get_dimMethod · 0.45
get_num_verticesMethod · 0.45

Tested by

no test coverage detected