How to draw a center line between two lines

How to draw a center line between two lines

genosyde
Advocate Advocate
1,912 Views
1 Reply
Message 1 of 2

How to draw a center line between two lines

genosyde
Advocate
Advocate

Hello devs.
I'm currently looking for a way to draw a center line between two lines(Line, PolyLine, Spline).
It took a lot of time but couldn't find it yet.

 

Reference Image

 

If you select the two lines above and below,
I want to make a program where the middle line is made.

Please let me know what to look for and if there is any code to reference.

Thank you. ^^

Accepted solutions (1)
1,913 Views
1 Reply
  • API
Reply (1)
Message 2 of 2

essam-salah
Advisor
Advisor
Accepted solution

hi@genosyde 

in case of two polylines, you can simply iterate through each vertix and create a temp line between this verix and the nearest point to second polyline then store the mid-point of this temp line, and do so for second polyline, finally connect those mid points,

in case of arc you can convert to a polyline (based on your accuracy),