> ## 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.

# Column

> Column is a vertical member with a rectangular, circular or custom section.

Use it for columns and piers.

## Import

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

## Example

```typescript theme={null}
import { Column, ColumnShape, Floorkit } from '@opengeometry/floorkit';

async function example(wasmURL: string): Promise<void> {
  await new Floorkit().setupOpenGeometry(wasmURL);
  const column = new Column({
    shape: ColumnShape.CIRCULAR,
    center: [2, 3],
    elevation: 0,
    radius: 0.2,
    height: 3,
  });
  try {
    column.setOPConfig({ ...column.getOPConfig(), height: 3.4 });
    console.log(column.toDrawing('top'), column.getOPConfig());
  } finally {
    column.dispose();
  }
}
```

## Notes

* `center` is `[x, z]` in metres. `elevation` is the bottom of the column. `rotation` is in degrees.
* A `CUSTOM` shape needs a `customProfile`.
* The class makes geometry. It does not calculate structural strength.
* Start the geometry kernel before you create this object. See [`Floorkit`](/floorkit/api/runtime/floorkit).
* This object is live geometry. To save a building, write it in a [building model](/floorkit/concepts/building-model).

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

## Constructor

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

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

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

<ParamField path="config.type" type="ElementType.COLUMN" />

<ParamField path="config.shape" type="ColumnShape" />

<ParamField path="config.center" type="Point2">
  Center insertion point in the world XZ plane: \[x, z].
</ParamField>

<ParamField path="config.rotation" type="number">
  Y-axis rotation in degrees, applied to the local profile around the center before geometry is
  built.
</ParamField>

<ParamField path="config.elevation" type="number">
  World Y of the column base. The profile is extruded upward by `height`.
</ParamField>

<ParamField path="config.height" type="number">
  Column height (vertical extent from elevation).
</ParamField>

<ParamField path="config.width" type="number">
  Width (X-extent) for RECTANGULAR shape.
</ParamField>

<ParamField path="config.depth" type="number">
  Depth (Z-extent) for RECTANGULAR shape.
</ParamField>

<ParamField path="config.radius" type="number">
  Radius for CIRCULAR shape.
</ParamField>

<ParamField path="config.customProfile" type="PolygonProfile">
  Custom polygon profile (local coordinates, centered on \[0,0]). Only used when shape === CUSTOM.
</ParamField>

<ParamField path="config.color" type="number" />

<ParamField path="config.material" type="ColumnMaterial" />

<ParamField path="config.openings" type="string[]">
  ogids of openings whose `opening3D` Solids should be CSG-subtracted.
</ParamField>

<ParamField path="config.propertySets" type="PropertySets" />

## Properties

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

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

<ResponseField name="subElements2D" type="Map<string, OPGeometry>" />

<ResponseField name="subElements3D" type="Map<string, OPGeometry>" />

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

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

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

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

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

<ResponseField name="shape" type="ColumnShape" />

<ResponseField name="center" type="PointXZ" />

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

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

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

<ResponseField name="extrudeHeight" type="number">
  Push/pull alias for the GUIEditor — the extrude dimension is the height.
</ResponseField>

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

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

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

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

<ResponseField name="columnMaterial" type="ColumnMaterial" />

<ResponseField name="customProfile" type="PolygonProfile | undefined" />

<ResponseField name="profile" type="PolygonProfile">
  Editable cross-section for the GUIEditor. Reads the current local profile
  (rectangular/circular/custom); writing switches the column to a CUSTOM profile and rebuilds. Edits
  align with the editor when `center` is \[0,0] and `rotation` is 0 (the profile is generated in the
  column's local frame).
</ResponseField>

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

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

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

## Methods

### editableSchema

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

Self-describing editable surface; a host inspector renders this generically.

### 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).

### addOpening

```typescript theme={null}
addOpening(openingElement: Opening): void;
```

### removeOpening

```typescript theme={null}
removeOpening(ogid: string): void;
```

### getHostedOpenings

```typescript theme={null}
getHostedOpenings(): Opening[];
```

### setOPGeometry

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

### getExportRoots

```typescript theme={null}
getExportRoots(view: PlanExportView): THREE.Object3D[];
```

### toDrawing

```typescript theme={null}
toDrawing(view: PlanExportView): DrawingPrimitive[];
```

Produce standardized drawing primitives for a view directly from the element's parametric data (the 0.3.0 contract).

### setOPMaterial

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

### getOPConfig

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

### setOPConfig

```typescript theme={null}
setOPConfig(config: ColumnOptions): void;
```

### beginEdit

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

Start one live edit; a second `beginEdit` before `endEdit` keeps the first start.

### endEdit

```typescript theme={null}
endEdit(): {
    undo: () => void;
    redo: () => void;
} | undefined;
```

End the live edit; its exact undo and redo, or undefined when no option changed.

### getEditAnchors

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

Draggable handles: a base grip (move on the XZ plane) and a top grip (raise/lower the height along +Y).

### applyEditAnchor

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

### dispose

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

## Types

### ColumnOptions

```typescript theme={null}
interface ColumnOptions extends HasPropertySets {
  ogid?: string;
  labelName: string;
  type: ElementType.COLUMN;
  shape: ColumnShape;
  center: PointXZ;
  rotation: number;
  elevation: number;
  height: number;
  width: number;
  depth: number;
  radius: number;
  customProfile?: PolygonProfile;
  color: number;
  material: ColumnMaterial;
  openings: string[];
}
```

### ColumnShape

```typescript theme={null}
enum ColumnShape {
  RECTANGULAR = 'RECTANGULAR',
  CIRCULAR = 'CIRCULAR',
  CUSTOM = 'CUSTOM',
}
```

### ColumnMaterial

```typescript theme={null}
enum ColumnMaterial {
  CONCRETE = 'CONCRETE',
  STEEL = 'STEEL',
  TIMBER = 'TIMBER',
  COMPOSITE = 'COMPOSITE',
  OTHER = 'OTHER',
}
```

## Related

* [`OPElement`](/floorkit/api/architecture/op-element)
* [`Opening`](/floorkit/api/architecture/opening)
* [`DrawingPrimitive`](/floorkit/api/drawings/draw-project-view#drawingprimitive)
* [`EditAnchor`](/floorkit/api/architecture/op-element#editanchor)
* [`ElementType`](/floorkit/api/architecture/op-element#elementtype)
* [`HasPropertySets`](/floorkit/api/architecture/op-element#haspropertysets)
* [`IPlaceable`](/floorkit/api/architecture/op-element#iplaceable)
* [`IShape`](/floorkit/api/shapes/cuboid-shape#ishape)
* [`OPEditableSchema`](/floorkit/api/architecture/op-element#opeditableschema)
* [`OPGeometry`](/floorkit/api/architecture/opening#opgeometry)
* [`PlanExportView`](/floorkit/api/shapes/cylinder-shape#planexportview)
* [`PlanVectorExportable`](/floorkit/api/shapes/cylinder-shape#planvectorexportable)
* [`PointXZ`](/floorkit/api/primitives/polygon-maths#pointxz)
* [`PolygonProfile`](/floorkit/api/primitives/polygon-maths#polygonprofile)
* [`Vec3`](/floorkit/api/architecture/wall#vec3)


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