MoI discussion forum
MoI discussion forum

Full Version: mathematically exact helix with constant radius and progressive pitch

From: geekmidget (HF)
18 Nov   [#1]
I can't achieve getting a mathematically exact helix with constant radius and progressive pitch.

I tried wrapping an arch (with the exact pitch progression I want) around a circle with the correct diameter of the helix using the flow tool, but resulting helix isn't accurate.

In some places the helix doesn't match the radius it should have, accuracy is off by a few microns. Also, points of interpolation are not evenly distributed (maybe this is having some influence). See attachments.

I also tried using the variable pitch helix plugins made by users but results aren't mathematicaly accurate either.

Why doesn't MoI3D allow making a mathematically exact helix with constant radius and variable pitch, if AFAIK it allows making mathematically exact circles and archs? This was with MoI3D V4, I haven't tried with V5 yet.

Image Attachments:
helix_points.png  helix_radius.png 


From: bemfarmer
18 Nov   [#2] In reply to [#1]
Hi HF,

Posting your 3dm file might assist in understanding your project.

According to the following link, "A (variable pitch?) helix cannot be exactly represented as a NURBS curve. So, you will have to approximate it."
https://math.stackexchange.com/questions/2232266/how-to-generate-variable-pitch-helix-in-nurbs-form
(I am unsure if this statement applies to the creation of a regular helix in NURBS form.)

Other cad programs utilize "an equation driven curve" to create variable pitch helix."

The variable pitch helix script, (which is not a part of the Moi program), uses Moi InterpCurve, to join the calculated points for the variable pitch helix, with a curve.
An InterpCurve is said to be "wiggly". This may show up at the stated "micron" level of accuracy?
Rebuild curve may reduce "wigglyness"? But will slightly alter the position of the resulting curve?

The alternative to forming the curve from the calculated points with InterpCurve, is to use a "Control Point" type curve, which I understand will create the "var pitch helix" curve, which passes very near to the calculated points. So such a curve will not be perfect at the "micron" level, but may not be "wiggly"?

Due to binary versus decimal representations by the computer, calculated points may not be "perfect"?

Increasing the number of points in the variable pitch helix may increase the accuracy?

Flow "Wrapping" the variable pitch helix around a (circular?) arch, will change the pitches? The outer portion will be spread out more than the inner portions?

Perhaps someone will correct any inaccurate statements that I have made above?

- Brian

I may delete the following link, as the paper does not seem to be readily available:
https://www.researchgate.net/publication/251914234_A_Subdivision_Scheme_for_Approximating_Circular_Helix_with_NURBS_Curve
From: geekmidget (HF)
18 Nov   [#3] In reply to [#2]
Being able to use an equation curve with cylindrical projection coordinates would be ideal, since what I need to do is basically a circular helix, just with a progressive pitch. Otherwise Cartesian projection would work.

But I think MoI3D doesn't allow equation curves at least directly. If it does, I haven't been able to find it.

If a helix cannot be represented exactly as a NURBS curve, isn't there at least a way to represent the helix curve with accurate radius at the control points?

Regarding approximation, I did prepare the pitch progression curve I wanted to wrap, using a good point density with the hope that the flow tool would respect at least the Z position of each point so they might get evenly spaced allowing a greater accuracy, but apparently the flow tool doesn't preserve already existing points.

What would be the approach to use the Control Point type curve instead of InterpCurve?
From: Michael Gibson
18 Nov   [#4] In reply to [#1]
Hi geekmidget,

> Why doesn't MoI3D allow making a mathematically exact helix with constant radius and
> variable pitch, if AFAIK it allows making mathematically exact circles and archs? This was with
> MoI3D V4, I haven't tried with V5 yet.

It's because it's not possible to represent a 100% exact helix with a NURBS curve.

NURBS can represent exact circles, ellipses, parabolas, and hyperbolas but not helixes.

So a helix curve will be approximated.


> In some places the helix doesn't match the radius it should
> have, accuracy is off by a few microns.

That's normal. If you need a helix with greater accuracy than a few microns you will probably need to use some specialized CAD software that represents it as a procedural curve instead of as a NURBS curve.

- Michael
From: Michael Gibson
18 Nov   [#5] In reply to [#2]
@Bemfarmer:
> (I am unsure if this statement applies to the creation of a regular helix in NURBS form.)

It applies to both - neither fixed pitch nor variable pitch helixes can be represented exactly by NURBS, unlike conic section curves.

- Michael
From: Michael Gibson
18 Nov   [#6] In reply to [#3]
Hi geekmidget,

re:
> If a helix cannot be represented exactly as a NURBS curve, isn't there at least a way to
> represent the helix curve with accurate radius at the control points?

No, because usually a NURBS curve does not pass directly through control points.

- Michael
From: bemfarmer
18 Nov   [#7] In reply to [#3]
Thank you Michael.
It is hard to find, or if found know, if information on the internet is correct.

In response to question:
>>>What would be the approach to use the Control Point type curve instead of InterpCurve?

The factory for the type of curve is hard coded in the variable pitch helix .js file, so simply change one line of code in the .js file.

var factory = moi.command.createFactory( 'interpcurve' );
becomes:
var factory = moi.command.createFactory( 'curve' );

Perhaps assign a new name for the modified script, to avoid confusion, and copy the renamed .js and .htm files to the Moi appdata file, alongside the old version, if using CustomUI,
or the Moi command folder, alongside the old version, without CustomUI.

I do not understand how Flow is involved in the helix modification?

- Brian
From: geekmidget (HF)
18 Nov   [#8] In reply to [#7]
Brian, my approach was making an arch in the plane XZ first, with the progression slope I wanted for the helix, then flowing that arch around a circle in the plane XY with the diameter of the helix. For some reason in the few tests I made this actually produced more accurate results than the plugins. Go figure.
From: geekmidget (HF)
18 Nov   [#9] In reply to [#6]
Thank you for the clarification Michael, I wasn't aware NURBs curves don't actually pass directly through control points.
That explains it.

Is there at least a way to force the flow tool to preserve position of control points in the Z axis?
From: Michael Gibson
18 Nov   [#10] In reply to [#9]
Hi geekmidget,

re:
> Is there at least a way to force the flow tool to preserve position of control points in the Z axis?

Not for points internal to the curve.

But if you cut the curve into pieces, I think the start and end points of each piece would be preserved.

Also the fitting tolerance for flow has been tightened up in v5 so you may get better results there.

- Michael
From: geekmidget (HF)
18 Nov   [#11] In reply to [#10]
I will try both ways, thanks!
From: geekmidget (HF)
19 Nov   [#12] In reply to [#11]
Splitting the progression slope curve in 3 pieces didn't help much with precision, I will try later today with a radial array of 90 pieces and see if it makes a difference then. Flow tool in V5 behaved more or less the same as in V4, I didn't notice particularly better tolerances. Helix should have 32.5mm in diameter, but when selecting it dimension was between 32.46 and 32.4999, I guess small roundings per each interpolation point add up at least in this particular case.