public void ChangeRoller(char to) { var oldrol = roller; roller = new Roller(GetJoint(to)); CheckValidityWithBackUp(oldrol); }
/// <summary> /// Create a new truss object. /// </summary> public void Restart() { model = new Truss(); joints.Clear(); pin = null; roller = null; knownForces.Clear(); }
private void CheckValidityWithBackUp(Roller oldRollerJustInCase) { if (pin != null && roller != null && pin.Joint.X.Equals(roller.Joint.X)) { roller = oldRollerJustInCase; throw new Exception("F**k you, bad support alignment ..."); } }