]> OCCT Git - occt.git/commitdiff
0033384: Modeling Algorithms - Now proximity depends on the shapes order
authorjfa <jfa@opencascade.com>
Fri, 11 Nov 2022 10:48:15 +0000 (13:48 +0300)
committerjfa <jfa@opencascade.com>
Fri, 21 Feb 2025 11:43:49 +0000 (11:43 +0000)
src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx

index b1ab9f0e28cebb188f95a1692245f2f34bb10869..08fded60e1eeaddd6a193ac5e81e68dc84b9f6d6 100644 (file)
@@ -555,43 +555,11 @@ void BRepExtrema_ProximityValueTool::Perform(Standard_Real& theTolerance)
   if (aProximityDist1 < 0.)
     return;
 
-  // max(min) dist from the 2nd shape to t he 1st one
-  BVH_Vec3d      aP2_1, aP2_2;
-  ProxPnt_Status aPointStatus2_1 = ProxPnt_Status::ProxPnt_Status_UNKNOWN;
-  ProxPnt_Status aPointStatus2_2 = ProxPnt_Status::ProxPnt_Status_UNKNOWN;
-
-  Standard_Real aProximityDist2 = computeProximityDist(mySet2,
-                                                       myNbSamples2,
-                                                       myAddVertices2,
-                                                       myAddStatus2,
-                                                       mySet1,
-                                                       myShapeList2,
-                                                       myShapeList1,
-                                                       aP2_2,
-                                                       aP2_1,
-                                                       aPointStatus2_2,
-                                                       aPointStatus2_1);
-
-  if (aProximityDist2 < 0.)
-    return;
-
-  // min dist of the two max(min) dists
-  if (aProximityDist1 < aProximityDist2)
-  {
-    myDistance = aProximityDist1;
-    myPnt1.SetCoord(aP1_1.x(), aP1_1.y(), aP1_1.z());
-    myPnt2.SetCoord(aP1_2.x(), aP1_2.y(), aP1_2.z());
-    myPntStatus1 = aPointStatus1_1;
-    myPntStatus2 = aPointStatus1_2;
-  }
-  else
-  {
-    myDistance = aProximityDist2;
-    myPnt1.SetCoord(aP2_1.x(), aP2_1.y(), aP2_1.z());
-    myPnt2.SetCoord(aP2_2.x(), aP2_2.y(), aP2_2.z());
-    myPntStatus1 = aPointStatus2_1;
-    myPntStatus2 = aPointStatus2_2;
-  }
+  myDistance = aProximityDist1;
+  myPnt1.SetCoord(aP1_1.x(), aP1_1.y(), aP1_1.z());
+  myPnt2.SetCoord(aP1_2.x(), aP1_2.y(), aP1_2.z());
+  myPntStatus1 = aPointStatus1_1;
+  myPntStatus2 = aPointStatus1_2;
 
   myIsDone     = Standard_True;
   theTolerance = myDistance;
@@ -615,4 +583,4 @@ NCollection_CellFilter_Action BRepExtrema_VertexInspector::Inspect(const Standar
     myIsNeedAdd = Standard_False;
 
   return CellFilter_Keep;
-}
\ No newline at end of file
+}