Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sift_pdf-0.1.1.tar.gz (180.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sift_pdf-0.1.1-py3-none-any.whl (54.3 kB view details)

Uploaded Python 3

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

Hashes for sift_pdf-0.1.1.tar.gz
Algorithm Hash digest
SHA256 71c2e6db9c297434f62bdea7ef38df2651c8b431b1ff157a22984433444ce512
MD5 01b933a0cce670c233e48fd1be2415e9
BLAKE2b-256 8692797848da9d338cf74cc94e43466240177710628a6cfc177fb281c5498980

See more details on using hashes here.

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

Hashes for sift_pdf-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e280c1a13f9109c71b30d4f5e48ea5ff9ec6197e6dcda32d23a7df9969480f0f
MD5 cae8680b1ae410e671f50e28a56cea48
BLAKE2b-256 5308001fb0b9a741ceb71dd9b3d89fb9e83b060fca6dae5f68a83e91cf740656

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page