# Coordinates

Paragon's API uses two coordinate systems:

* Design Coordinates
* Layout Coordinates

## Design Coordinates

Design Coordinates are used when dealing with a single truss. The X-axis runs along span of the truss, the Y-axis runs along the height of the truss, and the Z-axis runs along the thickness of the truss. The axes follow the [right-hand rule](https://en.wikipedia.org/wiki/Right-hand_rule).

Typically the origin is located at the bottom-left corner of the truss at the heel (i.e., excluding the overhang), but this is just a convention and is not enforced. The "back" of the truss is located in the plane Z=0, and the truss extrudes in the positive-Z direction.

The Z dimension is often omitted in Design models, with the assumption that the object is located at Z=0.

The following models (and their children models) are defined in Design Coordinates:

* [Truss](https://designserver.paragontruss.com/api-docs/#model/truss)
* [AnalogModel](https://designserver.paragontruss.com/api-docs/#model/analogmodel)

## Layout Coordinates

Layout Coordinates are used when dealing with a layout. The X-axis and Y-axis define the plane horizontal to the ground, and the Z-axis corresponds to height, altitude, or elevation. The axes follow the [right-hand rule](https://en.wikipedia.org/wiki/Right-hand_rule).

There is no significance to the origin in Layout Coordinates, objects in Layout can be defined at any location.

The following models (and their children models) are defined in Layout Coordinates:

* [RoofPlane](https://designserver.paragontruss.com/api-docs/#model/roofplane)
* [RoofContainer](https://designserver.paragontruss.com/api-docs/#model/roofcontainer)
* [BearingEnvelope](https://designserver.paragontruss.com/api-docs/#model/bearingenvelope)
* [TrussEnvelope](https://designserver.paragontruss.com/api-docs/#model/trussenvelope)

## Converting between Design and Layout Space

`TrussEnvelope`s are the main link between Layout and Design. Each `TrussEnvelope` has a `componentDesignGuid` property that can reference a `Truss` GUID. A `Truss` is defined in Design Coordinates. The `TrussEnvelope` defines how a `Truss` is positioned in Layout Space.

For a given `TrussEnvelope`, the Design Space for the linked `Truss` has the following definition:

* The origin is located at `TrussEnvelope.backLeftPoint`
* The direction of the X-axis is defined by the direction from `TrussEnvelope.leftPoint` to `TrussEnvelope.rightPoint`
* The direction of the Y-axis is defined by the direction of the Layout Space's Z-axis
* The direction of the Z-axis is defined by rotating the X-axis a quarter-turn counter-clockwise around the Y-axis


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paragontruss.com/api/coordinates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
