I have implemented a very first version where only the planes work. But the result looks very promising. Currently the code only checks one snap object, so I have to add to run through all of them and select the one result which moves the object the shortest distance. Then I have to implement the functions to get the function to optimize and its gradient for the other two constraints. And finally I have to make a rather big change, currently the object always snaps to the constraint, but I have a mode where objects move parallel to the constraint. That means I need to modify the objective functions a bit.
And finally I have to add all this to the case where multiple points move independently. Then it should work and I can test if it works well in practice on the bridge model.