mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 01:10:35 +05:00
Bug PAL7334 - DEVELOPMENT : Control Improvement
This commit is contained in:
parent
7a20cb6635
commit
57d4d5c456
@ -73,18 +73,20 @@
|
|||||||
|
|
||||||
<!-- ************************** Control (menubar) ************************************ -->
|
<!-- ************************** Control (menubar) ************************************ -->
|
||||||
<menu-item label-id="Controls" item-id="60" pos-id="5">
|
<menu-item label-id="Controls" item-id="60" pos-id="5">
|
||||||
<popup-item item-id="6001" pos-id="" label-id="Length" icon-id="mesh_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
|
||||||
<popup-item item-id="6018" pos-id="" label-id="Length2D" icon-id="mesh_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
|
||||||
<popup-item item-id="6002" pos-id="" label-id="Free Edges" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
|
||||||
<popup-item item-id="6003" pos-id="" label-id="Free borders" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="6003" pos-id="" label-id="Free borders" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
|
<popup-item item-id="6001" pos-id="" label-id="Length" icon-id="mesh_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
<popup-item item-id="6004" pos-id="" label-id="Borders at multi-connection" icon-id="mesh_multi_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="6004" pos-id="" label-id="Borders at multi-connection" icon-id="mesh_multi_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
|
<separator pos-id=""/>
|
||||||
|
<popup-item item-id="6002" pos-id="" label-id="Free Edges" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
|
<popup-item item-id="6018" pos-id="" label-id="Length2D" icon-id="mesh_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
<popup-item item-id="6011" pos-id="" label-id="Area" icon-id="mesh_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="6011" pos-id="" label-id="Area" icon-id="mesh_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
<popup-item item-id="6012" pos-id="" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="6012" pos-id="" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
<popup-item item-id="6013" pos-id="" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="6013" pos-id="" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
<popup-item item-id="6017" pos-id="" label-id="Aspect Ratio 3D" icon-id="mesh_aspect.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
|
||||||
<popup-item item-id="6014" pos-id="" label-id="Minimum angle" icon-id="mesh_angle.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="6014" pos-id="" label-id="Minimum angle" icon-id="mesh_angle.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
<popup-item item-id="6015" pos-id="" label-id="Warping" icon-id="mesh_wrap.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="6015" pos-id="" label-id="Warping" icon-id="mesh_wrap.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
<popup-item item-id="6016" pos-id="" label-id="Skew" icon-id="mesh_skew.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="6016" pos-id="" label-id="Skew" icon-id="mesh_skew.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
|
<separator pos-id=""/>
|
||||||
|
<popup-item item-id="6017" pos-id="" label-id="Aspect Ratio 3D" icon-id="mesh_aspect.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
</menu-item>
|
</menu-item>
|
||||||
|
|
||||||
<!-- ************************** Entity (menubar) ************************************ -->
|
<!-- ************************** Entity (menubar) ************************************ -->
|
||||||
@ -251,8 +253,8 @@
|
|||||||
<submenu label-id="Control" item-id="2000" pos-id="">
|
<submenu label-id="Control" item-id="2000" pos-id="">
|
||||||
<popup-item item-id="200" pos-id="" label-id="Reset" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="200" pos-id="" label-id="Reset" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
<separator pos-id=""/>
|
<separator pos-id=""/>
|
||||||
<popup-item item-id="6001" pos-id="" label-id="Length" icon-id="mesh_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
|
||||||
<popup-item item-id="6003" pos-id="" label-id="Free borders" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="6003" pos-id="" label-id="Free borders" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
|
<popup-item item-id="6001" pos-id="" label-id="Length" icon-id="mesh_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
<popup-item item-id="6004" pos-id="" label-id="Borders at multi-connection" icon-id="mesh_multi_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="6004" pos-id="" label-id="Borders at multi-connection" icon-id="mesh_multi_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
<separator pos-id=""/>
|
<separator pos-id=""/>
|
||||||
<popup-item item-id="6002" pos-id="" label-id="Free Edges" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="6002" pos-id="" label-id="Free Edges" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
@ -361,8 +363,8 @@
|
|||||||
<submenu label-id="Control" item-id="2000" pos-id="">
|
<submenu label-id="Control" item-id="2000" pos-id="">
|
||||||
<popup-item item-id="200" pos-id="" label-id="Reset" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="200" pos-id="" label-id="Reset" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
<separator pos-id=""/>
|
<separator pos-id=""/>
|
||||||
<popup-item item-id="6001" pos-id="" label-id="Length" icon-id="mesh_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
|
||||||
<popup-item item-id="6003" pos-id="" label-id="Free borders" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="6003" pos-id="" label-id="Free borders" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
|
<popup-item item-id="6001" pos-id="" label-id="Length" icon-id="mesh_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
<popup-item item-id="6004" pos-id="" label-id="Borders at multi-connection" icon-id="mesh_multi_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="6004" pos-id="" label-id="Borders at multi-connection" icon-id="mesh_multi_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
<separator pos-id=""/>
|
<separator pos-id=""/>
|
||||||
<popup-item item-id="6002" pos-id="" label-id="Free Edges" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
<popup-item item-id="6002" pos-id="" label-id="Free Edges" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||||
|
@ -629,16 +629,14 @@ void SMESH_ActorDef::SetControlMode(eControl theMode){
|
|||||||
my3DActor->GetMapper()->SetScalarVisibility(false);
|
my3DActor->GetMapper()->SetScalarVisibility(false);
|
||||||
myScalarBarActor->SetVisibility(false);
|
myScalarBarActor->SetVisibility(false);
|
||||||
|
|
||||||
bool anIsScalarVisible = theMode > eNone;
|
if(theMode != eNone){
|
||||||
|
|
||||||
if(anIsScalarVisible){
|
|
||||||
SMESH::Controls::FunctorPtr aFunctor;
|
SMESH::Controls::FunctorPtr aFunctor;
|
||||||
|
SMESH::Controls::NumericalFunctor* aNumFunctor = NULL;
|
||||||
switch(theMode){
|
switch(theMode){
|
||||||
case eLength:
|
case eLength:
|
||||||
{
|
{
|
||||||
SMESH::Controls::Length* aControl = new SMESH::Controls::Length();
|
aNumFunctor = new SMESH::Controls::Length();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aFunctor.reset( aNumFunctor );
|
||||||
aFunctor.reset( aControl );
|
|
||||||
myControlActor = my1DActor;
|
myControlActor = my1DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -662,57 +660,50 @@ void SMESH_ActorDef::SetControlMode(eControl theMode){
|
|||||||
break;
|
break;
|
||||||
case eArea:
|
case eArea:
|
||||||
{
|
{
|
||||||
SMESH::Controls::Area* aControl = new SMESH::Controls::Area();
|
aNumFunctor = new SMESH::Controls::Area();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aFunctor.reset( aNumFunctor );
|
||||||
aFunctor.reset( aControl );
|
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eTaper:
|
case eTaper:
|
||||||
{
|
{
|
||||||
SMESH::Controls::Taper* aControl = new SMESH::Controls::Taper();
|
aNumFunctor = new SMESH::Controls::Taper();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aFunctor.reset( aNumFunctor );
|
||||||
aFunctor.reset( aControl );
|
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eAspectRatio:
|
case eAspectRatio:
|
||||||
{
|
{
|
||||||
SMESH::Controls::AspectRatio* aControl = new SMESH::Controls::AspectRatio();
|
aNumFunctor = new SMESH::Controls::AspectRatio();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aFunctor.reset( aNumFunctor );
|
||||||
aFunctor.reset( aControl );
|
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eAspectRatio3D:
|
case eAspectRatio3D:
|
||||||
{
|
{
|
||||||
SMESH::Controls::AspectRatio3D* aControl = new SMESH::Controls::AspectRatio3D();
|
aNumFunctor = new SMESH::Controls::AspectRatio3D();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aFunctor.reset( aNumFunctor );
|
||||||
aFunctor.reset( aControl );
|
|
||||||
myControlActor = my3DActor;
|
myControlActor = my3DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eMinimumAngle:
|
case eMinimumAngle:
|
||||||
{
|
{
|
||||||
SMESH::Controls::MinimumAngle* aControl = new SMESH::Controls::MinimumAngle();
|
aNumFunctor = new SMESH::Controls::MinimumAngle();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aFunctor.reset( aNumFunctor );
|
||||||
aFunctor.reset( aControl );
|
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eWarping:
|
case eWarping:
|
||||||
{
|
{
|
||||||
SMESH::Controls::Warping* aControl = new SMESH::Controls::Warping();
|
aNumFunctor = new SMESH::Controls::Warping();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aFunctor.reset( aNumFunctor );
|
||||||
aFunctor.reset( aControl );
|
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eSkew:
|
case eSkew:
|
||||||
{
|
{
|
||||||
SMESH::Controls::Skew* aControl = new SMESH::Controls::Skew();
|
aNumFunctor = new SMESH::Controls::Skew();
|
||||||
aControl->SetPrecision( myControlsPrecision );
|
aFunctor.reset( aNumFunctor );
|
||||||
aFunctor.reset( aControl );
|
|
||||||
myControlActor = my2DActor;
|
myControlActor = my2DActor;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -720,6 +711,9 @@ void SMESH_ActorDef::SetControlMode(eControl theMode){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(aNumFunctor)
|
||||||
|
aNumFunctor->SetPrecision( myControlsPrecision );
|
||||||
|
|
||||||
vtkUnstructuredGrid* aGrid = myControlActor->GetUnstructuredGrid();
|
vtkUnstructuredGrid* aGrid = myControlActor->GetUnstructuredGrid();
|
||||||
vtkIdType aNbCells = aGrid->GetNumberOfCells();
|
vtkIdType aNbCells = aGrid->GetNumberOfCells();
|
||||||
if(aNbCells){
|
if(aNbCells){
|
||||||
|
Loading…
Reference in New Issue
Block a user