Sewing and unsewing operation
Sewing
The sew operation can be divided into two parts:
- a topological update, which corresponds to linking the darts
- a geometrical update, which corresponds to an update of the affected embedded data, called attributes in our code
Note that the implementation is not as simple as doing one and then the other for consistency reasons: changing the topology affects our ability to retrieve the embedded data, therefore the result is highly sensitive to operation order.
Topology
The i-link operation corresponds to the aforementionned topological update. Given two darts da and db, and a given beta function βi, a link operation corresponds to the update of the βi function in order to have βi(da) = db and/or βi(db) = da depending on darts order and i. For example:
- 1-link(da,db) results in:
- β1(da) = db
- if β0 is defined, β0(db) = da
- 1-link(db,da) results in:
- β1(db) = da
- if β0 is defined, β0(da) = db
- 2-link(da,db) results in:
- β2(da) = db
- β2(db) = da
- 2-link(db,da) results in the same changes as 2-link(da,db)
Exact properties of the link operation directly depends on the property of the modified beta function.
Geometry
The i-sew operation corresponds to an i-link operation, coupled with an update of the affected attributes. How the attributes are updated is defined through trait implementation in the Rust crate (see AttributeUpdate, AttributeBind). Which attributes are updated can be deduced from the dimension i of the sewing operation. This is summarized in the following table:
Dimension | Geometrical operation | 0-cell / Vertex Attributes | 1-cell / Edge Attributes | 2-cell / Face Attributes | 3-cell / Volume Attributes |
---|---|---|---|---|---|
1 | Fusing vertices | affected | unaffected | unaffected | unaffected |
2 | Fusing edges | affected | affected | unaffected | unaffected |
3 | Fusing faces | affected | affected | affected | unaffected |
Unsewing
The unsew operation is the complementary to the sew operation. It behaves according to similar properties, but is used to remove links between darts. It does so by replacing values of the beta functions by the null dart. Geometrical updates are handled and defined in the same way as for the sew operation.