Easy way for offset of a face
-
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!
-
So you want to offset a set of 3d points representing a polygon - not actually a face itself?
-
@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!
-
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.
-
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...
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 LoginAdvertisement