Replies: 6 comments 8 replies
-
Correct.
Yes.
I think you're well on the way, and I don't see any pitfalls. |
Beta Was this translation helpful? Give feedback.
-
Here is my first attempt at this: The results shown above are before this step. Performing a Union operation results in a big mess :) Any suggestions on how to remove self-intersections from the results @AngusJohnson? Clipper2/CPP/Clipper2Lib/src/clipper.offset.cpp Lines 599 to 623 in ed98928 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Yes, that's what i need too, but Rhino will fail horrible in some scenarios. E.g. construct a shape like this. The interior result looks good. Now further increase the offset. |
Beta Was this translation helpful? Give feedback.
-
Most buffer implementation seem to follow this concept: A one sided offset is the union of all offsetted line segments and the arc / miter end at convex vertices. This explains the result at angles less than 90 degree. |
Beta Was this translation helpful? Give feedback.
-
is there an existing part of Clipper, which would allow us to remove self intersections from a single open path like the green one in the following example? |
Beta Was this translation helpful? Give feedback.
-
Hi @AngusJohnson,
i know currently Clipper2 does not support this and you currently do not plan to implement it. (#882)
I have some rough overview about your offsetting algorithm. Afaik you currently do two-sided offset and then resolve the self-intersection by applying a union. I don't see a reason why this approach would not work the same for a one-sided offset, would you agree?
Currently my idea is to extent ClipperOffset::OffsetOpenPath so that it produces a one sided offset. This seems doable, but i guess there will be some details i'm currently not aware of.
Do you think this approach in general can end up with the desired result or could there be some (big) pitfalls you are already aware of?
Would be really helpful if you could give a few comments related to this.
Thanks, Lars
Beta Was this translation helpful? Give feedback.
All reactions