mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 02:00:34 +05:00
0022479: EDF 2823 SMESH: Add "multiplier" coefficient for balls
This commit is contained in:
parent
1821a9c35f
commit
8608b2b5ca
Binary file not shown.
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 37 KiB |
Binary file not shown.
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 75 KiB |
@ -41,6 +41,7 @@ shown.
|
|||||||
- \b Balls:
|
- \b Balls:
|
||||||
- \b Color - color of discrete ball elements.
|
- \b Color - color of discrete ball elements.
|
||||||
- \b Size - size of discrete ball elements.
|
- \b Size - size of discrete ball elements.
|
||||||
|
- \b Scale - scale factor of discrete ball elements.
|
||||||
- <b>Orientation vectors</b>:
|
- <b>Orientation vectors</b>:
|
||||||
- \b Color - color of orientation vectors.
|
- \b Color - color of orientation vectors.
|
||||||
- \b Scale - size of orientation vectors.
|
- \b Scale - size of orientation vectors.
|
||||||
|
@ -159,6 +159,8 @@ later sessions with this module.
|
|||||||
- <b>Size of 0D elements</b> - specifies default size of 0D elements.
|
- <b>Size of 0D elements</b> - specifies default size of 0D elements.
|
||||||
- <b>Size of ball elements</b> - specifies default size of discrete
|
- <b>Size of ball elements</b> - specifies default size of discrete
|
||||||
elements (balls).
|
elements (balls).
|
||||||
|
- <b>Scale factor of ball elements</b> - specifies default scale factor of discrete
|
||||||
|
elements (balls).
|
||||||
- <b>Line width</b> - allows to define the width of 1D elements (edges).
|
- <b>Line width</b> - allows to define the width of 1D elements (edges).
|
||||||
- <b>Outline width</b> - allows to define the width of borders of
|
- <b>Outline width</b> - allows to define the width of borders of
|
||||||
2D and 3D elements (shown in the Shading mode).
|
2D and 3D elements (shown in the Shading mode).
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
<parameter name="marker_scale" value="9" />
|
<parameter name="marker_scale" value="9" />
|
||||||
<parameter name="elem0d_size" value="5" />
|
<parameter name="elem0d_size" value="5" />
|
||||||
<parameter name="ball_elem_size" value="10" />
|
<parameter name="ball_elem_size" value="10" />
|
||||||
|
<parameter name="ball_elem_scale" value="1" />
|
||||||
<parameter name="element_width" value="1" />
|
<parameter name="element_width" value="1" />
|
||||||
<parameter name="outline_width" value="1" />
|
<parameter name="outline_width" value="1" />
|
||||||
<parameter name="shrink_coeff" value="75"/>
|
<parameter name="shrink_coeff" value="75"/>
|
||||||
|
@ -143,10 +143,11 @@ SMESH_ActorDef::SMESH_ActorDef()
|
|||||||
if ( mgr && mgr->booleanValue( "SMESH", "use_precision", false ) )
|
if ( mgr && mgr->booleanValue( "SMESH", "use_precision", false ) )
|
||||||
myControlsPrecision = mgr->integerValue( "SMESH", "controls_precision", -1);
|
myControlsPrecision = mgr->integerValue( "SMESH", "controls_precision", -1);
|
||||||
|
|
||||||
double aElem0DSize = SMESH::GetFloat("SMESH:elem0d_size",5);
|
double aElem0DSize = SMESH::GetFloat("SMESH:elem0d_size",5);
|
||||||
double aBallElemSize = SMESH::GetFloat("SMESH:ball_elem_size",10);
|
double aBallElemSize = SMESH::GetFloat("SMESH:ball_elem_size",10);
|
||||||
double aLineWidth = SMESH::GetFloat("SMESH:element_width",1);
|
double aBallElemScale = SMESH::GetFloat("SMESH:ball_elem_scale",1);
|
||||||
double aOutlineWidth = SMESH::GetFloat("SMESH:outline_width",1);
|
double aLineWidth = SMESH::GetFloat("SMESH:element_width",1);
|
||||||
|
double aOutlineWidth = SMESH::GetFloat("SMESH:outline_width",1);
|
||||||
|
|
||||||
SMESH::LabelFont aFamilyNd = SMESH::FntTimes;
|
SMESH::LabelFont aFamilyNd = SMESH::FntTimes;
|
||||||
bool aBoldNd = true;
|
bool aBoldNd = true;
|
||||||
@ -566,6 +567,7 @@ SMESH_ActorDef::SMESH_ActorDef()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
SetBallSize(aBallElemSize);
|
SetBallSize(aBallElemSize);
|
||||||
|
SetBallScale(aBallElemScale);
|
||||||
Set0DSize(aElem0DSize);
|
Set0DSize(aElem0DSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2106,6 +2108,16 @@ double SMESH_ActorDef::GetBallSize(){
|
|||||||
return myBallProp->GetPointSize();
|
return myBallProp->GetPointSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int SMESH_ActorDef::GetBallScale()
|
||||||
|
{
|
||||||
|
return myBallActor->GetBallScale();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SMESH_ActorDef::SetBallScale( int theVal )
|
||||||
|
{
|
||||||
|
myBallActor->SetBallScale( theVal );
|
||||||
|
}
|
||||||
|
|
||||||
int SMESH_ActorDef::GetObjDimension( const int theObjId )
|
int SMESH_ActorDef::GetObjDimension( const int theObjId )
|
||||||
{
|
{
|
||||||
return myVisualObj->GetElemDimension( theObjId );
|
return myVisualObj->GetElemDimension( theObjId );
|
||||||
|
@ -101,6 +101,9 @@ class SMESHOBJECT_EXPORT SMESH_Actor: public SALOME_Actor
|
|||||||
virtual void SetBallSize(double size) = 0;
|
virtual void SetBallSize(double size) = 0;
|
||||||
virtual double GetBallSize() = 0;
|
virtual double GetBallSize() = 0;
|
||||||
|
|
||||||
|
virtual void SetBallScale(int size) = 0;
|
||||||
|
virtual int GetBallScale() = 0;
|
||||||
|
|
||||||
enum EReperesent { ePoint, eEdge, eSurface};
|
enum EReperesent { ePoint, eEdge, eSurface};
|
||||||
|
|
||||||
enum EEntityMode { e0DElements = 0x01, eEdges = 0x02, eFaces = 0x04, eVolumes = 0x08, eBallElem = 0x10, eAllEntity = 0x1f};
|
enum EEntityMode { e0DElements = 0x01, eEdges = 0x02, eFaces = 0x04, eVolumes = 0x08, eBallElem = 0x10, eAllEntity = 0x1f};
|
||||||
|
@ -144,6 +144,9 @@ class SMESH_ActorDef : public SMESH_Actor
|
|||||||
virtual void SetBallSize(double size);
|
virtual void SetBallSize(double size);
|
||||||
virtual double GetBallSize();
|
virtual double GetBallSize();
|
||||||
|
|
||||||
|
virtual void SetBallScale(int size);
|
||||||
|
virtual int GetBallScale();
|
||||||
|
|
||||||
virtual int GetNodeObjId(int theVtkID);
|
virtual int GetNodeObjId(int theVtkID);
|
||||||
virtual double* GetNodeCoord(int theObjID);
|
virtual double* GetNodeCoord(int theObjID);
|
||||||
|
|
||||||
|
@ -959,6 +959,16 @@ void SMESH_DeviceActor::SetBallEnabled( bool theBallEnabled ) {
|
|||||||
myMapper->SetBallEnabled( theBallEnabled );
|
myMapper->SetBallEnabled( theBallEnabled );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Set point marker scale factor
|
||||||
|
* \param theBallScale integer value which specifies a scale factor of ball element
|
||||||
|
*/
|
||||||
|
void SMESH_DeviceActor::SetBallScale( int theBallScale )
|
||||||
|
{
|
||||||
|
myMapper->SetBallScale( theBallScale );
|
||||||
|
myMapper->Modified();
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Set standard point marker
|
* Set standard point marker
|
||||||
* \param theMarkerType type of the marker
|
* \param theMarkerType type of the marker
|
||||||
@ -1005,6 +1015,15 @@ int SMESH_DeviceActor::GetMarkerTexture()
|
|||||||
return myMapper->GetMarkerTexture();
|
return myMapper->GetMarkerTexture();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Get scale factor of ball element
|
||||||
|
* \return scale factor of ball element
|
||||||
|
*/
|
||||||
|
int SMESH_DeviceActor::GetBallScale()
|
||||||
|
{
|
||||||
|
return myMapper->GetBallScale();
|
||||||
|
}
|
||||||
|
|
||||||
void SMESH_DeviceActor::SetCoincident3DAllowed(bool theFlag) {
|
void SMESH_DeviceActor::SetCoincident3DAllowed(bool theFlag) {
|
||||||
myGeomFilter->SetAppendCoincident3D(theFlag);
|
myGeomFilter->SetAppendCoincident3D(theFlag);
|
||||||
}
|
}
|
||||||
|
@ -148,11 +148,13 @@ class SMESHOBJECT_EXPORT SMESH_DeviceActor: public vtkLODActor{
|
|||||||
|
|
||||||
void SetMarkerEnabled( bool );
|
void SetMarkerEnabled( bool );
|
||||||
void SetBallEnabled( bool );
|
void SetBallEnabled( bool );
|
||||||
|
void SetBallScale( int );
|
||||||
void SetMarkerStd( VTK::MarkerType, VTK::MarkerScale );
|
void SetMarkerStd( VTK::MarkerType, VTK::MarkerScale );
|
||||||
void SetMarkerTexture( int, VTK::MarkerTexture );
|
void SetMarkerTexture( int, VTK::MarkerTexture );
|
||||||
VTK::MarkerType GetMarkerType();
|
VTK::MarkerType GetMarkerType();
|
||||||
VTK::MarkerScale GetMarkerScale();
|
VTK::MarkerScale GetMarkerScale();
|
||||||
int GetMarkerTexture();
|
int GetMarkerTexture();
|
||||||
|
int GetBallScale();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void Init(TVisualObjPtr theVisualObj, vtkImplicitBoolean* theImplicitBoolean);
|
void Init(TVisualObjPtr theVisualObj, vtkImplicitBoolean* theImplicitBoolean);
|
||||||
|
@ -1316,6 +1316,7 @@ namespace
|
|||||||
int deltaF = 0, deltaV = 0;
|
int deltaF = 0, deltaV = 0;
|
||||||
int elem0dSize = 1;
|
int elem0dSize = 1;
|
||||||
int ballSize = 1;
|
int ballSize = 1;
|
||||||
|
int ballScale = 1;
|
||||||
int edgeWidth = 1;
|
int edgeWidth = 1;
|
||||||
int outlineWidth = 1;
|
int outlineWidth = 1;
|
||||||
double shrinkCoef = 0.0;
|
double shrinkCoef = 0.0;
|
||||||
@ -1360,6 +1361,7 @@ namespace
|
|||||||
anActor->GetBallColor( color[0], color[1], color[2] );
|
anActor->GetBallColor( color[0], color[1], color[2] );
|
||||||
ballColor.setRgbF( color[0], color[1], color[2] );
|
ballColor.setRgbF( color[0], color[1], color[2] );
|
||||||
ballSize = qMax( (int)anActor->GetBallSize(), 1 ); // minimum allowed size is 1
|
ballSize = qMax( (int)anActor->GetBallSize(), 1 ); // minimum allowed size is 1
|
||||||
|
ballScale = qMax( (int)anActor->GetBallScale(), 1 ); // minimum allowed size is 1
|
||||||
// outlines: color
|
// outlines: color
|
||||||
anActor->GetOutlineColor( color[0], color[1], color[2] );
|
anActor->GetOutlineColor( color[0], color[1], color[2] );
|
||||||
outlineColor.setRgbF( color[0], color[1], color[2] );
|
outlineColor.setRgbF( color[0], color[1], color[2] );
|
||||||
@ -1416,6 +1418,7 @@ namespace
|
|||||||
// balls: color, size
|
// balls: color, size
|
||||||
dlg.setBallColor( ballColor );
|
dlg.setBallColor( ballColor );
|
||||||
dlg.setBallSize( ballSize );
|
dlg.setBallSize( ballSize );
|
||||||
|
dlg.setBallScale( ballScale );
|
||||||
// orientation: color, scale, 3d flag
|
// orientation: color, scale, 3d flag
|
||||||
dlg.setOrientationColor( orientationColor );
|
dlg.setOrientationColor( orientationColor );
|
||||||
dlg.setOrientationSize( int( orientationScale * 100. ) );
|
dlg.setOrientationSize( int( orientationScale * 100. ) );
|
||||||
@ -1442,6 +1445,7 @@ namespace
|
|||||||
elem0dSize = dlg.elem0dSize();
|
elem0dSize = dlg.elem0dSize();
|
||||||
ballColor = dlg.ballColor();
|
ballColor = dlg.ballColor();
|
||||||
ballSize = dlg.ballSize();
|
ballSize = dlg.ballSize();
|
||||||
|
ballScale = dlg.ballScale();
|
||||||
orientationColor = dlg.orientationColor();
|
orientationColor = dlg.orientationColor();
|
||||||
orientationScale = dlg.orientationSize() / 100.;
|
orientationScale = dlg.orientationSize() / 100.;
|
||||||
orientation3d = dlg.orientation3d();
|
orientation3d = dlg.orientation3d();
|
||||||
@ -1485,6 +1489,7 @@ namespace
|
|||||||
// balls: color, size
|
// balls: color, size
|
||||||
anActor->SetBallColor( ballColor.redF(), ballColor.greenF(), ballColor.blueF() );
|
anActor->SetBallColor( ballColor.redF(), ballColor.greenF(), ballColor.blueF() );
|
||||||
anActor->SetBallSize( ballSize );
|
anActor->SetBallSize( ballSize );
|
||||||
|
anActor->SetBallScale( ballScale );
|
||||||
// orientation: color, scale, 3d flag
|
// orientation: color, scale, 3d flag
|
||||||
anActor->SetFacesOrientationColor( orientationColor.redF(), orientationColor.greenF(), orientationColor.blueF() );
|
anActor->SetFacesOrientationColor( orientationColor.redF(), orientationColor.greenF(), orientationColor.blueF() );
|
||||||
anActor->SetFacesOrientationScale( orientationScale );
|
anActor->SetFacesOrientationScale( orientationScale );
|
||||||
@ -5053,6 +5058,8 @@ void SMESHGUI::createPreferences()
|
|||||||
LightApp_Preferences::IntSpin, "SMESH", "elem0d_size");
|
LightApp_Preferences::IntSpin, "SMESH", "elem0d_size");
|
||||||
int ballSize = addPreference(tr("PREF_BALL_SIZE"), elemGroup,
|
int ballSize = addPreference(tr("PREF_BALL_SIZE"), elemGroup,
|
||||||
LightApp_Preferences::IntSpin, "SMESH", "ball_elem_size");
|
LightApp_Preferences::IntSpin, "SMESH", "ball_elem_size");
|
||||||
|
int ballScale = addPreference(tr("PREF_BALL_SCALE"), elemGroup,
|
||||||
|
LightApp_Preferences::IntSpin, "SMESH", "ball_elem_scale");
|
||||||
int elemW = addPreference(tr("PREF_WIDTH"), elemGroup,
|
int elemW = addPreference(tr("PREF_WIDTH"), elemGroup,
|
||||||
LightApp_Preferences::IntSpin, "SMESH", "element_width");
|
LightApp_Preferences::IntSpin, "SMESH", "element_width");
|
||||||
int outW = addPreference(tr("PREF_OUTLINE_WIDTH"), elemGroup,
|
int outW = addPreference(tr("PREF_OUTLINE_WIDTH"), elemGroup,
|
||||||
@ -5066,6 +5073,9 @@ void SMESHGUI::createPreferences()
|
|||||||
setPreferenceProperty( ballSize, "min", 1 );
|
setPreferenceProperty( ballSize, "min", 1 );
|
||||||
setPreferenceProperty( ballSize, "max", 10 );
|
setPreferenceProperty( ballSize, "max", 10 );
|
||||||
|
|
||||||
|
setPreferenceProperty( ballScale, "min", 1 );
|
||||||
|
setPreferenceProperty( ballScale, "max", 10 );
|
||||||
|
|
||||||
setPreferenceProperty( elemW, "min", 1 );
|
setPreferenceProperty( elemW, "min", 1 );
|
||||||
setPreferenceProperty( elemW, "max", 5 );
|
setPreferenceProperty( elemW, "max", 5 );
|
||||||
|
|
||||||
@ -5738,6 +5748,7 @@ void SMESHGUI::storeVisualParameters (int savePoint)
|
|||||||
sizeStr << QString::number((int)aSmeshActor->Get0DSize());
|
sizeStr << QString::number((int)aSmeshActor->Get0DSize());
|
||||||
sizeStr << "ball";
|
sizeStr << "ball";
|
||||||
sizeStr << QString::number((int)aSmeshActor->GetBallSize());
|
sizeStr << QString::number((int)aSmeshActor->GetBallSize());
|
||||||
|
sizeStr << QString::number((int)aSmeshActor->GetBallScale());
|
||||||
sizeStr << "shrink";
|
sizeStr << "shrink";
|
||||||
sizeStr << QString::number(aSmeshActor->GetShrinkFactor());
|
sizeStr << QString::number(aSmeshActor->GetShrinkFactor());
|
||||||
sizeStr << "orientation";
|
sizeStr << "orientation";
|
||||||
@ -6322,6 +6333,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
|
|||||||
int outlineWidth = -1;
|
int outlineWidth = -1;
|
||||||
int elem0dSize = -1;
|
int elem0dSize = -1;
|
||||||
int ballSize = -1;
|
int ballSize = -1;
|
||||||
|
int ballScale = -1;
|
||||||
double shrinkSize = -1;
|
double shrinkSize = -1;
|
||||||
double orientationSize = -1;
|
double orientationSize = -1;
|
||||||
bool orientation3d = false;
|
bool orientation3d = false;
|
||||||
@ -6349,11 +6361,16 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else if ( type == "ball" ) {
|
else if ( type == "ball" ) {
|
||||||
// ball size is given as single integer value
|
// balls are specified by two values: size:scale, where
|
||||||
|
// - size - is a integer value specifying size
|
||||||
|
// - scale - is a integer value specifying scale factor
|
||||||
if ( i+1 >= sizes.count() ) break; // format error
|
if ( i+1 >= sizes.count() ) break; // format error
|
||||||
int v = sizes[i+1].toInt( &bOk ); if ( !bOk ) break; // format error
|
int v1 = sizes[i+1].toInt( &bOk ); if ( !bOk ) break; // format error
|
||||||
ballSize = v;
|
if ( i+2 >= sizes.count() ) break; // format error
|
||||||
i++;
|
int v2 = sizes[i+2].toInt( &bOk ); if ( !bOk ) break; // format error
|
||||||
|
ballSize = v1;
|
||||||
|
ballScale = v2;
|
||||||
|
i += 2;
|
||||||
}
|
}
|
||||||
else if ( type == "shrink" ) {
|
else if ( type == "shrink" ) {
|
||||||
// shrink factor is given as single floating point value
|
// shrink factor is given as single floating point value
|
||||||
@ -6389,6 +6406,9 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
|
|||||||
// ball size
|
// ball size
|
||||||
if ( ballSize > 0 )
|
if ( ballSize > 0 )
|
||||||
aSmeshActor->SetBallSize( ballSize );
|
aSmeshActor->SetBallSize( ballSize );
|
||||||
|
// ball scale
|
||||||
|
if ( ballScale > 0 )
|
||||||
|
aSmeshActor->SetBallScale( ballScale );
|
||||||
// shrink factor
|
// shrink factor
|
||||||
if ( shrinkSize > 0 )
|
if ( shrinkSize > 0 )
|
||||||
aSmeshActor->SetShrinkFactor( shrinkSize );
|
aSmeshActor->SetShrinkFactor( shrinkSize );
|
||||||
|
@ -230,7 +230,7 @@ namespace SMESH
|
|||||||
for (int i = 0, iEnd = theIds.size(); i < iEnd; i++){
|
for (int i = 0, iEnd = theIds.size(); i < iEnd; i++){
|
||||||
anIds->InsertId(0,theIds[i]);
|
anIds->InsertId(0,theIds[i]);
|
||||||
vtkIdType anId = myBallPolyData->InsertNextCell(VTK_POLY_VERTEX,anIds);
|
vtkIdType anId = myBallPolyData->InsertNextCell(VTK_POLY_VERTEX,anIds);
|
||||||
double d = theDiameter;
|
double d = theDiameter * theActor->GetBallScale();
|
||||||
aScalars->SetTuple(anId,&d);
|
aScalars->SetTuple(anId,&d);
|
||||||
anIds->Reset();
|
anIds->Reset();
|
||||||
}
|
}
|
||||||
|
@ -157,6 +157,8 @@ SMESHGUI_PropertiesDlg::SMESHGUI_PropertiesDlg( const VTK::MarkerMap& customMark
|
|||||||
myBallColor = new QtxColorButton( myBallGrp );
|
myBallColor = new QtxColorButton( myBallGrp );
|
||||||
QLabel* ballSizeLab = new QLabel( tr( "SIZE" ), myBallGrp );
|
QLabel* ballSizeLab = new QLabel( tr( "SIZE" ), myBallGrp );
|
||||||
myBallSize = new QtxIntSpinBox( myBallGrp );
|
myBallSize = new QtxIntSpinBox( myBallGrp );
|
||||||
|
QLabel* ballScaleLab = new QLabel( tr( "SCALE_FACTOR" ), myBallGrp );
|
||||||
|
myBallScale = new QtxIntSpinBox( myBallGrp );
|
||||||
hl = new QHBoxLayout( myBallGrp );
|
hl = new QHBoxLayout( myBallGrp );
|
||||||
hl->setMargin( MARGIN );
|
hl->setMargin( MARGIN );
|
||||||
hl->setSpacing( SPACING );
|
hl->setSpacing( SPACING );
|
||||||
@ -164,6 +166,8 @@ SMESHGUI_PropertiesDlg::SMESHGUI_PropertiesDlg( const VTK::MarkerMap& customMark
|
|||||||
hl->addWidget( myBallColor );
|
hl->addWidget( myBallColor );
|
||||||
hl->addWidget( ballSizeLab );
|
hl->addWidget( ballSizeLab );
|
||||||
hl->addWidget( myBallSize );
|
hl->addWidget( myBallSize );
|
||||||
|
hl->addWidget( ballScaleLab );
|
||||||
|
hl->addWidget( myBallScale );
|
||||||
widthLab1 = qMax( widthLab1, ballColorLab->minimumSizeHint().width() );
|
widthLab1 = qMax( widthLab1, ballColorLab->minimumSizeHint().width() );
|
||||||
widthLab2 = qMax( widthLab2, ballSizeLab->minimumSizeHint().width() );
|
widthLab2 = qMax( widthLab2, ballSizeLab->minimumSizeHint().width() );
|
||||||
|
|
||||||
@ -171,7 +175,7 @@ SMESHGUI_PropertiesDlg::SMESHGUI_PropertiesDlg( const VTK::MarkerMap& customMark
|
|||||||
myOrientationGrp = new QGroupBox( tr( "ORIENTATIONS" ), mainFrame() );
|
myOrientationGrp = new QGroupBox( tr( "ORIENTATIONS" ), mainFrame() );
|
||||||
QLabel* orientationColorLab = new QLabel( tr( "COLOR" ), myOrientationGrp );
|
QLabel* orientationColorLab = new QLabel( tr( "COLOR" ), myOrientationGrp );
|
||||||
myOrientationColor = new QtxColorButton( myOrientationGrp );
|
myOrientationColor = new QtxColorButton( myOrientationGrp );
|
||||||
QLabel* orientationScaleLab = new QLabel( tr( "ORIENTATION_SCALE" ), myOrientationGrp );
|
QLabel* orientationScaleLab = new QLabel( tr( "SCALE_FACTOR" ), myOrientationGrp );
|
||||||
myOrientationSize = new QtxIntSpinBox( myOrientationGrp );
|
myOrientationSize = new QtxIntSpinBox( myOrientationGrp );
|
||||||
myOrientationSize->setSuffix( "% ");
|
myOrientationSize->setSuffix( "% ");
|
||||||
myOrientation3d = new QCheckBox( tr("ORIENTATION_3D"), myOrientationGrp );
|
myOrientation3d = new QCheckBox( tr("ORIENTATION_3D"), myOrientationGrp );
|
||||||
@ -236,6 +240,7 @@ SMESHGUI_PropertiesDlg::SMESHGUI_PropertiesDlg( const VTK::MarkerMap& customMark
|
|||||||
myOutlineWidth->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
|
myOutlineWidth->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
|
||||||
myElem0dSize->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 );
|
myOrientationSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
|
||||||
myShrinkSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
|
myShrinkSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
|
||||||
|
|
||||||
@ -243,6 +248,7 @@ SMESHGUI_PropertiesDlg::SMESHGUI_PropertiesDlg( const VTK::MarkerMap& customMark
|
|||||||
myNodeMarker->setCustomMarkers( customMarkers );
|
myNodeMarker->setCustomMarkers( customMarkers );
|
||||||
myElem0dSize->setRange( 1, 10 );
|
myElem0dSize->setRange( 1, 10 );
|
||||||
myBallSize->setRange( 1, 10 );
|
myBallSize->setRange( 1, 10 );
|
||||||
|
myBallScale->setRange( 1, 10 );
|
||||||
myEdgeWidth->setRange( 1, 5 );
|
myEdgeWidth->setRange( 1, 5 );
|
||||||
myOutlineWidth->setRange( 1, 5 );
|
myOutlineWidth->setRange( 1, 5 );
|
||||||
myShrinkSize->setRange( 20, 100 );
|
myShrinkSize->setRange( 20, 100 );
|
||||||
@ -530,6 +536,24 @@ int SMESHGUI_PropertiesDlg::ballSize() const
|
|||||||
return myBallSize->value();
|
return myBallSize->value();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Set discrete elements (balls) scale factor
|
||||||
|
\param size discrete elements (balls) scale factor
|
||||||
|
*/
|
||||||
|
void SMESHGUI_PropertiesDlg::setBallScale( int size )
|
||||||
|
{
|
||||||
|
myBallScale->setValue( size );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Get discrete elements (balls) scale factor
|
||||||
|
\return current discrete elements (balls) scale factor
|
||||||
|
*/
|
||||||
|
int SMESHGUI_PropertiesDlg::ballScale() const
|
||||||
|
{
|
||||||
|
return myBallScale->value();
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Set orientation vectors color
|
\brief Set orientation vectors color
|
||||||
\param color orientation vectors color
|
\param color orientation vectors color
|
||||||
|
@ -83,6 +83,8 @@ public:
|
|||||||
QColor ballColor() const;
|
QColor ballColor() const;
|
||||||
void setBallSize( int );
|
void setBallSize( int );
|
||||||
int ballSize() const;
|
int ballSize() const;
|
||||||
|
void setBallScale( int );
|
||||||
|
int ballScale() const;
|
||||||
|
|
||||||
void setOrientationColor( const QColor& );
|
void setOrientationColor( const QColor& );
|
||||||
QColor orientationColor() const;
|
QColor orientationColor() const;
|
||||||
@ -132,6 +134,7 @@ private:
|
|||||||
// - balls
|
// - balls
|
||||||
QtxColorButton* myBallColor;
|
QtxColorButton* myBallColor;
|
||||||
QtxIntSpinBox* myBallSize;
|
QtxIntSpinBox* myBallSize;
|
||||||
|
QtxIntSpinBox* myBallScale;
|
||||||
// - orientation vectors
|
// - orientation vectors
|
||||||
QtxColorButton* myOrientationColor;
|
QtxColorButton* myOrientationColor;
|
||||||
QtxIntSpinBox* myOrientationSize;
|
QtxIntSpinBox* myOrientationSize;
|
||||||
|
@ -4577,6 +4577,10 @@ Please, create VTK viewer and try again</translation>
|
|||||||
<source>PREF_BALL_SIZE</source>
|
<source>PREF_BALL_SIZE</source>
|
||||||
<translation>Size of ball elements</translation>
|
<translation>Size of ball elements</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>PREF_BALL_SCALE</source>
|
||||||
|
<translation>Scale factor of ball elements</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>PREF_WIDTH</source>
|
<source>PREF_WIDTH</source>
|
||||||
<translation>Line width</translation>
|
<translation>Line width</translation>
|
||||||
@ -7776,7 +7780,7 @@ as they are of improper type:
|
|||||||
<translation>Size:</translation>
|
<translation>Size:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>ORIENTATION_SCALE</source>
|
<source>SCALE_FACTOR</source>
|
||||||
<translation>Scale:</translation>
|
<translation>Scale:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -4567,6 +4567,10 @@ Ouvrez une fenêtre VTK et essayez de nouveau</translation>
|
|||||||
<source>PREF_BALL_SIZE</source>
|
<source>PREF_BALL_SIZE</source>
|
||||||
<translation>Taille des éléments particulaires</translation>
|
<translation>Taille des éléments particulaires</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>PREF_BALL_SCALE</source>
|
||||||
|
<translation>Facteur d'échelle des éléments particulaires</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>PREF_WIDTH</source>
|
<source>PREF_WIDTH</source>
|
||||||
<translation>Epaisseur de ligne</translation>
|
<translation>Epaisseur de ligne</translation>
|
||||||
@ -7701,7 +7705,7 @@ en raison de leurs types incompatibles:
|
|||||||
<translation>Taille:</translation>
|
<translation>Taille:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>ORIENTATION_SCALE</source>
|
<source>SCALE_FACTOR</source>
|
||||||
<translation>Echelle:</translation>
|
<translation>Echelle:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -7579,7 +7579,7 @@
|
|||||||
<translation>サイズ</translation>
|
<translation>サイズ</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>ORIENTATION_SCALE</source>
|
<source>SCALE_FACTOR</source>
|
||||||
<translation>スケール:</translation>
|
<translation>スケール:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
Loading…
Reference in New Issue
Block a user