I've written a first, very basic concept for the solver integration. This is not very useful at the moment, it's just to let you guys check if the basic idea behind it is ok with you. The code is in this repository, within the "assembly" branch (which is based on jriegel/dev-assembly): git@github.com:ickby/FreeCAD_constraint.git
Currently you can select two vertices and then hit the constraint button, they should be coincident afterwards.
1. The idea behind the implementation is to build up the solver incrementaly. This means that every new part gets added to the existing solver structure. Thats opposed to the complet recreation of the solving system with each recalculation like in the sketcher. At the moment the incremental creation brings not realy a huge speed up, however, this will change in the future when I get the time to implement my ideas for analysing. I therefore integrated the solver tightly into ItemPart and ItemAssembly. I would like to here if you can live with that, or if this way of integration is too tight.
2. I added helper functions to ItemPart and ItemAssembly to make it easyer to find the right Items for a given Document Object. Is this the right place for such functionality? We already discussed diffrent possibilities in the other thread, but I decieded to use this method as it seems more logical for me than a complete graph or linked based tree traversal. If this is not wished, I can of course change this (Thats the point for such an early showcase

3. I had problems getting the right value of the selected geometries. If the features underlying sketch is not rotated at all, the TopoDS_Shape of the Part gives the correct value. If it is rotated, it gives the local value, which is of course the same as the unrotated one. Now I could of cource extract the sketchbased feature from the document object and get the rotation value, but that is not very general as chamfer's for example are not derived from sketchbased. And a check for every possible type seems not very clever. Is there a better way of doing it? (in the current implementation the rotation is neclected and the results will be wrong after solving if the placement is not identidy)
4. My solver code is heavy template based and puts quite some pressure on the compilers. On windows I only tested it with VS 2010, so I would love to here experiences with other versions, if anyone usese one. EDIT: I develop on Linux with gcc, so that works too.
Love to here youre ideas and comments,
Stefan