Remove remaining traces of half-edge geometry

This commit is contained in:
Hanno Braun 2024-07-10 22:07:47 +02:00
parent 29fc2d5fa2
commit cb81b30dcc
3 changed files with 3 additions and 40 deletions

View File

@ -4,18 +4,17 @@ use fj_math::Vector;
use crate::{
storage::Handle,
topology::{Curve, HalfEdge, Surface, Topology, Vertex},
topology::{Curve, Surface, Topology, Vertex},
};
use super::{
vertex::LocalVertexGeom, CurveGeom, GlobalPath, HalfEdgeGeom,
LocalCurveGeom, SurfaceGeom, VertexGeom,
vertex::LocalVertexGeom, CurveGeom, GlobalPath, LocalCurveGeom,
SurfaceGeom, VertexGeom,
};
/// Geometric data that is associated with topological objects
pub struct Geometry {
curve: BTreeMap<Handle<Curve>, CurveGeom>,
half_edge: BTreeMap<Handle<HalfEdge>, HalfEdgeGeom>,
surface: BTreeMap<Handle<Surface>, SurfaceGeom>,
vertex: BTreeMap<Handle<Vertex>, VertexGeom>,
@ -31,7 +30,6 @@ impl Geometry {
pub fn new(topology: &Topology) -> Self {
let mut self_ = Self {
curve: BTreeMap::new(),
half_edge: BTreeMap::new(),
surface: BTreeMap::new(),
vertex: BTreeMap::new(),
@ -118,18 +116,6 @@ impl Geometry {
self.curve.get(curve)
}
/// # Access the geometry of the provided half-edge
///
/// ## Panics
///
/// Panics, if the geometry of the half-edge is not defined.
pub fn of_half_edge(
&self,
half_edge: &Handle<HalfEdge>,
) -> Option<&HalfEdgeGeom> {
self.half_edge.get(half_edge)
}
/// # Access the geometry of the provided surface
///
/// ## Panics

View File

@ -1,21 +0,0 @@
use fj_math::Point;
use super::CurveBoundary;
/// The geometry of a half-edge
#[derive(Copy, Clone, Debug)]
pub struct HalfEdgeGeom {
/// # The boundary of the half-edge on its curve
pub boundary: CurveBoundary<Point<1>>,
}
impl HalfEdgeGeom {
/// Update the boundary
pub fn with_boundary(
mut self,
boundary: impl Into<CurveBoundary<Point<1>>>,
) -> Self {
self.boundary = boundary.into();
self
}
}

View File

@ -3,7 +3,6 @@
mod boundary;
mod curve;
mod geometry;
mod half_edge;
mod path;
mod surface;
mod vertex;
@ -12,7 +11,6 @@ pub use self::{
boundary::{CurveBoundary, CurveBoundaryElement},
curve::{CurveGeom, LocalCurveGeom},
geometry::Geometry,
half_edge::HalfEdgeGeom,
path::{GlobalPath, SurfacePath},
surface::SurfaceGeom,
vertex::{LocalVertexGeom, VertexGeom},