Sketch OFFSET - sometimes goes inside, sometimes outside of the shape

Sketch OFFSET - sometimes goes inside, sometimes outside of the shape

r.augusiewicz
Contributor Contributor
577 Views
4 Replies
Message 1 of 5

Sketch OFFSET - sometimes goes inside, sometimes outside of the shape

r.augusiewicz
Contributor
Contributor

Hello!

 

I have a workflow where I work with many closed shapes-vectors one after another and I offset them. I always want the offset to move outside of the shape, my SVG design process is always the same but very randomly, in proportion like 50/50 it goes either inside, or outside and I have to use negative numbers to move it the way I want.

 

Is there any way to remove that possibility, cut process time for me and by any formula or program setting by default move the offset always OUTSIDE the vector?

 

I am just very curious and it would be helpful 🙂 Thanks!

0 Likes
Accepted solutions (1)
578 Views
4 Replies
Replies (4)
Message 2 of 5

jeff_strater
Community Manager
Community Manager

no, unfortunately, there is no way that I know of to guarantee that an offset goes one direction or another.  I'm not really sure, myself, how the direction is chosen.  I kinda suspect that it has to do with underlying curve direction (which is not visible to the Fusion user), but I'm not certain of that.


Jeff Strater
Engineering Director
0 Likes
Message 3 of 5

r.augusiewicz
Contributor
Contributor

Thank you for your reply. I suppose if you think there is no way to achieve that then it is impossible? @jeff_strater 

 

Can it be introduced as a feature? Is it worth it? Just to make it as simple as could be - program could compare lenghts or area of two results (negative and positive number offset) and the outside one is always longer/bigger. I think it is fairly simple and fast solution for computer.

 

There could be a checkbox somewhere in Settings that would allow me to check that lenght by default (yes, it would add miliseconds to process and I would be aware of that) and it is done.

 

What do you think about that? Can I submit that request anywhere?

 

Rafał

 

 

0 Likes
Message 4 of 5

jeff_strater
Community Manager
Community Manager
Accepted solution

I believe it is impossible in the product today. No, it would not be impossible to implement.  Your method helps for closed curve chains, but Offset can be done on open chains as well.  The request is noted here, there really is no other way to officially request enhancements.


Jeff Strater
Engineering Director
0 Likes
Message 5 of 5

MichaelT_123
Advisor
Advisor

Hi Fellows,
The algorithm of the determination of profile offset direction is straightforward.
Think about a profile on a plane and an arbitrary point. How the determine if the point is inside or outside the profile?
1. Draw a the line through this point
2. Find all intersections of the line with profile
3. Order intersection points and the original point along line
4. If the initial issue is at an odd position on the order list, it is inside the profile.
5. And as such, will give the direction/sign of the offset.
It is worthwhile to mention that there is already a suitable API F360 function built in to facilitate the algorithm.
How difficult would it be to “advance the quality” of the current profile offset functionality?
This is hard to elaborate...

 

Regards
MichaelT

 

MichaelT
0 Likes