...
and select the file 'dam.gid'
Zoom near the dam
Now the dam is overlapped with the terrain, for the simulation we need to calculate the intersection with the topography.
Create a new layer and send it the surfaces near the dam, to facilitate the work, and set off unwanted layers.
Surfaces near the dam
To facilitate the intersection we will reduce the amount of surfaces to be intersected, replacing some squares by a new surface defined only by its boundary. To have a good shape it is important that the boundary is topologically a rectangle (for curves with four well defined corners)
Geometry->Edit->Join->Surfaces->Rebuild by boundary
and select the collection of surfaces of the previous image, then a new smooth NURBS surface will replace them.
And intersect the surfaces
Geometry->Edit->Intersection->Surfaces
and select the surfaces of the dam and near the dam. This will find the intersection of the curves against the surfaces, then will split the lines, then will find the intersection curves, that start and end in a point of intersection curve-surface, and will split the surfaces if possible.
Then we can delete the unwanted parts, e.g. imagine that for our simulation we don't require the surfaces under the ground.
Surfaces to be deleted in red
Geometry->Delete->Surfaces
in the contextual menu click on 'LowerEntities', to delete also its dependent lines and points
and select the red surfaces of the previous image
Final model, with the dam connected with the topography
Now the model is finished. The dam is connected with the topography, to check it draw in colors the amount of higher-entites of lines.
View->HigherEntities->Lines
Only the lines on the border must belong to 1 surface, all other lines must belong to 2 surfaces.
The level curves can be also deleted, to have only surfaces in the final model.
Assuming that these curves are in other layers, it is possible to delete the layers and allow to delete its geometrical and mesh entities
Select in the layers window all layers except the ones of the surfaces, and press <Supr>
Set the checkbox 'Do it for all' (to avoid the confirm question for each layer), and press the yes button.
Deleting the selected layers and its entities
And a surface mesh could be generated
Surface mesh assigning a smaller size to surfaces near the dam