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

# Ramp

> A ramp is a sloped plate along a plan path, with flat landings.

A ramp is saved in a building model. It is an entry in the `ramps` list of a storey (`BmRamp`).

## Import

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

## Example

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

const ramp: BmRamp = {
  id: 'car-ramp',
  path: [
    [-1.75, 24],
    [-1.75, -16.4],
  ],
  width: 3.5,
  fromElevation: 0,
  toElevation: 3.2,
  thickness: 0.25,
  landings: [{ at: 19.2, length: 2 }],
  maxSlope: 1 / 12,
};
```

The values are those of the test fixture `tests/fixtures/basement-ramp.project.json` in the Floorkit repository: the ramp climbs 3.2 m from a basement at -3.2 m to the ground at 0 m. Its 1:12 `maxSlope` is a value chosen for that fixture, not a code limit.

## Fields

* `path` is the plan centreline, a list of `[x, z]` points. The ramp starts at the first point.
* `width` is the width across the path. `thickness` is the depth of the plate under the walking surface.
* `fromElevation` and `toElevation` are the heights of the walking surface at the first and the last point, in metres above the storey's `elevation`. A ramp can go down: `toElevation` can be below `fromElevation`.
* `landings` are flat stretches. `at` is the distance in metres along the path from its first point; `length` is the length of the landing. Landings come in order and end on the path.
* The rest of the path takes one even slope: the rise divided by the path length that is not a landing.
* A point of `path` where the direction changes must lie inside a landing that reaches far enough past it to hold the corner, or the ramp is refused with `ramp-turn-needs-landing`. The landing builds as one flat corner piece.
* A ramp needs some length that is not a landing, or it is refused with `no-slope-run`.
* `maxSlope` is the steepest rise over run you allow. A ramp that is steeper is refused with `ramp-too-steep`. Floorkit has no default limit: choose the value from the code that applies to your project.

## Drawing

* A plan draws one outline of the whole ramp, a line across each end of a landing, the walkline, an arrowhead at the higher end and the slope as `1:n`. A ramp above the cut draws dashed, and not at all in a plan with `hideStairAboveCut`.
* Sections cut the ramp. Its cut regions carry `ogType: 'RAMP'`. Elevations and the 3D view show it.

## Notes

* All dimensions are in metres.
* Validation codes: `bad-path`, `zero-length-segment`, `bad-width`, `bad-thickness`, `bad-elevation`, `bad-landing`, `bad-maxSlope`, `ramp-turn-needs-landing`, `no-slope-run` and `ramp-too-steep`.
* IFC export of a ramp as `IfcRamp` is not part of this release.

## BmRamp

```typescript theme={null}
interface BmRamp {
  id: string;
  labelName?: string;
  path: PointXZ[];
  arcs?: ({
    through: PointXZ;
  } | null)[];
  width: number;
  fromElevation: number;
  toElevation: number;
  thickness: number;
  landings?: {
    at: number;
    length: number;
  }[];
  maxSlope?: number;
  phase?: BmPhase;
  color?: BmColor;
  propertySets?: BmPsets;
  psets?: BmPsets;
}
```

## Related

* [`BmColor`](https://docs.ploterr.com/floorkit/api/architecture/validate-building-model#bmcolor)
* [`BmPhase`](https://docs.ploterr.com/floorkit/api/architecture/validate-building-model#bmphase)
* [`BmPsets`](https://docs.ploterr.com/floorkit/api/architecture/validate-building-model#bmpsets)
* [`PointXZ`](https://docs.ploterr.com/floorkit/api/primitives/polygon-maths#pointxz)


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