Mantis issue 0021514: EDF GEOM: Partition failure.

This commit is contained in:
jfa 2012-04-18 09:24:38 +00:00
parent 402eaa1b92
commit e1b9dcd73e
2 changed files with 24 additions and 37 deletions

View File

@ -212,7 +212,7 @@ static
TopTools_IndexedDataMapOfShapeListOfShape aMVER;
//
bRegular=Standard_True;
//
aNbC=aMEC.Extent();
for (j=1; j<=aNbC; ++j) {
aER=aMEC(j);
@ -404,6 +404,7 @@ Standard_Boolean IsToScale(const TopoDS_Face& aF,
Standard_Real& aScale)
{
Standard_Boolean bRet;
Standard_Real aV1, aV2, dV, aTr;
GeomAbs_SurfaceType aType;
BRepAdaptor_Surface aBAS;
//
@ -413,8 +414,6 @@ Standard_Boolean IsToScale(const TopoDS_Face& aF,
aBAS.Initialize(aF);
aType=aBAS.GetType();
if (aType==GeomAbs_Cylinder) {
Standard_Real aV1, aV2, dV, dU, aTr, aC;
//
aTr=1.e5;
aV1=aBAS.FirstVParameter();
aV2=aBAS.LastVParameter();
@ -425,16 +424,6 @@ Standard_Boolean IsToScale(const TopoDS_Face& aF,
aScale=1./aTr;
return bRet;
}
//modified by NIZNHY-PKV Fri Mar 30 10:54:34 2012f
dU=M_PI;
aC=dV/dU;
aTr=25.;
if(aC>aTr){
bRet=!bRet;
aScale=1./aC;
return bRet;
}
//modified by NIZNHY-PKV Fri Mar 30 10:54:35 2012t
}
return bRet;
}

View File

@ -44,7 +44,6 @@
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepAdaptor_Curve2d.hxx>
@ -52,8 +51,6 @@
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
@ -446,9 +443,8 @@ static
TColgp_SequenceOfPnt2d& aCoordVa,
BOPTColStd_ListOfListOfShape& myShapes,
BOP_IndexedDataMapOfVertexListEdgeInfo& mySmartMap)
{
Standard_Integer i,j, aNb, aNbj;
Standard_Integer i,j, aNb, aNbj, iCnt;
Standard_Real aTol, anAngleIn, anAngleOut, anAngle, aMinAngle;
Standard_Real aTol2D, aTol2D2;
Standard_Real aTol2, aD2;//, aTolUVb, aTolVVb;
@ -561,28 +557,33 @@ static
aMinAngle=100.;
anIsFound=Standard_False;
Standard_Integer aCurIndexE = 0;
//
//modified by NIZNHY-PKV Fri Apr 13 14:48:47 2012f
iCnt=NbWaysOut (aLEInfo);
if (!iCnt) { // no way to go . (Error)
return ;
}
++iCnt;
//modified by NIZNHY-PKV Fri Apr 13 14:48:50 2012t
//
anIt.Initialize(aLEInfo);
for (; anIt.More(); anIt.Next()) {
BOP_EdgeInfo& anEI=anIt.Value();
const TopoDS_Edge& aE=anEI.Edge();
anIsOut=!anEI.IsIn();
anIsNotPassed=!anEI.Passed();
//
if (anIsOut && anIsNotPassed) {
aCurIndexE++;
//
// Is there one way to go out of the vertex
// we have to use it only.
Standard_Integer iCnt;
iCnt=NbWaysOut (aLEInfo);
//
if (!iCnt) {
// no way to go . (Error)
return ;
//modified by NIZNHY-PKV Fri Apr 13 14:50:02 2012f
//iCnt=NbWaysOut (aLEInfo);
//if (!iCnt) { // no way to go . (Error)
// return ;
//}
--iCnt;
if (aE.IsSame(aEOuta)) {
continue;
}
//modified by NIZNHY-PKV Fri Apr 13 14:50:06 2012t
//
if (iCnt==1) {
// the one and only way to go out .
@ -601,7 +602,6 @@ static
continue;
}
//
//
anAngleOut=anEI.Angle();
//
anAngle=ClockWiseAngle(anAngleIn, anAngleOut);
@ -617,7 +617,7 @@ static
// no way to go . (Error)
return;
}
//
aEOutb=pEdgeInfo->Edge();
//
Path (aGAS, myFace, aVb, aEOutb, *pEdgeInfo, aLS,
@ -750,11 +750,9 @@ static
dA=A1-A2;
if (dA <= 0.) {
dA=aTwoPi+dA;
//modified by NIZNHY-PKV Thu Feb 17 08:26:39 2011f
if (dA <= 1.e-14) {
dA=aTwoPi;
}
//modified by NIZNHY-PKV Thu Feb 17 08:26:42 2011t
}
//xx
else if (dA <= 1.e-14) {
@ -852,7 +850,7 @@ Standard_Real Angle (const gp_Dir2d& aDir2D)
return anAngle;
}
//
//=======================================================================
// function: NbWaysOut
// purpose: