From e97c496f7d9803216fb7f0a403b4038c0d4d52bf Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 8 Aug 2013 12:36:02 +0000 Subject: [PATCH] 0022297: BR_new_bop3/Occdev_3f4689a163 => Faces are missing after an extrusion Fix ConvertToQuadratic(): do not convert twice quadratic volumes --- src/SMESH/SMESH_MeshEditor.cxx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index d817e9018..9078ce9f0 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -8446,11 +8446,20 @@ void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d, const bool theT if ( !volume ) continue; const SMDSAbs_EntityType type = volume->GetEntityType(); - if (( theToBiQuad && type == SMDSEntity_TriQuad_Hexa ) || - ( !theToBiQuad && type == SMDSEntity_Quad_Hexa )) + if ( volume->IsQuadratic() ) { - aHelper.AddTLinks( static_cast< const SMDS_MeshVolume* >( volume )); - continue; + bool alreadyOK; + switch ( type ) + { + case SMDSEntity_Quad_Hexa: alreadyOK = !theToBiQuad; break; + case SMDSEntity_TriQuad_Hexa: alreadyOK = theToBiQuad; break; + default: alreadyOK = true; + } + if ( alreadyOK ) + { + aHelper.AddTLinks( static_cast< const SMDS_MeshVolume* >( volume )); + continue; + } } const int id = volume->GetID(); vector nodes (volume->begin_nodes(), volume->end_nodes()); -- 2.39.2