mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 18:20:34 +05:00
SMH: Removing obsolete files
This commit is contained in:
parent
b03829dde9
commit
b9bbbb64bf
File diff suppressed because it is too large
Load Diff
@ -1,138 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_Hexa_3D.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_HEXA_3D_HXX_
|
||||
#define _SMESH_HEXA_3D_HXX_
|
||||
|
||||
#include "SMESH_3D_Algo.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
#include "SMESH_Quadrangle_2D.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
typedef struct point3Dstruct
|
||||
{
|
||||
const SMDS_MeshNode * node;
|
||||
} Point3DStruct;
|
||||
|
||||
typedef double Pt3[3];
|
||||
|
||||
typedef struct conv2dstruct
|
||||
{
|
||||
double a1; // X = a1*x + b1*y + c1
|
||||
double b1; // Y = a2*x + b2*y + c2
|
||||
double c1; // a1, b1 a2, b2 in {-1,0,1}
|
||||
double a2; // c1, c2 in {0,1}
|
||||
double b2;
|
||||
double c2;
|
||||
int ia; // I = ia*i + ib*j + ic
|
||||
int ib;
|
||||
int ic;
|
||||
int ja; // J = ja*i + jb*j + jc
|
||||
int jb;
|
||||
int jc;
|
||||
} Conv2DStruct;
|
||||
|
||||
typedef struct cubeStruct
|
||||
{
|
||||
TopoDS_Vertex V000;
|
||||
TopoDS_Vertex V001;
|
||||
TopoDS_Vertex V010;
|
||||
TopoDS_Vertex V011;
|
||||
TopoDS_Vertex V100;
|
||||
TopoDS_Vertex V101;
|
||||
TopoDS_Vertex V110;
|
||||
TopoDS_Vertex V111;
|
||||
faceQuadStruct* quad_X0;
|
||||
faceQuadStruct* quad_X1;
|
||||
faceQuadStruct* quad_Y0;
|
||||
faceQuadStruct* quad_Y1;
|
||||
faceQuadStruct* quad_Z0;
|
||||
faceQuadStruct* quad_Z1;
|
||||
Point3DStruct* np; // normalised 3D coordinates
|
||||
} CubeStruct;
|
||||
|
||||
class SMESH_Hexa_3D:
|
||||
public SMESH_3D_Algo
|
||||
{
|
||||
public:
|
||||
SMESH_Hexa_3D(int hypId, int studyId, SMESH_Gen* gen);
|
||||
virtual ~SMESH_Hexa_3D();
|
||||
|
||||
virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape)
|
||||
throw (SALOME_Exception);
|
||||
|
||||
ostream & SaveTo(ostream & save);
|
||||
istream & LoadFrom(istream & load);
|
||||
friend ostream & operator << (ostream & save, SMESH_Hexa_3D & hyp);
|
||||
friend istream & operator >> (istream & load, SMESH_Hexa_3D & hyp);
|
||||
|
||||
protected:
|
||||
TopoDS_Edge
|
||||
EdgeNotInFace(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
const TopoDS_Face& aFace,
|
||||
const TopoDS_Vertex& aVertex,
|
||||
const TopTools_IndexedDataMapOfShapeListOfShape& MS);
|
||||
|
||||
int GetFaceIndex(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
const vector<SMESH_subMesh*>& meshFaces,
|
||||
const TopoDS_Vertex& V0,
|
||||
const TopoDS_Vertex& V1,
|
||||
const TopoDS_Vertex& V2,
|
||||
const TopoDS_Vertex& V3);
|
||||
|
||||
void GetConv2DCoefs(const faceQuadStruct& quad,
|
||||
const TopoDS_Shape& aShape,
|
||||
const TopoDS_Vertex& V0,
|
||||
const TopoDS_Vertex& V1,
|
||||
const TopoDS_Vertex& V2,
|
||||
const TopoDS_Vertex& V3,
|
||||
Conv2DStruct& conv);
|
||||
|
||||
void GetPoint(Pt3 p,
|
||||
int i, int j, int k,
|
||||
int nbx, int nby, int nbz,
|
||||
Point3DStruct *np,
|
||||
const SMESHDS_Mesh* meshDS);
|
||||
|
||||
CubeStruct _cube;
|
||||
FaceQuadStruct* _quads[6];
|
||||
int _indX0;
|
||||
int _indX1;
|
||||
int _indY0;
|
||||
int _indY1;
|
||||
int _indZ0;
|
||||
int _indZ1;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,68 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_HypothesisCreator.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_HYPOTHESISCREATOR_HXX_
|
||||
#define _SMESH_HYPOTHESISCREATOR_HXX_
|
||||
|
||||
#include "SMESH_HypothesisFactory.hxx"
|
||||
|
||||
class SMESH_gen;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Specific Hypothesis Creators are generated with a template which inherits a
|
||||
* generic hypothesis creator. Each creator returns an hypothesis of the type
|
||||
* given in the template.
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
template <class T> class SMESH_HypothesisCreator
|
||||
: public GenericHypothesisCreator
|
||||
{
|
||||
public:
|
||||
// map<int, T*> _instances;
|
||||
|
||||
// virtual T* GetInstance(int hypId)
|
||||
// {
|
||||
// if (_instances.find(hypId) != _instances.end())
|
||||
// return _instances[hypId];
|
||||
// else
|
||||
// return NULL;
|
||||
// }
|
||||
|
||||
virtual T* Create (int hypId, int studyId, SMESH_Gen* gen)
|
||||
{
|
||||
T* anInstance= new T(hypId, studyId, gen);
|
||||
// _gen->StoreHypothesisInstance(anInstance);
|
||||
// _instances[hypId] = anInstance;
|
||||
return anInstance;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -1,179 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_HypothesisFactory.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_HypothesisFactory.hxx"
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
#include "SMESH_HypothesisCreator.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
// Add new hypothesis here (include file)
|
||||
//---------------------------------------
|
||||
#include "SMESH_LocalLength.hxx"
|
||||
#include "SMESH_LengthFromEdges.hxx"
|
||||
#include "SMESH_NumberOfSegments.hxx"
|
||||
#include "SMESH_MaxElementArea.hxx"
|
||||
#include "SMESH_MaxElementVolume.hxx"
|
||||
#include "SMESH_Regular_1D.hxx"
|
||||
#include "SMESH_MEFISTO_2D.hxx"
|
||||
#include "SMESH_Quadrangle_2D.hxx"
|
||||
#include "SMESH_Hexa_3D.hxx"
|
||||
#ifdef HAVE_NETGEN
|
||||
#include "SMESH_NETGEN_3D.hxx"
|
||||
#endif
|
||||
//---------------------------------------
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Specific Hypothesis Creators are generated with a template which inherits a
|
||||
* generic hypothesis creator. Each creator returns an hypothesis of the type
|
||||
* given in the template.
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
// template <class T> class HypothesisCreator: public GenericHypothesisCreator
|
||||
// {
|
||||
// public:
|
||||
// virtual T* Create (int hypId)
|
||||
// {
|
||||
// // return new T(hypId);
|
||||
// };
|
||||
|
||||
// };
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Constructor: instanciate specific hypothesis creators, fill a private map
|
||||
* indexed by hypothesis names. THIS METHOD MUST BE COMPLETED WHEN A NEW
|
||||
* HYPOTHESIS IS ADDED.
|
||||
* Specific hypothesis creator are defined with the above template.
|
||||
* Hypothesis names are related to the corresponding class names:
|
||||
* prefix = SMESH_ ; suffix = .
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_HypothesisFactory::SMESH_HypothesisFactory()
|
||||
{
|
||||
_hypId = 0;
|
||||
|
||||
// Add new hypothesis here (creators)
|
||||
//---------------------------------------
|
||||
_creatorMap["LocalLength"] = new SMESH_HypothesisCreator<SMESH_LocalLength>;
|
||||
_creatorMap["NumberOfSegments"] = new SMESH_HypothesisCreator<SMESH_NumberOfSegments>;
|
||||
_creatorMap["LengthFromEdges"] = new SMESH_HypothesisCreator<SMESH_LengthFromEdges>;
|
||||
_creatorMap["MaxElementArea"] = new SMESH_HypothesisCreator<SMESH_MaxElementArea>;
|
||||
_creatorMap["MaxElementVolume"] = new SMESH_HypothesisCreator<SMESH_MaxElementVolume>;
|
||||
_creatorMap["Regular_1D"] = new SMESH_HypothesisCreator<SMESH_Regular_1D>;
|
||||
_creatorMap["MEFISTO_2D"] = new SMESH_HypothesisCreator<SMESH_MEFISTO_2D>;
|
||||
_creatorMap["Quadrangle_2D"] = new SMESH_HypothesisCreator<SMESH_Quadrangle_2D>;
|
||||
_creatorMap["Hexa_3D"] = new SMESH_HypothesisCreator<SMESH_Hexa_3D>;
|
||||
#ifdef HAVE_NETGEN
|
||||
_creatorMap["NETGEN_3D"] = new SMESH_HypothesisCreator<SMESH_NETGEN_3D>;
|
||||
#endif
|
||||
//---------------------------------------
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Destructor: deletes specific hypothesis creators instanciated in the
|
||||
* constructor.
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_HypothesisFactory::~SMESH_HypothesisFactory()
|
||||
{
|
||||
map<string, GenericHypothesisCreator*>::iterator it;
|
||||
for (it = _creatorMap.begin(); it != _creatorMap.end(); it++)
|
||||
{
|
||||
delete (*it).second;
|
||||
}
|
||||
_creatorMap.clear();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Hypothesis* SMESH_HypothesisFactory::Create(const char* anHypName,
|
||||
int studyId)
|
||||
throw (SALOME_Exception)
|
||||
{
|
||||
MESSAGE("SMESH_HypothesisFactory::Create " << anHypName);
|
||||
if (_creatorMap.find(anHypName) == _creatorMap.end())
|
||||
throw(SALOME_Exception(LOCALIZED("bad hypothesis type name")));
|
||||
SMESH_Hypothesis* myHyp = _creatorMap[anHypName]->Create(_hypId++,
|
||||
studyId,
|
||||
_gen);
|
||||
return myHyp;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
GenericHypothesisCreator*
|
||||
SMESH_HypothesisFactory::GetCreator(const char* anHypName)
|
||||
throw (SALOME_Exception)
|
||||
{
|
||||
MESSAGE("SMESH_HypothesisFactory::GetCreator " << anHypName);
|
||||
if (_creatorMap.find(anHypName) == _creatorMap.end())
|
||||
throw(SALOME_Exception(LOCALIZED("bad hypothesis type name")));
|
||||
return _creatorMap[anHypName];
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
int SMESH_HypothesisFactory::GetANewId()
|
||||
{
|
||||
//MESSAGE("SMESH_HypothesisFactory::GetANewId");
|
||||
return _hypId++;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_HypothesisFactory::SetGen(SMESH_Gen* gen)
|
||||
{
|
||||
//MESSAGE("SMESH_HypothesisFactory::SetGen");
|
||||
_gen = gen;
|
||||
}
|
||||
|
@ -1,69 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_HypothesisFactory.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_HYPOTHESISFACTORY_HXX_
|
||||
#define _SMESH_HYPOTHESISFACTORY_HXX_
|
||||
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
#include <map>
|
||||
|
||||
class SMESH_Gen;
|
||||
|
||||
class GenericHypothesisCreator
|
||||
{
|
||||
public:
|
||||
// virtual SMESH_Hypothesis* GetInstance(int hypId) = 0;
|
||||
virtual SMESH_Hypothesis* Create(int hypId, int studyId, SMESH_Gen* gen) = 0;
|
||||
};
|
||||
|
||||
class SMESH_HypothesisFactory
|
||||
{
|
||||
public:
|
||||
SMESH_HypothesisFactory();
|
||||
virtual ~SMESH_HypothesisFactory();
|
||||
|
||||
void SetGen(SMESH_Gen* gen);
|
||||
|
||||
SMESH_Hypothesis* Create(const char* anHypName, int studyId)
|
||||
throw (SALOME_Exception);
|
||||
|
||||
GenericHypothesisCreator* GetCreator(const char* anHypName)
|
||||
throw (SALOME_Exception);
|
||||
|
||||
int GetANewId();
|
||||
|
||||
private:
|
||||
map<string, GenericHypothesisCreator*> _creatorMap;
|
||||
int _hypId;
|
||||
SMESH_Gen* _gen;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,136 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_LengthFromEdges.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_LengthFromEdges.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_LengthFromEdges::SMESH_LengthFromEdges(int hypId, int studyId, SMESH_Gen* gen)
|
||||
: SMESH_Hypothesis(hypId, studyId, gen)
|
||||
{
|
||||
_mode =1;
|
||||
_name = "LengthFromEdges";
|
||||
// SCRUTE(_name);
|
||||
// SCRUTE(&_name);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_LengthFromEdges::~SMESH_LengthFromEdges()
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_LengthFromEdges::SetMode(int mode)
|
||||
throw (SALOME_Exception)
|
||||
{
|
||||
int oldMode = _mode;
|
||||
if (mode <= 0)
|
||||
throw SALOME_Exception(LOCALIZED("mode must be positive"));
|
||||
_mode = mode;
|
||||
if (oldMode != _mode)
|
||||
NotifySubMeshesHypothesisModification();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
int SMESH_LengthFromEdges::GetMode()
|
||||
{
|
||||
return _mode;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & SMESH_LengthFromEdges::SaveTo(ostream & save)
|
||||
{
|
||||
return save << this;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & SMESH_LengthFromEdges::LoadFrom(istream & load)
|
||||
{
|
||||
return load >> (*this);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & operator << (ostream & save, SMESH_LengthFromEdges & hyp)
|
||||
{
|
||||
save << hyp._mode;
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & operator >> (istream & load, SMESH_LengthFromEdges & hyp)
|
||||
{
|
||||
bool isOK = true;
|
||||
int a;
|
||||
isOK = (load >> a);
|
||||
if (isOK) hyp._mode = a;
|
||||
else load.clear(ios::badbit | load.rdstate());
|
||||
return load;
|
||||
}
|
||||
|
@ -1,56 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_LengthFromEdges.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_LENGTHFROMEDGES_HXX_
|
||||
#define _SMESH_LENGTHFROMEDGES_HXX_
|
||||
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
class SMESH_LengthFromEdges:
|
||||
public SMESH_Hypothesis
|
||||
{
|
||||
public:
|
||||
SMESH_LengthFromEdges(int hypId, int studyId, SMESH_Gen* gen);
|
||||
virtual ~SMESH_LengthFromEdges();
|
||||
|
||||
void SetMode(int mode)
|
||||
throw (SALOME_Exception);
|
||||
|
||||
int GetMode();
|
||||
|
||||
virtual ostream & SaveTo(ostream & save);
|
||||
virtual istream & LoadFrom(istream & load);
|
||||
friend ostream & operator << (ostream & save, SMESH_LengthFromEdges & hyp);
|
||||
friend istream & operator >> (istream & load, SMESH_LengthFromEdges & hyp);
|
||||
|
||||
protected:
|
||||
int _mode;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,136 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_LocalLength.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_LocalLength.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_LocalLength::SMESH_LocalLength(int hypId, int studyId,
|
||||
SMESH_Gen * gen):SMESH_Hypothesis(hypId, studyId, gen)
|
||||
{
|
||||
_length = 1.;
|
||||
_name = "LocalLength";
|
||||
// SCRUTE(_name);
|
||||
// SCRUTE(&_name);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_LocalLength::~SMESH_LocalLength()
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_LocalLength::SetLength(double length) throw(SALOME_Exception)
|
||||
{
|
||||
double oldLength = _length;
|
||||
if (length <= 0)
|
||||
throw SALOME_Exception(LOCALIZED("length must be positive"));
|
||||
_length = length;
|
||||
if (oldLength != _length)
|
||||
NotifySubMeshesHypothesisModification();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
double SMESH_LocalLength::GetLength() const
|
||||
{
|
||||
return _length;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & SMESH_LocalLength::SaveTo(ostream & save)
|
||||
{
|
||||
return save << this;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & SMESH_LocalLength::LoadFrom(istream & load)
|
||||
{
|
||||
return load >> (*this);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & operator <<(ostream & save, SMESH_LocalLength & hyp)
|
||||
{
|
||||
save << hyp._length;
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & operator >>(istream & load, SMESH_LocalLength & hyp)
|
||||
{
|
||||
bool isOK = true;
|
||||
double a;
|
||||
isOK = (load >> a);
|
||||
if (isOK)
|
||||
hyp._length = a;
|
||||
else
|
||||
load.clear(ios::badbit | load.rdstate());
|
||||
return load;
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_LocalLength.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_LOCALLENGTH_HXX_
|
||||
#define _SMESH_LOCALLENGTH_HXX_
|
||||
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
class SMESH_LocalLength:public SMESH_Hypothesis
|
||||
{
|
||||
public:
|
||||
SMESH_LocalLength(int hypId, int studyId, SMESH_Gen * gen);
|
||||
virtual ~ SMESH_LocalLength();
|
||||
|
||||
void SetLength(double length) throw(SALOME_Exception);
|
||||
|
||||
double GetLength() const;
|
||||
|
||||
virtual ostream & SaveTo(ostream & save);
|
||||
virtual istream & LoadFrom(istream & load);
|
||||
friend ostream & operator <<(ostream & save, SMESH_LocalLength & hyp);
|
||||
friend istream & operator >>(istream & load, SMESH_LocalLength & hyp);
|
||||
|
||||
protected:
|
||||
double _length;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,634 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_MEFISTO_2D.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
#include "SMESH_MEFISTO_2D.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
|
||||
#include "SMESH_MaxElementArea.hxx"
|
||||
#include "SMESH_LengthFromEdges.hxx"
|
||||
|
||||
#include "Rn.h"
|
||||
#include "aptrte.h"
|
||||
|
||||
#include "SMDS_MeshElement.hxx"
|
||||
#include "SMDS_MeshNode.hxx"
|
||||
#include "SMDS_EdgePosition.hxx"
|
||||
#include "SMDS_FacePosition.hxx"
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <BRepTools_WireExplorer.hxx>
|
||||
#include <GCPnts_AbscissaPoint.hxx>
|
||||
#include <GCPnts_UniformAbscissa.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
||||
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_MEFISTO_2D::SMESH_MEFISTO_2D(int hypId, int studyId,
|
||||
SMESH_Gen * gen):SMESH_2D_Algo(hypId, studyId, gen)
|
||||
{
|
||||
MESSAGE("SMESH_MEFISTO_2D::SMESH_MEFISTO_2D");
|
||||
_name = "MEFISTO_2D";
|
||||
// _shapeType = TopAbs_FACE;
|
||||
_shapeType = (1 << TopAbs_FACE);
|
||||
_compatibleHypothesis.push_back("MaxElementArea");
|
||||
_compatibleHypothesis.push_back("LengthFromEdges");
|
||||
|
||||
_edgeLength = 0;
|
||||
_maxElementArea = 0;
|
||||
_hypMaxElementArea = NULL;
|
||||
_hypLengthFromEdges = NULL;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_MEFISTO_2D::~SMESH_MEFISTO_2D()
|
||||
{
|
||||
MESSAGE("SMESH_MEFISTO_2D::~SMESH_MEFISTO_2D");
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool SMESH_MEFISTO_2D::CheckHypothesis(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Shape & aShape)
|
||||
{
|
||||
//MESSAGE("SMESH_MEFISTO_2D::CheckHypothesis");
|
||||
|
||||
_hypMaxElementArea = NULL;
|
||||
_hypLengthFromEdges = NULL;
|
||||
|
||||
list <const SMESHDS_Hypothesis * >::const_iterator itl;
|
||||
const SMESHDS_Hypothesis *theHyp;
|
||||
|
||||
const list <const SMESHDS_Hypothesis * >&hyps = GetUsedHypothesis(aMesh, aShape);
|
||||
int nbHyp = hyps.size();
|
||||
if (nbHyp != 1) return false;// only one compatible hypothesis allowed
|
||||
|
||||
itl = hyps.begin();
|
||||
theHyp = (*itl);
|
||||
|
||||
string hypName = theHyp->GetName();
|
||||
int hypId = theHyp->GetID();
|
||||
//SCRUTE(hypName);
|
||||
|
||||
bool isOk = false;
|
||||
|
||||
if (hypName == "MaxElementArea")
|
||||
{
|
||||
_hypMaxElementArea = static_cast<const SMESH_MaxElementArea *>(theHyp);
|
||||
ASSERT(_hypMaxElementArea);
|
||||
_maxElementArea = _hypMaxElementArea->GetMaxArea();
|
||||
_edgeLength = 0;
|
||||
isOk = true;
|
||||
}
|
||||
|
||||
if (hypName == "LengthFromEdges")
|
||||
{
|
||||
_hypLengthFromEdges = static_cast<const SMESH_LengthFromEdges *>(theHyp);
|
||||
ASSERT(_hypLengthFromEdges);
|
||||
_edgeLength = 0;
|
||||
_maxElementArea = 0;
|
||||
isOk = true;
|
||||
}
|
||||
|
||||
if (isOk)
|
||||
{
|
||||
isOk = false;
|
||||
if (_maxElementArea > 0)
|
||||
{
|
||||
_edgeLength = 2 * sqrt(_maxElementArea); // triangles : minorant
|
||||
isOk = true;
|
||||
}
|
||||
else
|
||||
isOk = (_hypLengthFromEdges != NULL); // **** check mode
|
||||
}
|
||||
|
||||
//SCRUTE(_edgeLength);
|
||||
//SCRUTE(_maxElementArea);
|
||||
return isOk;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool SMESH_MEFISTO_2D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape)
|
||||
{
|
||||
MESSAGE("SMESH_MEFISTO_2D::Compute");
|
||||
|
||||
if (_hypLengthFromEdges)
|
||||
_edgeLength = ComputeEdgeElementLength(aMesh, aShape);
|
||||
|
||||
bool isOk = false;
|
||||
const SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
|
||||
SMESH_subMesh *theSubMesh = aMesh.GetSubMesh(aShape);
|
||||
|
||||
const TopoDS_Face & FF = TopoDS::Face(aShape);
|
||||
bool faceIsForward = (FF.Orientation() == TopAbs_FORWARD);
|
||||
TopoDS_Face F = TopoDS::Face(FF.Oriented(TopAbs_FORWARD));
|
||||
|
||||
Z nblf; //nombre de lignes fermees (enveloppe en tete)
|
||||
Z *nudslf = NULL; //numero du dernier sommet de chaque ligne fermee
|
||||
R2 *uvslf = NULL;
|
||||
Z nbpti = 0; //nombre points internes futurs sommets de la triangulation
|
||||
R2 *uvpti = NULL;
|
||||
|
||||
Z nbst;
|
||||
R2 *uvst = NULL;
|
||||
Z nbt;
|
||||
Z *nust = NULL;
|
||||
Z ierr = 0;
|
||||
|
||||
Z nutysu = 1; // 1: il existe un fonction areteideale_()
|
||||
// Z nutysu=0; // 0: on utilise aretmx
|
||||
R aretmx = _edgeLength; // longueur max aretes future triangulation
|
||||
//SCRUTE(aretmx);
|
||||
|
||||
nblf = NumberOfWires(F);
|
||||
//SCRUTE(nblf);
|
||||
|
||||
nudslf = new Z[1 + nblf];
|
||||
nudslf[0] = 0;
|
||||
int iw = 1;
|
||||
int nbpnt = 0;
|
||||
|
||||
const TopoDS_Wire OW1 = BRepTools::OuterWire(F);
|
||||
nbpnt += NumberOfPoints(aMesh, OW1);
|
||||
nudslf[iw++] = nbpnt;
|
||||
//SCRUTE(nbpnt);
|
||||
|
||||
for (TopExp_Explorer exp(F, TopAbs_WIRE); exp.More(); exp.Next())
|
||||
{
|
||||
const TopoDS_Wire & W = TopoDS::Wire(exp.Current());
|
||||
if (!OW1.IsSame(W))
|
||||
{
|
||||
nbpnt += NumberOfPoints(aMesh, W);
|
||||
nudslf[iw++] = nbpnt;
|
||||
//SCRUTE(nbpnt);
|
||||
}
|
||||
}
|
||||
|
||||
uvslf = new R2[nudslf[nblf]];
|
||||
//SCRUTE(nudslf[nblf]);
|
||||
int m = 0;
|
||||
|
||||
map<int, const SMDS_MeshNode*> mefistoToDS; // correspondence mefisto index--> points IDNodes
|
||||
TopoDS_Wire OW = BRepTools::OuterWire(F);
|
||||
LoadPoints(aMesh, F, OW, uvslf, m, mefistoToDS);
|
||||
//SCRUTE(m);
|
||||
|
||||
for (TopExp_Explorer exp(F, TopAbs_WIRE); exp.More(); exp.Next())
|
||||
{
|
||||
const TopoDS_Wire & W = TopoDS::Wire(exp.Current());
|
||||
if (!OW.IsSame(W))
|
||||
{
|
||||
LoadPoints(aMesh, F, W, uvslf, m, mefistoToDS);
|
||||
//SCRUTE(m);
|
||||
}
|
||||
}
|
||||
// SCRUTE(nudslf[nblf]);
|
||||
// for (int i=0; i<=nblf; i++)
|
||||
// {
|
||||
// MESSAGE(" -+- " <<i<< " "<< nudslf[i]);
|
||||
// }
|
||||
// for (int i=0; i<nudslf[nblf]; i++)
|
||||
// {
|
||||
// MESSAGE(" -+- " <<i<< " "<< uvslf[i]);
|
||||
// }
|
||||
// SCRUTE(nutysu);
|
||||
// SCRUTE(aretmx);
|
||||
// SCRUTE(nblf);
|
||||
|
||||
MESSAGE("MEFISTO triangulation ...");
|
||||
uvst = NULL;
|
||||
nust = NULL;
|
||||
aptrte(nutysu, aretmx,
|
||||
nblf, nudslf, uvslf, nbpti, uvpti, nbst, uvst, nbt, nust, ierr);
|
||||
|
||||
if (ierr == 0)
|
||||
{
|
||||
MESSAGE("... End Triangulation Generated Triangle Number " << nbt);
|
||||
MESSAGE(" Node Number " << nbst);
|
||||
//SCRUTE(nbst);
|
||||
//SCRUTE(nbt);
|
||||
StoreResult(aMesh, nbst, uvst, nbt, nust, F,
|
||||
faceIsForward, mefistoToDS);
|
||||
isOk = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
MESSAGE("Error in Triangulation");
|
||||
isOk = false;
|
||||
}
|
||||
if (nudslf != NULL)
|
||||
delete[]nudslf;
|
||||
if (uvslf != NULL)
|
||||
delete[]uvslf;
|
||||
if (uvst != NULL)
|
||||
delete[]uvst;
|
||||
if (nust != NULL)
|
||||
delete[]nust;
|
||||
return isOk;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_MEFISTO_2D::LoadPoints(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Face & FF,
|
||||
const TopoDS_Wire & WW, R2 * uvslf, int &m,
|
||||
map<int, const SMDS_MeshNode*>&mefistoToDS)
|
||||
{
|
||||
MESSAGE("SMESH_MEFISTO_2D::LoadPoints");
|
||||
|
||||
SMDS_Mesh * meshDS = aMesh.GetMeshDS();
|
||||
|
||||
double scalex;
|
||||
double scaley;
|
||||
TopoDS_Face F = TopoDS::Face(FF.Oriented(TopAbs_FORWARD));
|
||||
ComputeScaleOnFace(aMesh, F, scalex, scaley);
|
||||
|
||||
TopoDS_Wire W = TopoDS::Wire(WW.Oriented(TopAbs_FORWARD));
|
||||
BRepTools_WireExplorer wexp(W, F);
|
||||
for (wexp.Init(W, F); wexp.More(); wexp.Next())
|
||||
{
|
||||
const TopoDS_Edge & E = wexp.Current();
|
||||
|
||||
// --- IDNodes of first and last Vertex
|
||||
|
||||
TopoDS_Vertex VFirst, VLast;
|
||||
TopExp::Vertices(E, VFirst, VLast); // corresponds to f and l
|
||||
|
||||
ASSERT(!VFirst.IsNull());
|
||||
SMDS_Iterator<const SMDS_MeshNode *> * lid=
|
||||
aMesh.GetSubMesh(VFirst)->GetSubMeshDS()->GetNodes();
|
||||
const SMDS_MeshNode* idFirst = lid->next();
|
||||
delete lid;
|
||||
|
||||
ASSERT(!VLast.IsNull());
|
||||
lid=aMesh.GetSubMesh(VLast)->GetSubMeshDS()->GetNodes();
|
||||
const SMDS_MeshNode* idLast = lid->next();
|
||||
delete lid;
|
||||
|
||||
// --- edge internal IDNodes (relies on good order storage, not checked)
|
||||
|
||||
int nbPoints = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes();
|
||||
//SCRUTE(nbPoints);
|
||||
|
||||
double f, l;
|
||||
Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(E, F, f, l);
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshNode *> * ite=
|
||||
aMesh.GetSubMesh(E)->GetSubMeshDS()->GetNodes();
|
||||
|
||||
bool isForward = (E.Orientation() == TopAbs_FORWARD);
|
||||
map<double, const SMDS_MeshNode*> params;
|
||||
|
||||
while(ite->more())
|
||||
{
|
||||
const SMDS_MeshNode * node = ite->next();
|
||||
const SMDS_EdgePosition* epos
|
||||
= static_cast<const SMDS_EdgePosition*>(node->GetPosition());
|
||||
double param = epos->GetUParameter();
|
||||
params[param] = node;
|
||||
}
|
||||
delete ite;
|
||||
// --- load 2D values into MEFISTO structure,
|
||||
// add IDNodes in mefistoToDS map
|
||||
|
||||
if (E.Orientation() == TopAbs_FORWARD)
|
||||
{
|
||||
gp_Pnt2d p = C2d->Value(f); // first point = Vertex Forward
|
||||
uvslf[m].x = scalex * p.X();
|
||||
uvslf[m].y = scaley * p.Y();
|
||||
mefistoToDS[m + 1] = idFirst;
|
||||
//MESSAGE(" "<<m<<" "<<mefistoToDS[m+1]);
|
||||
//MESSAGE("__ f "<<f<<" "<<uvslf[m].x <<" "<<uvslf[m].y);
|
||||
m++;
|
||||
map<double, const SMDS_MeshNode*>::iterator itp = params.begin();
|
||||
for (int i = 1; i <= nbPoints; i++) // nbPoints internal
|
||||
{
|
||||
double param = (*itp).first;
|
||||
gp_Pnt2d p = C2d->Value(param);
|
||||
uvslf[m].x = scalex * p.X();
|
||||
uvslf[m].y = scaley * p.Y();
|
||||
mefistoToDS[m + 1] = (*itp).second;
|
||||
// MESSAGE(" "<<m<<" "<<mefistoToDS[m+1]);
|
||||
// MESSAGE("__ "<<i<<" "<<param<<" "<<uvslf[m].x <<" "<<uvslf[m].y);
|
||||
m++;
|
||||
itp++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gp_Pnt2d p = C2d->Value(l); // last point = Vertex Reversed
|
||||
uvslf[m].x = scalex * p.X();
|
||||
uvslf[m].y = scaley * p.Y();
|
||||
mefistoToDS[m + 1] = idLast;
|
||||
// MESSAGE(" "<<m<<" "<<mefistoToDS[m+1]);
|
||||
// MESSAGE("__ l "<<l<<" "<<uvslf[m].x <<" "<<uvslf[m].y);
|
||||
m++;
|
||||
map<double, const SMDS_MeshNode*>::reverse_iterator itp = params.rbegin();
|
||||
for (int i = nbPoints; i >= 1; i--)
|
||||
{
|
||||
double param = (*itp).first;
|
||||
gp_Pnt2d p = C2d->Value(param);
|
||||
uvslf[m].x = scalex * p.X();
|
||||
uvslf[m].y = scaley * p.Y();
|
||||
mefistoToDS[m + 1] = (*itp).second;
|
||||
// MESSAGE(" "<<m<<" "<<mefistoToDS[m+1]);
|
||||
// MESSAGE("__ "<<i<<" "<<param<<" "<<uvslf[m].x <<" "<<uvslf[m].y);
|
||||
m++;
|
||||
itp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
// **** a mettre dans SMESH_Algo ou SMESH_2D_Algo
|
||||
|
||||
void SMESH_MEFISTO_2D::ComputeScaleOnFace(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Face & aFace, double &scalex, double &scaley)
|
||||
{
|
||||
//MESSAGE("SMESH_MEFISTO_2D::ComputeScaleOnFace");
|
||||
TopoDS_Face F = TopoDS::Face(aFace.Oriented(TopAbs_FORWARD));
|
||||
TopoDS_Wire W = BRepTools::OuterWire(F);
|
||||
|
||||
BRepTools_WireExplorer wexp(W, F);
|
||||
|
||||
double xmin = 1.e300; // min & max of face 2D parametric coord.
|
||||
double xmax = -1.e300;
|
||||
double ymin = 1.e300;
|
||||
double ymax = -1.e300;
|
||||
int nbp = 50;
|
||||
scalex = 1;
|
||||
scaley = 1;
|
||||
for (wexp.Init(W, F); wexp.More(); wexp.Next())
|
||||
{
|
||||
const TopoDS_Edge & E = wexp.Current();
|
||||
double f, l;
|
||||
Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(E, F, f, l);
|
||||
for (int i = 0; i <= nbp; i++)
|
||||
{
|
||||
double param = f + (double (i) / double (nbp))*(l - f);
|
||||
gp_Pnt2d p = C2d->Value(param);
|
||||
if (p.X() < xmin)
|
||||
xmin = p.X();
|
||||
if (p.X() > xmax)
|
||||
xmax = p.X();
|
||||
if (p.Y() < ymin)
|
||||
ymin = p.Y();
|
||||
if (p.Y() > ymax)
|
||||
ymax = p.Y();
|
||||
// MESSAGE(" "<< f<<" "<<l<<" "<<param<<" "<<xmin<<" "<<xmax<<" "<<ymin<<" "<<ymax);
|
||||
}
|
||||
}
|
||||
// SCRUTE(xmin);
|
||||
// SCRUTE(xmax);
|
||||
// SCRUTE(ymin);
|
||||
// SCRUTE(ymax);
|
||||
double xmoy = (xmax + xmin) / 2.;
|
||||
double ymoy = (ymax + ymin) / 2.;
|
||||
|
||||
Handle(Geom_Surface) S = BRep_Tool::Surface(F); // 3D surface
|
||||
|
||||
double length_x = 0;
|
||||
double length_y = 0;
|
||||
gp_Pnt PX0 = S->Value(xmin, ymoy);
|
||||
gp_Pnt PY0 = S->Value(xmoy, ymin);
|
||||
for (int i = 1; i <= nbp; i++)
|
||||
{
|
||||
double x = xmin + (double (i) / double (nbp))*(xmax - xmin);
|
||||
gp_Pnt PX = S->Value(x, ymoy);
|
||||
double y = ymin + (double (i) / double (nbp))*(ymax - ymin);
|
||||
gp_Pnt PY = S->Value(xmoy, y);
|
||||
length_x += PX.Distance(PX0);
|
||||
length_y += PY.Distance(PY0);
|
||||
PX0.SetCoord(PX.X(), PX.Y(), PX.Z());
|
||||
PY0.SetCoord(PY.X(), PY.Y(), PY.Z());
|
||||
}
|
||||
// SCRUTE(length_x);
|
||||
// SCRUTE(length_y);
|
||||
scalex = length_x / (xmax - xmin);
|
||||
scaley = length_y / (ymax - ymin);
|
||||
// SCRUTE(scalex);
|
||||
// SCRUTE(scaley);
|
||||
ASSERT(scalex);
|
||||
ASSERT(scaley);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_MEFISTO_2D::StoreResult(SMESH_Mesh & aMesh,
|
||||
Z nbst, R2 * uvst, Z nbt, Z * nust,
|
||||
const TopoDS_Face & F, bool faceIsForward,
|
||||
map<int, const SMDS_MeshNode*>&mefistoToDS)
|
||||
{
|
||||
double scalex;
|
||||
double scaley;
|
||||
ComputeScaleOnFace(aMesh, F, scalex, scaley);
|
||||
|
||||
SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
|
||||
|
||||
Z n, m;
|
||||
Handle(Geom_Surface) S = BRep_Tool::Surface(F);
|
||||
|
||||
for (n = 0; n < nbst; n++)
|
||||
{
|
||||
double u = uvst[n][0] / scalex;
|
||||
double v = uvst[n][1] / scaley;
|
||||
gp_Pnt P = S->Value(u, v);
|
||||
|
||||
if (mefistoToDS.find(n + 1) == mefistoToDS.end())
|
||||
{
|
||||
SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z());
|
||||
meshDS->SetNodeOnFace(node, F);
|
||||
|
||||
//MESSAGE(nodeId<<" "<<P.X()<<" "<<P.Y()<<" "<<P.Z());
|
||||
mefistoToDS[n + 1] = node;
|
||||
//MESSAGE(" "<<n<<" "<<mefistoToDS[n+1]);
|
||||
SMDS_FacePosition* fpos
|
||||
= static_cast<SMDS_FacePosition*>(node->GetPosition());
|
||||
fpos->SetUParameter(u);
|
||||
fpos->SetVParameter(v);
|
||||
}
|
||||
}
|
||||
|
||||
m = 0;
|
||||
int mt = 0;
|
||||
|
||||
//SCRUTE(faceIsForward);
|
||||
for (n = 1; n <= nbt; n++)
|
||||
{
|
||||
int inode1 = nust[m++];
|
||||
int inode2 = nust[m++];
|
||||
int inode3 = nust[m++];
|
||||
|
||||
const SMDS_MeshNode *n1, *n2, *n3;
|
||||
n1 = mefistoToDS[inode1];
|
||||
n2 = mefistoToDS[inode2];
|
||||
n3 = mefistoToDS[inode3];
|
||||
//MESSAGE("-- "<<inode1<<" "<<inode2<<" "<<inode3<<" ++ "<<nodeId1<<" "<<nodeId2<<" "<<nodeId3);
|
||||
|
||||
// triangle points must be in trigonometric order if face is Forward
|
||||
// else they must be put clockwise
|
||||
|
||||
bool triangleIsWellOriented = faceIsForward;
|
||||
|
||||
SMDS_MeshElement * elt;
|
||||
if (triangleIsWellOriented)
|
||||
elt = meshDS->AddFace(n1, n2, n3);
|
||||
else
|
||||
elt = meshDS->AddFace(n1, n3, n2);
|
||||
|
||||
meshDS->SetMeshElementOnShape(elt, F);
|
||||
m++;
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
double SMESH_MEFISTO_2D::ComputeEdgeElementLength(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Shape & aShape)
|
||||
{
|
||||
MESSAGE("SMESH_MEFISTO_2D::ComputeEdgeElementLength");
|
||||
// **** a mettre dans SMESH_2D_Algo ?
|
||||
|
||||
const TopoDS_Face & FF = TopoDS::Face(aShape);
|
||||
bool faceIsForward = (FF.Orientation() == TopAbs_FORWARD);
|
||||
TopoDS_Face F = TopoDS::Face(FF.Oriented(TopAbs_FORWARD));
|
||||
|
||||
double meanElementLength = 100;
|
||||
double wireLength = 0;
|
||||
int wireElementsNumber = 0;
|
||||
for (TopExp_Explorer exp(F, TopAbs_WIRE); exp.More(); exp.Next())
|
||||
{
|
||||
const TopoDS_Wire & W = TopoDS::Wire(exp.Current());
|
||||
for (TopExp_Explorer expe(W, TopAbs_EDGE); expe.More(); expe.Next())
|
||||
{
|
||||
const TopoDS_Edge & E = TopoDS::Edge(expe.Current());
|
||||
int nb = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes();
|
||||
double length = EdgeLength(E);
|
||||
wireLength += length;
|
||||
wireElementsNumber += nb;
|
||||
}
|
||||
}
|
||||
if (wireElementsNumber)
|
||||
meanElementLength = wireLength / wireElementsNumber;
|
||||
//SCRUTE(meanElementLength);
|
||||
return meanElementLength;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & SMESH_MEFISTO_2D::SaveTo(ostream & save)
|
||||
{
|
||||
return save << this;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & SMESH_MEFISTO_2D::LoadFrom(istream & load)
|
||||
{
|
||||
return load >> (*this);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & operator <<(ostream & save, SMESH_MEFISTO_2D & hyp)
|
||||
{
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & operator >>(istream & load, SMESH_MEFISTO_2D & hyp)
|
||||
{
|
||||
return load;
|
||||
}
|
@ -1,86 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_MEFISTO_2D.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_MEFISTO_2D_HXX_
|
||||
#define _SMESH_MEFISTO_2D_HXX_
|
||||
|
||||
#include "SMESH_2D_Algo.hxx"
|
||||
#include "SMESH_MaxElementArea.hxx"
|
||||
#include "SMESH_LengthFromEdges.hxx"
|
||||
#include "Rn.h"
|
||||
|
||||
class SMDS_MeshNode;
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <map>
|
||||
|
||||
class SMESH_MEFISTO_2D:
|
||||
public SMESH_2D_Algo
|
||||
{
|
||||
public:
|
||||
SMESH_MEFISTO_2D(int hypId, int studyId, SMESH_Gen* gen);
|
||||
virtual ~SMESH_MEFISTO_2D();
|
||||
|
||||
virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
double ComputeEdgeElementLength(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
void LoadPoints(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Face& F,
|
||||
const TopoDS_Wire& W,
|
||||
R2* uvslf,
|
||||
int& m,
|
||||
map<int,const SMDS_MeshNode*>& mefistoToDS);
|
||||
|
||||
void ComputeScaleOnFace(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Face& aFace,
|
||||
double& scalex,
|
||||
double& scaley);
|
||||
|
||||
void StoreResult (SMESH_Mesh& aMesh,
|
||||
Z nbst, R2* uvst, Z nbt, Z* nust,
|
||||
const TopoDS_Face& F, bool faceIsForward,
|
||||
map<int,const SMDS_MeshNode*>& mefistoToDS);
|
||||
|
||||
ostream & SaveTo(ostream & save);
|
||||
istream & LoadFrom(istream & load);
|
||||
friend ostream & operator << (ostream & save, SMESH_MEFISTO_2D & hyp);
|
||||
friend istream & operator >> (istream & load, SMESH_MEFISTO_2D & hyp);
|
||||
|
||||
protected:
|
||||
double _edgeLength;
|
||||
double _maxElementArea;
|
||||
const SMESH_MaxElementArea* _hypMaxElementArea;
|
||||
const SMESH_LengthFromEdges* _hypLengthFromEdges;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,136 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_MaxElementArea.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_MaxElementArea.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_MaxElementArea::SMESH_MaxElementArea(int hypId, int studyId, SMESH_Gen* gen)
|
||||
: SMESH_Hypothesis(hypId, studyId, gen)
|
||||
{
|
||||
_maxArea =1.;
|
||||
_name = "MaxElementArea";
|
||||
// SCRUTE(_name);
|
||||
// SCRUTE(&_name);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_MaxElementArea::~SMESH_MaxElementArea()
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_MaxElementArea::SetMaxArea(double maxArea)
|
||||
throw (SALOME_Exception)
|
||||
{
|
||||
double oldArea = _maxArea;
|
||||
if (maxArea <= 0)
|
||||
throw SALOME_Exception(LOCALIZED("maxArea must be positive"));
|
||||
_maxArea = maxArea;
|
||||
if (_maxArea != oldArea)
|
||||
NotifySubMeshesHypothesisModification();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
double SMESH_MaxElementArea::GetMaxArea() const
|
||||
{
|
||||
return _maxArea;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & SMESH_MaxElementArea::SaveTo(ostream & save)
|
||||
{
|
||||
return save << this;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & SMESH_MaxElementArea::LoadFrom(istream & load)
|
||||
{
|
||||
return load >> (*this);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & operator << (ostream & save, SMESH_MaxElementArea & hyp)
|
||||
{
|
||||
save << hyp._maxArea;
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & operator >> (istream & load, SMESH_MaxElementArea & hyp)
|
||||
{
|
||||
bool isOK = true;
|
||||
double a;
|
||||
isOK = (load >> a);
|
||||
if (isOK) hyp._maxArea = a;
|
||||
else load.clear(ios::badbit | load.rdstate());
|
||||
return load;
|
||||
}
|
||||
|
@ -1,54 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_MaxElementArea.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_MAXELEMENTAREA_HXX_
|
||||
#define _SMESH_MAXELEMENTAREA_HXX_
|
||||
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
class SMESH_MaxElementArea:public SMESH_Hypothesis
|
||||
{
|
||||
public:
|
||||
SMESH_MaxElementArea(int hypId, int studyId, SMESH_Gen * gen);
|
||||
virtual ~ SMESH_MaxElementArea();
|
||||
|
||||
void SetMaxArea(double maxArea) throw(SALOME_Exception);
|
||||
|
||||
double GetMaxArea() const;
|
||||
|
||||
virtual ostream & SaveTo(ostream & save);
|
||||
virtual istream & LoadFrom(istream & load);
|
||||
friend ostream & operator <<(ostream & save, SMESH_MaxElementArea & hyp);
|
||||
friend istream & operator >>(istream & load, SMESH_MaxElementArea & hyp);
|
||||
|
||||
protected:
|
||||
double _maxArea;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,137 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_MaxElementVolume.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
|
||||
#include "SMESH_MaxElementVolume.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_MaxElementVolume::SMESH_MaxElementVolume(int hypId, int studyId, SMESH_Gen* gen)
|
||||
: SMESH_Hypothesis(hypId, studyId, gen)
|
||||
{
|
||||
_maxVolume =1.;
|
||||
_name = "MaxElementVolume";
|
||||
// SCRUTE(_name);
|
||||
SCRUTE(&_name);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_MaxElementVolume::~SMESH_MaxElementVolume()
|
||||
{
|
||||
MESSAGE("SMESH_MaxElementVolume::~SMESH_MaxElementVolume");
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_MaxElementVolume::SetMaxVolume(double maxVolume)
|
||||
throw (SALOME_Exception)
|
||||
{
|
||||
double oldVolume = _maxVolume;
|
||||
if (maxVolume <= 0)
|
||||
throw SALOME_Exception(LOCALIZED("maxVolume must be positive"));
|
||||
_maxVolume = maxVolume;
|
||||
if (_maxVolume != oldVolume)
|
||||
NotifySubMeshesHypothesisModification();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
double SMESH_MaxElementVolume::GetMaxVolume() const
|
||||
{
|
||||
return _maxVolume;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & SMESH_MaxElementVolume::SaveTo(ostream & save)
|
||||
{
|
||||
return save << this;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & SMESH_MaxElementVolume::LoadFrom(istream & load)
|
||||
{
|
||||
return load >> (*this);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & operator << (ostream & save, SMESH_MaxElementVolume & hyp)
|
||||
{
|
||||
save << hyp._maxVolume;
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & operator >> (istream & load, SMESH_MaxElementVolume & hyp)
|
||||
{
|
||||
bool isOK = true;
|
||||
double a;
|
||||
isOK = (load >> a);
|
||||
if (isOK) hyp._maxVolume = a;
|
||||
else load.clear(ios::badbit | load.rdstate());
|
||||
return load;
|
||||
}
|
||||
|
@ -1,56 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_MaxElementVolume.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_MAXELEMENTVOLUME_HXX_
|
||||
#define _SMESH_MAXELEMENTVOLUME_HXX_
|
||||
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
class SMESH_MaxElementVolume:
|
||||
public SMESH_Hypothesis
|
||||
{
|
||||
public:
|
||||
SMESH_MaxElementVolume(int hypId, int studyId, SMESH_Gen* gen);
|
||||
virtual ~SMESH_MaxElementVolume();
|
||||
|
||||
void SetMaxVolume(double maxVolume)
|
||||
throw (SALOME_Exception);
|
||||
|
||||
double GetMaxVolume() const;
|
||||
|
||||
virtual ostream & SaveTo(ostream & save);
|
||||
virtual istream & LoadFrom(istream & load);
|
||||
friend ostream & operator << (ostream & save, SMESH_MaxElementVolume & hyp);
|
||||
friend istream & operator >> (istream & load, SMESH_MaxElementVolume & hyp);
|
||||
|
||||
protected:
|
||||
double _maxVolume;
|
||||
};
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@ -1,42 +0,0 @@
|
||||
//=============================================================================
|
||||
// File : SMESH_NETGEN_3D.hxx
|
||||
// Created : lundi 27 Janvier 2003
|
||||
// Author : Nadir BOUHAMOU (CEA)
|
||||
// Project : SALOME
|
||||
// Copyright : CEA 2003
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
|
||||
#ifndef _SMESH_NETGEN_3D_HXX_
|
||||
#define _SMESH_NETGEN_3D_HXX_
|
||||
|
||||
#include "SMESH_3D_Algo.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
#include "SMESH_MaxElementVolume.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
class SMESH_NETGEN_3D: public SMESH_3D_Algo
|
||||
{
|
||||
public:
|
||||
SMESH_NETGEN_3D(int hypId, int studyId, SMESH_Gen* gen);
|
||||
virtual ~SMESH_NETGEN_3D();
|
||||
|
||||
virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape)
|
||||
throw (SALOME_Exception);
|
||||
|
||||
ostream & SaveTo(ostream & save);
|
||||
istream & LoadFrom(istream & load);
|
||||
friend ostream & operator << (ostream & save, SMESH_NETGEN_3D & hyp);
|
||||
friend istream & operator >> (istream & load, SMESH_NETGEN_3D & hyp);
|
||||
|
||||
protected:
|
||||
double _maxElementVolume;
|
||||
|
||||
const SMESH_MaxElementVolume* _hypMaxElementVolume;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,163 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_NumberOfSegments.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
#include "SMESH_NumberOfSegments.hxx"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_NumberOfSegments::SMESH_NumberOfSegments(int hypId, int studyId,
|
||||
SMESH_Gen * gen):SMESH_Hypothesis(hypId, studyId, gen)
|
||||
{
|
||||
_numberOfSegments = 1;
|
||||
_scaleFactor = 1.0;
|
||||
_name = "NumberOfSegments";
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_NumberOfSegments::~SMESH_NumberOfSegments()
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_NumberOfSegments::SetNumberOfSegments(int segmentsNumber)
|
||||
throw(SALOME_Exception)
|
||||
{
|
||||
int oldNumberOfSegments = _numberOfSegments;
|
||||
if (segmentsNumber <= 0)
|
||||
throw
|
||||
SALOME_Exception(LOCALIZED("number of segments must be positive"));
|
||||
_numberOfSegments = segmentsNumber;
|
||||
|
||||
if (oldNumberOfSegments != _numberOfSegments)
|
||||
NotifySubMeshesHypothesisModification();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
int SMESH_NumberOfSegments::GetNumberOfSegments() const
|
||||
{
|
||||
return _numberOfSegments;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_NumberOfSegments::SetScaleFactor(double scaleFactor)
|
||||
throw(SALOME_Exception)
|
||||
{
|
||||
if (scaleFactor < 0)
|
||||
throw SALOME_Exception(LOCALIZED("scale factor must be positive"));
|
||||
_scaleFactor = scaleFactor;
|
||||
|
||||
NotifySubMeshesHypothesisModification();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
double SMESH_NumberOfSegments::GetScaleFactor() const
|
||||
{
|
||||
return _scaleFactor;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & SMESH_NumberOfSegments::SaveTo(ostream & save)
|
||||
{
|
||||
return save << this;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & SMESH_NumberOfSegments::LoadFrom(istream & load)
|
||||
{
|
||||
return load >> (*this);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & operator <<(ostream & save, SMESH_NumberOfSegments & hyp)
|
||||
{
|
||||
save << hyp._numberOfSegments;
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & operator >>(istream & load, SMESH_NumberOfSegments & hyp)
|
||||
{
|
||||
bool isOK = true;
|
||||
int a;
|
||||
isOK = (load >> a);
|
||||
if (isOK)
|
||||
hyp._numberOfSegments = a;
|
||||
else
|
||||
load.clear(ios::badbit | load.rdstate());
|
||||
return load;
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_NumberOfSegments.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_NUMBEROFSEGMENTS_HXX_
|
||||
#define _SMESH_NUMBEROFSEGMENTS_HXX_
|
||||
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
class SMESH_NumberOfSegments:
|
||||
public SMESH_Hypothesis
|
||||
{
|
||||
public:
|
||||
SMESH_NumberOfSegments(int hypId, int studyId, SMESH_Gen* gen);
|
||||
virtual ~SMESH_NumberOfSegments();
|
||||
|
||||
void SetNumberOfSegments(int segmentsNumber)
|
||||
throw (SALOME_Exception);
|
||||
|
||||
int GetNumberOfSegments() const;
|
||||
|
||||
void SetScaleFactor(double scaleFactor)
|
||||
throw (SALOME_Exception);
|
||||
|
||||
double GetScaleFactor() const;
|
||||
|
||||
virtual ostream & SaveTo(ostream & save);
|
||||
virtual istream & LoadFrom(istream & load);
|
||||
friend ostream& operator << (ostream & save, SMESH_NumberOfSegments & hyp);
|
||||
friend istream& operator >> (istream & load, SMESH_NumberOfSegments & hyp);
|
||||
|
||||
protected:
|
||||
int _numberOfSegments;
|
||||
double _scaleFactor;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,640 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_Quadrangle_2D.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
#include "SMESH_Quadrangle_2D.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
|
||||
#include "SMDS_MeshElement.hxx"
|
||||
#include "SMDS_MeshNode.hxx"
|
||||
#include "SMDS_EdgePosition.hxx"
|
||||
#include "SMDS_FacePosition.hxx"
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <BRepTools_WireExplorer.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Handle_Geom2d_Curve.hxx>
|
||||
#include <Handle_Geom_Curve.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Quadrangle_2D::SMESH_Quadrangle_2D(int hypId,
|
||||
int studyId, SMESH_Gen * gen):SMESH_2D_Algo(hypId, studyId, gen)
|
||||
{
|
||||
MESSAGE("SMESH_Quadrangle_2D::SMESH_Quadrangle_2D");
|
||||
_name = "Quadrangle_2D";
|
||||
// _shapeType = TopAbs_FACE;
|
||||
_shapeType = (1 << TopAbs_FACE);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Quadrangle_2D::~SMESH_Quadrangle_2D()
|
||||
{
|
||||
MESSAGE("SMESH_Quadrangle_2D::~SMESH_Quadrangle_2D");
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool SMESH_Quadrangle_2D::CheckHypothesis(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Shape & aShape)
|
||||
{
|
||||
//MESSAGE("SMESH_Quadrangle_2D::CheckHypothesis");
|
||||
|
||||
bool isOk = true;
|
||||
|
||||
// nothing to check
|
||||
|
||||
return isOk;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool SMESH_Quadrangle_2D::Compute(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Shape & aShape)throw(SALOME_Exception)
|
||||
{
|
||||
//MESSAGE("SMESH_Quadrangle_2D::Compute");
|
||||
SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
|
||||
SMESH_subMesh *theSubMesh = aMesh.GetSubMesh(aShape);
|
||||
|
||||
FaceQuadStruct *quad = CheckAnd2Dcompute(aMesh, aShape);
|
||||
if (!quad)
|
||||
return false;
|
||||
|
||||
// --- compute 3D values on points, store points & quadrangles
|
||||
|
||||
int nbdown = quad->nbPts[0];
|
||||
int nbright = quad->nbPts[1];
|
||||
int nbVertices = nbdown * nbright;
|
||||
int nbQuad = (nbdown - 1) * (nbright - 1);
|
||||
//SCRUTE(nbVertices);
|
||||
//SCRUTE(nbQuad);
|
||||
|
||||
// const TopoDS_Face& FF = TopoDS::Face(aShape);
|
||||
// bool faceIsForward = (FF.Orientation() == TopAbs_FORWARD);
|
||||
// TopoDS_Face F = TopoDS::Face(FF.Oriented(TopAbs_FORWARD));
|
||||
const TopoDS_Face & F = TopoDS::Face(aShape);
|
||||
bool faceIsForward = (F.Orientation() == TopAbs_FORWARD);
|
||||
Handle(Geom_Surface) S = BRep_Tool::Surface(F);
|
||||
|
||||
for (int i = 1; i < nbdown - 1; i++)
|
||||
for (int j = 1; j < nbright - 1; j++) // internal points
|
||||
{
|
||||
int ij = j * nbdown + i;
|
||||
double u = quad->uv_grid[ij].u;
|
||||
double v = quad->uv_grid[ij].v;
|
||||
gp_Pnt P = S->Value(u, v);
|
||||
SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z());
|
||||
meshDS->SetNodeOnFace(node, F);
|
||||
quad->uv_grid[ij].node = node;
|
||||
// Handle (SMDS_FacePosition) fpos
|
||||
// = new SMDS_FacePosition(theSubMesh->GetId(),i,j); // easier than u,v
|
||||
// node->SetPosition(fpos);
|
||||
SMDS_FacePosition* fpos
|
||||
= dynamic_cast<SMDS_FacePosition*>(node->GetPosition());
|
||||
fpos->SetUParameter(i);
|
||||
fpos->SetVParameter(j);
|
||||
}
|
||||
|
||||
// bool isQuadForward = ( faceIsForward == quad->isEdgeForward[0]);
|
||||
for (int i = 0; i < nbdown - 1; i++)
|
||||
for (int j = 0; j < nbright - 1; j++) // faces
|
||||
{
|
||||
const SMDS_MeshNode *a, *b, *c, *d;
|
||||
a = quad->uv_grid[j * nbdown + i].node;
|
||||
b = quad->uv_grid[j * nbdown + i + 1].node;
|
||||
c = quad->uv_grid[(j + 1) * nbdown + i + 1].node;
|
||||
d = quad->uv_grid[(j + 1) * nbdown + i].node;
|
||||
// if (isQuadForward) faceId = meshDS->AddFace(a,b,c,d);
|
||||
// else faceId = meshDS->AddFace(a,d,c,b);
|
||||
SMDS_MeshFace * face = meshDS->AddFace(a, b, c, d);
|
||||
meshDS->SetMeshElementOnShape(face, F);
|
||||
}
|
||||
|
||||
QuadDelete(quad);
|
||||
bool isOk = true;
|
||||
return isOk;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
FaceQuadStruct *SMESH_Quadrangle_2D::CheckAnd2Dcompute(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Shape & aShape)throw(SALOME_Exception)
|
||||
{
|
||||
//MESSAGE("SMESH_Quadrangle_2D::ComputeWithoutStore");
|
||||
|
||||
SMESH_subMesh *theSubMesh = aMesh.GetSubMesh(aShape);
|
||||
|
||||
// const TopoDS_Face& FF = TopoDS::Face(aShape);
|
||||
// bool faceIsForward = (FF.Orientation() == TopAbs_FORWARD);
|
||||
// TopoDS_Face F = TopoDS::Face(FF.Oriented(TopAbs_FORWARD));
|
||||
const TopoDS_Face & F = TopoDS::Face(aShape);
|
||||
bool faceIsForward = (F.Orientation() == TopAbs_FORWARD);
|
||||
|
||||
// verify 1 wire only, with 4 edges, same number of points on opposite edges
|
||||
|
||||
if (NumberOfWires(F) != 1)
|
||||
{
|
||||
MESSAGE("only 1 wire by face (quadrangles)");
|
||||
return 0;
|
||||
//throw SALOME_Exception(LOCALIZED("only 1 wire by face (quadrangles)"));
|
||||
}
|
||||
// const TopoDS_Wire WW = BRepTools::OuterWire(F);
|
||||
// TopoDS_Wire W = TopoDS::Wire(WW.Oriented(TopAbs_FORWARD));
|
||||
const TopoDS_Wire & W = BRepTools::OuterWire(F);
|
||||
BRepTools_WireExplorer wexp(W, F);
|
||||
|
||||
FaceQuadStruct *quad = new FaceQuadStruct;
|
||||
for (int i = 0; i < 4; i++)
|
||||
quad->uv_edges[i] = 0;
|
||||
quad->uv_grid = 0;
|
||||
|
||||
int nbEdges = 0;
|
||||
for (wexp.Init(W, F); wexp.More(); wexp.Next())
|
||||
{
|
||||
// const TopoDS_Edge& EE = wexp.Current();
|
||||
// TopoDS_Edge E = TopoDS::Edge(EE.Oriented(TopAbs_FORWARD));
|
||||
const TopoDS_Edge & E = wexp.Current();
|
||||
int nb = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes();
|
||||
if (nbEdges < 4)
|
||||
{
|
||||
quad->edge[nbEdges] = E;
|
||||
quad->nbPts[nbEdges] = nb + 2; // internal points + 2 extrema
|
||||
}
|
||||
nbEdges++;
|
||||
}
|
||||
|
||||
if (nbEdges != 4)
|
||||
{
|
||||
MESSAGE("face must have 4 edges /quadrangles");
|
||||
QuadDelete(quad);
|
||||
return 0;
|
||||
//throw SALOME_Exception(LOCALIZED("face must have 4 edges /quadrangles"));
|
||||
}
|
||||
|
||||
if (quad->nbPts[0] != quad->nbPts[2])
|
||||
{
|
||||
MESSAGE("different point number-opposed edge");
|
||||
QuadDelete(quad);
|
||||
return 0;
|
||||
//throw SALOME_Exception(LOCALIZED("different point number-opposed edge"));
|
||||
}
|
||||
|
||||
if (quad->nbPts[1] != quad->nbPts[3])
|
||||
{
|
||||
MESSAGE("different point number-opposed edge");
|
||||
QuadDelete(quad);
|
||||
return 0;
|
||||
//throw SALOME_Exception(LOCALIZED("different point number-opposed edge"));
|
||||
}
|
||||
|
||||
// set normalized grid on unit square in parametric domain
|
||||
|
||||
SetNormalizedGrid(aMesh, F, quad);
|
||||
|
||||
return quad;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_Quadrangle_2D::QuadDelete(FaceQuadStruct * quad)
|
||||
{
|
||||
//MESSAGE("SMESH_Quadrangle_2D::QuadDelete");
|
||||
if (quad)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (quad->uv_edges[i])
|
||||
delete[]quad->uv_edges[i];
|
||||
quad->edge[i].Nullify();
|
||||
}
|
||||
if (quad->uv_grid)
|
||||
delete[]quad->uv_grid;
|
||||
delete quad;
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_Quadrangle_2D::SetNormalizedGrid(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Shape & aShape, FaceQuadStruct * quad) throw(SALOME_Exception)
|
||||
{
|
||||
// Algorithme décrit dans "Génération automatique de maillages"
|
||||
// P.L. GEORGE, MASSON, § 6.4.1 p. 84-85
|
||||
// traitement dans le domaine paramétrique 2d u,v
|
||||
// transport - projection sur le carré unité
|
||||
|
||||
const TopoDS_Face & F = TopoDS::Face(aShape);
|
||||
|
||||
// 1 --- find orientation of the 4 edges, by test on extrema
|
||||
|
||||
// max min 0 x1 1
|
||||
// |<----north-2-------^ a3 -------------> a2
|
||||
// | | ^1 1^
|
||||
// west-3 east-1 =right | |
|
||||
// | | ==> | |
|
||||
// y0 | | y1 | |
|
||||
// | | |0 0|
|
||||
// v----south-0--------> a0 -------------> a1
|
||||
// min max 0 x0 1
|
||||
// =down
|
||||
//
|
||||
|
||||
Handle(Geom2d_Curve) c2d[4];
|
||||
gp_Pnt2d pf[4];
|
||||
gp_Pnt2d pl[4];
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
c2d[i] = BRep_Tool::CurveOnSurface(quad->edge[i],
|
||||
F, quad->first[i], quad->last[i]);
|
||||
pf[i] = c2d[i]->Value(quad->first[i]);
|
||||
pl[i] = c2d[i]->Value(quad->last[i]);
|
||||
quad->isEdgeForward[i] = false;
|
||||
}
|
||||
|
||||
double eps2d = 1.e-3; // *** utiliser plutot TopExp::CommonVertex, puis
|
||||
// distances si piece fausse
|
||||
int i = 0;
|
||||
if ((pf[1].Distance(pl[0]) < eps2d) || (pl[1].Distance(pl[0]) < eps2d))
|
||||
{
|
||||
quad->isEdgeForward[0] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
double tmp = quad->first[0];
|
||||
quad->first[0] = quad->last[0];
|
||||
quad->last[0] = tmp;
|
||||
pf[0] = c2d[0]->Value(quad->first[0]);
|
||||
pl[0] = c2d[0]->Value(quad->last[0]);
|
||||
}
|
||||
for (int i = 1; i < 4; i++)
|
||||
{
|
||||
quad->isEdgeForward[i] = (pf[i].Distance(pl[i - 1]) < eps2d);
|
||||
if (!quad->isEdgeForward[i])
|
||||
{
|
||||
double tmp = quad->first[i];
|
||||
quad->first[i] = quad->last[i];
|
||||
quad->last[i] = tmp;
|
||||
pf[i] = c2d[i]->Value(quad->first[i]);
|
||||
pl[i] = c2d[i]->Value(quad->last[i]);
|
||||
//SCRUTE(pf[i].Distance(pl[i-1]));
|
||||
ASSERT(pf[i].Distance(pl[i - 1]) < eps2d);
|
||||
}
|
||||
}
|
||||
//SCRUTE(pf[0].Distance(pl[3]));
|
||||
ASSERT(pf[0].Distance(pl[3]) < eps2d);
|
||||
|
||||
// for (int i=0; i<4; i++)
|
||||
// {
|
||||
// SCRUTE(quad->isEdgeForward[i]);
|
||||
// MESSAGE(" -first "<<i<<" "<<pf[i].X()<<" "<<pf[i].Y());
|
||||
// MESSAGE(" -last "<<i<<" "<<pl[i].X()<<" "<<pl[i].Y());
|
||||
// }
|
||||
|
||||
// 2 --- load 2d edge points (u,v) with orientation and value on unit square
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
quad->uv_edges[i] = LoadEdgePoints(aMesh, F,
|
||||
quad->edge[i], quad->first[i], quad->last[i]);
|
||||
|
||||
// quad->isEdgeForward[i]);
|
||||
}
|
||||
for (int i = 2; i < 4; i++)
|
||||
{
|
||||
quad->uv_edges[i] = LoadEdgePoints(aMesh, F,
|
||||
quad->edge[i], quad->last[i], quad->first[i]);
|
||||
|
||||
// !quad->isEdgeForward[i]);
|
||||
}
|
||||
|
||||
// 3 --- 2D normalized values on unit square [0..1][0..1]
|
||||
|
||||
int nbdown = quad->nbPts[0];
|
||||
int nbright = quad->nbPts[1];
|
||||
quad->uv_grid = new UVPtStruct[nbright * nbdown];
|
||||
|
||||
UVPtStruct *uv_grid = quad->uv_grid;
|
||||
UVPtStruct *uv_e0 = quad->uv_edges[0];
|
||||
UVPtStruct *uv_e1 = quad->uv_edges[1];
|
||||
UVPtStruct *uv_e2 = quad->uv_edges[2];
|
||||
UVPtStruct *uv_e3 = quad->uv_edges[3];
|
||||
gp_Pnt2d a0 = pf[0];
|
||||
gp_Pnt2d a1 = pf[1];
|
||||
gp_Pnt2d a2 = pf[2];
|
||||
gp_Pnt2d a3 = pf[3];
|
||||
|
||||
// nodes Id on edges
|
||||
|
||||
int j = 0;
|
||||
for (int i = 0; i < nbdown; i++)
|
||||
{
|
||||
int ij = j * nbdown + i;
|
||||
uv_grid[ij].node = uv_e0[i].node;
|
||||
}
|
||||
i = nbdown - 1;
|
||||
for (int j = 0; j < nbright; j++)
|
||||
{
|
||||
int ij = j * nbdown + i;
|
||||
uv_grid[ij].node = uv_e1[j].node;
|
||||
}
|
||||
j = nbright - 1;
|
||||
for (int i = 0; i < nbdown; i++)
|
||||
{
|
||||
int ij = j * nbdown + i;
|
||||
uv_grid[ij].node = uv_e2[i].node;
|
||||
}
|
||||
i = 0;
|
||||
for (int j = 0; j < nbright; j++)
|
||||
{
|
||||
int ij = j * nbdown + i;
|
||||
uv_grid[ij].node = uv_e3[j].node;
|
||||
}
|
||||
|
||||
// normalized 2d values on grid
|
||||
|
||||
for (int i = 0; i < nbdown; i++)
|
||||
for (int j = 0; j < nbright; j++)
|
||||
{
|
||||
int ij = j * nbdown + i;
|
||||
// --- droite i cste : x = x0 + y(x1-x0)
|
||||
double x0 = uv_e0[i].normParam; // bas - sud
|
||||
double x1 = uv_e2[i].normParam; // haut - nord
|
||||
// --- droite j cste : y = y0 + x(y1-y0)
|
||||
double y0 = uv_e3[j].normParam; // gauche-ouest
|
||||
double y1 = uv_e1[j].normParam; // droite - est
|
||||
// --- intersection : x=x0+(y0+x(y1-y0))(x1-x0)
|
||||
double x = (x0 + y0 * (x1 - x0)) / (1 - (y1 - y0) * (x1 - x0));
|
||||
double y = y0 + x * (y1 - y0);
|
||||
uv_grid[ij].x = x;
|
||||
uv_grid[ij].y = y;
|
||||
//MESSAGE("-xy-01 "<<x0<<" "<<x1<<" "<<y0<<" "<<y1);
|
||||
//MESSAGE("-xy-norm "<<i<<" "<<j<<" "<<x<<" "<<y);
|
||||
}
|
||||
|
||||
// 4 --- projection on 2d domain (u,v)
|
||||
|
||||
for (int i = 0; i < nbdown; i++)
|
||||
for (int j = 0; j < nbright; j++)
|
||||
{
|
||||
int ij = j * nbdown + i;
|
||||
double x = uv_grid[ij].x;
|
||||
double y = uv_grid[ij].y;
|
||||
double param_0 = uv_e0[0].param + x * (uv_e0[nbdown - 1].param - uv_e0[0].param); // sud
|
||||
double param_2 = uv_e2[0].param + x * (uv_e2[nbdown - 1].param - uv_e2[0].param); // nord
|
||||
double param_1 = uv_e1[0].param + y * (uv_e1[nbright - 1].param - uv_e1[0].param); // est
|
||||
double param_3 = uv_e3[0].param + y * (uv_e3[nbright - 1].param - uv_e3[0].param); // ouest
|
||||
|
||||
//MESSAGE("params "<<param_0<<" "<<param_1<<" "<<param_2<<" "<<param_3);
|
||||
gp_Pnt2d p0 = c2d[0]->Value(param_0);
|
||||
gp_Pnt2d p1 = c2d[1]->Value(param_1);
|
||||
gp_Pnt2d p2 = c2d[2]->Value(param_2);
|
||||
gp_Pnt2d p3 = c2d[3]->Value(param_3);
|
||||
|
||||
double u =
|
||||
(1 - y) * p0.X() + x * p1.X() + y * p2.X() + (1 - x) * p3.X();
|
||||
double v =
|
||||
(1 - y) * p0.Y() + x * p1.Y() + y * p2.Y() + (1 - x) * p3.Y();
|
||||
|
||||
u -= (1 - x) * (1 - y) * a0.X() + x * (1 - y) * a1.X() +
|
||||
x * y * a2.X() + (1 - x) * y * a3.X();
|
||||
v -= (1 - x) * (1 - y) * a0.Y() + x * (1 - y) * a1.Y() +
|
||||
x * y * a2.Y() + (1 - x) * y * a3.Y();
|
||||
|
||||
uv_grid[ij].u = u;
|
||||
uv_grid[ij].v = v;
|
||||
|
||||
//MESSAGE("-uv- "<<i<<" "<<j<<" "<<uv_grid[ij].u<<" "<<uv_grid[ij].v);
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
UVPtStruct *SMESH_Quadrangle_2D::LoadEdgePoints(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Face & F, const TopoDS_Edge & E, double first, double last)
|
||||
// bool isForward)
|
||||
{
|
||||
//MESSAGE("SMESH_Quadrangle_2D::LoadEdgePoints");
|
||||
|
||||
SMDS_Mesh * meshDS = aMesh.GetMeshDS();
|
||||
|
||||
// --- IDNodes of first and last Vertex
|
||||
|
||||
TopoDS_Vertex VFirst, VLast;
|
||||
TopExp::Vertices(E, VFirst, VLast); // corresponds to f and l
|
||||
|
||||
ASSERT(!VFirst.IsNull());
|
||||
SMDS_Iterator<const SMDS_MeshNode *> * lid=
|
||||
aMesh.GetSubMesh(VFirst)->GetSubMeshDS()->GetNodes();
|
||||
const SMDS_MeshNode * idFirst = lid->next();
|
||||
delete lid;
|
||||
|
||||
ASSERT(!VLast.IsNull());
|
||||
lid=aMesh.GetSubMesh(VLast)->GetSubMeshDS()->GetNodes();
|
||||
const SMDS_MeshNode * idLast = lid->next();
|
||||
delete lid;
|
||||
|
||||
// --- edge internal IDNodes (relies on good order storage, not checked)
|
||||
|
||||
int nbPoints = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes();
|
||||
//SCRUTE(nbPoints);
|
||||
UVPtStruct *uvslf = new UVPtStruct[nbPoints + 2];
|
||||
|
||||
double f, l;
|
||||
Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(E, F, f, l);
|
||||
|
||||
map<double, const SMDS_MeshNode *> params;
|
||||
SMDS_Iterator<const SMDS_MeshNode *> * ite=
|
||||
aMesh.GetSubMesh(E)->GetSubMeshDS()->GetNodes();
|
||||
|
||||
while(ite->more())
|
||||
{
|
||||
const SMDS_MeshNode * node = ite->next();
|
||||
const SMDS_EdgePosition* epos
|
||||
= static_cast<const SMDS_EdgePosition*>(node->GetPosition());
|
||||
double param = epos->GetUParameter();
|
||||
params[param] = node;
|
||||
}
|
||||
delete ite;
|
||||
|
||||
bool isForward = (((l - f) * (last - first)) > 0);
|
||||
double paramin = 0;
|
||||
double paramax = 0;
|
||||
if (isForward)
|
||||
{
|
||||
paramin = f;
|
||||
paramax = l;
|
||||
gp_Pnt2d p = C2d->Value(f); // first point = Vertex Forward
|
||||
uvslf[0].x = p.X();
|
||||
uvslf[0].y = p.Y();
|
||||
uvslf[0].param = f;
|
||||
uvslf[0].node = idFirst;
|
||||
//MESSAGE("__ f "<<f<<" "<<uvslf[0].x <<" "<<uvslf[0].y);
|
||||
map < double, const SMDS_MeshNode* >::iterator itp = params.begin();
|
||||
for (int i = 1; i <= nbPoints; i++) // nbPoints internal
|
||||
{
|
||||
double param = (*itp).first;
|
||||
gp_Pnt2d p = C2d->Value(param);
|
||||
uvslf[i].x = p.X();
|
||||
uvslf[i].y = p.Y();
|
||||
uvslf[i].param = param;
|
||||
uvslf[i].node = (*itp).second;
|
||||
//MESSAGE("__ "<<i<<" "<<param<<" "<<uvslf[i].x <<" "<<uvslf[i].y);
|
||||
itp++;
|
||||
}
|
||||
p = C2d->Value(l); // last point = Vertex Reversed
|
||||
uvslf[nbPoints + 1].x = p.X();
|
||||
uvslf[nbPoints + 1].y = p.Y();
|
||||
uvslf[nbPoints + 1].param = l;
|
||||
uvslf[nbPoints + 1].node = idLast;
|
||||
//MESSAGE("__ l "<<l<<" "<<uvslf[nbPoints+1].x <<" "<<uvslf[nbPoints+1].y);
|
||||
}
|
||||
else
|
||||
{
|
||||
paramin = l;
|
||||
paramax = f;
|
||||
gp_Pnt2d p = C2d->Value(l); // first point = Vertex Reversed
|
||||
uvslf[0].x = p.X();
|
||||
uvslf[0].y = p.Y();
|
||||
uvslf[0].param = l;
|
||||
uvslf[0].node = idLast;
|
||||
//MESSAGE("__ l "<<l<<" "<<uvslf[0].x <<" "<<uvslf[0].y);
|
||||
map < double, const SMDS_MeshNode* >::reverse_iterator itp = params.rbegin();
|
||||
for (int j = nbPoints; j >= 1; j--) // nbPoints internal
|
||||
{
|
||||
double param = (*itp).first;
|
||||
int i = nbPoints + 1 - j;
|
||||
gp_Pnt2d p = C2d->Value(param);
|
||||
uvslf[i].x = p.X();
|
||||
uvslf[i].y = p.Y();
|
||||
uvslf[i].param = param;
|
||||
uvslf[i].node = (*itp).second;
|
||||
//MESSAGE("__ "<<i<<" "<<param<<" "<<uvslf[i].x <<" "<<uvslf[i].y);
|
||||
itp++;
|
||||
}
|
||||
p = C2d->Value(f); // last point = Vertex Forward
|
||||
uvslf[nbPoints + 1].x = p.X();
|
||||
uvslf[nbPoints + 1].y = p.Y();
|
||||
uvslf[nbPoints + 1].param = f;
|
||||
uvslf[nbPoints + 1].node = idFirst;
|
||||
//MESSAGE("__ f "<<f<<" "<<uvslf[nbPoints+1].x <<" "<<uvslf[nbPoints+1].y);
|
||||
}
|
||||
|
||||
ASSERT(paramin != paramax);
|
||||
for (int i = 0; i < nbPoints + 2; i++)
|
||||
{
|
||||
uvslf[i].normParam = (uvslf[i].param - paramin) / (paramax - paramin);
|
||||
//SCRUTE(uvslf[i].normParam);
|
||||
}
|
||||
|
||||
return uvslf;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & SMESH_Quadrangle_2D::SaveTo(ostream & save)
|
||||
{
|
||||
return save << this;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & SMESH_Quadrangle_2D::LoadFrom(istream & load)
|
||||
{
|
||||
return load >> (*this);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & operator <<(ostream & save, SMESH_Quadrangle_2D & hyp)
|
||||
{
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & operator >>(istream & load, SMESH_Quadrangle_2D & hyp)
|
||||
{
|
||||
return load;
|
||||
}
|
@ -1,100 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_Quadrangle_2D.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_QUADRANGLE_2D_HXX_
|
||||
#define _SMESH_QUADRANGLE_2D_HXX_
|
||||
|
||||
#include "SMESH_2D_Algo.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
typedef struct uvPtStruct
|
||||
{
|
||||
double param;
|
||||
double normParam;
|
||||
double u; // original 2d parameter
|
||||
double v;
|
||||
double x; // 2d parameter, normalized [0,1]
|
||||
double y;
|
||||
const SMDS_MeshNode * node;
|
||||
} UVPtStruct;
|
||||
|
||||
typedef struct faceQuadStruct
|
||||
{
|
||||
int nbPts[4];
|
||||
TopoDS_Edge edge[4];
|
||||
double first[4];
|
||||
double last[4];
|
||||
bool isEdgeForward[4];
|
||||
UVPtStruct* uv_edges[4];
|
||||
UVPtStruct* uv_grid;
|
||||
} FaceQuadStruct;
|
||||
|
||||
class SMESH_Quadrangle_2D:
|
||||
public SMESH_2D_Algo
|
||||
{
|
||||
public:
|
||||
SMESH_Quadrangle_2D(int hypId, int studyId, SMESH_Gen* gen);
|
||||
virtual ~SMESH_Quadrangle_2D();
|
||||
|
||||
virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape)
|
||||
throw (SALOME_Exception);
|
||||
|
||||
FaceQuadStruct* CheckAnd2Dcompute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape)
|
||||
throw (SALOME_Exception);
|
||||
|
||||
void QuadDelete(FaceQuadStruct* quad);
|
||||
|
||||
ostream & SaveTo(ostream & save);
|
||||
istream & LoadFrom(istream & load);
|
||||
friend ostream & operator << (ostream & save, SMESH_Quadrangle_2D & hyp);
|
||||
friend istream & operator >> (istream & load, SMESH_Quadrangle_2D & hyp);
|
||||
|
||||
protected:
|
||||
|
||||
void SetNormalizedGrid(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
FaceQuadStruct* quad)
|
||||
throw (SALOME_Exception);
|
||||
|
||||
UVPtStruct* LoadEdgePoints(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Face& F,
|
||||
const TopoDS_Edge& E,
|
||||
double first,
|
||||
double last);
|
||||
// bool isForward);
|
||||
|
||||
// FaceQuadStruct _quadDesc;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,322 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_Regular_1D.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
|
||||
#include "SMESH_Regular_1D.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
|
||||
#include "SMESH_LocalLength.hxx"
|
||||
#include "SMESH_NumberOfSegments.hxx"
|
||||
|
||||
#include "SMDS_MeshElement.hxx"
|
||||
#include "SMDS_MeshNode.hxx"
|
||||
#include "SMDS_EdgePosition.hxx"
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <GCPnts_AbscissaPoint.hxx>
|
||||
#include <GCPnts_UniformAbscissa.hxx>
|
||||
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Regular_1D::SMESH_Regular_1D(int hypId, int studyId,
|
||||
SMESH_Gen * gen):SMESH_1D_Algo(hypId, studyId, gen)
|
||||
{
|
||||
MESSAGE("SMESH_Regular_1D::SMESH_Regular_1D");
|
||||
_name = "Regular_1D";
|
||||
// _shapeType = TopAbs_EDGE;
|
||||
_shapeType = (1 << TopAbs_EDGE);
|
||||
_compatibleHypothesis.push_back("LocalLength");
|
||||
_compatibleHypothesis.push_back("NumberOfSegments");
|
||||
|
||||
_localLength = 0;
|
||||
_numberOfSegments = 0;
|
||||
_hypLocalLength = NULL;
|
||||
_hypNumberOfSegments = NULL;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Regular_1D::~SMESH_Regular_1D()
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & SMESH_Regular_1D::SaveTo(ostream & save)
|
||||
{
|
||||
return save << this;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & SMESH_Regular_1D::LoadFrom(istream & load)
|
||||
{
|
||||
return load >> (*this);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & operator <<(ostream & save, SMESH_Regular_1D & hyp)
|
||||
{
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & operator >>(istream & load, SMESH_Regular_1D & hyp)
|
||||
{
|
||||
return load;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool SMESH_Regular_1D::CheckHypothesis(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Shape & aShape)
|
||||
{
|
||||
//MESSAGE("SMESH_Regular_1D::CheckHypothesis");
|
||||
|
||||
list <const SMESHDS_Hypothesis * >::const_iterator itl;
|
||||
const SMESHDS_Hypothesis *theHyp;
|
||||
|
||||
const list <const SMESHDS_Hypothesis * >&hyps = GetUsedHypothesis(aMesh, aShape);
|
||||
int nbHyp = hyps.size();
|
||||
if (nbHyp != 1) return false; // only one compatible hypothesis allowed
|
||||
|
||||
itl = hyps.begin();
|
||||
theHyp = (*itl);
|
||||
|
||||
string hypName = theHyp->GetName();
|
||||
int hypId = theHyp->GetID();
|
||||
//SCRUTE(hypName);
|
||||
|
||||
bool isOk = false;
|
||||
|
||||
if (hypName == "LocalLength")
|
||||
{
|
||||
_hypLocalLength = dynamic_cast <const SMESH_LocalLength * >(theHyp);
|
||||
ASSERT(_hypLocalLength);
|
||||
_localLength = _hypLocalLength->GetLength();
|
||||
_numberOfSegments = 0;
|
||||
isOk = true;
|
||||
}
|
||||
|
||||
if (hypName == "NumberOfSegments")
|
||||
{
|
||||
_hypNumberOfSegments =
|
||||
dynamic_cast <const SMESH_NumberOfSegments * >(theHyp);
|
||||
ASSERT(_hypNumberOfSegments);
|
||||
_numberOfSegments = _hypNumberOfSegments->GetNumberOfSegments();
|
||||
_scaleFactor = _hypNumberOfSegments->GetScaleFactor();
|
||||
_localLength = 0;
|
||||
isOk = true;
|
||||
}
|
||||
|
||||
//SCRUTE(_localLength);
|
||||
//SCRUTE(_numberOfSegments);
|
||||
|
||||
return isOk;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool SMESH_Regular_1D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape)
|
||||
{
|
||||
MESSAGE("SMESH_Regular_1D::Compute");
|
||||
|
||||
SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
|
||||
SMESH_subMesh *theSubMesh = aMesh.GetSubMesh(aShape);
|
||||
|
||||
const TopoDS_Edge & EE = TopoDS::Edge(aShape);
|
||||
TopoDS_Edge E = TopoDS::Edge(EE.Oriented(TopAbs_FORWARD));
|
||||
|
||||
double f, l;
|
||||
Handle(Geom_Curve) Curve = BRep_Tool::Curve(E, f, l);
|
||||
|
||||
TopoDS_Vertex VFirst, VLast;
|
||||
TopExp::Vertices(E, VFirst, VLast); // Vfirst corresponds to f and Vlast to l
|
||||
|
||||
double length = EdgeLength(E);
|
||||
//SCRUTE(length);
|
||||
|
||||
double eltSize = 1;
|
||||
// if (_localLength > 0) eltSize = _localLength;
|
||||
if (_localLength > 0)
|
||||
{
|
||||
double nbseg = ceil(length / _localLength); // integer sup
|
||||
if (nbseg <= 0)
|
||||
nbseg = 1; // degenerated edge
|
||||
eltSize = length / nbseg;
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT(_numberOfSegments > 0);
|
||||
eltSize = length / _numberOfSegments;
|
||||
}
|
||||
|
||||
ASSERT(!VFirst.IsNull());
|
||||
SMDS_Iterator<const SMDS_MeshNode *> * lid=
|
||||
aMesh.GetSubMesh(VFirst)->GetSubMeshDS()->GetNodes();
|
||||
const SMDS_MeshNode * idFirst = lid->next();
|
||||
delete lid;
|
||||
|
||||
ASSERT(!VLast.IsNull());
|
||||
lid=aMesh.GetSubMesh(VLast)->GetSubMeshDS()->GetNodes();
|
||||
const SMDS_MeshNode * idLast = lid->next();
|
||||
delete lid;
|
||||
|
||||
if (!Curve.IsNull())
|
||||
{
|
||||
GeomAdaptor_Curve C3d(Curve);
|
||||
GCPnts_UniformAbscissa Discret(C3d, eltSize, f, l);
|
||||
int NbPoints = Discret.NbPoints();
|
||||
//MESSAGE("nb points on edge : "<<NbPoints);
|
||||
|
||||
// edge extrema (indexes : 1 & NbPoints) already in SMDS (TopoDS_Vertex)
|
||||
// only internal nodes receive an edge position with param on curve
|
||||
|
||||
const SMDS_MeshNode * idPrev = idFirst;
|
||||
for (int i = 2; i < NbPoints; i++)
|
||||
{
|
||||
double param = Discret.Parameter(i);
|
||||
|
||||
if (_numberOfSegments > 1)
|
||||
{
|
||||
double epsilon = 0.001;
|
||||
if (fabs(_scaleFactor - 1.0) > epsilon)
|
||||
{
|
||||
double alpha =
|
||||
pow(_scaleFactor, 1.0 / (_numberOfSegments - 1));
|
||||
double d =
|
||||
length * (1 - pow(alpha, i - 1)) / (1 - pow(alpha,
|
||||
_numberOfSegments));
|
||||
param = d;
|
||||
}
|
||||
}
|
||||
|
||||
gp_Pnt P = Curve->Value(param);
|
||||
|
||||
//Add the Node in the DataStructure
|
||||
//MESSAGE("point "<<nodeId<<" "<<P.X()<<" "<<P.Y()<<" "<<P.Z()<<" - "<<i<<" "<<param);
|
||||
SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z());
|
||||
meshDS->SetNodeOnEdge(node, E);
|
||||
|
||||
// **** edgePosition associe au point = param.
|
||||
SMDS_EdgePosition* epos=dynamic_cast<SMDS_EdgePosition *>(node->GetPosition());
|
||||
epos->SetUParameter(param);
|
||||
|
||||
SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, node);
|
||||
meshDS->SetMeshElementOnShape(edge, E);
|
||||
idPrev = node;
|
||||
}
|
||||
SMDS_MeshEdge* edge = meshDS->AddEdge(idPrev, idLast);
|
||||
meshDS->SetMeshElementOnShape(edge, E);
|
||||
}
|
||||
else
|
||||
{
|
||||
// MESSAGE ("Edge Degeneree non traitee --- arret");
|
||||
// ASSERT(0);
|
||||
if (BRep_Tool::Degenerated(E))
|
||||
{
|
||||
// Edge is a degenerated Edge : We put n = 5 points on the edge.
|
||||
int NbPoints = 5;
|
||||
BRep_Tool::Range(E, f, l);
|
||||
double du = (l - f) / (NbPoints - 1);
|
||||
MESSAGE("************* Degenerated edge! *****************");
|
||||
|
||||
TopoDS_Vertex V1, V2;
|
||||
TopExp::Vertices(E, V1, V2);
|
||||
gp_Pnt P = BRep_Tool::Pnt(V1);
|
||||
|
||||
const SMDS_MeshNode * idPrev = idFirst;
|
||||
for (int i = 2; i < NbPoints; i++)
|
||||
{
|
||||
double param = f + (i - 1) * du;
|
||||
SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z());
|
||||
meshDS->SetNodeOnEdge(node, E);
|
||||
|
||||
// Handle (SMDS_EdgePosition) epos
|
||||
// = new SMDS_EdgePosition(theSubMesh->GetId(),param);
|
||||
// node->SetPosition(epos);
|
||||
SMDS_EdgePosition* epos
|
||||
= dynamic_cast<SMDS_EdgePosition*>(node->GetPosition());
|
||||
epos->SetUParameter(param);
|
||||
|
||||
SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, node);
|
||||
meshDS->SetMeshElementOnShape(edge, E);
|
||||
idPrev = node;
|
||||
}
|
||||
SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, idLast);
|
||||
meshDS->SetMeshElementOnShape(edge, E);
|
||||
}
|
||||
else
|
||||
ASSERT(0);
|
||||
}
|
||||
return true;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_Regular_1D.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_REGULAR_1D_HXX_
|
||||
#define _SMESH_REGULAR_1D_HXX_
|
||||
|
||||
#include "SMESH_1D_Algo.hxx"
|
||||
|
||||
class SMESH_LocalLength;
|
||||
class SMESH_NumberOfSegments;
|
||||
|
||||
class SMESH_Regular_1D:
|
||||
public SMESH_1D_Algo
|
||||
{
|
||||
public:
|
||||
SMESH_Regular_1D(int hypId, int studyId, SMESH_Gen* gen);
|
||||
virtual ~SMESH_Regular_1D();
|
||||
|
||||
virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
ostream & SaveTo(ostream & save);
|
||||
istream & LoadFrom(istream & load);
|
||||
friend ostream & operator << (ostream & save, SMESH_Regular_1D & hyp);
|
||||
friend istream & operator >> (istream & load, SMESH_Regular_1D & hyp);
|
||||
|
||||
protected:
|
||||
double _localLength;
|
||||
int _numberOfSegments;
|
||||
double _scaleFactor;
|
||||
const SMESH_LocalLength* _hypLocalLength;
|
||||
const SMESH_NumberOfSegments* _hypNumberOfSegments;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,80 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_Hexa_3D_i.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_Hexa_3D_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_HypothesisFactory.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Hexa_3D_i::SMESH_Hexa_3D_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl)
|
||||
{
|
||||
MESSAGE("SMESH_Hexa_3D_i::SMESH_Hexa_3D_i");
|
||||
_genImpl = genImpl;
|
||||
::SMESH_Hexa_3D* impl
|
||||
= new ::SMESH_Hexa_3D(_genImpl->_hypothesisFactory.GetANewId(),
|
||||
studyId,
|
||||
genImpl);
|
||||
SetImpl(impl);
|
||||
_baseImpl = _impl;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Hexa_3D_i::~SMESH_Hexa_3D_i()
|
||||
{
|
||||
MESSAGE("SMESH_Hexa_3D_i::~SMESH_Hexa_3D_i");
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_Hexa_3D_i::SetImpl(::SMESH_Hexa_3D* impl)
|
||||
{
|
||||
MESSAGE("SMESH_Hexa_3D_i::SetImpl");
|
||||
SMESH_3D_Algo_i::SetImpl(impl);
|
||||
_impl = impl;
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_Hexa_3D_i.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_HEXA_3D_I_HXX_
|
||||
#define _SMESH_HEXA_3D_I_HXX_
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
|
||||
|
||||
#include "SMESH_3D_Algo_i.hxx"
|
||||
|
||||
#include "SMESH_Hexa_3D.hxx"
|
||||
|
||||
class SMESH_Hexa_3D_i:
|
||||
public POA_SMESH::SMESH_Hexa_3D,
|
||||
public SMESH_3D_Algo_i
|
||||
{
|
||||
public:
|
||||
SMESH_Hexa_3D_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl);
|
||||
|
||||
virtual ~SMESH_Hexa_3D_i();
|
||||
|
||||
protected:
|
||||
virtual void SetImpl(::SMESH_Hexa_3D* impl);
|
||||
|
||||
::SMESH_Hexa_3D* _impl;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,142 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_HypothesisFactory_i.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
#include "SMESH_HypothesisFactory_i.hxx"
|
||||
#include "SMESH_Hypothesis_i.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
// Add new hypothesis here (include file)
|
||||
//---------------------------------------
|
||||
#include "SMESH_LocalLength_i.hxx"
|
||||
#include "SMESH_NumberOfSegments_i.hxx"
|
||||
#include "SMESH_LengthFromEdges_i.hxx"
|
||||
#include "SMESH_MaxElementArea_i.hxx"
|
||||
#include "SMESH_MaxElementVolume_i.hxx"
|
||||
#include "SMESH_Regular_1D_i.hxx"
|
||||
#include "SMESH_MEFISTO_2D_i.hxx"
|
||||
#include "SMESH_Quadrangle_2D_i.hxx"
|
||||
#include "SMESH_Hexa_3D_i.hxx"
|
||||
#ifdef HAVE_NETGEN
|
||||
#include "SMESH_NETGEN_3D_i.hxx"
|
||||
#endif
|
||||
//---------------------------------------
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Specific Hypothesis Creators are generated with a template which inherits a
|
||||
* generic hypothesis creator. Each creator returns an hypothesis of the type
|
||||
* given in the template.
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
template <class T> class HypothesisCreator_i: public GenericHypothesisCreator_i
|
||||
{
|
||||
public:
|
||||
virtual SMESH_Hypothesis_i* Create (const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl)
|
||||
{
|
||||
return new T(anHyp, studyId, genImpl);
|
||||
};
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Constructor: instanciate specific hypothesis creators, fill a private map
|
||||
* indexed by hypothesis names. THIS METHOD MUST BE COMPLETED WHEN A NEW
|
||||
* HYPOTHESIS IS ADDED.
|
||||
* Specific hypothesis creator are defined with the above template.
|
||||
* Hypothesis names are related to the corresponding class names:
|
||||
* prefix = SMESH_ ; suffix = _i .
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_HypothesisFactory_i::SMESH_HypothesisFactory_i()
|
||||
{
|
||||
// Add new hypothesis here (creators)
|
||||
//---------------------------------------
|
||||
_creatorMap["LocalLength"] = new HypothesisCreator_i<SMESH_LocalLength_i>;
|
||||
_creatorMap["NumberOfSegments"] = new HypothesisCreator_i<SMESH_NumberOfSegments_i>;
|
||||
_creatorMap["LengthFromEdges"] = new HypothesisCreator_i<SMESH_LengthFromEdges_i>;
|
||||
_creatorMap["MaxElementArea"] = new HypothesisCreator_i<SMESH_MaxElementArea_i>;
|
||||
_creatorMap["MaxElementVolume"] = new HypothesisCreator_i<SMESH_MaxElementVolume_i>;
|
||||
_creatorMap["Regular_1D"] = new HypothesisCreator_i<SMESH_Regular_1D_i>;
|
||||
_creatorMap["MEFISTO_2D"] = new HypothesisCreator_i<SMESH_MEFISTO_2D_i>;
|
||||
_creatorMap["Quadrangle_2D"] = new HypothesisCreator_i<SMESH_Quadrangle_2D_i>;
|
||||
_creatorMap["Hexa_3D"] = new HypothesisCreator_i<SMESH_Hexa_3D_i>;
|
||||
#ifdef HAVE_NETGEN
|
||||
_creatorMap["NETGEN_3D"] = new HypothesisCreator_i<SMESH_NETGEN_3D_i>;
|
||||
#endif
|
||||
//---------------------------------------
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Destructor: deletes specific hypothesis creators instanciated in the
|
||||
* constructor.
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_HypothesisFactory_i::~SMESH_HypothesisFactory_i()
|
||||
{
|
||||
map<string, GenericHypothesisCreator_i*>::iterator it;
|
||||
for (it = _creatorMap.begin(); it != _creatorMap.end(); it++)
|
||||
{
|
||||
delete (*it).second;
|
||||
}
|
||||
_creatorMap.clear();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Hypothesis_i* SMESH_HypothesisFactory_i::Create(const char* anHyp,
|
||||
CORBA::Long studyId,
|
||||
::SMESH_Gen* genImpl)
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
MESSAGE("SMESH_HypothesisFactory::Create " << anHyp);
|
||||
if (_creatorMap.find(anHyp) == _creatorMap.end())
|
||||
{
|
||||
MESSAGE("levee exception CORBA");
|
||||
THROW_SALOME_CORBA_EXCEPTION("bad hypothesis type name", \
|
||||
SALOME::BAD_PARAM);
|
||||
}
|
||||
SMESH_Hypothesis_i* myHyp = _creatorMap[anHyp]->Create(anHyp,
|
||||
studyId,
|
||||
genImpl);
|
||||
return myHyp;
|
||||
}
|
||||
|
||||
|
@ -1,59 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_HypothesisFactory_i.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_HYPOTHESISFACTORY_I_HXX_
|
||||
#define _SMESH_HYPOTHESISFACTORY_I_HXX_
|
||||
|
||||
#include "SMESH_Hypothesis_i.hxx"
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
class GenericHypothesisCreator_i
|
||||
{
|
||||
public:
|
||||
virtual SMESH_Hypothesis_i* Create(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl) = 0;
|
||||
};
|
||||
|
||||
class SMESH_HypothesisFactory_i
|
||||
{
|
||||
public:
|
||||
SMESH_HypothesisFactory_i();
|
||||
virtual ~SMESH_HypothesisFactory_i();
|
||||
|
||||
SMESH_Hypothesis_i* Create(const char* anHyp,
|
||||
CORBA::Long studyId,
|
||||
::SMESH_Gen* genImpl)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
private:
|
||||
map<string, GenericHypothesisCreator_i*> _creatorMap;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,98 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_LengthFromEdges_i.cxx
|
||||
// Author : Nadir BOUHAMOU CEA/DEN, Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_LengthFromEdges_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_HypothesisFactory.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Constructor:
|
||||
* _name is related to the class name: prefix = SMESH_ ; suffix = _i .
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_LengthFromEdges_i::SMESH_LengthFromEdges_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl)
|
||||
{
|
||||
MESSAGE("SMESH_LengthFromEdges_i::SMESH_LengthFromEdges_i");
|
||||
_impl = new ::SMESH_LengthFromEdges(genImpl->_hypothesisFactory.GetANewId(),
|
||||
studyId,
|
||||
genImpl);
|
||||
_baseImpl = _impl;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_LengthFromEdges_i::~SMESH_LengthFromEdges_i()
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_LengthFromEdges_i::SetMode(CORBA::Long mode)
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
ASSERT(_impl);
|
||||
try
|
||||
{
|
||||
_impl->SetMode(mode);
|
||||
}
|
||||
catch (SALOME_Exception& S_ex)
|
||||
{
|
||||
THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), \
|
||||
SALOME::BAD_PARAM);
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
CORBA::Long SMESH_LengthFromEdges_i::GetMode()
|
||||
{
|
||||
ASSERT(_impl);
|
||||
return _impl->GetMode();
|
||||
}
|
||||
|
@ -1,59 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_LengthFromEdges_i.hxx
|
||||
// Author : Nadir BOUHAMOU CEA/DEN, Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_LENGTHFROMEDGES_I_HXX_
|
||||
#define _SMESH_LENGTHFROMEDGES_I_HXX_
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
|
||||
|
||||
#include "SMESH_Hypothesis_i.hxx"
|
||||
|
||||
#include "SMESH_LengthFromEdges.hxx"
|
||||
|
||||
class SMESH_LengthFromEdges_i:
|
||||
public POA_SMESH::SMESH_LengthFromEdges,
|
||||
public SMESH_Hypothesis_i
|
||||
{
|
||||
public:
|
||||
SMESH_LengthFromEdges_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl);
|
||||
virtual ~SMESH_LengthFromEdges_i();
|
||||
|
||||
void SetMode(CORBA::Long mode)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long GetMode();
|
||||
|
||||
protected:
|
||||
::SMESH_LengthFromEdges* _impl;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,98 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_LocalLength_i.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_LocalLength_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_HypothesisFactory.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Constructor:
|
||||
* _name is related to the class name: prefix = SMESH_ ; suffix = _i .
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_LocalLength_i::SMESH_LocalLength_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl)
|
||||
{
|
||||
MESSAGE("SMESH_LocalLength_i::SMESH_LocalLength_i");
|
||||
_impl = new ::SMESH_LocalLength(genImpl->_hypothesisFactory.GetANewId(),
|
||||
studyId,
|
||||
genImpl);
|
||||
_baseImpl = _impl;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_LocalLength_i::~SMESH_LocalLength_i()
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_LocalLength_i::SetLength(CORBA::Double length)
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
ASSERT(_impl);
|
||||
try
|
||||
{
|
||||
_impl->SetLength(length);
|
||||
}
|
||||
catch (SALOME_Exception& S_ex)
|
||||
{
|
||||
THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), \
|
||||
SALOME::BAD_PARAM);
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
CORBA::Double SMESH_LocalLength_i::GetLength()
|
||||
{
|
||||
ASSERT(_impl);
|
||||
return _impl->GetLength();
|
||||
}
|
||||
|
@ -1,59 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_LocalLength_i.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_LOCALLENGTH_I_HXX_
|
||||
#define _SMESH_LOCALLENGTH_I_HXX_
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
|
||||
|
||||
#include "SMESH_Hypothesis_i.hxx"
|
||||
|
||||
#include "SMESH_LocalLength.hxx"
|
||||
|
||||
class SMESH_LocalLength_i:
|
||||
public POA_SMESH::SMESH_LocalLength,
|
||||
public SMESH_Hypothesis_i
|
||||
{
|
||||
public:
|
||||
SMESH_LocalLength_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl);
|
||||
virtual ~SMESH_LocalLength_i();
|
||||
|
||||
void SetLength(CORBA::Double length)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Double GetLength();
|
||||
|
||||
protected:
|
||||
::SMESH_LocalLength* _impl;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,80 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_MEFISTO_2D_i.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_MEFISTO_2D_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_HypothesisFactory.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_MEFISTO_2D_i::SMESH_MEFISTO_2D_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl)
|
||||
{
|
||||
MESSAGE("SMESH_MEFISTO_2D_i::SMESH_MEFISTO_2D_i");
|
||||
_genImpl = genImpl;
|
||||
::SMESH_MEFISTO_2D* impl
|
||||
= new ::SMESH_MEFISTO_2D(_genImpl->_hypothesisFactory.GetANewId(),
|
||||
studyId,
|
||||
genImpl);
|
||||
SetImpl(impl);
|
||||
_baseImpl = _impl;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_MEFISTO_2D_i::~SMESH_MEFISTO_2D_i()
|
||||
{
|
||||
MESSAGE("SMESH_MEFISTO_2D_i::~SMESH_MEFISTO_2D_i");
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_MEFISTO_2D_i::SetImpl(::SMESH_MEFISTO_2D* impl)
|
||||
{
|
||||
MESSAGE("SMESH_MEFISTO_2D_i::SetImpl");
|
||||
SMESH_2D_Algo_i::SetImpl(impl);
|
||||
_impl = impl;
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_MEFISTO_2D_i.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_MEFISTO_2D_I_HXX_
|
||||
#define _SMESH_MEFISTO_2D_I_HXX_
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
|
||||
|
||||
#include "SMESH_2D_Algo_i.hxx"
|
||||
|
||||
#include "SMESH_MEFISTO_2D.hxx"
|
||||
|
||||
class SMESH_MEFISTO_2D_i:
|
||||
public POA_SMESH::SMESH_MEFISTO_2D,
|
||||
public SMESH_2D_Algo_i
|
||||
{
|
||||
public:
|
||||
SMESH_MEFISTO_2D_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl);
|
||||
|
||||
virtual ~SMESH_MEFISTO_2D_i();
|
||||
|
||||
protected:
|
||||
virtual void SetImpl(::SMESH_MEFISTO_2D* impl);
|
||||
|
||||
::SMESH_MEFISTO_2D* _impl;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,98 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_MaxElementArea_i.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_MaxElementArea_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_HypothesisFactory.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Constructor:
|
||||
* _name is related to the class name: prefix = SMESH_ ; suffix = _i .
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_MaxElementArea_i::SMESH_MaxElementArea_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl)
|
||||
{
|
||||
MESSAGE("SMESH_MaxElementArea_i::SMESH_MaxElementArea_i");
|
||||
_impl = new ::SMESH_MaxElementArea(genImpl->_hypothesisFactory.GetANewId(),
|
||||
studyId,
|
||||
genImpl);
|
||||
_baseImpl = _impl;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_MaxElementArea_i::~SMESH_MaxElementArea_i()
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_MaxElementArea_i::SetMaxElementArea(CORBA::Double area)
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
ASSERT(_impl);
|
||||
try
|
||||
{
|
||||
_impl->SetMaxArea(area);
|
||||
}
|
||||
catch (SALOME_Exception& S_ex)
|
||||
{
|
||||
THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), \
|
||||
SALOME::BAD_PARAM);
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
CORBA::Double SMESH_MaxElementArea_i::GetMaxElementArea()
|
||||
{
|
||||
ASSERT(_impl);
|
||||
return _impl->GetMaxArea();
|
||||
}
|
||||
|
@ -1,58 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_MaxElementArea_i.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_MAXELEMENTAREA_I_HXX_
|
||||
#define _SMESH_MAXELEMENTAREA_I_HXX_
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
|
||||
|
||||
#include "SMESH_Hypothesis_i.hxx"
|
||||
|
||||
#include "SMESH_MaxElementArea.hxx"
|
||||
|
||||
class SMESH_MaxElementArea_i:
|
||||
public POA_SMESH::SMESH_MaxElementArea,
|
||||
public SMESH_Hypothesis_i
|
||||
{
|
||||
public:
|
||||
SMESH_MaxElementArea_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl);
|
||||
virtual ~SMESH_MaxElementArea_i();
|
||||
|
||||
void SetMaxElementArea(CORBA::Double area)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Double GetMaxElementArea();
|
||||
|
||||
protected:
|
||||
::SMESH_MaxElementArea* _impl;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,99 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_MaxElementVolume_i.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
|
||||
#include "SMESH_MaxElementVolume_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_HypothesisFactory.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Constructor:
|
||||
* _name is related to the class name: prefix = SMESH_ ; suffix = _i .
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_MaxElementVolume_i::SMESH_MaxElementVolume_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl)
|
||||
{
|
||||
MESSAGE("SMESH_MaxElementVolume_i::SMESH_MaxElementVolume_i");
|
||||
_impl = new ::SMESH_MaxElementVolume(genImpl->_hypothesisFactory.GetANewId(),
|
||||
studyId,
|
||||
genImpl);
|
||||
_baseImpl = _impl;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_MaxElementVolume_i::~SMESH_MaxElementVolume_i()
|
||||
{
|
||||
MESSAGE("SMESH_MaxElementVolume_i::~SMESH_MaxElementVolume_i()");
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_MaxElementVolume_i::SetMaxElementVolume(CORBA::Double volume)
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
ASSERT(_impl);
|
||||
try
|
||||
{
|
||||
_impl->SetMaxVolume(volume);
|
||||
}
|
||||
catch (SALOME_Exception& S_ex)
|
||||
{
|
||||
THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), \
|
||||
SALOME::BAD_PARAM);
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
CORBA::Double SMESH_MaxElementVolume_i::GetMaxElementVolume()
|
||||
{
|
||||
ASSERT(_impl);
|
||||
return _impl->GetMaxVolume();
|
||||
}
|
||||
|
@ -1,58 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_MaxElementVolume_i.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_MAXELEMENTVOLUME_I_HXX_
|
||||
#define _SMESH_MAXELEMENTVOLUME_I_HXX_
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
|
||||
|
||||
#include "SMESH_Hypothesis_i.hxx"
|
||||
|
||||
#include "SMESH_MaxElementVolume.hxx"
|
||||
|
||||
class SMESH_MaxElementVolume_i:
|
||||
public POA_SMESH::SMESH_MaxElementVolume,
|
||||
public SMESH_Hypothesis_i
|
||||
{
|
||||
public:
|
||||
SMESH_MaxElementVolume_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl);
|
||||
virtual ~SMESH_MaxElementVolume_i();
|
||||
|
||||
void SetMaxElementVolume(CORBA::Double volume)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Double GetMaxElementVolume();
|
||||
|
||||
protected:
|
||||
::SMESH_MaxElementVolume* _impl;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,60 +0,0 @@
|
||||
//=============================================================================
|
||||
// File : SMESH_NETGEN_3D_i.cxx
|
||||
// Created : Jeudi 31 Janvier 2003
|
||||
// Author : Nadir Bouhamou CEA
|
||||
// Project : SALOME
|
||||
// Copyright : CEA 2003
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
using namespace std;
|
||||
|
||||
#include "SMESH_NETGEN_3D_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_HypothesisFactory.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_NETGEN_3D_i::SMESH_NETGEN_3D_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl)
|
||||
{
|
||||
MESSAGE("SMESH_NETGEN_3D_i::SMESH_NETGEN_3D_i");
|
||||
_genImpl = genImpl;
|
||||
::SMESH_NETGEN_3D* impl
|
||||
= new ::SMESH_NETGEN_3D(_genImpl->_hypothesisFactory.GetANewId(),
|
||||
studyId,
|
||||
genImpl);
|
||||
SetImpl(impl);
|
||||
_baseImpl = _impl;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_NETGEN_3D_i::~SMESH_NETGEN_3D_i()
|
||||
{
|
||||
MESSAGE("SMESH_NETGEN_3D_i::~SMESH_NETGEN_3D_i");
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_NETGEN_3D_i::SetImpl(::SMESH_NETGEN_3D* impl)
|
||||
{
|
||||
MESSAGE("SMESH_NETGEN_3D_i::SetImpl");
|
||||
SMESH_3D_Algo_i::SetImpl(impl);
|
||||
_impl = impl;
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
//=============================================================================
|
||||
// File : SMESH_NETGEN_3D_i.hxx
|
||||
// Created : Jeudi 31 Janvier 2003
|
||||
// Author : Nadir Bouhamou CEA
|
||||
// Project : SALOME
|
||||
// Copyright : CEA 2003
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
#ifndef _SMESH_NETGEN_3D_I_HXX_
|
||||
#define _SMESH_NETGEN_3D_I_HXX_
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
|
||||
|
||||
#include "SMESH_3D_Algo_i.hxx"
|
||||
|
||||
#include "SMESH_NETGEN_3D.hxx"
|
||||
|
||||
class SMESH_NETGEN_3D_i:
|
||||
public POA_SMESH::SMESH_NETGEN_3D,
|
||||
public SMESH_3D_Algo_i
|
||||
{
|
||||
public:
|
||||
SMESH_NETGEN_3D_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl);
|
||||
|
||||
virtual ~SMESH_NETGEN_3D_i();
|
||||
|
||||
protected:
|
||||
virtual void SetImpl(::SMESH_NETGEN_3D* impl);
|
||||
|
||||
::SMESH_NETGEN_3D* _impl;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,133 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_NumberOfSegments_i.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_NumberOfSegments_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_HypothesisFactory.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Constructor:
|
||||
* _name is related to the class name: prefix = SMESH_ ; suffix = _i .
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_NumberOfSegments_i::SMESH_NumberOfSegments_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl)
|
||||
{
|
||||
MESSAGE("SMESH_NumberOfSegments_i::SMESH_NumberOfSegments_i");
|
||||
_impl= new ::SMESH_NumberOfSegments(genImpl->_hypothesisFactory.GetANewId(),
|
||||
studyId,
|
||||
genImpl);
|
||||
_baseImpl = _impl;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_NumberOfSegments_i::~SMESH_NumberOfSegments_i()
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void
|
||||
SMESH_NumberOfSegments_i::SetNumberOfSegments(CORBA::Long segmentsNumber)
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
ASSERT(_impl);
|
||||
try
|
||||
{
|
||||
_impl->SetNumberOfSegments(segmentsNumber);
|
||||
}
|
||||
catch (SALOME_Exception& S_ex)
|
||||
{
|
||||
THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), \
|
||||
SALOME::BAD_PARAM);
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
CORBA::Long SMESH_NumberOfSegments_i::GetNumberOfSegments()
|
||||
{
|
||||
ASSERT(_impl);
|
||||
return _impl->GetNumberOfSegments();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void
|
||||
SMESH_NumberOfSegments_i::SetScaleFactor(CORBA::Double scaleFactor)
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
ASSERT(_impl);
|
||||
try
|
||||
{
|
||||
_impl->SetScaleFactor(scaleFactor);
|
||||
}
|
||||
catch (SALOME_Exception& S_ex)
|
||||
{
|
||||
THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), \
|
||||
SALOME::BAD_PARAM);
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
CORBA::Double SMESH_NumberOfSegments_i::GetScaleFactor()
|
||||
{
|
||||
ASSERT(_impl);
|
||||
return _impl->GetScaleFactor();
|
||||
}
|
||||
|
@ -1,63 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_NumberOfSegments_i.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_NUMBEROFSEGMENTS_I_HXX_
|
||||
#define _SMESH_NUMBEROFSEGMENTS_I_HXX_
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
|
||||
|
||||
#include "SMESH_Hypothesis_i.hxx"
|
||||
|
||||
#include "SMESH_NumberOfSegments.hxx"
|
||||
|
||||
class SMESH_NumberOfSegments_i:
|
||||
public POA_SMESH::SMESH_NumberOfSegments,
|
||||
public SMESH_Hypothesis_i
|
||||
{
|
||||
public:
|
||||
SMESH_NumberOfSegments_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl);
|
||||
virtual ~SMESH_NumberOfSegments_i();
|
||||
|
||||
void SetNumberOfSegments(CORBA::Long segmentsNumber)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long GetNumberOfSegments();
|
||||
|
||||
void SetScaleFactor(CORBA::Double scaleFactor)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Double GetScaleFactor();
|
||||
|
||||
protected:
|
||||
::SMESH_NumberOfSegments* _impl;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,80 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_Quadrangle_2D_i.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_Quadrangle_2D_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_HypothesisFactory.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Quadrangle_2D_i::SMESH_Quadrangle_2D_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl)
|
||||
{
|
||||
MESSAGE("SMESH_Quadrangle_2D_i::SMESH_Quadrangle_2D_i");
|
||||
_genImpl = genImpl;
|
||||
::SMESH_Quadrangle_2D* impl
|
||||
= new ::SMESH_Quadrangle_2D(_genImpl->_hypothesisFactory.GetANewId(),
|
||||
studyId,
|
||||
genImpl);
|
||||
SetImpl(impl);
|
||||
_baseImpl = _impl;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Quadrangle_2D_i::~SMESH_Quadrangle_2D_i()
|
||||
{
|
||||
MESSAGE("SMESH_Quadrangle_2D_i::~SMESH_Quadrangle_2D_i");
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_Quadrangle_2D_i::SetImpl(::SMESH_Quadrangle_2D* impl)
|
||||
{
|
||||
MESSAGE("SMESH_Quadrangle_2D_i::SetImpl");
|
||||
SMESH_2D_Algo_i::SetImpl(impl);
|
||||
_impl = impl;
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_Quadrangle_2D_i.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_QUADRANGLE_2D_I_HXX_
|
||||
#define _SMESH_QUADRANGLE_2D_I_HXX_
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
|
||||
|
||||
#include "SMESH_2D_Algo_i.hxx"
|
||||
|
||||
#include "SMESH_Quadrangle_2D.hxx"
|
||||
|
||||
class SMESH_Quadrangle_2D_i:
|
||||
public POA_SMESH::SMESH_Quadrangle_2D,
|
||||
public SMESH_2D_Algo_i
|
||||
{
|
||||
public:
|
||||
SMESH_Quadrangle_2D_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl);
|
||||
|
||||
virtual ~SMESH_Quadrangle_2D_i();
|
||||
|
||||
protected:
|
||||
virtual void SetImpl(::SMESH_Quadrangle_2D* impl);
|
||||
|
||||
::SMESH_Quadrangle_2D* _impl;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,80 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_Regular_1D_i.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_Regular_1D_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_HypothesisFactory.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Regular_1D_i::SMESH_Regular_1D_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl)
|
||||
{
|
||||
MESSAGE("SMESH_Regular_1D_i::SMESH_Regular_1D_i");
|
||||
_genImpl = genImpl;
|
||||
::SMESH_Regular_1D* impl
|
||||
= new ::SMESH_Regular_1D(_genImpl->_hypothesisFactory.GetANewId(),
|
||||
studyId,
|
||||
genImpl);
|
||||
SetImpl(impl);
|
||||
_baseImpl = _impl;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Regular_1D_i::~SMESH_Regular_1D_i()
|
||||
{
|
||||
MESSAGE("SMESH_Regular_1D_i::~SMESH_Regular_1D_i");
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_Regular_1D_i::SetImpl(::SMESH_Regular_1D* impl)
|
||||
{
|
||||
MESSAGE("SMESH_Regular_1D_i::SetImpl");
|
||||
SMESH_1D_Algo_i::SetImpl(impl);
|
||||
_impl = impl;
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESH_Regular_1D_i.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
#ifndef _SMESH_REGULAR_1D_I_HXX_
|
||||
#define _SMESH_REGULAR_1D_I_HXX_
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
|
||||
|
||||
#include "SMESH_1D_Algo_i.hxx"
|
||||
|
||||
#include "SMESH_Regular_1D.hxx"
|
||||
|
||||
class SMESH_Regular_1D_i:
|
||||
public POA_SMESH::SMESH_Regular_1D,
|
||||
public SMESH_1D_Algo_i
|
||||
{
|
||||
public:
|
||||
SMESH_Regular_1D_i(const char* anHyp,
|
||||
int studyId,
|
||||
::SMESH_Gen* genImpl);
|
||||
|
||||
virtual ~SMESH_Regular_1D_i();
|
||||
|
||||
protected:
|
||||
virtual void SetImpl(::SMESH_Regular_1D* impl);
|
||||
|
||||
::SMESH_Regular_1D* _impl;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user