]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0021835: Report detected errors in GUI even if there were errors during the operation
authorskv <skv@opencascade.com>
Thu, 8 May 2014 07:51:17 +0000 (11:51 +0400)
committerskv <skv@opencascade.com>
Thu, 8 May 2014 07:51:17 +0000 (11:51 +0400)
src/GEOMGUI/GEOM_msg_en.ts
src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx
src/MeasureGUI/MeasureGUI_CheckSelfIntersectionsDlg.cxx

index a6858a9a2ff6d39294fc23c1a0ef3e7c83360653..30942dd61b4ff65a3a2710a37f34a56289589e02 100644 (file)
@@ -427,6 +427,10 @@ Please, select face, shell or solid and try again</translation>
         <source>GEOM_SELF_INTERSECTIONS_FOUND</source>
         <translation>Some self-intersections detected</translation>
     </message>
+    <message>
+        <source>GEOM_CHECK_SELF_INTERSECTIONS_ERRORS</source>
+        <translation>Warning: there were errors during the operation, so the list may be incomplete.</translation>
+    </message>
     <message>
         <source>GEOM_CIRCLE</source>
         <translation>Circle</translation>
index bc7111cb27d006521c9a71ee61b97dc727e89b92..31233a94f754480660e9eddc1512149abd45bfec 100644 (file)
@@ -41,7 +41,6 @@
 #include <BOPCol_ListOfShape.hxx>
 #include <BOPDS_DS.hxx>
 #include <BOPDS_MapOfPassKey.hxx>
-#include <BRep_Builder.hxx>
 #include <BRepBndLib.hxx>
 #include <BRepBuilderAPI_Copy.hxx>
 #include <BRepCheck_ListIteratorOfListOfStatus.hxx>
@@ -65,7 +64,6 @@
 #include <TopExp_Explorer.hxx>
 #include <TopoDS.hxx>
 #include <TopoDS_Edge.hxx>
-#include <TopoDS_Compound.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
 #include <TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
@@ -1543,8 +1541,6 @@ bool GEOMImpl_IMeasureOperations::CheckSelfIntersections
   if (aShape.IsNull()) return isGood;
 
   // 0. Prepare data
-  BRep_Builder aBB;
-  TopoDS_Compound aCS;
   TopoDS_Shape aScopy;
   //
   GEOMAlgo_AlgoTools::CopyShape(aShape, aScopy);
@@ -1553,9 +1549,6 @@ bool GEOMImpl_IMeasureOperations::CheckSelfIntersections
   TopTools_IndexedMapOfShape anIndices;
   TopExp::MapShapes(aScopy, anIndices);
 
-  aBB.MakeCompound(aCS);
-  aBB.Add(aCS, aScopy);
-
   BOPCol_ListOfShape aLCS;
   aLCS.Append(aScopy);
   //
@@ -1565,9 +1558,6 @@ bool GEOMImpl_IMeasureOperations::CheckSelfIntersections
   // 1. Launch the checker
   aCSI.Perform();
   Standard_Integer iErr = aCSI.ErrorStatus();
-  if (iErr) {
-    return false; // Error
-  }
 
   isGood = true;
   //
@@ -1596,7 +1586,10 @@ bool GEOMImpl_IMeasureOperations::CheckSelfIntersections
     isGood = false;
   }
 
-  SetErrorCode(OK);
+  if (!iErr) {
+    SetErrorCode(OK);
+  }
+
   return isGood;
 }
 
index db59531a63f8fd28487a51b9236b77edd0bf7405..8debf294c6edb78936deedd8a9a0d3ab70d56bb3 100644 (file)
@@ -144,7 +144,7 @@ void MeasureGUI_CheckSelfIntersectionsDlg::processObject()
     isFailed = true;
   }
 
-  if (!anOper->IsDone()) {
+  if (!anOper->IsDone() && myInters->length() == 0) {
     aMsg += tr(anOper->GetErrorCode());
     myGrp->TextView1->setText(aMsg);
     return;
@@ -162,6 +162,12 @@ void MeasureGUI_CheckSelfIntersectionsDlg::processObject()
   else {
     aMsg += tr("GEOM_SELF_INTERSECTIONS_FOUND");
   }
+
+  if (!anOper->IsDone()) {
+    aMsg += "\n\n";
+    aMsg += tr("GEOM_CHECK_SELF_INTERSECTIONS_ERRORS");
+  }
+
   myGrp->TextView1->setText(aMsg);
 
   // Pairs