Skip to content

Commit

Permalink
Merge pull request #1737 from hannobraun/validate
Browse files Browse the repository at this point in the history
Make minor cleanups in `Solid` validation code
  • Loading branch information
hannobraun authored Mar 28, 2023
2 parents d9dba81 + 7da50a3 commit 96278e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion crates/fj-kernel/src/builder/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! API for building objects
// These are new-style builders that build on top of the partial object API.
mod cycle;
mod edge;
mod face;
Expand Down
10 changes: 5 additions & 5 deletions crates/fj-kernel/src/validate/solid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ impl Validate for Solid {
pub enum SolidValidationError {
/// [`Solid`] contains vertices that are coincident, but not identical
#[error(
"Solid contains Vertices that are coinciendent but not identical\n
"Solid contains Vertices that are coincident but not identical\n
Vertex 1: {:#?} {:#?}
Vertex 2: {:#?} {:#?}
", .0[0].0, .0[0].1,.0[1].0,.0[1].1
)]
DistinctVertsCoincide([(Handle<Vertex>, Point<3>); 2]),
DistinctVerticesCoincide([(Handle<Vertex>, Point<3>); 2]),

/// [`Solid`] contains vertices that are identical, but do not coincide
#[error(
Expand All @@ -37,7 +37,7 @@ pub enum SolidValidationError {
Vertex 2: {:#?} {:#?}
", .0[0].0, .0[0].1,.0[1].0,.0[1].1
)]
IdenticalVertsNotCoincident([(Handle<Vertex>, Point<3>); 2]),
IdenticalVerticesNotCoincident([(Handle<Vertex>, Point<3>); 2]),
}

impl SolidValidationError {
Expand Down Expand Up @@ -72,7 +72,7 @@ impl SolidValidationError {
if a.0.distance_to(&b.0) > config.identical_max_distance
{
errors.push(
Self::IdenticalVertsNotCoincident([
Self::IdenticalVerticesNotCoincident([
(a.1.clone(), a.0),
(b.1.clone(), b.0),
])
Expand All @@ -84,7 +84,7 @@ impl SolidValidationError {
if a.0.distance_to(&b.0) < config.distinct_min_distance
{
errors.push(
Self::DistinctVertsCoincide([
Self::DistinctVerticesCoincide([
(a.1.clone(), a.0),
(b.1.clone(), b.0),
])
Expand Down

0 comments on commit 96278e8

Please sign in to comment.