// Polycurve
        // Rh Capture/Gh Capture
        public Polycurve PolycurveToSpeckle(PolyCurve p, string units = null)
        {
            var u      = units ?? ModelUnits;
            var myPoly = new Polycurve();

            myPoly.closed = p.IsClosed;
            myPoly.domain = IntervalToSpeckle(p.Domain);
            myPoly.length = p.GetLength();
            myPoly.bbox   = BoxToSpeckle(new RH.Box(p.GetBoundingBox(true)), u);

            var segments = new List <RH.Curve>();

            CurveSegments(segments, p, true);

            //let the converter pick the best type of curve
            myPoly.segments = segments.Select(s => CurveToSpeckle(s, u)).ToList();
            myPoly.units    = u;
            return(myPoly);
        }