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

Remove Vertex #1526

Merged
merged 28 commits into from
Jan 20, 2023
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1d13d07
Simplify method return value
hannobraun Jan 20, 2023
65a921a
Don't store `Vertex` in `HalfEdge`
hannobraun Jan 20, 2023
4daa74d
Update struct field name
hannobraun Jan 20, 2023
772b449
Inline `Vertex` transform implementation
hannobraun Jan 20, 2023
8260c47
Don't implement partial object traits for vertices
hannobraun Jan 20, 2023
b017466
Refactor
hannobraun Jan 20, 2023
c8dff52
Refactor
hannobraun Jan 20, 2023
ba7d886
Avoid use of `PartialVertex::build`
hannobraun Jan 20, 2023
b2b6353
Inline `PartialVertex::build` into last call site
hannobraun Jan 20, 2023
5e76fbb
Refactor
hannobraun Jan 20, 2023
23bdcb3
Update variable names
hannobraun Jan 20, 2023
e39d2b5
Avoid use of `HalfEdge::vertices`
hannobraun Jan 20, 2023
d3f5657
Don't expect `Vertex` in `HalfEdge::new`
hannobraun Jan 20, 2023
f20867f
Update variable names
hannobraun Jan 20, 2023
a60d005
Update variable names
hannobraun Jan 20, 2023
2777f56
Refactor
hannobraun Jan 20, 2023
97e4a56
Avoid use of `Vertex`
hannobraun Jan 20, 2023
14b4e6c
Avoid use of `Vertex`
hannobraun Jan 20, 2023
c5f88dd
Avoid using `HalfEdge::vertices`
hannobraun Jan 20, 2023
36cef4e
Avoid using `Vertex` in sweep code
hannobraun Jan 20, 2023
8de89cd
Avoid using `Vertex` in validation code
hannobraun Jan 20, 2023
28f5f27
Inline `PartialVertex::from_full` into call site
hannobraun Jan 20, 2023
861b27c
Remove `HalfEdge::vertices`
hannobraun Jan 20, 2023
aae5645
Update variable name
hannobraun Jan 20, 2023
77e7901
Remove unused code
hannobraun Jan 20, 2023
b6be89c
Remove last use of `Vertex`
hannobraun Jan 20, 2023
f2ace07
Remove reference to `Vertex` from doc comment
hannobraun Jan 20, 2023
138ab9a
Remove `Vertex`
hannobraun Jan 20, 2023
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
Prev Previous commit
Next Next commit
Avoid using Vertex in validation code
hannobraun committed Jan 20, 2023

Verified

This commit was signed with the committer’s verified signature.
davidfischer David Fischer
commit 8de89cda986666928f6afd01924e6b6ceecda931
21 changes: 13 additions & 8 deletions crates/fj-kernel/src/validate/edge.rs
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ use fj_math::{Point, Scalar};

use crate::{
objects::{
GlobalCurve, GlobalEdge, GlobalVertex, HalfEdge, Surface, Vertex,
VerticesInNormalizedOrder,
GlobalCurve, GlobalEdge, GlobalVertex, HalfEdge, Surface,
SurfaceVertex, VerticesInNormalizedOrder,
},
storage::Handle,
};
@@ -118,14 +118,18 @@ pub enum HalfEdgeValidationError {

/// Mismatch between position of the vertex and position of its surface form
#[error(
"`Vertex` position doesn't match position of its surface form\n\
- `Vertex`: {vertex:#?}\n\
- `Vertex` position on surface: {curve_position_on_surface:?}\n\
"Position on curve doesn't match surface vertex position\n\
- Position on curve: {position_on_curve:#?}\n\
- Surface vertex: {surface_vertex:#?}\n\
- Curve position converted to surface: {curve_position_on_surface:?}\n\
- Distance between the positions: {distance}"
)]
VertexPositionMismatch {
/// The vertex
vertex: Vertex,
/// The position on the curve
position_on_curve: Point<1>,

/// The surface vertex
surface_vertex: Handle<SurfaceVertex>,

/// The curve position converted into a surface position
curve_position_on_surface: Point<2>,
@@ -254,7 +258,8 @@ impl HalfEdgeValidationError {
if distance > config.identical_max_distance {
errors.push(
Box::new(Self::VertexPositionMismatch {
vertex: vertex.clone(),
position_on_curve: vertex.position(),
surface_vertex: vertex.surface_form().clone(),
curve_position_on_surface,
distance,
})