diff --git a/crates/fj-core/src/algorithms/approx/curve.rs b/crates/fj-core/src/algorithms/approx/curve.rs index 7de0c597b..82bff3dc3 100644 --- a/crates/fj-core/src/algorithms/approx/curve.rs +++ b/crates/fj-core/src/algorithms/approx/curve.rs @@ -203,7 +203,7 @@ mod tests { let curve = Curve::from_path_and_surface(path, surface.clone(), &mut core); let boundary = CurveBoundary::from(boundary); - let half_edge = HalfEdgeGeom { path, boundary }; + let half_edge = HalfEdgeGeom { boundary }; let tolerance = 1.; let approx = (&curve, &half_edge, &surface) @@ -226,7 +226,7 @@ mod tests { let curve = Curve::from_path_and_surface(path, surface.clone(), &mut core); let boundary = CurveBoundary::from(boundary); - let half_edge = HalfEdgeGeom { path, boundary }; + let half_edge = HalfEdgeGeom { boundary }; let tolerance = 1.; let approx = (&curve, &half_edge, &surface) @@ -248,7 +248,7 @@ mod tests { let curve = Curve::from_path_and_surface(path, surface.clone(), &mut core); let boundary = CurveBoundary::from([[0.], [TAU]]); - let half_edge = HalfEdgeGeom { path, boundary }; + let half_edge = HalfEdgeGeom { boundary }; let tolerance = 1.; let approx = (&curve, &half_edge, &surface) @@ -279,7 +279,7 @@ mod tests { let curve = Curve::from_path_and_surface(path, surface.clone(), &mut core); let boundary = CurveBoundary::from([[0.], [TAU]]); - let half_edge = HalfEdgeGeom { path, boundary }; + let half_edge = HalfEdgeGeom { boundary }; let tolerance = 1.; let approx = (&curve, &half_edge, &surface) diff --git a/crates/fj-core/src/geometry/half_edge.rs b/crates/fj-core/src/geometry/half_edge.rs index 0ea12b321..6f8e2730b 100644 --- a/crates/fj-core/src/geometry/half_edge.rs +++ b/crates/fj-core/src/geometry/half_edge.rs @@ -5,33 +5,6 @@ use super::{CurveBoundary, SurfacePath}; /// The geometry of a half-edge #[derive(Copy, Clone, Debug)] pub struct HalfEdgeGeom { - /// # The path of the half-edge - /// - /// ## Implementation Note - /// - /// Currently, all curve-related geometry is defined locally, in terms of - /// the surface that the curve is on (or purely in 2D, if there is no - /// surface associated with this geometry). However, curves exist globally, - /// independently of surfaces. Half-edges in multiple surfaces can refer to - /// the same curve, and in fact, that is the whole reason for their - /// existence as a topological object. - /// - /// This contradiction, globally defined curves but locally defined curve - /// geometry, is the reason that this curve geometry is defined right here, - /// associated with a locally existing half-edge. (And, I might add, - /// redundantly so, as multiple half-edges within the same surface context - /// can refer to the same curve.) - /// - /// Instead, it should be possible to define curve geometry *either* locally - /// or globally. Then that respective definition can be associated with the - /// curve (and possibly, in addition, a surface). How exactly that is going - /// to work is up in the air. - /// - /// The point of all this exposition is to clarify that this field doesn't - /// really belong here. It exists here for practical reasons that are, - /// hopefully, temporary. - pub path: SurfacePath, - /// # The boundary of the half-edge on its curve pub boundary: CurveBoundary>, } diff --git a/crates/fj-core/src/operations/build/half_edge.rs b/crates/fj-core/src/operations/build/half_edge.rs index 1eb04bdfb..e1c6074ce 100644 --- a/crates/fj-core/src/operations/build/half_edge.rs +++ b/crates/fj-core/src/operations/build/half_edge.rs @@ -73,7 +73,6 @@ pub trait BuildHalfEdge { core.layers.geometry.define_half_edge( half_edge.clone(), HalfEdgeGeom { - path, boundary: boundary.into(), }, ); @@ -100,14 +99,6 @@ pub trait BuildHalfEdge { core.layers.geometry.define_half_edge( half_edge.clone(), HalfEdgeGeom { - path: core - .layers - .geometry - .of_curve(half_edge.curve()) - .expect("Curve geometry was just defined in same function") - .local_on(&surface) - .expect("Curve geometry was just defined in same function") - .path, boundary: boundary.unwrap_or_default(), }, ); diff --git a/crates/fj-core/src/operations/build/shell.rs b/crates/fj-core/src/operations/build/shell.rs index 7bdcaee46..c0d94e47a 100644 --- a/crates/fj-core/src/operations/build/shell.rs +++ b/crates/fj-core/src/operations/build/shell.rs @@ -102,23 +102,7 @@ pub trait BuildShell { .update_curve(|_, _| curve.clone(), core) .insert(core) .set_geometry( - HalfEdgeGeom { - path: core - .layers - .geometry - .of_curve(&curve) - .expect( - "Curve geometry was just \ - defined in same function", - ) - .local_on(&surface) - .expect( - "Curve geometry was just \ - defined in same function", - ) - .path, - boundary, - }, + HalfEdgeGeom { boundary }, &mut core.layers.geometry, ) }) diff --git a/crates/fj-core/src/operations/reverse/half_edge.rs b/crates/fj-core/src/operations/reverse/half_edge.rs index aa241ab12..eb7d3c4c5 100644 --- a/crates/fj-core/src/operations/reverse/half_edge.rs +++ b/crates/fj-core/src/operations/reverse/half_edge.rs @@ -17,7 +17,6 @@ impl ReverseCurveCoordinateSystems for (&Handle, &Handle) { let (half_edge, surface) = self; let mut half_edge_geom = *core.layers.geometry.of_half_edge(half_edge); - half_edge_geom.path = half_edge_geom.path.reverse(); half_edge_geom.boundary = half_edge_geom.boundary.reverse(); let curve = diff --git a/crates/fj-core/src/operations/sweep/half_edge.rs b/crates/fj-core/src/operations/sweep/half_edge.rs index f964f98bc..3e350152a 100644 --- a/crates/fj-core/src/operations/sweep/half_edge.rs +++ b/crates/fj-core/src/operations/sweep/half_edge.rs @@ -143,23 +143,7 @@ impl SweepHalfEdge for Handle { .update_curve(|_, _| curve.clone(), core) .insert(core) .set_geometry( - HalfEdgeGeom { - path: core - .layers - .geometry - .of_curve(&curve) - .expect( - "Curve geometry was just defined in same \ - function", - ) - .local_on(&surface) - .expect( - "Curve geometry was just defined in same \ - function", - ) - .path, - boundary, - }, + HalfEdgeGeom { boundary }, &mut core.layers.geometry, ); diff --git a/crates/fj-core/src/validation/checks/curve_geometry_mismatch.rs b/crates/fj-core/src/validation/checks/curve_geometry_mismatch.rs index 3a783fe21..bd8fb440b 100644 --- a/crates/fj-core/src/validation/checks/curve_geometry_mismatch.rs +++ b/crates/fj-core/src/validation/checks/curve_geometry_mismatch.rs @@ -212,8 +212,6 @@ mod tests { .layers .geometry .of_half_edge(half_edge); - half_edge_geom.path = - half_edge_geom.path.reverse(); half_edge_geom.boundary = half_edge_geom.boundary.reverse();