You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ebef738
Browse filesBrowse the repository at this point in the historyBrowse files
The bleed outline is traced, not scaled — and half a millimetre of it (#168)
Scaling the cut up by a percentage is not an offset. On a sticker three times
as wide as it is tall, the same percentage adds three times as much ink at the
sides as at the top, so the band came out fat on two edges and thin on the
others and looked like the cut had slipped. A second distance transform at the
bleed distance gives a band the same width the whole way round, which is what
a bleed is.
And half a millimetre rather than two. Two is what a shop asks for on a big
sticker; on a 26mm one it is seven per cent — wide enough that the band
bridges the gap between a hammer and the word beside it and the sticker
becomes a blob. A bleed is a dilation, and a dilation joins anything closer
together than twice its distance, so the number has to suit the sticker rather
than the trade convention.
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: lib/verify.mjs
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3790,6 +3790,9 @@ console.log('\none way in')
3790
3790
check('and that colour is sampled with the transparency kept', /"-background", "none", "-resize", "1x1!"/.test(prSrc) && /srgba\?\\\(/.test(prSrc))
3791
3791
// The cut is fitted to the ink, and the ink is not always centred in its
3792
3792
// cell, so growing the band about the cell pushed it off to one side.
3793
+
// Scaling the cut by a percentage is not an offset: on a sticker three times
3794
+
// as wide as it is tall it adds three times as much ink at the sides.
3795
+
check('the bleed outline is traced, not scaled', /let bleedD = null/.test(prSrc) && /q\(Math\.round\(offsetPx\) \+ round \+ bleedPx\)/.test(prSrc) && /path d="\$\{item\.die\.bleedD\}"/.test(prSrc))
3793
3796
check('and grown about the sticker, not the cell', /if \(inkMm\) cutMid = \{ x: inkMm\.x \+ inkMm\.w \/ 2/.test(prSrc) && /cutMid\?\.x \?\? cx \+ stickerMm \/ 2/.test(prSrc))
3794
3797
// Every derivation was defensible and the line still came out a fraction down
3795
3798
// and to the right: potrace does not put its output exactly where its bitmap
@@ -3806,7 +3809,7 @@ console.log('\none way in')
3806
3809
// the square it was traced in, each centred on the cell separately.
3807
3810
check('the drawing and the cut share one frame', /const frame = item\.die\?\.d \? item\.die\.square : box/.test(prSrc) && /const perPx = stickerMm \/ item\.die\.size/.test(prSrc))
3808
3811
check('and the bleed is a scale about the cell, not a second placement', /const bleedScale = item\.die\?\.d && stickerMm > 0/.test(prSrc) && /translate\(\$\{midX\} \$\{midY\}\) scale\(\$\{bleedScale\}\)/.test(prSrc))
3809
-
check("a sticker's bleed is not the sheet's", /stickerBleedMm = 2/.test(prSrc) && /stickerBleedMm \* 2\) \/ stickerMm/.test(prSrc) && /bleedMm: 3\.175,\n\s+stickerBleedMm:/.test(srvMb))
3812
+
check("a sticker's bleed is not the sheet's", /stickerBleedMm = 0\.5/.test(prSrc) && /stickerBleedMm \* 2\) \/ stickerMm/.test(prSrc) && /bleedMm: 3\.175,\n\s+stickerBleedMm:/.test(srvMb))
3810
3813
check('and the rail says which one it is', /'Sticker bleed \(mm\)', 'printBleedMm'/.test(uiMb))
3811
3814
check('but by default it is traced exactly as drawn', /const round = Math\.max\(0, Math\.round\(roundPx \?\? 0\)\)/.test(prSrc) && /const plain = need === 0/.test(prSrc) && /dieRoundMm: 0,/.test(uiMb))
3812
3815
check('and zero means no morphology at all, not a small one', /const shaping = plain\n\t\t\t\? \[\]/.test(prSrc))
0 commit comments