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

Method filter_edges

tools/Wires/WireNetwork/WireNetwork.cpp:216–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216void WireNetwork::filter_edges(const std::vector<bool>& to_keep) {
217 MatrixIr edges;
218 filter(m_edges, to_keep, edges);
219 m_edges = edges;
220 const auto& attr_names = m_attributes.get_attribute_names();
221 for (const auto& name : attr_names) {
222 if (!is_vertex_attribute(name)) {
223 const MatrixFr& val = m_attributes.get_attribute(name);
224 MatrixFr filtered_val;
225 filter(val, to_keep, filtered_val);
226 m_attributes.set_attribute(*this, name, filtered_val);
227 }
228 }
229 m_connectivity.reset();
230}
231
232void WireNetwork::write_to_file(const std::string& filename) const {
233 WireWriter writer;

Callers 2

cleanupFunction · 0.45
cleanupFunction · 0.45

Calls 5

filterFunction · 0.70
get_attribute_namesMethod · 0.45
get_attributeMethod · 0.45
set_attributeMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected