// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <Geom2dGcc_Circ2d2TanRad.ixx>
-#include <Geom2dAdaptor_Curve.hxx>
+
#include <GccAna_Circ2d2TanRad.hxx>
-#include <Geom2dGcc_Circ2d2TanRadGeo.hxx>
-#include <Geom2dGcc_QCurve.hxx>
#include <GccEnt_BadQualifier.hxx>
+#include <GccEnt_QualifiedCirc.hxx>
+#include <GccEnt_QualifiedLin.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Line.hxx>
+#include <Geom2d_Point.hxx>
+#include <Geom2dAdaptor_Curve.hxx>
+#include <Geom2dGcc_Circ2d2TanRad.hxx>
+#include <Geom2dGcc_Circ2d2TanRadGeo.hxx>
+#include <Geom2dGcc_QCurve.hxx>
+#include <Geom2dGcc_QualifiedCurve.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Lin2d.hxx>
-#include <GccEnt_QualifiedCirc.hxx>
-#include <GccEnt_QualifiedLin.hxx>
-#include <StdFail_NotDone.hxx>
+#include <gp_Pnt2d.hxx>
#include <Standard_NegativeValue.hxx>
#include <Standard_OutOfRange.hxx>
+#include <StdFail_NotDone.hxx>
static const Standard_Integer aNbSolMAX = 16;
pararg1(1,aNbSolMAX) ,
pararg2(1,aNbSolMAX)
{
- if (Radius < 0.) { Standard_NegativeValue::Raise(); }
+ if (Radius < 0.) { throw Standard_NegativeValue(); }
else {
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
Geom2dAdaptor_Curve C2 = Qualified2.Qualified();
}
else {
WellDone = Standard_False;
- GccEnt_BadQualifier::Raise();
+ throw GccEnt_BadQualifier();
}
}
}
gp_Lin2d l1(LL1->Lin2d());
if (Qualified1.IsEnclosing()) {
WellDone = Standard_False;
- GccEnt_BadQualifier::Raise();
+ throw GccEnt_BadQualifier();
}
else {
GccEnt_QualifiedLin Ql1 = GccEnt_QualifiedLin(l1,
}
else {
WellDone = Standard_False;
- GccEnt_BadQualifier::Raise();
+ throw GccEnt_BadQualifier();
}
}
}
gp_Lin2d l1(LL1->Lin2d());
if (Qualified1.IsEnclosing()) {
WellDone = Standard_False;
- GccEnt_BadQualifier::Raise();
+ throw GccEnt_BadQualifier();
}
else {
GccEnt_QualifiedLin Ql1 = GccEnt_QualifiedLin(l1,
gp_Lin2d l2(LL2->Lin2d());
if (Qualified2.IsEnclosing()) {
WellDone = Standard_False;
- GccEnt_BadQualifier::Raise();
+ throw GccEnt_BadQualifier();
}
else {
GccEnt_QualifiedLin Ql2 = GccEnt_QualifiedLin(l2,
const Handle(Geom2d_Point)& Point ,
const Standard_Real Radius ,
const Standard_Real Tolerance ):
- cirsol(1,8) ,
- qualifier1(1,8),
- qualifier2(1,8),
- TheSame1(1,8) ,
- TheSame2(1,8) ,
- pnttg1sol(1,8),
- pnttg2sol(1,8),
- par1sol(1,8) ,
- par2sol(1,8) ,
- pararg1(1,8) ,
- pararg2(1,8)
+ cirsol(1,aNbSolMAX) ,
+ qualifier1(1,aNbSolMAX),
+ qualifier2(1,aNbSolMAX),
+ TheSame1(1,aNbSolMAX) ,
+ TheSame2(1,aNbSolMAX) ,
+ pnttg1sol(1,aNbSolMAX),
+ pnttg2sol(1,aNbSolMAX),
+ par1sol(1,aNbSolMAX) ,
+ par2sol(1,aNbSolMAX) ,
+ pararg1(1,aNbSolMAX) ,
+ pararg2(1,aNbSolMAX)
{
- if (Radius < 0.) { Standard_NegativeValue::Raise(); }
+ if (Radius < 0.) { throw Standard_NegativeValue(); }
else {
Geom2dAdaptor_Curve C1 = Qualified1.Qualified();
Handle(Geom2d_Curve) CC1 = C1.Curve();
pararg1(1,2) ,
pararg2(1,2)
{
- if (Radius < 0.) { Standard_NegativeValue::Raise(); }
+ if (Radius < 0.) { throw Standard_NegativeValue(); }
else {
//=============================================================================
gp_Circ2d Geom2dGcc_Circ2d2TanRad::
ThisSolution (const Standard_Integer Index) const
{
- if (!WellDone) { StdFail_NotDone::Raise(); }
- if (Index <= 0 ||Index > NbrSol) { Standard_OutOfRange::Raise(); }
+ if (!WellDone) { throw StdFail_NotDone(); }
+ if (Index <= 0 ||Index > NbrSol) { throw Standard_OutOfRange(); }
return cirsol(Index);
}
GccEnt_Position& Qualif1 ,
GccEnt_Position& Qualif2) const
{
- if (!WellDone) { StdFail_NotDone::Raise(); }
- else if (Index <= 0 ||Index > NbrSol) { Standard_OutOfRange::Raise(); }
+ if (!WellDone) { throw StdFail_NotDone(); }
+ else if (Index <= 0 ||Index > NbrSol) { throw Standard_OutOfRange(); }
else {
if (Invert) {
Qualif1 = qualifier2(Index);
Standard_Real& ParArg,
gp_Pnt2d& PntSol) const
{
- if (!WellDone) { StdFail_NotDone::Raise(); }
- else if (Index <= 0 ||Index > NbrSol) { Standard_OutOfRange::Raise(); }
+ if (!WellDone) { throw StdFail_NotDone(); }
+ else if (Index <= 0 ||Index > NbrSol) { throw Standard_OutOfRange(); }
else {
if (Invert) {
if (TheSame2(Index) == 0) {
ParArg = pararg2(Index);
PntSol = pnttg2sol(Index);
}
- else { StdFail_NotDone::Raise(); }
+ else { throw StdFail_NotDone(); }
}
else {
if (TheSame1(Index) == 0) {
ParArg = pararg1(Index);
PntSol = pnttg1sol(Index);
}
- else { StdFail_NotDone::Raise(); }
+ else { throw StdFail_NotDone(); }
}
}
}
Standard_Real& ParArg,
gp_Pnt2d& PntSol) const
{
- if (!WellDone) { StdFail_NotDone::Raise(); }
- else if (Index <= 0 ||Index > NbrSol) { Standard_OutOfRange::Raise(); }
+ if (!WellDone) { throw StdFail_NotDone(); }
+ else if (Index <= 0 ||Index > NbrSol) { throw Standard_OutOfRange(); }
else {
if (!Invert) {
if (TheSame2(Index) == 0) {
ParArg = pararg2(Index);
PntSol = pnttg2sol(Index);
}
- else { StdFail_NotDone::Raise(); }
+ else { throw StdFail_NotDone(); }
}
else {
if (TheSame1(Index) == 0) {
ParArg = pararg1(Index);
PntSol = pnttg1sol(Index);
}
- else { StdFail_NotDone::Raise(); }
+ else { throw StdFail_NotDone(); }
}
}
}
Standard_Boolean Geom2dGcc_Circ2d2TanRad::
IsTheSame1 (const Standard_Integer Index) const
{
- if (!WellDone) { StdFail_NotDone::Raise(); }
- if (Index <= 0 ||Index > NbrSol) { Standard_OutOfRange::Raise(); }
+ if (!WellDone) { throw StdFail_NotDone(); }
+ if (Index <= 0 ||Index > NbrSol) { throw Standard_OutOfRange(); }
if (Invert) {
if (TheSame2(Index) == 0) { return Standard_False; }
else { return Standard_True; }
Standard_Boolean Geom2dGcc_Circ2d2TanRad::
IsTheSame2 (const Standard_Integer Index) const
{
- if (!WellDone) { StdFail_NotDone::Raise(); }
- if (Index <= 0 ||Index > NbrSol) { Standard_OutOfRange::Raise(); }
+ if (!WellDone) { throw StdFail_NotDone(); }
+ if (Index <= 0 ||Index > NbrSol) { throw Standard_OutOfRange(); }
if (!Invert) {
if (TheSame2(Index) == 0) { return Standard_False; }
else { return Standard_True; }