fix: a film is cut into parts where its own pixels are clear, never through the art when it can be helped (#136)
Some checks failed
Build and deploy / Validate source (push) Successful in 9s
Build and deploy / Publish images (push) Has been cancelled
Build and deploy / Secret scan and release gate (push) Has been cancelled
Build and deploy / Integration suite on a real stack (push) Has been cancelled
Some checks failed
Build and deploy / Validate source (push) Successful in 9s
Build and deploy / Publish images (push) Has been cancelled
Build and deploy / Secret scan and release gate (push) Has been cancelled
Build and deploy / Integration suite on a real stack (push) Has been cancelled
The layout sees a ready sheet as one piece, so a part was cut at its length, through the artwork. Where no gap between pieces is near the limit, the film is read there: the cut falls in the middle of the nearest clear band of 3 mm, else of the widest clear band (#83's packed sheets have 2 mm between rows), else on the row with the least ink. A part is never shorter than half the limit, and the render limit allows one part more. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -60,13 +60,16 @@ STREAMED = ('.png', '.pdf')
|
||||
|
||||
|
||||
def render_seconds(item):
|
||||
"""The render limit of one item: RENDER_SECONDS for each part of its film."""
|
||||
"""The render limit of one item: RENDER_SECONDS for each part of its
|
||||
film, and one more for a film in parts: a cut moved back to a clear band
|
||||
(#136) can leave one part more than the layout alone counts."""
|
||||
production = item.get('production') or {}
|
||||
try:
|
||||
parts = len(part_cuts(production)) - 1 if production.get('placements') else 1
|
||||
except (KeyError, TypeError, ValueError, ArithmeticError):
|
||||
parts = 1
|
||||
return RENDER_SECONDS * max(1, parts)
|
||||
parts = max(1, parts)
|
||||
return RENDER_SECONDS * (parts + 1 if parts > 1 else 1)
|
||||
|
||||
|
||||
def generated_identity(order_id):
|
||||
|
||||
Reference in New Issue
Block a user