From 8f4cd4793a010d3c692243216e12128a422053fe Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Wed, 11 Jan 2023 11:29:08 +0000 Subject: [PATCH] TL: OCC preprocessing fail (#354) Fixed problem with empty edge list in the edge loop. --- src/RWStepShape/RWStepShape_RWEdgeLoop.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/RWStepShape/RWStepShape_RWEdgeLoop.cxx b/src/RWStepShape/RWStepShape_RWEdgeLoop.cxx index dd0097813b..f6cc79a34f 100644 --- a/src/RWStepShape/RWStepShape_RWEdgeLoop.cxx +++ b/src/RWStepShape/RWStepShape_RWEdgeLoop.cxx @@ -106,6 +106,11 @@ void RWStepShape_RWEdgeLoop::Check Standard_Boolean headToTail = Standard_True; //Standard_Boolean noIdentVtx = Standard_True; //szv#4:S4163:12Mar99 unused Standard_Integer nbEdg = ent->NbEdgeList(); + if (nbEdg == 0) + { + ach->AddFail("Edge loop contains empty edge list"); + return; + } Handle(StepShape_OrientedEdge) theOE = ent->EdgeListValue(1); Handle(StepShape_Vertex) theVxFrst = theOE->EdgeStart(); Handle(StepShape_Vertex) theVxLst = theOE->EdgeEnd(); -- 2.39.5