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

# Level

> A horizontal reference plane at a fixed height.

## Import

```typescript theme={null}
import { Level } from '@opengeometry/floorkit';
```

**Inheritance:** `extends OPElement implements IShape, IPlaceable`

## Constructor

```typescript theme={null}
constructor(config?: Partial<LevelOptions>);
```

<ParamField path="config.datumType" type="DatumType.LEVEL" />

<ParamField path="config.elevation" type="number">
  World Y elevation.
</ParamField>

<ParamField path="config.origin" type="[number, number]">
  Start point on the X-Z plane: `[x, z]`.
</ParamField>

<ParamField path="config.length" type="number">
  Signed length of the line along local +X (before rotation).
</ParamField>

<ParamField path="config.rotationDeg" type="number">
  Plan-view rotation around the origin, degrees. Default 0.
</ParamField>

<ParamField path="config.showStartLabel" type="boolean">
  Show the label at the start endpoint. Default true.
</ParamField>

<ParamField path="config.showEndLabel" type="boolean">
  Show the label at the end endpoint. Default true.
</ParamField>

<ParamField path="config.fontSize" type="number">
  Font size for the OpenGlyph label, in world units. Default 2.5.
</ParamField>

<ParamField path="config.headLabel" type="string">
  Override for label text. Falls back to `$&#123;labelName&#125;
      $&#123;formatElevation(elevation)&#125;`.
</ParamField>

<ParamField path="config.storeyId" type="string">
  The storey this datum displays, when it is bound to one (`Building` segment storey / `BmStorey`
  id). Data only — the level stays a visual datum.
</ParamField>

<ParamField path="config.ogid" type="string" />

<ParamField path="config.labelName" type="string" />

<ParamField path="config.color" type="number">
  Line / symbol colour. Defaulted per subtype when omitted.
</ParamField>

<ParamField path="config.lineWidth" type="number">
  Line weight for the datum's 2D representation.
</ParamField>

<ParamField path="config.visibility" type="DatumVisibility">
  Whether this datum is shown in plan / model views.
</ParamField>

## Properties

<ResponseField name="ogid" type="string" />

<ResponseField name="ogType" type="string" />

<ResponseField name="subElements2D" type="Map<string, THREE.Object3D>" />

<ResponseField name="subElements3D" type="Map<string, THREE.Object3D>" />

<ResponseField name="selected" type="boolean" />

<ResponseField name="edit" type="boolean" />

<ResponseField name="locked" type="boolean" />

<ResponseField name="onDatumUpdated" type="Event<null>" />

<ResponseField name="propertySet" type="LevelOptions" />

<ResponseField name="labelName" type="string" />

<ResponseField name="datumType" type="DatumType">
  Read-only.
</ResponseField>

<ResponseField name="elevation" type="number" />

<ResponseField name="profileView" type="boolean" />

<ResponseField name="modelView" type="boolean" />

## Methods

### editableSchema

```typescript theme={null}
static editableSchema(): OPEditableSchema;
```

### move

```typescript theme={null}
move(delta: Vec3): void;
```

Translate this element by `delta` (world-space, meters).

### rotate

```typescript theme={null}
rotate(angleDeg: number, axis?: Vec3, anchor?: Vec3): void;
```

Rotate this element by `angleDeg` around `axis` (default Y-up), pivoted at `anchor` (default the element's own centroid).

### setOPConfig

```typescript theme={null}
setOPConfig(config: Partial<LevelOptions>): void;
```

### getOPConfig

```typescript theme={null}
getOPConfig(): LevelOptions;
```

### getEditAnchors

```typescript theme={null}
getEditAnchors(): EditAnchor[];
```

Draggable handles: the start `origin` (free on the floor plane), the far `end` (slides along the level's own direction → length), and an `elevation` grip at the midpoint (vertical).

### applyEditAnchor

```typescript theme={null}
applyEditAnchor(id: string, position: [
    number,
    number,
    number
]): void;
```

### setOPMaterial

```typescript theme={null}
setOPMaterial(): void;
```

### setOPGeometry

```typescript theme={null}
setOPGeometry(): void;
```

## Types

### LevelOptions

```typescript theme={null}
interface LevelOptions extends DatumOptionsBase {
  datumType: DatumType.LEVEL;
  elevation: number;
  origin: [number, number];
  length: number;
  rotationDeg?: number;
  showStartLabel?: boolean;
  showEndLabel?: boolean;
  fontSize?: number;
  headLabel?: string;
  storeyId?: string;
}
```

### DatumOptionsBase

Common fields shared by every datum subtype.

```typescript theme={null}
interface DatumOptionsBase {
  ogid?: string;
  labelName: string;
  datumType: DatumType;
  color?: number;
  lineWidth?: number;
  visibility?: DatumVisibility;
}
```

<ResponseField name="ogid" type="string" />

<ResponseField name="labelName" type="string" required />

<ResponseField name="datumType" type="DatumType" required />

<ResponseField name="color" type="number">
  Line / symbol colour. Defaulted per subtype when omitted.
</ResponseField>

<ResponseField name="lineWidth" type="number">
  Line weight for the datum's 2D representation.
</ResponseField>

<ResponseField name="visibility" type="DatumVisibility">
  Whether this datum is shown in plan / model views.
</ResponseField>

## Related

* [`OPElement`](/floorkit/api/architecture/op-element)
* [`DatumType`](/floorkit/api/datums/datum-defaults#datumtype)
* [`DatumVisibility`](/floorkit/api/datums/datum-defaults#datumvisibility)
* [`EditAnchor`](/floorkit/api/architecture/op-element#editanchor)
* [`Event`](/floorkit/api/architecture/wall-network#event)
* [`IPlaceable`](/floorkit/api/architecture/op-element#iplaceable)
* [`IShape`](/floorkit/api/shapes/cuboid-shape#ishape)
* [`OPEditableSchema`](/floorkit/api/architecture/op-element#opeditableschema)
* [`Vec3`](/floorkit/api/architecture/wall#vec3)


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