blender render engine: render buildings… in theory
This commit is contained in:
parent
1d40e3f02a
commit
5b4ee0b4d0
6 changed files with 142 additions and 9 deletions
|
@ -82,3 +82,12 @@ def triangulate_polygon(geometry: Union[Polygon, MultiPolygon], keep_holes=False
|
|||
offset += len(new_vertices)
|
||||
|
||||
return np.vstack(vertices), np.vstack(faces)
|
||||
|
||||
|
||||
def triangulate_gapless_mesh_from_polygons(geometries):
|
||||
rings = []
|
||||
for polygon in geometries:
|
||||
polygon = polygon.buffer(0)
|
||||
rings.append(polygon.exterior)
|
||||
rings.extend(polygon.interiors)
|
||||
return triangulate_rings(rings)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue