// Created on: 1997-01-10
// Created by: Bruno DUMORTIER
// Copyright (c) 1997-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 <BiTgte_CurveOnEdge.ixx>
-
+#include <Adaptor3d_HCurve.hxx>
+#include <BiTgte_CurveOnEdge.hxx>
#include <BiTgte_HCurveOnEdge.hxx>
#include <BRep_Tool.hxx>
+#include <Geom_BezierCurve.hxx>
+#include <Geom_BSplineCurve.hxx>
+#include <Geom_Curve.hxx>
#include <Geom_TrimmedCurve.hxx>
-#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
-#include <Standard_NotImplemented.hxx>
+#include <GeomAPI_ProjectPointOnCurve.hxx>
+#include <gp_Circ.hxx>
+#include <gp_Elips.hxx>
+#include <gp_Hypr.hxx>
+#include <gp_Lin.hxx>
+#include <gp_Parab.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Vec.hxx>
#include <Precision.hxx>
-
+#include <Standard_DomainError.hxx>
+#include <Standard_NoSuchObject.hxx>
+#include <Standard_NotImplemented.hxx>
+#include <Standard_OutOfRange.hxx>
+#include <TopoDS_Edge.hxx>
//=======================================================================
//function : BiTgte_CurveOnEdge
//purpose :
//======================================================================
-
BiTgte_CurveOnEdge::BiTgte_CurveOnEdge()
+: myType(GeomAbs_OtherCurve)
{
}
//purpose :
//=======================================================================
-BiTgte_CurveOnEdge::BiTgte_CurveOnEdge(const TopoDS_Edge& EonF,
- const TopoDS_Edge& Edge)
+BiTgte_CurveOnEdge::BiTgte_CurveOnEdge(const TopoDS_Edge& theEonF,
+ const TopoDS_Edge& theEdge)
+: myEdge(theEdge),
+ myEonF(theEonF),
+ myType(GeomAbs_OtherCurve)
{
- Init(EonF,Edge);
+ Init(theEonF, theEdge);
}
//=======================================================================
void BiTgte_CurveOnEdge::Init(const TopoDS_Edge& EonF,
- const TopoDS_Edge& Edge)
+ const TopoDS_Edge& Edge)
{
Standard_Real f,l;
GeomAbs_Shape BiTgte_CurveOnEdge::Continuity() const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- return GeomAbs_C0;
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
Standard_Integer BiTgte_CurveOnEdge::NbIntervals(const GeomAbs_Shape) const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- return 0;
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
void BiTgte_CurveOnEdge::Intervals(TColStd_Array1OfReal&,
const GeomAbs_Shape) const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
const Standard_Real,
const Standard_Real) const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- Handle(BiTgte_HCurveOnEdge) HC;
- return HC;
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
Standard_Boolean BiTgte_CurveOnEdge::IsClosed() const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- return Standard_False;
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
Standard_Boolean BiTgte_CurveOnEdge::IsPeriodic() const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- return Standard_False;
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
Standard_Real BiTgte_CurveOnEdge::Period() const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- return 0.;
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
void BiTgte_CurveOnEdge::D1(const Standard_Real,gp_Pnt& ,gp_Vec& ) const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
void BiTgte_CurveOnEdge::D2(const Standard_Real ,gp_Pnt&,
gp_Vec& ,gp_Vec&) const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
void BiTgte_CurveOnEdge::D3(const Standard_Real ,gp_Pnt&,
gp_Vec& ,gp_Vec& ,gp_Vec& ) const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
gp_Vec BiTgte_CurveOnEdge::DN(const Standard_Real,
const Standard_Integer) const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- return gp_Vec();
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
Standard_Real BiTgte_CurveOnEdge::Resolution(const Standard_Real) const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- return 0.;
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
gp_Lin BiTgte_CurveOnEdge::Line() const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- return gp_Lin();
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
gp_Circ BiTgte_CurveOnEdge::Circle() const
{
if ( myType != GeomAbs_Circle) {
- Standard_NoSuchObject::Raise("BiTgte_CurveOnEdge::Circle");
- return gp_Circ();
+ throw Standard_NoSuchObject("BiTgte_CurveOnEdge::Circle");
}
return myCirc;
gp_Elips BiTgte_CurveOnEdge::Ellipse() const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- return gp_Elips();
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
gp_Hypr BiTgte_CurveOnEdge::Hyperbola() const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- return gp_Hypr();
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
gp_Parab BiTgte_CurveOnEdge::Parabola() const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- return gp_Parab();
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
Standard_Integer BiTgte_CurveOnEdge::Degree() const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- return 0;
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
Standard_Boolean BiTgte_CurveOnEdge::IsRational() const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- return Standard_False;
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
Standard_Integer BiTgte_CurveOnEdge::NbPoles() const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- return 0;
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
Standard_Integer BiTgte_CurveOnEdge::NbKnots() const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- return 0;
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
Handle(Geom_BezierCurve) BiTgte_CurveOnEdge::Bezier() const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- Handle(Geom_BezierCurve) B;
- return B;
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}
Handle(Geom_BSplineCurve) BiTgte_CurveOnEdge::BSpline() const
{
- Standard_NotImplemented::Raise("BiTgte_CurveOnEdge");
- Handle(Geom_BSplineCurve) B;
- return B;
+ throw Standard_NotImplemented("BiTgte_CurveOnEdge");
}