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

Function load_strands_from_ply

utils/strand_util.py:121–138  ·  view source on GitHub ↗
(file,move_strands_to_usc=True)

Source from the content-addressed store, hash-verified

119
120
121def load_strands_from_ply(file,move_strands_to_usc=True):
122 lineset = trimesh.load(file)
123 points = np.asarray(lineset.vertices)
124
125 if move_strands_to_usc:
126 points *= 1.05
127 points += np.array([0, 1.437, 0.009])
128
129 if points.shape[0]%256==0:
130 strands = points.reshape(-1, 256, 3)
131 oris = strands[:, 1:] - strands[:, :-1]
132 oris = np.concatenate([oris, strands[:, -1:] - strands[:, -2:-1]], 1)
133 check = False
134 else:
135 strands,oris = get_strands(points)
136 check =True
137
138 return points, strands, oris,check
139
140
141

Callers

nothing calls this directly

Calls 2

get_strandsFunction · 0.85
loadMethod · 0.45

Tested by

no test coverage detected