---
title: "Path.FitCurves Method (Single, Single)"
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Drawing_Path_FitCurves_2_427c5821.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, Single)

**Applies to:** Graphics Mill 12.1, 6.x-12.x (may differ)
 
Replaces the polylines of the path with cubic Bezier curves, using the specified corner angle.
 
**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,float cornerAngle
)
```
 
### 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.

 - cornerAngle
     - Type: System.Single
The smallest turn of direction, in degrees, that keeps a point as a sharp corner. In range `[0, 180]`.
 
## Remarks
  
This method uses the Schneider algorithm. The turn of direction is measured between the directions at 4 \* tolerance before and after the point.
 
If cornerAngle is 0, every subpath becomes one smooth curve.
 
The curves pass within tolerance of every input point. So this method does not smooth away steps that are larger than tolerance, for example, the steps of an outline from [GetAlphaContour()](https://www.graphicsmill.com/docs/gm/O_T_Aurigma_GraphicsMill_Drawing_Path_GetAlphaContour.htm.md). To get a smooth outline of a bitmap, trace it with [GetContour()](https://www.graphicsmill.com/docs/gm/O_T_Aurigma_GraphicsMill_Drawing_Path_GetContour.htm.md).
 
Curves are converted to polylines first.
 
## Exceptions
  
|  Exception |  Condition |
| --- | --- |
 |  System.ArgumentOutOfRangeException |  The tolerance is not greater than 0, or the angle is out of range. |
   
## 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)
