Archived issue #0023051
Bug in BRepExtrema_DistShapeShape (through BRepExtrema_DistanceSS)
Description
The problem is reported by Author on OCCT User's forum at http://www.opencascade.org/org/forum/thread_23040:
----------
When computing the distance between a face or edge and a vertex, with the vertex as the second argument, PointOnShape1 and PointOnShape2 results are switched.
This seems to have been introduced in 6.5.1 and persists in 6.5.2. In 6.5.2, the lines 735 & 736 need to be changed from:
const BRepExtrema_SolutionElem Sol1(Dstmin,P1,BRepExtrema_IsOnEdge,S1,t);
const BRepExtrema_SolutionElem Sol2(Dstmin,Pt,BRepExtrema_IsVertex,S2);
to
const BRepExtrema_SolutionElem Sol1(Dstmin,Pt,BRepExtrema_IsOnEdge,S1,t);
const BRepExtrema_SolutionElem Sol2(Dstmin,P1,BRepExtrema_IsVertex,S2);
and lines 851 and 852 need to be changed from:
const BRepExtrema_SolutionElem Sol1(Dstmin,P1,BRepExtrema_IsInFace,S1,U,V);
const BRepExtrema_SolutionElem Sol2(Dstmin,Pt,BRepExtrema_IsVertex,S2);
to
const BRepExtrema_SolutionElem Sol1(Dstmin,Pt,BRepExtrema_IsInFace,S1,U,V);
const BRepExtrema_SolutionElem Sol2(Dstmin,P1,BRepExtrema_IsVertex,S2);
-------
Note that the problem with edge has been fixed already in #22758, while the problem with face is still there
----------
When computing the distance between a face or edge and a vertex, with the vertex as the second argument, PointOnShape1 and PointOnShape2 results are switched.
This seems to have been introduced in 6.5.1 and persists in 6.5.2. In 6.5.2, the lines 735 & 736 need to be changed from:
const BRepExtrema_SolutionElem Sol1(Dstmin,P1,BRepExtrema_IsOnEdge,S1,t);
const BRepExtrema_SolutionElem Sol2(Dstmin,Pt,BRepExtrema_IsVertex,S2);
to
const BRepExtrema_SolutionElem Sol1(Dstmin,Pt,BRepExtrema_IsOnEdge,S1,t);
const BRepExtrema_SolutionElem Sol2(Dstmin,P1,BRepExtrema_IsVertex,S2);
and lines 851 and 852 need to be changed from:
const BRepExtrema_SolutionElem Sol1(Dstmin,P1,BRepExtrema_IsInFace,S1,U,V);
const BRepExtrema_SolutionElem Sol2(Dstmin,Pt,BRepExtrema_IsVertex,S2);
to
const BRepExtrema_SolutionElem Sol1(Dstmin,Pt,BRepExtrema_IsInFace,S1,U,V);
const BRepExtrema_SolutionElem Sol2(Dstmin,P1,BRepExtrema_IsVertex,S2);
-------
Note that the problem with edge has been fixed already in #22758, while the problem with face is still there
Steps to reproduce
See attached script Attachment 2 (TCL)
Public activity
2 archived notes
Participants are labeled by their role within this record.
Fix integrated to branch CR23051; please test
Dear BugMaster,
Workbench KAS:dev:apn-23051-occt was created from git branch CR23051 (and apn-23051-products from svn trunk) and compiled on Linux platform.
There are not regressions in apn-23051-products regarding to KAS:dev:products-20120329-opt
Test case for this fix is chl 934 X8. It's OK.
See results in /QADisk/occttests/results/KAS/dev/apn-23051-products_02042012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120329-opt_29032012/lin
See test cases in /QADisk/occttests/tests/ED
Workbench KAS:dev:apn-23051-occt was created from git branch CR23051 (and apn-23051-products from svn trunk) and compiled on Linux platform.
There are not regressions in apn-23051-products regarding to KAS:dev:products-20120329-opt
Test case for this fix is chl 934 X8. It's OK.
See results in /QADisk/occttests/results/KAS/dev/apn-23051-products_02042012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120329-opt_29032012/lin
See test cases in /QADisk/occttests/tests/ED