mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-06 10:58:28 +00:00
Simplify
This commit is contained in:
parent
4a778e2f88
commit
d329fc35bd
@ -1,4 +1,4 @@
|
|||||||
use std::{collections::BTreeMap, sync::Arc};
|
use std::{collections::BTreeMap, rc::Rc, sync::Arc};
|
||||||
|
|
||||||
use fj_math::Vector;
|
use fj_math::Vector;
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ impl Geometry {
|
|||||||
self_.define_surface_inner_2(
|
self_.define_surface_inner_2(
|
||||||
self_.xy_plane.clone(),
|
self_.xy_plane.clone(),
|
||||||
SurfaceGeom {
|
SurfaceGeom {
|
||||||
geometry: Arc::new(SweptCurve {
|
geometry: Rc::new(SweptCurve {
|
||||||
u: Path::x_axis(),
|
u: Path::x_axis(),
|
||||||
v: Vector::unit_y(),
|
v: Vector::unit_y(),
|
||||||
}),
|
}),
|
||||||
@ -80,7 +80,7 @@ impl Geometry {
|
|||||||
self_.define_surface_inner_2(
|
self_.define_surface_inner_2(
|
||||||
self_.xz_plane.clone(),
|
self_.xz_plane.clone(),
|
||||||
SurfaceGeom {
|
SurfaceGeom {
|
||||||
geometry: Arc::new(SweptCurve {
|
geometry: Rc::new(SweptCurve {
|
||||||
u: Path::x_axis(),
|
u: Path::x_axis(),
|
||||||
v: Vector::unit_z(),
|
v: Vector::unit_z(),
|
||||||
}),
|
}),
|
||||||
@ -89,7 +89,7 @@ impl Geometry {
|
|||||||
self_.define_surface_inner_2(
|
self_.define_surface_inner_2(
|
||||||
self_.yz_plane.clone(),
|
self_.yz_plane.clone(),
|
||||||
SurfaceGeom {
|
SurfaceGeom {
|
||||||
geometry: Arc::new(SweptCurve {
|
geometry: Rc::new(SweptCurve {
|
||||||
u: Path::y_axis(),
|
u: Path::y_axis(),
|
||||||
v: Vector::unit_z(),
|
v: Vector::unit_z(),
|
||||||
}),
|
}),
|
||||||
@ -312,5 +312,5 @@ pub enum CurveGeom2 {
|
|||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct SurfaceGeom {
|
pub struct SurfaceGeom {
|
||||||
/// # The geometric representation of the surface
|
/// # The geometric representation of the surface
|
||||||
pub geometry: Arc<dyn GenTriMesh>,
|
pub geometry: Rc<dyn GenTriMesh>,
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use std::sync::Arc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
use fj_math::{Point, Scalar, Vector};
|
use fj_math::{Point, Scalar, Vector};
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ pub trait BuildSurface {
|
|||||||
core.layers.geometry.define_surface_2(
|
core.layers.geometry.define_surface_2(
|
||||||
surface.clone(),
|
surface.clone(),
|
||||||
SurfaceGeom {
|
SurfaceGeom {
|
||||||
geometry: Arc::new(surface_geom),
|
geometry: Rc::new(surface_geom),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use std::sync::Arc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
use fj_math::Transform;
|
use fj_math::Transform;
|
||||||
|
|
||||||
@ -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 {
|
SurfaceGeom {
|
||||||
geometry: Arc::new(geometry),
|
geometry: Rc::new(geometry),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user