0023326: [CEA 1934] Error when extracting a shape

This commit is contained in:
skv 2016-08-30 16:53:57 +03:00
parent b11dda6c23
commit b95d6c1ac8
2 changed files with 12 additions and 2 deletions

View File

@ -1015,6 +1015,10 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(LOGBOOK& log) const
aShape = anExtractor.GetResult(); aShape = anExtractor.GetResult();
if (aShape.IsNull()) {
Standard_ConstructionError::Raise("Result of extraction is empty");
}
// Get statistics. // Get statistics.
const TopTools_ListOfShape &aRemoved = anExtractor.GetRemoved(); const TopTools_ListOfShape &aRemoved = anExtractor.GetRemoved();
const TopTools_ListOfShape &aModified = anExtractor.GetModified(); const TopTools_ListOfShape &aModified = anExtractor.GetModified();

View File

@ -1298,12 +1298,18 @@ void OperationGUI_ExtractionDlg::eraseSubShape(const int theId)
void OperationGUI_ExtractionDlg::eraseAll() void OperationGUI_ExtractionDlg::eraseAll()
{ {
TColStd_MapIteratorOfMapOfInteger anIter(myMapDisplayedIDs); TColStd_MapIteratorOfMapOfInteger anIter(myMapDisplayedIDs);
TColStd_ListOfInteger aDisplayedIDs;
for (; anIter.More(); anIter.Next()) { for (; anIter.More(); anIter.Next()) {
eraseSubShape(anIter.Key()); aDisplayedIDs.Append(anIter.Key());
}
TColStd_ListIteratorOfListOfInteger aListIter(aDisplayedIDs);
for (; aListIter.More(); aListIter.Next()) {
eraseSubShape(aListIter.Value());
} }
myMapDisplayedIDs.Clear();
getDisplayer()->UpdateViewer(); getDisplayer()->UpdateViewer();
} }