---
title: SectionBox
summary: Class in @bimworks/viewer3d.
order: 10
languages: [javascript]
sdk-package: JavaScript · @bimworks/viewer3d
---

# SectionBox

[[page:reference/javascript/api|API catalogue]] · `@bimworks/viewer3d` · Class

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
class SectionBox
````



## Members

| Member | Kind | Description |
|---|---|---|
| [[page:reference/javascript/bimworks-viewer3d/sectionbox-fa498f20#member-constructor-7b9f6ee2cc16|constructor]] | Method |  |
| [[page:reference/javascript/bimworks-viewer3d/sectionbox-fa498f20#member-getannotationmode-364edc19720d|getAnnotationMode]] | Method |  |
| [[page:reference/javascript/bimworks-viewer3d/sectionbox-fa498f20#member-getannotationreach-97f8bf8596ec|getAnnotationReach]] | Method |  |
| [[page:reference/javascript/bimworks-viewer3d/sectionbox-fa498f20#member-isvisible-f48596fd3d21|isVisible]] | Method |  |
| [[page:reference/javascript/bimworks-viewer3d/sectionbox-fa498f20#member-setannotationmode-146273efce6f|setAnnotationMode]] | Method | Set the annotation mode of all six faces of the box (SectionPlane.setAnnotationMode). A new box starts with the mode of SectionPlanes.annotationDefaults, "hi… |
| [[page:reference/javascript/bimworks-viewer3d/sectionbox-fa498f20#member-setannotationreach-00bc6e884420|setAnnotationReach]] | Method | Set the annotation reach of all six faces of the box (SectionPlane.setAnnotationReach): around one storey in "project" with a reach of a storey height, the s… |
| [[page:reference/javascript/bimworks-viewer3d/sectionbox-fa498f20#member-setvisible-a21d84cd1ac8|setVisible]] | Method | Draw all six faces of the box or none (SectionPlane.setVisible): hidden, the box still cuts. A new box is drawn. Has no effect once this box is no longer the… |

## `constructor` {#member-constructor-7b9f6ee2cc16}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
constructor()
````



## `getAnnotationMode` {#member-getannotationmode-364edc19720d}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
getAnnotationMode(): SectionPlaneAnnotationMode | null
````



### Returns

The annotation mode of the faces of the box, null while they differ

## `getAnnotationReach` {#member-getannotationreach-97f8bf8596ec}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
getAnnotationReach(): number | null
````



### Returns

The annotation reach of the faces of the box in mm (Infinity for no limit), null while they differ

## `isVisible` {#member-isvisible-f48596fd3d21}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
isVisible(): boolean | null
````



### Returns

Whether the faces of the box are drawn, null while they differ

## `setAnnotationMode` {#member-setannotationmode-146273efce6f}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
setAnnotationMode(mode: SectionPlaneAnnotationMode): void
````

Set the annotation mode of all six faces of the box (`SectionPlane.setAnnotationMode`).
A new box starts with the mode of `SectionPlanes.annotationDefaults`, "hide" by default. Has no
effect once this box is no longer the active one (another box was started, a face was removed or put
back, or the planes were disabled).

### Parameters

| Name | Type | Description |
|---|---|---|
| `mode` | [[page:reference/javascript/bimworks-viewer3d/sectionplaneannotationmode-60c1ec8e|SectionPlaneAnnotationMode]] |  |

### Exceptions

- Error for an unknown mode

## `setAnnotationReach` {#member-setannotationreach-00bc6e884420}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
setAnnotationReach(reach: number): void
````

Set the annotation reach of all six faces of the box (`SectionPlane.setAnnotationReach`): around
one storey in "project" with a reach of a storey height, the storey above lands on the top face and the
one below on the bottom face, and the others are hidden. A new box starts with the reach of
`SectionPlanes.annotationDefaults`, no limit by default. Has no effect once this box is no longer
the active one.

### Parameters

| Name | Type | Description |
|---|---|---|
| `reach` | `number` | mm, 0 or more; Infinity for no limit |

### Exceptions

- Error for a negative distance, NaN or a value that is not a number

## `setVisible` {#member-setvisible-a21d84cd1ac8}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
setVisible(visible: boolean): void
````

Draw all six faces of the box or none (`SectionPlane.setVisible`): hidden, the box still cuts. A new box
is drawn. Has no effect once this box is no longer the active one.

### Parameters

| Name | Type | Description |
|---|---|---|
| `visible` | `boolean` |  |

### Exceptions

- Error when visible is not a boolean
