libigl-python-bindings icon indicating copy to clipboard operation
libigl-python-bindings copied to clipboard

2D case for winding number / sdf computation

Open ottogin opened this issue 3 years ago • 1 comments

The C++ backend of IGL supports 2D cases in SDF and winding number (except for fast-winding number). However, the bindings have the assert that raises the following error on the 2D data:

ValueError: Invalid mesh vertices, v must have shape [#vertices, 3] but got v.shape = [25, 2]

ottogin avatar Feb 07 '22 18:02 ottogin

This case fails only on the assert, can we make the assert only if V.shape[1] == 3 and check if V.shape[1] == 2? Otherwise, if this is not safe enough, can we get a triangle mesh and take the boundary loop inside the binding?

arvigj avatar Aug 19 '24 13:08 arvigj