treverhines / RBF

Python package containing the tools necessary for radial basis function (RBF) applications
MIT License
215 stars 50 forks source link

Looking for a proper way to provide faces from extruded 2D polygons #24

Open RomanLF opened 2 years ago

RomanLF commented 2 years ago

Hello again, I have been using your python library for a while and I still face some difficulties about the geometry generation. To give context about my difficulties, I try to generate a box with some obstacles on the bottom coming from a shapefile. This file format lists obstacles 2D footprints with their height. I know how to give polygon coordinates as vertices but I need to provide to RBF-library some information of connectivity, in 3D it consists to give a list of triangles with indices corresponding to the vertices we want to connect. For the moment I manage to get, faces of my extruded footprints with the use of convex hull python function but this modify the form of my obstacles. Is there a way to extract faces of an extruded 2D obstacle without modifying its form? For example, given polygon coordinates and height information, how can I extract properly the faces of the 3D extruded Polygon in the figure without modifying its form?

image

Sorry for bothering you and thank you a lot for your help.

Roman