Skip to content

Commit

Permalink
Clean up uses of ValidationConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Jun 21, 2022
1 parent fa5a62b commit f3cb2b7
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions crates/fj-operations/src/circle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use fj_kernel::{
algorithms::Tolerance,
objects::{Cycle, Edge, Face, Surface},
shape::{LocalForm, Shape},
validation::{self, validate, Validated, ValidationError},
validation::{validate, Validated, ValidationConfig, ValidationError},
};
use fj_math::{Aabb, Point, Scalar};

Expand All @@ -12,7 +12,7 @@ use super::ToShape;
impl ToShape for fj::Circle {
fn to_shape(
&self,
config: &validation::ValidationConfig,
config: &ValidationConfig,
_: Tolerance,
_: &mut DebugInfo,
) -> Result<Validated<Shape>, ValidationError> {
Expand Down
4 changes: 2 additions & 2 deletions crates/fj-operations/src/difference_2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use fj_kernel::{
algorithms::Tolerance,
objects::{Cycle, Edge, Face},
shape::{LocalForm, Shape},
validation::{self, validate, Validated, ValidationError},
validation::{validate, Validated, ValidationConfig, ValidationError},
};
use fj_math::Aabb;

Expand All @@ -12,7 +12,7 @@ use super::ToShape;
impl ToShape for fj::Difference2d {
fn to_shape(
&self,
config: &validation::ValidationConfig,
config: &ValidationConfig,
tolerance: Tolerance,
debug_info: &mut DebugInfo,
) -> Result<Validated<Shape>, ValidationError> {
Expand Down
4 changes: 2 additions & 2 deletions crates/fj-operations/src/group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use fj_interop::debug::DebugInfo;
use fj_kernel::{
algorithms::Tolerance,
shape::Shape,
validation::{self, validate, Validated, ValidationError},
validation::{validate, Validated, ValidationConfig, ValidationError},
};
use fj_math::Aabb;

Expand All @@ -11,7 +11,7 @@ use super::ToShape;
impl ToShape for fj::Group {
fn to_shape(
&self,
config: &validation::ValidationConfig,
config: &ValidationConfig,
tolerance: Tolerance,
debug_info: &mut DebugInfo,
) -> Result<Validated<Shape>, ValidationError> {
Expand Down
6 changes: 3 additions & 3 deletions crates/fj-operations/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use fj_interop::debug::DebugInfo;
use fj_kernel::{
algorithms::Tolerance,
shape::Shape,
validation::{self, Validated, ValidationError},
validation::{Validated, ValidationConfig, ValidationError},
};
use fj_math::Aabb;

Expand All @@ -38,7 +38,7 @@ pub trait ToShape {
/// Compute the boundary representation of the shape
fn to_shape(
&self,
config: &validation::ValidationConfig,
config: &ValidationConfig,
tolerance: Tolerance,
debug_info: &mut DebugInfo,
) -> Result<Validated<Shape>, ValidationError>;
Expand Down Expand Up @@ -91,7 +91,7 @@ macro_rules! dispatch {

dispatch! {
to_shape(
config: &validation::ValidationConfig,
config: &ValidationConfig,
tolerance: Tolerance,
debug_info: &mut DebugInfo,
) -> Result<Validated<Shape>, ValidationError>;
Expand Down
4 changes: 2 additions & 2 deletions crates/fj-operations/src/shape_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use fj_interop::{debug::DebugInfo, mesh::Mesh};
use fj_kernel::{
algorithms::{triangulate, InvalidTolerance, Tolerance},
validation::{self, ValidationError},
validation::{ValidationConfig, ValidationError},
};
use fj_math::{Aabb, Point, Scalar};

Expand Down Expand Up @@ -38,7 +38,7 @@ impl ShapeProcessor {
Some(user_defined_tolerance) => user_defined_tolerance,
};

let config = validation::ValidationConfig::default();
let config = ValidationConfig::default();
let mut debug_info = DebugInfo::new();
let shape = shape.to_shape(&config, tolerance, &mut debug_info)?;
let mesh = triangulate(shape.into_inner(), tolerance, &mut debug_info);
Expand Down
4 changes: 2 additions & 2 deletions crates/fj-operations/src/sketch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use fj_kernel::{
algorithms::Tolerance,
objects::{Face, Surface},
shape::Shape,
validation::{self, validate, Validated, ValidationError},
validation::{validate, Validated, ValidationConfig, ValidationError},
};
use fj_math::{Aabb, Point};

Expand All @@ -12,7 +12,7 @@ use super::ToShape;
impl ToShape for fj::Sketch {
fn to_shape(
&self,
config: &validation::ValidationConfig,
config: &ValidationConfig,
_: Tolerance,
_: &mut DebugInfo,
) -> Result<Validated<Shape>, ValidationError> {
Expand Down
4 changes: 2 additions & 2 deletions crates/fj-operations/src/sweep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use fj_interop::debug::DebugInfo;
use fj_kernel::{
algorithms::{sweep_shape, Tolerance},
shape::Shape,
validation::{self, validate, Validated, ValidationError},
validation::{validate, Validated, ValidationConfig, ValidationError},
};
use fj_math::{Aabb, Vector};

Expand All @@ -11,7 +11,7 @@ use super::ToShape;
impl ToShape for fj::Sweep {
fn to_shape(
&self,
config: &validation::ValidationConfig,
config: &ValidationConfig,
tolerance: Tolerance,
debug_info: &mut DebugInfo,
) -> Result<Validated<Shape>, ValidationError> {
Expand Down
4 changes: 2 additions & 2 deletions crates/fj-operations/src/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use fj_interop::debug::DebugInfo;
use fj_kernel::{
algorithms::{transform_shape, Tolerance},
shape::Shape,
validation::{self, validate, Validated, ValidationError},
validation::{validate, Validated, ValidationConfig, ValidationError},
};
use fj_math::{Aabb, Transform, Vector};

Expand All @@ -11,7 +11,7 @@ use super::ToShape;
impl ToShape for fj::Transform {
fn to_shape(
&self,
config: &validation::ValidationConfig,
config: &ValidationConfig,
tolerance: Tolerance,
debug_info: &mut DebugInfo,
) -> Result<Validated<Shape>, ValidationError> {
Expand Down

0 comments on commit f3cb2b7

Please sign in to comment.