<parameter name="type_of_marker" value="1" />
<parameter name="marker_scale" value="9" />
<parameter name="elem0d_size" value="5" />
+ <parameter name="ball_elem_diameter" value="1" />
<parameter name="ball_elem_size" value="10" />
<parameter name="ball_elem_scale" value="1" />
<parameter name="element_width" value="1" />
LightApp_Preferences::IntSpin, "SMESH", "elem0d_size");
/* int ballSize = addPreference(tr("PREF_BALL_SIZE"), elemGroup,
LightApp_Preferences::IntSpin, "SMESH", "ball_elem_size"); */
- int ballDiameter = addPreference(tr("PREF_BALL_DIAMETER"), elemGroup,
- LightApp_Preferences::IntSpin, "SMESH", "ball_elem_diameter");
+ double ballDiameter = addPreference(tr("PREF_BALL_DIAMETER"), elemGroup,
+ LightApp_Preferences::DblSpin, "SMESH", "ball_elem_diameter");
double ballScale = addPreference(tr("PREF_BALL_SCALE"), elemGroup,
LightApp_Preferences::DblSpin, "SMESH", "ball_elem_scale");
int elemW = addPreference(tr("PREF_WIDTH"), elemGroup,
// Preview for the balls
vtkProperty* aBallProp = vtkProperty::New();
aBallProp->SetColor(ffc.red() / 255. , ffc.green() / 255. , ffc.blue() / 255.);
- double aBallElemSize = SMESH::GetFloat("SMESH:ball_elem_size",10);
+ //double aBallElemSize = SMESH::GetFloat("SMESH:ball_elem_size",10);
+ double aBallElemSize = SMESH::GetFloat("SMESH:ball_elem_diameter",1);
aBallProp->SetPointSize(aBallElemSize);
myBallPolyData = vtkPolyData::New();
GroupC1Layout->addWidget(DiameterSpinBox, 1, 1, 1, 2);
DiameterSpinBox->RangeStepAndValidator( 1e-7, 1e+9, 0.1 );
- DiameterSpinBox->SetValue( 1. );
+ DiameterSpinBox->SetValue( SMESH::GetFloat("SMESH:ball_elem_diameter", 1) );
connect( DiameterSpinBox, SIGNAL( valueChanged ( double ) ), this, SLOT( onDiameterChanged( ) ) );
}
/* Add to group ************************************************/
myBallGrp = new QGroupBox( tr( "BALLS" ), mainFrame() );
QLabel* ballColorLab = new QLabel( tr( "COLOR" ), myBallGrp );
myBallColor = new QtxColorButton( myBallGrp );
- QLabel* ballSizeLab = new QLabel( tr( "SIZE" ), myBallGrp );
- myBallSize = new QtxIntSpinBox( myBallGrp );
+ // QLabel* ballSizeLab = new QLabel( tr( "SIZE" ), myBallGrp );
+ // myBallSize = new QtxIntSpinBox( myBallGrp );
QLabel* ballScaleLab = new QLabel( tr( "SCALE_FACTOR" ), myBallGrp );
myBallScale = new QtxDoubleSpinBox( 1e-2, 1e7, 0.5, myBallGrp );
hl = new QHBoxLayout( myBallGrp );
hl->setSpacing( SPACING );
hl->addWidget( ballColorLab );
hl->addWidget( myBallColor );
- hl->addWidget( ballSizeLab );
- hl->addWidget( myBallSize );
+ // hl->addWidget( ballSizeLab );
+ // hl->addWidget( myBallSize );
hl->addWidget( ballScaleLab );
hl->addWidget( myBallScale );
widthLab1 = qMax( widthLab1, ballColorLab->minimumSizeHint().width() );
- widthLab2 = qMax( widthLab2, ballSizeLab->minimumSizeHint().width() );
+ // widthLab2 = qMax( widthLab2, ballSizeLab->minimumSizeHint().width() );
// -- orientation vector controls
myOrientationGrp = new QGroupBox( tr( "ORIENTATIONS" ), mainFrame() );
myVolumeColor->label()->setMinimumWidth( widthLab2 );
outlineWidthLab->setMinimumWidth( widthLab2 );
elem0dSizeLab->setMinimumWidth( widthLab2 );
- ballSizeLab->setMinimumWidth( widthLab2 );
+ // ballSizeLab->setMinimumWidth( widthLab2 );
orientationScaleLab->setMinimumWidth( widthLab2 );
myEdgeWidth->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
myOutlineWidth->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
myElem0dSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
- myBallSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+ // myBallSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
myBallScale->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
myOrientationSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
myShrinkSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
// initialize widgets
myNodeMarker->setCustomMarkers( customMarkers );
myElem0dSize->setRange( 1, 10 );
- myBallSize->setRange( 1, 10 );
+ // myBallSize->setRange( 1, 10 );
myEdgeWidth->setRange( 1, 5 );
myOutlineWidth->setRange( 1, 5 );
myShrinkSize->setRange( 20, 100 );
\brief Set discrete elements (balls) size
\param size discrete elements (balls) size
*/
-void SMESHGUI_PropertiesDlg::setBallSize( int size )
+/*void SMESHGUI_PropertiesDlg::setBallSize( int size )
{
myBallSize->setValue( size );
-}
+}*/
/*!
\brief Get discrete elements (balls) size
\return current discrete elements (balls) size
*/
-int SMESHGUI_PropertiesDlg::ballSize() const
+/*int SMESHGUI_PropertiesDlg::ballSize() const
{
return myBallSize->value();
-}
+}*/
/*!
\brief Set discrete elements (balls) scale factor
void setBallColor( const QColor& );
QColor ballColor() const;
- void setBallSize( int );
- int ballSize() const;
+ // void setBallSize( int );
+ // int ballSize() const;
void setBallScale( double );
double ballScale() const;
QtxIntSpinBox* myElem0dSize;
// - balls
QtxColorButton* myBallColor;
- QtxIntSpinBox* myBallSize;
+ // QtxIntSpinBox* myBallSize;
QtxDoubleSpinBox* myBallScale;
// - orientation vectors
QtxColorButton* myOrientationColor;
aPreColor = mgr->colorValue( "SMESH", "highlight_color", Qt::cyan );
int aElem0DSize = mgr->integerValue("SMESH", "elem0d_size", 5);
- int aBallSize = mgr->integerValue("SMESH", "ball_elem_size", 5);
+ // int aBallSize = mgr->integerValue("SMESH", "ball_elem_size", 5);
int aLineWidth = mgr->integerValue("SMESH", "element_width", 1);
int maxSize = aElem0DSize;
if (aElem0DSize > maxSize) maxSize = aElem0DSize;
if (aLineWidth > maxSize) maxSize = aLineWidth;
- if (aBallSize > maxSize) maxSize = aBallSize;
+ // if (aBallSize > maxSize) maxSize = aBallSize;
double SP1 = mgr->doubleValue( "SMESH", "selection_precision_node", 0.025 ),
SP2 = mgr->doubleValue( "SMESH", "selection_precision_element", 0.001 ),
<source>PREF_BALL_COLOR</source>
<translation>Ball color</translation>
</message>
+ <message>
+ <source>PREF_BALL_DIAMETER</source>
+ <translation>Default diameter of ball elements</translation>
+ </message>
<message>
<source>PREF_BALL_SIZE</source>
<translation>Size of ball elements</translation>
<source>PREF_BALL_COLOR</source>
<translation>Couleur des particulaires</translation>
</message>
+ <message>
+ <source>PREF_BALL_DIAMETER</source>
+ <translation type="unfinished">Default diameter of ball elements</translation>
+ </message>
<message>
<source>PREF_BALL_SIZE</source>
<translation>Taille des éléments particulaires</translation>
<source>PREF_BALL_COLOR</source>
<translation>粒子</translation>
</message>
+ <message>
+ <source>PREF_BALL_DIAMETER</source>
+ <translation type="unfinished">Default diameter of ball elements</translation>
+ </message>
<message>
<source>PREF_BALL_SIZE</source>
<translation>粒子状のコンポーネントのサイズ</translation>