Thu, 10/06/2011 - 19:11
I've encountered a bug in the new version of the BRepExtrema_DistShapeShape.
I need to find the minimal distance between an edge and a face.
but instead of calling the BRepExtremaDistShapeShape constructor with the edge and the face, i make a LoadS1 with the edge and thanks a TopExpExplorer over the face, i iterate over the edges of the face making a LoadS2 with the current edge of the face given by the explorer.
The problem encountered is that the PointOnShape1 and the PointOnShape2 are inverted (PointOnShape1 give a point which is located on the shape 2 !! And vice versa) but not on every step of the loop !!!
It's really strange because it's not only a inversion of PointOnShape1 and PointShape2 because on some step give the good point and another step of the loop give a wrong result.
I checked the same test (except setting the flag distShapeShape.SetFlag(Extrema_ExtFlag_MIN) which is only in the 6.5.1)) in the 6.3.1 and it works.
It seems to be a problem with the new version of this class in the 6.5.1.
In the archive i've put an image with the edge in green and the face in black, the brep file and the test_case.
At the first step of the loop, the values of PointOnShape1 and PointOnShape2 are already inverted.
Thanks in advance.