Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Jul 28, 2022
1 parent 470cba1 commit 3307e18
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions crates/fj-kernel/src/algorithms/intersection/curve_face.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ impl CurveFaceIntersectionList {
) -> Self {
let intervals = intervals
.into_iter()
.map(|interval| interval.map(Into::into))
.map(|interval| {
interval
.map(Into::into)
.map(CurveEdgeIntersection::from_point_on_curve)
})
.collect();
Self { intervals }
}
Expand All @@ -40,7 +44,7 @@ impl CurveFaceIntersectionList {
let intersection = CurveEdgeIntersection::compute(curve, &edge);

if let Some(intersection) = intersection {
intersections.push(intersection.point_on_curve());
intersections.push(intersection);
}
}

Expand Down Expand Up @@ -129,7 +133,7 @@ impl IntoIterator for CurveFaceIntersectionList {
}

/// An intersection between a curve and a face, in curve coordinates
pub type CurveFaceIntersection = [Point<1>; 2];
pub type CurveFaceIntersection = [CurveEdgeIntersection; 2];

#[cfg(test)]
mod tests {
Expand Down

0 comments on commit 3307e18

Please sign in to comment.