Skip to content
Table of contents

PolyFEMBlenderPlugin

PolyFEMBlenderPlugin is an experimental Blender extension that turns selected objects, materials and contact settings into a PolyFEM JSON setup and runs the finite-element simulation without leaving Blender. It was written for the ÉTS lab’s simulation work and is published under ETSim, for people who prepare scenes in Blender but solve them with PolyFEM.

Blender add-onDocker
PythonBlender 4.2PolyFEMTetWildmeshioGitHub Actions
  • Updated

1. Overview

polyfem/__init__.py registers one panel, the property groups and the operators. On registration it also installs meshio with pip into Blender’s user modules folder.

  • polyfem/panels/polyfem_json.py draws the PolyFEM panel in the Physics tab of the Properties editor: execution mode (Docker or executable) for PolyFEM and TetWild, the selected objects with their materials and export format, then collapsible sections for export, contact, time, space, boundary conditions, materials, solver and output settings.
  • polyfem/operators/create_polyfem_json.py exports each mesh (STL, OBJ, or MSH through TetWild) and writes the PolyFEM JSON file with geometry, materials, contact, time, boundary_conditions, solver and output blocks.
  • polyfem/operators/run_polyfem.py starts PolyFEM in a background thread, either docker run antoinebou12/polyfem --json /data/<file> with the project folder mounted on /data, or a local executable. Its Render Animation operator reads the step_*.vtu results, adds the solution displacement, converts each step to OBJ with meshio and keyframes the visibility of each imported mesh.
  • polyfem/properties/polyfem.py holds the settings, including material presets (steel, copper, aluminium and others), integrators (implicit Euler, explicit Euler, implicit Newmark) and Eigen linear solvers.

2. Use cases

Blender add-on that turns a scene into a PolyFEM JSON setup and runs the simulation from Blender.

Use-case diagram for PolyFEMBlenderPlugin: Assign FEM materials; Create PolyFEM JSON; Tetrahedralize with TetWild; Run the simulation; Import results as animation; Pull solver imagesPolyFEMBlenderPluginAssign FEM materialsCreate PolyFEM JSONTetrahedralize with TetWildRun the simulationImport results as animationPull solver imagesSimulation user«system»Docker images«system»PolyFEM solver
People on the left, external systems on the right; each oval is a use case backed by the files cited below.
Assign FEM materials
Simulation user

The Apply Material operator stores Young's modulus, Poisson's ratio and density on the selected objects from a preset list such as Steel or Aluminum.

Create PolyFEM JSON
Simulation user

Create PolyFEM JSON exports each mesh and writes geometry, materials, contact, time, boundary-condition, solver and output blocks to one JSON file.

Tetrahedralize with TetWild
Simulation userDocker images

With the MSH export type, the object is written as STL and converted to .msh by the yixinhu/tetwild image or a local TetWild executable.

Run the simulation
Simulation userDocker imagesPolyFEM solver

Run PolyFem Simulation calls docker run antoinebou12/polyfem --json with the project folder mounted on /data, or a local PolyFEM executable, in a background thread.

Import results as animation
Simulation userPolyFEM solver

Render Animation reads step_*.vtu files, adds the solution displacement, converts each step to OBJ with meshio and keyframes its visibility.

Pull solver images
Simulation userDocker images

The Pull Docker Image buttons check that Docker is installed and run docker pull for the configured TetWild or PolyFEM image.

2.1. Scenario: Simulate a contact scene and play it back in Blender

  1. Install the zipped polyfem folder through Edit > Preferences > Add-ons and enable PolyFem.
  2. In Properties > Physics > PolyFEM, choose Docker execution and pull antoinebou12/polyfem and yixinhu/tetwild.
  3. Select the meshes, apply a material preset and set contact, time step and end time.
  4. Click Create JSON Configuration to write the meshes and the JSON file to the export path.
  5. Click Run PolyFem Simulation, then Render Animation to import the step_*.vtu results as keyframed meshes.

Files readREADME.mdpolyfem/__init__.pypolyfem/blender_manifest.tomlpolyfem/operators/create_polyfem_json.pypolyfem/operators/run_polyfem.pypolyfem/panels/polyfem_json.pypolyfem/properties/polyfem.py.github/workflows/build.ymlLICENSE

3. Getting started

The README installs the add-on from a zip of the polyfem/ folder: Edit > Preferences > Add-ons > Install, then enable PolyFem. Blender 4.2 or later is required by blender_manifest.toml. The default execution mode uses Docker:

docker pull yixinhu/tetwild:latest
docker pull antoinebou12/polyfem:latest

The CI workflow builds the extension package with Blender’s own command:

blender --command extension build --source-dir polyfem --output-dir docs
blender --command extension server-generate --repo-dir=docs --html

4. Repository guide

  • polyfem/ is the extension itself (blender_manifest.toml, __init__.py, operators/, panels/, properties/).
  • polyfem/operators/create_polyfem_json.py handles mesh export, TetWild, materials, Docker image pulls and the JSON file.
  • polyfem/operators/run_polyfem.py runs PolyFEM, imports results, opens the PolyFEM documentation and clears the cache.
  • polyfem/properties/polyfem.py defines every panel field and preset.
  • .github/workflows/build.yml builds the extension zip and an extension repository index (docs/index.json), then deploys docs/ to the gh-pages branch.
  • docs/ holds built packages polyfem-1.0.10.zip and polyfem-1.0.11.zip with their index.
  • zip-plugin.py and download-wheels.py are helper scripts to zip the add-on and download wheels for meshio, trimesh and tetgen.

5. Features

  • Assign elastic material properties (E, ν, ρ) to objects from presets or custom values.
  • Export meshes to STL or OBJ, or tetrahedralize them to MSH with TetWild in Docker or as a local executable.
  • Set contact (dhat, friction coefficient, epsv), time integration, boundary-condition method and right-hand side, linear solver and ParaView output options.
  • Write a complete PolyFEM JSON file, with optional export of selected objects only.
  • Run PolyFEM through Docker or a local executable without blocking the Blender interface.
  • Import VTU time steps back as a keyframed mesh sequence.

6. Limits

  • The README calls the add-on experimental and lists crashes with complex geometry and mesh-export edge cases as known issues.
  • The panel is registered in the Properties editor’s Physics tab, while the README describes a 3D Viewport sidebar tab.
  • FBX and glTF appear in the export menu but the operator rejects them.
  • blender_manifest.toml lists only windows-x64 as a platform, and the add-on needs Docker or local PolyFEM and TetWild builds.
  • The README states GPL-3.0, while LICENSE and the manifest state MIT.
  • The README badges and file tree refer to an older repository name and to a panels/poly_fem.py file that is not in the tree.
  • There are no tests. The workflow only builds and publishes the package.

7. Sources

8. CI/CD pipeline

1 GitHub Actions workflow, 2 jobs. Each box is a job; double-bordered boxes publish or deploy, and arrows follow needs.

Mermaid Pipeline flow
flowchart LR
  subgraph wf0["Build and Deploy Add-on"]
    direction LR
    wf0_Generate_Matrix["Generate_Matrix<br/>ubuntu-latest"]
    wf0_build[["build<br/>ubuntu-latest"]]
  end
  t0(["push · manual run"])
  d0[("GitHub Pages")]
  t0 --> wf0_Generate_Matrix
  wf0_Generate_Matrix --> wf0_build
  wf0_build -.-> d0
Workflows, triggers, jobs and targets
WorkflowTriggersJobsPublishes to
Build and Deploy Add-on
.github/workflows/build.yml
push, manual run
  • Generate_Matrix ubuntu-latest
    Checkout Repository · Generate Tests Matrix
  • build ← Generate_Matrix ubuntu-latest
    Checkout Repository · Cache Blender Binary · Download Blender · Add Blender to PATH · Build Addon and Move to Docs · Upload Blender Add-on ZIP
GitHub Pages

Generated from the source at commit 70794d3.

9. Deployment diagram

Mermaid Deployment diagram
flowchart LR
  repo[("GitHub repository")]
  ci[["GitHub Actions<br/>1 workflow"]]
  pub_GitHub_Pages[("GitHub Pages")]
  repo -->|"push or pull request"| ci
  ci -->|"publishes"| pub_GitHub_Pages

10. External dependencies

6 declared packages (6 runtime, 0 development) in polyfem/pyproject.toml, polyfem/requirements.txt.

Package table 6
External dependencies
PackageVersionScopePurposeRegistry
tetgen^0.6.5runtimePython interface to tetgenpypi.org
meshio^5.3.5runtimeGraphics, imaging and 3Dpypi.org
trimesh^4.4.9runtimeGraphics, imaging and 3Dpypi.org
rich^13.9.1runtimeCommand linepypi.org
sympy==1.13.3runtimeComputer algebra system (CAS) in Pythonpypi.org
noise==1.2.2runtimePerlin noise for Pythonpypi.org

11. Glossary

Repository

The versioned source files, configuration, and history of a project.

README

The repository’s entry document, usually covering its purpose and initial setup.

Dependency

A library, tool, or service that another component needs to build or run.

HTTP

A request-and-response protocol used by browsers and web services. A method, path, headers, and optional body describe a request.

Container

An isolated process environment created from an image. Persistent data needs storage outside the container’s disposable filesystem.

Volume and bind mount

A volume is storage managed by the container platform; a bind mount exposes a chosen host path inside a container.

Published port

A host port mapped to a service’s container port. Publishing a port can expose that service beyond its container network.

CLI

A text interface in which commands and arguments select operations. Exit codes let scripts detect success or failure.

Build

The steps that turn source files and dependencies into a runnable program or distributable artifact.

Continuous integration

Automated checks that run when source changes, such as building, testing, and linting. Passing checks cover only what those checks exercise.

GPU

A processor designed for parallel workloads, including graphics rendering and many numerical operations.

Mesh

A surface represented by vertices and connected elements, often triangles. Its geometry is distinct from its material or texture.

12. References

  1. PolyFEM. (2026, November 5). [Web page] polyfem.github.io.
  2. ETSim. (2026, November 5). [Web page] github.com.
  3. ETSim. (2026, November 5). PolyFEMBlenderPlugin. [Software repository] github.com.
  4. ETSim. (2026, November 5). README. [Source file or documentation] github.com.
  5. ETSim. (2026, November 5). polyfem/blender_manifest.toml. [Source file or documentation] github.com.
  6. ETSim. (2026, November 5). polyfem/operators/create_polyfem_json.py. [Source file or documentation] github.com.
  7. ETSim. (2026, November 5). polyfem/operators/run_polyfem.py. [Source file or documentation] github.com.
  8. ETSim. (2026, November 5). .github/workflows/build.yml. [Source file or documentation] github.com.

Sources without a publication date show the date they were last checked, November 5, 2026. File links retain the inspected revision where available.