fix: loose art nested by shape passes checkout again, and ink on ink goes to hand preparation (DTF-WEB-2B)
All checks were successful
Build and deploy / Validate source (push) Successful in 51s
Build and deploy / Integration suite on a real stack (push) Successful in 8m15s
Build and deploy / Secret scan and release gate (push) Successful in 9s
Build and deploy / Publish images (push) Successful in 1m27s
All checks were successful
Build and deploy / Validate source (push) Successful in 51s
Build and deploy / Integration suite on a real stack (push) Successful in 8m15s
Build and deploy / Secret scan and release gate (push) Successful in 9s
Build and deploy / Publish images (push) Successful in 1m27s
Since 27/11 (bb6fb14) the checkout refused any crossing rectangles. The Site nests loose art by its shape (Misturado, and Automático when it saves film), so rectangles cross where the art is clear, and honest carts were refused with "Duas peças da montagem ficaram uma sobre a outra". The print file composes with alpha_composite, so those layouts print right. Loose art: two pieces in one place are still refused (the stacked-copies price trickbb6fb14closed); partial crossing passes. Ready sheets: any crossing is still refused, sheets are never nested. When the film is composed, ink landing on ink (alpha > 10 on the same pixel) raises Unsupported, so the item goes to hand preparation with the reason instead of printing over itself. Contract: output/revisao/contrato-encaixe-forma.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -59,14 +59,23 @@ class OverlapTests(unittest.TestCase):
|
||||
Item.model_validate(loose([(0, 0), (20.5, 0), (0, 10.5), (20.5, 10.5)]))
|
||||
Item.model_validate(loose([(0, 0), (20, 0), (0, 10)]))
|
||||
|
||||
def test_pieces_on_each_other_are_refused(self):
|
||||
for layout in ([(0, 0), (0, 0)], [(0, 0), (10, 5)], [(0, 0), (19.9, 9.9)],
|
||||
[(0, 0)] * 100):
|
||||
def test_nested_rectangles_pass(self):
|
||||
# The Site nests art by its shape: rectangles crossing over transparent
|
||||
# parts are honest (Sentry DTF-WEB-2B, contrato-encaixe-forma.md K2).
|
||||
Item.model_validate(loose([(0, 0), (10, 5)]))
|
||||
Item.model_validate(loose([(0, 0), (19.9, 9.9)]))
|
||||
|
||||
def test_pieces_in_one_place_are_refused(self):
|
||||
for layout in ([(0, 0), (0, 0)], [(0, 0)] * 100):
|
||||
with self.assertRaises(ValueError) as caught:
|
||||
Item.model_validate(loose(layout))
|
||||
self.assertIn('uma sobre a outra', str(caught.exception))
|
||||
with self.assertRaises(ValueError):
|
||||
|
||||
def test_ready_sheets_never_cross(self):
|
||||
# Sheets go one under the other, never nested (contrato-encaixe-forma.md K4).
|
||||
with self.assertRaises(ValueError) as caught:
|
||||
sheet(gap=-5)
|
||||
self.assertIn('uma sobre a outra', str(caught.exception))
|
||||
|
||||
|
||||
class ClosePiecesTests(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user