mirror of
https://github.com/hannobraun/Fornjot
synced 2025-09-30 13:08:14 +00:00
Add BoundingVertices
This commit is contained in:
parent
cb37ad3fd2
commit
ee9196b4e0
19
crates/fj-core/src/geometry/bounding_vertices.rs
Normal file
19
crates/fj-core/src/geometry/bounding_vertices.rs
Normal file
@ -0,0 +1,19 @@
|
||||
use crate::{
|
||||
objects::Vertex,
|
||||
storage::{Handle, HandleWrapper},
|
||||
};
|
||||
|
||||
/// The bounding vertices of an edge
|
||||
#[derive(Eq, PartialEq)]
|
||||
pub struct BoundingVertices {
|
||||
/// The bounding vertices
|
||||
pub inner: [HandleWrapper<Vertex>; 2],
|
||||
}
|
||||
|
||||
impl From<[Handle<Vertex>; 2]> for BoundingVertices {
|
||||
fn from(vertices: [Handle<Vertex>; 2]) -> Self {
|
||||
Self {
|
||||
inner: vertices.map(Into::into),
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,13 @@
|
||||
//! Types that are tied to objects, but aren't objects themselves
|
||||
|
||||
mod boundary;
|
||||
mod bounding_vertices;
|
||||
mod path;
|
||||
mod surface;
|
||||
|
||||
pub use self::{
|
||||
boundary::BoundaryOnCurve,
|
||||
bounding_vertices::BoundingVertices,
|
||||
path::{GlobalPath, SurfacePath},
|
||||
surface::SurfaceGeometry,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user