Hi everyone,
I’d like to share an open-source project I’ve been developing for the COMPAS ecosystem: COMPAS Forge.
While working on computational design, digital fabrication, and robotic assembly workflows, I frequently encountered geometry issues—such as non-manifold boundaries, duplicate vertices, inconsistent face orientations, and assembly clearance problems—that could propagate downstream into robotic planning, fabrication pipelines, or simulation tools.
To simplify these verification steps and make them easier to integrate into Python workflows, I started developing COMPAS Forge: a Rust-backed geometry verification and fabrication preflight library with a Python interface.
The goal is not to replace existing COMPAS functionality, but rather to complement the ecosystem with native-performance tools for geometry validation, repair, and manufacturing-oriented preflight checks.
Current Features
-
High-performance Rust backend exposed to Python using PyO3 and Maturin
-
Geometry and topology validation
-
Detection of non-manifold and boundary edges
-
Duplicate vertex detection
-
Automatic mesh repair (vertex welding and face orientation correction)
-
Assembly collision and clearance checking
-
Interactive HTML reports with an embedded Three.js viewer
-
Python API for integration into COMPAS, Rhino, Grasshopper, and Blender workflows
-
Command-line interface for batch processing
Technology Stack
The project currently uses several Rust libraries, including:
-
simd-json for efficient JSON parsing
-
Rayon for parallel topology analysis
-
rstar for broad-phase spatial indexing
-
parry3d-f64 for exact geometric distance and intersection queries
-
Three.js for interactive HTML visualization
The computationally intensive algorithms run natively in Rust while remaining accessible through a straightforward Python API.
Installation
pip install compas-forge
Project Links
The GitHub repository includes installation instructions, Python API examples, CLI usage, implementation details, and documentation.
I’d really appreciate any feedback or suggestions from the community.
Thank you for reading.
— Mohammad Amin Moradi
