mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-05 14:24:17 +05:00
0021197: EDF 1772 SMESH: Automatic meshing hypothesis
class HypothesesSet { + void setIsCustom( bool ); + bool getIsCustom() const; + int maxDim() const;
This commit is contained in:
parent
570cb9161c
commit
9296d2af7b
@ -697,7 +697,8 @@ HypothesisData::HypothesisData( const QString& theTypeName,
|
|||||||
|
|
||||||
HypothesesSet::HypothesesSet( const QString& theSetName )
|
HypothesesSet::HypothesesSet( const QString& theSetName )
|
||||||
: myHypoSetName( theSetName ),
|
: myHypoSetName( theSetName ),
|
||||||
myIsAlgo( false )
|
myIsAlgo( false ),
|
||||||
|
myIsCustom( false )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -707,7 +708,8 @@ HypothesesSet::HypothesesSet( const QString& theSetName,
|
|||||||
: myHypoSetName( theSetName ),
|
: myHypoSetName( theSetName ),
|
||||||
myHypoList( theHypoList ),
|
myHypoList( theHypoList ),
|
||||||
myAlgoList( theAlgoList ),
|
myAlgoList( theAlgoList ),
|
||||||
myIsAlgo( false )
|
myIsAlgo( false ),
|
||||||
|
myIsCustom( false )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -761,3 +763,28 @@ QString HypothesesSet::current() const
|
|||||||
{
|
{
|
||||||
return list()->at(myIndex);
|
return list()->at(myIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HypothesesSet::setIsCustom( bool isCustom )
|
||||||
|
{
|
||||||
|
myIsCustom = isCustom;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HypothesesSet::getIsCustom() const
|
||||||
|
{
|
||||||
|
return myIsCustom;
|
||||||
|
}
|
||||||
|
|
||||||
|
int HypothesesSet::maxDim() const
|
||||||
|
{
|
||||||
|
HypothesesSet * thisSet = (HypothesesSet*) this;
|
||||||
|
int dim = -1;
|
||||||
|
for ( int isAlgo = 0; isAlgo < 2; ++isAlgo )
|
||||||
|
{
|
||||||
|
thisSet->init( isAlgo );
|
||||||
|
while ( thisSet->next(), thisSet->more() )
|
||||||
|
if ( HypothesisData* hypData = SMESH::GetHypothesisData( thisSet->current() ))
|
||||||
|
for ( int i = 0; i < hypData->Dim.count(); ++i )
|
||||||
|
dim = qMax( dim, hypData->Dim[i] );
|
||||||
|
}
|
||||||
|
return dim;
|
||||||
|
}
|
||||||
|
@ -202,6 +202,10 @@ public:
|
|||||||
void set( bool, const QStringList& );
|
void set( bool, const QStringList& );
|
||||||
int count( bool ) const;
|
int count( bool ) const;
|
||||||
|
|
||||||
|
void setIsCustom( bool );
|
||||||
|
bool getIsCustom() const;
|
||||||
|
int maxDim() const;
|
||||||
|
|
||||||
bool isAlgo() const;
|
bool isAlgo() const;
|
||||||
|
|
||||||
//this method sets internal index to -1, thus before any data access it is necessary to call next()
|
//this method sets internal index to -1, thus before any data access it is necessary to call next()
|
||||||
@ -216,9 +220,9 @@ private:
|
|||||||
QStringList* list() const;
|
QStringList* list() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool myIsAlgo;
|
|
||||||
QString myHypoSetName;
|
QString myHypoSetName;
|
||||||
QStringList myHypoList, myAlgoList;
|
QStringList myHypoList, myAlgoList;
|
||||||
|
bool myIsAlgo, myIsCustom;
|
||||||
int myIndex;
|
int myIndex;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user