From f30530fb150344ccdc80fb44959414f77fb31537 Mon Sep 17 00:00:00 2001 From: leonel Date: Fri, 24 Nov 2023 11:24:12 -0600 Subject: [PATCH 1/2] error cannot marching cubes --- .gitignore | 3 +++ lib/mesh_util.py | 2 +- lib/sdf.py | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e708e0402..280ef6232 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ +.idea checkpoints/* +__pycache__/ +results/ diff --git a/lib/mesh_util.py b/lib/mesh_util.py index 399342190..460ba043a 100755 --- a/lib/mesh_util.py +++ b/lib/mesh_util.py @@ -42,7 +42,7 @@ def eval_func(points): # Finally we do marching cubes try: - verts, faces, normals, values = measure.marching_cubes_lewiner(sdf, 0.5) + verts, faces, normals, values = measure.marching_cubes(sdf, 0.5) # transform verts into world coordinate system verts = np.matmul(mat[:3, :3], verts.T) + mat[:3, 3:4] verts = verts.T diff --git a/lib/sdf.py b/lib/sdf.py index e87e639eb..e13a8f488 100755 --- a/lib/sdf.py +++ b/lib/sdf.py @@ -55,8 +55,8 @@ def eval_grid_octree(coords, eval_func, sdf = np.zeros(resolution) - dirty = np.ones(resolution, dtype=np.bool) - grid_mask = np.zeros(resolution, dtype=np.bool) + dirty = np.ones(resolution, dtype=bool) + grid_mask = np.zeros(resolution, dtype=bool) reso = resolution[0] // init_resolution From a99b907501054a7288e6a1b695fea583f38eb8d3 Mon Sep 17 00:00:00 2001 From: leonel Date: Fri, 24 Nov 2023 11:36:01 -0600 Subject: [PATCH 2/2] Bump scikit-image from 0.16.2 to 0.22.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e9c086c13..f067eb221 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ PyOpenGL==3.1.5 pyparsing==2.4.6 python-dateutil==2.8.1 PyWavelets==1.1.1 -scikit-image==0.16.2 +scikit-image==0.22.0 scipy==1.4.1 Shapely==1.7.0 six==1.14.0