Unwrap and Flatten Faces
Unwraps shapes and lays arbitrarily oriented faces flat on the ground.
Unwrap and Flatten Faces

This extension allows the user to do three things:

  • Unwraps non-coplanar faces (any shape objects, shells etc.) using an automatic (randomized) algorithm and then lays the resulting set of faces flat on the ground. This is done without creating any distortions.
  • Lays any arbitrarily-oriented face or collection of coplanar faces flat on the ground (without distortion). Use e.g. in combination with a manual unfold tool or to make sure faces are perfectly horizontal.
  • Projects a set of faces to one of the three main planes by smashing all faces flat. This creates distortions, of course.

This extension is useful for e.g. producing fabric or sheet-metal templates, laser-cutting templates, as CNC-prep, for texturing, etc.

Usage:

Select one or more connected and ungrouped faces in your model and right-click on them to get the “Unwrap and Flatten Faces” context menu. If you select “Unwrap and Flatten”, then all selected faces will be unwrapped (unfolded/unrolled) and laid on the plane chosen in the settings. This happens without distortions becasue individual faces are folded to the same plane. If you select “Smash (project)”, then those faces will be smashed by projection onto the chosen plane (with distortions, of course).

The original geometry is preserved in this process and all resulting geometry is grouped, which makes manipulation easier. See the screenshots and video below for examples.

You can also find this tool in the “Tools” menu (which is where you can access its settings).

Some Tips:

  • For some tips and tricks, read my article Unwrapping and unfolding correctly in SketchUp.
  • Only developable surfaces (e.g. a cylinder) can be cleanly unrolled. This means that if your object has double-curvature (as may be the case for a shell like the one shown in the first image in this post), then this tool can fail because it may be impossible to find a result. Often, however (as in the case of a sphere), this tool will basically “peel” the surface, which may or may not be a useful result.
  • In some cases it is necessary to turn hidden geometry view on (View > Hidden Geometry) before you select any faces.
  • The unwrapping algorithm doesn’t always work automatically. It basically starts at a random face and tries to line up all of the selected faces in a logical pattern (a “string” of faces if you will). If this doesn’t succeed, then it tries a set number of times to get this right. If it still doesn’t work (you get an error or the results don’t look right), re-try with fewer faces in your selection and stitch them manually. Each run is random, so results can vary between tries.
  • The result may have overlapping faces. This happens when the unfolding process folds one face on top of another. In that case, SketchUp will merge those faces. The result may still be usable, but you will likely have to separate the faces by copying and editing. A better approach is to select fewer faces and unwrap the object in segments.
  • To speed up working with this extension, set a keyboard shortcut under SketchUp’s preferences. You can also turn off confirmation dialogs under the settings (see below).
  • You can adjust the settings to your liking (under Tools > Unwrap and Flatten Faces > Settings):
    • Choose the plane onto which the shape will be flattened (ground plane is default).
    • Turn colorizing on to give each unwrapped segment (from selection) a different color (random color assignment).  When this option is disabled (default), the face material is retained.
    • Set the number of iterations for the solution finding process (1000 are default).
    • You can hide the confirmation dialogs (shown by default). Only error dialogs will be shown if hiding is on.
    • You can show all step prompts (hidden by default). Be careful with this setting. It will give you a cinfirmation dialog after each face has been folded.

More Info and Help:

http://www.alexschreyer.net/projects/flatten-faces-plugin/

Reviews

建明 蔡's picture

It's so useful, and save a lot of time, thanks~~

Nice way to Unwrap and Flatten Faces!
Nice article!
http://couppays.com/

nice post thank for sheaing post . http://www.gidindia.in

nice post thank for sheaing post . http://www.gidindia.in

nice post thank for sheaing post . http://www.gidindia.in

nice post thank for sheaing post . http://www.gidindia.in

nice post thank for sheaing post . http://www.gidindia.in

nice post thank for sheaing post . http://www.gidindia.in

nice post thank for sheaing post . http://www.gidindia.in

nice post thank for sheaing post . http://www.gidindia.in

nice post thank for sheaing post . http://www.gidindia.in

nice post thank for sheaing post . http://www.gidindia.in

nice post thank for sheaing post . http://www.gidindia.in

nice post thank for sheaing post . http://www.gidindia.in

nice post thank for sheaing post . http://www.gidindia.in

Thank you very much

DHWANI M's picture

I use sketchup pro 2014 and I am getting an error even doing a simple object like pyramid.

problems with automatc unwrapping (used 1 attempts). Please undo and try again with fewer faces.
Error: undefined method 'definition' for
#

alexschreyer's picture

At this point, the extension only works with SU 2015+.

thank you very much it's very helpful :)

Just downloaded and tried out your unwrap extension. Very nice! I'll be using it for sheet metal fabrication patterns.

Thanks!

Sketchup 2017:

Error: #
C:/Users/micha/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/as_flatten/as_flatten.rb:269:in `add_face'
C:/Users/micha/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/as_flatten/as_flatten.rb:269:in `block in smash_faces'
C:/Users/micha/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/as_flatten/as_flatten.rb:268:in `each'
C:/Users/micha/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/as_flatten/as_flatten.rb:268:in `smash_faces'
C:/Users/micha/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/as_flatten/as_flatten.rb:352:in `block (2 levels) in '
SketchUp:1:in `call'

alexschreyer's picture

Should be fixed in version 2.4.

Gabriel G.'s picture

Hello!
I've been using your plugin for fabric and it works quite well, thank you!!
After flatten I always make a scale model to reshape manually but it works.
I have upgraded to the last version recently, and in this version, after flatten, it doesn't erase the flatten pieces like before, leaving it selected.

Is it possible to install the previous version of the plugin?

Thank you for your help!

alexschreyer's picture

Older versions can be downloaded from my website. However, as of 2.4 you can colorize so you can keep a reference of the pattern.

Vallahi bravo nefis birşey...

Hello
I have installed this extention but can't find it in my toolbar!! what shall i do?

You must limit the number of surfaces that its members want and then press the right mouse button and press the anwrap and faltten faces option

Great, many thanks !... I used it for a cut cylinder (mug shape) and it worked perfectly with camera/standard view/bottom (translatted from french) before unwrapping and flattening.

Rafik A's picture

it does not work with 2014 , just it groups one of faces i did as example with (Dodecahedron) shape .......i explode any grouped shape , but the same resulte

alexschreyer's picture

It just works with SU 2015+.

Kristaps P's picture

Hallo, thank you for your super programm what hepled me a lot befor, but now on new 2017 sketchup its not working anymore, what can I do? I can not export my model to 2016 and I stucked.

alexschreyer's picture

I know about the 2017 issue and will be working on a fix next week. For the time being, you can install SU 2016 besides 2017 and install the extension there. You can then save a SU model to the 2016 version (save as...) and work on it in 2016 before opening it again in 2017.

kelly m's picture

It's wonderful when you find an extension that does exactly what you need. For me, this extension is it. Thank you, alex schreyer.

P.S. Don't you love it when people compalain about something that you've made available to them for FREE! Well, I appreciate it.

alexschreyer's picture

Thanks for your feedback. It's much appreciated!

Hello
getting a blocked message on the plu-in through Extension Warehouse... any thoughts?
Thanks,
Brian Sikes

Fahmi S.'s picture

This extension, when it works, it works wonder. But when it doesn't (like 38/40 times), hoo boy, I really want to pull my hair out. Sorry for complaining.

alexschreyer's picture

I hear you, but to some extent it has to do with what's unfoldable and what is not. Make sure you only select parts of your model that can actually be unfolded, not the entire model. And then progress "strip by strip". With simple geometry, it can unfold entire shapes, however, in one go (see http://alexschreyer.net/sketchup/unwrapped-orange/).

MrShrimpkin .'s picture

Installed it from the extension warehouse but it doesn't work. No options with a right click.

alexschreyer's picture

You might be right-clicking on a group or component. This tool only works on ungrouped faces.

Jesse H's picture

This is incredible. I couldn't be happier to have found a plugin that does exactly as I need. I make many notches in tubing for off-road chassis fabrication and this lays out the notches I draw in SU for perfect weld fitment. I may even find a way for it to work for offset compound bend fitments.

Sky S's picture

This works perfectly for me, however, when I try to export the flattened shape, it exports it in the "view" im using. So if Im looking at a square shape from an isometric viewpoint, it exports a diamond. Is there a way to export the flattened shape so I can use it in 2d software?

Antonio M.'s picture

sky you need, when exporting, set parallel projection and do top view, then minimize your frame of view and then export.

alexschreyer's picture

That is by design. To make sure you are looking "down", for example, switch the camera to parallel projection (camera menu) and pick "top" from the default views. Then export again and all will be straight.

Jarod M.'s picture

Maybe I'm doing this incorrectly, but I can't get SketchUp 2016 to recognize this. Downloaded from the link above (on this page), extracted with 7zip, copied and pasted the folder and .rb file into the Tools folder of SketchUp 2016 and didn't find anything new in the Tools menu. Any help would greatly be appreciated.

EDIT: I had an older .rb file, I think from earlier in 2015, maybe the first version that I didn't successfully delete prior to pasting in the new .rb file. Looks like I didn't overwrite it like I thought I had. FYI for those that may have the same issue I did. Hopefully no one will though.

alexschreyer's picture

The best way to install is actually: in SU go to Window > Extension Warehouse, then browse to this extension, then log in using your Google account. Finally, click on Install and OK any dialogs. That automatically installs the extension and you get update notifications.

You are trying the long way, which also works: Download the RBZ file, then in SU go to Window > Preferences > Extensions Tab. Click on Install Extension... and browse to the RBZ file. No need to copy anything for newer SU versions.

Jarod M.'s picture

Thanks. I'm glad my comment led to this so others will know exactly how to install. Maybe it's not as counter-intuitive to others as it was me. Thanks for the quick response. This extension is amazing.

João's picture

Alex, excellent plugin, thanks for sharing with us!

Would it be very hard to allow a mode where the user select the first face to unwrap?

And what about allowing the user to click on the first face and then the face he wants next and so on!

alexschreyer's picture

Glad to hear you like it. For manual unfolding, look at the Flattery plugin. Just Google it.

Kristian K.'s picture

This is not working on a very simple house shape. Are there other tools available?

alexschreyer's picture

Worked fine for me:
http://screencast.com/t/xcodIalR

It only works on ungrouped faces. Make sure you either explode a group/component or run this within the group/component. If that doesn't solve your issue, send me a picture of your model.

44708 users
Size:
6.74 KB
Version:
Unwrap and Flatten Faces (2.4); August 5, 2017
Number of Views: 
308354
SketchUp Compatibility: 
OS Compatibility: 
Languages: 
Popularity: 
Extensions: 7
I am a Senior Lecturer at the University of Massachusetts and author of the book "Architectural Design with SketchUp". My favorite topics are SketchUp, AEC-CAD/BIM, Wood Engineering, Web Design, and Photography.