Skip to content

v2 SimplifyPaths vs. v1 CleanPolygons & SimplifyPolygons #685

Answered by AngusJohnson
ramcdona asked this question in Q&A
Discussion options

You must be logged in to vote

Sometimes, part of the boundary is a straight line, but because of the process I take to get there, it is usually made up of a large number of segments.
With v1, I would call
CleanPolygons( sol ); SimplifyPolygons( sol );
After my big Union operation. This would do a nice job of cleaning up the result to a minimum number of segments.
What is the best way to achieve similar results in Clipper2?

Make sure that your Clipper64 object has PreserveCollinear = false.
That should be all you need, though occasionally a repeat Union operation might further simplify your solutions.

Should I use SimplifyPaths?

This function is mostly useful when offsetting.
Nevertheless I guess it could also be u…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ramcdona
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