From: vsr Date: Fri, 5 Nov 2010 21:35:57 +0000 (+0000) Subject: PAL20885 EDF 607 SMESH: Measure tools X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a05b2c6fcca450065cb7173005ef0f54346f9e64;p=modules%2Fsmesh.git PAL20885 EDF 607 SMESH: Measure tools Improve TUI of measurement operations Complete GUI/TUI documentation --- diff --git a/doc/salome/gui/SMESH/images/bnd_box.png b/doc/salome/gui/SMESH/images/bnd_box.png new file mode 100644 index 000000000..6761a76ff Binary files /dev/null and b/doc/salome/gui/SMESH/images/bnd_box.png differ diff --git a/doc/salome/gui/SMESH/images/bnd_box_preview.png b/doc/salome/gui/SMESH/images/bnd_box_preview.png new file mode 100644 index 000000000..902101cf3 Binary files /dev/null and b/doc/salome/gui/SMESH/images/bnd_box_preview.png differ diff --git a/doc/salome/gui/SMESH/images/min_distance.png b/doc/salome/gui/SMESH/images/min_distance.png new file mode 100644 index 000000000..765522e88 Binary files /dev/null and b/doc/salome/gui/SMESH/images/min_distance.png differ diff --git a/doc/salome/gui/SMESH/images/min_distance_preview.png b/doc/salome/gui/SMESH/images/min_distance_preview.png new file mode 100644 index 000000000..c5373d99f Binary files /dev/null and b/doc/salome/gui/SMESH/images/min_distance_preview.png differ diff --git a/doc/salome/gui/SMESH/input/index.doc b/doc/salome/gui/SMESH/input/index.doc index af0f76f16..18153355c 100644 --- a/doc/salome/gui/SMESH/input/index.doc +++ b/doc/salome/gui/SMESH/input/index.doc @@ -12,12 +12,13 @@ previously created or imported by the Geometry component;
  • \subpage viewing_meshes_overview_page "viewing created meshes" in the VTK viewer;
  • \subpage grouping_elements_page "creating groups of mesh elements";
  • -
  • applying to meshes \subpage quality_page "Quality Controls" , -allowing to highlight important elements: +
  • applying to meshes \subpage quality_page "Quality Controls", +allowing to highlight important elements;
  • filtering sub-sets of mesh entities (nodes elements) using -\subpage filters_page "Filters" functionality.
  • +\subpage filters_page "Filters" functionality;
  • \subpage modifying_meshes_page "modifying meshes" with a vast -array of dedicated operations.
  • +array of dedicated operations; +
  • different \subpage measurements_page "measurements" of the mesh objects;
  • easily setting parameters via the variables predefined in \subpage using_notebook_mesh_page "Salome notebook".
  • diff --git a/doc/salome/gui/SMESH/input/measurements.doc b/doc/salome/gui/SMESH/input/measurements.doc new file mode 100644 index 000000000..27894a49a --- /dev/null +++ b/doc/salome/gui/SMESH/input/measurements.doc @@ -0,0 +1,71 @@ +/*! + +\page measurements_page Measurements + +Mesh module provides possibility to perform different measurements +of the selected mesh data. + +All the measurement operations are available via \b Measurements +top-level menu. An access to the measurements operations is +implemented via single dialog box, where each operation is represented +as a separate tab page. + +\section min_distance_anchor Minimum Distance + +This operation allows measuring a distance between two objects. +Currently only node-to-node and node-to-origin operations are +available, but this operation will be extended in future to support +other mesh objects - elements, meshes, sub-meshes and groups. + +To start Minimum Distance operation, select Minimum Distance +item from \b Measurements menu. + +\image html min_distance.png + +In the dialog box choose the first target and second target mode by +switching the corresponding radio buttons, then select the objects +between which the distance is to be calculated (or enter directly IDs +in case of nodes/elements) and press \em Compute button. + +The following types of targets are supported: +- \em Node: single mesh node; +- \em Element: single mesh element (not available in this version); +- \em Object: mesh, sub-mesh or group object (not available in this +version); +- \em Origin: origin of the global co-ordinate system. + +The result will +be shown in the bottom area of the dialog box. In addition, the simple +preview will be shown in the 3D viewer. + +\image html min_distance_preview.png + +\section bounding_box_anchor Bounding Box + +This operation allows to calculate the bounding box of the selected +object(s). + +To start Bounding Box operation, select Bounding Box +item from \b Measurements menu. + +\image html bnd_box.png + +In the dialog box choose desired type of the object by switching the +corresponding radio button, select the desired object(s) and press +\em Compute button. + +The following types of input are available: +- \em Objects: select one or more mesh, sub-mesh, group objects; +- \em Nodes: select set of mesh nodes; +- \em Elements: select set of mesh elements. + +The result of calculation will be shown in the bottom area of the +dialog box. In addition, the simple preview will be shown in the 3D +viewer. + +\image html bnd_box_preview.png + +See Also a sample TUI Script of a +\ref tui_measurements_page "Measurement operations". + +*/ diff --git a/doc/salome/gui/SMESH/input/tui_measurements.doc b/doc/salome/gui/SMESH/input/tui_measurements.doc new file mode 100644 index 000000000..aabf0b317 --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_measurements.doc @@ -0,0 +1,84 @@ +/*! + +\page tui_measurements_page Measurements + +\section tui_min_distance Minimum Distance + +\code + +import smesh +from SMESH_mechanic import mesh as mesh1 +from SMESH_test1 import mesh as mesh2 + +mesh1.Compute() +mesh2.Compute() + +# compute min distance from mesh1 to the origin (not available yet) +smesh.MinDistance(mesh1) + +# compute min distance from node 10 of mesh1 to the origin +smesh.MinDistance(mesh1, id1=10) +# ... or +mesh1.MinDistance(10) + +# compute min distance between nodes 10 and 20 of mesh1 +smesh.MinDistance(mesh1, id1=10, id2=20) +# ... or +mesh1.MinDistance(10, 20) + +# compute min distance from element 100 of mesh1 to the origin (not available yet) +smesh.MinDistance(mesh1, id1=100, isElem1=True) +# ... or +mesh1.MinDistance(100, isElem1=True) + +# compute min distance between elements 100 and 200 of mesh1 (not available yet) +smesh.MinDistance(mesh1, id1=100, id2=200, isElem1=True, isElem2=True) +# ... or +mesh1.MinDistance(100, 200, True, True) + +# compute min distance from element 100 to node 20 of mesh1 (not available yet) +smesh.MinDistance(mesh1, id1=100, id2=20, isElem1=True) +# ... or +mesh1.MinDistance(100, 20, True) + +# compute min distance from mesh1 to mesh2 (not available yet) +smesh.MinDistance(mesh1, mesh2) + +# compute min distance from node 10 of mesh1 to node 20 of mesh2 +smesh.MinDistance(mesh1, mesh2, 10, 20) + +# compute min distance from node 10 of mesh1 to element 200 of mesh2 (not available yet) +smesh.MinDistance(mesh1, mesh2, 10, 200, isElem2=True) + +# etc... + +\endcode + +\section tui_bounding_box Bounding Box + +\code + +import smesh +from SMESH_mechanic import mesh as mesh1 +from SMESH_test1 import mesh as mesh2 + +mesh1.Compute() +mesh2.Compute() + +# compute bounding box for mesh1 +mesh1.BoundingBox() + +# compute bounding box for list of nodes of mesh1 +mesh1.BoundingBox([363, 364, 370, 371, 372, 373, 379, 380, 381]) + +# compute bounding box for list of elements of mesh1 +mesh1.BoundingBox([363, 364, 370, 371, 372, 373, 379, 380, 381], isElem=True) + +# compute common bounding box of mesh1 and mesh2 +smesh.BoundingBox([mesh1, mesh2]) + +# etc... + +\endcode + +*/