Remove useless files, declarations and implementations of constructors

of classes are moved to SMESH.Algo.*xx

SMESH_*D_Algo.*xx
This commit is contained in:
eap 2012-08-29 16:43:11 +00:00
parent a9de1c5c2a
commit 36df571332
12 changed files with 101 additions and 461 deletions

View File

@ -34,10 +34,6 @@ salomeinclude_HEADERS = \
SMESH_Hypothesis.hxx \
SMESH_HypoFilter.hxx \
SMESH_Algo.hxx \
SMESH_0D_Algo.hxx \
SMESH_1D_Algo.hxx \
SMESH_2D_Algo.hxx \
SMESH_3D_Algo.hxx \
SMESH_Group.hxx \
SMESH_MeshEditor.hxx \
SMESH_Pattern.hxx \
@ -56,10 +52,6 @@ dist_libSMESHimpl_la_SOURCES = \
SMESH_subMesh.cxx \
SMESH_Hypothesis.cxx \
SMESH_Algo.cxx \
SMESH_0D_Algo.cxx \
SMESH_1D_Algo.cxx \
SMESH_2D_Algo.cxx \
SMESH_3D_Algo.cxx \
SMESH_Group.cxx \
SMESH_MeshEditor.cxx \
SMESH_Pattern.cxx \

View File

@ -1,53 +0,0 @@
// Copyright (C) 2007-2012 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
//
// 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.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_0D_Algo.cxx
// Module : SMESH
// $Header$
//
#include "SMESH_0D_Algo.hxx"
#include "SMESH_Gen.hxx"
//=============================================================================
/*!
*
*/
//=============================================================================
SMESH_0D_Algo::SMESH_0D_Algo(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_Algo(hypId, studyId, gen)
{
_type = ALGO_0D;
gen->_map0D_Algo[hypId] = this;
}
//=============================================================================
/*!
*
*/
//=============================================================================
SMESH_0D_Algo::~SMESH_0D_Algo()
{
}

View File

@ -1,42 +0,0 @@
// Copyright (C) 2007-2012 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
//
// 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.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_0D_Algo.hxx
// Module : SMESH
// $Header$
//
#ifndef _SMESH_0D_ALGO_HXX_
#define _SMESH_0D_ALGO_HXX_
#include "SMESH_SMESH.hxx"
#include "SMESH_Algo.hxx"
class SMESH_EXPORT SMESH_0D_Algo: public SMESH_Algo
{
public:
SMESH_0D_Algo(int hypId, int studyId, SMESH_Gen* gen);
virtual ~SMESH_0D_Algo();
};
#endif

View File

@ -1,58 +0,0 @@
// Copyright (C) 2007-2012 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
//
// 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.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_1D_Algo.cxx
// Author : Paul RASCLE, EDF
// Module : SMESH
// $Header$
//
#include "SMESH_1D_Algo.hxx"
#include "SMESH_Gen.hxx"
#include "SMESH_subMesh.hxx"
using namespace std;
//=============================================================================
/*!
*
*/
//=============================================================================
SMESH_1D_Algo::SMESH_1D_Algo(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_Algo(hypId, studyId, gen)
{
// _compatibleHypothesis.push_back("hypothese_1D_bidon");
_type = ALGO_1D;
gen->_map1D_Algo[hypId] = this;
}
//=============================================================================
/*!
*
*/
//=============================================================================
SMESH_1D_Algo::~SMESH_1D_Algo()
{
}

View File

@ -1,44 +0,0 @@
// Copyright (C) 2007-2012 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
//
// 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.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_1D_Algo.hxx
// Author : Paul RASCLE, EDF
// Module : SMESH
// $Header$
//
#ifndef _SMESH_1D_ALGO_HXX_
#define _SMESH_1D_ALGO_HXX_
#include "SMESH_SMESH.hxx"
#include "SMESH_Algo.hxx"
class SMESH_EXPORT SMESH_1D_Algo:
public SMESH_Algo
{
public:
SMESH_1D_Algo(int hypId, int studyId, SMESH_Gen* gen);
virtual ~SMESH_1D_Algo();
};
#endif

View File

@ -1,97 +0,0 @@
// Copyright (C) 2007-2012 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
//
// 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.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_2D_Algo.cxx
// Author : Paul RASCLE, EDF
// Module : SMESH
// $Header$
//
#include "SMESH_2D_Algo.hxx"
#include "SMESH_Gen.hxx"
#include "utilities.h"
#include <TopExp_Explorer.hxx>
#include <TopExp.hxx>
#include <TopoDS.hxx>
using namespace std;
//=============================================================================
/*!
*
*/
//=============================================================================
SMESH_2D_Algo::SMESH_2D_Algo(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_Algo(hypId, studyId, gen)
{
// _compatibleHypothesis.push_back("hypothese_2D_bidon");
_type = ALGO_2D;
gen->_map2D_Algo[hypId] = this;
}
//=============================================================================
/*!
*
*/
//=============================================================================
SMESH_2D_Algo::~SMESH_2D_Algo()
{
}
//=============================================================================
/*!
*
*/
//=============================================================================
int SMESH_2D_Algo::NumberOfWires(const TopoDS_Shape& S)
{
int i = 0;
for (TopExp_Explorer exp(S,TopAbs_WIRE); exp.More(); exp.Next())
i++;
return i;
}
//=============================================================================
/*!
*
*/
//=============================================================================
int SMESH_2D_Algo::NumberOfPoints(SMESH_Mesh& aMesh, const TopoDS_Wire& W)
{
int nbPoints = 0;
for (TopExp_Explorer exp(W,TopAbs_EDGE); exp.More(); exp.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
int nb = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes();
if(_quadraticMesh)
nb = nb/2;
nbPoints += nb + 1; // internal points plus 1 vertex of 2 (last point ?)
}
return nbPoints;
}

View File

@ -1,50 +0,0 @@
// Copyright (C) 2007-2012 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
//
// 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.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_2D_Algo.hxx
// Author : Paul RASCLE, EDF
// Module : SMESH
// $Header$
//
#ifndef _SMESH_2D_ALGO_HXX_
#define _SMESH_2D_ALGO_HXX_
#include "SMESH_SMESH.hxx"
#include "SMESH_Algo.hxx"
#include "SMESH_subMesh.hxx"
#include "TopoDS_Wire.hxx"
class SMESH_EXPORT SMESH_2D_Algo:
public SMESH_Algo
{
public:
SMESH_2D_Algo(int hypId, int studyId, SMESH_Gen* gen);
virtual ~SMESH_2D_Algo();
int NumberOfWires(const TopoDS_Shape& S);
int NumberOfPoints(SMESH_Mesh& aMesh,const TopoDS_Wire& W);
};
#endif

View File

@ -1,60 +0,0 @@
// Copyright (C) 2007-2012 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
//
// 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.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_3D_Algo.cxx
// Author : Paul RASCLE, EDF
// Module : SMESH
// $Header$
//
#include "SMESH_3D_Algo.hxx"
#include "SMESH_Gen.hxx"
#include "utilities.h"
using namespace std;
//=============================================================================
/*!
*
*/
//=============================================================================
SMESH_3D_Algo::SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_Algo(hypId, studyId, gen)
{
// _compatibleHypothesis.push_back("hypothese_3D_bidon");
_type = ALGO_3D;
gen->_map3D_Algo[hypId] = this;
}
//=============================================================================
/*!
*
*/
//=============================================================================
SMESH_3D_Algo::~SMESH_3D_Algo()
{
}

View File

@ -1,45 +0,0 @@
// Copyright (C) 2007-2012 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
//
// 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.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// SMESH SMESH : implementaion of SMESH idl descriptions
// File : SMESH_3D_Algo.hxx
// Author : Paul RASCLE, EDF
// Module : SMESH
// $Header$
//
#ifndef _SMESH_3D_ALGO_HXX_
#define _SMESH_3D_ALGO_HXX_
#include "SMESH_SMESH.hxx"
#include "SMESH_Algo.hxx"
class SMESH_EXPORT SMESH_3D_Algo:
public SMESH_Algo
{
public:
SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen);
virtual ~SMESH_3D_Algo();
};
#endif

View File

@ -39,6 +39,7 @@
#include "SMESH_HypoFilter.hxx"
#include "SMESH_Mesh.hxx"
#include "SMESH_TypeDefs.hxx"
#include "SMESH_subMesh.hxx"
#include <Basics_OCCTVersion.hxx>
@ -49,6 +50,7 @@
#include <GeomAdaptor_Curve.hxx>
#include <Geom_Surface.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopLoc_Location.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
@ -56,6 +58,7 @@
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
@ -96,6 +99,41 @@ SMESH_Algo::~SMESH_Algo()
{
}
//=============================================================================
/*!
*
*/
//=============================================================================
SMESH_0D_Algo::SMESH_0D_Algo(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_Algo(hypId, studyId, gen)
{
_shapeType = (1 << TopAbs_VERTEX);
_type = ALGO_0D;
gen->_map0D_Algo[hypId] = this;
}
SMESH_1D_Algo::SMESH_1D_Algo(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_Algo(hypId, studyId, gen)
{
_shapeType = (1 << TopAbs_EDGE);
_type = ALGO_1D;
gen->_map1D_Algo[hypId] = this;
}
SMESH_2D_Algo::SMESH_2D_Algo(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_Algo(hypId, studyId, gen)
{
_shapeType = (1 << TopAbs_FACE);
_type = ALGO_2D;
gen->_map2D_Algo[hypId] = this;
}
SMESH_3D_Algo::SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen)
: SMESH_Algo(hypId, studyId, gen)
{
_shapeType = (1 << TopAbs_SOLID);
_type = ALGO_3D;
gen->_map3D_Algo[hypId] = this;
}
//=============================================================================
/*!
* Usually an algoritm has nothing to save
@ -777,3 +815,38 @@ void SMESH_Algo::addBadInputElement(const SMDS_MeshElement* elem)
if ( elem )
_badInputElements.push_back( elem );
}
//=============================================================================
/*!
*
*/
//=============================================================================
int SMESH_Algo::NumberOfWires(const TopoDS_Shape& S)
{
int i = 0;
for (TopExp_Explorer exp(S,TopAbs_WIRE); exp.More(); exp.Next())
i++;
return i;
}
//=============================================================================
/*!
*
*/
//=============================================================================
int SMESH_Algo::NumberOfPoints(SMESH_Mesh& aMesh, const TopoDS_Wire& W)
{
int nbPoints = 0;
for (TopExp_Explorer exp(W,TopAbs_EDGE); exp.More(); exp.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
int nb = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes();
if(_quadraticMesh)
nb = nb/2;
nbPoints += nb + 1; // internal points plus 1 vertex of 2 (last point ?)
}
return nbPoints;
}

View File

@ -47,6 +47,7 @@ class SMESH_Gen;
class SMESH_Mesh;
class SMESH_HypoFilter;
class TopoDS_Vertex;
class TopoDS_Wire;
class TopoDS_Face;
class TopoDS_Shape;
class SMESHDS_Mesh;
@ -301,6 +302,9 @@ public:
*/
static bool FaceNormal(const SMDS_MeshElement* F, gp_XYZ& normal, bool normalized=true);
static int NumberOfWires(const TopoDS_Shape& S);
int NumberOfPoints(SMESH_Mesh& aMesh,const TopoDS_Wire& W);
/*!
* \brief Return continuity of two edges
* \param E1 - the 1st edge
@ -384,4 +388,28 @@ protected:
volatile bool _computeCanceled; //!< is set to True while computing to stop it
};
class SMESH_EXPORT SMESH_0D_Algo: public SMESH_Algo
{
public:
SMESH_0D_Algo(int hypId, int studyId, SMESH_Gen* gen);
};
class SMESH_EXPORT SMESH_1D_Algo: public SMESH_Algo
{
public:
SMESH_1D_Algo(int hypId, int studyId, SMESH_Gen* gen);
};
class SMESH_EXPORT SMESH_2D_Algo: public SMESH_Algo
{
public:
SMESH_2D_Algo(int hypId, int studyId, SMESH_Gen* gen);
};
class SMESH_EXPORT SMESH_3D_Algo: public SMESH_Algo
{
public:
SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen);
};
#endif

View File

@ -35,10 +35,6 @@
#include "SMESH_Hypothesis.hxx"
#include "SMESH_ComputeError.hxx"
#include "SMESH_Algo.hxx"
#include "SMESH_0D_Algo.hxx"
#include "SMESH_1D_Algo.hxx"
#include "SMESH_2D_Algo.hxx"
#include "SMESH_3D_Algo.hxx"
#include "SMESH_Mesh.hxx"
#include "chrono.hxx"