QList<RVector> RShape::getIntersectionPointsAE(const RArc& arc1, const REllipse& ellipse2, bool limited) { QList<RVector> candidates = RShape::getIntersectionPointsCE( RCircle(arc1.getCenter(), arc1.getRadius()), ellipse2); if (!limited) { return candidates; } QList<RVector> res; for (int i=0; i<candidates.count(); i++) { RVector c = candidates[i]; if (arc1.isOnShape(c)) { if (!ellipse2.isFullEllipse()) { double a1 = ellipse2.getCenter().getAngleTo(ellipse2.getStartPoint()); double a2 = ellipse2.getCenter().getAngleTo(ellipse2.getEndPoint()); double a = ellipse2.getCenter().getAngleTo(c); if (!RMath::isAngleBetween(a, a1, a2, ellipse2.isReversed())) { continue; } } res.append(c); } } return res; }
QList<RVector> RShape::getIntersectionPointsAA(const RArc& arc1, const RArc& arc2, bool limited) { QList<RVector> candidates = RShape::getIntersectionPoints( RCircle(arc1.getCenter(), arc1.getRadius()), RCircle(arc2.getCenter(), arc2.getRadius()) ); if (!limited) { return candidates; } QList<RVector> res; for (int i=0; i<candidates.count(); i++) { if (arc1.isOnShape(candidates[i]) && arc2.isOnShape(candidates[i])) { res.append(candidates[i]); } } // ret.setTangent(tangent); return res; }