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

    Offset tool in Ruby?

    Scheduled Pinned Locked Moved Newbie Forum
    sketchup
    3 Posts 2 Posters 538 Views 2 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.
    • A Offline
      alexmojaki
      last edited by

      How can I use Ruby to mimic the 'Offset' tool in SU? Given a face, I want to get a new face that's 1.5 m from the edges (on the inside), or just have a way of knowing if a given point would be on such a face.

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        Smustard.com has a free ' offset.rb' that adds some extra methods to the API that should do what you want... Either 'require' it or cannibalize parts of its code into your own ...

        The API's face.classify_point(point) method will tell you if a point is on a face etc - use the constants NOT numerical equivalents...

        TIG

        1 Reply Last reply Reply Quote 0
        • A Offline
          alexmojaki
          last edited by

          Sweet, thanks.

          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