fj_core/geometry/
half_edge.rs

1use super::SurfacePath;
2
3/// The geometry of a half-edge
4#[derive(Copy, Clone)]
5pub struct HalfEdgeGeometry {
6    /// # The path of the half-edge
7    ///
8    /// ## Implementation Note
9    ///
10    /// Currently, all curve-related geometry is defined locally, in terms of
11    /// the surface that the curve is on (or purely in 2D, if there is no
12    /// surface associated with this geometry). However, curves exist globally,
13    /// independently of surfaces. Half-edges in multiple surfaces can refer to
14    /// the same curve, and in fact, that is the whole reason for their
15    /// existence as a topological object.
16    ///
17    /// This contradiction, globally defined curves but locally defined curve
18    /// geometry, is the reason that this curve geometry is defined right here,
19    /// associated with a locally existing half-edge. (And, I might add,
20    /// redundantly so, as multiple half-edges within the same surface context
21    /// can refer to the same curve.)
22    ///
23    /// Instead, it should be possible to define curve geometry *either* locally
24    /// or globally. Then that respective definition can be associated with the
25    /// curve (and possibly, in addition, a surface). How exactly that is going
26    /// to work is up in the air.
27    ///
28    /// The point of all this exposition is to clarify that this field doesn't
29    /// really belong here. It exists here for practical reasons that are,
30    /// hopefully, temporary.
31    pub path: SurfacePath,
32}