mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0026937: Eliminate NO_CXX_EXCEPTION macro support
Macro NO_CXX_EXCEPTION was removed from code. Method Raise() was replaced by explicit throw statement. Method Standard_Failure::Caught() was replaced by normal C++mechanism of exception transfer. Method Standard_Failure::Caught() is deprecated now. Eliminated empty constructors. Updated samples. Eliminate empty method ChangeValue from NCollection_Map class. Removed not operable methods from NCollection classes.
This commit is contained in:
@@ -653,8 +653,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine,
|
||||
L = FS.Location();
|
||||
}
|
||||
else {
|
||||
Standard_NoSuchObject::Raise
|
||||
("BRepFill_Evolved : The Face is not planar");
|
||||
throw Standard_NoSuchObject("BRepFill_Evolved : The Face is not planar");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -663,7 +662,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine,
|
||||
S = BRep_Tool::Surface(aFace, L);
|
||||
}
|
||||
|
||||
if (S.IsNull()) Standard_DomainError::Raise("BRepFill_Evolved::Axe");
|
||||
if (S.IsNull()) throw Standard_DomainError("BRepFill_Evolved::Axe");
|
||||
|
||||
if (!L.IsIdentity())
|
||||
S = Handle(Geom_Surface)::DownCast(S->Transformed(L.Transformation()));
|
||||
|
@@ -851,7 +851,7 @@ void BRepFill_CompatibleWires::Perform (const Standard_Boolean WithRotation)
|
||||
else {
|
||||
// There are open and closed sections :
|
||||
// not processed
|
||||
Standard_DomainError::Raise("Sections must be all closed or all open");
|
||||
throw Standard_DomainError("Sections must be all closed or all open");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -893,7 +893,7 @@ void BRepFill_CompatibleWires::
|
||||
//allClosed = (allClosed && myWork(i).Closed());
|
||||
}
|
||||
if (!allClosed)
|
||||
Standard_NoSuchObject::Raise("BRepFill_CompatibleWires::SameNumberByPolarMethod : the wires must be closed");
|
||||
throw Standard_NoSuchObject("BRepFill_CompatibleWires::SameNumberByPolarMethod : the wires must be closed");
|
||||
|
||||
// sections ponctuelles, sections bouclantes ?
|
||||
if (myDegen1) ideb++;
|
||||
@@ -974,7 +974,7 @@ void BRepFill_CompatibleWires::
|
||||
// sequence of vertices of the first wire
|
||||
SeqOfVertices(wire1,SeqV);
|
||||
if (SeqV.Length()>NbMaxV)
|
||||
Standard_NoSuchObject::Raise("BRepFill::SameNumberByPolarMethod failed");
|
||||
throw Standard_NoSuchObject("BRepFill::SameNumberByPolarMethod failed");
|
||||
|
||||
// loop on vertices of wire1
|
||||
for (ii=1;ii<=SeqV.Length();ii++) {
|
||||
@@ -1049,7 +1049,7 @@ void BRepFill_CompatibleWires::
|
||||
// sequence of vertices of the first wire
|
||||
SeqOfVertices(wire1,SeqV);
|
||||
if ( SeqV.Length()>NbMaxV || SeqV.Length()>SizeMap )
|
||||
Standard_NoSuchObject::Raise("BRepFill::SameNumberByPolarMethod failed");
|
||||
throw Standard_NoSuchObject("BRepFill::SameNumberByPolarMethod failed");
|
||||
|
||||
|
||||
// next wire
|
||||
@@ -1171,7 +1171,7 @@ void BRepFill_CompatibleWires::
|
||||
}
|
||||
} //end of for(; itW.More(); itW.Next())
|
||||
if (Esol.IsNull())
|
||||
Standard_ConstructionError::Raise("BRepFill :: profiles are inconsistent");
|
||||
throw Standard_ConstructionError("BRepFill :: profiles are inconsistent");
|
||||
MW.Add(Esol);
|
||||
|
||||
TopTools_ListOfShape ConnectedEdges;
|
||||
@@ -1237,7 +1237,7 @@ void BRepFill_CompatibleWires::
|
||||
if (nbmin>nbEdges) nbmin = nbEdges;
|
||||
}
|
||||
if (nbmin!=nbmax) {
|
||||
Standard_NoSuchObject::Raise("BRepFill_CompatibleWires::SameNumberByPolarMethod failed");
|
||||
throw Standard_NoSuchObject("BRepFill_CompatibleWires::SameNumberByPolarMethod failed");
|
||||
}
|
||||
|
||||
//Fill <myMap>
|
||||
@@ -1456,7 +1456,7 @@ void BRepFill_CompatibleWires::SameNumberByACR(const Standard_Boolean report)
|
||||
if (nbmin>nbEdges(i)) nbmin = nbEdges(i);
|
||||
}
|
||||
if (nbmax!=nbmin)
|
||||
Standard_NoSuchObject::Raise("BRepFill_CompatibleWires::SameNumberByACR failed");
|
||||
throw Standard_NoSuchObject("BRepFill_CompatibleWires::SameNumberByACR failed");
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -1501,7 +1501,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ )
|
||||
}
|
||||
*/
|
||||
if (!allClosed)
|
||||
Standard_NoSuchObject::Raise("BRepFill_CompatibleWires::ComputeOrigin : the wires must be closed");
|
||||
throw Standard_NoSuchObject("BRepFill_CompatibleWires::ComputeOrigin : the wires must be closed");
|
||||
|
||||
/*
|
||||
// Max number of possible cuts
|
||||
@@ -1836,7 +1836,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ )
|
||||
gp_Pnt Pmini,P1,P2;
|
||||
SeqOfVertices(wire,SeqV);
|
||||
if (SeqV.Length()>NbMaxV)
|
||||
Standard_NoSuchObject::Raise("BRepFill::ComputeOrigin failed");
|
||||
throw Standard_NoSuchObject("BRepFill::ComputeOrigin failed");
|
||||
if (!polar) {
|
||||
// choix du vertex le plus proche comme origine
|
||||
distmini = Precision::Infinite();
|
||||
@@ -2060,7 +2060,7 @@ void BRepFill_CompatibleWires::SearchOrigin()
|
||||
allOpen = (allOpen && !myWork(i).Closed());
|
||||
}
|
||||
if (!allOpen)
|
||||
Standard_NoSuchObject::Raise("BRepFill_CompatibleWires::SearchOrigin : the wires must be open");
|
||||
throw Standard_NoSuchObject("BRepFill_CompatibleWires::SearchOrigin : the wires must be open");
|
||||
|
||||
// init
|
||||
|
||||
|
@@ -56,13 +56,13 @@ BRepFill_CurveConstraint :: BRepFill_CurveConstraint (const Handle(Adaptor3d_HCu
|
||||
myLProp=SLP;
|
||||
myOrder=Tang;
|
||||
if ((Tang<-1)||(Tang>2))
|
||||
Standard_Failure::Raise("BRepFill : The continuity is not G0 G1 or G2");
|
||||
throw Standard_Failure("BRepFill : The continuity is not G0 G1 or G2");
|
||||
myNbPoints=NPt;
|
||||
myConstG0=Standard_True;
|
||||
myConstG1=Standard_True;
|
||||
myConstG2=Standard_True;
|
||||
if (myFrontiere.IsNull())
|
||||
Standard_Failure::Raise("BRepFill_CurveConstraint : Curve must be on a Surface");
|
||||
throw Standard_Failure("BRepFill_CurveConstraint : Curve must be on a Surface");
|
||||
Handle(Geom_Surface) Surf;
|
||||
Handle(GeomAdaptor_HSurface) GS1;
|
||||
GS1 = Handle(GeomAdaptor_HSurface)::DownCast(myFrontiere->ChangeCurve().GetSurface());
|
||||
|
@@ -263,19 +263,19 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Error in MakeWire" << endl;
|
||||
#endif
|
||||
Standard_ConstructionError::Raise("BRepFill_Draft");
|
||||
throw Standard_ConstructionError("BRepFill_Draft");
|
||||
}
|
||||
}
|
||||
else {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "No Free Borders !" << endl;
|
||||
#endif
|
||||
Standard_ConstructionError::Raise("BRepFill_Draft");
|
||||
throw Standard_ConstructionError("BRepFill_Draft");
|
||||
}
|
||||
break;
|
||||
}
|
||||
default :
|
||||
Standard_ConstructionError::Raise("BRepFill_Draft");
|
||||
throw Standard_ConstructionError("BRepFill_Draft");
|
||||
}
|
||||
|
||||
// Attention to closed non declared wires !
|
||||
|
@@ -396,7 +396,7 @@ void BRepFill_Evolved::PrivatePerform(const TopoDS_Face& Spine,
|
||||
myMap.Clear();
|
||||
|
||||
if (myJoinType > GeomAbs_Arc) {
|
||||
Standard_NotImplemented::Raise();
|
||||
throw Standard_NotImplemented();
|
||||
}
|
||||
|
||||
TopTools_ListOfShape WorkProf;
|
||||
@@ -2369,8 +2369,7 @@ TopLoc_Location BRepFill_Evolved::FindLocation(const TopoDS_Face& Face)
|
||||
L = FS.Location();
|
||||
}
|
||||
else
|
||||
Standard_NoSuchObject::Raise
|
||||
("BRepFill_Evolved : The Face is not planar");
|
||||
throw Standard_NoSuchObject("BRepFill_Evolved : The Face is not planar");
|
||||
}
|
||||
|
||||
if (!L.IsIdentity())
|
||||
@@ -2686,7 +2685,7 @@ const TopoDS_Wire PutProfilAt (const TopoDS_Wire& ProfRef,
|
||||
|
||||
C2d = BRep_Tool::CurveOnSurface(E,F,First,Last);
|
||||
if (C2d.IsNull()) {
|
||||
Standard_ConstructionError::Raise("ConstructionError in PutProfilAt");
|
||||
throw Standard_ConstructionError("ConstructionError in PutProfilAt");
|
||||
}
|
||||
|
||||
if (E.Orientation() == TopAbs_REVERSED) {
|
||||
@@ -2937,8 +2936,7 @@ TopAbs_Orientation OriEdgeInFace (const TopoDS_Edge& E,
|
||||
return Exp.Current().Orientation();
|
||||
}
|
||||
}
|
||||
Standard_ConstructionError::Raise("BRepFill_Evolved::OriEdgeInFace");
|
||||
return E.Orientation();
|
||||
throw Standard_ConstructionError("BRepFill_Evolved::OriEdgeInFace");
|
||||
}
|
||||
|
||||
|
||||
|
@@ -328,7 +328,7 @@ void BRepFill_Filling::AddConstraints( const BRepFill_SequenceOfEdgeFaceAndOrder
|
||||
Standard_Real f, l;
|
||||
BRep_Tool::CurveOnSurface( CurEdge, C2d, Surface, loc, f, l);
|
||||
if (Surface.IsNull()) {
|
||||
Standard_Failure::Raise( "Add" );
|
||||
throw Standard_Failure( "Add" );
|
||||
return;
|
||||
}
|
||||
Surface = Handle(Geom_Surface)::DownCast(Surface->Copy());
|
||||
@@ -708,7 +708,7 @@ void BRepFill_Filling::Build()
|
||||
|
||||
TopoDS_Wire FinalWire = WireFromList(FinalEdges);
|
||||
if (!(FinalWire.Closed()))
|
||||
Standard_Failure::Raise("Wire is not closed");
|
||||
throw Standard_Failure("Wire is not closed");
|
||||
|
||||
myFace = BRepLib_MakeFace( Surface, FinalWire );
|
||||
}
|
||||
|
@@ -94,7 +94,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
|
||||
else {
|
||||
curv1 = BRep_Tool::Curve(Edge1, loc, first1, last1);
|
||||
if (curv1.IsNull())
|
||||
Standard_NullObject::Raise("Null 3D curve in edge");
|
||||
throw Standard_NullObject("Null 3D curve in edge");
|
||||
curv1 =
|
||||
Handle(Geom_Curve)::DownCast(curv1->Transformed(loc.Transformation()));
|
||||
ff = first1;
|
||||
@@ -161,7 +161,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
|
||||
else {
|
||||
curv = BRep_Tool::Curve(Edge2, loc, first2, last2);
|
||||
if (curv.IsNull())
|
||||
Standard_NullObject::Raise("Null 3D curve in edge");
|
||||
throw Standard_NullObject("Null 3D curve in edge");
|
||||
curv =
|
||||
Handle(Geom_Curve)::DownCast(curv->Transformed(loc.Transformation()));
|
||||
ff = first2;
|
||||
@@ -341,7 +341,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
|
||||
else {
|
||||
C1 = BRep_Tool::Curve(Edge1, loc, a1, b1);
|
||||
if (C1.IsNull())
|
||||
Standard_NullObject::Raise("Null 3D curve in edge");
|
||||
throw Standard_NullObject("Null 3D curve in edge");
|
||||
C1 = Handle(Geom_Curve)::DownCast(C1->Transformed(loc.Transformation()));
|
||||
aa = a1;
|
||||
bb = b1;
|
||||
@@ -366,7 +366,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
|
||||
else {
|
||||
C2 = BRep_Tool::Curve(Edge2, loc, a1, b1);
|
||||
if (C2.IsNull())
|
||||
Standard_NullObject::Raise("Null 3D curve in edge");
|
||||
throw Standard_NullObject("Null 3D curve in edge");
|
||||
C2 = Handle(Geom_Curve)::DownCast(C2->Transformed(loc.Transformation()));
|
||||
if (Edge2.Orientation() == TopAbs_REVERSED) {
|
||||
C2->Reverse();
|
||||
@@ -669,7 +669,7 @@ void BRepFill_Generator::Perform()
|
||||
else {
|
||||
C1 = BRep_Tool::Curve(Edge1,L1,f1,l1);
|
||||
if (C1.IsNull())
|
||||
Standard_NullObject::Raise("Null 3D curve in edge");
|
||||
throw Standard_NullObject("Null 3D curve in edge");
|
||||
}
|
||||
if (degen2) {
|
||||
Extremities(1) = BRep_Tool::Pnt(V2l);
|
||||
@@ -679,7 +679,7 @@ void BRepFill_Generator::Perform()
|
||||
else {
|
||||
C2 = BRep_Tool::Curve(Edge2,L2,f2,l2);
|
||||
if (C2.IsNull())
|
||||
Standard_NullObject::Raise("Null 3D curve in edge");
|
||||
throw Standard_NullObject("Null 3D curve in edge");
|
||||
}
|
||||
|
||||
// compute the location
|
||||
|
@@ -68,7 +68,7 @@ static Standard_Boolean isIsoU(const TopoDS_Face& Face,
|
||||
|
||||
C = BRep_Tool::CurveOnSurface(Edge,Face, f, l);
|
||||
if ( C.IsNull()) {
|
||||
Standard_ConstructionError::Raise ("BRepFill_MultiLine : Edge without PCurve");
|
||||
throw Standard_ConstructionError("BRepFill_MultiLine : Edge without PCurve");
|
||||
}
|
||||
|
||||
gp_Dir2d D = C->DN(f,1);
|
||||
@@ -635,7 +635,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U,
|
||||
cout << "MultiLine : D1 = D2 and the Curve is not a circle" << endl;
|
||||
cout << " ---> ValueOnFace failed at parameter U = " << U << endl;
|
||||
#endif
|
||||
Standard_ConstructionError::Raise("BRepFill_MultiLine: ValueOnFace");
|
||||
throw Standard_ConstructionError("BRepFill_MultiLine: ValueOnFace");
|
||||
}
|
||||
}
|
||||
else if ( D1 < D2) {
|
||||
|
@@ -644,15 +644,15 @@ void BRepFill_OffsetWire::Perform (const Standard_Real Offset,
|
||||
PerformWithBiLo(myWorkSpine,Offset,myBilo,myLink,myJoinType,Alt);
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure)//Every exception was caught.
|
||||
{
|
||||
myShape.Nullify();
|
||||
myIsDone = Standard_False;
|
||||
catch (Standard_Failure const& anException) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"An exception was caught in BRepFill_OffsetWire::Perform : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
anException.Print(cout);
|
||||
cout<<endl;
|
||||
#endif
|
||||
(void)anException;
|
||||
myShape.Nullify();
|
||||
myIsDone = Standard_False;
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -669,7 +669,7 @@ void BRepFill_OffsetWire::Perform (const Standard_Real Offset,
|
||||
if (!aWire.Closed()) {
|
||||
myShape.Nullify();
|
||||
myIsDone = Standard_False;
|
||||
Standard_ConstructionError::Raise("Offset wire is not closed.");
|
||||
throw Standard_ConstructionError("Offset wire is not closed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1602,10 +1602,7 @@ void BRepFill_OffsetWire::FixHoles()
|
||||
TopExp::Vertices( Base, Vf, Vl );
|
||||
if(Vf.IsNull() || Vl.IsNull())
|
||||
{
|
||||
Standard_Failure::Raise("BRepFill_OffsetWire::FixHoles(): Wrong wire.");
|
||||
#ifdef OCCT_DEBUG
|
||||
BRepTools::Write(Base, "Base");
|
||||
#endif
|
||||
throw Standard_Failure("BRepFill_OffsetWire::FixHoles(): Wrong wire.");
|
||||
}
|
||||
gp_Pnt Pf, Pl;
|
||||
Pf = BRep_Tool::Pnt(Vf);
|
||||
@@ -1621,13 +1618,7 @@ void BRepFill_OffsetWire::FixHoles()
|
||||
|
||||
if(V1.IsNull() || V2.IsNull())
|
||||
{
|
||||
Standard_Failure::Raise("BRepFill_OffsetWire::FixHoles(): Wrong wire.");
|
||||
#ifdef OCCT_DEBUG
|
||||
BRepTools::Write(Base, "Base");
|
||||
char name[128];
|
||||
sprintf(name,"Wire_%d",i);
|
||||
BRepTools::Write(aWire, name);
|
||||
#endif
|
||||
throw Standard_Failure("BRepFill_OffsetWire::FixHoles(): Wrong wire.");
|
||||
}
|
||||
|
||||
gp_Pnt P1, P2;
|
||||
|
@@ -469,7 +469,7 @@ TopoDS_Face BRepFill_Pipe::Face(const TopoDS_Edge& ESpine,
|
||||
// *************************************************
|
||||
iprof = FindEdge(myProfile, EProfile, count);
|
||||
|
||||
if (!iprof) Standard_DomainError::Raise(
|
||||
if (!iprof) throw Standard_DomainError(
|
||||
"BRepFill_Pipe::Face : Edge not in the Profile");
|
||||
|
||||
|
||||
@@ -480,7 +480,7 @@ TopoDS_Face BRepFill_Pipe::Face(const TopoDS_Edge& ESpine,
|
||||
for (ii=1; ii<=myLoc->NbLaw() && (!ispin); ii++)
|
||||
if (ESpine.IsSame(myLoc->Edge(ii))) ispin = ii;
|
||||
|
||||
if (!ispin) Standard_DomainError::Raise(
|
||||
if (!ispin) throw Standard_DomainError(
|
||||
"BRepFill_Pipe::Edge : Edge not in the Spine");
|
||||
|
||||
theFace = TopoDS::Face(myFaces->Value(iprof, ispin));
|
||||
@@ -501,7 +501,7 @@ TopoDS_Edge BRepFill_Pipe::Edge(const TopoDS_Edge& ESpine,
|
||||
// Search if VProfile is a Vertex of myProfile
|
||||
// *************************************************
|
||||
iprof = FindVertex(myProfile, VProfile, count);
|
||||
if (!iprof) Standard_DomainError::Raise(
|
||||
if (!iprof) throw Standard_DomainError(
|
||||
"BRepFill_Pipe::Edge : Vertex not in the Profile");
|
||||
|
||||
|
||||
@@ -513,7 +513,7 @@ TopoDS_Edge BRepFill_Pipe::Edge(const TopoDS_Edge& ESpine,
|
||||
for (ii=1; ii<=myLoc->NbLaw() && (!ispin); ii++)
|
||||
if (ESpine.IsSame(myLoc->Edge(ii))) ispin = ii;
|
||||
|
||||
if (!ispin) Standard_DomainError::Raise(
|
||||
if (!ispin) throw Standard_DomainError(
|
||||
"BRepFill_Pipe::Edge : Edge not in the Spine");
|
||||
|
||||
|
||||
@@ -550,7 +550,7 @@ TopoDS_Shape BRepFill_Pipe::Section(const TopoDS_Vertex& VSpine) const
|
||||
for (ii=1; ii<=myLoc->NbLaw()+1 && (!ispin); ii++)
|
||||
if (VSpine.IsSame(myLoc->Vertex(ii))) ispin = ii;
|
||||
|
||||
if (!ispin) Standard_DomainError::Raise(
|
||||
if (!ispin) throw Standard_DomainError(
|
||||
"BRepFill_Pipe::Section : Vertex not in the Spine");
|
||||
|
||||
BRep_Builder B;
|
||||
@@ -672,7 +672,7 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
|
||||
|
||||
case TopAbs_SOLID :
|
||||
case TopAbs_COMPSOLID :
|
||||
Standard_DomainError::Raise("BRepFill_Pipe::profile contains solids");
|
||||
throw Standard_DomainError("BRepFill_Pipe::profile contains solids");
|
||||
break;
|
||||
|
||||
case TopAbs_COMPOUND :
|
||||
@@ -897,7 +897,7 @@ Standard_Integer BRepFill_Pipe::FindEdge(const TopoDS_Shape& S,
|
||||
|
||||
case TopAbs_SOLID :
|
||||
case TopAbs_COMPSOLID :
|
||||
Standard_DomainError::Raise("BRepFill_Pipe::SOLID or COMPSOLID");
|
||||
throw Standard_DomainError("BRepFill_Pipe::SOLID or COMPSOLID");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -963,7 +963,7 @@ Standard_Integer BRepFill_Pipe::FindVertex(const TopoDS_Shape& S,
|
||||
|
||||
case TopAbs_SOLID :
|
||||
case TopAbs_COMPSOLID :
|
||||
Standard_DomainError::Raise("BRepFill_Pipe::SOLID or COMPSOLID");
|
||||
throw Standard_DomainError("BRepFill_Pipe::SOLID or COMPSOLID");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@@ -124,7 +124,7 @@ static Standard_Boolean ComputeSection(const TopoDS_Wire& W1,
|
||||
BRepFill_CompatibleWires CW(SSh);
|
||||
CW.SetPercent(0.1);
|
||||
CW.Perform();
|
||||
if (!CW.IsDone()) StdFail_NotDone::Raise("Uncompatible wires");
|
||||
if (!CW.IsDone()) throw StdFail_NotDone("Uncompatible wires");
|
||||
GeomFill_SequenceOfTrsf EmptyTrsfs;
|
||||
Handle(BRepFill_NSections) SL = new (BRepFill_NSections) (CW.Shape(),EmptyTrsfs,SR,0.,1.);
|
||||
Standard_Real US = p1/(p1+p2);
|
||||
@@ -356,7 +356,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
|
||||
BRepFill_CompatibleWires CW(Seq);
|
||||
CW.SetPercent(0.1);
|
||||
CW.Perform();
|
||||
if (!CW.IsDone()) StdFail_NotDone::Raise("Uncompatible wires");
|
||||
if (!CW.IsDone()) throw StdFail_NotDone("Uncompatible wires");
|
||||
TheGuide = TopoDS::Wire(CW.Shape().Value(2));
|
||||
}
|
||||
else if (GuideClose) {
|
||||
@@ -825,7 +825,7 @@ void BRepFill_PipeShell::SetForceApproxC1(const Standard_Boolean ForceApproxC1)
|
||||
Standard_Boolean BRepFill_PipeShell::MakeSolid()
|
||||
{
|
||||
if (myShape.IsNull())
|
||||
StdFail_NotDone::Raise("PipeShell is not built");
|
||||
throw StdFail_NotDone("PipeShell is not built");
|
||||
Standard_Boolean B = myShape.Closed();
|
||||
BRep_Builder BS;
|
||||
|
||||
@@ -919,7 +919,7 @@ const TopoDS_Shape& BRepFill_PipeShell::LastShape() const
|
||||
void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
|
||||
TopTools_ListOfShape& theList)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("Generated:Pas Fait");
|
||||
// throw Standard_NotImplemented("Generated:Pas Fait");
|
||||
|
||||
theList.Clear();
|
||||
|
||||
@@ -938,7 +938,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
|
||||
void BRepFill_PipeShell::Prepare()
|
||||
{
|
||||
TopoDS_Wire theSect;
|
||||
if (!IsReady()) StdFail_NotDone::Raise("PipeShell");
|
||||
if (!IsReady()) throw StdFail_NotDone("PipeShell");
|
||||
if (!myLocation.IsNull() && !mySection.IsNull()) return; // It is ready
|
||||
|
||||
//Check set of section for right configuration of punctual sections
|
||||
@@ -953,7 +953,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
|
||||
wdeg = wdeg && (BRep_Tool::Degenerated(anEdge));
|
||||
}
|
||||
if (wdeg)
|
||||
Standard_Failure::Raise("Wrong usage of punctual sections");
|
||||
throw Standard_Failure("Wrong usage of punctual sections");
|
||||
}
|
||||
if (mySeq.Length() <= 2)
|
||||
{
|
||||
@@ -965,7 +965,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
|
||||
wdeg = wdeg && (BRep_Tool::Degenerated(anEdge));
|
||||
}
|
||||
if (wdeg)
|
||||
Standard_Failure::Raise("Wrong usage of punctual sections");
|
||||
throw Standard_Failure("Wrong usage of punctual sections");
|
||||
}
|
||||
|
||||
// Construction of the law of location
|
||||
@@ -984,7 +984,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
|
||||
}
|
||||
default :
|
||||
{ // Not planned!
|
||||
Standard_ConstructionError::Raise("PipeShell");
|
||||
throw Standard_ConstructionError("PipeShell");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1146,7 +1146,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
|
||||
}
|
||||
}
|
||||
else {
|
||||
Standard_ConstructionError::Raise("PipeShell : uncompatible wires");
|
||||
throw Standard_ConstructionError("PipeShell : uncompatible wires");
|
||||
}
|
||||
mySection = new (BRepFill_NSections) (WorkingSections,Transformations,Param,V1,V2);
|
||||
|
||||
|
@@ -60,7 +60,7 @@ BRepFill_Section::BRepFill_Section(const TopoDS_Shape& Profile,
|
||||
wire.Closed( Standard_True );
|
||||
}
|
||||
else
|
||||
Standard_Failure::Raise("BRepFill_Section: bad shape type of section");
|
||||
throw Standard_Failure("BRepFill_Section: bad shape type of section");
|
||||
}
|
||||
|
||||
void BRepFill_Section::Set(const Standard_Boolean IsLaw)
|
||||
|
@@ -196,7 +196,7 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law,
|
||||
// BRepExtrema_DistShapeShape Ext(mySection, myLaw->Wire());
|
||||
|
||||
// if (! Ext.IsDone())
|
||||
// Standard_ConstructionError::Raise("Distance Vertex/Spine");
|
||||
// throw Standard_ConstructionError("Distance Vertex/Spine");
|
||||
|
||||
// if (Ext.SupportTypeShape2(1) == BRepExtrema_IsOnEdge) {
|
||||
// TopoDS_Shape sbis = Ext.SupportOnShape2(1);
|
||||
@@ -317,7 +317,7 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law,
|
||||
}
|
||||
}
|
||||
|
||||
if (Bof) Standard_ConstructionError::Raise("Interval non trouve !!");
|
||||
if (Bof) throw Standard_ConstructionError("Interval non trouve !!");
|
||||
Ind1 = Index(Ind1);
|
||||
if (Ind2) Ind2 = Index(Ind2);
|
||||
|
||||
|
@@ -719,7 +719,7 @@ static TopoDS_Edge BuildEdge(Handle(Geom_Curve)& C3d,
|
||||
char* Temp = name ;
|
||||
DrawTrSurf::Set(Temp, C3d);
|
||||
// DrawTrSurf::Set(name, C3d);
|
||||
Standard_ConstructionError::Raise("BRepFill_Sweep::BuildEdge");
|
||||
throw Standard_ConstructionError("BRepFill_Sweep::BuildEdge");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1419,7 +1419,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S,
|
||||
DrawTrSurf::Set(Temp,Iso);
|
||||
// DrawTrSurf::Set(name,Iso);
|
||||
#endif
|
||||
Standard_ConstructionError::Raise("BRepFill_Sweep::BuildEdge");
|
||||
throw Standard_ConstructionError("BRepFill_Sweep::BuildEdge");
|
||||
}
|
||||
|
||||
E = MkE.Edge();
|
||||
@@ -1903,7 +1903,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
|
||||
char* Temp = name ;
|
||||
DrawTrSurf::Set(Temp,Iso);
|
||||
// DrawTrSurf::Set(name,Iso);
|
||||
Standard_ConstructionError::Raise("BRepFill_Sweep::BuildEdge");
|
||||
throw Standard_ConstructionError("BRepFill_Sweep::BuildEdge");
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
|
@@ -196,7 +196,7 @@ static void EvalParameters(const Geom2dAdaptor_Curve& Bis,
|
||||
gp_Pnt P;
|
||||
|
||||
if ( !Intersector.IsDone()) {
|
||||
StdFail_NotDone::Raise("BRepFill_TrimSurfaceTool::IntersectWith");
|
||||
throw StdFail_NotDone("BRepFill_TrimSurfaceTool::IntersectWith");
|
||||
}
|
||||
|
||||
NbPoints = Intersector.NbPoints();
|
||||
@@ -260,7 +260,7 @@ static void EvalParametersBis(const Geom2dAdaptor_Curve& Bis,
|
||||
gp_Pnt P;
|
||||
|
||||
if ( !Intersector.IsDone()) {
|
||||
StdFail_NotDone::Raise("BRepFill_TrimSurfaceTool::IntersectWith");
|
||||
throw StdFail_NotDone("BRepFill_TrimSurfaceTool::IntersectWith");
|
||||
}
|
||||
|
||||
NbPoints = Intersector.NbPoints();
|
||||
|
@@ -224,7 +224,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
|
||||
Intersector = Geom2dInt_GInter(ABis, AC, TolC, Tol);
|
||||
|
||||
if ( !Intersector.IsDone()) {
|
||||
StdFail_NotDone::Raise("BRepFill_TrimSurfaceTool::IntersectWith");
|
||||
throw StdFail_NotDone("BRepFill_TrimSurfaceTool::IntersectWith");
|
||||
}
|
||||
|
||||
NbPoints = Intersector.NbPoints();
|
||||
@@ -259,7 +259,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
|
||||
Intersector = Geom2dInt_GInter(ABis, AC, TolC, Tol*10);
|
||||
|
||||
if ( !Intersector.IsDone()) {
|
||||
StdFail_NotDone::Raise("BRepFill_TrimSurfaceTool::IntersectWith");
|
||||
throw StdFail_NotDone("BRepFill_TrimSurfaceTool::IntersectWith");
|
||||
}
|
||||
|
||||
NbPoints = Intersector.NbPoints();
|
||||
@@ -376,7 +376,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
|
||||
break;
|
||||
}
|
||||
default:
|
||||
Standard_NotImplemented::Raise(" BRepFill_TrimSurfaceTool");
|
||||
throw Standard_NotImplemented(" BRepFill_TrimSurfaceTool");
|
||||
}
|
||||
|
||||
gp_Vec2d D12d = Bis->DN(UBis,1);
|
||||
|
Reference in New Issue
Block a user