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

# Wall stations

> Convert a distance along a saved wall into a position on one of its segments.

## Import

```typescript theme={null}
import {
  wallSegments,
  totalLength,
  resolveStation,
  openingHalfExtent,
  openingVerticalSpan,
  DEFAULT_FRAME_WIDTH,
} from '@opengeometry/floorkit';
```

## wallSegments

Centreline segments, including the closing one when the path is a loop.

```typescript theme={null}
function wallSegments(points: PointXZ[], closed?: boolean): WallSegment[];
```

## totalLength

```typescript theme={null}
function totalLength(segments: WallSegment[]): number;
```

## resolveStation

Resolve a perimeter offset to (segment, distance along it).

```typescript theme={null}
function resolveStation(offset: number, segments: WallSegment[]): ResolvedStation | null;
```

## openingHalfExtent

Half the opening's extent along the wall — what has to fit inside its segment.

```typescript theme={null}
function openingHalfExtent(opening: BmOpening): number;
```

## openingVerticalSpan

Vertical span of the cutter, relative to the wall base.

```typescript theme={null}
function openingVerticalSpan(opening: BmOpening): {
  low: number;
  high: number;
};
```

## DEFAULT\_FRAME\_WIDTH

```typescript theme={null}
const DEFAULT_FRAME_WIDTH = 0.05;
```

## Types

### WallSegment

```typescript theme={null}
interface WallSegment {
  index: number;
  length: number;
  start: number;
}
```

<ResponseField name="index" type="number" required />

<ResponseField name="length" type="number" required />

<ResponseField name="start" type="number" required>
  Cumulative length at this segment's start.
</ResponseField>

### ResolvedStation

```typescript theme={null}
interface ResolvedStation {
  segmentIndex: number;
  localU: number;
  segmentLength: number;
}
```

<ResponseField name="segmentIndex" type="number" required />

<ResponseField name="localU" type="number" required>
  Distance from this segment's start; used as the hosted wall station.
</ResponseField>

<ResponseField name="segmentLength" type="number" required />

## Related

* [`BmOpening`](/floorkit/api/architecture/validate-building-model#bmopening)
* [`PointXZ`](/floorkit/api/primitives/polygon-maths#pointxz)


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