From 460c74799c3aef89431ad8c91e11ea543b9f0091 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 4 Dec 2013 14:41:03 +0000 Subject: [PATCH] 22350: EDF 2747 SMESH: Coincident nodes with BLSURF (BLSURFissue2.tar.gz) In getNodeGroupsToMerge() fix a tolerance to compare nodes, which was too small in case of only two nodes on an EDGE --- src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index 4cfa4f0..a146e6a 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -1645,7 +1645,11 @@ namespace } if ( u2node.size() < 2 ) return; - double tol = (( u2node.rbegin()->first - u2node.begin()->first ) / 20.) / u2node.size(); + //double tol = (( u2node.rbegin()->first - u2node.begin()->first ) / 20.) / u2node.size(); + Standard_Real f,l; + BRep_Tool::Range( TopoDS::Edge( shape ), f,l ); + double tol = (( l - f ) / 20.) / u2node.size(); + std::multimap< double, const SMDS_MeshNode* >::iterator un2, un1; for ( un2 = u2node.begin(), un1 = un2++; un2 != u2node.end(); un1 = un2++ ) { -- 2.39.2