docs / features / Primitive Torus
Primitive Torus
Status: Implemented

Primitive Torus creates an exact analytic torus — full or partial — swept about the +Y axis through the origin.
Walkthrough

Recorded from the running app by BREP_mcp/tests/videos/primitive-torus.json; regenerate every walkthrough with ./build.sh docs-videos.
Inputs
id(string, defaultnull) – names the history entry, the solid and its faces.majorRadius(number, default10) – distance from the centre to the tube's centreline (R), taken as a magnitude.tubeRadius(number, default2) – tube radius (r), taken as a magnitude.arc(number, default360) – sweep angle in degrees, in[-360, 360].transform(transform, default position[0, 0, 0], rotation[0, 0, 0], scale[1, 1, 1]) – placement baked into the solid before the boolean.boolean(boolean_operation, default operationNONEwith no targets andmergeCoplanarFaces: true) – optional union / subtract / intersect after creation.
Behaviour
- An
arcof0, a missing or null value, or an expression that evaluates to a non-finite number falls back to a full turn, not to a degenerate partial one. A value that is not a number or an expression string is an error. - The magnitude of
arcis clamped to[1e-6, 360]and drives the geometry. A negativearcreverses the sweep direction: the positive-arc solid is spun a half turn about X onto the opposite side. - A full torus is a single analytic face named
{id}_Side; the solid itself is named{id}. - A partial torus has six faces: four revolved tube quarters initially stamped
{id}_Sideand disambiguated on registration as{id}_Side[0]through[3], plus the start and end caps{id}_Cap0and{id}_Cap1. - Never offered by the selection context bar — it takes no references.
Limitations
- A full torus requires a positive tube radius smaller than the major radius.