(file,move_strands_to_usc=True)
| 119 | |
| 120 | |
| 121 | def 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 |
nothing calls this directly
no test coverage detected