mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0029973: Modeling Algorithms - access violation within BRepAlgoAPI_Cut on empty input shape
Boolean Operations algorithm has been improved to handle the cases with empty shapes arguments correctly. Test cases for the issue.
This commit is contained in:
@@ -209,7 +209,8 @@ Standard_Boolean BRepTools_History::IsRemoved(
|
||||
//==============================================================================
|
||||
void BRepTools_History::Merge(const Handle(BRepTools_History)& theHistory23)
|
||||
{
|
||||
Merge(*theHistory23.get());
|
||||
if (!theHistory23.IsNull())
|
||||
Merge(*theHistory23.get());
|
||||
}
|
||||
//==============================================================================
|
||||
//function : Merge
|
||||
@@ -217,6 +218,12 @@ void BRepTools_History::Merge(const Handle(BRepTools_History)& theHistory23)
|
||||
//==============================================================================
|
||||
void BRepTools_History::Merge(const BRepTools_History& theHistory23)
|
||||
{
|
||||
if (!(theHistory23.HasModified() ||
|
||||
theHistory23.HasGenerated() ||
|
||||
theHistory23.HasRemoved()))
|
||||
// nothing to merge
|
||||
return;
|
||||
|
||||
// Propagate R23 directly and M23 and G23 fully to M12 and G12.
|
||||
// Remember the propagated shapes.
|
||||
TopTools_DataMapOfShapeListOfShape* aS1ToGAndM[] =
|
||||
|
@@ -105,7 +105,10 @@ public: //! @name Constructors for History creation
|
||||
TopTools_IndexedMapOfShape anArgsMap;
|
||||
TopTools_ListIteratorOfListOfShape aIt(theArguments);
|
||||
for (; aIt.More(); aIt.Next())
|
||||
TopExp::MapShapes(aIt.Value(), anArgsMap);
|
||||
{
|
||||
if (!aIt.Value().IsNull())
|
||||
TopExp::MapShapes(aIt.Value(), anArgsMap);
|
||||
}
|
||||
|
||||
// Copy the history for all supported shapes from the algorithm
|
||||
Standard_Integer i, aNb = anArgsMap.Extent();
|
||||
|
Reference in New Issue
Block a user