mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-11 01:23:07 +05:00
PAL13330( When mesh generation does not success, trace where )
use aSubMesh->getDependsOnIterator()
This commit is contained in:
parent
8b19a88a83
commit
4a2b6b7518
@ -6401,19 +6401,17 @@ void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d)
|
|||||||
|
|
||||||
SMESH_MesherHelper aHelper(*myMesh);
|
SMESH_MesherHelper aHelper(*myMesh);
|
||||||
aHelper.SetIsQuadratic( true );
|
aHelper.SetIsQuadratic( true );
|
||||||
const TopoDS_Shape& aShape = meshDS->ShapeToMesh();
|
|
||||||
|
|
||||||
if ( !aShape.IsNull() && GetMesh()->GetSubMeshContaining(aShape) )
|
if ( myMesh->HasShapeToMesh() )
|
||||||
{
|
{
|
||||||
SMESH_subMesh *aSubMesh = GetMesh()->GetSubMeshContaining(aShape);
|
SMESH_subMesh *aSubMesh = myMesh->GetSubMesh(myMesh->GetShapeToMesh());
|
||||||
|
SMESH_subMeshIteratorPtr smIt = aSubMesh->getDependsOnIterator(false,false);
|
||||||
const map < int, SMESH_subMesh * >& aMapSM = aSubMesh->DependsOn();
|
while ( smIt->more() ) {
|
||||||
map < int, SMESH_subMesh * >::const_iterator itsub;
|
SMESH_subMesh* sm = smIt->next();
|
||||||
for (itsub = aMapSM.begin(); itsub != aMapSM.end(); itsub++)
|
if ( SMESHDS_SubMesh *smDS = sm->GetSubMeshDS() ) {
|
||||||
{
|
aHelper.SetSubShape( sm->GetSubShape() );
|
||||||
SMESHDS_SubMesh *sm = ((*itsub).second)->GetSubMeshDS();
|
ConvertElemToQuadratic(smDS, aHelper, theForce3d);
|
||||||
aHelper.SetSubShape( (*itsub).second->GetSubShape() );
|
}
|
||||||
ConvertElemToQuadratic(sm, aHelper, theForce3d);
|
|
||||||
}
|
}
|
||||||
aHelper.SetSubShape( aSubMesh->GetSubShape() );
|
aHelper.SetSubShape( aSubMesh->GetSubShape() );
|
||||||
ConvertElemToQuadratic(aSubMesh->GetSubMeshDS(), aHelper, theForce3d);
|
ConvertElemToQuadratic(aSubMesh->GetSubMeshDS(), aHelper, theForce3d);
|
||||||
@ -6583,29 +6581,20 @@ void SMESH_MeshEditor::RemoveQuadElem(SMESHDS_SubMesh * theSm,
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
bool SMESH_MeshEditor::ConvertFromQuadratic()
|
bool SMESH_MeshEditor::ConvertFromQuadratic()
|
||||||
{
|
{
|
||||||
SMESHDS_Mesh* meshDS = GetMeshDS();
|
if ( myMesh->HasShapeToMesh() )
|
||||||
const TopoDS_Shape& aShape = meshDS->ShapeToMesh();
|
|
||||||
|
|
||||||
if ( !aShape.IsNull() && GetMesh()->GetSubMeshContaining(aShape) )
|
|
||||||
{
|
{
|
||||||
SMESH_subMesh *aSubMesh = GetMesh()->GetSubMeshContaining(aShape);
|
SMESH_subMesh *aSubMesh = myMesh->GetSubMesh(myMesh->GetShapeToMesh());
|
||||||
|
SMESH_subMeshIteratorPtr smIt = aSubMesh->getDependsOnIterator(true,false);
|
||||||
const map < int, SMESH_subMesh * >& aMapSM = aSubMesh->DependsOn();
|
while ( smIt->more() ) {
|
||||||
map < int, SMESH_subMesh * >::const_iterator itsub;
|
SMESH_subMesh* sm = smIt->next();
|
||||||
for (itsub = aMapSM.begin(); itsub != aMapSM.end(); itsub++)
|
if ( SMESHDS_SubMesh *smDS = sm->GetSubMeshDS() )
|
||||||
{
|
RemoveQuadElem( smDS, smDS->GetElements(), sm->GetId() );
|
||||||
SMESHDS_SubMesh *sm = ((*itsub).second)->GetSubMeshDS();
|
|
||||||
if( sm )
|
|
||||||
RemoveQuadElem( sm, sm->GetElements(), itsub->second->GetId() );
|
|
||||||
}
|
}
|
||||||
SMESHDS_SubMesh *Sm = aSubMesh->GetSubMeshDS();
|
|
||||||
if( Sm )
|
|
||||||
RemoveQuadElem( Sm, Sm->GetElements(), aSubMesh->GetId() );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SMESHDS_SubMesh *aSM = 0;
|
SMESHDS_SubMesh *aSM = 0;
|
||||||
RemoveQuadElem( aSM, meshDS->elementsIterator(), 0 );
|
RemoveQuadElem( aSM, GetMeshDS()->elementsIterator(), 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user