//
// This file is part of Open CASCADE Technology software library.
//
-// This library is free software; you can redistribute it and / or modify it
-// under the terms of the GNU Lesser General Public version 2.1 as published
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <ShapeConstruct_Curve.ixx>
-
-#include <Standard_ErrorHandler.hxx>
-#include <Standard_Failure.hxx>
-
-#include <gp_Vec.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Lin.hxx>
+#include <Approx_Curve2d.hxx>
+#include <Approx_Curve3d.hxx>
#include <ElCLib.hxx>
-#include <Precision.hxx>
-
-#include <Geom_BSplineCurve.hxx>
-#include <Geom_BezierCurve.hxx>
-#include <Geom_TrimmedCurve.hxx>
-#include <Geom_Line.hxx>
-
-#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_BezierCurve.hxx>
-#include <Geom2d_TrimmedCurve.hxx>
+#include <Geom2d_BSplineCurve.hxx>
+#include <Geom2d_Curve.hxx>
#include <Geom2d_Line.hxx>
-
-#include <GeomConvert.hxx>
-#include <GeomAdaptor_HCurve.hxx>
-#include <Approx_Curve3d.hxx>
-
-#include <Geom2dConvert.hxx>
+#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
-#include <Approx_Curve2d.hxx>
+#include <Geom2dConvert.hxx>
+#include <Geom_BezierCurve.hxx>
+#include <Geom_BSplineCurve.hxx>
+#include <Geom_Curve.hxx>
+#include <Geom_Line.hxx>
+#include <Geom_TrimmedCurve.hxx>
+#include <GeomAdaptor_HCurve.hxx>
+#include <GeomConvert.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Lin.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Pnt2d.hxx>
+#include <gp_Vec.hxx>
+#include <Precision.hxx>
+#include <ShapeConstruct_Curve.hxx>
+#include <Standard_ErrorHandler.hxx>
+#include <Standard_Failure.hxx>
//sln 29.12.2001 OCC90 : Method FixKnots was added
-
//=======================================================================
//function : AdjustCurve
//purpose :
//=======================================================================
-
Standard_Boolean ShapeConstruct_Curve::AdjustCurve(const Handle(Geom_Curve)& C3D,const gp_Pnt& P1,const gp_Pnt& P2,const Standard_Boolean take1,const Standard_Boolean take2) const
{
if (!take1 && !take2) return Standard_True;
OCC_CATCH_SIGNALS
bspl = GeomConvert::CurveToBSplineCurve(tc);
}
- catch ( Standard_Failure ) {
-#ifdef DEB
+ catch ( Standard_Failure const& anException) {
+#ifdef OCCT_DEBUG
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in GeomConvert: ";
- Standard_Failure::Caught()->Print(cout); cout << endl;
+ anException.Print(cout); cout << endl;
#endif
+ (void)anException;
}
}
bspl->Segment ( fbsp, lbsp );
return bspl;
}
- catch ( Standard_Failure ) {
-#ifdef DEB
+ catch ( Standard_Failure const& anException) {
+#ifdef OCCT_DEBUG
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in Segment: ";
- Standard_Failure::Caught()->Print(cout); cout << endl;
+ anException.Print(cout); cout << endl;
#endif
+ (void)anException;
}
}
if ( Conv.IsDone() || Conv.HasResult() )
bspl = Conv.Curve();
}
- catch ( Standard_Failure ) {
-#ifdef DEB
+ catch (Standard_Failure const& anException) {
+#ifdef OCCT_DEBUG
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in Approx_Curve3d: ";
- Standard_Failure::Caught()->Print(cout); cout << endl;
+ anException.Print(cout); cout << endl;
#endif
+ (void)anException;
}
return bspl;
}
OCC_CATCH_SIGNALS
bspl = Geom2dConvert::CurveToBSplineCurve(tc);
}
- catch ( Standard_Failure ) {
-#ifdef DEB
+ catch ( Standard_Failure const& anException) {
+#ifdef OCCT_DEBUG
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in Geom2dConvert: ";
- Standard_Failure::Caught()->Print(cout); cout << endl;
+ anException.Print(cout); cout << endl;
#endif
+ (void)anException;
}
}
bspl->Segment ( fbsp, lbsp );
return bspl;
}
- catch ( Standard_Failure ) {
-#ifdef DEB
+ catch ( Standard_Failure const& anException) {
+#ifdef OCCT_DEBUG
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in Segment: ";
- Standard_Failure::Caught()->Print(cout); cout << endl;
+ anException.Print(cout); cout << endl;
#endif
+ (void)anException;
}
}
if ( Conv.IsDone() || Conv.HasResult() )
bspl = Conv.Curve();
}
- catch ( Standard_Failure ) {
-#ifdef DEB
+ catch ( Standard_Failure const& anException) {
+#ifdef OCCT_DEBUG
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in Approx_Curve3d: ";
- Standard_Failure::Caught()->Print(cout); cout << endl;
+ anException.Print(cout); cout << endl;
#endif
+ (void)anException;
}
return bspl;
}