mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-25 00:57:38 +08:00
0033446: Modeling Alghorithms - Creating offset with one of the degenerated edge leads to crash
Added condition to prevent out of range error
This commit is contained in:
@@ -1292,6 +1292,10 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S)
|
||||
for (; itl.More(); itl.Next())
|
||||
{
|
||||
Standard_Integer IndOfFace = itl.Value();
|
||||
if (AllFaces.Size() < IndOfFace)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
myGenerated.Append(AllFaces(IndOfFace));
|
||||
}
|
||||
|
||||
@@ -1302,6 +1306,10 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S)
|
||||
{
|
||||
Standard_Integer IndOfFace = itl.Value();
|
||||
IndOfFace += (i-1)*myNbEdgesInSection;
|
||||
if (AllFaces.Size() < IndOfFace)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
myGenerated.Append(AllFaces(IndOfFace));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user