Exemplo n.º 1
0
        private void Button_Click_Input(object sender, RoutedEventArgs e)
        {
            string fileExt = "";
            string fileP   = filePath.Text;
            bool   test    = ComFunc.InputFile(ref fileP, ref fileExt);

            filePath.Text = fileP;
            zList.Clear();
            if (fileExt == "nc")
            {
                DiaCut.NcFilePhrase(fileP, zList);
                //计算最大值和最小值
                GetSegVlue();
                MessageBox.Show("成功导入");
            }

            Trace.WriteLine("1");
        }
Exemplo n.º 2
0
        private void Button_Click_CXTOXYZ(object sender, RoutedEventArgs e)
        {
            if (zList.Count == 0)
            {
                return;
            }
            double        zOfs, zScl;
            bool          zor = double.TryParse(zOffset.SegValue, out zOfs);
            bool          zsr = double.TryParse(zScale.SegValue, out zScl);
            List <Vertex> xyzList;

            if (zor && zsr)
            {
                xyzList = DiaCut.CXZToXYZ(zList, zScl, zOfs);
            }
            else
            {
                xyzList = DiaCut.CXZToXYZ(zList);
            }
            ComFunc.Save3DPtToTxt(xyzList);
        }