...
Het is ook mogelijk een driehoekig grid te genereren:
Code Block |
---|
efdef mesh2d_add_triangular( network: Network, polygon: Union[Polygon, MultiPolygon], edge_length: float = None ) -> None: """Add triangular mesh to existing network. An orthogonal mesh is generated by the meshkernel, which likely means that the given geometry is not completely filled. The triangle discretization is determined based on the coordinates on the boundary of the provided geometry. Giving an edge_length will discretize the polygon for you, but you can also do this yourself. Args: network (Network): Network object to which the mesh is added polygon (Union[Polygon, MultiPolygon]): Geometry within which the mesh is generated edge_length (float, optional): Distance for which the polygon boundary is discretized (by approximation). Defaults to None. """ |
...
Het is mogelijk het grid lokaal binnen een gegeven polygoon een aantal stappen te verfijnen. Zo kan een 40x40 grid lokaal verfijnd worden naar een 20x20 grid, 10x10 grid, etc.
Code Block |
---|
def mesh2d_refine(
network: Network, polygon: Union[Polygon, MultiPolygon], steps: int
) -> None:
"""Refine mesh 2d within (list of) polygon or multipolygon, with a certain
number of refinement steps.
Args:
network (Network): Network for which the mesh is clipped
polygon (Union[GeometryList, Union[Polygon, MultiPolygon]]): Polygon within which the mesh is clipped
steps (int): Number of steps in the refinement
""" |
...
|
| ||||