Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -481,7 +481,7 @@ def process_image_and_generate_stl(image_input, depth_near, depth_far, thickness
|
|
| 481 |
preview_path = stl_path.replace(".stl", "_preview.stl")
|
| 482 |
mesh = trimesh.load(stl_path)
|
| 483 |
rot = trimesh.transformations.rotation_matrix(np.radians(180), [0, 0, 1])
|
| 484 |
-
rot2 = trimesh.transformations.rotation_matrix(np.radians(-90),[
|
| 485 |
mesh.apply_transform(rot)
|
| 486 |
mesh.apply_transform(rot2)
|
| 487 |
mesh.export(preview_path)
|
|
|
|
| 481 |
preview_path = stl_path.replace(".stl", "_preview.stl")
|
| 482 |
mesh = trimesh.load(stl_path)
|
| 483 |
rot = trimesh.transformations.rotation_matrix(np.radians(180), [0, 0, 1])
|
| 484 |
+
rot2 = trimesh.transformations.rotation_matrix(np.radians(-90),[1, 0, 0])
|
| 485 |
mesh.apply_transform(rot)
|
| 486 |
mesh.apply_transform(rot2)
|
| 487 |
mesh.export(preview_path)
|