Plugin: Unfold Tool

This SketchUp script assists the user in flattening, or unfolding, 3d objects onto a 2d plane.

Installation
  1. Download unfoldtool.zip.
  2. Move the file into your SketchUp/Plugins folder.
  3. Restart SketchUp.
The script creates an item Unfold Tool in the Plugins menu.

Usage
  • Select the Unfold Tool from the Plugins menu, start selecting faces to unfold. The selected face is unfolded to match next selection.
  • Hold the Control key to reverse operation - rotate the subsequent face to match the already selected face(s).
  • Alt-click on a face to select all the faces in the same plane.
  • Shift-click to toggle selection of faces.
  • Click off the model to reset the selection.
See Also

My unfold tool is pretty basic - you may want to check out the Flattery plugin as an alternative.

78 comments:

AL Paton said...

Hello Jim,

Q. I was wondering if there is a way to automate your Unfold Tool to step along an object and 'flatten' as it encounters an edge ?

I have used Ruby to generate a 3D shape of a curled ribbon that curves around and angles to the side (can email you the model noting it is still evolving) and I wish to use your Unfold Tool to make the final shape flat so I can mark out and cut some tin sheet to make the curled shape in real life.

We have a characteristic direction (along the length of the ribbon) to get to the next face (and edge) on which to unfold, however, there are lots-and-lots of edges as I have used lots of 'step' increments in my script, which makes it near impossible to do by hand.


Q. Pls advise your email address and I will pass the model.

Regards, AL.
Canberra, ACT

PS: Well done with your site :-)

Anonymous said...

Hello Jim

I only did discover your plugin today.

This is great work!

Only last week I did unfold some pieces by hand using the rotate tool, your plugin could have saved me some hours!

Thanks for our work.

Regards from Germany

Michael

Anonymous said...

Hi Jim

I was looking for how to making unfold object for a long time.
But,I did discover your powerfull tool.

I'm obliged to you so much.
I introduced your tool to my Web site.sorry,only japanese.
(http://www.mrkutai.com/2007/12/sketchup_6480.html)

Regards from Tokyo,JP
mrkutai

Faruk Ahmet said...

God, Jim,

If only I saw your plugin two days ago when i had to unfold a whole site and the buildings on it to prepare a cut-and-paste sheet for a cardboard model. Great work!

Regards from Istanbul, Turkey
Faruk Ahmet

Michael said...

Than you Sooooooo much!
I just found your unfold tool yesterday, and it has totally transformed my work process.
I create folding boats and furniture from plastic sheets, and in the past it was a very tedious process to do a 2d drawing in illustrator, print it out, fold it up and then go back to the drawing and tweak and repeat endlessly.

Now I just make my finished product in sketchup and unfold it and print it out!

I could only wish for a couple of features:

A way to easily refold the shapes, as sometimes unfolding reveals a shape that is impossible to fold out of a flat panel, so I have to tweak it and fold it up again to see how the tweaks changed things.

A way to compensate for thickness in the final product, as that affects the final dimensions.

I would be willing to pay for these features to be implemented(especially the first one) if it is not too expensive.

Please let me know if you are interested in a reply

J said...

Michael,

You're welcome. I'm glad you found it useful.

You can use Undo to refold at any time during the unfold process. It will remember the selected faces to a point, but it's not perfect.

As for the thickness, I will need to think on how to do it. Please contact me via email.

BobG said...

This blog and SketchUp are at the TOP of my recommended sites. I may even contribute a plug-in once I learn Ruby.

Alexandrew said...

Hello,

For some reason, I cannot download this plugin. I keep getting "Internet Explorer Cannot Find the webpage".

Can somebody who already has it email it to me?

My email is:

alexandrew94@hotmail.com

Thanks

Michael said...

I just learned a new trick with the unfold tool. I often get into a situation where I have partially unfolded a model and I realize that I missed a panel or I did the unfolding in the wrong order so some parts of the model were left behind in the unfolding process.
The trick is that whatever panels you have selected will be moved to the angle of the next panel you select, so you can select any arbitrary panels (connected or not) and they will unfold to the next panel you touch.

That probably is totally incoherent to anybody who does not already know the trick... Maybe I will do a movie to illustrate it.

Anonymous said...

brilliant tool, just used it, thanks for your hard work!

Anonymous said...

Great tool! thank you so much for sharing

Anonymous said...

I installed the newest sketchup (Windows version), but the plugin gives me errors:

Fehler beim Laden der Datei jf_unfoldtool.rb
C:/Programme/Google/Google SketchUp 6/Plugins/jf_unfoldtool.rb:59: syntax error
Sketchup.active_model.start_operation "Unfold"
^
C:/Programme/Google/Google SketchUp 6/Plugins/jf_unfoldtool.rb:79: syntax error
end # if edge pickedactive_model.commit_operation
^
C:/Programme/Google/Google SketchUp 6/Plugins/jf_unfoldtool.rb:110: syntax error
#puts "activate called."
^
C:/Programme/Google/Google SketchUp 6/Plugins/jf_unfoldtool.rb:120: syntax error
end
^
C:/Programme/Google/Google SketchUp 6/Plugins/jf_unfoldtool.rb:157: syntax error
C:/Programme/Google/Google SketchUp 6/Plugins/jf_unfoldtool.rb:159: void value expression
next unless axis
^
C:/Programme/Google/Google SketchUp 6/Plugins/jf_unfoldtool.rb:160: syntax error
g = Sketchup.active_model.entities.add_group(f)
^
C:/Programme/Google/Google SketchUp 6/Plugins/jf_unfoldtool.rb:183: syntax error
def self.select_plane(plane)
^

J said...

jens,

It looks like you downloaded the plugin as a HTML file. Right-click the link to the .rb file and save it to your computer. Than move it to Plugins.

Anonymous said...

¡BRAVO!!
Muy bueno

d___d said...

Fantastically useful plugin - thankyou for this. Getting some really nice results in architectural model making.

One question: how to make unfolded objects flatten to the ground plane automatically? The most time-consuming step for me now is rotating resultant objects in 3D to form my cutting list.

And a wish-list item: a packing plugin, which would rotate and translate flat objects to fill a rectangle of given proportions with reasonable efficiency. To reduce material wastage... A tall order, I know!

Thanks again. David.

J said...

david, create a surface on the group to use as the last unfold operation. It does not need to be connected to your unfold geometry. I'll need to think about packing... Thanks for the feedback.

Ruzter said...

This is awesome, it will be very handy for designing projects made up of panels so can then cut them out on my home built CNC.

One question: Sometimes the model will fold onto itself instead of out flat. Is there any way around this?

cheers
Darrel

J said...

Ruzter, make sure your faces are all facing the correct way. Unfold will determine the angle by matching the face normals.

d___d said...

Jim, thanks for getting back to me! Not sure if I totally get the workaround - doesn't seem to be doing the trick - but maybe there's already another plugin out there to rotated objects in 3d to place on the X Y plane. Still, much appreciated.
On the packing idea, that would probably need a lot of thinking! I know people charge a pretty penny for those apps due to their usefulness in saving material in manufacture, but wonder how complex the maths behind it really is...
Thanks again.

Anonymous said...

FanTAStic tool. Saves me having to learn Rhino at the moment :) One question- I have the same problem, where some planes UNfold like they should, and other planes fold back on to the adjacent plane I chose- like folding the flaps of a cardboard box into the box instead of opening the box. How can I fix this or what to do about it?

J said...

If possible, send me a model that shows the bad behavior.

Anonymous said...

Hello, I keep geting a bug error and shuts down every time I select the second folding face, any one with the same problem or a way to make it work?

Thank you

Anonymous said...

Hi,new to sketchup, but love this plugin! I am designing some models to make into paper models. I have tried Waybe plugin, but find it unreliable! With yours I can unfold easily and add tabs wherever I want afterwards.
I've done this on my model. I've then rotated each part of the model and put them all flat next to each other. Any idea how I can then print them out on paper at the correct size? I can't see how to do it. I could also do with being able to save it as a flat file picture that I can colour in in an art package......any help gratefully received!!

Anonymous said...

is this plugin Mac compatible?

J said...

Anonymous - to the best of my knowledge it is. If you use a Mac, I'd love a report on how it works (or doesn't!)

Anonymous said...

I have a Mac and it works great!

Can anyone give me any hints on printing it out? I'd like to design a little Xmas village to put on the mantel but I have to print it out first.

d___d said...

Bruce: Printing...

The way I've been doing it is as follows. If anybody else can streamline this I'd be grateful!


Make sure that all your pieces are flat on the ground plane (you might need to rotate them), and at the same height (you might have to move them).

Rearrange to make sure they're fitting efficiently within a rectangular area.

Move them clear of the rest of the model (I usually unfold a copy of a model part, rather than the original).

Select the default 'top' view to give a bird's eye view looking straight down. ( Camera > Standard > Top )

Make sure that your camera is set to 'parallel projection', not perspective. ( Camera > Parallel Projection )

Now zoom in/out to make sure that you can only see the unfolded pieces. (Otherwise Sketchup may try to print other parts of your model, which will result in it spreading the printout across multiple pages - bad as it will probably cut some of your pieces in half.)

Check that your printed drawing will be scaled correctly. File > Document Setup, and uncheck 'Fit View to Page', and put 1mm In Drawing, 1mm In Model (or whatever your units are).
These settings assume that you're drawing your object in actual size. If you want to print a scaled version, eg. 1:50, the 'In Model' measurement should be accordingly larger.

Also check that the settings under File > Print Setup are appropriate for your printer. Access to an A3 or larger printer can be invaluable...

Erm, File > Print... (It can be this easy, or you might need to experiment further with the positioning of the objects, of the camera, and perhaps the orientation of the page in Page Setup.)

Make sure that Sketchup is displaying edges, or that your shapes have some colour to make them easy to cut out.

Anonymous said...

Jim,

Terrific Work. I was looking around for a script to do this kind of work for some time. By the dates on the posts i see that i have been missing out for some time now. Thanks again.

jimma said...

Where do put plug-in files if using a Mac?

Anonymous said...

Is there some kind of... re-wrapping plugin? This is awesome, but it would be even better if I could unwrap the model, apply a texture, then wrap it back up.

J said...

I've thought about refolding. It would require keeping a history of fold operations. It's quite do-able, but I've no time currently.

Anonymous said...

Wow, thank´s man, I was looking long time for something like this! I appreciate your work.

Tim said...

Anyone/Bruce - I just can't make this work on my mac - how did you load it?
I put it in the right folder but it doesn't show up in the extensions tab of prefs dialog. I tried changing the extension to .plugin like the other plugins, but no change. Help!

Jimma - Locate Sketchup in apps folder, right click on it and select 'show package contents'. Click contents and put this plugin file into the plugins folder.

Anonymous said...

Just wondering if this plug-in is compatible with Sketchup 7.

WindWarrior said...

Woa! This tool is great!!!

Thanks very much for this plugin :)

Anonymous said...

I'm using this on a Mac and with SUP7pro and it works great. Thanks for the awesome plugin...HUGE time saver!

Anonymous said...

Hi there Jim
I;ve been using your unfold tool for a while now to make paper models of buildings. Great work! your tool simplifies the unfold.

Recently I've been working on a way to unfold a model to uv map it and at the same time retain the base model. I've written a tutorial expalining how I went about it at http://www.resentmentpublications.com/downloads/SUUVMAP.pdf.
I'm no Ruby programmer, but I thought you might have suggestions on how to automate the process. One of the Sketchucation members created a small plugin to automate the Make Group/Make Component part of it. This is rather cool as it sped up the process.
Cheers
Bob

Anonymous said...

an auto unfolder on marked object with adding the glueing "flaps" would be nice, also so it can autosize it to an A4 paper so it wont be cut on the print. naturally it will fill the paper as mush as it can.

Do that sound creatable?
well, I add it to my wishlist. :)

Si said...

Sounds like the above post is after Pepakura... It's a good program, but it doesn't always seem to work as intended.

Incidentally, for Mac users, the plugin has to go in the Application Support folder of sketchup. i.e. (Home) > Library > Application Support > Google Sketchup 6 > Sketchup > Plugins >

Then it should appear automatically when you restart sketchup.

I'd also be interested to see more of Waybe, but it costs....

Anonymous said...

perhaps a mix of this tool and pepakura, since pepakura can´t handle big objects

JohnMcC said...

We are building three funerary urns for the Samuel Beckett play "Play", out of MDF covered with a 16 sided polygon of hardboard and then modelling clay. I was trying to unfold the hardboard, but it doesn't keep the successive faces adjacent to each other when unfolded - they get further and further apart.

See http://www.abbeytheatre2.org.uk/2008-09/07_three_beckett_plays/segment_unfolding.jpg for an image of the segment, and the result of unfolding.

Any suggestions please, as to whether this is me not understanding how to use the Unfold Tool, or a possible bug in the program?

I can email a copy of the relevant part of the model if that would help.

Thanks.

John McC

J said...

Hi John,

You have found an odd feature that happens when you activate the unfold tool with everything selected.

For that shape, de-select everythig, activate the unfold tool, and do the unfold face-by-face.

JohnMcC said...

Thank you for such a prompt reply.

I've tried that, but while it does unfold contiguously, I can't get it to unfold onto the x-y plane.

I used Alt+click to select the rectangle in the x-y plane so as (I thought) to set the plane to unfold to, then click the next face (the first sloping one). What happens is that the rectangle swings round to the slope, rather than the reverse and successive clicks then unfold successively (as wanted) but end up at the slope of the uppermost face.

It is of course possible to then rotate the unfolded segment down to the x-y plane, but surely there's an easier way?

Or having selected the plane, should I unfold from the top down?

How do I get it to unfold onto the x-y plane?

See www.abbeytheatre2.org.uk/www.abbeytheatre2.org.uk/2008-09/07_three_beckett_plays/segment_unfolding.skp

Tx if you can help again

JohnMcC said...

AHA!

If I DON'T try to select the unfold plane first, but start from the top down, that does what I want.

But I don't really understand why!

Anyway, it is very useful - thank you.

serigala said...

I'm using your plugin in sketch-up 7 (xp operating system) and it work!

thank's jim, now I can create a papertoy models easily.

Awright said...

I want to get this plugin for sketchup but everytime I try to add it, it doesn't work. I have a mac and I followed the mac instructions like it says in some above comments, but it still isn't working. The only thing that did change was when I reopened sketchup, under my plugins I had a section called "cost" that wasn't there before. Can anyone help me figure out how to get this plug in to work for me? It would be greatly appreciated!!

Math Teacher said...

I am having this same problem. I found that if you open the .rb file, copy and past it into the ruby console, then it will finally appear, but you have to do this each time you open GSU. What can I do to make this a permanent plugin?

J said...

I just recently got a Mac to test on, so I'll work on this next.

Anonymous said...

hey im using a windows pc and i need ur plugin for uni...i downloaded it, uncompressed it, added it to the plugins folder and it doesnt work..it wont show up in the plugins menu in sketch up..its a rb file and everything and it just wont work HELP!

Unknown said...

I need to apply an image to a dome then unfold the image for printing. However I need to keep the artwork in High Rez. 30,000px or higher. Any idea how to achieve this with your plugin?

Tobobo said...

This plugin has just saved me hours of work!!!!

Thanks Jim

Businessman41 said...

This is probably a noobie question, but how do you run plug-ins? I am using Google Sketchup 8. I dragged and dropped the file into the specified folder, but I cannot find any plugin menu.

Anonymous said...

Great plugin. I use SketchUp to design buildings for a model railroad. Your tool takes the guesswork out of complicated roof structures. I posted a link to your website on a model train forum I subscribe to. http://forum.nscalelimited.com/viewtopic.php?f=16&t=13318&p=28623#p28623 Thank you again.

J said...

Thanks for the comment - my unfold tool is showing its age. You may want to c heck out the Flattery plugin as an alternative.

Anonymous said...

Thanks so much for this plugin. It saves so much time. I will be a customer for life!

Anonymous said...

I am trying to take a model, create a flat 2D image which I can then cut out and build an O-Scale model for a train set. Once I unfold I am not sure how to print

MermanSora said...

Just wanted to say , i totally hate the flattery plugin , i believe this plugin is the most amazing plugin there is. Is simple , clean and works perfectly with every single new google sketchup , EVERY TIME!

Just saying coose im scared this amazing plugin could die and be replaced by that flattery thing , cause this is the original tool i want to ALWAYS USE!

mooncaine said...

Looks cool. Does not seem to work in Sketchup 8 for Mac.

I tried putting it in my user's Application Support/Google Sketchup 8/plugins folder, and also in the same folder on the top level of the HD, but I still don't see any evidence of Unfold.

Does it work for Sketchup 8?

Anonymous said...

Seems to work fine for me Mooncaine. Did you copy the .png file as well or just the .rb file?

Mikey said...

Have you made any progress on compensating for thickness? It's not too bad to do one bend by hand, but there are lots of variables involved, including the characteristics of the material. There are several on-line claculators and tutorials, and several Google hits for finding a Sketchup tool, but the latter don't really work. One forum poster noted that Sketchup, as a surface-modeling tool, can't be expected to do anything like this, and he makes sense. I can build models by gluing 2 surfaces together after bending them as zero-thickness surfaces, but it's cumbersome and very limited.

Anonymous said...

Cool I managed to unfold the 3D model in Sketch Up rather easily using Flattery.

Now how do I fold it back up into the same 3D Model it was after I add textures to it?

ian rosenfield said...

amazing. fantastic for laser cutting...

ian rosenfield said...

amazing. fantastic for laser cutting...

ChrisProls said...

Something like 6 years later and your plugin is still very usefull.
Thanks for creating and sharing it !!

Unknown said...

this is awesome,i can make packaging faster now :D
thanks

Anonymous said...

Excellent tool! I just managed to unfold a cone, simple but very useful. :-) Maybe a video (or links to Youtube) to illustrate this would be helpful. Great job Jim!

Tony said...

Neat tool. I'll have to try it out when I get some time. I've been using a flatten tool.

fuelsguy said...

I have been using this plugin for some time, great tool. I have another plugin that rotates the flat panel from unfold tool and drops it onto the red/green plane. Now I can't find where this plugin came from. Anyone have an idea? The Plugin pull down menu says SPP and a sub menu of "Orient groups biggest face up"
Works nicely would like to point a friend to it.

Unknown said...

hi

download link dosent work how can i download it??

Unknown said...

lsoffEhi
download link dosent work how can i download the plugin?

Unknown said...

Wonderful tool, thank you. My metalwork has never been so accurate as when I started using this to print out wrap-around cutting templates.
Note, your download link comes up as "page not found", but the correct link is offered as "Here are some similar pages from this site:" You may wish to update your link though.
Cheers, Mark.

TriUne said...

hello Jim,

We are drawing a geodesic dome.
We have ce upon your wonderfull plugin and wanted to thnk you for this excellent invention...
in order to do the sewing pattern we are trying to unfold part of the dome.
Unfortunatly we have a serious problem, that is taking us hours of reserche (invain)
We have the same problem as this guy Ruzter:
A some point, 2 of the last triangles will fold into itself instead of out flat. Is there any kind of way out of what seems to be a "bug" ? we can't get the thing about your response : "Jim Foltz said...

Ruzter, make sure your faces are all facing the correct way. Unfold will determine the angle by matching the face normals.

October 30, 2008"
We thank you alot for your time, advice and suppport
tri and mari

Bernat Rehues said...

Hello Jim,

I'd like to download that plugin but the link doesn't work.
How can I get the tool?

Unknown said...

same as the last guy I would like to download but the link doesn't work,

Unknown said...

Hey it's me again I would really like to use this plug in for a project I'm working on. does any one have any sugjestions on how i could get it or something like it. The link here is broken. Thank you it would be much apperciated

J said...

Hi Graham - this plugin is quite old. But please shoot me an email though the contact page at the top of this blog. I can't get ahold of you otherwise.

juliana said...

Hi Jim,

It seems the plugin is no longer available, it takes me to an internet explorer page. I know it's been quite a while since you posted this, but it would be very useful!!
Does anyone still have the plugin? Can you send it to my e-mail please?

Many thanks! jufrontin@gmail.com

best,
juliana

tabora135 said...

Hi
Is it possible to download cline plugin?
regards
Jay
email: tabora135@gmail.com

Popular Posts (Last 30 Days)