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

# 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

**Origin X / Origin Y / Origin Z:** Where the document's local origin sits in world space. Use to place the drawing's `(0, 0)` at a meaningful project location — for example, the alignment start, a working point at a pier centerline, or a survey monument.

**Translate X / Translate Y:** Translation applied to all shapes within the document. Use to nudge the drawing's content as a whole without moving the origin.

**Flip X:** Mirror the drawing about its vertical axis. Useful for drawing the left-side abutment as a mirror of the right when both abutments share geometry.

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

**Align Refine Distance:** When alignment-bending is on, this 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 dynamically by asking a question.

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

```
GET https://docs.openbrim.org/templates/cadd/cadd-document.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
