0020958: EDF 1529 SMESH : If some faces have been meshed with small

quadrangles Netgen 3D creates pyramids with volume zero and fails

struct SMESH_ElementSearcher
{
+  /*!
+   * \brief Return elements possibly intersecting the line
+   */
+  virtual void GetElementsNearLine( const gp_Ax1&                           line,
+                                    SMDSAbs_ElementType                     type,
+                                    std::vector< const SMDS_MeshElement* >& foundElems)=0;
This commit is contained in:
eap 2010-08-19 09:19:49 +00:00
parent 32e5402500
commit 3a69b3ea0f
2 changed files with 33 additions and 3 deletions

View File

@ -6271,6 +6271,9 @@ struct SMESH_ElementSearcherImpl: public SMESH_ElementSearcher
vector< const SMDS_MeshElement* >& foundElements);
virtual TopAbs_State GetPointState(const gp_Pnt& point);
void GetElementsNearLine( const gp_Ax1& line,
SMDSAbs_ElementType type,
vector< const SMDS_MeshElement* >& foundElems);
double getTolerance();
bool getIntersParamOnLine(const gp_Lin& line, const SMDS_MeshElement* face,
const double tolerance, double & param);
@ -6279,7 +6282,7 @@ struct SMESH_ElementSearcherImpl: public SMESH_ElementSearcher
{
return _outerFaces.empty() || _outerFaces.count(face);
}
struct TInters //!< data of intersection of the line and the mesh face used in GetPointState()
struct TInters //!< data of intersection of the line and the mesh face (used in GetPointState())
{
const SMDS_MeshElement* _face;
gp_Vec _faceNorm;
@ -6780,6 +6783,26 @@ TopAbs_State SMESH_ElementSearcherImpl::GetPointState(const gp_Pnt& point)
return TopAbs_UNKNOWN;
}
//=======================================================================
/*!
* \brief Return elements possibly intersecting the line
*/
//=======================================================================
void SMESH_ElementSearcherImpl::GetElementsNearLine( const gp_Ax1& line,
SMDSAbs_ElementType type,
vector< const SMDS_MeshElement* >& foundElems)
{
if ( !_ebbTree || _elementType != type )
{
if ( _ebbTree ) delete _ebbTree;
_ebbTree = new ElementBndBoxTree( *_mesh, _elementType = type );
}
TIDSortedElemSet suspectFaces; // elements possibly intersecting the line
_ebbTree->getElementsNearLine( line, suspectFaces );
foundElems.assign( suspectFaces.begin(), suspectFaces.end());
}
//=======================================================================
/*!
* \brief Return SMESH_ElementSearcher

View File

@ -92,6 +92,13 @@ struct SMESH_ElementSearcher
std::vector< const SMDS_MeshElement* >& foundElems)=0;
virtual TopAbs_State GetPointState(const gp_Pnt& point) = 0;
/*!
* \brief Return elements possibly intersecting the line
*/
virtual void GetElementsNearLine( const gp_Ax1& line,
SMDSAbs_ElementType type,
std::vector< const SMDS_MeshElement* >& foundElems)=0;
};
//=======================================================================
@ -408,12 +415,12 @@ public:
// Search among theNodes or in the whole mesh if theNodes is empty.
/*!
* \brief Return SMESH_NodeSearcher
* \brief Return SMESH_NodeSearcher. The caller is responsible for deleteing it
*/
SMESH_NodeSearcher* GetNodeSearcher();
/*!
* \brief Return SMESH_ElementSearcher
* \brief Return SMESH_ElementSearcher. The caller is responsible for deleteing it
*/
SMESH_ElementSearcher* GetElementSearcher();
/*!