Primitive catalog#

Every OpenVCAD design starts from leaf nodes: the primitives at the bottom of the tree that define geometry. This page shows each one with a render, a link to its Python API entry, and the example script it came from. Where a primitive has more than one useful form, use the arrows on its image to step through them.

Leaves combine with booleans, transforms and the other operations in this section, and each one carries attributes like any other node. If those are new to you, start with Getting Started. Every example lives in examples/geometry/ and runs on its own.

Basic solids#

RectPrism

A box from a center and size, or from two corners with RectPrism.FromMinAndMax.

rect_prism.py

Cylinder

Always upright along Z; wrap it in Rotate to tip it over.

cylinder.py

Cone

Tip at the origin, opening along -Y. The angle is the half-angle in radians.

cone.py

Torus

Lies in the XY plane, centered on the origin.

torus.py

Strut

A rod between two points: a capsule, or a tapered rod with a sphere, hemisphere or flat cap at each end.

strut.py

Implicit functions#

Function

Any implicit surface from a math expression or a Python callable, cut to a bounding box.

function.py

Profiles, curves and text#

These leaves build solids from 2D outlines and 3D curves. Curves, profiles and sweeps covers them in depth, including grading material along a path.

Text

Extruded text in a system font, on one or more lines.

text.py

PolygonExtrude

A prism from a list of coplanar 3D points.

polygon_extrude.py

PolygonRevolve

A solid of revolution from 3D points, about any axis.

polygon_revolve.py

Extrude

A 2D Profile lifted from its sketch plane, with optional draft, twist and a wall offset law.

extrude.py

Revolve

A 2D Profile spun about an axis in its sketch plane (Z by default), fully or through part of a turn.

revolve.py

Sweep

A 2D Profile carried along a 3D curve, with optional scale and twist along the way.

sweep.py

Loft

A blend between 2D Profile sections at chosen heights, even between different shapes and topologies.

loft.py

Tube

A round section along a curve, with rounded or flat ends. The radius can vary along its length.

tube.py

Lattices#

Tip

Building a lattice? Start with the Metamaterials guides. The pyvcad_metamaterials package builds TPMS, strut, plate and stochastic lattices, fills parts with them, grades them, and maps them onto curved surfaces. The TPMS and lattice catalog shows every built-in cell.

The two leaves below are lower level. They describe a beam lattice one beam at a time, written by hand or read from a 3MF file. Reach for them when you already have explicit node and beam lists, such as a lattice designed in another tool.

BeamLattice

Beams indexed into one shared vertex list, with optional tapering and balls at the nodes.

beam_lattice.py

ThreeMFBeamLattice

A lattice imported from a 3MF file that uses the Beam Lattice Extension. See Importing 3MF beam lattices.

three_mf_beam_lattice.py

Imported and sampled geometry#

These leaves bring in geometry made elsewhere. The Imported geometry section covers them in more detail.

Mesh

A closed triangle mesh from a file or a SurfaceMesh, converted to a signed distance field.

meshes/3D_benchy.py

TexturedMesh

A colored 3MF or OBJ model; this one is an OBJ with an image texture. Its colors become a COLOR_RGBA field. See Importing textured solids.

textured_mesh/02_bison_texture.py

SignedDistanceField

A distance or occupancy grid from an OpenVDB file or grid. The render compares an original part with copies rebuilt at three smoothing levels.

signed_distance_field/vdb_roundtrip_smoothing.py

SurfaceReliefVolume

Raised relief on a selected patch of a mesh or CAD surface, from an image or a function. See Physical surface relief.

surface_relief/functional_wave_relief.py