The ways that i've seen proposed for the 3d printer to determine if the thing you are printed is "gun related" was to force them to be internet connected, and to send your print files to some 3rd party (or government) server before you are allowed to print.
How is that less invasive?