I spent hundreds of hours generating drawings for Arrakis 2.0, all 590 x 980 mm. Arrakis 3.0's drawing area is 465 x 1005 mm so those Arrakis 2.0 drawings won't work on Arrakis 3.0.
Until now!
I wrote a Perl program, sandify_scale.pl, that scales the Arrakis 2.0 drawing files to fit on Arrakis 3.0. The program will actually scale any size rectangular drawing file to any other size, so if I make more tables of different sizes, the drawing files can be reused without having to write another program. It can be used to scale drawings that I make for Arrakis 3.0 to run on Arrakis 2.0.
The program works like this (skipping some details):
1) Get user input of drawing filename and new maximum X and Y values (new max X and new max Y).
2) Scan the input file line by line and extract it's maximum X and Y values (old max X and old max Y).
3) Calculate scaling factors for X and Y (sfx=new max X/old max X and sfy=new max Y/old max Y).
4) Read the input file line by line again and write the lines to the output file. If the line read in is a G1 line, check to see if the values are equal to old max X or old max Y. If so, set the X or Y values to write to the output file to the new max X and/or new max Y. Otherwise, multiply the X and Y values by the scaling factors before writing the results to the output file.
The program is written specifically to handle the dual speed files generated using dual_speedify_v2.pl that enables dual speed operation - fast around the edges to speed drawing time and reduce boredom, and slower everywhere else to preserve drawing details. That program appends an Fxxxx speed specifier to each line in the pattern file that specifies ball motion (G1 lines). Sandify_scale.pl copies the Fxxxx designators from the input file and writes them to the output file, preserving the two speed operation.
I have converted over 200 drawing files from Arrakis 2.0 to Arrakis 3.0 size. In that process I ran into two issues. Sandify used to write G01 statements to specify motion in the drawing files. At some point in 2022, Sandify was upgraded and started writing G1 statements instead of G01. I had to tweak the scaling program a little - instead of looking for G1 statements, it had to look for G01 statements in the old files. The other problem was some of the Arrakis 2.0 drawings didn't use the full size of the table, so when sandify_scale.pl reads the maximum X and Y from the source file, it will scale them to the limits of the Arrakis 3.0 drawing area. For example, if the maximum Y value read from the Arrakis 2.0 source file is 800 (not 980, the maximum Y value possible on that table) the 800 will be replaced by new max Y = 1005 in the output file. The Y scaling factor will be calculated on the 800 value, so input files will be stretched to exactly fit the limits of Arrakis 3.0.
I set Arrakis 3.0 up for random operation as explained here. I tweaked the delay on each pattern's completion to 5 minutes, instead of 1 minute. It seems more appropriate to leave the finished pattern on the table longer at home than in a public venue.
