0021514: EDF GEOM: Partition failure. A fix by PKV.

This commit is contained in:
jfa 2012-03-30 13:49:42 +00:00
parent f43bdeb895
commit 10d829dc33

View File

@ -18,12 +18,10 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTAlgo_WESCorrector.cxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
//
#include <GEOMAlgo_WESCorrector.ixx>
#include <Geom_Surface.hxx>
@ -213,7 +211,7 @@ static
TopTools_IndexedDataMapOfShapeListOfShape aMVER;
//
bRegular=Standard_True;
//
aNbC=aMEC.Extent();
for (j=1; j<=aNbC; ++j) {
aER=aMEC(j);
@ -231,14 +229,10 @@ static
}
//
if (bRegular) {
//modified by NIZNHY-PKV Wed Oct 20 14:45:52 2010f
const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aER);
if (!BRep_Tool::Degenerated(aEx)) {
TopExp::MapShapesAndAncestors(aER, TopAbs_VERTEX, TopAbs_EDGE, aMVER);
}
//
//TopExp::MapShapesAndAncestors(aER, TopAbs_VERTEX, TopAbs_EDGE, aMVER);
//modified by NIZNHY-PKV Wed Oct 20 14:46:48 2010t
}
}//for (j=1; j<=aNbC; ++j) {
//
@ -372,7 +366,7 @@ static
}
//
const BOPTColStd_ListOfListOfShape& aSSS=aWS.Shapes();
//
BOPTColStd_ListIteratorOfListOfListOfShape aWireIt(aSSS);
for (; aWireIt.More(); aWireIt.Next()) {
const TopTools_ListOfShape& aLEx=aWireIt.Value();
@ -383,6 +377,7 @@ static
}// else
}
}
//=======================================================================
// function: MakeWire
// purpose:
@ -399,8 +394,6 @@ static
aBB.Add(newWire, aE);
}
}
//
//=======================================================================
//function : IsToScale
@ -410,7 +403,6 @@ 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;
//
@ -420,15 +412,28 @@ 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();
dV=aV2-aV1;
//
if (dV>aTr) {
bRet=!bRet;
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;
}