---
title: "Path.Flatten Method "
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Drawing_Path_Flatten_1_7a94462e.htm
archived: false
applies_to:
  - product: "Graphics Mill"
    versions: ["12.1", "6.x-12.x (may differ)"]
    entity_id: "https://www.graphicsmill.com/#software-application"
---

# Path.Flatten Method 

**Applies to:** Graphics Mill 12.1, 6.x-12.x (may differ)
 
Replaces the curves of the path with polylines.
 
**Namespace:** [Aurigma.GraphicsMill.Drawing](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Drawing.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public void Flatten(float tolerance
)
```
 
### Parameters
 
 - tolerance
     - Type: System.Single
The largest allowed deviation of a polyline from the curve, in path units. Must be greater than 0.
 
## Examples
  
```csharp
var path = new Path();
path.MoveTo(15, 120);
path.CurveTo(new System.Drawing.PointF(40, -20), new System.Drawing.PointF(110, 170), new System.Drawing.PointF(135, 30));

var original = new Path(path);

// Replace the curve with a polyline that deviates from it by at most 2 units.
path.Flatten(2f);
```
 
The original path and the flattened path.
 ![The original path and the flattened path.](https://www.graphicsmill.com/docs/gm/PathFlatten.png)
 
## Exceptions
  
|  Exception |  Condition |
| --- | --- |
 |  System.ArgumentOutOfRangeException |  The tolerance is not greater than 0. |
   
## See Also

### Reference

- [Path Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_Path.htm.md)
- [Aurigma.GraphicsMill.Drawing Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Drawing.htm.md)

### Manual

- [Working with Paths](https://www.graphicsmill.com/docs/gm/working-with-path.htm.md)
