From: cconopoima Date: Mon, 18 Mar 2024 16:19:36 +0000 (+0000) Subject: [bos #36460][EDF] Define (u,v) coordinates in meshed faces. Solve Projection1D2D... X-Git-Tag: V9_13_0a2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=01c82e7db2bd4d63e10b5bd42b58f40d868885cd;p=plugins%2Fgmshplugin.git [bos #36460][EDF] Define (u,v) coordinates in meshed faces. Solve Projection1D2D and Extrussion 3D issues. --- diff --git a/src/GMSHPlugin/GMSHPlugin_Mesher.cxx b/src/GMSHPlugin/GMSHPlugin_Mesher.cxx index efb8560..8814f9d 100644 --- a/src/GMSHPlugin/GMSHPlugin_Mesher.cxx +++ b/src/GMSHPlugin/GMSHPlugin_Mesher.cxx @@ -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); }