Merge branch 'master' of https://codev-tuleap.cea.fr/plugins/git/salome/netgenplugin
This commit is contained in:
commit
ac3260b082
@ -430,25 +430,6 @@ QString NETGENPluginGUI_HypothesisCreator::storeParams() const
|
|||||||
readParamsFromWidgets( data );
|
readParamsFromWidgets( data );
|
||||||
storeParamsToHypo( data );
|
storeParamsToHypo( data );
|
||||||
|
|
||||||
// QString valStr = tr("NETGEN_MAX_SIZE") + " = " + QString::number( data.myMaxSize ) + "; ";
|
|
||||||
// valStr += tr("NETGEN_MIN_SIZE") + " = " + QString::number( data.myMinSize ) + "; ";
|
|
||||||
// if ( data.mySecondOrder )
|
|
||||||
// valStr += tr("NETGEN_SECOND_ORDER") + "; ";
|
|
||||||
// if ( data.myOptimize )
|
|
||||||
// valStr += tr("NETGEN_OPTIMIZE") + "; ";
|
|
||||||
// valStr += myFineness->currentText() + "(" + QString::number( data.myGrowthRate ) + ", " +
|
|
||||||
// QString::number( data.myNbSegPerEdge ) + ", " +
|
|
||||||
// QString::number( data.myNbSegPerRadius ) + ")";
|
|
||||||
|
|
||||||
// if ( myIs2D && data.myAllowQuadrangles )
|
|
||||||
// valStr += "; " + tr("NETGEN_ALLOW_QUADRANGLES");
|
|
||||||
|
|
||||||
// if ( data.mySurfaceCurvature )
|
|
||||||
// valStr += "; " + tr("NETGEN_SURFACE_CURVATURE");
|
|
||||||
|
|
||||||
// if ( data.myFuseEdges )
|
|
||||||
// valStr += "; " + tr("NETGEN_FUSE_EDGES");
|
|
||||||
|
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -502,18 +483,13 @@ bool NETGENPluginGUI_HypothesisCreator::readParamsFromHypo( NetgenHypothesisData
|
|||||||
for ( size_t i = 0; i < myEntries->length(); i++ )
|
for ( size_t i = 0; i < myEntries->length(); i++ )
|
||||||
{
|
{
|
||||||
QString entry = myEntries[i].in();
|
QString entry = myEntries[i].in();
|
||||||
double val = h->GetLocalSizeOnEntry(entry.toStdString().c_str());
|
if (myLocalSizeMap.contains(entry) &&
|
||||||
|
myLocalSizeMap[entry] == "__TO_DELETE__")
|
||||||
|
continue;
|
||||||
|
double val = h->GetLocalSizeOnEntry( myEntries[i] );
|
||||||
std::ostringstream tmp;
|
std::ostringstream tmp;
|
||||||
tmp << val;
|
tmp << val;
|
||||||
QString valstring = QString::fromStdString(tmp.str());
|
that->myLocalSizeMap[entry] = tmp.str().c_str();
|
||||||
if (myLocalSizeMap.contains(entry))
|
|
||||||
{
|
|
||||||
if (myLocalSizeMap[entry] == "__TO_DELETE__")
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
that->myLocalSizeMap[entry] = valstring;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -586,10 +562,11 @@ bool NETGENPluginGUI_HypothesisCreator::storeParamsToHypo( const NetgenHypothesi
|
|||||||
rh->SetRidgeAngle ( h_data.myRidgeAngle );
|
rh->SetRidgeAngle ( h_data.myRidgeAngle );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for ( QMapIterator<QString,QString> i(myLocalSizeMap); i.hasNext(); i.next() )
|
for ( QMapIterator<QString,QString> i(myLocalSizeMap); i.hasNext(); )
|
||||||
{
|
{
|
||||||
const QString entry = i.key();
|
i.next();
|
||||||
const QString localSize = i.value();
|
const QString& entry = i.key();
|
||||||
|
const QString& localSize = i.value();
|
||||||
if (localSize == "__TO_DELETE__")
|
if (localSize == "__TO_DELETE__")
|
||||||
{
|
{
|
||||||
h->UnsetLocalSizeOnEntry(entry.toLatin1().constData());
|
h->UnsetLocalSizeOnEntry(entry.toLatin1().constData());
|
||||||
@ -772,11 +749,9 @@ void NETGENPluginGUI_HypothesisCreator::addLocalSizeOnShape(TopAbs_ShapeEnum typ
|
|||||||
for ( ; Object_It.More() ; Object_It.Next())
|
for ( ; Object_It.More() ; Object_It.Next())
|
||||||
{
|
{
|
||||||
Handle(SALOME_InteractiveObject) anObject = Object_It.Value();
|
Handle(SALOME_InteractiveObject) anObject = Object_It.Value();
|
||||||
std::string entry, shapeName;
|
std::string entry = geomSelectionTools->getEntryOfObject(anObject);
|
||||||
entry = geomSelectionTools->getEntryOfObject(anObject);
|
std::string shapeName = anObject->getName();
|
||||||
shapeName = anObject->getName();
|
TopAbs_ShapeEnum shapeType = geomSelectionTools->entryToShapeType(entry);
|
||||||
TopAbs_ShapeEnum shapeType;
|
|
||||||
shapeType = geomSelectionTools->entryToShapeType(entry);
|
|
||||||
if (shapeType == TopAbs_SHAPE)
|
if (shapeType == TopAbs_SHAPE)
|
||||||
{
|
{
|
||||||
// E.A. if shapeType == TopAbs_SHAPE, it is NOT a TopoDS_Shape !!!
|
// E.A. if shapeType == TopAbs_SHAPE, it is NOT a TopoDS_Shape !!!
|
||||||
@ -789,15 +764,11 @@ void NETGENPluginGUI_HypothesisCreator::addLocalSizeOnShape(TopAbs_ShapeEnum typ
|
|||||||
}
|
}
|
||||||
// --
|
// --
|
||||||
myLocalSizeTable->setFocus();
|
myLocalSizeTable->setFocus();
|
||||||
QString shapeEntry;
|
QString shapeEntry = QString::fromStdString(entry);
|
||||||
shapeEntry = QString::fromStdString(entry);
|
if (myLocalSizeMap.contains(shapeEntry) &&
|
||||||
if (myLocalSizeMap.contains(shapeEntry))
|
myLocalSizeMap[shapeEntry] != "__TO_DELETE__")
|
||||||
{
|
|
||||||
if (myLocalSizeMap[shapeEntry] != "__TO_DELETE__")
|
|
||||||
{
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
}
|
|
||||||
double phySize = h->GetMaxSize();
|
double phySize = h->GetMaxSize();
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << phySize;
|
oss << phySize;
|
||||||
|
Loading…
Reference in New Issue
Block a user