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.
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.pydraws 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.pyexports each mesh (STL, OBJ, or MSH through TetWild) and writes the PolyFEM JSON file withgeometry,materials,contact,time,boundary_conditions,solverandoutputblocks.polyfem/operators/run_polyfem.pystarts PolyFEM in a background thread, eitherdocker run antoinebou12/polyfem --json /data/<file>with the project folder mounted on/data, or a local executable. Its Render Animation operator reads thestep_*.vturesults, adds thesolutiondisplacement, converts each step to OBJ with meshio and keyframes the visibility of each imported mesh.polyfem/properties/polyfem.pyholds 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.
- 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
- Install the zipped polyfem folder through Edit > Preferences > Add-ons and enable PolyFem.
- In Properties > Physics > PolyFEM, choose Docker execution and pull antoinebou12/polyfem and yixinhu/tetwild.
- Select the meshes, apply a material preset and set contact, time step and end time.
- Click Create JSON Configuration to write the meshes and the JSON file to the export path.
- 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.pyhandles mesh export, TetWild, materials, Docker image pulls and the JSON file.polyfem/operators/run_polyfem.pyruns PolyFEM, imports results, opens the PolyFEM documentation and clears the cache.polyfem/properties/polyfem.pydefines every panel field and preset..github/workflows/build.ymlbuilds the extension zip and an extension repository index (docs/index.json), then deploysdocs/to thegh-pagesbranch.docs/holds built packagespolyfem-1.0.10.zipandpolyfem-1.0.11.zipwith their index.zip-plugin.pyanddownload-wheels.pyare 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.tomllists onlywindows-x64as a platform, and the add-on needs Docker or local PolyFEM and TetWild builds.- The README states GPL-3.0, while
LICENSEand the manifest state MIT. - The README badges and file tree refer to an older repository name and to a
panels/poly_fem.pyfile that is not in the tree. - There are no tests. The workflow only builds and publishes the package.
7. Sources
- GitHub repository
- README
polyfem/blender_manifest.tomlpolyfem/operators/create_polyfem_json.pypolyfem/operators/run_polyfem.py.github/workflows/build.yml
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
| Workflow | Triggers | Jobs | Publishes to |
|---|---|---|---|
Build and Deploy Add-on.github/workflows/build.yml | push, manual run |
| 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
| Package | Version | Scope | Purpose | Registry |
|---|---|---|---|---|
tetgen | ^0.6.5 | runtime | Python interface to tetgen | pypi.org |
meshio | ^5.3.5 | runtime | Graphics, imaging and 3D | pypi.org |
trimesh | ^4.4.9 | runtime | Graphics, imaging and 3D | pypi.org |
rich | ^13.9.1 | runtime | Command line | pypi.org |
sympy | ==1.13.3 | runtime | Computer algebra system (CAS) in Python | pypi.org |
noise | ==1.2.2 | runtime | Perlin noise for Python | pypi.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
- PolyFEM. (2026, November 5). [Web page] polyfem.github.io.
- ETSim. (2026, November 5). [Web page] github.com.
- ETSim. (2026, November 5). PolyFEMBlenderPlugin. [Software repository] github.com.
- ETSim. (2026, November 5). README. [Source file or documentation] github.com.
- ETSim. (2026, November 5). polyfem/blender_manifest.toml. [Source file or documentation] github.com.
- ETSim. (2026, November 5). polyfem/operators/create_polyfem_json.py. [Source file or documentation] github.com.
- ETSim. (2026, November 5). polyfem/operators/run_polyfem.py. [Source file or documentation] github.com.
- 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.