alecjacobson / gptoolbox

Matlab toolbox for Geometry Processing.
MIT License
628 stars 166 forks source link

slice_isolines: BC matrix has incorrect dimension if multiple values are provided #96

Closed abhimadan closed 4 years ago

abhimadan commented 4 years ago

If a call like [U,G,~,BC] = slice_isolines(V,F,u,[pi/2 pi]) is made, the BC matrix cannot be multiplied by V (i.e., BC*V produces a dimension error). I believe this is because each value is sliced one at a time internally, so the incrementally constructed BC matrix has its size determined by the mesh size before the last cut.

Relevant portion (line 96 in particular doesn't know about the original mesh size): https://github.com/alecjacobson/gptoolbox/blob/3bbed7a1c18b7ce9a4b82ea5c8a2eef25b6d2b55/mesh/slice_isolines.m#L93-L99