Expect &Geometry in check_interior_winding

This commit is contained in:
Hanno Braun 2024-03-18 12:44:32 +01:00
parent 4ba7c3c189
commit d179892ec2

View File

@ -13,10 +13,10 @@ impl Validate for Face {
&self, &self,
_: &ValidationConfig, _: &ValidationConfig,
errors: &mut Vec<ValidationError>, errors: &mut Vec<ValidationError>,
_: &Geometry, geometry: &Geometry,
) { ) {
FaceValidationError::check_boundary(self, errors); FaceValidationError::check_boundary(self, errors);
FaceValidationError::check_interior_winding(self, errors); FaceValidationError::check_interior_winding(self, geometry, errors);
} }
} }
@ -56,7 +56,11 @@ impl FaceValidationError {
// checks for `Cycle` to make sure that the cycle is closed properly. // checks for `Cycle` to make sure that the cycle is closed properly.
} }
fn check_interior_winding(face: &Face, errors: &mut Vec<ValidationError>) { fn check_interior_winding(
face: &Face,
_: &Geometry,
errors: &mut Vec<ValidationError>,
) {
if face.region().exterior().half_edges().is_empty() { if face.region().exterior().half_edges().is_empty() {
// Can't determine winding, if the cycle has no edges. Sounds like a // Can't determine winding, if the cycle has no edges. Sounds like a
// job for a different validation check. // job for a different validation check.