From 0d3dd80ac22f8914bc79a2a6a07f8673106b44ac Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 16 Oct 2013 14:24:20 +0000 Subject: [PATCH] 22332: EDF 2725 SMESH: Convert to bi-quadratic failure after hexotic meshing In GetCentralNode(), check UV of corner nodes --- src/SMESH/SMESH_MesherHelper.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index ad330f22a..39e277431 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -1172,11 +1172,12 @@ const SMDS_MeshNode* SMESH_MesherHelper::GetCentralNode(const SMDS_MeshNode* n1, gp_XY uvAvg; gp_Pnt P; + bool toCheck = true; if ( !F.IsNull() && !force3d ) { uvAvg = calcTFI (0.5, 0.5, - GetNodeUV(F,n1,n3), GetNodeUV(F,n2,n4), - GetNodeUV(F,n3,n1), GetNodeUV(F,n4,n2), + GetNodeUV(F,n1,n3,&toCheck), GetNodeUV(F,n2,n4,&toCheck), + GetNodeUV(F,n3,n1,&toCheck), GetNodeUV(F,n4,n2,&toCheck), GetNodeUV(F,n12,n3), GetNodeUV(F,n23,n4), GetNodeUV(F,n34,n2), GetNodeUV(F,n41,n2)); TopLoc_Location loc; @@ -1196,10 +1197,10 @@ const SMDS_MeshNode* SMESH_MesherHelper::GetCentralNode(const SMDS_MeshNode* n1, if ( !F.IsNull() ) // force3d { - uvAvg = (GetNodeUV(F,n1,n3) + - GetNodeUV(F,n2,n4) + - GetNodeUV(F,n3,n1) + - GetNodeUV(F,n4,n2)) / 4; + uvAvg = (GetNodeUV(F,n1,n3,&toCheck) + + GetNodeUV(F,n2,n4,&toCheck) + + GetNodeUV(F,n3,n1,&toCheck) + + GetNodeUV(F,n4,n2,&toCheck)) / 4; //CheckNodeUV( F, centralNode, uvAvg, 2*BRep_Tool::Tolerance( F ), /*force=*/true); meshDS->SetNodeOnFace( centralNode, faceID, uvAvg.X(), uvAvg.Y() ); } -- 2.39.2