-// VISU OBJECT : interactive object for VISU entities implementation
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.cxx
// Author : Alexey PETROV
// Module : VISU
-
+//
#include "VISU_CutPlanesPL.hxx"
+#include "VISU_Convertor.hxx"
#include "VISU_Prs3dUtils.hh"
#include "VISU_CutPlanes_i.hh"
#include "VISU_Actor.h"
#include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
#ifdef _DEBUG_
static int MYDEBUG = 0;
static int MYDEBUG = 0;
#endif
+using namespace std;
//----------------------------------------------------------------------------
size_t
::CutPlanes_i(EPublishInStudyMode thePublishInStudyMode):
ColoredPrs3d_i(thePublishInStudyMode),
ScalarMap_i(thePublishInStudyMode),
- myCutPlanesPL(NULL)
-{}
+ myCutPlanesPL(NULL),
+ Deformation_i(this),
+ OptionalDeformation_i(this)
+{
+ if(MYDEBUG) MESSAGE("CutPlanes_i::CutPlanes_i()");
+}
//----------------------------------------------------------------------------
SetOrientation(VISU::CutPlanes::Orientation(VISU::Storable::FindValue(theMap,"myBasePlane").toInt()),
Storable::FindValue(theMap,"aRot[0]").toDouble(),
Storable::FindValue(theMap,"aRot[1]").toDouble());
- QStringList aPosList = QStringList::split("|",VISU::Storable::FindValue(theMap,"myPlanePosition") );
- QStringList aCondList = QStringList::split("|",VISU::Storable::FindValue(theMap,"myPlaneCondition") );
+ QStringList aPosList = VISU::Storable::FindValue(theMap,"myPlanePosition").split("|", QString::SkipEmptyParts );
+ QStringList aCondList = VISU::Storable::FindValue(theMap,"myPlaneCondition").split("|", QString::SkipEmptyParts );
for(int i = 0, iEnd = GetNbPlanes(); i < iEnd; i++)
if(aCondList[i].toInt() == 0)
SetPlanePosition(i,aPosList[i].toDouble());
+ OptionalDeformation_i::RestoreDeformation(theSObject,theMap);
+
return this;
}
aStrPos.append(QString::number(GetPlanePosition(i)) + "|");
aStrCon.append(QString::number(IsDefault(i)) + "|");
}
- Storable::DataToStream( theStr, "myPlanePosition", aStrPos.latin1());
- Storable::DataToStream( theStr, "myPlaneCondition", aStrCon.latin1());
+ Storable::DataToStream( theStr, "myPlanePosition", (const char*)aStrPos.toLatin1());
+ Storable::DataToStream( theStr, "myPlaneCondition", (const char*)aStrCon.toLatin1());
+ OptionalDeformation_i::DeformationToStream(theStr);
}
}else
myCutPlanesPL = dynamic_cast<VISU_CutPlanesPL*>(thePipeLine);
+ InitDeformedPipeLine(myCutPlanesPL);
TSuperClass::CreatePipeLine(myCutPlanesPL);
}
return NULL;
}
+void
+VISU::CutPlanes_i::
+SameAs(const Prs3d_i* theOrigin){
+ if(MYDEBUG) MESSAGE("CutPlanes_i::SameAs()");
+ TSuperClass::SameAs(theOrigin);
+ OptionalDeformation_i::SameAsDeformation(dynamic_cast<const Deformation_i*>(theOrigin));
+}