---
title: calculateSectionPlanes
slug: viewer-3d/methods/calculateSectionPlanes
docTags: 
createdAt: 2024-03-01T14:17:48.682Z
---

Returns the requested section planes of the specified objects.

## Example

::codepen{url="https://codepen.io/Catenda/embed/ZEdyvrY"}

## Usage

```javascript
const objectIds = ["object-1", "object-2"];
const planeNames = ["left", "right"];

const planes = viewer3d.calculateSectionPlanes(objectIds, planeNames);
```

## Parameters

### objectIds

List of object ids.

| **Type**       | **Required** |
| -------------- | ------------ |
| Array\[String] | 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](docId\:kEwRHKTC8Iq2HlT48sRFQ) | Location of the plane  |
| `direction` | [Vector3](docId\:kEwRHKTC8Iq2HlT48sRFQ) | 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
    }
  }
];
```

