EggHalf Parametric Script

 From:  Michael Gibson
4489.2 In reply to 4489.1 
Hi Brian,

> I was wondering if such curves become Nurbs curves, and
> also their level of accuracy?

Yes, all curves that you see in MoI are NURBS curves. NURBS curves can represent some kinds of curve shapes exactly, like arcs, or parabolas. Some other kinds of curves can't be formed exactly by a NURBS curve though and in that case the analytic curve that you are trying to create has to be approximated by making a flexible NURBS curve with a bunch of points in it that follows the same shape of the desired precise curve. That's generally called a curve fitting process.

The ToroidalHelix script method places the control point hull of the NURBS curve right at the exact location of the curve function. The actual curve geometry itself does not pass directly through the control point hull (except at the first and last point) but will approach it very closely if you use plenty of points.

It could be possible to use a different method for creating the curve which would be to interpolate the points - that would be using the "InterpCurve" command (Draw curve > Freeform > Through points) rather than the control point curve command for the actual curve construction. It's easy to try that in the script - in the spot of the script where it calls moi.command.createFactory( 'curve' ); instead have it call moi.command.createFactory( 'interpcurve' ); - they should both take the same kind of inputs so I think all the rest of the script should still work the same.

An interpolated curve is made to pass directly through the given points - so that helps some with increased accuracy since there are then many points where the curve is exactly on the true function's point instead of only just approaching it everywhere.

However, interpolation can kind of overly constrain a curve and has a tendency to introduce wiggles, so it's not necessarily a slam dunk that it's always better. But if you are matching to a nice smooth function and use plenty of points interpolation should work well and would probably give you more positional accuracy but probably with a trace amount of tangent wobble as the tradeoff.

But it should be easy to just try swapping in 'interpcurve' in the createFactory() call to give it a try...

- Michael