sketchucation logo sketchucation
    • Login
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Report face surface

    Scheduled Pinned Locked Moved Plugins
    26 Posts 6 Posters 1.5k Views 6 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.
    • Didier BurD Offline
      Didier Bur
      last edited by

      My 2 cents:
      This one will output the same TSV file as TIG's, but sorted by orientation, adds a sub-total per orientation and a general total at the end.

      afflitto, non parlo italiano πŸ˜„

      Enjoy!


      RelazioneFacceSortedTotal.zip

      DB

      1 Reply Last reply Reply Quote 0
      • F Offline
        flyman
        last edited by

        I could NEVER expect a so "fast-in-make" and "match-to-my-desire" script! 😍

        You can't imagine how many hour I can earn by this script... Much, much thanks to TIG and to DidierBur!

        This script-making-story has interested me in Ruby. It is difficult to learn? Because I had 20 years old a good experience in Autolisp (programming language for Autocad).
        And, abusing of you time and kindness, are there any Ruby's manual-tutorial? πŸ˜†

        Another thanks to everybody!
        flyman

        1 Reply Last reply Reply Quote 0
        • Didier BurD Offline
          Didier Bur
          last edited by

          Hi,
          I also had long time ago some experience with Autolisp and learned to program with it.
          Some books including tutorials can be found here: http://rhin.crai.archi.fr/rld/automatic_SketchUp.php
          some links here: http://rhin.crai.archi.fr/rld/links_ruby_sites.php
          some plugins links here:http://rhin.crai.archi.fr/rld/links_plugins_sites.php
          and last but not least: http://forums.sketchucation.com/viewtopic.php?f=180&t=10142
          If you have some knowledge in Autolip and OO programming, Ruby is quite easy to learn (IMHO).
          Regards,

          DB

          1 Reply Last reply Reply Quote 0
          • L Offline
            ledisnomad
            last edited by

            I'm always amazed at how quickly questions and requests get answered here at SketchUcation!

            This script, modified a little, is serving me well as a way to get the areas of my master plan models. However, not being familiar with Ruby, yet, I wonder what it would take to do the following: sum the area each material.

            To put it another way, I'd like a report that reads:
            There is 460.33sf of material 01.
            There is 230.15sf of material 02.
            etc.

            And it would have to work with groups and components and exclude back-faces... that's the part that makes me hesitate to try to do it myself, not knowing Ruby, yet. What do y'all think?

            1 Reply Last reply Reply Quote 0
            • Didier BurD Offline
              Didier Bur
              last edited by

              Hi,
              Actually you can select a face with some material, then right-click and choose 'select all with same material', then display the 'entity info' window where you'll get the corresponding area. But that's a manual process.
              aaa.gif
              I think it will be a good starting idea for you to learn Ruby. Download some scripts related to materials and start from them.

              DB

              1 Reply Last reply Reply Quote 0
              • L Offline
                ledisnomad
                last edited by

                The select all with same material only works in the current context, not in components and groups, but thanks for the suggestion.

                1 Reply Last reply Reply Quote 0
                • Didier BurD Offline
                  Didier Bur
                  last edited by

                  Here is a quick script that sums areas by material. It doesn't dig into groups or comps.


                  areas_mats.zip

                  DB

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

                    To find areas of materials inside groups/components... [pseudo-coded]

                    txt=""
                    model.definitions.each{|defn|
                      insts=defn.instances
                      num=insts.length
                      next if num==0
                      mats=[]
                      defn.entities.each{|e|
                        next if not e.class==Sketchup;;Face
                        mats << [e.material, e.area] 
                      }
                      txt << num.to_s+"\n"
                      mats.each{|m| txt << m[0]+","+m[1]+"\n" }
                    }
                    ###...
                    puts txt
                    

                    and so on to assemble a list of materials with areas within definitions. multiply by 'num' to get total area of all instances of each definition etc etc...........

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • Didier BurD Offline
                      Didier Bur
                      last edited by

                      @unknownuser said:

                      multiply by 'num' to get total area of all instances
                      Not that simple, don't forget that instances can be scaled...

                      DB

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

                        @didier bur said:

                        @unknownuser said:

                        multiply by 'num' to get total area of all instances
                        Not that simple, don't forget that instances can be scaled...
                        I realize that but he has to start somewhere πŸ˜’

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • L Offline
                          ledisnomad
                          last edited by

                          This is great. Thanks everybody! Definitely a start that I can work with. At the moment, I don't need to worry about scaled instances of components, so I'll be able to use this and expand it's functionality as I need it. Thank you everybody.

                          1 Reply Last reply Reply Quote 0
                          • B Offline
                            byrnebm
                            last edited by

                            These scripts are very useful. However, I am wondering if it is possible to go further with this to help me with what I use sketchup for. I draw a 3d floor plan of a house which is basically just lots of boxes/rooms adjoining each other. For each room I need the area of each wall and its orientation. However the orientation is from the perspective of being inside that room. So say I am inside the room and I am looking at the wall in question, the orientation of the wall is basically the direction I am facing, for example North. If I was in the room adjoining and am now looking at the same wall but from the other side of it, the orientation is now the opposite direction ie south. These scripts dont quite cater for this and I am wondering if it is even possible to make such a script. So when i click on one side of a wall its orientation is one direction but if I click on the other side of it, its orientation is the opposite direction.

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

                            Advertisement