diff --git a/crates/fj-core/src/geometry/curve.rs b/crates/fj-core/src/geometry/curve.rs new file mode 100644 index 000000000..a85d43329 --- /dev/null +++ b/crates/fj-core/src/geometry/curve.rs @@ -0,0 +1,36 @@ +use crate::{storage::Handle, topology::Surface}; + +use super::SurfacePath; + +/// The geometric definition of a curve +#[derive(Clone)] +pub struct CurveGeom { + /// # The redundant local definitions of the curve geometry + /// + /// ## Implementation Note + /// + /// Having multiple redundant definitions is undesirable. However, we can't + /// just use one global definition in 3D, as we need the local 2D + /// definitions to approximate and triangulate curves, and we currently + /// don't have the tools to project a global definition into a local + /// context. + /// + /// Eventually, it should be possible to define the geometry of a curve + /// once, either locally or globally, and then convert that single + /// definition into (other) local contexts, as needed. There currently is no + /// issue to track that specifically, but there is the following issue, + /// which is a prerequisite for making the required tooling practical: + /// + /// + pub definitions: Vec, +} + +/// The geometric definition of a curve in 2D surface coordinates +#[derive(Clone)] +pub struct LocalCurveGeom { + /// The path that defines the curve on its surface + pub path: SurfacePath, + + /// The surface that the curve is defined on + pub surface: Handle, +} diff --git a/crates/fj-core/src/geometry/mod.rs b/crates/fj-core/src/geometry/mod.rs index f4db527be..194e9167e 100644 --- a/crates/fj-core/src/geometry/mod.rs +++ b/crates/fj-core/src/geometry/mod.rs @@ -1,6 +1,7 @@ //! Types that are tied to objects, but aren't objects themselves mod boundary; +mod curve; mod geometry; mod half_edge; mod path; @@ -8,6 +9,7 @@ mod surface; pub use self::{ boundary::{CurveBoundary, CurveBoundaryElement}, + curve::{CurveGeom, LocalCurveGeom}, geometry::Geometry, half_edge::HalfEdgeGeom, path::{GlobalPath, SurfacePath},