mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-08 20:08:30 +00:00
Update name of type
This commit is contained in:
parent
bccad4d197
commit
ef8d73f78c
@ -21,7 +21,7 @@ pub struct Geometry {
|
|||||||
vertex: BTreeMap<Handle<Vertex>, VertexGeom>,
|
vertex: BTreeMap<Handle<Vertex>, VertexGeom>,
|
||||||
|
|
||||||
curve_generators: BTreeMap<Handle<Curve>, CurveGenerator>,
|
curve_generators: BTreeMap<Handle<Curve>, CurveGenerator>,
|
||||||
surface_generators: BTreeMap<Handle<Surface>, SurfaceGeom>,
|
surface_generators: BTreeMap<Handle<Surface>, SurfaceGenerator>,
|
||||||
|
|
||||||
space_2d: Handle<Surface>,
|
space_2d: Handle<Surface>,
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ impl Geometry {
|
|||||||
|
|
||||||
self_.define_surface_inner_2(
|
self_.define_surface_inner_2(
|
||||||
self_.xy_plane.clone(),
|
self_.xy_plane.clone(),
|
||||||
SurfaceGeom {
|
SurfaceGenerator {
|
||||||
geometry: Box::new(SweptCurve {
|
geometry: Box::new(SweptCurve {
|
||||||
u: Path::x_axis(),
|
u: Path::x_axis(),
|
||||||
v: Vector::unit_y(),
|
v: Vector::unit_y(),
|
||||||
@ -81,7 +81,7 @@ impl Geometry {
|
|||||||
);
|
);
|
||||||
self_.define_surface_inner_2(
|
self_.define_surface_inner_2(
|
||||||
self_.xz_plane.clone(),
|
self_.xz_plane.clone(),
|
||||||
SurfaceGeom {
|
SurfaceGenerator {
|
||||||
geometry: Box::new(SweptCurve {
|
geometry: Box::new(SweptCurve {
|
||||||
u: Path::x_axis(),
|
u: Path::x_axis(),
|
||||||
v: Vector::unit_z(),
|
v: Vector::unit_z(),
|
||||||
@ -90,7 +90,7 @@ impl Geometry {
|
|||||||
);
|
);
|
||||||
self_.define_surface_inner_2(
|
self_.define_surface_inner_2(
|
||||||
self_.yz_plane.clone(),
|
self_.yz_plane.clone(),
|
||||||
SurfaceGeom {
|
SurfaceGenerator {
|
||||||
geometry: Box::new(SweptCurve {
|
geometry: Box::new(SweptCurve {
|
||||||
u: Path::y_axis(),
|
u: Path::y_axis(),
|
||||||
v: Vector::unit_z(),
|
v: Vector::unit_z(),
|
||||||
@ -145,7 +145,7 @@ impl Geometry {
|
|||||||
pub(crate) fn define_surface_inner_2(
|
pub(crate) fn define_surface_inner_2(
|
||||||
&mut self,
|
&mut self,
|
||||||
surface: Handle<Surface>,
|
surface: Handle<Surface>,
|
||||||
geometry: SurfaceGeom,
|
geometry: SurfaceGenerator,
|
||||||
) {
|
) {
|
||||||
if surface == self.space_2d {
|
if surface == self.space_2d {
|
||||||
panic!("Attempting to define geometry for 2D space");
|
panic!("Attempting to define geometry for 2D space");
|
||||||
@ -208,7 +208,7 @@ impl Geometry {
|
|||||||
pub fn generator_for_surface(
|
pub fn generator_for_surface(
|
||||||
&self,
|
&self,
|
||||||
surface: &Handle<Surface>,
|
surface: &Handle<Surface>,
|
||||||
) -> Option<&SurfaceGeom> {
|
) -> Option<&SurfaceGenerator> {
|
||||||
self.surface_generators.get(surface)
|
self.surface_generators.get(surface)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -299,7 +299,7 @@ pub enum CurveGenerator {
|
|||||||
///
|
///
|
||||||
/// Surface are represented by triangle meshes, their uniform intermediate
|
/// Surface are represented by triangle meshes, their uniform intermediate
|
||||||
/// representation.
|
/// representation.
|
||||||
pub struct SurfaceGeom {
|
pub struct SurfaceGenerator {
|
||||||
/// # The geometric representation of the surface
|
/// # The geometric representation of the surface
|
||||||
pub geometry: Box<dyn GenTriMesh>,
|
pub geometry: Box<dyn GenTriMesh>,
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ mod vertex;
|
|||||||
pub use self::{
|
pub use self::{
|
||||||
boundary::{CurveBoundary, CurveBoundaryElement},
|
boundary::{CurveBoundary, CurveBoundaryElement},
|
||||||
geometry::{
|
geometry::{
|
||||||
CurveGenerator, CurveGeom, Geometry, LocalCurveGeom, SurfaceGeom,
|
CurveGenerator, CurveGeom, Geometry, LocalCurveGeom, SurfaceGenerator,
|
||||||
},
|
},
|
||||||
path::Path,
|
path::Path,
|
||||||
tolerance::{InvalidTolerance, Tolerance},
|
tolerance::{InvalidTolerance, Tolerance},
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
geometry::{
|
geometry::{
|
||||||
surfaces::SweptCurve, CurveGenerator, Geometry, LocalCurveGeom,
|
surfaces::SweptCurve, CurveGenerator, Geometry, LocalCurveGeom,
|
||||||
LocalVertexGeom, SurfaceGeom,
|
LocalVertexGeom, SurfaceGenerator,
|
||||||
},
|
},
|
||||||
storage::Handle,
|
storage::Handle,
|
||||||
topology::{Curve, Surface, Vertex},
|
topology::{Curve, Surface, Vertex},
|
||||||
@ -72,7 +72,7 @@ impl Layer<Geometry> {
|
|||||||
pub fn define_surface_2(
|
pub fn define_surface_2(
|
||||||
&mut self,
|
&mut self,
|
||||||
surface: Handle<Surface>,
|
surface: Handle<Surface>,
|
||||||
geometry: SurfaceGeom,
|
geometry: SurfaceGenerator,
|
||||||
) {
|
) {
|
||||||
self.process_command(DefineSurface2 { surface, geometry });
|
self.process_command(DefineSurface2 { surface, geometry });
|
||||||
}
|
}
|
||||||
@ -178,7 +178,7 @@ impl Event<Geometry> for DefineSurface {
|
|||||||
/// Define the geometry of a surface
|
/// Define the geometry of a surface
|
||||||
pub struct DefineSurface2 {
|
pub struct DefineSurface2 {
|
||||||
surface: Handle<Surface>,
|
surface: Handle<Surface>,
|
||||||
geometry: SurfaceGeom,
|
geometry: SurfaceGenerator,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Command<Geometry> for DefineSurface2 {
|
impl Command<Geometry> for DefineSurface2 {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use fj_math::{Point, Scalar, Vector};
|
use fj_math::{Point, Scalar, Vector};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
geometry::{surfaces::SweptCurve, Path, SurfaceGeom},
|
geometry::{surfaces::SweptCurve, Path, SurfaceGenerator},
|
||||||
operations::insert::Insert,
|
operations::insert::Insert,
|
||||||
storage::Handle,
|
storage::Handle,
|
||||||
topology::Surface,
|
topology::Surface,
|
||||||
@ -26,7 +26,7 @@ pub trait BuildSurface {
|
|||||||
.define_surface(surface.clone(), surface_geom);
|
.define_surface(surface.clone(), surface_geom);
|
||||||
core.layers.geometry.define_surface_2(
|
core.layers.geometry.define_surface_2(
|
||||||
surface.clone(),
|
surface.clone(),
|
||||||
SurfaceGeom {
|
SurfaceGenerator {
|
||||||
geometry: Box::new(surface_geom),
|
geometry: Box::new(surface_geom),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -3,7 +3,7 @@ use fj_math::Transform;
|
|||||||
use crate::{
|
use crate::{
|
||||||
geometry::{
|
geometry::{
|
||||||
surfaces::{SweptCurve, TransformedSurface},
|
surfaces::{SweptCurve, TransformedSurface},
|
||||||
SurfaceGeom,
|
SurfaceGenerator,
|
||||||
},
|
},
|
||||||
operations::insert::Insert,
|
operations::insert::Insert,
|
||||||
storage::Handle,
|
storage::Handle,
|
||||||
@ -42,7 +42,7 @@ impl TransformObject for &Handle<Surface> {
|
|||||||
|
|
||||||
core.layers.geometry.define_surface_2(
|
core.layers.geometry.define_surface_2(
|
||||||
surface.clone(),
|
surface.clone(),
|
||||||
SurfaceGeom {
|
SurfaceGenerator {
|
||||||
geometry: Box::new(TransformedSurface {
|
geometry: Box::new(TransformedSurface {
|
||||||
surface: self.clone(),
|
surface: self.clone(),
|
||||||
transform: *transform,
|
transform: *transform,
|
||||||
|
Loading…
Reference in New Issue
Block a user