Salome HOME
0022297: BR_new_bop3/Occdev_3f4689a163 => Faces are missing after an extrusion
authoreap <eap@opencascade.com>
Thu, 8 Aug 2013 12:36:02 +0000 (12:36 +0000)
committereap <eap@opencascade.com>
Thu, 8 Aug 2013 12:36:02 +0000 (12:36 +0000)
Fix ConvertToQuadratic(): do not convert twice quadratic volumes

src/SMESH/SMESH_MeshEditor.cxx

index d817e9018145976f86c14ec0e17261d6c7ad7f98..9078ce9f0a56f9cafd8d224763a6f79b4f6d85b6 100644 (file)
@@ -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<const SMDS_MeshNode *> nodes (volume->begin_nodes(), volume->end_nodes());