1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-07 18:30:55 +03:00

0024058: Eliminate compiler warning C4702 in MSVC++ with warning level 4

Got rid of most of warnings of C4702 type: unreachable code.
Returned some #ifdef DEB
Fixed tabs formatting
Fixed some mistakes in code
This commit is contained in:
omy 2013-07-12 12:54:01 +04:00
parent c1746a0ac9
commit d3f26155b5
59 changed files with 494 additions and 672 deletions
src
AIS
APIHeaderSection
Adaptor3d
BOPTest
BOPTools
BRepAlgo
BRepFill
BRepGProp
BRepTest
BRepTools
ChFi2d
ChFi3d
DDataStd
DPrsStd
Draw
GCPnts
Geom2dGcc
GeomFill
GeometryTest
IntPatch
IntSurf
IntTools
MAT2d
MNaming
MeshVS
OpenGl
ProjLib
QABugs
QANewBRepNaming
QANewModTopOpe
ShapeAnalysis
ShapeBuild
ShapeConstruct
ShapeCustom
ShapeFix
TNaming
TopOpeBRep
TopOpeBRepBuild
TopOpeBRepDS
TopOpeBRepTool
XSControl

@ -284,8 +284,6 @@ AIS_SelectStatus AIS_Selection::Select(const Handle(Standard_Transient)& anObjec
S->myResultMap.Bind( anObject, aListIter ); S->myResultMap.Bind( anObject, aListIter );
return AIS_SS_Added; return AIS_SS_Added;
#endif //USE_MAP #endif //USE_MAP
return AIS_SS_Removed;
} }
//======================================================================= //=======================================================================

@ -38,19 +38,16 @@ static Standard_Boolean IsTimeStamp
case 4 : if (uncar < '0' || uncar > '9') return Standard_False; break; case 4 : if (uncar < '0' || uncar > '9') return Standard_False; break;
case 5 : if (uncar != '-') return Standard_False; case 5 : if (uncar != '-') return Standard_False;
case 6 : if (uncar != '0' && uncar != '1') return Standard_False; break; case 6 : if (uncar != '0' && uncar != '1') return Standard_False; break;
case 7 : if (uncar < '0' || uncar > '9') return Standard_False; break; case 7 : if (uncar < '0' || uncar > '9') return Standard_False;
if (dizmois == '1' && (uncar < '0' || uncar > '2')) return Standard_False; if (dizmois == '1' && (uncar < '0' || uncar > '2')) return Standard_False; break;
break;
case 8 : if (uncar != '-') return Standard_False; case 8 : if (uncar != '-') return Standard_False;
case 9 : if (uncar < '0' || uncar > '3') return Standard_False; break; case 9 : if (uncar < '0' || uncar > '3') return Standard_False; break;
case 10 : if (uncar < '0' || uncar > '9') return Standard_False; case 10 : if (uncar < '0' || uncar > '9') return Standard_False;
if (dizjour == '3' && (uncar != '0' && uncar != '1')) return Standard_False; if (dizjour == '3' && (uncar != '0' && uncar != '1')) return Standard_False; break;
break;
case 11 : if (uncar != 'T') return Standard_False; case 11 : if (uncar != 'T') return Standard_False;
case 12 : if (uncar < '0' || uncar > '2') return Standard_False; break; case 12 : if (uncar < '0' || uncar > '2') return Standard_False; break;
case 13 : if (uncar < '0' || uncar > '9') return Standard_False; case 13 : if (uncar < '0' || uncar > '9') return Standard_False;
if (dizheur == '2' && (uncar < '0' || uncar > '3')) return Standard_False; break; if (dizheur == '2' && (uncar < '0' || uncar > '3')) return Standard_False; break;
break;
case 14 : if (uncar != ':') return Standard_False; case 14 : if (uncar != ':') return Standard_False;
case 15 : if (uncar < '0' || uncar > '5') return Standard_False; break; case 15 : if (uncar < '0' || uncar > '5') return Standard_False; break;
case 16 : if (uncar < '0' || uncar > '9') return Standard_False; break; case 16 : if (uncar < '0' || uncar > '9') return Standard_False; break;

@ -806,10 +806,7 @@ gp_Elips Adaptor3d_IsoCurve::Ellipse() const
{ {
Standard_NoSuchObject::Raise("Adaptor3d_IsoCurve:Ellipse"); Standard_NoSuchObject::Raise("Adaptor3d_IsoCurve:Ellipse");
} }
} }
// portage WNT
return gp_Elips();
} }
//======================================================================= //=======================================================================

@ -193,9 +193,8 @@ Handle(Adaptor3d_HSurface) Adaptor3d_SurfaceOfLinearExtrusion::VTrim
const Standard_Real Tol) const const Standard_Real Tol) const
{ {
Handle(Adaptor3d_HCurve) newBasisCurve = Handle(Adaptor3d_HCurve) newBasisCurve =
myBasisCurve->Trim(First, myBasisCurve->Trim(First, Last, Tol);
Last,
Tol) ;
Adaptor3d_SurfaceOfLinearExtrusion * SurfacePtr = Adaptor3d_SurfaceOfLinearExtrusion * SurfacePtr =
new Adaptor3d_SurfaceOfLinearExtrusion(newBasisCurve, myDirection) ; new Adaptor3d_SurfaceOfLinearExtrusion(newBasisCurve, myDirection) ;

@ -416,7 +416,6 @@ Standard_Integer bsection(Draw_Interpretor& di,
di << usage; di << usage;
return 1; return 1;
} }
return 0;
} }
//======================================================================= //=======================================================================
//function : bsmt //function : bsmt

@ -169,7 +169,6 @@ void CorrectWires(const TopoDS_Face& aFx)
GeomAbs_SurfaceType aType; GeomAbs_SurfaceType aType;
// //
const Handle(Geom_Surface)& aS=BRep_Tool::Surface(aFx); const Handle(Geom_Surface)& aS=BRep_Tool::Surface(aFx);
//BRepAdaptor_Surface aBAS (aFx, Standard_False);
GeomAdaptor_Surface aGAS (aS); GeomAdaptor_Surface aGAS (aS);
aType=aGAS.GetType(); aType=aGAS.GetType();
if (aType!=GeomAbs_Cylinder) { if (aType!=GeomAbs_Cylinder) {
@ -205,7 +204,6 @@ void CorrectWires(const TopoDS_Face& aFx)
aT=BRep_Tool::Parameter(aV, aE); aT=BRep_Tool::Parameter(aV, aE);
const Handle(Geom2d_Curve)& aC2D=BRep_Tool::CurveOnSurface(aE, aF, aT1, aT2); const Handle(Geom2d_Curve)& aC2D=BRep_Tool::CurveOnSurface(aE, aF, aT1, aT2);
aC2D->D0(aT, aP2D); aC2D->D0(aT, aP2D);
//aP=aBAS.Value(aP2D.X(), aP2D.Y());
aS->D0(aP2D.X(), aP2D.Y(), aP); aS->D0(aP2D.X(), aP2D.Y(), aP);
aD2=aPV.SquareDistance(aP); aD2=aPV.SquareDistance(aP);
if (aD2>aD2max) { if (aD2>aD2max) {
@ -325,7 +323,6 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
Standard_Boolean SameRange = TE->SameRange(); Standard_Boolean SameRange = TE->SameRange();
Standard_Real First = myHCurve->FirstParameter(); Standard_Real First = myHCurve->FirstParameter();
Standard_Real Last = myHCurve->LastParameter(); Standard_Real Last = myHCurve->LastParameter();
//Standard_Real Delta =1.e-14;
Standard_Real Delta =1.e-12; Standard_Real Delta =1.e-12;
Handle(BRep_TFace)& TF = *((Handle(BRep_TFace)*) &S.TShape()); Handle(BRep_TFace)& TF = *((Handle(BRep_TFace)*) &S.TShape());
@ -333,7 +330,6 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
const TopLoc_Location& TFloc = TF->Location(); const TopLoc_Location& TFloc = TF->Location();
const Handle(Geom_Surface)& Su = TF->Surface(); const Handle(Geom_Surface)& Su = TF->Surface();
TopLoc_Location L = (Floc * TFloc).Predivided(myShape.Location()); TopLoc_Location L = (Floc * TFloc).Predivided(myShape.Location());
// Standard_Boolean checkclosed = Standard_False;
Standard_Boolean pcurvefound = Standard_False; Standard_Boolean pcurvefound = Standard_False;
BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves()); BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
@ -345,10 +341,7 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
Standard_Real f,l; Standard_Real f,l;
GC->Range(f,l); GC->Range(f,l);
if (SameRange && (f != First || l != Last)) { if (SameRange && (f != First || l != Last)) {
return ;//BRepCheck_InvalidSameRangeFlag); return ;//BRepCheck_InvalidSameRangeFlag;
if (SameParameter) {
return; //BRepCheck_InvalidSameParameterFlag);
}
} }
Handle(Geom_Surface) Sb = cr->Surface(); Handle(Geom_Surface) Sb = cr->Surface();

@ -179,7 +179,6 @@ void BRepAlgo_FaceRestrictor::Perform()
if (!YaPCurve) { if (!YaPCurve) {
ProjCurve3d (E, S, L); ProjCurve3d (E, S, L);
} }
} }
} }
} }
@ -259,8 +258,6 @@ static Standard_Boolean IsInside(const TopoDS_Wire& wir,
const TopoDS_Face& F, const TopoDS_Face& F,
BRepTopAdaptor_FClass2d& /*FClass2d*/) BRepTopAdaptor_FClass2d& /*FClass2d*/)
{ {
//Standard_Real U,V;
TopExp_Explorer exp; TopExp_Explorer exp;
for (exp.Init(wir,TopAbs_EDGE); for (exp.Init(wir,TopAbs_EDGE);
exp.More(); exp.More();
@ -270,13 +267,11 @@ static Standard_Boolean IsInside(const TopoDS_Wire& wir,
Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(edg,F,f,l); Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(edg,F,f,l);
Standard_Real prm; Standard_Real prm;
if (!Precision::IsNegativeInfinite(f) && if (!Precision::IsNegativeInfinite(f) && !Precision::IsPositiveInfinite(l)) {
!Precision::IsPositiveInfinite(l)) {
prm = (f+l)/2.; prm = (f+l)/2.;
} }
else { else {
if (Precision::IsNegativeInfinite(f) && if (Precision::IsNegativeInfinite(f) && Precision::IsPositiveInfinite(l)){
Precision::IsPositiveInfinite(l)){
prm = 0.; prm = 0.;
} }
else if (Precision::IsNegativeInfinite(f)) { else if (Precision::IsNegativeInfinite(f)) {
@ -365,14 +360,14 @@ static void BuildFaceIn( TopoDS_Face& F,
if (Orientation == TopAbs_FORWARD) { if (Orientation == TopAbs_FORWARD) {
TopoDS_Wire NWI(WI); TopoDS_Wire NWI(WI);
NWI.Reverse(); NWI.Reverse();
// TopoDS_Wire NWI = TopoDS::Wire(WI.Reversed()); // TopoDS_Wire NWI = TopoDS::Wire(WI.Reversed());
B.Add(F,NWI); B.Add(F,NWI);
BuildFaceIn (F,WI,KeyContains, KeyIsIn,TopAbs_REVERSED,Faces); BuildFaceIn (F,WI,KeyContains, KeyIsIn,TopAbs_REVERSED,Faces);
} }
else { else {
TopoDS_Shape aLocalShape = Faces.First().EmptyCopied(); TopoDS_Shape aLocalShape = Faces.First().EmptyCopied();
TopoDS_Face NF = TopoDS::Face(aLocalShape); TopoDS_Face NF = TopoDS::Face(aLocalShape);
// TopoDS_Face NF = TopoDS::Face(Faces.First().EmptyCopied());; // TopoDS_Face NF = TopoDS::Face(Faces.First().EmptyCopied());;
B.Add (NF,WI); B.Add (NF,WI);
Faces.Append (NF); Faces.Append (NF);
BuildFaceIn (NF, WI, KeyContains, KeyIsIn, TopAbs_FORWARD,Faces); BuildFaceIn (NF, WI, KeyContains, KeyIsIn, TopAbs_FORWARD,Faces);

@ -635,7 +635,6 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
else { else {
return result; return result;
} }
return result;
} }
//============================================================================ //============================================================================

@ -65,8 +65,6 @@ Standard_Integer BRepGProp_EdgeTool::IntegrationOrder(const BRepAdaptor_Curve&
default : default :
return 10; return 10;
} }
//POP WE should return something : -> Default
return 10;
} }
gp_Pnt BRepGProp_EdgeTool::Value(const BRepAdaptor_Curve& C, const Standard_Real U) gp_Pnt BRepGProp_EdgeTool::Value(const BRepAdaptor_Curve& C, const Standard_Real U)

@ -73,7 +73,6 @@
#include <TopOpeBRep_Point2d.hxx> #include <TopOpeBRep_Point2d.hxx>
#include <TopOpeBRepDS_Transition.hxx> #include <TopOpeBRepDS_Transition.hxx>
//#ifdef WNT
#include <stdio.h> #include <stdio.h>
#ifdef WNT #ifdef WNT
Standard_IMPORT Draw_Viewer dout; Standard_IMPORT Draw_Viewer dout;
@ -1142,11 +1141,6 @@ static Standard_Integer bsplineprof(Draw_Interpretor& di,
DBRep::Set(a[1],S); DBRep::Set(a[1],S);
return 0; return 0;
#ifdef DEB
di << "profile : bad number of arguments";
return 1;
#endif
} }

@ -492,7 +492,8 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
for (itled.Initialize(myled), itlcu.Initialize(mylcu); for (itled.Initialize(myled), itlcu.Initialize(mylcu);
itled.More(); // itlcu.More() itled.More(); // itlcu.More()
itled.Next(),itlcu.Next()) { itled.Next(),itlcu.Next())
{
if (itled.Value().IsSame(E)) { if (itled.Value().IsSame(E)) {
// deja traitee // deja traitee
break; break;
@ -596,8 +597,6 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
return Standard_True; return Standard_True;
} }
} }
Curve2d = C2d;
return Standard_True;
} }
//======================================================================= //=======================================================================
@ -632,7 +631,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewParameter
if(proj.IsDone()) { if(proj.IsDone()) {
Standard_Real Dist2Min = proj.SquareDistance(); Standard_Real Dist2Min = proj.SquareDistance();
if (Dist2Min < Tol*Tol) { if (Dist2Min < Tol*Tol) {
// Standard_Real U_final_point,V_final_point; // Standard_Real U_final_point,V_final_point;
P = proj.Point().Parameter(); P = proj.Point().Parameter();
return Standard_True; return Standard_True;
} }

@ -707,7 +707,6 @@ gp_Pnt ComputePoint(const TopoDS_Vertex& V,const TopoDS_Edge& E,
thePoint = cc.Value(Param); thePoint = cc.Value(Param);
return thePoint; return thePoint;
} // else ... } // else ...
return thePoint;
} // ComputePoint } // ComputePoint

@ -917,7 +917,6 @@ static Standard_Integer SurfIndex(const ChFiDS_StripeArray1& StripeArray1,
case FACE2: return aSurfData->IndexOfS2(); case FACE2: return aSurfData->IndexOfS2();
default: return -1; default: return -1;
} }
return -1;
} }
//======================================================================= //=======================================================================

@ -199,8 +199,6 @@ static Standard_Real ComputeAbscissa(const BRepAdaptor_Curve& C,
default: default:
return 0; return 0;
} }
Standard_NotImplemented::Raise("calculate abscisse non-processed");
return 0.;
} }
//======================================================================= //=======================================================================

@ -214,7 +214,7 @@ Handle(Draw_Drawable3D) DDataStd_DrawDriver::DrawableConstraint (const Handle(TD
else { else {
TopoDS_Shape aLocalShape = Geometry(A,1,TopAbs_FACE); TopoDS_Shape aLocalShape = Geometry(A,1,TopAbs_FACE);
TopoDS_Face F1 = TopoDS::Face(aLocalShape); TopoDS_Face F1 = TopoDS::Face(aLocalShape);
// TopoDS_Face F1 = TopoDS::Face(Geometry(A,1,TopAbs_FACE)); // TopoDS_Face F1 = TopoDS::Face(Geometry(A,1,TopAbs_FACE));
if (!F1.IsNull()) D = new DrawDim_Radius(F1); if (!F1.IsNull()) D = new DrawDim_Radius(F1);
} }
} }
@ -253,22 +253,8 @@ Handle(Draw_Drawable3D) DDataStd_DrawDriver::DrawableConstraint (const Handle(TD
D = new DrawDim_PlanarDistance (TNaming_Tool::GetShape(A->GetGeometry(1)), D = new DrawDim_PlanarDistance (TNaming_Tool::GetShape(A->GetGeometry(1)),
TNaming_Tool::GetShape(A->GetGeometry(2))); TNaming_Tool::GetShape(A->GetGeometry(2)));
} }
else {
break; break;
TopoDS_Shape aLocalShape = (Geometry (A, 1, TopAbs_FACE));
TopoDS_Face F1 = TopoDS::Face (aLocalShape);
// TopoDS_Face F1 = TopoDS::Face (Geometry (A, 1, TopAbs_FACE));
if (A->NbGeometries() == 1) D = new DrawDim_Distance (F1);
else {
TopoDS_Shape aLocalShape = Geometry(A,2,TopAbs_FACE);
TopoDS_Face F2 = TopoDS::Face(aLocalShape);
// TopoDS_Face F2 = TopoDS::Face(Geometry(A,2,TopAbs_FACE));
D = new DrawDim_Distance(F1,F2);
} }
}
}
break;
case TDataXtd_ANGLE: case TDataXtd_ANGLE:
{ {
if (A->IsPlanar()) { if (A->IsPlanar()) {

@ -89,8 +89,6 @@ static Standard_Integer DPrsStd_AISDisplay (Draw_Interpretor& di,
TPrsStd_AISViewer::Update(L); TPrsStd_AISViewer::Update(L);
return 0; return 0;
} }
di << "DPrsStd_AISDisplay : Error" << "\n";
return 1;
} }
//======================================================================= //=======================================================================

@ -416,10 +416,9 @@ static unsigned int __stdcall CpuFunc (void * param)
{ {
cout << "Process killed by CPU limit (" << CPU_LIMIT << " sec)" << endl; cout << "Process killed by CPU limit (" << CPU_LIMIT << " sec)" << endl;
ExitProcess (2); ExitProcess (2);
return 0; // return 0;
} }
} }
return 0;
} }
#else #else
static void CpuFunc (int) static void CpuFunc (int)

@ -1405,7 +1405,6 @@ LRESULT APIENTRY DrawWindow::DrawProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARA
else else
return(DefMDIChildProc(hWnd, wMsg, wParam, lParam)); return(DefMDIChildProc(hWnd, wMsg, wParam, lParam));
} }
return (0l);
} }

@ -229,7 +229,6 @@ static Standard_Boolean PerformComposite (TColStd_SequenceOfReal& Parameters,
Ua = Ub; Ua = Ub;
} }
return Standard_True;
} }

@ -194,7 +194,6 @@ static Standard_Boolean PerformComposite (TColStd_SequenceOfReal& Parameters,
Ua = Ub; Ua = Ub;
} }
return Standard_True;
} }

@ -715,7 +715,6 @@ Standard_Boolean Geom2dGcc_Circ2d2TanOn::
if (TheSame1(Index) == 0) { return Standard_False; } if (TheSame1(Index) == 0) { return Standard_False; }
else { return Standard_True; } else { return Standard_True; }
} }
return Standard_False;
} }
Standard_Boolean Geom2dGcc_Circ2d2TanOn:: Standard_Boolean Geom2dGcc_Circ2d2TanOn::
@ -731,5 +730,5 @@ Standard_Boolean Geom2dGcc_Circ2d2TanOn::
if (TheSame1(Index) == 0) { return Standard_False; } if (TheSame1(Index) == 0) { return Standard_False; }
else { return Standard_True; } else { return Standard_True; }
} }
return Standard_True; // return Standard_True;
} }

@ -496,7 +496,6 @@ Standard_Boolean Geom2dGcc_Circ2d2TanRad::
if (TheSame1(Index) == 0) { return Standard_False; } if (TheSame1(Index) == 0) { return Standard_False; }
else { return Standard_True; } else { return Standard_True; }
} }
return Standard_True;
} }
Standard_Boolean Geom2dGcc_Circ2d2TanRad:: Standard_Boolean Geom2dGcc_Circ2d2TanRad::
@ -512,5 +511,5 @@ Standard_Boolean Geom2dGcc_Circ2d2TanRad::
if (TheSame1(Index) == 0) { return Standard_False; } if (TheSame1(Index) == 0) { return Standard_False; }
else { return Standard_True; } else { return Standard_True; }
} }
return Standard_True; // return Standard_True;
} }

@ -579,7 +579,7 @@ Standard_Boolean GeomFill::GetCircle(const Convert_ParameterisationType TConv,
} }
return Standard_True; return Standard_True;
} }
return Standard_False; // return Standard_False;
} }
Standard_Boolean GeomFill::GetCircle(const Convert_ParameterisationType TConv, Standard_Boolean GeomFill::GetCircle(const Convert_ParameterisationType TConv,
@ -763,5 +763,4 @@ Standard_Boolean GeomFill::GetCircle(const Convert_ParameterisationType TConv,
} }
return Standard_True; return Standard_True;
} }
return Standard_False;
} }

@ -360,7 +360,8 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const
return solutions(di,ct3,a[1]); return solutions(di,ct3,a[1]);
} }
else if (ip3) { else if (ip3)
{
// R-P-P // R-P-P
Geom2dGcc_Circ2d2TanRad ct3(new Geom2d_CartesianPoint(P2), Geom2dGcc_Circ2d2TanRad ct3(new Geom2d_CartesianPoint(P2),
new Geom2d_CartesianPoint(P3), new Geom2d_CartesianPoint(P3),
@ -368,21 +369,18 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const
tol); tol);
return solutions(di,ct3,a[1]); return solutions(di,ct3,a[1]);
} }
else { else {
// R-P-R // R-P-R
di << "Radius - Point - Radius ??"<<"\n"; di << "Radius - Point - Radius ??"<<"\n";
return 1; return 1;
} }
} }
else { else {
// R-R-.. // R-R-..
di << "radius, radius ???"<<"\n"; di << "radius, radius ???"<<"\n";
return 1; return 1;
} }
} }
return 0;
} }

@ -262,7 +262,7 @@ static Standard_Real LocalFirstParameter (const Handle(IntPatch_Line)& L)
return firstp; return firstp;
} }
} }
return firstp; // return firstp;
} }
//======================================================================= //=======================================================================
@ -344,7 +344,6 @@ static Standard_Real LocalLastParameter (const Handle(IntPatch_Line)& L)
return lastp; return lastp;
} }
} }
return lastp;
} }

@ -518,8 +518,7 @@ Standard_Integer IntPatch_Polyhedron::TriConnex (const Standard_Integer Triang,
TempOtherP = OtherP; TempOtherP = OtherP;
return(0); //-- BUG NON CORRIGE ( a revoir le role de nbdeltaU et nbdeltaV) return(0); //-- BUG NON CORRIGE ( a revoir le role de nbdeltaU et nbdeltaV)
// return(TriConnex(TempTri,Pivot,TempOtherP,TriCon,OtherP));
return(TriConnex(TempTri,Pivot,TempOtherP,TriCon,OtherP));
} }
return TriCon; return TriCon;
} }

@ -262,10 +262,10 @@ gp_Pnt IntSurf_Quadric::Value(const Standard_Real U,
gp_Pnt p(0,0,0); gp_Pnt p(0,0,0);
return(p); return(p);
} }
break; //break;
} }
// pop : pour NT // pop : pour NT
return gp_Pnt(0,0,0); // return gp_Pnt(0,0,0);
} }
// ============================================================ // ============================================================
void IntSurf_Quadric::D1(const Standard_Real U, void IntSurf_Quadric::D1(const Standard_Real U,
@ -313,10 +313,10 @@ gp_Vec IntSurf_Quadric::DN(const Standard_Real U,
gp_Vec v(0,0,0); gp_Vec v(0,0,0);
return(v); return(v);
} }
break; //break;
} }
// pop : pour NT // pop : pour NT
return gp_Vec(0,0,0); // return gp_Vec(0,0,0);
} }
// ============================================================ // ============================================================
gp_Vec IntSurf_Quadric::Normale(const Standard_Real U, gp_Vec IntSurf_Quadric::Normale(const Standard_Real U,
@ -348,10 +348,10 @@ gp_Vec IntSurf_Quadric::Normale(const Standard_Real U,
gp_Vec v(0,0,0); gp_Vec v(0,0,0);
return(v); return(v);
} }
break; // break;
} }
// pop : pour NT // pop : pour NT
return gp_Vec(0,0,0); // return gp_Vec(0,0,0);
} }
// ============================================================ // ============================================================
gp_Vec IntSurf_Quadric::Normale (const gp_Pnt& P) const gp_Vec IntSurf_Quadric::Normale (const gp_Pnt& P) const
@ -394,10 +394,8 @@ gp_Vec IntSurf_Quadric::Normale (const gp_Pnt& P) const
{ {
gp_Vec v(0,0,0); gp_Vec v(0,0,0);
return(v); return(v);
} break; } // break;
} }
// pop : pour NT
return gp_Vec(0,0,0);
} }
// ============================================================ // ============================================================
void IntSurf_Quadric::Parameters (const gp_Pnt& P, void IntSurf_Quadric::Parameters (const gp_Pnt& P,

@ -941,7 +941,7 @@ void IntTools_EdgeFace::CheckData()
} }
} }
*/ */
return 0; // return 0;
} }

@ -828,7 +828,6 @@ static Standard_Boolean IsSharpCorner (const Handle(Geom2d_Geometry)& Geom1,
else { else {
return Standard_True; return Standard_True;
} }
return Standard_False;
} }

@ -52,7 +52,6 @@ static TopAbs_ShapeEnum IntegerToShapeEnum (const Standard_Integer I)
default : default :
return TopAbs_SHAPE; return TopAbs_SHAPE;
} }
return TopAbs_SHAPE;
} }
//======================================================================= //=======================================================================

@ -54,7 +54,6 @@ static TopAbs_ShapeEnum IntegerToShapeEnum (const Standard_Integer I)
default : default :
return TopAbs_SHAPE; return TopAbs_SHAPE;
} }
return TopAbs_SHAPE;
} }
//======================================================================= //=======================================================================

@ -151,21 +151,17 @@ void MeshVS_MeshOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager
if( !aNodes.IsNull() && aNodes->Map().Extent() == 1 ) if( !aNodes.IsNull() && aNodes->Map().Extent() == 1 )
{ {
TColStd_MapIteratorOfPackedMapOfInteger anIt( aNodes->Map() ); TColStd_MapIteratorOfPackedMapOfInteger anIt( aNodes->Map() );
for( ; anIt.More(); anIt.Next() )
{
if( myLastID != anIt.Key() ) if( myLastID != anIt.Key() )
{
myLastID = anIt.Key(); myLastID = anIt.Key();
break;
} }
} }
else if( !aElems.IsNull() && aElems->Map().Extent() == 1 ) else if( !aElems.IsNull() && aElems->Map().Extent() == 1 )
{ {
TColStd_MapIteratorOfPackedMapOfInteger anIt( aElems->Map() ); TColStd_MapIteratorOfPackedMapOfInteger anIt( aElems->Map() );
for( ; anIt.More(); anIt.Next() )
{
if( myLastID != anIt.Key() ) if( myLastID != anIt.Key() )
{
myLastID = anIt.Key(); myLastID = anIt.Key();
break;
} }
} }
@ -201,24 +197,20 @@ Standard_Boolean MeshVS_MeshOwner::IsForcedHilight () const
if( !aNodes.IsNull() && aNodes->Map().Extent() == 1 ) if( !aNodes.IsNull() && aNodes->Map().Extent() == 1 )
{ {
TColStd_MapIteratorOfPackedMapOfInteger anIt( aNodes->Map() ); TColStd_MapIteratorOfPackedMapOfInteger anIt( aNodes->Map() );
for( ; anIt.More(); anIt.Next() )
{
aKey = anIt.Key(); aKey = anIt.Key();
if( myLastID == aKey ) if( myLastID == aKey )
{
aHilight = Standard_False; aHilight = Standard_False;
break;
} }
} }
Handle(TColStd_HPackedMapOfInteger) aElems = GetDetectedElements(); Handle(TColStd_HPackedMapOfInteger) aElems = GetDetectedElements();
if( !aElems.IsNull() && aElems->Map().Extent() == 1 ) if( !aElems.IsNull() && aElems->Map().Extent() == 1 )
{ {
TColStd_MapIteratorOfPackedMapOfInteger anIt( aElems->Map() ); TColStd_MapIteratorOfPackedMapOfInteger anIt( aElems->Map() );
for( ; anIt.More(); anIt.Next() )
{
aKey = anIt.Key(); aKey = anIt.Key();
if( myLastID == aKey ) if( myLastID == aKey )
{
aHilight = Standard_False; aHilight = Standard_False;
break;
} }
} }
} }

@ -345,7 +345,6 @@ Standard_Boolean OpenGl_GraphicDriver::BufferDump (const Graphic3d_CView& t
{ {
const OpenGl_CView* aCView = (const OpenGl_CView* )theCView.ptrView; const OpenGl_CView* aCView = (const OpenGl_CView* )theCView.ptrView;
return (aCView != NULL) && aCView->WS->BufferDump ((OpenGl_FrameBuffer* )theCView.ptrFBO, theImage, theBufferType); return (aCView != NULL) && aCView->WS->BufferDump ((OpenGl_FrameBuffer* )theCView.ptrFBO, theImage, theBufferType);
return Standard_False;
} }
Standard_Boolean OpenGl_Workspace::BufferDump (OpenGl_FrameBuffer* theFBOPtr, Standard_Boolean OpenGl_Workspace::BufferDump (OpenGl_FrameBuffer* theFBOPtr,

@ -1207,11 +1207,10 @@ Handle(Adaptor2d_HCurve2d)
// Modified by Sergey KHROMOV - Thu Apr 18 10:57:51 2002 End // Modified by Sergey KHROMOV - Thu Apr 18 10:57:51 2002 End
return Handle(Adaptor2d_HCurve2d)(); return Handle(Adaptor2d_HCurve2d)();
} }
myProjIsDone = Standard_False; // myProjIsDone = Standard_False;
// Modified by Sergey KHROMOV - Thu Apr 18 10:58:01 2002 Begin // Modified by Sergey KHROMOV - Thu Apr 18 10:58:01 2002 Begin
// Standard_NoSuchObject_Raise_if(1,"ProjLib_ComputeOnPS: build echec"); // Standard_NoSuchObject_Raise_if(1,"ProjLib_ComputeOnPS: build echec");
// Modified by Sergey KHROMOV - Thu Apr 18 10:58:02 2002 End // Modified by Sergey KHROMOV - Thu Apr 18 10:58:02 2002 End
return Handle(Adaptor2d_HCurve2d)();
} }

@ -247,7 +247,6 @@ static Standard_Integer OCC486(Draw_Interpretor& di, Standard_Integer argc, cons
if ( nPSurf > 0 ) if ( nPSurf > 0 )
{ {
//Standard_Real distMin = myExtPS.Value ( 1 ); //Standard_Real distMin = myExtPS.Value ( 1 );
Standard_Real distMin = myExtPS.SquareDistance ( 1 ); Standard_Real distMin = myExtPS.SquareDistance ( 1 );
Standard_Integer indMin=1; Standard_Integer indMin=1;
@ -261,7 +260,6 @@ static Standard_Integer OCC486(Draw_Interpretor& di, Standard_Integer argc, cons
indMin = sol; indMin = sol;
} }
} }
//
distMin = sqrt(distMin); distMin = sqrt(distMin);
Standard_Real S, T; Standard_Real S, T;
myExtPS.Point(indMin).Parameter ( S, T ); myExtPS.Point(indMin).Parameter ( S, T );
@ -278,8 +276,6 @@ static Standard_Integer OCC486(Draw_Interpretor& di, Standard_Integer argc, cons
else return 1; else return 1;
} }
catch (Standard_Failure) {di << "OCC486 Exception \n" ;return 1;} catch (Standard_Failure) {di << "OCC486 Exception \n" ;return 1;}
return 0;
} }
#include <GC_MakeArcOfCircle.hxx> #include <GC_MakeArcOfCircle.hxx>

@ -76,80 +76,10 @@ static Standard_Integer BUC60738 (Draw_Interpretor& di, Standard_Integer /*argc*
return 0; return 0;
} }
static int BUC60606(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
di << "Use satread command instead of " << argv[0] << "\n";
return -1;
if(argc!=3) {
di << "Usage : " << argv[0] << "name filename" << "\n";
return -1;
}
// Handle_AcisData_AcisModel satModel = new AcisData_AcisModel();
// Standard_Character *DD = Tcl_GetVar(di.Interp(),"Draw_DataDir",TCL_GLOBAL_ONLY);
// Standard_Character *filename = new Standard_Character [strlen(DD)+strlen(argv[2])+1];
// Sprintf(filename,"%s/%s",DD,argv[2]);
// satModel->ReadSaveFile(filename);
// Standard_Boolean success = !satModel.IsNull();
// cout << "n<-- SAT model read : " << (success?"true":"false") << endl << flush;
// if ( success ) {
// Standard_Character *Ch=new Standard_Character [strlen(argv[1])+3];
// Handle_TopTools_HSequenceOfShape satShapes = satModel->GetShapes();
// Standard_Integer nbs=satShapes->Length();
// for(Standard_Integer i=1;i<=nbs;i++) {
// TopoDS_Shape xShape = satShapes->Value(i);
// if(!xShape.IsNull()) {
// Sprintf(Ch,"%s_%i",argv[1],i);
// DBRep::Set(Ch,xShape);
// } else cout << "The shape " << argv[1] << "_" << i << " is NULL !" << endl;
// }
// }
return 0;
}
static int BUC60627(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
di << "Use satread command instead of " << argv[0] << "\n";
return -1;
// perform the conversion
// as in AcisData.cdl --- that's alright
// if(argc!=3) {
// cerr << "Usage : " << argv[0] << " BREP file" << endl;
// return -1;
// }
// TopoDS_Shape shapeModel=DBRep::Get(argv[1]);
// Handle(AcisData_AcisModel) satModel = new AcisData_AcisModel();
// satModel->AddShape( shapeModel ); // memorizes "kegel2.brep"
// Standard_CString stringData;
// Standard_Integer nbChar; // write intermediate stringin order to compute ACIS data
// satModel->WriteStringData( stringData, nbChar );
// if ( satModel->IsDone() ) {
// satModel = new AcisData_AcisModel();
// satModel->ReadStringData( stringData );
// if ( satModel->IsDone() ) {
// // write into file
// satModel->WriteSaveFile( argv[2] );
// if ( ! satModel->IsDone() ) {
// cout << "The SAT madel does not wroute." << endl;
// }
// } else cout << "The SAT model does not read from a string." << endl;
// // satModel->ReadStringData( stringData );
// } else cout << "The SAT model does not wroute into a string." << endl;
// // satModel->WriteStringData( stringData, nbChar );
return 1;
}
void QABugs::Commands_4(Draw_Interpretor& theCommands) { void QABugs::Commands_4(Draw_Interpretor& theCommands) {
const char *group = "QABugs"; const char *group = "QABugs";
theCommands.Add("BUC60738","BUC60738",__FILE__,BUC60738,group); theCommands.Add("BUC60738","BUC60738",__FILE__,BUC60738,group);
theCommands.Add("BUC60606","BUC60606 name",__FILE__,BUC60606,group);
theCommands.Add("BUC60627","BUC60627 name",__FILE__,BUC60627,group);
return; return;
} }

@ -129,8 +129,9 @@ TDF_Label QANewBRepNaming_BooleanOperationFeat::ModifiedFaces() const {
const TDF_Label& ModifiedFacesLabel = ResultLabel().NewChild(); const TDF_Label& ModifiedFacesLabel = ResultLabel().NewChild();
TDataStd_Name::Set(ModifiedFacesLabel, "ModifiedFaces"); TDataStd_Name::Set(ModifiedFacesLabel, "ModifiedFaces");
return ModifiedFacesLabel; return ModifiedFacesLabel;
#endif #else
return ResultLabel().NewChild(); return ResultLabel().NewChild();
#endif
} }
//======================================================================= //=======================================================================
@ -143,8 +144,9 @@ TDF_Label QANewBRepNaming_BooleanOperationFeat::ModifiedEdges() const {
const TDF_Label& ModifiedEdgesLabel = ResultLabel().NewChild(); const TDF_Label& ModifiedEdgesLabel = ResultLabel().NewChild();
TDataStd_Name::Set(ModifiedEdgesLabel, "ModifiedEdges"); TDataStd_Name::Set(ModifiedEdgesLabel, "ModifiedEdges");
return ModifiedEdgesLabel; return ModifiedEdgesLabel;
#endif #else
return ResultLabel().NewChild(); return ResultLabel().NewChild();
#endif
} }
//======================================================================= //=======================================================================
@ -157,8 +159,9 @@ TDF_Label QANewBRepNaming_BooleanOperationFeat::DeletedFaces() const {
const TDF_Label& DeletedFacesLabel = ResultLabel().NewChild(); const TDF_Label& DeletedFacesLabel = ResultLabel().NewChild();
TDataStd_Name::Set(DeletedFacesLabel, "DeletedFaces"); TDataStd_Name::Set(DeletedFacesLabel, "DeletedFaces");
return DeletedFacesLabel; return DeletedFacesLabel;
#endif #else
return ResultLabel().NewChild(); return ResultLabel().NewChild();
#endif
} }
//======================================================================= //=======================================================================
@ -171,8 +174,9 @@ TDF_Label QANewBRepNaming_BooleanOperationFeat::DeletedEdges() const {
const TDF_Label& DeletedEdgesLabel = ResultLabel().NewChild(); const TDF_Label& DeletedEdgesLabel = ResultLabel().NewChild();
TDataStd_Name::Set(DeletedEdgesLabel, "DeletedEdges"); TDataStd_Name::Set(DeletedEdgesLabel, "DeletedEdges");
return DeletedEdgesLabel; return DeletedEdgesLabel;
#endif #else
return ResultLabel().NewChild(); return ResultLabel().NewChild();
#endif
} }
//======================================================================= //=======================================================================
@ -185,8 +189,9 @@ TDF_Label QANewBRepNaming_BooleanOperationFeat::DeletedVertices() const {
const TDF_Label& DeletedVerticesLabel = ResultLabel().NewChild(); const TDF_Label& DeletedVerticesLabel = ResultLabel().NewChild();
TDataStd_Name::Set(DeletedVerticesLabel, "DeletedVertices"); TDataStd_Name::Set(DeletedVerticesLabel, "DeletedVertices");
return DeletedVerticesLabel; return DeletedVerticesLabel;
#endif #else
return ResultLabel().NewChild(); return ResultLabel().NewChild();
#endif
} }
//======================================================================= //=======================================================================
@ -199,8 +204,9 @@ TDF_Label QANewBRepNaming_BooleanOperationFeat::NewShapes() const {
const TDF_Label& NewShapesLabel = ResultLabel().NewChild(); const TDF_Label& NewShapesLabel = ResultLabel().NewChild();
TDataStd_Name::Set(NewShapesLabel, "NewShapes"); TDataStd_Name::Set(NewShapesLabel, "NewShapes");
return NewShapesLabel; return NewShapesLabel;
#endif #else
return ResultLabel().NewChild(); return ResultLabel().NewChild();
#endif
} }
//======================================================================= //=======================================================================
@ -213,8 +219,9 @@ TDF_Label QANewBRepNaming_BooleanOperationFeat::Content() const {
const TDF_Label& ContentLabel = ResultLabel().NewChild(); const TDF_Label& ContentLabel = ResultLabel().NewChild();
TDataStd_Name::Set(ContentLabel, "Content"); TDataStd_Name::Set(ContentLabel, "Content");
return ContentLabel; return ContentLabel;
#endif #else
return ResultLabel().NewChild(); return ResultLabel().NewChild();
#endif
} }
//======================================================================= //=======================================================================
@ -227,8 +234,9 @@ TDF_Label QANewBRepNaming_BooleanOperationFeat::DeletedDegeneratedEdges() const
const TDF_Label& DegeneratedLabel = ResultLabel().NewChild(); const TDF_Label& DegeneratedLabel = ResultLabel().NewChild();
TDataStd_Name::Set(DegeneratedLabel, "DeletedDegeneratedEdges"); TDataStd_Name::Set(DegeneratedLabel, "DeletedDegeneratedEdges");
return DegeneratedLabel; return DegeneratedLabel;
#endif #else
return ResultLabel().NewChild(); return ResultLabel().NewChild();
#endif
} }
//======================================================================= //=======================================================================

@ -497,8 +497,9 @@ TDF_Label QANewBRepNaming_Gluing::Content() const {
const TDF_Label& ContentLabel = ResultLabel().NewChild(); const TDF_Label& ContentLabel = ResultLabel().NewChild();
TDataStd_Name::Set(ContentLabel, "Content"); TDataStd_Name::Set(ContentLabel, "Content");
return ContentLabel; return ContentLabel;
#endif #else
return ResultLabel().NewChild(); return ResultLabel().NewChild();
#endif
} }
//======================================================================= //=======================================================================

@ -945,7 +945,8 @@ static void SplitEdge(const TopoDS_Edge &theEdge,
Standard_Integer i; Standard_Integer i;
for (i = 1; i <= theVertices.Extent(); i++) { for (i = 1; i <= theVertices.Extent(); i++)
{
const TopoDS_Shape &theVtx = theVertices.FindKey(i); const TopoDS_Shape &theVtx = theVertices.FindKey(i);
if (!aV1.IsSame(theVtx) && !aV2.IsSame(theVtx)) if (!aV1.IsSame(theVtx) && !aV2.IsSame(theVtx))
@ -956,7 +957,7 @@ static void SplitEdge(const TopoDS_Edge &theEdge,
theSplits.Clear(); theSplits.Clear();
// Splitting of the new edge. // Splitting of the new edge.
if (!TopOpeBRepTool_TOOL::SplitE(aNewEdge, theSplits)) { if (!TopOpeBRepTool_TOOL::SplitE(aNewEdge, theSplits)) {
theSplits.Clear(); theSplits.Clear();
theSplits.Append(theEdge); theSplits.Append(theEdge);
@ -964,29 +965,30 @@ static void SplitEdge(const TopoDS_Edge &theEdge,
return; return;
} }
// Addition of the other internal vertices into the corresponding splits. // Addition of the other internal vertices into the corresponding splits.
TopoDS_Iterator anIter(theEdge, Standard_False); TopoDS_Iterator anIter(theEdge, Standard_False);
for (; anIter.More(); anIter.Next()) { for (; anIter.More(); anIter.Next())
{
TopoDS_Vertex aCurVtx = TopoDS::Vertex(anIter.Value()); TopoDS_Vertex aCurVtx = TopoDS::Vertex(anIter.Value());
// for each vertex which is not the same as aV1, aV2, theIntV1 or theIntV2. // for each vertex which is not the same as aV1, aV2, theIntV1 or theIntV2.
if (!aCurVtx.IsSame(aV1) && !aCurVtx.IsSame(aV2) && if (!aCurVtx.IsSame(aV1) && !aCurVtx.IsSame(aV2) && !theVertices.Contains(aCurVtx))
!theVertices.Contains(aCurVtx)) { {
TopTools_ListIteratorOfListOfShape anEdgeIter(theSplits); TopTools_ListIteratorOfListOfShape anEdgeIter(theSplits);
Standard_Real aCurPar; Standard_Real aCurPar = BRep_Tool::Parameter(aCurVtx, theEdge);
aCurPar = BRep_Tool::Parameter(aCurVtx, theEdge); // Search for the split the current vertex belongs to.
for (; anEdgeIter.More(); anEdgeIter.Next())
// Search for the split the current vertex belongs to. {
for (; anEdgeIter.More(); anEdgeIter.Next()) {
TopoDS_Edge anEdge = TopoDS::Edge(anEdgeIter.Value()); TopoDS_Edge anEdge = TopoDS::Edge(anEdgeIter.Value());
Standard_Real aFPar; Standard_Real aFPar;
Standard_Real aLPar; Standard_Real aLPar;
BRep_Tool::Range(anEdge, aFPar, aLPar); BRep_Tool::Range(anEdge, aFPar, aLPar);
if (aCurPar > aFPar && aCurPar < aLPar) { if (aCurPar > aFPar && aCurPar < aLPar)
{
aBuilder.Add(anEdge, aCurVtx); aBuilder.Add(anEdge, aCurVtx);
} }
break; break;
@ -998,9 +1000,9 @@ static void SplitEdge(const TopoDS_Edge &theEdge,
TopTools_ListIteratorOfListOfShape anEdgeIter(theSplits); TopTools_ListIteratorOfListOfShape anEdgeIter(theSplits);
TopAbs_Orientation anOri = theEdge.Orientation(); TopAbs_Orientation anOri = theEdge.Orientation();
for (; anEdgeIter.More(); anEdgeIter.Next()) { for (; anEdgeIter.More(); anEdgeIter.Next())
{
TopoDS_Shape &anEdge = anEdgeIter.Value(); TopoDS_Shape &anEdge = anEdgeIter.Value();
anEdge.Orientation(anOri); anEdge.Orientation(anOri);
} }
} }

@ -249,7 +249,6 @@ Standard_Boolean ShapeAnalysis::IsOuterBound(const TopoDS_Face& face)
Standard_Boolean rescl = (fcl.PerformInfinitePoint () == TopAbs_OUT); Standard_Boolean rescl = (fcl.PerformInfinitePoint () == TopAbs_OUT);
return rescl; return rescl;
} }
return Standard_True;
} }
//======================================================================= //=======================================================================

@ -566,7 +566,6 @@ Handle(Geom2d_Curve) ShapeBuild_Edge::TransformPCurve(const Handle(Geom2d_Curve)
} }
return aBSpline2d; return aBSpline2d;
} }
return result;
} }
//======================================================================= //=======================================================================

@ -1563,7 +1563,6 @@ Handle(Geom_Curve) ShapeConstruct_ProjectCurveOnSurface::InterpolateCurve3d(cons
#endif #endif
return Standard_False; return Standard_False;
} }
return Standard_False; // ramasse-miette
} }
/* S4135 : BestExtremum is commented after IsAnIsoparametric works with Precision::Confusion() /* S4135 : BestExtremum is commented after IsAnIsoparametric works with Precision::Confusion()

@ -760,7 +760,6 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertSurface(const Handle(Geo
//else //else
//Surface is not BSpline or Bezier //Surface is not BSpline or Bezier
// return Standard_False; // return Standard_False;
return Standard_True;
} }
//======================================================================= //=======================================================================

@ -217,7 +217,6 @@ static Standard_Boolean FindParameterWithExt (const gp_Pnt& Pt1,
#endif #endif
return Standard_False; return Standard_False;
} }
return Standard_False; // normalement, on n y passe jamais
} }
//======================================================================= //=======================================================================

@ -396,7 +396,6 @@ ShapeFix_Wireframe::ShapeFix_Wireframe(const TopoDS_Shape& shape)
#endif #endif
return ReplaceFirst; return ReplaceFirst;
} }
return ReplaceFirst;
} }
//======================================================================= //=======================================================================

@ -990,7 +990,8 @@ static Standard_Boolean IsInternal(const TopoDS_Shape& aSx)
TopoDS_Iterator aIt; TopoDS_Iterator aIt;
bInternal = Standard_False; bInternal = Standard_False;
aIt.Initialize(aSx); aIt.Initialize(aSx);
for (; aIt.More(); aIt.Next()) { for (; aIt.More(); aIt.Next())
{
const TopoDS_Shape& aSy=aIt.Value(); const TopoDS_Shape& aSy=aIt.Value();
aOr=aSy.Orientation(); aOr=aSy.Orientation();
bInternal = (aOr == TopAbs_INTERNAL || aOr == TopAbs_EXTERNAL); bInternal = (aOr == TopAbs_INTERNAL || aOr == TopAbs_EXTERNAL);

@ -338,7 +338,7 @@ void TNaming_Localizer::GoBack (const TopoDS_Shape& S,
} }
else { else {
for ( ; it.More(); it.Next()) { for ( ; it.More(); it.Next()) {
// if (it.NamedShape()->Evolution() != TNaming_SELECTED) { // if (it.NamedShape()->Evolution() != TNaming_SELECTED) {
if (it.NamedShape()->Evolution() == Evol) { if (it.NamedShape()->Evolution() == Evol) {
Handle(TNaming_NamedShape) NS = TNaming_Tool::NamedShape(it.Shape(),Lab); Handle(TNaming_NamedShape) NS = TNaming_Tool::NamedShape(it.Shape(),Lab);
if (!NS.IsNull()) { if (!NS.IsNull()) {

@ -258,6 +258,8 @@ void TopOpeBRep_FFDumper::DumpVP(const TopOpeBRep_VPointInter& VP,const Standard
#ifndef DEB #ifndef DEB
Standard_Integer TopOpeBRep_FFDumper::ExploreIndex(const TopoDS_Shape& , const Standard_Integer ) const Standard_Integer TopOpeBRep_FFDumper::ExploreIndex(const TopoDS_Shape& , const Standard_Integer ) const
{ {
return 0;
}
#else #else
Standard_Integer TopOpeBRep_FFDumper::ExploreIndex(const TopoDS_Shape& S, const Standard_Integer ISI) const Standard_Integer TopOpeBRep_FFDumper::ExploreIndex(const TopoDS_Shape& S, const Standard_Integer ISI) const
{ {
@ -265,9 +267,8 @@ Standard_Integer TopOpeBRep_FFDumper::ExploreIndex(const TopoDS_Shape& S, const
if (ISI == 1) r = myEM1.Find(S); if (ISI == 1) r = myEM1.Find(S);
if (ISI == 2) r = myEM2.Find(S); if (ISI == 2) r = myEM2.Find(S);
return r; return r;
#endif
return 0;
} }
#endif
//======================================================================= //=======================================================================
//function : DumpDSP //function : DumpDSP

@ -39,7 +39,6 @@ int compll(const void* v1, const void* v2) {
if (p1 < p2) return (-1); if (p1 < p2) return (-1);
else if (p1 > p2) return (1); else if (p1 > p2) return (1);
else return (0); else return (0);
return (0);
} }
Standard_EXPORT void BREP_sortonparameter2(TopOpeBRepDS_ListOfInterference& LOI) Standard_EXPORT void BREP_sortonparameter2(TopOpeBRepDS_ListOfInterference& LOI)

@ -62,7 +62,6 @@ Standard_Integer BOOPNINTL::Set(const Standard_Boolean b,Standard_Integer n,char
else { else {
return 1; return 1;
} }
return 0;
} }
Standard_Boolean BOOPNINTL::Get(Standard_Integer n,char**a){ Standard_Boolean BOOPNINTL::Get(Standard_Integer n,char**a){

@ -1784,7 +1784,6 @@ Standard_Integer TopOpeBRepBuild_Builder1::TwoPiecesON (const TopTools_SequenceO
// Unknowm case for existing adjacents // Unknowm case for existing adjacents
return 0; return 0;
} }
return -1;
} }
//======================================================================= //=======================================================================

@ -367,8 +367,8 @@ Standard_Boolean TopOpeBRepBuild_GTopo::IsToReverse1() const
else IsToRev = (s1 == TopAbs_IN); else IsToRev = (s1 == TopAbs_IN);
return IsToRev; return IsToRev;
} }
Standard_ProgramError::Raise("GTopo::IsToReverse1"); // Standard_ProgramError::Raise("GTopo::IsToReverse1");
return Standard_False; // dummy // return Standard_False; // dummy
} }
@ -390,8 +390,6 @@ Standard_Boolean TopOpeBRepBuild_GTopo::IsToReverse2() const
else IsToRev = (s2 == TopAbs_IN); else IsToRev = (s2 == TopAbs_IN);
return IsToRev; return IsToRev;
} }
Standard_ProgramError::Raise("GTopo::IsToReverse2");
return Standard_False; // dummy
} }
//======================================================================= //=======================================================================

@ -244,7 +244,6 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
const TopLoc_Location& TFloc = TF->Location(); const TopLoc_Location& TFloc = TF->Location();
const Handle(Geom_Surface)& Su = TF->Surface(); const Handle(Geom_Surface)& Su = TF->Surface();
TopLoc_Location L = (Floc * TFloc).Predivided(myShape.Location()); TopLoc_Location L = (Floc * TFloc).Predivided(myShape.Location());
// Standard_Boolean checkclosed = Standard_False;
Standard_Boolean pcurvefound = Standard_False; Standard_Boolean pcurvefound = Standard_False;
itcr.Initialize(TE->Curves()); itcr.Initialize(TE->Curves());
@ -256,10 +255,7 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
Standard_Real f,l; Standard_Real f,l;
GC->Range(f,l); GC->Range(f,l);
if (SameRange && (f != First || l != Last)) { if (SameRange && (f != First || l != Last)) {
return ;//BRepCheck_InvalidSameRangeFlag); return ;//BRepCheck_InvalidSameRangeFlag;
if (SameParameter) {
return; //BRepCheck_InvalidSameParameterFlag);
}
} }
Handle(Geom_Surface) Sb = cr->Surface(); Handle(Geom_Surface) Sb = cr->Surface();
@ -270,20 +266,10 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
Adaptor3d_CurveOnSurface ACS(GHPC,GAHS); Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
ok = Validate(myHCurve->Curve(), ACS, Tol, SameParameter, aNewTol); ok = Validate(myHCurve->Curve(), ACS, Tol, SameParameter, aNewTol);
if (ok) { if (ok) {
if (cr->IsCurveOnClosedSurface()) { // printf("(Edge,1) Tolerance=%15.10lg\n", aNewTol);
//return ;// BRepCheck::Add(lst,BRepCheck_InvalidCurveOnClosedSurface);
}
else {
//return;//BRepCheck::Add(lst,BRepCheck_InvalidCurveOnSurface);
}
if (SameParameter) {
//return;//BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
}
// printf("(Edge,1) Tolerance=%15.10lg\n", aNewTol);
if (aNewTol<aMaxTol) if (aNewTol<aMaxTol)
TE->UpdateTolerance(aNewTol); TE->UpdateTolerance(aNewTol);
} }
if (cr->IsCurveOnClosedSurface()) { if (cr->IsCurveOnClosedSurface()) {
// checkclosed = Standard_True; // checkclosed = Standard_True;
GHPC->ChangeCurve2d().Load(cr->PCurve2(),f,l); // same bounds GHPC->ChangeCurve2d().Load(cr->PCurve2(),f,l); // same bounds
@ -291,11 +277,6 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
ACS.Load(GHPC); // meme remarque... ACS.Load(GHPC); // meme remarque...
ok = Validate(myHCurve->Curve(),ACS,Tol,SameParameter, aNewTol); ok = Validate(myHCurve->Curve(),ACS,Tol,SameParameter, aNewTol);
if (ok) { if (ok) {
//return;//BRepCheck::Add(lst,BRepCheck_InvalidCurveOnClosedSurface);
if (SameParameter) {
//return;//BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
}
// printf("(Edge,2) Tolerance=%15.10lg\n", aNewTol);
if (aNewTol<aMaxTol) if (aNewTol<aMaxTol)
TE->UpdateTolerance(aNewTol); TE->UpdateTolerance(aNewTol);
} }
@ -317,8 +298,8 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
if (P.IsNull()) { // not a plane if (P.IsNull()) { // not a plane
return;//BRepCheck::Add(lst,BRepCheck_NoCurveOnSurface); return;//BRepCheck::Add(lst,BRepCheck_NoCurveOnSurface);
} }
else
else {// on fait la projection a la volee, comme BRep_Tool { // on fait la projection a la volee, comme BRep_Tool
P = Handle(Geom_Plane)::DownCast(P->Transformed(L.Transformation())); P = Handle(Geom_Plane)::DownCast(P->Transformed(L.Transformation()));
//on projette Cref sur ce plan //on projette Cref sur ce plan
Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(P); Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(P);
@ -340,14 +321,12 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
ok = Validate(myHCurve->Curve(),ACS, ok = Validate(myHCurve->Curve(),ACS,
Tol,Standard_True, aNewTol); // voir dub... Tol,Standard_True, aNewTol); // voir dub...
if (ok) { if (ok)
//return;//BRepCheck::Add(lst,BRepCheck_InvalidCurveOnSurface); {
// printf("(Edge,3) Tolerance=%15.10lg\n", aNewTol);
if (aNewTol<aMaxTol) if (aNewTol<aMaxTol)
TE->UpdateTolerance(aNewTol); TE->UpdateTolerance(aNewTol);
} }
} }
}//end of if (!pcurvefound) { }//end of if (!pcurvefound) {
} // end of 2. Tolerances in InContext } // end of 2. Tolerances in InContext
@ -510,7 +489,6 @@ void CheckEdge (const TopoDS_Edge& Ed, const Standard_Real aMaxTol)
aD2=prep.SquareDistance(Controlp); aD2=prep.SquareDistance(Controlp);
if (aD2 > Tol) { if (aD2 > Tol) {
aNewTolerance=sqrt(aD2)+dd; aNewTolerance=sqrt(aD2)+dd;
// printf("(Vert,1) Tolerance=%15.10lg\n", aNewTolerance);
if (aNewTolerance<aMaxTol) if (aNewTolerance<aMaxTol)
TV->UpdateTolerance(aNewTolerance); TV->UpdateTolerance(aNewTolerance);
} }
@ -532,7 +510,6 @@ void CheckEdge (const TopoDS_Edge& Ed, const Standard_Real aMaxTol)
if (aD2 > Tol) { if (aD2 > Tol) {
aNewTolerance=sqrt(aD2)+dd; aNewTolerance=sqrt(aD2)+dd;
// printf("(Vert,2) Tolerance=%15.10lg\n", aNewTolerance);
if (aNewTolerance<aMaxTol) if (aNewTolerance<aMaxTol)
TV->UpdateTolerance(aNewTolerance); TV->UpdateTolerance(aNewTolerance);
} }

@ -137,7 +137,6 @@ Standard_Boolean TopOpeBRepDS::IsTopology(const TopOpeBRepDS_Kind k)
case TopOpeBRepDS_VERTEX : return Standard_True; break; case TopOpeBRepDS_VERTEX : return Standard_True; break;
default : return Standard_False; default : return Standard_False;
} }
return Standard_False;
} }
//======================================================================= //=======================================================================

@ -168,7 +168,7 @@ static Standard_Boolean GetOrigin(const Handle(Geom2d_Curve)& PCIN, gp_Pnt2d& o)
else { else {
return Standard_False; return Standard_False;
} }
return Standard_False; // return Standard_False;
} }
#endif #endif
@ -199,7 +199,6 @@ static Standard_Boolean GetOrigin(const Handle(Geom_Curve)& CIN, gp_Pnt& o)
else { else {
return Standard_False; return Standard_False;
} }
return Standard_False;
} }
#endif #endif

@ -100,7 +100,7 @@ Standard_Real TopOpeBRepDS_PointIterator::Parameter()const
Standard_ProgramError::Raise("TopOpeBRepDS_PointIterator::Parameter()"); Standard_ProgramError::Raise("TopOpeBRepDS_PointIterator::Parameter()");
return 0.; // windowsNT return 0.; // windowsNT
} }
return 0.; // windowsNT // return 0.; // windowsNT
} }
//======================================================================= //=======================================================================
@ -139,7 +139,7 @@ Standard_Boolean TopOpeBRepDS_PointIterator::DiffOriented() const
Standard_ProgramError::Raise("TopOpeBRepDS_PointIterator::DiffOriented()"); Standard_ProgramError::Raise("TopOpeBRepDS_PointIterator::DiffOriented()");
return Standard_False; // windowsNT return Standard_False; // windowsNT
} }
return Standard_False; // windowsNT // return Standard_False; // windowsNT
} }
//======================================================================= //=======================================================================
@ -158,7 +158,6 @@ Standard_Boolean TopOpeBRepDS_PointIterator::SameOriented() const
Standard_ProgramError::Raise("TopOpeBRepDS_PointIterator::SameOriented()"); Standard_ProgramError::Raise("TopOpeBRepDS_PointIterator::SameOriented()");
return Standard_False; // windowsNT return Standard_False; // windowsNT
} }
return Standard_False; // windowsNT
} }
//======================================================================= //=======================================================================

@ -182,7 +182,7 @@ static Standard_Integer FUN_mkT2dquad(const Standard_Real curvC1, const Standard
if (samec) return isON2ifss;//is ON if curves are on same side/tg line if (samec) return isON2ifss;//is ON if curves are on same side/tg line
if (curvC1 > curvC2) return isIN2ifss;//is IN if curves are on same side/tg line if (curvC1 > curvC2) return isIN2ifss;//is IN if curves are on same side/tg line
else return isOU2ifss;//is OU if curves are on same side/tg line else return isOU2ifss;//is OU if curves are on same side/tg line
return 0; // return 0;
} }
static Standard_Boolean FUN_getnearpar(const TopoDS_Edge& e,const Standard_Real par,const Standard_Real f,const Standard_Real l, static Standard_Boolean FUN_getnearpar(const TopoDS_Edge& e,const Standard_Real par,const Standard_Real f,const Standard_Real l,
@ -255,7 +255,6 @@ static Standard_Boolean FUN_getsta(const Standard_Integer mkt,const gp_Dir& tga1
sta = TopAbs_ON; sta = TopAbs_ON;
return Standard_True; return Standard_True;
} }
return Standard_False;
} }
static Standard_Boolean FUN_mkT2dquad(const TopoDS_Edge& e1,const Standard_Real par1,const Standard_Real f1,const Standard_Real l1, static Standard_Boolean FUN_mkT2dquad(const TopoDS_Edge& e1,const Standard_Real par1,const Standard_Real f1,const Standard_Real l1,
const TopoDS_Edge& e2,const Standard_Real par2, const TopoDS_Edge& e2,const Standard_Real par2,

@ -140,7 +140,6 @@ static IFSelect_ReturnStatus XSControl_xnorm(const Handle(IFSelect_SessionPilot)
IFSelect_Activator::SetCurrentAlias (WS->SelectedNorm(Standard_True)); IFSelect_Activator::SetCurrentAlias (WS->SelectedNorm(Standard_True));
return IFSelect_RetDone; return IFSelect_RetDone;
} }
return IFSelect_RetVoid;
} }