Code Monkey home page Code Monkey logo

mmgig's Introduction

mmgig: MmgTools in Graphite

This is a Graphite plugin that links with the MmgTools remeshing library.

The implementation includes wrappers for the mmgs and mmg3d remeshing functions. See the MmgTools documentation for more details on the options.

Install

First, you need to clone and build MmgTools with the BUILD_SHARED_LIBS option ON

git clone https://github.com/MmgTools/mmg.git /path/to/mmg
cd /path/to/mmg
mkdir build
cd build
cmake .. -DBUILD_SHARED_LIBS=ON
make -j

Assuming that you have a working Graphite setup, the steps to install this plugin are:

// get the plugin source code
mkdir /path/to/this/plugin
git clone https://github.com/mxncr/mmgig.git /path/to/this/plugin

// tell graphite to build the new plugin
ln -s /path/to/this/plugin /path/to/graphite/plugins/OGF/mmgig
echo "add_subdirectory(mmgig)" >> /path/to/graphite/plugins/OGF/Plugins.txt

Next important is step is to tell this plugin where mmg is. In the CMakeLists.txt, ensure the variables MMG_DIR, MMG_INCLUDE_DIR and MMG_LIBRARY are set to the right locations.

Now you should:

  • configure and build Graphite (which will build this plugin)
  • launch Graphite, go to Files > Preferences > Plugins, enter mmgig and click Add, then Save configuration file
  • restart Graphite, from now on you should have the mmgig plugin working (right click on a mesh in Scene and check if the MmgTools command menu is present)

Details

The input GEO::Mesh is converted into a MMG5_pMesh, then mmg remeshing functions are called and the result is converted back into a GEO::Mesh.

If the GEO::Mesh contains a vertex attribute (a double at each vertex), this field can be used to prescribe the mesh size locally for mmg algorithms.

Available wrappers exposed in algo/mmg_wrapper.h and in the MmgTools menu:

  • mmgs_tri_remesh(..) is a wrapper over MMGS_mmgslib(..)
  • mmg3d_tet_remesh(..) is a wrapper over MMG3D_mmg3dlib(..)
  • mmg3d_extract_iso(..) is a wrapper over MMG3D_mmg3dls(..)

Screenshot

Tetrahedral remeshing with prescribed cell size :

Todo / not supported

  • Wrapper for remeshing with anisotropic metric (one symmetric matrix per vertex)

  • Wrapper for 2D remeshing (mmg2d)

mmgig's People

Contributors

antoinemazuyer avatar mxncr avatar

Watchers

 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.