Skip to main content

Module geom

Module geom 

Source
Expand description

Bridge to the cadvm-geom C++/OCCT helper (Step 2: geometric diff).

The Rust core stays pure Rust: it shells out to a standalone C++ executable (cadvm-geom, built from cpp/) and parses its JSON output. This keeps the heavy Open CASCADE dependency isolated in a single subprocess with a narrow, stable contract.

The binary is located via the CADVM_GEOM_BIN environment variable, falling back to cadvm-geom on PATH.

Structs§

BBox
An axis-aligned bounding box.
FaceTopo
Topological (face-to-face) classification counts.
GeomDiff
The geometric comparison of two STEP shapes, as reported by cadvm-geom.
Mesh
A flat-shaded triangle soup: every 9 floats in positions is one triangle, with a matching per-vertex normal in normals.
MeshDiff
Tessellated geometric diff produced by cadvm-geom mesh.
MeshLayers
The mesh layers of a geometric diff, classified per face: the faces of the new part that are unchanged or added, and the faces of the old part that were removed.
PieceMetrics
Metrics for a boolean-result piece (added/removed/common).
ShapeMetrics
Full metrics for one input shape.

Constants§

ENV_GEOM_BIN
Environment variable pointing at the cadvm-geom executable.

Functions§

binary_path
Resolve the path to the cadvm-geom binary.
diff_files
Run the geometric diff between two STEP files using the configured binary.
diff_files_with
Run the geometric diff using an explicit binary path (used by tests).
mesh_files
Tessellate the geometric diff of two STEP files, writing the mesh JSON to out_json and returning the parsed result.
mesh_files_with
Like mesh_files but with an explicit binary path (used by tests).