Skip to content

Commit

Permalink
update fundamental changes to make import possible again
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer committed Oct 23, 2023
1 parent 5f2897b commit 736765a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hydrolib/core/dflowfm/net/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,11 +1105,11 @@ def get_node_mask(self, branchids: List[str] = None):


class Network:
def __init__(self, is_geographic: bool = False) -> None:
self.meshkernel = mk.MeshKernel(is_geographic=is_geographic)
def __init__(self, projection: bool = False) -> None:
self.meshkernel = mk.MeshKernel(projection=projection)
# Monkeypatch the meshkernel object, because the "is_geographic" is not saved
# otherwise, and needed for reinitializing the meshkernel
self.meshkernel.is_geographic = is_geographic
self.meshkernel.projection = projection

self._mesh1d = Mesh1d(meshkernel=self.meshkernel)
self._mesh2d = Mesh2d(meshkernel=self.meshkernel)
Expand Down Expand Up @@ -1182,7 +1182,7 @@ def mesh2d_create_triangular_within_polygon(self, polygon: mk.GeometryList) -> N
def mesh2d_clip_mesh(
self,
geometrylist: mk.GeometryList,
deletemeshoption: mk.DeleteMeshOption = mk.DeleteMeshOption.ALL_FACE_CIRCUMCENTERS,
deletemeshoption: mk.DeleteMeshOption = mk.DeleteMeshOption.INSIDE_NOT_INTERSECTED,
inside=True,
) -> None:
self._mesh2d.clip(
Expand Down

0 comments on commit 736765a

Please sign in to comment.