@henrydm wrote:
Hello,
I've realized that MorphControl with a target curve laid in plane YZ has a strange behavior, here the images:
Here the code to reproduce it:
protected override Result RunCommand(RhinoDoc doc, RunMode mode) { ObjRef[] curvesToFlow; ObjRef objRefSourceCrv, objRefTargetCrv; //Get Curves if (RhinoGet.GetOneObject("Source curve", false, ObjectType.Curve, out objRefSourceCrv) != Result.Success) return Result.Failure; RhinoDoc.ActiveDoc.Objects.UnselectAll(); if (RhinoGet.GetOneObject("Target curve", false, ObjectType.Curve, out objRefTargetCrv) != Result.Success) return Result.Failure; RhinoDoc.ActiveDoc.Objects.UnselectAll(); if (RhinoGet.GetMultipleObjects("Curves To Flow", false, ObjectType.Curve, out curvesToFlow) != Result.Success) return Result.Failure; //Flow Curves var mc = new MorphControl(objRefSourceCrv.Curve().ToNurbsCurve(), objRefTargetCrv.Curve().ToNurbsCurve()) { PreserveStructure = true }; var outputCrvs = curvesToFlow.Select(objRef => objRef.Curve()).ToList(); outputCrvs.ForEach(_ => mc.Morph(_)); //Add to Doc outputCrvs.ForEach(_=>RhinoDoc.ActiveDoc.Objects.AddCurve(_)); return Result.Success; }
Is there a way to avoid that?.
Attached a dummy project and 3dm fileThanks and best regards
EnricFlowByCurve.zip (25.3 KB) Flowing Curves.3dm (269.7 KB)
Posts: 2
Participants: 2