GeometryGym.Ifc.IfcIndexedPolyCurve.Parse C# (CSharp) Méthode

Parse() static private méthode

static private Parse ( string str ) : IfcIndexedPolyCurve
str string
Résultat IfcIndexedPolyCurve
        internal static IfcIndexedPolyCurve Parse(string str)
        {
            IfcIndexedPolyCurve c = new IfcIndexedPolyCurve();
            int pos = 0, len = str.Length;
            c.mPoints = ParserSTEP.StripLink(str, ref pos, len);
            string field = ParserSTEP.StripField(str, ref pos, len);
            if (field != "$")
            {
                List<string> strs = ParserSTEP.SplitLineFields(field.Substring(1, field.Length - 2));
                foreach (string s in strs)
                {
                    if (s.ToUpper().StartsWith("IFCLINEINDEX"))
                        c.mSegments.Add(new IfcLineIndex(ParserSTEP.SplitListSTPIntegers(s.Substring(13, s.Length - 14))));
                    else
                    {
                        List<int> ints = ParserSTEP.SplitListSTPIntegers(s.Substring(12, s.Length - 13));
                        c.mSegments.Add(new IfcArcIndex(ints[0], ints[1], ints[2]));
                    }

                }
            }
            field = ParserSTEP.StripField(str, ref pos, len);
            if (field[0] == '.')
                c.mSelfIntersect = field[1] == 'T' ? IfcLogicalEnum.TRUE : IfcLogicalEnum.FALSE;
            return c;
        }