pub struct BrepEdge {
pub id: usize,
pub start_vertex: usize,
pub end_vertex: usize,
pub curve_type: CurveType,
pub parameter_range: [f64; 2],
pub control_points: Vec<[f64; 3]>,
}Expand description
An edge in the BREP representation.
Fields§
§id: usizeUnique identifier.
start_vertex: usizeStart vertex index.
end_vertex: usizeEnd vertex index.
curve_type: CurveTypeCurve type.
parameter_range: [f64; 2]Parameter range [t_start, t_end].
control_points: Vec<[f64; 3]>Intermediate control/sample points.
Implementations§
Source§impl BrepEdge
impl BrepEdge
Sourcepub fn arc(id: usize, start: usize, end: usize, center: [f64; 3]) -> Self
pub fn arc(id: usize, start: usize, end: usize, center: [f64; 3]) -> Self
Create a new arc edge.
Sourcepub fn evaluate(&self, t: f64, vertices: &[BrepVertex]) -> [f64; 3]
pub fn evaluate(&self, t: f64, vertices: &[BrepVertex]) -> [f64; 3]
Evaluate a point on the edge at parameter t in [0,1].
Sourcepub fn approximate_length(&self, vertices: &[BrepVertex]) -> f64
pub fn approximate_length(&self, vertices: &[BrepVertex]) -> f64
Compute the approximate length of the edge.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BrepEdge
impl RefUnwindSafe for BrepEdge
impl Send for BrepEdge
impl Sync for BrepEdge
impl Unpin for BrepEdge
impl UnsafeUnpin for BrepEdge
impl UnwindSafe for BrepEdge
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.