From 693e5f65fe0f4868fe2e0f2923aef6a3afb20d67 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 22 Dec 2017 13:35:52 +0300 Subject: [PATCH] Fix compilation error and some warnings --- .../AdvancedEngine_IOperations.cxx | 3 +- .../AdvancedEngine_PipeTShapeDriver.cxx | 2 +- .../AdvancedEngine_SmoothingSurfaceDriver.cxx | 4 -- src/GEOMAlgo/GEOMAlgo_Extractor.cxx | 14 ++--- src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx | 3 +- src/GEOMAlgo/GEOMAlgo_GetInPlaceAPI.cxx | 2 +- src/GEOMAlgo/GEOMAlgo_GetInPlace_1.cxx | 4 +- src/GEOMAlgo/GEOMAlgo_Gluer.cxx | 4 +- src/GEOMAlgo/GEOMAlgo_Gluer2_3.cxx | 3 +- src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx | 6 +-- src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx | 2 +- src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx | 22 ++++---- src/GEOMGUI/GEOMGUI_DimensionProperty.cxx | 2 +- src/GEOMGUI/GeometryGUI.cxx | 2 +- src/GEOMImpl/GEOMImpl_FillingDriver.cxx | 4 +- src/GEOMImpl/GEOMImpl_IInsertOperations.cxx | 4 +- src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx | 17 +++--- src/GEOMImpl/GEOMImpl_IShapesOperations.cxx | 26 +++++----- src/GEOMImpl/GEOMImpl_OffsetDriver.cxx | 6 +-- src/GEOMImpl/GEOMImpl_PipeDriver.cxx | 52 +++++++++---------- src/GEOMImpl/GEOMImpl_SplineDriver.cxx | 10 ++-- src/GEOM_I/GEOM_IInsertOperations_i.cc | 2 +- src/GEOM_I/GEOM_IMeasureOperations_i.cc | 6 +-- src/GEOM_I/GEOM_IShapesOperations_i.cc | 7 ++- src/GEOM_I_Superv/GEOM_Superv_i.cc | 4 +- src/IGESPlugin/IGESPlugin_GUI.cxx | 2 +- src/OBJECT/GEOM_Actor.cxx | 17 +++--- src/OBJECT/GEOM_OCCReader.cxx | 15 +++--- src/STLPlugin/STLPlugin_GUI.cxx | 2 +- src/VTKPlugin/VTKPlugin_GUI.cxx | 26 +++++----- 30 files changed, 132 insertions(+), 141 deletions(-) diff --git a/src/AdvancedEngine/AdvancedEngine_IOperations.cxx b/src/AdvancedEngine/AdvancedEngine_IOperations.cxx index 190acd59f..4af7dd3b6 100644 --- a/src/AdvancedEngine/AdvancedEngine_IOperations.cxx +++ b/src/AdvancedEngine/AdvancedEngine_IOperations.cxx @@ -284,8 +284,6 @@ bool AdvancedEngine_IOperations::MakeGroups(Handle(GEOM_Object) theShape, int sh return false; } - gp_Trsf aTrsfInv = aTrsf.Inverted(); - // int expectedGroups = 0; // if (shapeType == TSHAPE_BASIC) // if (Abs(theR2+theW2-theR1-theW1) <= Precision::Approximation()) @@ -620,6 +618,7 @@ bool AdvancedEngine_IOperations::MakeGroups(Handle(GEOM_Object) theShape, int sh if (aGroup.IsNull()) continue; + gp_Trsf aTrsfInv = aTrsf.Inverted(); TopoDS_Shape aGroupShape = aGroup->GetValue(); BRepBuilderAPI_Transform aTransformationShapeInv (aGroupShape, aTrsfInv, Standard_False); TopoDS_Shape aGroupShapeTrsfInv = aTransformationShapeInv.Shape(); diff --git a/src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.cxx b/src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.cxx index 44f60ceae..4549680fb 100644 --- a/src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.cxx +++ b/src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.cxx @@ -312,7 +312,7 @@ TopoDS_Shape AdvancedEngine_PipeTShapeDriver::MakePipeTShape (const double r1, c gp_Pnt aP0 (0, 0, 0); gp_Pnt aP1 (-l1, 0, 0); - gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ(); + gp_Vec aVX = gp::DX(), aVZ = gp::DZ(); gp_Ax2 anAxes1 (aP1, aVX, aVZ); gp_Ax2 anAxes2 (aP0, aVZ, aVX); diff --git a/src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.cxx b/src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.cxx index e76ba756f..3ec2acaae 100644 --- a/src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.cxx +++ b/src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.cxx @@ -254,10 +254,6 @@ GetCreationInformation(std::string& theOperationName, for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i ) theParams[0] << aCI.GetPntOrComp( i ) << " "; - const Standard_Integer aNbMax = aCI.GetNbMax(); - const Standard_Integer aDegMax = aCI.GetDegMax(); - const Standard_Real aDMax = aCI.GetDMax(); - AddParam(theParams, "Max nbr of Bezier pieces", aCI.GetNbMax()); AddParam(theParams, "Max BSpline surface degree", aCI.GetDegMax()); AddParam(theParams, "3D tolerance of initial approximation", aCI.GetDMax()); diff --git a/src/GEOMAlgo/GEOMAlgo_Extractor.cxx b/src/GEOMAlgo/GEOMAlgo_Extractor.cxx index 1208e0a98..b9a3ec6e7 100644 --- a/src/GEOMAlgo/GEOMAlgo_Extractor.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Extractor.cxx @@ -546,15 +546,15 @@ void GEOMAlgo_Extractor::processFOrSo(const TopoDS_Shape &theFOrSo) TopTools_ListOfShape aClosedSubShapes; TopTools_ListOfShape aNewShapes; TopoDS_Shape anOuterSubShape; - TopAbs_ShapeEnum aShapeType; + //TopAbs_ShapeEnum aShapeType; TopAbs_ShapeEnum aSubShapeType; if (theFOrSo.ShapeType() == TopAbs_FACE) { - aShapeType = TopAbs_FACE; + //aShapeType = TopAbs_FACE; aSubShapeType = TopAbs_WIRE; anOuterSubShape = BRepTools::OuterWire(TopoDS::Face(theFOrSo)); } else { - aShapeType = TopAbs_SOLID; + //aShapeType = TopAbs_SOLID; aSubShapeType = TopAbs_SHELL; anOuterSubShape = BRepClass3d::OuterShell(TopoDS::Solid(theFOrSo)); } @@ -675,14 +675,14 @@ void GEOMAlgo_Extractor::processShOrCS(const TopoDS_Shape &theShOrCS) TopTools_ListOfShape aNewSubShapes; TopTools_ListOfShape aNewOtherShapes; TopAbs_ShapeEnum aSubShapeType; - TopAbs_ShapeEnum aSubSubShapeType; + //TopAbs_ShapeEnum aSubSubShapeType; if (theShOrCS.ShapeType() == TopAbs_SHELL) { aSubShapeType = TopAbs_FACE; - aSubSubShapeType = TopAbs_EDGE; + //aSubSubShapeType = TopAbs_EDGE; } else { // comp-solid aSubShapeType = TopAbs_SOLID; - aSubSubShapeType = TopAbs_FACE; + //aSubSubShapeType = TopAbs_FACE; } for (; anIter.More(); anIter.Next()) { @@ -1098,7 +1098,7 @@ void GEOMAlgo_Extractor::makeHistory(const TopoDS_Shape &theShape, getModified(theShape, aListModif, theShape.ShapeType()); Standard_Boolean isModif = !aListModif.IsEmpty(); - const TopAbs_ShapeEnum aType = theShape.ShapeType(); + //const TopAbs_ShapeEnum aType = theShape.ShapeType(); if (isModif) { // Add the new shapes. diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx index 9bce9fe11..1e7a3ec05 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx @@ -594,7 +594,7 @@ void GEOMAlgo_FinderShapeOn2::ProcessSolids() void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF, GEOMAlgo_ListOfPnt& aLP) { - Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNb, iCnt;//, aNbMax, *pIds; + Standard_Integer j, j1, j2, k, n[4], aNx, aNb, iCnt;//, aNbLinks, aNbMax, *pIds; TopLoc_Location aLoc; Handle(Poly_Triangulation) aTRF; TColStd_MapOfInteger aMBN; @@ -641,7 +641,6 @@ void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF, } // // boundary nodes aMBN - aNbLinks=aMPKI.Extent(); aIt.Initialize(aMPKI); for (; aIt.More(); aIt.Next()) { iCnt=aIt.Value(); diff --git a/src/GEOMAlgo/GEOMAlgo_GetInPlaceAPI.cxx b/src/GEOMAlgo/GEOMAlgo_GetInPlaceAPI.cxx index a24738cdb..bc796863b 100644 --- a/src/GEOMAlgo/GEOMAlgo_GetInPlaceAPI.cxx +++ b/src/GEOMAlgo/GEOMAlgo_GetInPlaceAPI.cxx @@ -321,7 +321,7 @@ Standard_Boolean GEOMAlgo_GetInPlaceAPI::GetInPlaceByHistory } // try to find in history - TDF_Label aHistoryLabel = theWhereFunction->GetHistoryEntry(Standard_False); + //TDF_Label aHistoryLabel = theWhereFunction->GetHistoryEntry(Standard_False); // search in history for all argument shapes Standard_Boolean isFound = Standard_False; diff --git a/src/GEOMAlgo/GEOMAlgo_GetInPlace_1.cxx b/src/GEOMAlgo/GEOMAlgo_GetInPlace_1.cxx index 7beb5d1a9..7dbcbbc02 100644 --- a/src/GEOMAlgo/GEOMAlgo_GetInPlace_1.cxx +++ b/src/GEOMAlgo/GEOMAlgo_GetInPlace_1.cxx @@ -92,7 +92,7 @@ Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1, { Standard_Boolean bOk; Standard_Integer iErr; - Standard_Real aTol2; + //Standard_Real aTol2; TopAbs_ShapeEnum aType1, aType2; TopAbs_State aState; gp_Pnt aP1, aP2; @@ -101,7 +101,7 @@ Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1, // iErr=0; bOk=Standard_False; - aTol2=myTolerance*myTolerance; + //aTol2=myTolerance*myTolerance; aType1=aS1.ShapeType(); aType2=aS2.ShapeType(); // diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.cxx b/src/GEOMAlgo/GEOMAlgo_Gluer.cxx index b012b3e35..b19cc9093 100644 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer.cxx @@ -908,9 +908,9 @@ void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE, Standard_Real aTol; BRep_Builder aBB; TopoDS_Edge E; - TopAbs_Orientation anOrE; + //TopAbs_Orientation anOrE; // - anOrE=aE.Orientation(); + //anOrE=aE.Orientation(); aTol=BRep_Tool::Tolerance(aE); // E=aEx; diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer2_3.cxx b/src/GEOMAlgo/GEOMAlgo_Gluer2_3.cxx index 180786cfd..af0776b9b 100644 --- a/src/GEOMAlgo/GEOMAlgo_Gluer2_3.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer2_3.cxx @@ -65,7 +65,7 @@ static void GEOMAlgo_Gluer2::Detect() { Standard_Boolean bCheckGeometry; - Standard_Integer iErr, aNbSD; + Standard_Integer iErr; TopTools_ListIteratorOfListOfShape aItLS; TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS; //GEOMAlgo_GlueDetector aDetector; @@ -106,7 +106,6 @@ void GEOMAlgo_Gluer2::Detect() for (; aItDMSLS.More(); aItDMSLS.Next()) { const TopoDS_Shape& aSkey=aItDMSLS.Key(); const TopTools_ListOfShape& aLSD=aItDMSLS.Value(); - aNbSD=aLSD.Extent(); myImagesDetected.Bind(aSkey, aLSD); } // diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx index fe68b1ffe..58d1c3971 100755 --- a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx @@ -559,7 +559,7 @@ void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF, const gp_Cylinder& aCyl) { - Standard_Integer i, aNbV, aNbE, aNbCE, aNbSE; + Standard_Integer aNbV, aNbE, aNbCE, aNbSE; Standard_Real aT0, aT1, aHeight; gp_Pnt aPC[3], aPc; TopoDS_Edge aE; @@ -578,7 +578,6 @@ void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF, const gp_Dir& aDir=aAx1.Direction(); const gp_Pnt& aPLoc=aAx1.Location(); // - i=0; aNbCE=0; aNbSE=0; aExp.Init(aF, TopAbs_EDGE); @@ -795,7 +794,7 @@ Standard_Boolean GEOMAlgo_ShapeInfoFiller::TreatStepSphere { Standard_Boolean bRet, bIsAllowedType, bOnlyClosed, bIsEqual; Standard_Integer j; - Standard_Real aTolAng, aTol; + Standard_Real aTol; Standard_Real aVolume, aVolumeS, dV, aArea, aAreaS, dA; gp_Sphere aSphere[2]; GeomAbs_SurfaceType aST; @@ -805,7 +804,6 @@ Standard_Boolean GEOMAlgo_ShapeInfoFiller::TreatStepSphere // bRet=Standard_False; aTol=Precision::Confusion(); - aTolAng=Precision::Angular(); // aExp.Init(aSd, TopAbs_FACE); for (j=0; aExp.More(); aExp.Next(), ++j) { diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx index de773a6ee..213975d92 100644 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx +++ b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx @@ -163,7 +163,7 @@ Standard_Boolean GEOMAlgo_SurfaceTools::IsCoaxial if (fabs(aRadius1 - aRadius2) <= aTol) { // Check the deflection of the middle point. - gp_XYZ aMidP = 0.5*(aDP1 + aDP2); + //gp_XYZ aMidP = 0.5*(aDP1 + aDP2); //Standard_Real aMidRadius1 = aMidP.Modulus(); if (fabs(aRadius1 - aRadius2) <= aTol) { diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx b/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx index 02a28c8e5..c6647f8f3 100644 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx @@ -119,7 +119,7 @@ void GEOMAlgo_VertexSolid::Perform() //======================================================================= void GEOMAlgo_VertexSolid::BuildResult() { - Standard_Integer i, iBeg, iEnd, aNbVV, aNbVE, aNbVF, j, iFound, aNbRanges; + Standard_Integer i, iBeg, iEnd, aNbVV, aNbVE, aNbVF, j, iFound;//, aNbRanges; Standard_Real aTol; TopAbs_State aSt; TopAbs_ShapeEnum aType; @@ -145,7 +145,7 @@ void GEOMAlgo_VertexSolid::BuildResult() Handle(IntTools_Context) aCtx=myDSFiller->Context(); BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSolid); // - aNbRanges=aDS.NbRanges(); + //aNbRanges=aDS.NbRanges(); const BOPDS_IndexRange& aRange=aDS.Range(myRank); aRange.Indices(iBeg, iEnd); // @@ -165,9 +165,9 @@ void GEOMAlgo_VertexSolid::BuildResult() for (j=0; j( getApp()->activeStudy() ) ) + if( /*SalomeApp_Study* aStudy = */dynamic_cast( getApp()->activeStudy() ) ) { updateFieldColorScale(); } diff --git a/src/GEOMImpl/GEOMImpl_FillingDriver.cxx b/src/GEOMImpl/GEOMImpl_FillingDriver.cxx index bd1109aea..0f581fe96 100644 --- a/src/GEOMImpl/GEOMImpl_FillingDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_FillingDriver.cxx @@ -317,7 +317,7 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(Handle(TFunction_Logbook)& log) Handle(TColStd_HSequenceOfTransient) aConstraints = IF.GetShapes(); - for ( unsigned int ind = 1; ind <= aConstraints->Length(); ind++ ) { + for ( int ind = 1; ind <= aConstraints->Length(); ind++ ) { TopoDS_Edge E; TopoDS_Face F; Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast( aConstraints->Value(ind) ); @@ -396,7 +396,7 @@ GetCreationInformation(std::string& theOperationName, } case FILLING_ON_CONSTRAINTS: { - theOperationName = "FACE"; + theOperationName = "FACE"; AddParam( theParams, "Edges/Faces", aCI.GetShapes() ); break; } diff --git a/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx b/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx index 578ce9e52..39d713281 100644 --- a/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx @@ -281,8 +281,8 @@ int GEOMImpl_IInsertOperations::LoadTexture(const TCollection_AsciiString& theTe std::list::const_iterator it; for (it = lines.begin(); it != lines.end(); ++it) { std::string line = *it; - int lenline = (line.size()/8 + (line.size()%8 ? 1 : 0)) * 8; - for (int i = 0; i < lenline/8; i++) { + size_t lenline = (line.size()/8 + (line.size()%8 ? 1 : 0)) * 8; + for (size_t i = 0; i < lenline/8; i++) { unsigned char byte = 0; for (int j = 0; j < 8; j++) byte = (byte << 1) + ( i*8+j < line.size() && line[i*8+j] != '0' ? 1 : 0 ); diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx index b9598338e..d6f255812 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -736,6 +736,7 @@ GEOMImpl_IMeasureOperations::ShapeKind GEOMImpl_IMeasureOperations::KindOfShape theDoubles->Append(aP.Z()); } break; + default:; } SetErrorCode(OK); @@ -1600,7 +1601,7 @@ bool GEOMImpl_IMeasureOperations::CheckSelfIntersections //============================================================================= bool GEOMImpl_IMeasureOperations::CheckSelfIntersectionsFast (Handle(GEOM_Object) theShape, - float theDeflection, double theTolerance, + float theDeflection, double theTolerance, Handle(TColStd_HSequenceOfInteger)& theIntersections) { SetErrorCode(KO); @@ -1881,7 +1882,7 @@ TCollection_AsciiString GEOMImpl_IMeasureOperations::WhatIs (Handle(GEOM_Object) aListOfShape.Append(s); nbTypes[s.ShapeType()]++; if ((sp.ShapeType() == TopAbs_COMPOUND) || (sp.ShapeType() == TopAbs_COMPSOLID)) { - nbFlatType[s.ShapeType()]++; + nbFlatType[s.ShapeType()]++; } } } @@ -1900,17 +1901,17 @@ TCollection_AsciiString GEOMImpl_IMeasureOperations::WhatIs (Handle(GEOM_Object) if ((aShape.ShapeType() == TopAbs_COMPOUND) || (aShape.ShapeType() == TopAbs_COMPSOLID)){ Astr = Astr + " --------------------- \n Flat content : \n"; if (nbFlatType[TopAbs_VERTEX] > 0) - Astr = Astr + " VERTEX : " + TCollection_AsciiString(nbFlatType[TopAbs_VERTEX]) + "\n"; + Astr = Astr + " VERTEX : " + TCollection_AsciiString(nbFlatType[TopAbs_VERTEX]) + "\n"; if (nbFlatType[TopAbs_EDGE] > 0) - Astr = Astr + " EDGE : " + TCollection_AsciiString(nbFlatType[TopAbs_EDGE]) + "\n"; + Astr = Astr + " EDGE : " + TCollection_AsciiString(nbFlatType[TopAbs_EDGE]) + "\n"; if (nbFlatType[TopAbs_WIRE] > 0) - Astr = Astr + " WIRE : " + TCollection_AsciiString(nbFlatType[TopAbs_WIRE]) + "\n"; + Astr = Astr + " WIRE : " + TCollection_AsciiString(nbFlatType[TopAbs_WIRE]) + "\n"; if (nbFlatType[TopAbs_FACE] > 0) - Astr = Astr + " FACE : " + TCollection_AsciiString(nbFlatType[TopAbs_FACE]) + "\n"; + Astr = Astr + " FACE : " + TCollection_AsciiString(nbFlatType[TopAbs_FACE]) + "\n"; if (nbFlatType[TopAbs_SHELL] > 0) - Astr = Astr + " SHELL : " + TCollection_AsciiString(nbFlatType[TopAbs_SHELL]) + "\n"; + Astr = Astr + " SHELL : " + TCollection_AsciiString(nbFlatType[TopAbs_SHELL]) + "\n"; if (nbFlatType[TopAbs_SOLID] > 0) - Astr = Astr + " SOLID : " + TCollection_AsciiString(nbFlatType[TopAbs_SOLID]) + "\n"; + Astr = Astr + " SOLID : " + TCollection_AsciiString(nbFlatType[TopAbs_SOLID]) + "\n"; } } catch (Standard_Failure& aFail) { diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx index 17f3191dd..48ac61f45 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx @@ -123,9 +123,9 @@ namespace { else { TopoDS_Iterator It(S, Standard_True, Standard_True); for (; It.More(); It.Next()) { - TopoDS_Shape SS = It.Value(); - if (M.Add(SS)) - AddFlatSubShapes(SS, L, M); + TopoDS_Shape SS = It.Value(); + if (M.Add(SS)) + AddFlatSubShapes(SS, L, M); } } } @@ -1451,11 +1451,10 @@ GEOMImpl_IShapesOperations::GetExistingSubObjects(Handle(GEOM_Object) theShap bool isGroup = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() == GEOM_GROUP; bool isSubShape = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() != GEOM_GROUP; bool isField = anObj->IsKind(STANDARD_TYPE(GEOM_Field)); - if (theTypes & Groups && isGroup || - theTypes & SubShapes && isSubShape || - theTypes & Fields && isField) { + if ((theTypes & Groups && isGroup ) || + (theTypes & SubShapes && isSubShape ) || + (theTypes & Fields && isField )) aSeq->Append(anObj); - } } delete [] anEntryStr; } @@ -1501,11 +1500,11 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeExplode for (; It.More(); It.Next()) { TopoDS_Shape SS = It.Value(); if (mapShape.Add(SS)) { - if (theShapeType == TopAbs_FLAT) { + if (theShapeType == TopAbs_FLAT) { AddFlatSubShapes(SS, listShape, mapShape); - } + } else if (theShapeType == TopAbs_SHAPE || theShapeType == SS.ShapeType()) { - listShape.Append(SS); + listShape.Append(SS); } // VSR: for EXPLODE_NEW_INCLUDE_MAIN and EXPLODE_OLD_INCLUDE_MAIN: // it seems it is necessary to add top-level shape if theShapeType == TopAbs_COMPOUND @@ -1627,9 +1626,9 @@ Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::SubShapeAllIDs for (; It.More(); It.Next()) { TopoDS_Shape SS = It.Value(); if (mapShape.Add(SS)) { - if (theShapeType == TopAbs_FLAT) { + if (theShapeType == TopAbs_FLAT) { AddFlatSubShapes(SS, listShape, mapShape); - } + } else if (theShapeType == TopAbs_SHAPE || theShapeType == SS.ShapeType()) { listShape.Append(SS); } @@ -2436,7 +2435,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetSharedShapes for (; itSel.More(); itSel.Next()) { const TopoDS_Shape& aSS = itSel.Value(); if (mapShape.Add(aSS) ) - aShared.Append(aSS); + aShared.Append(aSS); } } } @@ -4464,7 +4463,6 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object) if (aShapeResult.IsNull() == Standard_False) { TopoDS_Iterator anIt(aShapeResult); - Standard_Boolean isFirst = Standard_True; for (; anIt.More(); anIt.Next()) { const TopoDS_Shape &aPart = anIt.Value(); diff --git a/src/GEOMImpl/GEOMImpl_OffsetDriver.cxx b/src/GEOMImpl/GEOMImpl_OffsetDriver.cxx index cb80023a6..e33d5a283 100644 --- a/src/GEOMImpl/GEOMImpl_OffsetDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_OffsetDriver.cxx @@ -175,9 +175,9 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(Handle(TFunction_Logbook)& log) } // Create a hollowed solid. - BRepOffsetAPI_MakeThickSolid aMkSolid - (aShapeBase, aFacesToRm, anOffset, aTol, BRepOffset_Skin, - Standard_False, Standard_False, GeomAbs_Intersection); + BRepOffsetAPI_MakeThickSolid aMkSolid; + aMkSolid.MakeThickSolidByJoin (aShapeBase, aFacesToRm, anOffset, aTol, BRepOffset_Skin, + Standard_False, Standard_False, GeomAbs_Intersection); if (aMkSolid.IsDone()) { aShape = aMkSolid.Shape(); diff --git a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx index 269c7b008..5bb530e39 100644 --- a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx @@ -119,12 +119,12 @@ static void StoreGroups(GEOMImpl_IPipe *theCI, // after OCCT improvement static bool DoGroups1(const TopoDS_Shape &theProfile, - BRepOffsetAPI_MakePipeShell &theSweep, - TopTools_SequenceOfShape *theGroups); + BRepOffsetAPI_MakePipeShell &theSweep, + TopTools_SequenceOfShape *theGroups); static bool CreateGroups1(const TopoDS_Shape &theProfile, - BRepOffsetAPI_MakePipeShell &theSweep, - GEOMImpl_IPipe *theCI); + BRepOffsetAPI_MakePipeShell &theSweep, + GEOMImpl_IPipe *theCI); //======================================================================= //function : GetID @@ -1071,7 +1071,7 @@ TopoDS_Shape GEOMImpl_PipeDriver::CreatePipeWithDifferentSections // Make groups. TopTools_SequenceOfShape aGroups[5]; - TopoDS_Shape aProfile = aTmpSeqBases.Value(1); + TopoDS_Shape aProfile = aTmpSeqBases.Value(1); if (!DoGroups1(aProfile, aBuilder, aGroups)) { Standard_ConstructionError::Raise("Generate groups failure"); } @@ -1134,7 +1134,7 @@ TopoDS_Shape GEOMImpl_PipeDriver::CreatePipeWithDifferentSections // Make groups. TopTools_SequenceOfShape aGroups[5]; - TopoDS_Shape aProfile = aTmpSeqBases.Value(1); + TopoDS_Shape aProfile = aTmpSeqBases.Value(1); if (!DoGroups1(aProfile, aBuilder, aGroups)) { Standard_ConstructionError::Raise("Generate groups failure"); } @@ -1282,13 +1282,13 @@ TopoDS_Shape GEOMImpl_PipeDriver::CreatePipeWithDifferentSections // Make groups. TopTools_SequenceOfShape aSeqGroups[5]; - TopoDS_Shape aProfile = usedBases.Value(1); + TopoDS_Shape aProfile = usedBases.Value(1); if (!DoGroups1(aProfile, aBuilder, aSeqGroups)) { Standard_ConstructionError::Raise("Generate groups failure"); } // Fill the groups. - Handle(TColStd_HArray1OfInteger) aGroupIds[5]; + //Handle(TColStd_HArray1OfInteger) aGroupIds[5]; TopTools_IndexedMapOfShape anIndices; const TopoDS_Shape aResult = aBuilder.Shape(); @@ -2748,8 +2748,8 @@ static bool CreateDownUpGroups(BRepPrimAPI_MakeSweep *theSweep, //purpose : auxiliary for CreateGroups1() //======================================================================= bool DoGroups1 (const TopoDS_Shape &theProfile, - BRepOffsetAPI_MakePipeShell &theSweep, - TopTools_SequenceOfShape *theGroups) + BRepOffsetAPI_MakePipeShell &theSweep, + TopTools_SequenceOfShape *theGroups) { Standard_Boolean isDoSides = Standard_False; @@ -2792,11 +2792,11 @@ bool DoGroups1 (const TopoDS_Shape &theProfile, } } else if (aSideShape.ShapeType() == TopAbs_WIRE) { if (aMapFence.Add(aSideShape)) { - TopExp_Explorer anExpWE (aSideShape, TopAbs_EDGE); - for (; anExpWE.More(); anExpWE.Next()) { - theGroups[anIdSide].Append(anExpWE.Current()); - } - } + TopExp_Explorer anExpWE (aSideShape, TopAbs_EDGE); + for (; anExpWE.More(); anExpWE.Next()) { + theGroups[anIdSide].Append(anExpWE.Current()); + } + } } else { // Only edges can be in Side1 and Side2 groups. return false; @@ -2837,10 +2837,10 @@ bool DoGroups1 (const TopoDS_Shape &theProfile, } } else if (anOtherShape.ShapeType() == TopAbs_SHELL) { if (aMapFence.Add(anOtherShape)) { - TopExp_Explorer anExpSHF (anOtherShape, TopAbs_FACE); - for (; anExpSHF.More(); anExpSHF.Next()) { - theGroups[GROUP_OTHER].Append(anExpSHF.Current()); - } + TopExp_Explorer anExpSHF (anOtherShape, TopAbs_FACE); + for (; anExpSHF.More(); anExpSHF.Next()) { + theGroups[GROUP_OTHER].Append(anExpSHF.Current()); + } } } else { // Only faces can be in Other group. @@ -2859,8 +2859,8 @@ bool DoGroups1 (const TopoDS_Shape &theProfile, //purpose : auxiliary for Execute() //======================================================================= bool CreateGroups1 (const TopoDS_Shape &theProfile, - BRepOffsetAPI_MakePipeShell &theSweep, - GEOMImpl_IPipe *theCI) + BRepOffsetAPI_MakePipeShell &theSweep, + GEOMImpl_IPipe *theCI) { if (!theCI->GetGenerateGroups()) { // Nothing to do. @@ -2896,8 +2896,8 @@ bool CreateGroups1 (const TopoDS_Shape &theProfile, //purpose : auxiliary for CreateGroups() //======================================================================= static bool DoGroups2(const TopoDS_Shape &theProfile, - const TopoDS_Shape &thePath, - BRepOffsetAPI_MakePipe &theSweep, + const TopoDS_Shape &thePath, + BRepOffsetAPI_MakePipe &theSweep, TopTools_SequenceOfShape *theGroups) { Standard_Boolean isDoSides = Standard_False; @@ -2984,9 +2984,9 @@ static bool DoGroups2(const TopoDS_Shape &theProfile, //purpose : auxiliary for Execute() //======================================================================= static bool CreateGroups2(const TopoDS_Shape &theProfile, - const TopoDS_Shape &thePath, - BRepOffsetAPI_MakePipe &theSweep, - GEOMImpl_IPipe *theCI) + const TopoDS_Shape &thePath, + BRepOffsetAPI_MakePipe &theSweep, + GEOMImpl_IPipe *theCI) { if (!theCI->GetGenerateGroups()) { // Nothing to do. diff --git a/src/GEOMImpl/GEOMImpl_SplineDriver.cxx b/src/GEOMImpl/GEOMImpl_SplineDriver.cxx index ccc9a793f..76b58c8aa 100644 --- a/src/GEOMImpl/GEOMImpl_SplineDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_SplineDriver.cxx @@ -374,11 +374,11 @@ GetCreationInformation(std::string& theOperationName, { Handle(TColStd_HArray1OfReal) coords = aCI.GetCoordinates(); GEOM_Param& pntParam = AddParam( theParams, "Points"); - pntParam << ( coords->Length() ) / 3 << " points: "; - for ( int i = coords->Lower(), nb = coords->Upper(); i <= nb; ) - pntParam << "( " << coords->Value( i++ ) - << ", " << coords->Value( i++ ) - << ", " << coords->Value( i++ ) << " ) "; + pntParam << ( coords->Length() / 3 ) << " points: "; + for ( int i = coords->Lower(), nb = coords->Upper(); i <= nb; i += 3 ) + pntParam << "( " << coords->Value( i+0 ) + << ", " << coords->Value( i+1 ) + << ", " << coords->Value( i+2 ) << " ) "; } else { diff --git a/src/GEOM_I/GEOM_IInsertOperations_i.cc b/src/GEOM_I/GEOM_IInsertOperations_i.cc index 87a697c9b..b521f2f1d 100644 --- a/src/GEOM_I/GEOM_IInsertOperations_i.cc +++ b/src/GEOM_I/GEOM_IInsertOperations_i.cc @@ -210,7 +210,7 @@ CORBA::Long GEOM_IInsertOperations_i::AddTexture(CORBA::Long theWidth, CORBA::Lo if ( theTexture.length() > 0 ) { aTexture = new TColStd_HArray1OfByte (1, theTexture.length()); - for ( int i = 0; i < theTexture.length(); i++ ) + for ( CORBA::ULong i = 0; i < theTexture.length(); i++ ) aTexture->SetValue( i+1, (Standard_Byte)theTexture[i] ); } return GetOperations()->AddTexture( theWidth, theHeight, aTexture ); diff --git a/src/GEOM_I/GEOM_IMeasureOperations_i.cc b/src/GEOM_I/GEOM_IMeasureOperations_i.cc index 591861013..ad7fe1b03 100644 --- a/src/GEOM_I/GEOM_IMeasureOperations_i.cc +++ b/src/GEOM_I/GEOM_IMeasureOperations_i.cc @@ -936,7 +936,7 @@ GEOM::ListOfBool* GEOM_IMeasureOperations_i::AreCoordsInside (GEOM::GEOM_Object_ //Set a not done flag GetOperations()->SetNotDone(); - unsigned int nb_points = theCoords.length()/3; + int nb_points = theCoords.length()/3; GEOM::ListOfBool_var aResults = new GEOM::ListOfBool; aResults->length(nb_points); @@ -947,8 +947,8 @@ GEOM::ListOfBool* GEOM_IMeasureOperations_i::AreCoordsInside (GEOM::GEOM_Object_ for (int i = 0; i < 3*nb_points; i++) tmp[i] = theCoords[i]; std::vector res = GetOperations()->AreCoordsInside(aShape, tmp, tolerance); - for (int i = 0; i < nb_points; i++) - aResults[i] = i < res.size() ? res[i] : false; + for (int i = 0, resSize = res.size(); i < nb_points; i++) + aResults[i] = i < resSize ? res[i] : false; return aResults._retn(); } diff --git a/src/GEOM_I/GEOM_IShapesOperations_i.cc b/src/GEOM_I/GEOM_IShapesOperations_i.cc index 0f18c5bb0..e7a0b404d 100644 --- a/src/GEOM_I/GEOM_IShapesOperations_i.cc +++ b/src/GEOM_I/GEOM_IShapesOperations_i.cc @@ -323,7 +323,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFaceWithConstraints //Get the shapes std::list aConstraints; - for( int ind = 0; ind < theConstraints.length(); ind++ ) { + for( CORBA::ULong ind = 0; ind < theConstraints.length(); ind++ ) { Handle(::GEOM_Object) anObject = GetObjectImpl( theConstraints[ind] ); aConstraints.push_back(anObject); } @@ -906,7 +906,6 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::MakeSubShapes (GEOM::GEOM_Object_ptr t const GEOM::ListOfLong& theIndices) { GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO; - Standard_Integer i; //Set a not done flag GetOperations()->SetNotDone(); @@ -918,7 +917,7 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::MakeSubShapes (GEOM::GEOM_Object_ptr t if (aShape.IsNull()) return aSeq._retn(); Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger (1, theIndices.length()); - for (i = 0; i < theIndices.length(); i++) + for (CORBA::ULong i = 0; i < theIndices.length(); i++) anArray->SetValue(i+1, theIndices[i]); Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakeSubShapes(aShape, anArray); @@ -927,7 +926,7 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::MakeSubShapes (GEOM::GEOM_Object_ptr t Standard_Integer aLength = aHSeq->Length(); aSeq->length(aLength); - for (i = 0; i < aLength; i++) + for (int i = 0; i < aLength; i++) aSeq[i] = GetObject(Handle(::GEOM_Object)::DownCast(aHSeq->Value(i+1))); return aSeq._retn(); diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc index 1ba007067..426aebb56 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.cc +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -2064,7 +2064,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObjec beginService( " GEOM_Superv_i::OffsetShape" ); MESSAGE("GEOM_Superv_i::OffsetShape"); getTransfOp(); - GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset); + GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset, true); endService( " GEOM_Superv_i::OffsetShape" ); return anObj; } @@ -2078,7 +2078,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theO beginService( " GEOM_Superv_i::OffsetShapeCopy" ); MESSAGE("GEOM_Superv_i::OffsetShapeCopy"); getTransfOp(); - GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset); + GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset, true); endService( " GEOM_Superv_i::OffsetShapeCopy" ); return anObj; } diff --git a/src/IGESPlugin/IGESPlugin_GUI.cxx b/src/IGESPlugin/IGESPlugin_GUI.cxx index 1e9f9ac63..956303a92 100644 --- a/src/IGESPlugin/IGESPlugin_GUI.cxx +++ b/src/IGESPlugin/IGESPlugin_GUI.cxx @@ -96,7 +96,7 @@ bool IGESPlugin_GUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* pare getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) ); } - return true; + return true; // ????????????? } //======================================================================= diff --git a/src/OBJECT/GEOM_Actor.cxx b/src/OBJECT/GEOM_Actor.cxx index 3104e5007..422f2b740 100644 --- a/src/OBJECT/GEOM_Actor.cxx +++ b/src/OBJECT/GEOM_Actor.cxx @@ -111,20 +111,21 @@ GEOM_Actor::GEOM_Actor(): myShadingFaceSource(GEOM_ShadingFace::New(),true), myHighlightActor(GEOM_DeviceActor::New(),true), - myAppendFilter(vtkAppendPolyData::New(),true), - // Use mapper as an instance of GEOM_PainterPolyDataMapper class - // to prevent drawing of mappers' content (due to an empty definition - // of GEOM_PainterPolyDataMapper::RenderPiece(...)). - // !!! Presentation of GEOM_Actor is drawing only with help of actors - // defined in this class !!! - myPolyDataMapper(GEOM_PainterPolyDataMapper::New(),true), myTextActor( vtkTextActor::New() ), myHighlightProp(vtkProperty::New()), myPreHighlightProp(vtkProperty::New()), myShadingFaceProp(vtkProperty::New()), - myShadingBackFaceProp(vtkProperty::New()) + myShadingBackFaceProp(vtkProperty::New()), + + myAppendFilter(vtkAppendPolyData::New(),true), + // Use mapper as an instance of GEOM_PainterPolyDataMapper class + // to prevent drawing of mappers' content (due to an empty definition + // of GEOM_PainterPolyDataMapper::RenderPiece(...)). + // !!! Presentation of GEOM_Actor is drawing only with help of actors + // defined in this class !!! + myPolyDataMapper(GEOM_PainterPolyDataMapper::New(),true) { #ifdef MYDEBUG MESSAGE (this<< " GEOM_Actor::GEOM_Actor"); diff --git a/src/OBJECT/GEOM_OCCReader.cxx b/src/OBJECT/GEOM_OCCReader.cxx index a52746c3a..8611d3e96 100644 --- a/src/OBJECT/GEOM_OCCReader.cxx +++ b/src/OBJECT/GEOM_OCCReader.cxx @@ -484,6 +484,7 @@ void GEOM_OCCReader::DrawIso(GeomAbs_IsoType T, case GeomAbs_Hyperbola : case GeomAbs_BezierCurve : case GeomAbs_BSplineCurve : + case GeomAbs_OffsetCurve: case GeomAbs_OtherCurve : for (j = 1; j <= myDiscret/2; j++) { @@ -558,9 +559,8 @@ void GEOM_OCCReader::PlotIso (BRepAdaptor_Surface& S, void GEOM_OCCReader::TransferEdgeWData(const TopoDS_Edge& aEdge, vtkPoints* Pts, - vtkCellArray* Cells) { - - + vtkCellArray* Cells) +{ Handle(Poly_PolygonOnTriangulation) aEdgePoly; Standard_Integer i = 1; Handle(Poly_Triangulation) T; @@ -786,11 +786,12 @@ void GEOM_OCCReader::TransferEdgeWData(const TopoDS_Edge& aEdge, //======================================================================= void GEOM_OCCReader::TransferVertexWData(const TopoDS_Vertex& aVertex, - vtkPoints* Pts, - vtkCellArray* Cells) { -#define ZERO_COORD coord[0] = 0.0; coord[1] = 0.0; coord[2] = 0.0 + vtkPoints* Pts, + vtkCellArray* Cells) +{ +#define ZERO_COORD coord[0] = coord[1] = coord[2] = 0.0 - gp_Pnt P = BRep_Tool::Pnt( aVertex ); + // gp_Pnt P = BRep_Tool::Pnt( aVertex ); ?????????????????????????? float delta = 1, coord[3]; vtkIdType pts[2]; // insert pt diff --git a/src/STLPlugin/STLPlugin_GUI.cxx b/src/STLPlugin/STLPlugin_GUI.cxx index 7d0ced2eb..cbe86160a 100644 --- a/src/STLPlugin/STLPlugin_GUI.cxx +++ b/src/STLPlugin/STLPlugin_GUI.cxx @@ -96,7 +96,7 @@ bool STLPlugin_GUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* paren getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) ); } - return true; + return true; // ????????? } //======================================================================= diff --git a/src/VTKPlugin/VTKPlugin_GUI.cxx b/src/VTKPlugin/VTKPlugin_GUI.cxx index e8124fa20..332f62c0a 100644 --- a/src/VTKPlugin/VTKPlugin_GUI.cxx +++ b/src/VTKPlugin/VTKPlugin_GUI.cxx @@ -89,7 +89,7 @@ bool VTKPlugin_GUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* paren getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) ); } - return true; + return true; // ??????????? } //======================================================================= @@ -125,10 +125,10 @@ bool VTKPlugin_GUI::exportVTK( SUIT_Desktop* parent ) double deflection = 0.; QString fileName = VTKPlugin_ExportDlg::getFileName( io, - tr( "VTK_FILES" ), - tr( "EXPORT_TITLE" ), - parent, - deflection ); + tr( "VTK_FILES" ), + tr( "EXPORT_TITLE" ), + parent, + deflection ); if ( fileName.isEmpty() ) return false; @@ -146,15 +146,15 @@ bool VTKPlugin_GUI::exportVTK( SUIT_Desktop* parent ) if ( vtkOp->IsDone() ) { - transaction.commit(); + transaction.commit(); } else { - transaction.abort(); - SUIT_MessageBox::critical( parent, - tr( "GEOM_ERROR" ), - tr( "GEOM_PRP_ABORT" ) + "\n" + tr( vtkOp->GetErrorCode() ) ); - return false; + transaction.abort(); + SUIT_MessageBox::critical( parent, + tr( "GEOM_ERROR" ), + tr( "GEOM_PRP_ABORT" ) + "\n" + tr( vtkOp->GetErrorCode() ) ); + return false; } } catch ( const SALOME::SALOME_Exception& e ) @@ -168,8 +168,8 @@ bool VTKPlugin_GUI::exportVTK( SUIT_Desktop* parent ) if ( !ok ) { SUIT_MessageBox::warning( parent, - tr( "WRN_WARNING" ), - tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) ); + tr( "WRN_WARNING" ), + tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) ); } return ok; }