Auto-format according to 2024 edition style

This commit is contained in:
Hanno Braun 2025-02-20 19:25:53 +01:00
parent 7ac23f73df
commit 5a58baaeee
96 changed files with 139 additions and 137 deletions

View File

@ -1,6 +1,6 @@
use fj_math::{Circle, Point};
use crate::geometry::{traits::GenPolyline, CurveBoundary, Tolerance};
use crate::geometry::{CurveBoundary, Tolerance, traits::GenPolyline};
/// # Approximate a circle
///

View File

@ -4,14 +4,14 @@ use fj_math::{Circle, Line, Point};
use crate::{
geometry::{
repr::tri_mesh::convert_point_surface_to_global, surfaces::SweptCurve,
CurveBoundary, Geometry, Path, Tolerance,
repr::tri_mesh::convert_point_surface_to_global, surfaces::SweptCurve,
},
storage::Handle,
topology::{Curve, Surface},
};
use super::{circle::approx_circle, line::approx_line, ApproxPoint};
use super::{ApproxPoint, circle::approx_circle, line::approx_line};
/// Approximate the provided curve
///
@ -209,16 +209,17 @@ mod tests {
use pretty_assertions::assert_eq;
use crate::{
Core,
algorithms::approx::{
circle::approx_circle, curve::approx_curve, ApproxPoint,
ApproxPoint, circle::approx_circle, curve::approx_curve,
},
geometry::{
CurveBoundary, Path,
repr::tri_mesh::convert_point_surface_to_global,
surfaces::SweptCurve, CurveBoundary, Path,
surfaces::SweptCurve,
},
operations::build::BuildSurface,
topology::Surface,
Core,
};
#[test]

View File

@ -11,9 +11,9 @@ use crate::{
};
use super::{
half_edge::{approx_half_edge, HalfEdgeApprox},
vertex::approx_vertex,
ApproxCache, ApproxPoint,
half_edge::{HalfEdgeApprox, approx_half_edge},
vertex::approx_vertex,
};
/// Approximate the provided cycle

View File

@ -12,8 +12,8 @@ use crate::{
};
use super::{
cycle::{approx_cycle, CycleApprox},
Approx, ApproxCache, ApproxPoint,
cycle::{CycleApprox, approx_cycle},
};
impl Approx for &ObjectSet<Face> {

View File

@ -13,8 +13,8 @@ use crate::{
};
use super::{
curve::{approx_curve_with_cache, CurveApproxCache},
ApproxPoint,
curve::{CurveApproxCache, approx_curve_with_cache},
};
/// Approximate the provided half-edge

View File

@ -4,7 +4,7 @@ use std::collections::BTreeSet;
use crate::{geometry::Geometry, topology::Shell};
use super::{face::FaceApprox, Approx, ApproxCache, Tolerance};
use super::{Approx, ApproxCache, Tolerance, face::FaceApprox};
impl Approx for &Shell {
type Approximation = BTreeSet<FaceApprox>;

View File

@ -4,7 +4,7 @@ use std::collections::BTreeSet;
use crate::{geometry::Geometry, topology::Sketch};
use super::{face::FaceApprox, Approx, ApproxCache, Tolerance};
use super::{Approx, ApproxCache, Tolerance, face::FaceApprox};
impl Approx for &Sketch {
type Approximation = BTreeSet<FaceApprox>;

View File

@ -4,7 +4,7 @@ use std::collections::BTreeSet;
use crate::{geometry::Geometry, topology::Solid};
use super::{face::FaceApprox, Approx, ApproxCache, Tolerance};
use super::{Approx, ApproxCache, Tolerance, face::FaceApprox};
impl Approx for &Solid {
type Approximation = BTreeSet<FaceApprox>;

View File

@ -3,7 +3,7 @@ use std::collections::BTreeMap;
use fj_math::Point;
use crate::{
geometry::{repr::tri_mesh::convert_point_surface_to_global, Geometry},
geometry::{Geometry, repr::tri_mesh::convert_point_surface_to_global},
storage::Handle,
topology::{Curve, Surface, Vertex},
};

View File

@ -4,8 +4,8 @@ use fj_math::{Aabb, Vector};
use crate::{
geometry::{
repr::tri_mesh::convert_point_surface_to_global, traits::GenTriMesh,
Geometry, Tolerance,
Geometry, Tolerance, repr::tri_mesh::convert_point_surface_to_global,
traits::GenTriMesh,
},
topology::Face,
};

View File

@ -6,11 +6,11 @@ mod polygon;
use fj_interop::Mesh;
use fj_math::Point;
use crate::{geometry::Tolerance, operations::presentation::GetColor, Core};
use crate::{Core, geometry::Tolerance, operations::presentation::GetColor};
use self::polygon::Polygon;
use super::approx::{face::FaceApprox, Approx};
use super::approx::{Approx, face::FaceApprox};
/// Triangulate a shape
pub trait Triangulate: Sized {
@ -80,9 +80,10 @@ mod tests {
use fj_math::{Point, Scalar};
use crate::{
algorithms::approx::{face::approx_face, ApproxCache},
Core,
algorithms::approx::{ApproxCache, face::approx_face},
geometry::{
repr::tri_mesh::convert_point_surface_to_global, Tolerance,
Tolerance, repr::tri_mesh::convert_point_surface_to_global,
},
operations::{
build::{BuildCycle, BuildFace},
@ -91,7 +92,6 @@ mod tests {
},
storage::Handle,
topology::{Cycle, Face},
Core,
};
use super::Triangulate;

View File

@ -2,7 +2,7 @@ use fj_interop::ext::SliceExt;
use fj_math::{LineSegment, Point, PolyChain, Triangle};
use crate::algorithms::intersect::{
ray_segment::RaySegmentIntersection, HorizontalRayToTheRight, Intersect,
HorizontalRayToTheRight, Intersect, ray_segment::RaySegmentIntersection,
};
#[derive(Default)]

View File

@ -4,7 +4,7 @@ use std::iter;
use fj_math::{Circle, LineSegment, Point, Scalar, Sign};
use crate::geometry::{traits::GenPolyline, CurveBoundary, Tolerance};
use crate::geometry::{CurveBoundary, Tolerance, traits::GenPolyline};
impl<const D: usize> GenPolyline<D> for Circle<D> {
fn origin(&self) -> Point<D> {
@ -137,7 +137,7 @@ mod tests {
use fj_math::{Point, Scalar};
use crate::geometry::{
curves::circle::Circle, traits::GenPolyline, CurveBoundary, Tolerance,
CurveBoundary, Tolerance, curves::circle::Circle, traits::GenPolyline,
};
use super::CircleApproxParams;

View File

@ -2,7 +2,7 @@
use fj_math::{Line, LineSegment, Point};
use crate::geometry::{traits::GenPolyline, CurveBoundary, Tolerance};
use crate::geometry::{CurveBoundary, Tolerance, traits::GenPolyline};
impl<const D: usize> GenPolyline<D> for Line<D> {
fn origin(&self) -> Point<D> {

View File

@ -8,11 +8,11 @@ use crate::{
};
use super::{
Path, VertexGeom,
repr::{polyline::Polyline, tri_mesh::TriMesh},
surfaces::SweptCurve,
traits::{GenPolyline, GenTriMesh},
vertex::LocalVertexGeom,
Path, VertexGeom,
};
/// Geometric data that is associated with topological objects

View File

@ -4,7 +4,7 @@ use std::iter;
use fj_math::{Aabb, LineSegment, Point};
use crate::geometry::{traits::GenPolyline, CurveBoundary, Tolerance};
use crate::geometry::{CurveBoundary, Tolerance, traits::GenPolyline};
/// # A polyline, the uniform representation of curve geometry
///

View File

@ -2,7 +2,7 @@
use fj_math::{Point, Vector};
use crate::geometry::{traits::GenTriMesh, Geometry, Tolerance};
use crate::geometry::{Geometry, Tolerance, traits::GenTriMesh};
/// # A triangle mesh, the uniform intermediate representation of a surface
///

View File

@ -1,8 +1,8 @@
use fj_math::{Aabb, Point, Scalar, Triangle, Vector};
use crate::geometry::{
traits::{GenPolyline, GenTriMesh},
Geometry, Path, Tolerance,
traits::{GenPolyline, GenTriMesh},
};
/// # A surface that is a curve, swept along a path

View File

@ -1,7 +1,7 @@
use fj_math::{Aabb, Point, Scalar, Transform, Triangle};
use crate::{
geometry::{traits::GenTriMesh, Geometry, Tolerance},
geometry::{Geometry, Tolerance, traits::GenTriMesh},
storage::Handle,
topology::Surface,
};

View File

@ -2,8 +2,8 @@
use crate::{
geometry::{
surfaces::SweptCurve, CurveGeom2, Geometry, LocalCurveGeom,
LocalVertexGeom, SurfaceGeom,
CurveGeom2, Geometry, LocalCurveGeom, LocalVertexGeom, SurfaceGeom,
surfaces::SweptCurve,
},
storage::Handle,
topology::{Curve, Surface, Vertex},

View File

@ -6,7 +6,7 @@ use crate::{
validation::Validation,
};
use super::{validation::ValidateObject, Command, Event, Layer};
use super::{Command, Event, Layer, validation::ValidateObject};
impl Layer<Topology> {
/// Insert an object into the stores

View File

@ -1,9 +1,9 @@
use crate::{
Core,
geometry::Path,
operations::{geometry::UpdateCurveGeometry, insert::Insert},
storage::Handle,
topology::{Curve, Surface},
Core,
};
/// Build a [`Curve`]

View File

@ -2,11 +2,11 @@ use fj_math::{Point, Scalar, Vector};
use itertools::Itertools;
use crate::{
Core,
geometry::{CurveBoundary, LocalVertexGeom},
operations::build::BuildHalfEdge,
storage::Handle,
topology::{Cycle, HalfEdge, Surface},
Core,
};
/// Build a [`Cycle`]

View File

@ -4,13 +4,13 @@ use fj_interop::ext::ArrayExt;
use fj_math::{Point, Scalar};
use crate::{
Core,
operations::{
build::{BuildCycle, BuildRegion, BuildSurface},
insert::{Insert, IsInserted, IsInsertedNo},
},
storage::Handle,
topology::{Cycle, Face, HalfEdge, Region, Surface, Vertex},
Core,
};
/// Build a [`Face`]

View File

@ -1,11 +1,11 @@
use fj_math::{Arc, Point, Scalar};
use crate::{
Core,
geometry::{CurveBoundary, LocalCurveGeom, Path},
operations::{geometry::UpdateCurveGeometry, insert::Insert},
storage::Handle,
topology::{Curve, HalfEdge, Surface, Vertex},
Core,
};
/// Build a [`HalfEdge`]

View File

@ -1,10 +1,10 @@
use fj_math::{Point, Scalar};
use crate::{
Core,
operations::{build::BuildCycle, insert::Insert},
storage::Handle,
topology::{Cycle, Region, Surface},
Core,
};
/// Build a [`Region`]

View File

@ -4,6 +4,7 @@ use fj_interop::ext::ArrayExt;
use fj_math::Point;
use crate::{
Core,
geometry::{CurveBoundary, LocalVertexGeom},
operations::{
build::{BuildFace, BuildHalfEdge, BuildSurface, Polygon},
@ -16,7 +17,6 @@ use crate::{
},
},
topology::{Curve, Face, HalfEdge, Shell, Surface, Vertex},
Core,
};
/// Build a [`Shell`]

View File

@ -1,9 +1,9 @@
use fj_math::{Point, Scalar};
use crate::{
Core,
operations::update::UpdateSketch,
topology::{Region, Sketch, Topology},
Core,
};
use super::BuildRegion;

View File

@ -1,13 +1,13 @@
use fj_math::Point;
use crate::{
Core,
operations::{
build::{BuildShell, TetrahedronShell},
insert::{Insert, IsInsertedYes},
update::UpdateSolid,
},
topology::{Shell, Solid},
Core,
};
/// Build a [`Solid`]

View File

@ -1,13 +1,13 @@
use fj_math::{Point, Scalar, Vector};
use crate::{
Core,
geometry::{
repr::tri_mesh::TriMesh, surfaces::SweptCurve, Path, SurfaceGeom,
Path, SurfaceGeom, repr::tri_mesh::TriMesh, surfaces::SweptCurve,
},
operations::insert::Insert,
storage::Handle,
topology::Surface,
Core,
};
/// Build a [`Surface`]

View File

@ -3,9 +3,9 @@
//! See [`DeriveFrom`].
use crate::{
Core,
storage::Handle,
topology::{AnyObject, Stored},
Core,
};
/// Mark a store object as derived from another

View File

@ -3,10 +3,10 @@
use fj_math::{Point, Scalar, Vector};
use crate::{
Core,
geometry::repr::tri_mesh::convert_point_surface_to_global,
storage::Handle,
topology::{Cycle, Face, Region, Shell},
Core,
};
use super::{

View File

@ -1,11 +1,11 @@
use crate::{
Core,
operations::build::{Polygon, TetrahedronShell},
storage::Handle,
topology::{
Curve, Cycle, Face, HalfEdge, Region, Shell, Sketch, Solid, Surface,
Vertex,
},
Core,
};
use super::{IsInsertedNo, IsInsertedYes};

View File

@ -3,6 +3,7 @@ use std::ops::RangeInclusive;
use itertools::Itertools;
use crate::{
Core,
geometry::LocalCurveGeom,
operations::{
build::BuildHalfEdge,
@ -11,7 +12,6 @@ use crate::{
},
storage::Handle,
topology::{Cycle, HalfEdge, Surface},
Core,
};
/// Join a [`Cycle`] to another

View File

@ -3,7 +3,7 @@
//! See [`Merge`], which is currently the only trait in this module, for more
//! information.
use crate::{topology::Solid, Core};
use crate::{Core, topology::Solid};
use super::update::UpdateSolid;

View File

@ -2,7 +2,7 @@
use fj_interop::Color;
use crate::{storage::Handle, topology::Region, Core};
use crate::{Core, storage::Handle, topology::Region};
/// Get the color of an object
pub trait GetColor {

View File

@ -1,12 +1,12 @@
use std::ops::Deref;
use crate::{
Core,
operations::{derive::DeriveFrom, insert::Insert, update::UpdateHalfEdge},
storage::Handle,
topology::{
Curve, Cycle, Face, HalfEdge, IsObject, Region, Shell, Sketch, Solid,
},
Core,
};
use super::ReplaceOutput;

View File

@ -1,10 +1,10 @@
use std::ops::Deref;
use crate::{
Core,
operations::{derive::DeriveFrom, insert::Insert},
storage::Handle,
topology::{Cycle, Face, HalfEdge, IsObject, Region, Shell, Sketch, Solid},
Core,
};
use super::ReplaceOutput;

View File

@ -1,12 +1,12 @@
use std::ops::Deref;
use crate::{
Core,
operations::{derive::DeriveFrom, insert::Insert, update::UpdateHalfEdge},
storage::Handle,
topology::{
Cycle, Face, HalfEdge, IsObject, Region, Shell, Sketch, Solid, Vertex,
},
Core,
};
use super::ReplaceOutput;

View File

@ -1,8 +1,8 @@
use crate::{
Core,
operations::{derive::DeriveFrom, insert::Insert},
storage::Handle,
topology::{Curve, Surface},
Core,
};
use super::ReverseCurveCoordinateSystems;

View File

@ -1,7 +1,7 @@
use crate::{
Core,
operations::{derive::DeriveFrom, insert::Insert},
topology::{Cycle, HalfEdge},
Core,
};
use super::Reverse;

View File

@ -1,13 +1,13 @@
use std::borrow::Borrow;
use crate::{
Core,
operations::{
build::Polygon,
derive::DeriveFrom,
insert::{Insert, IsInsertedNo, IsInsertedYes},
},
topology::Face,
Core,
};
use super::Reverse;

View File

@ -1,8 +1,8 @@
use crate::{
Core,
operations::{derive::DeriveFrom, insert::Insert},
storage::Handle,
topology::{HalfEdge, Surface, Vertex},
Core,
};
use super::ReverseCurveCoordinateSystems;

View File

@ -1,7 +1,7 @@
use crate::{
Core,
operations::{derive::DeriveFrom, insert::Insert},
topology::Region,
Core,
};
use super::Reverse;

View File

@ -1,6 +1,7 @@
use fj_math::Point;
use crate::{
Core,
operations::{
insert::Insert, replace::ReplaceHalfEdge, split::SplitHalfEdge,
update::UpdateHalfEdge,
@ -8,7 +9,6 @@ use crate::{
queries::{CycleOfHalfEdge, SiblingOfHalfEdge},
storage::Handle,
topology::{HalfEdge, Shell},
Core,
};
/// Split a pair of [`HalfEdge`]s into two

View File

@ -3,6 +3,7 @@ use fj_math::Point;
use itertools::Itertools;
use crate::{
Core,
geometry::LocalVertexGeom,
operations::{
build::{BuildCycle, BuildHalfEdge},
@ -15,7 +16,6 @@ use crate::{
},
storage::Handle,
topology::{Cycle, Face, HalfEdge, Shell},
Core,
};
/// Split a face into two
@ -248,13 +248,13 @@ mod tests {
use fj_interop::Color;
use crate::{
Core,
operations::{
build::BuildShell,
presentation::{GetColor, SetColor},
split::SplitFace,
},
topology::Shell,
Core,
};
#[test]

View File

@ -1,11 +1,11 @@
use fj_math::Point;
use crate::{
Core,
geometry::LocalVertexGeom,
operations::{derive::DeriveFrom, insert::Insert},
storage::Handle,
topology::{Cycle, HalfEdge, Vertex},
Core,
};
/// Split a [`HalfEdge`] into two

View File

@ -3,13 +3,13 @@ use fj_math::Vector;
use itertools::Itertools;
use crate::{
Core,
geometry::LocalVertexGeom,
operations::{
build::BuildCycle, join::JoinCycle, sweep::half_edge::SweepHalfEdge,
},
storage::Handle,
topology::{Cycle, Face, Surface},
Core,
};
use super::SweepCache;

View File

@ -1,10 +1,10 @@
use fj_math::Vector;
use crate::{
Core,
operations::{insert::Insert, presentation::GetColor},
storage::Handle,
topology::{Face, Shell},
Core,
};
use super::{SweepCache, SweepRegion};

View File

@ -1,7 +1,8 @@
use fj_interop::{ext::ArrayExt, Color};
use fj_interop::{Color, ext::ArrayExt};
use fj_math::{Point, Scalar, Vector};
use crate::{
Core,
geometry::{CurveBoundary, LocalVertexGeom},
operations::{
build::{BuildCycle, BuildHalfEdge},
@ -12,10 +13,9 @@ use crate::{
},
storage::Handle,
topology::{Curve, Cycle, Face, HalfEdge, Region, Surface, Vertex},
Core,
};
use super::{vertex::SweepVertex, SweepCache, SweepSurfacePath};
use super::{SweepCache, SweepSurfacePath, vertex::SweepVertex};
/// # Sweep a [`HalfEdge`]
///

View File

@ -1,17 +1,17 @@
use fj_math::{Circle, Line, Vector};
use crate::{
Core,
geometry::{
Path,
repr::tri_mesh::{
convert_point_surface_to_global, convert_vector_surface_to_global,
},
surfaces::SweptCurve,
Path,
},
operations::build::BuildSurface,
storage::Handle,
topology::Surface,
Core,
};
/// # Sweep a [`Path`]

View File

@ -2,12 +2,12 @@ use fj_interop::Color;
use fj_math::Vector;
use crate::{
Core,
operations::{
insert::Insert, reverse::Reverse, transform::TransformObject,
},
storage::Handle,
topology::{Cycle, Face, Region, Surface},
Core,
};
use super::{SweepCache, SweepCycle};

View File

@ -1,6 +1,7 @@
use fj_math::Vector;
use crate::{
Core,
operations::{
derive::DeriveFrom,
insert::Insert,
@ -11,7 +12,6 @@ use crate::{
},
storage::Handle,
topology::{Face, Region, Shell},
Core,
};
/// # Sweep a [`Face`] that is part of a [`Shell`]

View File

@ -1,13 +1,13 @@
use fj_math::Vector;
use crate::{
Core,
operations::insert::Insert,
storage::Handle,
topology::{Face, Sketch, Solid, Surface},
Core,
};
use super::{face::SweepFace, SweepCache};
use super::{SweepCache, face::SweepFace};
/// # Sweep a [`Sketch`]
///

View File

@ -1,8 +1,8 @@
use crate::{
Core,
operations::insert::Insert,
storage::Handle,
topology::{Curve, Vertex},
Core,
};
use super::SweepCache;

View File

@ -1,10 +1,10 @@
use fj_math::Transform;
use crate::{
Core,
operations::insert::Insert,
storage::Handle,
topology::{Curve, Surface},
Core,
};
use super::{TransformCache, TransformObject};

View File

@ -2,10 +2,10 @@ use fj_math::Transform;
use itertools::Itertools;
use crate::{
Core,
operations::insert::Insert,
storage::Handle,
topology::{Cycle, Surface},
Core,
};
use super::{TransformCache, TransformObject};

View File

@ -1,6 +1,6 @@
use fj_math::Transform;
use crate::{topology::Face, Core};
use crate::{Core, topology::Face};
use super::{TransformCache, TransformObject};

View File

@ -1,10 +1,10 @@
use fj_math::Transform;
use crate::{
Core,
operations::insert::Insert,
storage::Handle,
topology::{HalfEdge, Surface},
Core,
};
use super::{TransformCache, TransformObject};

View File

@ -10,16 +10,16 @@ mod solid;
mod surface;
mod vertex;
use std::collections::{btree_map, BTreeMap};
use std::collections::{BTreeMap, btree_map};
use fj_math::{Transform, Vector};
use type_map::TypeMap;
use crate::{
Core,
operations::insert::Insert,
storage::{Handle, ObjectId},
topology::{AnyObject, Stored},
Core,
};
use super::derive::DeriveFrom;

View File

@ -1,8 +1,8 @@
use crate::{
Core,
operations::insert::Insert,
storage::Handle,
topology::{Region, Surface},
Core,
};
use super::TransformObject;

View File

@ -1,6 +1,6 @@
use fj_math::Transform;
use crate::{topology::Shell, Core};
use crate::{Core, topology::Shell};
use super::{TransformCache, TransformObject};

View File

@ -1,6 +1,6 @@
use fj_math::Transform;
use crate::{topology::Solid, Core};
use crate::{Core, topology::Solid};
use super::{TransformCache, TransformObject};

View File

@ -1,15 +1,15 @@
use fj_math::Transform;
use crate::{
Core,
geometry::{
SurfaceGeom,
repr::tri_mesh::TriMesh,
surfaces::{SweptCurve, TransformedSurface},
SurfaceGeom,
},
operations::insert::Insert,
storage::Handle,
topology::Surface,
Core,
};
use super::{TransformCache, TransformObject};

View File

@ -1,6 +1,6 @@
use fj_math::Transform;
use crate::{topology::Vertex, Core};
use crate::{Core, topology::Vertex};
use super::{TransformCache, TransformObject};

View File

@ -1,8 +1,8 @@
use crate::{
Core,
operations::{derive::DeriveFrom, insert::Insert},
storage::Handle,
topology::{Cycle, HalfEdge},
Core,
};
/// Update a [`Cycle`]

View File

@ -1,8 +1,8 @@
use crate::{
Core,
operations::{build::Polygon, derive::DeriveFrom, insert::Insert},
storage::Handle,
topology::{Face, Region},
Core,
};
/// Update a [`Face`]

View File

@ -1,8 +1,8 @@
use crate::{
Core,
operations::{derive::DeriveFrom, insert::Insert},
storage::Handle,
topology::{Curve, HalfEdge, Vertex},
Core,
};
/// Update a [`HalfEdge`]

View File

@ -1,8 +1,8 @@
use crate::{
Core,
operations::{derive::DeriveFrom, insert::Insert},
storage::Handle,
topology::{Cycle, Region},
Core,
};
/// Update a [`Region`]

View File

@ -1,8 +1,8 @@
use crate::{
Core,
operations::{derive::DeriveFrom, insert::Insert},
storage::Handle,
topology::{Face, Shell},
Core,
};
/// Update a [`Shell`]

View File

@ -1,8 +1,8 @@
use crate::{
Core,
operations::{derive::DeriveFrom, insert::Insert},
storage::Handle,
topology::{Region, Sketch},
Core,
};
/// Update a [`Sketch`]

View File

@ -1,8 +1,8 @@
use crate::{
Core,
operations::{derive::DeriveFrom, insert::Insert},
storage::Handle,
topology::{Shell, Solid},
Core,
};
/// Update a [`Solid`]

View File

@ -26,8 +26,8 @@ use std::{marker::PhantomData, sync::Arc};
use parking_lot::RwLock;
use super::{
blocks::{Blocks, Index},
Handle,
blocks::{Blocks, Index},
};
/// Append-only object storage

View File

@ -272,7 +272,7 @@ pub type ObjectSetIntoIter<T> = vec::IntoIter<Handle<T>>;
mod tests {
use std::collections::HashSet;
use crate::{operations::insert::Insert, topology::Cycle, Core};
use crate::{Core, operations::insert::Insert, topology::Cycle};
use super::ObjectSet;

View File

@ -2,11 +2,11 @@ use crate::{
geometry::Geometry,
topology::Face,
validation::{
ValidationCheck, ValidationConfig, ValidationError,
checks::{
AdjacentHalfEdgesNotConnected, FaceHasNoBoundary,
InteriorCycleHasInvalidWinding,
},
ValidationCheck, ValidationConfig, ValidationError,
},
};

View File

@ -2,8 +2,8 @@ use crate::{
geometry::Geometry,
topology::Shell,
validation::{
checks::{CoincidentHalfEdgesAreNotSiblings, HalfEdgeHasNoSibling},
ValidationCheck,
checks::{CoincidentHalfEdgesAreNotSiblings, HalfEdgeHasNoSibling},
},
};

View File

@ -5,8 +5,8 @@ use crate::{
storage::Handle,
topology::{Cycle, HalfEdge, Region, Sketch},
validation::{
checks::{AdjacentHalfEdgesNotConnected, MultipleReferencesToObject},
ValidationCheck,
checks::{AdjacentHalfEdgesNotConnected, MultipleReferencesToObject},
},
};
@ -114,7 +114,7 @@ impl SketchValidationError {
#[cfg(test)]
mod tests {
use crate::{
assert_contains_err,
Core, assert_contains_err,
operations::{
build::{BuildCycle, BuildRegion, BuildSketch},
insert::Insert,
@ -123,7 +123,6 @@ mod tests {
},
topology::{Cycle, Region, Sketch},
validate::{SketchValidationError, Validate, ValidationError},
Core,
};
#[test]

View File

@ -1,10 +1,10 @@
use std::iter::repeat;
use crate::{
geometry::{repr::tri_mesh::convert_point_surface_to_global, Geometry},
geometry::{Geometry, repr::tri_mesh::convert_point_surface_to_global},
storage::Handle,
topology::{Cycle, Face, HalfEdge, Region, Shell, Solid, Vertex},
validation::{checks::MultipleReferencesToObject, ValidationCheck},
validation::{ValidationCheck, checks::MultipleReferencesToObject},
};
use fj_math::Point;

View File

@ -4,8 +4,8 @@ use fj_math::{Point, Scalar};
use crate::{
geometry::{
repr::tri_mesh::convert_point_surface_to_global, CurveBoundary,
Geometry, Tolerance,
CurveBoundary, Geometry, Tolerance,
repr::tri_mesh::convert_point_surface_to_global,
},
queries::{
AllHalfEdgesWithSurface, BoundingVerticesOfHalfEdge, CycleOfHalfEdge,
@ -269,6 +269,7 @@ fn distances(
#[cfg(test)]
mod tests {
use crate::{
Core,
operations::{
build::BuildShell,
geometry::UpdateCurveGeometry,
@ -280,9 +281,8 @@ mod tests {
},
topology::{Curve, Shell},
validation::{
checks::CoincidentHalfEdgesAreNotSiblings, ValidationCheck,
ValidationCheck, checks::CoincidentHalfEdgesAreNotSiblings,
},
Core,
};
#[test]

View File

@ -35,13 +35,13 @@ impl ValidationCheck<Face> for FaceHasNoBoundary {
#[cfg(test)]
mod tests {
use crate::{
Core,
operations::{
build::{BuildCycle, BuildFace},
update::{UpdateFace, UpdateRegion},
},
topology::{Cycle, Face},
validation::{checks::FaceHasNoBoundary, ValidationCheck},
Core,
validation::{ValidationCheck, checks::FaceHasNoBoundary},
};
#[test]

View File

@ -72,6 +72,7 @@ impl ValidationCheck<Face> for InteriorCycleHasInvalidWinding {
#[cfg(test)]
mod tests {
use crate::{
Core,
operations::{
build::{BuildCycle, BuildFace},
derive::DeriveFrom,
@ -80,8 +81,7 @@ mod tests {
update::{UpdateFace, UpdateRegion},
},
topology::{Cycle, Face, Region},
validation::{checks::InteriorCycleHasInvalidWinding, ValidationCheck},
Core,
validation::{ValidationCheck, checks::InteriorCycleHasInvalidWinding},
};
#[test]

View File

@ -4,7 +4,7 @@ use crate::{
geometry::Geometry,
storage::Handle,
topology::{Cycle, Face, HalfEdge, Region, Sketch, Surface},
validation::{validation_check::ValidationCheck, ValidationConfig},
validation::{ValidationConfig, validation_check::ValidationCheck},
};
/// # Adjacent [`HalfEdge`]s in [`Cycle`] are not connected
@ -156,6 +156,7 @@ fn check_cycle<'r>(
mod tests {
use crate::{
Core,
geometry::LocalVertexGeom,
operations::{
build::{BuildFace, BuildHalfEdge},
@ -163,7 +164,6 @@ mod tests {
},
topology::{Face, HalfEdge},
validation::ValidationCheck,
Core,
};
use super::AdjacentHalfEdgesNotConnected;

View File

@ -73,10 +73,10 @@ impl ValidationCheck<Shell> for HalfEdgeHasNoSibling {
#[cfg(test)]
mod tests {
use crate::{
Core,
operations::{build::BuildShell, update::UpdateShell},
topology::Shell,
validation::{checks::HalfEdgeHasNoSibling, ValidationCheck},
Core,
validation::{ValidationCheck, checks::HalfEdgeHasNoSibling},
};
#[test]
@ -93,11 +93,13 @@ mod tests {
)?;
let invalid = valid.shell.remove_face(&valid.abc.face);
assert!(HalfEdgeHasNoSibling::check_and_return_first_error(
&invalid,
&core.layers.geometry,
)
.is_err());
assert!(
HalfEdgeHasNoSibling::check_and_return_first_error(
&invalid,
&core.layers.geometry,
)
.is_err()
);
Ok(())
}

View File

@ -195,6 +195,7 @@ impl<T, U> ReferenceCounter<T, U> {
#[cfg(test)]
mod tests {
use crate::{
Core,
operations::{
build::{BuildShell, BuildSketch, BuildSolid},
update::{
@ -203,8 +204,7 @@ mod tests {
},
},
topology::{Cycle, Face, HalfEdge, Region, Shell, Sketch, Solid},
validation::{checks::MultipleReferencesToObject, ValidationCheck},
Core,
validation::{ValidationCheck, checks::MultipleReferencesToObject},
};
#[test]

View File

@ -90,7 +90,7 @@ mod tests {
use super::Arc;
use approx::{assert_abs_diff_eq, AbsDiffEq};
use approx::{AbsDiffEq, assert_abs_diff_eq};
#[test]
fn arc_construction() {

View File

@ -50,7 +50,7 @@ pub use self::{
arc::Arc,
bivector::Bivector,
circle::Circle,
coordinates::{Uv, Xyz, T},
coordinates::{T, Uv, Xyz},
line::Line,
line_segment::LineSegment,
point::Point,

View File

@ -1,8 +1,8 @@
use std::{fmt, ops};
use super::{
coordinates::{Uv, Xyz, T},
Scalar, Vector,
coordinates::{T, Uv, Xyz},
};
/// An n-dimensional point

View File

@ -3,8 +3,8 @@ use std::{fmt, ops};
use crate::Bivector;
use super::{
coordinates::{Uv, Xyz, T},
Scalar,
coordinates::{T, Uv, Xyz},
};
/// An n-dimensional vector

View File

@ -2,7 +2,7 @@ use fj_math::Transform;
use wgpu::util::DeviceExt;
use super::{
model::{self, load_model, DrawModel, Model},
model::{self, DrawModel, Model, load_model},
transform,
};

View File

@ -1,9 +1,9 @@
use std::mem::size_of;
use super::{
DEPTH_FORMAT, SAMPLE_COUNT,
shaders::{Shader, Shaders},
vertices::Vertex,
DEPTH_FORMAT, SAMPLE_COUNT,
};
#[derive(Debug)]

View File

@ -10,10 +10,10 @@ use crate::{
};
use super::{
device::Device, draw_config::DrawConfig, drawables::Drawables,
geometries::Geometries, navigation_cube::NavigationCubeRenderer,
pipelines::Pipelines, transform::Transform, uniforms::Uniforms,
vertices::Vertices, DeviceError, DEPTH_FORMAT, SAMPLE_COUNT,
DEPTH_FORMAT, DeviceError, SAMPLE_COUNT, device::Device,
draw_config::DrawConfig, drawables::Drawables, geometries::Geometries,
navigation_cube::NavigationCubeRenderer, pipelines::Pipelines,
transform::Transform, uniforms::Uniforms, vertices::Vertices,
};
/// Graphics rendering state and target abstraction

View File

@ -18,7 +18,7 @@ mod viewer;
pub use self::{
graphics::{DeviceError, RendererInitError},
input::InputEvent,
input::{CameraTuningConfig, MouseButton, DEFAULT_CAMERA_TUNING_CONFIG},
input::{CameraTuningConfig, DEFAULT_CAMERA_TUNING_CONFIG, MouseButton},
screen::{NormalizedScreenPosition, Screen, ScreenSize},
viewer::Viewer,
};

View File

@ -2,10 +2,10 @@ use fj_interop::Model;
use tracing::warn;
use crate::{
CameraTuningConfig, DEFAULT_CAMERA_TUNING_CONFIG, InputEvent, MouseButton,
NormalizedScreenPosition, RendererInitError, Screen, ScreenSize,
camera::{Camera, FocusPoint},
graphics::{DrawConfig, Renderer},
CameraTuningConfig, InputEvent, MouseButton, NormalizedScreenPosition,
RendererInitError, Screen, ScreenSize, DEFAULT_CAMERA_TUNING_CONFIG,
};
/// The Fornjot model viewer

View File

@ -1,7 +1,7 @@
use fj_interop::Model;
use fj_viewer::{
InputEvent, RendererInitError, Screen, ScreenSize, Viewer,
DEFAULT_CAMERA_TUNING_CONFIG,
DEFAULT_CAMERA_TUNING_CONFIG, InputEvent, RendererInitError, Screen,
ScreenSize, Viewer,
};
use futures::executor::block_on;
use winit::{

View File

@ -12,6 +12,6 @@ mod display;
mod window;
pub use self::{
display::{display, Error},
display::{Error, display},
window::WindowError,
};

View File

@ -1,10 +1,10 @@
use std::{error::Error as _, fmt};
use fj_core::{
Core,
algorithms::{bounding_volume::BoundingVolume, triangulate::Triangulate},
geometry::{InvalidTolerance, Tolerance},
validation::{ValidationConfig, ValidationErrors},
Core,
};
use fj_interop::Model;
use fj_math::{Aabb, Point, Scalar};