Spaces:
Running
on
Zero
Running
on
Zero
daidedou
commited on
Commit
·
dbf15c6
1
Parent(s):
c66e682
Readapted the non-open3d code
Browse files- utils/surfaces.py +2 -2
utils/surfaces.py
CHANGED
|
@@ -20,7 +20,7 @@ except ImportError:
|
|
| 20 |
print('could not import VTK functions')
|
| 21 |
gotVTK = False
|
| 22 |
|
| 23 |
-
|
| 24 |
# import kernelFunctions as kfun
|
| 25 |
|
| 26 |
class vtkFields:
|
|
@@ -198,7 +198,7 @@ class Surface:
|
|
| 198 |
normals[F[k, 2]] += self.surfel[k]
|
| 199 |
af = np.sqrt((normals ** 2).sum(axis=1))
|
| 200 |
# logging.info('min area = %.4f'%(af.min()))
|
| 201 |
-
normals /= af.reshape([self.vertices.shape[0], 1])
|
| 202 |
|
| 203 |
return normals
|
| 204 |
|
|
|
|
| 20 |
print('could not import VTK functions')
|
| 21 |
gotVTK = False
|
| 22 |
|
| 23 |
+
eps = 1e-8
|
| 24 |
# import kernelFunctions as kfun
|
| 25 |
|
| 26 |
class vtkFields:
|
|
|
|
| 198 |
normals[F[k, 2]] += self.surfel[k]
|
| 199 |
af = np.sqrt((normals ** 2).sum(axis=1))
|
| 200 |
# logging.info('min area = %.4f'%(af.min()))
|
| 201 |
+
normals /= (af.reshape([self.vertices.shape[0], 1]) + eps)
|
| 202 |
|
| 203 |
return normals
|
| 204 |
|