X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_FixedPoints1D.cxx;h=71c23b2b581442f0f8fe421db06fb951eb9daf4b;hb=f20db3c5b3a2f78f9ff7579a59c7bd1d3eece20a;hp=b5934045b4fa19d3558f49faca6e0ac3453548dd;hpb=8d297d6698f361d4f2dde723050bcfbaea050920;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_FixedPoints1D.cxx b/src/StdMeshers/StdMeshers_FixedPoints1D.cxx index b5934045b..71c23b2b5 100644 --- a/src/StdMeshers/StdMeshers_FixedPoints1D.cxx +++ b/src/StdMeshers/StdMeshers_FixedPoints1D.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 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 @@ -35,9 +35,8 @@ using namespace std; */ //============================================================================= -StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(int hypId, - SMESH_Gen * gen) - :SMESH_Hypothesis(hypId, gen) +StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(int hypId, SMESH_Gen * gen) + :StdMeshers_Reversible1D(hypId, gen) { _name = "FixedPoints1D"; _param_algo_dim = 1; @@ -61,47 +60,30 @@ StdMeshers_FixedPoints1D::~StdMeshers_FixedPoints1D() */ //============================================================================= -void StdMeshers_FixedPoints1D::SetPoints(std::vector& listParams) - throw(SALOME_Exception) +void StdMeshers_FixedPoints1D::SetPoints(const std::vector& listParams) { - _params = listParams; - NotifySubMeshesHypothesisModification(); -} - -//============================================================================= -/*! - * - */ -//============================================================================= - -void StdMeshers_FixedPoints1D::SetNbSegments(std::vector& listNbSeg) - throw(SALOME_Exception) -{ - _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(); @@ -137,7 +119,7 @@ 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); @@ -202,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 );