[−][src]Struct cut_optimizer_2d::Optimizer
Optimizer for optimizing rectangular cut pieces from rectangular stock pieces.
Methods
impl Optimizer
[src]
pub fn new() -> Self
[src]
Create a new optimizer.
pub fn add_stock_piece(&mut self, stock_piece: StockPiece) -> &mut Self
[src]
Add a stock piece that the optimizer can use to optimize cut pieces. Each unique stock piece only needs to be added once.
pub fn add_stock_pieces<I>(&mut self, stock_pieces: I) -> &mut Self where
I: IntoIterator<Item = StockPiece>,
[src]
I: IntoIterator<Item = StockPiece>,
Add stock pieces that the optimizer can use to optimize cut pieces. Each unique stock piece only needs to be added once.
pub fn add_cut_piece(&mut self, cut_piece: CutPiece) -> &mut Self
[src]
Add a desired cut piece that you need cut from a stock piece.
pub fn add_cut_pieces<I>(&mut self, cut_pieces: I) -> &mut Self where
I: IntoIterator<Item = CutPiece>,
[src]
I: IntoIterator<Item = CutPiece>,
Add desired cut pieces that you need cut from a stock piece.
pub fn set_cut_width(&mut self, cut_width: usize) -> &mut Self
[src]
Set the width of the cut to use between cut pieces. This could represent blade or kerf thickness.
pub fn set_random_seed(&mut self, seed: u64) -> &mut Self
[src]
Set the random seed used by the genetic algorithms in the optimizer. Using the same random seed will give you the same result for the same input.
pub fn optimize_guillotine<F>(
&self,
progress_callback: F
) -> Result<Solution, Error> where
F: Fn(f64),
[src]
&self,
progress_callback: F
) -> Result<Solution, Error> where
F: Fn(f64),
Optimize in a way where each cut piece can be cut out using only guillotine cuts, where each cut extends from one side to the other.
This method is suitable for cutting with a panel saw.
pub fn optimize_nested<F>(
&self,
progress_callback: F
) -> Result<Solution, Error> where
F: Fn(f64),
[src]
&self,
progress_callback: F
) -> Result<Solution, Error> where
F: Fn(f64),
Optimize without the requirement of guillotine cuts. Cuts can start and stop in the middle of the stock piece.
This method is suitable for cutting on a CNC.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Optimizer
impl Send for Optimizer
impl Sync for Optimizer
impl Unpin for Optimizer
impl UnwindSafe for Optimizer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,