pub struct Sheet2D {
pub name: String,
pub width: u32,
pub height: u32,
pub cost: f64,
pub quantity: Option<usize>,
pub kerf: u32,
pub edge_kerf_relief: bool,
}Expand description
A sheet stock entry that demands can be placed on.
Fields§
§name: StringHuman-readable identifier for this sheet type.
width: u32Sheet width.
height: u32Sheet height.
cost: f64Per-unit cost of consuming a sheet of this type.
quantity: Option<usize>Optional cap on the number of sheets of this type that may be used.
kerf: u32Material removed by the cutting tool on each cut of this sheet
(e.g., table-saw blade thickness, CNC router bit diameter). Kerf is
enforced as a minimum gap between edge-adjacent placements on the
same sheet and is applied symmetrically across all 2D algorithms.
Defaults to 0, preserving pre-kerf-aware solver behavior.
edge_kerf_relief: boolWhen true, the trailing placement on this sheet may extend up to
one kerf past the sheet’s right and bottom boundaries. This models
a cut that runs off the stock — the blade exits the material with
only part of the kerf consuming material, and the rest is air. Does
not relax individual part feasibility: every part must still satisfy
width <= sheet.width && height <= sheet.height. Defaults to false
(pre-edge-relief behavior).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Sheet2D
impl<'de> Deserialize<'de> for Sheet2D
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Sheet2D
Auto Trait Implementations§
impl Freeze for Sheet2D
impl RefUnwindSafe for Sheet2D
impl Send for Sheet2D
impl Sync for Sheet2D
impl Unpin for Sheet2D
impl UnsafeUnpin for Sheet2D
impl UnwindSafe for Sheet2D
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more