cutoptim 1.0.0__tar.gz → 1.5.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: cutoptim
3
- Version: 1.0.0
3
+ Version: 1.5.0
4
4
  Summary: Official client for the CutOptim Engine API — cutting optimization (2D panels, 1D linear, timber, true-shape nesting) over HTTPS.
5
5
  Project-URL: Homepage, https://cutoptim.com/engine/reference
6
6
  Project-URL: Source, https://github.com/cutoptim/engine-python
@@ -9,5 +9,5 @@ Standard library only (urllib, hmac). Types are generated from the OpenAPI docum
9
9
  from .client import CutOptim, CutOptimError, is_job_accepted
10
10
  from .webhooks import verify_webhook, SIGNATURE_HEADER
11
11
 
12
- __version__ = "1.0.0"
12
+ __version__ = "1.5.0"
13
13
  __all__ = ["CutOptim", "CutOptimError", "is_job_accepted", "verify_webhook", "SIGNATURE_HEADER", "__version__"]
@@ -1,5 +1,5 @@
1
1
  # GENERATED by scripts/gen-sdks.ts from the CutOptim Engine API OpenAPI document — DO NOT EDIT.
2
- # contract 1 · spec sha256 d12a371f3242e7b21df0aa4ecf2df4b2f60f8670bbed7e47bbe3d4cbf08678fb · cutoptim 1.0.0
2
+ # contract 1 · spec sha256 57abd7b68ca9e86fe7040dd2e979516274a2bdea5394258959f21bbefc28f624 · cutoptim 1.5.0
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import Any, Dict, List, Literal, TypedDict, Union
@@ -277,6 +277,8 @@ class Part2D(_Part2DRequired, total=False):
277
277
  material: str
278
278
  meta: Dict[str, Any]
279
279
  id: Any
280
+ qr: str
281
+ qrs: List[str]
280
282
 
281
283
 
282
284
  class _MatchedSetRequired(TypedDict):
@@ -333,6 +335,29 @@ class Options2D(TypedDict, total=False):
333
335
  minimizeRotations: bool
334
336
  effort: Literal["fast", "balanced"]
335
337
  setOutlines: bool
338
+ labels: "LabelOptions"
339
+
340
+
341
+ class LabelOptions(TypedDict, total=False):
342
+ """Label settings — the same settings as the Label format panel of the CutOptim app, under these names. They shape `labelsPdf` and add `piece`, `of`, `sheetNo`, `stockRow` and `sheetMeta` to every `labels[]` entry. Every field is optional; `{}` is valid and only adds those fields. Absent: the label PDF is the A4 sheet and `labels[]` is exactly as without this object. Validated STRICTLY, unlike the rest of `options`: an unknown key, a wrong type or a value out of range is a 400 `invalid_request` with `details.path`, before any call is counted (also on `/v1/validate/2d`). `null` for a field means the field is absent. Sent without `include` `labels` or `labelsPdf`, it changes nothing and the answer says so in `warnings`. 2D only."""
343
+ format: Literal["sheet", "roll", "apli-03056", "brother-dk-11201"]
344
+ width: float
345
+ height: float
346
+ offset: "LabelOffset"
347
+ dimSize: Literal["normal", "large", "xl"]
348
+ partNo: bool
349
+ order: Literal["input", "cut"]
350
+ stages: List[str]
351
+ stageWords: Dict[str, Any]
352
+ factoryEdges: bool
353
+ hiddenFaceHint: bool
354
+ parts: List[int]
355
+
356
+
357
+ class LabelOffset(TypedDict, total=False):
358
+ """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."""
359
+ x: float
360
+ y: float
336
361
 
337
362
 
338
363
  class _Optimize2DRequestRequired(TypedDict):
@@ -358,6 +383,33 @@ class Part1D(_Part1DRequired, total=False):
358
383
  priority: bool
359
384
  material: str
360
385
  meta: Dict[str, Any]
386
+ ends: "MitreEnds"
387
+ flip: Literal["none", "face", "edge", "any"]
388
+ depth: float
389
+ thickness: float
390
+
391
+
392
+ class _EndCutRequired(TypedDict):
393
+ angle: float
394
+
395
+
396
+ class EndCut(_EndCutRequired, total=False):
397
+ """One end cut of a part, in degrees from square (0 = a square end), signed. The part is measured long point to long point (`length` is its overall length). A part whose two end cuts would cross inside its section (shorter than its leads) cannot be made: a 400 `invalid_request` naming `parts[i].ends` says how long it must at least be."""
398
+ bevel: float
399
+
400
+
401
+ class MitreEnds(TypedDict, total=False):
402
+ """The angled ends of a part, read only with `options.mitrePairing`. Two parts of one section whose facing ends lie in one plane (after a turn `flip` allows) can be cut with ONE saw cut between them: the triangle between the long and the short point is not wasted. Without `mitrePairing` the ends are not used (a warning says so) and the part packs as its `length`."""
403
+ start: "EndCut"
404
+ end: "EndCut"
405
+
406
+
407
+ class SharedCut(TypedDict):
408
+ """This part's far end is ONE saw cut shared with the next part on the bar. The next part starts at `pos + length − lead + kerfAlongAxis` computed from the rounded values shown (not one kerf after `pos + length`), and the shared wood is counted once in `yieldPct`."""
409
+ angle: float
410
+ bevel: float
411
+ kerfAlongAxis: float
412
+ lead: float
361
413
 
362
414
 
363
415
  class _Stock1DRequired(TypedDict):
@@ -386,6 +438,7 @@ class Options1D(TypedDict, total=False):
386
438
  minimizeCost: bool
387
439
  respectStock: bool
388
440
  minOffcut: float
441
+ mitrePairing: bool
389
442
 
390
443
 
391
444
  class _Optimize1DRequestRequired(TypedDict):
@@ -412,6 +465,8 @@ class PartWood(_PartWoodRequired, total=False):
412
465
  priority: bool
413
466
  material: str
414
467
  meta: Dict[str, Any]
468
+ ends: "MitreEnds"
469
+ flip: Literal["none", "face", "edge", "any"]
415
470
 
416
471
 
417
472
  class _StockWoodRequired(TypedDict):
@@ -437,6 +492,7 @@ class OptionsWood(TypedDict, total=False):
437
492
  minimizeCost: bool
438
493
  respectStock: bool
439
494
  minOffcut: float
495
+ mitrePairing: bool
440
496
 
441
497
 
442
498
  class _OptimizeWoodRequestRequired(TypedDict):
@@ -450,8 +506,7 @@ class OptimizeWoodRequest(_OptimizeWoodRequestRequired, total=False):
450
506
  include: List[Literal["cutPlan", "offcuts", "svg", "csv", "dxf", "labels", "planHash", "pdf", "labelsPdf"]]
451
507
 
452
508
 
453
- class CutStep(TypedDict):
454
- """One blade movement, in physically executable order (parent before children: you cannot crosscut a strip before you have ripped it off)."""
509
+ class _CutStepRequired(TypedDict):
455
510
  sheet: int
456
511
  step: int
457
512
  axis: Literal["h", "v"]
@@ -460,6 +515,12 @@ class CutStep(TypedDict):
460
515
  stage: int
461
516
 
462
517
 
518
+ class CutStep(_CutStepRequired, total=False):
519
+ """One blade movement, in physically executable order (parent before children: you cannot crosscut a strip before you have ripped it off)."""
520
+ angle: float
521
+ bevel: float
522
+
523
+
463
524
  class _PlacedPart2DRequired(TypedDict):
464
525
  name: str
465
526
  x: float
@@ -581,6 +642,12 @@ class Label2D(_Label2DRequired, total=False):
581
642
  grain: Literal["w", "h"]
582
643
  edges: Dict[str, Any]
583
644
  meta: Dict[str, Any]
645
+ piece: int
646
+ of: int
647
+ sheetNo: int
648
+ stockRow: int
649
+ sheetMeta: Dict[str, Any]
650
+ qr: str
584
651
 
585
652
 
586
653
  class EdgeBanding(TypedDict):
@@ -642,6 +709,8 @@ class _PlacedPart1DRequired(TypedDict):
642
709
 
643
710
  class PlacedPart1D(_PlacedPart1DRequired, total=False):
644
711
  meta: Dict[str, Any]
712
+ sharedCut: "SharedCut"
713
+ flipped: Literal["face", "edge", "roll"]
645
714
 
646
715
 
647
716
  class _RodRequired(TypedDict):
@@ -657,7 +726,7 @@ class Rod(_RodRequired, total=False):
657
726
  meta: Dict[str, Any]
658
727
 
659
728
 
660
- class Metrics1D(TypedDict):
729
+ class _Metrics1DRequired(TypedDict):
661
730
  rodCount: int
662
731
  yieldPct: float
663
732
  placed: int
@@ -667,6 +736,10 @@ class Metrics1D(TypedDict):
667
736
  toleranceAcceptedCount: int
668
737
 
669
738
 
739
+ class Metrics1D(_Metrics1DRequired, total=False):
740
+ sharedCuts: int
741
+
742
+
670
743
  class Unplaced1D(TypedDict):
671
744
  name: str
672
745
  length: float
@@ -751,8 +824,7 @@ class WoodUnmatched(_WoodUnmatchedRequired, total=False):
751
824
  material: str
752
825
 
753
826
 
754
- class MetricsWood(TypedDict):
755
- """Job-wide totals across every section."""
827
+ class _MetricsWoodRequired(TypedDict):
756
828
  sectionCount: int
757
829
  rodCount: int
758
830
  yieldPct: float
@@ -763,6 +835,11 @@ class MetricsWood(TypedDict):
763
835
  toleranceAcceptedCount: int
764
836
 
765
837
 
838
+ class MetricsWood(_MetricsWoodRequired, total=False):
839
+ """Job-wide totals across every section."""
840
+ sharedCuts: int
841
+
842
+
766
843
  class _OptimizeWoodResponseRequired(TypedDict):
767
844
  engine: Literal["heuristic", "balanced"]
768
845
  engineVersion: str
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "cutoptim"
7
- version = "1.0.0"
7
+ version = "1.5.0"
8
8
  description = "Official client for the CutOptim Engine API — cutting optimization (2D panels, 1D linear, timber, true-shape nesting) over HTTPS."
9
9
  readme = "README.md"
10
10
  license = "MIT"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes