]> SALOME platform Git repositories - plugins/gmshplugin.git/commitdiff
Salome HOME
[bos #36460][EDF] Define (u,v) coordinates in meshed faces. Solve Projection1D2D... cce/36460 V9_13_0a1 V9_13_0a2 V9_13_0b1 7/head
authorcconopoima <cesar.conopoima@gmail.com>
Mon, 18 Mar 2024 16:19:36 +0000 (16:19 +0000)
committercconopoima <cesar.conopoima@gmail.com>
Mon, 18 Mar 2024 16:19:36 +0000 (16:19 +0000)
src/GMSHPlugin/GMSHPlugin_Mesher.cxx

index efb85605fb7f2a0a063076c96acd117482c6edec..8814f9d99f3f396afbd2676aebe1339ad8ed89ed 100644 (file)
@@ -1152,12 +1152,15 @@ void GMSHPlugin_Mesher::FillSMesh()
       MVertex *v = gFace->mesh_vertices[i];
       if ( v->getIndex() >= 0 )
       {
+        double U,V;
+        gFace->XYZtoUV( v->x(),v->y(),v->z(), U, V, 1.0 );
+
         SMDS_MeshNode *node = meshDS->AddNode( v->x(),v->y(),v->z() );
 
         if ( isCompound )
           topoFace = TopoDS::Face( getShapeAtPoint( v->point(), topoFaces ));
 
-        meshDS->SetNodeOnFace( node, topoFace );
+        meshDS->SetNodeOnFace( node, topoFace, U, V );
         _nodeMap.insert({ v, node });
       }
     }
@@ -1204,7 +1207,9 @@ void GMSHPlugin_Mesher::FillSMesh()
         if(verts[j]->onWhat()->getVisibility() == 0)
         {
           SMDS_MeshNode *node = meshDS->AddNode(verts[j]->x(),verts[j]->y(),verts[j]->z());
-          meshDS->SetNodeOnFace( node, topoFace );
+          double U,V;
+          gFace->XYZtoUV( verts[j]->x(),verts[j]->y(),verts[j]->z(), U, V, 1.0 );
+          meshDS->SetNodeOnFace( node, topoFace, U, V );
           _nodeMap.insert({ verts[j], node });
           verts[j]->setEntity(gFace);
         }