> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opengeometry.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Revolve

> Turn a closed line-and-arc profile a full turn about an axis in its plane.

`OG_OPERATION_REVOLVE` turns a closed profile a full turn into a solid. The parameters are `{ profile, axis? }`:

* `profile`: a closed `OG_PRIMITIVE_PROFILE` wire.
* `axis`: `{ point: [u, v], direction: [du, dv] }` in the profile's own `[u, v]`. By default it is `{ point: [0, 0], direction: [0, 1] }`, the profile plane's v axis.

Each profile edge off the axis becomes one plane, cylinder, cone, sphere or ring torus face. An edge on the axis makes no face.

## A bowl

On the default ground plane, the v axis runs along −Z, so the solid would lie on its side. Draw the profile on an upright plane instead, with u as the radius and v as the height. The bowl then stands upright about the Y axis:

```ts theme={null}
import {
  OpenGeometry,
  Solid,
  Wire,
  OG_OPERATION_PARAMS_REVOLVE,
  OG_OPERATION_REVOLVE,
  OG_PRIMITIVE_PARAMS_PROFILE,
  OG_PRIMITIVE_PROFILE,
} from 'opengeometry';

await OpenGeometry.create(
  { wasmURL: '/opengeometry_bg.wasm' },
  { workerURL: '/tessellation-worker.js' },
);

const section = OG_PRIMITIVE_PARAMS_PROFILE({
  start: [0, 0],
  segments: [
    { to: [0.12, 0] },
    { to: [0.19, 0.3] },
    { to: [0.19, 0.34], arc: { center: [0.19, 0.32], counterClockwise: true } },
    { to: [0.16, 0.34] },
    { to: [0, 0.18], arc: { center: [0, 0.34], counterClockwise: false } },
    { to: [0, 0] },
  ],
  closed: true,
});
const profile = new Wire(OG_PRIMITIVE_PROFILE, section, {
  plane: { normal: [0, 0, 1], xDirection: [1, 0, 0] },
});
const bowl = new Solid(OG_OPERATION_REVOLVE, OG_OPERATION_PARAMS_REVOLVE({ profile }));
console.log(bowl.validity().valid);
```

## Rules

These throw `InvalidParameter`:

* A profile that crosses the axis, touches it at a single point, or meets it along two separate stretches.
* An arc whose circle meets the axis.
* A zero `direction`.

Not built:

* A partial turn. There is no sweep angle; every revolve is a full turn.
* A profile with holes. `OG_OPERATION_REVOLVE` takes no `holes`.
* The shell of a full-turn revolve throws `CoverageGap`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.