I have been using my solidoodle 4 on little projects at home for about half a year now. And occasionally I need to mount my printed parts to something. Superglue takes to both ABS and PLA pretty well, but nothing beats the strength and durability of metal nuts and bolts.
This is my little trick of hiding the unsightly hardware in your printed part.
Step 1: Measure Hex nut
First you must measure the hex nut you plan on using. If you do not have calipers a quick google search will give you a chart and you can find the dimensions you need.
Step 2: Add cavity in your 3D CAD design
Here is an example of clearance for a 5/16-18 hex nut. I like to space my hex nuts about .100" from the surface. I give the hex nuts about .015" clearance per side for a light press fit (but that may differ with your printer).
Lastly, make sure to give plenty of clearance for the bolt to screw threw the hex nut.
Step 3: Slicing and Printing
After my slicing program is complete I look through the layers and determine the last layer before the cavity is closed up. In my example layer 35 is open and 36 is covered up.
From here I can either manually pause the print during layer 35 or I can insert a G-code text to pause and move the printer head.
Once paused I insert the hex nut and resume the print.
Step 4: Complete
Now you have a 3D printed part that can accept a threaded bolt
Step 5: Strength Analysis
Thanks for the comment stechi! I decided to put a little thought into the strength of hold this technique can yield.
First of all, I think there are at least (2) types of part mating we need to consider for strength analysis.
In this case the first thing to consider is how much space (Distance D) the printed part is spanning. I have not done any real tests, but I would guess at around 3.0" and larger tightening the bolt would warp the outer wall of the printed part and possibly break through. I think adjusting the print settings for wall thickness (T) and the infill % would help aid in the strength of this mate.
In this case the thickness (T) is sandwiched between the hex nut and the mating part. Minimal thickness is acceptable (too thin and you may see the hex nut's shadow). I have found the weakness of this mate (this would apply to the Open Mate) is torquing the bolt through the "interior perimeter thickness". Adjusting infill % helps aid in strength, but I have found adjusting the number of interior perimeter layers is most effective.
I do not have any torque wrenches to do a real test and I would be interested to see some results, but I can say they hex nuts hold pretty well with basic print settings. I would guess I can tighten the bolts around the same torque it takes to open a beer bottle before I hear cracking plastic.