From 7a1c6f7661a4a2bcea6dc5eb55fedee24cc0abaa Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 19 Apr 2019 14:19:01 +0300 Subject: [PATCH] #16843 EDF 19340 - wrong quadratic mesh --- src/GUI/NETGENPluginGUI_HypothesisCreator.cxx | 2 +- src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/GUI/NETGENPluginGUI_HypothesisCreator.cxx b/src/GUI/NETGENPluginGUI_HypothesisCreator.cxx index 35c7b86..037948a 100644 --- a/src/GUI/NETGENPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/NETGENPluginGUI_HypothesisCreator.cxx @@ -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 i(myLocalSizeMap); i.hasNext(); ) diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx index 015a22e..7a907a0 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx @@ -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 -- 2.39.2