fornjot
fornjot copied to clipboard
Implement geometric validation
We already have lots of validation infrastructure. The bulk of it does structural validation: Making sure that any other objects that a topological object refers to, are actually part of the same shape.
Geometric validation makes sure that geometric constraints are satisfied:
- That the vertices that bound an edge are actually on the edge's curve.
- That the cycles that bound a face are actually on the face's surface.
- That the local and canonical forms of any referenced objects match.
And many more. I think for a start, it would be enough to address these items. We can later extend the validation infrastructure as needed. I don't think this is a hard task, since geometric validation should slot right into the existing validation infrastructure. However, it might surface existing bugs that are not easy to fix, which might complicate things.
As part of my work on #568, I'm currently tracking down a bug that is caused by a geometric constraint violation. I'm observing this bug in my local branch, and I don't know if it's actually present in main (which means my local changes just surfaced it), or if I introduced it in my local branch. Either way, having geometric validation implemented will help me with that bug, and prevent others like it in the future
I'm going to start working on this immediately, before continuing my work on #568.
I've made the first step towards this in #626, where I implemented validation of edge vertices. This has actually already helped me solve the problem that motivated this work in the first place. In addition, further work will benefit from #568 fully being in place, which is why I'm leaving this for now.
I have no specific plans on when to pick this back up. It will probably happen whenever I run into another problem that I think this will fix. I'm going to leave this issue attached to the milestone for now, although I'm not sure about that. I might remove it later.
I'm removing this issue from the milestone, as it no longer directly affects its goals.
Closing in favor of #1129.