M4 screw and nut for 3D printing?
You can get a model for nearly everything McMaster-Carr sells from their website.

M4 Hex Head Screw - https://www.mcmaster.com/#91280a140/=15dmpx8

M4 Nut - https://www.mcmaster.com/#90592a090/=15dmqjy

The options to download models are to the right of the drawings.



NOTE: the site does prohibit use of these models for direct printing.


  You shall not use a CAD model to engage in 3D printing or other
  fabrication of the object depicted in the CAD model for any other
  purpose. You shall not otherwise redistribute or make available the
  CAD models (or any design drawings or prototypes that incorporate
  them) to any third parties, including third parties in the business of
  selling products similar to the products sold by us.