View Issue Details

IDProjectCategoryView StatusLast Update
0031090CommunityOCCT:Modeling Algorithmspublic2020-03-03 10:20
ReporterMechanicoder Assigned Tomsv 
PrioritynormalSeverityminor 
Status assignedResolutionopen 
PlatformWindowsOSVC++ 2013 
Product Version7.3.0 
Summary0031090: Modeling Algorithms - BRepExtrema_DistShapeShape gives wrong result between two faces
DescriptionI 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.
Steps To ReproduceImport the *igs file,
Calculate distance as my description
TagsNo tags attached.
Test case number

Attached Files

  • BRepExtrema_DistShapeShape_WrongResult.igs (196,137 bytes)

Activities

Mechanicoder

2019-10-21 16:01

reporter  

BRepExtrema_DistShapeShape_WrongResult.igs (196,137 bytes)

Issue History

Date Modified Username Field Change
2019-10-21 16:01 Mechanicoder New Issue
2019-10-21 16:01 Mechanicoder Assigned To => msv
2019-10-21 16:01 Mechanicoder File Added: BRepExtrema_DistShapeShape_WrongResult.igs
2019-10-24 04:55 Mechanicoder Assigned To msv => Mechanicoder
2019-10-24 04:56 Mechanicoder Assigned To Mechanicoder => bugmaster
2019-12-17 13:26 kgv Summary BRepExtrema_DistShapeShape gives wrong result between two faces => Modeling Algorithms - BRepExtrema_DistShapeShape gives wrong result between two faces
2020-03-03 10:20 bugmaster Assigned To bugmaster => msv
2020-03-03 10:20 bugmaster Status new => assigned