sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    Mac User? | Join the Rayscaper Beta for Mac Learn More

    [request] Polygon count plugin

    Scheduled Pinned Locked Moved Plugins
    14 Posts 8 Posters 7.4k Views 8 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.
    • ken28875K
      ken28875
      last edited by

      Hello guys,

      @ TIG: What the hell are you talking about??? ❓ LOL

      @ Rich: I want to see the polygon count right in Sketchup so I don't have to export back and forth between 2 programs.

      @ Jeff: I agree with you. LOL πŸ˜„

      Thanks,

      _KN

      Follow Your Dreams.

      1 Reply Last reply
      Reply Quote 0
      • Chris FullmerC
        Chris Fullmer
        last edited by

        Currently you can get a full face and edge count. But you want a little more than that, is that what your asking? You would like too see specifically tri faces and quad faces only? What about faces that are mor than quad faces?

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply
        Reply Quote 0
        • ken28875K
          ken28875
          last edited by

          @chris fullmer said:

          Currently you can get a full face and edge count. But you want a little more than that, is that what your asking? You would like too see specifically tri faces and quad faces only? What about faces that are mor than quad faces?

          Hi Chris,

          Yes, something similar to this in Maya:

          http://i593.photobucket.com/albums/tt12/ken28875/Sketchup/Maya_polycount.jpg

          You said we currently are able to see a full face and edge count. How do you do it?

          Thank you,

          _KN

          Follow Your Dreams.

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

            Copy+paste this into a file called facecount.rb in the Plugins folder

            def facecount()
              num=0
              model=Sketchup.active_model
              ss=model.selection
              if ss[0]
                ents=ss.to_a
              else
                ents=model.entities.to_a
              end#if
              defs=model.definitions
              ents.each{|e|num=num+(1)if e.class==Sketchup;;Face}
              defs.each{|d|
                d.entities.each{|e|
                  n=d.instances.length
                  num=num+(1*n)if e.class==Sketchup;;Face
                }
              }
              if ss[0]
                puts "Faces in Selection ="
              else
                puts "Faces in Model+Definitions ="
              end#if
              return num
            end#def
            

            To run type facecount in the Ruby Console - it prints the count of faces.

            Copy+paste this into a file called tricount.rb in the Plugins folder

            def tricount()
              num=0
              model=Sketchup.active_model
              ss=model.selection
              if ss[0]
                ents=ss.to_a
              else
                ents=model.entities.to_a
              end#if
              defs=model.definitions
              ents.each{|e|num=num+(e.vertices.length-2)if e.class==Sketchup;;Face}
              defs.each{|d|
                d.entities.each{|e|
                  n=d.instances.length
                  num=num+((e.vertices.length-2)*n)if e.class==Sketchup;;Face
                }
              }
              if ss[0]
                puts "Potential Triangular-Faces in Selection ="
              else
                puts "Potential Triangular-Faces in Model+Definitions ="
              end#if
              return num
            end#def
            

            To run type tricount in the Ruby Console -

            it prints the count of potential triangulated-faces [even if they currently have more vertices].

            These count all faces in the model and in instances, groups and images...

            TIG

            1 Reply Last reply
            Reply Quote 0
            • Chris FullmerC
              Chris Fullmer
              last edited by

              You can open the Model Info dialog box and it shows edge and face count. Go to Window > Model Info and click on the "statistics" tab. Then make sure you have the statistics set to "Entire Model" and turn on the "Show Nested Components" checkbox. Then it will show you a good bit of info.

              Chris

              Lately you've been tan, suspicious for the winter.
              All my Plugins I've written

              1 Reply Last reply
              Reply Quote 0
              • ken28875K
                ken28875
                last edited by

                Thanks TIG and Chris.

                Have a good weekend.

                _KN

                Follow Your Dreams.

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

                  The Plugin Index is your friend: http://forums.sketchucation.com/viewtopic.php?f=323&t=28782

                  Counttriangles.rb by Eleandor
                  http://forums.sketchucation.com/viewtopic.php?t=16843

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

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

                    @thomthom said:

                    The Plugin Index is your friend: http://forums.sketchucation.com/viewtopic.php?f=323&t=28782
                    Counttriangles.rb by Eleandor
                    http://forums.sketchucation.com/viewtopic.php?t=16843

                    Knew I'd see it somewhere! πŸ˜’

                    TIG

                    1 Reply Last reply
                    Reply Quote 0
                    • ArisA
                      Aris
                      last edited by

                      Hi all,
                      on a similar topic, it would be great to be able to select a group or component and be able to see statistics just for this specific object.
                      I am working with heavy scenes and cooperating with other people, and sometimes I have to deal with garbage models within the scene
                      (it is not uncommon to have a flower pot in some obscure corner that takes up half of the scene's file size)

                      Not a native speaker, point out my spelling (or other) mistakes, I won't be offended!!!

                      1 Reply Last reply
                      Reply Quote 0
                      • srxS
                        srx
                        last edited by

                        Even more, it would be nice to have a plugin which helps in optimizing SU model by marking groups and components with colors according to their polygon count. πŸ’š
                        ...
                        and than gives an option to reduce them πŸ˜„ (useful for making proxies also) πŸ’š

                        www.saurus.rs

                        1 Reply Last reply
                        Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better πŸ’—

                        Register Login
                        • 1 / 1
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement