0021893: EDF 2133 SMESH : Improvement of 3D extrusion algorithm

Use SMESH_MesherHelper::IsSameElemGeometry()
This commit is contained in:
eap 2013-01-28 08:29:36 +00:00
parent c8d7fe2beb
commit 7643656ed3

View File

@ -295,7 +295,7 @@ namespace
//============================================================================= //=============================================================================
bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
const TopoDS_Shape & aShape)// throw(SALOME_Exception) const TopoDS_Shape & aShape)
{ {
// PAL14921. Enable catching std::bad_alloc and Standard_OutOfMemory outside // PAL14921. Enable catching std::bad_alloc and Standard_OutOfMemory outside
//Unexpect aCatch(SalomeException); //Unexpect aCatch(SalomeException);
@ -371,20 +371,12 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
for ( int i = 0; i < 6; ++i ) for ( int i = 0; i < 6; ++i )
{ {
const TopoDS_Face& sideF = aCubeSide[i]._quad->face; const TopoDS_Face& sideF = aCubeSide[i]._quad->face;
if ( SMESHDS_SubMesh* smDS = meshDS->MeshElements( sideF )) if ( !SMESH_MesherHelper::IsSameElemGeometry( meshDS->MeshElements( sideF ),
SMDSGeom_QUADRANGLE,
/*nullSubMeshRes=*/false ))
{ {
bool isAllQuad = true; SMESH_ComputeErrorPtr err = ComputePentahedralMesh(aMesh, aShape, proxymesh.get());
SMDS_ElemIteratorPtr fIt = smDS->GetElements(); return error( err );
while ( fIt->more() && isAllQuad )
{
const SMDS_MeshElement* f = fIt->next();
isAllQuad = ( f->NbCornerNodes() == 4 );
}
if ( !isAllQuad )
{
SMESH_ComputeErrorPtr err = ComputePentahedralMesh(aMesh, aShape, proxymesh.get());
return error( err );
}
} }
} }
} }