X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_ProjectionUtils.cxx;h=3ab3d55a3fca87a2713bf64c7bf2489b73a6a69e;hp=924eba9bf39bba644c6748ec5d0093e8ed5c9b56;hb=cb55604f37e3d2583272fd436bb6557b041948b5;hpb=85f0b9ca1604fd6f50e91388d3ce04769c5b03e4 diff --git a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx index 924eba9bf..3ab3d55a3 100644 --- a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx +++ b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_ProjectionUtils.cxx // Created : Fri Oct 27 10:24:28 2006 // Author : Edward AGAPOV (eap) @@ -37,6 +37,7 @@ #include "SMESH_Hypothesis.hxx" #include "SMESH_Mesh.hxx" #include "SMESH_MeshAlgos.hxx" +#include "SMESH_MeshEditor.hxx" #include "SMESH_MesherHelper.hxx" #include "SMESH_subMesh.hxx" #include "SMESH_subMeshEventListener.hxx" @@ -96,7 +97,7 @@ namespace { return max(theMeshDS[0]->ShapeToIndex(S), theMeshDS[1]->ShapeToIndex(S) ); return long(S.TShape().operator->()); } - void show_shape( TopoDS_Shape v, const char* msg ) // debug + void show_shape( TopoDS_Shape v, const char* msg ) // debug // todo: unused in release mode { if ( v.IsNull() ) cout << msg << " NULL SHAPE" << endl; else if (v.ShapeType() == TopAbs_VERTEX) { @@ -105,7 +106,7 @@ namespace { else { cout << msg << " "; TopAbs::Print((v).ShapeType(),cout) <<" "<& l ) // debug + void show_list( const char* msg, const list< TopoDS_Edge >& l ) // debug // todo: unused in release mode { cout << msg << " "; list< TopoDS_Edge >::const_iterator e = l.begin(); @@ -130,6 +131,8 @@ namespace { show_shape( TopoDS_Shape(), "avoid warning: show_shape() defined but not used"); show_list( "avoid warning: show_list() defined but not used", list< TopoDS_Edge >() ); } +#else + (void)shape; // unused in release mode #endif return false; } @@ -479,7 +482,7 @@ namespace { } /*! - * \brief Convertor used in Delaunay constructor + * \brief Converter used in Delaunay constructor */ struct SideVector2UVPtStructVec { @@ -1253,7 +1256,7 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the const TopoDS_Shape& v1 = vMap1(i); if ( vMap2.Contains( v1 )) { - // find an egde sharing v1 and sharing at the same time another common vertex + // find an edge sharing v1 and sharing at the same time another common vertex PShapeIteratorPtr edgeIt = SMESH_MesherHelper::GetAncestors( v1, *theMesh1, TopAbs_EDGE); bool edgeFound = false; while ( edgeIt->more() && !edgeFound ) @@ -2209,8 +2212,7 @@ FindMatchingNodesOnFaces( const TopoDS_Face& face1, SMDS_NodeIteratorPtr nIt = edgeSM->GetNodes(); while ( nIt->more() ) { const SMDS_MeshNode* node = nIt->next(); - const SMDS_EdgePosition* pos = - static_cast(node->GetPosition()); + SMDS_EdgePositionPtr pos = node->GetPosition(); pos2nodes.insert( make_pair( pos->GetUParameter(), node )); } if ((int) pos2nodes.size() != edgeSM->NbNodes() ) @@ -2886,7 +2888,6 @@ namespace StdMeshers_ProjectionUtils double bc[3]; // barycentric coordinates int nodeIDs[3]; // nodes of a delaunay triangle - const SMDS_FacePosition* pos; _delaunay.InitTraversal( nbSrcNodes ); @@ -2904,8 +2905,8 @@ namespace StdMeshers_ProjectionUtils tgtNode = n2n->second; tgtMesh->MoveNode( tgtNode, xyz.X(), xyz.Y(), xyz.Z() ); - if (( pos = dynamic_cast< const SMDS_FacePosition* >( tgtNode->GetPosition() ))) - const_cast( pos )->SetParameters( uvNew.X(), uvNew.Y() ); + if ( SMDS_FacePositionPtr pos = tgtNode->GetPosition() ) + pos->SetParameters( uvNew.X(), uvNew.Y() ); --nbSrcNodes; }