1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 // File : SMESH_Gen.idl
23 // Author : Paul RASCLE, EDF
26 #ifndef _SMESH_GEN_IDL_
27 #define _SMESH_GEN_IDL_
29 #include "SALOME_Exception.idl"
30 #include "SALOME_Component.idl"
31 #include "SALOMEDS.idl"
33 #include "GEOM_Gen.idl"
35 #include "SMESH_Mesh.idl"
36 #include "SMESH_Hypothesis.idl"
40 typedef sequence<GEOM::GEOM_Object> object_array;
41 typedef sequence<SMESH_Mesh> mesh_array;
43 interface FilterManager;
44 interface SMESH_Pattern;
46 enum AlgoStateErrorName { MISSING_ALGO, MISSING_HYPO, NOT_CONFORM_MESH };
47 struct AlgoStateError {
48 AlgoStateErrorName name;
53 typedef sequence<AlgoStateError> algo_error_array;
55 interface SMESH_Gen : Engines::Component, SALOMEDS::Driver
58 FilterManager CreateFilterManager();
60 SMESH_Pattern GetPattern();
65 void SetCurrentStudy( in SALOMEDS::Study theStudy );
70 SALOMEDS::Study GetCurrentStudy();
73 * Create a hypothesis that can be shared by differents parts of the mesh.
74 * An hypothesis is either:
75 * - a method used to generate or modify a part of the mesh (algorithm).
76 * - a parameter or a law used by an algorithm.
77 * Algorithms are 1D, 2D or 3D.
79 SMESH_Hypothesis CreateHypothesis( in string theHypName,
80 in string theLibName )
81 raises ( SALOME::SALOME_Exception );
84 * Create a Mesh object, given a geometry shape.
85 * Mesh is created empty (no points, no elements).
86 * Shape is explored via GEOM_Client to create local copies.
87 * of TopoDS_Shapes and bind CORBA references of shape & subshapes
90 SMESH_Mesh CreateMesh( in GEOM::GEOM_Object theObject )
91 raises ( SALOME::SALOME_Exception );
94 * Create Mesh object importing data from given UNV file
96 SMESH_Mesh CreateMeshesFromUNV( in string theFileName )
97 raises ( SALOME::SALOME_Exception );
100 * Create Mesh object(s) importing data from given MED file
102 mesh_array CreateMeshesFromMED( in string theFileName,
103 out SMESH::DriverMED_ReadStatus theStatus )
104 raises ( SALOME::SALOME_Exception );
107 * Create Mesh object importing data from given STL file
109 SMESH_Mesh CreateMeshesFromSTL( in string theFileName )
110 raises ( SALOME::SALOME_Exception );
113 * Create a Mesh object, without a geometry shape reference
115 // SMESH_Mesh NewEmpty()
116 // raises ( SALOME::SALOME_Exception );
120 * First, verify list of hypothesis associated with the subShape,
121 * return NOK if hypothesis are not sufficient
123 boolean Compute( in SMESH_Mesh theMesh,
124 in GEOM::GEOM_Object theSubObject )
125 raises ( SALOME::SALOME_Exception );
131 boolean IsReadyToCompute( in SMESH_Mesh theMesh,
132 in GEOM::GEOM_Object theSubObject )
133 raises ( SALOME::SALOME_Exception );
136 * Return errors of hypotheses definintion
137 * algo_error_array is empty if everything is OK
139 algo_error_array GetAlgoState( in SMESH_Mesh theMesh,
140 in GEOM::GEOM_Object theSubObject )
141 raises ( SALOME::SALOME_Exception );
146 long_array GetSubShapesId( in GEOM::GEOM_Object theMainObject,
147 in object_array theListOfSubObjects )
148 raises ( SALOME::SALOME_Exception );
153 // long_array GetSubMeshesState( in object_array theListOfSubShape )
154 // raises ( SALOME::SALOME_Exception );