Esempio n. 1
0
        private void AdvParamForm_Load(object sender, EventArgs e)
        {
            tolTextBox.Text  = m_nestParam.GetConTol().ToString("0.000");
            rotTextBox.Text  = m_nestParam.GetPartRotStep().ToString("0.000");
            evalTextBox.Text = m_nestParam.GetEvalFactor().ToString();
            timeTextBox.Text = m_iNestingTime.ToString();

            if (m_nestParam.IsPartInPart())
            {
                partInPartCheckBox.Checked = true;
            }
            else
            {
                partInPartCheckBox.Checked = false;
            }

            if (m_nestParam.EnableOptimization())
            {
                optimizationCheckBox.Checked = true;
            }
            else
            {
                optimizationCheckBox.Checked = false;
            }

            GetConfigHigh();
        }
Esempio n. 2
0
        static private void SaveNestParam(XmlDocument xmlDoc, XmlNode paramNode, NestParamEx nestParam, int iNestingTime)
        {
            // MatLeftMargin.
            {
                XmlElement node = xmlDoc.CreateElement("MatLeftMargin");
                node.InnerText = nestParam.GetMatLeftMargin().ToString("0.0000000");
                paramNode.AppendChild(node);
            }

            // MatRightMargin.
            {
                XmlElement node = xmlDoc.CreateElement("MatRightMargin");
                node.InnerText = nestParam.GetMatRightMargin().ToString("0.0000000");
                paramNode.AppendChild(node);
            }

            // MatTopMargin.
            {
                XmlElement node = xmlDoc.CreateElement("MatTopMargin");
                node.InnerText = nestParam.GetMatTopMargin().ToString("0.0000000");
                paramNode.AppendChild(node);
            }

            // MatBottomMargin.
            {
                XmlElement node = xmlDoc.CreateElement("MatBottomMargin");
                node.InnerText = nestParam.GetMatBottomMargin().ToString("0.0000000");
                paramNode.AppendChild(node);
            }

            // MatMargin.
            {
                XmlElement node = xmlDoc.CreateElement("MatMargin");
                node.InnerText = nestParam.GetMatMargin().ToString("0.0000000");
                paramNode.AppendChild(node);
            }

            // PartDis.
            {
                XmlElement node = xmlDoc.CreateElement("PartDis");
                node.InnerText = nestParam.GetPartDis().ToString("0.0000000");
                paramNode.AppendChild(node);
            }

            // ConTol.
            {
                XmlElement node = xmlDoc.CreateElement("ConTol");
                node.InnerText = nestParam.GetConTol().ToString("0.0000000");
                paramNode.AppendChild(node);
            }

            // PartRotStep.
            {
                XmlElement node = xmlDoc.CreateElement("PartRotStep");
                node.InnerText = nestParam.GetPartRotStep().ToString("0.0000000");
                paramNode.AppendChild(node);
            }

            // StartCorner.
            {
                XmlElement node = xmlDoc.CreateElement("StartCorner");
                node.InnerText = ((int)nestParam.GetStartCorner()).ToString();
                paramNode.AppendChild(node);
            }

            // NestDir.
            {
                XmlElement node = xmlDoc.CreateElement("NestDir");
                node.InnerText = ((int)nestParam.GetNestDir()).ToString();
                paramNode.AppendChild(node);
            }

            // PartInPart.
            {
                XmlElement node = xmlDoc.CreateElement("PartInPart");
                if (nestParam.IsPartInPart())
                {
                    node.InnerText = "1";
                }
                else
                {
                    node.InnerText = "0";
                }
                paramNode.AppendChild(node);
            }

            // EvalFactor.
            {
                XmlElement node = xmlDoc.CreateElement("EvalFactor");
                node.InnerText = nestParam.GetEvalFactor().ToString();
                paramNode.AppendChild(node);
            }

            // nest time.
            {
                XmlElement node = xmlDoc.CreateElement("NestingTime");
                node.InnerText = iNestingTime.ToString();
                paramNode.AppendChild(node);
            }
        }