[][src]Struct cut_optimizer_2d::Optimizer

pub struct Optimizer { /* fields omitted */ }

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]

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]

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]

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]

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

impl Default for Optimizer[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,