]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
23034: EDF GEOM: Information after a transformation without copy
authoreap <eap@opencascade.com>
Fri, 24 Apr 2015 14:38:25 +0000 (17:38 +0300)
committereap <eap@opencascade.com>
Fri, 24 Apr 2015 14:38:25 +0000 (17:38 +0300)
IPAL52713: Wrong creation info for ProjectionOnCylinder object

idl/GEOM_Gen.idl
src/GEOM/GEOM_BaseObject.cxx
src/GEOM/GEOM_BaseObject.hxx
src/GEOMGUI/GEOMGUI_CreationInfoWdg.cxx
src/GEOMGUI/GEOMGUI_CreationInfoWdg.h
src/GEOMGUI/GeometryGUI.cxx
src/GEOMImpl/GEOMImpl_ProjectionDriver.cxx
src/GEOM_I/GEOM_BaseObject_i.cc
src/GEOM_I/GEOM_BaseObject_i.hh
src/GEOM_I/GEOM_Gen_i.cc
src/GEOM_SWIG/geomBuilder.py

index f63819e9755ff990d5514fa18c1c22f7830102e0..87a912edc3829cb0cbb0237637947422e9819efe 100644 (file)
@@ -226,6 +226,7 @@ module GEOM
     string     operationName;
     Parameters params;
   };
+  typedef sequence<CreationInformation> CreationInformationSeq;
 
   /*!
    * \brief Reporting on shape healing
@@ -348,7 +349,7 @@ module GEOM
     /*!
      * \brief Return name of operation and values of parameters used for object creation
      */
-    CreationInformation GetCreationInformation();
+    CreationInformationSeq GetCreationInformation();
   };
 
   //# GEOM_Object
index 6c56f0f7109dfbdd123f2776ff0cea15ad0fbe74..4b6745486733137ac764f6229899371a1c7493da 100644 (file)
@@ -493,18 +493,24 @@ Handle(TColStd_HSequenceOfTransient) GEOM_BaseObject::GetLastDependency()
  */
 //================================================================================
 
-Handle(TFunction_Driver) GEOM_BaseObject::GetCreationDriver()
+std::vector< Handle(TFunction_Driver)> GEOM_BaseObject::GetCreationDrivers()
 {
-  Handle(TFunction_Driver) aDriver;
+  std::vector< Handle(TFunction_Driver)> aDriverVec;
 
-  Handle(GEOM_Function) function = GetFunction(1);
-  if ( !function.IsNull() )
+  for ( int i = 1, nb = GetNbFunctions(); i <= nb; ++i )
   {
-    Standard_GUID aGUID = function->GetDriverGUID();
-    if ( TFunction_DriverTable::Get()->FindDriver(aGUID, aDriver))
-      aDriver->Init( function->GetEntry() );
+    Handle(GEOM_Function) function = GetFunction(i);
+    if ( !function.IsNull() )
+    {
+      Standard_GUID aGUID = function->GetDriverGUID();
+      aDriverVec.push_back( Handle(TFunction_Driver )() );
+      if ( TFunction_DriverTable::Get()->FindDriver(aGUID, aDriverVec.back() ))
+        aDriverVec.back()->Init( function->GetEntry() );
+      else
+        aDriverVec.pop_back();
+    }
   }
-  return aDriver;
+  return aDriverVec;
 }
 
 //=============================================================================
index 83388851f855902f134c7c3f1291ee643b570447..28b9a40e0c53c41c95e4b7e3b767c952a1349d34 100644 (file)
@@ -31,6 +31,8 @@
 #include <TDF_Label.hxx>
 #include <TDataStd_TreeNode.hxx>
 
+#include <vector>
+
 class GEOM_BaseObject;
 class Handle(TFunction_Driver);
 class GEOM_Engine;
@@ -146,8 +148,8 @@ public:
   //Returns the dependencies of the last function
   Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetLastDependency();
 
-  //Returns a driver creator of this object
-  Standard_EXPORT Handle(TFunction_Driver) GetCreationDriver();
+  //Returns drivers creators of this object
+  Standard_EXPORT std::vector< Handle(TFunction_Driver)> GetCreationDrivers();
 
   //###########################################################
   // Internal methods
index 88f76b7d8ae6374df341093e285703f311fc67a2..f77dc535c299c2529f689afb05d5233be2409c1e 100644 (file)
 // Author    : Edward AGAPOV (eap)
 
 #include "GEOMGUI_CreationInfoWdg.h"
+#include "GEOMImpl_Types.hxx"
 
-#include <SalomeApp_Application.h>
 #include <SUIT_Desktop.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+#include <SalomeApp_Application.h>
 
 #include <QString>
 #include <QLabel>
@@ -38,33 +42,16 @@ GEOMGUI_CreationInfoWdg::GEOMGUI_CreationInfoWdg( SalomeApp_Application* app )
 //:QWidget( app->desktop() )
 {
   setWindowTitle( tr( "CREATION_INFO_TITLE" ) );
-  setObjectName( "geomCreationInformation" );
-
-  QFrame* frame = new QFrame( this );
-
-  QVBoxLayout* myLayout = new QVBoxLayout( this );
-  myLayout->addWidget( frame );
-  myLayout->setMargin(0);
 
-  QGroupBox* operationGB = new QGroupBox( tr( "OPERATION" ), frame );
-
-  myIconLbl      = new QLabel( operationGB );
-  myOperaionLnEd = new QLineEdit( operationGB );
-  myOperaionLnEd->setReadOnly( true );
-  myParamsTreeWd = new QTreeWidget( frame );
+  myParamsTreeWd = new QTreeWidget( this );
   myParamsTreeWd->setColumnCount( 2 );
   myParamsTreeWd->setHeaderLabels( QStringList() << tr( "PARAMETER" ) << tr( "VALUE" ) );
   myParamsTreeWd->header()->setStretchLastSection( true );
   myParamsTreeWd->header()->setResizeMode( 0, QHeaderView::ResizeToContents );
 
-  QHBoxLayout* operationLay = new QHBoxLayout( operationGB );
-  operationLay->addWidget( myIconLbl );
-  operationLay->addWidget( myOperaionLnEd );
-  operationLay->setMargin(5);
-
-  QVBoxLayout* aLayout = new QVBoxLayout( frame );
-  aLayout->addWidget( operationGB );
+  QVBoxLayout* aLayout = new QVBoxLayout( this );
   aLayout->addWidget( myParamsTreeWd );
+  aLayout->setMargin(11);
 
   // get a free dockable window id
   myWindowID = 10;
@@ -73,18 +60,25 @@ GEOMGUI_CreationInfoWdg::GEOMGUI_CreationInfoWdg( SalomeApp_Application* app )
   ++myWindowID; // pb when a GEOM is a sole module: CreationInfoWdg replaces Python console
 }
 
-void GEOMGUI_CreationInfoWdg::setOperation(const QPixmap& icon, const QString& name)
+QTreeWidgetItem* GEOMGUI_CreationInfoWdg::addOperation(const QPixmap& icon, const QString& name)
 {
-  myIconLbl->setPixmap( icon );
-  myOperaionLnEd->setText( name );
+  QTreeWidgetItem* item = new QTreeWidgetItem( myParamsTreeWd );
 
+  item->setIcon( 0, icon );
+  item->setText( 0, name );
   if ( name.isEmpty() )
-    myOperaionLnEd->setText( tr("NO_INFO"));
+    item->setText( 0, tr("NO_INFO"));
+
+  item->setExpanded( true );
+
+  return item;
 }
 
-void GEOMGUI_CreationInfoWdg::addParam (const QString& name, const QString& value)
+void GEOMGUI_CreationInfoWdg::addParam (QTreeWidgetItem* operation,
+                                        const QString&   name,
+                                        const QString&   value)
 {
-  QTreeWidgetItem* item = new QTreeWidgetItem( myParamsTreeWd );
+  QTreeWidgetItem* item = new QTreeWidgetItem( operation );
 
   //item->setFlags( Qt::NoItemFlags );
   item->setExpanded( true );
@@ -95,8 +89,6 @@ void GEOMGUI_CreationInfoWdg::addParam (const QString& name, const QString& valu
 
 void GEOMGUI_CreationInfoWdg::clear()
 {
-  myIconLbl->setPixmap( QPixmap() );
-  myOperaionLnEd->setText( "" );
   myParamsTreeWd->clear();
 }
 
@@ -104,3 +96,57 @@ GEOMGUI_CreationInfoWdg::~GEOMGUI_CreationInfoWdg()
 {
   //std::cout<<"~GEOMGUI_CreationInfoWdg"<<std::endl;
 }
+
+void GEOMGUI_CreationInfoWdg::setInfo( GEOM::CreationInformationSeq& info )
+{
+  clear();
+
+  QPixmap icon;
+  QString operationName;
+
+  try
+  {
+    if ( &info )
+    {
+      SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+      for ( int j = 0, nb = info.length(); j < nb; ++j )
+      {
+        QString name = info[j].operationName.in();
+        if ( !name.isEmpty() )
+        {
+          // get plugin_name if any
+          QString plugin_name;
+          for ( size_t i = 0; i < info[j].params.length(); ++i )
+          {
+            QString value = info[j].params[i].name.in();
+            if ( value == PLUGIN_NAME )
+              plugin_name = info[j].params[i].value.in();
+          }
+          // get icon
+          QString prefix = plugin_name.isEmpty() ? "GEOM" : plugin_name;
+          icon = resMgr->loadPixmap( prefix, tr( ("ICO_"+name).toLatin1().constData() ), false );
+
+          // translate operation name
+          operationName = tr( ("MEN_"+name).toLatin1().constData() );
+          if ( operationName.startsWith( "MEN_" ))
+            operationName = name; // no translation
+
+          QTreeWidgetItem* operation = addOperation( icon, operationName );
+
+          // add parameters
+          for ( size_t i = 0; i < info[j].params.length(); ++i )
+            addParam( operation,
+                      info[j].params[i].name.in(),
+                      info[j].params[i].value.in() );
+        }
+      }
+    }
+    else
+    {
+      addOperation( icon, operationName );
+    }
+  }
+  catch (...)
+  {
+  }
+}
index 923b5ea91c4988437046040efe6dd72f206ad7a6..de935e8f7c418322ce9fd33084e4d3d4b1495c09 100644 (file)
 
 #include "GEOM_GEOMGUI.hxx"
 
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(GEOM_Gen)
+
 #include <QWidget>
 
-class QString;
 class QLabel;
 class QLineEdit;
+class QString;
 class QTreeWidget;
+class QTreeWidgetItem;
 class SalomeApp_Application;
 
 /*!
@@ -46,16 +50,18 @@ class GEOMGUI_EXPORT GEOMGUI_CreationInfoWdg : public QWidget
   GEOMGUI_CreationInfoWdg( SalomeApp_Application* app );
   ~GEOMGUI_CreationInfoWdg();
 
-  int getWinID() { return myWindowID; }
-
+  void setInfo( GEOM::CreationInformationSeq& info );
   void clear();
-  void setOperation(const QPixmap& icon, const QString& name);
-  void addParam    (const QString& name, const QString& value);
+
+  int getWinID() { return myWindowID; }
 
  private:
 
-  QLabel*      myIconLbl;
-  QLineEdit*   myOperaionLnEd;
+  QTreeWidgetItem* addOperation(const QPixmap& icon, const QString& name);
+  void addParam (QTreeWidgetItem* operation, const QString& name, const QString& value);
+
+ QLabel*      myIconLbl;
+  //QLineEdit*   myOperaionLnEd;
   QTreeWidget* myParamsTreeWd;
   int          myWindowID;
 
index 790e65a7d8cab6f9dbc42f8202ee8a9a79d9a2df..e63305ce243b0d91c555810584182a2d90a83c0a 100644 (file)
@@ -1674,7 +1674,7 @@ void GeometryGUI::addPluginActions()
       // icon
       QPixmap icon;
       if ( !adata.icon.empty() )
-       icon = resMgr->loadPixmap( pdata.name.c_str(), adata.icon.c_str() );
+        icon = resMgr->loadPixmap( pdata.name.c_str(), adata.icon.c_str() );
       // menu text (path)
       QStringList smenus = QString( adata.menuText.c_str() ).split( "/" );
       QString actionName = smenus.last();
@@ -1691,30 +1691,30 @@ void GeometryGUI::addPluginActions()
       actionStat = actionStat.toUpper().prepend( "STB_" );
 
       createAction( id, // ~ adata.label
-                   tr( actionTool.toLatin1().constData() ),
-                   icon,
-                   tr( actionName.toLatin1().constData() ),
-                   tr( actionStat.toLatin1().constData() ),
-                   QKeySequence( tr( adata.accel.c_str() ) ),
-                   application()->desktop(),
-                   false /*toggle*/,
-                   this, SLOT( OnGUIEvent() ),
-                   QString() /*shortcutAction*/ );
+                    tr( actionTool.toLatin1().constData() ),
+                    icon,
+                    tr( actionName.toLatin1().constData() ),
+                    tr( actionStat.toLatin1().constData() ),
+                    QKeySequence( tr( adata.accel.c_str() ) ),
+                    application()->desktop(),
+                    false /*toggle*/,
+                    this, SLOT( OnGUIEvent() ),
+                    QString() /*shortcutAction*/ );
       
       int menuId = -1;
       foreach ( QString subMenu, smenus ) {
-       QStringList subMenuList = subMenu.split( ":" );
-       QString subMenuName = subMenuList[0].toUpper().prepend( "MEN_" );
-       int subMenuGroup = subMenuList.size() > 1 ? subMenuList[1].toInt() : -1;
-       menuId = createMenu( tr( subMenuName.toLatin1().constData() ), menuId, -1, subMenuGroup );
+        QStringList subMenuList = subMenu.split( ":" );
+        QString subMenuName = subMenuList[0].toUpper().prepend( "MEN_" );
+        int subMenuGroup = subMenuList.size() > 1 ? subMenuList[1].toInt() : -1;
+        menuId = createMenu( tr( subMenuName.toLatin1().constData() ), menuId, -1, subMenuGroup );
       }
       createMenu( id, menuId, -1 );
       
       if ( !stools.isEmpty() ) {
-       QString subTool = stools[0];
-       subTool = subTool.toUpper().prepend( "TOOL_" );
-       int toolId = createTool( tr( subTool.toLatin1().constData() ) );
-       createTool(id, toolId);
+        QString subTool = stools[0];
+        subTool = subTool.toUpper().prepend( "TOOL_" );
+        int toolId = createTool( tr( subTool.toLatin1().constData() ) );
+        createTool(id, toolId);
       }
 
       // add action id to map
@@ -2015,38 +2015,15 @@ void GeometryGUI::updateCreationInfo()
   // pass creation info of geomObj to myCreationInfoWdg
 
   if ( myCreationInfoWdg ) {
-    QPixmap icon;
-    QString operationName;
-    myCreationInfoWdg->setOperation( icon, operationName );
 
+    GEOM::CreationInformationSeq_var info;
     try {
       OCC_CATCH_SIGNALS;
-      GEOM::CreationInformation_var info = geomObj->GetCreationInformation();
-      if ( &info.in() ) {
-        SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-        QString name = info->operationName.in();
-        if ( !name.isEmpty() ) {
-         
-         QString plugin_name;
-          for ( size_t i = 0; i < info->params.length(); ++i ) {
-            myCreationInfoWdg->addParam( info->params[i].name.in(),
-                                         info->params[i].value.in() );
-            QString value = info->params[i].name.in();
-           if( value == PLUGIN_NAME ) {
-             plugin_name = info->params[i].value.in();
-           }
-         }
-         QString prefix = plugin_name.isEmpty() ? "GEOM" : plugin_name;
-          icon = resMgr->loadPixmap( prefix, tr( ("ICO_"+name).toLatin1().constData() ), false );
-          operationName = tr( ("MEN_"+name).toLatin1().constData() );
-          if ( operationName.startsWith( "MEN_" ))
-            operationName = name; // no translation
-          myCreationInfoWdg->setOperation( icon, operationName );
-        }
-      }
+      info = geomObj->GetCreationInformation();
     }
     catch (...) {
     }
+    myCreationInfoWdg->setInfo( info );
   }
 }
 
@@ -2276,7 +2253,7 @@ void GeometryGUI::createPreferences()
                       LightApp_Preferences::Selector, "Geometry", "toplevel_dm" );
 
   int transparency = addPreference( tr( "PREF_TRANSPARENCY" ), genGroup,
-                                   LightApp_Preferences::IntSpin, "Geometry", "transparency" );
+                                    LightApp_Preferences::IntSpin, "Geometry", "transparency" );
 
   int defl = addPreference( tr( "PREF_DEFLECTION" ), genGroup,
                             LightApp_Preferences::DblSpin, "Geometry", "deflection_coeff" );
index d226969c88619e2cb3432b6e5d77d08e4ee745fe..0c34bc8c26570c689a3dc37fbcb9bb5dc3b0b483 100644 (file)
@@ -473,41 +473,43 @@ GetCreationInformation(std::string&             theOperationName,
 
   switch ( aType ) {
   case PROJECTION_COPY:
-    {
-      GEOMImpl_IMirror aCI( function );
+  {
+    GEOMImpl_IMirror aCI( function );
 
-      AddParam( theParams, "Source object", aCI.GetOriginal() );
-      AddParam( theParams, "Target face", aCI.GetPlane() );
-      break;
-    }
+    AddParam( theParams, "Source object", aCI.GetOriginal() );
+    AddParam( theParams, "Target face", aCI.GetPlane() );
+    break;
+  }
   case PROJECTION_ON_WIRE:
-    {
-      GEOMImpl_IProjection aProj (function);
+  {
+    GEOMImpl_IProjection aProj (function);
 
-      AddParam(theParams, "Point", aProj.GetPoint());
-      AddParam(theParams, "Shape", aProj.GetShape());
+    AddParam(theParams, "Point", aProj.GetPoint());
+    AddParam(theParams, "Shape", aProj.GetShape());
 
-      break;
-    }
+    break;
+  }
   case PROJECTION_ON_CYLINDER:
-    {
-      GEOMImpl_IProjOnCyl aProj (function);
-      const Standard_Real aLengthAngle = aProj.GetAngleLength();
+  {
+    theOperationName = "PROJ_ON_CYL";
 
-      AddParam(theParams, "Shape",        aProj.GetShape());
-      AddParam(theParams, "Radius",       aProj.GetRadius());
-      AddParam(theParams, "Start angle",  aProj.GetStartAngle());
+    GEOMImpl_IProjOnCyl aProj (function);
+    const Standard_Real aLengthAngle = aProj.GetAngleLength();
 
-      if (aLengthAngle >= 0.) {
-        AddParam(theParams, "Length angle", aLengthAngle);
-      }
+    AddParam(theParams, "Shape",        aProj.GetShape());
+    AddParam(theParams, "Radius",       aProj.GetRadius());
+    AddParam(theParams, "Start angle",  aProj.GetStartAngle());
 
-      break;
+    if (aLengthAngle >= 0.) {
+      AddParam(theParams, "Length angle", aLengthAngle);
     }
+
+    break;
+  }
   default:
     return false;
   }
-  
+
   return true;
 }
 
@@ -661,7 +663,7 @@ TopoDS_Shape GEOMImpl_ProjectionDriver::projectOnCylinder
       GEOMUtils::Handle(HTrsfCurve2d) aTrsfCurve =
         new GEOMUtils::HTrsfCurve2d(aCurve, aPar[0], aPar[1], aTrsf2d);
       Approx_Curve2d                  aConv (aTrsfCurve, aPar[0], aPar[1],
-                                                        aUResol, aVResol, GeomAbs_C1,
+                                                         aUResol, aVResol, GeomAbs_C1,
                                              9, 1000);
 
       if (!aConv.IsDone() && !aConv.HasResult()) {
index 5e77c3a45bc2a042bda6ba73aea74ee8011caeba..39e19b4272062f6521fe37e6f99b7ff95757848d 100644 (file)
@@ -268,50 +268,58 @@ char* GEOM_BaseObject_i::GetParameters()
  */
 //================================================================================
 
-GEOM::CreationInformation* GEOM_BaseObject_i::GetCreationInformation()
+GEOM::CreationInformationSeq* GEOM_BaseObject_i::GetCreationInformation()
 {
-  GEOM::CreationInformation_var info = new GEOM::CreationInformation;
+  GEOM::CreationInformationSeq_var info = new GEOM::CreationInformationSeq();
 
-  Handle(GEOM_BaseDriver) driver =
-    Handle(GEOM_BaseDriver)::DownCast( _impl->GetCreationDriver() );
-  if ( !driver.IsNull() )
+  std::vector< Handle(TFunction_Driver)> drivers = _impl->GetCreationDrivers();
+  info->length( drivers.size() );
+  int nbI = 0;
+  for ( size_t i = 0; i < drivers.size(); ++i )
   {
-    std::vector<GEOM_Param> params;
-    std::string             operationName;
-    try
+    Handle(GEOM_BaseDriver) driver = Handle(GEOM_BaseDriver)::DownCast( drivers[i] );
+    if ( !driver.IsNull() )
     {
-      OCC_CATCH_SIGNALS;
-      if ( driver->GetCreationInformation( operationName, params ))
+      std::vector<GEOM_Param> params;
+      std::string             operationName;
+      try
       {
-        info->operationName = operationName.c_str();
-        info->params.length( params.size() );
-        for ( size_t i = 0; i < params.size(); ++i )
+        OCC_CATCH_SIGNALS;
+        if ( driver->GetCreationInformation( operationName, params ))
         {
-          info->params[i].name  = params[i].name.c_str();
-          info->params[i].value = params[i].value.c_str();
+          info[nbI].operationName = operationName.c_str();
+          info[nbI].params.length( params.size() );
+          for ( size_t i = 0; i < params.size(); ++i )
+          {
+            info[nbI].params[i].name  = params[i].name.c_str();
+            info[nbI].params[i].value = params[i].value.c_str();
+          }
+          nbI++;
         }
-      }
 #ifdef _DEBUG_
-      if ( operationName.empty() )
-      {
-        cout << endl << endl << endl << "Warning: " << endl << "Dear developer!!!" << endl
-             << "  Consider implementing "
-             <<    typeid(*(driver.operator->())).name() << "::GetCreationInformation() " << endl
-             << "  for the case of operation which has created '" << GetName() << "' object" << endl
-             << "PLEEEEEEEASE" << endl
-             << "\tPLEEEEEEEASE" << endl
-             << "\t\tPLEEEEEEEASE" << endl
-             << "\t\t\tPLEEEEEEEASE" << endl
-             << "\t\t\t\tPLEEEEEEEASE" << endl;
-      }
+        if ( operationName.empty() )
+        {
+          cout << endl << endl << endl << "Warning: " << endl << "Dear developer!!!" << endl
+               << "  Consider implementing "
+               <<    typeid(*(driver.operator->())).name() << "::GetCreationInformation() " << endl
+               << "  for the case of operation which has created '" << GetName() << "' object" << endl
+               << "PLEEEEEEEASE" << endl
+               << "\tPLEEEEEEEASE" << endl
+               << "\t\tPLEEEEEEEASE" << endl
+               << "\t\t\tPLEEEEEEEASE" << endl
+               << "\t\t\t\tPLEEEEEEEASE" << endl;
+        }
 #endif
-    }
-    catch(...)
-    {
+      }
+      catch(...)
+      {
 #ifdef _DEBUG_
-      cout << "Ecxeption in GEOM_BaseObject_i::GetCreationInformation()" << endl;
+        cout << "Ecxeption in GEOM_BaseObject_i::GetCreationInformation()" << endl;
 #endif
+      }
     }
   }
+  info->length( nbI );
+
   return info._retn();
 }
index e7988fdf37a7d93765a3eefd9e7580a1932c5d0e..aeb291ca7e8c28f5a542716f8ef9845ec832f29e 100644 (file)
@@ -66,7 +66,7 @@ class GEOM_I_EXPORT GEOM_BaseObject_i : public virtual POA_GEOM::GEOM_BaseObject
 
   virtual char* GetParameters();
 
-  virtual GEOM::CreationInformation* GetCreationInformation();
+  virtual GEOM::CreationInformationSeq* GetCreationInformation();
 
   Handle(GEOM_BaseObject) GetImpl() { return _impl; }
 
index 3c6a97386e0bdcfd501b3419ecf1141d10138b82..7a824de3510f6afc92d178e0751668ad3bb9ced5 100755 (executable)
@@ -320,24 +320,25 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
     aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_LCS");
     aNamePrefix = "LocalCS_";
   }  else if ( mytype >= USER_TYPE_EX ) {
-      char buf[20];
-      sprintf( buf, "%d", aBaseObj->GetType() );
-      GEOM::CreationInformation_var info = aBaseObj->GetCreationInformation();
-      std::string plgId;
-      for ( size_t i = 0; i < info->params.length(); ++i ) {
-       std::string param_name = info->params[i].name.in();
-       std::string param_value = info->params[i].value.in();   
-       if( param_name == PLUGIN_NAME) {
-         plgId = param_value;
-         break;
-       }
-      }
-      if(plgId.length() > 0 ) {
-       plgId += "::";
+    char buf[20];
+    sprintf( buf, "%d", aBaseObj->GetType() );
+    GEOM::CreationInformationSeq_var infoSeq = aBaseObj->GetCreationInformation();
+    std::string plgId;
+    for ( size_t j = 0; j < infoSeq->length(); ++j )
+      for ( size_t i = 0; i < infoSeq[j].params.length(); ++i ) {
+       std::string param_name  = infoSeq[j].params[i].name.in();
+       std::string param_value = infoSeq[j].params[i].value.in();
+        if( param_name == PLUGIN_NAME) {
+          plgId = param_value;
+          break;
+        }
       }
-      plgId +="ICON_OBJBROWSER_"; 
-      plgId += buf;
-      aResultSO->SetAttrString("AttributePixMap",plgId.c_str());
+    if(plgId.length() > 0 ) {
+      plgId += "::";
+    }
+    plgId +="ICON_OBJBROWSER_";
+    plgId += buf;
+    aResultSO->SetAttrString("AttributePixMap",plgId.c_str());
   } else if ( mytype > USER_TYPE ) {
     char buf[20];
     sprintf( buf, "%d", aBaseObj->GetType() );
index 270c45b35a30841e3aed915bc6f742cb8a6a4a20..60304b9876779f448cff80d1516341fdbc2ba00c 100644 (file)
@@ -9161,7 +9161,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             self._autoPublish(anObj, theName, "projection")
             return anObj
 
-        ## Create a projection projection of the given point on a wire or an edge.
+        ## Create a projection of the given point on a wire or an edge.
         #  If there are no solutions or there are 2 or more solutions It throws an
         #  exception.
         #  @param thePoint the point to be projected.
@@ -9179,7 +9179,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         @ManageTransactions("TrsfOp")
         def MakeProjectionOnWire(self, thePoint, theWire, theName=None):
             """
-            Create a projection projection of the given point on a wire or an edge.
+            Create a projection of the given point on a wire or an edge.
             If there are no solutions or there are 2 or more solutions It throws an
             exception.