From: vsr Date: Fri, 6 Feb 2015 14:11:26 +0000 (+0300) Subject: 0022739: [CEA 812] Create source plug-in to display a GEOM object via CORBA X-Git-Tag: V7_6_0a1~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9293f5a3cf39a97010f7fc672d7f0a378584f0ae;p=modules%2Fparavis.git 0022739: [CEA 812] Create source plug-in to display a GEOM object via CORBA 0022740: [CEA 1250] Create source plug-in to display a SMESH object via CORBA Additional fix to work properly with study opened from HDF file --- diff --git a/src/Macro/ShowSalomeObject.py b/src/Macro/ShowSalomeObject.py index ba5433e7..cb0e8af7 100644 --- a/src/Macro/ShowSalomeObject.py +++ b/src/Macro/ShowSalomeObject.py @@ -39,13 +39,13 @@ from pvsimple import * selection = session.getSelection() for entry in selection: - obj = salome.myStudy.FindObjectID(entry).GetObject() + sobj = salome.myStudy.FindObjectID(entry) try: import GEOM - go = obj._narrow(GEOM.GEOM_Object) + from salome.geom import geomBuilder + geompy = geomBuilder.New(salome.myStudy) + go = sobj.GetObject()._narrow(GEOM.GEOM_Object) if go: - from salome.geom import geomBuilder - geompy = geomBuilder.New(salome.myStudy) tmpf = tempfile.NamedTemporaryFile(suffix='.vtk') fname = tmpf.name tmpf.close() @@ -62,10 +62,10 @@ for entry in selection: pass try: import SMESH - mo = obj._narrow(SMESH.SMESH_Mesh) + from salome.smesh import smeshBuilder + mesh = smeshBuilder.New(salome.myStudy) + mo = sobj.GetObject()._narrow(SMESH.SMESH_Mesh) if mo: - from salome.smesh import smeshBuilder - mesh = smeshBuilder.New(salome.myStudy) tmpf = tempfile.NamedTemporaryFile(suffix='.med') fname = tmpf.name tmpf.close() @@ -81,6 +81,3 @@ for entry in selection: # not mesh object pass pass - - -