]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
bos #36783 [EDF] Use BRepTopAdaptor_FClass2d classifier for edges with tighter tolerance. cce/36783 19/head
authorcconopoima <cesar.conopoima@gmail.com>
Thu, 10 Aug 2023 14:52:15 +0000 (15:52 +0100)
committercconopoima <cesar.conopoima@gmail.com>
Tue, 19 Sep 2023 09:00:49 +0000 (10:00 +0100)
src/StdMeshers/StdMeshers_Import_1D2D.cxx

index e49933b4a4cba033378e8e52c529d322b13b8ad6..a58590f6715089fca1176e52008bbbdff2cf6d0b 100644 (file)
@@ -203,6 +203,10 @@ bool StdMeshers_Import_1D2D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape &
   // BRepClass_FaceClassifier is most time consuming, so minimize its usage
   const double clsfTol = 1e2 * BRep_Tool::MaxTolerance( geomFace, TopAbs_VERTEX );
   BRepTopAdaptor_FClass2d classifier( geomFace, clsfTol ); //Brimless_FaceClassifier classifier;
+
+  const double clsfTolEdge = BRep_Tool::MaxTolerance( geomFace, TopAbs_EDGE );
+  BRepTopAdaptor_FClass2d classifierEdge( geomFace, clsfTolEdge ); //Define specific classifier for edges based on TopAbs_EDGE. Solve issue bos #36783
+
   Bnd_B2d bndBox2d;
   Bnd_Box bndBox3d;
   {
@@ -425,7 +429,7 @@ bool StdMeshers_Import_1D2D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape &
         {
           if ( nodeState[i] != TopAbs_UNKNOWN ) continue;
           gp_XY uv = helper.GetNodeUV( geomFace, newNodes[i] );
-          nodeState[i] = classifier.Perform( uv ); //geomFace, uv, clsfTol );
+          nodeState[i] = classifierEdge.Perform( uv ); //geomFace, uv, clsfTolEdge );
           //nodeState[i] = classifier.State();
           isIn = ( nodeState[i] == TopAbs_IN );
         }
@@ -447,8 +451,8 @@ bool StdMeshers_Import_1D2D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape &
           Standard_Real U,V;
           proj.LowerDistanceParameters(U,V);
           gp_XY uv( U,V );
-          //classifier.Perform( geomFace, uv, clsfTol );
-          TopAbs_State state = classifier.Perform( uv );
+          //classifier.Perform( geomFace, uv, clsfTolEdge );
+          TopAbs_State state = classifierEdge.Perform( uv );
           if ( state != TopAbs_IN )
             continue;
         }