1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 // File : BLSURFPlugin_Hypothesis.hxx
22 // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA)
23 // Size maps developement: Nicolas GEIMER (OCC) & Gilles DAVID (EURIWARE)
26 #ifndef _BLSURFPlugin_Hypothesis_i_HXX_
27 #define _BLSURFPlugin_Hypothesis_i_HXX_
29 #include <SALOMEconfig.h>
30 #include CORBA_SERVER_HEADER(BLSURFPlugin_Algorithm)
32 #include "SMESH_Hypothesis_i.hxx"
33 #include "BLSURFPlugin_Hypothesis.hxx"
38 // BLSURFPlugin parameters hypothesis
40 class BLSURFPlugin_Hypothesis_i:
41 public virtual POA_BLSURFPlugin::BLSURFPlugin_Hypothesis,
42 public virtual SMESH_Hypothesis_i
46 BLSURFPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
48 ::SMESH_Gen* theGenImpl);
50 virtual ~BLSURFPlugin_Hypothesis_i();
52 void SetTopology(CORBA::Long theValue);
53 CORBA::Long GetTopology();
55 void SetPhysicalMesh(CORBA::Long theValue);
56 CORBA::Long GetPhysicalMesh();
58 void SetPhySize(CORBA::Double theValue);
59 CORBA::Double GetPhySize();
61 void SetPhyMin(CORBA::Double theMinSize);
62 CORBA::Double GetPhyMin();
64 void SetPhyMax(CORBA::Double theMaxSize);
65 CORBA::Double GetPhyMax();
67 void SetGeometricMesh(CORBA::Long theValue);
68 CORBA::Long GetGeometricMesh();
70 void SetAngleMeshS(CORBA::Double theValue);
71 CORBA::Double GetAngleMeshS();
73 void SetAngleMeshC(CORBA::Double angle);
74 CORBA::Double GetAngleMeshC();
76 void SetGeoMin(CORBA::Double theMinSize);
77 CORBA::Double GetGeoMin();
79 void SetGeoMax(CORBA::Double theMaxSize);
80 CORBA::Double GetGeoMax();
82 void SetGradation(CORBA::Double theValue);
83 CORBA::Double GetGradation();
85 void SetQuadAllowed(CORBA::Boolean theValue);
86 CORBA::Boolean GetQuadAllowed();
88 void SetDecimesh(CORBA::Boolean theValue);
89 CORBA::Boolean GetDecimesh();
91 void SetVerbosity(CORBA::Short theVal) throw (SALOME::SALOME_Exception);
92 CORBA::Short GetVerbosity();
94 void SetOptionValue(const char* optionName,
95 const char* optionValue) throw (SALOME::SALOME_Exception);
96 char* GetOptionValue(const char* optionName) throw (SALOME::SALOME_Exception);
98 void UnsetOption(const char* optionName);
100 BLSURFPlugin::string_array* GetOptionValues();
102 void SetOptionValues(const BLSURFPlugin::string_array& options) throw (SALOME::SALOME_Exception);
104 void SetSizeMapEntry(const char* entry,const char* sizeMap ) throw (SALOME::SALOME_Exception);
106 char* GetSizeMapEntry(const char* entry) throw (SALOME::SALOME_Exception);
108 void UnsetEntry(const char* entry);
110 BLSURFPlugin::string_array* GetSizeMapEntries();
112 void SetSizeMapEntries(const BLSURFPlugin::string_array& options) throw (SALOME::SALOME_Exception);
114 void SetSizeMap(GEOM::GEOM_Object_ptr GeomObj, const char* sizeMap);
116 void UnsetSizeMap(GEOM::GEOM_Object_ptr GeomObj);
118 void ClearSizeMaps();
121 void SetAttractor(GEOM::GEOM_Object_ptr GeomObj, const char* attractor);
123 void UnsetAttractor(GEOM::GEOM_Object_ptr GeomObj);
125 void SetAttractorEntry(const char* entry,const char* attractor ) throw (SALOME::SALOME_Exception);
127 char* GetAttractorEntry(const char* entry) throw (SALOME::SALOME_Exception);
129 BLSURFPlugin::string_array* GetAttractorEntries();
133 void SetCustomSizeMap(GEOM::GEOM_Object_ptr GeomObj, const char* sizeMap);
135 void UnsetCustomSizeMap(GEOM::GEOM_Object_ptr GeomObj);
137 void SetCustomSizeMapEntry(const char* entry,const char* sizeMap ) throw (SALOME::SALOME_Exception);
139 char* GetCustomSizeMapEntry(const char* entry) throw (SALOME::SALOME_Exception);
141 BLSURFPlugin::string_array* GetCustomSizeMapEntries();
144 ///////////////////////
145 // ENFORCED VERTEXES //
146 ///////////////////////
148 BLSURFPlugin::TEntryEnfVertexListMap* GetAllEnforcedVertices();
149 void ClearAllEnforcedVertices();
152 * Set/get/unset an enforced vertex on geom object
154 void SetEnforcedVertex(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double x, CORBA::Double y, CORBA::Double z)
155 throw (SALOME::SALOME_Exception);
157 void SetEnforcedVertexWithGroup(GEOM::GEOM_Object_ptr GeomObj,
158 CORBA::Double x, CORBA::Double y, CORBA::Double z,
159 const char* groupName)
160 throw (SALOME::SALOME_Exception);
162 // void SetEnforcedVertexList(GEOM::GEOM_Object_ptr GeomObj, const BLSURFPlugin::TEnfVertexList& vertexList)
163 // throw (SALOME::SALOME_Exception);
165 BLSURFPlugin::TEnfVertexList* GetEnforcedVertices(GEOM::GEOM_Object_ptr GeomObj)
166 throw (SALOME::SALOME_Exception);
168 void UnsetEnforcedVertex(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double x, CORBA::Double y, CORBA::Double z)
169 throw (SALOME::SALOME_Exception);
171 // void UnsetEnforcedVertexList(GEOM::GEOM_Object_ptr GeomObj, BLSURFPlugin::TEnfVertexList& vertexList)
172 // throw (SALOME::SALOME_Exception);
174 void UnsetEnforcedVertices(GEOM::GEOM_Object_ptr GeomObj)
175 throw (SALOME::SALOME_Exception);
178 * Set/get/unset an enforced vertex on geom object given by entry
180 void SetEnforcedVertexEntry(const char* entry, CORBA::Double x, CORBA::Double y, CORBA::Double z)
181 throw (SALOME::SALOME_Exception);
183 void SetEnforcedVertexEntryWithGroup(const char* entry, CORBA::Double x, CORBA::Double y, CORBA::Double z,
184 const char* groupName)
185 throw (SALOME::SALOME_Exception);
187 // void SetEnforcedVertexListEntry(const char* entry, BLSURFPlugin::TEnfVertexList& vertexList)
188 // throw (SALOME::SALOME_Exception);
190 BLSURFPlugin::TEnfVertexList* GetEnforcedVerticesEntry(const char* entry)
191 throw (SALOME::SALOME_Exception);
193 void UnsetEnforcedVertexEntry(const char* entry, CORBA::Double x, CORBA::Double y, CORBA::Double z)
194 throw (SALOME::SALOME_Exception);
195 // void UnsetEnforcedVertexListEntry(const char* entry, BLSURFPlugin::TEnfVertexList& vertexList)
196 // throw (SALOME::SALOME_Exception);
197 void UnsetEnforcedVerticesEntry(const char* entry)
198 throw (SALOME::SALOME_Exception);
201 * Set/get node group to an enforced vertex
204 void SetEnforcedVertexGroupName(CORBA::Double x, CORBA::Double y, CORBA::Double z,
205 const char* groupName)
206 throw (SALOME::SALOME_Exception);
207 char* GetEnforcedVertexGroupName(CORBA::Double x, CORBA::Double y, CORBA::Double z)
208 throw (SALOME::SALOME_Exception);
210 ///////////////////////
212 // Get implementation
213 ::BLSURFPlugin_Hypothesis* GetImpl();
215 // Verify whether hypothesis supports given entity type
216 CORBA::Boolean IsDimSupported( SMESH::Dimension type );