Reading CAD formats#

Examples that take a CAD file on disk and produce a PyVista dataset. Every reader is reachable through pv.read(...) once pyvista_cad is installed.

Read a 3MF package

Read a 3MF package

Read a BREP solid

Read a BREP solid

Read a DXF drawing

Read a DXF drawing

Read a FreeCAD document

Read a FreeCAD document

Read an IFC building

Read an IFC building

Read an IGES file

Read an IGES file

Compile an OpenSCAD source file

Compile an OpenSCAD source file

Read a STEP part

Read a STEP part

Writing CAD formats#

Examples that take a PyVista dataset and write it to a CAD file on disk via pyvista_cad.write_dxf() or the .cad accessor.

Write a 3MF package

Write a 3MF package

Write a BREP file

Write a BREP file

Write a DXF drawing

Write a DXF drawing

Write a faceted STEP file

Write a faceted STEP file

Bridges to CAD kernels#

Round-trip data between PyVista and the major Python CAD kernels: build123d, cadquery, raw OCP / TopoDS, gmsh, and trimesh. Each bridge attaches cad.source_format to the resulting dataset so the origin is traceable through downstream pipelines.

build123d -> PyVista

build123d -> PyVista

build123d Compound -> MultiBlock

build123d Compound -> MultiBlock

cadquery -> PyVista

cadquery -> PyVista

PyVista -> build123d

PyVista -> build123d

PyVista -> TopoDS_Compound

PyVista -> TopoDS_Compound

gmsh round-trip

gmsh round-trip

Metadata, units, and layers#

Examples that exercise the cad.* metadata schema: units handling, DXF layer splits, color groupings, and the pyvista_cad.CadMetadata bag.

Walk and filter a real IFC assembly

Walk and filter a real IFC assembly

Per-object names round-trip through 3MF

Per-object names round-trip through 3MF

Inspect a STEP assembly

Inspect a STEP assembly

Split a DXF drawing by layer

Split a DXF drawing by layer

Units and unit conversion

Units and unit conversion

End-to-end workflows#

Examples that stitch readers, writers, bridges, and metadata into realistic CAD-meets-mesh pipelines.

As-designed vs as-scanned deviation

As-designed vs as-scanned deviation

CAD shape to tetrahedral FEA mesh

CAD shape to tetrahedral FEA mesh

CAD shape to signed-distance field

CAD shape to signed-distance field

Real CAD part to a 3D-print 3MF plate

Real CAD part to a 3D-print 3MF plate

Advanced topics#

Customizing tessellation, walking nested assemblies, and running pyvista-cad in headless server environments.

CAD-friendly plotting

CAD-friendly plotting

Custom tessellation deflection

Custom tessellation deflection

Collapse an IFC building into a single UnstructuredGrid

Collapse an IFC building into a single UnstructuredGrid

Walk a real STEP assembly

Walk a real STEP assembly