Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[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.salome-platform.org/ or email : webmaster.salome@opencascade.com
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 "SMESH.hxx"
34
35 #include "SALOMEconfig.h"
36 #include CORBA_SERVER_HEADER(SMESH_Pattern)
37 #include CORBA_SERVER_HEADER(SMESH_Mesh)
38 #include CORBA_CLIENT_HEADER(GEOM_Gen)
39
40 #include <TopoDS_Shape.hxx>
41 #include "SMESH_Pattern.hxx"
42
43 class SMESH_Gen_i;
44 class SMESH_Mesh;
45
46 class SMESH_I_EXPORT SMESH_Pattern_i:
47   public virtual POA_SMESH::SMESH_Pattern
48 {
49  public:
50
51   SMESH_Pattern_i (SMESH_Gen_i* theGen_i);
52
53   CORBA::Boolean LoadFromFile(const char* theFileContents);
54
55   CORBA::Boolean LoadFromFace(SMESH::SMESH_Mesh_ptr theMesh,
56                               GEOM::GEOM_Object_ptr theFace,
57                               CORBA::Boolean        theProject);
58
59   CORBA::Boolean LoadFrom3DBlock(SMESH::SMESH_Mesh_ptr theMesh,
60                                  GEOM::GEOM_Object_ptr theBlock);
61
62   SMESH::point_array* ApplyToFace(GEOM::GEOM_Object_ptr theFace,
63                                   GEOM::GEOM_Object_ptr theVertexOnKeyPoint1,
64                                   CORBA::Boolean        theReverse);
65
66   SMESH::point_array* ApplyTo3DBlock(GEOM::GEOM_Object_ptr theBlock,
67                                      GEOM::GEOM_Object_ptr theVertex000,
68                                      GEOM::GEOM_Object_ptr theVertex001);
69
70   SMESH::point_array* ApplyToMeshFaces(SMESH::SMESH_Mesh_ptr    theMesh,
71                                        const SMESH::long_array& theFacesIDs,
72                                        CORBA::Long              theNodeIndexOnKeyPoint1,
73                                        CORBA::Boolean           theReverse);
74
75   SMESH::point_array* ApplyToHexahedrons(SMESH::SMESH_Mesh_ptr    theMesh,
76                                          const SMESH::long_array& theVolumesIDs,
77                                          CORBA::Long              theNode000Index,
78                                          CORBA::Long              theNode001Index);
79
80   //for omniORB conflict compilation
81   /*CORBA::Boolean MakeMesh (SMESH::SMESH_Mesh_ptr theMesh,
82                            const CORBA::Boolean  CreatePolygons,
83                            const CORBA::Boolean  CreatePolyedrs);*/
84
85   CORBA::Boolean MakeMesh (SMESH::SMESH_Mesh_ptr theMesh,
86                            CORBA::Boolean  CreatePolygons,
87                            CORBA::Boolean  CreatePolyedrs);
88
89   SMESH::SMESH_Pattern::ErrorCode GetErrorCode();
90
91   char* GetString();
92
93   CORBA::Boolean Is2D();
94
95   SMESH::point_array* GetPoints();
96
97   SMESH::long_array* GetKeyPoints();
98
99   SMESH::array_of_long_array* GetElementPoints(CORBA::Boolean applied);
100
101
102  private:
103
104   ::SMESH_Mesh* getMesh( SMESH::SMESH_Mesh_ptr & theMesh );
105
106   ::SMESH_Pattern myPattern;
107
108   SMESH_Gen_i*    myGen;
109 };
110 #endif