COMPAS Forge: A high-performance Rust extension for geometry validation, mesh repair, and assembly clearance

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

1 Like

Wow!!! This is so cool! I will look into it in more detail soon, but what I saw so far looks great!

We will organize a COMPAS Dev Exchange meetup in October (tentatively 15th, but it’s not yet defined), and if you’re interested, it would be great if you can present COMPAS Forge

Let me know what you think!

Cheers!

Gonzalo

1 Like

Hi Gonzalo,

Thank you very much for your kind words and the invitation!

I’d be delighted to present COMPAS Forge at the COMPAS Dev Exchange. It would be a great opportunity to introduce the project, demonstrate its current capabilities, and receive valuable feedback from the community.

Please let me know once the date and format are confirmed, and I’ll be happy to prepare a short presentation and live demonstration.

COMPAS Forge is still in its early stages (v0.1.0), so I’m especially interested in feedback, suggestions, and discussions about possible integrations with the broader COMPAS ecosystem. I’m looking forward to learning from the community and improving the project accordingly.

Thanks again, and I’m looking forward to hearing more about the event.

Cheers,

Mohammad Amin