#include <SUIT_ResourceMgr.h>
#include <SalomeApp_Tools.h>
+#include <QObject>
#include <QComboBox>
#include <QLabel>
#include <QGroupBox>
};
enum {
- SMP_BTNS = 0,
+// SMP_BTNS = 0,
// SMP_ATTRACTOR_BTN,
// SMP_SEPARATOR1,
// SMP_POINT_BTN,
// SMP_EDGE_BTN,
// SMP_SURFACE_BTN,
SMP_GEOM_BTN,
- SMP_SEPARATOR2,
- SMP_ATT_GROUP,
- SMP_DIST_GROUP,
+// SMP_SEPARATOR2,
+// SMP_SEPARATOR,
+ SMP_TAB_WDG,
+// SMP_ATT_GROUP,
SMP_ADD_BTN,
- SMP_REMOVE_BTN,
- SMP_NB_LINES
+// SMP_REMOVE_BTN,
+ SMP_NB_LINES,
+ SMP_STD_TAB = 0,
+ ATT_TAB
};
enum {
- SMP_ATT_BTNS = 0,
SMP_ATT_SHAPE,
SMP_ATT_SIZE,
SMP_ATT_DIST
};
enum {
- SMP_DIST_BTNS = 0,
- SMP_DIST
+ SMP_SIZE,
+ SMP_SPACE,
+ SMP_DIST_GROUP,
+// SMP_CHECK,
+ SMP_SPACE2,
+ SMP_DIST=0,
+ SMP_DIST_SHAPE,
};
// Enforced vertices inputs
// Size Maps parameters
mySmpGroup = new QWidget();
- mySmpGroup->setMinimumWidth(450);
-// mySmpGroup->setMinimumHeight(300);
+ mySmpGroup->setMinimumWidth(500);
+ //mySmpGroup->setMinimumHeight(350);
+ //Layout
QGridLayout* anSmpLayout = new QGridLayout(mySmpGroup);
- //anSmpLayout->setColumnStretch(0,1);
+ // Table
mySizeMapTable = new QTableWidget( 0, SMP_NB_COLUMNS, mySmpGroup );
+ // tab widget
+ smpTab = new QTabWidget( mySmpGroup );
+ smpTab->setTabShape( QTabWidget::Rounded );
+ smpTab->setTabPosition( QTabWidget::South );
+ lay->addWidget( smpTab );
+
+ // Table settings
//mySizeMapTable->setSortingEnabled(true);
QStringList sizeMapHeaders;
sizeMapHeaders << tr( "SMP_ENTRY_COLUMN" )<< tr( "SMP_NAME_COLUMN" ) << tr( "SMP_SIZEMAP_COLUMN" ) << tr( "SMP_DIST_COLUMN" );
SMESH_NumberFilter* myFilter1 = new SMESH_NumberFilter("GEOM", TopAbs_SHAPE, 0, SM_ShapeTypes);
SMESH_NumberFilter* myFilter2 = new SMESH_NumberFilter("GEOM", TopAbs_SHAPE, 0, ATT_ShapeTypes);
+ SMESH_NumberFilter* myFilter3 = new SMESH_NumberFilter("GEOM", TopAbs_SHAPE, 0, TopAbs_FACE);
// Size Map GroupBox
myGeomSelWdg = new StdMeshersGUI_ObjectReferenceParamWdg( myFilter1, 0, /*multiSel=*/false,/*stretch=*/false);
myGeomSelWdg->SetDefaultText("Select a Shape", "QLineEdit { color: grey }");
- QFrame *line2 = new QFrame(mySmpGroup);
- line2->setFrameShape(QFrame::HLine);
- line2->setFrameShadow(QFrame::Sunken);
+// QFrame *line2 = new QFrame(mySmpGroup);
+// line2->setFrameShape(QFrame::HLine);
+// line2->setFrameShadow(QFrame::Sunken);
removeMapButton = new QPushButton(tr("BLSURF_SM_REMOVE"),mySmpGroup);
addMapButton = new QPushButton(tr("BLSURF_SM_ADD"),mySmpGroup);
// Attractor GroupBox
- myAttractorGroup = new QGroupBox(tr("BLSURF_SM_ATTRACTOR"),mySmpGroup);
- myAttractorGroup->setCheckable(true);
- myAttractorGroup->setChecked(false);
- myAttractorGroup->setEnabled(false);
+ //myAttractorGroup = new QGroupBox(tr("BLSURF_SM_ATTRACTOR"),mySmpGroup);
+ myAttractorGroup = new QWidget();
+// myAttractorGroup->setMinimumWidth(220);
+// myAttractorGroup->setCheckable(true);
+// myAttractorGroup->setChecked(false);
+// myAttractorGroup->setEnabled(false);
QGridLayout* anAttLayout = new QGridLayout(myAttractorGroup);
myAttDistSpin = new QDoubleSpinBox(myAttractorGroup);
myAttSizeSpin = new QDoubleSpinBox(myAttractorGroup);
- QLabel* myAttDistLabel = new QLabel(tr("BLSURF_ATT_DIST"),myAttractorGroup);
- QLabel* myAttSizeLabel = new QLabel(tr("BLSURF_ATT_SIZE"),myAttractorGroup);
+ myAttDistLabel = new QLabel(tr("BLSURF_ATT_DIST"),myAttractorGroup);
+ myAttSizeLabel = new QLabel(tr("BLSURF_ATT_SIZE"),myAttractorGroup);
myAttSelWdg = new StdMeshersGUI_ObjectReferenceParamWdg( myFilter2, myAttractorGroup, /*multiSel=*/false,/*stretch=*/false);
myAttSelWdg->SetDefaultText("Select a Shape", "QLineEdit { color: grey }");
myAttSelWdg->AvoidSimultaneousSelection(myGeomSelWdg);
- myAttDistSpin->setValue(0.);
- myAttSizeSpin->setValue(0.);
+ // Initialization of widgets
+// myAttDistSpin->hide();
+// myAttSizeSpin->hide();
+// myAttDistLabel->hide();
+// myAttSizeLabel->hide();
+// myAttSelWdg->hide();
+
+ // Standard size map tab
+ mySmpStdGroup = new QWidget();
+ QGridLayout* anSmpStdLayout = new QGridLayout(mySmpStdGroup);
+
// Constant Size GroupBox
- myDistanceGroup = new QGroupBox(tr("BLSURF_SM_CONST"),mySmpGroup);
+ mySmpSizeSpin = new QDoubleSpinBox(mySmpStdGroup);
+ QLabel* mySmpSizeLabel = new QLabel(tr("BLSURF_SM_SIZE"),mySmpStdGroup);
+// myConstSizeCheck = new QCheckBox(tr("BLSURF_SM_CONST"),mySmpStdGroup);
+ myDistanceGroup = new QGroupBox(tr("BLSURF_SM_CONST"),mySmpStdGroup);
+ myDistanceGroup->setFlat(true);
myDistanceGroup->setCheckable(true);
myDistanceGroup->setChecked(false);
myDistanceGroup->setEnabled(false);
- QGridLayout* aDistLayout = new QGridLayout(myDistanceGroup);
+
+ QGridLayout* aDistLayout = new QGridLayout(myDistanceGroup );
mySmpDistSpin = new QDoubleSpinBox(myDistanceGroup);
QLabel* mySmpDistLabel = new QLabel(tr("BLSURF_SM_DIST"),myDistanceGroup);
-
+ myDistSelWdg = new StdMeshersGUI_ObjectReferenceParamWdg( myFilter3, myDistanceGroup, /*multiSel=*/true,/*stretch=*/false);
+ myDistSelWdg->SetDefaultText("On Face(s)", "QLineEdit { color: grey }");
+ myDistSelWdg->AvoidSimultaneousSelection(myGeomSelWdg);
+ myDistSelWdg->AvoidSimultaneousSelection(myAttSelWdg);
+
+ // Parameters of SpinBoxes
+ myAttDistSpin->setMaximum(1000); // TODO use preferences of SALOME
+ mySmpDistSpin->setMaximum(1000);
+ myAttSizeSpin->setMaximum(1000);
+ mySmpSizeSpin->setMaximum(1000);
+ myAttDistSpin->setDecimals(4);
+ mySmpDistSpin->setDecimals(4);
+ myAttSizeSpin->setDecimals(4);
+ mySmpSizeSpin->setDecimals(4);
+ myAttDistSpin->setValue(0.);
+ myAttSizeSpin->setValue(0.);
+ mySmpDistSpin->setValue(0.);
+ mySmpSizeSpin->setValue(0.);
// ADD WIDGETS (SIZEMAP TAB)
// anSmpLayout->addWidget(mySizeMapTable, SMP_POINT_BTN, 0, SMP_NB_LINES+1, 1);
- anSmpLayout->addWidget(mySizeMapTable, 1, 0, SMP_NB_LINES+1, 1);
-// anSmpLayout->addWidget(addAttractorButton, SMP_ATTRACTOR_BTN, 1, 1, 1);
-// anSmpLayout->addWidget(line, SMP_SEPARATOR1, 1, 1, 1);
-// anSmpLayout->addWidget(addPointButton, SMP_POINT_BTN, 1, 1, 1);
-// anSmpLayout->addWidget(addEdgeButton, SMP_EDGE_BTN, 1, 1, 1);
-// anSmpLayout->addWidget(addSurfaceButton, SMP_SURFACE_BTN, 1, 1, 1);
+ anSmpLayout->addWidget(mySizeMapTable, 0, 0, SMP_NB_LINES, 1);
anSmpLayout->addWidget(myGeomSelWdg, SMP_GEOM_BTN, 1, 1, 2);
- anSmpLayout->addWidget(line2, SMP_SEPARATOR2, 1, 1, 2);
- anSmpLayout->addWidget(myAttractorGroup, SMP_ATT_GROUP, 1, 1, 2);
- anAttLayout->addWidget(myAttDistLabel, SMP_ATT_DIST, 1, 1, 1);
- anAttLayout->addWidget(myAttDistSpin, SMP_ATT_DIST, 2, 1, 1);
- anAttLayout->addWidget(myAttSizeLabel, SMP_ATT_SIZE, 1, 1, 1);
- anAttLayout->addWidget(myAttSizeSpin, SMP_ATT_SIZE, 2, 1, 1);
+// anSmpLayout->addWidget(line2, SMP_SEPARATOR2, 1, 2, 2);
+ anSmpLayout->addWidget(smpTab, SMP_TAB_WDG, 1, 1, 2);
+// anSmpLayout->addWidget(myAttractorGroup, SMP_ATT_GROUP, 1, 1, 2);
+// anSmpLayout->addWidget(myDistanceGroup, SMP_DIST_GROUP, 1, 1, 2);
+ anSmpLayout->setRowStretch(SMP_TAB_WDG, 1);
+ anSmpLayout->addWidget(addMapButton, SMP_ADD_BTN, 1, 1, 1);
+ anSmpLayout->addWidget(removeMapButton, SMP_ADD_BTN, 2, 1, 1);
+
anAttLayout->addWidget(myAttSelWdg, SMP_ATT_SHAPE, 1, 1, 2);
- anSmpLayout->addWidget(myDistanceGroup, SMP_DIST_GROUP, 1, 1, 2);
- aDistLayout->addWidget(mySmpDistLabel, SMP_DIST, 1, 1, 1);
- aDistLayout->addWidget(mySmpDistSpin, SMP_DIST, 2, 1, 1);
- anSmpLayout->addWidget(addMapButton, SMP_ADD_BTN, 1, 1, 2);
- anSmpLayout->addWidget(removeMapButton, SMP_REMOVE_BTN, 1, 1, 2);
+ anAttLayout->addWidget(myAttSizeLabel, SMP_ATT_SIZE, 1, 1, 1);
+ anAttLayout->addWidget(myAttSizeSpin, SMP_ATT_SIZE, 2, 1, 1);
+ anAttLayout->addWidget(myAttDistLabel, SMP_ATT_DIST, 1, 1, 1);
+ anAttLayout->addWidget(myAttDistSpin, SMP_ATT_DIST, 2, 1, 1);
+ anAttLayout->setRowStretch(SMP_ATT_DIST+1, 1);
+
+ anSmpStdLayout->addWidget(mySmpSizeLabel, SMP_SIZE, 1, 1, 1);
+ anSmpStdLayout->addWidget(mySmpSizeSpin, SMP_SIZE, 2, 1, 1);
+// anSmpStdLayout->addWidget(myDistanceGroup, SMP_DIST_GROUP, 1, 1, 2);
+// anSmpStdLayout->setRowStretch(SMP_DIST_GROUP+1, 1);
+//
+// anSmpStdLayout->addWidget(myConstSizeCheck,SMP_CHECK, 1, 1, 2);
+ anSmpStdLayout->addWidget(myDistanceGroup, SMP_DIST_GROUP, 1, 1, 2);
+ aDistLayout->addWidget(mySmpDistLabel, SMP_DIST, 1, 1, 1);
+ aDistLayout->addWidget(mySmpDistSpin, SMP_DIST, 2, 1, 1);
+ aDistLayout->addWidget(myDistSelWdg, SMP_DIST_SHAPE, 1, 1, 2);
+// aDistLayout->setRowMinimumHeight(SMP_CHECK, 15);
+ anSmpStdLayout->setRowMinimumHeight(SMP_SPACE, 12);
+ anSmpStdLayout->setRowStretch(SMP_SPACE2, 1);
+
+ smpTab->insertTab( SMP_STD_TAB, mySmpStdGroup, tr( "BLSURF_SM_STD_TAB" ) );
+ smpTab->insertTab( ATT_TAB, myAttractorGroup, tr( "BLSURF_SM_ATT_TAB" ) );
+
+ smpTab->setCurrentIndex( SMP_STD_TAB );
MESSAGE("attEntry = "<<attEntry.toStdString())
std::string attName = myGeomToolSelected->getNameFromEntry(attEntry.toStdString());
MESSAGE("attName = "<<attName)
- mySizeMapTable->setItem( row, SMP_SIZEMAP_COLUMN, new QTableWidgetItem( QString::fromStdString("Attractor :" + attName) ) );
- mySizeMapTable->item( row, SMP_SIZEMAP_COLUMN )->setFlags( Qt::ItemIsSelectable |
+ if (that->myAttDistMap[entry] > 1e-12){
+ mySizeMapTable->setItem( row, SMP_SIZEMAP_COLUMN, new QTableWidgetItem( QString::fromStdString("Attractor :" + attName) ) );
+ mySizeMapTable->item( row, SMP_SIZEMAP_COLUMN )->setFlags( Qt::ItemIsSelectable |
+ Qt::ItemIsEnabled );
+ mySizeMapTable->setItem( row, SMP_DIST_COLUMN, new QTableWidgetItem( QString::number( that->myDistMap[entry], 'g', 6) ) );
+ mySizeMapTable->item( row, SMP_DIST_COLUMN )->setFlags( Qt::ItemIsSelectable |
+ Qt::ItemIsEnabled );
+ }
+ else{
+ mySizeMapTable->setItem( row, SMP_SIZEMAP_COLUMN, new QTableWidgetItem( QString::fromStdString("Const. size from : " + attName + " (size = ") + sizeMap + QString::fromStdString(" )") ) );
+ mySizeMapTable->item( row, SMP_SIZEMAP_COLUMN )->setFlags( Qt::ItemIsSelectable |
Qt::ItemIsEnabled );
+ mySizeMapTable->item( row, SMP_NAME_COLUMN)->setText(QString::fromStdString(shapeName));
+ mySizeMapTable->setItem( row, SMP_DIST_COLUMN, new QTableWidgetItem( QString::number( that->myDistMap[entry], 'g', 6) ));
+ mySizeMapTable->item( row, SMP_DIST_COLUMN )->setFlags( Qt::ItemIsSelectable |
+ Qt::ItemIsEnabled );
+ }
}
else
{
mySizeMapTable->item( row, SMP_SIZEMAP_COLUMN )->setFlags( Qt::ItemIsSelectable |
Qt::ItemIsEditable |
Qt::ItemIsEnabled );
+ mySizeMapTable->setItem( row, SMP_DIST_COLUMN, new QTableWidgetItem( QString::number( that->myDistMap[entry], 'g', 6) ) );
+ mySizeMapTable->item( row, SMP_DIST_COLUMN )->setFlags( Qt::ItemIsSelectable |
+ Qt::ItemIsEnabled );
}
- mySizeMapTable->setItem( row, SMP_DIST_COLUMN, new QTableWidgetItem( QString::number( that->myDistMap[entry], 'g', 6) ) );
- mySizeMapTable->item( row, SMP_DIST_COLUMN )->setFlags( Qt::ItemIsSelectable |
- Qt::ItemIsEnabled );
+
}
mySizeMapTable->resizeColumnToContents( SMP_NAME_COLUMN );
mySMapObject = myGeomSelWdg->GetObject< GEOM::GEOM_Object >(0);
TopAbs_ShapeEnum myShapeType = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( mySMapObject ).ShapeType();
if ( myShapeType == TopAbs_FACE ){
- myAttractorGroup->setEnabled(true);
- if (!myAttractorGroup->isChecked()){
- myDistanceGroup->setEnabled(false);
- myDistanceGroup->setChecked(false);
- }
+ smpTab->setTabEnabled(ATT_TAB,true);
+// if (!myAttractorGroup->isChecked()){
+ myDistanceGroup->setEnabled(false);
+// myDistanceGroup->setChecked(false);
+// }
}
else
{
- myAttractorGroup->setEnabled(false);
- myAttractorGroup->setChecked(false);
+ smpTab->setTabEnabled(ATT_TAB,false);
+// myAttractorGroup->setEnabled(false);
+// myAttractorGroup->setChecked(false);
myDistanceGroup->setEnabled(true);
}
}
}
-void BLSURFPluginGUI_HypothesisCreator::onAttractorGroupClicked(bool checked){
- if (checked){
- myDistanceGroup->setEnabled(true);
- }
- else{
- myDistanceGroup->setEnabled(false);
- myDistanceGroup->setChecked(false);
- }
-}
+// void BLSURFPluginGUI_HypothesisCreator::onAttractorGroupClicked(bool checked){
+// // QObjectList grpChildren = myAttractorGroup->children();
+// // QObjectList::iterator it;
+// // QObject* myChild;
+// if (checked){
+// myDistanceGroup->setEnabled(true);
+// myAttDistSpin->show(); // TODO voir si on garde ça
+// myAttSizeSpin->show();
+// myAttDistLabel->show();
+// myAttSizeLabel->show();
+// myAttSelWdg->show();
+// // for(it = grpChildren.begin(); it != grpChildren.end(); it++){
+// // myChild=*it;
+// // myChild->hide();
+// // }
+// }
+// else{
+// myDistanceGroup->setEnabled(false);
+// myDistanceGroup->setChecked(false);
+// myAttDistSpin->hide();
+// myAttSizeSpin->hide();
+// myAttDistLabel->hide();
+// myAttSizeLabel->hide();
+// myAttSelWdg->hide();
+//
+// // for(it = grpChildren.begin(); it != grpChildren.end(); it++){
+// // myChild=*it;
+// // myChild->show();
+// // }
+// }
+// }
void BLSURFPluginGUI_HypothesisCreator::onItemClicked(QTableWidgetItem * item)
{
QString sizeMap = that->mySizeMapTable->item(row, SMP_SIZEMAP_COLUMN)->text().trimmed();
if (sizeMap.startsWith("Attractor :")){
- myAttractorGroup->setChecked( true );
- myDistanceGroup->setChecked( true );
- myDistanceGroup->setEnabled( true );
+// myAttractorGroup->setChecked( true );
+// myDistanceGroup->setChecked( true );
+// myDistanceGroup->setEnabled( true );
+ smpTab->setCurrentIndex(ATT_TAB);
double phySize = that->mySMPMap[entry].toDouble();
double infDist = that->myAttDistMap[entry];
QString attEntry = that->myATTMap[entry];
CORBA::Object_var attObj = entryToObject(attEntry);
+ CORBA::Object_var obj = entryToObject(entry);
+ myGeomSelWdg->SetObject(obj);
myAttSelWdg->SetObject(attObj);
myAttSizeSpin->setValue(phySize);
myAttDistSpin->setValue(infDist);
}
- else {
- myAttractorGroup->setChecked( false );
+ else if (sizeMap.startsWith("Const.")){
+ smpTab->setCurrentIndex(SMP_STD_TAB);
+ myDistanceGroup->setChecked( true );
+ myDistanceGroup->setEnabled( true );
+ double constDist = that->myDistMap[entry];
+ QString attEntry = that->myATTMap[entry];
+ mySmpDistSpin->setValue(constDist);
+ mySmpSizeSpin->setValue(that->mySMPMap[entry].toDouble());
+ CORBA::Object_var attObj = entryToObject(attEntry);
+ CORBA::Object_var obj = entryToObject(entry);
+ myGeomSelWdg->SetObject(attObj);
+ myDistSelWdg->SetObject(obj);
}
- CORBA::Object_var obj = entryToObject(entry);
- double constDist = that->myDistMap[entry];
-
- myGeomSelWdg->SetObject(obj);
- mySmpDistSpin->setValue(constDist);
+ else {
+ smpTab->setCurrentIndex(SMP_STD_TAB);
+ CORBA::Object_var obj = entryToObject(entry);
+ myGeomSelWdg->SetObject(obj);
+ if (!sizeMap.startsWith("def")){
+ mySmpSizeSpin->setValue(that->mySMPMap[entry].toDouble());
+// myAttractorGroup->setChecked( false );
+ }
+ }
}
}
if (! that->mySMPShapeTypeMap.contains(entry))
return;
if (that->mySMPMap.contains(entry))
- if (that->mySMPMap[entry] == sizeMap || sizeMap.startsWith("Attractor :")){
+ if (that->mySMPMap[entry] == sizeMap
+ || sizeMap.startsWith("Attractor :")
+ || sizeMap.startsWith("Const.") ){
return;
}
// QColor* bgColor = new QColor("white");
{
if ( myGeomSelWdg->IsObjectSelected() ){
mySMapObject = myGeomSelWdg->GetObject< GEOM::GEOM_Object >(0);
- if ( myAttractorGroup->isChecked() ){
+// if ( myAttractorGroup->isChecked() ){
+ if ( smpTab->currentIndex() == ATT_TAB ){
if ( myAttSelWdg->IsObjectSelected() ){
myAttObject = myAttSelWdg->GetObject< GEOM::GEOM_Object >(0);
insertAttractor(mySMapObject, myAttObject);
}
}
- else {
- insertElement(mySMapObject);
+// if ( myDistanceGroup->isChecked() && !myAttractorGroup->isChecked())
+ if (smpTab->currentIndex() == SMP_STD_TAB ){
+ if ( myDistSelWdg->IsObjectSelected() ){
+ int Nb_obj = myDistSelWdg->NbObjects();
+ int i = 0;
+ for (; i!=Nb_obj; i++){
+ myDistObject = myDistSelWdg->GetObject< GEOM::GEOM_Object >(i);
+ insertAttractor(myDistObject, mySMapObject, false);
+ }
+ }
+ else {
+ insertElement(mySMapObject);
+ }
}
BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
that->getGeomSelectionTool()->selectionMgr()->clearFilters();
mySizeMapTable->setFocus();
QString shapeEntry;
shapeEntry = QString::fromStdString(entry);
- double phySize = h->GetPhySize();
+ double phySize = mySmpSizeSpin->value();
std::ostringstream oss;
oss << phySize;
QString sizeMap;
sizeMap = QString::fromStdString(oss.str());
- if (that->mySMPMap.contains(shapeEntry)) {
- if (that->mySMPMap[shapeEntry] != "__TO_DELETE__") {
-// MESSAGE("Size map for shape with name(entry): "<< shapeName << "(" << entry << ")");
- return;
- }
- }
+// if (that->mySMPMap.contains(shapeEntry)) {
+// if (that->mySMPMap[shapeEntry] != "__TO_DELETE__") {
+// // MESSAGE("Size map for shape with name(entry): "<< shapeName << "(" << entry << ")");
+// return;
+// }
+// }
that->mySMPMap[shapeEntry] = sizeMap;
that->myDistMap[shapeEntry] = 0. ;
that->mySMPShapeTypeMap[shapeEntry] = shapeType;
}
}
-void BLSURFPluginGUI_HypothesisCreator::insertAttractor(GEOM::GEOM_Object_var aFace, GEOM::GEOM_Object_var anAttractor)
+void BLSURFPluginGUI_HypothesisCreator::insertAttractor(GEOM::GEOM_Object_var aFace, GEOM::GEOM_Object_var anAttractor, bool influence)
{
MESSAGE("BLSURFPluginGUI_HypothesisCreator::insertAttractor()");
BLSURFPlugin::BLSURFPlugin_Hypothesis_var h =
QString shapeEntry = QString::fromStdString(entry);
QString qAttEntry = QString::fromStdString(attEntry);
- //double phySize = h->GetPhySize();
- double phySize = myAttSizeSpin->value();
- double infDist = myAttDistSpin->value();
+ double phySize = h->GetPhySize();
+ double infDist = 0. ;
+ if (influence){
+ infDist = myAttDistSpin->value();
+ phySize = myAttSizeSpin->value();
+ }
+ else{
+ phySize = mySmpSizeSpin->value();
+ }
double constDist = 0. ;
if (myDistanceGroup->isChecked()){
constDist = mySmpDistSpin->value();
that->mySMPMap.insert(shapeEntry,sizeMap);
that->myATTMap.insert(shapeEntry,qAttEntry);
that->myAttDistMap.insert(shapeEntry,infDist);
- that->myDistMap.insert(shapeEntry,constDist);
that->mySMPShapeTypeMap.insert(shapeEntry,shapeType);
- mySizeMapTable->item( rowToChange, SMP_ENTRY_COLUMN )->setText(shapeEntry);
- mySizeMapTable->item( rowToChange, SMP_NAME_COLUMN )->setText( QString::fromStdString(faceName));
- mySizeMapTable->item( rowToChange, SMP_SIZEMAP_COLUMN )->setText(QString::fromStdString("Attractor : "+attName));
- mySizeMapTable->item( rowToChange, SMP_SIZEMAP_COLUMN )->setFlags( Qt::ItemIsSelectable |Qt::ItemIsEnabled );
- mySizeMapTable->item( rowToChange, SMP_DIST_COLUMN )->setText(constDistString );
+ if (influence){
+ mySizeMapTable->item( rowToChange, SMP_ENTRY_COLUMN )->setText(shapeEntry);
+ mySizeMapTable->item( rowToChange, SMP_NAME_COLUMN )->setText( QString::fromStdString(faceName));
+ mySizeMapTable->item( rowToChange, SMP_SIZEMAP_COLUMN )->setText(QString::fromStdString("Attractor : "+attName));
+ }
+ else {
+ that->myDistMap.insert(shapeEntry,constDist);
+ mySizeMapTable->item( rowToChange, SMP_ENTRY_COLUMN )->setText(shapeEntry);
+ mySizeMapTable->item( rowToChange, SMP_NAME_COLUMN )->setText( QString::fromStdString(faceName));
+ mySizeMapTable->item( rowToChange, SMP_SIZEMAP_COLUMN )->setText(QString::fromStdString("Const. size from : " + attName + " (size = ") + sizeMap + QString::fromStdString(" )"));
+ mySizeMapTable->item( rowToChange, SMP_SIZEMAP_COLUMN )->setFlags( Qt::ItemIsSelectable |Qt::ItemIsEnabled );
+ mySizeMapTable->item( row, SMP_DIST_COLUMN )->setText(constDistString);
+ }
mySizeMapTable->resizeColumnToContents( SMP_NAME_COLUMN );
mySizeMapTable->resizeColumnToContents( SMP_SIZEMAP_COLUMN );
mySizeMapTable->resizeColumnToContents( SMP_DIST_COLUMN );