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

# subtract_volumes

#### Connect.subtract\_volumes(part\_id, target\_volumes, cutter\_volumes, params)

Subtract cutter volumes from target volumes. Volumes should be computed prior to calling this function. If multiple parts are being merged to form a single part, then volumes should be computed for each part prior to merging. Use compute\_closed\_volumes to do so. Volumes involved in this operation should not have self intersections. You can use SearchZoneletsBySelfIntersections to check self intersections in the volume.

* **Parameters:**

  **part\_id**
  : Id of part containing target and cutter volumes for subtract operation.

  **target\_volumes**
  : Ids of target volumes.

  **cutter\_volumes**
  : Ids of cutter volumes.

  **params**
  : Parameters to control subtraction of volumes.

* **Returns:**

  [`SubtractVolumesResults`](https://developer.synopsys.com/docs/primemesh/prime-mesh-python-client-library/2025-r1/api/_autosummary/ansys.meshing.prime.SubtractVolumesResults)
  : Returns the SubtractVolumesResults.

* **Return type:**

  [`SubtractVolumesResults`](https://developer.synopsys.com/docs/primemesh/prime-mesh-python-client-library/2025-r1/api/_autosummary/ansys.meshing.prime.SubtractVolumesResults)

### Examples

```python theme={null}
>>> results = connect.subtract_volumes(part_id, target_volumes, cutter_volumes, params)
```
