Handle(Geom2d_BezierCurve) Adaptor2d_OffsetCurve::Bezier() const
{
- Standard_NoSuchObject_Raise_if
- ( myOffset != 0.0e0 || GetType() != GeomAbs_BezierCurve, "");
+ Standard_NoSuchObject_Raise_if (myOffset != 0.0e0 || GetType() != GeomAbs_BezierCurve,
+ "Adaptor2d_OffsetCurve::Bezier() - wrong curve type");
return myCurve->Bezier();
}
Handle(Geom2d_BSplineCurve) Adaptor2d_OffsetCurve::BSpline() const
{
- Standard_NoSuchObject_Raise_if
- ( myOffset != 0.0e0 || GetType() != GeomAbs_BSplineCurve, "");
-
+ Standard_NoSuchObject_Raise_if (myOffset != 0.0e0 || GetType() != GeomAbs_BSplineCurve,
+ "Adaptor2d_OffsetCurve::BSpline() - wrong curve type");
return myCurve->BSpline();
}
-
-
SetPoint2d(CuIndex, newP);
}
-
-
-
-
void AppParCurves_MultiPoint::SetPoint (const Standard_Integer Index,
const gp_Pnt& Point) {
- Standard_OutOfRange_Raise_if((Index <= 0) || (Index > nbP), "");
+ Standard_OutOfRange_Raise_if ((Index <= 0) || (Index > nbP),
+ "AppParCurves_MultiPoint::SetPoint() - wrong index");
tabPoint->SetValue(Index, Point);
}
-
const gp_Pnt& AppParCurves_MultiPoint::Point (const Standard_Integer Index) const
{
- Standard_OutOfRange_Raise_if((Index <= 0) || (Index > nbP), "");
+ Standard_OutOfRange_Raise_if ((Index <= 0) || (Index > nbP),
+ "AppParCurves_MultiPoint::Point() - wrong index");
return tabPoint->Value(Index);
}
-
-
void AppParCurves_MultiPoint::SetPoint2d (const Standard_Integer Index,
const gp_Pnt2d& Point)
{
- Standard_OutOfRange_Raise_if((Index <= nbP) || (Index > nbP+nbP2d), "");
+ Standard_OutOfRange_Raise_if ((Index <= nbP) || (Index > nbP+nbP2d),
+ "AppParCurves_MultiPoint::SetPoint2d() - wrong index");
tabPoint2d->SetValue(Index-nbP, Point);
}
-
const gp_Pnt2d& AppParCurves_MultiPoint::Point2d (const Standard_Integer Index) const
{
- Standard_OutOfRange_Raise_if((Index <= nbP) || (Index > nbP+nbP2d), "");
+ Standard_OutOfRange_Raise_if ((Index <= nbP) || (Index > nbP+nbP2d),
+ "AppParCurves_MultiPoint::Point2d() - wrong index");
return tabPoint2d->Value(Index-nbP);
}
-
-
-
-
void AppParCurves_MultiPoint::Dump(Standard_OStream& o) const
{
return;
}
if (myProgressIndicator->UserBreak()) {
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("BOPAlgo_Algo::UserBreak(), method is not implemented");
}
}
// myErrorStatus
return;
}
if (myProgressIndicator->UserBreak()) {
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("BRepAlgoAPI_Algo::UserBreak(), method is not implemented");
}
}
//=======================================================================
const TopoDS_Shape& BRepFill_OffsetAncestors::Ancestor(const TopoDS_Edge& S1)
const
{
- StdFail_NotDone_Raise_if( !myIsPerform, "");
+ StdFail_NotDone_Raise_if (!myIsPerform, "BRepFill_OffsetAncestors::Ancestor() - Perform() should be called before accessing results");
return myMap(S1);
}
// POP-DPF : protection
if ( Abs(Angle) <= 1.e-04 )
return;
- Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
+ Standard_NullObject_Raise_if (myInitialShape.IsNull(),
+ "BRepOffsetAPI_DraftAngle::Add() - initial shape is not set");
Handle(Draft_Modification)::DownCast (myModification)->Add(F,D,Angle,Plane, Flag);
}
Standard_Boolean BRepOffsetAPI_DraftAngle::AddDone () const
{
- Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
+ Standard_NullObject_Raise_if (myInitialShape.IsNull(),
+ "BRepOffsetAPI_DraftAngle::AddDone() - initial shape is not set");
return Handle(Draft_Modification)::DownCast (myModification)
->ProblematicShape().IsNull();
}
void BRepOffsetAPI_DraftAngle::Remove(const TopoDS_Face& F)
{
- Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
+ Standard_NullObject_Raise_if (myInitialShape.IsNull(),
+ "BRepOffsetAPI_DraftAngle::Remove() - initial shape is not set");
Handle(Draft_Modification)::DownCast (myModification)->Remove(F);
}
const TopoDS_Shape& BRepOffsetAPI_DraftAngle::ProblematicShape () const
{
- Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
+ Standard_NullObject_Raise_if (myInitialShape.IsNull(),
+ "BRepOffsetAPI_DraftAngle::ProblematicShape() - initial shape is not set");
return Handle(Draft_Modification)::DownCast (myModification)->ProblematicShape();
}
Draft_ErrorStatus BRepOffsetAPI_DraftAngle::Status () const
{
- Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
+ Standard_NullObject_Raise_if (myInitialShape.IsNull(),
+ "BRepOffsetAPI_DraftAngle::Status() - initial shape is not set");
return Handle(Draft_Modification)::DownCast (myModification)->Error();
}
const TopTools_ListOfShape& BRepOffsetAPI_DraftAngle::ConnectedFaces
(const TopoDS_Face& F) const
{
- Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
+ Standard_NullObject_Raise_if (myInitialShape.IsNull(),
+ "BRepOffsetAPI_DraftAngle::ConnectedFaces() - initial shape is not set");
return Handle(Draft_Modification)::DownCast (myModification)->ConnectedFaces(F);
}
const TopTools_ListOfShape& BRepOffsetAPI_DraftAngle::ModifiedFaces() const
{
- Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
+ Standard_NullObject_Raise_if (myInitialShape.IsNull(),
+ "BRepOffsetAPI_DraftAngle::ModifiedFaces() - initial shape is not set");
return Handle(Draft_Modification)::DownCast (myModification)->ModifiedFaces();
}
const TopTools_ListOfShape& BRepOffsetAPI_DraftAngle::Generated(const TopoDS_Shape& S)
{
myGenerated.Clear();
- Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
+ Standard_NullObject_Raise_if (myInitialShape.IsNull(),
+ "BRepOffsetAPI_DraftAngle::Generated() - initial shape is not set");
Handle(Draft_Modification) DMod = Handle(Draft_Modification)::DownCast (myModification);
if (S.ShapeType() == TopAbs_FACE) {
const TopTools_ListOfShape& BRepOffsetAPI_DraftAngle::Modified(const TopoDS_Shape& S)
{
myGenerated.Clear();
- Standard_NullObject_Raise_if(myInitialShape.IsNull(),"");
+ Standard_NullObject_Raise_if (myInitialShape.IsNull(),
+ "BRepOffsetAPI_DraftAngle::Modified() - initial shape is not set");
Handle(Draft_Modification) DMod = Handle(Draft_Modification)::DownCast (myModification);
if (S.ShapeType() == TopAbs_FACE) {
inline Standard_Real CPnts_AbscissaPoint::Parameter() const
{
- StdFail_NotDone_Raise_if(!myDone, "");
+ StdFail_NotDone_Raise_if (!myDone, "CPnts_AbscissaPoint::Parameter() - no result");
return myParam;
}
inline void CPnts_UniformDeflection::Next()
{
- Standard_OutOfRange_Raise_if(myIPoint >= myNbPoints, "");
+ Standard_OutOfRange_Raise_if(myIPoint >= myNbPoints, "CPnts_UniformDeflection::Next() - no more points available");
myIPoint++;
}
inline Standard_Real CPnts_UniformDeflection::Value () const
{
- StdFail_NotDone_Raise_if(!myDone, "");
+ StdFail_NotDone_Raise_if (!myDone, "CPnts_UniformDeflection::Value() - no result");
return myParams[myIPoint + 1];
}
//=======================================================================
inline gp_Pnt CPnts_UniformDeflection::Point () const
{
- StdFail_NotDone_Raise_if(!myDone, "");
+ StdFail_NotDone_Raise_if (!myDone, "CPnts_UniformDeflection::Point() - no result");
return myPoints[myIPoint + 1];
}
sens = -1;
if(CD->SetOfSurfData().IsNull()) return 0;
else if (Vref.IsSame(V1)) Index = CD->SetOfSurfData()->Length();
- else throw Standard_ConstructionError("");
+ else throw Standard_ConstructionError ("ChFi3d_IndexOfSurfData() - wrong construction parameters");
}
return Index;
}
else Vref = TopExp::LastVertex(E1);
sens = -1;
if (Vref.IsSame(V1)) return E1;
- else throw Standard_ConstructionError("");
+ else throw Standard_ConstructionError ("ChFi3d_IndexOfSurfData() - wrong construction parameters");
}
}
//=======================================================================
{
GeomAPI_ProjectPointOnSurf tool(p3d,S);
if ( tool.NbPoints() != 1 )
- throw StdFail_NotDone("");
+ throw StdFail_NotDone ("ChFi3d_Parameters() - no projection results");
else
tool.Parameters(1,u,v);
}
{
GeomAPI_ProjectPointOnCurve tool(FirstP,gc);
if ( tool.NbPoints() != 1 )
- throw StdFail_NotDone("");
+ throw StdFail_NotDone ("ChFi3d_TrimCurve() - no projection results for the first point");
else
uf = tool.Parameter(1);
tool.Init(LastP,gc);
if ( tool.NbPoints() != 1 )
- throw StdFail_NotDone("");
+ throw StdFail_NotDone ("ChFi3d_TrimCurve() - no projection results for the second point");
else
ul = tool.Parameter(1);
}
TopoDS_Shape ChFi3d_Builder::Shape()const
{
- Standard_NoSuchObject_Raise_if(!done,"");
+ Standard_NoSuchObject_Raise_if (!done, "ChFi3d_Builder::Shape() - no result");
return myShapeResult;
}
TopoDS_Shape ChFi3d_Builder::BadShape()const
{
- Standard_NoSuchObject_Raise_if(!hasresult,"");
+ Standard_NoSuchObject_Raise_if (!hasresult, "ChFi3d_Builder::BadShape() - no result");
return badShape;
}
//=======================================================================
const Handle(Geom_TrimmedCurve)& GC_MakeArcOfCircle::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GC_MakeArcOfCircle::Value() - no result");
return TheArc;
}
const Handle(Geom_TrimmedCurve)& GC_MakeArcOfEllipse::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GC_MakeArcOfEllipse::Value() - no result");
return TheArc;
}
const Handle(Geom_TrimmedCurve)& GC_MakeArcOfHyperbola::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GC_MakeArcOfHyperbola::Value() - no result");
return TheArc;
}
const Handle(Geom_TrimmedCurve)& GC_MakeArcOfParabola::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GC_MakeArcOfParabola::Value() - no result");
return TheArc;
}
const Handle(Geom_Circle)& GC_MakeCircle::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GC_MakeCircle::Value() - no result");
return TheCircle;
}
const Handle(Geom_ConicalSurface)& GC_MakeConicalSurface::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GC_MakeConicalSurface::Value() - no result");
return TheCone;
}
const Handle(Geom_CylindricalSurface)&
GC_MakeCylindricalSurface::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GC_MakeCylindricalSurface::Value() - no result");
return TheCylinder;
}
const Handle(Geom_Ellipse)& GC_MakeEllipse::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GC_MakeEllipse::Value() - no result");
return TheEllipse;
}
const Handle(Geom_Hyperbola)& GC_MakeHyperbola::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GC_MakeHyperbola::Value() - no result");
return TheHyperbola;
}
const Handle(Geom_Line)& GC_MakeLine::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GC_MakeLine::Value() - no result");
return TheLine;
}
const Handle(Geom_Plane)& GC_MakePlane::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GC_MakePlane::Value() - no result");
return ThePlane;
}
const Handle(Geom_TrimmedCurve)& GC_MakeSegment::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GC_MakeSegment::Value() - no result");
return TheSegment;
}
const Handle(Geom_RectangularTrimmedSurface)& GC_MakeTrimmedCone::
Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GC_MakeTrimmedCone::Value() - no result");
return TheCone;
}
const Handle(Geom_RectangularTrimmedSurface)& GC_MakeTrimmedCylinder::
Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GC_MakeTrimmedCylinder::Value() - no result");
return TheCyl;
}
const Handle(Geom2d_TrimmedCurve)& GCE2d_MakeArcOfCircle::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GCE2d_MakeArcOfCircle::Value() - no result");
return TheArc;
}
const Handle(Geom2d_TrimmedCurve)& GCE2d_MakeArcOfEllipse::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GCE2d_MakeArcOfEllipse::Value() - no result");
return TheArc;
}
const Handle(Geom2d_TrimmedCurve)& GCE2d_MakeArcOfHyperbola::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GCE2d_MakeArcOfHyperbola::Value() - no result");
return TheArc;
}
const Handle(Geom2d_TrimmedCurve)& GCE2d_MakeArcOfParabola::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GCE2d_MakeArcOfParabola::Value() - no result");
return TheArc;
}
const Handle(Geom2d_Circle)& GCE2d_MakeCircle::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GCE2d_MakeCircle::Value() - no result");
return TheCircle;
}
const Handle(Geom2d_Ellipse)& GCE2d_MakeEllipse::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GCE2d_MakeEllipse::Value() - no result");
return TheEllipse;
}
const Handle(Geom2d_Hyperbola)& GCE2d_MakeHyperbola::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GCE2d_MakeHyperbola::Value() - no result");
return TheHyperbola;
}
const Handle(Geom2d_Line)& GCE2d_MakeLine::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GCE2d_MakeLine::Value() - no result");
return TheLine;
}
const Handle(Geom2d_Parabola)& GCE2d_MakeParabola::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GCE2d_MakeParabola::Value() - no result");
return TheParabola;
}
const Handle(Geom2d_TrimmedCurve)& GCE2d_MakeSegment::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "GCE2d_MakeSegment::Value() - no result");
return TheSegment;
}
// }
#endif
}
- else {
- Standard_ConstructionError_Raise_if(NbPoints <= 1, "");
+ else
+ {
+ Standard_ConstructionError_Raise_if (NbPoints <= 1,
+ "GCPnts_QuasiUniformAbscissa::Initialize() - number of points should be >= 2");
// evaluate the approximative length of the 3dCurve
myNbPoints = NbPoints;
const Standard_Real U2,
const Standard_Real Tol)
{
- Standard_ConstructionError_Raise_if(NbPoints <= 1, "");
+ Standard_ConstructionError_Raise_if (NbPoints <= 1,
+ "GCPnts_UniformAbscissa::Initialize() - number of points should be >= 2");
Standard_Real Abscissa ;
myNbPoints = 0 ;
myDone = Standard_False;
Geom_Direction::Geom_Direction (const Standard_Real X, const Standard_Real Y, const Standard_Real Z) {
Standard_Real D = sqrt (X * X + Y * Y + Z * Z);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "Geom_Direction() - input vector has zero length");
gpVec = gp_Vec (X/D, Y/D, Z/D);
}
void Geom_Direction::SetCoord (const Standard_Real X, const Standard_Real Y, const Standard_Real Z) {
Standard_Real D = Sqrt (X * X + Y * Y + Z * Z);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "Geom_Direction::SetCoord() - input vector has zero length");
gpVec = gp_Vec(X/D, Y/D, Z/D);
}
void Geom_Direction::SetX (const Standard_Real X) {
Standard_Real D = Sqrt (X * X + gpVec.Y() * gpVec.Y() + gpVec.Z() * gpVec.Z());
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "Geom_Direction::SetX() - input vector has zero length");
gpVec = gp_Vec (X/D, gpVec.Y()/D, gpVec.Z()/D);
}
void Geom_Direction::SetY (const Standard_Real Y) {
Standard_Real D = Sqrt (gpVec.X() * gpVec.X() + Y * Y + gpVec.Z() * gpVec.Z());
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "Geom_Direction::SetY() - input vector has zero length");
gpVec = gp_Vec (gpVec.X()/D, Y/D, gpVec.Z()/D);
}
void Geom_Direction::SetZ (const Standard_Real Z) {
Standard_Real D = Sqrt (gpVec.X() * gpVec.X() + gpVec.Y() * gpVec.Y() + Z * Z);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "Geom_Direction::SetZ() - input vector has zero length");
gpVec = gp_Vec (gpVec.X()/D, gpVec.Y()/D, Z/D);
}
Geom2d_Direction::Geom2d_Direction (const Standard_Real X, const Standard_Real Y) {
Standard_Real D = Sqrt (X * X + Y * Y);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "Geom2d_Direction() - input vector has zero length");
gpVec2d = gp_Vec2d (X/D, Y/D);
}
void Geom2d_Direction::SetCoord (const Standard_Real X, const Standard_Real Y) {
Standard_Real D = Sqrt (X * X + Y * Y);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "Geom2d_Direction::SetCoord() - input vector has zero length");
gpVec2d = gp_Vec2d (X/D, Y/D);
}
void Geom2d_Direction::SetX (const Standard_Real X) {
Standard_Real D = Sqrt(X * X + gpVec2d.Y() * gpVec2d.Y());
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "Geom2d_Direction::SetX() - input vector has zero length");
gpVec2d = gp_Vec2d (X/D, gpVec2d.Y()/D);
}
void Geom2d_Direction::SetY (const Standard_Real Y) {
Standard_Real D = Sqrt (gpVec2d.X() * gpVec2d.X() + Y * Y);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "Geom2d_Direction::SetY() - input vector has zero length");
gpVec2d = gp_Vec2d (gpVec2d.X()/D, Y/D);
}
const GeomAbs_Shape Continuity,
const Standard_Real Tol2D)
{
- if (Params.Length() != Points.Length()) throw Standard_OutOfRange("");
+ 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();
gp_Lin2d Geom2dAdaptor_Curve::Line() const
{
- Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Line, "");
+ Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Line,
+ "Geom2dAdaptor_Curve::Line() - curve is not a Line");
return Handle(Geom2d_Line)::DownCast (myCurve)->Lin2d();
}
gp_Circ2d Geom2dAdaptor_Curve::Circle() const
{
- Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Circle, "");
+ Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Circle,
+ "Geom2dAdaptor_Curve::Circle() - curve is not a Circle");
return Handle(Geom2d_Circle)::DownCast (myCurve)->Circ2d();
}
gp_Elips2d Geom2dAdaptor_Curve::Ellipse() const
{
- Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Ellipse, "");
+ Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Ellipse,
+ "Geom2dAdaptor_Curve::Ellipse() - curve is not an Ellipse");
return Handle(Geom2d_Ellipse)::DownCast (myCurve)->Elips2d();
}
gp_Hypr2d Geom2dAdaptor_Curve::Hyperbola() const
{
- Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Hyperbola, "");
+ Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Hyperbola,
+ "Geom2dAdaptor_Curve::Hyperbola() - curve is not a Hyperbola");
return Handle(Geom2d_Hyperbola)::DownCast (myCurve)->Hypr2d();
}
gp_Parab2d Geom2dAdaptor_Curve::Parabola() const
{
- Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Parabola, "");
+ Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Parabola,
+ "Geom2dAdaptor_Curve::Parabola() - curve is not a Parabola");
return Handle(Geom2d_Parabola)::DownCast (myCurve)->Parab2d();
}
const GeomAbs_Shape Continuity,
const Standard_Real Tol3D)
{
- if (Params.Length() != Points.Length()) throw Standard_OutOfRange("");
+ if (Params.Length() != Points.Length()) throw Standard_OutOfRange ("GeomAPI_PointsToBSpline::Init() - invalid input");
Standard_Real Tol2D = 0.; // dummy argument for BSplineCompute.
Standard_Integer Nbp = Params.Length();
gp_Lin GeomAdaptor_Curve::Line() const
{
- Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Line, "");
+ Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Line,
+ "GeomAdaptor_Curve::Line() - curve is not a Line");
return Handle(Geom_Line)::DownCast (myCurve)->Lin();
}
gp_Circ GeomAdaptor_Curve::Circle() const
{
- Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Circle, "");
+ Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Circle,
+ "GeomAdaptor_Curve::Circle() - curve is not a Circle");
return Handle(Geom_Circle)::DownCast (myCurve)->Circ();
}
gp_Elips GeomAdaptor_Curve::Ellipse() const
{
- Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Ellipse, "");
+ Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Ellipse,
+ "GeomAdaptor_Curve::Ellipse() - curve is not an Ellipse");
return Handle(Geom_Ellipse)::DownCast (myCurve)->Elips();
}
gp_Hypr GeomAdaptor_Curve::Hyperbola() const
{
- Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Hyperbola, "");
+ Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Hyperbola,
+ "GeomAdaptor_Curve::Hyperbola() - curve is not a Hyperbola");
return Handle(Geom_Hyperbola)::DownCast (myCurve)->Hypr();
}
gp_Parab GeomAdaptor_Curve::Parabola() const
{
- Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Parabola, "");
+ Standard_NoSuchObject_Raise_if (myTypeCurve != GeomAbs_Parabola,
+ "GeomAdaptor_Curve::Parabola() - curve is not a Parabola");
return Handle(Geom_Parabola)::DownCast (myCurve)->Parab();
}
Precision::IsPositiveInfinite(ULast) ||
Precision::IsNegativeInfinite(VFirst) ||
Precision::IsPositiveInfinite(VLast) ) {
- throw Standard_DomainError("");
+ throw Standard_DomainError ("GeomConvert::SurfaceToBSplineSurface() - infinite surface");
}
Handle(Geom_BSplineSurface) TheSurface;
//=======================================================================
inline Standard_Integer GeomInt_IntSS::NbBoundaries () const
{
- StdFail_NotDone_Raise_if(!myIntersector.IsDone(),"");
+ StdFail_NotDone_Raise_if (!myIntersector.IsDone(), "GeomInt_IntSS::NbBoundaries() - no result");
return myNbrestr;
}
const Handle(StepGeom_Axis1Placement) &
GeomToStep_MakeAxis1Placement::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeAxis1Placement::Value() - no result");
return theAxis1Placement;
}
const Handle(StepGeom_Axis2Placement2d) &
GeomToStep_MakeAxis2Placement2d::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeAxis2Placement2d::Value() - no result");
return theAxis2Placement2d;
}
const Handle(StepGeom_Axis2Placement3d) &
GeomToStep_MakeAxis2Placement3d::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeAxis2Placement3d::Value() - no result");
return theAxis2Placement3d;
}
const Handle(StepGeom_BSplineCurveWithKnots) &
GeomToStep_MakeBSplineCurveWithKnots::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeBSplineCurveWithKnots::Value() - no result");
return theBSplineCurveWithKnots;
}
const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve) &
GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve::Value() - no result");
return theBSplineCurveWithKnotsAndRationalBSplineCurve;
}
const Handle(StepGeom_BSplineSurfaceWithKnots) &
GeomToStep_MakeBSplineSurfaceWithKnots::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeBSplineSurfaceWithKnots::Value() - no result");
return theBSplineSurfaceWithKnots;
}
const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface) &
GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface::Value() - no result");
return theBSplineSurfaceWithKnotsAndRationalBSplineSurface;
}
const Handle(StepGeom_BoundedCurve) &
GeomToStep_MakeBoundedCurve::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeBoundedCurve::Value() - no result");
return theBoundedCurve;
}
const Handle(StepGeom_BoundedSurface) &
GeomToStep_MakeBoundedSurface::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeBoundedSurface::Value() - no result");
return theBoundedSurface;
}
const Handle(StepGeom_CartesianPoint) &
GeomToStep_MakeCartesianPoint::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeCartesianPoint::Value() - no result");
return theCartesianPoint;
}
const Handle(StepGeom_Circle) &
GeomToStep_MakeCircle::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeCircle::Value() - no result");
return theCircle;
}
const Handle(StepGeom_Conic) &
GeomToStep_MakeConic::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeConic::Value() - no result");
return theConic;
}
const Handle(StepGeom_ConicalSurface) &
GeomToStep_MakeConicalSurface::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeConicalSurface::Value() - no result");
return theConicalSurface;
}
const Handle(StepGeom_Curve) &
GeomToStep_MakeCurve::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeCurve::Value() - no result");
return theCurve;
}
const Handle(StepGeom_CylindricalSurface) &
GeomToStep_MakeCylindricalSurface::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeCylindricalSurface::Value() - no result");
return theCylindricalSurface;
}
const Handle(StepGeom_Direction) &
GeomToStep_MakeDirection::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeDirection::Value() - no result");
return theDirection;
}
const Handle(StepGeom_ElementarySurface) &
GeomToStep_MakeElementarySurface::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeElementarySurface::Value() - no result");
return theElementarySurface;
}
const Handle(StepGeom_Ellipse) &
GeomToStep_MakeEllipse::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeEllipse::Value() - no result");
return theEllipse;
}
const Handle(StepGeom_Hyperbola)& GeomToStep_MakeHyperbola::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeHyperbola::Value() - no result");
return theHyperbola;
}
const Handle(StepGeom_Line) &
GeomToStep_MakeLine::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeLine::Value() - no result");
return theLine;
}
const Handle(StepGeom_Parabola)& GeomToStep_MakeParabola::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeParabola::Value() - no result");
return theParabola;
}
const Handle(StepGeom_Plane) &
GeomToStep_MakePlane::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakePlane::Value() - no result");
return thePlane;
}
const Handle(StepGeom_Polyline) &
GeomToStep_MakePolyline::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakePolyline::Value() - no result");
return thePolyline;
}
const Handle(StepGeom_RectangularTrimmedSurface) &
GeomToStep_MakeRectangularTrimmedSurface::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeRectangularTrimmedSurface::Value() - no result");
return theRectangularTrimmedSurface;
}
const Handle(StepGeom_SphericalSurface) &
GeomToStep_MakeSphericalSurface::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeSphericalSurface::Value() - no result");
return theSphericalSurface;
}
const Handle(StepGeom_Surface) &
GeomToStep_MakeSurface::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeSurface::Value() - no result");
return theSurface;
}
const Handle(StepGeom_SurfaceOfLinearExtrusion) &
GeomToStep_MakeSurfaceOfLinearExtrusion::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeSurfaceOfLinearExtrusion::Value() - no result");
return theSurfaceOfLinearExtrusion;
}
const Handle(StepGeom_SurfaceOfRevolution) &
GeomToStep_MakeSurfaceOfRevolution::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeSurfaceOfRevolution::Value() - no result");
return theSurfaceOfRevolution;
}
const Handle(StepGeom_SweptSurface) &
GeomToStep_MakeSweptSurface::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeSweptSurface::Value() - no result");
return theSweptSurface;
}
const Handle(StepGeom_ToroidalSurface) &
GeomToStep_MakeToroidalSurface::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeToroidalSurface::Value() - no result");
return theToroidalSurface;
}
const Handle(StepGeom_Vector) &
GeomToStep_MakeVector::Value() const
{
- StdFail_NotDone_Raise_if(!done, "");
+ StdFail_NotDone_Raise_if (!done, "GeomToStep_MakeVector::Value() - no result");
return theVector;
}
Standard_Real MaxStep(Standard_Integer theIndex)
{
- Standard_OutOfRange_Raise_if((theIndex < 0) || (theIndex > 3), "");
+ Standard_OutOfRange_Raise_if ((theIndex < 0) || (theIndex > 3),
+ "IntWalk_PWalking::MaxStep() - index is out of range");
return pasInit[theIndex];
}
: myU(RealLast()), myDerOrder(N), myCN(0), myLinTol(Resolution),
myTangentStatus (LProp_Undecided)
{
- Standard_OutOfRange_Raise_if (N < 0 || N > 3, "");
+ Standard_OutOfRange_Raise_if (N < 0 || N > 3, "LProp_CLProps() - invalid input");
}
void LProp_CLProps::SetParameter(const Standard_Real U)
void NCollection_BaseSequence::RemoveSeq (const Standard_Integer theIndex,
NCollection_DelSeqNode fDel)
{
- Standard_OutOfRange_Raise_if (theIndex <= 0 || theIndex > mySize, "");
-
+ Standard_OutOfRange_Raise_if (theIndex <= 0 || theIndex > mySize,
+ "NCollection_BaseSequence::RemoveSeq() - index is out of range");
+
NCollection_SeqNode * p = Find (theIndex);
if (p->Previous())
p->Previous()->SetNext (p->Next());
const Standard_Integer To,
NCollection_DelSeqNode fDel)
{
- Standard_OutOfRange_Raise_if (From <= 0 || To > mySize || From > To, "");
+ Standard_OutOfRange_Raise_if (From <= 0 || To > mySize || From > To,
+ "NCollection_BaseSequence::RemoveSeq() - invalid input range");
NCollection_SeqNode * pfrom = Find(From);
NCollection_SeqNode * pto = Find(To);
}
else
{
- throw Standard_NoSuchObject("");
+ throw Standard_NoSuchObject ("ProjLib_ComputeApproxOnPolarSurface::ProjectUsingInitialCurve2d() - unknown surface type");
}
// Try to run simple search with initial point (U0, V0).
return myResult->Trim(First,Last,Tolerance) ;
}
else {
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("ProjLib_ProjectOnPlane::Trim() - curve of unsupported type");
}
}
GeomAbs_Shape ProjLib_ProjectedCurve::Continuity() const
{
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("ProjLib_ProjectedCurve::Continuity() - method is not implemented");
}
Standard_Integer ProjLib_ProjectedCurve::NbIntervals(const GeomAbs_Shape ) const
{
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("ProjLib_ProjectedCurve::NbIntervals() - method is not implemented");
}
void ProjLib_ProjectedCurve::Intervals(TColStd_Array1OfReal& ,
const GeomAbs_Shape ) const
{
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("ProjLib_ProjectedCurve::Intervals() - method is not implemented");
}
Standard_Boolean ProjLib_ProjectedCurve::IsClosed() const
{
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("ProjLib_ProjectedCurve::IsClosed() - method is not implemented");
}
Standard_Real ProjLib_ProjectedCurve::Period() const
{
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("ProjLib_ProjectedCurve::Period() - method is not implemented");
}
gp_Pnt2d ProjLib_ProjectedCurve::Value(const Standard_Real ) const
{
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("ProjLib_ProjectedCurve::Value() - method is not implemented");
}
void ProjLib_ProjectedCurve::D0(const Standard_Real , gp_Pnt2d& ) const
{
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("ProjLib_ProjectedCurve::D0() - method is not implemented");
}
gp_Pnt2d& ,
gp_Vec2d& ) const
{
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("ProjLib_ProjectedCurve::D1() - method is not implemented");
}
gp_Vec2d& ,
gp_Vec2d& ) const
{
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("ProjLib_ProjectedCurve::D2() - method is not implemented");
}
gp_Vec2d&,
gp_Vec2d&) const
{
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("ProjLib_ProjectedCurve::D3() - method is not implemented");
}
gp_Vec2d ProjLib_ProjectedCurve::DN(const Standard_Real,
const Standard_Integer) const
{
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("ProjLib_ProjectedCurve::DN() - method is not implemented");
}
Standard_Real ProjLib_ProjectedCurve::Resolution(const Standard_Real) const
{
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("ProjLib_ProjectedCurve::Resolution() - method is not implemented");
}
const Standard_Real ,
const Standard_Real ) const
{
- throw Standard_NotImplemented("");
+ throw Standard_NotImplemented ("ProjLib_ProjectedCurve::Trim() - method is not implemented");
}
-
const TopoDS_Shape& StepToTopoDS_Builder::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "StepToTopoDS_Builder::Value() - no result");
return myResult;
}
const TopoDS_Shape& StepToTopoDS_TranslateEdge::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslateEdge::Value() - no result");
return myResult;
}
const TopoDS_Shape& StepToTopoDS_TranslateEdgeLoop::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslateEdgeLoop::Value() - no result");
return myResult;
}
const TopoDS_Shape& StepToTopoDS_TranslateFace::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslateFace::Value() - no result");
return myResult;
}
const TopoDS_Shape& StepToTopoDS_TranslatePolyLoop::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslatePolyLoop::Value() - no result");
return myResult;
}
const TopoDS_Shape& StepToTopoDS_TranslateShell::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslateShell::Value() - no result");
return myResult;
}
const TopoDS_Shape& StepToTopoDS_TranslateVertex::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslateVertex::Value() - no result");
return myResult;
}
const TopoDS_Shape& StepToTopoDS_TranslateVertexLoop::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslateVertexLoop::Value() - no result");
return myResult;
}
void TCollection_Sequence::InsertAfter(const Standard_Integer Index,
const SeqItem& T)
{
- Standard_OutOfRange_Raise_if ( Index < 0 || Index > Size, "");
+ Standard_OutOfRange_Raise_if (Index < 0 || Index > Size, "TCollection_Sequence::InsertAfter() - index is out of range");
TCollection_SequenceNode* newnode = new TCollection_SequenceNode(T,(TCollection_SeqNode*)0L,(TCollection_SeqNode*)0L);
PInsertAfter (Index,(void*)newnode);
}
// ----------------------------------------------------
const SeqItem& TCollection_Sequence::First() const
{
- Standard_NoSuchObject_Raise_if(Size == 0,"");
+ Standard_NoSuchObject_Raise_if (Size == 0, "TCollection_Sequence::First() - sequence is empty");
return ((TCollection_SequenceNode*) FirstItem)->Value();
}
// ----------------------------------------------------
const SeqItem& TCollection_Sequence::Last() const
{
- Standard_NoSuchObject_Raise_if(Size == 0,"");
+ Standard_NoSuchObject_Raise_if (Size == 0, "TCollection_Sequence::Last() - sequence is empty");
return ((TCollection_SequenceNode*) LastItem)->Value();
}
// -----------------------------------------
const SeqItem& TCollection_Sequence::Value(const Standard_Integer Index) const
{
- Standard_OutOfRange_Raise_if(Index <= 0 || Index > Size,"");
+ Standard_OutOfRange_Raise_if (Index <= 0 || Index > Size, "TCollection_Sequence::Value() - index is out of range");
TCollection_Sequence* const aLocalTHIS = (TCollection_Sequence* const) this;
aLocalTHIS->CurrentItem = (TCollection_SequenceNode*) Find(Index);
aLocalTHIS->CurrentIndex = Index;
// -------------------------------------------------------
SeqItem & TCollection_Sequence::ChangeValue(const Standard_Integer Index)
{
- Standard_OutOfRange_Raise_if(Index <= 0 || Index > Size,"");
+ Standard_OutOfRange_Raise_if (Index <= 0 || Index > Size, "TCollection_Sequence::ChangeValue() - index is out of range");
CurrentItem = (TCollection_SequenceNode*) Find(Index);
CurrentIndex = Index;
void TDocStd_XLinkIterator::Next()
{
- if (myValue == NULL) throw Standard_NoMoreObject("");
+ if (myValue == NULL) throw Standard_NoMoreObject ("TDocStd_XLinkIterator::Next() - no more values available");
else myValue = myValue->Next();
}
const Handle(StepShape_TopologicalRepresentationItem)&
TopoDSToStep_Builder::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "TopoDSToStep_Builder::Value() - no result");
return myResult;
}
const Handle(StepShape_BrepWithVoids) &
TopoDSToStep_MakeBrepWithVoids::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeBrepWithVoids::Value() - no result");
return theBrepWithVoids;
}
const Handle(StepShape_FacetedBrep) &
TopoDSToStep_MakeFacetedBrep::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeFacetedBrep::Value() - no result");
return theFacetedBrep;
}
const Handle(StepShape_FacetedBrepAndBrepWithVoids) &
TopoDSToStep_MakeFacetedBrepAndBrepWithVoids::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeFacetedBrepAndBrepWithVoids::Value() - no result");
return theFacetedBrepAndBrepWithVoids;
}
const Handle(StepShape_GeometricCurveSet)& TopoDSToStep_MakeGeometricCurveSet::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeGeometricCurveSet::Value() - no result");
return theGeometricCurveSet;
}
const Handle(StepShape_ManifoldSolidBrep) &
TopoDSToStep_MakeManifoldSolidBrep::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeManifoldSolidBrep::Value() - no result");
return theManifoldSolidBrep;
}
const Handle(StepShape_ShellBasedSurfaceModel) &
TopoDSToStep_MakeShellBasedSurfaceModel::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeShellBasedSurfaceModel::Value() - no result");
return theShellBasedSurfaceModel;
}
const Handle(StepShape_TopologicalRepresentationItem)& TopoDSToStep_MakeStepEdge::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeStepEdge::Value() - no result");
return myResult;
}
const Handle(StepShape_TopologicalRepresentationItem)& TopoDSToStep_MakeStepFace::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeStepFace::Value() - no result");
return myResult;
}
const Handle(StepShape_TopologicalRepresentationItem)& TopoDSToStep_MakeStepVertex::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeStepVertex::Value() - no result");
return myResult;
}
const Handle(StepShape_TopologicalRepresentationItem)& TopoDSToStep_MakeStepWire::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeStepWire::Value() - no result");
return myResult;
}
const Handle(TColStd_HSequenceOfTransient)& TopoDSToStep_WireframeBuilder::Value() const
{
- StdFail_NotDone_Raise_if(!done,"");
+ StdFail_NotDone_Raise_if (!done, "TopoDSToStep_WireframeBuilder::Value() - no result");
return myResult;
}
//=======================================================================
const gp_Circ& gce_MakeCirc::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "gce_MakeCirc::Value() - no result");
return TheCirc;
}
//=======================================================================
const gp_Circ2d& gce_MakeCirc2d::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "gce_MakeCirc2d::Value() - no result");
return TheCirc2d;
}
const gp_Cone& gce_MakeCone::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "gce_MakeCone::Value() - no result");
return TheCone;
}
const gp_Cylinder& gce_MakeCylinder::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "gce_MakeCylinder::Value() - no result");
return TheCylinder;
}
const gp_Dir& gce_MakeDir::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "gce_MakeDir::Value() - no result");
return TheDir;
}
const gp_Dir2d& gce_MakeDir2d::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "gce_MakeDir2d::Value() - no result");
return TheDir2d;
}
const gp_Elips& gce_MakeElips::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "gce_MakeElips::Value() - no result");
return TheElips;
}
const gp_Elips2d& gce_MakeElips2d::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "gce_MakeElips2d::Value() - no result");
return TheElips2d;
}
const gp_Hypr& gce_MakeHypr::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "gce_MakeHypr::Value() - no result");
return TheHypr;
}
const gp_Hypr2d& gce_MakeHypr2d::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "gce_MakeHypr2d::Value() - no result");
return TheHypr2d;
}
const gp_Lin& gce_MakeLin::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "gce_MakeLin::Value() - no result");
return TheLin;
}
gp_Lin2d gce_MakeLin2d::Value() const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "gce_MakeLin2d::Value() - no result");
return TheLin2d;
}
const gp_Parab& gce_MakeParab::Value () const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "gce_MakeParab::Value() - no result");
return TheParab;
}
const gp_Parab2d& gce_MakeParab2d::Value () const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "gce_MakeParab2d::Value() - no result");
return TheParab2d;
}
*/
const gp_Pln& gce_MakePln::Value () const
{
- StdFail_NotDone_Raise_if(TheError != gce_Done,"");
+ StdFail_NotDone_Raise_if (TheError != gce_Done,
+ "gce_MakePln::Value() - no result");
return ThePln;
}
{
return Value();
}
-
-
-
-
-
inline gp_Circ::gp_Circ (const gp_Ax2& A2,
const Standard_Real R) : pos(A2), radius(R)
{
- Standard_ConstructionError_Raise_if (R < 0.0, "");
+ Standard_ConstructionError_Raise_if (R < 0.0, "gp_Circ() - radius should be positive number");
}
inline void gp_Circ::SetAxis (const gp_Ax1& A1)
inline void gp_Circ::SetRadius (const Standard_Real R)
{
- Standard_ConstructionError_Raise_if (R < 0.0, "");
+ Standard_ConstructionError_Raise_if (R < 0.0, "gp_Circ::SetRadius() - radius should be positive number");
radius = R;
}
const Standard_Real Radius,
const Standard_Boolean Sense) : radius(Radius)
{
- Standard_ConstructionError_Raise_if(Radius < 0.0,"");
+ Standard_ConstructionError_Raise_if (Radius < 0.0, "gp_Circ2d() - radius should be positive number");
pos = gp_Ax22d(XAxis,Sense);
}
const Standard_Real Radius) :
pos(Axis),
radius(Radius)
-{ Standard_ConstructionError_Raise_if(Radius < 0.0,""); }
+{
+ Standard_ConstructionError_Raise_if (Radius < 0.0, "gp_Circ2d() - radius should be positive number");
+}
inline void gp_Circ2d::SetLocation (const gp_Pnt2d& P)
{ pos.SetLocation (P); }
inline void gp_Circ2d::SetRadius (const Standard_Real Radius)
{
- Standard_ConstructionError_Raise_if(Radius < 0.0,"");
+ Standard_ConstructionError_Raise_if (Radius < 0.0, "gp_Circ2d::SetRadius() - radius should be positive number");
radius = Radius;
}
Standard_ConstructionError_Raise_if
(radius < 0. ||
val <= gp::Resolution() ||
- M_PI * 0.5 - val <= gp::Resolution(), "");
+ M_PI * 0.5 - val <= gp::Resolution(), "gp_Cone() - invalid construction parameters");
}
inline void gp_Cone::SetAxis (const gp_Ax1& A1)
inline void gp_Cone::SetRadius (const Standard_Real R)
{
- Standard_ConstructionError_Raise_if
- (R < 0.0,"");
+ Standard_ConstructionError_Raise_if (R < 0.0, "gp_Cone::SetRadius() - radius should be positive number");
radius = R;
}
if (val < 0) val = - val;
Standard_ConstructionError_Raise_if
(val <= gp::Resolution() ||
- M_PI * 0.5 - val <= gp::Resolution(),"");
+ M_PI * 0.5 - val <= gp::Resolution(), "gp_Cone::SetSemiAngle() - invalid angle range");
semiAngle = Ang;
}
const Standard_Real Radius) :
pos(A3),
radius (Radius)
-{ Standard_ConstructionError_Raise_if (Radius < 0.0,""); }
+{
+ Standard_ConstructionError_Raise_if (Radius < 0.0, "gp_Cylinder() - radius should be positive number");
+}
inline void gp_Cylinder::SetAxis (const gp_Ax1& A1)
{ pos.SetAxis (A1); }
inline void gp_Cylinder::SetRadius (const Standard_Real R)
{
- Standard_ConstructionError_Raise_if (R < 0.0,"");
+ Standard_ConstructionError_Raise_if (R < 0.0, "gp_Cylinder::SetRadius() - radius should be positive number");
radius = R;
}
Standard_Real Y = XYZ.Y();
Standard_Real Z = XYZ.Z();
Standard_Real D = sqrt(X * X + Y * Y + Z * Z);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir() - input vector has zero norm");
coord.SetX(X / D);
coord.SetY(Y / D);
coord.SetZ(Z / D);
Standard_Real Y = XYZ.Y();
Standard_Real Z = XYZ.Z();
Standard_Real D = sqrt(X * X + Y * Y + Z * Z);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir() - input vector has zero norm");
coord.SetX(X / D);
coord.SetY(Y / D);
coord.SetZ(Z / D);
const Standard_Real Zv)
{
Standard_Real D = sqrt (Xv * Xv + Yv * Yv + Zv * Zv);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir() - input vector has zero norm");
coord.SetX(Xv / D);
coord.SetY(Yv / D);
coord.SetZ(Zv / D);
Standard_Real X = coord.X();
Standard_Real Y = coord.Y();
Standard_Real Z = coord.Z();
- Standard_OutOfRange_Raise_if (Index < 1 || Index > 3, " ");
+ Standard_OutOfRange_Raise_if (Index < 1 || Index > 3, "gp_Dir::SetCoord() - index is out of range [1, 3]");
if (Index == 1) X = Xi;
else if (Index == 2) Y = Xi;
else Z = Xi;
Standard_Real D = sqrt (X * X + Y * Y + Z * Z);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::SetCoord() - result vector has zero norm");
coord.SetX(X / D);
coord.SetY(Y / D);
coord.SetZ(Z / D);
const Standard_Real Yv,
const Standard_Real Zv) {
Standard_Real D = sqrt(Xv * Xv + Yv * Yv + Zv * Zv);
- Standard_ConstructionError_Raise_if(D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if(D <= gp::Resolution(), "gp_Dir::SetCoord() - input vector has zero norm");
coord.SetX(Xv / D);
coord.SetY(Yv / D);
coord.SetZ(Zv / D);
Standard_Real Y = coord.Y();
Standard_Real Z = coord.Z();
Standard_Real D = sqrt (X * X + Y * Y + Z * Z);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::SetX() - result vector has zero norm");
coord.SetX(X / D);
coord.SetY(Y / D);
coord.SetZ(Z / D);
Standard_Real Z = coord.Z();
Standard_Real X = coord.X();
Standard_Real D = sqrt (X * X + Y * Y + Z * Z);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::SetY() - result vector has zero norm");
coord.SetX(X / D);
coord.SetY(Y / D);
coord.SetZ(Z / D);
Standard_Real X = coord.X();
Standard_Real Y = coord.Y();
Standard_Real D = sqrt (X * X + Y * Y + Z * Z);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::SetZ() - result vector has zero norm");
coord.SetX(X / D);
coord.SetY(Y / D);
coord.SetZ(Z / D);
Standard_Real Y = XYZ.Y();
Standard_Real Z = XYZ.Z();
Standard_Real D = sqrt(X * X + Y * Y + Z * Z);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::SetX() - input vector has zero norm");
coord.SetX(X / D);
coord.SetY(Y / D);
coord.SetZ(Z / D);
{
coord.Cross (Right.coord);
Standard_Real D = coord.Modulus ();
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::Cross() - result vector has zero norm");
coord.Divide (D);
}
gp_Dir V = *this;
V.coord.Cross (Right.coord);
Standard_Real D = V.coord.Modulus();
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::Crossed() - result vector has zero norm");
V.coord.Divide (D);
return V;
}
{
coord.CrossCross (V1.coord, V2.coord);
Standard_Real D = coord.Modulus();
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::CrossCross() - result vector has zero norm");
coord.Divide(D);
}
gp_Dir V = *this;
(V.coord).CrossCross (V1.coord, V2.coord);
Standard_Real D = V.coord.Modulus();
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir::CrossCrossed() - result vector has zero norm");
V.coord.Divide(D);
return V;
}
Standard_Real X = XY.X();
Standard_Real Y = XY.Y();
Standard_Real D = sqrt(X * X + Y * Y);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d() - input vector has zero norm");
coord.SetX(X / D);
coord.SetY(Y / D);
}
Standard_Real X = XY.X();
Standard_Real Y = XY.Y();
Standard_Real D = sqrt(X * X + Y * Y);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d() - input vector has zero norm");
coord.SetX(X / D);
coord.SetY(Y / D);
}
const Standard_Real Yv)
{
Standard_Real D = sqrt (Xv * Xv + Yv * Yv);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d() - input vector has zero norm");
coord.SetX(Xv / D);
coord.SetY(Yv / D);
}
{
Standard_Real X = coord.X();
Standard_Real Y = coord.Y();
- Standard_OutOfRange_Raise_if (Index < 1 || Index > 2, " ");
+ Standard_OutOfRange_Raise_if (Index < 1 || Index > 2, "gp_Dir2d::SetCoord() - index is out of range [1, 2]");
if (Index == 1) X = Xi;
else Y = Xi;
Standard_Real D = sqrt (X * X + Y * Y);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d::SetCoord() - result vector has zero norm");
coord.SetX(X / D);
coord.SetY(Y / D);
}
const Standard_Real Yv)
{
Standard_Real D = sqrt (Xv * Xv + Yv * Yv);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d::SetCoord() - result vector has zero norm");
coord.SetX(Xv / D);
coord.SetY(Yv / D);
}
{
Standard_Real Y = coord.Y();
Standard_Real D = sqrt (X * X + Y * Y);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d::SetX() - result vector has zero norm");
coord.SetX(X / D);
coord.SetY(Y / D);
}
{
Standard_Real X = coord.X();
Standard_Real D = sqrt (X * X + Y * Y);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d::SetY() - result vector has zero norm");
coord.SetX(X / D);
coord.SetY(Y / D);
}
Standard_Real X = XY.X();
Standard_Real Y = XY.Y();
Standard_Real D = sqrt(X * X + Y * Y);
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir2d::SetZ() - result vector has zero norm");
coord.SetX(X / D);
coord.SetY(Y / D);
}
majorRadius (MajorRadius),
minorRadius (MinorRadius)
{
- Standard_ConstructionError_Raise_if
- (MinorRadius < 0.0 || MajorRadius < MinorRadius,"");
+ Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || MajorRadius < MinorRadius,
+ "gp_Elips() - invalid construction parameters");
}
inline Standard_Real gp_Elips::Area() const
inline gp_Ax1 gp_Elips::Directrix1() const
{
Standard_Real E = Eccentricity();
- Standard_ConstructionError_Raise_if (E <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (E <= gp::Resolution(), "gp_Elips::Directrix1() - zero eccentricity");
gp_XYZ Orig = pos.XDirection().XYZ();
Orig.Multiply (majorRadius/E);
Orig.Add (pos.Location().XYZ());
inline gp_Ax1 gp_Elips::Directrix2() const
{
Standard_Real E = Eccentricity();
- Standard_ConstructionError_Raise_if (E <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (E <= gp::Resolution(), "gp_Elips::Directrix2() - zero eccentricity");
gp_XYZ Orig = pos.XDirection().XYZ();
Orig.Multiply (-majorRadius/E);
Orig.Add (pos.Location().XYZ());
inline void gp_Elips::SetMajorRadius (const Standard_Real R)
{
- Standard_ConstructionError_Raise_if(R < minorRadius,"");
+ Standard_ConstructionError_Raise_if (R < minorRadius,
+ "gp_Elips::SetMajorRadius() - major radius should be greater or equal to minor radius");
majorRadius = R;
}
inline void gp_Elips::SetMinorRadius (const Standard_Real R)
{
- Standard_ConstructionError_Raise_if(R < 0.0 || majorRadius < R,"");
+ Standard_ConstructionError_Raise_if (R < 0.0 || majorRadius < R,
+ "gp_Elips::SetMinorRadius() - minor radius should be a positive number lesser or equal to major radius");
minorRadius = R;
}
minorRadius(MinorRadius)
{
pos = gp_Ax22d(MajorAxis,Sense);
- Standard_ConstructionError_Raise_if
- (MinorRadius < 0.0 || MajorRadius < MinorRadius,"");
+ Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || MajorRadius < MinorRadius,
+ "gp_Elips2d() - invalid construction parameters");
}
inline gp_Elips2d::gp_Elips2d (const gp_Ax22d& A,
majorRadius(MajorRadius),
minorRadius(MinorRadius)
{
- Standard_ConstructionError_Raise_if
- (MinorRadius < 0.0 || MajorRadius < MinorRadius,"");
+ Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || MajorRadius < MinorRadius,
+ "gp_Elips2d() - invalid construction parameters");
}
inline void gp_Elips2d::SetLocation (const gp_Pnt2d& P)
inline void gp_Elips2d::SetMajorRadius (const Standard_Real MajorRadius)
{
- Standard_ConstructionError_Raise_if(MajorRadius < minorRadius,"");
+ Standard_ConstructionError_Raise_if (MajorRadius < minorRadius,
+ "gp_Elips2d::SetMajorRadius() - major radius should be greater or equal to minor radius");
majorRadius = MajorRadius;
}
inline void gp_Elips2d::SetMinorRadius (const Standard_Real MinorRadius)
{
- Standard_ConstructionError_Raise_if
- (MinorRadius < 0.0 || majorRadius < MinorRadius,"");
+ Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || majorRadius < MinorRadius,
+ "gp_Elips2d::SetMinorRadius() - minor radius should be a positive number lesser or equal to major radius");
minorRadius = MinorRadius;
}
inline gp_Ax2d gp_Elips2d::Directrix1() const
{
Standard_Real E = Eccentricity();
- Standard_ConstructionError_Raise_if (E <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (E <= gp::Resolution(), "gp_Elips2d::Directrix1() - zero eccentricity");
gp_XY Orig = pos.XDirection().XY();
Orig.Multiply (majorRadius/E);
Orig.Add (pos.Location().XY());
inline gp_Ax2d gp_Elips2d::Directrix2() const
{
Standard_Real E = Eccentricity();
- Standard_ConstructionError_Raise_if (E <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (E <= gp::Resolution(), "gp_Elips2d::Directrix2() - zero eccentricity");
gp_XY Orig = pos.XDirection().XY();
Orig.Multiply (-majorRadius/E);
Orig.Add (pos.Location().XY());
majorRadius(MajorRadius),
minorRadius(MinorRadius)
{
- Standard_ConstructionError_Raise_if
- (MinorRadius < 0.0 || MajorRadius < 0.0,"");
+ Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || MajorRadius < 0.0,
+ "gp_Hypr() - invalid construction parameters");
}
inline void gp_Hypr::SetAxis (const gp_Ax1& A1)
inline void gp_Hypr::SetMajorRadius (const Standard_Real R)
{
- Standard_ConstructionError_Raise_if(R < 0.0,"");
+ Standard_ConstructionError_Raise_if (R < 0.0,
+ "gp_Hypr::SetMajorRadius() - major radius should be greater or equal zero");
majorRadius = R;
}
inline void gp_Hypr::SetMinorRadius (const Standard_Real R)
{
- Standard_ConstructionError_Raise_if(R < 0.0,"");
+ Standard_ConstructionError_Raise_if (R < 0.0,
+ "gp_Hypr::SetMinorRadius() - minor radius should be greater or equal zero");
minorRadius = R;
}
inline gp_Ax1 gp_Hypr::Asymptote1 () const
{
- Standard_ConstructionError_Raise_if
- (majorRadius <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (majorRadius <= gp::Resolution(),
+ "gp_Hypr::Asymptote1() - major radius is zero");
gp_Vec V1 = gp_Vec (pos.YDirection());
V1.Multiply (minorRadius / majorRadius);
gp_Vec V = gp_Vec (pos.XDirection());
inline gp_Ax1 gp_Hypr::Asymptote2 () const
{
- Standard_ConstructionError_Raise_if (majorRadius <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (majorRadius <= gp::Resolution(),
+ "gp_Hypr::Asymptote1() - major radius is zero");
gp_Vec V1 = gp_Vec (pos.YDirection());
V1.Multiply (-minorRadius / majorRadius);
gp_Vec V = gp_Vec (pos.XDirection());
inline Standard_Real gp_Hypr::Eccentricity () const
{
- Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(), "");
+ Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(),
+ "gp_Hypr::Eccentricity() - major radius is zero");
return sqrt(majorRadius * majorRadius +
minorRadius * minorRadius) / majorRadius;
}
inline Standard_Real gp_Hypr::Parameter() const
{
- Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(), "");
+ Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(),
+ "gp_Hypr::Parameter() - major radius is zero");
return (minorRadius * minorRadius) / majorRadius;
}
majorRadius(MajorRadius),
minorRadius(MinorRadius)
{
- Standard_ConstructionError_Raise_if
- (MinorRadius < 0.0 || MajorRadius < 0.0,"");
+ Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || MajorRadius < 0.0,
+ "gp_Hypr2d() - invalid construction parameters");
}
inline gp_Hypr2d::gp_Hypr2d (const gp_Ax2d& MajorAxis,
minorRadius(MinorRadius)
{
pos = gp_Ax22d(MajorAxis,Sense);
- Standard_ConstructionError_Raise_if
- (MinorRadius < 0.0 || MajorRadius < 0.0,"");
+ Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || MajorRadius < 0.0,
+ "gp_Hypr2d() - invalid construction parameters");
}
inline void gp_Hypr2d::SetLocation (const gp_Pnt2d& P)
inline void gp_Hypr2d::SetMajorRadius (const Standard_Real MajorRadius)
{
- Standard_ConstructionError_Raise_if(MajorRadius < 0.0,"");
+ Standard_ConstructionError_Raise_if (MajorRadius < 0.0,
+ "gp_Hypr2d::SetMajorRadius() - major radius should be greater or equal zero");
majorRadius = MajorRadius;
}
inline void gp_Hypr2d::SetMinorRadius (const Standard_Real MinorRadius)
{
- Standard_ConstructionError_Raise_if(MinorRadius < 0.0,"");
+ Standard_ConstructionError_Raise_if (MinorRadius < 0.0,
+ "gp_Hypr2d::SetMinorRadius() - minor radius should be greater or equal zero");
minorRadius = MinorRadius;
}
inline gp_Ax2d gp_Hypr2d::Asymptote1() const
{
- Standard_ConstructionError_Raise_if (majorRadius <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (majorRadius <= gp::Resolution(),
+ "gp_Hypr2d::Asymptote1() - major radius is zero");
gp_Dir2d Vdir = pos.XDirection();
gp_XY Coord1 (pos.YDirection().XY());
gp_XY Coord2 = Coord1.Multiplied (minorRadius / majorRadius);
}
inline gp_Ax2d gp_Hypr2d::Asymptote2() const {
- Standard_ConstructionError_Raise_if (majorRadius <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (majorRadius <= gp::Resolution(),
+ "gp_Hypr2d::Asymptote2() - major radius is zero");
gp_Vec2d Vdir = pos.XDirection();
gp_XY Coord1 (pos.YDirection().XY());
gp_XY Coord2 = Coord1.Multiplied (-minorRadius / majorRadius);
inline Standard_Real gp_Hypr2d::Eccentricity() const
{
- Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(), "");
+ Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(),
+ "gp_Hypr2d::Eccentricity() - major radius is zero");
return sqrt(majorRadius * majorRadius +
minorRadius * minorRadius) / majorRadius;
}
inline Standard_Real gp_Hypr2d::Parameter() const
{
- Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(), "");
+ Standard_DomainError_Raise_if (majorRadius <= gp::Resolution(),
+ "gp_Hypr2d::Parameter() - major radius is zero");
return (minorRadius * minorRadius) / majorRadius;
}
gp_XYZ gp_Mat::Column (const Standard_Integer Col) const
{
- Standard_OutOfRange_Raise_if (Col < 1 || Col > 3, "");
+ Standard_OutOfRange_Raise_if (Col < 1 || Col > 3, "gp_Mat::Column() - wrong index");
const Standard_Address M = (Standard_Address)&(matrix[0][0]);
if (Col == 1) return gp_XYZ (M00,M10,M20);
if (Col == 2) return gp_XYZ (M01,M11,M21);
gp_XYZ gp_Mat::Row (const Standard_Integer Row) const
{
- Standard_OutOfRange_Raise_if (Row < 1 || Row > 3, "");
+ Standard_OutOfRange_Raise_if (Row < 1 || Row > 3, "gp_Mat::Row() - wrong index");
const Standard_Address M = (Standard_Address)&(matrix[0][0]);
if (Row == 1) return gp_XYZ (M00,M01,M02);
if (Row == 2) return gp_XYZ (M10,M11,M12);
Standard_Real det = M00 * N00 + M01* N10 + M02 * N20 ;
Standard_Real val = det;
if (val < 0) val = - val;
- Standard_ConstructionError_Raise_if
- (val <= gp::Resolution(),"");
+ Standard_ConstructionError_Raise_if (val <= gp::Resolution(), "gp_Mat::Invert() - matrix has zero determinant");
det = 1.0e0 / det ;
M00 = N00;
M10 = N10;
Standard_Real det = M00 * N00 + M01* N10 + M02 * N20 ;
Standard_Real val = det;
if (val < 0) val = - val;
- Standard_ConstructionError_Raise_if
- (val <= gp::Resolution(),"");
+ Standard_ConstructionError_Raise_if (val <= gp::Resolution(), "gp_Mat::Inverted() - matrix has zero determinant");
det = 1.0e0 / det ;
NewMat.Multiply(det) ;
return NewMat;
void gp_Mat2d::SetCol (const Standard_Integer Col,
const gp_XY& Value)
{
- Standard_OutOfRange_Raise_if (Col < 1 || Col > 2,"");
+ Standard_OutOfRange_Raise_if (Col < 1 || Col > 2, "gp_Mat2d::SetCol() - invalid index");
const Standard_Address M = (Standard_Address)&(matrix[0][0]);
if (Col == 1) {
M00 = Value.X();
void gp_Mat2d::SetRow (const Standard_Integer Row, const gp_XY& Value)
{
- Standard_OutOfRange_Raise_if (Row < 1 || Row > 2,"");
+ Standard_OutOfRange_Raise_if (Row < 1 || Row > 2, "gp_Mat2d::SetRow() - invalid index");
const Standard_Address M = (Standard_Address)&(matrix[0][0]);
if (Row == 1) {
M00 = Value.X();
gp_XY gp_Mat2d::Column (const Standard_Integer Col) const
{
- Standard_OutOfRange_Raise_if (Col < 1 || Col > 2,"");
+ Standard_OutOfRange_Raise_if (Col < 1 || Col > 2, "gp_Mat2d::Column() - invalid index");
const Standard_Address M = (Standard_Address)&(matrix[0][0]);
if (Col == 1) return gp_XY (M00,M10);
return gp_XY (M01,M11);
gp_XY gp_Mat2d::Row (const Standard_Integer Row) const
{
- Standard_OutOfRange_Raise_if (Row < 1 || Row > 2,"");
+ Standard_OutOfRange_Raise_if (Row < 1 || Row > 2, "gp_Mat2d::Row() - invalid index");
const Standard_Address M = (Standard_Address)&(matrix[0][0]);
if (Row == 1) return gp_XY (M00,M01);
return gp_XY (M10,M11);
det = N00 * N11 - N01 * N10 ;
Standard_Real val = det;
if (val < 0) val = - val;
- Standard_ConstructionError_Raise_if (val <= gp::Resolution(),"");
+ Standard_ConstructionError_Raise_if (val <= gp::Resolution(), "gp_Mat2d::Invert() - matrix has zero determinant");
det = 1.0 / det ;
M00 = N00 * det ;
M10 = N10 * det ;
const Standard_Real Focal) :
pos(A2),
focalLength (Focal)
-{ Standard_ConstructionError_Raise_if(Focal < 0.0,""); }
+{
+ Standard_ConstructionError_Raise_if (Focal < 0.0, "gp_Parab() - focal length should be >= 0");
+}
inline gp_Parab::gp_Parab (const gp_Ax1& D,
const gp_Pnt& F)
inline void gp_Parab::SetFocal (const Standard_Real Focal)
{
- Standard_ConstructionError_Raise_if(Focal < 0.0,"");
+ Standard_ConstructionError_Raise_if (Focal < 0.0, "gp_Parab::SetFocal() - focal length should be >= 0");
focalLength = Focal;
}
pos (theMirrorAxis),
focalLength (theFocalLength)
{
- Standard_ConstructionError_Raise_if(theFocalLength < 0.0,"");
+ Standard_ConstructionError_Raise_if (theFocalLength < 0.0, "gp_Parab2d() - focal length should be >= 0");
}
inline gp_Parab2d::gp_Parab2d(const gp_Ax2d& theMirrorAxis,
focalLength (theFocalLength)
{
pos = gp_Ax22d(theMirrorAxis,theSense);
- Standard_ConstructionError_Raise_if(theFocalLength < 0.0,"");
+ Standard_ConstructionError_Raise_if (theFocalLength < 0.0, "gp_Parab2d() - focal length should be >= 0");
}
inline void gp_Parab2d::SetFocal (const Standard_Real Focal)
{
- Standard_ConstructionError_Raise_if(Focal < 0.0,"");
+ Standard_ConstructionError_Raise_if (Focal < 0.0, "gp_Parab2d::SetFocal() - focal length should be >= 0");
focalLength = Focal;
}
const Standard_Real Radius) :
pos (A3),
radius (Radius)
-{ Standard_ConstructionError_Raise_if (Radius < 0.0,""); }
+{
+ Standard_ConstructionError_Raise_if (Radius < 0.0, "gp_Sphere() - radius should be >= 0");
+}
inline void gp_Sphere::SetLocation (const gp_Pnt& Loc)
{ pos.SetLocation (Loc); }
inline void gp_Sphere::SetRadius (const Standard_Real R)
{
- Standard_ConstructionError_Raise_if (R < 0.0,"");
+ Standard_ConstructionError_Raise_if (R < 0.0, "gp_Sphere::SetRadius() - radius should be >= 0");
radius = R;
}
majorRadius (MajorRadius),
minorRadius (MinorRadius)
{
- Standard_ConstructionError_Raise_if
- (MinorRadius < 0.0 || MajorRadius < 0.0,"");
+ Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || MajorRadius < 0.0,
+ "gp_Torus() - invalid construction parameters");
}
inline void gp_Torus::SetAxis (const gp_Ax1& A1)
inline void gp_Torus::SetMajorRadius (const Standard_Real MajorRadius)
{
- Standard_ConstructionError_Raise_if
- (MajorRadius - minorRadius <= gp::Resolution(),"");
+ Standard_ConstructionError_Raise_if (MajorRadius - minorRadius <= gp::Resolution(),
+ "gp_Torus::SetMajorRadius() - invalid input parameters");
majorRadius = MajorRadius;
}
inline void gp_Torus::SetMinorRadius (const Standard_Real MinorRadius)
{
- Standard_ConstructionError_Raise_if
- (MinorRadius < 0.0 || majorRadius - MinorRadius <= gp::Resolution(),"");
+ Standard_ConstructionError_Raise_if (MinorRadius < 0.0 || majorRadius - MinorRadius <= gp::Resolution(),
+ "gp_Torus::SetMinorRadius() - invalid input parameters");
minorRadius = MinorRadius;
}
else if (shape == gp_Scale) {
Standard_Real As = scale;
if (As < 0) As = - As;
- Standard_ConstructionError_Raise_if
- (As <= gp::Resolution(),"");
+ Standard_ConstructionError_Raise_if (As <= gp::Resolution(), "gp_Trsf::Invert() - transformation has zero scale");
scale = 1.0 / scale;
loc.Multiply (-scale);
}
else {
Standard_Real As = scale;
if (As < 0) As = - As;
- Standard_ConstructionError_Raise_if
- (As <= gp::Resolution(),"");
+ Standard_ConstructionError_Raise_if (As <= gp::Resolution(), "gp_Trsf::Invert() - transformation has zero scale");
scale = 1.0 / scale;
matrix.Transpose ();
loc.Multiply (matrix);
else if ( shape == gp_Scale) {
Standard_Real As = scale;
if (As < 0) As = - As;
- Standard_ConstructionError_Raise_if(As <= gp::Resolution(),"");
+ Standard_ConstructionError_Raise_if (As <= gp::Resolution(), "gp_Trsf2d::Invert() - transformation has zero scale");
scale = 1.0 / scale;
loc.Multiply (-scale);
}
else {
Standard_Real As = scale;
if (As < 0) As = - As;
- Standard_ConstructionError_Raise_if(As <= gp::Resolution(),"");
+ Standard_ConstructionError_Raise_if (As <= gp::Resolution(), "gp_Trsf2d::Invert() - transformation has zero scale");
scale = 1.0 / scale;
matrix.Transpose();
loc.Multiply (matrix);
inline void gp_Vec::Normalize()
{
Standard_Real D = coord.Modulus();
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "gp_Vec::Normalize() - vector has zero norm");
coord.Divide (D);
}
inline gp_Vec gp_Vec::Normalized() const
{
Standard_Real D = coord.Modulus();
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "gp_Vec::Normalized() - vector has zero norm");
gp_Vec V = *this;
V.coord.Divide (D);
return V;
inline void gp_Vec2d::Normalize()
{
Standard_Real D = coord.Modulus();
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "gp_Vec2d::Normalize() - vector has zero norm");
coord.Divide (D);
}
inline gp_Vec2d gp_Vec2d::Normalized() const
{
Standard_Real D = coord.Modulus();
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "gp_Vec2d::Normalized() - vector has zero norm");
gp_Vec2d V = *this;
V.coord.Divide (D);
return V;
inline void gp_XY::Normalize ()
{
Standard_Real D = Modulus();
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "gp_XY::Normalize() - vector has zero norm");
x = x / D; y = y / D;
}
inline gp_XY gp_XY::Normalized () const
{
Standard_Real D = Modulus();
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "gp_XY::Normalized() - vector has zero norm");
return gp_XY (x / D, y / D);
}
inline void gp_XYZ::Normalize ()
{
Standard_Real D = Modulus();
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "gp_XYZ::Normalize() - vector has zero norm");
x = x / D; y = y / D; z = z / D;
}
inline gp_XYZ gp_XYZ::Normalized () const
{
Standard_Real D = Modulus();
- Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "");
+ Standard_ConstructionError_Raise_if (D <= gp::Resolution(),
+ "gp_XYZ::Normalized() - vector has zero norm");
return gp_XYZ (x / D, y / D, z / D);
}
Array(LowerRow, UpperRow,
LowerCol, UpperCol)
{
-
- Standard_RangeError_Raise_if((LowerRow > UpperRow) ||
- (LowerCol > UpperCol), "");
+ Standard_RangeError_Raise_if ((LowerRow > UpperRow)
+ || (LowerCol > UpperCol), "math_Matrix() - invalid dimensions");
}
math_Matrix::math_Matrix (const Standard_Integer LowerRow,
Array(LowerRow, UpperRow,
LowerCol, UpperCol)
{
-
- Standard_RangeError_Raise_if((LowerRow > UpperRow) ||
- (LowerCol > UpperCol), "");
+ Standard_RangeError_Raise_if ((LowerRow > UpperRow)
+ || (LowerCol > UpperCol), "math_Matrix() - invalid dimensions");
Array.Init(InitialValue);
}
UpperColIndex(UpperCol),
Array(Tab, LowerRow, UpperRow, LowerCol, UpperCol)
{
-
- Standard_RangeError_Raise_if((LowerRow > UpperRow) ||
- (LowerCol > UpperCol), "");
+ Standard_RangeError_Raise_if ((LowerRow > UpperRow)
+ || (LowerCol > UpperCol), "math_Matrix() - invalid dimensions");
}
void math_Matrix::Init(const Standard_Real InitialValue)
math_Matrix math_Matrix::Divided (const Standard_Real Right) const
{
- Standard_DivideByZero_Raise_if(Abs(Right) <= RealEpsilon(), "");
+ Standard_DivideByZero_Raise_if (Abs(Right) <= RealEpsilon(),
+ "math_Matrix::Divided() - zero divisor");
math_Matrix temp = Multiplied(1./Right);
return temp;
}
void math_Matrix::Transpose()
{
- math_NotSquare_Raise_if(RowNumber() != ColNumber(), "");
+ math_NotSquare_Raise_if (RowNumber() != ColNumber(),
+ "math_Matrix::Transpose() - matrix is not square");
Standard_Integer Row = LowerRowIndex;
Standard_Integer Col = LowerColIndex;
void math_Matrix::Invert()
{
- math_NotSquare_Raise_if(RowNumber() != ColNumber(), "");
-
+ math_NotSquare_Raise_if (RowNumber() != ColNumber(),
+ "math_Matrix::Transpose() - matrix is not square");
+
math_Gauss Sol(*this);
if(Sol.IsDone()) {
Sol.Invert(*this);
void math_Matrix::Divide (const Standard_Real Right)
{
- Standard_DivideByZero_Raise_if(Abs(Right) <= RealEpsilon(), "");
+ Standard_DivideByZero_Raise_if (Abs(Right) <= RealEpsilon(),
+ "math_Matrix::Divide() - zero divisor");
for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) {
for(Standard_Integer J = LowerColIndex; J <= UpperColIndex; J++) {
void math_Matrix::Add (const math_Matrix& Right)
{
- Standard_DimensionError_Raise_if((RowNumber() != Right.RowNumber()) ||
- (ColNumber() != Right.ColNumber()),
- "");
-
+ Standard_DimensionError_Raise_if ((RowNumber() != Right.RowNumber())
+ || (ColNumber() != Right.ColNumber()),
+ "math_Matrix::Add() - input matrix has different dimensions");
+
Standard_Integer I2 = Right.LowerRowIndex;
for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) {
Standard_Integer J2 = Right.LowerColIndex;
void math_Matrix::Subtract (const math_Matrix& Right)
{
- Standard_DimensionError_Raise_if((RowNumber() != Right.RowNumber()) ||
- (ColNumber() != Right.ColNumber()),
- "");
+ Standard_DimensionError_Raise_if ((RowNumber() != Right.RowNumber())
+ || (ColNumber() != Right.ColNumber()),
+ "math_Matrix::Subtract() - input matrix has different dimensions");
Standard_Integer I2 = Right.LowerRowIndex;
for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) {
(J2 > UpperColIndex) ||
(I1 > I2) || (J1 > J2) ||
(I2-I1+1 != M.RowNumber()) ||
- (J2-J1+1 != M.ColNumber()), "");
+ (J2-J1+1 != M.ColNumber()),
+ "math_Matrix::Set() - invalid indices");
Standard_Integer II = M.LowerRow();
for(Standard_Integer I = I1; I <= I2; I++) {
void math_Matrix::SetRow (const Standard_Integer Row,
const math_Vector& V)
{
-
- Standard_RangeError_Raise_if((Row < LowerRowIndex) ||
- (Row > UpperRowIndex) , "");
-
- Standard_DimensionError_Raise_if(ColNumber() != V.Length(), "");
+ Standard_RangeError_Raise_if ((Row < LowerRowIndex)
+ || (Row > UpperRowIndex),
+ "math_Matrix::SetRow() - invalid index");
+
+ Standard_DimensionError_Raise_if (ColNumber() != V.Length(),
+ "math_Matrix::SetRow() - input vector has wrong dimensions");
Standard_Integer I = V.LowerIndex;
for(Standard_Integer Index = LowerColIndex; Index <= UpperColIndex; Index++) {
void math_Matrix::SetCol (const Standard_Integer Col,
const math_Vector& V)
{
+ Standard_RangeError_Raise_if ((Col < LowerColIndex)
+ || (Col > UpperColIndex),
+ "math_Matrix::SetCol() - invalid index");
- Standard_RangeError_Raise_if((Col < LowerColIndex) ||
- (Col > UpperColIndex) , "");
-
- Standard_DimensionError_Raise_if(RowNumber() != V.Length(), "");
+ Standard_DimensionError_Raise_if (RowNumber() != V.Length(),
+ "math_Matrix::SetCol() - input vector has wrong dimensions");
Standard_Integer I = V.LowerIndex;
for(Standard_Integer Index = LowerRowIndex; Index <= UpperRowIndex; Index++) {
void math_Matrix::SetDiag(const Standard_Real Value)
{
-
- math_NotSquare_Raise_if(RowNumber() != ColNumber(), "");
-
+ math_NotSquare_Raise_if (RowNumber() != ColNumber(),
+ "math_Matrix::SetDiag() - matrix is not square");
+
for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) {
Array(I, I) = Value;
}
void math_Matrix::SwapRow(const Standard_Integer Row1,
const Standard_Integer Row2)
{
-
- Standard_RangeError_Raise_if((Row1 < LowerRowIndex) ||
- (Row1 > UpperRowIndex) ||
- (Row2 < LowerRowIndex) ||
- (Row2 > UpperRowIndex), "");
-
+ Standard_RangeError_Raise_if ((Row1 < LowerRowIndex)
+ || (Row1 > UpperRowIndex)
+ || (Row2 < LowerRowIndex)
+ || (Row2 > UpperRowIndex),
+ "math_Matrix::SetCol() - invalid indices");
+
math_Vector V1 = Row(Row1);
math_Vector V2 = Row(Row2);
SetRow(Row1,V2);
void math_Matrix::SwapCol(const Standard_Integer Col1,
const Standard_Integer Col2)
{
-
- Standard_RangeError_Raise_if((Col1 < LowerColIndex) ||
- (Col1 > UpperColIndex) ||
- (Col2 < LowerColIndex) ||
- (Col2 > UpperColIndex), "");
+ Standard_RangeError_Raise_if ((Col1 < LowerColIndex)
+ || (Col1 > UpperColIndex)
+ || (Col2 < LowerColIndex)
+ || (Col2 > UpperColIndex),
+ "math_Matrix::SetCol() - invalid indices");
math_Vector V1 = Col(Col1);
math_Vector V2 = Col(Col2);
math_Matrix math_Matrix::Multiplied (const math_Matrix& Right) const
{
-
- Standard_DimensionError_Raise_if(ColNumber() != Right.RowNumber(), "");
-
+ Standard_DimensionError_Raise_if (ColNumber() != Right.RowNumber(),
+ "math_Matrix::Multiplied() - matrices have incompatible dimensions");
+
math_Matrix Result(LowerRowIndex, UpperRowIndex,
Right.LowerColIndex, Right.UpperColIndex);
math_Matrix math_Matrix::TMultiply (const math_Matrix& Right) const
{
-
- Standard_DimensionError_Raise_if(RowNumber() != Right.RowNumber(), "");
-
+ Standard_DimensionError_Raise_if (RowNumber() != Right.RowNumber(),
+ "math_Matrix::TMultiply() - matrices have incompatible dimensions");
+
math_Matrix Result(LowerColIndex, UpperColIndex,
Right.LowerColIndex, Right.UpperColIndex);
math_Matrix math_Matrix::Added (const math_Matrix& Right) const
{
-
- Standard_DimensionError_Raise_if((RowNumber() != Right.RowNumber()) ||
- (ColNumber() != Right.ColNumber()),
- "");
+ Standard_DimensionError_Raise_if ((RowNumber() != Right.RowNumber())
+ || (ColNumber() != Right.ColNumber()),
+ "math_Matrix::Added() - input matrix has different dimensions");
math_Matrix Result(LowerRowIndex, UpperRowIndex,
LowerColIndex, UpperColIndex);
math_Matrix math_Matrix::Subtracted (const math_Matrix& Right) const
{
-
- Standard_DimensionError_Raise_if((RowNumber() != Right.RowNumber()) ||
- (ColNumber() != Right.ColNumber()),
- "");
+ Standard_DimensionError_Raise_if ((RowNumber() != Right.RowNumber())
+ || (ColNumber() != Right.ColNumber()),
+ "math_Matrix::Subtracted() - input matrix has different dimensions");
math_Matrix Result(LowerRowIndex, UpperRowIndex,
LowerColIndex, UpperColIndex);
void math_Matrix::Multiply(const math_Vector& Left,
const math_Vector& Right)
{
-
- Standard_DimensionError_Raise_if((RowNumber() != Left.Length()) ||
- (ColNumber() != Right.Length()),
- "");
+ Standard_DimensionError_Raise_if ((RowNumber() != Left.Length())
+ || (ColNumber() != Right.Length()),
+ "math_Matrix::Multiply() - input vectors have incompatible dimensions");
for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) {
for(Standard_Integer J = LowerColIndex; J <= UpperColIndex; J++) {
void math_Matrix::Multiply(const math_Matrix& Left,
const math_Matrix& Right)
{
-
- Standard_DimensionError_Raise_if((Left.ColNumber() != Right.RowNumber()) ||
- (RowNumber() != Left.RowNumber()) ||
- (ColNumber() != Right.ColNumber()),
- "");
-
+ Standard_DimensionError_Raise_if ((Left.ColNumber() != Right.RowNumber())
+ || (RowNumber() != Left.RowNumber())
+ || (ColNumber() != Right.ColNumber()),
+ "math_Matrix::Multiply() - matrices have incompatible dimensions");
+
Standard_Real Som;
Standard_Integer I1 = Left.LowerRowIndex;
for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) {
void math_Matrix::TMultiply(const math_Matrix& TLeft,
const math_Matrix& Right)
{
-
- Standard_DimensionError_Raise_if((TLeft.RowNumber() != Right.RowNumber()) ||
- (RowNumber() != TLeft.ColNumber()) ||
- (ColNumber() != Right.ColNumber()),
- "");
+ Standard_DimensionError_Raise_if ((TLeft.RowNumber() != Right.RowNumber())
+ || (RowNumber() != TLeft.ColNumber())
+ || (ColNumber() != Right.ColNumber()),
+ "math_Matrix::TMultiply() - matrices have incompatible dimensions");
Standard_Real Som;
Standard_Integer I1 = TLeft.LowerColIndex;
void math_Matrix::Add (const math_Matrix& Left,
const math_Matrix& Right)
{
-
- Standard_DimensionError_Raise_if((RowNumber() != Right.RowNumber()) ||
- (ColNumber() != Right.ColNumber()) ||
- (Right.RowNumber() != Left.RowNumber()) ||
- (Right.ColNumber() != Left.ColNumber()),
- "");
-
+ Standard_DimensionError_Raise_if ((RowNumber() != Right.RowNumber())
+ || (ColNumber() != Right.ColNumber())
+ || (Right.RowNumber() != Left.RowNumber())
+ || (Right.ColNumber() != Left.ColNumber()),
+ "math_Matrix::Add() - matrices have incompatible dimensions");
+
Standard_Integer I1 = Left.LowerRowIndex;
Standard_Integer I2 = Right.LowerRowIndex;
for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) {
void math_Matrix::Subtract(const math_Matrix& Left,
const math_Matrix& Right)
{
-
- Standard_DimensionError_Raise_if((RowNumber() != Right.RowNumber()) ||
- (ColNumber() != Right.ColNumber()) ||
- (Right.RowNumber() != Left.RowNumber()) ||
- (Right.ColNumber() != Left.ColNumber()),
- "");
-
+ Standard_DimensionError_Raise_if ((RowNumber() != Right.RowNumber())
+ || (ColNumber() != Right.ColNumber())
+ || (Right.RowNumber() != Left.RowNumber())
+ || (Right.ColNumber() != Left.ColNumber()),
+ "math_Matrix::Subtract() - matrices have incompatible dimensions");
+
Standard_Integer I1 = Left.LowerRowIndex;
Standard_Integer I2 = Right.LowerRowIndex;
for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) {
void math_Matrix::Multiply(const math_Matrix& Right)
{
-
- Standard_DimensionError_Raise_if(ColNumber() != Right.RowNumber(), "");
+ Standard_DimensionError_Raise_if (ColNumber() != Right.RowNumber(),
+ "math_Matrix::Multiply() - input matrix has incompatible dimensions");
Standard_Real Som;
for(Standard_Integer I = LowerRowIndex; I <= UpperRowIndex; I++) {
math_Vector math_Matrix::Multiplied(const math_Vector& Right)const
{
-
- Standard_DimensionError_Raise_if(ColNumber() != Right.Length(), "");
+ Standard_DimensionError_Raise_if (ColNumber() != Right.Length(),
+ "math_Matrix::Multiplied() - input vector has incompatible dimensions");
math_Vector Result(LowerRowIndex, UpperRowIndex);
math_Matrix& math_Matrix::Initialized(const math_Matrix& Other)
{
-
- Standard_DimensionError_Raise_if((RowNumber() != Other.RowNumber()) ||
- (ColNumber() != Other.ColNumber()), "");
+ Standard_DimensionError_Raise_if ((RowNumber() != Other.RowNumber())
+ || (ColNumber() != Other.ColNumber()),
+ "math_Matrix::Initialized() - input matrix has different dimensions");
(Other.Array).Copy(Array);
return *this;
UpperIndex(theUpper),
Array(theLower,theUpper)
{
- Standard_RangeError_Raise_if(theLower > theUpper, "");
+ Standard_RangeError_Raise_if (theLower > theUpper, "math_Vector() - invalid dimensions");
}
math_Vector::math_Vector(const Standard_Integer theLower,
UpperIndex(theUpper),
Array(theLower,theUpper)
{
- Standard_RangeError_Raise_if(theLower > theUpper, "");
+ Standard_RangeError_Raise_if (theLower > theUpper, "math_Vector() - invalid dimensions");
Array.Init(theInitialValue);
}
UpperIndex(theUpper),
Array(theTab, theLower,theUpper)
{
- Standard_RangeError_Raise_if((theLower > theUpper) , "");
+ Standard_RangeError_Raise_if ((theLower > theUpper), "math_Vector() - invalid dimensions");
}
math_Vector::math_Vector(const gp_XY& theOther):
const Standard_Integer theI2,
const math_Vector &theV)
{
- Standard_RangeError_Raise_if((theI1 < LowerIndex) || (theI2 > UpperIndex) ||
- (theI1 > theI2) || (theI2 - theI1 + 1 != theV.Length()), "");
+ Standard_RangeError_Raise_if ((theI1 < LowerIndex) || (theI2 > UpperIndex)
+ || (theI1 > theI2) || (theI2 - theI1 + 1 != theV.Length()),
+ "math_Vector::Set() - invalid indices");
Standard_Integer I = theV.Lower();
for(Standard_Integer Index = theI1; Index <= theI2; Index++)
void math_Vector::Normalize()
{
Standard_Real Result = Norm();
- Standard_NullValue_Raise_if((Result <= RealEpsilon()), "");
+ Standard_NullValue_Raise_if ((Result <= RealEpsilon()),
+ "math_Vector::Normalize() - vector has zero norm");
for(Standard_Integer Index = LowerIndex; Index <= UpperIndex; Index++)
{
Array(Index) = Array(Index) / Result;
void math_Vector::Divide(const Standard_Real theRight)
{
- Standard_DivideByZero_Raise_if(Abs(theRight) <= RealEpsilon(), "");
+ Standard_DivideByZero_Raise_if (Abs(theRight) <= RealEpsilon(),
+ "math_Vector::Divide() - devisor is zero");
for(Standard_Integer Index =LowerIndex; Index <=UpperIndex; Index++)
{
math_Vector math_Vector::Divided (const Standard_Real theRight) const
{
- Standard_DivideByZero_Raise_if(Abs(theRight) <= RealEpsilon(), "");
+ Standard_DivideByZero_Raise_if (Abs(theRight) <= RealEpsilon(),
+ "math_Vector::Divided() - devisor is zero");
math_Vector temp = Multiplied(1./theRight);
return temp;
}
void math_Vector::Add(const math_Vector& theRight)
{
- Standard_DimensionError_Raise_if(Length() != theRight.Length(), "");
+ Standard_DimensionError_Raise_if (Length() != theRight.Length(),
+ "math_Vector::Add() - input vector has wrong dimensions");
Standard_Integer I = theRight.LowerIndex;
for(Standard_Integer Index = LowerIndex; Index <= UpperIndex; Index++)
math_Vector math_Vector::Added(const math_Vector& theRight) const
{
- Standard_DimensionError_Raise_if(Length() != theRight.Length(), "");
+ Standard_DimensionError_Raise_if (Length() != theRight.Length(),
+ "math_Vector::Added() - input vector has wrong dimensions");
math_Vector Result(LowerIndex, UpperIndex);
void math_Vector::Subtract(const math_Vector& theRight)
{
- Standard_DimensionError_Raise_if(Length() != theRight.Length(), "");
+ Standard_DimensionError_Raise_if (Length() != theRight.Length(),
+ "math_Vector::Subtract() - input vector has wrong dimensions");
Standard_Integer I = theRight.LowerIndex;
for(Standard_Integer Index = LowerIndex; Index <= UpperIndex; Index++)
math_Vector math_Vector::Subtracted (const math_Vector& theRight) const
{
- Standard_DimensionError_Raise_if(Length() != theRight.Length(), "");
+ Standard_DimensionError_Raise_if (Length() != theRight.Length(),
+ "math_Vector::Subtracted() - input vector has wrong dimensions");
math_Vector Result(LowerIndex, UpperIndex);
math_Vector math_Vector::Slice(const Standard_Integer theI1, const Standard_Integer theI2) const
{
- Standard_RangeError_Raise_if((theI1 < LowerIndex) || (theI1 > UpperIndex) || (theI2 < LowerIndex) || (theI2 > UpperIndex) , "");
+ Standard_RangeError_Raise_if ((theI1 < LowerIndex) || (theI1 > UpperIndex) || (theI2 < LowerIndex) || (theI2 > UpperIndex),
+ "math_Vector::Slice() - invalid indices");
if(theI2 >= theI1)
{
void math_Vector::Add (const math_Vector& theLeft, const math_Vector& theRight)
{
- Standard_DimensionError_Raise_if((Length() != theRight.Length()) || (theRight.Length() != theLeft.Length()), "");
+ Standard_DimensionError_Raise_if ((Length() != theRight.Length()) || (theRight.Length() != theLeft.Length()),
+ "math_Vector::Add() - input vectors have wrong dimensions");
Standard_Integer I = theLeft.LowerIndex;
Standard_Integer J = theRight.LowerIndex;
void math_Vector::Subtract (const math_Vector& theLeft, const math_Vector& theRight)
{
- Standard_DimensionError_Raise_if((Length() != theRight.Length()) || (theRight.Length() != theLeft.Length()), "");
+ Standard_DimensionError_Raise_if ((Length() != theRight.Length()) || (theRight.Length() != theLeft.Length()),
+ "math_Vector::Subtract() - input vectors have wrong dimensions");
Standard_Integer I = theLeft.LowerIndex;
Standard_Integer J = theRight.LowerIndex;
void math_Vector::Multiply(const math_Matrix& theLeft, const math_Vector& theRight)
{
- Standard_DimensionError_Raise_if((Length() != theLeft.RowNumber()) ||
- (theLeft.ColNumber() != theRight.Length()), "");
+ Standard_DimensionError_Raise_if ((Length() != theLeft.RowNumber())
+ || (theLeft.ColNumber() != theRight.Length()),
+ "math_Vector::Multiply() - input matrix and/or vector have wrong dimensions");
Standard_Integer Index = LowerIndex;
for(Standard_Integer I = theLeft.LowerRowIndex; I <= theLeft.UpperRowIndex; I++)
void math_Vector::Multiply(const math_Vector& theLeft, const math_Matrix& theRight)
{
- Standard_DimensionError_Raise_if((Length() != theRight.ColNumber()) ||
- (theLeft.Length() != theRight.RowNumber()), "");
+ Standard_DimensionError_Raise_if ((Length() != theRight.ColNumber())
+ || (theLeft.Length() != theRight.RowNumber()),
+ "math_Vector::Multiply() - input matrix and/or vector have wrong dimensions");
Standard_Integer Index = LowerIndex;
for(Standard_Integer J = theRight.LowerColIndex; J <= theRight.UpperColIndex; J++)
void math_Vector::TMultiply(const math_Matrix& theTLeft, const math_Vector& theRight)
{
- Standard_DimensionError_Raise_if((Length() != theTLeft.ColNumber()) ||
- (theTLeft.RowNumber() != theRight.Length()), "");
+ Standard_DimensionError_Raise_if ((Length() != theTLeft.ColNumber())
+ || (theTLeft.RowNumber() != theRight.Length()),
+ "math_Vector::TMultiply() - input matrix and/or vector have wrong dimensions");
Standard_Integer Index = LowerIndex;
for(Standard_Integer I = theTLeft.LowerColIndex; I <= theTLeft.UpperColIndex; I++)
void math_Vector::TMultiply(const math_Vector& theLeft, const math_Matrix& theTRight)
{
- Standard_DimensionError_Raise_if((Length() != theTRight.RowNumber()) ||
- (theLeft.Length() != theTRight.ColNumber()), "");
+ Standard_DimensionError_Raise_if ((Length() != theTRight.RowNumber())
+ || (theLeft.Length() != theTRight.ColNumber()),
+ "math_Vector::TMultiply() - input matrix and/or vector have wrong dimensions");
Standard_Integer Index = LowerIndex;
for(Standard_Integer J = theTRight.LowerRowIndex; J <= theTRight.UpperRowIndex; J++)
{
Standard_Real Result = 0;
- Standard_DimensionError_Raise_if(Length() != theRight.Length(), "");
+ Standard_DimensionError_Raise_if (Length() != theRight.Length(),
+ "math_Vector::Multiplied() - input vector has wrong dimensions");
Standard_Integer I = theRight.LowerIndex;
for(Standard_Integer Index = LowerIndex; Index <= UpperIndex; Index++)
math_Vector math_Vector::Multiplied(const math_Matrix& theRight)const
{
- Standard_DimensionError_Raise_if(Length() != theRight.RowNumber(), "");
+ Standard_DimensionError_Raise_if (Length() != theRight.RowNumber(),
+ "math_Vector::Multiplied() - input matrix has wrong dimensions");
math_Vector Result(theRight.LowerColIndex, theRight.UpperColIndex);
for(Standard_Integer J2 = theRight.LowerColIndex; J2 <= theRight.UpperColIndex; J2++)
void math_Vector::Multiply(const Standard_Real theLeft, const math_Vector& theRight)
{
- Standard_DimensionError_Raise_if((Length() != theRight.Length()), "");
+ Standard_DimensionError_Raise_if ((Length() != theRight.Length()),
+ "math_Vector::Multiply() - input vector has wrong dimensions");
for(Standard_Integer I = LowerIndex; I <= UpperIndex; I++)
{
Array(I) = theLeft * theRight.Array(I);
math_Vector& math_Vector::Initialized(const math_Vector& theOther)
{
- Standard_DimensionError_Raise_if(Length() != theOther.Length(), "");
+ Standard_DimensionError_Raise_if (Length() != theOther.Length(),
+ "math_Vector::Initialized() - input vector has wrong dimensions");
(theOther.Array).Copy(Array);
return *this;