mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-23 15:45:50 +00:00
Rename objects
module to topology
This commit is contained in:
parent
0d840c47f5
commit
9c25cb6628
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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},
|
||||||
|
@ -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::{
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
@ -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};
|
||||||
|
|
||||||
|
@ -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};
|
||||||
|
|
||||||
|
@ -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};
|
||||||
|
|
||||||
|
@ -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)]
|
||||||
|
@ -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>> {
|
||||||
|
@ -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> {
|
||||||
|
@ -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 {
|
||||||
|
@ -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>> {
|
||||||
|
@ -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>> {
|
||||||
|
@ -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(
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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
|
||||||
///
|
///
|
||||||
|
@ -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};
|
||||||
|
@ -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};
|
||||||
|
@ -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},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
geometry::Geometry,
|
geometry::Geometry,
|
||||||
objects::{AboutToBeStored, AnyObject, Objects},
|
topology::{AboutToBeStored, AnyObject, Objects},
|
||||||
validation::Validation,
|
validation::Validation,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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};
|
||||||
|
@ -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},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use crate::objects::Sketch;
|
use crate::topology::Sketch;
|
||||||
|
|
||||||
/// Build a [`Sketch`]
|
/// Build a [`Sketch`]
|
||||||
///
|
///
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
//! See [`DeriveFrom`].
|
//! See [`DeriveFrom`].
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
objects::{AnyObject, Stored},
|
|
||||||
storage::Handle,
|
storage::Handle,
|
||||||
|
topology::{AnyObject, Stored},
|
||||||
Core,
|
Core,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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`]
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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 {
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
objects::Region,
|
|
||||||
operations::{derive::DeriveFrom, insert::Insert},
|
operations::{derive::DeriveFrom, insert::Insert},
|
||||||
|
topology::Region,
|
||||||
Core,
|
Core,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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};
|
||||||
|
|
||||||
|
@ -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};
|
||||||
|
|
||||||
|
@ -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};
|
||||||
|
@ -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};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use crate::{objects::Region, Core};
|
use crate::{topology::Region, Core};
|
||||||
|
|
||||||
use super::TransformObject;
|
use super::TransformObject;
|
||||||
|
|
||||||
|
@ -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};
|
||||||
|
|
||||||
|
@ -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};
|
||||||
|
|
||||||
|
@ -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};
|
||||||
|
@ -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};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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
|
||||||
///
|
///
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
||||||
|
@ -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},
|
||||||
};
|
};
|
@ -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 {}
|
||||||
|
|
@ -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
|
@ -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>,
|
@ -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>,
|
@ -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>,
|
@ -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
|
@ -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
|
@ -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
|
@ -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 {}
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
geometry::Geometry,
|
geometry::Geometry,
|
||||||
objects::Curve,
|
topology::Curve,
|
||||||
validation::{ValidationConfig, ValidationError},
|
validation::{ValidationConfig, ValidationError},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
geometry::Geometry,
|
geometry::Geometry,
|
||||||
objects::HalfEdge,
|
topology::HalfEdge,
|
||||||
validation::{ValidationConfig, ValidationError},
|
validation::{ValidationConfig, ValidationError},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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,
|
||||||
|
@ -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>>>);
|
||||||
|
@ -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
Loading…
Reference in New Issue
Block a user