# Loft Direction?

Hi All

In code below note I enter curves into the list from the bottom curve to the top curve then loft.

My expectation is that it will loft from the first entry toward the last, so I enter my point3d as the endpoint in the command… the heart is inverted but set as the start point it works, meaning the loft runs backwards through the curve list from the top down? Is this the intended function?

`````` protected override Result RunCommand(RhinoDoc doc, RunMode mode)
{
var LoftList = new List<Curve>();
var PointCount = 0;
var rc = RhinoGet.GetInteger("Points:", true, ref PointCount, 0, 200);
if (rc != Result.Success)
return rc;
NurbsCurve Heart = DrawHeart(PointCount); //draw the Sin() heart
var Heart2 = new NurbsCurve(Heart.ToNurbsCurve()); //copy it
Heart.Translate(new Vector3d(0, 0, 5));// move it up
Point3d dot = new Point3d(0, 0, 5); //create the endpoint
var HeartSurface = Brep.CreateFromLoft(LoftList, dot, Point3d.Unset, LoftType.Loose,false);
doc.Views.Redraw();
return Result.Success;
}
``````

Hi Chris,

To be of help, we’re going to need some source code that we can run here, as as to replicate what you are seeing.

Thanks,

– Dale

Hi Dale.

The code calls a geometry DLL to generate a sine curve for the heart. Ill write some regular code that emulates this. The core of the issue is in the main code though the routine loads the curves from the curve on the cplane then the curve above the cplane into the list then finally the point in the centre of the second curve. (dot)

The logical direction of the loft would be curve0 to curve1 to dot. Making dot the endpoint in the loft command, however with dot in that position the loft inverts. When I set dot as startpoint the loft works.

Its not a major issue as long as I know which way round loft is expecting the curves, it just seemed reversed compared to the way you would run the command normally.