Update name of type

This commit is contained in:
Hanno Braun 2024-10-23 19:49:41 +02:00
parent bccad4d197
commit ef8d73f78c
5 changed files with 15 additions and 15 deletions

View File

@ -21,7 +21,7 @@ pub struct Geometry {
vertex: BTreeMap<Handle<Vertex>, VertexGeom>,
curve_generators: BTreeMap<Handle<Curve>, CurveGenerator>,
surface_generators: BTreeMap<Handle<Surface>, SurfaceGeom>,
surface_generators: BTreeMap<Handle<Surface>, SurfaceGenerator>,
space_2d: Handle<Surface>,
@ -72,7 +72,7 @@ impl Geometry {
self_.define_surface_inner_2(
self_.xy_plane.clone(),
SurfaceGeom {
SurfaceGenerator {
geometry: Box::new(SweptCurve {
u: Path::x_axis(),
v: Vector::unit_y(),
@ -81,7 +81,7 @@ impl Geometry {
);
self_.define_surface_inner_2(
self_.xz_plane.clone(),
SurfaceGeom {
SurfaceGenerator {
geometry: Box::new(SweptCurve {
u: Path::x_axis(),
v: Vector::unit_z(),
@ -90,7 +90,7 @@ impl Geometry {
);
self_.define_surface_inner_2(
self_.yz_plane.clone(),
SurfaceGeom {
SurfaceGenerator {
geometry: Box::new(SweptCurve {
u: Path::y_axis(),
v: Vector::unit_z(),
@ -145,7 +145,7 @@ impl Geometry {
pub(crate) fn define_surface_inner_2(
&mut self,
surface: Handle<Surface>,
geometry: SurfaceGeom,
geometry: SurfaceGenerator,
) {
if surface == self.space_2d {
panic!("Attempting to define geometry for 2D space");
@ -208,7 +208,7 @@ impl Geometry {
pub fn generator_for_surface(
&self,
surface: &Handle<Surface>,
) -> Option<&SurfaceGeom> {
) -> Option<&SurfaceGenerator> {
self.surface_generators.get(surface)
}
@ -299,7 +299,7 @@ pub enum CurveGenerator {
///
/// Surface are represented by triangle meshes, their uniform intermediate
/// representation.
pub struct SurfaceGeom {
pub struct SurfaceGenerator {
/// # The geometric representation of the surface
pub geometry: Box<dyn GenTriMesh>,
}

View File

@ -14,7 +14,7 @@ mod vertex;
pub use self::{
boundary::{CurveBoundary, CurveBoundaryElement},
geometry::{
CurveGenerator, CurveGeom, Geometry, LocalCurveGeom, SurfaceGeom,
CurveGenerator, CurveGeom, Geometry, LocalCurveGeom, SurfaceGenerator,
},
path::Path,
tolerance::{InvalidTolerance, Tolerance},

View File

@ -3,7 +3,7 @@
use crate::{
geometry::{
surfaces::SweptCurve, CurveGenerator, Geometry, LocalCurveGeom,
LocalVertexGeom, SurfaceGeom,
LocalVertexGeom, SurfaceGenerator,
},
storage::Handle,
topology::{Curve, Surface, Vertex},
@ -72,7 +72,7 @@ impl Layer<Geometry> {
pub fn define_surface_2(
&mut self,
surface: Handle<Surface>,
geometry: SurfaceGeom,
geometry: SurfaceGenerator,
) {
self.process_command(DefineSurface2 { surface, geometry });
}
@ -178,7 +178,7 @@ impl Event<Geometry> for DefineSurface {
/// Define the geometry of a surface
pub struct DefineSurface2 {
surface: Handle<Surface>,
geometry: SurfaceGeom,
geometry: SurfaceGenerator,
}
impl Command<Geometry> for DefineSurface2 {

View File

@ -1,7 +1,7 @@
use fj_math::{Point, Scalar, Vector};
use crate::{
geometry::{surfaces::SweptCurve, Path, SurfaceGeom},
geometry::{surfaces::SweptCurve, Path, SurfaceGenerator},
operations::insert::Insert,
storage::Handle,
topology::Surface,
@ -26,7 +26,7 @@ pub trait BuildSurface {
.define_surface(surface.clone(), surface_geom);
core.layers.geometry.define_surface_2(
surface.clone(),
SurfaceGeom {
SurfaceGenerator {
geometry: Box::new(surface_geom),
},
);

View File

@ -3,7 +3,7 @@ use fj_math::Transform;
use crate::{
geometry::{
surfaces::{SweptCurve, TransformedSurface},
SurfaceGeom,
SurfaceGenerator,
},
operations::insert::Insert,
storage::Handle,
@ -42,7 +42,7 @@ impl TransformObject for &Handle<Surface> {
core.layers.geometry.define_surface_2(
surface.clone(),
SurfaceGeom {
SurfaceGenerator {
geometry: Box::new(TransformedSurface {
surface: self.clone(),
transform: *transform,