First SMESH/GEOM case OK without external Server connection

This commit is contained in:
Anthony Geay 2021-01-16 05:58:47 +01:00
parent 7911fd4a18
commit 498e1712b4
3 changed files with 11 additions and 7 deletions

View File

@ -71,6 +71,7 @@ SET(_link_LIBRARIES
${KERNEL_SALOMELocalTrace}
${KERNEL_SalomeKernelHelpers}
${KERNEL_SalomeDS}
${KERNEL_SalomeCatalog}
${OpenCASCADE_ApplicationFramework_LIBRARIES}
${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
${GEOM_GEOMClient}

View 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();

View 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