Exemplo n.º 1
0
        void Build50Cal()
        {
            _type = TwistType.Uniform;

            _inchPerRev     = 15;
            _twistDirection = -1;
        }
Exemplo n.º 2
0
        void Build762mm()
        {
            _type = TwistType.Uniform;

            _inchPerRev     = 12;
            _twistDirection = -1;
        }
Exemplo n.º 3
0
        void OpenTXT(string fileName)
        {
            List <string> file = FileIO.ReadDataTextFile(fileName);

            _twist = new List <GeometryLib.PointCyl>();

            if (file.Count >= 2)
            {
                string[] splitter = FileIO.Splitter;
                if (file[0].Trim() == TwistProfile.Name)
                {
                    TwistType tempEnum = TwistType.Progressive;
                    if (Enum.TryParse <TwistType>(file[1], true, out tempEnum))
                    {
                        _type = tempEnum;
                    }
                    else
                    {
                        _type = TwistType.Progressive;
                    }

                    for (int i = 4; i < file.Count; i++)
                    {
                        string[] splitLine = file[i].Split(splitter, StringSplitOptions.RemoveEmptyEntries);
                        var      twist     = new GeometryLib.PointCyl();

                        if (splitLine.Length > 1)
                        {
                            double result = 0;
                            if (double.TryParse(splitLine[0].Trim(), out result))
                            {
                                twist.Z = result;
                            }
                            result = 0;
                            if (double.TryParse(splitLine[1].Trim(), out result))
                            {
                                twist.ThetaRad = result;
                            }

                            _twist.Add(twist);
                        }
                    }
                }
            }
        }
Exemplo n.º 4
0
 void Build25mm()
 {
     _type           = TwistType.Progressive;
     _inchPerRev     = 40;
     _twistDirection = -1;
 }