Re: G-code array/transform without CAM
hy, if possible, generate the coordinates of the minimal bounding rectangle, like 150*100
... get blank dimensions
... if blank_width<150 or blank_height<100 then halt
... repetitions among x := floor [ blank_width / 150 ]
... repetitions among y := floor [ blank_height / 100 ]
... generate a nc file that shifts the origins, and loads the main program after each shift
... load that file & execute
if the nc can't generate a file, then store the origins inside global variables; for example, initialize 100 variables with -1 ( considering that each potential origin is > 0, so to avoid conflicts ), then start loading data into them :
... v1, v2 := x1, y1
... v3, v4 := x2, y2
etc
from 1 to 50, if v [ i ] + v [ i + 1 ] <> -2 then shift origin & run program, else halt / kindly
ps : if possible ($$$), build a soubroutine to search the blank on the table
Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg