]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
First SMESH/GEOM case OK without external Server connection agy/archi2_0
authorAnthony Geay <anthony.geay@edf.fr>
Sat, 16 Jan 2021 04:58:47 +0000 (05:58 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Sat, 16 Jan 2021 04:58:47 +0000 (05:58 +0100)
src/SMESH_I/CMakeLists.txt
src/SMESH_I/SMESH_Gen_i_1.cxx
src/SMESH_SWIG/smeshBuilder.py

index 1807b7dac074ba722d061580732adc072eb42c8e..762f2d134f044e576678635aa5a3e1ea6fb5898a 100644 (file)
@@ -71,6 +71,7 @@ SET(_link_LIBRARIES
   ${KERNEL_SALOMELocalTrace}
   ${KERNEL_SalomeKernelHelpers}
   ${KERNEL_SalomeDS}
+  ${KERNEL_SalomeCatalog}
   ${OpenCASCADE_ApplicationFramework_LIBRARIES}
   ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
   ${GEOM_GEOMClient}
index b7e0421256f4ee578200563202aab74f5dee38d3..a2577de8bfe8428074df27ed729c3049ec4deca4 100644 (file)
@@ -41,7 +41,8 @@
 #include <SALOMEDS_wrap.hxx>
 #include <SALOMEDS_Attributes_wrap.hxx>
 #include "SALOMEDS_Study_i.hxx"
-#include <SALOME_KernelServices.hxx>
+#include "SALOME_KernelServices.hxx"
+#include "SALOME_ModuleCatalog_impl.hxx"
 
 #include <TCollection_AsciiString.hxx>
 #include <TopoDS_Solid.hxx>
@@ -588,8 +589,7 @@ SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent()
 
   // If component for this SMESH engine does not exist in the study, create it
 
-  SALOME_ModuleCatalog::ModuleCatalog_var aCat =
-    SALOME_ModuleCatalog::ModuleCatalog::_narrow( GetNS()->Resolve("/Kernel/ModulCatalog") );
+  SALOME_ModuleCatalog::ModuleCatalog_var aCat = KERNEL::getModuleComponentServantSA();
   if ( CORBA::is_nil( aCat ) )
     return father._retn();
 
index 98c1f3e3b8959c6bc2d79d6adc9ea63b21ac3bcf..d2f8088402e20ed6c5b47377dd71ba85ca4e33dd 100644 (file)
@@ -620,7 +620,9 @@ class smeshBuilder( SMESH._objref_SMESH_Gen, object ):
             obj = obj.GetMesh()
         elif isinstance( obj, Mesh_Algorithm ):
             obj = obj.GetAlgorithm()
-        ior  = salome.orb.object_to_string(obj)
+        import CORBA
+        orb=CORBA.ORB_init([''])
+        ior  = orb.object_to_string(obj)
         SMESH._objref_SMESH_Gen.SetName(self, ior, name)
 
     def SetEmbeddedMode( self,theMode ):
@@ -1962,9 +1964,10 @@ class Mesh(metaclass = MeshMeta):
                 print(msg)
                 print(allReasons)
             pass
-        if salome.sg.hasDesktop():
-            if not isinstance( refresh, list): # not a call from subMesh.Compute()
-                if refresh: salome.sg.updateObjBrowser()
+        if salome.sg:
+            if salome.sg.hasDesktop():
+                if not isinstance( refresh, list): # not a call from subMesh.Compute()
+                    if refresh: salome.sg.updateObjBrowser()
 
         return ok