X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_FixedPoints1D.cxx;h=71c23b2b581442f0f8fe421db06fb951eb9daf4b;hp=83e19296b14883526b2f8e1a45b81c4cce092a75;hb=b09372829929f8f561495d6c16527134971a1909;hpb=59627b07d70f4caa4c768be6805334d2610fa54c diff --git a/src/StdMeshers/StdMeshers_FixedPoints1D.cxx b/src/StdMeshers/StdMeshers_FixedPoints1D.cxx index 83e19296b..71c23b2b5 100644 --- a/src/StdMeshers/StdMeshers_FixedPoints1D.cxx +++ b/src/StdMeshers/StdMeshers_FixedPoints1D.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH : implementaion of SMESH idl descriptions +// SMESH SMESH : implementation of SMESH idl descriptions // File : StdMeshers_FixedPoints1D.cxx // Author : Damien COQUERET, OCC // Module : SMESH @@ -27,16 +27,6 @@ #include "SMESH_Algo.hxx" #include "SMESH_Mesh.hxx" -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include - using namespace std; //============================================================================= @@ -45,19 +35,18 @@ using namespace std; */ //============================================================================= -StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(int hypId, int studyId, - SMESH_Gen * gen) - :SMESH_Hypothesis(hypId, studyId, gen) +StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(int hypId, SMESH_Gen * gen) + :StdMeshers_Reversible1D(hypId, gen) { _name = "FixedPoints1D"; - _param_algo_dim = 1; + _param_algo_dim = 1; _nbsegs.reserve( 1 ); _nbsegs.push_back( 1 ); } //============================================================================= /*! - * + * */ //============================================================================= @@ -71,47 +60,30 @@ StdMeshers_FixedPoints1D::~StdMeshers_FixedPoints1D() */ //============================================================================= -void StdMeshers_FixedPoints1D::SetPoints(std::vector& listParams) - throw(SALOME_Exception) -{ - _params = listParams; - NotifySubMeshesHypothesisModification(); -} - -//============================================================================= -/*! - * - */ -//============================================================================= - -void StdMeshers_FixedPoints1D::SetNbSegments(std::vector& listNbSeg) - throw(SALOME_Exception) +void StdMeshers_FixedPoints1D::SetPoints(const std::vector& listParams) { - _nbsegs = listNbSeg; - NotifySubMeshesHypothesisModification(); + if ( _params != listParams ) + { + _params = listParams; + NotifySubMeshesHypothesisModification(); + } } //============================================================================= /*! - * + * */ //============================================================================= -void StdMeshers_FixedPoints1D::SetReversedEdges( std::vector& ids ) +void StdMeshers_FixedPoints1D::SetNbSegments(const std::vector& listNbSeg) { - if ( ids != _edgeIDs ) { - _edgeIDs = ids; - + if ( _nbsegs != listNbSeg ) + { + _nbsegs = listNbSeg; NotifySubMeshesHypothesisModification(); } } -//============================================================================= -/*! - * - */ -//============================================================================= - ostream & StdMeshers_FixedPoints1D::SaveTo(ostream & save) { int listSize = _params.size(); @@ -140,14 +112,14 @@ ostream & StdMeshers_FixedPoints1D::SaveTo(ostream & save) //============================================================================= /*! - * + * */ //============================================================================= istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load) { bool isOK = true; - int intVal; + smIdType intVal; double dblVal; isOK = static_cast(load >> intVal); @@ -185,28 +157,6 @@ istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load) return load; } -//============================================================================= -/*! - * - */ -//============================================================================= - -ostream & operator <<(ostream & save, StdMeshers_FixedPoints1D & hyp) -{ - return hyp.SaveTo( save ); -} - -//============================================================================= -/*! - * - */ -//============================================================================= - -istream & operator >>(istream & load, StdMeshers_FixedPoints1D & hyp) -{ - return hyp.LoadFrom( load ); -} - //================================================================================ /*! * \brief Initialize start and end length by the mesh built on the geometry @@ -234,7 +184,7 @@ bool StdMeshers_FixedPoints1D::SetParametersByMesh(const SMESH_Mesh* theMesh, */ //================================================================================ -bool StdMeshers_FixedPoints1D::SetParametersByDefaults(const TDefaults& dflts, +bool StdMeshers_FixedPoints1D::SetParametersByDefaults(const TDefaults& /*dflts*/, const SMESH_Mesh* /*mesh*/) { _nbsegs.reserve( 1 );