///<summary>Pri or perm tooth numbers are valid. Only locations of perm teeth are stored. This also converts mm to screen pixels.</summary> private float GetTransX(string tooth_id) { int toothInt = ToothGraphic.IdToInt(tooth_id); if (toothInt == -1) { throw new ApplicationException("Invalid tooth number: " + tooth_id); //only for debugging } float xmm = ToothGraphic.GetDefaultOrthoXpos(toothInt); //in +/- mm from center return((WidthProjection / 2f + xmm) * Width / WidthProjection); }