Polyline Direction

So the Flip command works on the cones,

But it is not solving the problem, Basically when using the point list param in Gh, the list of points on all edges is currently not in sync (based on the direction of polylines) as shown in the image shared above… The aim was thus to find a solution to synchronize the point lists or the curve directions.

To change the point order, you need to change the seam location.

Lots of effort to display curve direction.
Fennec has a component for it, and the nice thing about this plugin is that you don’t need the whole assembly, just pick what you like.

The op doesn’t seem to need just the direction but possibly also the end points in the same place

It appears at the start / mid / end points.

Yes Got it, CrvSeam is the command…It helps Change the start point of the curve and then I can use the flip direction…

Thanks a lot

That’s a Great tool… Wondering any tool like that to help me control and change the curve directions in Grasshopper

You have to dig food4rhino a little bit, but Sasquatch has a component that forces all curves to run clockwise;

I’ll check,
Thank you

Hi Jenil,

Your problem has 2 parts:

  1. Adjusting the direction of curves
  2. Syncronizing the seam point of curves
    In your case, both problems can be solved by Grasshopper without using any extra plugins.

For the first problem, assuming that your curves are planar and parallel to the XY plane, you just need to check the normal vector of their tangent plane and flip curves based on the negativity of the normal vector’s Z component.
For the second problem, since your curves have various shapes, locations, and edge counts, you need a guide curve to adjust the seam point. In my solution, the red curve is used as the guide but any curve that represents the order of the stairs should work. Firstly, we find 2 corner points of each curve that are near the guide curve, then we pick the corner whose closest point on the guide curve has a higher curve parameter (t). we use the parameter of that corner (parameter of its own curve not the guide curve) to adjust the seam.


Match Curves Direction & Seam.gh (18.3 KB)

NOTICE that I have assumed that your curves always have an edge parallel to the guide curve (meaning that each stair has at least 4 edges, no less).

2 Likes

There is a component in Fennec Closed Curve Orientaion

to check the direction (clockwise or counterclockwise)

That’s probably just implementing the native RhinoCommon function:

Amazing, That works great…
Thanks a lot

1 Like