Examples | PY
Overview
Practical examples demonstrating trueform with Python.
Try trueform without installing anything. The live examples run booleans, mesh registration, isobands, and more in your browser.
Running the Examples
pip install trueform
git clone https://github.com/polydera/trueform.git
cd trueform/python/examples
| Script | Description |
|---|---|
| alignment.py | Point cloud alignment with rigid, OBB, and ICP |
| raycast_render.py | Batch ray cast rendering with Lambertian shading |
Interactive VTK Examples
The vtk/ directory contains interactive applications. Each opens a window where you can drag meshes and see results update in real time.
pip install vtk
| Script | Description |
|---|---|
| alignment.py | Interactive mesh registration with OBB + ICP |
| collision.py | 5×5 grid of meshes — hover to highlight, drag to move, collisions turn cyan |
| boolean_difference.py | Dual viewport showing inputs and boolean result |
| cross_section.py | Cutting plane with filled cross-section polygons |
| intersection_curves.py | Real-time mesh-mesh intersection curves |
| isobands.py | Extract regions between scalar thresholds |
| isocontours.py | Extract contour curves at scalar thresholds |
| remeshing.py | Remesh pipeline: decimate then isotropic remesh |
Guided Examples
Step-by-step walkthroughs in the documentation:
