<!-- ************************** Control (menubar) ************************************ -->
<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="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=""/>
+ <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="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="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="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=""/>
+ <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>
<!-- ************************** Entity (menubar) ************************************ -->
<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=""/>
<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="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=""/>
<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=""/>
<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=""/>
<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="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=""/>
<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=""/>
my3DActor->GetMapper()->SetScalarVisibility(false);
myScalarBarActor->SetVisibility(false);
- bool anIsScalarVisible = theMode > eNone;
-
- if(anIsScalarVisible){
+ if(theMode != eNone){
SMESH::Controls::FunctorPtr aFunctor;
+ SMESH::Controls::NumericalFunctor* aNumFunctor = NULL;
switch(theMode){
case eLength:
{
- SMESH::Controls::Length* aControl = new SMESH::Controls::Length();
- aControl->SetPrecision( myControlsPrecision );
- aFunctor.reset( aControl );
+ aNumFunctor = new SMESH::Controls::Length();
+ aFunctor.reset( aNumFunctor );
myControlActor = my1DActor;
break;
}
break;
case eArea:
{
- SMESH::Controls::Area* aControl = new SMESH::Controls::Area();
- aControl->SetPrecision( myControlsPrecision );
- aFunctor.reset( aControl );
+ aNumFunctor = new SMESH::Controls::Area();
+ aFunctor.reset( aNumFunctor );
myControlActor = my2DActor;
break;
}
case eTaper:
{
- SMESH::Controls::Taper* aControl = new SMESH::Controls::Taper();
- aControl->SetPrecision( myControlsPrecision );
- aFunctor.reset( aControl );
+ aNumFunctor = new SMESH::Controls::Taper();
+ aFunctor.reset( aNumFunctor );
myControlActor = my2DActor;
break;
}
case eAspectRatio:
{
- SMESH::Controls::AspectRatio* aControl = new SMESH::Controls::AspectRatio();
- aControl->SetPrecision( myControlsPrecision );
- aFunctor.reset( aControl );
+ aNumFunctor = new SMESH::Controls::AspectRatio();
+ aFunctor.reset( aNumFunctor );
myControlActor = my2DActor;
break;
}
case eAspectRatio3D:
{
- SMESH::Controls::AspectRatio3D* aControl = new SMESH::Controls::AspectRatio3D();
- aControl->SetPrecision( myControlsPrecision );
- aFunctor.reset( aControl );
+ aNumFunctor = new SMESH::Controls::AspectRatio3D();
+ aFunctor.reset( aNumFunctor );
myControlActor = my3DActor;
break;
}
case eMinimumAngle:
{
- SMESH::Controls::MinimumAngle* aControl = new SMESH::Controls::MinimumAngle();
- aControl->SetPrecision( myControlsPrecision );
- aFunctor.reset( aControl );
+ aNumFunctor = new SMESH::Controls::MinimumAngle();
+ aFunctor.reset( aNumFunctor );
myControlActor = my2DActor;
break;
}
case eWarping:
{
- SMESH::Controls::Warping* aControl = new SMESH::Controls::Warping();
- aControl->SetPrecision( myControlsPrecision );
- aFunctor.reset( aControl );
+ aNumFunctor = new SMESH::Controls::Warping();
+ aFunctor.reset( aNumFunctor );
myControlActor = my2DActor;
break;
}
case eSkew:
{
- SMESH::Controls::Skew* aControl = new SMESH::Controls::Skew();
- aControl->SetPrecision( myControlsPrecision );
- aFunctor.reset( aControl );
+ aNumFunctor = new SMESH::Controls::Skew();
+ aFunctor.reset( aNumFunctor );
myControlActor = my2DActor;
break;
}
return;
}
+ if(aNumFunctor)
+ aNumFunctor->SetPrecision( myControlsPrecision );
+
vtkUnstructuredGrid* aGrid = myControlActor->GetUnstructuredGrid();
vtkIdType aNbCells = aGrid->GetNumberOfCells();
if(aNbCells){