public static Option <Curve> GetIntersectionCurve(this IBody2 toolBody, IBody2 cuttingPlane, IModeler modeler) { var innerCurves = toolBody.GetIntersectionEdgesNonDestructive(cuttingPlane) .Buffer(2, 2) .Select(b => (ICurve)b[0].GetCurve()) .Select(c => (ICurve)c.Copy()) .ToArray(); if (innerCurves.Length <= 0) { return(Prelude.None); } var curve = modeler.MergeCurves(innerCurves); return(Prelude.Optional(curve)); }