diff --git a/crates/fj-core/src/algorithms/approx/curve.rs b/crates/fj-core/src/algorithms/approx/curve.rs index 6a5dc4bfa..43e7ddd15 100644 --- a/crates/fj-core/src/algorithms/approx/curve.rs +++ b/crates/fj-core/src/algorithms/approx/curve.rs @@ -9,8 +9,8 @@ use crate::{ CurveBoundary, GlobalPath, HalfEdgeGeometry, SurfaceGeometry, SurfacePath, }, - objects::Curve, storage::Handle, + topology::Curve, Core, }; @@ -187,8 +187,8 @@ mod tests { CurveBoundary, GlobalPath, HalfEdgeGeometry, SurfaceGeometry, SurfacePath, }, - objects::Curve, operations::insert::Insert, + topology::Curve, Core, }; diff --git a/crates/fj-core/src/algorithms/approx/cycle.rs b/crates/fj-core/src/algorithms/approx/cycle.rs index 145ee63d9..f2b473afb 100644 --- a/crates/fj-core/src/algorithms/approx/cycle.rs +++ b/crates/fj-core/src/algorithms/approx/cycle.rs @@ -4,7 +4,7 @@ use fj_math::Segment; -use crate::{geometry::SurfaceGeometry, objects::Cycle, Core}; +use crate::{geometry::SurfaceGeometry, topology::Cycle, Core}; use super::{ edge::{HalfEdgeApprox, HalfEdgeApproxCache}, diff --git a/crates/fj-core/src/algorithms/approx/edge.rs b/crates/fj-core/src/algorithms/approx/edge.rs index 5db47de99..0484ea7b9 100644 --- a/crates/fj-core/src/algorithms/approx/edge.rs +++ b/crates/fj-core/src/algorithms/approx/edge.rs @@ -6,7 +6,7 @@ //! the caller doesn't have to deal with duplicate vertices. use crate::{ - geometry::SurfaceGeometry, objects::HalfEdge, storage::Handle, Core, + geometry::SurfaceGeometry, storage::Handle, topology::HalfEdge, Core, }; use super::{ diff --git a/crates/fj-core/src/algorithms/approx/face.rs b/crates/fj-core/src/algorithms/approx/face.rs index 3892fd046..8deb299e7 100644 --- a/crates/fj-core/src/algorithms/approx/face.rs +++ b/crates/fj-core/src/algorithms/approx/face.rs @@ -7,8 +7,8 @@ use std::{collections::BTreeSet, ops::Deref}; use fj_interop::Color; use crate::{ - objects::{Face, Handedness, ObjectSet}, operations::presentation::GetColor, + topology::{Face, Handedness, ObjectSet}, validation::ValidationConfig, Core, }; diff --git a/crates/fj-core/src/algorithms/approx/shell.rs b/crates/fj-core/src/algorithms/approx/shell.rs index 6bfc40da8..6b5c05eea 100644 --- a/crates/fj-core/src/algorithms/approx/shell.rs +++ b/crates/fj-core/src/algorithms/approx/shell.rs @@ -2,7 +2,7 @@ use std::collections::BTreeSet; -use crate::{objects::Shell, Core}; +use crate::{topology::Shell, Core}; use super::{edge::HalfEdgeApproxCache, face::FaceApprox, Approx, Tolerance}; diff --git a/crates/fj-core/src/algorithms/approx/sketch.rs b/crates/fj-core/src/algorithms/approx/sketch.rs index 34b16b434..4aabbe26b 100644 --- a/crates/fj-core/src/algorithms/approx/sketch.rs +++ b/crates/fj-core/src/algorithms/approx/sketch.rs @@ -2,7 +2,7 @@ use std::collections::BTreeSet; -use crate::{objects::Sketch, Core}; +use crate::{topology::Sketch, Core}; use super::{edge::HalfEdgeApproxCache, face::FaceApprox, Approx, Tolerance}; diff --git a/crates/fj-core/src/algorithms/approx/solid.rs b/crates/fj-core/src/algorithms/approx/solid.rs index dcceb4e08..44cc5acc8 100644 --- a/crates/fj-core/src/algorithms/approx/solid.rs +++ b/crates/fj-core/src/algorithms/approx/solid.rs @@ -2,7 +2,7 @@ use std::collections::BTreeSet; -use crate::{objects::Solid, Core}; +use crate::{topology::Solid, Core}; use super::{edge::HalfEdgeApproxCache, face::FaceApprox, Approx, Tolerance}; diff --git a/crates/fj-core/src/algorithms/approx/vertex.rs b/crates/fj-core/src/algorithms/approx/vertex.rs index 196b8923f..ca641eb4d 100644 --- a/crates/fj-core/src/algorithms/approx/vertex.rs +++ b/crates/fj-core/src/algorithms/approx/vertex.rs @@ -4,7 +4,7 @@ use std::collections::BTreeMap; use fj_math::Point; -use crate::{objects::Vertex, storage::Handle}; +use crate::{storage::Handle, topology::Vertex}; /// Cache for vertex approximations #[derive(Default)] diff --git a/crates/fj-core/src/algorithms/bounding_volume/cycle.rs b/crates/fj-core/src/algorithms/bounding_volume/cycle.rs index dad4402bc..434f0454b 100644 --- a/crates/fj-core/src/algorithms/bounding_volume/cycle.rs +++ b/crates/fj-core/src/algorithms/bounding_volume/cycle.rs @@ -1,6 +1,6 @@ use fj_math::Aabb; -use crate::{geometry::Geometry, objects::Cycle}; +use crate::{geometry::Geometry, topology::Cycle}; impl super::BoundingVolume<2> for Cycle { fn aabb(&self, geometry: &Geometry) -> Option> { diff --git a/crates/fj-core/src/algorithms/bounding_volume/edge.rs b/crates/fj-core/src/algorithms/bounding_volume/edge.rs index 4e243d158..7a5187806 100644 --- a/crates/fj-core/src/algorithms/bounding_volume/edge.rs +++ b/crates/fj-core/src/algorithms/bounding_volume/edge.rs @@ -2,8 +2,8 @@ use fj_math::{Aabb, Vector}; use crate::{ geometry::{Geometry, SurfacePath}, - objects::HalfEdge, storage::Handle, + topology::HalfEdge, }; impl super::BoundingVolume<2> for Handle { diff --git a/crates/fj-core/src/algorithms/bounding_volume/face.rs b/crates/fj-core/src/algorithms/bounding_volume/face.rs index 00f5eec25..dcc188c23 100644 --- a/crates/fj-core/src/algorithms/bounding_volume/face.rs +++ b/crates/fj-core/src/algorithms/bounding_volume/face.rs @@ -2,7 +2,7 @@ use fj_math::Aabb; use crate::{ geometry::{Geometry, GlobalPath}, - objects::Face, + topology::Face, }; impl super::BoundingVolume<3> for Face { diff --git a/crates/fj-core/src/algorithms/bounding_volume/shell.rs b/crates/fj-core/src/algorithms/bounding_volume/shell.rs index d62e636da..6cafda424 100644 --- a/crates/fj-core/src/algorithms/bounding_volume/shell.rs +++ b/crates/fj-core/src/algorithms/bounding_volume/shell.rs @@ -1,6 +1,6 @@ use fj_math::Aabb; -use crate::{geometry::Geometry, objects::Shell}; +use crate::{geometry::Geometry, topology::Shell}; impl super::BoundingVolume<3> for Shell { fn aabb(&self, geometry: &Geometry) -> Option> { diff --git a/crates/fj-core/src/algorithms/bounding_volume/solid.rs b/crates/fj-core/src/algorithms/bounding_volume/solid.rs index e0483bf65..e2ad4397b 100644 --- a/crates/fj-core/src/algorithms/bounding_volume/solid.rs +++ b/crates/fj-core/src/algorithms/bounding_volume/solid.rs @@ -1,6 +1,6 @@ use fj_math::Aabb; -use crate::{geometry::Geometry, objects::Solid}; +use crate::{geometry::Geometry, topology::Solid}; impl super::BoundingVolume<3> for Solid { fn aabb(&self, geometry: &Geometry) -> Option> { diff --git a/crates/fj-core/src/algorithms/triangulate/delaunay.rs b/crates/fj-core/src/algorithms/triangulate/delaunay.rs index 7fc20f6c6..306caefbb 100644 --- a/crates/fj-core/src/algorithms/triangulate/delaunay.rs +++ b/crates/fj-core/src/algorithms/triangulate/delaunay.rs @@ -3,7 +3,7 @@ use std::collections::BTreeMap; use fj_math::{Point, Scalar, Triangle, Winding}; 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 pub fn triangulate( diff --git a/crates/fj-core/src/algorithms/triangulate/mod.rs b/crates/fj-core/src/algorithms/triangulate/mod.rs index 5e76058ab..bf1f594b9 100644 --- a/crates/fj-core/src/algorithms/triangulate/mod.rs +++ b/crates/fj-core/src/algorithms/triangulate/mod.rs @@ -85,11 +85,11 @@ mod tests { use crate::{ algorithms::approx::{Approx, Tolerance}, - objects::{Cycle, Face}, operations::{ build::{BuildCycle, BuildFace}, update::{UpdateFace, UpdateRegion}, }, + topology::{Cycle, Face}, Core, }; @@ -105,7 +105,7 @@ mod tests { let d = [0., 1.]; let face = - Face::unbound(core.layers.objects.surfaces.xy_plane(), &mut core) + Face::unbound(core.layers.topology.surfaces.xy_plane(), &mut core) .update_region( |region, core| { region.update_exterior( @@ -145,7 +145,7 @@ mod tests { let g = [3., 3.]; let h = [3., 1.]; - let surface = core.layers.objects.surfaces.xy_plane(); + let surface = core.layers.topology.surfaces.xy_plane(); let face = Face::unbound(surface.clone(), &mut core).update_region( |region, core| { @@ -234,7 +234,7 @@ mod tests { let d = [1., 1.]; let e = [0., 9.]; - let surface = core.layers.objects.surfaces.xy_plane(); + let surface = core.layers.topology.surfaces.xy_plane(); let face = Face::unbound(surface.clone(), &mut core).update_region( |region, core| { diff --git a/crates/fj-core/src/geometry/boundary.rs b/crates/fj-core/src/geometry/boundary.rs index a4577ab80..f4c68ac3f 100644 --- a/crates/fj-core/src/geometry/boundary.rs +++ b/crates/fj-core/src/geometry/boundary.rs @@ -5,7 +5,7 @@ use std::{ use fj_math::Point; -use crate::{objects::Vertex, storage::Handle}; +use crate::{storage::Handle, topology::Vertex}; /// A boundary on a curve /// diff --git a/crates/fj-core/src/geometry/geometry.rs b/crates/fj-core/src/geometry/geometry.rs index 88682b2ee..66b1b5b6d 100644 --- a/crates/fj-core/src/geometry/geometry.rs +++ b/crates/fj-core/src/geometry/geometry.rs @@ -3,8 +3,8 @@ use std::collections::BTreeMap; use fj_math::Vector; use crate::{ - objects::{HalfEdge, Objects, Surface}, storage::Handle, + topology::{HalfEdge, Surface, Topology}, }; use super::{GlobalPath, HalfEdgeGeometry, SurfaceGeometry}; @@ -21,14 +21,14 @@ pub struct Geometry { impl Geometry { /// Create a new instance of `Geometry` - pub fn new(objects: &Objects) -> Self { + pub fn new(topology: &Topology) -> Self { let mut self_ = Self { half_edge: BTreeMap::new(), surface: BTreeMap::new(), - xy_plane: objects.surfaces.xy_plane(), - xz_plane: objects.surfaces.xz_plane(), - yz_plane: objects.surfaces.yz_plane(), + xy_plane: topology.surfaces.xy_plane(), + xz_plane: topology.surfaces.xz_plane(), + yz_plane: topology.surfaces.yz_plane(), }; self_.define_surface_inner( diff --git a/crates/fj-core/src/layers/geometry.rs b/crates/fj-core/src/layers/geometry.rs index 16596c35f..58f7ff836 100644 --- a/crates/fj-core/src/layers/geometry.rs +++ b/crates/fj-core/src/layers/geometry.rs @@ -2,8 +2,8 @@ use crate::{ geometry::{Geometry, HalfEdgeGeometry, SurfaceGeometry}, - objects::{HalfEdge, Surface}, storage::Handle, + topology::{HalfEdge, Surface}, }; use super::{Command, Event, Layer}; diff --git a/crates/fj-core/src/layers/layers.rs b/crates/fj-core/src/layers/layers.rs index d739081b1..897245386 100644 --- a/crates/fj-core/src/layers/layers.rs +++ b/crates/fj-core/src/layers/layers.rs @@ -1,7 +1,7 @@ use crate::{ geometry::Geometry, - objects::Objects, presentation::Presentation, + topology::Topology, validation::{Validation, ValidationConfig}, }; @@ -22,11 +22,10 @@ use super::Layer; /// For now, there is no need for this, and all layers are just hardcoded here. /// That can be changed, once necessary. pub struct Layers { - /// The objects layer + /// The topology layer /// - /// Manages the stores of topological and geometric objects that make up - /// shapes. - pub objects: Layer, + /// Manages the stores of topological objects. + pub topology: Layer, /// The geometry layer /// @@ -47,11 +46,11 @@ pub struct Layers { impl Layers { /// Construct an instance of `Layers` pub fn new() -> Self { - let objects = Objects::new(); - let geometry = Geometry::new(&objects); + let topology = Topology::new(); + let geometry = Geometry::new(&topology); Self { - objects: Layer::new(objects), + topology: Layer::new(topology), geometry: Layer::new(geometry), validation: Layer::default(), presentation: Layer::default(), diff --git a/crates/fj-core/src/layers/mod.rs b/crates/fj-core/src/layers/mod.rs index 7e8c619f8..fd5fb0ddb 100644 --- a/crates/fj-core/src/layers/mod.rs +++ b/crates/fj-core/src/layers/mod.rs @@ -3,8 +3,8 @@ //! See [`Layers`]. pub mod geometry; -pub mod objects; pub mod presentation; +pub mod topology; pub mod validation; mod layer; diff --git a/crates/fj-core/src/layers/presentation.rs b/crates/fj-core/src/layers/presentation.rs index 9847328c5..b49cfaa5c 100644 --- a/crates/fj-core/src/layers/presentation.rs +++ b/crates/fj-core/src/layers/presentation.rs @@ -3,9 +3,9 @@ use fj_interop::Color; use crate::{ - objects::{AnyObject, Region, Stored}, presentation::Presentation, storage::Handle, + topology::{AnyObject, Region, Stored}, }; use super::{Command, Event, Layer}; diff --git a/crates/fj-core/src/layers/objects.rs b/crates/fj-core/src/layers/topology.rs similarity index 76% rename from crates/fj-core/src/layers/objects.rs rename to crates/fj-core/src/layers/topology.rs index 8ab8ec504..787db3dc1 100644 --- a/crates/fj-core/src/layers/objects.rs +++ b/crates/fj-core/src/layers/topology.rs @@ -1,14 +1,14 @@ -//! Layer infrastructure for [`Objects`] +//! Layer infrastructure for [`Topology`] use crate::{ geometry::Geometry, - objects::{AboutToBeStored, AnyObject, Objects}, + topology::{AboutToBeStored, AnyObject, Topology}, validation::Validation, }; use super::{validation::ValidateObject, Command, Event, Layer}; -impl Layer { +impl Layer { /// Insert an object into the stores /// /// Passes any events produced to the validation layer. @@ -38,17 +38,17 @@ pub struct InsertObject { pub object: AnyObject, } -impl Command for InsertObject { +impl Command for InsertObject { type Result = (); type Event = InsertObject; - fn decide(self, _: &Objects, events: &mut Vec) { + fn decide(self, _: &Topology, events: &mut Vec) { events.push(self); } } -impl Event for InsertObject { - fn evolve(&self, state: &mut Objects) { +impl Event for InsertObject { + fn evolve(&self, state: &mut Topology) { self.object.clone().insert(state); } } diff --git a/crates/fj-core/src/layers/validation.rs b/crates/fj-core/src/layers/validation.rs index 4c4400350..24c68a67c 100644 --- a/crates/fj-core/src/layers/validation.rs +++ b/crates/fj-core/src/layers/validation.rs @@ -2,7 +2,7 @@ use crate::{ geometry::Geometry, - objects::{AnyObject, Stored}, + topology::{AnyObject, Stored}, validation::{Validation, ValidationError, ValidationErrors}, }; diff --git a/crates/fj-core/src/lib.rs b/crates/fj-core/src/lib.rs index 920e37035..262bae659 100644 --- a/crates/fj-core/src/lib.rs +++ b/crates/fj-core/src/lib.rs @@ -84,11 +84,11 @@ pub mod algorithms; pub mod geometry; pub mod layers; -pub mod objects; pub mod operations; pub mod presentation; pub mod queries; pub mod storage; +pub mod topology; pub mod validate; pub mod validation; diff --git a/crates/fj-core/src/operations/build/cycle.rs b/crates/fj-core/src/operations/build/cycle.rs index e0500a8d9..ace25c1b3 100644 --- a/crates/fj-core/src/operations/build/cycle.rs +++ b/crates/fj-core/src/operations/build/cycle.rs @@ -2,8 +2,8 @@ use fj_math::{Point, Scalar}; use itertools::Itertools; use crate::{ - objects::{Cycle, HalfEdge}, operations::{build::BuildHalfEdge, update::UpdateCycle}, + topology::{Cycle, HalfEdge}, Core, }; diff --git a/crates/fj-core/src/operations/build/face.rs b/crates/fj-core/src/operations/build/face.rs index 5bd6b3f93..d3b96e730 100644 --- a/crates/fj-core/src/operations/build/face.rs +++ b/crates/fj-core/src/operations/build/face.rs @@ -4,12 +4,12 @@ use fj_interop::ext::ArrayExt; use fj_math::{Point, Scalar}; use crate::{ - objects::{Cycle, Face, HalfEdge, Region, Surface, Vertex}, operations::{ build::{BuildCycle, BuildRegion, BuildSurface}, insert::{Insert, IsInserted, IsInsertedNo}, }, storage::Handle, + topology::{Cycle, Face, HalfEdge, Region, Surface, Vertex}, Core, }; diff --git a/crates/fj-core/src/operations/build/half_edge.rs b/crates/fj-core/src/operations/build/half_edge.rs index 53c3abcd5..4c9722b5a 100644 --- a/crates/fj-core/src/operations/build/half_edge.rs +++ b/crates/fj-core/src/operations/build/half_edge.rs @@ -3,9 +3,9 @@ use fj_math::{Arc, Point, Scalar}; use crate::{ geometry::{HalfEdgeGeometry, SurfacePath}, - objects::{Curve, HalfEdge, Vertex}, operations::{geometry::UpdateHalfEdgeGeometry, insert::Insert}, storage::Handle, + topology::{Curve, HalfEdge, Vertex}, Core, }; diff --git a/crates/fj-core/src/operations/build/region.rs b/crates/fj-core/src/operations/build/region.rs index 4f5b9b719..24ac8cafc 100644 --- a/crates/fj-core/src/operations/build/region.rs +++ b/crates/fj-core/src/operations/build/region.rs @@ -1,8 +1,8 @@ use fj_math::{Point, Scalar}; use crate::{ - objects::{Cycle, Region}, operations::{build::BuildCycle, insert::Insert}, + topology::{Cycle, Region}, Core, }; diff --git a/crates/fj-core/src/operations/build/shell.rs b/crates/fj-core/src/operations/build/shell.rs index d024ebf1b..54c57a4ac 100644 --- a/crates/fj-core/src/operations/build/shell.rs +++ b/crates/fj-core/src/operations/build/shell.rs @@ -5,7 +5,6 @@ use fj_math::Point; use crate::{ geometry::CurveBoundary, - objects::{Curve, Face, HalfEdge, Shell, Surface, Vertex}, operations::{ build::{BuildFace, BuildHalfEdge, BuildSurface, Polygon}, geometry::UpdateHalfEdgeGeometry, @@ -16,6 +15,7 @@ use crate::{ UpdateCycle, UpdateFace, UpdateHalfEdge, UpdateRegion, UpdateShell, }, }, + topology::{Curve, Face, HalfEdge, Shell, Surface, Vertex}, Core, }; diff --git a/crates/fj-core/src/operations/build/sketch.rs b/crates/fj-core/src/operations/build/sketch.rs index ab5a2834c..01d5cf2a5 100644 --- a/crates/fj-core/src/operations/build/sketch.rs +++ b/crates/fj-core/src/operations/build/sketch.rs @@ -1,4 +1,4 @@ -use crate::objects::Sketch; +use crate::topology::Sketch; /// Build a [`Sketch`] /// diff --git a/crates/fj-core/src/operations/build/solid.rs b/crates/fj-core/src/operations/build/solid.rs index 84a02965e..5abf72114 100644 --- a/crates/fj-core/src/operations/build/solid.rs +++ b/crates/fj-core/src/operations/build/solid.rs @@ -1,12 +1,12 @@ use fj_math::Point; use crate::{ - objects::{Shell, Solid}, operations::{ build::{BuildShell, TetrahedronShell}, insert::{Insert, IsInsertedYes}, update::UpdateSolid, }, + topology::{Shell, Solid}, Core, }; diff --git a/crates/fj-core/src/operations/build/surface.rs b/crates/fj-core/src/operations/build/surface.rs index 36a6748cf..9ce8fccf1 100644 --- a/crates/fj-core/src/operations/build/surface.rs +++ b/crates/fj-core/src/operations/build/surface.rs @@ -2,9 +2,9 @@ use fj_math::{Point, Scalar, Vector}; use crate::{ geometry::{GlobalPath, SurfaceGeometry}, - objects::Surface, operations::insert::Insert, storage::Handle, + topology::Surface, Core, }; diff --git a/crates/fj-core/src/operations/derive.rs b/crates/fj-core/src/operations/derive.rs index 3b513c6fa..0fcb7530c 100644 --- a/crates/fj-core/src/operations/derive.rs +++ b/crates/fj-core/src/operations/derive.rs @@ -3,8 +3,8 @@ //! See [`DeriveFrom`]. use crate::{ - objects::{AnyObject, Stored}, storage::Handle, + topology::{AnyObject, Stored}, Core, }; diff --git a/crates/fj-core/src/operations/geometry/half_edge.rs b/crates/fj-core/src/operations/geometry/half_edge.rs index 0bddac7ac..4d0651b51 100644 --- a/crates/fj-core/src/operations/geometry/half_edge.rs +++ b/crates/fj-core/src/operations/geometry/half_edge.rs @@ -1,8 +1,8 @@ use crate::{ geometry::{Geometry, HalfEdgeGeometry}, layers::Layer, - objects::HalfEdge, storage::Handle, + topology::HalfEdge, }; /// Update the geometry of a [`HalfEdge`] diff --git a/crates/fj-core/src/operations/holes.rs b/crates/fj-core/src/operations/holes.rs index 7b19b7347..4c7f8abb8 100644 --- a/crates/fj-core/src/operations/holes.rs +++ b/crates/fj-core/src/operations/holes.rs @@ -3,8 +3,8 @@ use fj_math::{Point, Scalar, Vector}; use crate::{ - objects::{Cycle, Face, HalfEdge, Region, Shell}, storage::Handle, + topology::{Cycle, Face, HalfEdge, Region, Shell}, Core, }; diff --git a/crates/fj-core/src/operations/insert/insert_trait.rs b/crates/fj-core/src/operations/insert/insert_trait.rs index c92c70a25..4dd27fe5e 100644 --- a/crates/fj-core/src/operations/insert/insert_trait.rs +++ b/crates/fj-core/src/operations/insert/insert_trait.rs @@ -1,10 +1,10 @@ use crate::{ - objects::{ + operations::build::{Polygon, TetrahedronShell}, + storage::Handle, + topology::{ Curve, Cycle, Face, HalfEdge, Region, Shell, Sketch, Solid, Surface, Vertex, }, - operations::build::{Polygon, TetrahedronShell}, - storage::Handle, Core, }; @@ -38,9 +38,9 @@ macro_rules! impl_insert { type Inserted = Handle; fn insert(self, core: &mut Core) -> Self::Inserted { - let handle = core.layers.objects.$store.reserve(); + let handle = core.layers.topology.$store.reserve(); let object = (handle.clone(), self).into(); - core.layers.objects.insert( + core.layers.topology.insert( object, &core.layers.geometry, &mut core.layers.validation, diff --git a/crates/fj-core/src/operations/join/cycle.rs b/crates/fj-core/src/operations/join/cycle.rs index 5821a1d68..f745474e2 100644 --- a/crates/fj-core/src/operations/join/cycle.rs +++ b/crates/fj-core/src/operations/join/cycle.rs @@ -4,7 +4,6 @@ use itertools::Itertools; use crate::{ geometry::HalfEdgeGeometry, - objects::{Cycle, HalfEdge}, operations::{ build::BuildHalfEdge, geometry::UpdateHalfEdgeGeometry, @@ -12,6 +11,7 @@ use crate::{ update::{UpdateCycle, UpdateHalfEdge}, }, storage::Handle, + topology::{Cycle, HalfEdge}, Core, }; diff --git a/crates/fj-core/src/operations/merge.rs b/crates/fj-core/src/operations/merge.rs index 560deb63c..9a8a0fede 100644 --- a/crates/fj-core/src/operations/merge.rs +++ b/crates/fj-core/src/operations/merge.rs @@ -3,7 +3,7 @@ //! See [`Merge`], which is currently the only trait in this module, for more //! information. -use crate::{objects::Solid, Core}; +use crate::{topology::Solid, Core}; use super::update::UpdateSolid; diff --git a/crates/fj-core/src/operations/presentation.rs b/crates/fj-core/src/operations/presentation.rs index 64c5bc156..826837467 100644 --- a/crates/fj-core/src/operations/presentation.rs +++ b/crates/fj-core/src/operations/presentation.rs @@ -2,7 +2,7 @@ use fj_interop::Color; -use crate::{objects::Region, storage::Handle, Core}; +use crate::{storage::Handle, topology::Region, Core}; /// Get the color of an object pub trait GetColor { diff --git a/crates/fj-core/src/operations/replace/curve.rs b/crates/fj-core/src/operations/replace/curve.rs index 5ad536411..570edd170 100644 --- a/crates/fj-core/src/operations/replace/curve.rs +++ b/crates/fj-core/src/operations/replace/curve.rs @@ -1,11 +1,11 @@ use std::ops::Deref; use crate::{ - objects::{ - Curve, Cycle, Face, HalfEdge, IsObject, Region, Shell, Sketch, Solid, - }, operations::{derive::DeriveFrom, insert::Insert, update::UpdateHalfEdge}, storage::Handle, + topology::{ + Curve, Cycle, Face, HalfEdge, IsObject, Region, Shell, Sketch, Solid, + }, Core, }; diff --git a/crates/fj-core/src/operations/replace/half_edge.rs b/crates/fj-core/src/operations/replace/half_edge.rs index e7c040ac5..8c6b3687e 100644 --- a/crates/fj-core/src/operations/replace/half_edge.rs +++ b/crates/fj-core/src/operations/replace/half_edge.rs @@ -1,9 +1,9 @@ use std::ops::Deref; use crate::{ - objects::{Cycle, Face, HalfEdge, IsObject, Region, Shell, Sketch, Solid}, operations::{derive::DeriveFrom, insert::Insert}, storage::Handle, + topology::{Cycle, Face, HalfEdge, IsObject, Region, Shell, Sketch, Solid}, Core, }; diff --git a/crates/fj-core/src/operations/replace/vertex.rs b/crates/fj-core/src/operations/replace/vertex.rs index ab30bffcf..11715b479 100644 --- a/crates/fj-core/src/operations/replace/vertex.rs +++ b/crates/fj-core/src/operations/replace/vertex.rs @@ -1,11 +1,11 @@ use std::ops::Deref; use crate::{ - objects::{ - Cycle, Face, HalfEdge, IsObject, Region, Shell, Sketch, Solid, Vertex, - }, operations::{derive::DeriveFrom, insert::Insert, update::UpdateHalfEdge}, storage::Handle, + topology::{ + Cycle, Face, HalfEdge, IsObject, Region, Shell, Sketch, Solid, Vertex, + }, Core, }; diff --git a/crates/fj-core/src/operations/reverse/cycle.rs b/crates/fj-core/src/operations/reverse/cycle.rs index f3d3f341d..420dc0528 100644 --- a/crates/fj-core/src/operations/reverse/cycle.rs +++ b/crates/fj-core/src/operations/reverse/cycle.rs @@ -1,8 +1,8 @@ use crate::{ - objects::{Cycle, HalfEdge}, operations::{ derive::DeriveFrom, geometry::UpdateHalfEdgeGeometry, insert::Insert, }, + topology::{Cycle, HalfEdge}, Core, }; diff --git a/crates/fj-core/src/operations/reverse/edge.rs b/crates/fj-core/src/operations/reverse/edge.rs index e42ae6a98..5b4226cd5 100644 --- a/crates/fj-core/src/operations/reverse/edge.rs +++ b/crates/fj-core/src/operations/reverse/edge.rs @@ -1,7 +1,7 @@ use crate::{ - objects::HalfEdge, operations::{derive::DeriveFrom, insert::Insert}, storage::Handle, + topology::HalfEdge, Core, }; diff --git a/crates/fj-core/src/operations/reverse/face.rs b/crates/fj-core/src/operations/reverse/face.rs index 00508d086..9e4feefd0 100644 --- a/crates/fj-core/src/operations/reverse/face.rs +++ b/crates/fj-core/src/operations/reverse/face.rs @@ -1,12 +1,12 @@ use std::borrow::Borrow; use crate::{ - objects::Face, operations::{ build::Polygon, derive::DeriveFrom, insert::{Insert, IsInsertedNo, IsInsertedYes}, }, + topology::Face, Core, }; diff --git a/crates/fj-core/src/operations/reverse/region.rs b/crates/fj-core/src/operations/reverse/region.rs index f3f91320a..22472fdb4 100644 --- a/crates/fj-core/src/operations/reverse/region.rs +++ b/crates/fj-core/src/operations/reverse/region.rs @@ -1,6 +1,6 @@ use crate::{ - objects::Region, operations::{derive::DeriveFrom, insert::Insert}, + topology::Region, Core, }; diff --git a/crates/fj-core/src/operations/split/edge.rs b/crates/fj-core/src/operations/split/edge.rs index b85893a4f..9aa42f995 100644 --- a/crates/fj-core/src/operations/split/edge.rs +++ b/crates/fj-core/src/operations/split/edge.rs @@ -1,13 +1,13 @@ use fj_math::Point; use crate::{ - objects::{HalfEdge, Shell}, operations::{ geometry::UpdateHalfEdgeGeometry, insert::Insert, replace::ReplaceHalfEdge, split::SplitHalfEdge, update::UpdateHalfEdge, }, queries::SiblingOfHalfEdge, storage::Handle, + topology::{HalfEdge, Shell}, Core, }; diff --git a/crates/fj-core/src/operations/split/face.rs b/crates/fj-core/src/operations/split/face.rs index b76cf2916..d46fe570e 100644 --- a/crates/fj-core/src/operations/split/face.rs +++ b/crates/fj-core/src/operations/split/face.rs @@ -3,7 +3,6 @@ use fj_math::Point; use itertools::Itertools; use crate::{ - objects::{Cycle, Face, HalfEdge, Shell}, operations::{ build::{BuildCycle, BuildHalfEdge}, derive::DeriveFrom, @@ -15,6 +14,7 @@ use crate::{ }, }, storage::Handle, + topology::{Cycle, Face, HalfEdge, Shell}, Core, }; @@ -204,12 +204,12 @@ mod tests { use fj_interop::Color; use crate::{ - objects::Shell, operations::{ build::BuildShell, presentation::{GetColor, SetColor}, split::SplitFace, }, + topology::Shell, Core, }; diff --git a/crates/fj-core/src/operations/split/half_edge.rs b/crates/fj-core/src/operations/split/half_edge.rs index 92621b7fa..d1dd5caaf 100644 --- a/crates/fj-core/src/operations/split/half_edge.rs +++ b/crates/fj-core/src/operations/split/half_edge.rs @@ -1,11 +1,11 @@ use fj_math::Point; use crate::{ - objects::{HalfEdge, Vertex}, operations::{ derive::DeriveFrom, geometry::UpdateHalfEdgeGeometry, insert::Insert, }, storage::Handle, + topology::{HalfEdge, Vertex}, Core, }; diff --git a/crates/fj-core/src/operations/sweep/cycle.rs b/crates/fj-core/src/operations/sweep/cycle.rs index 313c71efc..7a9c4b91b 100644 --- a/crates/fj-core/src/operations/sweep/cycle.rs +++ b/crates/fj-core/src/operations/sweep/cycle.rs @@ -3,10 +3,10 @@ use fj_math::Vector; use crate::{ geometry::SurfaceGeometry, - objects::{Cycle, Face}, operations::{ build::BuildCycle, join::JoinCycle, sweep::half_edge::SweepHalfEdge, }, + topology::{Cycle, Face}, Core, }; diff --git a/crates/fj-core/src/operations/sweep/face.rs b/crates/fj-core/src/operations/sweep/face.rs index 12ef13b65..d02376383 100644 --- a/crates/fj-core/src/operations/sweep/face.rs +++ b/crates/fj-core/src/operations/sweep/face.rs @@ -1,9 +1,9 @@ use fj_math::Vector; use crate::{ - objects::{Face, Shell}, operations::{insert::Insert, presentation::GetColor}, storage::Handle, + topology::{Face, Shell}, Core, }; diff --git a/crates/fj-core/src/operations/sweep/half_edge.rs b/crates/fj-core/src/operations/sweep/half_edge.rs index 4fbb1f711..1aa8a30af 100644 --- a/crates/fj-core/src/operations/sweep/half_edge.rs +++ b/crates/fj-core/src/operations/sweep/half_edge.rs @@ -3,7 +3,6 @@ use fj_math::{Point, Scalar, Vector}; use crate::{ geometry::SurfaceGeometry, - objects::{Cycle, Face, HalfEdge, Region, Vertex}, operations::{ build::{BuildCycle, BuildHalfEdge}, geometry::UpdateHalfEdgeGeometry, @@ -12,6 +11,7 @@ use crate::{ update::{UpdateCycle, UpdateHalfEdge}, }, storage::Handle, + topology::{Cycle, Face, HalfEdge, Region, Vertex}, Core, }; diff --git a/crates/fj-core/src/operations/sweep/mod.rs b/crates/fj-core/src/operations/sweep/mod.rs index 5d3a4552c..f93efbe93 100644 --- a/crates/fj-core/src/operations/sweep/mod.rs +++ b/crates/fj-core/src/operations/sweep/mod.rs @@ -26,8 +26,8 @@ pub use self::{ use std::collections::BTreeMap; use crate::{ - objects::{Curve, Vertex}, storage::{Handle, ObjectId}, + topology::{Curve, Vertex}, }; /// A cache used for sweeping diff --git a/crates/fj-core/src/operations/sweep/path.rs b/crates/fj-core/src/operations/sweep/path.rs index a085be6d8..36eea5bb9 100644 --- a/crates/fj-core/src/operations/sweep/path.rs +++ b/crates/fj-core/src/operations/sweep/path.rs @@ -2,9 +2,9 @@ use fj_math::{Circle, Line, Vector}; use crate::{ geometry::{GlobalPath, SurfaceGeometry, SurfacePath}, - objects::Surface, operations::build::BuildSurface, storage::Handle, + topology::Surface, Core, }; diff --git a/crates/fj-core/src/operations/sweep/region.rs b/crates/fj-core/src/operations/sweep/region.rs index 50f25867a..4112b7e1c 100644 --- a/crates/fj-core/src/operations/sweep/region.rs +++ b/crates/fj-core/src/operations/sweep/region.rs @@ -3,11 +3,11 @@ use fj_math::Vector; use crate::{ geometry::SurfaceGeometry, - objects::{Cycle, Face, Region, Surface}, operations::{ insert::Insert, reverse::Reverse, transform::TransformObject, }, storage::Handle, + topology::{Cycle, Face, Region, Surface}, Core, }; diff --git a/crates/fj-core/src/operations/sweep/shell_face.rs b/crates/fj-core/src/operations/sweep/shell_face.rs index 3a03c0cf4..35c3a61dc 100644 --- a/crates/fj-core/src/operations/sweep/shell_face.rs +++ b/crates/fj-core/src/operations/sweep/shell_face.rs @@ -1,7 +1,6 @@ use fj_math::Vector; use crate::{ - objects::{Face, Region, Shell}, operations::{ derive::DeriveFrom, insert::Insert, @@ -11,6 +10,7 @@ use crate::{ update::UpdateShell, }, storage::Handle, + topology::{Face, Region, Shell}, Core, }; diff --git a/crates/fj-core/src/operations/sweep/sketch.rs b/crates/fj-core/src/operations/sweep/sketch.rs index d2f6d33a9..164a71a4c 100644 --- a/crates/fj-core/src/operations/sweep/sketch.rs +++ b/crates/fj-core/src/operations/sweep/sketch.rs @@ -2,9 +2,9 @@ use fj_math::{Scalar, Vector}; use crate::{ geometry::GlobalPath, - objects::{Face, Sketch, Solid, Surface}, operations::{derive::DeriveFrom, insert::Insert, reverse::Reverse}, storage::Handle, + topology::{Face, Sketch, Solid, Surface}, Core, }; diff --git a/crates/fj-core/src/operations/sweep/vertex.rs b/crates/fj-core/src/operations/sweep/vertex.rs index 411d760c8..e5d62419a 100644 --- a/crates/fj-core/src/operations/sweep/vertex.rs +++ b/crates/fj-core/src/operations/sweep/vertex.rs @@ -1,7 +1,7 @@ use crate::{ - objects::{Curve, Vertex}, operations::insert::Insert, storage::Handle, + topology::{Curve, Vertex}, Core, }; diff --git a/crates/fj-core/src/operations/transform/curve.rs b/crates/fj-core/src/operations/transform/curve.rs index 433ac9b6f..4457a35b4 100644 --- a/crates/fj-core/src/operations/transform/curve.rs +++ b/crates/fj-core/src/operations/transform/curve.rs @@ -1,6 +1,6 @@ use fj_math::Transform; -use crate::{objects::Curve, Core}; +use crate::{topology::Curve, Core}; use super::{TransformCache, TransformObject}; diff --git a/crates/fj-core/src/operations/transform/cycle.rs b/crates/fj-core/src/operations/transform/cycle.rs index 4d2e44ec6..118f779a4 100644 --- a/crates/fj-core/src/operations/transform/cycle.rs +++ b/crates/fj-core/src/operations/transform/cycle.rs @@ -1,6 +1,6 @@ use fj_math::Transform; -use crate::{objects::Cycle, Core}; +use crate::{topology::Cycle, Core}; use super::{TransformCache, TransformObject}; diff --git a/crates/fj-core/src/operations/transform/edge.rs b/crates/fj-core/src/operations/transform/edge.rs index 6baf3fcc9..cdbbe8a28 100644 --- a/crates/fj-core/src/operations/transform/edge.rs +++ b/crates/fj-core/src/operations/transform/edge.rs @@ -1,7 +1,7 @@ use fj_math::Transform; use crate::{ - objects::HalfEdge, operations::insert::Insert, storage::Handle, Core, + operations::insert::Insert, storage::Handle, topology::HalfEdge, Core, }; use super::{TransformCache, TransformObject}; diff --git a/crates/fj-core/src/operations/transform/face.rs b/crates/fj-core/src/operations/transform/face.rs index 5ab2bd836..ae8911dcb 100644 --- a/crates/fj-core/src/operations/transform/face.rs +++ b/crates/fj-core/src/operations/transform/face.rs @@ -1,6 +1,6 @@ use fj_math::Transform; -use crate::{objects::Face, Core}; +use crate::{topology::Face, Core}; use super::{TransformCache, TransformObject}; diff --git a/crates/fj-core/src/operations/transform/mod.rs b/crates/fj-core/src/operations/transform/mod.rs index 8f93d8aee..9916b7442 100644 --- a/crates/fj-core/src/operations/transform/mod.rs +++ b/crates/fj-core/src/operations/transform/mod.rs @@ -16,9 +16,9 @@ use fj_math::{Transform, Vector}; use type_map::TypeMap; use crate::{ - objects::{AnyObject, Stored}, operations::insert::Insert, storage::{Handle, ObjectId}, + topology::{AnyObject, Stored}, Core, }; diff --git a/crates/fj-core/src/operations/transform/region.rs b/crates/fj-core/src/operations/transform/region.rs index 76fd6490f..5896da254 100644 --- a/crates/fj-core/src/operations/transform/region.rs +++ b/crates/fj-core/src/operations/transform/region.rs @@ -1,4 +1,4 @@ -use crate::{objects::Region, Core}; +use crate::{topology::Region, Core}; use super::TransformObject; diff --git a/crates/fj-core/src/operations/transform/shell.rs b/crates/fj-core/src/operations/transform/shell.rs index 7b8feaf2e..09c1fe6ba 100644 --- a/crates/fj-core/src/operations/transform/shell.rs +++ b/crates/fj-core/src/operations/transform/shell.rs @@ -1,6 +1,6 @@ use fj_math::Transform; -use crate::{objects::Shell, Core}; +use crate::{topology::Shell, Core}; use super::{TransformCache, TransformObject}; diff --git a/crates/fj-core/src/operations/transform/solid.rs b/crates/fj-core/src/operations/transform/solid.rs index 22253d571..6b8a1cdca 100644 --- a/crates/fj-core/src/operations/transform/solid.rs +++ b/crates/fj-core/src/operations/transform/solid.rs @@ -1,6 +1,6 @@ use fj_math::Transform; -use crate::{objects::Solid, Core}; +use crate::{topology::Solid, Core}; use super::{TransformCache, TransformObject}; diff --git a/crates/fj-core/src/operations/transform/surface.rs b/crates/fj-core/src/operations/transform/surface.rs index 220533044..0a61532e5 100644 --- a/crates/fj-core/src/operations/transform/surface.rs +++ b/crates/fj-core/src/operations/transform/surface.rs @@ -1,7 +1,7 @@ use fj_math::Transform; use crate::{ - objects::Surface, operations::insert::Insert, storage::Handle, Core, + operations::insert::Insert, storage::Handle, topology::Surface, Core, }; use super::{TransformCache, TransformObject}; diff --git a/crates/fj-core/src/operations/transform/vertex.rs b/crates/fj-core/src/operations/transform/vertex.rs index a08ef57dc..9e0f761bb 100644 --- a/crates/fj-core/src/operations/transform/vertex.rs +++ b/crates/fj-core/src/operations/transform/vertex.rs @@ -1,6 +1,6 @@ use fj_math::Transform; -use crate::{objects::Vertex, Core}; +use crate::{topology::Vertex, Core}; use super::{TransformCache, TransformObject}; diff --git a/crates/fj-core/src/operations/update/cycle.rs b/crates/fj-core/src/operations/update/cycle.rs index 9d1d6353b..e47a97917 100644 --- a/crates/fj-core/src/operations/update/cycle.rs +++ b/crates/fj-core/src/operations/update/cycle.rs @@ -1,7 +1,7 @@ use crate::{ - objects::{Cycle, HalfEdge}, operations::{derive::DeriveFrom, insert::Insert}, storage::Handle, + topology::{Cycle, HalfEdge}, Core, }; diff --git a/crates/fj-core/src/operations/update/face.rs b/crates/fj-core/src/operations/update/face.rs index 6c8303ff1..565f24c12 100644 --- a/crates/fj-core/src/operations/update/face.rs +++ b/crates/fj-core/src/operations/update/face.rs @@ -1,7 +1,7 @@ use crate::{ - objects::{Face, Region}, operations::{build::Polygon, derive::DeriveFrom, insert::Insert}, storage::Handle, + topology::{Face, Region}, Core, }; diff --git a/crates/fj-core/src/operations/update/half_edge.rs b/crates/fj-core/src/operations/update/half_edge.rs index b1f782d1d..0d39c419d 100644 --- a/crates/fj-core/src/operations/update/half_edge.rs +++ b/crates/fj-core/src/operations/update/half_edge.rs @@ -1,7 +1,7 @@ use crate::{ - objects::{Curve, HalfEdge, Vertex}, operations::{derive::DeriveFrom, insert::Insert}, storage::Handle, + topology::{Curve, HalfEdge, Vertex}, Core, }; diff --git a/crates/fj-core/src/operations/update/region.rs b/crates/fj-core/src/operations/update/region.rs index 9f28c7e83..074941980 100644 --- a/crates/fj-core/src/operations/update/region.rs +++ b/crates/fj-core/src/operations/update/region.rs @@ -1,7 +1,7 @@ use crate::{ - objects::{Cycle, Region}, operations::{derive::DeriveFrom, insert::Insert}, storage::Handle, + topology::{Cycle, Region}, Core, }; diff --git a/crates/fj-core/src/operations/update/shell.rs b/crates/fj-core/src/operations/update/shell.rs index 961e3b730..65575ab51 100644 --- a/crates/fj-core/src/operations/update/shell.rs +++ b/crates/fj-core/src/operations/update/shell.rs @@ -1,7 +1,7 @@ use crate::{ - objects::{Face, Shell}, operations::{derive::DeriveFrom, insert::Insert}, storage::Handle, + topology::{Face, Shell}, Core, }; diff --git a/crates/fj-core/src/operations/update/sketch.rs b/crates/fj-core/src/operations/update/sketch.rs index 33a96e832..4f1bc6a07 100644 --- a/crates/fj-core/src/operations/update/sketch.rs +++ b/crates/fj-core/src/operations/update/sketch.rs @@ -1,7 +1,7 @@ use crate::{ - objects::{Region, Sketch}, operations::{derive::DeriveFrom, insert::Insert}, storage::Handle, + topology::{Region, Sketch}, Core, }; diff --git a/crates/fj-core/src/operations/update/solid.rs b/crates/fj-core/src/operations/update/solid.rs index 3d30ff513..66e0ee33d 100644 --- a/crates/fj-core/src/operations/update/solid.rs +++ b/crates/fj-core/src/operations/update/solid.rs @@ -1,7 +1,7 @@ use crate::{ - objects::{Shell, Solid}, operations::{derive::DeriveFrom, insert::Insert}, storage::Handle, + topology::{Shell, Solid}, Core, }; diff --git a/crates/fj-core/src/presentation.rs b/crates/fj-core/src/presentation.rs index 7def409cb..c17eb1fdd 100644 --- a/crates/fj-core/src/presentation.rs +++ b/crates/fj-core/src/presentation.rs @@ -6,7 +6,7 @@ use std::collections::BTreeMap; use fj_interop::Color; -use crate::{objects::Region, storage::Handle}; +use crate::{storage::Handle, topology::Region}; /// Presentation data for the object graph /// diff --git a/crates/fj-core/src/queries/all_half_edges_with_surface.rs b/crates/fj-core/src/queries/all_half_edges_with_surface.rs index 300e1b830..55fa85d9f 100644 --- a/crates/fj-core/src/queries/all_half_edges_with_surface.rs +++ b/crates/fj-core/src/queries/all_half_edges_with_surface.rs @@ -1,6 +1,6 @@ use crate::{ - objects::{Face, HalfEdge, Shell, Surface}, storage::Handle, + topology::{Face, HalfEdge, Shell, Surface}, }; /// Access all half-edges referenced by an object, and the surface they're on diff --git a/crates/fj-core/src/queries/bounding_vertices_of_half_edge.rs b/crates/fj-core/src/queries/bounding_vertices_of_half_edge.rs index 92f1d243b..7f462bc87 100644 --- a/crates/fj-core/src/queries/bounding_vertices_of_half_edge.rs +++ b/crates/fj-core/src/queries/bounding_vertices_of_half_edge.rs @@ -1,7 +1,7 @@ use crate::{ geometry::CurveBoundary, - objects::{Cycle, Face, HalfEdge, Region, Shell, Vertex}, storage::Handle, + topology::{Cycle, Face, HalfEdge, Region, Shell, Vertex}, }; /// Determine the bounding vertices of a half-edge diff --git a/crates/fj-core/src/queries/sibling_of_half_edge.rs b/crates/fj-core/src/queries/sibling_of_half_edge.rs index 07583f548..f4c82d720 100644 --- a/crates/fj-core/src/queries/sibling_of_half_edge.rs +++ b/crates/fj-core/src/queries/sibling_of_half_edge.rs @@ -1,7 +1,7 @@ use crate::{ geometry::Geometry, - objects::{HalfEdge, Shell}, storage::Handle, + topology::{HalfEdge, Shell}, }; use super::BoundingVerticesOfHalfEdge; diff --git a/crates/fj-core/src/objects/any_object.rs b/crates/fj-core/src/topology/any_object.rs similarity index 94% rename from crates/fj-core/src/objects/any_object.rs rename to crates/fj-core/src/topology/any_object.rs index 71f60c1f1..e6840c001 100644 --- a/crates/fj-core/src/objects/any_object.rs +++ b/crates/fj-core/src/topology/any_object.rs @@ -1,10 +1,10 @@ use crate::{ geometry::Geometry, - objects::{ - Curve, Cycle, Face, HalfEdge, Objects, Region, Shell, Sketch, Solid, - Surface, Vertex, - }, storage::{Handle, ObjectId}, + topology::{ + Curve, Cycle, Face, HalfEdge, Region, Shell, Sketch, Solid, Surface, + Topology, Vertex, + }, validate::Validate, validation::{ValidationConfig, ValidationError}, }; @@ -55,11 +55,11 @@ macro_rules! any_object { impl AnyObject { /// Insert the object into its respective store - pub fn insert(self, objects: &mut Objects) -> AnyObject { + pub fn insert(self, topology: &mut Topology) -> AnyObject { match self { $( Self::$ty((handle, object)) => { - objects.$store.insert( + topology.$store.insert( handle.clone().into(), object ); handle.into() diff --git a/crates/fj-core/src/objects/is_object.rs b/crates/fj-core/src/topology/is_object.rs similarity index 100% rename from crates/fj-core/src/objects/is_object.rs rename to crates/fj-core/src/topology/is_object.rs diff --git a/crates/fj-core/src/objects/mod.rs b/crates/fj-core/src/topology/mod.rs similarity index 84% rename from crates/fj-core/src/objects/mod.rs rename to crates/fj-core/src/topology/mod.rs index 1b6bed7a9..1daea5194 100644 --- a/crates/fj-core/src/objects/mod.rs +++ b/crates/fj-core/src/topology/mod.rs @@ -7,21 +7,22 @@ //! whole shapes (2D and 3D, respectively), while all other objects are //! referenced (directly or indirectly) by these top-level objects. //! -//! All objects are stored in centralized storage (see [`Objects`]) and referred -//! to through a [`Handle`]. +//! All objects are stored in centralized storage (see [`Topology`]) and +//! referred to through a [`Handle`]. //! //! [`Handle`]: crate::storage::Handle mod any_object; mod is_object; -mod kinds; mod object_set; +mod objects; mod stores; pub use self::{ any_object::{AboutToBeStored, AnyObject, Bare, Form, Stored}, is_object::IsObject, - kinds::{ + object_set::{ObjectSet, ObjectSetIntoIter, ObjectSetIter}, + objects::{ curve::Curve, cycle::Cycle, face::{Face, Handedness}, @@ -33,6 +34,5 @@ pub use self::{ surface::Surface, vertex::Vertex, }, - object_set::{ObjectSet, ObjectSetIntoIter, ObjectSetIter}, - stores::{Objects, Surfaces}, + stores::{Surfaces, Topology}, }; diff --git a/crates/fj-core/src/objects/object_set.rs b/crates/fj-core/src/topology/object_set.rs similarity index 99% rename from crates/fj-core/src/objects/object_set.rs rename to crates/fj-core/src/topology/object_set.rs index 3d2ade1f5..c8fde80b2 100644 --- a/crates/fj-core/src/objects/object_set.rs +++ b/crates/fj-core/src/topology/object_set.rs @@ -267,7 +267,7 @@ pub type ObjectSetIntoIter = vec::IntoIter>; mod tests { use std::collections::HashSet; - use crate::{objects::Cycle, operations::insert::Insert, Core}; + use crate::{operations::insert::Insert, topology::Cycle, Core}; use super::ObjectSet; diff --git a/crates/fj-core/src/objects/kinds/curve.rs b/crates/fj-core/src/topology/objects/curve.rs similarity index 96% rename from crates/fj-core/src/objects/kinds/curve.rs rename to crates/fj-core/src/topology/objects/curve.rs index 6cf3f700c..f41a961e0 100644 --- a/crates/fj-core/src/objects/kinds/curve.rs +++ b/crates/fj-core/src/topology/objects/curve.rs @@ -20,7 +20,7 @@ /// `Eq`/`Ord`/..., you can use `HandleWrapper` to do that. It will use /// `Handle::id` to provide those `Eq`/`Ord`/... implementations. /// -/// [`HalfEdge`]: crate::objects::HalfEdge +/// [`HalfEdge`]: crate::topology::HalfEdge #[derive(Clone, Debug, Default)] pub struct Curve {} diff --git a/crates/fj-core/src/objects/kinds/cycle.rs b/crates/fj-core/src/topology/objects/cycle.rs similarity index 98% rename from crates/fj-core/src/objects/kinds/cycle.rs rename to crates/fj-core/src/topology/objects/cycle.rs index 40e84b53a..ea55d8f8f 100644 --- a/crates/fj-core/src/objects/kinds/cycle.rs +++ b/crates/fj-core/src/topology/objects/cycle.rs @@ -2,8 +2,8 @@ use fj_math::{Scalar, Winding}; use crate::{ geometry::{Geometry, SurfacePath}, - objects::{HalfEdge, ObjectSet}, storage::Handle, + topology::{HalfEdge, ObjectSet}, }; /// A cycle of connected edges diff --git a/crates/fj-core/src/objects/kinds/face.rs b/crates/fj-core/src/topology/objects/face.rs similarity index 96% rename from crates/fj-core/src/objects/kinds/face.rs rename to crates/fj-core/src/topology/objects/face.rs index 7b548e290..919d635bf 100644 --- a/crates/fj-core/src/objects/kinds/face.rs +++ b/crates/fj-core/src/topology/objects/face.rs @@ -2,8 +2,8 @@ use fj_math::Winding; use crate::{ geometry::Geometry, - objects::{Region, Surface}, storage::Handle, + topology::{Region, Surface}, }; /// 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 /// face on their left side (on the face's front side). /// -/// [`HalfEdge`]: crate::objects::HalfEdge -/// [`Shell`]: crate::objects::Shell +/// [`HalfEdge`]: crate::topology::HalfEdge +/// [`Shell`]: crate::topology::Shell #[derive(Clone, Debug)] pub struct Face { surface: Handle, diff --git a/crates/fj-core/src/objects/kinds/half_edge.rs b/crates/fj-core/src/topology/objects/half_edge.rs similarity index 93% rename from crates/fj-core/src/objects/kinds/half_edge.rs rename to crates/fj-core/src/topology/objects/half_edge.rs index 6608d40d3..de60c36dc 100644 --- a/crates/fj-core/src/objects/kinds/half_edge.rs +++ b/crates/fj-core/src/topology/objects/half_edge.rs @@ -1,6 +1,6 @@ use crate::{ - objects::{Curve, Vertex}, storage::Handle, + topology::{Curve, Vertex}, }; /// # A directed half-edge, defined in a surface's 2D space @@ -28,8 +28,8 @@ use crate::{ /// their start vertices are different. /// /// -/// [`Cycle`]: crate::objects::Cycle -/// [`Shell`]: crate::objects::Shell +/// [`Cycle`]: crate::topology::Cycle +/// [`Shell`]: crate::topology::Shell #[derive(Clone, Debug)] pub struct HalfEdge { curve: Handle, diff --git a/crates/fj-core/src/objects/kinds/mod.rs b/crates/fj-core/src/topology/objects/mod.rs similarity index 100% rename from crates/fj-core/src/objects/kinds/mod.rs rename to crates/fj-core/src/topology/objects/mod.rs diff --git a/crates/fj-core/src/objects/kinds/region.rs b/crates/fj-core/src/topology/objects/region.rs similarity index 95% rename from crates/fj-core/src/objects/kinds/region.rs rename to crates/fj-core/src/topology/objects/region.rs index a1f7080f6..e9f1fd7c2 100644 --- a/crates/fj-core/src/objects/kinds/region.rs +++ b/crates/fj-core/src/topology/objects/region.rs @@ -1,8 +1,8 @@ //! A single, continues 2d region use crate::{ - objects::{Cycle, ObjectSet}, storage::Handle, + topology::{Cycle, ObjectSet}, }; /// 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 /// region on their left side (on the region's front side). /// -/// [`HalfEdge`]: crate::objects::HalfEdge +/// [`HalfEdge`]: crate::topology::HalfEdge #[derive(Clone, Debug)] pub struct Region { exterior: Handle, diff --git a/crates/fj-core/src/objects/kinds/shell.rs b/crates/fj-core/src/topology/objects/shell.rs similarity index 93% rename from crates/fj-core/src/objects/kinds/shell.rs rename to crates/fj-core/src/topology/objects/shell.rs index d35107c2f..469a93168 100644 --- a/crates/fj-core/src/objects/kinds/shell.rs +++ b/crates/fj-core/src/topology/objects/shell.rs @@ -1,6 +1,6 @@ use crate::{ - objects::{Face, ObjectSet}, storage::Handle, + topology::{Face, ObjectSet}, }; /// A 3-dimensional closed shell diff --git a/crates/fj-core/src/objects/kinds/sketch.rs b/crates/fj-core/src/topology/objects/sketch.rs similarity index 93% rename from crates/fj-core/src/objects/kinds/sketch.rs rename to crates/fj-core/src/topology/objects/sketch.rs index e818652fe..ba79d5de0 100644 --- a/crates/fj-core/src/objects/kinds/sketch.rs +++ b/crates/fj-core/src/topology/objects/sketch.rs @@ -1,6 +1,6 @@ use crate::{ - objects::{ObjectSet, Region}, storage::Handle, + topology::{ObjectSet, Region}, }; /// A 2-dimensional shape diff --git a/crates/fj-core/src/objects/kinds/solid.rs b/crates/fj-core/src/topology/objects/solid.rs similarity index 95% rename from crates/fj-core/src/objects/kinds/solid.rs rename to crates/fj-core/src/topology/objects/solid.rs index bc82cc87e..0f43ae4a7 100644 --- a/crates/fj-core/src/objects/kinds/solid.rs +++ b/crates/fj-core/src/topology/objects/solid.rs @@ -1,6 +1,6 @@ use crate::{ - objects::{ObjectSet, Shell}, storage::Handle, + topology::{ObjectSet, Shell}, }; /// A 3-dimensional shape, built from [`Shell`]s. Many Solids will contains only diff --git a/crates/fj-core/src/objects/kinds/surface.rs b/crates/fj-core/src/topology/objects/surface.rs similarity index 100% rename from crates/fj-core/src/objects/kinds/surface.rs rename to crates/fj-core/src/topology/objects/surface.rs diff --git a/crates/fj-core/src/objects/kinds/vertex.rs b/crates/fj-core/src/topology/objects/vertex.rs similarity index 96% rename from crates/fj-core/src/objects/kinds/vertex.rs rename to crates/fj-core/src/topology/objects/vertex.rs index d8933da40..8b3cc4b02 100644 --- a/crates/fj-core/src/objects/kinds/vertex.rs +++ b/crates/fj-core/src/topology/objects/vertex.rs @@ -78,11 +78,11 @@ /// `Eq`/`Ord`/..., you can use `HandleWrapper` to do that. It will /// use `Handle::id` to provide those `Eq`/`Ord`/... implementations. /// -/// [`HalfEdge`]: crate::objects::HalfEdge +/// [`HalfEdge`]: crate::topology::HalfEdge /// [`Handle`]: crate::storage::Handle -/// [`Sketch`]: crate::objects::Sketch -/// [`Solid`]: crate::objects::Solid -/// [`Surface`]: crate::objects::Surface +/// [`Sketch`]: crate::topology::Sketch +/// [`Solid`]: crate::topology::Solid +/// [`Surface`]: crate::topology::Surface #[derive(Clone, Debug, Default)] pub struct Vertex {} diff --git a/crates/fj-core/src/objects/stores.rs b/crates/fj-core/src/topology/stores.rs similarity index 96% rename from crates/fj-core/src/objects/stores.rs rename to crates/fj-core/src/topology/stores.rs index 2e8f5e9f2..13475548f 100644 --- a/crates/fj-core/src/objects/stores.rs +++ b/crates/fj-core/src/topology/stores.rs @@ -4,9 +4,9 @@ use super::{ Curve, Cycle, Face, HalfEdge, Region, Shell, Sketch, Solid, Surface, Vertex, }; -/// The available object stores +/// The stores for all topological objects #[derive(Debug, Default)] -pub struct Objects { +pub struct Topology { /// Store for [`Curve`]s pub curves: Store, @@ -38,7 +38,7 @@ pub struct Objects { pub vertices: Store, } -impl Objects { +impl Topology { /// Construct a new instance of `Stores` pub fn new() -> Self { Self::default() diff --git a/crates/fj-core/src/validate/curve.rs b/crates/fj-core/src/validate/curve.rs index 6574cce35..e0b70ea8c 100644 --- a/crates/fj-core/src/validate/curve.rs +++ b/crates/fj-core/src/validate/curve.rs @@ -1,6 +1,6 @@ use crate::{ geometry::Geometry, - objects::Curve, + topology::Curve, validation::{ValidationConfig, ValidationError}, }; diff --git a/crates/fj-core/src/validate/cycle.rs b/crates/fj-core/src/validate/cycle.rs index 574aaf448..bc9ed4ddf 100644 --- a/crates/fj-core/src/validate/cycle.rs +++ b/crates/fj-core/src/validate/cycle.rs @@ -1,6 +1,6 @@ use crate::{ geometry::Geometry, - objects::Cycle, + topology::Cycle, validation::{ checks::AdjacentHalfEdgesNotConnected, ValidationCheck, ValidationConfig, ValidationError, diff --git a/crates/fj-core/src/validate/edge.rs b/crates/fj-core/src/validate/edge.rs index d95b478ad..1c66a2435 100644 --- a/crates/fj-core/src/validate/edge.rs +++ b/crates/fj-core/src/validate/edge.rs @@ -1,6 +1,6 @@ use crate::{ geometry::Geometry, - objects::HalfEdge, + topology::HalfEdge, validation::{ValidationConfig, ValidationError}, }; diff --git a/crates/fj-core/src/validate/face.rs b/crates/fj-core/src/validate/face.rs index 86c91de4f..4ffd9d9c0 100644 --- a/crates/fj-core/src/validate/face.rs +++ b/crates/fj-core/src/validate/face.rs @@ -1,6 +1,6 @@ use crate::{ geometry::Geometry, - objects::Face, + topology::Face, validation::{ checks::{FaceHasNoBoundary, InteriorCycleHasInvalidWinding}, ValidationCheck, ValidationConfig, ValidationError, diff --git a/crates/fj-core/src/validate/references.rs b/crates/fj-core/src/validate/references.rs index 965411d65..da4d53247 100644 --- a/crates/fj-core/src/validate/references.rs +++ b/crates/fj-core/src/validate/references.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; -use crate::objects::{Cycle, Face, HalfEdge, Region, Shell}; use crate::storage::Handle; +use crate::topology::{Cycle, Face, HalfEdge, Region, Shell}; #[derive(Default)] pub struct ReferenceCounter(HashMap, Vec>>); @@ -51,26 +51,26 @@ macro_rules! validate_references { /// should only be referenced by a single other object #[derive(Clone, Debug, thiserror::Error)] pub enum ReferenceCountError { - /// [`crate::objects::Region`] referenced by more than one [`crate::objects::Face`] + /// [`Region`] referenced by more than one [`Face`] #[error( "[`Region`] referenced by more than one [`Face`]\n{references:#?}" )] Region { references: MultipleReferences, }, - /// [`crate::objects::Face`] referenced by more than one [`crate::objects::Shell`] + /// [`Face`] referenced by more than one [`Shell`] #[error("[`Face`] referenced by more than one [`Shell`]\n{references:#?}")] Face { references: MultipleReferences, }, - /// [`crate::objects::HalfEdge`] referenced by more than one [`crate::objects::Cycle`] + /// [`HalfEdge`] referenced by more than one [`Cycle`] #[error( "[`HalfEdge`] referenced by more than one [`Cycle`]\n{references:#?}" )] HalfEdge { references: MultipleReferences, }, - /// [`crate::objects::Cycle`] referenced by more than one [`crate::objects::Region`] + /// [`Cycle`] referenced by more than one [`Region`] #[error( "[`Cycle`] referenced by more than one [`Region`]\n{references:#?}" )] diff --git a/crates/fj-core/src/validate/region.rs b/crates/fj-core/src/validate/region.rs index 7508108b2..022800e11 100644 --- a/crates/fj-core/src/validate/region.rs +++ b/crates/fj-core/src/validate/region.rs @@ -1,4 +1,4 @@ -use crate::{geometry::Geometry, objects::Region}; +use crate::{geometry::Geometry, topology::Region}; use super::{Validate, ValidationConfig, ValidationError}; diff --git a/crates/fj-core/src/validate/shell.rs b/crates/fj-core/src/validate/shell.rs index 83d85a258..7b181d4b5 100644 --- a/crates/fj-core/src/validate/shell.rs +++ b/crates/fj-core/src/validate/shell.rs @@ -4,11 +4,11 @@ use fj_math::{Point, Scalar}; use crate::{ geometry::{CurveBoundary, Geometry, SurfaceGeometry}, - objects::{Curve, HalfEdge, Shell, Vertex}, queries::{ AllHalfEdgesWithSurface, BoundingVerticesOfHalfEdge, SiblingOfHalfEdge, }, storage::Handle, + topology::{Curve, HalfEdge, Shell, Vertex}, }; use super::{Validate, ValidationConfig, ValidationError}; @@ -421,7 +421,6 @@ fn distances( mod tests { use crate::{ assert_contains_err, - objects::{Curve, HalfEdge, Shell}, operations::{ build::BuildShell, geometry::UpdateHalfEdgeGeometry, @@ -431,6 +430,7 @@ mod tests { UpdateShell, }, }, + topology::{Curve, HalfEdge, Shell}, validate::{shell::ShellValidationError, Validate, ValidationError}, Core, }; diff --git a/crates/fj-core/src/validate/sketch.rs b/crates/fj-core/src/validate/sketch.rs index 6a23c46ab..794295b74 100644 --- a/crates/fj-core/src/validate/sketch.rs +++ b/crates/fj-core/src/validate/sketch.rs @@ -1,6 +1,6 @@ use crate::geometry::Geometry; -use crate::{objects::Cycle, storage::Handle}; -use crate::{objects::Sketch, validate_references}; +use crate::{storage::Handle, topology::Cycle}; +use crate::{topology::Sketch, validate_references}; use fj_math::Winding; use super::{ @@ -120,10 +120,10 @@ impl SketchValidationError { mod tests { use crate::{ assert_contains_err, - objects::{Cycle, HalfEdge, Region, Sketch, Vertex}, operations::{ build::BuildHalfEdge, build::BuildRegion, insert::Insert, }, + topology::{Cycle, HalfEdge, Region, Sketch, Vertex}, validate::{ references::ReferenceCountError, SketchValidationError, Validate, ValidationError, diff --git a/crates/fj-core/src/validate/solid.rs b/crates/fj-core/src/validate/solid.rs index 92444abb4..41f272d2b 100644 --- a/crates/fj-core/src/validate/solid.rs +++ b/crates/fj-core/src/validate/solid.rs @@ -2,8 +2,8 @@ use std::iter::repeat; use crate::{ geometry::Geometry, - objects::{Solid, Vertex}, storage::Handle, + topology::{Solid, Vertex}, validate_references, }; use fj_math::Point; @@ -181,11 +181,11 @@ mod tests { use crate::{ assert_contains_err, geometry::GlobalPath, - objects::{Cycle, Face, HalfEdge, Region, Shell, Solid, Surface}, operations::{ build::{BuildFace, BuildHalfEdge, BuildSurface}, insert::Insert, }, + topology::{Cycle, Face, HalfEdge, Region, Shell, Solid, Surface}, validate::{ references::ReferenceCountError, SolidValidationError, Validate, ValidationError, diff --git a/crates/fj-core/src/validate/surface.rs b/crates/fj-core/src/validate/surface.rs index 44c148548..49e3b199b 100644 --- a/crates/fj-core/src/validate/surface.rs +++ b/crates/fj-core/src/validate/surface.rs @@ -1,4 +1,4 @@ -use crate::{geometry::Geometry, objects::Surface}; +use crate::{geometry::Geometry, topology::Surface}; use super::{Validate, ValidationConfig, ValidationError}; diff --git a/crates/fj-core/src/validate/vertex.rs b/crates/fj-core/src/validate/vertex.rs index d08c2ee8e..65fb8014f 100644 --- a/crates/fj-core/src/validate/vertex.rs +++ b/crates/fj-core/src/validate/vertex.rs @@ -1,4 +1,4 @@ -use crate::{geometry::Geometry, objects::Vertex}; +use crate::{geometry::Geometry, topology::Vertex}; use super::{Validate, ValidationConfig, ValidationError}; diff --git a/crates/fj-core/src/validation/checks/face_boundary.rs b/crates/fj-core/src/validation/checks/face_boundary.rs index b00afbe14..3f48cc731 100644 --- a/crates/fj-core/src/validation/checks/face_boundary.rs +++ b/crates/fj-core/src/validation/checks/face_boundary.rs @@ -1,6 +1,6 @@ use crate::{ geometry::Geometry, - objects::Face, + topology::Face, validation::{ValidationCheck, ValidationConfig}, }; @@ -35,11 +35,11 @@ impl ValidationCheck for FaceHasNoBoundary { #[cfg(test)] mod tests { use crate::{ - objects::{Cycle, Face}, operations::{ build::{BuildCycle, BuildFace}, update::{UpdateFace, UpdateRegion}, }, + topology::{Cycle, Face}, validation::{checks::FaceHasNoBoundary, ValidationCheck}, Core, }; @@ -49,7 +49,7 @@ mod tests { let mut core = Core::new(); let valid = Face::circle( - core.layers.objects.surfaces.xy_plane(), + core.layers.topology.surfaces.xy_plane(), [0., 0.], 1., &mut core, diff --git a/crates/fj-core/src/validation/checks/face_winding.rs b/crates/fj-core/src/validation/checks/face_winding.rs index 8811f34c6..96267061b 100644 --- a/crates/fj-core/src/validation/checks/face_winding.rs +++ b/crates/fj-core/src/validation/checks/face_winding.rs @@ -1,8 +1,8 @@ use fj_math::Winding; use crate::{ - objects::{Cycle, Face}, storage::Handle, + topology::{Cycle, Face}, validation::ValidationCheck, }; @@ -71,7 +71,6 @@ impl ValidationCheck for InteriorCycleHasInvalidWinding { #[cfg(test)] mod tests { use crate::{ - objects::{Cycle, Face, Region}, operations::{ build::{BuildCycle, BuildFace}, derive::DeriveFrom, @@ -79,6 +78,7 @@ mod tests { reverse::Reverse, update::{UpdateFace, UpdateRegion}, }, + topology::{Cycle, Face, Region}, validation::{checks::InteriorCycleHasInvalidWinding, ValidationCheck}, Core, }; @@ -88,7 +88,7 @@ mod tests { let mut core = Core::new(); let valid = Face::polygon( - core.layers.objects.surfaces.xy_plane(), + core.layers.topology.surfaces.xy_plane(), [[0., 0.], [3., 0.], [0., 3.]], &mut core, ) diff --git a/crates/fj-core/src/validation/checks/half_edge_connection.rs b/crates/fj-core/src/validation/checks/half_edge_connection.rs index 7fefc9560..679c45a8d 100644 --- a/crates/fj-core/src/validation/checks/half_edge_connection.rs +++ b/crates/fj-core/src/validation/checks/half_edge_connection.rs @@ -2,8 +2,8 @@ use fj_math::{Point, Scalar}; use crate::{ geometry::Geometry, - objects::{Cycle, HalfEdge}, storage::Handle, + topology::{Cycle, HalfEdge}, validation::{validation_check::ValidationCheck, ValidationConfig}, }; @@ -77,11 +77,11 @@ impl ValidationCheck for AdjacentHalfEdgesNotConnected { mod tests { use crate::{ - objects::{Cycle, HalfEdge}, operations::{ build::{BuildCycle, BuildHalfEdge}, update::UpdateCycle, }, + topology::{Cycle, HalfEdge}, validation::ValidationCheck, Core, }; diff --git a/models/all/src/lib.rs b/models/all/src/lib.rs index 7e71b4c97..5b1b5f929 100644 --- a/models/all/src/lib.rs +++ b/models/all/src/lib.rs @@ -1,9 +1,9 @@ use fj::{ core::{ - objects::Solid, operations::{ build::BuildSolid, merge::Merge, transform::TransformObject, }, + topology::Solid, }, math::{Scalar, Vector}, }; diff --git a/models/color/src/lib.rs b/models/color/src/lib.rs index 513d7a0c9..d9541b4f9 100644 --- a/models/color/src/lib.rs +++ b/models/color/src/lib.rs @@ -1,8 +1,8 @@ use fj::core::{ - objects::Solid, operations::{ presentation::SetColor, split::SplitFace, update::UpdateSolid, }, + topology::Solid, }; pub fn model(core: &mut fj::core::Core) -> Solid { diff --git a/models/cuboid/src/lib.rs b/models/cuboid/src/lib.rs index 38a0da818..6c37de589 100644 --- a/models/cuboid/src/lib.rs +++ b/models/cuboid/src/lib.rs @@ -1,11 +1,11 @@ use fj::{ core::{ - objects::{Region, Sketch, Solid}, operations::{ build::{BuildRegion, BuildSketch}, sweep::SweepSketch, update::UpdateSketch, }, + topology::{Region, Sketch, Solid}, }, math::{Scalar, Vector}, }; @@ -13,7 +13,7 @@ use fj::{ pub fn model(size: impl Into>, core: &mut fj::core::Core) -> Solid { let [x, y, z] = size.into().components; - let bottom_surface = core.layers.objects.surfaces.xy_plane(); + let bottom_surface = core.layers.topology.surfaces.xy_plane(); let sweep_path = Vector::from([Scalar::ZERO, Scalar::ZERO, z]); Sketch::empty() diff --git a/models/holes/src/lib.rs b/models/holes/src/lib.rs index 527d44525..240eb24fc 100644 --- a/models/holes/src/lib.rs +++ b/models/holes/src/lib.rs @@ -1,10 +1,10 @@ use fj::{ core::{ - objects::Solid, operations::{ holes::{AddHole, HoleLocation}, update::UpdateSolid, }, + topology::Solid, }, math::Scalar, }; diff --git a/models/spacer/src/lib.rs b/models/spacer/src/lib.rs index d51cc0e8b..89db21660 100644 --- a/models/spacer/src/lib.rs +++ b/models/spacer/src/lib.rs @@ -1,12 +1,12 @@ use fj::{ core::{ - objects::{Cycle, Region, Sketch, Solid}, operations::{ build::{BuildCycle, BuildRegion, BuildSketch}, reverse::Reverse, sweep::SweepSketch, update::{UpdateRegion, UpdateSketch}, }, + topology::{Cycle, Region, Sketch, Solid}, }, math::{Point, Vector}, }; @@ -17,7 +17,7 @@ pub fn model( height: f64, core: &mut fj::core::Core, ) -> Solid { - let bottom_surface = core.layers.objects.surfaces.xy_plane(); + let bottom_surface = core.layers.topology.surfaces.xy_plane(); let sweep_path = Vector::from([0., 0., height]); Sketch::empty() diff --git a/models/split/src/lib.rs b/models/split/src/lib.rs index 1792c8e07..4cba82789 100644 --- a/models/split/src/lib.rs +++ b/models/split/src/lib.rs @@ -1,8 +1,8 @@ use fj::core::{ - objects::Solid, operations::{ split::SplitFace, sweep::SweepFaceOfShell, update::UpdateSolid, }, + topology::Solid, }; pub fn model(size: f64, split_pos: f64, core: &mut fj::core::Core) -> Solid { diff --git a/models/star/src/lib.rs b/models/star/src/lib.rs index a3a21cdf3..35615b420 100644 --- a/models/star/src/lib.rs +++ b/models/star/src/lib.rs @@ -2,13 +2,13 @@ use std::f64::consts::PI; use fj::{ core::{ - objects::{Cycle, Region, Sketch, Solid}, operations::{ build::{BuildCycle, BuildRegion, BuildSketch}, reverse::Reverse, sweep::SweepSketch, update::{UpdateRegion, UpdateSketch}, }, + topology::{Cycle, Region, Sketch, Solid}, }, math::Vector, }; @@ -40,7 +40,7 @@ pub fn model( inner_points.push([x / 2., y / 2.]); } - let bottom_surface = core.layers.objects.surfaces.xy_plane(); + let bottom_surface = core.layers.topology.surfaces.xy_plane(); let sweep_path = Vector::from([0., 0., h]); Sketch::empty() diff --git a/models/vertices-indices/src/lib.rs b/models/vertices-indices/src/lib.rs index 0f45596ec..bf2136e22 100644 --- a/models/vertices-indices/src/lib.rs +++ b/models/vertices-indices/src/lib.rs @@ -1,9 +1,9 @@ use fj::core::{ - objects::{Shell, Solid}, operations::{ build::{BuildShell, BuildSolid}, update::UpdateSolid, }, + topology::{Shell, Solid}, }; pub fn model(core: &mut fj::core::Core) -> Solid {