Thanks for the answer. Unfortunately I have to let the points 1 and 2 drive the animation as they will both be receiving their motion from the wheels, so I will end up in the hard-to-solve class of problems.
I guess you are on to something when you are talking about positions limited by shapes. As you say: it should be possible to express the position of the point 3 in terms of the points 1 and 2 using mathematical constraints.
This got me thinking and actually I think you could express the entire problem as a Constraint Satisfaction Problem (https://en.wikipedia.org/wiki/Constraint_satisfaction_problem
) in two dimensions where there are five known variables (x and y position of the points A and E, and the y position of the point C, as it is fixed) and five unknown variables (x and y of the point B and D and the x position of the point C). Then you need at least five constraints to eliminate the unknown variables, something like:
- length(A, B) = some known constant
- length(B, C) = some known constant
- length(C, D) = some known constant
- length(D, E) = some known constant
- length(B, D) = some known constant
- Cx < Ax (To force the solution where the C point is to the left of the A point)
Then you either use a CSP solver to solve the problem and find the correct assignment of the unknown variables given the known, or you do some math with the constraint equations and solve for Cx. This will be a little bit tricky due to the squares and square roots used in the length equations, but I think I will try to solve it once I get the time.
I guess, if you find the equation for Cx you could implement the equation as a driver in Blender to place the point C depending on the position of the points A and E. I have never used Drivers, but it should be possible to use Python expressions, so I assume it would be no problem to express the equation. Then you will have the positions of these three points and it will be trivial to add IKs to find the position of B and D. (Or solve for those in the equations as well)
I think it is doable, but it seems very tricky, so any simpler way to set it up would be appreciated.
Thanks for the new animation file!
It works as long as the movement of the two animated points are not to big. Is far as I could find, there are nothing that really constrains the height of the orange/yellow “combination lever”, so in case the movement gets too big, the drifting of the orange/yellow lever will be quite noticeable. For example, if you move to frame 40 and then rotate the TopDrive bone to 45 degrees in either direction, the yellow combination lever will clearly break free of the valve stem. But this pose should definitely be possible for a rig to find a correct solution for in my opinion!
I realized there must be a slight sliding of the radius bar in the expansion link, this was something i noticed during my own attempts to rig it, but thanks for pointing it out! One interesting problem here that the blend file you sent has not taken into consideration (for the sake of simplicity I guess) is that the movement of the “top drive” will not come from the lifting link by from the expansion link, and the position inside the expansion link will be determined by the length of the lifting link, which in turn has a fixed upper position determined by the rotation of the lifting arm. This is an interesting problem and I think this could be solved in some way by finding the theoretical center of the expansion link arc and let the armature motion start from there via a bone to the expansion link and then a bone for the radius bar. But here I have faced the same kind of problem again as is the reason for me starting this thread: the radius bar is part of a IK chain and its location must be constrained in a point in-between (or as in this case: on the extrapolation of a bone) two bones. So I wish there was a easy but exact and robust way to rig it.