...
Genereren van een vierkant grid binnen een polygoon
Het gernereren genereren van een rechthoekig grid gaat via de functie “Mesh2d_add_rectilinear”.
...
Code Block |
---|
mesh.mesh2d_add_rectilinear(network, rectangle, dx=1, dy=1)
clipgeo = MultiPolygon([box(-6, -1, -4, 2), box(4, 5, 7.2, 7.2)])
mesh.mesh2d_clip(network, clipgeo, deletemeshoption=1, inside=True) |
| Code Block |
---|
multipolygon = MultiPolygon([box(0, 0, 10, 10), box(12, 2, 19, 9)])
mesh.mesh2d_add_rectilinear(network, multipolygon, dx=1, dy=1)
river = LineString(np.c_[x, np.sin(x / 3) + 5]).buffer(0.5)
refinement = river.buffer(1)
mesh.mesh2d_refine(network, refinement, steps=1)
mesh.mesh2d_clip(network=network, polygon=GeometryList.from_geometry(river)) |
|
Image RemovedImage Added | Image RemovedImage Added |