[Grasshopper] How to use Flip Curve to reverse the direction of a curve

[Grasshopper] How to use Flip Curve to reverse the direction of a curve Grasshopper component EN

This article explains how to use Flip Curve to reverse the direction of a curve.

Flip Curve1
Flip Curve2

On the Grasshopper, it is represented by either of the two above.


↑Youtube Channel

Reversing the direction of a curve

By using Flip Curve, the direction of a curve can be reversed.

curve

In this article, we will use this curve for this explanation.

線の向きを逆にする

By inputting line data to the Flip Curve(C), the direction of the curve is reversed.

In this case, we are connecting the curve set in Curve.

check the direction

Components used: (1) Curve (2) Flip Curve (3) Divide Curve

Let’s check the direction of the curve.

Divide Curve is used to divide the curve at a point.

This time, 10 is input to the Divide Curve(N) and the curve is divided by 10 points.

divided by points

As you can see, the curve is divided by points.

look at the original direction of the curve

Additional Component: (1) Point Order

First, let’s look at the original direction of the curve.

Use Point Order.

left to right

This shows the order of the points and that the direction of the curve is from left to right.

check the direction of the curve when Flip Curve is used

Now, let’s check the direction of the curve when Flip Curve is used.

right to left

We see that the points are oriented from right to left and the direction of the curve is the opposite of the previous one.

two curves

To make it easier to understand, we have prepared two curves.

Line

Additional component: (1) Line

First, the two original curves are divided by a point, and then the points are connected by a line with Line.

the points are connected by a line

Thus, the points are connected by a line.

Flip Curve

Now we used Flip Curve.

intersected

Then, the points are connected by a line as if they intersected.

Since the direction of one curve is reversed, the points are connected to each other on opposite sides.

surface

Additional Component: (1) Ruled Surface

Now let’s check the surface.

First, using Ruled Surface, connect the two original curve data.

a surface that connects the two curves

This creates a surface that connects the two curves.

Flip Curve

Now, we used Flip Curve.

twisted

This time, a twisted surface is created.

As you can see, we have reconfirmed that the lines are facing the opposite direction.

Conversely, if a surface is twisted, the original direction of the curves may be reversed, and Flip Curve may be able to solve the problem.

Data output

Data output

Let’s look at the data connected to and output from the Flip Curve.

The Flip Curve(C) on the right side outputs curve data in the opposite direction.

The Flip Curve(F) outputs information on whether the direction is reversed or not.

True is output if the direction is reversed, and False is output if it is not.

In the case of the image above, the curve is facing the other way, so False is output.

向きを参考にする線

By inputting another curve to the Flip Curve(G), the orientation can be determined according to the orientation of the other curve.

This time, we have another curve to look at.

original state

In this case, since it is the same curve, the orientation of the curve is the same in its original state.

Therefore, the Flip Curve(F) outputs False.

True

Let’s connect the curves that are reversed by Flip Curve.

Since the direction of the curve is reversed, the direction is determined according to the curve.

Therefore, the direction is reversed and True is output from the Flip Curve(F).

List of Grasshopper articles using Flip Curve component↓

Comment

Translate »