Hello, I looked at the code and since it was quite messy, I tried to clean it up. See the current version at http://svn.berlios.de/wsvn/yade/branches/scons-layout/pkg/dem/Engine/EngineUnit/InteractingBox2InteractingSphere4SpheresContactGeometry.cpp?op=file&rev=0&sc=0 (make sure you have browser encoding set to UTF-8, otherwise you will not see images properly).
It is functionally equivalent, and I have doubts about the case where sphere's center is outside the box: see the image and FIXME below it in the else branch of "if(inside)". I think it is wrong, but perhaps I made a mistake. Otherwise, that should give you idea where is the contact point - always in the middle between pt1 and pt2. Regards, Vaclav _______________________________________________ Yade-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/yade-users
