Working with DWG files and universal axis line search

Hello
Is it possible to correctly import DWG files into the Rhino environment?
I want to achieve the result of plotting axis lines for all engineering networks. Is there a universal algorithm for constructing such lines?

Thank.
In the AutoCAD environment, networks are displayed correctly


Extra lines appear when importing DWG

I wrote an algorithm that creates a surface based on all the lines from which I planned to extract the axis lines. But it is not universal for other networks built by other engineers

28_07_2022_План ОВ -3.200.dwg (17.9 MB)
Скрипт пошук осьової лінії в мережах.gh (21.2 KB)

This is another type of network for which the script that was written no longer works.



15_07_2022_Маркувальний_план_ДВ_на_позн_3,200_комунікації.dwg (781.8 KB)