Successive inward closed polygon offsetting. #434
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I want to clarify that the problem is from the function The only workaround for me now is to add a point to each offset iteration solution.at(0).push_back(solution.at(0).at(0));
polygons.push_back(solution.at(0)); but this seems arbitrary to me. Is there a better way to do that? This only solves the open polygon answer. It does not solve the added vertices behavior. |
Beta Was this translation helpful? Give feedback.
-
Because you can't deflate/shrink open paths (ie lines).
Polygons are only closed implicitly by the context.
Without some sample data, I can't really comment or explain. |
Beta Was this translation helpful? Give feedback.
Because you can't deflate/shrink open paths (ie lines).
What you've illustrated in your first image is a polygon, and that you can deflate/shrink using a negative offset.
Polygons are only closed implicitly by the context.
The library does not add endpoints to match start points.
If that's important to you, you could easily do that outside the library's code.
Without some sample data, I can't really comm…