Exemple #1
0
        public Curve unClose(Curve curve, double offsetends)
        {
            //Open closed curve seam
            Curve unClosed = null;

            //Exit if input curve is not closed
            if (!curve.IsClosed)
            {
                return unClosed;
            }

            double minparamA = (curve.Domain.Min + offsetends);
            double maxparamA = (curve.Domain.Max - offsetends);

            if (minparamA > maxparamA)
            {
                return unClosed;
            }

            if (curve.Split(new List<double> { minparamA, maxparamA }) == null)
            {
                return unClosed;
            }

            Curve[] curvesA = curve.Split(new List<double> { minparamA, maxparamA });

            return unClosed = curvesA[1];
        }