mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0026937: Eliminate NO_CXX_EXCEPTION macro support
Macro NO_CXX_EXCEPTION was removed from code. Method Raise() was replaced by explicit throw statement. Method Standard_Failure::Caught() was replaced by normal C++mechanism of exception transfer. Method Standard_Failure::Caught() is deprecated now. Eliminated empty constructors. Updated samples. Eliminate empty method ChangeValue from NCollection_Map class. Removed not operable methods from NCollection classes.
This commit is contained in:
@@ -216,17 +216,3 @@ void Geom2dAPI_InterCurveCurve::Segment
|
||||
theCurve1 = new Geom2d_TrimmedCurve(myCurve1, aU1, aU2);
|
||||
theCurve2 = new Geom2d_TrimmedCurve(myCurve2, aV1, aV2);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Segment
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom2dAPI_InterCurveCurve::Segment (const Standard_Integer Index,
|
||||
Handle(Geom2d_Curve)&) const
|
||||
{
|
||||
Standard_NotImplemented::Raise(" ");
|
||||
(void)Index; // avoid compiler warning in Release mode
|
||||
Standard_OutOfRange_Raise_if(Index < 0 || Index > NbSegments(),
|
||||
"Geom2dAPI_InterCurveCurve::Segment");
|
||||
}
|
||||
|
@@ -119,19 +119,6 @@ public:
|
||||
//! computing of self-intersections on a curve.
|
||||
Standard_EXPORT void Segment (const Standard_Integer Index, Handle(Geom2d_Curve)& Curve1, Handle(Geom2d_Curve)& Curve2) const;
|
||||
|
||||
//! Use this syntax to get solutions of
|
||||
//! tangential intersections only in case of a self-intersected curve.
|
||||
//! Output value Curve1 is the intersection segment of the curve
|
||||
//! defined by number Index. An intersection segment is a
|
||||
//! portion of the initial curve limited by two points. The distance
|
||||
//! between each point of this segment to another portion of the curve is
|
||||
//! less or equal to the tolerance value assigned at the time of
|
||||
//! construction or in the function Init (this value is defaulted to 1.0e-6).
|
||||
//! Exceptions
|
||||
//! Standard_OutOfRange if Index is not in the range [ 1,NbSegments ],
|
||||
//! where NbSegments is the number of computed tangential intersections.
|
||||
Standard_EXPORT void Segment (const Standard_Integer Index, Handle(Geom2d_Curve)& Curve1) const;
|
||||
|
||||
//! return the algorithmic object from Intersection.
|
||||
const Geom2dInt_GInter& Intersector() const;
|
||||
|
||||
|
@@ -148,7 +148,7 @@ static void BuildPeriodicTangent(
|
||||
gp_Vec2d a_vector ;
|
||||
|
||||
if (PointsArray.Length() < 3) {
|
||||
Standard_ConstructionError::Raise();
|
||||
throw Standard_ConstructionError();
|
||||
}
|
||||
|
||||
if (!TangentFlags.Value(1)) {
|
||||
@@ -194,7 +194,7 @@ static void BuildTangents(const TColgp_Array1OfPnt2d& PointsArray,
|
||||
degree = 3 ;
|
||||
|
||||
if ( PointsArray.Length() < 3) {
|
||||
Standard_ConstructionError::Raise();
|
||||
throw Standard_ConstructionError();
|
||||
}
|
||||
if (PointsArray.Length() == 3) {
|
||||
degree = 2 ;
|
||||
@@ -333,7 +333,7 @@ myTangentRequest(Standard_False)
|
||||
myPoints->Upper()) ;
|
||||
|
||||
if (!result) {
|
||||
Standard_ConstructionError::Raise();
|
||||
throw Standard_ConstructionError();
|
||||
}
|
||||
BuildParameters(PeriodicFlag,
|
||||
PointsPtr->Array1(),
|
||||
@@ -373,7 +373,7 @@ myTangentRequest(Standard_False)
|
||||
|
||||
if (PeriodicFlag) {
|
||||
if ((PointsPtr->Length()) + 1 != ParametersPtr->Length()) {
|
||||
Standard_ConstructionError::Raise();
|
||||
throw Standard_ConstructionError();
|
||||
}
|
||||
}
|
||||
myTangents =
|
||||
@@ -384,13 +384,13 @@ myTangentRequest(Standard_False)
|
||||
myPoints->Upper()) ;
|
||||
|
||||
if (!result) {
|
||||
Standard_ConstructionError::Raise();
|
||||
throw Standard_ConstructionError();
|
||||
}
|
||||
|
||||
result =
|
||||
CheckParameters(ParametersPtr->Array1()) ;
|
||||
if (!result) {
|
||||
Standard_ConstructionError::Raise();
|
||||
throw Standard_ConstructionError();
|
||||
}
|
||||
|
||||
for (ii = myPoints->Lower() ; ii <= myPoints->Upper() ; ii++) {
|
||||
@@ -414,7 +414,7 @@ void Geom2dAPI_Interpolate::Load(
|
||||
myTangentFlags = TangentFlagsPtr ;
|
||||
if (Tangents.Length() != myPoints->Length() ||
|
||||
TangentFlagsPtr->Length() != myPoints->Length()) {
|
||||
Standard_ConstructionError::Raise();
|
||||
throw Standard_ConstructionError();
|
||||
}
|
||||
result =
|
||||
CheckTangents(Tangents,
|
||||
@@ -432,7 +432,7 @@ void Geom2dAPI_Interpolate::Load(
|
||||
myParameters->Array1()) ;
|
||||
}
|
||||
else {
|
||||
Standard_ConstructionError::Raise();
|
||||
throw Standard_ConstructionError();
|
||||
}
|
||||
|
||||
|
||||
@@ -457,7 +457,7 @@ void Geom2dAPI_Interpolate::Load(const gp_Vec2d& InitialTangent,
|
||||
myTangentFlags->Array1(),
|
||||
myTolerance) ;
|
||||
if (!result) {
|
||||
Standard_ConstructionError::Raise();
|
||||
throw Standard_ConstructionError();
|
||||
}
|
||||
ScaleTangents(myPoints->Array1(),
|
||||
myTangents->ChangeArray1(),
|
||||
@@ -899,7 +899,7 @@ void Geom2dAPI_Interpolate::PerformNonPeriodic()
|
||||
const Handle(Geom2d_BSplineCurve)& Geom2dAPI_Interpolate::Curve() const
|
||||
{
|
||||
if ( !myIsDone)
|
||||
StdFail_NotDone::Raise(" ");
|
||||
throw StdFail_NotDone(" ");
|
||||
return myCurve;
|
||||
}
|
||||
|
||||
|
@@ -317,7 +317,7 @@ void Geom2dAPI_PointsToBSpline::Init
|
||||
const GeomAbs_Shape Continuity,
|
||||
const Standard_Real Tol2D)
|
||||
{
|
||||
if (Params.Length() != Points.Length()) Standard_OutOfRange::Raise("");
|
||||
if (Params.Length() != Points.Length()) throw Standard_OutOfRange("");
|
||||
|
||||
Standard_Real Tol3D = 0.; // dummy argument for BSplineCompute.
|
||||
Standard_Integer Nbp = Params.Length();
|
||||
@@ -468,7 +468,7 @@ void Geom2dAPI_PointsToBSpline::Init
|
||||
const Handle(Geom2d_BSplineCurve)& Geom2dAPI_PointsToBSpline::Curve() const
|
||||
{
|
||||
if ( !myIsDone)
|
||||
StdFail_NotDone::Raise(" ");
|
||||
throw StdFail_NotDone(" ");
|
||||
return myCurve;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user