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;
}
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;
}
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)
}
}
return;
- }
+ }
}
}
--- /dev/null
+puts "========="
+puts "OCC32692: Crash when the input shape has some invalid topology"
+puts "========="
+puts ""
+
+puts "REQUIRED ALL: Meshing statuses: SelfIntersectingWire Failure"
+
+restore [locate_data_file bug32692.brep] s
+incmesh s 0.01 -parallel
+
+checktrinfo s -nod 7511 -tri 7625 -empty 9 -face 309
--- /dev/null
+puts "========="
+puts "OCC32692: Crash when the input shape has some invalid topology"
+puts "========="
+puts ""
+
+puts "REQUIRED ALL: Meshing statuses: Reused"
+
+restore [locate_data_file bug32692_broken_mesh.brep] s
+incmesh s 0.01 -parallel
+
+checktrinfo s -nod 3 -tri 1 -face 1
--- /dev/null
+puts "========="
+puts "OCC32692: Crash when the input shape has some invalid topology"
+puts "========="
+puts ""
+
+puts "REQUIRED ALL: Meshing statuses: OpenWire Failure Outdated"
+
+pload MODELING
+cylinder c 0 0 0 10
+mkface f c
+
+incmesh f 0.01 -parallel
+
+checktrinfo f -nod 0 -tri 0 -face 1