bos #37027 [EDF] Define more general geomTol value to detect mesh edges in geom edges in 1D meshing import.

.

..
This commit is contained in:
cconopoima 2023-08-24 15:59:13 +01:00
parent 274fd4f2db
commit b363bece45

View File

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