Skip to content

Successive inward closed polygon offsetting. #434

Answered by AngusJohnson
adnan-saood asked this question in Q&A
Discussion options

You must be logged in to vote

I did not know why the delta value in ClipperOffset::Execute() is not allowed to be negative if the EndType was not EndType::polygon

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.

When I perform the operation as coded in c++, the output polygons are not closed.

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.

The output polygons have many added vertices in unexpected behavior.

Without some sample data, I can't really comm…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@adnan-saood
Comment options

Answer selected by adnan-saood
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants