// // Acquires all of the applicable congruent segments as well as congruent angles. Then checks for SAS // private static List<EdgeAggregator> CheckAndGenerateThirdCongruentPair(Triangle tri1, Triangle tri2, CongruentAngles cas1, CongruentAngles cas2) { List<EdgeAggregator> newGrounded = new List<EdgeAggregator>(); // We have eliminated all reflexive relationships at this point // The congruent relations should not share any angles if (cas1.AngleShared(cas2) != null) return newGrounded; // Both congruent pairs of angles must relate both triangles if (!cas1.LinksTriangles(tri1, tri2)) return newGrounded; if (!cas2.LinksTriangles(tri1, tri2)) return newGrounded; Angle firstAngleTri1 = tri1.AngleBelongs(cas1); Angle secondAngleTri1 = tri1.AngleBelongs(cas2); Angle firstAngleTri2 = tri2.AngleBelongs(cas1); Angle secondAngleTri2 = tri2.AngleBelongs(cas2); Angle thirdAngle1 = tri1.OtherAngle(firstAngleTri1, secondAngleTri1); Angle thirdAngle2 = tri2.OtherAngle(firstAngleTri2, secondAngleTri2); CongruentAngles newCas = new CongruentAngles(thirdAngle1, thirdAngle2); // Hypergraph List<GroundedClause> antecedent = new List<GroundedClause>(); antecedent.Add(tri1); antecedent.Add(tri2); antecedent.Add(cas1); antecedent.Add(cas2); newGrounded.Add(new EdgeAggregator(antecedent, newCas, annotation)); return newGrounded; }