sift-pdf
sift-pdf
Section titled “sift-pdf”Stateless, deterministic imposition planning solver for the Print With Synergy stack.
Given SKU/job rules + press context, produces the most efficient step-and-repeat / stagger / gang / nest layout — the logic behind the SNR. Hands an ImposePlan to compile-pdf.impose for PDF generation; never writes bytes itself.
Solver tiers
Section titled “Solver tiers”| Mode | Tier | Engine | Layouts |
|---|---|---|---|
grid | T1 | codex tile_grid | Uniform + stagger cuts (half-drop-x, half-drop-y, custom offset) |
gang | T2 | OR-Tools CP-SAT | Multi-SKU quantity balancing |
nest | T3 | spyrrow/sparrow | True-shape irregular-die nesting |
POST /v1/sift/solve → SiftImposePlanPOST /v1/sift/suggest → SiftImposePlan (substrate sweep)POST /v1/sift/estimate → EstimateManifestGET /v1/contractGET /healthz /readyzQuick start
Section titled “Quick start”pip install "sift-pdf[gang]"uvicorn sift_pdf.api.main:app --port 8100curl -X POST http://localhost:8100/v1/sift/solve \ -H "Content-Type: application/json" \ -d '{ "jobs": [{"id":"sku-1","die":{"type":"rect","width_pt":288,"height_pt":144},"quantity":1000}], "press_profile": {"id":"p1","web_width_pt":864,"repeat_model":{"type":"servo","min_repeat_pt":144,"max_repeat_pt":864}}, "mode": "grid" }'Stagger cuts
Section titled “Stagger cuts”curl -X POST http://localhost:8100/v1/sift/solve \ -d '{ ..., "stagger_mode": "half-drop-x" }'Supported: half-drop-x, half-drop-y, custom (with stagger_offset_pt).
Development
Section titled “Development”uv sync --extra devuv run pytest --cov=sift_pdf --cov-fail-under=70License
Section titled “License”AGPL-3.0-or-later. See LICENSE and NOTICE for dependency licenses.