Spaces:
Sleeping
Sleeping
staswrs
commited on
Commit
·
e0b11b4
1
Parent(s):
91756de
add normals and fix axis 0
Browse files
app.py
CHANGED
@@ -88,6 +88,7 @@ def generate(image_path, face_number=50000, guidance_scale=5.0, num_steps=25):
|
|
88 |
mesh = trimesh.Trimesh(vertices=mesh.vertices, faces=mesh.faces)
|
89 |
mesh.rezero()
|
90 |
mesh.fix_normals()
|
|
|
91 |
|
92 |
# Безопасная очистка визуала
|
93 |
# if hasattr(mesh, "visual") and mesh.visual is not None:
|
|
|
88 |
mesh = trimesh.Trimesh(vertices=mesh.vertices, faces=mesh.faces)
|
89 |
mesh.rezero()
|
90 |
mesh.fix_normals()
|
91 |
+
mesh.apply_translation(-mesh.center_mass)
|
92 |
|
93 |
# Безопасная очистка визуала
|
94 |
# if hasattr(mesh, "visual") and mesh.visual is not None:
|