“Usually when ordering ready PCB modules, we rarely want to use them as-is. That’s why we design enclosures for them (or better yet, find it designed by someone else and just print - but I’m not going to cover it here). When designing an enclosure, it’s immensely helpful to have a model of the board to do test fittings.
My usual approach to this problem was:
find or create a 3D board for the model. Creating a model for the PCB involves:
copying the board outline and every relevant part of its geometry,
for each component on it you search GrabCAD and the like, and in case of coming up short you DIY,
Align every single component to the board.
load it into CAD software and design the enclosure around the model.
At the end of this process you have the enclosure that’s a 100% fit for your board, because in CAD software you can spin and modify and test fit those models all you want.
The trouble is, each part of this process can be quite labor-intensive! For PCBs costing a buck, you might feel that it’s not worth the effort, and you’d be right.”