MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / get_strand_length

Function get_strand_length

utils/strand_util.py:148–152  ·  view source on GitHub ↗
(strand)

Source from the content-addressed store, hash-verified

146 return new_points
147
148def get_strand_length(strand):
149 delta = strand[:-1] - strand[1:]
150 delta_length = np.sqrt(np.sum(delta**2, axis=1, keepdims=False))
151 length = np.sum(delta_length, axis=0, keepdims=False)
152 return length, delta_length
153
154def spline_strand(strand, num_strand_points=100):
155 num_ori_points = strand.shape[0]

Callers 1

pad_strandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected