Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this course, we will explore how to deal with this kind of models following some of these approaches.

Level curves

Ensure the default values of  'Automatic collapse' and 'automatic tolerance values' are set in the 'Import and Export' branch of preferences window, and import the file named 'level_curves.dxf' using 

...

The result is a model with a collection of straight lines like this:

Image Modified  Image Modified

After importing the file, we recommend to save the model, so as we can access always to the GiD model with the file already imported.

Creating separated surfaces

It is a model of lines, not of surfaces. Some lines could be used to build surfaces, but it should be a hard task.

...

and select all of them. The result should look like the following figure.

Image Modified

To create surfaces it is needed to have a set of closed contour lines. It is possible to create extra curves to enclose regions of topologically four curves, to create surfaces defined 'from its boundary'.

Use

Geometry->Create→Line >Create->Line 

and pick two existing points, for example create these two new lines:Image Removed

Image Added

In some parts, there may be needed some extra point to create the desired line, it is possible to force the division of a curve 'close to a coordinate' using 

...

Then, it is possible to use the new created point to create a new line:Image Removed   Image Removed

Image Added  Image Added

Note: when selecting the 'near point' it is possible to click the right-mouse button to open the contextual menu, and select other options, like 'Point in line' to pick a point over a curve, like the one to be divided.

Image Modified

Now we can create a new surface interpolating its boundary curves:

...

And select the boundary curves. 

Image Modified  Image Added  Image Added        

...

  

...

With this procedure, we can create the three surfaces of the image. The surfaces will have only C0 continuity between them (normals between them are discontinuous), but the shape could be good enough to generate a surface mesh valid for some simulations (see the mesh of the image above).

Creating surface from a family of parallel curves

Another way of create surfaces based on level curves is from a collection of 'near parallel curves'. The surface created will interpolate the curves and will have continuity in normals inside it.

For example, we can divide some curve if necessary and send the curves of the image to another layer to facilitate the selection, 

Image Modified

...

We are going to smooth a little bit the shape of the courvescurves. Prior curves must be converted to NURBS expression.

Geometry->Edit->Convert to NURBS→LineNURBS->Line

And then modify a little its shape forcing the tangency at joining points.

...

Then lines can be joined using

Geometry->Edit->Join->Lines>Join→Lines

Image Modified  Image Modified  Image Modified

At this point we already have the family of 'parallel' smooth curves to be used for the creation of the interpolating surface:

Geometry->Create->NURBS surface->Parallel lines

Image Modified

As can be seen this may be a manual and tedious procedure to re-build a surfaces model depending on the complexity of it, but in some cases this procedure may be very useful to simplify large models.

Cloud of irregular points

An interesting option is to create a single NURBS surface approximating (not interpolating) a cloud of points. It creates a rectangular shape projecting in a direction (in this case, z direction). To do so, use

...

and select all the points of the model

Image Modified

Note: surface sides are not parallel to XY axis, because other automatic 'main directions' are calculated

...

Then you can delete unwanted partsImage Removed

Image Added

This allow for example to create a 3D volume box for CFD simulations of the air around the topography.

Image Modified

TIN from points

A simple way to sample points is creating a mesh, and exporting the coordinates of the nodes as a simple text file. Create a new GiD project using

...

Ensure the 'Triangulate' extra option is selected in the import options parameters, as shown in the following figure.

Image Modified

This will create a TIN 'Delaunay' triangulation, connecting in Z projection the provided points (note that GiD collapses automatically the nodes in the same position, so as there are no overlapping in the resulting mesh). 

Image Modified Image Modified

It is topologically a valid surfaces model, that interpolate all provided points, but it has a lot of triangles, some of them with small angles or short edges and this difficult other geometrical operations, and re-meshing.

Note: It is possible to use collapse of points/nodes/edges to have less triangles

Regular grid from nodes

Create again a new model (Files->New) and import the XYZ file but now as mesh nodes, and without connect them with triangles

Files->Import->XYZ nodes...

Image Modified

We can build a regular square grid using

Geometry->Create->Geometry from mesh->Nodes→grid >Nodes->grid surfaces

Enter a grid cell size of 20 units and select all nodes.

A regular grid of surfaces will be created, with z of points approximated from the selected nodes

Image Modified  Image Modified

Using Nodes→grid Nodes->grid surfaces the z's are approximated with an averaged value based on inverse of distance to a power of close nodes.

Using Triangles→grid Triangles->grid surfaces (in case the input data are triangles, not just nodes) the z's would interpolated projecting the node over the selected triangles. This option could be more expensive.

...

Instead of create surfaces of geometry it is possible to create mesh entities, or export the grid data in a file (ARC/Info grid ASCII format, supported by most 'Geographic Information System' GIS programs). If you export a raster file using

Files->Export->Nodes→Raster...then->Nodes->Raster...

This will prompt a pop up window, asking to insert a File Name. Once inserted and clicked the Save button, a second pop up window will appear, this time it will ask for the grid size. After having clicked the OK button it is required to select all the nodes to be exported. Finally press the Escape key to complete the process. 

Then, the raster can be re-imported with

...

This import option supports several common raster formats like geotiff, ARC/Info ASCII or binary, png, jpg, among others (based on the GDAL library), and allows to create geometry, mesh, write as ARC/Info ASCII, and also sub-sample data for big files.

For instance, subsampling sub-sampling with increment=2 will take into account one of each 2 point data in each direction, like shown in the figure hereafter.

Image Modified

Grid from Internet

GiD 14 incorporates the possibility to obtain a grid from the place of the world we want using:

Files->Import→Topography...

Image Modified

We must enter the latitude and longitude geographical coordinates of the location we are interested in. In case we do not know its coordinates is possible to try to find them based on the name of the place,

...

Example using only 1/4 of data of topography of Montjuich Mountain.

Image Modified  Image Modified

Note: georeferenced geo-referenced UTM topography usually require too big numbers for the coordinates, especially for the 'y' (e.g. x=427378 y=4579121), this could become a numerical problem for the graphical representation (OpenGL uses float numbers to draw, that mean about 7 significative significant digits), and for the calibrated tolerances of some algorithms. In case of problems a solution could be use the 'Move' tool to displace the whole model close to the 0,0 origin. It is recommendable to store somewhere (like UlititiesUtilities->Tools->Notes) the offset used to recover the true coordinates if necessary.