SVMTK

      Comments Off on SVMTK

Description

SVMTK is an open-source C++/Python library dedicated to geometry processing and 3D mesh generation. It provides tools for manipulating triangulated surfaces, repairing and transforming geometries, and generating tetrahedral volume meshes from surface meshes. Built on computational geometry libraries such as CGAL, SVMTK simplifies the preparation of models for numerical simulations, including finite element analysis, computational mechanics, biomodeling, and scientific computing.

Set up the environment

ml math/svmtk
  • Available version(s):2.0-py311 (Python 3.11) — default
  • Installing additional Python packages is not supported.
  • There is no need to load the corresponding Python module,

Tutorial

Displaying the version

ml math/svmtk
python -c "import importlib.metadata; print(importlib.metadata.version('SVMTK'))"

Use case: Computing the area of a triangle

  • Create the following triangle.stl file:
solid triangle
  facet normal 0 0 1
    outer loop
      vertex 0 0 0
      vertex 1 0 0
      vertex 0 1 0
    endloop
  endfacet
endsolid triangle
  • Create the following Python script read_surface.py:
import SVMTK
surface = SVMTK.Surface("triangle.stl")
print(f"Surface area: {surface.area():.6f}")
  • Run in a job:
ml math/svmtk
srun python3 read_surface.py

Documentation