sketchucation logo sketchucation
    • Login
    ๐Ÿค‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    [Plugin] Draw Boundingbox

    Scheduled Pinned Locked Moved Plugins
    39 Posts 18 Posters 31.2k Views 18 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.
    • mitcorbM Offline
      mitcorb
      last edited by

      @ThomThom:
      Just out of curiosity, is the bounding box you create even distantly related to the method of producing a convex hull--or is this even relevant?

      I take the slow, deliberate approach in my aimless wandering.

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

        Nope - it just uses the corner of the boundingbox SketchUp provides.

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

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

          Hi Thom,

          Great plugin (again) but blah-blah... you know that.

          I have noticed however that it can be launched when only primitive geometry (i.e. no group/component) is selected then I can even tell the plugin to create a bounding box but of course nothing happens.

          Of course, I know why this is happening ("not" happening) so not too big problem but maybe some warning dialog would be best so that users do not get confused.

          Gai...

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

            Couldn't you simply make a temporary group of all selected and then get the bounds of that?

            ents=model.active_entities
            ss=model.selection
            enta=ss.to_a
            gp=ents.add_group(enta)
            bb=gp.bounds
            ### store that data
            gp.explode
            ### make the bbox
            ss.add(enta)
            ### OR whatever...
            

            TIG

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

              hm... I thought I had some message system that warned about no valid selection. Must have accidentally removed it as I rewrote it

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

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

                I do not mean to create a bounding box for loose geometry - what for? - it's just for other users to avoid confusion.

                Also, how about an option that the bounding box is inside/outside of the group/component? (Would be easier to move them together with just one click selection). Of course, in this case there would be the risk of loose geometry merging inside...

                Gai...

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

                  @tig said:

                  Couldn't you simply make a temporary group of all selected and then get the bounds of that?

                  ents=model.active_entities
                  > ss=model.selection
                  > enta=ss.to_a
                  > gp=ents.add_group(enta)
                  > bb=gp.bounds
                  > ### store that data
                  > gp.explode
                  > ### make the bbox
                  > ss.add(enta)
                  > ### OR whatever...
                  

                  I could just add up the bounds from all the "loose" geometry.

                  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

                    @gaieus said:

                    Also, how about an option that the bounding box is inside/outside of the group/component? (Would be easier to move them together with just one click selection). Of course, in this case there would be the risk of loose geometry merging inside...

                    I was thinking adding to the input box:

                    Option to group the generated geometry
                    Option to generate the geometry inside the components they represent.

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

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

                      OK, I'll stop nagging you now...
                      ๐Ÿ˜‰

                      Gai...

                      1 Reply Last reply Reply Quote 0
                      • cmeedC Offline
                        cmeed
                        last edited by

                        I just downloaded this plugin and its a very useful addition, I'm using it, thanks to 'dedmin's recommendation for use with Layout. Its difficult sometimes to use the dimensioning tool in LO on rounded or odd shaped geometry. this tool certainly helps! Thank you

                        grouping the resulting boundary box would make a great simple plugin more streamlined. if at all possible.... please ... maybe

                        1 Reply Last reply Reply Quote 0
                        • A Offline
                          agamemnus
                          last edited by

                          I noticed that if I rotate some objects and use this plugin, the bounding box will use the rotated boxes of these other objects... any way to perhaps get the real limits of the object set instead of using their (inaccurate) bounding box without having to explode everything?


                          ahh3.png

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

                            There probably is, but I'm not sure how. This plugin is very simple designed specifically to use the boundingbox.

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

                            1 Reply Last reply Reply Quote 0
                            • EarthMoverE Offline
                              EarthMover
                              last edited by

                              I missed this useful plugin the first time around. Thanks to Rich for pointing me here and of course thanks to ThomThom for another brilliant tool! ๐Ÿ‘

                              3D Artist at Clearstory 3D Imaging
                              Guide Tool at Winning With Sketchup
                              Content Creator at Skapeup

                              1 Reply Last reply Reply Quote 0
                              • J Offline
                                John_C
                                last edited by

                                Thanks for this great little plugin Thomthom, it's allowed me to reset the axis on an irregular component that inherited from someone else's model.

                                I'm not sure how often I'll use it, but it's great to know about all of your cookie ware plugins, thanks ... ๐Ÿ‘

                                1 Reply Last reply Reply Quote 0
                                • A Offline
                                  AISmebel
                                  last edited by

                                  Hello dear thomthom. Can I ask you to make a small edit to your plugin for me so that it puts construction points not only at the outer corners, but also in the center of the construction lines. For your understanding, I will attach a picture. (Additional points I built using AAV) Additional points help to move or position rounded objects. Thank you.


                                  1.jpg

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

                                    Hi AISMebel,

                                    Below is what you can do:
                                    Browse your disk to your Plugins folder to find a sub-folder named 'tt_draw_bb'

                                    • open the file 'core.rb' in that folder (using a'pure' text editor)
                                    • find line #118
                                    • add the following line:
                                    ents.add_cpoint( Geom;;Point3d.linear_combination(0.5, face[0], 0.5, face[1]))
                                    
                                    • save the core.rb file and restart SketchUp.

                                    line_to_add.jpg
                                    click to see if it works ;-)

                                    DB

                                    F A 2 Replies Last reply Reply Quote 0
                                    • Dave RD Offline
                                      Dave R
                                      last edited by

                                      @didier bur said:

                                      Below is what you can do

                                      What a nice addition to Thom Thom's valuable plugin. I didn't know I needed that until now. Thanks. And I hope TT doesn't mind.

                                      Etaoin Shrdlu

                                      %

                                      (THERE'S NO PLACE LIKE)

                                      G28 X0.0 Y0.0 Z0.0

                                      M30

                                      %

                                      1 Reply Last reply Reply Quote 0
                                      • F Offline
                                        FlorinAp @Didier Bur
                                        last edited by

                                        @Didier-Bur Your text code is wrong (different than the one from your picture) - the one from your picture is correct.!
                                        Thank you anyway - it worked, after an error from SU 2024, I figured it out.!

                                        1 Reply Last reply Reply Quote 1
                                        • A Offline
                                          AISmebel @Didier Bur
                                          last edited by AISmebel

                                          @Didier-Bur Hi. Thanks a lot, everything worked out. I was a little late thanking you, I completely forgot that I asked for help))
                                          I also added the option to move the "Bounding Box" to a separate layer, which proved to be very useful.

                                          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