# 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.

---

<details>
<summary><h3 style="display:inline-block"> 💡 Tips</h3></summary>

- Choose normal directions that capture the most relevant flow features
- Create multiple slices for comprehensive flow field analysis
- Consider the underlying mesh resolution when positioning slices
- Position slices at critical locations in your geometry

</details>

---

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

- **What flow variables can I visualize on a slice?**
  > Slices can display various quantities including pressure, temperature, velocity components, density, Mach number, and other solver-specific variables.

- **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>

```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>
