[Code] entities.add_linear_dimension

[Code] entities.add_linear_dimension

Postby TIG » Thu Aug 20, 2009 4:45 pm

    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 Release

Extract the two files from this zip file and put them both into the Plugins Folder...
linear_dimension.zip
0
TIG
User avatar
TIG 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 


 

Return to Developers' Forum

cron

Who is online

Users browsing this forum: Hansanghak and 10 guests

Visit our sponsors: