mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-29 05:00:33 +05:00
23386: EDF 13811 - Crash SALOME during compute
reason: empty NbSegments in FixedPoints1D hypothesis
This commit is contained in:
parent
1c1bbf6798
commit
6ea484ee5f
@ -27,16 +27,6 @@
|
|||||||
#include "SMESH_Algo.hxx"
|
#include "SMESH_Algo.hxx"
|
||||||
#include "SMESH_Mesh.hxx"
|
#include "SMESH_Mesh.hxx"
|
||||||
|
|
||||||
//#include <BRep_Tool.hxx>
|
|
||||||
//#include <GCPnts_AbscissaPoint.hxx>
|
|
||||||
//#include <GeomAdaptor_Curve.hxx>
|
|
||||||
//#include <Geom_Curve.hxx>
|
|
||||||
//#include <TopExp.hxx>
|
|
||||||
//#include <TopLoc_Location.hxx>
|
|
||||||
//#include <TopTools_IndexedMapOfShape.hxx>
|
|
||||||
//#include <TopoDS.hxx>
|
|
||||||
//#include <TopoDS_Edge.hxx>
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -185,28 +175,6 @@ istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load)
|
|||||||
return load;
|
return load;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
/*!
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
//=============================================================================
|
|
||||||
|
|
||||||
ostream & operator <<(ostream & save, StdMeshers_FixedPoints1D & hyp)
|
|
||||||
{
|
|
||||||
return hyp.SaveTo( save );
|
|
||||||
}
|
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
/*!
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
//=============================================================================
|
|
||||||
|
|
||||||
istream & operator >>(istream & load, StdMeshers_FixedPoints1D & hyp)
|
|
||||||
{
|
|
||||||
return hyp.LoadFrom( load );
|
|
||||||
}
|
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Initialize start and end length by the mesh built on the geometry
|
* \brief Initialize start and end length by the mesh built on the geometry
|
||||||
|
@ -61,8 +61,6 @@ public:
|
|||||||
|
|
||||||
virtual std::ostream & SaveTo(std::ostream & save);
|
virtual std::ostream & SaveTo(std::ostream & save);
|
||||||
virtual std::istream & LoadFrom(std::istream & load);
|
virtual std::istream & LoadFrom(std::istream & load);
|
||||||
friend std::ostream& operator << (std::ostream & save, StdMeshers_FixedPoints1D & hyp);
|
|
||||||
friend std::istream& operator >> (std::istream & load, StdMeshers_FixedPoints1D & hyp);
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Initialize start and end length by the mesh built on the geometry
|
* \brief Initialize start and end length by the mesh built on the geometry
|
||||||
|
@ -994,6 +994,8 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
|||||||
std::vector<int> nbsegs = _fpHyp->GetNbSegments();
|
std::vector<int> nbsegs = _fpHyp->GetNbSegments();
|
||||||
if ( theReverse )
|
if ( theReverse )
|
||||||
std::reverse( nbsegs.begin(), nbsegs.end() );
|
std::reverse( nbsegs.begin(), nbsegs.end() );
|
||||||
|
if ( nbsegs.empty() )
|
||||||
|
nbsegs.push_back( 1 );
|
||||||
|
|
||||||
// sort normalized params, taking into account theReverse
|
// sort normalized params, taking into account theReverse
|
||||||
TColStd_SequenceOfReal Params;
|
TColStd_SequenceOfReal Params;
|
||||||
|
Loading…
Reference in New Issue
Block a user