From 0ca1a4f4569e1ca00c19594120ecba81d7fd9f6a Mon Sep 17 00:00:00 2001 From: jfa Date: Wed, 8 Jul 2009 13:00:50 +0000 Subject: [PATCH] Bug 0020374: Partition operation leads to missing volume. A fix by PKV. --- src/NMTTools/NMTTools_PaveFiller_6.cxx | 35 +++++++++++--------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/src/NMTTools/NMTTools_PaveFiller_6.cxx b/src/NMTTools/NMTTools_PaveFiller_6.cxx index e55e4dff4..b090cd1e5 100644 --- a/src/NMTTools/NMTTools_PaveFiller_6.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_6.cxx @@ -24,7 +24,7 @@ // Created: Fri Dec 19 10:27:31 2003 // Author: Peter KURNEV // -// + #include #include @@ -100,10 +100,12 @@ #include #include +/* static void SharedEdges1(const TopoDS_Face& aF1, const TopoDS_Face& aF2, TopTools_ListOfShape& aLS); +*/ static Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE, IntTools_Context& aCtx); @@ -116,15 +118,15 @@ static { myIsDone=Standard_False; // - Standard_Boolean bJustAdd;//, bIsComputed, bIsFound; - Standard_Integer n1, n2, anIndexIn, nF1, nF2, aBlockLength, aNbFFs; Standard_Boolean bToApproxC3d, bToApproxC2dOnS1, bToApproxC2dOnS2, bIsDone; + Standard_Boolean bJustAdd; + Standard_Integer n1, n2, anIndexIn, nF1, nF2, aBlockLength, aNbFFs; Standard_Integer aNbCurves, aNbPoints; Standard_Real anApproxTol, aTolR3D, aTolR2D; BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMapWhat, aMapWith; IntTools_SequenceOfPntOn2Faces aPnts; IntTools_SequenceOfCurves aCvs; - BooleanOperations_KindOfInterference aTypeFF=BooleanOperations_SurfaceSurface; + //BooleanOperations_KindOfInterference aTypeFF=BooleanOperations_SurfaceSurface; // BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences(); // @@ -170,18 +172,11 @@ static // bIsDone=aFF.IsDone(); // - if (!bIsDone) { - /* - if (!bIsFound) { - myIntrPool->AddInterference (nF1, nF2, aTypeFF, anIndexIn); - } - else { - BOPTools_SSInterference anInterf (nF1, nF2, 1.e-07, 1.e-07, aCvs, aPnts); - anIndexIn=aFFs.Append(anInterf); - myIntrPool->AddInterference (nF1, nF2, aTypeFF, anIndexIn); - } - */ + //modified by NIZNHY-PKV Tue Jun 30 09:36:28 2009f + BOPTools_SSInterference anInterf (nF1, nF2, 1.e-07, 1.e-07, aCvs, aPnts); + anIndexIn=aFFs.Append(anInterf); + //modified by NIZNHY-PKV Tue Jun 30 09:36:31 2009t continue; } // @@ -224,7 +219,7 @@ static // Standard_Boolean bIsExistingPaveBlock, bIsValidIn2D, bIsCoincided; Standard_Boolean bIsMicroEdge, bHasES; - Standard_Integer i, aNbFFs, nF1, nF2, aBid=0; + Standard_Integer i, aNbFFs, nF1, nF2; Standard_Integer nV1, nV2, j, aNbCurves; Standard_Real aTolR3D, aTol2D, aT1, aT2, aTolPPC=Precision::PConfusion(); NMTTools_IndexedDataMapOfShapePaveBlock aMEPB; @@ -672,7 +667,7 @@ static TopoDS_Face aF1FWD, aF2FWD; // NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB); - const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks(); + //const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks(); // aPB=aCB.PaveBlock1(); mE=aPB.Edge(); // index of edge in tDS @@ -791,7 +786,6 @@ static } // Check common blocks between edges and faces // Build P-Curves if they were not built in previos block. - // // The main case is :arguments for e.g aEdge, aFace -> no FFs, // but p-curves are needed. // @@ -894,15 +888,12 @@ static anIt.Initialize(aLSE); for (; anIt.More(); anIt.Next()) { const TopoDS_Edge& aE=TopoDS::Edge(anIt.Value()); - //modified by NIZNHY-PKV Mon Nov 17 09:54:43 2008f //0019974 aTolE=BRep_Tool::Tolerance(aE); aTol=aTolR3D; if (aTolE>aTol) { aTol=aTolE; } iC=CheckIntermediatePoint(aPBNew, aE, aTol); - //iC=CheckIntermediatePoint(aPBNew, aE, aTolR3D); - //modified by NIZNHY-PKV Mon Nov 17 09:54:45 2008t if (!iC) { return !bFlag; } @@ -1162,6 +1153,7 @@ static //function : SharedEdges1 //purpose : //======================================================================= +/* void SharedEdges1(const TopoDS_Face& aF1, const TopoDS_Face& aF2, TopTools_ListOfShape& aLS) @@ -1189,6 +1181,7 @@ void SharedEdges1(const TopoDS_Face& aF1, } } } +*/ //======================================================================= // function: CheckCoincidence -- 2.30.2