Salome HOME
Merge from V6_main (04/10/2012)
[plugins/ghs3dplugin.git] / idl / GHS3DPlugin_Algorithm.idl
1 // Copyright (C) 2004-2012  CEA/DEN, EDF R&D
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.
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
20 //  File   : GHS3D_Algorithm.idl
21 //  Author : Julia DOROVSKIKH
22 //  $Header$
23 //
24 #ifndef _GHS3D_Algorithm_IDL_
25 #define _GHS3D_Algorithm_IDL_
26
27 #include "SALOME_Exception.idl"
28 #include "SMESH_Hypothesis.idl"
29 #include "SMESH_Mesh.idl"
30
31 /*!
32  * GHS3DPlugin: interfaces to GHS3D related hypotheses and algorithms
33  */
34 module GHS3DPlugin
35 {
36   typedef sequence<double,3> TCoords;
37   struct GHS3DEnforcedVertex {
38     string name;
39     string geomEntry;
40     boolean isCompound;
41     TCoords coords;
42     string groupName;
43     double size;
44   };
45   
46   typedef sequence<GHS3DEnforcedVertex> GHS3DEnforcedVertexList;
47
48   struct GHS3DEnforcedMesh {
49     string name;
50     string entry;
51     SMESH::ElementType elementType;
52     string groupName;
53   };
54   
55   typedef sequence<GHS3DEnforcedMesh> GHS3DEnforcedMeshList;
56
57   /*!
58    * GHS3DPlugin_GHS3D: interface of "Tetrahedron (GHS3D)" algorithm
59    */
60   interface GHS3DPlugin_GHS3D : SMESH::SMESH_3D_Algo
61   {
62     SMESH::SMESH_Mesh importGMFMesh(in string aGMFFileName);
63   };
64
65   /*!
66    * Parameters of "Tetrahedron (GHS3D)" algorithm
67    */
68   interface GHS3DPlugin_Hypothesis : SMESH::SMESH_Hypothesis
69   {
70     /*!
71      * To mesh "holes" in a solid or not. Default is to mesh.
72      */
73     void SetToMeshHoles(in boolean toMesh);
74     boolean GetToMeshHoles();
75     /*!
76      * Maximal size of memory to be used by the algorithm (in Megabytes).
77      * Negative value means not to use this option
78      */
79     void SetMaximumMemory(in short MB) raises (SALOME::SALOME_Exception);
80     short GetMaximumMemory();
81     /*!
82      * Initial size of memory to be used by the algorithm (in Megabytes) in
83      * automatic memory adjustment mode. Default is zero.
84      * Negative value means not to use this option
85      */
86     void SetInitialMemory(in short MB) raises (SALOME::SALOME_Exception);
87     short GetInitialMemory();
88     /*!
89      * Optimization level: 0-none, 1-light, 2-medium, 3-strong. Default is medium
90      */
91     void SetOptimizationLevel(in short level) raises (SALOME::SALOME_Exception);
92     short GetOptimizationLevel();
93     /*!
94      * Path to working directory
95      */
96     void SetWorkingDirectory(in string path) raises (SALOME::SALOME_Exception);
97     string GetWorkingDirectory();
98     /*!
99      * To keep working files or remove them. Log file remains in case of errors anyway.
100      */
101     void SetKeepFiles(in boolean toKeep);
102     boolean GetKeepFiles();
103     /*!
104      * Verbose level [0-10]
105      *  0 - no standard output,
106      *  2 - prints the data, quality statistics of the skin and final meshes and
107      *     indicates when the final mesh is being saved. In addition the software
108      *     gives indication regarding the CPU time.
109      * 10 - same as 2 plus the main steps in the computation, quality statistics
110      *     histogram of the skin mesh, quality statistics histogram together with
111      *     the characteristics of the final mesh.
112      */
113     void SetVerboseLevel(in short level);
114     short GetVerboseLevel();
115     /*!
116      * To create new nodes
117      */
118     void SetToCreateNewNodes(in boolean toCreate);
119     boolean GetToCreateNewNodes();
120     /*!
121      * To use boundary recovery version which tries to create mesh on a very poor
122      * quality surface mesh
123      */
124     void SetToUseBoundaryRecoveryVersion(in boolean toUse);
125     boolean GetToUseBoundaryRecoveryVersion();
126     /*!
127      * Applies finite-element correction by replacing overconstrained elements where
128      * it is possible. The process is cutting first the overconstrained edges and
129      * second the overconstrained facets. This insure that no edges have two boundary
130      * vertices and that no facets have three boundary vertices.
131      */
132     void SetFEMCorrection(in boolean toUseFem);
133     boolean GetFEMCorrection();
134     /*!
135      * To removes initial central point.
136      */
137     void SetToRemoveCentralPoint(in boolean toRemove);
138     boolean GetToRemoveCentralPoint();
139     /*!
140      * To set hiden/undocumented/advanced options
141      */
142     void SetTextOption(in string option);
143     string GetTextOption();
144     /*!
145      * To define the volumic gradation
146      */
147     void SetGradation(in double gradation);
148     double GetGradation();
149     /*!
150      * To set an enforced vertex
151      */
152     boolean SetEnforcedVertex(in double x, in double y, in double z, in double size) raises (SALOME::SALOME_Exception);
153     boolean SetEnforcedVertexNamed(in double x, in double y, in double z, in double size, in string vertexName) raises (SALOME::SALOME_Exception);
154     boolean SetEnforcedVertexWithGroup(in double x, in double y, in double z, in double size, in string groupName) raises (SALOME::SALOME_Exception);
155     boolean SetEnforcedVertexNamedWithGroup(in double x, in double y, in double z, in double size, in string vertexName, in string groupName) raises (SALOME::SALOME_Exception);
156     boolean SetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex, in double size) raises (SALOME::SALOME_Exception);
157     boolean SetEnforcedVertexGeomWithGroup(in GEOM::GEOM_Object theVertex, in double size, in string groupName) raises (SALOME::SALOME_Exception);
158     double GetEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
159     double GetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
160     boolean RemoveEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
161     boolean RemoveEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
162     GHS3DEnforcedVertexList GetEnforcedVertices();
163     void ClearEnforcedVertices();
164    /*!
165     * Set/get/unset an enforced vertex (private method for GUI)
166     */
167     boolean p_SetEnforcedVertex(in double size, in double x, in double y, in double z,
168                              in string theVertexName, in string theVertexEntry, in string groupName,
169                              in boolean isCompound) raises (SALOME::SALOME_Exception);
170     
171     boolean SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType) raises (SALOME::SALOME_Exception);
172     boolean SetEnforcedMeshWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string groupName) raises (SALOME::SALOME_Exception);
173     
174     /* OBSOLETE FUNCTIONS */
175     boolean SetEnforcedMeshSize(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size) raises (SALOME::SALOME_Exception);
176     boolean SetEnforcedMeshSizeWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size, in string groupName) raises (SALOME::SALOME_Exception);
177     /* OBSOLETE FUNCTIONS */
178     
179     GHS3DEnforcedMeshList GetEnforcedMeshes();
180     void ClearEnforcedMeshes();
181    /*!
182     * Set/get/unset an enforced vertex (private method for GUI)
183     */
184     boolean p_SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string name, in string groupName) raises (SALOME::SALOME_Exception);
185   };
186 };
187
188 #endif