Archived issue #0031090
Modeling Algorithms - BRepExtrema_DistShapeShape gives wrong result between two faces
Description
I need to calculate distance between two surfaces, one is VPeriodic surface and another is surface of revolution. The two surfaces are clearly intersecting while BRepExtrema_DistShapeShape give the result 0.07, it's wrong.
My code like this:
BRepExtrema_DistShapeShape ext;
ext.SetFlag(Extrema_ExtFlat_MIN);
ext.LoadS1(face1);
ext.LoadS2(face2);
ext.Perform();
if (ext.IsDone())
{
double dist = ext.Value();
}
I debuged sources and got the following simplified call stack:
BRepExtrema_DistShapeShape::Perform
DistanceMapMap(myMapF1, myMapF2, myBF1, myBF2)
BRepExtrema_DistSS
BRepExt_ExtFF
Extrema_ExtSS
Extrema_GenExtSS
Then I got two closest points(UV(1),UV(2),UV(3),UV(4)) from Extrema_GenExtSS::Perform(). I calculated normal directions from the two specified points on corresponding surface, and the angle between the two direction is 180.005°。丷丷
By the way, I think 20*20 sampling points for start point is not enough about this situation.
My code like this:
BRepExtrema_DistShapeShape ext;
ext.SetFlag(Extrema_ExtFlat_MIN);
ext.LoadS1(face1);
ext.LoadS2(face2);
ext.Perform();
if (ext.IsDone())
{
double dist = ext.Value();
}
I debuged sources and got the following simplified call stack:
BRepExtrema_DistShapeShape::Perform
DistanceMapMap(myMapF1, myMapF2, myBF1, myBF2)
BRepExtrema_DistSS
BRepExt_ExtFF
Extrema_ExtSS
Extrema_GenExtSS
Then I got two closest points(UV(1),UV(2),UV(3),UV(4)) from Extrema_GenExtSS::Perform(). I calculated normal directions from the two specified points on corresponding surface, and the angle between the two direction is 180.005°。丷丷
By the way, I think 20*20 sampling points for start point is not enough about this situation.
Steps to reproduce
Import the *igs file,
Calculate distance as my description
Calculate distance as my description
Public activity
No public notes
Participants are labeled by their role within this record.