Salome HOME
Merge branch 'master' into V9_dev
[plugins/blsurfplugin.git] / src / BLSURFPlugin / BLSURFPlugin_Hypothesis_i.hxx
1 // Copyright (C) 2007-2016  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, or (at your option) any later version.
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 // ---
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)
24 // ---
25 //
26 #ifndef _BLSURFPlugin_Hypothesis_i_HXX_
27 #define _BLSURFPlugin_Hypothesis_i_HXX_
28
29 #include <SALOMEconfig.h>
30 #include CORBA_SERVER_HEADER(BLSURFPlugin_Algorithm)
31
32 #include "SMESH_Hypothesis_i.hxx"
33 #include "BLSURFPlugin_Hypothesis.hxx"
34
35 class SMESH_Gen;
36 class GEOM_Object;
37
38 // BLSURFPlugin parameters hypothesis
39
40 class BLSURFPlugin_Hypothesis_i:
41   public virtual POA_BLSURFPlugin::BLSURFPlugin_Hypothesis,
42   public virtual SMESH_Hypothesis_i
43 {
44 public:
45   // Constructor
46   BLSURFPlugin_Hypothesis_i(PortableServer::POA_ptr thePOA,
47                             ::SMESH_Gen*            theGenImpl,
48                             bool                    theHasGEOM);
49   // Destructor
50   virtual ~BLSURFPlugin_Hypothesis_i();
51
52   void SetPhysicalMesh(CORBA::Long theValue);
53   CORBA::Long GetPhysicalMesh();
54
55   void SetGeometricMesh(CORBA::Long theValue);
56   CORBA::Long GetGeometricMesh();
57
58   void SetPhySize(CORBA::Double theValue);
59   void SetPhySizeRel(CORBA::Double theValue);
60   CORBA::Double GetPhySize();
61   CORBA::Boolean IsPhySizeRel();
62
63   void SetMinSize(CORBA::Double theMinSize);
64   void SetMinSizeRel(CORBA::Double theMinSize);
65   CORBA::Double GetMinSize();
66   CORBA::Boolean IsMinSizeRel();
67
68   void SetMaxSize(CORBA::Double theMaxSize);
69   void SetMaxSizeRel(CORBA::Double theMaxSize);
70   CORBA::Double GetMaxSize();
71   CORBA::Boolean IsMaxSizeRel();
72
73   void SetUseGradation(CORBA::Boolean theValue);
74   CORBA::Boolean GetUseGradation();
75   void SetGradation(CORBA::Double theValue);
76   CORBA::Double GetGradation();
77
78   void SetUseVolumeGradation(CORBA::Boolean theValue);
79   CORBA::Boolean GetUseVolumeGradation();
80   void SetVolumeGradation(CORBA::Double theValue);
81   CORBA::Double GetVolumeGradation();
82
83   void SetQuadAllowed(CORBA::Boolean theValue);
84   CORBA::Boolean GetQuadAllowed();
85
86   void SetAngleMesh(CORBA::Double theValue);
87   CORBA::Double GetAngleMesh();
88
89   void SetChordalError(CORBA::Double distance);
90   CORBA::Double GetChordalError();
91
92   void SetAnisotropic(CORBA::Boolean anisotropic);
93   CORBA::Boolean GetAnisotropic();
94
95   void SetAnisotropicRatio(CORBA::Double ratio);
96   CORBA::Double GetAnisotropicRatio();
97
98   void SetRemoveTinyEdges(CORBA::Boolean remove);
99   CORBA::Boolean GetRemoveTinyEdges();
100
101   void SetTinyEdgeLength(CORBA::Double length);
102   CORBA::Double GetTinyEdgeLength();
103
104   void SetOptimiseTinyEdges(CORBA::Boolean toOptimise);
105   CORBA::Boolean GetOptimiseTinyEdges();
106
107   void SetTinyEdgeOptimisationLength(CORBA::Double length);
108   CORBA::Double GetTinyEdgeOptimisationLength();
109
110   void SetCorrectSurfaceIntersection(CORBA::Boolean toOptimise);
111   CORBA::Boolean GetCorrectSurfaceIntersection();
112
113   void SetCorrectSurfaceIntersectionMaxCost(CORBA::Double maxCost);
114   CORBA::Double GetCorrectSurfaceIntersectionMaxCost();
115
116   void SetBadElementRemoval(CORBA::Boolean remove);
117   CORBA::Boolean GetBadElementRemoval();
118
119   void SetBadElementAspectRatio(CORBA::Double ratio);
120   CORBA::Double GetBadElementAspectRatio();
121
122   void SetOptimizeMesh(CORBA::Boolean optimize);
123   CORBA::Boolean GetOptimizeMesh();
124
125   void SetQuadraticMesh(CORBA::Boolean quadratic);
126   CORBA::Boolean GetQuadraticMesh();
127
128   void SetTopology(CORBA::Long theValue);
129   CORBA::Long GetTopology();
130
131   void SetVerbosity(CORBA::Short theVal) throw (SALOME::SALOME_Exception);
132   CORBA::Short GetVerbosity();
133
134   void SetEnforceCadEdgesSize( CORBA::Boolean toEnforce );
135   CORBA::Boolean GetEnforceCadEdgesSize();
136
137   void SetJacobianRectificationRespectGeometry( CORBA::Boolean allowRectification );
138   CORBA::Boolean GetJacobianRectificationRespectGeometry();
139
140   void SetUseDeprecatedPatchMesher( CORBA::Boolean useDeprecatedPatchMesher );
141   CORBA::Boolean GetUseDeprecatedPatchMesher();
142
143   void SetJacobianRectification( CORBA::Boolean allowRectification );
144   CORBA::Boolean GetJacobianRectification();
145
146   void SetMaxNumberOfPointsPerPatch( CORBA::Long nb ) throw (SALOME::SALOME_Exception);
147   CORBA::Long GetMaxNumberOfPointsPerPatch();
148
149   void SetMaxNumberOfThreads( CORBA::Long nb ) throw (SALOME::SALOME_Exception);
150   CORBA::Long GetMaxNumberOfThreads();
151
152   void SetRespectGeometry( CORBA::Boolean toRespect );
153   CORBA::Boolean GetRespectGeometry();
154
155   void SetTinyEdgesAvoidSurfaceIntersections( CORBA::Boolean toAvoidIntersection );
156   CORBA::Boolean GetTinyEdgesAvoidSurfaceIntersections();
157
158   void SetClosedGeometry( CORBA::Boolean isClosed );
159   CORBA::Boolean GetClosedGeometry();
160
161   void SetDebug( CORBA::Boolean isDebug );
162   bool GetDebug();
163
164   void SetPeriodicTolerance( CORBA::Double tol ) throw (SALOME::SALOME_Exception);
165   double GetPeriodicTolerance() throw (SALOME::SALOME_Exception);
166
167   void SetRequiredEntities( const char* howToTreat ) throw (SALOME::SALOME_Exception);
168   char* GetRequiredEntities();
169
170   void SetSewingTolerance( CORBA::Double tol ) throw (SALOME::SALOME_Exception);
171   CORBA::Double GetSewingTolerance() throw (SALOME::SALOME_Exception);
172
173   void SetTags( const char* howToTreat ) throw (SALOME::SALOME_Exception);
174   char* GetTags();
175
176   void SetHyperPatches(const BLSURFPlugin::THyperPatchList& hpl);
177   BLSURFPlugin::THyperPatchList* GetHyperPatches();
178
179   void SetPreCADMergeEdges(CORBA::Boolean theValue);
180   CORBA::Boolean GetPreCADMergeEdges();
181
182   void SetPreCADRemoveDuplicateCADFaces(CORBA::Boolean theValue);
183   CORBA::Boolean GetPreCADRemoveDuplicateCADFaces();
184
185   void SetPreCADProcess3DTopology(CORBA::Boolean theValue);
186   CORBA::Boolean GetPreCADProcess3DTopology();
187
188   void SetPreCADDiscardInput(CORBA::Boolean theValue);
189   CORBA::Boolean GetPreCADDiscardInput();
190
191   void SetOptionValue(const char* optionName, const char* optionValue) throw (SALOME::SALOME_Exception);
192   void SetPreCADOptionValue(const char* optionName, const char* optionValue) throw (SALOME::SALOME_Exception);
193   char* GetOptionValue(const char* optionName) throw (SALOME::SALOME_Exception);
194   char* GetPreCADOptionValue(const char* optionName) throw (SALOME::SALOME_Exception);
195
196   void UnsetOption(const char* optionName);
197   void UnsetPreCADOption(const char* optionName);
198
199   BLSURFPlugin::string_array* GetOptionValues();
200   BLSURFPlugin::string_array* GetPreCADOptionValues();
201   BLSURFPlugin::string_array* GetAdvancedOptionValues();
202
203   void SetOptionValues(const BLSURFPlugin::string_array& options) throw (SALOME::SALOME_Exception);
204   void SetPreCADOptionValues(const BLSURFPlugin::string_array& options) throw (SALOME::SALOME_Exception);
205   void SetAdvancedOptionValues(const BLSURFPlugin::string_array& options);
206   void SetAdvancedOption(const char* optionsAndValues) throw (SALOME::SALOME_Exception);
207
208   void AddOption(const char* optionName, const char* optionValue);
209   void AddPreCADOption(const char* optionName, const char* optionValue);
210   char* GetOption(const char* optionName);
211   char* GetPreCADOption(const char* optionName);
212
213   void SetSizeMapEntry(const char* entry, const char* sizeMap) throw (SALOME::SALOME_Exception);
214
215   void SetConstantSizeMapEntry(const char* entry, GEOM::shape_type shapeType, CORBA::Double sizeMap) throw (SALOME::SALOME_Exception);
216
217   char* GetSizeMapEntry(const char* entry) throw (SALOME::SALOME_Exception);
218
219   void UnsetEntry(const char* entry);
220
221   BLSURFPlugin::string_array* GetSizeMapEntries();
222
223   void SetSizeMapEntries(const BLSURFPlugin::string_array& sizeMaps) throw (SALOME::SALOME_Exception);
224
225   void SetSizeMap(GEOM::GEOM_Object_ptr GeomObj, const char* sizeMap) throw (SALOME::SALOME_Exception);
226
227   void SetConstantSizeMap(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double sizeMap);
228
229   void UnsetSizeMap(GEOM::GEOM_Object_ptr GeomObj);
230
231   void ClearSizeMaps();
232
233   void SetAttractor(GEOM::GEOM_Object_ptr GeomObj, const char* attractor);
234
235   void UnsetAttractor(GEOM::GEOM_Object_ptr GeomObj);
236
237   void SetAttractorEntry(const char* entry, const char* attractor) throw (SALOME::SALOME_Exception);
238
239   char* GetAttractorEntry(const char* entry) throw (SALOME::SALOME_Exception);
240
241   BLSURFPlugin::string_array* GetAttractorEntries();
242   
243   
244   /*!
245     * Set/get/unset an attractor on a face 
246     */
247   
248   void SetAttractorGeom(GEOM::GEOM_Object_ptr GeomObj, GEOM::GEOM_Object_ptr Attractor, CORBA::Double StartSize, CORBA::Double EndSize, CORBA::Double ActionRadius, CORBA::Double ConstantRadius );
249
250   void UnsetAttractorGeom(GEOM::GEOM_Object_ptr GeomObj,
251                           GEOM::GEOM_Object_ptr theAttractor);
252
253   void UnsetAttractorEntry(const char* entry, const char* attractor);
254   void SetClassAttractorEntry(const char* entry, const char* att_entry, CORBA::Double StartSize, CORBA::Double EndSize, CORBA::Double ActionRadius, CORBA::Double ConstantRadius)  throw (SALOME::SALOME_Exception);
255
256   BLSURFPlugin::TAttParamsMap* GetAttractorParams();
257   
258
259   /*
260    void SetCustomSizeMap(GEOM::GEOM_Object_ptr GeomObj, const char* sizeMap);
261
262    void UnsetCustomSizeMap(GEOM::GEOM_Object_ptr GeomObj);
263
264    void SetCustomSizeMapEntry(const char* entry,const char* sizeMap )  throw (SALOME::SALOME_Exception);
265
266    char* GetCustomSizeMapEntry(const char* entry)  throw (SALOME::SALOME_Exception);
267
268    BLSURFPlugin::string_array* GetCustomSizeMapEntries();
269    */
270
271   ///////////////////////
272   // ENFORCED VERTEXES //
273   ///////////////////////
274
275   BLSURFPlugin::TFaceEntryEnfVertexListMap* GetAllEnforcedVerticesByFace();
276   BLSURFPlugin::TEnfVertexList* GetAllEnforcedVertices();
277
278   BLSURFPlugin::TFaceEntryCoordsListMap* GetAllCoordsByFace();
279   BLSURFPlugin::TCoordsEnfVertexMap* GetAllEnforcedVerticesByCoords();
280
281   BLSURFPlugin::TFaceEntryEnfVertexEntryListMap* GetAllEnfVertexEntriesByFace();
282   BLSURFPlugin::TEnfVertexEntryEnfVertexMap* GetAllEnforcedVerticesByEnfVertexEntry();
283
284   void ClearAllEnforcedVertices();
285
286   /*!
287    * Set/get/unset an enforced vertex on geom object
288    */
289   // OBSOLETE
290   bool SetEnforcedVertex(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z)
291       throw (SALOME::SALOME_Exception);
292   bool SetEnforcedVertexNamed(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theVertexName)
293       throw (SALOME::SALOME_Exception);
294   bool SetEnforcedVertexGeom(GEOM::GEOM_Object_ptr theFace, GEOM::GEOM_Object_ptr theVertex)
295       throw (SALOME::SALOME_Exception);
296   bool SetEnforcedVertexWithGroup(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theGroupName)
297       throw (SALOME::SALOME_Exception);
298   bool SetEnforcedVertexNamedWithGroup(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theVertexName, const char* theGroupName)
299       throw (SALOME::SALOME_Exception);
300   bool SetEnforcedVertexGeomWithGroup(GEOM::GEOM_Object_ptr theFace, GEOM::GEOM_Object_ptr theVertex, const char* theGroupName)
301       throw (SALOME::SALOME_Exception);
302
303   BLSURFPlugin::TEnfVertexList* GetEnforcedVertices(GEOM::GEOM_Object_ptr theFace) throw (SALOME::SALOME_Exception);
304
305   bool UnsetEnforcedVertex(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z)
306       throw (SALOME::SALOME_Exception);
307   bool UnsetEnforcedVertexGeom(GEOM::GEOM_Object_ptr theFace, GEOM::GEOM_Object_ptr theVertex)
308       throw (SALOME::SALOME_Exception);
309   bool UnsetEnforcedVertices(GEOM::GEOM_Object_ptr theFace) throw (SALOME::SALOME_Exception);
310
311   // NEW - no face
312   bool AddEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z)
313       throw (SALOME::SALOME_Exception);
314   bool AddEnforcedVertexNamed(CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theVertexName)
315       throw (SALOME::SALOME_Exception);
316   bool AddEnforcedVertexGeom(GEOM::GEOM_Object_ptr theVertex)
317       throw (SALOME::SALOME_Exception);
318   bool AddEnforcedVertexWithGroup(CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theGroupName)
319       throw (SALOME::SALOME_Exception);
320   bool AddEnforcedVertexNamedWithGroup(CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theVertexName, const char* theGroupName)
321       throw (SALOME::SALOME_Exception);
322   bool AddEnforcedVertexGeomWithGroup(GEOM::GEOM_Object_ptr theVertex, const char* theGroupName)
323       throw (SALOME::SALOME_Exception);
324
325   bool RemoveEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z)
326       throw (SALOME::SALOME_Exception);
327   bool RemoveEnforcedVertexGeom(GEOM::GEOM_Object_ptr theVertex)
328       throw (SALOME::SALOME_Exception);
329   bool RemoveEnforcedVertices() throw (SALOME::SALOME_Exception);
330
331   /*!
332    * Set/get/unset an enforced vertex on geom object given by entry
333    */
334   bool SetEnforcedVertexEntry(const char* theFaceEntry, CORBA::Double x = 0, CORBA::Double y = 0, CORBA::Double z = 0,
335       const char* theVertexName = "", const char* theVertexEntry = "", const char* theGroupName = "")
336       throw (SALOME::SALOME_Exception);
337
338   BLSURFPlugin::TEnfVertexList* GetEnforcedVerticesEntry(const char* theFaceEntry) throw (SALOME::SALOME_Exception);
339
340   bool UnsetEnforcedVertexEntry(const char* theFaceEntry, CORBA::Double x, CORBA::Double y, CORBA::Double z,
341       const char* theVertexEntry = "") throw (SALOME::SALOME_Exception);
342   bool UnsetEnforcedVerticesEntry(const char* theFaceEntry) throw (SALOME::SALOME_Exception);
343
344   /*!
345    * To add internal vertices as enforced vertices
346    */
347   void SetInternalEnforcedVertexAllFaces(CORBA::Boolean toEnforceInternalVertices);
348   CORBA::Boolean GetInternalEnforcedVertexAllFaces();
349   void SetInternalEnforcedVertexAllFacesGroup(const char*  groupName = "");
350   char* GetInternalEnforcedVertexAllFacesGroup();
351
352 // Enable internal enforced vertices on specific face if requested by user
353 //  void SetInternalEnforcedVertex(GEOM::GEOM_Object_ptr theFace, CORBA::Boolean toEnforceInternalVertices) throw (SALOME::SALOME_Exception);
354 //  void SetInternalEnforcedVertexWithGroup(GEOM::GEOM_Object_ptr theFace, CORBA::Boolean toEnforceInternalVertices, const char* theGroupName = "") throw (SALOME::SALOME_Exception);
355 //  void SetInternalEnforcedVertexEntry(const char* theFaceEntry, CORBA::Boolean toEnforceInternalVertices, const char* theGroupName = "") throw (SALOME::SALOME_Exception);
356 //  CORBA::Boolean GetInternalEnforcedVertex(GEOM::GEOM_Object_ptr theFace) throw (SALOME::SALOME_Exception);
357 //  CORBA::Boolean GetInternalEnforcedVertexEntry(const char* theFaceEntry) throw (SALOME::SALOME_Exception);
358   
359   ///////////////////////
360   // PERIODICITY       //
361   ///////////////////////
362
363   void ClearPreCadPeriodicityVectors();
364
365   BLSURFPlugin::TPeriodicityList* GetPreCadFacesPeriodicityVector();
366   BLSURFPlugin::TPeriodicityList* GetPreCadEdgesPeriodicityVector();
367
368   BLSURFPlugin::TPeriodicityList* PreCadVectorToSequence(const ::BLSURFPlugin_Hypothesis::TPreCadPeriodicityVector& preCadPeriodicityVector);
369
370   void AddPreCadFacesPeriodicity(GEOM::GEOM_Object_ptr theFace1, GEOM::GEOM_Object_ptr theFace2)
371       throw (SALOME::SALOME_Exception);
372
373   void AddPreCadFacesPeriodicityWithVertices(GEOM::GEOM_Object_ptr theFace1, GEOM::GEOM_Object_ptr theFace2,
374       const GEOM::ListOfGO& theSourceVertices, const GEOM::ListOfGO& theTargetVertices)
375       throw (SALOME::SALOME_Exception);
376
377   void AddPreCadFacesPeriodicityEntry(const char* theFace1Entry, const char* theFace2Entry,
378       const BLSURFPlugin::TEntryList& theSourceVerticesEntries, const BLSURFPlugin::TEntryList& theTargetVerticesEntries)
379       throw (SALOME::SALOME_Exception);
380
381   void AddPreCadEdgesPeriodicity(GEOM::GEOM_Object_ptr theEdge1, GEOM::GEOM_Object_ptr theEdge2)
382       throw (SALOME::SALOME_Exception);
383
384   void AddPreCadEdgesPeriodicityWithVertices(GEOM::GEOM_Object_ptr theEdge1, GEOM::GEOM_Object_ptr theEdge2,
385       const GEOM::ListOfGO& theSourceVertices, const GEOM::ListOfGO& theTargetVertices)
386       throw (SALOME::SALOME_Exception);
387
388   void AddPreCadEdgesPeriodicityEntry(const char* theEdge1Entry, const char* theEdge2Entry,
389       const BLSURFPlugin::TEntryList& theSourceVerticesEntries, const BLSURFPlugin::TEntryList& theTargetVerticesEntries)
390       throw (SALOME::SALOME_Exception);
391
392   ///////////////////////
393   
394   /*!
395     * Sets the file for export resulting mesh in GMF format
396     */
397 //   void SetGMFFile(const char* theFileName, CORBA::Boolean isBinary);
398   void SetGMFFile(const char* theFileName);
399   char* GetGMFFile();
400 //   CORBA::Boolean GetGMFFileMode();
401
402   // Get implementation
403   ::BLSURFPlugin_Hypothesis* GetImpl();
404
405   // Verify whether hypothesis supports given entity type 
406   CORBA::Boolean IsDimSupported(SMESH::Dimension type);
407
408
409   //
410   // Obsolete methods - To be removed in V7
411   //
412   void SetPhyMin(CORBA::Double theMinSize);
413   CORBA::Double GetPhyMin();
414   void SetPhyMax(CORBA::Double theMaxSize);
415   CORBA::Double GetPhyMax();
416   void SetGeoMin(CORBA::Double theMinSize);
417   CORBA::Double GetGeoMin();
418   void SetGeoMax(CORBA::Double theMaxSize);
419   CORBA::Double GetGeoMax();
420   void SetAngleMeshS(CORBA::Double angle);
421   CORBA::Double GetAngleMeshS();
422   void SetAngleMeshC(CORBA::Double angle);
423   CORBA::Double GetAngleMeshC();
424   void SetDecimesh(CORBA::Boolean toIgnoreEdges);
425   CORBA::Boolean GetDecimesh();
426   void SetPreCADRemoveNanoEdges(CORBA::Boolean toRemoveNanoEdges);
427   CORBA::Boolean GetPreCADRemoveNanoEdges();
428   void SetPreCADEpsNano(CORBA::Double epsNano);
429   CORBA::Double GetPreCADEpsNano();
430
431 private:
432   ///////////////////////
433   // PERIODICITY       //
434   ///////////////////////
435   std::string ShapeTypeToString(GEOM::shape_type theShapeType);
436   void CheckShapeType(GEOM::GEOM_Object_ptr shape, GEOM::shape_type theShapeType);
437   void CheckShapeTypes(GEOM::GEOM_Object_ptr shape, std::vector<GEOM::shape_type> theShapeTypes);
438   std::string PublishIfNeeded(GEOM::GEOM_Object_ptr shape, GEOM::shape_type theShapeType, std::string prefix);
439   std::string FormatVerticesEntries(std::vector<std::string> &theSourceVerticesEntries, std::vector<std::string> &theTargetVerticesEntries);
440
441 };
442
443 #endif