verb icon indicating copy to clipboard operation
verb copied to clipboard

verb.geom.NurbsCurve.byPoints chokes on consecutive duplicate points

Open dantaub opened this issue 6 years ago • 0 comments

Minimal failing example -- run:

verb.geom.NurbsCurve.byPoints([[0,0,0],[0,0,0],[1,1,1]], 1);

The call does not have any errors, but the resulting curve's control point x,y, and z coordinates come out as NaN -- the NaNs are set inside basisFunctionsGivenKnotSpanIndex

If this result is expected from the algorithm, perhaps validating or sanitizing the input on byPoints would be advisable. Alternately, could document input requirements on this method.

dantaub avatar Jan 08 '20 17:01 dantaub