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 sketches #67

Closed
1 of 3 tasks
hannobraun opened this issue Jan 21, 2022 · 3 comments
Closed
1 of 3 tasks

Validate sketches #67

hannobraun opened this issue Jan 21, 2022 · 3 comments
Labels
topic: core Issues relating to core geometry, operations, algorithms type: feature New features and improvements to existing features

Comments

@hannobraun
Copy link
Owner

hannobraun commented Jan 21, 2022

Right now, users can just feed any points they want to sketches, valid or not. This might then result in crashes or other weird issues.

Sketches should be validated before use. To keep the fj library light, this should probably be done in the host application. For now, it's fine if that results in a panic with an informative error message. At a later stage, it would be nice to display that error to the user in a friendlier way.

Specifically, validation should include the following checks:

  • Sketches must not have duplicate points.
  • Sketches must not be self-overlapping.
  • Sketches must have counter-clockwise winding.
@hannobraun hannobraun added type: feature New features and improvements to existing features topic: core Issues relating to core geometry, operations, algorithms labels Jan 21, 2022
@hannobraun
Copy link
Owner Author

Due to all the validation being done by the Shape API, it is now no longer possible to create sketches with duplicate vertices. I've updated the issue description to reflect this.

Making sure that sketches are not self-overlapping should also be done as part of the Shape API, by validating that edges in general don't intersect.

@hannobraun
Copy link
Owner Author

hannobraun commented Apr 14, 2022

I realized that sketches must have counter-clockwise winding. Otherwise, the surface normals of outer surfaces are not going to be correct after sweeping. Updated the list in the issue description accordingly.

@hannobraun
Copy link
Owner Author

Closing in favor of #1129.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: core Issues relating to core geometry, operations, algorithms type: feature New features and improvements to existing features
Projects
None yet
Development

No branches or pull requests

1 participant