Salome HOME
Preferences
[modules/gui.git] / src / OCCViewer / OCCViewer_ViewModel.cxx
index 407de60139d39bcda6a05acb1181d667af12d61d..d8171544456f0452fd421dd1694e12ec168b1b21 100755 (executable)
@@ -407,16 +407,16 @@ void OCCViewer_Viewer::setTrihedronShown( const bool on )
     return;
 
   if ( on )
-    myAISContext->Erase( myTrihedron );
-  else
     myAISContext->Display( myTrihedron );
+  else
+    myAISContext->Erase( myTrihedron );
 }
 
 int OCCViewer_Viewer::trihedronSize() const
 {
   int sz = 0;
   if ( !myTrihedron.IsNull() )
-    sz = myTrihedron->Size();
+    sz = (int)myTrihedron->Size();
   return sz;
 }
 
@@ -425,3 +425,23 @@ void OCCViewer_Viewer::setTrihedronSize( const int sz )
   if ( !myTrihedron.IsNull() )
     myTrihedron->SetSize( sz );
 }
+
+void OCCViewer_Viewer::setIsos( const int u, const int v )
+{
+  Handle(AIS_InteractiveContext) ic = getAISContext();
+  if ( ic.IsNull() )
+  return;
+
+  ic->SetIsoNumber( u, AIS_TOI_IsoU );
+  ic->SetIsoNumber( u, AIS_TOI_IsoV );
+}
+
+void OCCViewer_Viewer::isos( int& u, int& v ) const
+{
+  Handle(AIS_InteractiveContext) ic = getAISContext();
+  if ( !ic.IsNull() )
+  {
+    u = ic->IsoNumber( AIS_TOI_IsoU );
+    v = ic->IsoNumber( AIS_TOI_IsoV );
+  }
+}