Is there a script to convert a series of verts to a curve?

3R

Thanks very much for the explanation regarding aligning the z axis and your intention to include it in your script.

EDIT I’ve resolved my rotation problem with the resultant curves. If i ctrl A (clear/apply size & rotation) before running the script all the curves are correctly aligned with the original mesh.

thanks.

yellow

Hi,

I have updated the script :

  • Popup menu to chose what type of conversion :
    *3D
    *2D : Poly or Nurbs
  • Auto find the most probable axis to made projection.
  • Compatibility with version lower than 2.40 (I have just tested with 2.37) (So problem of “There is a face” or “A lost point” shouldn’t appear for any reason)

http://cybercreator2.free.fr/Pythons/Mesh2Curve.py or the .blend : http://cybercreator2.free.fr/Pythons/Mesh2Curve.blend

3R:

Fantastic, excellent updates to your script. It does exactly what i was looking for, i’m very grateful and hope that others will find this script very useful also. many thanks.

i dare not suggest any additions to it after the hard work you’ve done now.

i’m looking forward to using it on some tricky architectural models.

thanks again.

yellow :smiley:

Yes, thank you! I will use this.

%<

:smiley:

All suggestions are welcome : it’s the best way to improve a script.

I’ll try to do a good help web page for this script (I’ve listen the meeting about bundled scripts and I agree that scripts must have a good doc even if they aren’t included).

Hi 3R

i dare not suggest any additions to it after the hard work you’ve done now.

All suggestions are welcome : it’s the best way to improve a script.

if you are happy to do more then:

the meshes i’m running the script on are DXF & vrml imports converted from 2D CAD drawings. the script works perfectly as long as i ensure that the CAD drawings i’m importing are well constructed, no lines upon lines and that all the lines join each other to form the shapes to convert.

is there anyway the script can detect where the conversion will fail in the mesh then correct it , or ignore it or highlight where the mesh is causing the failure. the type of errors I get are:

‘have a point used for more than 2 edges’, I guess where two or more verts lie on top of each other.

‘AttributeError: Mathutils.AngleBetweenVecs(): zero length vectors are not acceptable arguments’ but seems to have converted to a 2D poly anyway. but you have to click on the mesh to find this out.

the script used to freeze blender if it couldn’t convert for some reason, which you fixed in you’re last update :D, however it has frozen blender on occasions when I think it’s the very first part of the mesh it trys to convert.

thanks very much for a great script.

yellow

is there anyway the script can detect where the conversion will fail in the mesh then correct it , or ignore it or highlight where the mesh is causing the failure. the type of errors I get are:

‘have a point used for more than 2 edges’, I guess where two or more verts lie on top of each other.

Ok I have made an update :
now the blender cursor is set at the position on the mesh (a verticle) where it can’t decide what to convert. So it oblige to correct the mesh manually but it can help to do it. Ignore problem or correct it seems difficult.

‘AttributeError: Mathutils.AngleBetweenVecs(): zero length vectors are not acceptable arguments’ but seems to have converted to a 2D poly anyway.

Problem also solved (I have use this fonction in an other script this week, it made me the same error and I’ve forgotten to correct it in Mesh2Curve).

About help page it is done : http://blenderfrance.free.fr/python/
I have started to make a doc for all my scripts.

3R:

Hi and many thanks for the update. The cursor stopping at the point of faliure is really helpful.

thanks again

:smiley:

Hi 3R, your script page looks like it’s got some real gems. I think this script might be just what I needed. Thanks alot!