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

Method get_edge_thickness

tools/Wires/Inflator/SimpleInflator.cpp:324–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324MatrixFr SimpleInflator::get_edge_thickness() const {
325 const size_t num_edges = m_wire_network->get_num_edges();
326 MatrixFr thickness(num_edges, 2);
327 if (m_thickness_type == PER_VERTEX) {
328 const MatrixIr& edges = m_wire_network->get_edges();
329 for (size_t i=0; i<num_edges; i++) {
330 const VectorI& edge = edges.row(i);
331 thickness(i,0) = m_thickness[edge[0]];
332 thickness(i,1) = m_thickness[edge[1]];
333 }
334 } else if (m_thickness_type == PER_EDGE) {
335 thickness.block(0,0,num_edges,1) = m_thickness;
336 thickness.block(0,1,num_edges,1) = m_thickness;
337 }
338 return thickness;
339}
340
341void SimpleInflator::generate_joint(
342 const MatrixFr& pts, const VectorI& source_ids, size_t vertex_index) {

Callers

nothing calls this directly

Calls 2

get_num_edgesMethod · 0.45
get_edgesMethod · 0.45

Tested by

no test coverage detected