mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-04 18:08:26 +00:00
Prepare to support other curves besides lines
This commit is contained in:
parent
e42a283475
commit
9f09428c66
3
experiments/2025-03-18/src/geometry/curve.rs
Normal file
3
experiments/2025-03-18/src/geometry/curve.rs
Normal file
@ -0,0 +1,3 @@
|
||||
pub trait CurveGeometry {}
|
||||
|
||||
impl CurveGeometry for () {}
|
@ -1,5 +1,9 @@
|
||||
mod curve;
|
||||
mod sketch;
|
||||
mod surface;
|
||||
mod tri_mesh;
|
||||
|
||||
pub use self::{sketch::Sketch, surface::SurfaceGeometry, tri_mesh::ToTriMesh};
|
||||
pub use self::{
|
||||
curve::CurveGeometry, sketch::Sketch, surface::SurfaceGeometry,
|
||||
tri_mesh::ToTriMesh,
|
||||
};
|
||||
|
@ -22,8 +22,12 @@ impl TranslateExt for Curve {
|
||||
// 3D space, which means we have to do the actual translation here.
|
||||
// We'll see how it shakes out.
|
||||
|
||||
let Curve {} = self;
|
||||
Curve {}
|
||||
let Curve { geometry } = self;
|
||||
let _ = geometry;
|
||||
|
||||
Curve {
|
||||
geometry: Box::new(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,15 @@
|
||||
use crate::geometry::CurveGeometry;
|
||||
|
||||
use super::vertex::Vertex;
|
||||
|
||||
pub struct Curve {}
|
||||
pub struct Curve {
|
||||
pub geometry: Box<dyn CurveGeometry>,
|
||||
}
|
||||
|
||||
impl Curve {
|
||||
pub fn line_from_vertices(_: [&Vertex; 2]) -> Self {
|
||||
Curve {}
|
||||
Self {
|
||||
geometry: Box::new(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user