b2PulleyJoint and "rope" behavior

Hello!
I am trying to add a "rope" behavior to PulleyJoint... According to box2D manual : "The total length of the pulley rope is conserved according to the initial configuration".

But this give a very strange behavior when second body is on an horizontal surface : the body is pushed according to first body...
I tried to modify b2PulleyJoint::SolveVelocityConstraints and b2PulleyJoint::SolvePositionConstraints but without success.

Has someone any idea how I can achieve this type of effect?

Thanks in advance,
Thibault!
If I'm understanding your question correctly, you want to prevent the rope from "pushing", so that it only "pulls"? In this case, rather than a constant-length constraint, you want a max-length constraint.
Hello!
Yes, that is exactly what I want : a max-length constraint (sorry for my bad explaination, I'm not a native english speaker 😉!

Do you have any idea on how to achieve this?
Thanks!
If you think about the contact constraint, it's a sort of min-distance constraint (I forget what the convention is in box2d, but assume that negative distance means penetration into the ground) -- the min distance is 0 for contacts. You should be able to apply the same sort of approach for a max distance constraint (or, I would assume any constraint with min/max limits should be analogous).

I'm not sure of the specifics since it's been a while since I looked at box2d 🙁

Original thread: https://box2d.org/forum/viewtopic.php?t=9126