I used two transform constraints.
- One resets the position of the pivot of the leg bone by having rotate set to 100 but a different position,
- Then we have a child bone to this pivot-reset (I wonder if it's a redundant bone, but it helps me get less confused)
- Then there's the bone on the knee that copies via a translate constraint the child bone. Translate is set to 200 though. This bone is child to the main leg like the first one.
After this I turned the tiny part that covers the circle into a mesh, I tweaked the weights and this is the result.
Having the possibiity to copy just x or y instead of both would have been pretty useful, probably would have saved the creation of some bones and the double contraint thing.
I can't share the project unfortunately because it's work stuff, but I hope this might be enough to help (: