The topological structure of Artificial Designer is a boundary representation implementation, loosely based on Oversimplified Euler Operators for a Non-oriented, Non-manifold B-Rep Data Structure.
primitives
The topology is constructed out of three basic primitives:
A node (or a vertex) contains an unsorted list of edges leaving from it.
An edge contains up to two ordered bounding nodes and two separate unordered lists of faces for its left and right sides respectively.
A face contains an unsorted list of bounding edges.
Together a set of primitives creates a complete 'cell complex' ('comp' for short), which contains separate lists for nodes, edges and faces. All functions refer to the items by their index in these corresponding list.
A sector is an ordered sequence of three node indexes traversing counterclockwise inside of a face.
A cycle is an ordered list of sectors.
Sectors and cycles are derived on demand, not stored in a comp.
query
Like sectors and cycles, various other adjacency relationships can be derived when needed, such as all nodes or faces surrounging a node, all nodes of a face or a shared faces or edges between two given nodes.
Euler operators
Topological entities are manipulated with Euler operators, atomic functions which can create or remove nodes, edges and faces. The benefit of Euler operators is the relative ease of testing their correctness. Once they are verified to always create topologically valid results on their own, they can be also trusted to be correct as a part of a larger chain of operations.
The naming of the operators follows a convention of either making (m) or killing (k) some elements, which are sorted based on their dimension (node->edge->face->comp). The elements are followed by a list of arguments (or targets) of the operator. For example mne-nf makes a node, makes an edge and needs a node and a face as a target, which means that the new edge is drawn inside of an existing face. mne-n on the other hand doesn't take a face as an argument, only a node, which means that it creates a wireframe edge.
Edge ring (er) is a special case of a nodeless edge. Face hole (fh) is a special case of a hole made by a node. Edges can sometimes be given as lists (es). Difference between t and p as a target means either a relative value on the target edge (t, from 0 to 1) or a target point (p).
A complete list of used Euler operators below, all other constructions are composed out of these. Each operation can be reversed with a counterpart.