]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
bos #37027 [EDF] Define more general geomTol value to detect mesh edges in geom edges... cce/37027 23/head
authorcconopoima <cesar.conopoima@gmail.com>
Thu, 24 Aug 2023 14:59:13 +0000 (15:59 +0100)
committercconopoima <cesar.conopoima@gmail.com>
Mon, 13 Nov 2023 10:31:24 +0000 (10:31 +0000)
.

..

src/StdMeshers/StdMeshers_Import_1D.cxx

index 1d4dd738f904abffd6f4ea9d8d3a0344e37d1789..cd63e7c3920e94bedd7f3a1b8fde1bc872e7789c 100644 (file)
@@ -948,20 +948,20 @@ bool StdMeshers_Import_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & th
   const double        edgeTol = helper.MaxTolerance( geomEdge );
   const int           shapeID = tgtMesh->ShapeToIndex( geomEdge );
 
-
   double geomTol = Precision::Confusion();
+  double minGeomTol = std::numeric_limits<double>::max();
+
   for ( size_t iG = 0; iG < srcGroups.size(); ++iG )
   {
     const SMESHDS_GroupBase* srcGroup = srcGroups[iG]->GetGroupDS();
     for ( SMDS_ElemIteratorPtr srcElems = srcGroup->GetElements(); srcElems->more(); )
     {
       const SMDS_MeshElement* edge = srcElems->next();
-      geomTol = Sqrt( 0.5 * ( getMinEdgeLength2( edge->GetNode(0) ) +
-                              getMinEdgeLength2( edge->GetNode(1) ))) / 25;
-      iG = srcGroups.size();
-      break;
+      minGeomTol = std::min( Sqrt( getMinEdgeLength2( edge->GetNode(0) )) / 25, minGeomTol );
+      geomTol = minGeomTol;
     }
   }
+
   CurveProjector curveProjector( geomEdge, geomTol );
 
   // get nodes on vertices