From d5b8d989fb8ac0c93052340fb40cff21512aed8f Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 18 Mar 2024 12:40:45 +0100 Subject: [PATCH] Remove unused ray/half-edge intersection check --- .../fj-core/src/algorithms/intersect/mod.rs | 1 - .../src/algorithms/intersect/ray_edge.rs | 35 ------------------- 2 files changed, 36 deletions(-) delete mode 100644 crates/fj-core/src/algorithms/intersect/ray_edge.rs diff --git a/crates/fj-core/src/algorithms/intersect/mod.rs b/crates/fj-core/src/algorithms/intersect/mod.rs index 2adb215087..0d5781269a 100644 --- a/crates/fj-core/src/algorithms/intersect/mod.rs +++ b/crates/fj-core/src/algorithms/intersect/mod.rs @@ -1,6 +1,5 @@ //! Intersection algorithms -pub mod ray_edge; pub mod ray_segment; mod line_segment; diff --git a/crates/fj-core/src/algorithms/intersect/ray_edge.rs b/crates/fj-core/src/algorithms/intersect/ray_edge.rs deleted file mode 100644 index dab988e9db..0000000000 --- a/crates/fj-core/src/algorithms/intersect/ray_edge.rs +++ /dev/null @@ -1,35 +0,0 @@ -//! Intersection between a ray and an edge in 2D - -use fj_math::Segment; - -use crate::{ - algorithms::intersect::{HorizontalRayToTheRight, Intersect}, - geometry::SurfacePath, - objects::HalfEdge, - storage::Handle, -}; - -use super::ray_segment::RaySegmentIntersection; - -impl Intersect for (&HorizontalRayToTheRight<2>, &Handle) { - type Intersection = RaySegmentIntersection; - - fn intersect(self) -> Option { - let (ray, edge) = self; - - let line = match edge.path() { - SurfacePath::Line(line) => line, - SurfacePath::Circle(_) => { - todo!("Casting rays against circles is not supported yet") - } - }; - - let points = edge - .boundary() - .inner - .map(|point| line.point_from_line_coords(point)); - let segment = Segment::from_points(points); - - (ray, &segment).intersect() - } -}