> For the complete documentation index, see [llms.txt](https://docs.openbrim.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openbrim.org/templates/cadd/cadd-document.md). Agents can also search and read this documentation through its [MCP server](https://docs.openbrim.org/~gitbook/mcp).

# CAD Document

A **CAD Document** is the top-level container for a 2D drawing — a sheet's worth of geometry: shapes, dimensions, annotations, layers, and any auto-generated section views the drawing pulls from the 3D model. Every shape in OpenBrIM CAD lives inside one CAD Document; you typically have one per sheet (one for the General Plan, one per Cross Section sheet, one for the Pier Elevation sheet, and so on).

The CAD Document is also where alignment drives the drawing. When the document is bound to an alignment, every shape drawn in flat coordinates is automatically bent to follow the bridge geometry — useful when you want a working line, plan footprint, or layout shape that tracks the alignment without redrawing it on every revision.

## Geometry

The settings in this section and **`AlignRefineDist`** below do not appear as inputs in the CAD Document's panel. They are attributes written in the ParamML source, on the `CADD` object or on a shape inside it, and the code reads them from there. As with `AlignLongDir` and `AlignTransDir`, the nearest value going up from a shape to its CAD Document wins.

**`OrigX` / `OrigY` / `OrigZ`:** On a document bound to an alignment, the point of the drawing that is moved to the drawing's `(0, 0)`; the drawing is also turned so that the alignment runs horizontally at that point. Use it to place the drawing's origin at a meaningful project location — for example, the alignment start or a working point at a pier centerline. Without an alignment these attributes are not used.

**`TranslateX` / `TranslateY`:** A translation added to all shapes after that. Use it to nudge the drawing's content as a whole without moving the origin. Section views generated from the 3D model are moved by it too.

**`FlipX`:** Set to `1` to mirror the drawing about its vertical axis (X becomes −X). Useful for drawing the left-side abutment as a mirror of the right when both abutments share geometry. A mirrored drawing cannot be moved or rotated with a placement (Offset, Rotation, Base Point).

## Alignment binding

**Align Long Direction:** Which CAD axis maps to "along the alignment." Default `CADDX` — the document's horizontal axis runs along the alignment. Switch to `CADDY` for drawings where the alignment runs up the page (north-up orientation).

**Align Trans Direction:** Which CAD axis maps to "across the alignment" (perpendicular). Default `CADDY`.

`CADDX`, `CADDY` and `CADDZ` name the drawing's own axes: X runs left to right across the sheet, Y runs up the sheet, and Z points out of the sheet toward you. The axis you name in neither setting is the vertical (elevation). The usual pairs:

| Drawing                                                           | Align Long Direction | Align Trans Direction |
| ----------------------------------------------------------------- | -------------------- | --------------------- |
| Plan, alignment left to right (default)                           | `CADDX`              | `CADDY`               |
| Plan, alignment up the page                                       | `CADDY`              | `CADDX`               |
| Elevation or profile along the alignment (elevation up the sheet) | `CADDX`              | `CADDZ`               |
| Cross section (offset left to right, elevation up the sheet)      | `CADDZ`              | `CADDX`               |

These two settings are written on the CAD Document object as `AlignLongDir` and `AlignTransDir`; a shape inside the document can also carry its own, and the nearest value going up from the shape wins.

**`AlignRefineDist`:** An attribute in the ParamML source, like those under Geometry. When alignment-bending is on, it controls how often intermediate points are inserted to keep curves smooth. Smaller values produce smoother curves at the cost of heavier files. Default 120 (project length units) is right for typical highway bridges; reduce to 30 or 60 for tight horizontal-curve detail sheets.

When the document has no alignment bound, all alignment-related parameters are inert and shapes are drawn in flat coordinates.

## Display

**Thickness:** Default line weight applied to shapes that don't override it.

**Line Style:** Default dash pattern.

These document-level defaults are convenient for quickly setting "this whole sheet is heavy line weight" without having to set every shape — but for production drawings, prefer routing styling through Levels (layers) so it's per-layer, not per-document.

## Notes

A CAD Document doesn't have its own scale or sheet size; those are sheet-layout concerns handled outside the drawing. Inside the document, geometry is in real units (feet, meters) — the same units as the rest of the project.

Levels (layers) created inside a CAD Document are local to that document. To share a level set across multiple documents, define the levels at the project level and reference them from each document.


---

# 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.openbrim.org/templates/cadd/cadd-document.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.
