]> OCCT Git - occt-copy.git/commitdiff
# Warning: Building 2D curve of edge on face has failed.
authornbv <nbv@opencascade.com>
Wed, 11 Apr 2018 09:23:29 +0000 (12:23 +0300)
committernbv <nbv@opencascade.com>
Tue, 29 May 2018 09:14:13 +0000 (12:14 +0300)
(cherry picked from commit d0d712265120631f5cc58c3d480492e79a6c5123)

src/BOPAlgo/BOPAlgo_PaveFiller.cxx
src/BOPDS/BOPDS_DS.cxx
src/BOPDS/BOPDS_DS.hxx

index 5867221f5e96d1c5267aacd2a237ca07cbf048a2..5c3b35cf926d93db8ffdba332b741a356eb8870a 100644 (file)
@@ -294,6 +294,8 @@ void BOPAlgo_PaveFiller::PerformInternal()
   //
   UpdateBlocksWithSharedVertices();
   //
+  myDS->RefineFaceInfoIn();
+  //
   MakeSplitEdges();
   if (HasErrors()) {
     return; 
index c89f7a31b95134fd9db3c39f7cb524bcaa931a18..58bbe6d79f16e9dacaa41b6240dca765cfd09506 100644 (file)
@@ -1418,6 +1418,44 @@ void BOPDS_DS::RefineFaceInfoOn()
     }
   }
 }
+
+//=======================================================================
+//function : RefineFaceInfoIn
+//purpose  : 
+//=======================================================================
+void BOPDS_DS::RefineFaceInfoIn()
+{
+  for (Standard_Integer i = 0; i < myNbSourceShapes; ++i)
+  {
+    const BOPDS_ShapeInfo& aSI = ShapeInfo(i);
+    if (aSI.ShapeType() != TopAbs_FACE)
+      continue;
+
+    if (!aSI.HasReference())
+      continue;
+
+    BOPDS_FaceInfo& aFI = ChangeFaceInfo(i);
+
+    const BOPDS_IndexedMapOfPaveBlock& aMPBOn = aFI.PaveBlocksOn();
+    BOPDS_IndexedMapOfPaveBlock& aMPBIn = aFI.ChangePaveBlocksIn();
+
+    if (aMPBIn.IsEmpty() || aMPBOn.IsEmpty())
+      continue;
+
+    BOPDS_IndexedMapOfPaveBlock aMPBInNew;
+
+    const Standard_Integer aNbPBIn = aMPBIn.Extent();
+    for (Standard_Integer j = 1; j <= aNbPBIn; ++j)
+    {
+      if (!aMPBOn.Contains(aMPBIn(j)))
+        aMPBInNew.Add(aMPBIn(j));
+    }
+
+    if (aMPBInNew.Extent() < aNbPBIn)
+      aMPBIn = aMPBInNew;
+  }
+}
+
 //=======================================================================
 //function : AloneVertices
 //purpose  : 
index 6b19debd0e7dca122b0bb7e26bfc3e9a5d693dc1..276c15961a69e97aa7b058d63706e75538a8278e 100644 (file)
@@ -302,6 +302,9 @@ Standard_EXPORT virtual ~BOPDS_DS();
   //! ++
   Standard_EXPORT void RefineFaceInfoOn();
   
+  //! Removes faces with state ON from the 
+  //! list of IN-faces
+  Standard_EXPORT void RefineFaceInfoIn();
 
   //! Returns information about ON/IN subshapes of the given faces.
   //! @param theMVOnIn  the indices of ON/IN vertices from both faces