Printers and scanners are already regulated to not print very authentic copies of dollars. Maybe we could do the same with 3D printers?
It's relatively easy to detect modern US currency, it doesn't vary by much, and if you were to vary it a lot, it'd be an obvious counterfeit. Firearms don't operate like that. They are all wildly different designs with different complex parts. Even if you wrote something to detect the current models that are out there, they could be easily changed to be identically functional but unrecognizable.