Salome HOME
projects
/
modules
/
geom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CMake porting.
[modules/geom.git]
/
src
/
GEOM_PY
/
sketcher.py
diff --git
a/src/GEOM_PY/sketcher.py
b/src/GEOM_PY/sketcher.py
index 47210959a9ed98fac83ec0a08eb171ce6a50663f..cc6404bd85f9b1fd82ffd945e6a8249055d3baf9 100644
(file)
--- a/
src/GEOM_PY/sketcher.py
+++ b/
src/GEOM_PY/sketcher.py
@@
-38,7
+38,8
@@
Example::
wire = mysketcher.getGeomWire()
# Put it in the study
wire = mysketcher.getGeomWire()
# Put it in the study
- import geompy
+ from salome.geom import geomBuilder
+ geompy = geomBuilder.New(salome.myStudy)
geompy.addToStudy( wire, 'mysketch' )
Additionnal examples can be found as unit tests in the source code.
geompy.addToStudy( wire, 'mysketch' )
Additionnal examples can be found as unit tests in the source code.
@@
-46,10
+47,18
@@
Additionnal examples can be found as unit tests in the source code.
geompyEnable = True
try:
geompyEnable = True
try:
- import geompy
+ from salome.kernel.deprecation import is_called_by_sphinx
+ if not is_called_by_sphinx():
+ import salome
+ salome.salome_init()
+ import GEOM
+ from salome.geom import geomBuilder
+ geompy = geomBuilder.New(salome.myStudy)
+ pass
+ pass
except:
geompyEnable = False
except:
geompyEnable = False
-
+ pass
class Sketcher:
class Sketcher: