Page 1 of 1

Circle does not fit [solved]

Posted: Wed Jan 23, 2013 3:23 pm
by TheEnglishPatient
What am I doing wrong? I am trying to fit a three point circle to [10,10], [30,15], [40,30]. QCAD does happily so with centre [14,36.5] and r = 26,800187. This has been independently verified (r = 26,800186566515) However, what appears on the display is a circle that seems slightly larger, and does not go through the points exactly when one zooms in. I can clamp a radial line to the circumference, which shows the same gap, although the numeric length is again given as exactly r. What am I doing wrong, or is there a numerical/scaling/display issue with circles? Could send you a screenshot if it helps. [win7 64 QCAD 3.0.5]
Thanks.

Re: Circle does not fit

Posted: Wed Jan 23, 2013 7:08 pm
by J-J
You picked my curiosity! I agree with your findings for ver 3.05. However it seems correct on ver 3.0!
JJ

Re: Circle does not fit

Posted: Wed Jan 23, 2013 8:34 pm
by TheEnglishPatient
You are (almost) right - in 3.0 the circle is much closer to the points, although again not exact. In my configuration it seems to be just a tad inside where it should be, but that's only visible with large zoom factors. (It's all a bit annoying as I am trying to illustrate a paper on circle fitting to survey data, where typically distances are large and angles are really small, so this effect somewhat ruins the whole point of the paper)

Re: Circle does not fit

Posted: Wed Jan 23, 2013 11:03 pm
by Clive
Hello there
just tested this on win 7-63, with latest snapshot 3.0.7 and couldn't find any problems with this.

First circle placed through 3 points exactly, when zoomed in - no issues.
circle test 1.png
circle test 1.png (2.21 KiB) Viewed 37589 times
New layer set up and test circle placed using radius and coordinates only.
circle test 2.png
circle test 2.png (13.64 KiB) Viewed 37589 times
Fits perfectly :D
circle test 3.png
circle test 3.png (5.25 KiB) Viewed 37589 times

Re: Circle does not fit

Posted: Mon Feb 04, 2013 12:21 pm
by Clive
Amendment:

After more closer inspection,testing and 'extreamly close' zooming I can now reproduce this problem.

@TheEnglishPatient, further to your recent correspondence I have forwarded the details on to Andrew for him to have a closer look at this. Your observation regarding the graphical rendering of the file could be correct.

(Note -I have enlarged the point for visual purposes).
Test circle.png
Test circle.png (35.5 KiB) Viewed 37525 times

Re: Circle does not fit

Posted: Wed Mar 20, 2013 1:12 pm
by Clive
Update:

I have re-tested this with an additional option - 'Render circular arcs precise' now available in the snapshot release 3.0.8.
in 3.0.8
Go to > Application preferences > Graphics view > Appearance - and tick Render circular arcs precise.
The result using the same above coordinates fitted perfectly !
Circle render test.png
Circle render test.png (110.22 KiB) Viewed 37271 times

Re: Circle does not fit

Posted: Sun Mar 24, 2013 2:26 pm
by TheEnglishPatient
Clive,
thanks for the answer and improvement. I don't want to quibble with your use of 'perfectly' but if you look really close at point 40,30 the circle was previously +0.063255 to the SE from the point, it is now -0.00210853 to the NW. So, it's an improvement of an order of magnitude, but still not quite there. But if it's a rendering issue, it might be of course just my graphic card/monitor...? Again, the reason I am harping on about this is that I am working on some rail track surveying, where you have globally large distances and radii, but locally only very small angles and deviations from straight lines - so these things unfortunately do become important and visible. In any case, we are down from the 'unworkable' to the 'a little annoying' level, so thanks for that again.
Best Regards

Re: Circle does not fit

Posted: Tue Apr 09, 2013 11:14 am
by Clive
Snapshot release 3.0.9 (from customer download area) may fix this ?

In my test it looks good.
circle fit test.png
circle fit test.png (2.22 KiB) Viewed 37123 times

Re: Circle does not fit

Posted: Wed Apr 10, 2013 11:40 am
by TheEnglishPatient
Maybe - unfortunately I cannot test this any longer as my download has just expired. (Can I suggest that you put a crosshair on the centre of the circle instead of the yellow fill - it might it clearer)

Re: Circle does not fit

Posted: Wed Apr 10, 2013 12:08 pm
by andrew
TheEnglishPatient: I've sent you some direct download links via e-mail.

Re: Circle does not fit

Posted: Wed Apr 10, 2013 12:13 pm
by Clive
TheEnglishPatient wrote:Maybe - unfortunately I cannot test this any longer as my download has just expired. (Can I suggest that you put a crosshair on the centre of the circle instead of the yellow fill - it might it clearer)
Hows this, still looks good to me.
Circle fit 2.png
Circle fit 2.png (2.85 KiB) Viewed 37077 times

Re: Circle does not fit

Posted: Wed Apr 10, 2013 4:40 pm
by TheEnglishPatient
Clive and Andrew,

Agree, I just had a quick look into my test files under 3.0.9 and it seems that this version has cured the problem now completely! Well done and thanks again for making a great program even better.

Re: Circle does not fit [solved]

Posted: Wed Jan 21, 2015 2:15 pm
by TheEnglishPatient
The attachment Capture.JPG is no longer available
Oh dear - the problem is back/still unresolved ?! version 3.7.5.0

Rendering of arcs with very large radii seems to be off: In the picture the left long red line is an arc with radius 152,372.3484 m. It's the solution to a least-squares fit to a number of points (green) from a little program I am working on and should pass inside the grey circle (r 0.3875m). Looks like it doesn't, however the short red line is 'snapped' on the left to the arc, so QCAD 'knows' where the arc really is (calculated 0.130065 m from the centre and equal to the short red line length). So the arc is graphically shown ca.0.3m inside its true position.

Can the powers that be please look into this - it's driving me round the bend as this is crucial to the quality control of my other algorithm...

Re: Circle does not fit [solved]

Posted: Wed Jan 21, 2015 2:17 pm
by TheEnglishPatient
Here is the file if anyone wants to play around with it.