Giter Site home page Giter Site logo

meshtools's Introduction

MeshTools

QGIS plugin for generating unstructured triangular meshes.

The plugin acts as an interface between QGIS and different mesh generation programs. Vector layers are translated into geometry descriptions that are then fed to the mesh generation program, and the resulting mesh is read into QGIS where it is displayed as a polygon layer. The mesh can then be exported to be used in finite element analysis.

###Features

###Installation ####Linux

  • Install the mesh generators
    • EasyMesh: Download the source, compile it, and make sure that the executable is available as Easy in the path (you should be able to type Easy at the command prompt and see EasyMesh's welcome screen.
    • Triangle: Install Andreas Kloeckner's MeshPy python library, which acts as a Python interface to the Triangle mesh generator.
  • Download the MeshTools project and move the MeshToolsPlugin folder to the QGIS plugin directory (typically ~/.qgis/python/plugins/)
  • Activate the plugin in QGIS by going to Plugins / Manage Plugins, finding the entry for "Mesh Tools", checking the box, and clicking OK.

####Windows

  • Make sure you have installed QGIS using the OSGEO4W repository (this includes many of the depencies usually missing on a Windows system).
  • Install the Windows package of Andreas Kloeckner's MeshPy python library, which acts as a Python interface to the Triangle mesh generator. Currently, only the Triangle mesh generator works on Windows.
  • Download the MeshTools project and move the MeshToolsPlugin folder to the QGIS plugin directory (something like c:\Program Files\Quantum GIS Lisboa\apps\qgis\python\plugins)
  • Activate the plugin in QGIS by going to Plugins / Manage Plugins, finding the entry for "Mesh Tools", checking the box, and clicking OK.

###Usage

Generating a new mesh

Open the main dialog by clicking the "Generate Mesh" button Generate Mesh button

First, you need to decide which algorithm you want to use by selecting the entry from the first drop-down box (if you're using Windows, "Triangle" will be pre-selected and the drop-down box will be greyed out).

Triangle

The Triangle algorithm expects a geometry consisting of a bounding polygon and optionally lines and points within that polygon.

If you already have layers loaded in your QGIS project, you can select the ones you want to use for the meshing using the drop-down boxes.

If you want to create new layers, you can click the "New" button to the right of the drop-down boxes. You will be asked for a file name to save the newly created layer. After that, you will see the main QGIS window in editing mode, so you can immediately start adding new features by left-clicking on the canvas. To finish a polygon or line feature, right-click on the final point. You can then enter a value for the desired triangle element area.

To finish creating the new layer, click the "Toggle Editing" button on the main toolbar. You will be taken back to the Mesh Tools dialog.

You can then adjust the settings for the mesh quality: The maximum corner angle (highest value is 34) and the maximum triangle area. The maximum triangle area can either be set to a constant value for the entire mesh, or you can use a point layer to define different maximum triangle areas for different zones of the geometry. Note that these zones need to be separated using lines or polygons. See the Triangle homepage for more details on this.

Optionally, you can set a name for the newly created mesh. This will be used to identify the mesh layer added to the QGIS project.

You can then start the mesh generation by clicking "Generate mesh". Depending on the ratio of geometry extent and triangle size, this can take a while (no progress bar yet, sorry). Once the mesh has been generated, it is loaded into the QGIS project.

Exporting a mesh

To export a mesh, select the mesh layer in the QGIS layer manager, and then click the "Save Mesh" button Save Mesh button. You will be prompted for a location and file name to save the mesh. You can choose the output format using the drop-down box in the lower right-hand corner. To use the mesh in HydroGeoSphere, choose 2DM.

meshtools's People

Contributors

jdugge avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.