From 663d2b6a46db6ee7ff4a1754fc8cbab881d780c6 Mon Sep 17 00:00:00 2001 From: dmv Date: Tue, 3 Nov 2009 15:21:09 +0000 Subject: [PATCH] 0020310: EDF 997 SMESH : Tell the mesh to pass through different points --- .../gui/SMESH/input/1d_meshing_hypo.doc | 40 ++++++++++++------- .../SMESH/input/tui_defining_hypotheses.doc | 39 +++++++++++++++++- 2 files changed, 63 insertions(+), 16 deletions(-) diff --git a/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc b/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc index ab033b7ff..942d7d4b4 100644 --- a/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc +++ b/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc @@ -199,24 +199,34 @@ minimum and maximum value of this parameter. \anchor fixed_points_1d_anchor

Fixed points 1D hypothesis

-Fixed points 1D hypothesis allows spliting edges through a -set of points parametrized on the edge (from 1 to 0)and a number of segments for each -interval limited by the points. - -\image html hypo_fixedpnt_dlg.png - -It is possible to check in Same Nb. Segments for all intervals -option and to define one value for all intervals. - -The splitting direction is defined by the orientation of the +Fixed points 1D hypothesis allows to split edges into segments +using set of fixed points given by normalized parameters on edge and +set of numbers of segments for splitting each sub-segment between +fixed points. Optionally it is possible to set flag +Same Nb. Segments for all intervals and +only one value for mentioned number of segments. + +The direction of the splitting is defined by the orientation of the underlying geometrical edge. "Reverse Edges" list box allows to specify the edges for which the splitting should be made in the -direction opposite to their orientation. This list box is enabled only -if the geometrical object is selected for meshing. In this case it is -possible to select the edges to be reversed either directly picking them in -the 3D viewer or selecting the edges or groups of edges in the +direction opposing to their orientation. This list box is enabled only +if the geometry object is selected for the meshing. In this case the +user can select edges to be reversed either directly picking them in +the 3D viewer or by selecting the edges or groups of edges in the Object browser. -\image html mesh_fixedpnt.png "Example of a submesh on the edge built using Fixed points 1D hypothesis" +Using of this hypothesis for quadrangle face where main mesh is +created using Quadrangle(Mapping) and NumberOfSegments +hypothesises. Creation hypothesis FixedPoint_1D for submesh on +one edge: + +\image html hypo_fixedpnt_dlg.png + +Resulting 2D mesh: + +\image html mesh_fixedpnt.png + +See Also a sample TUI Script of a +\ref tui_fixed_points "Defining Fixed Points" hypothesis operation. */ diff --git a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc index 75b89370c..20e81f3b8 100644 --- a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc +++ b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc @@ -468,10 +468,47 @@ src_mesh.TranslateObject( src_mesh, MakeDirStruct( 210, 0, 0 ), Copy=False) \endcode +
+ +\anchor tui_fixed_points + +

1D Mesh with Fixed Points example

+ +\code +import salome +import geompy +import smesh +import StdMeshers + +# Create face and explode it on edges +face = geompy.MakeFaceHW(100, 100, 1) +edges = geompy.SubShapeAllSorted(face, geompy.ShapeType["EDGE"]) +geompy.addToStudy( face, "Face" ) + +# get the first edge from exploded result +edge1 = geompy.GetSubShapeID(face, edges[0]) + +# Define Mesh on previously created face +Mesh_1 = smesh.Mesh(face) + +# Create Fixed Point 1D hypothesis and define parameters +Fixed_points_1D_1 = smesh.CreateHypothesis('FixedPoints1D') +Fixed_points_1D_1.SetPoints( [ 1.1, 0.9, 0.5, 0.0, 0.5, -0.3 ] ) +Fixed_points_1D_1.SetNbSegments( [ 3, 1, 2 ] ) +Fixed_points_1D_1.SetReversedEdges( [edge1] ) + +# Add hypothesis to mesh and define 2D parameters +Mesh_1.AddHypothesis(Fixed_points_1D_1) +Regular_1D = Mesh_1.Segment() +Quadrangle_2D = Mesh_1.Quadrangle() +# Compute mesh +Mesh_1.Compute() +\endcode + + \n Other meshing algorithms: */ -- 2.39.2