How opengeometry-io/opengeometry works
Project type and purpose
• This is a multi-package, cross-platform CAD Kernel library for the Web (“OpenGeometry”).
• The core is written in Rust (a CAD kernel with primitives, B-Rep, operations).
• There are multiple JavaScript/TypeScript bindings and render-integration packages: Three.js, Babylon.js, raw WebGL.
• Bundlers (Rollup, Vite) at the root build and package these modules for web consumption.
File structure
• Top-level:
• package.json, rollup.config.js, vite.config.js, tsconfig.json → configuration for building/publishing JS modules.
• main/opengeometry (Rust crate with Cargo.toml, source in src/) → core CAD kernel.
• main/opengeometry-three (TS wrapper targeting Three.js)
• main/opengeometry-babylon (TS wrapper targeting Babylon.js)
• main/opengeometry-webgl (TS wrapper with raw WebGL)
• test/index.html → simple test harness.
• Each “opengeometry-xxx” folder has its own package.json, source code, and likely imports the compiled WASM.
README for additional insights
• The library is under active development.
• Documentation and demos exist externally.
• It’s meant to be a drop-in CAD kernel with multiple rendering backends.
Elements
• from Rust Core → TS Binding (WASM import)
• from TS Binding → each integration package
• from each integration package → Bundler
• from Bundler → Web App (runtime).
• TS layers in another
• external engines (Three.js, Babylon.js, WebGL) in a third
• build tools in a fourth.
Detail
• Flow of artifacts (cargo build → .wasm/.js → npm publish → rollup input → browser bundle).