mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-05-06 23:20:48 +05:00
Mantis issue 0021514: EDF GEOM: Partition failure.
This commit is contained in:
parent
402eaa1b92
commit
e1b9dcd73e
@ -212,7 +212,7 @@ static
|
|||||||
TopTools_IndexedDataMapOfShapeListOfShape aMVER;
|
TopTools_IndexedDataMapOfShapeListOfShape aMVER;
|
||||||
//
|
//
|
||||||
bRegular=Standard_True;
|
bRegular=Standard_True;
|
||||||
|
//
|
||||||
aNbC=aMEC.Extent();
|
aNbC=aMEC.Extent();
|
||||||
for (j=1; j<=aNbC; ++j) {
|
for (j=1; j<=aNbC; ++j) {
|
||||||
aER=aMEC(j);
|
aER=aMEC(j);
|
||||||
@ -404,6 +404,7 @@ Standard_Boolean IsToScale(const TopoDS_Face& aF,
|
|||||||
Standard_Real& aScale)
|
Standard_Real& aScale)
|
||||||
{
|
{
|
||||||
Standard_Boolean bRet;
|
Standard_Boolean bRet;
|
||||||
|
Standard_Real aV1, aV2, dV, aTr;
|
||||||
GeomAbs_SurfaceType aType;
|
GeomAbs_SurfaceType aType;
|
||||||
BRepAdaptor_Surface aBAS;
|
BRepAdaptor_Surface aBAS;
|
||||||
//
|
//
|
||||||
@ -413,8 +414,6 @@ Standard_Boolean IsToScale(const TopoDS_Face& aF,
|
|||||||
aBAS.Initialize(aF);
|
aBAS.Initialize(aF);
|
||||||
aType=aBAS.GetType();
|
aType=aBAS.GetType();
|
||||||
if (aType==GeomAbs_Cylinder) {
|
if (aType==GeomAbs_Cylinder) {
|
||||||
Standard_Real aV1, aV2, dV, dU, aTr, aC;
|
|
||||||
//
|
|
||||||
aTr=1.e5;
|
aTr=1.e5;
|
||||||
aV1=aBAS.FirstVParameter();
|
aV1=aBAS.FirstVParameter();
|
||||||
aV2=aBAS.LastVParameter();
|
aV2=aBAS.LastVParameter();
|
||||||
@ -425,16 +424,6 @@ Standard_Boolean IsToScale(const TopoDS_Face& aF,
|
|||||||
aScale=1./aTr;
|
aScale=1./aTr;
|
||||||
return bRet;
|
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;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,6 @@
|
|||||||
#include <TopoDS_Face.hxx>
|
#include <TopoDS_Face.hxx>
|
||||||
#include <TopoDS_Iterator.hxx>
|
#include <TopoDS_Iterator.hxx>
|
||||||
|
|
||||||
|
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <BRepAdaptor_Surface.hxx>
|
#include <BRepAdaptor_Surface.hxx>
|
||||||
#include <BRepAdaptor_Curve2d.hxx>
|
#include <BRepAdaptor_Curve2d.hxx>
|
||||||
@ -52,8 +51,6 @@
|
|||||||
#include <TopExp.hxx>
|
#include <TopExp.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <TopTools_SequenceOfShape.hxx>
|
#include <TopTools_SequenceOfShape.hxx>
|
||||||
#include <TopTools_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||||
@ -446,9 +443,8 @@ static
|
|||||||
TColgp_SequenceOfPnt2d& aCoordVa,
|
TColgp_SequenceOfPnt2d& aCoordVa,
|
||||||
BOPTColStd_ListOfListOfShape& myShapes,
|
BOPTColStd_ListOfListOfShape& myShapes,
|
||||||
BOP_IndexedDataMapOfVertexListEdgeInfo& mySmartMap)
|
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 aTol, anAngleIn, anAngleOut, anAngle, aMinAngle;
|
||||||
Standard_Real aTol2D, aTol2D2;
|
Standard_Real aTol2D, aTol2D2;
|
||||||
Standard_Real aTol2, aD2;//, aTolUVb, aTolVVb;
|
Standard_Real aTol2, aD2;//, aTolUVb, aTolVVb;
|
||||||
@ -561,28 +557,33 @@ static
|
|||||||
|
|
||||||
aMinAngle=100.;
|
aMinAngle=100.;
|
||||||
anIsFound=Standard_False;
|
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);
|
anIt.Initialize(aLEInfo);
|
||||||
for (; anIt.More(); anIt.Next()) {
|
for (; anIt.More(); anIt.Next()) {
|
||||||
BOP_EdgeInfo& anEI=anIt.Value();
|
BOP_EdgeInfo& anEI=anIt.Value();
|
||||||
const TopoDS_Edge& aE=anEI.Edge();
|
const TopoDS_Edge& aE=anEI.Edge();
|
||||||
anIsOut=!anEI.IsIn();
|
anIsOut=!anEI.IsIn();
|
||||||
anIsNotPassed=!anEI.Passed();
|
anIsNotPassed=!anEI.Passed();
|
||||||
|
//
|
||||||
if (anIsOut && anIsNotPassed) {
|
if (anIsOut && anIsNotPassed) {
|
||||||
aCurIndexE++;
|
//modified by NIZNHY-PKV Fri Apr 13 14:50:02 2012f
|
||||||
//
|
//iCnt=NbWaysOut (aLEInfo);
|
||||||
// Is there one way to go out of the vertex
|
//if (!iCnt) { // no way to go . (Error)
|
||||||
// we have to use it only.
|
// return ;
|
||||||
Standard_Integer iCnt;
|
//}
|
||||||
iCnt=NbWaysOut (aLEInfo);
|
--iCnt;
|
||||||
//
|
if (aE.IsSame(aEOuta)) {
|
||||||
if (!iCnt) {
|
continue;
|
||||||
// no way to go . (Error)
|
|
||||||
return ;
|
|
||||||
}
|
}
|
||||||
|
//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 .
|
||||||
@ -601,7 +602,6 @@ static
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
//
|
|
||||||
anAngleOut=anEI.Angle();
|
anAngleOut=anEI.Angle();
|
||||||
//
|
//
|
||||||
anAngle=ClockWiseAngle(anAngleIn, anAngleOut);
|
anAngle=ClockWiseAngle(anAngleIn, anAngleOut);
|
||||||
@ -617,7 +617,7 @@ static
|
|||||||
// no way to go . (Error)
|
// no way to go . (Error)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
//
|
||||||
aEOutb=pEdgeInfo->Edge();
|
aEOutb=pEdgeInfo->Edge();
|
||||||
//
|
//
|
||||||
Path (aGAS, myFace, aVb, aEOutb, *pEdgeInfo, aLS,
|
Path (aGAS, myFace, aVb, aEOutb, *pEdgeInfo, aLS,
|
||||||
@ -750,11 +750,9 @@ static
|
|||||||
dA=A1-A2;
|
dA=A1-A2;
|
||||||
if (dA <= 0.) {
|
if (dA <= 0.) {
|
||||||
dA=aTwoPi+dA;
|
dA=aTwoPi+dA;
|
||||||
//modified by NIZNHY-PKV Thu Feb 17 08:26:39 2011f
|
|
||||||
if (dA <= 1.e-14) {
|
if (dA <= 1.e-14) {
|
||||||
dA=aTwoPi;
|
dA=aTwoPi;
|
||||||
}
|
}
|
||||||
//modified by NIZNHY-PKV Thu Feb 17 08:26:42 2011t
|
|
||||||
}
|
}
|
||||||
//xx
|
//xx
|
||||||
else if (dA <= 1.e-14) {
|
else if (dA <= 1.e-14) {
|
||||||
@ -852,7 +850,7 @@ Standard_Real Angle (const gp_Dir2d& aDir2D)
|
|||||||
|
|
||||||
return anAngle;
|
return anAngle;
|
||||||
}
|
}
|
||||||
//
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function: NbWaysOut
|
// function: NbWaysOut
|
||||||
// purpose:
|
// purpose:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user