Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move local module to approx #901

Merged
merged 1 commit into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions crates/fj-kernel/src/algorithms/approx/curves.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down
4 changes: 2 additions & 2 deletions crates/fj-kernel/src/algorithms/approx/cycles.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
6 changes: 4 additions & 2 deletions crates/fj-kernel/src/algorithms/approx/edges.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -37,7 +39,7 @@ mod test {
use fj_math::Point;

use crate::{
local::Local,
algorithms::approx::Local,
objects::{GlobalVertex, Vertex, VerticesOfEdge},
};

Expand Down
6 changes: 3 additions & 3 deletions crates/fj-kernel/src/algorithms/approx/faces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -84,7 +84,7 @@ mod tests {
use map_macro::set;

use crate::{
local::Local,
algorithms::approx::Local,
objects::{Face, Surface},
};

Expand Down
2 changes: 2 additions & 0 deletions crates/fj-kernel/src/algorithms/approx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
};
2 changes: 1 addition & 1 deletion crates/fj-kernel/src/algorithms/triangulate/delaunay.rs
Original file line number Diff line number Diff line change
@@ -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<Local<Point<2>>>) -> Vec<[Local<Point<2>>; 3]> {
Expand Down
1 change: 0 additions & 1 deletion crates/fj-kernel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,5 @@
pub mod algorithms;
pub mod builder;
pub mod iter;
pub mod local;
pub mod objects;
pub mod validation;