springrep 1.0.0: An Open-Source B-rep CAD Kernel in Rust

Overview of springrep

springrep is a new boundary-representation (B-rep) CAD kernel designed to provide exact geometric modeling in pure Rust. By utilizing analytic surfaces and NURBS rather than mesh-based approximations, the kernel ensures that volume, area, and mass properties are derived from precise mathematical shapes. It is built without unsafe code or external dependencies, supports WebAssembly compilation, and emphasizes strict validation to prevent the propagation of invalid geometry.

Performance and Conformance

According to the brep-conformance leaderboard, springrep achieves a 100% pass rate on 3,487 test cases, outperforming existing alternatives like OpenCASCADE, Arris, and Solidcore. The kernel is engineered for high-speed operations, with a median processing time of 87.3 ms in recent benchmarks. Unlike traditional kernels that may produce broken solids, springrep enforces strict validity checks, returning errors if a geometric operation fails to meet defined criteria.

Technical Architecture

springrep is written in pure Rust, which allows for memory safety and easy integration into modern software stacks. Key features include:

  • Exact Geometry: Accurate to 1e-7 mm, ensuring high-precision output for robotics and engineering applications.
  • Validation: Every result is checked for validity, ensuring that downstream processes do not build upon corrupted data.
  • Portability: The kernel compiles to WebAssembly, making it suitable for browser-based CAD tools or cross-platform robotics software.
  • API Design: The library provides a straightforward interface for common operations such as boolean differences, fillets, extrusions, and STEP file exports.

Community Discussion and Insights

Discussion surrounding the project has focused on the challenges of B-rep kernel development and the competitive landscape of Rust-based CAD tools.

Regarding the competitive landscape, some users have questioned how springrep differentiates itself from existing projects like Solidcore. One commenter noted the difficulty of evaluating CAD kernels based solely on performance tables:

"Your performance table is treating brep-conformance like it's some kind of backend server that processes x requests per n seconds, but that's not how geometry kernels work. How does this enable faster/smoother workflow than solidcore? Can you demonstrate that with a side-by-side video? No one, not even people who work with CAD all day can understand any benefits this has from a table."

Others highlighted the potential for AI-assisted development in complex geometric domains, noting that while B-rep kernels require significant human engineering, LLMs can assist in managing the complex underlying mathematics required for robust geometry engines.

Sources