Parallel line using the Clipper library

I am using the CLIPPER library to offset the line and trying to make a parallel line.

ClipperOffset co = new ClipperOffset(); co.AddPath (s, JoinType.jtRound, EndType.etOpenRound); co.Execute (ref solution, 15); 

The result is the correct image in the application. I need parallel lines instead of the line around the line.

Does anyone know if this is possible in Clipper or maybe someone knows how to filter result points to remove unnecessary ones?

enter image description here

+5
source share
1 answer

Using Endtype.etOpenButt when adding a path will help you:

https://sourceforge.net/p/jsclipper/wiki/documentation/#clipperlibendtype

You will also need to cut out a few points at the very beginning and in the middle of the resulting polygon, perhaps extract two "parallel" lines.

0
source

Source: https://habr.com/ru/post/1246259/


All Articles