diff --git a/crates/fj-kernel/src/algorithms/approx/curves.rs b/crates/fj-kernel/src/algorithms/approx/curves.rs index ce42b7abb..aa9097be9 100644 --- a/crates/fj-kernel/src/algorithms/approx/curves.rs +++ b/crates/fj-kernel/src/algorithms/approx/curves.rs @@ -2,12 +2,9 @@ use std::cmp::max; use fj_math::{Circle, Point, Scalar}; -use crate::{ - local::Local, - objects::{CurveKind, GlobalCurve}, -}; +use crate::objects::{CurveKind, GlobalCurve}; -use super::Tolerance; +use super::{Local, Tolerance}; /// Compute an approximation of the curve /// diff --git a/crates/fj-kernel/src/algorithms/approx/cycles.rs b/crates/fj-kernel/src/algorithms/approx/cycles.rs index 8793c9cda..4a3ec9a6c 100644 --- a/crates/fj-kernel/src/algorithms/approx/cycles.rs +++ b/crates/fj-kernel/src/algorithms/approx/cycles.rs @@ -1,8 +1,8 @@ use fj_math::{Point, Segment}; -use crate::{local::Local, objects::Cycle}; +use crate::objects::Cycle; -use super::{curves::approx_curve, edges::approx_edge, Tolerance}; +use super::{curves::approx_curve, edges::approx_edge, Local, Tolerance}; /// An approximation of a [`Cycle`] #[derive(Debug, Eq, PartialEq, Hash)] diff --git a/crates/fj-kernel/src/algorithms/approx/edges.rs b/crates/fj-kernel/src/algorithms/approx/edges.rs index e0a290f49..980a4f0ae 100644 --- a/crates/fj-kernel/src/algorithms/approx/edges.rs +++ b/crates/fj-kernel/src/algorithms/approx/edges.rs @@ -1,6 +1,8 @@ use fj_math::Point; -use crate::{local::Local, objects::VerticesOfEdge}; +use crate::objects::VerticesOfEdge; + +use super::Local; pub fn approx_edge( vertices: VerticesOfEdge, @@ -37,7 +39,7 @@ mod test { use fj_math::Point; use crate::{ - local::Local, + algorithms::approx::Local, objects::{GlobalVertex, Vertex, VerticesOfEdge}, }; diff --git a/crates/fj-kernel/src/algorithms/approx/faces.rs b/crates/fj-kernel/src/algorithms/approx/faces.rs index f7e183f07..6a413e22f 100644 --- a/crates/fj-kernel/src/algorithms/approx/faces.rs +++ b/crates/fj-kernel/src/algorithms/approx/faces.rs @@ -2,9 +2,9 @@ use std::collections::HashSet; use fj_math::Point; -use crate::{local::Local, objects::Face}; +use crate::objects::Face; -use super::{CycleApprox, Tolerance}; +use super::{CycleApprox, Local, Tolerance}; /// An approximation of a [`Face`] #[derive(Debug, PartialEq)] @@ -84,7 +84,7 @@ mod tests { use map_macro::set; use crate::{ - local::Local, + algorithms::approx::Local, objects::{Face, Surface}, }; diff --git a/crates/fj-kernel/src/local.rs b/crates/fj-kernel/src/algorithms/approx/local.rs similarity index 100% rename from crates/fj-kernel/src/local.rs rename to crates/fj-kernel/src/algorithms/approx/local.rs diff --git a/crates/fj-kernel/src/algorithms/approx/mod.rs b/crates/fj-kernel/src/algorithms/approx/mod.rs index 2b8171c9f..e17e84a51 100644 --- a/crates/fj-kernel/src/algorithms/approx/mod.rs +++ b/crates/fj-kernel/src/algorithms/approx/mod.rs @@ -2,10 +2,12 @@ mod curves; mod cycles; mod edges; mod faces; +mod local; mod tolerance; pub use self::{ cycles::CycleApprox, faces::FaceApprox, + local::{Local, LocalForm}, tolerance::{InvalidTolerance, Tolerance}, }; diff --git a/crates/fj-kernel/src/algorithms/triangulate/delaunay.rs b/crates/fj-kernel/src/algorithms/triangulate/delaunay.rs index c54aa508d..af80172d8 100644 --- a/crates/fj-kernel/src/algorithms/triangulate/delaunay.rs +++ b/crates/fj-kernel/src/algorithms/triangulate/delaunay.rs @@ -1,7 +1,7 @@ use fj_math::{Point, Scalar, Triangle, Winding}; use spade::HasPosition; -use crate::local::Local; +use crate::algorithms::approx::Local; /// Create a Delaunay triangulation of all points pub fn triangulate(points: Vec>>) -> Vec<[Local>; 3]> { diff --git a/crates/fj-kernel/src/lib.rs b/crates/fj-kernel/src/lib.rs index fed8991f1..6ecf7e555 100644 --- a/crates/fj-kernel/src/lib.rs +++ b/crates/fj-kernel/src/lib.rs @@ -90,6 +90,5 @@ pub mod algorithms; pub mod builder; pub mod iter; -pub mod local; pub mod objects; pub mod validation;