Salome HOME
Copyright update 2020
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_QuadrangleParams_i.hxx
1 // Copyright (C) 2007-2020  CEA/DEN, EDF R&D, 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_i.hxx
20 //  Author : Sergey KUUL, OCC
21 //  Module : SMESH
22
23 #ifndef _SMESH_QUADRANGLEPARAMS_I_HXX_
24 #define _SMESH_QUADRANGLEPARAMS_I_HXX_
25
26 #include "SMESH_StdMeshers_I.hxx"
27
28 #include <SALOMEconfig.h>
29 #include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
30
31 #include "SMESH_Hypothesis_i.hxx"
32 #include "StdMeshers_QuadrangleParams.hxx"
33
34 // ======================================================
35 // QuadrangleParams hypothesis
36 // ======================================================
37 class STDMESHERS_I_EXPORT StdMeshers_QuadrangleParams_i:
38   public virtual POA_StdMeshers::StdMeshers_QuadrangleParams,
39   public virtual SMESH_Hypothesis_i
40 {
41 public:
42   // Constructor
43   StdMeshers_QuadrangleParams_i (PortableServer::POA_ptr thePOA,
44                                  ::SMESH_Gen*            theGenImpl);
45   // Destructor
46   virtual ~StdMeshers_QuadrangleParams_i();
47
48   // Set base vertex for triangles
49   void SetTriaVertex (CORBA::Long vertID);
50
51   // Get base vertex for triangles
52   CORBA::Long GetTriaVertex();
53   
54   // Set the Entry of the Object
55   void SetObjectEntry (const char* theEntry);
56
57   // Get Object Entry
58   char* GetObjectEntry();
59
60   // Set the type of quadrangulation
61   void SetQuadType (StdMeshers::QuadType type);
62
63   // Get the type of quadrangulation
64   StdMeshers::QuadType GetQuadType();
65
66   // Set positions of enforced nodes
67   void SetEnforcedNodes(const GEOM::ListOfGO&     vertices,
68                         const SMESH::nodes_array& points) throw ( SALOME::SALOME_Exception );
69   
70   // Returns positions of enforced nodes
71   void GetEnforcedNodes(GEOM::ListOfGO_out vertices, SMESH::nodes_array_out points);
72
73   // Returns entries of shapes defining enforced nodes
74   SMESH::string_array* GetEnfVertices();
75
76   // Set corner vertices
77   void SetCorners( const SMESH::long_array& vertexIDs );
78
79   // Return IDs of corner vertices
80   SMESH::long_array* GetCorners();
81
82   // Get implementation
83   ::StdMeshers_QuadrangleParams* GetImpl();
84   
85   // Verify whether hypothesis supports given entity type 
86   CORBA::Boolean IsDimSupported( SMESH::Dimension type );
87
88   // Redefined Persistence
89   virtual char* SaveTo();
90   virtual void  LoadFrom( const char* theStream );
91
92
93   // Methods for copying mesh definition to other geometry
94
95   // Return geometry this hypothesis depends on. Return false if there is no geometry parameter
96   virtual bool getObjectsDependOn( std::vector< std::string > & entryArray,
97                                    std::vector< int >         & subIDArray ) const;
98
99   // Set new geometry instead of that returned by getObjectsDependOn()
100   virtual bool setObjectsDependOn( std::vector< std::string > & entryArray,
101                                    std::vector< int >         & subIDArray );
102  protected:
103
104   std::vector<std::string> myShapeEntries;
105   
106 };
107
108 #endif