Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perform basic unit-level topology validation when committing mutations. #17

Open
olson-sean-k opened this issue Aug 28, 2018 · 1 comment

Comments

@olson-sean-k
Copy link
Owner

Today, mutations do not perform very much validation. FaceMutation is probably the most sophisticated, and ensures that consistent meshes are manifolds, but the most basic invariants for vertices, edges, and faces are not rigorously examined.

This could be accomplished by introducing some kind of JournaledStorage type that wraps (and owns) storage and tracks all accessed topologies. During a commit, any touched topologies can be examined for basic consistency. For example, any touched edges must have an opposite edge. Using a wrapper ensures that no accesses are missed.

@olson-sean-k
Copy link
Owner Author

Introducing a new type like JournaledStorage could once again increase the type complexity in Plexus' internals. Currently, storage is accessed via the AsStorage trait, which exposes a reference to a Storage structure. There is no trait for that interface, nor does AsStorage support parameterizing this beyond the topological type of the Storage it exposes (i.e., vertex, edge, or face).

Putting storage behind a trait would complicate this pattern quite a bit and touch a lot of code. On the other hand, perhaps a trait should have been used for storage from the beginning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant