1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +03:00

0031489: Data Exchange - STEP Reader can't read a big file

- Add checking for null object for edge_curve within TranslateEdgeLoop;
- Update STEP parser rule allowing empty element in the list of entity parameters;
- Update test case of bug26451 for a new scanner rule;
- Update test case of bug30273 for a new added check for null object
This commit is contained in:
dpasukhi
2020-09-05 14:56:34 +03:00
committed by bugmaster
parent 60f7b22536
commit 4637000015
6 changed files with 119 additions and 85 deletions

View File

@@ -285,6 +285,12 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac
for (j=1; j<=NbEdge; j++) {
OrEdge1 = EL->EdgeListValue(j);
if (OrEdge1.IsNull() || OrEdge1->EdgeElement().IsNull())
{
TP->AddWarning(OrEdge1, "Incorrect Oriented_Edge is not translated. Oriented_Edge definition is not correct");
continue;
}
// see bug #29979: oriented edge contains another oriented edge
if (OrEdge1->EdgeElement()->IsKind (STANDARD_TYPE(StepShape_OrientedEdge)))
OrEdge1 = Handle(StepShape_OrientedEdge)::DownCast (OrEdge1->EdgeElement());
@@ -370,6 +376,9 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac
for (j=1; j<=NbEdge; j++) {
OrEdge1 = EL->EdgeListValue (j);
OrEdge2 = EL->EdgeListValue (j < NbEdge ? j + 1 : 1);
if (OrEdge1.IsNull() || OrEdge2.IsNull())
continue;
Handle(StepShape_EdgeCurve) EC1 =
Handle(StepShape_EdgeCurve)::DownCast (OrEdge1->EdgeElement());
Handle(StepShape_EdgeCurve) EC2 =
@@ -425,6 +434,8 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac
#endif
OrEdge1 = EL->EdgeListValue(j);
if (OrEdge1.IsNull() || OrEdge1->EdgeElement().IsNull())
continue;
// see bug #29979: oriented edge contains another oriented edge
if (OrEdge1->EdgeElement()->IsKind (STANDARD_TYPE(StepShape_OrientedEdge)))