X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fdefining_hypotheses_ex13.py;h=339cd200d4e62d56127d5036b2838726dbfdb5b8;hb=20d9e162bd67182cbfa841bbfc9319919f4703e3;hp=28398491684267fd266632e56cea9f725fa3f496;hpb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef;p=modules%2Fsmesh.git diff --git a/doc/salome/examples/defining_hypotheses_ex13.py b/doc/salome/examples/defining_hypotheses_ex13.py index 283984916..339cd200d 100644 --- a/doc/salome/examples/defining_hypotheses_ex13.py +++ b/doc/salome/examples/defining_hypotheses_ex13.py @@ -1,14 +1,19 @@ -# Radial Quadrangle 1D2D example +# Radial Quadrangle 1D-2D example -from smesh import * +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) -SetCurrentStudy(salome.myStudy) +import SMESH, SALOMEDS +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New(salome.myStudy) # Create face from the wire and add to study Face = geompy.MakeSketcher("Sketcher:F 0 0:TT 20 0:R 90:C 20 90:WF", [0, 0, 0, 1, 0, 0, 0, 0, 1]) geompy.addToStudy(Face,"Face") -edges = geompy.SubShapeAllSorted(Face, geompy.ShapeType["EDGE"]) -circle, radius1, radius2 = edges +circle, radius1, radius2 = geompy.SubShapeAllSorted(Face, geompy.ShapeType["EDGE"]) geompy.addToStudyInFather(Face, radius1,"radius1") geompy.addToStudyInFather(Face, radius2,"radius2") geompy.addToStudyInFather(Face, circle,"circle") @@ -16,7 +21,7 @@ geompy.addToStudyInFather(Face, circle,"circle") # Define geometry for mesh, and Radial Quadrange algorithm mesh = smesh.Mesh(Face) -radial_Quad_algo = mesh.Quadrangle(algo=RADIAL_QUAD) +radial_Quad_algo = mesh.Quadrangle(algo=smeshBuilder.RADIAL_QUAD) # The Radial Quadrange algorithm can work without any hypothesis # In this case it uses "Default Nb of Segments" preferences parameter to discretize edges