I tried to send this through with an attachment, but it never made it to the discussion forum. I'm seeing a major difference in offsetting between Clipper 1 and Clipper 2.
Comparison tests for Clipper 1 and Clipper 2
Clipper1 Test1
Out count: 2
Clipper2 Test1
Out count: 4
Hi again Phil.
The answer would've been more obvious if your keyhole_sizing variable had been 50000.
Anyhow, EndType.Closed (which is about to be renamed EndType.Joined as it currently is in the Delphi code) corresponds to EndType.etClosedLine in Clipper1. This is very different to EndType.Polygon that corresponds to EndType.etClosedPolygon in Clipper1.
You've most likely just been confused by another name change, but to clarify for others (in the absense of any Clipper2 documentation) ...
offsetting polygons is unidimensional in that positive offsets extend away from every edge's left side. On the other hand, offsetting open paths (polylines) is bidimensional in that it offsets away from both sides of edges.
I tried to send this through with an attachment, but it never made it to the discussion forum. I'm seeing a major difference in offsetting between Clipper 1 and Clipper 2.
Comparison tests for Clipper 1 and Clipper 2
Clipper1 Test1
Out count: 2
Clipper2 Test1
Out count: 4
I expected 2.
For Clipper1Test:
and Clipper2Test:
Last edit: Phil Stopford 2022-02-26
Hi again Phil.
The answer would've been more obvious if your keyhole_sizing variable had been 50000.
Anyhow, EndType.Closed (which is about to be renamed EndType.Joined as it currently is in the Delphi code) corresponds to EndType.etClosedLine in Clipper1. This is very different to EndType.Polygon that corresponds to EndType.etClosedPolygon in Clipper1.
You've most likely just been confused by another name change, but to clarify for others (in the absense of any Clipper2 documentation) ...
offsetting polygons is unidimensional in that positive offsets extend away from every edge's left side. On the other hand, offsetting open paths (polylines) is bidimensional in that it offsets away from both sides of edges.
Last edit: Angus Johnson 2022-02-27