Estimate affine transform with constraints

I’m at 2D and need to derive the affine transform between two sets of points.

For the general case there is cv::estimateAffineTransform2D.
If there is no shearing there is cv::estimateAffineTransformPartial2D,
which has 4 degrees of freedom: tX, tY, scale and rotation.

In my case I sometimes know the value of one or more of these four.
Using cv::estimateAffineTransformPartial2D often generates
good approximations of them, but sometimes it does not. The alg seems to be sensible.

So my question (you will have guessed already):
Is there a way in OpenCV to provide beforehand values for one or more of
tX, tY, scale and rotation, so the calculation will be done with fixed value for it?
Or do I have to use external statistic optimization algs for that?