Beispiel #1
0
        private static Plane ParsePlane(byte[] rawData, ref int startIndex)
        {
            var plane = new Plane();

            plane.ID = ParserHelper.ToULong(rawData, ref startIndex);
            var vertexCount = ParserHelper.ToInt(rawData, ref startIndex);
            var vertices    = new List <Point3d>();

            for (var iVertex = 0; iVertex < vertexCount; iVertex++)
            {
                vertices.Add(ParserHelper.ToCartesianVectorMMPrecision(rawData, ref startIndex));
            }

            // close loop in boundary
            vertices.Add(vertices[0]);
            plane.Boundary            = vertices;
            plane.PlaneClassification = Plane.ClassificationFromInt(ParserHelper.ToInt(rawData, ref startIndex));
            plane.PlaneAlignment      = Plane.AlignmentFromInt(ParserHelper.ToInt(rawData, ref startIndex));
            return(plane);
        }