Salome HOME
GetElementType method added
[modules/smesh.git] / src / SMESH_I / SMESH_Pattern_i.hxx
1 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
6 //  This library is free software; you can redistribute it and/or 
7 //  modify it under the terms of the GNU Lesser General Public 
8 //  License as published by the Free Software Foundation; either 
9 //  version 2.1 of the License. 
10 // 
11 //  This library is distributed in the hope that it will be useful, 
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 //  Lesser General Public License for more details. 
15 // 
16 //  You should have received a copy of the GNU Lesser General Public 
17 //  License along with this library; if not, write to the Free Software 
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 // File      : SMESH_Pattern_i.hxx
25 // Created   : Fri Aug 20 16:03:15 2004
26 // Author    : Edward AGAPOV (eap)
27
28 //  $Header: 
29
30 #ifndef SMESH_Pattern_I_HeaderFile
31 #define SMESH_Pattern_I_HeaderFile
32
33 #include "SALOMEconfig.h"
34 #include CORBA_SERVER_HEADER(SMESH_Pattern)
35 #include CORBA_SERVER_HEADER(SMESH_Mesh)
36 #include CORBA_CLIENT_HEADER(GEOM_Gen)
37
38 #include <TopoDS_Shape.hxx>
39 #include "SMESH_Pattern.hxx"
40
41 class SMESH_Gen_i;
42 class SMESH_Mesh;
43
44 class SMESH_Pattern_i:
45   public virtual POA_SMESH::SMESH_Pattern
46 {
47  public:
48
49   SMESH_Pattern_i (SMESH_Gen_i* theGen_i);
50
51   CORBA::Boolean LoadFromFile(const char* theFileContents);
52
53   CORBA::Boolean LoadFromFace(SMESH::SMESH_Mesh_ptr theMesh,
54                               GEOM::GEOM_Object_ptr theFace,
55                               CORBA::Boolean        theProject);
56
57   CORBA::Boolean LoadFrom3DBlock(SMESH::SMESH_Mesh_ptr theMesh,
58                                  GEOM::GEOM_Object_ptr theBlock);
59
60   SMESH::point_array* ApplyToFace(GEOM::GEOM_Object_ptr theFace,
61                                   GEOM::GEOM_Object_ptr theVertexOnKeyPoint1,
62                                   CORBA::Boolean        theReverse);
63
64   SMESH::point_array* ApplyTo3DBlock(GEOM::GEOM_Object_ptr theBlock,
65                                      GEOM::GEOM_Object_ptr theVertex000,
66                                      GEOM::GEOM_Object_ptr theVertex001);
67
68   SMESH::point_array* ApplyToMeshFaces(SMESH::SMESH_Mesh_ptr    theMesh,
69                                        const SMESH::long_array& theFacesIDs,
70                                        CORBA::Long              theNodeIndexOnKeyPoint1,
71                                        CORBA::Boolean           theReverse);
72
73   SMESH::point_array* ApplyToHexahedrons(SMESH::SMESH_Mesh_ptr    theMesh,
74                                          const SMESH::long_array& theVolumesIDs,
75                                          CORBA::Long              theNode000Index,
76                                          CORBA::Long              theNode001Index);
77
78   CORBA::Boolean MakeMesh (SMESH::SMESH_Mesh_ptr theMesh,
79                            const CORBA::Boolean  CreatePolygons,
80                            const CORBA::Boolean  CreatePolyedrs);
81
82   SMESH::SMESH_Pattern::ErrorCode GetErrorCode();
83
84   char* GetString();
85
86   CORBA::Boolean Is2D();
87
88   SMESH::point_array* GetPoints();
89
90   SMESH::long_array* GetKeyPoints();
91
92   SMESH::array_of_long_array* GetElementPoints(CORBA::Boolean applied);
93
94
95  private:
96
97   ::SMESH_Mesh* getMesh( SMESH::SMESH_Mesh_ptr & theMesh );
98
99   ::SMESH_Pattern myPattern;
100
101   SMESH_Gen_i*    myGen;
102 };
103 #endif