MoI discussion forum
MoI discussion forum

Full Version: Rectangular coil script

From: bemfarmer
31 Oct 2017   [#1]
_CoilRectangular is a simple script which creates a multi-Turn helix-like, "rounded rectangle" coil curve, based upon a 2D rounded rectangle with continuous z offset. The curve can also be considered to be a spring coil.
The coil turn is made up of line segments and quarter helices.
The number of Turns is an integer. If Turns = zero, one turn is still made, a slight bug.
The user may Sweep the curve with a circle or rectangle, (flat mode suggested,) or other 2D object, placed at the beginning, tangent/perpendicular to the curve.
LineWeb programming style was used, but instead of a factories array, objectlists were used. Interpcurve was not used.

Normally the radius is less than or equal to the lesser of length/2 or width/2, otherwise the result will be non-standard.
"Stadium" curve occurs if 2*radius = length or width.
It is also possible to make a circle, a square, a rectangle, or a helix.

- Brian

Attachments:
_CoilRectangular.zip


From: TOM (SIRTOM)
1 Nov 2017   [#2] In reply to [#1]
Love your scripts - great !
From: danperk (SBEECH)
1 Nov 2017   [#3]
Thanks Brian!
From: mkdm
1 Nov 2017   [#4] In reply to [#1]
Hi bemfarmer.

Thank you very much for this interesting script!


It's very useful for creating things like these :







Thanks and have a nice day.


Ciao!
From: mkdm
1 Nov 2017   [#5] In reply to [#1]
P.S.

I find that is also useful applying a single pass of Max's "del_corner" script after doing the coil.

In this way it's more easy to add points and deform the curve as needed.

Marco (mkdm)