pub enum PolySegment {
Line(Vec<usize>),
Arc {
start: usize,
mid: usize,
end: usize,
},
}Expand description
One segment of an IfcIndexedPolyCurve, with indices already zero-based.
The variants mirror IfcSegmentIndexSelect. Cardinality is enforced on
construction so a consumer never has to re-check that an arc really has
three points.
Variants§
Line(Vec<usize>)
IfcLineIndex: a polyline run of 2 or more points.
More than two indices means intermediate vertices, not a spline: every consecutive pair is a straight edge.
Arc
IfcArcIndex: exactly start, a point on the arc, and end.
The middle index is a point the arc passes through, not a centre. Treating it as a centre is a common and silently plausible error.
Implementations§
Trait Implementations§
Source§impl Clone for PolySegment
impl Clone for PolySegment
Source§fn clone(&self) -> PolySegment
fn clone(&self) -> PolySegment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PolySegment
impl Debug for PolySegment
impl Eq for PolySegment
Source§impl PartialEq for PolySegment
impl PartialEq for PolySegment
impl StructuralPartialEq for PolySegment
Auto Trait Implementations§
impl Freeze for PolySegment
impl RefUnwindSafe for PolySegment
impl Send for PolySegment
impl Sync for PolySegment
impl Unpin for PolySegment
impl UnsafeUnpin for PolySegment
impl UnwindSafe for PolySegment
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