mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-12 09:40:35 +05:00
Bug 0020374: Partition operation leads to missing volume. A fix by PKV.
This commit is contained in:
parent
68a6e5ca4b
commit
0ca1a4f456
@ -24,7 +24,7 @@
|
|||||||
// Created: Fri Dec 19 10:27:31 2003
|
// Created: Fri Dec 19 10:27:31 2003
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
|
||||||
#include <NMTTools_PaveFiller.ixx>
|
#include <NMTTools_PaveFiller.ixx>
|
||||||
|
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
@ -100,10 +100,12 @@
|
|||||||
#include <NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx>
|
#include <NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx>
|
||||||
#include <NMTTools_MapOfPaveBlock.hxx>
|
#include <NMTTools_MapOfPaveBlock.hxx>
|
||||||
|
|
||||||
|
/*
|
||||||
static
|
static
|
||||||
void SharedEdges1(const TopoDS_Face& aF1,
|
void SharedEdges1(const TopoDS_Face& aF1,
|
||||||
const TopoDS_Face& aF2,
|
const TopoDS_Face& aF2,
|
||||||
TopTools_ListOfShape& aLS);
|
TopTools_ListOfShape& aLS);
|
||||||
|
*/
|
||||||
static
|
static
|
||||||
Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE,
|
Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE,
|
||||||
IntTools_Context& aCtx);
|
IntTools_Context& aCtx);
|
||||||
@ -116,15 +118,15 @@ static
|
|||||||
{
|
{
|
||||||
myIsDone=Standard_False;
|
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 bToApproxC3d, bToApproxC2dOnS1, bToApproxC2dOnS2, bIsDone;
|
||||||
|
Standard_Boolean bJustAdd;
|
||||||
|
Standard_Integer n1, n2, anIndexIn, nF1, nF2, aBlockLength, aNbFFs;
|
||||||
Standard_Integer aNbCurves, aNbPoints;
|
Standard_Integer aNbCurves, aNbPoints;
|
||||||
Standard_Real anApproxTol, aTolR3D, aTolR2D;
|
Standard_Real anApproxTol, aTolR3D, aTolR2D;
|
||||||
BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMapWhat, aMapWith;
|
BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMapWhat, aMapWith;
|
||||||
IntTools_SequenceOfPntOn2Faces aPnts;
|
IntTools_SequenceOfPntOn2Faces aPnts;
|
||||||
IntTools_SequenceOfCurves aCvs;
|
IntTools_SequenceOfCurves aCvs;
|
||||||
BooleanOperations_KindOfInterference aTypeFF=BooleanOperations_SurfaceSurface;
|
//BooleanOperations_KindOfInterference aTypeFF=BooleanOperations_SurfaceSurface;
|
||||||
//
|
//
|
||||||
BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences();
|
BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences();
|
||||||
//
|
//
|
||||||
@ -170,18 +172,11 @@ static
|
|||||||
//
|
//
|
||||||
bIsDone=aFF.IsDone();
|
bIsDone=aFF.IsDone();
|
||||||
//
|
//
|
||||||
|
|
||||||
if (!bIsDone) {
|
if (!bIsDone) {
|
||||||
/*
|
//modified by NIZNHY-PKV Tue Jun 30 09:36:28 2009f
|
||||||
if (!bIsFound) {
|
BOPTools_SSInterference anInterf (nF1, nF2, 1.e-07, 1.e-07, aCvs, aPnts);
|
||||||
myIntrPool->AddInterference (nF1, nF2, aTypeFF, anIndexIn);
|
anIndexIn=aFFs.Append(anInterf);
|
||||||
}
|
//modified by NIZNHY-PKV Tue Jun 30 09:36:31 2009t
|
||||||
else {
|
|
||||||
BOPTools_SSInterference anInterf (nF1, nF2, 1.e-07, 1.e-07, aCvs, aPnts);
|
|
||||||
anIndexIn=aFFs.Append(anInterf);
|
|
||||||
myIntrPool->AddInterference (nF1, nF2, aTypeFF, anIndexIn);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -224,7 +219,7 @@ static
|
|||||||
//
|
//
|
||||||
Standard_Boolean bIsExistingPaveBlock, bIsValidIn2D, bIsCoincided;
|
Standard_Boolean bIsExistingPaveBlock, bIsValidIn2D, bIsCoincided;
|
||||||
Standard_Boolean bIsMicroEdge, bHasES;
|
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_Integer nV1, nV2, j, aNbCurves;
|
||||||
Standard_Real aTolR3D, aTol2D, aT1, aT2, aTolPPC=Precision::PConfusion();
|
Standard_Real aTolR3D, aTol2D, aT1, aT2, aTolPPC=Precision::PConfusion();
|
||||||
NMTTools_IndexedDataMapOfShapePaveBlock aMEPB;
|
NMTTools_IndexedDataMapOfShapePaveBlock aMEPB;
|
||||||
@ -672,7 +667,7 @@ static
|
|||||||
TopoDS_Face aF1FWD, aF2FWD;
|
TopoDS_Face aF1FWD, aF2FWD;
|
||||||
//
|
//
|
||||||
NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB);
|
NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB);
|
||||||
const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks();
|
//const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks();
|
||||||
//
|
//
|
||||||
aPB=aCB.PaveBlock1();
|
aPB=aCB.PaveBlock1();
|
||||||
mE=aPB.Edge(); // index of edge in tDS
|
mE=aPB.Edge(); // index of edge in tDS
|
||||||
@ -791,7 +786,6 @@ static
|
|||||||
}
|
}
|
||||||
// Check common blocks between edges and faces
|
// Check common blocks between edges and faces
|
||||||
// Build P-Curves if they were not built in previos block.
|
// Build P-Curves if they were not built in previos block.
|
||||||
//
|
|
||||||
// The main case is :arguments for e.g aEdge, aFace -> no FFs,
|
// The main case is :arguments for e.g aEdge, aFace -> no FFs,
|
||||||
// but p-curves are needed.
|
// but p-curves are needed.
|
||||||
//
|
//
|
||||||
@ -894,15 +888,12 @@ static
|
|||||||
anIt.Initialize(aLSE);
|
anIt.Initialize(aLSE);
|
||||||
for (; anIt.More(); anIt.Next()) {
|
for (; anIt.More(); anIt.Next()) {
|
||||||
const TopoDS_Edge& aE=TopoDS::Edge(anIt.Value());
|
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);
|
aTolE=BRep_Tool::Tolerance(aE);
|
||||||
aTol=aTolR3D;
|
aTol=aTolR3D;
|
||||||
if (aTolE>aTol) {
|
if (aTolE>aTol) {
|
||||||
aTol=aTolE;
|
aTol=aTolE;
|
||||||
}
|
}
|
||||||
iC=CheckIntermediatePoint(aPBNew, aE, aTol);
|
iC=CheckIntermediatePoint(aPBNew, aE, aTol);
|
||||||
//iC=CheckIntermediatePoint(aPBNew, aE, aTolR3D);
|
|
||||||
//modified by NIZNHY-PKV Mon Nov 17 09:54:45 2008t
|
|
||||||
if (!iC) {
|
if (!iC) {
|
||||||
return !bFlag;
|
return !bFlag;
|
||||||
}
|
}
|
||||||
@ -1162,6 +1153,7 @@ static
|
|||||||
//function : SharedEdges1
|
//function : SharedEdges1
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
/*
|
||||||
void SharedEdges1(const TopoDS_Face& aF1,
|
void SharedEdges1(const TopoDS_Face& aF1,
|
||||||
const TopoDS_Face& aF2,
|
const TopoDS_Face& aF2,
|
||||||
TopTools_ListOfShape& aLS)
|
TopTools_ListOfShape& aLS)
|
||||||
@ -1189,6 +1181,7 @@ void SharedEdges1(const TopoDS_Face& aF1,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function: CheckCoincidence
|
// function: CheckCoincidence
|
||||||
|
Loading…
Reference in New Issue
Block a user