Help - there is a Swiggle on my Curve!

Hi there,

I am using CurveThroughPt to fit a curve through these points.
Everything looks fine except there its a weird swiggle / twist at one the end of the curve.
This is causing problems for my CNC machine.

Any idea why this forms and how I can avoid it?
Is there anyway i could detect it in code using RhinoCommon? how might i repair it? (ideally something automated - these are too small to spot visually)

Command: CurveThroughPt
Press Enter to accept settings ( Degree=3  CurveType=Interpolated  Knots=Uniform  Closed=No )

image
Swiggle.3dm (143.0 KB)

I did ask ChatGPT but this is help i got

Select the curve and you’ll find an extra point way off to the left caused the “swiggle”.

Delete that point.

That point is not mine - it is appearing during the Curve Through Command

Please post a file and instructions to duplicate the problem, before it has occurred.
Thanks

1 Like
  1. Select All Points using SelPt
  2. CurveThroughPt ( Degree=3 CurveType=Interpolated Knots=Uniform Closed=No )
  3. Notice Swiggle appears on top left of the curve

Swiggle.3dm (143.5 KB)

I am unable to repeat the problem in V8 for Windows.
Hmmmm…

I tried SelPt, as well as Window selecting before running the command.

Try using Knots=Chord (instead of Knots=Uniform)

Interpolating splines with uniform knots on points with signicant variation in spacing can result in swiggles, loops and similar.

1 Like

Thank you David,

Knots = Chord does indeed remove the Swiggle!

@John_Brock I can replicate this behaviour, as can a colleague in R7SR37 and in R8SR3 SysInfo attached in case useful.
sysinfo.txt (2.4 KB)