Add CurveGeom::from_path_and_surface

This commit is contained in:
Hanno Braun 2024-03-27 13:15:27 +01:00
parent 3c3d53bfe6
commit b884e5f081

View File

@ -25,6 +25,18 @@ pub struct CurveGeom {
pub definitions: Vec<LocalCurveGeom>,
}
impl CurveGeom {
/// Create a new instance of `CurveGeom` from a path and a surface
pub fn from_path_and_surface(
path: SurfacePath,
surface: Handle<Surface>,
) -> Self {
Self {
definitions: vec![LocalCurveGeom { path, surface }],
}
}
}
/// The geometric definition of a curve in 2D surface coordinates
#[derive(Clone)]
pub struct LocalCurveGeom {