Salome HOME
Merge branch 'V8_5_asterstudy'
[modules/smesh.git] / doc / salome / examples / modifying_meshes_ex23.py
index a789b76f02a275de18425c824b75d2660d4c71d8..3db2c3e1246c38de83e02b6806bbe5b0a5c9745e 100644 (file)
@@ -1,10 +1,16 @@
 # Extrusion along a Path
 
 import math
+
 import salome
+salome.salome_init()
+import GEOM
+from salome.geom import geomBuilder
+geompy = geomBuilder.New(salome.myStudy)
 
-# Geometry
-import geompy
+import SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+smesh =  smeshBuilder.New(salome.myStudy)
 
 # 1. Create points
 points = [[0, 0], [50, 30], [50, 110], [0, 150], [-80, 150], [-130, 70], [-130, -20]]
@@ -36,7 +42,6 @@ for ii in range(len(Wire_polyline_edges)):
     pass
 
 # Mesh
-import smesh
 
 # Mesh the given shape with the given 1d hypothesis
 def Mesh1D(shape1d, nbSeg, name):
@@ -91,7 +96,7 @@ Edge_Circle_mesh   = Mesh1D(Edge_Circle  , 8, "Edge_Circle")
 # ExtrusionAlongPath
 # IDsOfElements, PathMesh, PathShape, NodeStart,
 # HasAngles, Angles, HasRefPoint, RefPoint
-refPoint = smesh.PointStruct(0, 0, 0)
+refPoint = SMESH.PointStruct(0, 0, 0)
 a10 = 10.0*math.pi/180.0
 a45 = 45.0*math.pi/180.0
 
@@ -123,4 +128,4 @@ error = quad_6.ExtrusionAlongPath(ff_6 , Edge_Circle_mesh, Edge_Circle, 1,
 error = quad_7.ExtrusionAlongPath(ff_7, Edge_Circle_mesh, Edge_Circle, 1,
                                   1, [a45, -a45, a45, -a45, a45, -a45, a45, -a45], 0, refPoint)
 
-salome.sg.updateObjBrowser(1)
+salome.sg.updateObjBrowser(True)