> For the complete documentation index, see [llms.txt](https://docs.roomle.com/rubens/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roomle.com/rubens/content-creation/roomlescript-reference/coordinatesystems.md).

# Coordinate Systems

![coordinates systems](https://2782441740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjLjPj3wCHnfCfuOYQpf4%2Fuploads%2Fgit-blob-fb41e94e53d01063506bb88c0d96db305d1a36eb%2Fathe-left-handed-and-b-right-handed-coordinate-systems%20\(1\).png?alt=media)

(a) Left handed coordinate system\
(b) Right handed coordinate system

[wiki - Right-hand rule](https://en.wikipedia.org/wiki/Right-hand_rule)

## Input coordinate system

### Roomle Script Coordinate System

The coordinate system for the component definitions JSON and the configuration JSON is a left handed coordinate system.

```json
{
    "id": "catalog_id:coordinate_system",
    "geometry": "
        AddPrism(1000, Vector2f[{0, 0}, {2000, 0}, {0, 1000}]);
       SetObjSurface('roomle_script_test:yellow');
    "
}
```

![roomle script coordinate system](https://2782441740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjLjPj3wCHnfCfuOYQpf4%2Fuploads%2Fgit-blob-adf51e702c02c6d610e6f642193a90432ddd3ff5%2FroomleScriptCoordinateSystem%20\(1\).png?alt=media)

### Plan XML Coordinate System

Left handed coordinate system

```xml
<plan version="2">
    <walls>
        <nodes>
            <node rights="0" id="0" x="0" y="2000" z="0" />
            <node rights="0" id="1" x="0" y="0" z="0" />
            <node rights="0" id="2" x="4000" y="0" z="0" />
        </nodes>
        <edges>
            <edge rights="0" from="0" to="1" color="#000000" height="2800" thickness="120" />
            <edge rights="0" from="1" to="2" color="#000000" height="2800" thickness="120" />
        </edges>
    </walls>
    <planobjects />
</plan>
```

![plan xml coordinate system](https://2782441740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjLjPj3wCHnfCfuOYQpf4%2Fuploads%2Fgit-blob-5597dd44651356892befb94a77428f26e7364413%2FplanXMLCoordinateSystem%20\(1\).png?alt=media)

#### Object position in PlanXML

Left handed coordinate system

![Coordinate System](https://2782441740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjLjPj3wCHnfCfuOYQpf4%2Fuploads%2Fgit-blob-50c5fb53d1189218edb03a4e70f822b34a40cad4%2FplanObjectCoordianteSystem%20\(1\).png?alt=media)

## Internal Roomle Core Coordinate System

### Configurator

Right handed coordinate system

![internal core coordinate system](https://2782441740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjLjPj3wCHnfCfuOYQpf4%2Fuploads%2Fgit-blob-9929fd0539424b572a619ff7ba122a896e3bc4d4%2FinternalCoreCoordinateSystem%20\(1\).png?alt=media)

This is also the coordinate system of all the meshes generated by the Configurator

### Planner

Right handed coordinate system

![internal planner core coordinate system](https://2782441740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjLjPj3wCHnfCfuOYQpf4%2Fuploads%2Fgit-blob-a351c923776990c5c3c5cf564428eb3416d55ed4%2FinternalPlannerCoordinateSystem%20\(1\).png?alt=media)

## External Mesh Coordinate System

Right handed coordinate system

```none
o Prism
v 0 0 0
v 2000 0 0
v 0 -1000 0
v 0 0 1000
v 2000 0 1000
v 0 -1000 1000
f 1 2 3 
f 4 6 5 
f 1 3 6
f 1 6 4 
f 2 1 4
f 2 4 5
f 3 2 5
f 3 5 6
```

![external mesh coordinate system](https://2782441740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjLjPj3wCHnfCfuOYQpf4%2Fuploads%2Fgit-blob-28b8410ae1dd190da2c8fd7bbb5fa6730a1888d3%2FexternalMeshCoordinateSystem%20\(1\).png?alt=media)

## API Coordinate System

The API coordinate system is a right handed coordinate system and the same as the internal Roomle Core coordinate system.

* Configurator API
  * Positions and rotations: Right handed, internal Roomle Core coordinate system
  * Meshes: Right handed, internal Roomle Core coordinate system
* Planner API
  * Object positions: Right handed, internal Roomle Core coordinate system
  * Meshes: Right handed, internal Roomle Core coordinate system


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.roomle.com/rubens/content-creation/roomlescript-reference/coordinatesystems.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
