Mantis issue 0021683: EDF 678 GEOM: Partition failure

This commit is contained in:
jfa 2012-07-05 13:52:07 +00:00
parent b659aaf41b
commit dccdaf0d56

View File

@ -19,10 +19,9 @@
// File: GEOMAlgo_Tools_1.cxx
// Created: Thu May 6 10:46:21 2010
// Author: Peter KURNEV
// <pkv@irinox>
#include <GEOMAlgo_Tools.hxx>
//
#include <NCollection_DataMap.hxx>
#include <gp_Pnt2d.hxx>
@ -90,7 +89,10 @@ static
const Handle(Geom_Surface)& aS=BRep_Tool::Surface(aF, aLoc);
aGAS.Load(aS);
aTS=aGAS.GetType();
if (aTS==GeomAbs_Cylinder || aTS==GeomAbs_Plane) {
//modified by NIZNHY-PKV Mon Jul 02 13:58:30 2012f
if (aTS==GeomAbs_Cylinder || aTS==GeomAbs_Plane || aTS==GeomAbs_BSplineSurface) {
//if (aTS==GeomAbs_Cylinder || aTS==GeomAbs_Plane) {
//modified by NIZNHY-PKV Mon Jul 02 13:58:33 2012t
aItF.Initialize(aF);
for (; aItF.More(); aItF.Next()) {
const TopoDS_Wire& aW=*((TopoDS_Wire*)&aItF.Value());
@ -103,6 +105,7 @@ static
}
return bRet;
}
//=======================================================================
//class: GEOMAlgo_InfoEdge
//purpose :
@ -196,6 +199,7 @@ typedef GEOMAlgo_DataMapOfShapeInfoEdge::Iterator GEOMAlgo_DataMapIteratorOfData
return;
}
}
//=======================================================================
//function : CorrectWire
//purpose :
@ -290,11 +294,13 @@ Standard_Boolean CorrectWire(const TopoDS_Wire& aW,
}
//
Standard_Integer i, aNbP;
Standard_Real aIP_ParamOnFirst, aIP_ParamOnSecond;
Standard_Real aIP_ParamOnFirst, aIP_ParamOnSecond, aDTresh, aDT;
gp_Pnt aP3D1, aP3D2;
gp_Pnt2d aP2D1, aP2D2;
IntRes2d_Transition aTr1, aTr2;
//
aDTresh=0.001;
//
aNbP=aInter.NbPoints();
for (i=1; i<=aNbP; ++i) {
const IntRes2d_IntersectionPoint& aIP = aInter.Point(i);
@ -327,7 +333,14 @@ Standard_Boolean CorrectWire(const TopoDS_Wire& aW,
aD2=aPV.Distance(aP3D2);
aDmax=(aD1>aD2)? aD1 : aD2;
if (aDmax>aCoeff*aTolV) {
if (aDmax<10.*aTolV){
//modified by NIZNHY-PKV Mon Jul 02 13:56:35 2012f
aDT=10.*aTolV;
if (aDT<aDTresh) {
aDT=aDTresh;
}
if (aDmax<aDT){
//if (aDmax<10.*aTolV){
//modified by NIZNHY-PKV Mon Jul 02 13:56:40 2012t
aBB.UpdateVertex(aV, aDmax);
bRet=Standard_True;
}
@ -337,5 +350,3 @@ Standard_Boolean CorrectWire(const TopoDS_Wire& aW,
}//for(; aItDMVLE.More(); aItDMVLE.Next()) {
return bRet;
}