Git Product home page Git Product logo

Build

UltiMaille: the ultimate mesh handling library

This library does not contain any ready-to-execute remeshing algorithms. It simply provides a friendly way to manipulate a surface/volume mesh, it is meant to be used by your geometry processing software. Here you will find serialization, attributes, basic algebra, helpers like k-NN queries and few other things.

There are many mesh processing libraries in the wild, excellent specimens are:

I am, however, not satisfied with either of those. At the moment of this writing, Geogram, for instance, has 847 thousands (sic!) of lines of code. I strive to make a library under 10K loc able to do common mesh handling tasks for surfaces and volumes. Another reason to create yet-another-mesh-library is that I like explicit types and avoid auto as long as it reasonable. In practice it means that I cannot use libigl for the simple reason that I do not know what this data represents:

Eigen::MatrixXd V;
Eigen::MatrixXi F;

Is it a polygonal surface or a tetrahedral mesh? If surface, is it triangulated or is it a generic polygonal mesh? I simply can not tell... Thus, ultimaille provides several classes that allow to represent meshes:

PointSet
PolyLine
Triangles, Quads, Polygons
Tetrahedra, Hexahedra, Wedges, Pyramids

You can not mix tetrahedra and hexahedra in a single mesh, I believe that it is confusing to do otherwise. If you need a mixed mesh, create a separate mesh for each cell type: these classes allow to share a common set of vertices via a std::shared_ptr.

Common principles

  • This library is meant to have a reasonable performance. It means that I strive to make it as rapid as possible as long as it does not deteriorate the readability of the source code.
  • All the library is built around STL containers (mainly std::vector<int>), normally it will have no malloc/free/new/delete instructions.
  • Despite that, there will be no size_t and iterator:: in the code. An int is an int. End of discussion.
  • There will be as little templates as it is reasonable, the default data types are int and double.

Compile and run unit tests:

git clone --recurse-submodules https://github.com/ssloy/ultimaille.git &&
cd ultimaille &&
mkdir build &&
cd build &&
cmake -DUM_UNIT_TESTS:BOOL=ON .. &&
make -j &&
ctest .

ultimaille's Projects

stlbfgs icon stlbfgs

C++ L-BFGS implementation using plain STL

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.