X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fmodifying_meshes_ex23.py;h=3db2c3e1246c38de83e02b6806bbe5b0a5c9745e;hb=831b40eb011a5f2ad1738518e86fdc6d924f891d;hp=a789b76f02a275de18425c824b75d2660d4c71d8;hpb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef;p=modules%2Fsmesh.git diff --git a/doc/salome/examples/modifying_meshes_ex23.py b/doc/salome/examples/modifying_meshes_ex23.py index a789b76f0..3db2c3e12 100644 --- a/doc/salome/examples/modifying_meshes_ex23.py +++ b/doc/salome/examples/modifying_meshes_ex23.py @@ -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)