Browse Source

add getCutHole from position txt file

HaoShuang 5 years ago
parent
commit
920547043c

+ 72 - 0
HOZProject/FormMeasureTest.Designer.cs

@@ -0,0 +1,72 @@
+namespace HOZProject
+{
+    partial class FormMeasureTest
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.NewMeasureFile = new System.Windows.Forms.Button();
+            this.LoadCutHole = new System.Windows.Forms.Button();
+            this.SuspendLayout();
+            // 
+            // NewMeasureFile
+            // 
+            this.NewMeasureFile.Location = new System.Drawing.Point(29, 23);
+            this.NewMeasureFile.Name = "NewMeasureFile";
+            this.NewMeasureFile.Size = new System.Drawing.Size(136, 35);
+            this.NewMeasureFile.TabIndex = 1;
+            this.NewMeasureFile.Text = "新建测量文件";
+            this.NewMeasureFile.UseVisualStyleBackColor = true;
+            this.NewMeasureFile.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // LoadCutHole
+            // 
+            this.LoadCutHole.Location = new System.Drawing.Point(199, 23);
+            this.LoadCutHole.Name = "LoadCutHole";
+            this.LoadCutHole.Size = new System.Drawing.Size(147, 35);
+            this.LoadCutHole.TabIndex = 2;
+            this.LoadCutHole.Text = "导入切孔";
+            this.LoadCutHole.UseVisualStyleBackColor = true;
+            this.LoadCutHole.Click += new System.EventHandler(this.LoadCutHole_Click);
+            // 
+            // FormMeasureTest
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(800, 450);
+            this.Controls.Add(this.LoadCutHole);
+            this.Controls.Add(this.NewMeasureFile);
+            this.Name = "FormMeasureTest";
+            this.Text = "测量流程测试";
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+        private System.Windows.Forms.Button NewMeasureFile;
+        private System.Windows.Forms.Button LoadCutHole;
+    }
+}

+ 60 - 0
HOZProject/FormMeasureTest.cs

@@ -0,0 +1,60 @@
+//时间:20200619
+//作者:郝爽
+//功能:测量线程的测试
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+using MeasureData;
+
+namespace HOZProject
+{
+    public partial class FormMeasureTest : Form
+    {
+        public MeasureFile m_MeasureFile;
+        
+        public FormMeasureTest()
+        {
+            InitializeComponent();
+        }
+
+        //新建测量文件
+        private void button1_Click(object sender, EventArgs e)
+        {
+            m_MeasureFile = new MeasureFile();
+            if (!m_MeasureFile.New())
+            {
+                return;
+            }
+            else
+            {
+                MessageBox.Show("新建测量文件成功。");
+            }
+        }
+
+        //初始化
+        private void Init_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        //导入切孔
+        private void LoadCutHole_Click(object sender, EventArgs e)
+        {
+            if (m_MeasureFile == null)
+            {
+                MessageBox.Show("请新建一个测量文件");
+            }
+            else
+            {
+                m_MeasureFile.GetCutHolesFromFile("");
+            }
+        }
+    }
+}

+ 120 - 0
HOZProject/FormMeasureTest.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 1 - 0
MeasureData/MeasureData.csproj

@@ -38,6 +38,7 @@
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
+    <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Data.DataSetExtensions" />
     <Reference Include="Microsoft.CSharp" />

+ 72 - 299
MeasureData/MeasureFile.cs

@@ -6,11 +6,12 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Windows.Forms;
 
 using FileManager;
 using System.Xml;
 using System.IO;
-//using System.Windows.Forms.dll;
+
 
 namespace MeasureData
 {
@@ -172,320 +173,92 @@ namespace MeasureData
         }
 
         //从文件生成切割孔信息
-        public void GetCutHolesFromFile(string a_FilePathName)
+        public bool GetCutHolesFromFile(string a_FilePathName)
         {
             //弹出打开txt文件的对话矿
             a_FilePathName.Trim();
             if (string.IsNullOrEmpty(a_FilePathName))
             {
-                ////新建一个文件对话框
-                //OpenFileDialog pOpenFileDialog = new OpenFileDialog();
-
-                ////设置对话框标题
-                //pOpenFileDialog.Title = "打开shp文件";
-
-                ////设置打开文件类型
-                //pOpenFileDialog.Filter = "Shape文件(*.shp)|*.shp";
-
-                ////监测文件是否存在
-                //pOpenFileDialog.CheckFileExists = true;
-
-                ////文件打开后执行以下程序
-                //if (pOpenFileDialog.ShowDialog() == DialogResult.OK)
-                //{
-                //    System.IO.Path.GetFullPath(openFileDialog1.FileName);                             //绝对路径
-                //    System.IO.Path.GetExtension(openFileDialog1.FileName);                           //文件扩展名
-                //    System.IO.Path.GetFileNameWithoutExtension(openFileDialog1.FileName);//文件名没有扩展
-                //    名
-                //    System.IO.Path.GetFileName(openFileDialog1.FileName);                          //得到文件
-                //    System.IO.Path.GetDirectoryName(openFileDialog1.FileName);                  //得到路径
-                //}
+                //新建一个文件对话框
+                OpenFileDialog pOpenFileDialog = new OpenFileDialog();
+                //设置对话框标题
+                pOpenFileDialog.Title = "打开电镜位置列表文件";
+                //设置打开文件类型
+                pOpenFileDialog.Filter = "txt文件(*.txt)|*.txt";
+                //监测文件是否存在
+                pOpenFileDialog.CheckFileExists = true;
+                //文件打开后执行以下程序
+                if (pOpenFileDialog.ShowDialog() == DialogResult.OK)
+                {
+                    a_FilePathName = System.IO.Path.GetFullPath(pOpenFileDialog.FileName);                             //绝对路径
+                 }
             }
-            //按行取出txt文件
-            //解析切孔生成带有位置的切孔
-
-            //// check file pathname
-            //a_strFilePathName.Trim();
-            //if (a_strFilePathName.IsEmpty())
-            //{
-            //    // open file dialog
-            //    CFileDialog dlg(TRUE, NULL, NULL, OFN_FILEMUSTEXIST, TEXTFILE_FILTER);
-            //    CString strDlgTitle = _T("");
-            //    strDlgTitle.LoadString(IDS_OPEN_STAGE_FILE);
-            //    dlg.m_ofn.lpstrTitle = strDlgTitle;
-            //    if (dlg.DoModal() != IDOK)
-            //    {
-            //        // user didn't click OK button, return FALSE
-            //        LogTrace(__FILE__, __LINE__, _T("LoadStageFromTextFile: user canceled on file open dialog."));
-            //        return FALSE;
-            //    }
-            //    else
-            //    {
-            //        a_strFilePathName = dlg.GetPathName();
-            //    }
-            //}
-
-            //// load string lines from the file
-            //std::vector<CString> listLineStr = COTSHelper::LoadTextFileToCStingList(a_strFilePathName);
-
-            //// get stage components
-            //// stage name
-            //CString strName = _T("");
-            //// coordinate system
-            //COORDINATE_SYSTEM_SETTING nCoodrSysSetting = COORDINATE_SYSTEM_SETTING::INVALID;
-            //// boundary
-            //CDomainPtr pBoundary = nullptr;
-            //// STD
-            //CDomainPtr pSTD = nullptr;
-            //// Ferrari
-            //CDomainPtr pFerrari = nullptr;
-            //// Holes list
-            //CHolesList listHoles;
-            //for (auto strLine : listLineStr)
-            //{
-            //    // split the string line with ":"
-            //    std::vector<CString> listStr = COTSHelper::SplitString(strLine, FILE_TITLE_SPLIT);
-
-            //    // jump over the string if it is invalid
-            //    // it should have a title string and value string
-            //    if ((int)listStr.size() != TEXTFILE_ITEM_COLUMN_NUMBER)
-            //    {
-            //        continue;
-            //    }
-            //    CString strTitle = listStr[0];
-            //    CString strValue = listStr[1];
-
-            //    // get stage component
-            //    for (int i = (int)STAGE_ITEMS::MIN; i <= (int)STAGE_ITEMS::MAX; ++i)
-            //    {
-            //        // match title?
-            //        CString strFileItemTitle;
-            //        strFileItemTitle.LoadString(IDS_STAGE_FILE_TITLE_FIRST + i);
-            //        if (strTitle.CompareNoCase(strFileItemTitle) == 0)
-            //        {
-            //            // found a stage item
-            //            switch ((STAGE_ITEMS)i)
-            //            {
-            //                case STAGE_ITEMS::NAME:
-            //                    {
-            //                        // jump over if name is set
-            //                        if (strName.IsEmpty())
-            //                        {
-            //                            // jump over if value string is empty
-            //                            strValue.Trim();
-            //                            if (!strValue.IsEmpty())
-            //                            {
-            //                                strName = strValue;
-            //                            }
-            //                        }
-            //                    }
-            //                    break;
-
-            //                case STAGE_ITEMS::COORDINATE_SYSTEM:
-            //                    {
-            //                        // jump over if coordinate system setting is set
-            //                        if (nCoodrSysSetting == COORDINATE_SYSTEM_SETTING::INVALID)
-            //                        {
-            //                            // jump over if value string is empty
-            //                            strValue.Trim();
-            //                            if (!strValue.IsEmpty())
-            //                            {
-            //                                // string to int
-            //                                int nValue;
-            //                                if (COTSHelper::StringToInt(strValue, nValue))
-            //                                {
-            //                                    // validation
-            //                                    if (nValue >= (int)COORDINATE_SYSTEM_SETTING::MIN && nValue <= (int)COORDINATE_SYSTEM_SETTING::MAX)
-            //                                    {
-            //                                        nCoodrSysSetting = (COORDINATE_SYSTEM_SETTING)nValue;
-            //                                    }
-            //                                }
-            //                            }
-
-            //                        }
-            //                    }
-            //                    break;
-
-            //                case STAGE_ITEMS::BOUNDARY:
-            //                    {
-            //                        // jump over if boundary is set
-            //                        if (pBoundary == nullptr)
-            //                        {
-            //                            // get boundary
-            //                            CDomainPtr pDomain = GetDomain(strValue);
-            //                            if (pDomain != nullptr)
-            //                            {
-            //                                pBoundary = pDomain;
-            //                            }
-            //                        }
-            //                    }
-            //                    break;
-
-            //                case STAGE_ITEMS::STD:
-            //                    {
-            //                        // jump over if STD is set
-            //                        if (pSTD == nullptr)
-            //                        {
-            //                            // get STD
-            //                            CDomainPtr pDomain = GetDomain(strValue);
-            //                            if (pDomain != nullptr)
-            //                            {
-            //                                pSTD = pDomain;
-            //                            }
-            //                        }
-            //                    }
-            //                    break;
-
-            //                case STAGE_ITEMS::FERRARI:
-            //                    {
-            //                        // jump over if pFerrari is set
-            //                        if (pFerrari == nullptr)
-            //                        {
-            //                            // get STD
-            //                            CDomainPtr pDomain = GetDomain(strValue);
-            //                            if (pDomain != nullptr)
-            //                            {
-            //                                pFerrari = pDomain;
-            //                            }
-            //                        }
-            //                    }
-            //                    break;
-
-            //                case STAGE_ITEMS::HOLE:
-            //                    {
-            //                        // try to get a sample hole with the value string
-            //                        CHolePtr pHole = GetHole(strValue);
-            //                        if (pHole != nullptr)
-            //                        {
-            //                            listHoles.push_back(pHole);
-            //                        }
-            //                    }
-            //                    break;
-            //            }
-
-            //            // get out the for loop
-            //            break;
-            //        }
-            //    }
-            //}
 
-            //// check stage components
-            //// name should be ok
-            //if (pBoundary == nullptr)
-            //{
-            //    return FALSE;
-            //}
-            //if (pBoundary->IsInvalid())
-            //{
-            //    // boundary is invalid
-            //    return FALSE;
-            //}
-            //if (pSTD != nullptr)
-            //{
-            //    // STD has to be inside of the boundary
-            //    if (!pBoundary->DomainInDomain(*(pSTD.get())))
-            //    {
-            //        // STD is over the boundary
-            //        return FALSE;
-            //    }
-            //}
-            //else
-            //{
-            //    LogErrorTrace(__FILE__, __LINE__, _T("LoadStageFromTextFile: empty STD domain pointer."));
-            //    return FALSE;
-            //}
+            //按行取出txt文件
+            string[] lines = File.ReadAllLines(a_FilePathName, System.Text.Encoding.Default);
 
-            //if (pFerrari != nullptr)
-            //{
-            //    // Ferrari has to be inside of the boundary
-            //    if (!pBoundary->DomainInDomain(*(pFerrari.get())))
-            //    {
-            //        // Ferrari is over the boundary
-            //        return FALSE;
-            //    }
-            //    else if (pSTD->IntersectDomain(*(pFerrari.get())))
-            //    {
-            //        // Ferrari has common part with STD
-            //        return FALSE;
-            //    }
-            //}
-            //else
-            //{
-            //    LogErrorTrace(__FILE__, __LINE__, _T("LoadStageFromTextFile: empty Ferrari domain pointer."));
-            //    return FALSE;
-            //}
+            //按现有的文件格式生成
+            string posMode = lines[1];
+            if (posMode.CompareTo(@"Absolute") != 0)
+            {
+                return false;
+            }
 
+            //解析切孔生成带有位置的切孔
+            //验证数量是否正确
+            int nNum = Convert.ToInt32(lines[3]);
+            int nLines = lines.Length;
+            if (nNum != (lines.Length - 4))
+            {
+                return false;
+            }
 
-            //// hole has to be inside of the boundary and can't have common part with STD and each other
-            //CHolesList listStageHoles;
-            //for (auto pHole : listHoles)
-            //{
-            //    if (!pBoundary->DomainInDomain(*(pHole.get())))
-            //    {
-            //        // this hole is over the boundary, jump over
-            //        continue;
-            //    }
-            //    else if (pSTD->IntersectDomain(*(pHole.get())))
-            //    {
-            //        // this hole has common part with STD, jump over
-            //        continue;
-            //    }
-            //    else if (pFerrari->IntersectDomain(*(pHole.get())))
-            //    {
-            //        // this hole has common part with Ferrari, jump over
-            //        continue;
-            //    }
-
-            //    BOOL bHasCommonPart = FALSE;
-            //    for (auto pStageHole : listStageHoles)
-            //    {
-            //        if (pStageHole->IntersectDomain(*(pHole.get())))
-            //        {
-            //            // this hole has common part with a hole already on the stage
-            //            bHasCommonPart = TRUE;
-            //            break;
-            //        }
-            //    }
-            //    if (bHasCommonPart)
-            //    {
-            //        // this hole has common part with a hole already on the stage, jump over
-            //        continue;
-            //    }
-
-            //    // the hole is ok, add it into stage holes list
-            //    listStageHoles.push_back(pHole);
-            //}
-            //if (listStageHoles.size() == 0)
-            //{
-            //    // no hole at all
-            //    return FALSE;
-            //}
+            //行内标识的个数及位置
+            string[] titles = lines[2].Split(',');
+            int numPos = titles.Length;
 
-            //// the stage is in SEM coordinate system, convert all components to OTS system 
-            //if (nCoodrSysSetting == COORDINATE_SYSTEM_SETTING::SEM)
-            //{
-            //    if (!ConverSEMToOTSSystem(pBoundary, pSTD, listStageHoles))
-            //    {
-            //        return FALSE;
-            //    }
-            //}
+            int nLabelPos = Array.IndexOf(titles, "Label");
+            int nXPos = Array.IndexOf(titles, "X");
+            int nYPos = Array.IndexOf(titles, "Y");
+            int nZPos = Array.IndexOf(titles, "Z");
+            int nTPos = Array.IndexOf(titles, "T");
+            int nRPos = Array.IndexOf(titles, "R");
+            int nMPos = Array.IndexOf(titles, "M");
 
-            //// create stage
-            //CStagePtr pStage(new CStage());
+            for (int i = 0; i < nNum; i++)
+            {
+                int currentLine = i + 4;
+                string currentString = lines[currentLine];
+                string[] CurrentPos = currentString.Split(',');
+                int nCurrentPosNum = CurrentPos.Length;
 
-            //// set stage components
-            //pStage->SetName(strName);
-            //pStage->SetBoundary(pBoundary);
-            //pStage->SetSTD(pSTD);
-            //pStage->SetFerrari(pFerrari);
-            //pStage->SetHoleList(listStageHoles);
+                //当前行内的标识及位置个数不够
+                if (nCurrentPosNum != numPos)
+                {
+                    return false;
+                }
 
-            //// add the stage into stages list
-            //m_listStages.push_back(pStage);
+                //切孔标识
+                CutHole CHole = new CutHole();
+                CHole.HoleName = CurrentPos[nLabelPos];
+                //切孔位置
+                SemPosition holePos = new SemPosition();                
+                holePos.X = (float)Convert.ToDouble(CurrentPos[nXPos]);
+                holePos.Y = (float)Convert.ToDouble(CurrentPos[nYPos]);
+                holePos.Z = (float)Convert.ToDouble(CurrentPos[nZPos]);
+                holePos.M = (float)Convert.ToDouble(CurrentPos[nMPos]);
+                holePos.T = (float)Convert.ToDouble(CurrentPos[nTPos]);
+                holePos.R = (float)Convert.ToDouble(CurrentPos[nRPos]);
+                CHole.Position = holePos;
+
+                //更新切孔链表
+                this.ListCutHole.Add(CHole);
+            }
 
-            //// ok, return TRUE
-            //return TRUE;
+            return true;            
         }
+
+        
         #endregion
     }
 }

+ 8 - 9
MeasureData/SemPosition.cs

@@ -14,13 +14,12 @@ namespace MeasureData
     //六轴坐标系统
     public class SemPosition:ISlo
     {
-
         private float m_x, m_y, m_z, m_r, m_t, m_m;
 
         #region X
         //限定范围
         const float Xmax = 100;
-        const float Xmin = 10;
+        const float Xmin = 0;
 
         public float X
         {
@@ -40,7 +39,7 @@ namespace MeasureData
         #region Y
         //限定范围
         const float Ymax = 100;
-        const float Ymin = 10;
+        const float Ymin = 0;
 
         public float Y
         {
@@ -60,7 +59,7 @@ namespace MeasureData
         #region Z
         //限定范围
         const float Zmax = 100;
-        const float Zmin = 10;
+        const float Zmin = (float)0.005;
 
         public float Z
         {
@@ -79,8 +78,8 @@ namespace MeasureData
 
         #region R
         //限定范围
-        const float Rmax = 100;
-        const float Rmin = 10;
+        const float Rmax = 360;
+        const float Rmin = 0;
 
         public float R
         {
@@ -99,8 +98,8 @@ namespace MeasureData
 
         #region T
         //限定范围
-        const float Tmax = 100;
-        const float Tmin = 10;
+        const float Tmax = 180;
+        const float Tmin = 0;
 
         public float T
         {
@@ -120,7 +119,7 @@ namespace MeasureData
         #region M
         //限定范围
         const float Mmax = 100;
-        const float Mmin = 10;
+        const float Mmin = 0;
 
         public float M
         {