sgsellan / gpytoolbox

A collection of utility functions to prototype geometry processing research in python
https://gpytoolbox.org
GNU General Public License v3.0
206 stars 15 forks source link

Reach for the arcs error using reinitializated SDF #147

Open LetaoC opened 2 months ago

LetaoC commented 2 months ago

reach_for_the_arcs function generates two errors using the reinitialized SDF by scikit-fmm. When grid_number = 5, time step = 1e-3:

Traceback (most recent call last):
  File "/Users/letaochen/Documents/SDF/bug.py", line 17, in <module>
    vr,fr = gpy.reach_for_the_arcs(gridp,sd_fmm)
  File "/Users/letaochen/miniconda3/envs/gpenv/lib/python3.10/site-packages/gpytoolbox/reach_for_the_arcs.py", line 199, in reach_for_the_arcs
    P,N,f = _fine_tune_point_cloud(U, S, P, N, f,
  File "/Users/letaochen/miniconda3/envs/gpenv/lib/python3.10/site-packages/gpytoolbox/reach_for_the_arcs.py", line 648, in _fine_tune_point_cloud
    V,F = point_cloud_to_mesh(P, N,
  File "/Users/letaochen/miniconda3/envs/gpenv/lib/python3.10/site-packages/gpytoolbox/point_cloud_to_mesh.py", line 59, in point_cloud_to_mesh
    assert len(P)>1 and len(P.shape)==2 and P.shape[0]>1, "Must supply at least two points."
AssertionError: Must supply at least two points.

When grid_number = 6, time step = 1e-3:

Traceback (most recent call last):
  File "/Users/letaochen/Documents/SDF/bug.py", line 17, in <module>
    vr,fr = gpy.reach_for_the_arcs(gridp,sd_fmm)

  File "/Users/letaochen/miniconda3/envs/gpenv/lib/python3.10/site-packages/gpytoolbox/reach_for_the_arcs.py", line 189, in reach_for_the_arcs
    return V, F
UnboundLocalError: local variable 'V' referenced before assignment

The python script along with the input files (grids and sd_fmm) are attached.

bug.zip