From: eap Date: Fri, 22 Jan 2010 11:29:12 +0000 (+0000) Subject: 0020431: EDF 1020 SMESH : Radial Mesh of a cylinder X-Git-Tag: PARAVIS_29012010~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a1802ee5a4f5a476011a98dac3553d1b46a6b368;p=modules%2Fsmesh.git 0020431: EDF 1020 SMESH : Radial Mesh of a cylinder * Algorith behavior has changed - default hyps have appeared --- diff --git a/doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.doc b/doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.doc index 9f54f3eef..0854941ea 100644 --- a/doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.doc +++ b/doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.doc @@ -8,9 +8,16 @@ following conditions: the face must be a full circle or a part of circle The resulting mesh consists of triangles (near the center point) and quadrangles. -This algorithm requires the hypothesis indicating the number +This algorithm is optionally parametrized by the hypothesis indicating the number of mesh layers along the radius. The distribution of layers can be set with any 1D Hypothesis. +If no own hypothesis of the algorithm is assigned, any local or global hypothesis is used +by the algorithm to discretize edges. Note that if the geometrical face has two radial edges, +they must be meshed with equal number of segments. + +If no 1D hypothesis is assigned to an edge, "Default Number of Segments" preferences parameter +is used to discretize the edge. + \image html hypo_radquad_dlg.png \image html mesh_radquad_01.png "Radial Quadrangle 2D mesh on the top and the bottom faces of a cylinder" diff --git a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc index 04725fdc6..3780cd8d2 100644 --- a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc +++ b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc @@ -514,29 +514,36 @@ Mesh_1.Compute() \anchor tui_radial_quadrangle

Radial Quadrangle 1D2D example

\code -import salome -import geompy -import smesh -import StdMeshers +from smesh import * + +SetCurrentStudy(salome.myStudy) # Create face from the wire and add to study -WirePath = geompy.MakeSketcher("Sketcher:F 0 0:TT 20 0:R 90:C 20 90:WW", [0, 0, 0, 1, 0, 0, 0, 0, 1]) -Face = geompy.MakeFace(WirePath,1) +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 +geompy.addToStudyInFather(Face, radius1,"radius1") +geompy.addToStudyInFather(Face, radius2,"radius2") +geompy.addToStudyInFather(Face, circle,"circle") + -# Define geometry for mesh, and 1D parameters +# Define geometry for mesh, and Radial Quadrange algorithm mesh = smesh.Mesh(Face) -Wire_discretisation = mesh.Segment() -Nb_Segments = Wire_discretisation.NumberOfSegments(5) -Nb_Segments.SetDistrType( 0 ) +radial_Quad_algo = mesh.Quadrangle(algo=RADIAL_QUAD) -# Define 2D parameters and Radial Quadrange hypothesis -Number_of_Layers = smesh.CreateHypothesis('NumberOfLayers2D') -Number_of_Layers.SetNumberOfLayers( 4 ) -mesh.AddHypothesis(Number_of_Layers) -RadialQuadrangle_1D2D = smesh.CreateHypothesis('RadialQuadrangle_1D2D') -mesh.AddHypothesis(RadialQuadrangle_1D2D) +# The Radial Quadrange algorithm can work without any hypothesis +# 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. +# 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) +mesh.Compute() +# Define own parameters of Radial Quadrange algorithm +radial_Quad_algo.NumberOfLayers( 4 ) mesh.Compute() \endcode