Orientation of output polygons is inconsistent
Polygon and line clipping and offsetting library (C++, C#, Delphi)
Brought to you by:
angusj
When calculating the difference of the two polygons
(-95003, 65555)
(-43426, 51894)
(-55444, 58144)
(-55837, 58338)
(-84620, 69889)
(-84753, 69931)
(-85340, 70061)
and
(-95003, 65555)
(-55444, 58144)
(-55837, 58338)
(-84620, 69889)
(-84757, 69932)
(-85340, 70061)
the result consists of two triangles. However, these two triangle are oriented differently.
Anonymous
The result is
Orientation 1
(-84756, 69932)
(-84753, 69931)
(-84620, 69889)
Orientation -1
(-95003, 65555)
(-55444, 58144)
(-43426, 51894)
I think I've had similar issue with holes being oriented differently (basically producing non-holes) in Clipper2 C++ version.
is it the orientation or hole classification?
On Fri, Mar 8, 2019 at 1:31 AM Andrii Doroshenko xrayez@users.sourceforge.net wrote:
Related
Bugs: #191
Thanks for the feedback. I've tested this with Clipper2 (beta & Delphi Pascal only) and that returns a single polygon with the correct oriention ... ((-43426, 51894), (-55444, 58144), (-95003, 65555)).
ps: I'm hoping to have Clipper2 out of the Sandbox in the next couple of months and I'd value assistance with translating it to C++ and C# then :).
Yeah, in fact I've been using your Clipper2 version for quite a while now, and recently I've even created an experimental pull request for a game engine to get Clipper integrated into the core, so I'm fairly interested!