Version: 9.12.0
StdMeshers_QuadrangleParams.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // File : StdMeshers_QuadrangleParams.hxx
20 // Author : Sergey KUUL, OCC
21 // Module : SMESH
22 
23 #ifndef _SMESH_QUADRANGLEPARAMS_HXX_
24 #define _SMESH_QUADRANGLEPARAMS_HXX_
25 
26 #include "SMESH_StdMeshers.hxx"
27 #include "SMESH_Hypothesis.hxx"
28 
29 #include <gp_Pnt.hxx>
30 
31 #include <vector>
32 #include <string>
33 
35  {
42  };
43 
45 {
46  public:
47  StdMeshers_QuadrangleParams(int hypId, SMESH_Gen* gen);
48  virtual ~StdMeshers_QuadrangleParams();
49 
50  void SetTriaVertex (int id);
51  int GetTriaVertex() const { return _triaVertexID; }
52 
53  void SetObjectEntry (const char* entry) { _objEntry = entry; }
54  const char* GetObjectEntry() const { return _objEntry.c_str(); }
55 
56  void SetQuadType (StdMeshers_QuadType type);
57  StdMeshers_QuadType GetQuadType() const { return _quadType; }
58 
59  void SetEnforcedNodes( const std::vector< TopoDS_Shape >& shapes,
60  const std::vector< gp_Pnt >& points );
61  void GetEnforcedNodes( std::vector< TopoDS_Shape >& shapes,
62  std::vector< gp_Pnt >& points ) const;
63 
64  void SetCorners( std::vector< int >& vertexIDs ) { _cornerVertices.swap( vertexIDs ); }
65  const std::vector< int >& GetCorners() const { return _cornerVertices; }
66 
67  virtual std::ostream & SaveTo(std::ostream & save);
68  virtual std::istream & LoadFrom(std::istream & load);
69 
76  virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh,
77  const TopoDS_Shape& theShape);
78 
83  virtual bool SetParametersByDefaults(const TDefaults& dflts,
84  const SMESH_Mesh* theMesh=0);
85 
86 protected:
88  std::string _objEntry;
90  std::vector< TopoDS_Shape > _enforcedVertices;
91  std::vector< gp_Pnt > _enforcedPoints;
92  std::vector< int > _cornerVertices;
93 };
94 
95 #endif
#define STDMESHERS_EXPORT
Definition: SMESH_StdMeshers.hxx:38
StdMeshers_QuadType
Definition: StdMeshers_QuadrangleParams.hxx:35
@ QUAD_STANDARD
Definition: StdMeshers_QuadrangleParams.hxx:36
@ QUAD_QUADRANGLE_PREF
Definition: StdMeshers_QuadrangleParams.hxx:38
@ QUAD_REDUCED
Definition: StdMeshers_QuadrangleParams.hxx:40
@ QUAD_QUADRANGLE_PREF_REVERSED
Definition: StdMeshers_QuadrangleParams.hxx:39
@ QUAD_NB_TYPES
Definition: StdMeshers_QuadrangleParams.hxx:41
@ QUAD_TRIANGLE_PREF
Definition: StdMeshers_QuadrangleParams.hxx:37
virtual std::ostream & SaveTo(std::ostream &save)=0
virtual std::istream & LoadFrom(std::istream &load)=0
Definition: SMESH_Gen.hxx:68
Definition: SMESH_Hypothesis.hxx:48
virtual bool SetParametersByDefaults(const TDefaults &dflts, const SMESH_Mesh *theMesh=0)=0
Initialize my parameter values by default parameters.
virtual bool SetParametersByMesh(const SMESH_Mesh *theMesh, const TopoDS_Shape &theShape)=0
Initialize my parameter values by the mesh built on the geometry.
Definition: SMESH_Mesh.hxx:80
Definition: StdMeshers_QuadrangleParams.hxx:45
const char * GetObjectEntry() const
Definition: StdMeshers_QuadrangleParams.hxx:54
void SetObjectEntry(const char *entry)
Definition: StdMeshers_QuadrangleParams.hxx:53
int _triaVertexID
Definition: StdMeshers_QuadrangleParams.hxx:87
int GetTriaVertex() const
Definition: StdMeshers_QuadrangleParams.hxx:51
std::string _objEntry
Definition: StdMeshers_QuadrangleParams.hxx:88
StdMeshers_QuadType GetQuadType() const
Definition: StdMeshers_QuadrangleParams.hxx:57
const std::vector< int > & GetCorners() const
Definition: StdMeshers_QuadrangleParams.hxx:65
std::vector< TopoDS_Shape > _enforcedVertices
Definition: StdMeshers_QuadrangleParams.hxx:90
std::vector< int > _cornerVertices
Definition: StdMeshers_QuadrangleParams.hxx:92
void SetCorners(std::vector< int > &vertexIDs)
Definition: StdMeshers_QuadrangleParams.hxx:64
std::vector< gp_Pnt > _enforcedPoints
Definition: StdMeshers_QuadrangleParams.hxx:91
StdMeshers_QuadType _quadType
Definition: StdMeshers_QuadrangleParams.hxx:89