Skip to content

Commit

Permalink
Update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Sep 13, 2024
1 parent 8f57025 commit 7addb43
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 38 deletions.
6 changes: 2 additions & 4 deletions crates/fj-core/src/algorithms/approx/circle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ use std::iter;

use fj_math::{Circle, Point, Scalar, Sign};

use crate::geometry::CurveBoundary;

use super::Tolerance;
use crate::geometry::{CurveBoundary, Tolerance};

/// # Approximate a circle
///
Expand Down Expand Up @@ -135,7 +133,7 @@ mod tests {

use fj_math::{Circle, Point, Scalar};

use crate::{algorithms::approx::Tolerance, geometry::CurveBoundary};
use crate::geometry::{CurveBoundary, Tolerance};

use super::PathApproxParams;

Expand Down
4 changes: 2 additions & 2 deletions crates/fj-core/src/algorithms/approx/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ use std::collections::BTreeMap;
use fj_math::{Circle, Line, Point};

use crate::{
geometry::{CurveBoundary, Geometry, Path, SurfaceGeom},
geometry::{CurveBoundary, Geometry, Path, SurfaceGeom, Tolerance},
storage::Handle,
topology::{Curve, Surface},
};

use super::{circle::approx_circle, line::approx_line, ApproxPoint, Tolerance};
use super::{circle::approx_circle, line::approx_line, ApproxPoint};

/// Approximate the provided curve
///
Expand Down
4 changes: 2 additions & 2 deletions crates/fj-core/src/algorithms/approx/cycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
use fj_math::Segment;

use crate::{
geometry::{CurveBoundary, Geometry},
geometry::{CurveBoundary, Geometry, Tolerance},
storage::Handle,
topology::{Cycle, Surface},
};

use super::{
half_edge::{approx_half_edge, HalfEdgeApprox},
vertex::approx_vertex,
ApproxCache, ApproxPoint, Tolerance,
ApproxCache, ApproxPoint,
};

/// Approximate the provided cycle
Expand Down
4 changes: 2 additions & 2 deletions crates/fj-core/src/algorithms/approx/face.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
use std::{collections::BTreeSet, ops::Deref};

use crate::{
geometry::Geometry,
geometry::{Geometry, Tolerance},
storage::Handle,
topology::{Face, Handedness, ObjectSet},
validation::ValidationConfig,
};

use super::{
cycle::{approx_cycle, CycleApprox},
Approx, ApproxCache, ApproxPoint, Tolerance,
Approx, ApproxCache, ApproxPoint,
};

impl Approx for &ObjectSet<Face> {
Expand Down
4 changes: 2 additions & 2 deletions crates/fj-core/src/algorithms/approx/half_edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ use std::iter;
use fj_math::Point;

use crate::{
geometry::{CurveBoundary, Geometry},
geometry::{CurveBoundary, Geometry, Tolerance},
storage::Handle,
topology::{HalfEdge, Surface},
};

use super::{
curve::{approx_curve_with_cache, CurveApproxCache},
ApproxPoint, Tolerance,
ApproxPoint,
};

/// Approximate the provided half-edge
Expand Down
3 changes: 1 addition & 2 deletions crates/fj-core/src/algorithms/bounding_volume/face.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ use std::ops::Deref;
use fj_math::{Aabb, Vector};

use crate::{
algorithms::approx::Tolerance,
geometry::{Geometry, Path, SurfaceGeom},
geometry::{Geometry, Path, SurfaceGeom, Tolerance},
topology::Face,
};

Expand Down
7 changes: 4 additions & 3 deletions crates/fj-core/src/algorithms/triangulate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ mod polygon;
use fj_interop::Mesh;
use fj_math::Point;

use crate::{operations::presentation::GetColor, Core};
use crate::{geometry::Tolerance, operations::presentation::GetColor, Core};

use self::polygon::Polygon;

use super::approx::{face::FaceApprox, Approx, Tolerance};
use super::approx::{face::FaceApprox, Approx};

/// Triangulate a shape
pub trait Triangulate: Sized {
Expand Down Expand Up @@ -80,7 +80,8 @@ mod tests {
use fj_math::{Point, Scalar};

use crate::{
algorithms::approx::{face::approx_face, ApproxCache, Tolerance},
algorithms::approx::{face::approx_face, ApproxCache},
geometry::Tolerance,
operations::{
build::{BuildCycle, BuildFace},
insert::Insert,
Expand Down
2 changes: 1 addition & 1 deletion crates/fj-core/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! See [`Core`].
use crate::{
algorithms::approx::Tolerance, layers::Layers, validation::ValidationConfig,
geometry::Tolerance, layers::Layers, validation::ValidationConfig,
};

/// An instance of the Fornjot core
Expand Down
6 changes: 2 additions & 4 deletions crates/fj-core/src/geometry/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ use std::collections::BTreeMap;
use fj_math::{Circle, Line, Point};

use crate::{
algorithms::approx::{PathApproxParams, Tolerance},
storage::Handle,
topology::Surface,
algorithms::approx::PathApproxParams, storage::Handle, topology::Surface,
};

use super::Path;
use super::{Path, Tolerance};

/// The geometric definition of a curve
#[derive(Clone, Debug, Default)]
Expand Down
9 changes: 2 additions & 7 deletions crates/fj-core/src/geometry/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
use fj_math::{Point, Scalar, Transform, Triangle, Vector};

use crate::algorithms::approx::Tolerance;

use super::{CurveGeom2, Path};
use super::{CurveGeom2, Path, Tolerance};

/// The geometry that defines a surface
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
Expand Down Expand Up @@ -115,10 +113,7 @@ mod tests {
use fj_math::{Line, Point, Vector};
use pretty_assertions::assert_eq;

use crate::{
algorithms::approx::Tolerance,
geometry::{Path, SurfaceGeom},
};
use crate::geometry::{Path, SurfaceGeom, Tolerance};

#[test]
fn point_from_surface_coords() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ use std::fmt;
use fj_math::{Point, Scalar};

use crate::{
algorithms::approx::Tolerance,
geometry::{CurveBoundary, Geometry},
geometry::{CurveBoundary, Geometry, Tolerance},
queries::{
AllHalfEdgesWithSurface, BoundingVerticesOfHalfEdge, CycleOfHalfEdge,
SiblingOfHalfEdge,
Expand Down
2 changes: 1 addition & 1 deletion crates/fj-core/src/validation/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use fj_math::Scalar;

use crate::algorithms::approx::Tolerance;
use crate::geometry::Tolerance;

/// Configuration required for the validation process
#[derive(Debug, Clone, Copy)]
Expand Down
2 changes: 1 addition & 1 deletion crates/fj/src/args.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{num::ParseFloatError, path::PathBuf, str::FromStr};

use fj_core::algorithms::approx::{InvalidTolerance, Tolerance};
use fj_core::geometry::{InvalidTolerance, Tolerance};
use fj_math::Scalar;

/// Standardized CLI for Fornjot models
Expand Down
7 changes: 2 additions & 5 deletions crates/fj/src/instance.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
use std::{error::Error as _, fmt};

use fj_core::{
algorithms::{
approx::{InvalidTolerance, Tolerance},
bounding_volume::BoundingVolume,
triangulate::Triangulate,
},
algorithms::{bounding_volume::BoundingVolume, triangulate::Triangulate},
geometry::{InvalidTolerance, Tolerance},
validation::{ValidationConfig, ValidationErrors},
Core,
};
Expand Down

0 comments on commit 7addb43

Please sign in to comment.