List of selected edges
-
Hello,
For a polygon with selected edges, I would like to obtain the list of these edges as a list of pairs of point indices.
This list would appear, for example, as follows:[[3,8],[2,5],[12,6],[5,14],[16,12],...]
-
Hey @Kantronin,
you might want to look at geometry_polgyon_edges_2024.0.py, it should answer all your questions.
The TLDR is: full-edge maps as you hint at in your posting do exist in Cinema via helper functions, but they are often also not very useful. Internally, Cinema is operating as any other DCC application with the concept of what is often called a "half-edge" data structure. So, when you have the two polygons
AandB:a---b---e | A | B | d---c---fWhich share an edge over the vertices
bandc, this is actually two edges and not one, due to how normals work. For both polygons to have a normal facing in the same direction, they must have opposite winding orders, which means that the edgeb-cis actually two edges:b->candc->b. So,Acould for example index the edge asbc, andBascb. The example goes into more detail with this.Cheers,
Ferdinand