mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 17:00: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):
|
||||
raise ValueError("geom argument must be a geometry")
|
||||
|
||||
import SHAPERSTUDY
|
||||
import shaperBuilder
|
||||
try:
|
||||
import SHAPERSTUDY
|
||||
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 isinstance(geom, SHAPERSTUDY.SHAPERSTUDY_ORB._objref_SHAPER_Object):
|
||||
self._geom_obj = _shaperstudy2geom(geompyD, geom)
|
||||
if isinstance(geom, shaper_object):
|
||||
geom_obj = _shaperstudy2geom(geompyD, geom)
|
||||
elif isinstance(geom, geomBuilder.GEOM._objref_GEOM_Object):
|
||||
geom_obj = geom
|
||||
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
|
||||
# list of 3D elements
|
||||
|
@ -23,7 +23,6 @@ import salome
|
||||
salome.salome_init_without_session()
|
||||
|
||||
import GEOM
|
||||
import SHAPERSTUDY
|
||||
from salome.geom import geomBuilder
|
||||
from salome.smesh import smeshBuilder
|
||||
from salome.shaper import model
|
||||
|
@ -23,7 +23,6 @@ import salome
|
||||
salome.salome_init_without_session()
|
||||
|
||||
import GEOM
|
||||
import SHAPERSTUDY
|
||||
from salome.geom import geomBuilder
|
||||
from salome.smesh import smeshBuilder
|
||||
from salome.shaper import model
|
||||
|
Loading…
Reference in New Issue
Block a user