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
ScriptDescription
alignment.pyPoint cloud alignment with rigid, OBB, and ICP
raycast_render.pyBatch 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
ScriptDescription
alignment.pyInteractive mesh registration with OBB + ICP
collision.py5×5 grid of meshes — hover to highlight, drag to move, collisions turn cyan
boolean_difference.pyDual viewport showing inputs and boolean result
cross_section.pyCutting plane with filled cross-section polygons
intersection_curves.pyReal-time mesh-mesh intersection curves
isobands.pyExtract regions between scalar thresholds
isocontours.pyExtract contour curves at scalar thresholds
remeshing.pyRemesh pipeline: decimate then isotropic remesh

Guided Examples

Step-by-step walkthroughs in the documentation:

Core Functionality

Primitives, spatial queries, topology, and boolean operations.

Raycast Rendering

Batch ray casting, face normal shading, and matplotlib rendering.

VTK Integration

Converting between VTK and trueform, building interactive applications.