From: agv Date: Fri, 26 Nov 2021 16:48:53 +0000 (+0300) Subject: 0032692: Mesh - In BRepMesh_ModelPreProcessor avoid crashes with problematic topology X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=5d26a5805d33da8296383d43b08942e17da78769;p=occt.git 0032692: Mesh - In BRepMesh_ModelPreProcessor avoid crashes with problematic topology --- diff --git a/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx b/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx index 2a6d20badb..ea189746be 100644 --- a/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx +++ b/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx @@ -118,7 +118,7 @@ namespace void operator()(const Standard_Integer theFaceIndex) const { const IMeshData::IFaceHandle& aDFace = myModel->GetFace(theFaceIndex); - if (aDFace->GetSurface()->GetType() != GeomAbs_Cone) + if (aDFace->GetSurface()->GetType() != GeomAbs_Cone || aDFace->WiresNb() == 0) { return; } @@ -127,7 +127,7 @@ namespace for (Standard_Integer aEdgeIdx = 0; aEdgeIdx < aDWire->EdgesNb() - 1; ++aEdgeIdx) { const IMeshData::IEdgePtr& aDEdge = aDWire->GetEdge (aEdgeIdx); - + if (aDEdge->GetPCurve(aDFace.get(), TopAbs_FORWARD) != aDEdge->GetPCurve(aDFace.get(), TopAbs_REVERSED)) { if (aDEdge->GetCurve()->ParametersNb() == 2) @@ -145,7 +145,7 @@ namespace } } return; - } + } } }