> ## Documentation Index
> Fetch the complete documentation index at: https://docs.speckle.systems/llms.txt
> Use this file to discover all available pages before exploring further.

# SectionTool

> Default section tool implementation.

<Warning>
  This extension requires and active CameraController extension implementation.
</Warning>

## Accessors

### enabled

```typescript theme={null}
get enabled(): boolean
set enabled(value: boolean)
```

Enables/disables the extension.

**Returns**: boolean

### visible

```typescript theme={null}
get visible(): boolean
set visible(value: boolean)
```

Gets and sets the visbility of the actual section box.

**Returns**: boolean

## Methods

### getBox

```typescript theme={null}
getBox(): Box3
```

Gets the current section box bounds.

**Returns**: [*Box3*](https://threejs.org/docs/index.html?q=box3#api/en/math/Box3)

### on

```typescript theme={null}
on(e: CameraEvent, handler: (data: boolean) => void)
```

Function for subscribing to camera events.

**Parameters**

* **e**: [*CameraEvent*](/developers/viewer/extensions/camera-controller-api#cameraevent)
* **handler**: The handler for the events

**Returns**: void

### removeListener

```typescript theme={null}
removeListener(e: CameraEvent, handler: (data: unknown) => void)
```

Function for un-subscribing from camera events.

**Parameters**

* **e**: [*CameraEvent*](/developers/viewer/extensions/camera-controller-api#cameraevent)
* **handler**: The handler for the events to unsubscribe

**Returns**: void

### setBox

```typescript theme={null}
setBox(targetBox: Box3, offset = 0): void
```

Sets the section box to the specified bounds
**Parameters**

* **targetBox**: [*Box3*](https://threejs.org/docs/index.html?q=box3#api/en/math/Box3)
* *optional* **offset**: Linear tolerance

**Returns**: void

### toggle

```typescript theme={null}
toggle(): void
```

Enables/disables the section tool.

**Returns**: void

## Typedefs

### SectionToolEvent

```typescript theme={null}
enum SectionToolEvent {
  DragStart = 'section-box-drag-start',
  DragEnd = 'section-box-drag-end',
  Updated = 'section-box-changed',
}
```

Events that the extension can emit.

### SectionToolEventPayload

```typescript theme={null}
interface SectionToolEventPayload {
  [SectionToolEvent.DragStart]: void;
  [SectionToolEvent.DragEnd]: void;
  [SectionToolEvent.Updated]: Plane[];
}
```

Mapping SectionToolEvent types to handler argument type
