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:
@@ -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];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user