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 winding of sketches #2158

Closed
hannobraun opened this issue Jan 15, 2024 · 1 comment
Closed

Validate winding of sketches #2158

hannobraun opened this issue Jan 15, 2024 · 1 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

Comments

@hannobraun
Copy link
Owner

Sketches each contain multiple Regions. The exterior cycle of those regions should have counter-clockwise winding, their interior cycles should have clockwise winding. I believe that the sweep code already assumes this, but currently, this is not documented nor enforced.

Implementation

This new validation check would go into the validate module, specifically validate::sketch. You can use the structure of the existing validation check (for Sketch and other objects) as a guideline for the implementation.

The check itself should be rather straight-forward, as it could just use Cycle::winding. Please note that this method is buggy (#2130), but as long as we make sure not to use any complicated cycles in the unit test for this validation check, we'll be fine (just stick to polygons).

Since this should be relatively straight-forward, and there are already numerous validation checks to serve as inspiration, I'm designating this as a good first issue Good for newcomers .

Related Issues

There are two related issues:

Neither of those issues are blockers for this one, but work would need to be coordinated. If you're interested in picking this up, I suggest you check out those issues to see if anybody is already working on them.

@hannobraun hannobraun added type: feature New features and improvements to existing features good first issue Good for newcomers topic: validation Infrastructure for checking various properties of objects, making sure they are valid. labels Jan 15, 2024
emka added a commit to emka/fornjot that referenced this issue Mar 10, 2024
hannobraun pushed a commit to emka/fornjot that referenced this issue Mar 13, 2024
@hannobraun
Copy link
Owner Author

Addressed by @emka in #2256.

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