mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
Handling cas were shaperstudy is not avaialable for salome on demand
This commit is contained in:
parent
29136aef51
commit
2f85c8d0c4
@ -7821,13 +7821,24 @@ class ParallelMesh(Mesh):
|
|||||||
if not isinstance(geom, geomBuilder.GEOM._objref_GEOM_Object):
|
if not isinstance(geom, geomBuilder.GEOM._objref_GEOM_Object):
|
||||||
raise ValueError("geom argument must be a geometry")
|
raise ValueError("geom argument must be a geometry")
|
||||||
|
|
||||||
|
try:
|
||||||
import SHAPERSTUDY
|
import SHAPERSTUDY
|
||||||
import shaperBuilder
|
shaper_object = SHAPERSTUDY.SHAPERSTUDY_ORB._objref_SHAPER_Object
|
||||||
|
has_shaper = True
|
||||||
|
except ImportError:
|
||||||
|
shaper_object = int
|
||||||
|
has_shaper = False
|
||||||
|
|
||||||
# If we have a shaper object converting it into geom (temporary solution)
|
# If we have a shaper object converting it into geom (temporary solution)
|
||||||
if isinstance(geom, SHAPERSTUDY.SHAPERSTUDY_ORB._objref_SHAPER_Object):
|
if isinstance(geom, shaper_object):
|
||||||
self._geom_obj = _shaperstudy2geom(geompyD, geom)
|
geom_obj = _shaperstudy2geom(geompyD, geom)
|
||||||
|
elif isinstance(geom, geomBuilder.GEOM._objref_GEOM_Object):
|
||||||
|
geom_obj = geom
|
||||||
else:
|
else:
|
||||||
self._geom_obj = geom
|
msg= ""
|
||||||
|
if not has_shaper:
|
||||||
|
msg = "\nShaper was not compiled"
|
||||||
|
raise Exception("Could not handle geom format {}.{} ".format(type(geom), msg))
|
||||||
|
|
||||||
# Splitting geometry into one geom containing 1D and 2D elements and a
|
# Splitting geometry into one geom containing 1D and 2D elements and a
|
||||||
# list of 3D elements
|
# list of 3D elements
|
||||||
|
@ -23,7 +23,6 @@ import salome
|
|||||||
salome.salome_init_without_session()
|
salome.salome_init_without_session()
|
||||||
|
|
||||||
import GEOM
|
import GEOM
|
||||||
import SHAPERSTUDY
|
|
||||||
from salome.geom import geomBuilder
|
from salome.geom import geomBuilder
|
||||||
from salome.smesh import smeshBuilder
|
from salome.smesh import smeshBuilder
|
||||||
from salome.shaper import model
|
from salome.shaper import model
|
||||||
|
@ -23,7 +23,6 @@ import salome
|
|||||||
salome.salome_init_without_session()
|
salome.salome_init_without_session()
|
||||||
|
|
||||||
import GEOM
|
import GEOM
|
||||||
import SHAPERSTUDY
|
|
||||||
from salome.geom import geomBuilder
|
from salome.geom import geomBuilder
|
||||||
from salome.smesh import smeshBuilder
|
from salome.smesh import smeshBuilder
|
||||||
from salome.shaper import model
|
from salome.shaper import model
|
||||||
|
Loading…
Reference in New Issue
Block a user