Torus

A 3D torus mesh.

What it does

Torus builds a ring-shaped mesh from two radii. Major Radius sets the distance from the centre to the middle of the tube, Minor Radius the thickness of the tube itself. Major Segments and Minor Segments set how finely the two circles are tessellated, trading smoothness for vertex count.

Turn Analytical on to emit the torus as an analytic shape rather than a tessellated mesh: resolution-independent, and ready for Distance Field booleans with other shapes. In that mode Major Segments and Minor Segments have no effect, since there is no tessellation to control.

When to use it

ParameterTypeDefault
fillOneOf([Color, FieldOf(Color), ColorArray, Field, Material, MaterialArray, RasterArray])
major_radiusNumber100
minor_radiusNumber30
major_segmentsNumber48
minor_segmentsNumber24
analyticalBooleanfalse
positionVec3(0, 0, 0)
rotationVec3(0, 0, 0)
scaleVec3(1, 1, 1)
anchorVec3(0, 0, 0)
opacityNumber1

Gotchas

The torus's ring sits in the local XZ plane. Under rotation, the identity it carries for downstream shape operations such as Distance Field booleans only survives at zero rotation. Treat a rotated tessellated torus as a plain mesh rather than a live analytic ring.

Minor Radius is the tube thickness, not its diameter. A Minor Radius half the size of Major Radius gives a fairly fat donut.

Major Segments and Minor Segments only affect the tessellated mesh, and are ignored while Analytical is on.

Worked example

  1. Add a Torus. Set Major Radius for the ring's size and Minor Radius for the tube's thickness.

  2. Raise Major Segments and Minor Segments for a smoother surface, or lower them for a faceted, low-poly look.

  3. Wire a Color or Material into Fill to drive the surface from the graph.

  4. For a Distance Field boolean with another shape, turn Analytical on.

See also

Sphere · Cylinder · Cube · Sweep