From 4a2c77515c262f201d74f2bf49a36afb47161edf Mon Sep 17 00:00:00 2001 From: jfa Date: Fri, 16 Oct 2020 13:41:08 +0300 Subject: [PATCH] bos #20087: [CEA 20080] spacing value constraint not taken into account in Body fitting hypothesis construction. --- doc/salome/gui/SMESH/input/cartesian_algo.rst | 2 ++ src/SMESH_SWIG/StdMeshersBuilder.py | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/doc/salome/gui/SMESH/input/cartesian_algo.rst b/doc/salome/gui/SMESH/input/cartesian_algo.rst index 345872871..76b150e7e 100644 --- a/doc/salome/gui/SMESH/input/cartesian_algo.rst +++ b/doc/salome/gui/SMESH/input/cartesian_algo.rst @@ -59,6 +59,8 @@ This dialog allows to define * You can specify the **Coordinates** of grid nodes. **Insert** button inserts a node at **Step** distance (negative or positive) from the selected node. **Delete** button removes the selected node. Double click on a coordinate in the list enables its edition. **Note** that node coordinates are measured along directions of axes that can differ from the directions of the Global Coordinate System. * You can define the **Spacing** of a grid as an algebraic formula *f(t)* where *t* is a position along a grid axis normalized at [0.0,1.0]. *f(t)* must be non-negative at 0. <= *t* <= 1. The whole extent of geometry can be divided into ranges with their own spacing formulas to apply; a t varies between 0.0 and 1.0 within each **Range**. **Insert** button divides a selected range into two. **Delete** button adds the selected sub-range to the previous one. Double click on a range in the list enables edition of its right boundary. Double click on a function in the list enables its edition. + +.. note:: The actual grid spacing can slightly differ from the defined one. This is done for the best fitting of polyhedrons and for a better mesh quality on the interval boundaries. For example, if a constant **Spacing** is defined along an axis, the actual grid will fill the shape's dimension L along this axis with round number of equal cells: Spacing_actual = L / round( L / Spacing_defined ). * **Fixed Point** group allows defining an exact location of a grid node in the direction defined by spacing. The following cases are possible: diff --git a/src/SMESH_SWIG/StdMeshersBuilder.py b/src/SMESH_SWIG/StdMeshersBuilder.py index 0759332e9..c2f0ed0aa 100644 --- a/src/SMESH_SWIG/StdMeshersBuilder.py +++ b/src/SMESH_SWIG/StdMeshersBuilder.py @@ -1900,6 +1900,12 @@ class StdMeshersBuilder_Cartesian_3D(Mesh_Algorithm): points dividing the whole shape into ranges where the functions apply; points coordinates should vary within (0.0, 1.0) range. Parameter *t* of the spacing function f(t) varies from 0.0 to 1.0 within a shape range. + Note: + The actual grid spacing can slightly differ from the defined one. This is done for the + best fitting of polyhedrons and for a better mesh quality on the interval boundaries. + For example, if a constant **Spacing** is defined along an axis, the actual grid will + fill the shape's dimension L along this axis with round number of equal cells: + Spacing_actual = L / round( L / Spacing_defined ). Examples: "10.5" - defines a grid with a constant spacing -- 2.39.2