X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FVISU_I%2FVISU_DumpPython.cc;h=38b1318d8878861529af5be5a4018321eb5235c7;hb=e7e2c50aba46c639191ce54d4b42ae4587abb652;hp=f0567bfb25c02d2e465c87bb20f1d0c9617d2422;hpb=f83a4f96dd702720632b7392eba582b23799a3a1;p=modules%2Fvisu.git diff --git a/src/VISU_I/VISU_DumpPython.cc b/src/VISU_I/VISU_DumpPython.cc index f0567bfb..38b1318d 100644 --- a/src/VISU_I/VISU_DumpPython.cc +++ b/src/VISU_I/VISU_DumpPython.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// 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 @@ -19,6 +19,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // VISU OBJECT : interactive object for VISU entities implementation // File : VISU_DumpPython.cc // Author : Alexey PETROV @@ -49,7 +50,7 @@ #include "utilities.h" #include -#include +#include #include #include @@ -212,6 +213,51 @@ namespace VISU theServant->GetOffset(x,y,z); theStr<GetMarkerType(); + if( aMarkerType != VISU::MT_NONE ) { + if( aMarkerType != VISU::MT_USER ) { + VISU::MarkerScale aMarkerScale = theServant->GetMarkerScale(); + std::string aParam1, aParam2; + switch( aMarkerType ) { + case MT_POINT: aParam1 = "MT_POINT"; break; + case MT_PLUS: aParam1 = "MT_PLUS"; break; + case MT_STAR: aParam1 = "MT_STAR"; break; + case MT_O: aParam1 = "MT_O"; break; + case MT_X: aParam1 = "MT_X"; break; + case MT_O_POINT: aParam1 = "MT_O_POINT"; break; + case MT_O_PLUS: aParam1 = "MT_O_PLUS"; break; + case MT_O_STAR: aParam1 = "MT_O_STAR"; break; + case MT_O_X: aParam1 = "MT_O_X"; break; + case MT_POINT_SPRITE: aParam1 = "MT_POINT_SPRITE"; break; + default: aParam1 = "MT_NONE"; break; + } + switch( aMarkerScale ) { + case MS_10: aParam2 = "MS_10"; break; + case MS_15: aParam2 = "MS_15"; break; + case MS_20: aParam2 = "MS_20"; break; + case MS_25: aParam2 = "MS_25"; break; + case MS_30: aParam2 = "MS_30"; break; + case MS_35: aParam2 = "MS_35"; break; + case MS_40: aParam2 = "MS_40"; break; + case MS_45: aParam2 = "MS_45"; break; + case MS_50: aParam2 = "MS_50"; break; + case MS_55: aParam2 = "MS_55"; break; + case MS_60: aParam2 = "MS_60"; break; + case MS_65: aParam2 = "MS_65"; break; + case MS_70: aParam2 = "MS_70"; break; + default: aParam2 = "MS_NONE"; break; + } + if( aMarkerType == MT_POINT_SPRITE ) + aParam2 = "MS_NONE"; + theStr<GetMarkerTexture(); + if( aMarkerTexture >= 0 ) + theStr<GetNbRows(); // push values and their indices into streams - strstream values, rows, columns; + stringstream values, rows, columns; string comma = ""; for(CORBA::Long i = 1; i <= aNbColumns; i++){ for(CORBA::Long j = aNbRows; j > 0; j--){ @@ -930,7 +976,7 @@ namespace VISU } } // push titles and units into streams - strstream rowUnits, rowTitles, colTitles; + stringstream rowUnits, rowTitles, colTitles; SALOMEDS::StringSeq_var aRowUnits = theTableAttr->GetRowUnits(); SALOMEDS::StringSeq_var aRowTitles = theTableAttr->GetRowTitles(); comma = ""; @@ -1518,16 +1564,21 @@ namespace VISU if(Curve_i* aServant = dynamic_cast(GetServant(anObj).in())) { bool withZ = aServant->GetZRow()>0; + bool isV2 = aServant->GetIsV2(); theStr << thePrefix << "aName2ObjectMap['" << aName << "'] = visu.CreateCurve"; - if( withZ ) + if( isV2 ) + theStr << "WithZExt"; + else if( withZ ) theStr << "WithZ"; theStr << "(" << theArgumentName<< // table - ", "<GetHRow()<< // H row - ", "<GetVRow(); // V row - if( withZ ) + ", "<GetHRow()<< // H row + ", "<GetVRow(); // V row + if( withZ || isV2 ) theStr << ", " << aServant->GetZRow(); // Z row + if( isV2 ) + theStr << ", " << aServant->GetIsV2(); // right axis theStr << ", '"<GetTitle()<<"'"; // title SALOMEDS::Color aColor = aServant->GetColor(); @@ -1662,8 +1713,17 @@ namespace VISU if (aTypeName == "ImportTables") { QString aFileName = VISU::Storable::FindValue(aMap,"myFileName",&anIsExist); if(anIsExist){ - std::string aName = GenerateName(theSObject,theName2EntryMap,theEntry2NameMap); - theStr<StudyId()); + if(anIter == theMarkerMap.end()) + return; + + theStr<second; + VTK::MarkerMap::const_iterator aMarkerIter = aMarkerMap.begin(); + for(; aMarkerIter != aMarkerMap.end(); aMarkerIter++) { + int aMarkerId = aMarkerIter->first; + std::string aMarkerTexture = aMarkerIter->second.first; + theStr<