Salome HOME
Merge from V5_1_4_BR (5_1_4rc2) 09/06/2010
[modules/smesh.git] / doc / salome / gui / SMESH / input / tui_defining_hypotheses.doc
index 3780cd8d2726ebdda8e665a91ff1fb537d71d7fa..1aa91d9d513a14841a1fb19ae7d1d3a24b3c9610 100644 (file)
@@ -536,7 +536,8 @@ radial_Quad_algo = mesh.Quadrangle(algo=RADIAL_QUAD)
 # In this case it uses "Default Nb of Segments" preferences parameter to discretize edges
 mesh.Compute()
 
-# The Radial Quadrange uses global or local 1d hypotheses if no its own hypotheses assigned.
+# The Radial Quadrange uses global or local 1d hypotheses if it does
+# not have its own hypotheses.
 # Define global hypotheses to discretize radial edges and a local one for circular edge
 global_Nb_Segments = mesh.Segment().NumberOfSegments(5)
 local_Nb_Segments  = mesh.Segment(circle).NumberOfSegments(10)
@@ -547,6 +548,36 @@ radial_Quad_algo.NumberOfLayers( 4 )
 mesh.Compute()
 \endcode
 
+\anchor tui_quadrangle_parameters
+<h2>Quadrangle Parameters example </h2>
+\code
+import geompy
+import smesh
+import StdMeshers
+
+# 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)
+
+# Create Quadrangle parameters and define the Base Vertex.
+Quadrangle_Parameters_1 = smesh.CreateHypothesis('QuadrangleParams')
+Quadrangle_Parameters_1.SetTriaVertex( 8 )
+
+# Define 1D hypothesis and cmpute the mesh
+Regular_1D = Mesh_1.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
+Nb_Segments_1.SetDistrType( 0 )
+status = Mesh_1.AddHypothesis(Quadrangle_Parameters_1)
+Quadrangle_2D = Mesh_1.Quadrangle()
+Mesh_1.Compute()
+\endcode
 
 \n Other meshing algorithms: