Expand description
vcad — Parametric CAD in Rust
CSG modeling with multi-format export (STL, glTF, USD, DXF).
§Status
This crate is the legacy manifold-based CSG API. It is preserved as the
ergonomic Rust-facing way to script models, but the implementation will
be migrated to sit on top of the new BRep kernel (vcad-kernel) rather
than its own mesh-CSG backend.
Tracked in issue #10.
§Example
use vcad::{centered_cube, Part};
let cube = centered_cube("block", 20.0, 10.0, 5.0);
let hole = Part::cylinder("hole", 3.0, 10.0, 32).translate(0.0, 0.0, -2.5);
let result = cube.difference(&hole);
result.write_stl("block_with_hole.stl").unwrap();Re-exports§
Modules§
Structs§
- Part
- A named part with geometry.
- Part
Mesh - A triangle mesh with vertices and indices.
- Scene
- A scene containing multiple parts with different materials
- Scene
Node - A scene node containing a part with its material assignment.
Enums§
- CadError
- Errors returned by CAD operations.
Functions§
- bolt_
pattern - Create a bolt pattern (circle of holes)
- centered_
cube - Helper to create a cube centered at the origin (
Part::cubeis corner-aligned). - centered_
cylinder - Helper to create a cylinder centered at the origin (
Part::cylinderhas its base atz = 0). - counterbore_
hole - Create a counterbore hole (through hole + larger shallow hole for bolt head)