I want to mount a printed part to a standard 2mm motor axis which doesn’t have any dents or profile. Its just round. If I print at exactly 2mm, it fits for the first few times until it gets too lose and the spinning part sometimes falls off.
Sand a flat to create a D profile and then use a shaft collar and set screw
That you’re looking for is called a flange mount. If you search your favorite search engine with “2mm flange mount” you’ll find some results. I do wonder how much torque you’ll be able to transfer, but given the shaft size I suspect you’re not looking at big loads.
Rough sand the axis and add glue
Instead of making the hole the exact size, make a small gap so you can use a screw and nut to clamp it down on the peg
But doesn’t that create an offset weight? My part will probably spin at several thousand RPM.
What is the plastic of your choice?
PLA, PETG, … behave like a very slowly flowing liquid as such the print will deform/expand (creep).
Clamp it.