Add `CurveGeom2`

This commit is contained in:
Hanno Braun 2024-09-13 20:31:40 +02:00
parent 7891a69895
commit b6146dfd16
2 changed files with 29 additions and 1 deletions

View File

@ -47,6 +47,34 @@ pub struct LocalCurveGeom {
pub path: Path<2>,
}
/// # The geometric definition of a curve
///
/// Curves are represented by polylines, their uniform intermediate
/// representation. However, this representation can be 2D (local to a surface)
/// or 3D. This enum distinguishes between the two cases.
///
/// ## Implementation Note
///
/// The name, `CurveGeom2`, is a placeholder. As of this writing, there is an
/// ongoing transition to a new geometry system, and the name `CurveGeom` is
/// still taken by an old-style type.
pub enum CurveGeom2 {
/// # The curve is defined locally on a surface
Surface {
/// # The geometric representation of the curve
geometry: Box<dyn GenPolyline<2>>,
/// # The surface that the curve geometry is defined on
surface: Handle<Surface>,
},
/// # The curve is defined globally in 3D space
Global {
/// # The geometric representation of the curve
geometry: Box<dyn GenPolyline<3>>,
},
}
/// # Generate polylines, the uniform representation of curve geometry
///
/// This trait provides a generic and uniform interface to curve geometry. It is

View File

@ -10,7 +10,7 @@ mod vertex;
pub use self::{
boundary::{CurveBoundary, CurveBoundaryElement},
curve::{CurveGeom, GenPolyline, LocalCurveGeom},
curve::{CurveGeom, CurveGeom2, GenPolyline, LocalCurveGeom},
geometry::Geometry,
path::Path,
surface::SurfaceGeom,