sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] Center of Gravity

    Scheduled Pinned Locked Moved Plugins
    183 Posts 41 Posters 297.6k Views 41 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.
    • W Offline
      watkins
      last edited by

      A few useful sites giving densities of building materials etc.

      Link Preview Image
      Mass, Weight, Density or Specific Gravity of Bulk Materials

      Mass, or density, of over 80 different Bulk Materials from bauxite to zinc ore

      favicon

      (www.simetric.co.uk)

      http://www.civl.port.ac.uk/britishsteel/media/BSCM%20HTML%20Docs/Loads%20of%20building%20materials.html

      Link Preview Image
      Density of Wood - The Physics Factbook

      favicon

      (hypertextbook.com)

      Link Preview Image
      Density of Common Building Materials per Cubic Foot

      These values for density of some common building materials were collected from sites across the Internet

      favicon

      (www.rfcafe.com)

      1 Reply Last reply Reply Quote 0
      • W Offline
        watkins
        last edited by

        Forgot to say that TIG's volume calculator (+ density) and CofG calculator give you the complete story when reviewing loads.

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

          Damned another very cool tool for ingeniery โ˜€

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

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

            Vista and SketchUp 7.1.6860 . . .

            Unzip of CoG plugin zip in the plugins folder resulted in a lot of overwrite requests (I just got your Manifold, too). I overwrote the older deBabelizer with the newer one.

            Now on load a "Load Errors" window pops up, saying:

            Error Loading File CofGravity.rb
            undefined method `deBabelizer' for main:Object

            And the plugin does not appear in the Plugin menu.

            I don't know Ruby so I didn't actually poke at anything in the code, nor did I see anything obvious to me.

            Just FYI.

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

              Have you got a file called deBabelizer.rb in the Plugins folder.
              If not then please put a copy of it in there***.
              You must extract all of the files and sub-folders in a zip file keeping their sub-folders etc.
              A good unzip application will do that for you.
              Moving files manually leads to problems as they end up in the wrong place.
              Unzipping directly into Plugins can cause problems as files seemingly overwritten are not !***
              With Vista you are probably best firstly extracting everything into a folder on your Desktop [e.g. 'CofG_1.1'] and then use copy/paste on all of that folder's contents [unchanged], en mass into the Plugins folder...

              ***You are on Vista so I suspect you have some access-right problems with your Plugins folder ๐Ÿ˜’ โ“
              The dreaded 'compatibility files' issue - it looks like you put the file into the folder but Vista 'protects you' by putting it into a parallel 'compatibility folder' so you don't actually get to find it, load it etc as it's not really there...
              So I recommend you change the access-rights to the folder [properties] so you can write to it without problems...
              The deBabelizer.rb file issued with all tools is the same file - you only need one copy in Plugins for any tool that uses it to load and to use it...
              ๐Ÿค“

              TIG

              1 Reply Last reply Reply Quote 0
              • GaieusG Offline
                Gaieus
                last edited by

                Hm. This is a very interesting piece of plugin, TIG; thanks!

                It immediately brings teaching into my mind - as how you can (for instance) explain the different vectors arising in a Gothic structure for instance. It would be (also) interesting to see how these centers of gravity can interact with each other after a structure is assembled.

                Gai...

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

                  Why not put the Xray mode at the end of the process?
                  Because we can't see the CofG when this one is inside a volume ๐Ÿ˜‰
                  Pilou

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

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

                    Here's v1.2 http://forums.sketchucation.com/viewtopic.php?p=229401#p229401
                    with FR lingvo file by Pilou...

                    TIG

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

                      @unknownuser said:

                      Why not put the Xray mode at the end of the process?
                      Because we can't see the CofG when this one is inside a volume ๐Ÿ˜‰
                      Pilou

                      You can't set Xray mode on your own ?
                      Many want just the top SP for lifting, and the weight - so CofG is secondary...
                      If you want it then you can Xray it...

                      Sorry if I sound cranky... long week and tomorrow's Monday [aaargh!] ๐Ÿ˜‰

                      *Vous ne pouvez pas dรฉfinir le mode Xray sur vos propres?
                      Beaucoup veulent juste le SP haut pour le levage, et le poids - donc CofG est secondaire ...
                      Si vous le souhaitez vous pouvez le Xray ...

                      Dรฉsolรฉ si j'ai l'air grognon ... longue semaine et demain lundi [aaargh!];)*

                      TIG

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

                        @gaieus said:

                        Hm. This is a very interesting piece of plugin, TIG; thanks!
                        It immediately brings teaching into my mind - as how you can (for instance) explain the different vectors arising in a Gothic structure for instance. It would be (also) interesting to see how these centers of gravity can interact with each other after a structure is assembled.

                        It came from a PM request for a tool to find the perfect lifting point for a delicate piece of restoration stonework...
                        I added the composite tool to combine the CoG's and SP's of assembles of multiple or varying density units...
                        Any more ideas welcome... ๐Ÿ˜•

                        TIG

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

                          'Composite C of G' is for use only on existing C of G elements - it's used to get a combined C of G for them.
                          If you have an assembly of parts that all have the same density then you can just make one group of all of them and find the C of G of that one group.
                          BUT if you have an assembly of parts of different densities you'll need to find the individual C of G's of each of them: then you select these C of G elements [only these, nothing else] and use the Composite C of G tool on them.
                          You only need to use the Composite C of G tool on the C of G's of parts with different densities that could unexpectedly relocate the assembly's C of G - 'off center' for example... Otherwise group and get the one C of G...

                          TIG

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

                            No problem i can make the Xray mode by hands ๐Ÿ˜‰

                            Another thing
                            Seems "Composite mode" don't works for me ๐Ÿ˜ฎ

                            object goup 1(without CoF), object goup 2(without CoF),
                            group 3 = Group1 + Group 2
                            Find Cof for group3 ok โ˜€

                            object goup 1(with CoF), object goup 2(with CoF)
                            group 3 = Group1 + Group 2
                            Composite group 3 not Ok ๐Ÿ˜ž
                            What I miss?

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

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

                              @unknownuser said:

                              with different densities

                              haaaaaaaa โ˜€
                              THX! ๐Ÿ˜Ž

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

                              1 Reply Last reply Reply Quote 0
                              • C Offline
                                chrisjk
                                last edited by

                                I can't seem to get it to do anything on a Mac..

                                Chris

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

                                  @chrisjk said:

                                  I can't seem to get it to do anything on a Mac..

                                  Please explain a little more...
                                  What can't you get to work ?
                                  Open the Window > Ruby Console.
                                  Select a group or component instance that has a volume - we are trying to find it's C of G !
                                  Run the tool and answer the dialog's questions...
                                  What happens / doesn't happen ?
                                  What are the messages if any in the Ruby Console...
                                  There is nothing different between a PC and a Mac for this tool [except 'PEBCAK' ๐Ÿ˜‰ ]

                                  TIG

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

                                    Error: #<NoMethodError: undefined method db' for CofGravity:Class> /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/CofGravity.rb:153:in calculate'
                                    /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/CofGravity.rb:813

                                    learn from the mistakes of others, you may not live long enough to make them all yourself...

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

                                      I just installed it on my MacBook and tried running it. It worked fine for me. Thank you TIG.

                                      Etaoin Shrdlu

                                      %

                                      (THERE'S NO PLACE LIKE)

                                      G28 X0.0 Y0.0 Z0.0

                                      M30

                                      %

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

                                        @driven said:

                                        Error: #<NoMethodError: undefined method db' for CofGravity:Class> /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/CofGravity.rb:153:in calculate'
                                        /Library/Application Support/Google SketchUp 7/SketchUp/Plugins/CofGravity.rb:813

                                        Have you got deBabelizer.rb in the Plugins Folder ?
                                        This file is for translation and is used by many of my tools and it ships with each of them - although it's always the same file...
                                        It should come with the zip and is installed into the same folder as CofGravity.rb ?
                                        The error is because 'db' which is the local def of deBableizer in the class is failing to get defined...
                                        ๐Ÿ˜•

                                        TIG

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

                                          @tig said:

                                          Have you got deBabelizer.rb in the Plugins Folder ? :?

                                          Hi Tig,

                                          I only installed it to send you a report from another Mac, and am sure I used all of the correct instal procedures.

                                          your other tools are still working (EEby.., Manifold, Vol..2) , after the CofG_1.2 instal (including deBalelizer.rb)

                                          after the first (_1.2) Error, I replaced both files with the _1.1 files and had the same error.

                                          I then tested all in the same drawing
                                          EEby Rail--worked
                                          Volume2 --worked
                                          Manifold --worked
                                          CofG --same error report (-1.2 re-installed from zip)

                                          john

                                          learn from the mistakes of others, you may not live long enough to make them all yourself...

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

                                            driven

                                            A mystery... ๐Ÿ˜• ๐Ÿ˜’

                                            
                                            def CofGravity;;calculate ### LINE 129 ==start of class/def that is reporting the error...
                                            
                                            def db(string)
                                              dir=File.dirname(__FILE__)+"/TIGtools"
                                              toolname="CofGravity" 
                                              locale=Sketchup.get_locale.upcase
                                              path=dir+"/"+toolname+locale+".lingvo"
                                              if not File.exist?(path)
                                                return string
                                              else
                                                deBabelizer(string,path)
                                              end 
                                            end#db
                                            
                                            if (Sketchup.version.split(".")[0].to_i<5)
                                                 UI.messagebox(db("C of G; Sorry, this is Version >= 6 Tool !"))
                                                 return nil
                                            end#if
                                            
                                            model=Sketchup.active_model
                                            entities=model.active_entities
                                            
                                            ############
                                            if Sketchup.version[0,1].to_i > 6
                                              model.start_operation((db("C of G")),true)### LINE 153 GIVES ERROR !!!
                                            
                                            

                                            Can you look at the script's contents and see if it looks like this ?
                                            Works fine on a PC for me - can't see where a Mac might trip up ?
                                            โ“ โ“ โ“

                                            TIG

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

                                            Advertisement