// File : NETGENPlugin_Algorithm.idl
// Author : Julia DOROVSKIKH
-// $Header$
//
#ifndef _SMESH_NETGENALGORITHM_IDL_
#define _SMESH_NETGENALGORITHM_IDL_
void SetNbSegPerRadius(in double value);
double GetNbSegPerRadius();
+ void SetQuadAllowed(in boolean value);
+ boolean GetQuadAllowed();
+
void SetLocalSizeOnShape(in GEOM::GEOM_Object GeomObj, in double localSize);
void SetLocalSizeOnEntry(in string entry, in double localSize);
double GetLocalSizeOnEntry(in string entry);
*/
interface NETGENPlugin_Hypothesis_2D : NETGENPlugin_Hypothesis
{
- void SetQuadAllowed(in boolean value);
- boolean GetQuadAllowed();
};
/*!
row++;
}
myAllowQuadrangles = 0;
- if ( myIs2D )
+ if ( true /*myIs2D*/ ) // issue 0021676
{
myAllowQuadrangles = new QCheckBox( tr( "NETGEN_ALLOW_QUADRANGLES" ), GroupC1 );
aGroupLayout->addWidget( myAllowQuadrangles, row, 0 );
if self.Parameters():
self.params.SetNbSegPerRadius(theVal)
+ ## Sets QuadAllowed flag.
+ def SetQuadAllowed(self, toAllow=True):
+ if self.Parameters():
+ self.params.SetQuadAllowed(toAllow)
+
## Sets number of segments overriding the value set by SetLocalLength()
#
def __init__(self, mesh, geom=0):
NETGEN_1D2D3D_Algorithm.__init__(self, mesh, geom)
- ## Sets QuadAllowed flag.
- def SetQuadAllowed(self, toAllow=True):
- if self.Parameters():
- self.params.SetQuadAllowed(toAllow)
-
## Triangle NETGEN 2D algorithm
_fineness (GetDefaultFineness()),
_secondOrder (GetDefaultSecondOrder()),
_optimize (GetDefaultOptimize()),
- _localSize (GetDefaultLocalSize())
+ _localSize (GetDefaultLocalSize()),
+ _quadAllowed (GetDefaultQuadAllowed())
{
_name = "NETGEN_Parameters";
_param_algo_dim = 3;
NotifySubMeshesHypothesisModification();
}
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+void NETGENPlugin_Hypothesis::SetQuadAllowed(bool theVal)
+{
+ if (theVal != _quadAllowed)
+ {
+ _quadAllowed = theVal;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+bool NETGENPlugin_Hypothesis::GetDefaultQuadAllowed()
+{
+ return false;
+}
+
//=============================================================================
/*!
*
save << " " << "__LOCALSIZE_END__";
}
save << " " << _minSize;
+ save << " " << _quadAllowed;
return save;
}
if ( !hasLocalSize && !option_or_sm.empty() )
_minSize = atof( option_or_sm.c_str() );
+ isOK = ( load >> _quadAllowed );
+ if ( !isOK )
+ _quadAllowed = GetDefaultQuadAllowed();
+
return load;
}
const TLocalSize& GetLocalSizesAndEntries() const { return _localSize; }
void UnsetLocalSizeOnEntry(const std::string& entry);
+ void SetQuadAllowed(bool theVal);
+ bool GetQuadAllowed() const { return _quadAllowed; }
+
// the default values (taken from NETGEN 4.5 sources)
static double GetDefaultMaxSize();
static double GetDefaultNbSegPerRadius();
static bool GetDefaultSecondOrder();
static bool GetDefaultOptimize();
+ static bool GetDefaultQuadAllowed();
// Persistence
virtual ostream & SaveTo(ostream & save);
bool _secondOrder;
bool _optimize;
TLocalSize _localSize;
+ bool _quadAllowed;
};
#endif
// Author : Michael Sazonov (OCN)
// Date : 27/03/2006
// Project : SALOME
-// $Header$
//=============================================================================
//
#ifndef _NETGENPlugin_Hypothesis_2D_HXX_
* Set QuadAllowed flag
*/
//=============================================================================
-void NETGENPlugin_Hypothesis_2D_i::SetQuadAllowed (CORBA::Boolean theValue)
-{
- if ( NETGENPlugin_Hypothesis_i::isToSetParameter( GetQuadAllowed(),
- theValue,
- METH_SetQuadAllowed ))
- {
- this->GetImpl()->SetQuadAllowed(theValue);
- SMESH::TPythonDump() << _this() << ".SetQuadAllowed( " << theValue << " )";
- }
-}
+// void NETGENPlugin_Hypothesis_2D_i::SetQuadAllowed (CORBA::Boolean theValue)
+// {
+// if ( NETGENPlugin_Hypothesis_i::isToSetParameter( GetQuadAllowed(),
+// theValue,
+// METH_SetQuadAllowed ))
+// {
+// this->GetImpl()->SetQuadAllowed(theValue);
+// SMESH::TPythonDump() << _this() << ".SetQuadAllowed( " << theValue << " )";
+// }
+// }
//=============================================================================
/*!
* Get QuadAllowed flag
*/
//=============================================================================
-CORBA::Boolean NETGENPlugin_Hypothesis_2D_i::GetQuadAllowed()
-{
- return this->GetImpl()->GetQuadAllowed();
-}
+// CORBA::Boolean NETGENPlugin_Hypothesis_2D_i::GetQuadAllowed()
+// {
+// return this->GetImpl()->GetQuadAllowed();
+// }
//=============================================================================
/*!
// Destructor
virtual ~NETGENPlugin_Hypothesis_2D_i();
- void SetQuadAllowed(CORBA::Boolean theVal);
- CORBA::Boolean GetQuadAllowed();
-
// Get implementation
::NETGENPlugin_Hypothesis_2D* GetImpl();
protected:
// to remember whether a parameter is already set (issue 0021364)
- enum SettingMethod
- {
- METH_SetQuadAllowed = NETGENPlugin_Hypothesis_i::METH_LAST * 2,
- METH_LAST = METH_SetQuadAllowed
- };
+ // enum SettingMethod
+ // {
+ // METH_SetQuadAllowed = NETGENPlugin_Hypothesis_i::METH_LAST * 2,
+ // METH_LAST = METH_SetQuadAllowed
+ // };
};
#endif
SMESH::TPythonDump() << _this() << ".UnsetLocalSizeOnEntry(" << entry << ")";
}
+//=============================================================================
+
+void NETGENPlugin_Hypothesis_i::SetQuadAllowed (CORBA::Boolean theValue)
+{
+ if ( NETGENPlugin_Hypothesis_i::isToSetParameter( GetQuadAllowed(),
+ theValue,
+ METH_SetQuadAllowed ))
+ {
+ this->GetImpl()->SetQuadAllowed(theValue);
+ SMESH::TPythonDump() << _this() << ".SetQuadAllowed( " << theValue << " )";
+ }
+}
+
+//=============================================================================
+
+CORBA::Boolean NETGENPlugin_Hypothesis_i::GetQuadAllowed()
+{
+ return this->GetImpl()->GetQuadAllowed();
+}
+
//=============================================================================
/*!
* NETGENPlugin_Hypothesis_i::GetImpl
NETGENPlugin::string_array* GetLocalSizeEntries();
void UnsetLocalSizeOnEntry(const char* entry);
+ void SetQuadAllowed(CORBA::Boolean theVal);
+ CORBA::Boolean GetQuadAllowed();
+
// Get implementation
::NETGENPlugin_Hypothesis* GetImpl();
METH_SetNbSegPerEdge = 64,
METH_SetNbSegPerRadius = 128,
METH_SetLocalSizeOnEntry = 256,
- METH_LAST = METH_SetLocalSizeOnEntry
+ METH_SetQuadAllowed = METH_SetLocalSizeOnEntry * 2,
+ METH_LAST = METH_SetQuadAllowed
};
int mySetMethodFlags;