If you separate the faces of a mesh with Split Edges
and convert them to curves with Mesh to Curve
, these curves are twisted in various directions.
Depending on the mesh, in some results the indices and thus the tangents are oriented clockwise, and in some counterclockwise:
The problem becomes even more apparent when the mesh is a three-dimensional structure:
If you then use these curves to instantiate objects, or use Curve to Mesh
with a non-closed profile curve, the generated faces point in different directions.
The following questions have been asked before in this context:
- Transfer/Align curves normals to faces normals
- How to unify the direction (Tangent direction) of the curve?
However, even though the answer sought here is the solution to both of these questions, each of these questions treats the issue from two different point of view and does not fully discuss the underlying problem:
- One question deals with aligning the tangents uniformly.
- The other question is about adjusting the Curve Tilt to match the normal of the faces.
However, the actual question and solution would have to address both issues equally, since these two things are related in this use case.
Therefore again and as summary the question:
How can the curves generated from a mesh be aligned according to the normals of the original faces, so that their tangents run in a uniform direction, and the curve tilt is aligned according to the normals of the faces?