If you define stock size, you also have to define the home datum relative to the lower left (or some point) on the stock. It would require 6 variables, length, width and height, and X,Y,Z to home.
One could also make an initial cut from lower left to upper right of stock. before cutting the actual program. This would have to be remarked out before actually cutting, come up with some other way make sure it wasn't actually cut.
Or you could have another window that stored the current 6 values, like the tool table that was save and trayed the same until changed.
Just ideas.
I always like to simulate a cut before making it, to me it is a very valuable tool for students to visualize their path before a program is tried in a real machine with real material.