libigl-python-bindings
libigl-python-bindings copied to clipboard
2D case for winding number / sdf computation
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]
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?