Example #1
0
        public ISurface AdaptToCurves(IEnumerable <ICurve> curves)
        {
            BoundingRect domain = BoundingRect.EmptyBoundingRect;

            foreach (ICurve curve in curves)
            {
                ICurve2D c2d = periodicSurface.GetProjectedCurve(curve, 0.0);
                if (domain.IsEmpty())
                {
                    domain = c2d.GetExtent();
                }
                else
                {
                    SurfaceHelper.AdjustPeriodic(periodicSurface, domain, c2d);
                    domain.MinMax(c2d.GetExtent());
                }
            }
            return(new NonPeriodicSurface(periodicSurface, domain));
        }