Salome HOME
Update documentation for BLSurf size map feature
authornge <nge>
Fri, 29 May 2009 14:48:47 +0000 (14:48 +0000)
committernge <nge>
Fri, 29 May 2009 14:48:47 +0000 (14:48 +0000)
doc/salome/gui/SMESH/images/blsurf_parameters.png
doc/salome/gui/SMESH/images/blsurf_parameters_advanced.png
doc/salome/gui/SMESH/images/blsurf_parameters_sizemap.png [new file with mode: 0644]
doc/salome/gui/SMESH/input/blsurf_hypo.doc
doc/salome/gui/SMESH/input/tui_defining_blsurf_hypotheses.doc [new file with mode: 0644]

index 22d038ac596f9a4721aacd1067a367ddb1c593bf..cfafbc481785660cbda0a73d90770160a318896d 100644 (file)
Binary files a/doc/salome/gui/SMESH/images/blsurf_parameters.png and b/doc/salome/gui/SMESH/images/blsurf_parameters.png differ
index 0f2c07dc361f94c92a3c2419285ffb6ef8e1f8ac..d29ecc497464f9a0f3106eef1ae8c30009de54a7 100644 (file)
Binary files a/doc/salome/gui/SMESH/images/blsurf_parameters_advanced.png and b/doc/salome/gui/SMESH/images/blsurf_parameters_advanced.png differ
diff --git a/doc/salome/gui/SMESH/images/blsurf_parameters_sizemap.png b/doc/salome/gui/SMESH/images/blsurf_parameters_sizemap.png
new file mode 100644 (file)
index 0000000..0d87e66
Binary files /dev/null and b/doc/salome/gui/SMESH/images/blsurf_parameters_sizemap.png differ
index b392f3b72d0dd9a841984ed6df9c299b8840da12..ecbd5a74f0db34bed0bd3615846d91b855fb77da 100644 (file)
@@ -11,9 +11,13 @@ algorithm. This algorithm is a commercial software.
 <li><b>Name</b> - allows defining the name of the hypothesis (BLSURF
 Parameters_n by default).</li>
 
-<li><b>Physical Mesh</b> - if set to "Custom", allows user input in te
+<li><b>Physical Mesh</b> - can be set to None, Custom or Size Map
+ <ul>
+  <li>if set to "Custom", allows user input in the
 in <b>User size</b>, <b>Max Physical Size</b> and <b>Min Physical
-Size</b> fields.
+Size</b> fields.</li>
+  <li>if set to "Size Map", behaves like "Custom" mode and takes into account the custom elements sizes given in the Size Map tab.</li>
+</ul>
 </li>
 
 <li><b>User size</b> - defines the size of the generated mesh elements. </li>
@@ -99,6 +103,7 @@ slightly faster but generates less regular meshes. </li>
 </ul>
 Default is 0.</li>
 
+\anchor blsurf_hinterpol_flag
 <li>\b hinterpol_flag (integer) - determines the computation of an
 interpolated value <i>v</i> between two points <i>P1</i> and <i>P2</i> on a
 curve. Let <i>h1</i> be the value at point <i>P1,</i> <i>h2</i> be the value at point
@@ -112,6 +117,7 @@ to</i> <i>P2</i> .
 </ul>
 Default is 0.</li>
 
+\anchor blsurf_hmean_flag
 <li>\b hmean_flag (integer) - determines the computation of the average of several
 values:<ul>
 <li>-1 - the minimum is computed.</li>
@@ -152,7 +158,7 @@ files. Default is 1.</li>
 \n
 The following advanced options are not documented and you can use them
 at your own risk.
-\n\n Interger variables:
+\n\n Integer variables:
 <ul>
 <li>    addsurf_ivertex</li>
 <li>    background     </li>
@@ -193,6 +199,31 @@ String variables:
 <li>    import_option  </li>  
 </ul>
 
+\image html blsurf_parameters_sizemap.png
+
+It is possible to define user sizes on faces, edges or verteces.
+<ul>
+<li>Those faces, edges and verteces must be sub-shapes (from explode command) of the meshed geometry object.</li>
+<li>Groups are currently not handled.</li>
+<li>Multi-selection is possible.</li>
+<li>The sizes are constant values.</li>
+</ul>
+
+<br><b>See Also</b> a sample TUI Script of the \ref tui_blsurf "creation of a BLSurf hypothesis", including size map.
+
+\anchor blsurf_sizemap_computation
+<h2>Computation of the physical size</h2>
+Here is the detail on the calculation of the size (from BLSurf documentation).
+\n
+The size is obtained by querying sizemap functions associated to the input CAD object for surfaces, curves and points.
+Each function can either return a value h (which is then trimmed between the two bounds hphymin and hphymax), or "no answer" (by not assigning a value to h), thus providing great flexibility in the specification of the sizes. The computation depends whether point P is internal to a surface, internal to a curve, or at the end of several curves:
+<ul>
+<li> If point P is internal to a surface, the CAD surface size function is queried. If no answer is returned, one interpolates with the values at the vertices of the discretized interface curves.</li>
+<li> If point P is internal to a curve, the CAD curve size function is queried first. If no answer is returned, the surface size function is queried for every adjacent surface and the mean value of the returned values is computed. If no answer is returned, sizes h1 and h2 at both ends of the curve are considered (see next item) and the interpolated value is computed.</li>
+<li> If point P is at the extremity of several curves, the CAD point size function is queried first. If no answer is returned, the curve size function is queried for every adjacent curve and the mean value of the returned values is computed. If no answer is returned, the surface size function is queried for every adjacent surface and the mean value of the returned values is computed. If there is still no answer returned, the default value hphydef is kept.</li>
+</ul>
+In order to compute the mean of several values, the arithmetic mean is used by default, but this can be modified by the parameter \ref blsurf_hmean_flag "hmean flag". In the same way, in order to interpolate two values, a linear interpolation is used by default, but this can be modified by \ref blsurf_hinterpol_flag "hinterpol flag".
+
 
 \n
 Currently BLSURF plugin has the following limitations.
diff --git a/doc/salome/gui/SMESH/input/tui_defining_blsurf_hypotheses.doc b/doc/salome/gui/SMESH/input/tui_defining_blsurf_hypotheses.doc
new file mode 100644 (file)
index 0000000..346e678
--- /dev/null
@@ -0,0 +1,48 @@
+/*!
+
+\page tui_defining_blsurf_hypotheses_page Defining Hypotheses for BLSurf Algorithm
+
+\anchor tui_blsurf
+<h2>Construction of Mesh using BLSurf algorithm</h2>
+
+\code
+import geompy
+import smesh
+import BLSURFPlugin
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(200., 200., 200.)
+geompy.addToStudy(box, "box")
+
+# get subshapes
+Face_1   = geompy.SubShapeAllSorted(box, geompy.ShapeType["FACE"])[0]
+Edge_1   = geompy.SubShapeAllSorted(box, geompy.ShapeType["EDGE"])[0]
+Vertex_1 = geompy.SubShapeAllSorted(box, geompy.ShapeType["VERTEX"])[0]
+
+# create a mesh on the box
+blsurfMesh = smesh.Mesh(box,"box: BLSurf mesh")
+
+# create a BLSurf algorithm for faces
+BLSURF = blsurfMesh.Triangle(algo=smesh.BLSURF)
+
+# get BLSurf algorithm hypothesis
+BLSURF_Parameters = BLSURF.Parameters()
+
+# set physical mesh to 2 = Size Map
+BLSURF_Parameters.SetPhysicalMesh( 2 )
+
+# set global mesh size
+BLSURF_Parameters.SetPhySize( 34.641 )
+
+# set size on Face_1
+BLSURF_Parameters.SetSizeMap(Face_1, 'def f(u,v): return 10' )
+# set size on Edge_1
+BLSURF_Parameters.SetSizeMap(Edge_1, 'def f(t): return 5' )
+# set size on Vertex_1
+BLSURF_Parameters.SetSizeMap(Vertex_1, 'def f(): return 2' )
+
+# compute the mesh
+blsurfMesh.Compute()
+\endcode
+
+*/
\ No newline at end of file