sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] Flatten and Extrude

    Scheduled Pinned Locked Moved Plugins
    46 Posts 11 Posters 38.9k Views 11 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • thomthomT Offline
      thomthom
      last edited by thomthom

      Overview
      I often get tasks to model terrain and context buildings for project we do. It's dog boring work!
      Today when I got a new such project with a large plan I thought there had to be a better way to do most of this repetitive work. So I wrote a crude script to lessen some of my burden.

      The purpose of this script was just to get the bulk work done. Don't expect any magic from it.

      Note: Result will vary from the quality of the lines you feed it. I've just mocked this up to get a job done - so the UI is crude. I want to get back to this later and provide a better interface. But until them; this is it.

      Menus: Plugins->Flatten->...

      Functions
      Flatten
      (Only takes a single group or component as input at the moment, sorry.)
      Creates a new group where all the edges in the selected Group or Component is projected down to the Ground (Elevation 0).
      Flatten-Flatten.png

      Flatten and Extrude
      (Only takes a single group or component as input at the moment, sorry.)
      Same as flatten, but it then tries to extrude the faces back up to the lowest/highest point above it.

      Note that there is a layer filter where the plugin will only use the edges on layers containing that filter. The filter is a series of strings separated by | (pipe character).

      (Yes, I know. The settings isn't persistent. Will see if I can get around for a quick update for that later. Until then - modify line 120 yourself.)
      Flatten-Extrude.png

      Smart People!
      Does anyone have any idea of how to generate roofs? Not generic roofs, but ones that fit the roof edges.

      Link Preview Image
      SketchUp Plugins | PluginStore | SketchUcation

      SketchUp Plugin and Extension Store by SketchUcation provides free downloads of hundreds of SketchUp extensions and plugins

      favicon

      (sketchucation.com)


      Cookieware.png

      Thomas Thomassen β€” SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • R Offline
        remus
        last edited by

        For the roofs, perhaps have a look at TIGs roof script. I imagine itd be fairly easy to filter all the horizontal faces that have some z then apply TIGs roof stuff to it with some generic/random values plugged in (depending on what sort of results your after.)

        http://remusrendering.wordpress.com/

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          @remus said:

          For the roofs, perhaps have a look at TIGs roof script. I imagine itd be fairly easy to filter all the horizontal faces that have some z then apply TIGs roof stuff to it with some generic/random values plugged in (depending on what sort of results your after.)

          @thomthom said:

          Does anyone have any idea of how to generate roofs? Not generic roofs, but ones that fit the roof edges.
          πŸ˜‰

          Making generic roofs is the current work around. But being able to produce roofs from the CAD lines would be really cool. I don't expect perfect roofs, but at least some approximation.

          One possible alternative would be to get the height of the roof from the CAD lines and make a generic roof from that...

          Thomas Thomassen β€” SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • R Offline
            remus
            last edited by

            😳

            http://remusrendering.wordpress.com/

            1 Reply Last reply Reply Quote 0
            • thomthomT Offline
              thomthom
              last edited by

              No worries! πŸ˜„ πŸ˜‰

              Thomas Thomassen β€” SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • D Offline
                dtrarch
                last edited by

                TT

                How about using TIG's Height/datum tool to set Z with your new tool.
                Hmmm?

                dtr

                1 Reply Last reply Reply Quote 0
                • thomthomT Offline
                  thomthom
                  last edited by

                  @dtrarch said:

                  TT

                  How about using TIG's Height/datum tool to set Z with your new tool.
                  Hmmm?

                  dtr

                  Set Z? What you mean?

                  Thomas Thomassen β€” SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

                  1 Reply Last reply Reply Quote 0
                  • TIGT Offline
                    TIG Moderator
                    last edited by

                    My Datum tool sets a 'Z' datum in your model [as an attribute] so when z=0 z_datum=123.456m or whatever. Then you use the tool to add text to refer to a point so that floors or points on an elevation etc are given their corrected height above 'datum', rather than z=0...

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      Ok - but how does that relate to this plugin? (I'm confused...)

                      Thomas Thomassen β€” SketchUp Monkey & Coding addict
                      List of my plugins and link to the CookieWare fund

                      1 Reply Last reply Reply Quote 0
                      • TIGT Offline
                        TIG Moderator
                        last edited by

                        I surmise he means instead of flattening everything to z-o allow you to set it to flatten to z=123.456m. Easy done as it's in a group - flatten all to z=0 end with an option to enter a new z or pick a point and move the flattened group up/down to suit the desired z ???

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • thomthomT Offline
                          thomthom
                          last edited by

                          @tig said:

                          flatten all to z=0 end with an option to enter a new z or pick a point and move the flattened group up/down to suit the desired z ???

                          That would move the top above the lines it extrudes up to. But it's just as easy to just to flatten down to a given Z level.

                          Anyway - thanks for clearing that up. Will see if I'll be adding that in the future.
                          Btw, does your Z-Level plugin expose the Z Height publicly? Wondering if I can read the value and use that as default if present.

                          Thomas Thomassen β€” SketchUp Monkey & Coding addict
                          List of my plugins and link to the CookieWare fund

                          1 Reply Last reply Reply Quote 0
                          • TIGT Offline
                            TIG Moderator
                            last edited by

                            Frankly I'd keep them separate...

                            TIG

                            1 Reply Last reply Reply Quote 0
                            • pilouP Offline
                              pilou
                              last edited by

                              Flat land πŸ˜‰

                              Frenchy Pilou
                              Is beautiful that please without concept!
                              My Little site :)

                              1 Reply Last reply Reply Quote 0
                              • thomthomT Offline
                                thomthom
                                last edited by

                                @unknownuser said:

                                Flat land πŸ˜‰

                                Someone's been snooping in the code, eh? πŸ˜„ It just so happened to be the last book I read. πŸ€“

                                Thomas Thomassen β€” SketchUp Monkey & Coding addict
                                List of my plugins and link to the CookieWare fund

                                1 Reply Last reply Reply Quote 0
                                • K Offline
                                  kwistenbiebel
                                  last edited by

                                  Nice idea thomthom. Things are busy now, but I will try the plugin in depth at the weekend.
                                  For architects this is extremely useful!
                                  Now I don't have to ask the Rhino guy to do it for me and to import it in SU πŸ˜‰

                                  By the way,
                                  I love the CookieWare idea! Whenever you're in Australia, please drop by for a beer... πŸ˜„

                                  1 Reply Last reply Reply Quote 0
                                  • D Offline
                                    dtrarch
                                    last edited by

                                    I yield πŸ‘Š
                                    Just thought that muli-level flat and extrude might be a possible for structural elements and such.

                                    tt many thanks in any case β˜€

                                    dtr

                                    1 Reply Last reply Reply Quote 0
                                    • utilerU Offline
                                      utiler
                                      last edited by

                                      @kwistenbiebel said:

                                      Nice idea thomthom. Things are busy now, but I will try the plugin in depth at the weekend.
                                      For architects this is extremely useful!
                                      Now I don't have to ask the Rhino guy to do it for me and to import it in SU πŸ˜‰

                                      By the way,
                                      I love the CookieWare idea! Whenever you're in Australia, please drop by for a beer... πŸ˜„

                                      Some nice boutique breweries over there, kwist......
                                      After you've had a few beers with kwist, Thom fly across the other side of the country and I'll shout you a few also!!! πŸ‘

                                      purpose/expression/purpose/....

                                      1 Reply Last reply Reply Quote 0
                                      • thomthomT Offline
                                        thomthom
                                        last edited by

                                        @kwistenbiebel said:

                                        Now I don't have to ask the Rhino guy to do it for me and to import it in SU πŸ˜‰

                                        Rhino has a function like this??

                                        Thomas Thomassen β€” SketchUp Monkey & Coding addict
                                        List of my plugins and link to the CookieWare fund

                                        1 Reply Last reply Reply Quote 0
                                        • thomthomT Offline
                                          thomthom
                                          last edited by

                                          @dtrarch said:

                                          I yield πŸ‘Š
                                          Just thought that muli-level flat and extrude might be a possible for structural elements and such.

                                          tt many thanks in any case β˜€

                                          dtr

                                          Multi-level flat and extrude? Could you care to explain more what you got in mind?

                                          Thomas Thomassen β€” SketchUp Monkey & Coding addict
                                          List of my plugins and link to the CookieWare fund

                                          1 Reply Last reply Reply Quote 0
                                          • G Offline
                                            gavvy
                                            last edited by

                                            thomthom
                                            πŸ˜’
                                            I tride this plugin .The groups in the group can't be faltten
                                            Is it a better idea to flatten the group in group,and hold the group of faces?

                                            to build a city ,i always use clf_greeble_2.rb πŸ˜„

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 1 / 3
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement