This commit is contained in:
Hanno Braun 2024-10-23 19:29:49 +02:00
parent 6d9a55c574
commit bd88268122
3 changed files with 7 additions and 11 deletions

View File

@ -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>,
} }

View File

@ -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),
}, },
); );

View File

@ -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,
}), }),