Clipper polygon offsetting and straight line vertices

I am trying to offset a polygon using clipper, and I need all the vertices from the original polygon to be mirrored in the offset polygon. The trouble is that when you pass a polygon with vertices on a straight line, you get back a polygon without any vertices on straight lines, as I have attempted to illustrate in this diagram:

Polygon Offsetting vertices

Does anybody know of a way to modify the behaviour of clipper, or a different library that can do this for me?

Thanks

Upvotes: 1

Views: 732

Answers (1)

MBo
MBo

Reputation: 80187

Internal routine FixupOutPolygon() removes such (usually redundant) vertices (in version 4.8). I see no option to disable it.

Read the license. If it permits to modify sources for yourself, then you could comment out it's call in the sources.

Upvotes: 0

Related Questions