Curve coordinate system

Hello!

I have a problem with setting the curve coordinate system to its correct orientation as some of the adaptive family being placed on the curve is flipped for this reason.

I have tried setting the coordinate system by using the CoordinateSystem.ByOriginVectors in Dynamo but I can’t seem to figure out why the curve still have the incorrect coordinate system. Refer to the screenshot for reference.

The highlighted part shows the family being flipped upside down.

I have tried playing with the geometry scaling settings but no luck.

Any help would be greatly appreciated.

Thank you.

Hi @tyreco
Could you please drop here all the relevant files.

Hi @Kulkul

Here are the relevant files.

Tunnel Profile 2.rfa (444 KB) TunnelAlignment.dyn (61.4 KB)

Hi, @tyreco
you can try to set the points in function of project base point, i attached the image of the script…

Hi,
i would first create a 3D-line( out of points) and than get the placement point with the node “Curve.CoordinateSystemAtSegmentLength”. So you don’t need to calculate the Z-Axis of the coordinateSystem at point:

Hi @Straccia_lenzuola ,

I’ve tried what you said but it doesn’t seem to work.

Hi @Fiesta

I can get the points from curve coordinate system at segment length as well but the approach doesn’t seem to solve the flipped coordinates on the curve.

I don’t know why this happens, but than you need to control the vector. Compare it with the z vector of the project system and if it not fit, reverse the vector.

Here is one stable way of making sure the cs doesn’t flip: