I am trying to automate my workflow in GeoStudio. It involves getting a section from AutoCAD and plotting it into GeoStudio. So far, I am using the ezdxf library in Python to extract information about the points and lines from the CAD file.
My problem is that I need to identify the points that create regions so that I can input these points into GeoStudio. It wasn’t a big problem for regions that have a rectangular shape, but the other polygons do not have a specific set of rules (at least not that I know of) to identify the points that create them.
How can I go about doing this? I guess it would be better to use an algorithm, but any solution that works is much appreciated! I have added two files with some examples of the sections we might encounter, so you can have an idea of how the sections are made.
Thanks in advance guys!
Section 1
Section 2
I have already tried using DFS and BFS algorithms, but with no luck. Additionally, the triangulation algorithm is not suitable for me, as it divides my section into much smaller pieces, creating more work instead of minimizing it.
Alexandre Vitor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.