Salome HOME
Integration of PAL/SALOME V2.1.0c from OCC
[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   CORBA::Boolean MakeMesh(SMESH::SMESH_Mesh_ptr theMesh);
69
70   SMESH::SMESH_Pattern::ErrorCode GetErrorCode();
71
72   char* GetString();
73
74   CORBA::Boolean Is2D();
75
76   SMESH::point_array* GetPoints();
77
78   SMESH::long_array* GetKeyPoints();
79
80   SMESH::array_of_long_array* GetElementPoints();
81
82
83  private:
84
85   TopoDS_Shape getShape( GEOM::GEOM_Object_ptr & theGeomObject );
86
87   ::SMESH_Mesh* getMesh( SMESH::SMESH_Mesh_ptr & theMesh );
88
89   ::SMESH_Pattern myPattern;
90
91   SMESH_Gen_i*    myGen;
92 };
93 #endif