public override void Check(ArcChart chart) { // foreach (var h in chart.Holds) // { // foreach (var t in chart.Timings) // { // if (t.Timing > h.Timing && t.Timing < h.EndTiming) // { // Faults.Add(h); // } // } // } foreach (var a in chart.Arcs) { foreach (var t in chart.Timings) { if (t.Timing > a.Timing && t.Timing < a.EndTiming) { if (Mathf.Approximately(a.XStart, a.XEnd) && Mathf.Approximately(a.YStart, a.YEnd)) { continue; } Faults.Add(a); } } } Faults = Faults.Distinct().ToList(); }
public override void Check(ArcChart chart) { List <(ArcArcTap, float, float)> ats = new List <(ArcArcTap, float, float)>(); foreach (var arc in chart.Arcs) { foreach (var at in arc.ArcTaps) { float t = 1f * (at.Timing - arc.Timing) / (arc.EndTiming - arc.Timing); float x = ArcAlgorithm.X(arc.XStart, arc.XEnd, t, arc.LineType); float y = ArcAlgorithm.Y(arc.YStart, arc.YEnd, t, arc.LineType); ats.Add((at, x, y)); } } for (int i = 0; i < ats.Count - 1; ++i) { for (int k = i + 1; k < ats.Count; ++k) { if (ats[i].Item2 == ats[k].Item2 && ats[i].Item3 == ats[k].Item3 && ats[i].Item1.Timing == ats[k].Item1.Timing) { Faults.Add(ats[i].Item1); } } } Faults = Faults.Distinct().ToList(); }
public override void Check(ArcChart chart) { foreach (var h in chart.Holds) { if (h.EndTiming <= h.Timing) { Faults.Add(h); } } Faults = Faults.Distinct().ToList(); }
public override void Check(ArcChart chart) { for (int i = 0; i < chart.Taps.Count - 1; ++i) { for (int k = i + 1; k < chart.Taps.Count; ++k) { if (chart.Taps[i].Timing == chart.Taps[k].Timing && chart.Taps[i].Track == chart.Taps[k].Track) { Faults.Add(chart.Taps[i]); } } } Faults = Faults.Distinct().ToList(); }
public override void Check(ArcChart chart) { foreach (var h in chart.Holds) { foreach (var t in chart.Taps) { if (t.Timing >= h.Timing && t.Timing <= h.EndTiming && t.Track == h.Track) { Faults.Add(t); } } } Faults = Faults.Distinct().ToList(); }
public override void Check(ArcChart chart) { foreach (var a in chart.Arcs) { if (a.EndTiming <= a.Timing) { if (a.XEnd == a.XStart) { if (a.YEnd == a.YStart) { Faults.Add(a); } } } } Faults = Faults.Distinct().ToList(); }
public override void Check(ArcChart chart) { foreach (var h in chart.Holds) { foreach (var t in chart.Timings) { if (t.Timing > h.Timing && t.Timing < h.EndTiming) { Faults.Add(h); } } } foreach (var a in chart.Arcs) { foreach (var t in chart.Timings) { if (t.Timing > a.Timing && t.Timing < a.EndTiming) { Faults.Add(a); } } } Faults = Faults.Distinct().ToList(); }