jasonrhansen / cut-optimizer-2d

2D Cut Optimizer
Apache License 2.0
21 stars 11 forks source link

Cut piece quantity #8

Closed lukepighetti closed 2 years ago

lukepighetti commented 2 years ago

Following the semantics from StockPiece field quantity, I would like to request the addition of a similar field on CutPiece.

This would allow downstream code to specify multiples of the same cut piece without resorting to copying or iteration.

Present (0.3.0)

let left = CutPiece {
    external_id: Some(2),
    width: 500,
    length: 1250,
    can_rotate: false,
    pattern_direction: PatternDirection::ParallelToLength,
};

let right = CutPiece {
    external_id: Some(2),
    width: 500,
    length: 1250,
    can_rotate: false,
    pattern_direction: PatternDirection::ParallelToLength,
};

Future

let side = CutPiece {
    quantity: Some(2),
    external_id: Some(2),
    width: 500,
    length: 1250,
    can_rotate: false,
    pattern_direction: PatternDirection::ParallelToLength,
};
jasonrhansen commented 2 years ago

I agree that this would be nice to have. I'll look into adding it when I get a chance.