From: eap Date: Wed, 4 Dec 2013 14:41:03 +0000 (+0000) Subject: 22350: EDF 2747 SMESH: Coincident nodes with BLSURF (BLSURFissue2.tar.gz) X-Git-Tag: V7_3_0b1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=460c74799c3aef89431ad8c91e11ea543b9f0091;p=plugins%2Fblsurfplugin.git 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 --- 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++ ) {