From: eap Date: Wed, 25 Dec 2013 14:05:14 +0000 (+0000) Subject: 22384: [CEA 831] New wire discretization hypothesis: geometric progression X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cf4c2d720952655c85653322b20d9c74f71831f2;p=modules%2Fsmesh.git 22384: [CEA 831] New wire discretization hypothesis: geometric progression --- diff --git a/doc/salome/examples/defining_hypotheses_ex01.py b/doc/salome/examples/defining_hypotheses_ex01.py index 4bb75c56b..1d5d281c8 100644 --- a/doc/salome/examples/defining_hypotheses_ex01.py +++ b/doc/salome/examples/defining_hypotheses_ex01.py @@ -1,12 +1,11 @@ -# Arithmetic 1D +# Arithmetic 1D and Geometric Progression import salome salome.salome_init() -import GEOM + from salome.geom import geomBuilder geompy = geomBuilder.New(salome.myStudy) -import SMESH, SALOMEDS from salome.smesh import smeshBuilder smesh = smeshBuilder.New(salome.myStudy) @@ -21,12 +20,20 @@ hexa = smesh.Mesh(box, "Box : hexahedrical mesh") algo1D = hexa.Segment() # optionally reverse node distribution on certain edges -allEdges = geompy.SubShapeAllSortedIDs( box, geompy.ShapeType["EDGE"]) +allEdges = geompy.SubShapeAllSorted( box, geompy.ShapeType["EDGE"]) reversedEdges = [ allEdges[0], allEdges[4] ] # define "Arithmetic1D" hypothesis to cut all edges in several segments with increasing arithmetic length algo1D.Arithmetic1D(1, 4, reversedEdges) +# define "Geometric Progression" hypothesis on one edge to cut this edge in segments with length increasing by 20% starting from 1 +gpAlgo = hexa.Segment( allEdges[1] ) +gpAlgo.GeometricProgression( 1, 1.2 ) + +# propagate distribution of nodes computed using "Geometric Progression" to parallel edges +gpAlgo.PropagationOfDistribution() + + # create a quadrangle 2D algorithm for faces hexa.Quadrangle() diff --git a/doc/salome/gui/SMESH/images/a-geometric1d.png b/doc/salome/gui/SMESH/images/a-geometric1d.png new file mode 100644 index 000000000..a60be94a4 Binary files /dev/null and b/doc/salome/gui/SMESH/images/a-geometric1d.png differ diff --git a/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc b/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc index 5deb1344a..08758992b 100644 --- a/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc +++ b/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc @@ -6,6 +6,7 @@