Unwrap and Flatten Faces Extension for SketchUp

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

Flattening a shell in segments

Description

flatten-icon-512This 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:

  • 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.
  • 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).
    • Set the number of iterations for the solution finding process (1000 are default).
    • You can hide the confirmation dialog (shown by default).
    • 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.

Screenshots and Videos

Downloads

You can now find this SketchUp extension in Trimble’s Extension Warehouse. For an easy install (and update notifications), browse to it from inside SketchUp (2013 or newer) and install it directly.

Alternative Downloads

Download “Flatten Faces Plugin (RBZ)” as_flatten_2-3.rbz – Downloaded 4549 times – 6 KB

Download “Flatten Faces Plugin (ZIP)” as_flatten_2-3.zip – Downloaded 4589 times – 5 KB

To install these files, follow the SketchUp folks’ instructions. You can also find this extension on GitHub.

Revision History

  • Version 2.3 (12/12/2016):
    – Fixed coplanar face bug
  • Version 2.2 (12/9/2016):
    – Fixed loader code
    – Code cleanup
    – Fixed problem with SU 2017
    – New settings dialog: show/hide dialogs, set iterations, target plane
    – Better unwrapping algorithm, handles larger items now
    – Original geometry is now always preserved (results in grouped copy)
    – New tool to smash (project) faces to axis plane
    – End statistics and feedback added to unwrapping tool
  • Version 2.1 (2/22/2015):
    – Added Tools menu item to remove confusion
    – Added statusbar feedback (important for larger models)
    – Added Help submenu item
    – Code cleanup
    – Fixed SU 8 bug with array.count
  • Version 2.0 (1/27/2015):
    – Added functionality to automatically unwrap non-coplanar faces first
  • Version 1.0 (2/12/2014):
    – First release
  • guisasso

    Thank you sir!

  • Stas Teverovsky (Adrihal)
    • There is a possibility of creating overlapping faces in the result (as you got) with the new method. Best to unwrap the lower box and then the upper box separately. I could implement the old functionality (not grouping the result) as an option in the next version. Let me think about that.

      • Stas Teverovsky (Adrihal)

        The first version of the plugin was almost perfect!
        If possible, allow to specify the sequence that surfaces.
        And on surfaces indicate the name of each deployed plane
        On the scan it is advisable to see the name of the plane, so you can collect the product
        Checked or it works with color-

        2016-12-10 12:23 GMT+02:00 Stas Teverovsky :

        • I think I understand what you mean. This happens already if you select only some unrollable surfaces and then Flatten the object in sections.

      • Stas Teverovsky (Adrihal)

        The first version of the plug-in was almost perfect!
        If possible, allow to specify a sequence of deployable surfaces.
        And on the surface indicate the name of each deployable plane
        On the scan, it is desirable to see the name of the plane, so then it was possible to collect the product
        Checked or it works with color – it! But the best was to the name or number

        2016-12-10 12:24 GMT+02:00 Stas Teverovsky :

  • I just updated the Unwrap and Flatten extension to version 2.2. please update especially if you are on SU 2017.

  • SandBagSix

    SU 2016 is calling this an Unidentified Extension which I find it hard to believe since it came from the Extension Warehouse. It also said it needed access to the computer’s file system, am I missing something?

  • JasonR704

    Hello Alexander, I have downloaded your extension and tried to flatten out this curved design, but I’m having a very difficult time. I’d be happy to pay for your help!

    The use case for this design is that of a miniaturized hot air balloon. I will need to flatten this design and then cut a pattern which will be used to create many identical pieces of fabric that will then be sewn together.

    Very curious to know how to do this! Thank you in advance for any assistance you can lend.

    • In principle what you have here is a double-curved surface, which as such can’t be flattened without distortion. You can select vertical or horizontal “strips” of faces and then flatten those with my extension. That will give you cut patterns for fabric that you can stitch together. However, it assumes that you are not using flexible material that can actually stretch. Therefore such an approach is best when using sheet metal or heavy-material (e.g. if this were a full-size hot-air balloon. Because you are just making a smaller balloon, try flattening it in strips and then make an educated guess as to the outline that you are getting. when you cut that and stitch it back together, then you should be close enough.

      • JasonR704

        I’ll give that a try and see how it turns out. Thanks so much for responding back, really appreciate an expert willing to help us out!

  • Gennaro Langella

    Thank you very much!

    It helped me A LOT!

  • Thomas Asmuth (kidNeutrino)

    This looks very cool, thank you for sharing. I have 2015 Pro and it isn’t allowing me to select complex objects. Any suggestions? Did I miss a step?

    • Thomas Asmuth (kidNeutrino)

      Restart of the program got it working correctly. :) Thanks again.

  • ijpelaar

    I have tryed it for a horn flare, but it is 2,2244603 cm to short when flatten. I need two digid precision here. so 2,22 rest is not important.

    Maybe I do something wrong, do work fine for the rest,..

    regards

    • Can you upload an image in a comment that shows this? Not sure why it shouldn’t be exact.

      • ijpelaar

        I do put it on photobucket tonight. the lengt is in bend form 60,9 cm and flatten 58,7 cm I do also not now why, a other bend program did different, I can also send the sketchup design itself so you can test it.

  • Albert

    ad. previous comment was based on the 2013-version of Sketchup, now I updated Sketchup and the plugin works fine. Thank you for the plugin, I think it is very useful.

  • Albert

    On my computer it only works with one face. If I choose more than one face the plugin doesn’t do anything.

    • Thomas Asmuth (kidNeutrino)

      I have the same issue; could it be it isn’t playing nice with 2015?