Moreover, how could this be implemented? Determining the 3D volume which a given G-code file will result in is something which the industry would find very useful, but no one has yet achieved. Doing so would probably simultaneously result in the folks doing so being awarded a Fields Medal and the Turing Award (in addition to making a boatload of money licensing the resultant software/patent).
On top of that, how does one resolve the matter of the same G-code file (for two nested circles plus some machine-specific codes) resulting in either a metal washer, or a lamp base, depending on whether run on a machine set to metric w/ a coolant system, or Imperial w/ a tool changer?
Lastly, who creates the list of forbidden parts? How will it be curated? And most importantly, how will it be secured that it isn't a set of blueprints which are then used to make firearms?
A more reasonable bit of legislation would be one which required folks who are barred by statute from owning firearms (convicted felons (who have not had their rights restored)/convicted of misdemeanor domestic abuse) to approve with their parole officer any file for a part/object made by a 3D printer or CNC machine before submitting it to the machine.