Inaccurate arcs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Medium
|
Unassigned | ||
inkscape (Debian) |
Fix Released
|
Unknown
|
Bug Description
Forwarded from Debian:
From: Zefram <email address hidden>
To: <email address hidden>
Subject: inaccurate arcs
Date: Mon, 9 Apr 2012 21:35:40 +0100
Package: inkscape
Version: 0.47.0-2+b1
Severity: important
When rendering SVG <path> items that contain Arc commands, inkscape
screws up the geometry. Simple test case:
<svg version="1.1" width="900" height="900" xmlns="http://
<g transform=
<circle r="1" stroke="red" stroke-
<path d="M 0 -1 A 1 1 0 0 0 -1 0 A 1 1 0 0 0 0 1 A 1 1 0 0 0 1 0 A 1 1 0 0 0 0 -1" stroke="green" stroke-
</g>
</svg>
This attempts to render a unit circle twice. First, in red, as a
<circle>. Secondly, in green, in four equal arc-segment pieces in
a <path>. The correct result is that the two versions of the circle
coincide. There should be no visible difference between their locations.
For testing, I've invoked inkscape to render it via "inkscape -bblack
-e t1.png t1.svg". Actual result is that the red version is properly
circular but the green one deviates from it significantly. They coincide
at the four cardinal points, but between them the green one is located
well inside the red circle. I crudely measured its diagonal diameter
to be about 1.7% less than the circle's diameter.
In my real application, where I first noticed the fault, the deviations
are much more significant than the 1.7% that you see with the simple
test case. It seems to depend on the angular extent of the arc, in a
non-obvious manner. The bug is utterly devastating.
Googling reveals some talk about Inkscape internally approximating arcs
with Bezier curves. That could account for this, if it's done ineptly.
If Inkscape is to use such approximations then it must use more control
points, adaptively, to get a result that's close enough given the output
resolution. But it would be much better, of course, for Inkscape to
actually handle arcs as arcs, rendering them natively.
-zefram
Changed in inkscape (Debian): | |
status: | Unknown → Confirmed |
Changed in inkscape (Debian): | |
status: | Confirmed → Fix Released |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
Confirmed with Inkscape 0.48.3.1 on Ubuntu 12.04.
Duplicate of bug #653315 <Bezier curves drawn, where svg file requires circular arcs>?