# 3D Polygon

A 3D Polygon is an annotation tool that allows users to draw a closed shape in 3D space by connecting multiple points or vertices. These points (3 or more) are joined together to form a polygonal surface, typically used to annotate complex, irregularly shaped objects or surfaces within a point cloud.

***

## Creating a 3D Polygon

1. Click the '+' icon next to your desired class in the class list.
2. Select 'Polygon' from the drawing tool options.
3. Your cursor will display a grey circle marker when hovering over point cloud data.
4. Click multiple points around your object of interest to define its boundary. As you move your cursor, a line will dynamically extend from each point. Each click adds a vertex, allowing you to create a precise shape.
5. `Right-click` to complete and apply the polygon.
6. All points within the polygon boundary will be highlighted in the class color.

   > **Note:** 3D polygons have infinite depth. We recommend using **BEV** and/or **Hotzone** to avoid capturing unintended points.
7. Enter the required annotation details in the prompt.
8. The saved annotation will appear in the class list with a triangle icon next to the instance name.

***

## Modifying a 3D Polygon

### Undoing and Redoing Vertex Placements

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FnScWoxCybbcI1P3kVyhE%2FPolyVerticesUndoRedo.gif?alt=media&#x26;token=470083bd-77df-483c-aa28-195fc3768d34" alt=""><figcaption></figcaption></figure>

While drawing a polygon, you can correct mistakes without starting over by undoing or redoing individual vertex placements.

| Action                  | Shortcut       |
| ----------------------- | -------------- |
| Undo last placed vertex | `Ctrl+Z`       |
| Redo removed vertex     | `Ctrl+Shift+Z` |
| Cancel entire polygon   | `Esc`          |

**How it works:**

* **`Ctrl+Z`** removes the most recently placed vertex, stepping back one point at a time. You can undo repeatedly until no vertices remain, returning the tool to a clean drawing state without exiting polygon mode.
* **`Ctrl+Shift+Z`** re-applies a removed vertex, letting you move forward again if you undo too many steps.
* **`Esc`** cancels the entire in-progress polygon and clears all vertices — use this when you want to abandon the annotation entirely and start fresh.
* The undo/redo history for the current polygon is preserved during view navigation. Panning, zooming, will not clear the stack.

> **Note:** This undo/redo behavior applies only during active polygon drawing. It does not affect the history of already-completed annotations. Once the in-progress polygon is undone, the tool goes back to undoing the last object.

### Adding or Subtracting Segments

You can refine your polygon by adding or removing point clusters using additional segments.

#### **Accessing the drawable:**

1. Select your object to select it in the Class list. Observe the '+' icon to add a segment.

### Adding Segments

1. Click the '+' button
2. Draw a new polygon around points you want to include to the primary segment
3. `Right-click` to confirm

{% hint style="info" %}
During confirmation with right-click, the boundary is green indicating addition
{% endhint %}

### Subtracting Segments

1. Click the '+' button
2. Draw a new polygon around points you want to exclude
3. `Right-click` to confirm

{% hint style="info" %}
During confirmation with right-click, the boundary is red indicating subtraction.
{% endhint %}

***

## Lasso Mode

Lasso mode lets you draw polygon boundaries by moving your cursor rather than clicking for each vertex individually. This is especially useful for tracing irregular or curved shapes — such as vegetation, road markings, or free-form surfaces — where click-by-click placement would be slow and imprecise.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FZ7b72CEDx7EJjDPuIFGQ%2F3DLasso.gif?alt=media&#x26;token=56b8c808-5b4a-41d1-9fc7-da9e26c8cccd" alt=""><figcaption></figcaption></figure>

**Toggling lasso mode:**

Press **`G`** to toggle lasso mode on. Press **`G`** again to toggle it off.

When lasso mode is active:

* Vertices are placed automatically along your cursor's path as it moves, producing a dense, smooth trace of the object boundary.
* A visual indicator confirms the mode is active - the cursor style changes and the toolbar highlights the lasso tool.

When lasso mode is toggled off:

* Vertex auto-placement pauses. The polygon remains open and in-progress.
* You can continue placing individual vertices by clicking, or close the polygon to complete the annotation.

> **Recommended Tip:** Lasso mode and click-to-place mode can be combined within a single annotation. For example, use lasso mode to trace a curved section, then press **`G`** to switch back to click mode for precise placement at sharp corners.

Lasso mode stays active until manually toggled off and is compatible with all polygon types in the editor, including 2D and 3D polygons.

***

## Copy and Paste

Copy polygons to other frames using Ctrl+C (copy) and Ctrl+V (paste).

1. The Annotation Details prompt will appear when pasting
2. By default, the pasted polygon retains the same Class and Instance ID as the original

{% hint style="info" %}
This feature only works when pasting to frames where the annotation doesn't already exist.
{% endhint %}
