How to get the upper line of a polygon
I am trying to create an application to automate the workflow of dam analysis for the geotechnical sector I work in. The app takes as input a DXF file that contains the geometry of the dam section. From this file, we extract data such as points, edges, and so on. One of the requirements for the app to work is that the section must be a closed polygon (see images in the example for reference).