User Forum of Software BASEMENT

BASEMENT
Basic Simulation Environment for computation of environmental flow and natural hazard simulation
Laboratory of Hydraulics, Hydrology and Glaciology (VAW)
ETH Zurich
Basement_Logo

You are not logged in.

#1 2015-03-13 11:56:23

ventu89
User
Registered: 2015-03-10
Posts: 4

file.xyz

i need to create a mesh whit xyz file, i need some help to create my mesh imput file;

first i convert the text file xyz to a multy point shape file with x y z field
next i generate an elevation mesh using this file as imput with the breaklines with verticles on the xyz points, and finally i generate quality mesh, is right procedure?

Offline

#2 2015-03-19 18:24:20

Matteo Facchini
Developer
From: Trento
Registered: 2014-09-05
Posts: 284

Re: file.xyz

Hi ventu89,

Remember that the process to generate a mesh is reported in BASEmesh tutorial, so we strongly suggest you to follow it step by step.

Anyway, if you have a coordinate file (containing x y and z coordinates) and you want to generate a mesh out of it you can just follow these steps:

1) Go to Layer/Add Delimited Text Layer and in the window select your .txt file
Under ‘File format’ select which is the delimiter (depending on your source file, it could be a comma, a semicolon, just a tab space,…);
Under ‘Geometry Definition’ select ‘Point Coordinates’ and the X and Y fields (note that if your file has X, Y and Z as header, QGis automatically recognizes them as X, Y and Z fields)
Now you should have your points on the map

2) Go to Layer/New/New Shapefile Layer and in the window select ‘Polygon’
You may want to choose to add a new attribute if you want to add other pieces of information to your geometry
Let's call this layer 'boundary' (select the folder, give the file a name and save it)

3) Now you have two layers on the left in QGis
Right click on 'boundary' and select ‘Toggle Editing’
Go to Layer/Add Feature and connect (more or less) the points: note that to close the polygon, after clicking on all the points you want to connect, you need a right click
Insert the ID for this area and click OK
Go to Edit/Node Tool or Edit/Numerical Vertex Edit to move the vertices of your polygon on the points of your point layer, i.e. the one added at point 1) (you may specify the same coordinates if you use Numerical Vertex Edit)
Close ‘Toggle Editing’ by doing again right click on the layer and select 'Toggle Editing'
Save

4) Now we have to create the breaklines layer
Go to Layer/New/New Shapefile Layer and in the window select ‘Line’ and click OK
Right click on this layer and select 'Toggle Editing'
Click on Edit/Add Feature
Put as many breaklines as you want in your area and set their IDs
Close ‘Toggle Editing’ by doing again right click on this layer and select 'Toggle Editing'
Save

5) Now we have to create the maximum area layer: this is a point layer we use to set the maximum area of your mesh's elements
Go to Layer/New/New Shapefile Layer and in the window select Point
In New Attribute write a name like ‘max_area’ as type select ‘decimal number', set its precision and click on 'add to attribute list'
Right click on this layer and select 'Toggle Editing'
Click on Edit/Add Feature
Put as many point as you want in your area and set the maximum area you need for your mesh's elements. Note that the number of ‘max_area’ points you set should be consistent with the number of areas delimited by your breaklines (e.g. if you have one breakline cutting your area into two smaller ones you could set two ‘max_area’ points)
Close ‘Toggle Editing’ by doing again right click on this layer and select 'Toggle Editing'
Save

6) Now we can go on with the BASEmesh quality meshing
Click on the ‘Quality meshing’ button inside BASEmesh panel
In the window select your boundary points, your breaklines, your vertices and your area points (in ‘Max. area field’ select ‘max_area’ and not the ID).
Choose a name for your quality mesh and Generate it

7) Now if you don’t have a DEM or DTM, but you have the elevation expressed by the Z coordinates of the points in your initial .txt files, you just have to click on ‘Export Mesh’ and
Select your Quality Mesh elements as ‘Mesh elements’ (in the material ID field choose MATID)
Select your Quality Mesh nodes as ‘Mesh nodes’ and in the elevation field choose Z
Choose a name and folder for your mesh
Click on Export.


That’s it!


Bests


Matteo

Last edited by Matteo Facchini (2015-03-20 10:20:49)

Offline

Board footer

Powered by FluxBB