From c7953256845437afffda424307cd4ffd8c4b1bf7 Mon Sep 17 00:00:00 2001 From: mbs Date: Thu, 20 Jul 2023 14:24:26 +0100 Subject: [PATCH] fixed problem where 'Publish to GEOM' was not working --- products/patches/sbim_smodule-publish.patch | 77 +++++++++++++++++++++ products/sbim_smodule.pyconf | 1 + 2 files changed, 78 insertions(+) create mode 100644 products/patches/sbim_smodule-publish.patch diff --git a/products/patches/sbim_smodule-publish.patch b/products/patches/sbim_smodule-publish.patch new file mode 100644 index 0000000..6748853 --- /dev/null +++ b/products/patches/sbim_smodule-publish.patch @@ -0,0 +1,77 @@ +diff -ruN sbim_smodule-ORIG/doc/conf.py.in sbim_smodule/doc/conf.py.in +--- sbim_smodule-ORIG/doc/conf.py.in 2023-02-16 09:43:48.000000000 +0000 ++++ sbim_smodule/doc/conf.py.in 2023-07-20 11:23:41.343405103 +0100 +@@ -26,7 +26,7 @@ + # Project's author(s). + author = u'OPEN CASCADE' + # Project's copyright notice. +-copyright = u'2013-2018 %s' % author ++copyright = u'2013-2023 %s' % author + + # The version info for the project you're documenting, acts as replacement for + # |version| and |release|, also used in various other places throughout the +diff -ruN sbim_smodule-ORIG/src/BuildingIS/BuildingIS.cxx sbim_smodule/src/BuildingIS/BuildingIS.cxx +--- sbim_smodule-ORIG/src/BuildingIS/BuildingIS.cxx 2023-07-20 12:50:27.511511021 +0100 ++++ sbim_smodule/src/BuildingIS/BuildingIS.cxx 2023-07-20 12:55:35.399517285 +0100 +@@ -1,4 +1,4 @@ +-// Copyright (C) 2013-2018 OPEN CASCADE ++// Copyright (C) 2013-2023 OPEN CASCADE + // + // This library is free software; you can redistribute it and/or + // modify it under the terms of the GNU Lesser General Public +@@ -29,48 +29,21 @@ + #include CORBA_CLIENT_HEADER(SALOMEDS_Attributes) + #include CORBA_CLIENT_HEADER(GEOM_Gen) + +-#include +-#include + #include +-#include +-#include +- + #include + + namespace + { +- CORBA::ORB_var orb() +- { +- static CORBA::ORB_var _orb; +- if (CORBA::is_nil(_orb)) +- { +- ORB_INIT& init = *SINGLETON_::Instance(); +- _orb = init(); +- } +- return _orb; +- } +- +- SALOME_NamingService* namingService() +- { +- static SALOME_NamingService _ns(orb()); +- return &_ns; +- } +- +- SALOME_LifeCycleCORBA* lcc() +- { +- static SALOME_LifeCycleCORBA _lcc(namingService()); +- return &_lcc; +- } +- + GEOM::GEOM_Gen_var geomEngine() + { + static GEOM::GEOM_Gen_var _geomEngine; +- if (CORBA::is_nil(_geomEngine)) +- { +- Engines::EngineComponent_var cmp = lcc()->FindOrLoad_Component("FactoryServer", "GEOM"); +- _geomEngine = GEOM::GEOM_Gen::_narrow(cmp); +- } +- return _geomEngine; ++ if (CORBA::is_nil(_geomEngine)) ++ { ++ Engines::EngineComponent_var comp = KERNEL::getLifeCycleCORBA()->FindOrLoad_Component( "FactoryServer", "GEOM" ); ++ _geomEngine = GEOM::GEOM_Gen::_narrow( comp ); ++ ++ } ++ return _geomEngine; + } + + diff --git a/products/sbim_smodule.pyconf b/products/sbim_smodule.pyconf index 73c5ccb..386baa1 100644 --- a/products/sbim_smodule.pyconf +++ b/products/sbim_smodule.pyconf @@ -28,4 +28,5 @@ default : has_salome_gui : "yes" is_SALOME_module : "yes" } + patches : ['sbim_smodule.patch', 'sbim_smodule-publish.patch'] } -- 2.39.2