Salome HOME
Merge remote-tracking branch 'origin/cgt/devCEA'
authorClarisse Genrault <clarisse.genrault@cea.fr>
Wed, 23 Nov 2016 14:39:28 +0000 (15:39 +0100)
committerClarisse Genrault <clarisse.genrault@cea.fr>
Wed, 23 Nov 2016 14:39:28 +0000 (15:39 +0100)
src/PythonAPI/model/sketcher/__init__.py

index 7aa9934344907a8229d5091b0bcc5fc7edc7680f..2edb1d2264b1ad6910a33a6042a4c38c4d17ae61 100644 (file)
@@ -1,5 +1,20 @@
 """Package for Sketch plugin for the Parametric Geometry API of the Modeler.
 """
 
+# DEBIAN 6.0 WORKAROUND START
+"""
+  Following code is used to support Debian 6.0.
+  It is kept, because SketchPlugin should be loaded before SketchAPI is first used.
+  Otherwise, the runtime error will be generated while some static inline methods are broken.
+""" 
+from ModelAPI import *
+aSession = ModelAPI_Session.get()
+aDocument = aSession.moduleDocument()
+aSession.startOperation()
+aDocument.addFeature("Sketch")
+aSession.finishOperation()
+aSession.abortOperation()
+# DEBIAN 6.0 WORKAROUND FINISH
+
 from SketchAPI import addSketch
 from tools import addPolyline, addPolygon