-
I have been playing around with this wonderful library and ran into something that puzzled me with the
After execution, I can pull the path back out from
It looks to me like the path got reversed and lost precision. From reading the docs, I know that Clipper2 converts doubles to 64 bit integers and then back again, but I am surprised that the precision loss is this great. Is this expected behavior or am I likely making a mistake somewhere? Many Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
To answer my own question, my issue was that I initialized |
Beta Was this translation helpful? Give feedback.
-
"Clipping operations wills always return Positive oriented solutions (unless the Clipper object's ReverseSolution property has been enabled). This means that outer polygon contours will wind anti-clockwise and inner 'hole' contours will wind clockwise (in Cartesian coordinates)." See: http://www.angusj.com/clipper2/Docs/Overview.htm#closed_paths |
Beta Was this translation helpful? Give feedback.
To answer my own question, my issue was that I initialized
ClipperD
like soClipperD c
. This sets clipper to the default precision of2
. UsingClipperD c(6)
solves my problem.