Re: [Inkscape-devel] Offsetting elliptical arcs

 Re: [Inkscape-devel] Offsetting elliptical arcs From: Markus Engel - 2013-10-10 22:51:16 ```> I haven't looked at how it works precisely in recent code, but I can say that offsetting an ellipse does not result in an ellipse (Ask me off line if you want to know why: roughly, only curves whose derivative is a perfect square can be offset), so practically you'll need to use a general purpose offsetting algorithm such as the one in livarot or the incomplete one in lib2geom. Circles can be exactly offset. > The lib2geom one is more accurate at generating offset curves directly from bezier to bezier, but nobody finished writing the caustic removal code. This would be a good project for someone interested in getting into computational geometry/geometric design and I'm happy to mentor them. > The livarot version works by converting to a polygon which has a mostly closed form for offsetting, but it does not adapt precision to the curve in an effective way. I think this would be harder to fix properly. Oh. At first glance this looked like a matter of simply adding some more nodes to the new shape so that it becomes round again. But after some quick googling I have to admit that I don't know nothing about it. This sounds like a really interesting topic. If I only had more time... Regards, Markus ```

 [Inkscape-devel] Offsetting elliptical arcs From: Markus Engel - 2013-10-10 20:24:15 Attachments: Message as HTML ```Hi devs, I changed the code that generates ellipses and arcs to using true elliptical arcs instead of cubic Bezier curves. Now there's a little problem: When you create for example a pizza slice and a linked offset, you will see that elliptical arcs are somehow "degenerated", i. e. the number of points decreases with increasing radius. (https://bugs.launchpad.net/inkscape/+bug/1236830) Note that the code for offsetting elliptical arcs has been there for quite some time. I'm not sure now whether this is how "offset" is intended to work. What do you think? Regards, Markus ```
 Re: [Inkscape-devel] Offsetting elliptical arcs From: Josh Andler - 2013-10-10 20:34:32 ```On Thu, Oct 10, 2013 at 1:24 PM, Markus Engel wrote: > Note that the code for offsetting elliptical arcs has been there for quite > some time. I’m not sure now whether this is how “offset” is intended to > work. The old behaviour that ~suv mentioned in the report and the related user expectations are how it's intended to work. Cheers, Josh ```
 Re: [Inkscape-devel] Offsetting elliptical arcs From: Markus Engel - 2013-10-10 20:36:41 ```> The old behaviour that ~suv mentioned in the report and the related user expectations are how it's intended to work. Okay, so I'll have a look at this offset code and try to fix it. Regards, Markus ```
 Re: [Inkscape-devel] Offsetting elliptical arcs From: Nathan Hurst - 2013-10-10 22:00:58 ```On Thu, Oct 10, 2013 at 10:24:05PM +0200, Markus Engel wrote: > Hi devs, > > I changed the code that generates ellipses and arcs to using true elliptical > arcs instead of cubic Bezier curves. > > Now there's a little problem: > > When you create for example a pizza slice and a linked offset, you will see > that elliptical arcs are somehow "degenerated", i. e. the number of points > decreases with increasing radius. > > (https://bugs.launchpad.net/inkscape/+bug/1236830) > > Note that the code for offsetting elliptical arcs has been there for quite > some time. I'm not sure now whether this is how "offset" is intended to > work. I haven't looked at how it works precisely in recent code, but I can say that offsetting an ellipse does not result in an ellipse (Ask me off line if you want to know why: roughly, only curves whose derivative is a perfect square can be offset), so practically you'll need to use a general purpose offsetting algorithm such as the one in livarot or the incomplete one in lib2geom. Circles can be exactly offset. The lib2geom one is more accurate at generating offset curves directly from bezier to bezier, but nobody finished writing the caustic removal code. This would be a good project for someone interested in getting into computational geometry/geometric design and I'm happy to mentor them. The livarot version works by converting to a polygon which has a mostly closed form for offsetting, but it does not adapt precision to the curve in an effective way. I think this would be harder to fix properly. njh ```
 Re: [Inkscape-devel] Offsetting elliptical arcs From: Markus Engel - 2013-10-10 22:51:16 ```> I haven't looked at how it works precisely in recent code, but I can say that offsetting an ellipse does not result in an ellipse (Ask me off line if you want to know why: roughly, only curves whose derivative is a perfect square can be offset), so practically you'll need to use a general purpose offsetting algorithm such as the one in livarot or the incomplete one in lib2geom. Circles can be exactly offset. > The lib2geom one is more accurate at generating offset curves directly from bezier to bezier, but nobody finished writing the caustic removal code. This would be a good project for someone interested in getting into computational geometry/geometric design and I'm happy to mentor them. > The livarot version works by converting to a polygon which has a mostly closed form for offsetting, but it does not adapt precision to the curve in an effective way. I think this would be harder to fix properly. Oh. At first glance this looked like a matter of simply adding some more nodes to the new shape so that it becomes round again. But after some quick googling I have to admit that I don't know nothing about it. This sounds like a really interesting topic. If I only had more time... Regards, Markus ```