mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-25 17:00:35 +05:00
0021835: Report detected errors in GUI even if there were errors during the operation
This commit is contained in:
parent
b11b19f420
commit
0e308036af
@ -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>
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user