Offset polyline with Clipper gives unprecise result

Hi there,
I try to offset a polyline with Clipper Polyline Offset. It does result in a kind of offset, but it’s not very precise. Does any body have an idea to solve this issue?

Are you assigning a plane to the offset?

Hello
it seems quite clear, Clipper works with integer and not double so you have to provide a tolerance.
Tolerance MUST be say less than size/1000 and bigger than say size/1000000
here an example with 2 tolerances.


Tolerance must be well chosen and is scale dependent. So don’t use a too small tolerance because calculation will be very long.

And if it is not that you must check if you provide a “good” polyline to Clipper, it is best to do that with a dedicated component than to rely on automatic conversion.

And also it is better to post the file with geometry and script.

Do you mean for offset distance? I am offsetting double often, like 1.5 etc.

No not the offset. Clipper is transforming all double coordinate to int coordinate. It allows better reliability.
http://www.angusj.com/delphi/clipper/documentation/Docs/Overview/FAQ.htm

1 Like

Ah yea that, gotcha.

Thank’s for all your replies and help. Found my mistake. I missed to convert my curve into a polyline.
Now after converting the curve into a polyline and selecting the right tolerance for the polyline generation, the shown result looks good!