OpenVCAD Python documentation

Note

Learn more about the OpenVCAD project at matterassembly.org/openvcad.

OpenVCAD is an open-source volumetric multi-material geometry compiler that bridges the gap between modern multi-material 3D printing capabilities and computer-aided design (CAD) tools. OpenVCAD offers a novel workflow for designing objects with complex material distributions, enabling applications in fields like lattices, meta-materials, medical image printing, and robotics.

How OpenVCAD works

OpenVCAD integrates a parametric modeling Python package with compilers to articulate and generate volumetric designs. Its core workflow involves the following steps:

  1. Modeling: Designers use the pyvcad library to create models defined as a hierarchical tree structure of geometry and material nodes.

  2. Compilation: The model scripts are processed by an OpenVCAD compiler module, which generates volumetric output formats.

  3. Export: The output can be exported to formats like PNG stacks for Inkjet 3D printing, FEA meshes for simulation, or meshes for FFF.

The hierarchical tree structure enables efficient and complex designs, supporting features like:

  • Material Transitions: Gradual transitions between different material properties within the same object.

  • Fully Implicit Representation: Both geometry and material can be represented implicitly, enabling OpenVCAD to scale to printing systems that require the definition of hundreds of billions of voxels.

  • Digital Alloying: Combining materials at a low level for intricate compositions.

  • Blending: Blend (via convolution) across complex multi-material interfaces to create smooth gradations.

  • Image-Based Processing: Using image inputs for spatial material distributions (e.g., medical image processing).

What OpenVCAD is Not

OpenVCAD is not a voxel design tool. Although OpenVCAD can be used to generate voxel-based outputs, it is an implicit modeling system that allows for the creation of complex geometries and material distributions without the need to explicitly define every voxel. OpenVCAD expresses multi-material gradients using math expressions, allowing for high-level design that scales to printing systems that require hundreds of billions of voxels.

Supported Inputs in OpenVCAD

OpenVCAD is designed to handle a wide range of input types, enabling versatile workflows for complex multi-material designs.

Supported Input Formats

Category

Supported Inputs

Geometry

  • Meshes

  • .STEP CAD files

  • FEA Simulation Results

  • DICOM Medical Scans

  • Implicit Surfaces

  • Voxels (OpenVDB and NanoVDB)

Materials

  • Math expressions

  • Custom C++ or Python functions

  • Blending

  • DICOM Medical Scans

  • Voxels (OpenVDB and NanoVDB)


Supported Design Outputs in OpenVCAD

OpenVCAD provides a variety of output formats tailored for different workflows, ranging from 3D printing to simulation and rendering.

Supported Output Formats

Category

Output Types

3D Printing

PNG stacks (suitable for inkjet systems)

Simulation Preparation

FEA Simulation Input Files with material assignments (compatible with ABAQUS)

Voxel-based Outputs

Voxel Grids (OpenVDB and NanoVDB)

Visualization

Rendering/Preview (supports both surface and volumetric representations)

Academic Papers

  1. OpenVCAD: An open source volumetric multi-material geometry compiler DOI: 10.1016/j.addma.2023.103912 | Pre-print PDF

  2. Implicit Toolpath Generation for Functionally Graded Additive Manufacturing via Gradient-Aware Slicing Pre-print