> For the complete documentation index, see [llms.txt](https://icosa.gitbook.io/open-brush-plugin-scripting-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://icosa.gitbook.io/open-brush-plugin-scripting-docs/readme/guide.md).

# Guide

## Summary

A guide widget

## Instance Properties

<table data-full-width="false"><thead><tr><th>Name</th><th>Return Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>number<br>Read-only</td><td>The index of the active widget</td></tr><tr><td>layer</td><td><a href="/open-brush-plugin-scripting-docs/readme/layer.md">Layer</a><br>Read/Write</td><td>The layer the guide is on</td></tr><tr><td>group</td><td><a href="/open-brush-plugin-scripting-docs/readme/group.md">Group</a><br>Read/Write</td><td>The group this guide is part of</td></tr><tr><td>transform</td><td><a href="/open-brush-plugin-scripting-docs/readme/transform.md">Transform</a><br>Read/Write</td><td>The transform of the Guide Widget</td></tr><tr><td>position</td><td><a href="/open-brush-plugin-scripting-docs/readme/vector3.md">Vector3</a><br>Read/Write</td><td>The 3D position of the Guide Widget</td></tr><tr><td>rotation</td><td><a href="/open-brush-plugin-scripting-docs/readme/rotation.md">Rotation</a><br>Read/Write</td><td>The 3D orientation of the Guide Widget</td></tr><tr><td>scale</td><td>number<br>Read/Write</td><td>The scale of the Guide Widget</td></tr></tbody></table>

## Class Methods

### Guide:NewCube(transform)

Creates a new cube guide with a default size using the transform for position and orientation

**Returns:** [Guide](/open-brush-plugin-scripting-docs/readme/guide.md) (A new cube guide)

**Parameters:**

<table data-full-width="false"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>transform</td><td><a href="/open-brush-plugin-scripting-docs/readme/transform.md">Transform</a></td><td></td><td>The transform of the Guide Widget</td></tr></tbody></table>

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myGuide = Guide:NewCube(Transform:New(0, 5, 2)
</strong></code></pre>

### Guide:NewSphere(transform)

Creates a new sphere guide with a default size using the transform for position and orientation

**Returns:** [Guide](/open-brush-plugin-scripting-docs/readme/guide.md) (A new sphere guide)

**Parameters:**

<table data-full-width="false"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>transform</td><td><a href="/open-brush-plugin-scripting-docs/readme/transform.md">Transform</a></td><td></td><td>The transform of the Guide Widget</td></tr></tbody></table>

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myGuide = Guide:NewSphere(Transform:New(0, 5, 2)
</strong></code></pre>

### Guide:NewCapsule(transform)

Creates a new capsule guide with a default size using the transform for position and orientation

**Returns:** [Guide](/open-brush-plugin-scripting-docs/readme/guide.md) (A new capsule guide)

**Parameters:**

<table data-full-width="false"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>transform</td><td><a href="/open-brush-plugin-scripting-docs/readme/transform.md">Transform</a></td><td></td><td>The transform of the Guide Widget</td></tr></tbody></table>

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myGuide = Guide:NewCapsule(Transform:New(0, 5, 2)
</strong></code></pre>

### Guide:NewCone(transform)

Creates a new cone guide with a default size using the transform for position and orientation

**Returns:** [Guide](/open-brush-plugin-scripting-docs/readme/guide.md) (A new cone guide)

**Parameters:**

<table data-full-width="false"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>transform</td><td><a href="/open-brush-plugin-scripting-docs/readme/transform.md">Transform</a></td><td></td><td>The transform of the Guide Widget</td></tr></tbody></table>

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myGuide = Guide:NewCone(Transform:New(0, 5, 2)
</strong></code></pre>

### Guide:NewEllipsoid(transform)

Creates a new ellipsoid guide with a default size using the transform for position and orientation

**Returns:** [Guide](/open-brush-plugin-scripting-docs/readme/guide.md) (A new ellipsoid guide)

**Parameters:**

<table data-full-width="false"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>transform</td><td><a href="/open-brush-plugin-scripting-docs/readme/transform.md">Transform</a></td><td></td><td>The transform of the Guide Widget</td></tr></tbody></table>

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myGuide = Guide:NewEllipsoid(Transform:New(0, 5, 2)
</strong></code></pre>

### Guide:NewCustom(transform, model)

Creates a new custom guide from a 3d model. Note that custom guides have to be convex so your model will be "wrapped" as a convex hull

**Returns:** [Guide](/open-brush-plugin-scripting-docs/readme/guide.md) (A new custom guide based on the convex hull of the model)

**Parameters:**

<table data-full-width="false"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>transform</td><td><a href="/open-brush-plugin-scripting-docs/readme/transform.md">Transform</a></td><td></td><td>The transform of the Guide Widget</td></tr><tr><td>model</td><td><a href="/open-brush-plugin-scripting-docs/readme/model.md">Model</a></td><td></td><td>The Model to use for the custom guide</td></tr></tbody></table>

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myGuide = Guide:NewCustom(Transform:New(0, 5, 2), myModel
</strong></code></pre>

## Instance Methods

### guide:Select()

Adds the guide to the current selection

**Returns:** nil

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myGuide:Select()
</strong></code></pre>

### guide:Deselect()

Removes the guide from the current selection

**Returns:** nil

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myGuide:Deselect()
</strong></code></pre>

### guide:Delete()

Deletes the guide

**Returns:** nil

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myGuide:Delete()
</strong></code></pre>

### guide:Scale(scale)

Scales the guide (scale can be non-uniform as some guide types can be stretched)

**Returns:** nil

**Parameters:**

<table data-full-width="false"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>scale</td><td><a href="/open-brush-plugin-scripting-docs/readme/vector3.md">Vector3</a></td><td></td><td>The scale vector for scaling the Guide Widget</td></tr></tbody></table>

#### Example

<pre class="language-lua"><code class="lang-lua"><strong>myGuide:Scale(Vector3:New(2, 0, 0)
</strong></code></pre>


---

# 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://icosa.gitbook.io/open-brush-plugin-scripting-docs/readme/guide.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.
