mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03: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:
parent
73914537d1
commit
0e97c80e6a
@ -1292,6 +1292,10 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S)
|
|||||||
for (; itl.More(); itl.Next())
|
for (; itl.More(); itl.Next())
|
||||||
{
|
{
|
||||||
Standard_Integer IndOfFace = itl.Value();
|
Standard_Integer IndOfFace = itl.Value();
|
||||||
|
if (AllFaces.Size() < IndOfFace)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
myGenerated.Append(AllFaces(IndOfFace));
|
myGenerated.Append(AllFaces(IndOfFace));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1302,6 +1306,10 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S)
|
|||||||
{
|
{
|
||||||
Standard_Integer IndOfFace = itl.Value();
|
Standard_Integer IndOfFace = itl.Value();
|
||||||
IndOfFace += (i-1)*myNbEdgesInSection;
|
IndOfFace += (i-1)*myNbEdgesInSection;
|
||||||
|
if (AllFaces.Size() < IndOfFace)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
myGenerated.Append(AllFaces(IndOfFace));
|
myGenerated.Append(AllFaces(IndOfFace));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user