Script : Transform a mesh into a curve.

You can download the script here (for 2.40) or a .blend exemple file here

Situation :

You have a linear mesh : ie a mesh without faces and with all verticles linked to 1 or 2 other verticles.

What the script do?

- Transform selected meshes in curves.
- Options : 2D/3D transformation and in 2D case : Poly/Nurbs transformation.

How to use script :

1. Select all mesh you want to convert (must be "linears"; note that if there is more than one "line" in your mesh it also works)

2. Launch script with Alt+P (once the script is imported in Blender) or Put it in .blender/scripts/ folder and follow the instructions open it from the Scripts Window in animation section area (you can follow this instructions)

3. Script ask you if you if you want that conversion is 2D or 3D.Conversion Mode
If you select 3D :
Script will directly convert your mesh in a 3D nurb curve.

If you select 2D :
The script will ask you what kind of convetion you want : poly or nurb curve.
Then script will convert your mesh in a 2D curve making a projection of you mesh in the most probable plane of projection
Conversion Type

>> Your mesh is converted. One curve object has been created by independant line.

 If some other PupMenu appear :
1. #### have a point used for more than 2 edges :  it means that your mesh isn't really linear. In fact, script must have only one way to convert your mesh. In this case there is two ways possibles, so convertion isn't possible.
2. Nothing done : no mesh selected :  it means that in all your selected object none are mesh (script convert MESH to curve !!! ;) )

 Known problems :
1. None.

Just be carefull that you use a "linear mesh".

Future plans :
- Enable curve bezier support (not depends on me).
- Maybe enable poly curve conversion for 3D too (but not necessary... if somebody need it).

Version history (most recent in first):
- Copy of layer (thanks to Grimble)
- 2.40 compatibility.
- Enable 2D and 2D poly conversions (idea of Yellow)
- Convert 3D mesh to 3D nurbs curves

>> Many thanks to all that help and advise me for this script on Elysiun, Zoo-Logique & BlenderClan

For any problems or suggestion contact me : r3gis