Skip to main content

Crate vcad

Crate vcad 

Source
Expand description

vcad — Parametric CAD in Rust

CSG modeling with multi-format export (STL, glTF, USD, DXF).

§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§

pub use export::Material;
pub use export::Materials;

Modules§

export
Export modules for multi-format CAD output.
step
STEP file export

Structs§

Part
A named part with geometry.
Scene
A scene containing multiple parts with different materials
SceneNode
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 centered cube (manifold cubes are corner-aligned by default)
centered_cylinder
Helper to create a centered cylinder
counterbore_hole
Create a counterbore hole (through hole + larger shallow hole for bolt head)