How do the Curve.Normal and Curve.NormalAtParameter nodes calculate the direction of normals?

Hi all,

Fairly new to Dynamo. I’m trying to figure out how exactly are the normals to curves decided by Dynamo. For Curve.Normal, the normals lie within the curves’ plane, but even in this scenario there can be two normals. E.g for a line along the X-axis, there could be normals along +Y or -Y at any parameter. I suspect it is related to the ‘direction’ of the curve but am unsure of what rules are being followed.

Additionally, using the same example of the line along +X, I’m also unclear on how Dynamo decides which planes the lines lie in. There could be two planes for the example above - XZ and XY, but dynamo seems to default to XY.

Could someone advise on what rules Dynamo follows to calculate the direction of the normals ? I’ve checked the dictionary but it is silent on this.


You might find this useful in visualising how vectors are working…

Perhaps someone else can explain the code behind it, personally I tend to play and see how it works, but it is always useful to understand the logic :slight_smile:



Thanks Mark. That’s a pretty useful method.

I think I’ve cracked the code (so to speak). The logic appears to follow the same methods adopted for commercial finite element programs. Below is a snippet of the local axis definition from ETABS’s analysis manual:

To summarize, the local X axis is decided by the direction of the curve (start point to end point), the local Y is parallel to the Global Z axis and once the local X-Y plane is known, the curve normal direction can be found from the right-hand-thumb rule.

I’ve tested this out on a few examples and it seems to hold. I’ll leave this open in case I’m wrong and someone can advise on the correct approach.