Mesh

Mesh(self, filename)

The Mesh class is initialized with a mesh file.

Parameters

Name Type Description Default
filename str | Path mesh filename required

Attributes

Name Type Description
geometry GeometryFM2D Flexible Mesh geometry

Examples

import mikeio
mikeio.Mesh("../data/odense_rough.mesh")
<Mesh>
number of elements: 654
number of nodes: 399
projection: UTM-33

Methods

Name Description
to_shapely Convert Mesh geometry to shapely MultiPolygon.
write write mesh to file.

to_shapely

Mesh.to_shapely()

Convert Mesh geometry to shapely MultiPolygon.

Returns

Name Type Description
MultiPolygon mesh as shapely MultiPolygon

Examples

import mikeio
msh = mikeio.open("../data/odense_rough.mesh")
msh.to_shapely()

write

Mesh.write(outfilename)

write mesh to file.

Parameters

Name Type Description Default
outfilename str path to file required