X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOBJECT%2FSMESH_ActorUtils.cxx;h=d8712a5b496888c6e85f21f913410b53de642f27;hb=HEAD;hp=bb9fd64b185324fea24f498371bd67a37bedc711;hpb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6;p=modules%2Fsmesh.git diff --git a/src/OBJECT/SMESH_ActorUtils.cxx b/src/OBJECT/SMESH_ActorUtils.cxx index bb9fd64b1..089025c46 100644 --- a/src/OBJECT/SMESH_ActorUtils.cxx +++ b/src/OBJECT/SMESH_ActorUtils.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -46,21 +46,16 @@ #include #include -//#ifdef _DEBUG_ -//static int MYDEBUG = 1; -//#else -//static int MYDEBUG = 0; -//#endif namespace SMESH { - vtkFloatingPointType + double GetFloat( const QString& theValue, - vtkFloatingPointType theDefault ) + double theDefault ) { int pos = theValue.indexOf( ":" ); - vtkFloatingPointType val = theDefault; + double val = theDefault; if( pos>=0 ) { QString name = theValue.right( theValue.length()-pos-1 ), @@ -71,15 +66,15 @@ namespace SMESH return val; } - vtkFloatingPointType + double GetFloat( const QString& theValue, const QString& theSection, - vtkFloatingPointType theDefault ) + double theDefault ) { - vtkFloatingPointType val = theDefault; + double val = theDefault; SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr(); if( mgr ) - val = (vtkFloatingPointType) mgr->doubleValue( theSection, theValue, theDefault ); + val = (double) mgr->doubleValue( theSection, theValue, theDefault ); return val; } @@ -90,7 +85,7 @@ namespace SMESH { vtkXMLUnstructuredGridWriter* aWriter = vtkXMLUnstructuredGridWriter::New(); aWriter->SetFileName(theFileName); - aWriter->SetInput(theGrid); + aWriter->SetInputData(theGrid); aWriter->SetDataModeToAscii(); if(theGrid->GetNumberOfCells()){ aWriter->Write(); @@ -129,9 +124,9 @@ namespace SMESH void GetColor( const QString& theSect, const QString& theName, - vtkFloatingPointType& r, - vtkFloatingPointType& g, - vtkFloatingPointType& b, + double& r, + double& g, + double& b, const QColor& def ) { int ir( 0 ), ig( 0 ), ib( 0 ); @@ -144,10 +139,10 @@ namespace SMESH void GetColor( const QString& theSect, - const QString& theName, - QColor& color, - int& delta, - QString def) + const QString& theName, + QColor& color, + int& delta, + QString def) { SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr(); @@ -157,18 +152,18 @@ namespace SMESH } } - std::map GetEntitiesFromObject(SMESH_VisualObj *theObject) { - std::map entities; - entities.insert(std::pair(SMDSAbs_0DElement, - theObject ? theObject->GetNbEntities(SMDSAbs_0DElement) : 0)); - entities.insert(std::pair(SMDSAbs_Ball, - theObject ? theObject->GetNbEntities(SMDSAbs_Ball) : 0)); - entities.insert(std::pair(SMDSAbs_Edge, - theObject ? theObject->GetNbEntities(SMDSAbs_Edge) : 0)); - entities.insert(std::pair(SMDSAbs_Face, - theObject ? theObject->GetNbEntities(SMDSAbs_Face) : 0)); - entities.insert(std::pair(SMDSAbs_Volume, - theObject ? theObject->GetNbEntities(SMDSAbs_Volume) : 0)); + std::map GetEntitiesFromObject(SMESH_VisualObj *theObject) { + std::map entities; + entities.insert(std::pair(SMDSAbs_0DElement, + theObject ? theObject->GetNbEntities(SMDSAbs_0DElement) : 0)); + entities.insert(std::pair(SMDSAbs_Ball, + theObject ? theObject->GetNbEntities(SMDSAbs_Ball) : 0)); + entities.insert(std::pair(SMDSAbs_Edge, + theObject ? theObject->GetNbEntities(SMDSAbs_Edge) : 0)); + entities.insert(std::pair(SMDSAbs_Face, + theObject ? theObject->GetNbEntities(SMDSAbs_Face) : 0)); + entities.insert(std::pair(SMDSAbs_Volume, + theObject ? theObject->GetNbEntities(SMDSAbs_Volume) : 0)); return entities; }