Skip to content

Lossless path simplification (only simplifying outwards) #275

Discussion options

You must be logged in to vote

Anyway I was thinking that a way to do this might be:
Apply Ramer–Douglas–Peucker to the polygon to simplify (both inwards and outwards)
Take the union of the subject and the RDP output, to eliminate inward simplifications

That'd work but it'd be relatively time costly.
Alternatively, if you were confident of the orientation of your paths, you could modify the RDP function so that it only removed vertices that were angling inwards (and test for this using CrossProduct).

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@sponsoredlinks
Comment options

Answer selected by sponsoredlinks
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@sponsoredlinks
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants