[Code] entities.add_linear_dimension
-
Code:
entities-add_linear_dimension.rb
Adds new Method the Sketchup Entities class
add_linear_dimension(start_point, end_point, offset, rotation)The first pair are Sketchup::Point3d's (or as Arrays [x,y,z]).
The second pair are both optional:
. 'offset' determines the offset from the two points.
default=0.0, as number [==inches] or units [e.g. 50.mm or 2.inches] or a string
that could be read as a length [e.g. "50mm" or "2""].
Note that there are NO leaders drawn for an offset dimension.
. 'rotation' turns the dimension about the length-axis (of 2 points).
default=0.0, it is entered in degrees.
These two work together:
an offset of 0 and a rotation of 0 give a 'flat' dimension spanning
between the two points,
an offset of 0 and a rotation of 90 give a 'vertically' oriented
dimension spanning between the two points,
an offset of 2" with a rotation of 0 gives a 'flat' dimension offset
from the two points,
an offset of 2" and a rotation of 90 gives a 'vertically' oriented
dimension offset 2" above the two points.;
and so on...Essential:
Needs 'linear_dimension.skp' in the Plugins folder
it could be customized: keep it 1" long x 0" high.Tip:
If you want a dimension that is readable from any direction then add
two on top of each other, one rotated at 0 and the other at 90. As one
disappears from view the other will become visible...Version:
1.1 20090820 First ReleaseExtract the two files from this zip file and put them both into the Plugins Folder...linear_dimension.zip
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement