sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🚨 Skimp | 25% Off until March 30 Buy Now

    [Code] entities.add_linear_dimension

    Scheduled Pinned Locked Moved Developers' Forum
    1 Posts 1 Posters 1.2k 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

      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 Login
      • 1 / 1
      • First post
        Last post
      Buy SketchPlus
      Buy SUbD
      Buy WrapR
      Buy eBook
      Buy Modelur
      Buy Vertex Tools
      Buy SketchCuisine
      Buy FormFonts

      Advertisement