Merge from BR_V5_IMP_P8
This commit is contained in:
parent
ceb1effa03
commit
001def51fb
@ -54,6 +54,8 @@
|
|||||||
#define SPACING 6
|
#define SPACING 6
|
||||||
#define MARGIN 11
|
#define MARGIN 11
|
||||||
|
|
||||||
|
using namespace NETGENPlugin;
|
||||||
|
|
||||||
// copied from StdMeshersGUI_StdHypothesisCreator.cxx
|
// copied from StdMeshersGUI_StdHypothesisCreator.cxx
|
||||||
const double VALUE_MAX = 1.0e+15, // COORD_MAX
|
const double VALUE_MAX = 1.0e+15, // COORD_MAX
|
||||||
VALUE_MAX_2 = VALUE_MAX * VALUE_MAX,
|
VALUE_MAX_2 = VALUE_MAX * VALUE_MAX,
|
||||||
@ -215,8 +217,25 @@ void NETGENPluginGUI_SimpleCreator::retrieveParams() const
|
|||||||
if ( isCreation() )
|
if ( isCreation() )
|
||||||
myName->setText( hypName() );
|
myName->setText( hypName() );
|
||||||
|
|
||||||
NETGENPlugin::NETGENPlugin_SimpleHypothesis_2D_var h =
|
// set default real values
|
||||||
NETGENPlugin::NETGENPlugin_SimpleHypothesis_2D::_narrow( initParamsHypothesis() );
|
|
||||||
|
NETGENPlugin_SimpleHypothesis_2D_var h =
|
||||||
|
NETGENPlugin_SimpleHypothesis_2D::_narrow( initParamsHypothesis( hasInitParamsHypothesis() ));
|
||||||
|
|
||||||
|
if ( double len = h->GetLocalLength() )
|
||||||
|
myLength->setValue( len );
|
||||||
|
if ( double area = h->GetMaxElementArea() )
|
||||||
|
myArea->setValue( area );
|
||||||
|
if ( myVolume ) {
|
||||||
|
NETGENPlugin_SimpleHypothesis_3D_var h3d =
|
||||||
|
NETGENPlugin_SimpleHypothesis_3D::_narrow( initParamsHypothesis( hasInitParamsHypothesis()) );
|
||||||
|
if ( double volume = (double) h3d->GetMaxElementVolume() )
|
||||||
|
myVolume->setValue( volume );
|
||||||
|
}
|
||||||
|
|
||||||
|
h = NETGENPlugin_SimpleHypothesis_2D::_narrow( hypothesis() );
|
||||||
|
|
||||||
|
// set values of hypothesis
|
||||||
|
|
||||||
// 1D
|
// 1D
|
||||||
int nbSeg = (int) h->GetNumberOfSegments();
|
int nbSeg = (int) h->GetNumberOfSegments();
|
||||||
@ -246,8 +265,7 @@ void NETGENPluginGUI_SimpleCreator::retrieveParams() const
|
|||||||
|
|
||||||
// 3D
|
// 3D
|
||||||
if ( myVolume ) {
|
if ( myVolume ) {
|
||||||
NETGENPlugin::NETGENPlugin_SimpleHypothesis_3D_var h =
|
NETGENPlugin_SimpleHypothesis_3D_var h = NETGENPlugin_SimpleHypothesis_3D::_narrow( hypothesis() );
|
||||||
NETGENPlugin::NETGENPlugin_SimpleHypothesis_3D::_narrow( initParamsHypothesis() );
|
|
||||||
if ( double volume = (double) h->GetMaxElementVolume() ) {
|
if ( double volume = (double) h->GetMaxElementVolume() ) {
|
||||||
myLenFromFacesCheckBox->setChecked( false );
|
myLenFromFacesCheckBox->setChecked( false );
|
||||||
myVolume->setEnabled( true );
|
myVolume->setEnabled( true );
|
||||||
@ -265,8 +283,8 @@ QString NETGENPluginGUI_SimpleCreator::storeParams() const
|
|||||||
QString valStr;
|
QString valStr;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
NETGENPlugin::NETGENPlugin_SimpleHypothesis_2D_var h =
|
NETGENPlugin_SimpleHypothesis_2D_var h =
|
||||||
NETGENPlugin::NETGENPlugin_SimpleHypothesis_2D::_narrow( initParamsHypothesis() );
|
NETGENPlugin_SimpleHypothesis_2D::_narrow( hypothesis() );
|
||||||
|
|
||||||
if( isCreation() )
|
if( isCreation() )
|
||||||
SMESH::SetName( SMESH::FindSObject( h ), myName->text().toLatin1().data() );
|
SMESH::SetName( SMESH::FindSObject( h ), myName->text().toLatin1().data() );
|
||||||
@ -293,8 +311,8 @@ QString NETGENPluginGUI_SimpleCreator::storeParams() const
|
|||||||
|
|
||||||
// 3D
|
// 3D
|
||||||
if ( myVolume ) {
|
if ( myVolume ) {
|
||||||
NETGENPlugin::NETGENPlugin_SimpleHypothesis_3D_var h =
|
NETGENPlugin_SimpleHypothesis_3D_var h =
|
||||||
NETGENPlugin::NETGENPlugin_SimpleHypothesis_3D::_narrow( initParamsHypothesis() );
|
NETGENPlugin_SimpleHypothesis_3D::_narrow( hypothesis() );
|
||||||
if ( myVolume->isEnabled() ) {
|
if ( myVolume->isEnabled() ) {
|
||||||
h->SetMaxElementVolume( myVolume->value() );
|
h->SetMaxElementVolume( myVolume->value() );
|
||||||
valStr += "; vol=" + myVolume->text();
|
valStr += "; vol=" + myVolume->text();
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
// Author : Michael Sazonov (OCN)
|
// Author : Michael Sazonov (OCN)
|
||||||
// Date : 28/03/2006
|
// Date : 28/03/2006
|
||||||
// Project : SALOME
|
// Project : SALOME
|
||||||
// $Header$
|
|
||||||
//=============================================================================
|
|
||||||
//
|
//
|
||||||
#include <NETGENPlugin_Hypothesis.hxx>
|
#include <NETGENPlugin_Hypothesis.hxx>
|
||||||
#include <utilities.h>
|
#include <utilities.h>
|
||||||
@ -295,6 +293,19 @@ bool NETGENPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* theMesh,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool NETGENPlugin_Hypothesis::SetParametersByElementSize(double elemLenght,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return bool( _maxSize = elemLenght );
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
*
|
*
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
// Author : Michael Sazonov (OCN)
|
// Author : Michael Sazonov (OCN)
|
||||||
// Date : 27/03/2006
|
// Date : 27/03/2006
|
||||||
// Project : SALOME
|
// Project : SALOME
|
||||||
// $Header$
|
|
||||||
//=============================================================================
|
|
||||||
//
|
//
|
||||||
#ifndef _NETGENPlugin_Hypothesis_HXX_
|
#ifndef _NETGENPlugin_Hypothesis_HXX_
|
||||||
#define _NETGENPlugin_Hypothesis_HXX_
|
#define _NETGENPlugin_Hypothesis_HXX_
|
||||||
@ -103,6 +101,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double _maxSize;
|
double _maxSize;
|
||||||
double _growthRate;
|
double _growthRate;
|
||||||
|
@ -206,3 +206,17 @@ bool NETGENPlugin_SimpleHypothesis_2D::SetParametersByMesh(const SMESH_Mesh* t
|
|||||||
}
|
}
|
||||||
return nbEdges;
|
return nbEdges;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
bool NETGENPlugin_SimpleHypothesis_2D::SetParametersByElementSize(double elemLenght,
|
||||||
|
const SMESH_Mesh* /*theMesh*/)
|
||||||
|
{
|
||||||
|
return bool( _segmentLength = elemLenght );
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -92,6 +92,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Initialize my parameter values by linear size of mesh element.
|
||||||
|
* \retval bool - true if parameter values have been successfully defined
|
||||||
|
*/
|
||||||
|
virtual bool SetParametersByElementSize( double elemLenght, const SMESH_Mesh* theMesh=0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int _nbSegments;
|
int _nbSegments;
|
||||||
double _segmentLength, _area;
|
double _segmentLength, _area;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user