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

0030785: Mesh - protect BRepMesh_IncrementalMesh::Perform from raising exception

IMeshTools_ModelAlgo and IMeshTools_ModelBuilder have been changed to provide exception protected interfaces for performing the operations.
Protect single Edge/Face discretization methods from raising exceptions to skip broken Edges/Faces and allow mesh construction on the whole model.
This commit is contained in:
emv
2019-06-17 16:26:45 +03:00
committed by bugmaster
parent fe525c6f7c
commit c2a25d522b
17 changed files with 235 additions and 140 deletions

View File

@@ -17,6 +17,7 @@
#include <gp_Pnt2d.hxx>
#include <BRepMesh_OrientedEdge.hxx>
#include <BRepMesh_Vertex.hxx>
#include <Standard_OutOfRange.hxx>
//=======================================================================
// Function: Constructor
@@ -74,6 +75,9 @@ void BRepMeshData_PCurve::AddPoint (
//=======================================================================
gp_Pnt2d& BRepMeshData_PCurve::GetPoint (const Standard_Integer theIndex)
{
Standard_OutOfRange_Raise_if (
theIndex < 0 || theIndex >= static_cast<Standard_Integer>(myPoints2d.size()),
"BRepMeshData_PCurve::GetPoint");
return myPoints2d[theIndex];
}
@@ -83,6 +87,9 @@ gp_Pnt2d& BRepMeshData_PCurve::GetPoint (const Standard_Integer theIndex)
//=======================================================================
Standard_Integer& BRepMeshData_PCurve::GetIndex(const Standard_Integer theIndex)
{
Standard_OutOfRange_Raise_if (
theIndex < 0 || theIndex >= static_cast<Standard_Integer>(myIndices.size()),
"BRepMeshData_PCurve::GetIndex");
return myIndices[theIndex];
}
@@ -92,6 +99,9 @@ Standard_Integer& BRepMeshData_PCurve::GetIndex(const Standard_Integer theIndex)
//=======================================================================
Standard_Real& BRepMeshData_PCurve::GetParameter (const Standard_Integer theIndex)
{
Standard_OutOfRange_Raise_if (
theIndex < 0 || theIndex >= ParametersNb(),
"BRepMeshData_PCurve::GetParameter");
return myParameters[theIndex];
}