Curve.Reverse behaving.... not the way i would hope so :)

Hi guys,
so i have those 2 curves and i’m looking to reverse them (to eventually choose the right one)
But for an obnoxious reason… the 2nd one is not reversing

Hello, you tried to remove online 14 and 15 Autodesk,
or to use the node (Curve.Reverse) of the previous output

coming from me, it might be nonsense (beginner)


stange, try this way

pts = Point.ByCoordinates(Math.RandomList(3) * 10, Math.RandomList(3) * 13,  [0,0,3]);
arc1 = Arc.ByBestFitThroughPoints(pts);
arc2 = arc1.Offset(2);
surface = Autodesk.Surface.ByLoft([arc1, arc2]);
pericurves = surface.PerimeterCurves();
// get max curves
maxcurves = List.SortByFunction(pericurves, func);
bigArc1 = maxcurves[-1];
bigArc2 = maxcurves[-2];
// reverse curves
//r_arc1 = Autodesk.Curve.Reverse(bigArc1);
r_arc1 = bigArc1.Reverse();
//r_arc2 = Autodesk.Curve.Reverse(bigArc2);
r_arc2 = bigArc2.Reverse();
1 Like

@christian.stan it’s important to specify the Autodesk to avoid conflict with other packahges

Thanks @c.poupin,
i get the same result using the same geometry.
I also notice that the sorting works fine on straight ramp but not on curved ones…



Both are ramp object

1 Like

Even funnier, only 1 curve doesn’t behave
Weird behavior

Can you share the ramp object ?

After a talk with the amazong @jacob.small agreed that it’s a bug that i need to log :slight_smile:

You can replicate with any ramp actually.