X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGUI%2FNETGENPluginGUI_HypothesisCreator.h;h=b629b07a2f3f352f40e32541834175d58b6b8f40;hb=2a56740e9b9c18f0e826830439f85d2e7a648d1a;hp=74113513f0949c88b4c50cd4ca3459f9f53c0d50;hpb=e97896c68ffa2410c664d37d803c66eae28329e7;p=plugins%2Fnetgenplugin.git diff --git a/src/GUI/NETGENPluginGUI_HypothesisCreator.h b/src/GUI/NETGENPluginGUI_HypothesisCreator.h index 7411351..b629b07 100644 --- a/src/GUI/NETGENPluginGUI_HypothesisCreator.h +++ b/src/GUI/NETGENPluginGUI_HypothesisCreator.h @@ -1,52 +1,61 @@ -// NETGENPlugin GUI: GUI for plugged-in mesher NETGENPlugin +// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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, or (at your option) any later version. // -// Copyright (C) 2003 CEA -// -// 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. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org or email : webmaster.salome@opencascade.org +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + +// NETGENPlugin GUI: GUI for plugged-in mesher NETGENPlugin // File : NETGENPluginGUI_HypothesisCreator.h // Author : Michael Zorin // Module : NETGENPlugin // $Header: - +// #ifndef NETGENPLUGINGUI_HypothesisCreator_HeaderFile #define NETGENPLUGINGUI_HypothesisCreator_HeaderFile +#include "NETGENPluginGUI.h" + #include -class QtxDblSpinBox; -class QtxComboBox; +#include + +class GeomSelectionTools; class QCheckBox; +class QComboBox; class QLineEdit; +class QTableWidget; +class SMESHGUI_SpinBox; +class SalomeApp_IntSpinBox; typedef struct { - double myMaxSize, myGrowthRate, myNbSegPerEdge, myNbSegPerRadius; - int myFineness; - bool mySecondOrder, myAllowQuadrangles, myOptimize; - QString myName; + double myMaxSize, myMinSize, myGrowthRate, myNbSegPerEdge, myNbSegPerRadius, myRidgeAngle, myChordalError, myElemSizeWeight, myEdgeCornerAngle, myChartAngle, myOuterChartAngle, myRestHChartDistFactor, myRestHLineLengthFactor, myRestHCloseEdgeFactor, myRestHSurfCurvFactor, myRestHEdgeAngleFactor, myRestHSurfMeshCurvFactor; + int myFineness, myNbSurfOptSteps, myNbVolOptSteps, myWorstElemMeasure; + bool mySecondOrder, myAllowQuadrangles, myOptimize, mySurfaceCurvature, myFuseEdges, myChordalErrorEnabled, myUseDelauney, myCheckOverlapping, myCheckChartBoundary, myRestHChartDistEnable, myRestHLineLengthEnable, myRestHCloseEdgeEnable, myRestHSurfCurvEnable, myRestHEdgeAngleEnable, myRestHSurfMeshCurvEnable, myKeepExistingEdges, myMakeGroupsOfSurfaces; + QString myName, myMeshSizeFile; + QString myMaxSizeVar, myMinSizeVar, myGrowthRateVar, myNbSegPerEdgeVar, myNbSegPerRadiusVar, myRidgeAngleVar, myChordalErrorVar, myNbSurfOptStepsVar, myNbVolOptStepsVar, myElemSizeWeightVar, myWorstElemMeasureVar, myEdgeCornerAngleVar, myChartAngleVar, myOuterChartAngleVar, myRestHChartDistFactorVar, myRestHLineLengthFactorVar, myRestHCloseEdgeFactorVar, myRestHSurfCurvFactorVar, myRestHEdgeAngleFactorVar, myRestHSurfMeshCurvFactorVar; } NetgenHypothesisData; /*! * \brief Class for creation of NETGEN2D and NETGEN3D hypotheses */ -class NETGENPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator +class NETGENPLUGIN_GUI_EXPORT NETGENPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator { Q_OBJECT @@ -54,7 +63,8 @@ public: NETGENPluginGUI_HypothesisCreator( const QString& ); virtual ~NETGENPluginGUI_HypothesisCreator(); - virtual bool checkParams() const; + virtual bool checkParams(QString& msg) const; + virtual QString helpPage() const; protected: virtual QFrame* buildFrame (); @@ -67,24 +77,77 @@ protected: protected slots: virtual void onFinenessChanged(); + virtual void onChordalErrorEnabled(); + virtual void onSurfaceCurvatureChanged(); + virtual void onAddLocalSizeOnVertex(); + virtual void onAddLocalSizeOnEdge(); + virtual void onAddLocalSizeOnFace(); + virtual void onAddLocalSizeOnSolid(); + virtual void onRemoveLocalSizeOnShape(); + virtual void onSetLocalSize(int,int); + virtual void onSetSizeFile(); + virtual void onSTLEnable(); private: bool readParamsFromHypo( NetgenHypothesisData& ) const; bool readParamsFromWidgets( NetgenHypothesisData& ) const; bool storeParamsToHypo( const NetgenHypothesisData& ) const; + GeomSelectionTools* getGeomSelectionTools(); + void addLocalSizeOnShape(TopAbs_ShapeEnum); private: - QLineEdit* myName; - QtxDblSpinBox* myMaxSize; - QCheckBox* mySecondOrder; - QCheckBox* myOptimize; - QtxComboBox* myFineness; - QtxDblSpinBox* myGrowthRate; - QtxDblSpinBox* myNbSegPerEdge; - QtxDblSpinBox* myNbSegPerRadius; - QCheckBox* myAllowQuadrangles; - - bool myIs2D; + QLineEdit* myName; + SMESHGUI_SpinBox* myMaxSize; + SMESHGUI_SpinBox* myMinSize; + QCheckBox* mySecondOrder; + QCheckBox* myOptimize; + QComboBox* myFineness; + SMESHGUI_SpinBox* myGrowthRate; + SMESHGUI_SpinBox* myNbSegPerEdge; + SMESHGUI_SpinBox* myNbSegPerRadius; + QCheckBox* myChordalErrorEnabled; + SMESHGUI_SpinBox* myChordalError; + QCheckBox* myAllowQuadrangles; + QCheckBox* mySurfaceCurvature; + // optimizer + SMESHGUI_SpinBox* myElemSizeWeight; + SalomeApp_IntSpinBox* myNbSurfOptSteps; + SalomeApp_IntSpinBox* myNbVolOptSteps; + // insider + QCheckBox* myFuseEdges; + SalomeApp_IntSpinBox* myWorstElemMeasure; + QCheckBox* myUseDelauney; + QCheckBox* myCheckOverlapping; + QCheckBox* myCheckChartBoundary; + // stl options + QCheckBox* myKeepExistingEdges; + QCheckBox* myMakeGroupsOfSurfaces; + // stl charts + SMESHGUI_SpinBox* myRidgeAngle; + SMESHGUI_SpinBox* myEdgeCornerAngle; + SMESHGUI_SpinBox* myChartAngle; + SMESHGUI_SpinBox* myOuterChartAngle; + // stl size + SMESHGUI_SpinBox* myRestHChartDistFactor; + SMESHGUI_SpinBox* myRestHLineLengthFactor; + SMESHGUI_SpinBox* myRestHCloseEdgeFactor; + SMESHGUI_SpinBox* myRestHSurfCurvFactor; + SMESHGUI_SpinBox* myRestHEdgeAngleFactor; + SMESHGUI_SpinBox* myRestHSurfMeshCurvFactor; + QCheckBox* myRestHChartDistEnable; + QCheckBox* myRestHLineLengthEnable; + QCheckBox* myRestHCloseEdgeEnable; + QCheckBox* myRestHSurfCurvEnable; + QCheckBox* myRestHEdgeAngleEnable; + QCheckBox* myRestHSurfMeshCurvEnable; + + bool myIs2D; // 2D or 3D + bool myIsONLY; // one dim or several + + QLineEdit* myMeshSizeFile; + QTableWidget* myLocalSizeTable; + GeomSelectionTools* myGeomSelectionTools; + QMap myLocalSizeMap; }; #endif