Ejemplo n.º 1
0
        public override SegmentProxy GetSubCurve(double fromRatio, double toRatio)
        {
            ICurve     subCurve;
            const bool asRatio = true;

            InnerSegment.GetSubcurve(fromRatio, toRatio, asRatio, out subCurve);

            var segment = subCurve as ISegment;

            Assert.NotNull(segment, "segment expected from GetSubCurve() on segment");

            // TODO revise returning the same SegmentIndex. Correct?
            // maybe return something more narrow than SegmentProxy? Just what the caller needs?

            return(new AoSegmentProxy(segment, PartIndex, SegmentIndex));
        }
Ejemplo n.º 2
0
        public override WKSEnvelope GetSubCurveBox(double fromRatio, double toRatio)
        {
            WKSEnvelope box = new WKSEnvelope();

            if (fromRatio > 0 || toRatio < 1)
            {
                ICurve     subCurve;
                const bool asRatio = true;
                InnerSegment.GetSubcurve(fromRatio, toRatio, asRatio, out subCurve);
                var segment = subCurve as ISegment;
                Assert.NotNull(segment, "segment expected from GetSubCurve() on segment");
                segment.QueryWKSEnvelope(ref box);
            }
            else
            {
                InnerSegment.QueryWKSEnvelope(ref box);
            }

            return(box);
        }