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

    Easy way for offset of a face

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 3 Posters 132 Views 3 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.
    • N Offline
      niccah
      last edited by

      I'm wondering: In Sketchup, there is the button "offset"... so, choose a face, click on this button, and everything is fine πŸ˜„

      But, there is an "offset" function in ruby, just for single points. So, in princible, I know to calculate the "offseted" face... but my idea is a little bit more complicated and I have the feeling, that there should be a very easy way in ruby, to do that...

      Do you know, how I can use the function, which is used, by clicking the "offset" button in Sketchup?

      Thanks for your help!

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        So you want to offset a set of 3d points representing a polygon - not actually a face itself?

        Thomas Thomassen β€” SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • N Offline
          niccah
          last edited by

          @thomthom said:

          So you want to offset a set of 3d points representing a polygon - not actually a face itself?

          Yes you are right! Sorry for the inexact description!

          1 Reply Last reply Reply Quote 0
          • Chris FullmerC Offline
            Chris Fullmer
            last edited by

            I think the answer is that no, there is no simple way to do it. Like you said though, you can offset points by a vector. So you have to start with that, or some other method of calculating the offset. RickW had written an offset.rb that allowed a devloper to simply call offset on a face and then offset it. BUT its a tiny bit buggy, and on top of that it modifies the SketchUp API so I can't recommend using it. But you could look at it and ask him if you could borrow some of his code if it helps.

            And more recently TIG wrote a very impressive smart offset tool. You might take a look at that if you need some ideas how to write an offset function.

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

            1 Reply Last reply Reply Quote 0
            • N Offline
              niccah
              last edited by

              Thanks a lot Chris! Okay, no problem, then I start with my ideas! πŸ˜„ In my case, I have always faces with z = 0. So, I think, it should reduce the complexity of my project πŸ˜„

              I will public my solution for other people...

              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