示例#1
0
        private void SHOW_N_S_W_E(Point3d p1, StreamWriter file)
        {
            Point3d p = p1.Copy();

            char[] dir = { 'E', 'N', 'U' };
            if (p.X < 0)
            {
                dir[0] = 'W';
                p.X    = -p.X;
            }
            if (p.Y < 0)
            {
                dir[1] = 'S';
                p.Y    = -p.Y;
            }
            if (p.Z < 0)
            {
                dir[2] = 'D';
                p.Z    = -p.Z;
            }
            file.WriteLine(dir[0] + " {0:0.##} " + dir[1] + " {1:0.##} " + dir[2] + " {2:0.##}", p.X, p.Y, p.Z);
        }