Unfolder 2.1.8

Just a couple of minor changes to Unfolder in this version:

  • ‘zero length vectors’ bug fixed
  • First face to unfold from now selectable (use face-select mode (f) to select the face)
  • Random traversal now properly random again
  • SVG output now includes mountain & valley fold styles in CSS

got a link?

ah yes sorry:

http://celeriac.net/unfolder/

hi, btw ed.keys().sort() does nothing.
Dict’s keys cant be sorted in the dict.

instead do

keys = ed.keys()
keys.sort()
for key in keys()

Also, best not use dict as a variable name since its a Python keyword.

hey thanks for that ^

I’ve just started using ‘unfolder’ and I am curious if it can reference to a UV map. I know very little about the .svg file format so please excuse the ignorace imbedded in the question. I ask as you have a button in your script interface that is marked ‘uv’ and it appears to do something… (“Assigned UV’s”) However when viewing the .svg file in Firefox it is an empty mesh.
Thank you,
Tirick

Celeriac, would you be intertested in geting this script included in the next release of blender?

It seems a nifty script, If your interested - we’ll go through a few iterations of tests (maybe fixes if it dosnt work in some cases), would be good to have it optimized and stress tested :wink:

  • as well as using the latest parts of the python API where possible.

Ideasman, sure if people find it useful. I wrote it while learning Python and for my own curiosity so it’s not optimised at all. There are many things that could be improved, many of which I can’t see myself due to my ignorance in Python. One major deficiency in it is the lack of a quadtree for all the overlap detection. I’d welcome feedback from more experienced Python coders as to how to speed it up.

T.C.Fire - the UV button creates a UV map for the unfolded object from the net (the unfolding). Try unfolding something like an icosphere and then click UV and look at the UV window – the UV map will be the same as the unfolded object with no distortions.
SVG is the file format Unfolder exports its nets in. SVG is a standard for scalable vector graphics which can be read by a wide variety of tools like Inkscape and Illustrator. Unfolder exports extra metadata embedded in the SVG file to retain the 3D information from the original object so that if read back into Unfolder you can re-fold the object from the net. This metadata can be discarded if only the 2D net is required. All the colours and line styles in the SVG files are done with CSS. Unfolder exports the last unfolded object’s net when you click ‘save’. If your mesh doesn’t show in Firefox then there may have been a problem during export - did you get an error in the console ?

Thank you for the summation of .svg. I was not clear in my description however: the net shows just fine in firefox; my expected result (a mesh filled with a UV texture) of the uv button was the issue. Clearly from your description that would be outside the bounds of the svg format. This is a neat program and has great potential for future development.
Thank you,
Tirick

ah. I see what you mean - no, the output SVG is only the vectors, not the Blender texture. It is possible to do what you want with SVG (using clip regions) and maybe I’ll look into how to do it with Blender’s API.

Celeriac, thank you very much for this wonderfull script!

I’m having trouble with some simple (i think) meshes and maybe you can help me on this.
This is a sidewalk in the middle of a street with diferent Z values and i’ve created the Seams that look correct to me. Can you give a look on this?

Thank you!

http://uploader.polorix.net//files/134/unfold_trouble.zip

Hi MADCello,

I looked at your mesh and I think it may be an ununfoldable surface due to its negative curvature, which makes it an interesting mesh!
You can unfold it if you separate it into two meshes along the inside ridge and unfold each separately. Alternatively you could close the surface into a triangular toroid which would unfold - good luck!

Really nice script , especially the animation ability. Pepakura can´t do that. Thanks a lot. It´s one of the scripts which motivated me to learn BGE python. Would be nice to see you more often here, celeriac.