mirror of
https://github.com/hannobraun/Fornjot
synced 2025-01-28 19:09:25 +00:00
Remove unused code
This commit is contained in:
parent
e271693846
commit
d3d7488429
@ -1,7 +1,7 @@
|
||||
use fj_math::Transform;
|
||||
|
||||
use crate::{
|
||||
objects::{Curve, GlobalCurve, Objects},
|
||||
objects::{Curve, Objects},
|
||||
services::Service,
|
||||
};
|
||||
|
||||
@ -21,18 +21,3 @@ impl TransformObject for Curve {
|
||||
Self::new(path)
|
||||
}
|
||||
}
|
||||
|
||||
impl TransformObject for GlobalCurve {
|
||||
fn transform_with_cache(
|
||||
self,
|
||||
_: &Transform,
|
||||
_: &mut Service<Objects>,
|
||||
_: &mut TransformCache,
|
||||
) -> Self {
|
||||
// `GlobalCurve` doesn't contain any internal geometry. If it did, that
|
||||
// would just be redundant with the geometry of other objects, and this
|
||||
// other geometry is already being transformed by other implementations
|
||||
// of this trait.
|
||||
self
|
||||
}
|
||||
}
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
use crate::{
|
||||
objects::{
|
||||
Curve, Cycle, Face, GlobalCurve, GlobalEdge, GlobalVertex, HalfEdge,
|
||||
Objects, Shell, Sketch, Solid, Surface, SurfaceVertex,
|
||||
Curve, Cycle, Face, GlobalEdge, GlobalVertex, HalfEdge, Objects, Shell,
|
||||
Sketch, Solid, Surface, SurfaceVertex,
|
||||
},
|
||||
services::{Service, ServiceObjectsExt},
|
||||
storage::Handle,
|
||||
@ -37,7 +37,6 @@ impl_insert!(
|
||||
Curve, curves;
|
||||
Cycle, cycles;
|
||||
Face, faces;
|
||||
GlobalCurve, global_curves;
|
||||
GlobalEdge, global_edges;
|
||||
GlobalVertex, global_vertices;
|
||||
HalfEdge, half_edges;
|
||||
|
@ -17,7 +17,3 @@ impl Curve {
|
||||
self.path
|
||||
}
|
||||
}
|
||||
|
||||
/// A curve, defined in global (3D) coordinates
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct GlobalCurve;
|
||||
|
@ -79,7 +79,7 @@ mod stores;
|
||||
|
||||
pub use self::{
|
||||
full::{
|
||||
curve::{Curve, GlobalCurve},
|
||||
curve::Curve,
|
||||
cycle::{Cycle, HalfEdgesOfCycle},
|
||||
edge::{GlobalEdge, HalfEdge, VerticesInNormalizedOrder},
|
||||
face::{Face, FaceSet, Handedness},
|
||||
|
@ -2,8 +2,8 @@ use std::any::Any;
|
||||
|
||||
use crate::{
|
||||
objects::{
|
||||
Curve, Cycle, Face, GlobalCurve, GlobalEdge, GlobalVertex, HalfEdge,
|
||||
Objects, Shell, Sketch, Solid, Surface, SurfaceVertex,
|
||||
Curve, Cycle, Face, GlobalEdge, GlobalVertex, HalfEdge, Objects, Shell,
|
||||
Sketch, Solid, Surface, SurfaceVertex,
|
||||
},
|
||||
storage::{Handle, ObjectId},
|
||||
validate::{Validate, ValidationError},
|
||||
@ -111,7 +111,6 @@ object!(
|
||||
Curve, "curve", curves;
|
||||
Cycle, "cycle", cycles;
|
||||
Face, "face", faces;
|
||||
GlobalCurve, "global curve", global_curves;
|
||||
GlobalEdge, "global edge", global_edges;
|
||||
GlobalVertex, "global vertex", global_vertices;
|
||||
HalfEdge, "half-edge", half_edges;
|
||||
|
@ -6,8 +6,8 @@ use crate::{
|
||||
};
|
||||
|
||||
use super::{
|
||||
Curve, Cycle, Face, GlobalCurve, GlobalEdge, GlobalVertex, HalfEdge, Shell,
|
||||
Sketch, Solid, Surface, SurfaceVertex,
|
||||
Curve, Cycle, Face, GlobalEdge, GlobalVertex, HalfEdge, Shell, Sketch,
|
||||
Solid, Surface, SurfaceVertex,
|
||||
};
|
||||
|
||||
/// The available object stores
|
||||
@ -22,9 +22,6 @@ pub struct Objects {
|
||||
/// Store for [`Face`]s
|
||||
pub faces: Store<Face>,
|
||||
|
||||
/// Store for [`GlobalCurve`]s
|
||||
pub global_curves: Store<GlobalCurve>,
|
||||
|
||||
/// Store for [`GlobalEdge`]s
|
||||
pub global_edges: Store<GlobalEdge>,
|
||||
|
||||
|
@ -16,7 +16,7 @@ mod wrapper;
|
||||
|
||||
pub use self::{
|
||||
objects::{
|
||||
curve::{MaybeSurfacePath, PartialCurve, PartialGlobalCurve},
|
||||
curve::{MaybeSurfacePath, PartialCurve},
|
||||
cycle::PartialCycle,
|
||||
edge::{PartialGlobalEdge, PartialHalfEdge},
|
||||
face::PartialFace,
|
||||
|
@ -2,7 +2,7 @@ use fj_math::Scalar;
|
||||
|
||||
use crate::{
|
||||
geometry::path::SurfacePath,
|
||||
objects::{Curve, GlobalCurve, Objects},
|
||||
objects::{Curve, Objects},
|
||||
partial::{FullToPartialCache, PartialObject},
|
||||
services::Service,
|
||||
};
|
||||
@ -61,19 +61,3 @@ impl From<SurfacePath> for MaybeSurfacePath {
|
||||
Self::Defined(path)
|
||||
}
|
||||
}
|
||||
|
||||
/// A partial [`GlobalCurve`]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct PartialGlobalCurve;
|
||||
|
||||
impl PartialObject for PartialGlobalCurve {
|
||||
type Full = GlobalCurve;
|
||||
|
||||
fn from_full(_: &Self::Full, _: &mut FullToPartialCache) -> Self {
|
||||
Self
|
||||
}
|
||||
|
||||
fn build(self, _: &mut Service<Objects>) -> Self::Full {
|
||||
GlobalCurve
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,6 @@ impl_trait!(
|
||||
Curve, PartialCurve;
|
||||
Cycle, PartialCycle;
|
||||
Face, PartialFace;
|
||||
GlobalCurve, PartialGlobalCurve;
|
||||
GlobalEdge, PartialGlobalEdge;
|
||||
GlobalVertex, PartialGlobalVertex;
|
||||
HalfEdge, PartialHalfEdge;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::objects::{Curve, GlobalCurve};
|
||||
use crate::objects::Curve;
|
||||
|
||||
use super::{Validate, ValidationConfig, ValidationError};
|
||||
|
||||
@ -10,12 +10,3 @@ impl Validate for Curve {
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
impl Validate for GlobalCurve {
|
||||
fn validate_with_config(
|
||||
&self,
|
||||
_: &ValidationConfig,
|
||||
_: &mut Vec<ValidationError>,
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
use fj_math::{Point, Scalar};
|
||||
|
||||
use crate::{
|
||||
objects::{GlobalCurve, GlobalEdge, GlobalVertex, HalfEdge, Surface},
|
||||
objects::{GlobalEdge, GlobalVertex, HalfEdge, Surface},
|
||||
storage::Handle,
|
||||
};
|
||||
|
||||
@ -30,25 +30,6 @@ impl Validate for GlobalEdge {
|
||||
/// [`HalfEdge`] validation failed
|
||||
#[derive(Clone, Debug, thiserror::Error)]
|
||||
pub enum HalfEdgeValidationError {
|
||||
/// [`HalfEdge`]'s [`GlobalCurve`]s do not match
|
||||
#[error(
|
||||
"Global form of `HalfEdge`'s `Curve` does not match `GlobalCurve` of \n\
|
||||
the `HalfEdge`'s `GlobalEdge`\n\
|
||||
- `GlobalCurve` from `Curve`: {global_curve_from_curve:#?}\n\
|
||||
- `GlobalCurve` from `GlobalEdge`: {global_curve_from_global_form:#?}\n\
|
||||
- `HalfEdge`: {half_edge:#?}",
|
||||
)]
|
||||
GlobalCurveMismatch {
|
||||
/// The [`GlobalCurve`] from the [`HalfEdge`]'s `Curve`
|
||||
global_curve_from_curve: Handle<GlobalCurve>,
|
||||
|
||||
/// The [`GlobalCurve`] from the [`HalfEdge`]'s global form
|
||||
global_curve_from_global_form: Handle<GlobalCurve>,
|
||||
|
||||
/// The half-edge
|
||||
half_edge: HalfEdge,
|
||||
},
|
||||
|
||||
/// [`HalfEdge`]'s [`GlobalVertex`] objects do not match
|
||||
#[error(
|
||||
"Global forms of `HalfEdge` vertices do not match vertices of \n\
|
||||
|
Loading…
Reference in New Issue
Block a user