+ default:
+ break;
+ }
+}
+
+//=================================================================================
+// function : getSourceObjects
+// purpose : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> TransformationGUI_MultiTranslationDlg::getSourceObjects()
+{
+ QList<GEOM::GeomObjPtr> res;
+ res << myBase << myVectorU << myVectorV;
+ return res;
+}
+
+//=================================================================================
+// function : restoreSubShapes
+// purpose :
+//=================================================================================
+void TransformationGUI_MultiTranslationDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
+{
+ if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
+ // we pass here the first operation argument (object) through the list of arguments
+ // because the rotation operation place its arguments in the data structure in another order,
+ // and we need to point the first argument directly
+ GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
+ anArgs->length(1);
+ anArgs[0] = myBase.copy();
+ getGeomEngine()->RestoreSubShapesSO(theSObject, anArgs,
+ /*theFindMethod=*/GEOM::FSM_MultiTransformed,
+ /*theInheritFirstArg=*/true,
+ mainFrame()->CheckBoxAddPrefix->isChecked());
+ }
+}
+
+//=================================================================================
+// function : createPathPreview
+// purpose :
+//=================================================================================
+void TransformationGUI_MultiTranslationDlg::createPathPreview ( GEOM::GEOM_Object_ptr thePath )
+{
+ if ( IsPreview() ) {
+ if (thePath->_is_nil()) return;
+ TopoDS_Shape aShape;
+ GEOMBase::GetShape( thePath, aShape, TopAbs_SHAPE );
+ TopoDS_Edge anEdge = TopoDS::Edge( aShape );
+ ShapeAnalysis_Edge aShapeAnal;
+ TopoDS_Vertex aFirst = aShapeAnal.FirstVertex( anEdge );
+ TopoDS_Vertex aLast = aShapeAnal.LastVertex( anEdge );
+ if ( BRep_Tool::Pnt(aFirst).IsEqual( BRep_Tool::Pnt(aLast), Precision::Confusion() ) ) return;
+ TopoDS_Shape aVector = BRepBuilderAPI_MakeEdge(BRep_Tool::Pnt(aFirst), BRep_Tool::Pnt(aLast)).Shape();
+ const char* aName = "tmpVector";
+ Handle(GEOM_AISVector) anIO = new GEOM_AISVector( aVector, aName );
+
+ // add Prs to preview
+ SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
+ SOCC_Prs* aPrs = dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
+ if (aPrs)
+ aPrs->AddObject(anIO);
+ GEOMBase_Helper::displayPreview( aPrs, false, true );