Esempio n. 1
0
        public void ChangeRoller(char to)
        {
            var oldrol = roller;

            roller = new Roller(GetJoint(to));
            CheckValidityWithBackUp(oldrol);
        }
Esempio n. 2
0
 /// <summary>
 /// Create a new truss object.
 /// </summary>
 public void Restart()
 {
     model = new Truss();
     joints.Clear();
     pin    = null;
     roller = null;
     knownForces.Clear();
 }
Esempio n. 3
0
 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 ...");
     }
 }