0021845: EDF 1855 SMESH : A no-regression test fails on RadialQuadrangle meshing

+  static TopAbs_ShapeEnum GetGroupType(const TopoDS_Shape& group,
+                                       const bool          avoidCompound=false);
This commit is contained in:
eap 2012-09-11 09:24:59 +00:00
parent 68b41560cb
commit 118122435c
2 changed files with 27 additions and 0 deletions

View File

@ -1983,6 +1983,30 @@ TopoDS_Vertex SMESH_MesherHelper::IthVertex( const bool is2nd,
return ( vIt.More() ? TopoDS::Vertex(vIt.Value()) : TopoDS_Vertex() ); return ( vIt.More() ? TopoDS::Vertex(vIt.Value()) : TopoDS_Vertex() );
} }
//================================================================================
/*!
* \brief Return type of shape contained in a group
* \param group - a shape of type TopAbs_COMPOUND
* \param avoidCompound - not to return TopAbs_COMPOUND
*/
//================================================================================
TopAbs_ShapeEnum SMESH_MesherHelper::GetGroupType(const TopoDS_Shape& group,
const bool avoidCompound)
{
if ( !group.IsNull() )
{
if ( group.ShapeType() != TopAbs_COMPOUND )
return group.ShapeType();
// iterate on a compound
TopoDS_Iterator it( group );
if ( it.More() )
return avoidCompound ? GetGroupType( it.Value() ) : it.Value().ShapeType();
}
return TopAbs_SHAPE;
}
//======================================================================= //=======================================================================
//function : IsQuadraticMesh //function : IsQuadraticMesh
//purpose : Check mesh without geometry for: if all elements on this shape are quadratic, //purpose : Check mesh without geometry for: if all elements on this shape are quadratic,

View File

@ -164,6 +164,9 @@ public:
static TopoDS_Vertex IthVertex( const bool is2nd, TopoDS_Edge anEdge, const bool CumOri=true ); static TopoDS_Vertex IthVertex( const bool is2nd, TopoDS_Edge anEdge, const bool CumOri=true );
static TopAbs_ShapeEnum GetGroupType(const TopoDS_Shape& group,
const bool avoidCompound=false);
public: public:
// ---------- PUBLIC INSTANCE METHODS ---------- // ---------- PUBLIC INSTANCE METHODS ----------