@cutoptim/engine 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -502,10 +502,15 @@ export interface LabelOptions {
502
502
  stages?: Array<string>;
503
503
  /** Your own word for a built-in stage key, at most 6 characters; empty or absent = the English abbreviation (RC, C2S, EB, S, D). */
504
504
  stageWords?: {
505
+ /** Your word for `rc` (rough cut); default RC. */
505
506
  rc?: string;
507
+ /** Your word for `c2s` (cut to size); default C2S. */
506
508
  c2s?: string;
509
+ /** Your word for `eb` (edge banded); default EB. */
507
510
  eb?: string;
511
+ /** Your word for `s` (sanded); default S. */
508
512
  s?: string;
513
+ /** Your word for `d` (drilled); default D. */
509
514
  d?: string;
510
515
  };
511
516
  /** Mark FE on the edges of a piece that lie on a sheet edge with no `trim` on that side (the board's factory edge). */
@@ -517,12 +522,17 @@ export interface LabelOptions {
517
522
  }
518
523
  /** Printer offset in mm: moves everything printed on the label right (`x`) and down (`y`); negative values move it back. Applied rounded to 0.1 mm. */
519
524
  export interface LabelOffset {
525
+ /** Shift right in mm (negative = left). */
520
526
  x?: number;
527
+ /** Shift down in mm (negative = up). */
521
528
  y?: number;
522
529
  }
523
530
  export interface Optimize2DRequest {
531
+ /** The rectangular parts to cut, one row per part type (`w`, `h`, optional `qty`, `name`, grain, edge banding). */
524
532
  parts: Array<Part2D>;
533
+ /** The sheet sizes to cut from, one row per size (`w`, `h`, optional `qty`, `price`). */
525
534
  stock: Array<Stock2D>;
535
+ /** Kerf, trim, first-cut direction, cost and stock rules, effort and label output; every field is optional. */
526
536
  options?: Options2D;
527
537
  /** Which optimizer to run. `heuristic` is the guillotine multi-strategy packer: highest yield, every layout edge-to-edge saw-cuttable, always a full `cutPlan`. `balanced` is a MaxRects free-nesting packer: much faster on large jobs for a small yield cost, but its layouts are often not guillotine (`guillotineValid: false`, `cutPlan: null`), and it does not model `tolerance`, `minimizeCost`, `grainGroup`, `maxCutStages` or `minimizeRotations` — set one of those and a string in `warnings` tells you it was ignored. `max` is the ASYNCHRONOUS tree-search tier (2D only): it reaches the proven optimum on far more jobs at the cost of seconds-to-a-minute per solve, so instead of a plan it returns **202** with a `jobId` — poll `GET /v1/jobs/{id}` for the result. Still deterministic and guillotine-valid. Where the tier is not enabled on a deployment, `engine: "max"` fails closed with **503**. **What `max` models.** It packs ONE stock format at full sheet size with unlimited supply and a fixed 3-stage guillotine pattern. Anything that would make the returned plan physically WRONG is therefore REFUSED with **400** at submission — before a call is reserved and before you wait for the solve: a second `stock` row, `options.trim`, `options.respectStock`, any `material`, any `grainGroup`, a non-empty `matchedSets` (an empty one is fine). Options that only make the plan less tuned are accepted and listed in `warnings`: `tolerance`, `minimizeCost`, `maxCutStages` (fixed at 3), `minimizeRotations`, `firstCut`, `effort`. A `max` result reports no `offcuts`. Send those jobs to `heuristic`. The default never changes silently. */
528
538
  engine?: "heuristic" | "balanced" | "max";
@@ -614,7 +624,9 @@ export interface Options1D {
614
624
  mitrePairing?: boolean;
615
625
  }
616
626
  export interface Optimize1DRequest {
627
+ /** The lengths to cut, one row per part type (`length`, optional `qty`, `name`, mitred `ends`). */
617
628
  parts: Array<Part1D>;
629
+ /** The bar lengths to cut from, one row per length (`length`, optional `qty`, `price`). */
618
630
  stock: Array<Stock1D>;
619
631
  options?: Options1D;
620
632
  /** `max` is not offered here: it is a 2D (and, separately, nesting) tier, and `engine: "max"` on this path is a **400** before a call is charged. In 1D `balanced` resolves to the same packer as `heuristic` — the linear packer is already a best-of-multiple-strategies search, so there is no separate balanced mode. The value is accepted and echoed back so a single client can send one engine id for both endpoints. */
@@ -682,6 +694,7 @@ export interface OptionsWood {
682
694
  mitrePairing?: boolean;
683
695
  }
684
696
  export interface OptimizeWoodRequest {
697
+ /** The timber parts to cut, one row per part type: cross-section `sw` × `sh`, `length`, optional `qty`. */
685
698
  parts: Array<PartWood>;
686
699
  /** At most 50 rows. Since every cross-section needs at least one stock row, this is also the practical ceiling on cross-sections in a single job; a wider catalogue should be split into several requests. */
687
700
  stock: Array<StockWood>;
package/dist/types.gen.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // GENERATED by scripts/gen-sdks.ts from the CutOptim Engine API OpenAPI document — DO NOT EDIT.
2
- // contract 1 · spec sha256 57abd7b68ca9e86fe7040dd2e979516274a2bdea5394258959f21bbefc28f624 · @cutoptim/engine 1.5.0
2
+ // contract 1 · spec sha256 1beced81a2f12873172a0604149dc98c83a333af239a76adc6dca082be878875 · @cutoptim/engine 1.6.0
3
3
  export {};
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.5.0";
1
+ export declare const VERSION = "1.6.0";
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // The package version — rewritten by scripts/gen-sdks.ts together with package.json (sent as the User-Agent).
2
- export const VERSION = '1.5.0';
2
+ export const VERSION = '1.6.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cutoptim/engine",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Official client for the CutOptim Engine API — cutting optimization (2D panels, 1D linear, timber, true-shape nesting) over HTTPS.",
5
5
  "license": "MIT",
6
6
  "author": "CutOptim <support@cutoptim.com>",