Salome HOME
#16843 EDF 19340 - wrong quadratic mesh
authoreap <eap@opencascade.com>
Fri, 19 Apr 2019 11:19:01 +0000 (14:19 +0300)
committereap <eap@opencascade.com>
Fri, 19 Apr 2019 11:19:01 +0000 (14:19 +0300)
src/GUI/NETGENPluginGUI_HypothesisCreator.cxx
src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx

index 35c7b86137f03ccbf382dbf97ff5e4f3f10bc0d7..037948ae754e4d5b4771564d5d87b352e4931b30 100644 (file)
@@ -891,7 +891,7 @@ bool NETGENPluginGUI_HypothesisCreator::storeParamsToHypo( const NetgenHypothesi
 
         rh->SetKeepExistingEdges      ( h_data.myKeepExistingEdges );
         rh->SetMakeGroupsOfSurfaces   ( h_data.myMakeGroupsOfSurfaces );
-        rh->SetFixedEdgeGroup         ( 0 );
+        //rh->SetFixedEdgeGroup         ( -1 );
       }
     }
     for ( QMapIterator<QString,QString> i(myLocalSizeMap); i.hasNext(); )
index 015a22ec7d06e3b063f535b99dcdea77bfe28c13..7a907a081e5e3201a59c6be113e664a0980056c3 100644 (file)
@@ -263,7 +263,17 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh&         aMesh,
 
       const SMESHDS_SubMesh * aSubMeshDSFace = proxyMesh->GetSubMesh( aShapeFace );
       if ( !aSubMeshDSFace ) continue;
+
       SMDS_ElemIteratorPtr iteratorElem = aSubMeshDSFace->GetElements();
+      if ( _quadraticMesh &&
+           dynamic_cast< const SMESH_ProxyMesh::SubMesh*>( aSubMeshDSFace ))
+      {
+        // add medium nodes of proxy triangles to helper (#16843)
+        while ( iteratorElem->more() )
+          helper.AddTLinks( static_cast< const SMDS_MeshFace* >( iteratorElem->next() ));
+
+        iteratorElem = aSubMeshDSFace->GetElements();
+      }
       while ( iteratorElem->more() ) // loop on elements on a geom face
       {
         // check mesh face
@@ -612,6 +622,13 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh&         aMesh,
     StdMeshers_QuadToTriaAdaptor* Adaptor = new StdMeshers_QuadToTriaAdaptor;
     Adaptor->Compute(aMesh);
     proxyMesh.reset( Adaptor );
+
+    if ( aHelper->IsQuadraticMesh() )
+    {
+      SMDS_ElemIteratorPtr fIt = proxyMesh->GetFaces();
+      while( fIt->more())
+        aHelper->AddTLinks( static_cast< const SMDS_MeshFace* >( fIt->next() ));
+    }
   }
 
   // maps nodes to ng ID