The obvious answer is to slice up your gun model into a number of sub-parts which individually aren't detected by the algorithm but collectively still form a functioning gun. And there's an unlimited number of ways to slice up a model, so it is impossible to create an algorithm which catches everything.
What's next, keep track of all printed parts and invent the math to recombine them in every way possible to see if it could form a gun? Trivially defeated by using multiple printers. Hmmm, sounds like a good reason to force everyone to register their 3D printer with their real identity, and only allow a print after the model has been uploaded to the Federal Printing Database for verification...