# How can I create paths with accurate border-radii

So I'm getting a little confused with radii in Inkscape. For quite a while I thought that this:

was the same as this:

... But it turns out that overlaying them on top of one another reveals that they are different:

(where the red is the rectangle and the blue is the path)

Further analysis reveals that (after converting the rectangle to a path) the handles are in weird locations:

So my question is, is it possible to create accurate border radii without the use of the Rectangle tool (where the radius is the same in all angles)? Or must I always rely on it to give me truly accurate results? And also does anyone have an explanation as to why the handles are where they are?

-
I would have expected them to be 2px away from their anchors, not ~2.2px – Marco Scannadinari May 27 '14 at 10:44
Here: imgur.com/7GPwAaV? Anyway, it seems that its a lot more complex than it seems - whizkidtech.redprince.net/bezier/circle/kappa – Marco Scannadinari May 27 '14 at 11:50
well you can do the coefficient fit yourself but the length of the tangents can be approximated as being 1/3 of the distance between points away in tangent direction. Please note a bezier can not make a perfect circle, so its allways an approximation. – joojaa May 27 '14 at 16:15

### Rounding error at low pixel rates

Especially when drawing in the low pixel range there always is a considerable rounding error which then will become visible.

In the example below I drawed a circle with 4 px radius (grey), a rectangle with 4 px radius reounded corners (black), and a rectancle where the rounded corners were manually made from circles with a 4 px radius (see workaround below).

Values were carefully adjusted from the toolbar to exactly be of a radius `4.000` px). Still, we can see that the rounded rectangle is not perfect:

## Draw at higher pixel rates for precision

As soon as we start working at a higher pixel rate (below the red circle has a radius of 40 pixel), the rounded corner of the rectangle will match the exact radius of 40 pixel much better:

## Workaround for low pixel rates

In case we need the higher precision at low pixel rate drawings we cannot use the predefined rounded rectangle tool. We may then have to build our shapes manually, e.g. from a base circle:

1. Transform circle to Bezier path (Path > Object to Path):

2. Select all nodes to Break path at selected nodes

3. Select a segment and move it to the desired position.

4. Repeat for all segments.

5. Select the open nodes to Join selected endnotes with new segment

6. Repeat for the remainder open segments.

This will give better results at low pixel resolutions (see red line in first example above).

-
Not too sure its a rounding error - probably just incorrect handle placements on my part, as seen in the question. But the second part of your answer is useful. – Marco Scannadinari May 29 '14 at 12:23