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

Validate that coincident vertices within Sketch are identical #1689

Open
hannobraun opened this issue Mar 16, 2023 · 2 comments
Open

Validate that coincident vertices within Sketch are identical #1689

hannobraun opened this issue Mar 16, 2023 · 2 comments
Labels
good first issue Good for newcomers topic: validation Infrastructure for checking various properties of objects, making sure they are valid. type: feature New features and improvements to existing features

Comments

@hannobraun
Copy link
Owner

Shapes in the Fornjot kernel are made up of objects (faces, edges, vertices, ...). Those objects are managed in a centralized data store, and their location in that store gives them a unique identity. This means that two objects that have been created at different types are never identical, even if they are equal (i.e. contain the same data).

If two vertices within a Sketch or Solid are equal (or really close together) but not identical, this is a bug. If two vertices are meant to be equal, but aren't identical, then they can end up with slightly different positions, depending on various factors, which would result in an error down the line (either a approximation failure, or an invalid triangle mesh being generated). It would be best to have validation checks to protect against this.

This would involve two different but similar validation checks: One for Sketch, one for Solid. Those checks should use the validation configuration to determine which vertices should be identical.

@hannobraun hannobraun added type: feature New features and improvements to existing features topic: core Issues relating to core geometry, operations, algorithms labels Mar 16, 2023
A-Walrus added a commit to A-Walrus/Fornjot that referenced this issue Mar 21, 2023
Before it was in shell. This partially addresses hannobraun#1689, holding off on
validating sketches until we figure out sketch-face relationship: hannobraun#1691
A-Walrus added a commit to A-Walrus/Fornjot that referenced this issue Mar 21, 2023
Before it was in shell. This partially addresses hannobraun#1689, holding off on
validating sketches until we figure out sketch-face relationship: hannobraun#1691
@hannobraun hannobraun changed the title Validate that coincident vertices within Sketch and Solid are identical Validate that coincident vertices within Sketch are identical Mar 21, 2023
@hannobraun
Copy link
Owner Author

Part of this issue (validation within Solid) has been addressed in #1695. As @A-Walrus alludes to in the commit listed above, it's probably best to hold off on the Sketch-related part of this issue until #1691 has been addressed.

@hannobraun
Copy link
Owner Author

I think this issue is suited for anyone looking to start contributing to Fornjot. There is an existing validation of that kind for Solid (which was part of the original issue description), so basically all that has to be done is to add a validation test for Sketch here, using the existing one as a template.

Also adding a unit test for the new validation check would be great, but is not required. If you're feeling ambitious, Shell validation has quite a few unit tests, which show how that kind of thing could be tested.

@hannobraun hannobraun added the good first issue Good for newcomers label Oct 30, 2023
@hannobraun hannobraun added topic: validation Infrastructure for checking various properties of objects, making sure they are valid. and removed topic: core Issues relating to core geometry, operations, algorithms labels Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers topic: validation Infrastructure for checking various properties of objects, making sure they are valid. type: feature New features and improvements to existing features
Projects
None yet
Development

No branches or pull requests

1 participant