SiftPDF — stateless imposition planning solver for the Print With Synergy stack. Produces ImposePlans (grid, stagger, gang, nest) for compile-pdf to execute.
Project description
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
| 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 |
API
POST /v1/sift/solve → SiftImposePlan
POST /v1/sift/suggest → SiftImposePlan (substrate sweep)
POST /v1/sift/estimate → EstimateManifest
GET /v1/contract
GET /healthz /readyz
Quick start
pip install "sift-pdf[gang]"
uvicorn sift_pdf.api.main:app --port 8100
curl -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
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
uv sync --extra dev
uv run pytest --cov=sift_pdf --cov-fail-under=70
License
AGPL-3.0-or-later. See LICENSE and NOTICE for dependency licenses.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sift_pdf-0.1.1.tar.gz.
File metadata
- Download URL: sift_pdf-0.1.1.tar.gz
- Upload date:
- Size: 180.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71c2e6db9c297434f62bdea7ef38df2651c8b431b1ff157a22984433444ce512
|
|
| MD5 |
01b933a0cce670c233e48fd1be2415e9
|
|
| BLAKE2b-256 |
8692797848da9d338cf74cc94e43466240177710628a6cfc177fb281c5498980
|
File details
Details for the file sift_pdf-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sift_pdf-0.1.1-py3-none-any.whl
- Upload date:
- Size: 54.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e280c1a13f9109c71b30d4f5e48ea5ff9ec6197e6dcda32d23a7df9969480f0f
|
|
| MD5 |
cae8680b1ae410e671f50e28a56cea48
|
|
| BLAKE2b-256 |
5308001fb0b9a741ceb71dd9b3d89fb9e83b060fca6dae5f68a83e91cf740656
|