private void SetTransform() { Transform.Position = (Point1.To <decimal>() + Point2.To <decimal>()) / 2.0m; var diff = (Point2 - Point1); diff = new Vector3 <long>(Math.Abs(diff.X), Math.Abs(diff.Y), Math.Abs(diff.Z)); Transform.Scale = diff.To <float>() + 1.01f; }