When designing 3D models in Solidworks with the intent of fastening with machine screws, you might not think of directly modeling machined threads into your design. If your threads are coarse enough though, it may work better than modeling a hole with no threads since you won’t have to use a nut or threaded insert hardware.
As an example, I recently modeled a part that would be attached to a tripod. A tripod bolt is typically 1/4 inch diameter x 20 threads per inch. It’s not too hard in Solidworks to model a threaded hole. Basically it’s a matter of creating a helix, creating a sketch that defines the thread cut shape, then perform a swept cut.
Triangular shape used to cut threads.
Depending upon the resolution of your 3D printer, your results will vary. I used an FDM printer that has a .2mm per layer thickness at the finest setting, and it worked well enough. The fit was a little tight, but not too bad. You may have to experiment with the thread modeling to get it just right. I have also found that if you get the untapped hole size correct you can cut threads with a fine pitch machine screw though it’s a bit tough. I have used that technique with 4-40 screws and it worked well enough to fasten 2 parts together. Calling it “cutting threads” with a 4-40 screw may be a little generous, but it did the job
I’d certainly consider using this technique for coarse machine threads into printed plastic. You could even use it for a better fit for self tapping screws, as it may help relieve stress as well as prove better for straight insertion of the screw rather than being at an angle which sometimes happens with self tapping screws. Your 3D print will not be as pretty as the above rendered threaded hole, but should be good enough to enable use of a threaded screw and integrating the nut right into the 3D print.