Salome HOME
Copyright update 2022
[plugins/hybridplugin.git] / src / GUI / HYBRIDPluginGUI_HypothesisCreator.h
index 9014cbddd1d095d5e7848e263298123583c1ba48..3a6ef25e83d2127bc031c1277a8ea872d9c14e85 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2004-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-//  HYBRIDPlugin GUI: GUI for plugged-in mesher HYBRIDPlugin
-//  File   : HYBRIDPluginGUI_HypothesisCreator.h
-//  Author : Michael Zorin
-//  Module : HYBRIDPlugin
+// ---
+// File   : HYBRIDPluginGUI_HypothesisCreator.h
+// Author : Christian VAN WAMBEKE (CEA)
+// ---
 //
 #ifndef HYBRIDPLUGINGUI_HypothesisCreator_HeaderFile
 #define HYBRIDPLUGINGUI_HypothesisCreator_HeaderFile
 #include CORBA_SERVER_HEADER(SMESH_Gen)
 #include CORBA_SERVER_HEADER(SMESH_Mesh)
 
-class QWidget;
-class QComboBox;
 class QCheckBox;
+class QComboBox;
+class QHeaderView;
 class QLineEdit;
 class QSpinBox;
 class QTableWidget;
 class QTableWidgetItem;
-class QHeaderView;
+class QWidget;
 
-class SMESHGUI_SpinBox;
-class StdMeshersGUI_ObjectReferenceParamWdg;
+class HYBRIDPluginGUI_StdWidget;
+class HYBRIDPluginGUI_AdvWidget;
 class LightApp_SelectionMgr;
+class SMESHGUI_SpinBox;
 class SUIT_SelectionFilter;
-class HYBRIDPluginGUI_AdvWidget;
+class StdMeshersGUI_ObjectReferenceParamWdg;
+class StdMeshersGUI_SubShapeSelectorWdg;
 
 class QTEnfVertex
 {
@@ -141,31 +143,30 @@ typedef std::set< TEnfMesh*, CompareEnfMeshes > TEnfMeshList;
 
 typedef struct
 {
-  bool    myToMeshHoles, myToMakeGroupsOfDomains,
-          myKeepFiles, myToCreateNewNodes,
-          myBoundaryRecovery, myFEMCorrection,
-          myRemoveInitialCentralPoint,
-          myLogInStandardOutput, myRemoveLogOnSuccess;
-  double  myMaximumMemory,myInitialMemory;
-  int     myOptimizationLevel;
-  int     myCollisionMode;
-  int     myBoundaryLayersGrowth;
-  int     myElementGeneration;
-  QString myName,myWorkingDir,myTextOption;
+  bool    myHeightIsRelative, myImprinting, mySnapping, myLayersOnAllWrap,
+          myKeepFiles, myLogInStandardOutput, myRemoveLogOnSuccess;
+  int     myOptimizationLevel, myCollisionMode, myBoundaryLayersGrowth, myElementGeneration;
+  QString myName,myWorkingDir;
   double  myGradation;
   short   myVerboseLevel;
   TEnfVertexList myEnforcedVertices;
   TEnfMeshList myEnforcedMeshes;
-  bool    myAddMultinormals,
-          mySmoothNormals;
   double  myHeightFirstLayer,
           myBoundaryLayersProgression,
-          myMultinormalsAngle;
+          myCoreSize,
+          myBoundaryLayersMaxElemAngle;
   short   myNbOfBoundaryLayers;
+  // IDs of faces with layers
+  SMESH::long_array_var myFaceWLIds;
+  // IDs of faces with imprinting
+  SMESH::long_array_var myFaceWIIds;
+  // IDs of faces with snapping
+  SMESH::long_array_var myFaceWSIds;
+
 } HYBRIDHypothesisData;
 
 /*!
-  \brief Class for creation of HYBRID2D and HYBRID3D hypotheses
+  \brief Class for creation of HYBRID 3D hypotheses
 */
 class HYBRIDPLUGINGUI_EXPORT HYBRIDPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
 {
@@ -188,7 +189,7 @@ protected:
   virtual QString  type() const;
 
 protected slots:
-  void                onToMeshHoles(bool);
+  void                onAddOption();
   void                onDirBtnClicked();
   void                updateWidgets();
   
@@ -209,6 +210,7 @@ protected slots:
   void                onRemoveEnforcedMesh();
   //void                synchronizeEnforcedMesh();
   void                checkEnfMeshIsDefined();
+  void                onTabChanged( int );
   
 signals:
   void                vertexDefined(bool);
@@ -224,17 +226,11 @@ private:
 private:
   QWidget*            myStdGroup;
   QLineEdit*          myName;
-  QCheckBox*          myToMeshHolesCheck;
-  QCheckBox*          myToMakeGroupsOfDomains;
-  QComboBox*          myOptimizationLevelCombo;
-  QComboBox*          myCollisionModeCombo;
-  QComboBox*          myBoundaryLayersGrowthCombo;
-  QComboBox*          myElementGenerationCombo;
-  QCheckBox*          myAddMultinormalsCheck;
-  QCheckBox*          mySmoothNormals;
-  QWidget*            myAdvGroup;
+  HYBRIDPluginGUI_StdWidget* myStdWidget;
   HYBRIDPluginGUI_AdvWidget* myAdvWidget;
-  
+
+  mutable HYBRIDPlugin::string_array_var myOptions, myCustomOptions;
+
   QWidget*            myEnfGroup;
   QPixmap             iconVertex, iconCompound;
   StdMeshersGUI_ObjectReferenceParamWdg *myEnfVertexWdg;
@@ -266,9 +262,14 @@ private:
   SMESHGUI_SpinBox*   myHeightFirstLayerSpin;
   QSpinBox*           myNbOfBoundaryLayersSpin;
   SMESHGUI_SpinBox*   myBoundaryLayersProgressionSpin;
+  SMESHGUI_SpinBox*   myCoreSizeSpin;
   SMESHGUI_SpinBox*   myMultinormalsAngleSpin;
   QCheckBox*          mySmoothNormalsCheck;
 
+  QLabel* myFacesLbl;
+  StdMeshersGUI_SubShapeSelectorWdg* myFaceSelectorLayers;
+  StdMeshersGUI_SubShapeSelectorWdg* myFaceSelectorImprinting;
+  StdMeshersGUI_SubShapeSelectorWdg* myFaceSelectorSnapping;
 };
 
 class EnforcedVertexTableWidgetDelegate : public QItemDelegate