RhinoCommon: Loft with Tangency

Hi,

I’m trying to create a loft with tangency! :slight_smile:

On the left is the result created by this code, and on the right is geometry created by code but the loft in Rhino. Any idea what I’m doing wrong? It is ignoring the tangency.

            var curve1 = new Circle(Plane.WorldXY, 1).ToNurbsCurve();
            var brep = Surface.CreateExtrusion(curve1, -Vector3d.ZAxis).ToBrep();
         
            RhinoDoc.ActiveDoc.Objects.AddBrep(brep);

            var plane2 = Plane.WorldYZ;
            plane2.Origin = new Point3d(-5, 0, 5);

            var curve2 = new Circle(plane2, 0.5).ToNurbsCurve();
            RhinoDoc.ActiveDoc.Objects.AddCurve(curve2);
            var result = Brep.CreateFromLoft(new Curve[] { brep.Trims[3].Edge, curve2 }, Point3d.Unset, Point3d.Unset, true, false,
                brep.Trims[3], null, LoftType.Normal, false);

            RhinoDoc.ActiveDoc.Objects.AddBrep(result[0]);

            return Result.Success;

Thanks,
Raf

1 Like

Hi @rafadelmolino,

I am able to create tangent lofts with more than one input curve. But not in the example you provided. I’ve logged an issue so I can look into this.

https://mcneel.myjetbrains.com/youtrack/issue/RH-70546

Thanks,

– Dale

1 Like

Hi,

Thanks for your help. I will try to add one curve in the middle!

Thanks,

Rafa

Is there any workaround on this issue? I found in my case it’s very difficult to add a good middle curve.