Remove extra extension of lines

Hi Friends,
I am trying to make surfaces form CAD Lines and i faced this issue and i tried to solve it many times but in vain.
I want to delete the extra extension of lines as is indicated in the photo to get a clean closed shape to create the surfaces

I really appreciate any ideas or help to solve this issue.
Thanks in advance.

Hello @hanywillim many ways here, but i like to use this one here from ampersand for that kind…


Amazing Bro, That is Exactly what I am looking for . I do appreciate your help.
But i faced another issue that some curves not touching each other like the one in the photo, Do you have any node or Python code to connect these lines [to present a rectangular shape for my example here] , i mean by connects the lines as corner lines not inclined lines.
Warm Thanks.


Hi @hanywillim …probably something could work…


Sorry! this not relates to the topic but can I ask the dynamo version that you use. Its nodes are all black!
My Dynamo version is They show it is up-to-date but not the same as your version