Circumcircle drawn incorrectly

Bug #1693487 reported by Geoff
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

When using the extension/render/draw from triangle to draw a circumcircle, the circumcircle is drawn incorrectly - see attached image file. Win 10, Inkscape 0.92.

Revision history for this message
Geoff (gphillips) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :

could you attach the original svg file, for testing purposes?

Revision history for this message
Geoff (gphillips) wrote : Re: [Bug 1693487] Re: Circumcircle drawn incorrectly

Kind regards

Geoff Phillips
8 Wattle Tree Avenue
Wonga Park 3115
Ph. 0401 218 844
<email address hidden>

On Thu, May 25, 2017 at 11:34 PM, Alvin Penner <email address hidden> wrote:

> could you attach the original svg file, for testing purposes?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1693487
>
> Title:
> Circumcircle drawn incorrectly
>
> Status in Inkscape:
> New
>
> Bug description:
> When using the extension/render/draw from triangle to draw a
> circumcircle, the circumcircle is drawn incorrectly - see attached
> image file. Win 10, Inkscape 0.92.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/1693487/+subscriptions
>

Revision history for this message
Alvin Penner (apenner) wrote :

thank you for the svg file. It appears that the unexpected behavior of the circumscribed circle is due to the fact that the drawn triangle does not consist of three straight lines, but instead contains a cubic Bezier curve in at least one segment. The control arms of the cubic Bezier curve are quite short, so you have to zoom in to see them. Attached is the raw data for the triangle, showing the Bezier contribution as well.
m 29.934188,162.83069 c 3.741772,1.06908 78.042702,28.33057 80.180852,28.33057 2.13816,0 16.03618,-28.33057 16.03618,-28.33057 z

It appears that the circumscribed circle is accidentally using some of the Bezier control points as though they were vertices of a triangle, and is then ignoring the rest of the data. The code should probably be re-written to either ignore Bezier curves entirely, or alternatively use only the endpoints of the Bezier curve, which would have yielded a reasonable result in this case.

Revision history for this message
Geoff (gphillips) wrote :

Thankyou for that explanation. I need to be more careful using the Bezuer
tool!

Kind regards
Geoff Phillips
Phone 0401 218 844
8 Wattle Tree Avenue
Wonga Park
VIC 3115

On 27/05/2017 9:50 PM, "Alvin Penner" <email address hidden> wrote:

> thank you for the svg file. It appears that the unexpected behavior of the
> circumscribed circle is due to the fact that the drawn triangle does not
> consist of three straight lines, but instead contains a cubic Bezier curve
> in at least one segment. The control arms of the cubic Bezier curve are
> quite short, so you have to zoom in to see them. Attached is the raw data
> for the triangle, showing the Bezier contribution as well.
> m 29.934188,162.83069 c 3.741772,1.06908 78.042702,28.33057
> 80.180852,28.33057 2.13816,0 16.03618,-28.33057 16.03618,-28.33057 z
>
> It appears that the circumscribed circle is accidentally using some of
> the Bezier control points as though they were vertices of a triangle,
> and is then ignoring the rest of the data. The code should probably be
> re-written to either ignore Bezier curves entirely, or alternatively use
> only the endpoints of the Bezier curve, which would have yielded a
> reasonable result in this case.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1693487
>
> Title:
> Circumcircle drawn incorrectly
>
> Status in Inkscape:
> New
>
> Bug description:
> When using the extension/render/draw from triangle to draw a
> circumcircle, the circumcircle is drawn incorrectly - see attached
> image file. Win 10, Inkscape 0.92.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/1693487/+subscriptions
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.