X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fdefining_hypotheses_ex07.py;h=a8a8e9fd2ef9041241ca9c921836f87fd4b4a952;hb=89b205395d338a1dab9d104d06f86757526365ef;hp=59d7521a274b657fe27481750ceff43f5ef9173f;hpb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef;p=modules%2Fsmesh.git diff --git a/doc/salome/examples/defining_hypotheses_ex07.py b/doc/salome/examples/defining_hypotheses_ex07.py index 59d7521a2..a8a8e9fd2 100644 --- a/doc/salome/examples/defining_hypotheses_ex07.py +++ b/doc/salome/examples/defining_hypotheses_ex07.py @@ -1,7 +1,14 @@ # Length from Edges -import geompy -import smesh +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New() + +import SMESH, SALOMEDS +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New() # create sketchers sketcher1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 70 0:TT 70 70:TT 0 70:WW") @@ -17,12 +24,13 @@ tria = smesh.Mesh(face1, "Face : triangle 2D mesh") # Define 1D meshing algo1D = tria.Segment() -algo1D.NumberOfSegments(2) +algo1D.LocalLength(3.) # create and assign the algorithm for 2D meshing with triangles algo2D = tria.Triangle() -# create and assign "LengthFromEdges" hypothesis to build triangles based on the length of the edges taken from the wire +# create and assign "LengthFromEdges" hypothesis to build triangles with +# linear size close to the length of the segments generated on the face wires (3.) algo2D.LengthFromEdges() # compute the mesh