From: cconopoima Date: Thu, 24 Aug 2023 14:59:13 +0000 (+0100) Subject: bos #37027 [EDF] Define more general geomTol value to detect mesh edges in geom edges... X-Git-Tag: V9_12_0b1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Ftlpr%2F23%2Fhead;p=modules%2Fsmesh.git bos #37027 [EDF] Define more general geomTol value to detect mesh edges in geom edges in 1D meshing import. . .. --- diff --git a/src/StdMeshers/StdMeshers_Import_1D.cxx b/src/StdMeshers/StdMeshers_Import_1D.cxx index 1d4dd738f..cd63e7c39 100644 --- a/src/StdMeshers/StdMeshers_Import_1D.cxx +++ b/src/StdMeshers/StdMeshers_Import_1D.cxx @@ -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::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