theon to abstract Euclidean
spaces and support various types
in the Rust ecosystem.
theon provides traits used to support spatial queries
and operations in iterator expressions and graphs.
While geometric traits are not required, it is recommended to implement them for types used to represent geometry. For example, computing the normals of faces in a graph or subdividing polygons in an iterator expression can be done easily if these traits are implemented.
Plexus provides conversions for geometric types to enable more ergonomic and
flexible APIs. The
IntoGeometry traits are analogous to the
Into traits and perform a similar function, but are used
exclusively for geometric types.
AsPosition trait is re-exported from
theon and allows vertex data to
expose positional data. When this positional data implements geometric traits,
spatial operations become available. For example, this allows graphs to support
splitting composite edges at midpoints, extruding faces, and flattening faces to
a best-fit plane.