Evening, Just in case, let me go back to the beginning on focusing. DSLRs have two separate focusing systems - one through the viewfinder and one with liveview (which is essentially the same approach as mirrorless cameras utilize). I'm going to assume that you are finding that the bulk of the problems is using the viewfinder.
- Viewfinder - The light comes in through the lens, bounces off the mirror and up through the prism viewfinder to your eye. When you autofocus, there is a hole in the mirror, that takes part of the light and ricochets it down to the bottom of the camera where there is some AF circuits that figures out if the image is in focus, and if not, commands the lens to adjust the focus (out or in) to bring it into what it thinks as "in focus", then it takes the picture.
- LiveView - Again the light comes into through the lens, and since the mirror is up (preventing the use of the optical viewfinder), the light goes directly to the sensor, where the sensor detects focus, commands the lens to adjust focus, then captures the image.
The difference between the two is that liveview is right off the sensor, so the image is AF on to the sensor, and the focus should be perfect. With the optical viewfinder, the AF circuits residing on the bottom of the camera need to be aligned / calibrated so that when the AF circuits believes the image is in focus, it will really be in focus on the sensor. If not, the camera (K1, K3, etc.) has a fine tuning calibration process that you can do for each lens. The camera body has the ability to store these calibration data for 20 individual lenses.
A simple test would be to put the camera on a tripod or flat surface, AF with the viewfinder, take the picture. Then with out touching a thing, put the camera into LiveView, AF and take the picture. Then on your PC view each image - where the liveview image should be in perfect focus, and the viewfinder focused image may be a tad off. This is refereed to as either front focusing or back focusing. With front focusing, the area in front of where you actually focused is in sharp focus and the rest of the image is off. With back focusing, some of the area behind where you actually focused is in sharp focus, while where you actually focused is off.
Third party lenses can have AF problems. The Sigma 18-3/f1.8 lens optically is a great lens, but individual copies are notorious for having AF problems (across Canon, Nikon and Pentax). The third parties have to reverse engineer each AF lens system for each camera brand. This usually works well, but sometimes - it doesn't work as well as intended.