I created M12 bolt and nut. I create both the nut and bolt in shapr3d as normal. Before I do a subtract, I use scale (x and y only) and scale my bolt to acquire the proper clearance. Once this is set, I subtract to establish the proper thread in the nut. Once this complete, I use scale to put the bolt back to its M12 dimension (x and y). You see the results below. 3D print and the nut screws on the bolt easily. Checking dimensions, the dimensions are within tolerances.