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: public virtual POA_BLSURFPlugin::BLSURFPlugin_Hypothesis,
41 public virtual SMESH_Hypothesis_i {
44 BLSURFPlugin_Hypothesis_i(PortableServer::POA_ptr thePOA, int theStudyId, ::SMESH_Gen* theGenImpl);
46 virtual ~BLSURFPlugin_Hypothesis_i();
48 void SetTopology(CORBA::Long theValue);
49 CORBA::Long GetTopology();
51 void SetPhysicalMesh(CORBA::Long theValue);
52 CORBA::Long GetPhysicalMesh();
54 void SetPhySize(CORBA::Double theValue);
55 CORBA::Double GetPhySize();
57 void SetPhyMin(CORBA::Double theMinSize);
58 CORBA::Double GetPhyMin();
60 void SetPhyMax(CORBA::Double theMaxSize);
61 CORBA::Double GetPhyMax();
63 void SetGeometricMesh(CORBA::Long theValue);
64 CORBA::Long GetGeometricMesh();
66 void SetAngleMeshS(CORBA::Double theValue);
67 CORBA::Double GetAngleMeshS();
69 void SetAngleMeshC(CORBA::Double angle);
70 CORBA::Double GetAngleMeshC();
72 void SetGeoMin(CORBA::Double theMinSize);
73 CORBA::Double GetGeoMin();
75 void SetGeoMax(CORBA::Double theMaxSize);
76 CORBA::Double GetGeoMax();
78 void SetGradation(CORBA::Double theValue);
79 CORBA::Double GetGradation();
81 void SetQuadAllowed(CORBA::Boolean theValue);
82 CORBA::Boolean GetQuadAllowed();
84 void SetDecimesh(CORBA::Boolean theValue);
85 CORBA::Boolean GetDecimesh();
87 void SetVerbosity(CORBA::Short theVal) throw (SALOME::SALOME_Exception);
88 CORBA::Short GetVerbosity();
90 void SetOptionValue(const char* optionName, const char* optionValue) throw (SALOME::SALOME_Exception);
91 char* GetOptionValue(const char* optionName) throw (SALOME::SALOME_Exception);
93 void UnsetOption(const char* optionName);
95 BLSURFPlugin::string_array* GetOptionValues();
97 void SetOptionValues(const BLSURFPlugin::string_array& options) throw (SALOME::SALOME_Exception);
99 void SetSizeMapEntry(const char* entry, const char* sizeMap) throw (SALOME::SALOME_Exception);
101 char* GetSizeMapEntry(const char* entry) throw (SALOME::SALOME_Exception);
103 void UnsetEntry(const char* entry);
105 BLSURFPlugin::string_array* GetSizeMapEntries();
107 void SetSizeMapEntries(const BLSURFPlugin::string_array& options) throw (SALOME::SALOME_Exception);
109 void SetSizeMap(GEOM::GEOM_Object_ptr GeomObj, const char* sizeMap);
111 void UnsetSizeMap(GEOM::GEOM_Object_ptr GeomObj);
113 void ClearSizeMaps();
115 void SetAttractor(GEOM::GEOM_Object_ptr GeomObj, const char* attractor);
117 void UnsetAttractor(GEOM::GEOM_Object_ptr GeomObj);
119 void SetAttractorEntry(const char* entry, const char* attractor) throw (SALOME::SALOME_Exception);
121 char* GetAttractorEntry(const char* entry) throw (SALOME::SALOME_Exception);
123 BLSURFPlugin::string_array* GetAttractorEntries();
126 void SetCustomSizeMap(GEOM::GEOM_Object_ptr GeomObj, const char* sizeMap);
128 void UnsetCustomSizeMap(GEOM::GEOM_Object_ptr GeomObj);
130 void SetCustomSizeMapEntry(const char* entry,const char* sizeMap ) throw (SALOME::SALOME_Exception);
132 char* GetCustomSizeMapEntry(const char* entry) throw (SALOME::SALOME_Exception);
134 BLSURFPlugin::string_array* GetCustomSizeMapEntries();
137 ///////////////////////
138 // ENFORCED VERTEXES //
139 ///////////////////////
141 BLSURFPlugin::TFaceEntryEnfVertexListMap* GetAllEnforcedVerticesByFace();
142 BLSURFPlugin::TEnfVertexList* GetAllEnforcedVertices();
144 BLSURFPlugin::TFaceEntryCoordsListMap* GetAllCoordsByFace();
145 BLSURFPlugin::TCoordsEnfVertexMap* GetAllEnforcedVerticesByCoords();
147 BLSURFPlugin::TFaceEntryEnfVertexEntryListMap* GetAllEnfVertexEntriesByFace();
148 BLSURFPlugin::TEnfVertexEntryEnfVertexMap* GetAllEnforcedVerticesByEnfVertexEntry();
150 void ClearAllEnforcedVertices();
153 * Set/get/unset an enforced vertex on geom object
155 bool SetEnforcedVertex(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z)
156 throw (SALOME::SALOME_Exception);
157 bool SetEnforcedVertexNamed(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theVertexName)
158 throw (SALOME::SALOME_Exception);
159 bool SetEnforcedVertexGeom(GEOM::GEOM_Object_ptr theFace, GEOM::GEOM_Object_ptr theVertex)
160 throw (SALOME::SALOME_Exception);
161 bool SetEnforcedVertexWithGroup(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theGroupName)
162 throw (SALOME::SALOME_Exception);
163 bool SetEnforcedVertexNamedWithGroup(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theVertexName, const char* theGroupName)
164 throw (SALOME::SALOME_Exception);
165 bool SetEnforcedVertexGeomWithGroup(GEOM::GEOM_Object_ptr theFace, GEOM::GEOM_Object_ptr theVertex, const char* theGroupName)
166 throw (SALOME::SALOME_Exception);
168 BLSURFPlugin::TEnfVertexList* GetEnforcedVertices(GEOM::GEOM_Object_ptr theFace) throw (SALOME::SALOME_Exception);
170 bool UnsetEnforcedVertex(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z)
171 throw (SALOME::SALOME_Exception);
172 bool UnsetEnforcedVertexGeom(GEOM::GEOM_Object_ptr theFace, GEOM::GEOM_Object_ptr theVertex)
173 throw (SALOME::SALOME_Exception);
174 bool UnsetEnforcedVertices(GEOM::GEOM_Object_ptr theFace) throw (SALOME::SALOME_Exception);
177 * Set/get/unset an enforced vertex on geom object given by entry
179 bool SetEnforcedVertexEntry(const char* theFaceEntry, CORBA::Double x = 0, CORBA::Double y = 0, CORBA::Double z = 0,
180 const char* theVertexName = "", const char* theVertexEntry = "", const char* theGroupName = "")
181 throw (SALOME::SALOME_Exception);
183 BLSURFPlugin::TEnfVertexList* GetEnforcedVerticesEntry(const char* theFaceEntry) throw (SALOME::SALOME_Exception);
185 bool UnsetEnforcedVertexEntry(const char* theFaceEntry, CORBA::Double x, CORBA::Double y, CORBA::Double z,
186 const char* theVertexEntry = "") throw (SALOME::SALOME_Exception);
187 bool UnsetEnforcedVerticesEntry(const char* theFaceEntry) throw (SALOME::SALOME_Exception);
190 * Set/get node group to an enforced vertex
193 void SetEnforcedVertexGroupName(CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* groupName) throw (SALOME::SALOME_Exception);
194 char* GetEnforcedVertexGroupName(CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception);
196 ///////////////////////
198 // Get implementation
199 ::BLSURFPlugin_Hypothesis* GetImpl();
201 // Verify whether hypothesis supports given entity type
202 CORBA::Boolean IsDimSupported(SMESH::Dimension type);