Hi, I’m making a script that does some sort of flattening of strips.
The strips are defined by polylines (and theirs offsets), so the method should be simple. get triangles from the strips, and draw the same triangles sequentially on a plane.
But I just noticed, just drawing a triangle based on known edge lengths is not an easy task. I cannot find any built-in component that does this. I’m very curious how people are achieving this.
I’d omit solutions by circles and Kangaroo, since I assume there are more direct solutions.
Please help!
If you want to script it , once you have a edge you can make 2 circles with radius equal to the triangle edges, intersection of these 2 circles gives the third point, which point to choose depends on winding CCW or CW of the source triangle.
I made my own script to do that. I have a MeshUnroller (similar to McNeel one) and a Mesh Flattener (suppress inner point of a mesh).
It is useful to make the whole script as sometime mesh will self intersect during unrolling, so you’ll have to cut it and add some geometry.
So my advice, built your own library (a dll), it will help you to do more complex things and also more tune able.
location of second point relative to the first point?
When those two points are established, the next issue is which side of the line between them do you want the triangle? As you can see, there are two possibilities. Unrolling a series of triangular panels so they remain adjacent and connected is not trivial - unless you use existing code.
First point arbitrary whatever you want, first edge arbitrary (You can make a transform at the end to position your flattened triangles) , orientation of the sides based on cross product of the original edges
Only first edge of the triangle group is arbitrary, afterwards you have all the data from previous flattened triangles based on connection data.
All this if your mesh is developable, if not you will have openings and overlaps based on mesh surface.