Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
W

wildmeshing-toolkit

> 编程语言
Open source

Toolkit for Meshing in the Wild

190 stars0 likes1 views
WebsiteGitHub

About

Toolkit for Meshing in the Wild

Wildmeshing-toolkit: Declarative Specification for Unstructured Mesh Editing Algorithms

Installation

via CMake

  • Clone the repository into your local machine:
bash
git clone https://github.com/wildmeshing/wildmeshing-toolkit.git
  • Compile the code using cmake>3.20.0
bash
cd wildmeshing-toolkit
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

You may need to install gmp before compiling the code. You can install gmp via homebrew.

Usage

When executing CMake, the data repository will be automatically cloned into the data folder. You can find example meshes and json files for testing there. After compiling the code, you can run the applications under the app folder, e.g. for isotropic remeshing:

bash
./build/app/wmtk_app -j data/integration_tests/isotropic_remeshing_bunny.json

About Us

This toolkit is a novel approach to describe mesh generation, mesh adaptation, and geometric modeling algorithms relying on changing mesh connectivity using a high-level abstraction. The main motivation is to enable easy customization and development of these algorithms via a declarative specification consisting of a set of per-element invariants, operation scheduling,and attribute transfer for each editing operation.

Many widely used algorithms editing surfaces and volumes can be compactly expressed with our abstraction, and their implementation within our framework is simple, automatically parallelizable on shared-memory architectures, and with guaranteed satisfaction of the prescribed invariants. These algorithms are readable and easy to customize for specific use cases.

This software library implements the abstractiona in our paper and providing automatic shared memory parallelization.

We will use the implementation of the shortest edge collapse algorithm as an example to introduce the framework and run through the basic software structures and APIs of the toolkit.

Example: Shortest Edge Collapse

Basic Algorithm

The algorithm is after [Hoppe 1996] Progressive Meshes which performs a series of collapse operations prioritizing the shorter edges. The algorithm requires only one local operation, edge collapse. We terminate when the mesh reaches a desired number of mesh elements.

We implemented class ShortestEdgeCollapse as a child class of wmtk::TriMesh. The 3d vertex positions are stored as a field of the VertexAttributes.

cpp
struct VertexAttributes
{
    Eigen::Vector3d pos;
    size_t partition_id = 0;
    bool freeze = false;
};

Explicit Invariant Design

It is common to have a set of desiderata on the mesh that needs to be satisfied, such as avoiding triangle insertions or self-intersections. The responsibility of ensuring the user-defined explicit invariants being checked after every mesh modification, and after the input is loaded is assumed by the toolkit. It is much easier to ensure correctness for the user, as the checks are handled transparently by the toolkit.

As an example of user-defined invariants, in our shortest edge collapse implementation, we created an envelope around the original surface and designated that any operation shall not cause any vertex to move outside of the envelop, so that during local operations we can roughly keep the shape of the input mesh.

…

Command Line Executions for Example Applications

To showcase the generality and effectiveness of our approach, we implemented five popular mesh editing algorithms in our framework. All algorithms are accessed through the same application wmtk_app and the user can specify which algorithm to run through the input JSON file. The five algorithms are listed below.

The JSON files are processed with the JSON Spec Engine.

  • Shortest Edge Collpase :

    • Paper: Progressive Meshes
    • shortest_edge_collapse_spec.json
  • Qslim :

    • Paper: Surface Simplification Using Quadric Error Metrics
    • qslim_spec.json
  • Isotropic Remeshing :

    • Paper: A Remeshing Approach to Multiresolution Modeling
    • isotropic_remeshing_spec.json
  • TetWild :

    • Paper: Tetrahedral Meshing in the Wild
    • tetwild_spec.json
  • TriWild :

    • Paper: Triangular Meshing in the Wild
    • triwild_spec.json

Examples for all algorithms can be found in the data repository.

License

MIT License.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++remeshingsiggraph-asia-2022

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言