Struct cut_optimizer_2d::ResultCutPiece
source · [−]pub struct ResultCutPiece {
pub external_id: Option<usize>,
pub x: usize,
pub y: usize,
pub width: usize,
pub length: usize,
pub pattern_direction: PatternDirection,
pub is_rotated: bool,
}
Expand description
A cut piece that has been placed in a solution by the optimizer.
Fields
external_id: Option<usize>
ID that matches the one on the cut piece that was passed to the optimizer.
x: usize
X location of the left side of this cut piece within the stock piece.
y: usize
Y location of the (bottom or top) side of this cut piece within the stock piece.
width: usize
Width of this cut piece.
length: usize
Length of this cut piece.
pattern_direction: PatternDirection
Pattern direction of this cut piece.
is_rotated: bool
Whether or not this cut piece was rotated 90 degrees by the optimizer from it’s original oriorientation.
Trait Implementations
sourceimpl Clone for ResultCutPiece
impl Clone for ResultCutPiece
sourcefn clone(&self) -> ResultCutPiece
fn clone(&self) -> ResultCutPiece
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ResultCutPiece
impl Debug for ResultCutPiece
sourceimpl From<&'_ ResultCutPiece> for Rect
impl From<&'_ ResultCutPiece> for Rect
sourcefn from(cut_piece: &ResultCutPiece) -> Self
fn from(cut_piece: &ResultCutPiece) -> Self
Performs the conversion.
sourceimpl PartialEq<ResultCutPiece> for ResultCutPiece
impl PartialEq<ResultCutPiece> for ResultCutPiece
sourcefn eq(&self, other: &ResultCutPiece) -> bool
fn eq(&self, other: &ResultCutPiece) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ResultCutPiece) -> bool
fn ne(&self, other: &ResultCutPiece) -> bool
This method tests for !=
.
impl Eq for ResultCutPiece
impl StructuralEq for ResultCutPiece
impl StructuralPartialEq for ResultCutPiece
Auto Trait Implementations
impl RefUnwindSafe for ResultCutPiece
impl Send for ResultCutPiece
impl Sync for ResultCutPiece
impl Unpin for ResultCutPiece
impl UnwindSafe for ResultCutPiece
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more