// Created on: 1994-03-23
// Created by: Bruno DUMORTIER
// Copyright (c) 1994-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// 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.
//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
-#include <Geom2dAPI_PointsToBSpline.ixx>
-
#include <AppDef_BSplineCompute.hxx>
#include <AppDef_MultiLine.hxx>
+#include <AppDef_MultiPointConstraint.hxx>
+#include <AppDef_Variational.hxx>
+#include <AppParCurves_HArray1OfConstraintCouple.hxx>
#include <AppParCurves_MultiBSpCurve.hxx>
#include <BSplCLib.hxx>
+#include <Geom2d_BSplineCurve.hxx>
+#include <Geom2dAPI_PointsToBSpline.hxx>
+#include <math_Vector.hxx>
+#include <Standard_OutOfRange.hxx>
+#include <StdFail_NotDone.hxx>
+#include <TColgp_Array1OfPnt2d.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
-#include <TColgp_Array1OfPnt2d.hxx>
-#include <math_Vector.hxx>
-#include <AppDef_MultiPointConstraint.hxx>
-#include <AppParCurves_HArray1OfConstraintCouple.hxx>
-#include <AppDef_TheVariational.hxx>
-
//=======================================================================
//function : Geom2dAPI_PointsToBSpline
//purpose :
//=======================================================================
-
Geom2dAPI_PointsToBSpline::Geom2dAPI_PointsToBSpline()
{
myIsDone = Standard_False;
// insert the Knots
BSplCLib::InsertKnots(Degree,Standard_False,1,
NewTempPoles,NewTempKnots,NewTempMults,
- TheCurve.Knots(),TheCurve.Multiplicities(),
+ TheCurve.Knots(),&TheCurve.Multiplicities(),
XPoles,Knots,Mults,
Epsilon(1));
const GeomAbs_Shape Continuity,
const Standard_Real Tol2D)
{
- if (Params.Length() != Points.Length()) Standard_OutOfRange::Raise("");
+ if (Params.Length() != Points.Length()) throw Standard_OutOfRange ("Geom2dAPI_PointsToBSpline::Init() - invalid input");
Standard_Real Tol3D = 0.; // dummy argument for BSplineCompute.
Standard_Integer Nbp = Params.Length();
}
- AppDef_TheVariational Variation(multL, 1, NbPoint, TABofCC);
+ AppDef_Variational Variation(multL, 1, NbPoint, TABofCC);
//===================================
Standard_Integer theMaxSegments = 1000;
try {
Variation.Approximate();
}
- catch (Standard_Failure) {
+ catch (Standard_Failure const&) {
return;
}
}
//=======================================================================
-//function : Handle_Geom2d_BSplineCurve&
+//function : Handle(Geom2d_BSplineCurve)&
//purpose :
//=======================================================================
const Handle(Geom2d_BSplineCurve)& Geom2dAPI_PointsToBSpline::Curve() const
{
if ( !myIsDone)
- StdFail_NotDone::Raise(" ");
+ throw StdFail_NotDone(" ");
return myCurve;
}