mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-05 17:44:17 +05:00
Mantis issues 21514, 21534 and 21535: Partition failure.
This commit is contained in:
parent
85083a7b82
commit
4eff7d630f
@ -113,9 +113,14 @@ static
|
|||||||
Standard_Real Tolerance2D (const TopoDS_Vertex& aV,
|
Standard_Real Tolerance2D (const TopoDS_Vertex& aV,
|
||||||
const GeomAdaptor_Surface& aGAS);
|
const GeomAdaptor_Surface& aGAS);
|
||||||
|
|
||||||
|
|
||||||
|
//modified by NIZNHY-PKV Thu Apr 19 09:04:59 2012f
|
||||||
static
|
static
|
||||||
Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& );
|
Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta,
|
||||||
//
|
const BOP_ListOfEdgeInfo& aLEInfo);
|
||||||
|
//static
|
||||||
|
// Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& );
|
||||||
|
//modified by NIZNHY-PKV Thu Apr 19 09:04:53 2012t
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function:
|
// function:
|
||||||
@ -447,7 +452,7 @@ static
|
|||||||
Standard_Integer i,j, aNb, aNbj, iCnt;
|
Standard_Integer i,j, aNb, aNbj, iCnt;
|
||||||
Standard_Real aTol, anAngleIn, anAngleOut, anAngle, aMinAngle;
|
Standard_Real aTol, anAngleIn, anAngleOut, anAngle, aMinAngle;
|
||||||
Standard_Real aTol2D, aTol2D2;
|
Standard_Real aTol2D, aTol2D2;
|
||||||
Standard_Real aTol2, aD2;//, aTolUVb, aTolVVb;
|
Standard_Real aTol2, aD2;
|
||||||
Standard_Boolean anIsSameV2d, anIsSameV, anIsFound, anIsOut, anIsNotPassed;
|
Standard_Boolean anIsSameV2d, anIsSameV, anIsFound, anIsOut, anIsNotPassed;
|
||||||
BOP_ListIteratorOfListOfEdgeInfo anIt;
|
BOP_ListIteratorOfListOfEdgeInfo anIt;
|
||||||
TopoDS_Vertex aVb;
|
TopoDS_Vertex aVb;
|
||||||
@ -479,8 +484,6 @@ static
|
|||||||
GetNextVertex (pVa, aEOuta, aVb);
|
GetNextVertex (pVa, aEOuta, aVb);
|
||||||
|
|
||||||
gp_Pnt2d aPb=Coord2d(aVb, aEOuta, myFace);
|
gp_Pnt2d aPb=Coord2d(aVb, aEOuta, myFace);
|
||||||
|
|
||||||
//const BOP_ListOfEdgeInfo& aLEInfoVb=mySmartMap.FindFromKey(aVb);
|
|
||||||
//
|
//
|
||||||
aTol=2.*Tolerance2D(aVb, aGAS);
|
aTol=2.*Tolerance2D(aVb, aGAS);
|
||||||
aTol2=10.*aTol*aTol;
|
aTol2=10.*aTol*aTol;
|
||||||
@ -558,13 +561,13 @@ static
|
|||||||
aMinAngle=100.;
|
aMinAngle=100.;
|
||||||
anIsFound=Standard_False;
|
anIsFound=Standard_False;
|
||||||
//
|
//
|
||||||
//modified by NIZNHY-PKV Fri Apr 13 14:48:47 2012f
|
//modified by NIZNHY-PKV Thu Apr 19 09:05:09 2012f
|
||||||
iCnt=NbWaysOut (aLEInfo);
|
iCnt=NbWaysOut (aEOuta, aLEInfo);
|
||||||
|
//iCnt=NbWaysOut (aLEInfo);
|
||||||
|
//modified by NIZNHY-PKV Thu Apr 19 09:05:12 2012t
|
||||||
if (!iCnt) { // no way to go . (Error)
|
if (!iCnt) { // no way to go . (Error)
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
++iCnt;
|
|
||||||
//modified by NIZNHY-PKV Fri Apr 13 14:48:50 2012t
|
|
||||||
//
|
//
|
||||||
anIt.Initialize(aLEInfo);
|
anIt.Initialize(aLEInfo);
|
||||||
for (; anIt.More(); anIt.Next()) {
|
for (; anIt.More(); anIt.Next()) {
|
||||||
@ -574,16 +577,9 @@ static
|
|||||||
anIsNotPassed=!anEI.Passed();
|
anIsNotPassed=!anEI.Passed();
|
||||||
//
|
//
|
||||||
if (anIsOut && anIsNotPassed) {
|
if (anIsOut && anIsNotPassed) {
|
||||||
//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)) {
|
if (aE.IsSame(aEOuta)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//modified by NIZNHY-PKV Fri Apr 13 14:50:06 2012t
|
|
||||||
//
|
//
|
||||||
if (iCnt==1) {
|
if (iCnt==1) {
|
||||||
// the one and only way to go out .
|
// the one and only way to go out .
|
||||||
@ -850,7 +846,33 @@ Standard_Real Angle (const gp_Dir2d& aDir2D)
|
|||||||
|
|
||||||
return anAngle;
|
return anAngle;
|
||||||
}
|
}
|
||||||
|
//modified by NIZNHY-PKV Thu Apr 19 09:02:04 2012f
|
||||||
|
//=======================================================================
|
||||||
|
// function: NbWaysOut
|
||||||
|
// purpose:
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta,
|
||||||
|
const BOP_ListOfEdgeInfo& aLEInfo)
|
||||||
|
{
|
||||||
|
Standard_Boolean bIsOut, bIsNotPassed;
|
||||||
|
Standard_Integer iCnt=0;
|
||||||
|
BOP_ListIteratorOfListOfEdgeInfo anIt;
|
||||||
|
//
|
||||||
|
anIt.Initialize(aLEInfo);
|
||||||
|
for (; anIt.More(); anIt.Next()) {
|
||||||
|
BOP_EdgeInfo& aEI=anIt.Value();
|
||||||
|
const TopoDS_Edge& aE=aEI.Edge();
|
||||||
|
bIsOut=!aEI.IsIn();
|
||||||
|
bIsNotPassed=!aEI.Passed();
|
||||||
|
if (bIsOut && bIsNotPassed) {
|
||||||
|
if (!aE.IsSame(aEOuta)) {
|
||||||
|
iCnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return iCnt;
|
||||||
|
}
|
||||||
|
/*
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function: NbWaysOut
|
// function: NbWaysOut
|
||||||
// purpose:
|
// purpose:
|
||||||
@ -873,3 +895,5 @@ Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& aLEInfo)
|
|||||||
}
|
}
|
||||||
return iCnt;
|
return iCnt;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
//modified by NIZNHY-PKV Thu Apr 19 09:01:57 2012t
|
||||||
|
Loading…
Reference in New Issue
Block a user