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

# LinePrimitive

> A straight line between two points.

## Import

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

**Inheritance:** `extends Line implements IPrimitive`

## Constructor

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

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

<ParamField path="lineConfig.startPoint" type="number[]" />

<ParamField path="lineConfig.endPoint" type="number[]" />

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

<ParamField path="lineConfig.fatLines" type="boolean" />

<ParamField path="lineConfig.width" type="number" />

<ParamField path="lineConfig.path" type="Path" />

## Properties

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

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

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

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

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

<ResponseField name="startPoint" type="Array<number>" />

<ResponseField name="endPoint" type="Array<number>" />

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

<ResponseField name="path" type="Path" />

<ResponseField name="profile" type="Profile">
  Editable-path view used by the GUI editor, reusing the same `Profile` contract as
  PolygonPrimitive. A line is an open 2-vertex path: the outer ring is `[[startX, startZ], [endX,
      endZ]]`. Editing happens on the XZ plane, so each endpoint's Y is preserved through the existing
  start/end setters (which keep `path.points` in sync and rebuild the kernel geometry).
</ResponseField>

## Methods

### setOPConfig

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

### getOPConfig

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

### setOPGeometry

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

### setConfig

```typescript theme={null}
setConfig(options: Parameters<Line['setConfig']>[0]): void;
```

### setOPMaterial

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

## Types

### IPrimitive

The package does not export this type by name.

```typescript theme={null}
interface IPrimitive {
  ogType: string;
  subNodes: Map<string, THREE.Object3D>;
  selected: boolean;
  edit: boolean;
  propertySet: Record<string, any>;
  setOPConfig(config: Record<string, any>): void;
  getOPConfig(): Record<string, any>;
  setOPGeometry(): void;
  setOPMaterial(): void;
}
```

### LineOptions

```typescript theme={null}
interface LineOptions {
  ogid?: string;
  startPoint: Array<number>;
  endPoint: Array<number>;
  color: number;
  fatLines: boolean;
  width: number;
  path: Path;
}
```

### Path

The package does not export this type by name.

```typescript theme={null}
interface Path {
  points: Array<Array<number>>;
}
```

### Profile

Profile is a loop of points.

```typescript theme={null}
interface Profile {
  outerRing: Array<Array<number>>;
  holes?: Array<Array<Array<number>>>;
}
```


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