I have nodes created at the crossing location of lines as shown below.

I need a tcl script to make beam elements connecting these nodes ( based on a check that the nodes have a common line passing through them).
Thank You in advance for Your consideration.