]> SALOME platform Git repositories - modules/smesh.git/blobdiff - doc/salome/examples/defining_hypotheses_ex14.py
Salome HOME
Merge from V6_main 11/02/2013
[modules/smesh.git] / doc / salome / examples / defining_hypotheses_ex14.py
diff --git a/doc/salome/examples/defining_hypotheses_ex14.py b/doc/salome/examples/defining_hypotheses_ex14.py
new file mode 100644 (file)
index 0000000..6c93e3d
--- /dev/null
@@ -0,0 +1,26 @@
+# Quadrangle Parameters example 1 (meshing a face with 3 edges)
+
+from smesh import *
+SetCurrentStudy(salome.myStudy)
+
+# Get 1/4 part from the disk face.
+Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100)
+Disk_1 = geompy.MakeDiskR(100, 1)
+Common_1 = geompy.MakeCommon(Disk_1, Box_1)
+geompy.addToStudy( Disk_1, "Disk_1" )
+geompy.addToStudy( Box_1, "Box_1" )
+geompy.addToStudy( Common_1, "Common_1" )
+
+# Set the Geometry for meshing
+Mesh_1 = smesh.Mesh(Common_1)
+
+
+# Define 1D hypothesis and compute the mesh
+Regular_1D = Mesh_1.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
+Nb_Segments_1.SetDistrType( 0 )
+
+# Create Quadrangle parameters and define the Base Vertex.
+Quadrangle_2D = Mesh_1.Quadrangle().TriangleVertex( 8 )
+
+Mesh_1.Compute()