Rename objects module to topology

This commit is contained in:
Hanno Braun 2024-03-23 11:43:21 +01:00
parent 0d840c47f5
commit 9c25cb6628
116 changed files with 135 additions and 135 deletions

View File

@ -9,8 +9,8 @@ use crate::{
CurveBoundary, GlobalPath, HalfEdgeGeometry, SurfaceGeometry, CurveBoundary, GlobalPath, HalfEdgeGeometry, SurfaceGeometry,
SurfacePath, SurfacePath,
}, },
objects::Curve,
storage::Handle, storage::Handle,
topology::Curve,
Core, Core,
}; };
@ -187,8 +187,8 @@ mod tests {
CurveBoundary, GlobalPath, HalfEdgeGeometry, SurfaceGeometry, CurveBoundary, GlobalPath, HalfEdgeGeometry, SurfaceGeometry,
SurfacePath, SurfacePath,
}, },
objects::Curve,
operations::insert::Insert, operations::insert::Insert,
topology::Curve,
Core, Core,
}; };

View File

@ -4,7 +4,7 @@
use fj_math::Segment; use fj_math::Segment;
use crate::{geometry::SurfaceGeometry, objects::Cycle, Core}; use crate::{geometry::SurfaceGeometry, topology::Cycle, Core};
use super::{ use super::{
edge::{HalfEdgeApprox, HalfEdgeApproxCache}, edge::{HalfEdgeApprox, HalfEdgeApproxCache},

View File

@ -6,7 +6,7 @@
//! the caller doesn't have to deal with duplicate vertices. //! the caller doesn't have to deal with duplicate vertices.
use crate::{ use crate::{
geometry::SurfaceGeometry, objects::HalfEdge, storage::Handle, Core, geometry::SurfaceGeometry, storage::Handle, topology::HalfEdge, Core,
}; };
use super::{ use super::{

View File

@ -7,8 +7,8 @@ use std::{collections::BTreeSet, ops::Deref};
use fj_interop::Color; use fj_interop::Color;
use crate::{ use crate::{
objects::{Face, Handedness, ObjectSet},
operations::presentation::GetColor, operations::presentation::GetColor,
topology::{Face, Handedness, ObjectSet},
validation::ValidationConfig, validation::ValidationConfig,
Core, Core,
}; };

View File

@ -2,7 +2,7 @@
use std::collections::BTreeSet; use std::collections::BTreeSet;
use crate::{objects::Shell, Core}; use crate::{topology::Shell, Core};
use super::{edge::HalfEdgeApproxCache, face::FaceApprox, Approx, Tolerance}; use super::{edge::HalfEdgeApproxCache, face::FaceApprox, Approx, Tolerance};

View File

@ -2,7 +2,7 @@
use std::collections::BTreeSet; use std::collections::BTreeSet;
use crate::{objects::Sketch, Core}; use crate::{topology::Sketch, Core};
use super::{edge::HalfEdgeApproxCache, face::FaceApprox, Approx, Tolerance}; use super::{edge::HalfEdgeApproxCache, face::FaceApprox, Approx, Tolerance};

View File

@ -2,7 +2,7 @@
use std::collections::BTreeSet; use std::collections::BTreeSet;
use crate::{objects::Solid, Core}; use crate::{topology::Solid, Core};
use super::{edge::HalfEdgeApproxCache, face::FaceApprox, Approx, Tolerance}; use super::{edge::HalfEdgeApproxCache, face::FaceApprox, Approx, Tolerance};

View File

@ -4,7 +4,7 @@ use std::collections::BTreeMap;
use fj_math::Point; use fj_math::Point;
use crate::{objects::Vertex, storage::Handle}; use crate::{storage::Handle, topology::Vertex};
/// Cache for vertex approximations /// Cache for vertex approximations
#[derive(Default)] #[derive(Default)]

View File

@ -1,6 +1,6 @@
use fj_math::Aabb; use fj_math::Aabb;
use crate::{geometry::Geometry, objects::Cycle}; use crate::{geometry::Geometry, topology::Cycle};
impl super::BoundingVolume<2> for Cycle { impl super::BoundingVolume<2> for Cycle {
fn aabb(&self, geometry: &Geometry) -> Option<Aabb<2>> { fn aabb(&self, geometry: &Geometry) -> Option<Aabb<2>> {

View File

@ -2,8 +2,8 @@ use fj_math::{Aabb, Vector};
use crate::{ use crate::{
geometry::{Geometry, SurfacePath}, geometry::{Geometry, SurfacePath},
objects::HalfEdge,
storage::Handle, storage::Handle,
topology::HalfEdge,
}; };
impl super::BoundingVolume<2> for Handle<HalfEdge> { impl super::BoundingVolume<2> for Handle<HalfEdge> {

View File

@ -2,7 +2,7 @@ use fj_math::Aabb;
use crate::{ use crate::{
geometry::{Geometry, GlobalPath}, geometry::{Geometry, GlobalPath},
objects::Face, topology::Face,
}; };
impl super::BoundingVolume<3> for Face { impl super::BoundingVolume<3> for Face {

View File

@ -1,6 +1,6 @@
use fj_math::Aabb; use fj_math::Aabb;
use crate::{geometry::Geometry, objects::Shell}; use crate::{geometry::Geometry, topology::Shell};
impl super::BoundingVolume<3> for Shell { impl super::BoundingVolume<3> for Shell {
fn aabb(&self, geometry: &Geometry) -> Option<Aabb<3>> { fn aabb(&self, geometry: &Geometry) -> Option<Aabb<3>> {

View File

@ -1,6 +1,6 @@
use fj_math::Aabb; use fj_math::Aabb;
use crate::{geometry::Geometry, objects::Solid}; use crate::{geometry::Geometry, topology::Solid};
impl super::BoundingVolume<3> for Solid { impl super::BoundingVolume<3> for Solid {
fn aabb(&self, geometry: &Geometry) -> Option<Aabb<3>> { fn aabb(&self, geometry: &Geometry) -> Option<Aabb<3>> {

View File

@ -3,7 +3,7 @@ use std::collections::BTreeMap;
use fj_math::{Point, Scalar, Triangle, Winding}; use fj_math::{Point, Scalar, Triangle, Winding};
use spade::HasPosition; use spade::HasPosition;
use crate::{algorithms::approx::cycle::CycleApprox, objects::Handedness}; use crate::{algorithms::approx::cycle::CycleApprox, topology::Handedness};
/// Create a Delaunay triangulation of all points /// Create a Delaunay triangulation of all points
pub fn triangulate( pub fn triangulate(

View File

@ -85,11 +85,11 @@ mod tests {
use crate::{ use crate::{
algorithms::approx::{Approx, Tolerance}, algorithms::approx::{Approx, Tolerance},
objects::{Cycle, Face},
operations::{ operations::{
build::{BuildCycle, BuildFace}, build::{BuildCycle, BuildFace},
update::{UpdateFace, UpdateRegion}, update::{UpdateFace, UpdateRegion},
}, },
topology::{Cycle, Face},
Core, Core,
}; };

View File

@ -5,7 +5,7 @@ use std::{
use fj_math::Point; use fj_math::Point;
use crate::{objects::Vertex, storage::Handle}; use crate::{storage::Handle, topology::Vertex};
/// A boundary on a curve /// A boundary on a curve
/// ///

View File

@ -3,8 +3,8 @@ use std::collections::BTreeMap;
use fj_math::Vector; use fj_math::Vector;
use crate::{ use crate::{
objects::{HalfEdge, Objects, Surface},
storage::Handle, storage::Handle,
topology::{HalfEdge, Objects, Surface},
}; };
use super::{GlobalPath, HalfEdgeGeometry, SurfaceGeometry}; use super::{GlobalPath, HalfEdgeGeometry, SurfaceGeometry};

View File

@ -2,8 +2,8 @@
use crate::{ use crate::{
geometry::{Geometry, HalfEdgeGeometry, SurfaceGeometry}, geometry::{Geometry, HalfEdgeGeometry, SurfaceGeometry},
objects::{HalfEdge, Surface},
storage::Handle, storage::Handle,
topology::{HalfEdge, Surface},
}; };
use super::{Command, Event, Layer}; use super::{Command, Event, Layer};

View File

@ -1,7 +1,7 @@
use crate::{ use crate::{
geometry::Geometry, geometry::Geometry,
objects::Objects,
presentation::Presentation, presentation::Presentation,
topology::Objects,
validation::{Validation, ValidationConfig}, validation::{Validation, ValidationConfig},
}; };

View File

@ -2,7 +2,7 @@
use crate::{ use crate::{
geometry::Geometry, geometry::Geometry,
objects::{AboutToBeStored, AnyObject, Objects}, topology::{AboutToBeStored, AnyObject, Objects},
validation::Validation, validation::Validation,
}; };

View File

@ -3,9 +3,9 @@
use fj_interop::Color; use fj_interop::Color;
use crate::{ use crate::{
objects::{AnyObject, Region, Stored},
presentation::Presentation, presentation::Presentation,
storage::Handle, storage::Handle,
topology::{AnyObject, Region, Stored},
}; };
use super::{Command, Event, Layer}; use super::{Command, Event, Layer};

View File

@ -2,7 +2,7 @@
use crate::{ use crate::{
geometry::Geometry, geometry::Geometry,
objects::{AnyObject, Stored}, topology::{AnyObject, Stored},
validation::{Validation, ValidationError, ValidationErrors}, validation::{Validation, ValidationError, ValidationErrors},
}; };

View File

@ -84,11 +84,11 @@
pub mod algorithms; pub mod algorithms;
pub mod geometry; pub mod geometry;
pub mod layers; pub mod layers;
pub mod objects;
pub mod operations; pub mod operations;
pub mod presentation; pub mod presentation;
pub mod queries; pub mod queries;
pub mod storage; pub mod storage;
pub mod topology;
pub mod validate; pub mod validate;
pub mod validation; pub mod validation;

View File

@ -2,8 +2,8 @@ use fj_math::{Point, Scalar};
use itertools::Itertools; use itertools::Itertools;
use crate::{ use crate::{
objects::{Cycle, HalfEdge},
operations::{build::BuildHalfEdge, update::UpdateCycle}, operations::{build::BuildHalfEdge, update::UpdateCycle},
topology::{Cycle, HalfEdge},
Core, Core,
}; };

View File

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

View File

@ -3,9 +3,9 @@ use fj_math::{Arc, Point, Scalar};
use crate::{ use crate::{
geometry::{HalfEdgeGeometry, SurfacePath}, geometry::{HalfEdgeGeometry, SurfacePath},
objects::{Curve, HalfEdge, Vertex},
operations::{geometry::UpdateHalfEdgeGeometry, insert::Insert}, operations::{geometry::UpdateHalfEdgeGeometry, insert::Insert},
storage::Handle, storage::Handle,
topology::{Curve, HalfEdge, Vertex},
Core, Core,
}; };

View File

@ -1,8 +1,8 @@
use fj_math::{Point, Scalar}; use fj_math::{Point, Scalar};
use crate::{ use crate::{
objects::{Cycle, Region},
operations::{build::BuildCycle, insert::Insert}, operations::{build::BuildCycle, insert::Insert},
topology::{Cycle, Region},
Core, Core,
}; };

View File

@ -5,7 +5,6 @@ use fj_math::Point;
use crate::{ use crate::{
geometry::CurveBoundary, geometry::CurveBoundary,
objects::{Curve, Face, HalfEdge, Shell, Surface, Vertex},
operations::{ operations::{
build::{BuildFace, BuildHalfEdge, BuildSurface, Polygon}, build::{BuildFace, BuildHalfEdge, BuildSurface, Polygon},
geometry::UpdateHalfEdgeGeometry, geometry::UpdateHalfEdgeGeometry,
@ -16,6 +15,7 @@ use crate::{
UpdateCycle, UpdateFace, UpdateHalfEdge, UpdateRegion, UpdateShell, UpdateCycle, UpdateFace, UpdateHalfEdge, UpdateRegion, UpdateShell,
}, },
}, },
topology::{Curve, Face, HalfEdge, Shell, Surface, Vertex},
Core, Core,
}; };

View File

@ -1,4 +1,4 @@
use crate::objects::Sketch; use crate::topology::Sketch;
/// Build a [`Sketch`] /// Build a [`Sketch`]
/// ///

View File

@ -1,12 +1,12 @@
use fj_math::Point; use fj_math::Point;
use crate::{ use crate::{
objects::{Shell, Solid},
operations::{ operations::{
build::{BuildShell, TetrahedronShell}, build::{BuildShell, TetrahedronShell},
insert::{Insert, IsInsertedYes}, insert::{Insert, IsInsertedYes},
update::UpdateSolid, update::UpdateSolid,
}, },
topology::{Shell, Solid},
Core, Core,
}; };

View File

@ -2,9 +2,9 @@ use fj_math::{Point, Scalar, Vector};
use crate::{ use crate::{
geometry::{GlobalPath, SurfaceGeometry}, geometry::{GlobalPath, SurfaceGeometry},
objects::Surface,
operations::insert::Insert, operations::insert::Insert,
storage::Handle, storage::Handle,
topology::Surface,
Core, Core,
}; };

View File

@ -3,8 +3,8 @@
//! See [`DeriveFrom`]. //! See [`DeriveFrom`].
use crate::{ use crate::{
objects::{AnyObject, Stored},
storage::Handle, storage::Handle,
topology::{AnyObject, Stored},
Core, Core,
}; };

View File

@ -1,8 +1,8 @@
use crate::{ use crate::{
geometry::{Geometry, HalfEdgeGeometry}, geometry::{Geometry, HalfEdgeGeometry},
layers::Layer, layers::Layer,
objects::HalfEdge,
storage::Handle, storage::Handle,
topology::HalfEdge,
}; };
/// Update the geometry of a [`HalfEdge`] /// Update the geometry of a [`HalfEdge`]

View File

@ -3,8 +3,8 @@
use fj_math::{Point, Scalar, Vector}; use fj_math::{Point, Scalar, Vector};
use crate::{ use crate::{
objects::{Cycle, Face, HalfEdge, Region, Shell},
storage::Handle, storage::Handle,
topology::{Cycle, Face, HalfEdge, Region, Shell},
Core, Core,
}; };

View File

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

View File

@ -4,7 +4,6 @@ use itertools::Itertools;
use crate::{ use crate::{
geometry::HalfEdgeGeometry, geometry::HalfEdgeGeometry,
objects::{Cycle, HalfEdge},
operations::{ operations::{
build::BuildHalfEdge, build::BuildHalfEdge,
geometry::UpdateHalfEdgeGeometry, geometry::UpdateHalfEdgeGeometry,
@ -12,6 +11,7 @@ use crate::{
update::{UpdateCycle, UpdateHalfEdge}, update::{UpdateCycle, UpdateHalfEdge},
}, },
storage::Handle, storage::Handle,
topology::{Cycle, HalfEdge},
Core, Core,
}; };

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,8 +1,8 @@
use crate::{ use crate::{
objects::{Cycle, HalfEdge},
operations::{ operations::{
derive::DeriveFrom, geometry::UpdateHalfEdgeGeometry, insert::Insert, derive::DeriveFrom, geometry::UpdateHalfEdgeGeometry, insert::Insert,
}, },
topology::{Cycle, HalfEdge},
Core, Core,
}; };

View File

@ -1,7 +1,7 @@
use crate::{ use crate::{
objects::HalfEdge,
operations::{derive::DeriveFrom, insert::Insert}, operations::{derive::DeriveFrom, insert::Insert},
storage::Handle, storage::Handle,
topology::HalfEdge,
Core, Core,
}; };

View File

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

View File

@ -1,6 +1,6 @@
use crate::{ use crate::{
objects::Region,
operations::{derive::DeriveFrom, insert::Insert}, operations::{derive::DeriveFrom, insert::Insert},
topology::Region,
Core, Core,
}; };

View File

@ -1,13 +1,13 @@
use fj_math::Point; use fj_math::Point;
use crate::{ use crate::{
objects::{HalfEdge, Shell},
operations::{ operations::{
geometry::UpdateHalfEdgeGeometry, insert::Insert, geometry::UpdateHalfEdgeGeometry, insert::Insert,
replace::ReplaceHalfEdge, split::SplitHalfEdge, update::UpdateHalfEdge, replace::ReplaceHalfEdge, split::SplitHalfEdge, update::UpdateHalfEdge,
}, },
queries::SiblingOfHalfEdge, queries::SiblingOfHalfEdge,
storage::Handle, storage::Handle,
topology::{HalfEdge, Shell},
Core, Core,
}; };

View File

@ -3,7 +3,6 @@ use fj_math::Point;
use itertools::Itertools; use itertools::Itertools;
use crate::{ use crate::{
objects::{Cycle, Face, HalfEdge, Shell},
operations::{ operations::{
build::{BuildCycle, BuildHalfEdge}, build::{BuildCycle, BuildHalfEdge},
derive::DeriveFrom, derive::DeriveFrom,
@ -15,6 +14,7 @@ use crate::{
}, },
}, },
storage::Handle, storage::Handle,
topology::{Cycle, Face, HalfEdge, Shell},
Core, Core,
}; };
@ -204,12 +204,12 @@ mod tests {
use fj_interop::Color; use fj_interop::Color;
use crate::{ use crate::{
objects::Shell,
operations::{ operations::{
build::BuildShell, build::BuildShell,
presentation::{GetColor, SetColor}, presentation::{GetColor, SetColor},
split::SplitFace, split::SplitFace,
}, },
topology::Shell,
Core, Core,
}; };

View File

@ -1,11 +1,11 @@
use fj_math::Point; use fj_math::Point;
use crate::{ use crate::{
objects::{HalfEdge, Vertex},
operations::{ operations::{
derive::DeriveFrom, geometry::UpdateHalfEdgeGeometry, insert::Insert, derive::DeriveFrom, geometry::UpdateHalfEdgeGeometry, insert::Insert,
}, },
storage::Handle, storage::Handle,
topology::{HalfEdge, Vertex},
Core, Core,
}; };

View File

@ -3,10 +3,10 @@ use fj_math::Vector;
use crate::{ use crate::{
geometry::SurfaceGeometry, geometry::SurfaceGeometry,
objects::{Cycle, Face},
operations::{ operations::{
build::BuildCycle, join::JoinCycle, sweep::half_edge::SweepHalfEdge, build::BuildCycle, join::JoinCycle, sweep::half_edge::SweepHalfEdge,
}, },
topology::{Cycle, Face},
Core, Core,
}; };

View File

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

View File

@ -3,7 +3,6 @@ use fj_math::{Point, Scalar, Vector};
use crate::{ use crate::{
geometry::SurfaceGeometry, geometry::SurfaceGeometry,
objects::{Cycle, Face, HalfEdge, Region, Vertex},
operations::{ operations::{
build::{BuildCycle, BuildHalfEdge}, build::{BuildCycle, BuildHalfEdge},
geometry::UpdateHalfEdgeGeometry, geometry::UpdateHalfEdgeGeometry,
@ -12,6 +11,7 @@ use crate::{
update::{UpdateCycle, UpdateHalfEdge}, update::{UpdateCycle, UpdateHalfEdge},
}, },
storage::Handle, storage::Handle,
topology::{Cycle, Face, HalfEdge, Region, Vertex},
Core, Core,
}; };

View File

@ -26,8 +26,8 @@ pub use self::{
use std::collections::BTreeMap; use std::collections::BTreeMap;
use crate::{ use crate::{
objects::{Curve, Vertex},
storage::{Handle, ObjectId}, storage::{Handle, ObjectId},
topology::{Curve, Vertex},
}; };
/// A cache used for sweeping /// A cache used for sweeping

View File

@ -2,9 +2,9 @@ use fj_math::{Circle, Line, Vector};
use crate::{ use crate::{
geometry::{GlobalPath, SurfaceGeometry, SurfacePath}, geometry::{GlobalPath, SurfaceGeometry, SurfacePath},
objects::Surface,
operations::build::BuildSurface, operations::build::BuildSurface,
storage::Handle, storage::Handle,
topology::Surface,
Core, Core,
}; };

View File

@ -3,11 +3,11 @@ use fj_math::Vector;
use crate::{ use crate::{
geometry::SurfaceGeometry, geometry::SurfaceGeometry,
objects::{Cycle, Face, Region, Surface},
operations::{ operations::{
insert::Insert, reverse::Reverse, transform::TransformObject, insert::Insert, reverse::Reverse, transform::TransformObject,
}, },
storage::Handle, storage::Handle,
topology::{Cycle, Face, Region, Surface},
Core, Core,
}; };

View File

@ -1,7 +1,6 @@
use fj_math::Vector; use fj_math::Vector;
use crate::{ use crate::{
objects::{Face, Region, Shell},
operations::{ operations::{
derive::DeriveFrom, derive::DeriveFrom,
insert::Insert, insert::Insert,
@ -11,6 +10,7 @@ use crate::{
update::UpdateShell, update::UpdateShell,
}, },
storage::Handle, storage::Handle,
topology::{Face, Region, Shell},
Core, Core,
}; };

View File

@ -2,9 +2,9 @@ use fj_math::{Scalar, Vector};
use crate::{ use crate::{
geometry::GlobalPath, geometry::GlobalPath,
objects::{Face, Sketch, Solid, Surface},
operations::{derive::DeriveFrom, insert::Insert, reverse::Reverse}, operations::{derive::DeriveFrom, insert::Insert, reverse::Reverse},
storage::Handle, storage::Handle,
topology::{Face, Sketch, Solid, Surface},
Core, Core,
}; };

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,9 +16,9 @@ use fj_math::{Transform, Vector};
use type_map::TypeMap; use type_map::TypeMap;
use crate::{ use crate::{
objects::{AnyObject, Stored},
operations::insert::Insert, operations::insert::Insert,
storage::{Handle, ObjectId}, storage::{Handle, ObjectId},
topology::{AnyObject, Stored},
Core, Core,
}; };

View File

@ -1,4 +1,4 @@
use crate::{objects::Region, Core}; use crate::{topology::Region, Core};
use super::TransformObject; use super::TransformObject;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
use crate::{ use crate::{
objects::{Face, Region},
operations::{build::Polygon, derive::DeriveFrom, insert::Insert}, operations::{build::Polygon, derive::DeriveFrom, insert::Insert},
storage::Handle, storage::Handle,
topology::{Face, Region},
Core, Core,
}; };

View File

@ -1,7 +1,7 @@
use crate::{ use crate::{
objects::{Curve, HalfEdge, Vertex},
operations::{derive::DeriveFrom, insert::Insert}, operations::{derive::DeriveFrom, insert::Insert},
storage::Handle, storage::Handle,
topology::{Curve, HalfEdge, Vertex},
Core, Core,
}; };

View File

@ -1,7 +1,7 @@
use crate::{ use crate::{
objects::{Cycle, Region},
operations::{derive::DeriveFrom, insert::Insert}, operations::{derive::DeriveFrom, insert::Insert},
storage::Handle, storage::Handle,
topology::{Cycle, Region},
Core, Core,
}; };

View File

@ -1,7 +1,7 @@
use crate::{ use crate::{
objects::{Face, Shell},
operations::{derive::DeriveFrom, insert::Insert}, operations::{derive::DeriveFrom, insert::Insert},
storage::Handle, storage::Handle,
topology::{Face, Shell},
Core, Core,
}; };

View File

@ -1,7 +1,7 @@
use crate::{ use crate::{
objects::{Region, Sketch},
operations::{derive::DeriveFrom, insert::Insert}, operations::{derive::DeriveFrom, insert::Insert},
storage::Handle, storage::Handle,
topology::{Region, Sketch},
Core, Core,
}; };

View File

@ -1,7 +1,7 @@
use crate::{ use crate::{
objects::{Shell, Solid},
operations::{derive::DeriveFrom, insert::Insert}, operations::{derive::DeriveFrom, insert::Insert},
storage::Handle, storage::Handle,
topology::{Shell, Solid},
Core, Core,
}; };

View File

@ -6,7 +6,7 @@ use std::collections::BTreeMap;
use fj_interop::Color; use fj_interop::Color;
use crate::{objects::Region, storage::Handle}; use crate::{storage::Handle, topology::Region};
/// Presentation data for the object graph /// Presentation data for the object graph
/// ///

View File

@ -1,6 +1,6 @@
use crate::{ use crate::{
objects::{Face, HalfEdge, Shell, Surface},
storage::Handle, storage::Handle,
topology::{Face, HalfEdge, Shell, Surface},
}; };
/// Access all half-edges referenced by an object, and the surface they're on /// Access all half-edges referenced by an object, and the surface they're on

View File

@ -1,7 +1,7 @@
use crate::{ use crate::{
geometry::CurveBoundary, geometry::CurveBoundary,
objects::{Cycle, Face, HalfEdge, Region, Shell, Vertex},
storage::Handle, storage::Handle,
topology::{Cycle, Face, HalfEdge, Region, Shell, Vertex},
}; };
/// Determine the bounding vertices of a half-edge /// Determine the bounding vertices of a half-edge

View File

@ -1,7 +1,7 @@
use crate::{ use crate::{
geometry::Geometry, geometry::Geometry,
objects::{HalfEdge, Shell},
storage::Handle, storage::Handle,
topology::{HalfEdge, Shell},
}; };
use super::BoundingVerticesOfHalfEdge; use super::BoundingVerticesOfHalfEdge;

View File

@ -1,10 +1,10 @@
use crate::{ use crate::{
geometry::Geometry, geometry::Geometry,
objects::{ storage::{Handle, ObjectId},
topology::{
Curve, Cycle, Face, HalfEdge, Objects, Region, Shell, Sketch, Solid, Curve, Cycle, Face, HalfEdge, Objects, Region, Shell, Sketch, Solid,
Surface, Vertex, Surface, Vertex,
}, },
storage::{Handle, ObjectId},
validate::Validate, validate::Validate,
validation::{ValidationConfig, ValidationError}, validation::{ValidationConfig, ValidationError},
}; };

View File

@ -20,7 +20,7 @@
/// `Eq`/`Ord`/..., you can use `HandleWrapper<Curve>` to do that. It will use /// `Eq`/`Ord`/..., you can use `HandleWrapper<Curve>` to do that. It will use
/// `Handle::id` to provide those `Eq`/`Ord`/... implementations. /// `Handle::id` to provide those `Eq`/`Ord`/... implementations.
/// ///
/// [`HalfEdge`]: crate::objects::HalfEdge /// [`HalfEdge`]: crate::topology::HalfEdge
#[derive(Clone, Debug, Default)] #[derive(Clone, Debug, Default)]
pub struct Curve {} pub struct Curve {}

View File

@ -2,8 +2,8 @@ use fj_math::{Scalar, Winding};
use crate::{ use crate::{
geometry::{Geometry, SurfacePath}, geometry::{Geometry, SurfacePath},
objects::{HalfEdge, ObjectSet},
storage::Handle, storage::Handle,
topology::{HalfEdge, ObjectSet},
}; };
/// A cycle of connected edges /// A cycle of connected edges

View File

@ -2,8 +2,8 @@ use fj_math::Winding;
use crate::{ use crate::{
geometry::Geometry, geometry::Geometry,
objects::{Region, Surface},
storage::Handle, storage::Handle,
topology::{Region, Surface},
}; };
/// A face of a shape /// A face of a shape
@ -28,8 +28,8 @@ use crate::{
/// means that all [`HalfEdge`]s that bound a `Face` have the interior of the /// means that all [`HalfEdge`]s that bound a `Face` have the interior of the
/// face on their left side (on the face's front side). /// face on their left side (on the face's front side).
/// ///
/// [`HalfEdge`]: crate::objects::HalfEdge /// [`HalfEdge`]: crate::topology::HalfEdge
/// [`Shell`]: crate::objects::Shell /// [`Shell`]: crate::topology::Shell
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub struct Face { pub struct Face {
surface: Handle<Surface>, surface: Handle<Surface>,

View File

@ -1,6 +1,6 @@
use crate::{ use crate::{
objects::{Curve, Vertex},
storage::Handle, storage::Handle,
topology::{Curve, Vertex},
}; };
/// # A directed half-edge, defined in a surface's 2D space /// # A directed half-edge, defined in a surface's 2D space
@ -28,8 +28,8 @@ use crate::{
/// their start vertices are different. /// their start vertices are different.
/// ///
/// ///
/// [`Cycle`]: crate::objects::Cycle /// [`Cycle`]: crate::topology::Cycle
/// [`Shell`]: crate::objects::Shell /// [`Shell`]: crate::topology::Shell
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub struct HalfEdge { pub struct HalfEdge {
curve: Handle<Curve>, curve: Handle<Curve>,

View File

@ -1,8 +1,8 @@
//! A single, continues 2d region //! A single, continues 2d region
use crate::{ use crate::{
objects::{Cycle, ObjectSet},
storage::Handle, storage::Handle,
topology::{Cycle, ObjectSet},
}; };
/// A single, continuous 2d region, may contain holes /// A single, continuous 2d region, may contain holes
@ -12,7 +12,7 @@ use crate::{
/// means that all [`HalfEdge`]s that bound a `Region` have the interior of the /// means that all [`HalfEdge`]s that bound a `Region` have the interior of the
/// region on their left side (on the region's front side). /// region on their left side (on the region's front side).
/// ///
/// [`HalfEdge`]: crate::objects::HalfEdge /// [`HalfEdge`]: crate::topology::HalfEdge
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub struct Region { pub struct Region {
exterior: Handle<Cycle>, exterior: Handle<Cycle>,

View File

@ -1,6 +1,6 @@
use crate::{ use crate::{
objects::{Face, ObjectSet},
storage::Handle, storage::Handle,
topology::{Face, ObjectSet},
}; };
/// A 3-dimensional closed shell /// A 3-dimensional closed shell

View File

@ -1,6 +1,6 @@
use crate::{ use crate::{
objects::{ObjectSet, Region},
storage::Handle, storage::Handle,
topology::{ObjectSet, Region},
}; };
/// A 2-dimensional shape /// A 2-dimensional shape

View File

@ -1,6 +1,6 @@
use crate::{ use crate::{
objects::{ObjectSet, Shell},
storage::Handle, storage::Handle,
topology::{ObjectSet, Shell},
}; };
/// A 3-dimensional shape, built from [`Shell`]s. Many Solids will contains only /// A 3-dimensional shape, built from [`Shell`]s. Many Solids will contains only

View File

@ -78,11 +78,11 @@
/// `Eq`/`Ord`/..., you can use `HandleWrapper<Vertex>` to do that. It will /// `Eq`/`Ord`/..., you can use `HandleWrapper<Vertex>` to do that. It will
/// use `Handle::id` to provide those `Eq`/`Ord`/... implementations. /// use `Handle::id` to provide those `Eq`/`Ord`/... implementations.
/// ///
/// [`HalfEdge`]: crate::objects::HalfEdge /// [`HalfEdge`]: crate::topology::HalfEdge
/// [`Handle`]: crate::storage::Handle /// [`Handle`]: crate::storage::Handle
/// [`Sketch`]: crate::objects::Sketch /// [`Sketch`]: crate::topology::Sketch
/// [`Solid`]: crate::objects::Solid /// [`Solid`]: crate::topology::Solid
/// [`Surface`]: crate::objects::Surface /// [`Surface`]: crate::topology::Surface
#[derive(Clone, Debug, Default)] #[derive(Clone, Debug, Default)]
pub struct Vertex {} pub struct Vertex {}

View File

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

View File

@ -1,6 +1,6 @@
use crate::{ use crate::{
geometry::Geometry, geometry::Geometry,
objects::Curve, topology::Curve,
validation::{ValidationConfig, ValidationError}, validation::{ValidationConfig, ValidationError},
}; };

View File

@ -1,6 +1,6 @@
use crate::{ use crate::{
geometry::Geometry, geometry::Geometry,
objects::Cycle, topology::Cycle,
validation::{ validation::{
checks::AdjacentHalfEdgesNotConnected, ValidationCheck, checks::AdjacentHalfEdgesNotConnected, ValidationCheck,
ValidationConfig, ValidationError, ValidationConfig, ValidationError,

View File

@ -1,6 +1,6 @@
use crate::{ use crate::{
geometry::Geometry, geometry::Geometry,
objects::HalfEdge, topology::HalfEdge,
validation::{ValidationConfig, ValidationError}, validation::{ValidationConfig, ValidationError},
}; };

View File

@ -1,6 +1,6 @@
use crate::{ use crate::{
geometry::Geometry, geometry::Geometry,
objects::Face, topology::Face,
validation::{ validation::{
checks::{FaceHasNoBoundary, InteriorCycleHasInvalidWinding}, checks::{FaceHasNoBoundary, InteriorCycleHasInvalidWinding},
ValidationCheck, ValidationConfig, ValidationError, ValidationCheck, ValidationConfig, ValidationError,

View File

@ -1,7 +1,7 @@
use std::collections::HashMap; use std::collections::HashMap;
use crate::objects::{Cycle, Face, HalfEdge, Region, Shell};
use crate::storage::Handle; use crate::storage::Handle;
use crate::topology::{Cycle, Face, HalfEdge, Region, Shell};
#[derive(Default)] #[derive(Default)]
pub struct ReferenceCounter<T, U>(HashMap<Handle<T>, Vec<Handle<U>>>); pub struct ReferenceCounter<T, U>(HashMap<Handle<T>, Vec<Handle<U>>>);

View File

@ -1,4 +1,4 @@
use crate::{geometry::Geometry, objects::Region}; use crate::{geometry::Geometry, topology::Region};
use super::{Validate, ValidationConfig, ValidationError}; use super::{Validate, ValidationConfig, ValidationError};

Some files were not shown because too many files have changed in this diff Show More