Prepare for follow-on change

This commit is contained in:
Hanno Braun 2024-06-24 22:38:38 +02:00
parent a96d03aa91
commit 815d80f61a
2 changed files with 8 additions and 3 deletions

View File

@ -32,7 +32,10 @@ impl Approx for (&Cycle, &Handle<Surface>) {
.half_edges()
.iter()
.map(|half_edge| {
approx_half_edge(half_edge, surface, tolerance, cache, geometry)
let boundary = geometry.of_half_edge(half_edge).boundary;
approx_half_edge(
half_edge, surface, boundary, tolerance, cache, geometry,
)
})
.collect();

View File

@ -4,8 +4,10 @@
use std::iter;
use fj_math::Point;
use crate::{
geometry::Geometry,
geometry::{CurveBoundary, Geometry},
storage::Handle,
topology::{HalfEdge, Surface},
};
@ -20,13 +22,13 @@ use super::{
pub fn approx_half_edge(
half_edge: &Handle<HalfEdge>,
surface: &Handle<Surface>,
boundary: CurveBoundary<Point<1>>,
tolerance: impl Into<Tolerance>,
cache: &mut HalfEdgeApproxCache,
geometry: &Geometry,
) -> HalfEdgeApprox {
let tolerance = tolerance.into();
let boundary = geometry.of_half_edge(half_edge).boundary;
let [start_position_curve, _] = boundary.inner;
let start = approx_vertex(