]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/StdMeshers/StdMeshers_ProjectionUtils.cxx
Salome HOME
Revert "23418: [OCC] Mesh: Minimization of memory usage of SMESH"
[modules/smesh.git] / src / StdMeshers / StdMeshers_ProjectionUtils.cxx
index 55a7214e8e9e1da2302b7c5af14bc58591eaeb18..2070ef108b407d2d8760e8dd820ace1654ca6318 100644 (file)
@@ -2209,7 +2209,8 @@ FindMatchingNodesOnFaces( const TopoDS_Face&     face1,
       SMDS_NodeIteratorPtr nIt = edgeSM->GetNodes();
       while ( nIt->more() ) {
         const SMDS_MeshNode* node = nIt->next();
-        SMDS_EdgePositionPtr pos = node->GetPosition();
+        const SMDS_EdgePosition* pos =
+          static_cast<const SMDS_EdgePosition*>(node->GetPosition());
         pos2nodes.insert( make_pair( pos->GetUParameter(), node ));
       }
       if ((int) pos2nodes.size() != edgeSM->NbNodes() )
@@ -2885,6 +2886,7 @@ namespace StdMeshers_ProjectionUtils
 
     double bc[3]; // barycentric coordinates
     int    nodeIDs[3]; // nodes of a delaunay triangle
+    const SMDS_FacePosition* pos;
 
     _delaunay.InitTraversal( nbSrcNodes );
 
@@ -2902,8 +2904,8 @@ namespace StdMeshers_ProjectionUtils
       tgtNode = n2n->second;
       tgtMesh->MoveNode( tgtNode, xyz.X(), xyz.Y(), xyz.Z() );
 
-      if ( SMDS_FacePositionPtr pos = tgtNode->GetPosition() )
-        pos->SetParameters( uvNew.X(), uvNew.Y() );
+      if (( pos = dynamic_cast< const SMDS_FacePosition* >( tgtNode->GetPosition() )))
+        const_cast<SMDS_FacePosition*>( pos )->SetParameters( uvNew.X(), uvNew.Y() );
 
       --nbSrcNodes;
     }