sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Code] entities.add_linear_dimension

    Scheduled Pinned Locked Moved Developers' Forum
    1 Posts 1 Posters 1.1k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • TIGT Offline
      TIG Moderator
      last edited by

      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

      TIG

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Buy SketchPlus
      Buy SUbD
      Buy WrapR
      Buy eBook
      Buy Modelur
      Buy Vertex Tools
      Buy SketchCuisine
      Buy FormFonts

      Advertisement