UnwrapCurve plug-in

 From:  Michael Gibson
5136.1 
I cooked this up to help someone through e-mail and thought it might be useful to others.

The attached UnwrapCurve plug-in will generate flattened lines from input curves, with the line having the same length as the full length of the curve.

It places the lines onto the x/y plane, with the midpoint of the line at the midpoint between the projection of the curve's endpoints, and the direction of the line as the direction between the curve's endpoints. If the curve is closed (and so the start/end are on the same point and not forming a unique direction as with an open curve), it just uses the x-axis as the direction for the line.

So it makes things like this, with input like this:



It will produce these lines:



The lines there are not a planar projection of the curves, the lines are of the same length as the length of each curve, so they stick out to the sides more than a planar projection would.

You can also use it on a circle to easily spit out a line that is the same length as the perimeter of the circle.

To set it up, unzip the attachment and copy the 2 files into MoI's commands folder - in Windows you can find this as a sub-folder inside of MoI's main installation folder inside of \Program Files, and under OSX right-click on the MoI .app and choose "Show package contents", and then inside there go to drive_c/moi/commands.

After you have copied the 2 files into MoI's commands folder that will then make a new UnwrapCurve command available to MoI and you can set up a shortcut key with that as the command name to launch it, or you can push Tab and type in UnwrapCurve and push enter as an alternate way to launch it.

Hope it may be useful!

- Michael

EDIT: 6/1/2012 - updated unwrap curve to preserve object properties such as style on the generated lines.

EDIT: 7/29/2023 - updated unwrap curve to place line on current cplane z = 0 instead of only world z=0.

EDITED: 29 Jul 2023 by MICHAEL GIBSON