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

Make minor cleanups in Solid validation code #1737

Merged
merged 3 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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