1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-13 14:27:08 +03:00

0027873: Exception is raised in BRepFill_Filling::FindExtremitiesOfHoles()

The reason of exception has been eliminated.
Creation of the test case for this issue.
Correction of unstable test case.

Some test cases have been adjusted according to their new behavior.
This commit is contained in:
nbv
2016-09-15 17:53:06 +03:00
committed by bugmaster
parent 14cb22a1a4
commit e8e26df06c
6 changed files with 88 additions and 24 deletions

View File

@@ -474,8 +474,14 @@ void GeomPlate_BuildPlateSurface::Perform()
NTPntCont = myPntCont->Length(), NbBoucle=0;
// La variable NTPoint peut etre enlevee
Standard_Boolean Fini=Standard_True;
if ((NTLinCont+NTPntCont)==0)
Standard_RangeError::Raise("GeomPlate : The number of constraints is null.");
if ((NTLinCont + NTPntCont) == 0)
{
#ifdef OCCT_DEBUG
cout << "WARNING : GeomPlate : The number of constraints is null." << endl;
#endif
return;
}
//======================================================================
// Surface Initiale
@@ -504,6 +510,11 @@ void GeomPlate_BuildPlateSurface::Perform()
}
}
if (mySurfInit.IsNull())
{
return;
}
Standard_Real u1,v1,u2,v2;
mySurfInit->Bounds(u1,v1,u2,v2);
GeomAdaptor_Surface aSurfInit(mySurfInit);
@@ -647,9 +658,16 @@ void GeomPlate_BuildPlateSurface::Perform()
//Resolution de la surface
//====================================================================
myPlate.SolveTI(myDegree, ComputeAnisotropie());
if (!myPlate.IsDone())
Standard_Failure::Raise("GeomPlate : abort calcul of Plate.");
myGeomPlateSurface = new GeomPlate_Surface(mySurfInit,myPlate);
if (!myPlate.IsDone())
{
#ifdef OCCT_DEBUG
cout << "WARNING : GeomPlate : abort calcul of Plate." << endl;
#endif
return;
}
myGeomPlateSurface = new GeomPlate_Surface(mySurfInit,myPlate);
Standard_Real Umin,Umax,Vmin,Vmax;
myPlate.UVBox(Umin,Umax,Vmin,Vmax);
myGeomPlateSurface->SetBounds(Umin,Umax,Vmin,Vmax);
@@ -674,9 +692,15 @@ void GeomPlate_BuildPlateSurface::Perform()
//Resolution de la surface
//====================================================================
myPlate.SolveTI(myDegree, ComputeAnisotropie());
if (!myPlate.IsDone())
Standard_Failure::Raise("GeomPlate : abort calcul of Plate.");
myGeomPlateSurface = new GeomPlate_Surface(mySurfInit,myPlate);
if (!myPlate.IsDone())
{
#ifdef OCCT_DEBUG
cout << "WARNING : GeomPlate : abort calcul of Plate." << endl;
#endif
return;
}
myGeomPlateSurface = new GeomPlate_Surface(mySurfInit,myPlate);
Standard_Real Umin,Umax,Vmin,Vmax;
myPlate.UVBox(Umin,Umax,Vmin,Vmax);
myGeomPlateSurface->SetBounds(Umin,Umax,Vmin,Vmax);
@@ -1550,7 +1574,14 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit()
if (!CourbeJoint)
myNbBounds = 0;
GeomPlate_BuildAveragePlane BAP( Pts, NbPoint*myNbBounds, myTol3d/1000, popt, nopt );
if (!BAP.IsPlane()) Standard_Failure::Raise("the initial surface is not a plane.");
if (!BAP.IsPlane())
{
#ifdef OCCT_DEBUG
cout << "WARNING : GeomPlate : the initial surface is not a plane." << endl;
#endif
return;
}
Standard_Real u1,u2,v1,v2;
BAP.MinMaxBox(u1,u2,v1,v2);
// On agrandit le bazar pour les projections
@@ -1688,8 +1719,13 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit()
//Resolution de la surface
//====================================================================
myPlate.SolveTI(2, ComputeAnisotropie());
if (!myPlate.IsDone())
Standard_Failure::Raise("GeomPlate : abort calcul of Plate.");
if (!myPlate.IsDone())
{
#ifdef OCCT_DEBUG
cout << "WARNING : GeomPlate : abort calcul of Plate." << endl;
#endif
return;
}
myGeomPlateSurface = new GeomPlate_Surface( mySurfInit, myPlate );