Software that makes placemats

Organise events to meet up and drink Port.
User avatar
jdaw1
Cockburn 1851
Posts: 23613
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 »

Added RotationTitlesAboveBelowOverCirclearray, use of which can be seen in the placemats for Griff’s departure down under.
Glenn E.
Graham’s 1977
Posts: 4172
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. »

Bug: /GlassesOnSheetsMaxPerSheet 999 def does not have the desired effect when /PaperType /USLegal def. Instead, it appears to revert to the default for /GlassesOnSheetsMaxPerSheet for that paper type, which is 9.

I was able to work around the problem by changing the default behavior to 10, which was the number of glasses that I wished to place on each sheet.
Glenn Elliott
Glenn E.
Graham’s 1977
Posts: 4172
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. »

While I'm doing QA, I just downloaded a fresh copy of the software from http://www.jdawiseman.com/placemat and it still contains the following comment:

% GlassesOnSheetsMaxPerSheet: 6 default, USLegal => 9; A3 or USL2 => 13. For all on one sheet replace with "/GlassesOnSheetsMaxGlassesPerSheetInDefault 999 def".

/GlassesOnSheetsMaxGlassesPerSheetInDefault is not used anywhere else in the software, so setting it to 999 will have no effect.
Glenn Elliott
User avatar
jdaw1
Cockburn 1851
Posts: 23613
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 »

GlassesOnSheetsMaxGlassesPerSheetInDefault is used in the next line of the parameters.

Edit: I renamed parameter, but not in comment. Sorry. It should be GlassesOnSheetsMaxPerSheet. Fixed in new version of code.
Glenn E.
Graham’s 1977
Posts: 4172
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. »

Glenn E. wrote:Bug: /GlassesOnSheetsMaxPerSheet 999 def does not have the desired effect when /PaperType /USLegal def. Instead, it appears to revert to the default for /GlassesOnSheetsMaxPerSheet for that paper type, which is 9.

I was able to work around the problem by changing the default behavior to 10, which was the number of glasses that I wished to place on each sheet.
I spoke too soon.

Caveat: I am working on Windows 8 and am unfamiliar with the applications that come pre-installed on a Windows 8 box. It is entirely possible, if not probable, that my difficulties are derived from this and not from the code. However...

My work around above did indeed put 10 glasses on each sheet, but the sheets were USL and not USLegal. When printed they left a good chunk of white space (3") on the tail end of the sheet. The arrangement of glasses should have tipped me off, as the software created a hex-ish pattern 2-3-2-3 when I was expecting the more normal slightly staggered straight rows of 3-4-3.
Glenn Elliott
User avatar
jdaw1
Cockburn 1851
Posts: 23613
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 »

Please post a link to a PDF and state clearly what you believe to be the bug.
Glenn E.
Graham’s 1977
Posts: 4172
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. »

Neither pdf nor ps are allowed as uploads. I've spent too much time on this today... we'll do without placemats this time and I'll try to figure out what happened later.
Glenn Elliott
Glenn E.
Graham’s 1977
Posts: 4172
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. »

Success. The problem appears to have been with Windows 8's "Reader" app. It looks like it recognizes US Legal size paper, but in reality it appears that it does not because USLegal files sent to a printer are instead re-sized to fit on USL but then printed on USLegal anyway. I was able to print successfully once I forced Windows 8 to use Word to open the pdf, converted the pdf to Word format (at the risk of losing fidelity), then converted it again to editable format because it wouldn't let me print otherwise.

*sigh*

This bug remains:

/GlassesOnSheetsMaxPerSheet 999 def does not have the desired effect when /PaperType /USLegal def. Instead, it appears to revert to the default for /GlassesOnSheetsMaxPerSheet for that paper type, which is 9. It does have the desired effect when /PaperType /USL def or /PaperType /USL2 def.
Glenn Elliott
User avatar
jdaw1
Cockburn 1851
Posts: 23613
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 »

The ante-penultimate bullet of the green box describes a bug with Konica Minolta printers. Please could you write a concise description of problem and solution for me to add int he same place?
Glenn E. wrote:/GlassesOnSheetsMaxPerSheet 999 def does not have the desired effect when /PaperType /USLegal def. Instead, it appears to revert to the default for /GlassesOnSheetsMaxPerSheet for that paper type, which is 9. It does have the desired effect when /PaperType /USL def or /PaperType /USL2 def.
I suspect that you are doing /GlassesOnSheetsMaxPerSheet 999 def, without having deleted the usual definition of GlassesOnSheetsMaxPerSheet, which is therefore redefined to its default value. If not that, please email me your code.
User avatar
jdaw1
Cockburn 1851
Posts: 23613
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 »

[url=http://www.theportforum.com/viewtopic.php?p=56530#p56530]Here[/url] jdaw1 wrote:New draft of the placemats.
  • Completely redone, hopefully in accordance with instructions received from DRT.
Image
[url=http://www.theportforum.com/viewtopic.php?p=56544#p56544]Three posts later[/url] DRT wrote:Could you please change the order of the subtitles to correspond with the above and set the parameters so that they appear as:

1 4 7 10 13
2 5 8 11 14
3 6 9 12 13
After which,
[url=http://www.theportforum.com/viewtopic.php?p=56546#p56546]Here[/url] jdaw1 wrote:Updated draft of the placemats.
  • Slightly redone, hopefully in accordance with instructions received from DRT.
Image
In light of all of which, recall that
Twenty-seven days ago, [url=http://www.theportforum.com/viewtopic.php?p=55783#p55783]here[/url], jdaw1 wrote:DRT seems to be asking for another setting, PackingNestingOrder, with allowed values of /RowsThenColumns (current behaviour) and /ColumnsThenRows.
Action is needed.
Glenn E.
Graham’s 1977
Posts: 4172
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. »

jdaw1 wrote:
Glenn E. wrote:/GlassesOnSheetsMaxPerSheet 999 def does not have the desired effect when /PaperType /USLegal def. Instead, it appears to revert to the default for /GlassesOnSheetsMaxPerSheet for that paper type, which is 9. It does have the desired effect when /PaperType /USL def or /PaperType /USL2 def.
I suspect that you are doing /GlassesOnSheetsMaxPerSheet 999 def, without having deleted the usual definition of GlassesOnSheetsMaxPerSheet, which is therefore redefined to its default value. If not that, please email me your code.
Relevant code as used. This is the version that "worked" because I changed the USLegal default to 10, but I'm confused that it worked because I also attempted to comment out that section of the /GlassesOnSheetsMaxPerSheet definition. Note inserted 'def %'. Despite that insertion, the change from /USLegal eq {pop 9} to /USLegal eq {pop 10} had an effect.

I think. To be honest, after struggling to get the placemats created for a couple of hours (off and on while also working), I can't be 100% certain of which steps I tried in which order. I thought it would be a simple change due to a simple mistake every time I made a change, so didn't keep track as I made them. I also reverted to a clean copy of the software on more than one occasion to ensure that I hadn't accidentally totally mucked things up at some point.

% % % % % % % % % % % % % % % % % % % % % % %
% Page Organisation and Page-Level Features %
% % % % % % % % % % % % % % % % % % % % % % %

% GlassesOnSheetsMaxPerSheet: 6 default, USLegal => 9; A3 or USL2 => 13. For all on one sheet replace with "/GlassesOnSheetsMaxGlassesPerSheetInDefault 999 def".
/GlassesOnSheetsMaxPerSheet 999 def % /PaperType load dup /A3 eq exch /USL2 eq or {pop 13} if /PaperType load /USLegal eq {pop 10} if def
/GlassesOnSheets [
% For a custom arrangement replace the next line with something of the form "[0 1 2 3] [4 5 6 7 8 9] [10 11 12 13]"
% The code below spreads glasses evenly over the sheets, the one-larger sheets being last. For them to be early replace "floor" with "ceiling"; for them to be evenly distributed with "round".
<< /p Titles length GlassesOnSheetsMaxPerSheet div ceiling cvi /g 0 >> begin 0 1 p 1 sub {[exch p sub g Titles length sub exch div floor cvi {g /g g 1 add def} repeat]} for end
] def % /GlassesOnSheets

/GlassesOnSheetsMaxPerTNSheet GlassesOnSheetsMaxPerSheet dup 8 gt {pop 6} if def % 8 gives per page leaves just enough writing space.
/GlassesOnTastingNotePages [ % Consider "/GlassesOnTastingNotePages GlassesOnSheets def"
<< /p Titles length GlassesOnSheetsMaxPerTNSheet div ceiling cvi /g 0 >> begin 0 1 p 1 sub {[exch p sub g Titles length sub exch div floor cvi {g /g g 1 add def} repeat]} for end
] def % /GlassesOnTastingNotePages
Glenn Elliott
User avatar
oscar quevedo
Fonseca LBV
Posts: 119
Joined: 19:48 Wed 08 Jul 2009
Location: Douro
Contact:

Re: Software that makes placemats

Post by oscar quevedo »

Thank you Julian, I've made my first placemts! It is possible :D
User avatar
jdaw1
Cockburn 1851
Posts: 23613
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 »

oscar quevedo wrote:Thank you Julian, I've made my first placemts! It is possible :D
And thank you for also mentioning it in a tweet.
Glenn E.
Graham’s 1977
Posts: 4172
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. »

oscar quevedo wrote:Thank you Julian, I've made my first placemts! It is possible :D
Don't let my struggles this time around mislead you. I use Julian's software for most of the tastings I do and it's great!
Glenn Elliott
User avatar
jdaw1
Cockburn 1851
Posts: 23613
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 »

Glenn E. wrote:Bug: /GlassesOnSheetsMaxPerSheet 999 def does not have the desired effect when /PaperType /USLegal def. Instead, it appears to revert to the default for /GlassesOnSheetsMaxPerSheet for that paper type, which is 9.
Works for me, as I have replaced the default definition with that in your subsequent post.
jdaw1 wrote:I suspect that you are doing /GlassesOnSheetsMaxPerSheet 999 def, without having deleted the usual definition of GlassesOnSheetsMaxPerSheet, which is therefore redefined to its default value. If not that, please email me your code.
Still seems likely to me.

Please email your whole PS.
User avatar
jdaw1
Cockburn 1851
Posts: 23613
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 »

jdaw1 wrote:
Glenn E. wrote:I'm also pleased to now know of the existence of /PackingDirectionVertical and /PackingDirectionHorizontal.
Happiness. But PackingNestingOrder is, currently, only a planned parameter. It does not yet exist.
Done: +PackingNestingColumnMajor.
Glenn E.
Graham’s 1977
Posts: 4172
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. »

Sent. Though in writing the email I believe I figured out where my comprehension of the code was failing. I was less than precise in previous posts, not understanding that the lack of precision was in fact the cause of my lack of comprehension.

/GlassesOnSheetsMaxPerSheet 999 def does in fact work exactly as desired.

/GlassesOnSheetsMaxPerSheet 999 def % /PaperType load dup /A3 eq exch /USL2 eq or {pop 13} if /PaperType load /USLegal eq {pop 10} if def does also because the '%' comments out the rest of the line.

/GlassesOnSheetsMaxPerSheet 999 /PaperType load dup /A3 eq exch /USL2 eq or {pop 13} if /PaperType load /USLegal eq {pop 10} if def does not work like I thought it was going to work because I didn't understand that the rest of the line was overriding the '999' I'd inserted when the paper type was set to A3, USL2, or USLegal. I thought that the '999' would set the default for all paper types because it was larger than 13 (for A3 and USL2) and 9 (for USLegal).
Glenn Elliott
Glenn E.
Graham’s 1977
Posts: 4172
Joined: 22:27 Wed 09 Jul 2008
Location: Seattle, WA, USA

Re: Software that makes placemats

Post by Glenn E. »

jdaw1 wrote:
jdaw1 wrote:
Glenn E. wrote:I'm also pleased to now know of the existence of /PackingDirectionVertical and /PackingDirectionHorizontal.
Happiness. But PackingNestingOrder is, currently, only a planned parameter. It does not yet exist.
Done: +PackingNestingColumnMajor.
Am I correct to understand that the previous discussion's /PackingNestingOrder /ColumnsthenRows def is now performed by PackingNestingColumnMajor /True def?

That and the two /PackingDirection parameters are wonderfully useful. Thank you.
Glenn Elliott
User avatar
jdaw1
Cockburn 1851
Posts: 23613
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Re: Software that makes placemats

Post by jdaw1 »

Glenn E. wrote:Am I correct to understand that the previous discussion's /PackingNestingOrder /ColumnsthenRows def is now performed by PackingNestingColumnMajor /True def?
Actually /PackingNestingColumnMajor true def.
User avatar
jdaw1
Cockburn 1851
Posts: 23613
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 »

Glenn E. wrote:Sent. !

/GlassesOnSheetsMaxPerSheet 999 def does in fact work exactly as desired.
It seems, from this and by email, that everybody is now happy.
User avatar
jdaw1
Cockburn 1851
Posts: 23613
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 »

How could PermittedPackingStyles be generalised?

The Malvedos blog has an article about a tasting of the 2011 ports, in which placemats had circles set in a pleasant semi-ellipse. Cynthia kindly responded to my request for a clearer picture.
Image

Naturally, I could make /SemiEllipse a valid item in PermittedPackingStyles. Sure.

And there should be an upside down version, /SemiEllipseMirror. And there should be a version with one extra glass in the centre of the empty long edge (/SemiEllipsePlus1, /SemiEllipseMirrorPlus1), and with two such glasses side by side (/SemiEllipsePlus2, /SemiEllipseMirrorPlus2), and one with three in a triangle (/SemiEllipsePlus3, /SemiEllipseMirrorPlus3). Clunkytastic.

Indeed, this problem already exists:
/PseudoHexagonal and /PseudoHexagonalMirror;
/RectangularDislocation and /RectangularDislocationV;
/RectangularAlternateNudge and /RectangularAlternateNudgeMirror and /RectangularAlternateNudgeIf2pt and /RectangularAlternateNudgeIf2ptMirror;
/Irregular and /IrregularMirror and /IrregularPortrait and /IrregularLandscape and /IrregularMirrorPortrait and /IrregularMirrorLandscape;
• and, further, /Gaia and /GaiaElegant should acquire !Plusn variants.

PermittedPackingStyles should be generalised. But how? That is, how could a style set be parameterised?

I think the simplest way is to allow array entries. So valid items of PermittedPackingStyles might include (with some non-code punctuation suppressed for legibility):
â—Š /SemiEllipse
â—Š [ /SemiEllipse ]
â—Š [ /SemiEllipse /Mirror ]
â—Š [ /SemiEllipse /Mirror 0 ]
â—Š [ /SemiEllipse /Mirror 3 ]

An alternative would be to have extra parameters of the likes of PermittedPackingStylesMirrored and PermittedPackingStylesExtras. These arrays would have to be the same length as PermittedPackingStyles, with corresponding items in the same position.

Please could members of the Taylor ’77 Working Group reply with thoughts and preferences.
PhilW
Dalva Golden White Colheita 1952
Posts: 3503
Joined: 14:22 Wed 15 Dec 2010
Location: Near Cambridge, UK

Re: Software that makes placemats

Post by PhilW »

jdaw1 wrote:Please could members of the Taylor ’77 Working Group reply with thoughts and preferences.
I think we need more Taylor '77, although I'd prefer some Fonseca '77... :tpf:

oh, ok then... I would note that some of the modifiers (mirror, invert, rotate) could be post-layout applied, some could not (plus1, plus2, other variants). These could therefore be applied separately, by first definining a basePackingStyle array comprising the variants without translation, and then allow translation-only modifiers on these to form the permitted packing styles, e.g.

basePackingStyles
â—Š [ /SemiEllipse ]
â—Š [ /SemiEllipse /plus1 ]
â—Š [ /SemiEllipse /plus2 ]
...

permittedPackingStyles
â—Š [ /basePackingStyles ]
â—Š [ /basePackingStyles /mirror ]
â—Š [ /basePackingStyles /invert ]
â—Š [ /basePackingStyles /rotate_90 ]
...

Excuse the imprecise syntax, but hopefully the idea/intent is clear. however, this would only be a good solution if the code would be able/wanted to support all translation variations for all basePackingStles. If you prefer to restrict the translations to a subset available per basePackingStyle, then the single array defining all possible combinations as per your post would seem like the better approach.
User avatar
jdaw1
Cockburn 1851
Posts: 23613
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 »

PhilW wrote:if the code would be able/wanted to support all translation variations for all basePackingStles
Well, the user might want the code to choose the better (the larger radius) of base style X unmirrored, or base style Y mirrored. Which I don’t think your allows. Or I’ve misunderstood.

Also keep in mind that users range from weapon-grade geek to those who rarely, if ever, write a line of code. Simplicity of use is a desideratum.
User avatar
jdaw1
Cockburn 1851
Posts: 23613
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 »

jdaw1 wrote:â—Š [ /SemiEllipse /Mirror 3 ]
PhilW wrote:â—Š [ /SemiEllipse /plus2 ]
Just noticed this clash. As words in the PostScript language are lower case, my parameters are in CamelCase. So /Plus2 fits my style better than /plus2. But PhilW is correct about not using an unadorned integer, which might have multiple meanings, and in this context, must be ≤3.

The current code includes

Code: Select all

/RowsMinNum 1 def
/RowsMaxNum 65535 def
This is applying at the wrong level. But there is a large range of possible row numbers.

Which suggests, despite the upper bound of 3 on the /Plus’ness, we should allow the likes of:
◊ [ /PseudoHexagonal   /MinRows 3   /MaxRows 5   /Mirror ]
◊ [ /SemiEllipse   /ExtraCircles 2   /Mirror ]
Then the row control can be different for different base styles; and each style can be parameterised as suitable.

Again I ask, please could members of the T77WG reply with thoughts and preferences.
User avatar
jdaw1
Cockburn 1851
Posts: 23613
Joined: 15:03 Thu 21 Jun 2007
Location: London
Contact:

Re: Software that makes placemats

Post by jdaw1 »

Slight change of mind again.

The first parameter of the array is the base class. After that things come in pairs, being the sub-parameter and its new value. So allowed items of PermittedPackingStyles include:
◊ [ /PseudoHexagonal   /MinRows 3   /MaxRows 5   /Mirror true ]
◊ [ /SemiEllipse   /ExtraCircles 2   /Mirror true ]

Hence items of PermittedPackingStyles are either /names, or arrays of odd length with the first and even-number items (starting at 1) being /names. Objections?

(Next post on next page: please help the reader by starting with a concise quote.)
Post Reply