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

0023547: Tests failures in debug mode

1. DRAW-commands for curve/surface continuity returning were changed.
2. Output of "distmini" DRAW-command is amended.
3. Function MinMax() was moved from Standard_Real to IntPatch_ImpImpIntersection_4.gxx.
4. Incorrect computing of nbcurveC1 in Geom2dConvert::C0BSplineToC1BSplineCurve(...) function was liquidated.

Test cases were changed.
This commit is contained in:
nbv
2014-09-26 15:32:46 +04:00
committed by abv
parent 63c629aa3a
commit 9e20ed5793
80 changed files with 259 additions and 312 deletions

View File

@@ -1638,6 +1638,51 @@ static Standard_Integer intersection (Draw_Interpretor& di,
return 0;
}
//=======================================================================
//function : GetCurveContinuity
//purpose : Returns the continuity of the given curve
//=======================================================================
static Standard_Integer GetCurveContinuity( Draw_Interpretor& theDI,
Standard_Integer theNArg,
const char** theArgv)
{
if(theNArg != 2)
{
theDI << "Use: getcurvcontinuity {curve or 2dcurve} \n";
return 1;
}
char aContName[7][3] = {"C0", //0
"G1", //1
"C1", //2
"G2", //3
"C2", //4
"C3", //5
"CN"}; //6
Handle(Geom2d_Curve) GC2d;
Handle(Geom_Curve) GC3d = DrawTrSurf::GetCurve(theArgv[1]);
if(GC3d.IsNull())
{
GC2d = DrawTrSurf::GetCurve2d(theArgv[1]);
if(GC2d.IsNull())
{
theDI << "Argument is not a 2D or 3D curve!\n";
return 1;
}
else
{
theDI << theArgv[1] << " has " << aContName[GC2d->Continuity()] << " continuity.\n";
}
}
else
{
theDI << theArgv[1] << " has " << aContName[GC3d->Continuity()] << " continuity.\n";
}
return 0;
}
//=======================================================================
//function : CurveCommands
//purpose :
@@ -1740,5 +1785,11 @@ void GeometryTest::CurveCommands(Draw_Interpretor& theCommands)
__FILE__,
surfpoints,g);
theCommands.Add("getcurvcontinuity",
"getcurvcontinuity {curve or 2dcurve}: \n\tReturns the continuity of the given curve",
__FILE__,
GetCurveContinuity,g);
}

View File

@@ -324,6 +324,42 @@ static Standard_Integer fillcurves(Draw_Interpretor& /*di*/,
return 0;
}
//=======================================================================
//function : GetSurfaceContinuity
//purpose : Returns the continuity of the given surface
//=======================================================================
static Standard_Integer GetSurfaceContinuity( Draw_Interpretor& theDI,
Standard_Integer theNArg,
const char** theArgv)
{
if(theNArg != 2)
{
theDI << "Use: getsurfcontinuity surface\n";
return 1;
}
Handle(Geom_Surface) GS1 = DrawTrSurf::GetSurface(theArgv[1]);
if(GS1.IsNull())
{
theDI << "Argument is not a surface!\n";
return 1;
}
char aContName[7][3] = {"C0", //0
"G1", //1
"C1", //2
"G2", //3
"C2", //4
"C3", //5
"CN"}; //6
theDI << theArgv[1] << " has " << aContName[GS1->Continuity()] << " continuity.\n";
return 0;
}
//=======================================================================
//function : SurfaceCommands
//purpose :
@@ -372,6 +408,12 @@ void GeometryTest::SurfaceCommands(Draw_Interpretor& theCommands)
__FILE__,
fillcurves,g);
theCommands.Add("getsurfcontinuity",
"getsurfcontinuity surface: \n\tReturns the continuity of the given surface",
__FILE__,
GetSurfaceContinuity,g);
}