Ejemplo n.º 1
0
 private Rectangle CalculateWireBoxing()
 {
     if (_box == null)
     {
         // Iterate through
         var tempBox         = new Rectangle();
         var currentPosition = new WirePoint(0, 0);
         foreach (var step in this)
         {
             (WirePoint newPosition, _) = UpdatePositionWithStep(step, currentPosition);
             tempBox.AdjustDimensionToIncludePoint(newPosition);
             currentPosition = newPosition;
         }
         _box = tempBox;
     }
     return(_box);
 }