FS#2589 - Apollonius.getCommonTangents(...) may fail to return the correct tangents
Andrew,
Related to Draw > Circle > Circle2TP > Apollonius.getSolutionsPCC
In some occasions the returned tangents are misplaced.
After inversion resulting in not valid tangent circles and cleaned out by Apollonius.verify(...)
Documented such a result in the attached file:
- c1 and c2 are the inversion circles ordered by size.
- CommonTangents[0-3] are the returned tangents (red)
- added code references for tangents1
- the expected tangents are in green.
For some reason the order of things matters.
Most probably other resources rely on that.
In the case of Apollonius.getSolutionsPCC it doesn’t.
All returned tangents are inversed to possible solutions.
Verified and returned.
https://github.com/qcad/qcad/blob/master/scripts/Apollonius.js#L988-L996
None of documented tangents will produce valid solutions.
The fix here is to use ShapeAlgorithms.getTangents(...) instead.
Although that it also includes a flaw (FS#2588)
I also suspect that this is one of the reasons why Apollonius may fail to produce (all) solutions for common cases.
Why methods for creating tangent circles are incomplete.
Regards,
CVH
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Andrew,
Studied this in depth for solving Circle2TP exceptions or incomplete results.
Below is my code for finding all possible tangents between 2 shapes.
Primarily for 2 RCircle shapes.
Including support for RLine shapes and RPoint shapes as zero sized circles.
I included the adapted tangents code as a js file: Apollonius.getAllTangents.js
An overview of what is returned is included: Apollonius_getAllTangents.dxf
Regards,
CVH