(search) automatic dimensions plug-in
-
If you have objects that always need their dims adding in a similar way [e.g. the xyz bounds and a circle] you could automate it, but the results would be very unpredictable otherwise...
I have a proto-dimensioning tool - that was never released - usage:add_linear_dimension(start_point, end_point, offset, rotation)
Here it is... Put the two files [rb+skp] into the plugins folder - read the notes at the start of the ruby file...add_linear_dimension.zip
-
I have generally found auto dimensioning in other programs to be a bit of a pain. You end up deleting or remaking stuff half the time because there are often too many dimensions created, or they end up in the wrong places - from a presentational point of view) etc.
-
Tig: thanks for the plugin. I have installed it but I'm afraid i can't activate it.
There are no new menus or buttons.. Am i missing something??
(btw, i've read the .txt but i'm not so sharp in ruby script..it's all Greek to me!! ) -
It is not a plugin that auto-dimensions.
It is code that adds extra methods to the API, so if you have some other code you can add dimensions with it - for example...model=Sketchup.active_model ss=model.selection edges=[] ss.each{|e|edges<< e if e.class==Sketchup;;Edge} ents=model.active_entities edges.each{|e|ents.add_linear_dimension(e.start.position, e.end.position, 4.0, 0.0)}
This would loop through all edges in the selection and add linear dimension to them offset 4" and at 0 degrees rotation about the edge...
I only supplied the code as an example to show what could be done
You need to work out how and which things get dimensioned and in what format...
Then code it...
There are some notes at the start of the ruby regarding its use too, that you probably read already...... -
Okey, i see..
Hope someone codes this one day...Pity i'm only a plugin user than programmer..Thanks anyway Tig.
-
Updated after more testing:
So when I try this code with your plugin and SKP file the dimension is made, but often is nowhere near the edge it that it should be. My initial testing shows this working for edges starting or finishing at the origin. but many other edges produce dimensions far off in space. I'll look at the code and see what I can find out. The other thing this doesn't do that I want it to is to have the dimension associated with the edge, so that it scales with the geometry. This acts like an orphaned dimension vs. one that is linked to an entity.
@tig said:
It is not a plugin that auto-dimensions.
It is code that adds extra methods to the API, so if you have some other code you can add dimensions with it - for example...model=Sketchup.active_model > ss=model.selection > edges=[] > ss.each{|e|edges<< e if e.class==Sketchup;;Edge} > ents=model.active_entities > edges.each{|e|ents.add_linear_dimension(e.start.position, e.end.position, 4.0, 0.0)}
This would loop through all edges in the selection and add linear dimension to them offset 4" and at 0 degrees rotation about the edge...
I only supplied the code as an example to show what could be done
You need to work out how and which things get dimensioned and in what format...
Then code it...
There are some notes at the start of the ruby regarding its use too, that you probably read already...... -
you could try driving dimesions plugin http://drivingdimensions.com/SketchUp/faq.php
its even dynamic -
@davidboulder said:
Updated after more testing:
So when I try this code with your plugin and SKP file the dimension is made, but often is nowhere near the edge it that it should be. My initial testing shows this working for edges starting or finishing at the origin. but many other edges produce dimensions far off in space. I'll look at the code and see what I can find out. The other thing this doesn't do that I want it to is to have the dimension associated with the edge, so that it scales with the geometry. This acts like an orphaned dimension vs. one that is linked to an entity.
@tig said:
It is not a plugin that auto-dimensions.
It is code that adds extra methods to the API, so if you have some other code you can add dimensions with it - for example...model=Sketchup.active_model > > ss=model.selection > > edges=[] > > ss.each{|e|edges<< e if e.class==Sketchup;;Edge} > > ents=model.active_entities > > edges.each{|e|ents.add_linear_dimension(e.start.position, e.end.position, 4.0, 0.0)}
This would loop through all edges in the selection and add linear dimension to them offset 4" and at 0 degrees rotation about the edge...
I only supplied the code as an example to show what could be done
You need to work out how and which things get dimensioned and in what format...
Then code it...
There are some notes at the start of the ruby regarding its use too, that you probably read already......So - press Google to get the API updated - there are dozens of missing methods/tools !
-
Hi, i was wondering if the dimensions can be done with a modified section plane. For instance one cuts a plane with the section tool and the plugin auto dimensions the plane that has been cut. Its just a suggestion I don't know scripting
-
That might work as you can get the plane from a selected section-cut BUT then working out the offset for each selected edge etc and the fact that any fudged dimension-adding-tool will not leave its dimensions 'associated', makes it somewhat useless...
The built-in tool is already pretty quick to use and gives you the ability to fine tune where the dim is, snap to align etc...
Advertisement