I’m implementing an algorithm in which I need manipulate a mesh, adding and deleting edges quickly and iterating quickly over the edges adjacent to a vertex in CCW or CW order.
The winged-edge structure is used in the description of the algorithm I’m working from, but I can’t find any concise descriptions of how to perform those operations on this data structure.
I’ve learned about it in University but that was a while ago.
In response to this question i’ve searched the web too for any good documentation, found none that is good, but we can go through a quick example for CCW and CW order and insertion/deletion here.

Have a look at this table and graphic:
from this page:
http://www.cs.mtu.edu/~shene/COURSES/cs3621/NOTES/model/winged-e.html
The table gives only the entry for one edge
a, in a real table you have this row for every edge. You can see you get the:but here comes the critical point: it gives them relative to the direction of the edge which is
X->Yin this case, and when it is right-traversed(e->a->c).So for the CW-order of going through the graph this is very easy to read: edge
aleft has right-successorcand then you look into the row for edgec.Ok, this table is easy to read for CW-order traversal; for CCW you have to think “from which edge did i come from when i walked this edge backwards”. Effectively you get the next edge in CCW-order by taking the left-traverse-predecessor in this case
band continue with the row-entry for edgebin the same manner.Now insertion and deletion: It is clear that you cant just remove the edge and think that the graph would still consist of only triangles; during deletion you have to join two vertices, for example
XandYin the graphic. To do this you first have to make sure that everywhere the edgeais referred-to we have to fix that reference.So where can
abe referred-to? only in the edgesb,c,d and e(all other edges are too far away to knowa) plus in the vertex->edge-table if you have that (but let’s only consider the edges-table in this example).As an example of how we have to fix edges lets take a look at
c. Likea,chas a left and right pre- and successor (so 4 edges), which one of those isa? We cannot know that without checking because the table-entry forccan have the nodeYin either its Start- or End-Node. So we have to check which one it is, let’s assume we find thatchas Y in its Start-Node, we then have to check whetheraisc'sright predecessor (which it is and which we find out by looking atc'sentry and comparing it toa) OR whether it isc'sright successor. “Successor??” you might ask? Yes because remember the two “left-traverse”-columns are relative to going the edge backward. So, now we have found thataisc'sright predecessor and we can fix that reference by insertinga'sright predecessor. Continue with the other 3 edges and you are done with the edges-table. Fixing an additionalNode->Verticesis trivial of course, just look into the entries for X and Y and deleteathere.Adding edges is basically the reverse of this fix-up of 4 other edges BUT with a little twist. Lets call the node which we want to split
Z(it will be split intoXandY). You have to take care that you split it in the right direction because you can have eitherdandecombined in a node oreandc(like if the new edge is horizontal instead of the verticalain the graphic)! You first have to find out between which 2 edges of the soon-to-beXand between which 2 edges ofYthe new edge is added: You just choose which edges shall be on one node and which on the other node: In this example graphic: choose that you wantb,cand the 2 edges to the north in between them on one node, and it follows that the other edges are on the other node which will becomeX. You then find by vector-subtraction that the new edgeahas to be between b and c, not between say c and one of the 2 edges in the north. The vector-subtraction is the desired position of the newXminus the desired position ofY.