[Plugin] jf_get_dimensions.rb

[Plugin] jf_get_dimensions.rb

Postby Jim » Tue Jun 08, 2010 12:20 am

This simple plugin displays the dimensions (width, length, depth) of a selected Group or Instance.

Unlike the BoundingBox dimensions, the dimensions are correct even when the object is rotated and scaled. Units are displayed in the model units.

(Width, Height, Depth) correspond to the object's (X, Y, Z) dimensions.

Menu: Plugins / jf Get Dimensions

405.png


reference: viewtopic.php?f=323&t=28842
0
Hi

Jim 
Global Moderator
 

Re: [Plugin] jf_get_dimensions.rb

Postby Jim » Tue Jun 08, 2010 12:54 am

I like what this does, but menus are so clunky. Can anyone envision an interface that is fast yet non-intrusive?

What about a small, button-size webdialog that activates on an onMouseOver event? No clicking, just activates as you pass your mouse over it.

Or maybe on the other end of the spectrum, a complete alternative to the Entity Info window, but with much more information?
0
Hi

Jim 
Global Moderator
 

Re: [Plugin] jf_get_dimensions.rb

Postby thomthom » Tue Jun 08, 2010 7:15 am

Entity Into window with collapsible sections of data.
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] jf_get_dimensions.rb

Postby Dave R » Tue Jun 08, 2010 2:17 pm

Jim, I didn't know I needed this plugin but it is very useful. Although I assigned a keyboard shortcut to it, I like your idea of mouseover so you don't have to reactivate the tool for each component.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] jf_get_dimensions.rb

Postby thomthom » Tue Jun 08, 2010 2:25 pm

Yesterday I hacked the Query tools that comes with SU to display the .bounds dimension for the entity you hover over by request from someone at my office.

Both a query tool that display info on screen and an enhanced Entity Info window has its uses.

What if you have this Entity Info++ window, where at each section you also have a checkbox. That checkbox controls what info you get on screen with Query Tool++.
:?: :idea:
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] jf_get_dimensions.rb

Postby dedmin » Tue Jun 08, 2010 2:38 pm

This is the most used plugin in my toolbox - assigned shortcut "N" to it! Thanks again Jim for improving it!! :bounce: :bounce:
0

dedmin 
 

Re: [Plugin] jf_get_dimensions.rb

Postby dedmin » Tue Jun 08, 2010 2:51 pm

thomthom wrote:Yesterday I hacked the Query tools that comes with SU to display the .bounds dimension for the entity you hover over by request from someone at my office.

Both a query tool that display info on screen and an enhanced Entity Info window has its uses.

What if you have this Entity Info++ window, where at each section you also have a checkbox. That checkbox controls what info you get on screen with Query Tool++.
:?: :idea:


The same problem with components not aligned to the world axes as the old Get Dimensions plugin:

2010-06-08_164546.jpg
0

dedmin 
 

Re: [Plugin] jf_get_dimensions.rb

Postby thomthom » Tue Jun 08, 2010 2:58 pm

ah! oops!
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] jf_get_dimensions.rb

Postby Ben Ritter » Tue Jun 08, 2010 5:02 pm

Jim, thank you for sharing.
0

Ben Ritter 
 

Re: [Plugin] jf_get_dimensions.rb

Postby dedmin » Thu Jun 24, 2010 7:30 am

2010-06-24_092943.jpg
0

dedmin 
 

Re: [Plugin] jf_get_dimensions.rb

Postby thomthom » Thu Jun 24, 2010 7:41 am

In SketchUp when it rounds of a value it prefix it with a tilde ~.
If the lenght is 10.522221 and your model units are set to display only two decimals, SU will display that as "~ 10.52"
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] jf_get_dimensions.rb

Postby dedmin » Thu Jun 24, 2010 7:56 am

The problem is that the plugin can't recognize SketchUP's circles - it shows different sizes for x and y. Here is the old plugin:

2010-06-24_095545.jpg
0

dedmin 
 

Re: [Plugin] jf_get_dimensions.rb

Postby Dave R » Thu Jun 24, 2010 11:24 am

I get the same results as dedmin if I drag out the radius of the circle off axis or if I use an odd number (25) of sides for the circle instead of an even number. On the other hand, with the radius dragged out on axis and an even number of sides, I get the same value for x and y even with Precision set to 0.000001mm it is the same value. Those results are all understandable since the plugin is reporting the size of the bounding box.
0
Last edited by Dave R on Thu Jun 24, 2010 1:44 pm, edited 1 time in total.
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] jf_get_dimensions.rb

Postby Ben Ritter » Thu Jun 24, 2010 11:48 am

Jim, thank you.
0

Ben Ritter 
 

Re: [Plugin] jf_get_dimensions.rb

Postby Jim » Thu Jun 24, 2010 1:14 pm

Ben Ritter wrote:Jim, thank you.


You're welcome.
dedmin wrote:The problem is that the plugin can't recognize SketchUP's circles - it shows different sizes for x and y. Here is the old plugin:


This knows nothing of circles, or any other actual geometry. It only reports the BoundingBox dimensions adjusted for rotation.

Dave, that is the only way I can reproduce the results. And it makes sense (to me, anyway) that an odd-sided circle has differing dimensions due to the segments being non-symmetrical.
0
Hi

Jim 
Global Moderator
 

Re: [Plugin] jf_get_dimensions.rb

Postby dedmin » Thu Jun 24, 2010 2:04 pm

I see. Thanks for the explanation. This SketchUp "geometry" is becoming a big problem for me. To bad, but I have to move to other more precise software.
0

dedmin 
 

Re: [Plugin] jf_get_dimensions.rb

Postby thomthom » Thu Jun 24, 2010 2:07 pm

Sounds like you might need a NURBS modeller - one that understand circles.
Bonzai or Rhino comes to mind.
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] jf_get_dimensions.rb

Postby dedmin » Thu Jun 24, 2010 2:36 pm

Rhino is my choice - the new version 5 is very promising. Gonna miss SketchUp's components, FredoScale and the community!
0

dedmin 
 

Re: [Plugin] jf_get_dimensions.rb

Postby dedmin » Fri Feb 25, 2011 9:38 am

Here is a new version that displays the dimensions on the status bar
Screen.png


Made by a russian guy called 'newsposting'
GetDimensions.rb
0

dedmin 
 

Re: [Plugin] jf_get_dimensions.rb

Postby mitcorb » Fri Feb 25, 2011 2:36 pm

Hi, dedmin:
Can you point to the source of the Russian guy's plugin?
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] jf_get_dimensions.rb

Postby TIG » Fri Feb 25, 2011 2:58 pm

Because this particular short code 'sorts' the three dimensions then the 'thickness' is always the least of them and the 'length' always the greatest and the 'width' is what's left over.
Be aware that it does not return the X/Y/Z dimensions - these would be dims[1], dims[0] and dims[2] respectively IF dims.sort! were to be omitted... :geek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] jf_get_dimensions.rb

Postby Dave R » Fri Feb 25, 2011 3:07 pm

For my use I'm not so worried about which is X, Y or Z. Thickness is generally the lowest value and length is usually (although not always) the longest dimension.

This new version puts a menu entry in the Tools menu but does not display dimensions anywhere for my selected component. Doesn't work on groups either.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] jf_get_dimensions.rb

Postby newsposting » Fri Feb 25, 2011 5:10 pm

Hi, all.

This, I modified the plugin Get Dimensions. If you have any questions I can answer.
0
Last edited by newsposting on Fri Feb 25, 2011 6:07 pm, edited 1 time in total.

newsposting 
 

Re: [Plugin] jf_get_dimensions.rb

Postby newsposting » Fri Feb 25, 2011 5:31 pm

Thank dedmin, that upload changed plugin. I looked at the comments in the forum and would immediately respond.

1) I did not change the algorithm for determining the length, width and height, and left it in its original form, only changed the location of information display.

2) Call plugin from the menu is not convenient, since after a mouse movement information is lost. But it is very convenient to assign a hot key, such as (W), and using the command Select, selected element, press W, and the information appears at the bottom, select the next element, and then press W again appear at the bottom of the data about the object. As for me it is very convenient. In this Select command is not disabled, which is also very convenient.
0

newsposting 
 

Re: [Plugin] jf_get_dimensions.rb

Postby dedmin » Fri Feb 25, 2011 5:49 pm

Sorry, I didn't check it by myself - there were no SketchUP installed. This version works by a shortcut - You assign a shortcut to this plugin and when select group or component press the shortcut - You see the dimensions in the status bar - as soon as You move the mouse they are gone. Pretty useful actually.
0

dedmin 
 

Re: [Plugin] jf_get_dimensions.rb

Postby Dave R » Fri Feb 25, 2011 5:56 pm

There's a big difference. Thank you for the explanation.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] jf_get_dimensions.rb

Postby newsposting » Mon Feb 28, 2011 9:43 pm

I upgraded the plugin, and now SketchUp automatically show the dimensions, without click menu item and hotkey, and this feature can be disabled if it interferes.

Download link:
DimensionsTool.zip


Menu:
Tools > Dimensions Tool > Get Dimensions - old functional
Tools > Dimensions Tool > Auto Display Dimensions - checked menu item, which switch auto get dimensions functionality after select object.

P.S. Let me know if you need to modify the algorithm and move plugin to another menu for the convenience.
2

newsposting 
 

Re: [Plugin] jf_get_dimensions.rb

Postby dedmin » Tue Mar 01, 2011 10:25 am

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

dedmin 
 

Re: [Plugin] jf_get_dimensions.rb

Postby thomthom » Tue Mar 01, 2011 10:49 am

newsposting wrote:I upgraded the plugin, and now SketchUp automatically show the dimensions, without click menu item and hotkey, and this feature can be disabled if it interferes.

Could you post this as a new separate post? It makes it easier to find the plugins. When they are hidden in the middle of a thread it's very hard to find.
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] jf_get_dimensions.rb

Postby dedmin » Sat Apr 02, 2011 9:05 pm

newsposting wrote:I upgraded the plugin, and now SketchUp automatically show the dimensions, without click menu item and hotkey, and this feature can be disabled if it interferes.

Download link:
DimensionsTool.zip


Menu:
Tools > Dimensions Tool > Get Dimensions - old functional
Tools > Dimensions Tool > Auto Display Dimensions - checked menu item, which switch auto get dimensions functionality after select object.

P.S. Let me know if you need to modify the algorithm and move plugin to another menu for the convenience.

I noticed that this version doesn't display correct dimensions when component/group is not aligned with the world axes - can You fix this?
Thanks.
0

dedmin 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: fredo6, linkph and 12 guests

Visit our sponsors: