1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0032692: Mesh - In BRepMesh_ModelPreProcessor avoid crashes with problematic topology

Improved the processing for the case where Failure flag for the meshing face is set. Specific tests added.
Check triangulation consistency even for shapes with problematic topology given that they are suitable for keeping it.
This commit is contained in:
oan
2022-06-28 11:43:49 +03:00
committed by smoskvin
parent aaa03c1efb
commit 1593d38b13
4 changed files with 41 additions and 4 deletions

View File

@@ -46,7 +46,8 @@ namespace
void operator()(const Standard_Integer theFaceIndex) const
{
const IMeshData::IFaceHandle& aDFace = myModel->GetFace(theFaceIndex);
if (aDFace->IsSet(IMeshData_Outdated))
if (aDFace->IsSet(IMeshData_Outdated) ||
aDFace->GetFace().IsNull())
{
return;
}
@@ -119,7 +120,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->IsSet(IMeshData_Failure))
{
return;
}
@@ -128,7 +129,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)
@@ -146,7 +147,7 @@ namespace
}
}
return;
}
}
}
}