fj_core/validate/
cycle.rs

1use crate::{
2    geometry::Geometry,
3    objects::Cycle,
4    validation::{
5        checks::AdjacentHalfEdgesNotConnected, ValidationCheck,
6        ValidationConfig, ValidationError,
7    },
8};
9
10use super::Validate;
11
12impl Validate for Cycle {
13    fn validate(
14        &self,
15        config: &ValidationConfig,
16        errors: &mut Vec<ValidationError>,
17        geometry: &Geometry,
18    ) {
19        errors.extend(
20            AdjacentHalfEdgesNotConnected::check(self, geometry, config)
21                .map(Into::into),
22        );
23    }
24}