---
title: calculateSectionPlanesForBoundingBox
slug: viewer-3d/methods/calculateSectionPlanesForBoundingBox
docTags: 
createdAt: 2024-09-24T11:14:12.220Z
---

Returns the requested section planes of the specified bounding box.

## Usage

```javascript
const boundingBox = {
  max: {
    x: 10,
    y: 10,
    z: 0
  },
  min: {
    x: 0,
    y: 0,
    z: 0
  }
};
const objectIds = ["object-1", "object-2"];
const planeNames = ["left", "right"];

const planes = viewer3d.calculateSectionPlanesForBoundingBox(boundingBox, planeNames);
```

## Parameters

### boundingBox

Bounding box used to calculate section planes

| **Type**  | **Required** |
| --------- | ------------ |
| [Box3](#) | Yes          |

### planeNames

List of named planes.

| **Type**       | **Required** |
| -------------- | ------------ |
| Array\[String] | Yes          |

**Named Plane**

Valid values are:

- `top`
- `bottom`
- `left`
- `right`
- `front`
- `back`

## Return Value

List of planes.

| **Type**       |
| -------------- |
| Array\[Object] |

**Plane**

| **Name**    | **Type**     | **Description**        |
| ----------- | ------------ | ---------------------- |
| `location`  | [Vector3](#) | Location of the plane  |
| `direction` | [Vector3](#) | Direction of the plane |

### Example

```javascript
[
  {
    location: {
      x: 0,
      y: 0,
      z: 0
    },
    direction: {
      x: -1,
      y: 0,
      z: 0
    }
  },
  {
    location: {
      x: 10,
      y: 10,
      z: 0
    },
    direction: {
      x: 1,
      y: 0,
      z: 0
    }
  }
];
```

