From 9eedde53dde017d4e17bd4c4c9fae50af999d372 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 7 Aug 2012 09:18:15 +0000 Subject: [PATCH] 0021765: EDF 2334 SMESH: ConvertToQuadratic with medium node on geometry generates bad elements Enables fixing node parameters by helper + helper.ToFixNodeParameters( true ); --- src/StdMeshers/StdMeshers_FaceSide.cxx | 8 ++++++-- src/StdMeshers/StdMeshers_Hexa_3D.cxx | 1 + src/StdMeshers/StdMeshers_ViscousLayers.cxx | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/StdMeshers/StdMeshers_FaceSide.cxx b/src/StdMeshers/StdMeshers_FaceSide.cxx index e2e26b6a0..13c2d6263 100644 --- a/src/StdMeshers/StdMeshers_FaceSide.cxx +++ b/src/StdMeshers/StdMeshers_FaceSide.cxx @@ -263,7 +263,9 @@ const vector& StdMeshers_FaceSide::GetUVPtStruct(bool isXConst, u2nodeVec.reserve( sm->NbNodes() ); SMDS_NodeIteratorPtr nItr = sm->GetNodes(); double paramSize = myLast[i] - myFirst[i]; - double r = myNormPar[i] - prevNormPar; + double r = myNormPar[i] - prevNormPar; + helper.SetSubShape( myEdge[i] ); + helper.ToFixNodeParameters( true ); if ( !myIsUniform[i] ) while ( nItr->more() ) { @@ -455,7 +457,9 @@ std::vector StdMeshers_FaceSide::GetOrderedNodes() const { SMDS_NodeIteratorPtr nItr = sm->GetNodes(); double paramSize = myLast[i] - myFirst[i]; - double r = myNormPar[i] - prevNormPar; + double r = myNormPar[i] - prevNormPar; + helper.SetSubShape( myEdge[i] ); + helper.ToFixNodeParameters( true ); while ( nItr->more() ) { const SMDS_MeshNode* node = nItr->next(); diff --git a/src/StdMeshers/StdMeshers_Hexa_3D.cxx b/src/StdMeshers/StdMeshers_Hexa_3D.cxx index 29f48f96e..92f00af3a 100644 --- a/src/StdMeshers/StdMeshers_Hexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_Hexa_3D.cxx @@ -404,6 +404,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, // assure correctness of node positions on baseE: // helper.GetNodeU() will fix positions if they are wrong + helper.ToFixNodeParameters( true ); for ( int iE = 0; iE < baseQuadSide->NbEdges(); ++iE ) { const TopoDS_Edge& baseE = baseQuadSide->Edge( iE ); diff --git a/src/StdMeshers/StdMeshers_ViscousLayers.cxx b/src/StdMeshers/StdMeshers_ViscousLayers.cxx index d9e2fe417..ddae235f7 100644 --- a/src/StdMeshers/StdMeshers_ViscousLayers.cxx +++ b/src/StdMeshers/StdMeshers_ViscousLayers.cxx @@ -3460,6 +3460,7 @@ bool _ViscousBuilder::shrink() } SMESH_MesherHelper helper( *_mesh ); + helper.ToFixNodeParameters( true ); // EDGE's to shrink map< int, _Shrinker1D > e2shrMap;