Closed GoogleCodeExporter closed 9 years ago
Actually I can workaround my problem by adding a less robust (read 'hack')
test. The cut_area() method in the area_funcs.py file knows the 'I' and 'J'
terms by measuring 'cx - px' and 'cy = py'. If these distances are greater
than '1.0 / tolerance' then the size of the circle is 'huge'.
I have hacked the area_funcs.py file and it serves my purposes but I can't
decide if this is a valid test in all circumstances.
The fact that I'm not passing the tolerance in from the Heeks data model is
also a flaw but, as I said, it's a hack at the moment.
Any opinions as to the validity of this hack?
Original comment by David.Ni...@gmail.com
on 13 Jun 2010 at 12:43
Attachments:
David,
You are right, any are with a very large radius should be done as an arc.
This should be done in libarea, though. I will look at it.
Original comment by danhe...@gmail.com
on 13 Jun 2010 at 7:27
I obviously wrote my last comment in a hurry; I meant:
You are right, any arc with a very large radius should be output as a line.
Original comment by danhe...@gmail.com
on 13 Jun 2010 at 7:37
Dan,
I have added an extra check for particularly large arcs in the CCurve::CheckForArc() method. Look for the 'max_arc_radius' variable in the Area.cpp file attached to see the check. It seems to work alright but I can't commit to the libarea project. If you agree with the change, can you please commit it?
Ta
David Nicholls
Original comment by David.Ni...@gmail.com
on 2 Sep 2010 at 9:44
Attachments:
David,
I have added you as a committer to the libarea project.
But I am worried that we might want an arc with a large radius, if it is a
large arc.
I think the code below your change should be doing the same thing.
if(!c.LineIsOn(current_vt->m_p, vt->m_p, accuracy))
return false;
Dan.
Original comment by danhe...@gmail.com
on 3 Sep 2010 at 7:07
This has changed quite a bit recently and is probably fixed now.
Original comment by danhe...@gmail.com
on 23 May 2011 at 8:29
Original issue reported on code.google.com by
David.Ni...@gmail.com
on 13 Jun 2010 at 12:06