# Slices

*Slices are two-dimensional planes used to extract and visualize flow field data in Flow360. They are essential tools for analyzing flow characteristics at specific locations within the computational domain.*

---

## Available Options

| *Option* | *Description* |
|----------|---------------|
| **Normal** | Three-dimensional vector specifying the orientation of the slice plane |
| **Origin** | Reference point that lies on the slice plane |

---

## Detailed Descriptions

### Normal

*A three-dimensional vector (X, Y, Z) that defines the direction perpendicular to the slice surface.*

- **Default:** `(0, 0, 1)`
- **Example:** `(1, 0, 0)` for a YZ plane
>**Note:** The vector must be non-zero and will be normalized internally.

### Origin

*A point in 3D space (X, Y, Z) that defines where the slice plane is positioned.*

- **Default:** `(0, 0, 0) m`
- **Example:** `(0, 0, 0) m`
>**Note:** Coordinates are specified in m, cm, mm, ft or inch.

---

```{note}
For configuring slice data outputs, see [Slice Output](../02.simulation-setup/04.output/02.outputs-list/05.slice-output.md). For cross-sections of the volume mesh, see [Volume Mesh Slices](../02.simulation-setup/02.mesh/05.volume-mesh-slices.md).
```

---

<details>
<summary><h3 style="display:inline-block"> ❓ Frequently Asked Questions</h3></summary>

- **How is the data interpolated onto the slice?**
  > The flow field data is interpolated from the three-dimensional computational mesh onto the two-dimensional slice plane.

- **Does the slice resolution depend on the mesh?**
  > Yes, the resolution of the visualized data on the slice depends on the resolution of the underlying computational mesh.

</details>

---

<details>
<summary><h3 style="display:inline-block"> 🐍 Python Example Usage</h3></summary>

```{seealso}
{py:class}`~flow360.Slice`
```

```python
import flow360 as fl

# Create a slice at the wing mid-section
wing_slice = fl.Slice(
    name="wing_section",
    normal=(0, 1, 0),  # Normal in Y direction
    origin=(0, 3.5, 0) * fl.u.m
)
```

</details>
