[Plugin] Draw Boundingbox

[Plugin] Draw Boundingbox

Postby thomthom » Sun Jul 04, 2010 11:13 am

Overview
By request: http://forums.sketchucation.com/viewtop ... 23&t=29375

Draws a box from the selected Group/Component. Skewed instances supported.



# CHANGELOG
# 1.1.0 - 04.07.2010
# * Support for 2D instances.
# * Option between Faces or Construction geometry.
# * Processes all groups / components in selection.
# * Changed menu text.
# * Fixed namespace name.



Access
Draw -> Boundingbox
(Supports ThomThom's Menu)



Download

0
Last edited by thomthom on Sat Jan 18, 2014 1:04 pm, edited 1 time in total.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Draw Boundingbox (1.0.0) — 04 July 2010

Postby dedmin » Sun Jul 04, 2010 11:19 am

OOOOhh! The plugin is ready even before think about it!! Big thanks!!

:berserk: :berserk: :berserk: :berserk:
0

dedmin 
 

Re: [Plugin] Draw Boundingbox (1.0.0) — 04 July 2010

Postby dedmin » Sun Jul 04, 2010 11:36 am

Now we can position component's axis where we want on the bounding box and align the Fredo's scale and stretch with the bounding box!!! And easier dimensioning!!

2010-07-04_134830.png
0

dedmin 
 

Re: [Plugin] Draw Boundingbox (1.0.0) — 04 July 2010

Postby simon le bon » Sun Jul 04, 2010 11:55 am

Top Thomthom ! :lol:

and very useful


thank you once more
++simon
0
User avatar
simon le bon 
 

Re: [Plugin] Draw Boundingbox (1.0.0) — 04 July 2010

Postby thomthom » Sun Jul 04, 2010 2:46 pm

So, are the faces not what you will be using? But instead just construction points for the boundingbox edges?

Could easily make it draw the boundingbox with constructions lines and constructions points.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Draw Boundingbox (1.0.0) — 04 July 2010

Postby dedmin » Sun Jul 04, 2010 3:03 pm

Both! But option like this is welcome!! :enlight: :enlight:
0

dedmin 
 

Re: [Plugin] Draw Boundingbox (1.0.0) — 04 July 2010

Postby thomthom » Sun Jul 04, 2010 10:10 pm

Update to 1.1.0

# CHANGELOG
# 1.1.0 - 04.07.2010
# * Support for 2D instances.
# * Option between Faces or Construction geometry.
# * Processes all groups / components in selection.
# * Changed menu text.
# * Fixed namespace name.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby Didier Bur » Sun Jul 04, 2010 10:30 pm

Hi Thomthom,
I was wondering if it is really useful to store options in the registry (read/write_defaults).
Adding more and more reg keys will slow down the computer or not ? What do you think ?
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby thomthom » Sun Jul 04, 2010 10:34 pm

I don't think the overhead of extra registry items is that significant. I'd rather use the registry and the built-in API than to start littering small preference files about and adding extra complexity. Processing many small files also has its overhead.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby thomthom » Sun Jul 04, 2010 10:34 pm

Are there alternatives?
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby dedmin » Mon Jul 05, 2010 12:01 am

:thumb: :thumb: :thumb: :thumb:
0

dedmin 
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby bagatelo » Tue Jul 06, 2010 12:54 pm

Why the boundingbox is not attached with object? Why we cannot make boundingbox with only edges?
0
While the cat's away, the mice will play
User avatar
bagatelo 
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby thomthom » Tue Jul 06, 2010 12:59 pm

bagatelo wrote:Why the boundingbox is not attached with object? Why we cannot make boundingbox with only edges?

No one asked... ;)
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby dedmin » Tue Jul 06, 2010 1:37 pm

thomthom wrote:
bagatelo wrote:Why the boundingbox is not attached with object? Why we cannot make boundingbox with only edges?

No one asked... ;)

Oh yes, please! :bounce: :bounce:
0

dedmin 
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby Ken » Tue Jul 06, 2010 2:43 pm

Thomthom

Designing and fabricating large but still truck-able steel equipment, I find your plugin an easy to use method to determine the width, height and length of each section for the trucking company. You have made it easier to determine how to arrange a load on the truck bed to minimize the requirements for oversize load permits.

Thanks

Ken
0
Government rushes to help the irresponsible and does little for the responsible.
User avatar
Ken 
Premium Member
Premium Member
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby thomthom » Wed Jul 07, 2010 7:18 am

huh - again the simplest of plugins turns out to be of wider usage than I thought. I figured it was a rather obscure request. :)
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby agamemnus » Wed Jul 07, 2010 7:35 am

Very useful for my game -- to center models or stretch them appropriately utilizing the length/width/height ratios. Thank you.
0

agamemnus 
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby pilou » Wed Jul 07, 2010 7:47 am

That can be used for packaging too ;)

Next step will be optimisation of placement of some objects for minimize the Bounding box ;)
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby Ken » Wed Jul 07, 2010 12:37 pm

Pilou wrote:That can be used for packaging too ;)

Next step will be optimisation of placement of some objects for minimize the Bounding box ;)


Now, that would be very useful.

Ken
0
Government rushes to help the irresponsible and does little for the responsible.
User avatar
Ken 
Premium Member
Premium Member
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby Ben Ritter » Wed Jul 07, 2010 3:27 pm

Thanks for sharing :enlight:
0

Ben Ritter 
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby mitcorb » Wed Jul 07, 2010 3:50 pm

@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?
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby thomthom » Wed Jul 07, 2010 4:05 pm

Nope - it just uses the corner of the boundingbox SketchUp provides.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby Gaieus » Thu Jul 08, 2010 12:46 pm

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.
0
User avatar
Gaieus 
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby TIG » Thu Jul 08, 2010 12:52 pm

Couldn't you simply make a temporary group of all selected and then get the bounds of that?
Code: Select all
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...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby thomthom » Thu Jul 08, 2010 12:56 pm

hm... I thought I had some message system that warned about no valid selection. Must have accidentally removed it as I rewrote it
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby Gaieus » Thu Jul 08, 2010 12:57 pm

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...
0
User avatar
Gaieus 
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby thomthom » Thu Jul 08, 2010 12:57 pm

TIG wrote:Couldn't you simply make a temporary group of all selected and then get the bounds of that?
Code: Select all
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.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby thomthom » Thu Jul 08, 2010 12:58 pm

Gaieus wrote: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.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby Gaieus » Thu Jul 08, 2010 12:59 pm

OK, I'll stop nagging you now...
;)
0
User avatar
Gaieus 
 

Re: [Plugin] Draw Boundingbox (1.1.0) — 04 July 2010

Postby cmeed » Fri Dec 10, 2010 8:30 pm

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
0
User avatar
cmeed 
Premium Member
Premium Member
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: kaldonado, karinnectleal and 10 guests

Visit our sponsors: