mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-08 20:08:30 +00:00
Simplify
This commit is contained in:
parent
6d9a55c574
commit
bd88268122
@ -1,4 +1,4 @@
|
|||||||
use std::{collections::BTreeMap, rc::Rc};
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
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: Rc::new(SweptCurve {
|
geometry: Box::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: Rc::new(SweptCurve {
|
geometry: Box::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: Rc::new(SweptCurve {
|
geometry: Box::new(SweptCurve {
|
||||||
u: Path::y_axis(),
|
u: Path::y_axis(),
|
||||||
v: Vector::unit_z(),
|
v: Vector::unit_z(),
|
||||||
}),
|
}),
|
||||||
@ -310,5 +310,5 @@ pub enum CurveGeom2 {
|
|||||||
/// representation.
|
/// representation.
|
||||||
pub struct SurfaceGeom {
|
pub struct SurfaceGeom {
|
||||||
/// # The geometric representation of the surface
|
/// # The geometric representation of the surface
|
||||||
pub geometry: Rc<dyn GenTriMesh>,
|
pub geometry: Box<dyn GenTriMesh>,
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
use std::rc::Rc;
|
|
||||||
|
|
||||||
use fj_math::{Point, Scalar, Vector};
|
use fj_math::{Point, Scalar, Vector};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
@ -29,7 +27,7 @@ pub trait BuildSurface {
|
|||||||
core.layers.geometry.define_surface_2(
|
core.layers.geometry.define_surface_2(
|
||||||
surface.clone(),
|
surface.clone(),
|
||||||
SurfaceGeom {
|
SurfaceGeom {
|
||||||
geometry: Rc::new(surface_geom),
|
geometry: Box::new(surface_geom),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
use std::rc::Rc;
|
|
||||||
|
|
||||||
use fj_math::Transform;
|
use fj_math::Transform;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
@ -45,7 +43,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: Rc::new(TransformedSurface {
|
geometry: Box::new(TransformedSurface {
|
||||||
surface: self.clone(),
|
surface: self.clone(),
|
||||||
transform: *transform,
|
transform: *transform,
|
||||||
}),
|
}),
|
||||||
|
Loading…
Reference in New Issue
Block a user