Example #1
0
        public PolyLineMShapeContent(PolyLineM shape)
        {
            Shape     = shape ?? throw new ArgumentNullException(nameof(shape));
            ShapeType = ShapeType.PolyLineM;

            ContentLength = ContentHeaderLength
                            .Plus(ByteLength.Int32.Times(shape.NumberOfParts))       // Parts
                            .Plus(ByteLength.Double.Times(shape.NumberOfPoints * 2)) // Points(X,Y)
                            .Plus(MeasureRangeByteLength)
                            .Plus(ByteLength.Double.Times(shape.NumberOfPoints))     // Points(M)
                            .ToWordLength();
        }
 public static BoundingBox3D FromGeometry(PolyLineM geometry)
 {
     return(new BoundingBox3D(
                geometry.Points.Select(point => point.X).Min(),
                geometry.Points.Select(point => point.Y).Min(),
                geometry.Points.Select(point => point.X).Max(),
                geometry.Points.Select(point => point.Y).Max(),
                double.NaN,
                double.NaN,
                geometry.MeasureRange.Min,
                geometry.MeasureRange.Max));
 }