How to use auto focus along side with 3d reconstruction using python opencv
With a cheap webcam? No.
Get yourself a better lens with longer depth-of-field and/or an iris that can be closed

Edited
By "cheap webcam" above I mean any autofocus camera/lens combination without (a) highly repeatable focusing geartrain and (b) programmatic access to the lens focus control setting. Point (a) is - of course - required for any form of calibration. Point (b) allows one to build a table of calibration parameters keyed on the focus setting.  I have seen this done in some applications where dynamical focusing was an unavoidable requirement, but the necessary gear tends to be very expensive and fragile.
Problem statement
I doing 3D reconstruction using Logitech webcam with fixed lens before. Every time I change distance between scene and camera I need to manually adjust lens focus by hand. (Open the cover and turn lens knob) which very inconvenience. So I decide to by new webcam with auto focus feature (Logitech C922) and gonna use it in project. than I notice then when focus change, The image change a bit not only blur and  sharpness and also scaling.
    I've read the article about camera calibration, it said I must fixed focus length when calibrating and and use same focus length while running application. which means I need to re-calibrate every time I use camera in new environment (distance changed cause focus length to change).
The question

The focus length only move the lens form image sensor, is it possible to find relation of camera focus value to camera matrix (intrinsic and extrinsic) and how?
How to use camera in vary distant without re-calibration?