7

I'm using CLIPPER library to offset line and trying to make parallel line.

ClipperOffset co = new ClipperOffset();

co.AddPath (s, JoinType.jtRound, EndType.etOpenRound);

co.Execute (ref solution, 15);

Result is right image in attachment. I need parallel lines instead of offset line "around" main line.

Does anyone know is it possible in Clipper or maybe anyone have any idea how to filter result points to remove unnecessary?

enter image description here

seek
  • 1,065
  • 16
  • 33

1 Answers1

0

Using Endtype.etOpenButt while adding the path will help you:

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

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

romaroma
  • 658
  • 8
  • 13