---
title: "Path.FitCurves Method (Single)"
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Drawing_Path_FitCurves_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.FitCurves Method (Single)

**Applies to:** Graphics Mill 12.1, 6.x-12.x (may differ)
 
Replaces the polylines of the path with cubic Bezier curves.
 
**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 FitCurves(float tolerance
)
```
 
### Parameters
 
 - tolerance
     - Type: System.Single
The largest allowed distance from the curves to the points of the polylines, in path units. Must be greater than 0.
 
## Remarks
 A point where the direction turns by 60 degrees or more stays a sharp corner. See the [FitCurves(Single, Single)](https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Drawing_Path_FitCurves_2_427c5821.htm.md) overload for details.
 
## Examples
  
```csharp
// A polyline: a straight edge and an arc made of short segments.
var path = new Path();
path.MoveTo(35, 15);
path.LineTo(35, 135);
for (int i = 1; i < 12; i++)
{
    double angle = System.Math.PI / 2 - i * System.Math.PI / 12;
    path.LineTo(35 + 85 * (float)System.Math.Cos(angle), 75 + 60 * (float)System.Math.Sin(angle));
}
path.Close();

var original = new Path(path);

// Replace the polyline with Bezier curves. The two corners of the straight edge stay sharp.
path.FitCurves(1f);
```
 
The original path and the path with fitted curves.
 ![The original path and the path with fitted curves.](https://www.graphicsmill.com/docs/gm/PathFitCurves.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)
- [FitCurves Overload](https://www.graphicsmill.com/docs/gm/O_T_Aurigma_GraphicsMill_Drawing_Path_FitCurves.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)
