From: admin Date: Thu, 8 Jun 2006 14:05:11 +0000 (+0000) Subject: This commit was generated by cvs2git to create branch 'WPdev'. X-Git-Tag: LAST_STABLE_VERSION_21_09_2006_ON_3_2_0~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=860d831343f1f1a42c4ff04fc3592c01150b03db;p=modules%2Fsmesh.git This commit was generated by cvs2git to create branch 'WPdev'. Cherrypick from master 2006-06-08 14:05:08 UTC jfa 'Warn about direct SMESH idl usage: smesh python package have to be used where it is possible.': SMESH_version.h.in adm_local/Makefile.in adm_local/unix/config_files/check_SMESH.m4 bin/VERSION.in doc/salome/gui/SMESH/adding_quadratic_nodes_and_elements.htm doc/salome/gui/SMESH/files/vtk_3d_viewer.htm doc/salome/gui/SMESH/image142.gif doc/salome/gui/SMESH/image143.gif doc/salome/gui/SMESH/image144.gif doc/salome/gui/SMESH/image145.gif doc/salome/gui/SMESH/image146.gif doc/salome/gui/SMESH/image147.gif doc/salome/gui/SMESH/image148.gif doc/salome/gui/SMESH/image15.jpg doc/salome/gui/SMESH/image151.gif doc/salome/gui/SMESH/image152.gif doc/salome/gui/SMESH/index.htm doc/salome/gui/SMESH/index_csh.htm doc/salome/gui/SMESH/index_rhc.htm doc/salome/gui/SMESH/merge_elements.htm doc/salome/gui/SMESH/mesh.htm doc/salome/gui/SMESH/pics/advanced_mesh_infos.png doc/salome/gui/SMESH/pics/aqt.png doc/salome/gui/SMESH/pics/automaticlength.png doc/salome/gui/SMESH/pics/createmesh-inv.png doc/salome/gui/SMESH/pics/createmesh-inv2.png doc/salome/gui/SMESH/pics/createmesh-inv3.png doc/salome/gui/SMESH/pics/distributionwithanalyticdensity.png doc/salome/gui/SMESH/pics/distributionwithtabledensity.png doc/salome/gui/SMESH/pics/graduatedaxes1.png doc/salome/gui/SMESH/pics/image100.gif doc/salome/gui/SMESH/pics/image102.gif doc/salome/gui/SMESH/pics/image107.gif doc/salome/gui/SMESH/pics/image108.gif doc/salome/gui/SMESH/pics/image109.gif doc/salome/gui/SMESH/pics/image138.gif doc/salome/gui/SMESH/pics/image139.gif doc/salome/gui/SMESH/pics/image21.gif doc/salome/gui/SMESH/pics/image23.gif doc/salome/gui/SMESH/pics/image27.gif doc/salome/gui/SMESH/pics/image77.gif doc/salome/gui/SMESH/pics/image78.gif doc/salome/gui/SMESH/pics/image89.gif doc/salome/gui/SMESH/pics/image91.gif doc/salome/gui/SMESH/pics/image96.gif doc/salome/gui/SMESH/pics/image97.gif doc/salome/gui/SMESH/pics/image98.gif doc/salome/gui/SMESH/pics/image99.gif doc/salome/gui/SMESH/pics/length-crit.png doc/salome/gui/SMESH/pics/mergeelems.png doc/salome/gui/SMESH/pics/meshexportmesh.png doc/salome/gui/SMESH/pics/meshimportmesh.png doc/salome/gui/SMESH/pics/meshtrianglemergeelem1.png doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh.html doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Algorithm.html doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Algorithm__inherit__graph.jpg doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Hexahedron.html doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Hexahedron__inherit__graph.jpg doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Netgen.html doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Netgen__inherit__graph.jpg doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Quadrangle.html doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Quadrangle__inherit__graph.jpg doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment.html doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment__Python.html doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment__Python__inherit__graph.jpg doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment__inherit__graph.jpg doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Tetrahedron.html doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Tetrahedron__inherit__graph.jpg doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Triangle.html doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Triangle__inherit__graph.jpg doc/salome/gui/SMESH/smeshpy_doc/doxygen.css doc/salome/gui/SMESH/smeshpy_doc/namespacesmesh.html doc/salome/gui/SMESH/volume.htm doc/salome/gui/SMESH/whd_dpns.htm doc/salome/gui/SMESH/whd_hide0.gif doc/salome/gui/SMESH/whd_hide1.gif doc/salome/gui/SMESH/whd_hide2.gif doc/salome/gui/SMESH/whd_next0.gif doc/salome/gui/SMESH/whd_next1.gif doc/salome/gui/SMESH/whd_next2.gif doc/salome/gui/SMESH/whd_nvp10.htm doc/salome/gui/SMESH/whd_nvp20.htm doc/salome/gui/SMESH/whd_prev0.gif doc/salome/gui/SMESH/whd_prev1.gif doc/salome/gui/SMESH/whd_prev2.gif doc/salome/gui/SMESH/whd_show0.gif doc/salome/gui/SMESH/whd_show1.gif doc/salome/gui/SMESH/whd_show2.gif doc/salome/gui/SMESH/whd_sync0.gif doc/salome/gui/SMESH/whd_sync1.gif doc/salome/gui/SMESH/whd_sync2.gif doc/salome/gui/SMESH/whd_tab0.gif doc/salome/gui/SMESH/whd_tab1.gif doc/salome/gui/SMESH/whd_tab2.gif doc/salome/gui/SMESH/whd_tab3.gif doc/salome/gui/SMESH/whd_tab4.gif doc/salome/gui/SMESH/whd_tab5.gif doc/salome/gui/SMESH/whd_tab6.gif doc/salome/gui/SMESH/whd_tab7.gif doc/salome/gui/SMESH/whd_tab8.gif doc/salome/gui/SMESH/whd_tabs.htm doc/salome/gui/SMESH/whd_toc1.gif doc/salome/gui/SMESH/whd_toc2.gif doc/salome/gui/SMESH/whd_toc3.gif doc/salome/gui/SMESH/whd_toc4.gif doc/salome/gui/SMESH/whd_topic.xml doc/salome/gui/SMESH/whd_wbsh0.gif doc/salome/gui/SMESH/whd_wbsh1.gif doc/salome/gui/SMESH/whd_wbsh2.gif doc/salome/gui/SMESH/whgdata/whlstf13.htm doc/salome/tui/SMESH/doxyfile.in doc/salome/tui/SMESH/doxyfile_py.in doc/salome/tui/SMESH/sources/footer.html doc/salome/tui/SMESH/sources/static/tree.js.in resources/SMESHCatalog.xml.in resources/SalomeApp.xml resources/mesh_conv_to_quad.png resources/mesh_tree_algo_netgen_2d.png resources/mesh_tree_algo_netgen_2d3d.png resources/mesh_tree_hypo_netgen.png resources/mesh_tree_hypo_netgen_2d.png src/DriverUNV/UNV2417_Structure.cxx src/DriverUNV/UNV2417_Structure.hxx src/SMDS/SMDS_QuadraticEdge.cxx src/SMDS/SMDS_QuadraticEdge.hxx src/SMDS/SMDS_QuadraticFaceOfNodes.cxx src/SMDS/SMDS_QuadraticFaceOfNodes.hxx src/SMDS/SMDS_QuadraticVolumeOfNodes.cxx src/SMDS/SMDS_QuadraticVolumeOfNodes.hxx src/SMDS/SMDS_SetIterator.hxx src/SMESH/SMESH_MesherHelper.cxx src/SMESH/SMESH_MesherHelper.hxx src/SMESHClient/Makefile.in src/SMESHClient/SMESHClientBin.cxx src/SMESHClient/SMESH_Client.cxx src/SMESHClient/SMESH_Client.hxx src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.h src/SMESHGUI/SMESHGUI_ConvToQuadDlg.cxx src/SMESHGUI/SMESHGUI_ConvToQuadDlg.h src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx src/SMESHGUI/SMESHGUI_ConvToQuadOp.h src/SMESH_SWIG/SMESH_AdvancedEditor.py src/SMESH_SWIG/SMESH_fixation_netgen.py src/SMESH_SWIG/SMESH_mechanic_netgen.py src/SMESH_SWIG/ex21_lamp.py src/StdMeshers/StdMeshers_QuadraticMesh.cxx src/StdMeshers/StdMeshers_QuadraticMesh.hxx src/StdMeshers_I/StdMeshers_QuadraticMesh_i.cxx src/StdMeshers_I/StdMeshers_QuadraticMesh_i.hxx --- diff --git a/SMESH_version.h.in b/SMESH_version.h.in new file mode 100644 index 000000000..85259c4e3 --- /dev/null +++ b/SMESH_version.h.in @@ -0,0 +1,34 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +// File : SMESH_version.h +// Author : Vadim SANDLER +// Module : SALOME + +#if !defined(__SMESH_VERSION_H__) +#define __SMESH_VERSION_H__ + +/* + SMESH_VERSION is (major << 16) + (minor << 8) + patch. +*/ + +#define SMESH_VERSION_STR "@VERSION@" +#define SMESH_VERSION @XVERSION@ + +#endif // __SMESH_VERSION_H__ diff --git a/adm_local/Makefile.in b/adm_local/Makefile.in new file mode 100644 index 000000000..e2133b49b --- /dev/null +++ b/adm_local/Makefile.in @@ -0,0 +1,60 @@ +# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# source path +top_srcdir=@top_srcdir@ +top_builddir=.. +srcdir=@srcdir@ +VPATH=.:$(srcdir)/adm_local + + +all: resources + +install: + cp -rf @top_srcdir@/adm_local @prefix@ + +bin: + +resources : + cp -rf @top_srcdir@/adm_local $(top_builddir) + +inc: + +lib: + +depend: + +depend_idl: + +install-end: + +install-include: + +install-bin: + +uninstall: + +uninstall-idl: + +distclean: + +clean: + +distclean-other: + diff --git a/adm_local/unix/config_files/check_SMESH.m4 b/adm_local/unix/config_files/check_SMESH.m4 new file mode 100644 index 000000000..f1dbf22f1 --- /dev/null +++ b/adm_local/unix/config_files/check_SMESH.m4 @@ -0,0 +1,63 @@ +# Check availability of SMesh binary distribution +# +# Author : Nicolas REJNERI (OPEN CASCADE, 2003) +# + +AC_DEFUN([CHECK_SMESH],[ + +AC_CHECKING(for SMesh) + +SMesh_ok=no + +SMESH_LDFLAGS="" +SMESH_CXXFLAGS="" + +AC_ARG_WITH(smesh, + [ --with-smesh=DIR root directory path of SMESH installation ], + SMESH_DIR="$withval",SMESH_DIR="") + +if test "x$SMESH_DIR" == "x" ; then + +# no --with-smesh option used + + if test "x$SMESH_ROOT_DIR" != "x" ; then + + # SMESH_ROOT_DIR environment variable defined + SMESH_DIR=$SMESH_ROOT_DIR + + else + + # search SMESH binaries in PATH variable + AC_PATH_PROG(TEMP, libSMESH_Swig.py) + if test "x$TEMP" != "x" ; then + SMESH_BIN_DIR=`dirname $TEMP` + SMESH_DIR=`dirname $SMESH_BIN_DIR` + fi + + fi +# +fi + +if test -f ${SMESH_DIR}/bin/salome/libSMESH_Swig.py ; then + SMesh_ok=yes + AC_MSG_RESULT(Using SMesh module distribution in ${SMESH_DIR}) + + if test "x$SMESH_ROOT_DIR" == "x" ; then + SMESH_ROOT_DIR=${SMESH_DIR} + fi + AC_SUBST(SMESH_ROOT_DIR) + + SMESH_LDFLAGS=-L${SMESH_DIR}/lib${LIB_LOCATION_SUFFIX}/salome + SMESH_CXXFLAGS=-I${SMESH_DIR}/include/salome + + AC_SUBST(SMESH_LDFLAGS) + AC_SUBST(SMESH_CXXFLAGS) + +else + AC_MSG_WARN("Cannot find compiled SMesh module distribution") +fi + +AC_MSG_RESULT(for SMesh: $SMesh_ok) + +])dnl + diff --git a/bin/VERSION.in b/bin/VERSION.in new file mode 100755 index 000000000..fa49d303f --- /dev/null +++ b/bin/VERSION.in @@ -0,0 +1 @@ +THIS IS SALOME - SMESH VERSION: @VERSION@ diff --git a/doc/salome/gui/SMESH/adding_quadratic_nodes_and_elements.htm b/doc/salome/gui/SMESH/adding_quadratic_nodes_and_elements.htm new file mode 100755 index 000000000..86db2586e --- /dev/null +++ b/doc/salome/gui/SMESH/adding_quadratic_nodes_and_elements.htm @@ -0,0 +1,124 @@ + + + + + +Adding Quadratic Nodes and Elements + + + + + + + + + + +

Adding Quadratic Elements

+ +

MESH modules allows you to work with Quadratic + Elements.

+ +

Quadratic Edge in not a straight but a broken line and can be defined + by three points: first, middle and last. All more complex Quadratic + Elements differ from ordinary ones in that they consist of Quadratic + Edges.

+ +

To + add a quadratic element to your mesh:

+ +

1. Select your mesh in the Object Browser + or in the 3D viewer.

+ +

2. From the Modification + menu choose the Add item + and select one of the following:

+ +

+ +

To create any Quadratic + Element specify the nodes which will form your triangle by selecting + them in the 3D viewer with pressed Shift button. Their numbers will appear + in the dialog box as Corner Nodes + (alternatively you can just input numbers in this field without selection).The + edges formed by the corner nodes will appear in the table. To define the + middle nodes for each edge double-click on the respective field and input + the number of the node. All edges and the object formed by them will be + displayed in the Object browser. When all edges are defined you will be + able to click OK or Apply + button to add the element to the mesh.

+ +

 

+ +

Reverse + button for Quadratic Edges switches the first and the last nodes. For all other elements it reverses the element. +

+ +

 

+ + + + diff --git a/doc/salome/gui/SMESH/files/vtk_3d_viewer.htm b/doc/salome/gui/SMESH/files/vtk_3d_viewer.htm new file mode 100755 index 000000000..e8ce5413c --- /dev/null +++ b/doc/salome/gui/SMESH/files/vtk_3d_viewer.htm @@ -0,0 +1,229 @@ + + + + + +VTK 3D Viewer + + + + + + + + + + + +

VTK 3D Viewer

+ +

VTK + 3D viewer is the default viewer for Mesh Module, allowing to visualize + meshes. It is also used in Post-Pro module for all 3D presentations except + for Gauss Points.

+ +

 

+ +

The functionalities of + VTK viewer are available via its Viewer Toolbar. Buttons marked with small + downward triangles have extended functionality which can be accessed by + locking on them with left mouse button.  

+ +

 

+ +

+ + + +

 

+ +

+ + + + + + diff --git a/doc/salome/gui/SMESH/image142.gif b/doc/salome/gui/SMESH/image142.gif new file mode 100755 index 000000000..2f411e58d Binary files /dev/null and b/doc/salome/gui/SMESH/image142.gif differ diff --git a/doc/salome/gui/SMESH/image143.gif b/doc/salome/gui/SMESH/image143.gif new file mode 100755 index 000000000..de9df148f Binary files /dev/null and b/doc/salome/gui/SMESH/image143.gif differ diff --git a/doc/salome/gui/SMESH/image144.gif b/doc/salome/gui/SMESH/image144.gif new file mode 100755 index 000000000..3dffd53ff Binary files /dev/null and b/doc/salome/gui/SMESH/image144.gif differ diff --git a/doc/salome/gui/SMESH/image145.gif b/doc/salome/gui/SMESH/image145.gif new file mode 100755 index 000000000..8005557e1 Binary files /dev/null and b/doc/salome/gui/SMESH/image145.gif differ diff --git a/doc/salome/gui/SMESH/image146.gif b/doc/salome/gui/SMESH/image146.gif new file mode 100755 index 000000000..18f22241d Binary files /dev/null and b/doc/salome/gui/SMESH/image146.gif differ diff --git a/doc/salome/gui/SMESH/image147.gif b/doc/salome/gui/SMESH/image147.gif new file mode 100755 index 000000000..7b9a354b9 Binary files /dev/null and b/doc/salome/gui/SMESH/image147.gif differ diff --git a/doc/salome/gui/SMESH/image148.gif b/doc/salome/gui/SMESH/image148.gif new file mode 100755 index 000000000..0ef414777 Binary files /dev/null and b/doc/salome/gui/SMESH/image148.gif differ diff --git a/doc/salome/gui/SMESH/image15.jpg b/doc/salome/gui/SMESH/image15.jpg new file mode 100755 index 000000000..15edee5b3 Binary files /dev/null and b/doc/salome/gui/SMESH/image15.jpg differ diff --git a/doc/salome/gui/SMESH/image151.gif b/doc/salome/gui/SMESH/image151.gif new file mode 100755 index 000000000..5c4a20e9a Binary files /dev/null and b/doc/salome/gui/SMESH/image151.gif differ diff --git a/doc/salome/gui/SMESH/image152.gif b/doc/salome/gui/SMESH/image152.gif new file mode 100755 index 000000000..2005d3fff Binary files /dev/null and b/doc/salome/gui/SMESH/image152.gif differ diff --git a/doc/salome/gui/SMESH/index.htm b/doc/salome/gui/SMESH/index.htm new file mode 100755 index 000000000..767e2b766 --- /dev/null +++ b/doc/salome/gui/SMESH/index.htm @@ -0,0 +1,180 @@ + + +Mesh Module Reference Manual + + + + + + + + + + + + + diff --git a/doc/salome/gui/SMESH/index_csh.htm b/doc/salome/gui/SMESH/index_csh.htm new file mode 100755 index 000000000..2bd1f6387 --- /dev/null +++ b/doc/salome/gui/SMESH/index_csh.htm @@ -0,0 +1,106 @@ + + +Mesh Module Reference Manual + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/salome/gui/SMESH/index_rhc.htm b/doc/salome/gui/SMESH/index_rhc.htm new file mode 100755 index 000000000..4e8723907 --- /dev/null +++ b/doc/salome/gui/SMESH/index_rhc.htm @@ -0,0 +1,106 @@ + + +Mesh Module Reference Manual + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/salome/gui/SMESH/merge_elements.htm b/doc/salome/gui/SMESH/merge_elements.htm new file mode 100755 index 000000000..32b5ebfb8 --- /dev/null +++ b/doc/salome/gui/SMESH/merge_elements.htm @@ -0,0 +1,101 @@ + + + + + +Merge Elements + + + + + + + + + + +

Merging Elements

+ +

This functionality allows to merge coincident elements + of a mesh selectable in the dialog box.

+ +

+ +

In this picture you see a triangle which coincides with one of the elements + of the mesh. After we apply Merge Elements + functionality, the triangle will be completely merged with the mesh.

+ +

+ +

  See + Also a sample TUI Script of a Merge + Elements operation.  

+ +

 

+ +

 

+ + + + diff --git a/doc/salome/gui/SMESH/mesh.htm b/doc/salome/gui/SMESH/mesh.htm new file mode 100755 index 000000000..be7069d51 --- /dev/null +++ b/doc/salome/gui/SMESH/mesh.htm @@ -0,0 +1,216 @@ + + + + + +mesh + + + + + + + + + + + +

Introduction to MESH

+ +

 

+ +

MESH + module of SALOME is destined for:

+ + + +

+ +

for edges:

+ +
    + + +
+ +

for faces:

+ +
    + + +
+ +

for solids:

+ +
    + + +
+ +

.

+ + + + diff --git a/doc/salome/gui/SMESH/pics/advanced_mesh_infos.png b/doc/salome/gui/SMESH/pics/advanced_mesh_infos.png new file mode 100755 index 000000000..f8341e892 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/advanced_mesh_infos.png differ diff --git a/doc/salome/gui/SMESH/pics/aqt.png b/doc/salome/gui/SMESH/pics/aqt.png new file mode 100755 index 000000000..32e36bd0e Binary files /dev/null and b/doc/salome/gui/SMESH/pics/aqt.png differ diff --git a/doc/salome/gui/SMESH/pics/automaticlength.png b/doc/salome/gui/SMESH/pics/automaticlength.png new file mode 100755 index 000000000..d96ffc82d Binary files /dev/null and b/doc/salome/gui/SMESH/pics/automaticlength.png differ diff --git a/doc/salome/gui/SMESH/pics/createmesh-inv.png b/doc/salome/gui/SMESH/pics/createmesh-inv.png new file mode 100755 index 000000000..9ed8a6255 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/createmesh-inv.png differ diff --git a/doc/salome/gui/SMESH/pics/createmesh-inv2.png b/doc/salome/gui/SMESH/pics/createmesh-inv2.png new file mode 100755 index 000000000..f73e1df7d Binary files /dev/null and b/doc/salome/gui/SMESH/pics/createmesh-inv2.png differ diff --git a/doc/salome/gui/SMESH/pics/createmesh-inv3.png b/doc/salome/gui/SMESH/pics/createmesh-inv3.png new file mode 100755 index 000000000..6c9da9c0a Binary files /dev/null and b/doc/salome/gui/SMESH/pics/createmesh-inv3.png differ diff --git a/doc/salome/gui/SMESH/pics/distributionwithanalyticdensity.png b/doc/salome/gui/SMESH/pics/distributionwithanalyticdensity.png new file mode 100755 index 000000000..87ebc5ffe Binary files /dev/null and b/doc/salome/gui/SMESH/pics/distributionwithanalyticdensity.png differ diff --git a/doc/salome/gui/SMESH/pics/distributionwithtabledensity.png b/doc/salome/gui/SMESH/pics/distributionwithtabledensity.png new file mode 100755 index 000000000..9ea6cab98 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/distributionwithtabledensity.png differ diff --git a/doc/salome/gui/SMESH/pics/graduatedaxes1.png b/doc/salome/gui/SMESH/pics/graduatedaxes1.png new file mode 100755 index 000000000..cf021ba42 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/graduatedaxes1.png differ diff --git a/doc/salome/gui/SMESH/pics/image100.gif b/doc/salome/gui/SMESH/pics/image100.gif new file mode 100755 index 000000000..c44d68ffc Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image100.gif differ diff --git a/doc/salome/gui/SMESH/pics/image102.gif b/doc/salome/gui/SMESH/pics/image102.gif new file mode 100755 index 000000000..3507814ba Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image102.gif differ diff --git a/doc/salome/gui/SMESH/pics/image107.gif b/doc/salome/gui/SMESH/pics/image107.gif new file mode 100755 index 000000000..ae9d7f1e6 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image107.gif differ diff --git a/doc/salome/gui/SMESH/pics/image108.gif b/doc/salome/gui/SMESH/pics/image108.gif new file mode 100755 index 000000000..bec69e662 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image108.gif differ diff --git a/doc/salome/gui/SMESH/pics/image109.gif b/doc/salome/gui/SMESH/pics/image109.gif new file mode 100755 index 000000000..5dbba4646 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image109.gif differ diff --git a/doc/salome/gui/SMESH/pics/image138.gif b/doc/salome/gui/SMESH/pics/image138.gif new file mode 100755 index 000000000..1659aab9f Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image138.gif differ diff --git a/doc/salome/gui/SMESH/pics/image139.gif b/doc/salome/gui/SMESH/pics/image139.gif new file mode 100755 index 000000000..03943831c Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image139.gif differ diff --git a/doc/salome/gui/SMESH/pics/image21.gif b/doc/salome/gui/SMESH/pics/image21.gif new file mode 100755 index 000000000..5dbd12184 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image21.gif differ diff --git a/doc/salome/gui/SMESH/pics/image23.gif b/doc/salome/gui/SMESH/pics/image23.gif new file mode 100755 index 000000000..5a1216dc6 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image23.gif differ diff --git a/doc/salome/gui/SMESH/pics/image27.gif b/doc/salome/gui/SMESH/pics/image27.gif new file mode 100755 index 000000000..6c8485ca9 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image27.gif differ diff --git a/doc/salome/gui/SMESH/pics/image77.gif b/doc/salome/gui/SMESH/pics/image77.gif new file mode 100755 index 000000000..ef7a62f32 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image77.gif differ diff --git a/doc/salome/gui/SMESH/pics/image78.gif b/doc/salome/gui/SMESH/pics/image78.gif new file mode 100755 index 000000000..9466aa6ce Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image78.gif differ diff --git a/doc/salome/gui/SMESH/pics/image89.gif b/doc/salome/gui/SMESH/pics/image89.gif new file mode 100755 index 000000000..373a6c026 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image89.gif differ diff --git a/doc/salome/gui/SMESH/pics/image91.gif b/doc/salome/gui/SMESH/pics/image91.gif new file mode 100755 index 000000000..9e93c1c72 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image91.gif differ diff --git a/doc/salome/gui/SMESH/pics/image96.gif b/doc/salome/gui/SMESH/pics/image96.gif new file mode 100755 index 000000000..4580d5b5c Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image96.gif differ diff --git a/doc/salome/gui/SMESH/pics/image97.gif b/doc/salome/gui/SMESH/pics/image97.gif new file mode 100755 index 000000000..1d78de1bc Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image97.gif differ diff --git a/doc/salome/gui/SMESH/pics/image98.gif b/doc/salome/gui/SMESH/pics/image98.gif new file mode 100755 index 000000000..6519dbb67 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image98.gif differ diff --git a/doc/salome/gui/SMESH/pics/image99.gif b/doc/salome/gui/SMESH/pics/image99.gif new file mode 100755 index 000000000..3711be813 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/image99.gif differ diff --git a/doc/salome/gui/SMESH/pics/length-crit.png b/doc/salome/gui/SMESH/pics/length-crit.png new file mode 100755 index 000000000..96836cd87 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/length-crit.png differ diff --git a/doc/salome/gui/SMESH/pics/mergeelems.png b/doc/salome/gui/SMESH/pics/mergeelems.png new file mode 100755 index 000000000..9314da8c3 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/mergeelems.png differ diff --git a/doc/salome/gui/SMESH/pics/meshexportmesh.png b/doc/salome/gui/SMESH/pics/meshexportmesh.png new file mode 100755 index 000000000..a84b25207 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/meshexportmesh.png differ diff --git a/doc/salome/gui/SMESH/pics/meshimportmesh.png b/doc/salome/gui/SMESH/pics/meshimportmesh.png new file mode 100755 index 000000000..f87250bf4 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/meshimportmesh.png differ diff --git a/doc/salome/gui/SMESH/pics/meshtrianglemergeelem1.png b/doc/salome/gui/SMESH/pics/meshtrianglemergeelem1.png new file mode 100755 index 000000000..0f9bd5215 Binary files /dev/null and b/doc/salome/gui/SMESH/pics/meshtrianglemergeelem1.png differ diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh.html b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh.html new file mode 100644 index 000000000..b99783934 --- /dev/null +++ b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh.html @@ -0,0 +1,1004 @@ + + +SALOME - SMESH - v.version: smesh.Mesh Class Reference + + + + +

smesh.Mesh Class Reference

Class to define a mesh. +More... +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

def __init__
 Constructor.
def GetMesh
 Method that returns the mesh.
def GetShape
 Method that returns the shape associated to the mesh.
def MeshDimension
 Returns mesh dimension depending on shape one.
def Segment
 Creates a segment discretization 1D algorithm.
def Triangle
 Creates a triangle 2D algorithm for faces.
def Quadrangle
 Creates a quadrangle 2D algorithm for faces.
def Tetrahedron
 Creates a tetrahedron 3D algorithm for solids.
def Hexahedron
 Creates a hexahedron 3D algorithm for solids.
def Netgen
 Creates a NETGEN-based 2D or 3D independent algorithm (i.e.
def Compute
 Compute the mesh and return the status of the computation.
def AutomaticTetrahedralization
 Compute tetrahedral mesh using AutomaticLength + MEFISTO + NETGEN The parameter fineness [0.
def AutomaticHexahedralization
 Compute hexahedral mesh using AutomaticLength + Quadrangle + Hexahedron The parameter fineness [0.
def RemoveGlobalHypotheses
 Removes all global hypotheses.
def Group
 Create a mesh group based on geometric object grp and give a name, if this parameter is not defined the name is the same as the geometric group name.
def ExportToMED
 Export the mesh in a file with the MED format and choice the version of MED format.
def ExportMED
 Export the mesh in a file with the MED format.
def ExportDAT
 Export the mesh in a file with the DAT format.
def ExportUNV
 Export the mesh in a file with the UNV format.
def ExportSTL
 Export the mesh in a file with the STL format.

Data Fields

 geom
 mesh

Static Public Attributes

int geom = 0
int mesh = 0
+


Detailed Description

+More details. +

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh.__init__   self,
  geom,
  name = 0
+
+ + + + + +
+   + + +

+Creates mesh on the shape geom, sets GUI name of this mesh to name.

Parameters:
+ + + +
geom Shape to be meshed
name Study name of the mesh
+
+
+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh.GetMesh   self  ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh.GetShape   self  ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh.MeshDimension   self  ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh.Segment   self,
  algo = REGULAR,
  geom = 0
+
+ + + + + +
+   + + +

+If the optional algo parameter is not sets, this algorithm is REGULAR. If the optional geom parameter is not sets, this algorithm is global. Otherwise, this algorithm define a submesh based on geom subshape.

Parameters:
+ + + +
algo values are smesh.REGULAR or smesh.PYTHON for discretization via python function
geom If defined, subshape to be meshed
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.Mesh.Triangle   self,
  geom = 0
+
+ + + + + +
+   + + +

+If the optional geom parameter is not sets, this algorithm is global. Otherwise, this algorithm define a submesh based on geom subshape.

Parameters:
+ + +
geom If defined, subshape to be meshed
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.Mesh.Quadrangle   self,
  geom = 0
+
+ + + + + +
+   + + +

+If the optional geom parameter is not sets, this algorithm is global. Otherwise, this algorithm define a submesh based on geom subshape.

Parameters:
+ + +
geom If defined, subshape to be meshed
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh.Tetrahedron   self,
  algo,
  geom = 0
+
+ + + + + +
+   + + +

+The parameter algo permits to choice the algorithm: NETGEN or GHS3D If the optional geom parameter is not sets, this algorithm is global. Otherwise, this algorithm define a submesh based on geom subshape.

Parameters:
+ + + +
algo values are: smesh.NETGEN, smesh.GHS3D
geom If defined, subshape to be meshed
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.Mesh.Hexahedron   self,
  geom = 0
+
+ + + + + +
+   + + +

+If the optional geom parameter is not sets, this algorithm is global. Otherwise, this algorithm define a submesh based on geom subshape.

Parameters:
+ + +
geom If defined, subshape to be meshed
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh.Netgen   self,
  is3D,
  geom = 0
+
+ + + + + +
+   + + +

+needs no discrete boundary). If the optional geom parameter is not sets, this algorithm is global. Otherwise, this algorithm defines a submesh based on geom subshape.

Parameters:
+ + + +
is3D If 0 then algorithm is 2D, otherwise 3D
geom If defined, subshape to be meshed
+
+
+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh.Compute   self  ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.Mesh.AutomaticTetrahedralization   self,
  fineness = 0
+
+ + + + + +
+   + + +

+-1.] defines mesh fineness

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.Mesh.AutomaticHexahedralization   self,
  fineness = 0
+
+ + + + + +
+   + + +

+-1.] defines mesh fineness

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh.RemoveGlobalHypotheses   self  ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh.Group   self,
  grp,
  name = ""
+
+ + + + + +
+   + + +

+

Parameters:
+ + + +
grp is a geometric group, a vertex, an edge, a face or a solid
name is the name of the mesh group
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh.ExportToMED   self,
  f,
  version,
  opt = 0
+
+ + + + + +
+   + + +

+

Parameters:
+ + + +
f is the file name
version values are SMESH.MED_V2_1, SMESH.MED_V2_2
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh.ExportMED   self,
  f,
  opt = 0
+
+ + + + + +
+   + + +

+

Parameters:
+ + +
f is the file name
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.Mesh.ExportDAT   self,
  f
+
+ + + + + +
+   + + +

+

Parameters:
+ + +
f is the file name
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.Mesh.ExportUNV   self,
  f
+
+ + + + + +
+   + + +

+

Parameters:
+ + +
f is the file name
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh.ExportSTL   self,
  f,
  ascii = 1
+
+ + + + + +
+   + + +

+

Parameters:
+ + + +
f is the file name
ascii defined the kind of file contents
+
+
+


Field Documentation

+

+ + + + +
+ + + + +
int smesh.Mesh.geom = 0 [static]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh.mesh = 0 [static]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh.geom
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh.mesh
+
+ + + + + +
+   + + +

+

+ + diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Algorithm.html b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Algorithm.html new file mode 100644 index 000000000..97d0e0ef7 --- /dev/null +++ b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Algorithm.html @@ -0,0 +1,461 @@ + + +SALOME - SMESH - v.version: smesh.Mesh_Algorithm Class Reference + + + + +

smesh.Mesh_Algorithm Class Reference

Mother class to define algorithm, recommended to don't use directly. +More... +

+Inheritance diagram for smesh.Mesh_Algorithm:

Inheritance graph
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

def GetSubMesh
def GetAlgorithm
 Return the wrapped mesher.
def TreatHypoStatus
 Private method.
def Create
 Private method.
def Hypothesis
 Private method.

Data Fields

 mesh
 geom
 subm
 algo

Static Public Attributes

int mesh = 0
int geom = 0
int subm = 0
int algo = 0
+

Detailed Description

+More details. +

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetSubMesh   self  ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetAlgorithm   self  ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.TreatHypoStatus   self,
  status,
  hypName,
  geomName,
  isAlgo
+
+ + + + + +
+   + + +

+Print error message if a hypothesis was not assigned.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Create   self,
  mesh,
  geom,
  hypo,
  so = "libStdMeshersEngine.so"
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Hypothesis   self,
  hyp,
  args = [],
  so = "libStdMeshersEngine.so"
+
+ + + + + +
+   + + +

+

+


Field Documentation

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.mesh = 0 [static]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.geom = 0 [static]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.subm = 0 [static]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.algo = 0 [static]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.mesh
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.geom
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.subm
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.algo
+
+ + + + + +
+   + + +

+

+ + diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Algorithm__inherit__graph.jpg b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Algorithm__inherit__graph.jpg new file mode 100644 index 000000000..39dd1ddf8 Binary files /dev/null and b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Algorithm__inherit__graph.jpg differ diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Hexahedron.html b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Hexahedron.html new file mode 100644 index 000000000..d177efa43 --- /dev/null +++ b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Hexahedron.html @@ -0,0 +1,502 @@ + + +SALOME - SMESH - v.version: smesh.Mesh_Hexahedron Class Reference + + + + +

smesh.Mesh_Hexahedron Class Reference

Class to define a hexahedron 3D algorithm. +More... +

+Inheritance diagram for smesh.Mesh_Hexahedron:

Inheritance graph
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

def __init__
 Private constructor.
def GetSubMesh
def GetAlgorithm
 Return the wrapped mesher.
def TreatHypoStatus
 Private method.
def Create
 Private method.
def Hypothesis
 Private method.

Data Fields

 mesh
 geom
 subm
 algo

Static Public Attributes

int mesh = 0
int geom = 0
int subm = 0
int algo = 0
+

Detailed Description

+More details. +

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Hexahedron.__init__   self,
  mesh,
  geom = 0
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetSubMesh   self  )  [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetAlgorithm   self  )  [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.TreatHypoStatus   self,
  status,
  hypName,
  geomName,
  isAlgo
[inherited]
+
+ + + + + +
+   + + +

+Print error message if a hypothesis was not assigned.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Create   self,
  mesh,
  geom,
  hypo,
  so = "libStdMeshersEngine.so"
[inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Hypothesis   self,
  hyp,
  args = [],
  so = "libStdMeshersEngine.so"
[inherited]
+
+ + + + + +
+   + + +

+

+


Field Documentation

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.mesh = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.mesh [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.geom = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.geom [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.subm = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.subm [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.algo = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.algo [inherited]
+
+ + + + + +
+   + + +

+

+ + diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Hexahedron__inherit__graph.jpg b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Hexahedron__inherit__graph.jpg new file mode 100644 index 000000000..4d1e65ac6 Binary files /dev/null and b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Hexahedron__inherit__graph.jpg differ diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Netgen.html b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Netgen.html new file mode 100644 index 000000000..cab8462b2 --- /dev/null +++ b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Netgen.html @@ -0,0 +1,590 @@ + + +SALOME - SMESH - v.version: smesh.Mesh_Netgen Class Reference + + + + +

smesh.Mesh_Netgen Class Reference

Class to define a NETGEN-based 2D or 3D algorithm that need no discrete boundary (i.e. +More... +

+Inheritance diagram for smesh.Mesh_Netgen:

Inheritance graph
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

def __init__
 Private constructor.
def Parameters
 Define hypothesis containing parameters of the algorithm.
def GetSubMesh
def GetAlgorithm
 Return the wrapped mesher.
def TreatHypoStatus
 Private method.
def Create
 Private method.
def Hypothesis
 Private method.

Data Fields

 is3D
 mesh
 geom
 subm
 algo

Static Public Attributes

int is3D = 0
int mesh = 0
int geom = 0
int subm = 0
int algo = 0
+

Detailed Description

+independent)

+More details. +

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Netgen.__init__   self,
  mesh,
  is3D,
  geom = 0
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Netgen.Parameters   self  ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetSubMesh   self  )  [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetAlgorithm   self  )  [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.TreatHypoStatus   self,
  status,
  hypName,
  geomName,
  isAlgo
[inherited]
+
+ + + + + +
+   + + +

+Print error message if a hypothesis was not assigned.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Create   self,
  mesh,
  geom,
  hypo,
  so = "libStdMeshersEngine.so"
[inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Hypothesis   self,
  hyp,
  args = [],
  so = "libStdMeshersEngine.so"
[inherited]
+
+ + + + + +
+   + + +

+

+


Field Documentation

+

+ + + + +
+ + + + +
int smesh.Mesh_Netgen.is3D = 0 [static]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Netgen.is3D
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.mesh = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.mesh [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.geom = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.geom [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.subm = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.subm [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.algo = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.algo [inherited]
+
+ + + + + +
+   + + +

+

+ + diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Netgen__inherit__graph.jpg b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Netgen__inherit__graph.jpg new file mode 100644 index 000000000..d82cacddc Binary files /dev/null and b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Netgen__inherit__graph.jpg differ diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Quadrangle.html b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Quadrangle.html new file mode 100644 index 000000000..8febcc801 --- /dev/null +++ b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Quadrangle.html @@ -0,0 +1,533 @@ + + +SALOME - SMESH - v.version: smesh.Mesh_Quadrangle Class Reference + + + + +

smesh.Mesh_Quadrangle Class Reference

Class to define a quadrangle 2D algorithm. +More... +

+Inheritance diagram for smesh.Mesh_Quadrangle:

Inheritance graph
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

def __init__
 Private constructor.
def QuadranglePreference
 Define "QuadranglePreference" hypothesis, forcing construction of quadrangles if the number of nodes on opposite edges is not the same in the case where the global number of nodes on edges is even.
def GetSubMesh
def GetAlgorithm
 Return the wrapped mesher.
def TreatHypoStatus
 Private method.
def Create
 Private method.
def Hypothesis
 Private method.

Data Fields

 mesh
 geom
 subm
 algo

Static Public Attributes

int mesh = 0
int geom = 0
int subm = 0
int algo = 0
+

Detailed Description

+More details. +

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Quadrangle.__init__   self,
  mesh,
  geom = 0
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Quadrangle.QuadranglePreference   self  ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetSubMesh   self  )  [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetAlgorithm   self  )  [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.TreatHypoStatus   self,
  status,
  hypName,
  geomName,
  isAlgo
[inherited]
+
+ + + + + +
+   + + +

+Print error message if a hypothesis was not assigned.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Create   self,
  mesh,
  geom,
  hypo,
  so = "libStdMeshersEngine.so"
[inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Hypothesis   self,
  hyp,
  args = [],
  so = "libStdMeshersEngine.so"
[inherited]
+
+ + + + + +
+   + + +

+

+


Field Documentation

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.mesh = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.mesh [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.geom = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.geom [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.subm = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.subm [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.algo = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.algo [inherited]
+
+ + + + + +
+   + + +

+

+ + diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Quadrangle__inherit__graph.jpg b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Quadrangle__inherit__graph.jpg new file mode 100644 index 000000000..38172d200 Binary files /dev/null and b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Quadrangle__inherit__graph.jpg differ diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment.html b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment.html new file mode 100644 index 000000000..53ca6c993 --- /dev/null +++ b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment.html @@ -0,0 +1,858 @@ + + +SALOME - SMESH - v.version: smesh.Mesh_Segment Class Reference + + + + +

smesh.Mesh_Segment Class Reference

Class to define a segment 1D algorithm for discretization. +More... +

+Inheritance diagram for smesh.Mesh_Segment:

Inheritance graph
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

def __init__
 Private constructor.
def LocalLength
 Define "LocalLength" hypothesis to cut an edge in several segments with the same length.
def NumberOfSegments
 Define "NumberOfSegments" hypothesis to cut an edge in several fixed number of segments.
def Arithmetic1D
 Define "Arithmetic1D" hypothesis to cut an edge in several segments with arithmetic length increasing.
def StartEndLength
 Define "StartEndLength" hypothesis to cut an edge in several segments with geometric length increasing.
def Deflection1D
 Define "Deflection1D" hypothesis.
def Propagation
 Define "Propagation" hypothesis that propagate all other hypothesis on all others edges that are in the opposite side in the case of quadrangular faces.
def AutomaticLength
 Define "AutomaticLength" hypothesis.
def QuadraticMesh
 Define "QuadraticMesh" hypothesis, forcing construction of quadratic edges.
def GetSubMesh
def GetAlgorithm
 Return the wrapped mesher.
def TreatHypoStatus
 Private method.
def Create
 Private method.
def Hypothesis
 Private method.

Data Fields

 mesh
 geom
 subm
 algo

Static Public Attributes

int mesh = 0
int geom = 0
int subm = 0
int algo = 0
+

Detailed Description

+More details. +

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Segment.__init__   self,
  mesh,
  geom = 0
+
+ + + + + +
+   + + +

+ +

+Reimplemented in smesh.Mesh_Segment_Python.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Segment.LocalLength   self,
  l
+
+ + + + + +
+   + + +

+

Parameters:
+ + +
l for the length of segments that cut an edge
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Segment.NumberOfSegments   self,
  n,
  s = []
+
+ + + + + +
+   + + +

+

Parameters:
+ + + +
n for the number of segments that cut an edge
s for the scale factor (optional)
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Segment.Arithmetic1D   self,
  start,
  end
+
+ + + + + +
+   + + +

+

Parameters:
+ + + +
start for the length of the first segment
end for the length of the last segment
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Segment.StartEndLength   self,
  start,
  end
+
+ + + + + +
+   + + +

+

Parameters:
+ + + +
start for the length of the first segment
end for the length of the last segment
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Segment.Deflection1D   self,
  d
+
+ + + + + +
+   + + +

+

Parameters:
+ + +
d for the deflection
+
+
+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Segment.Propagation   self  ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Segment.AutomaticLength   self,
  fineness = 0
+
+ + + + + +
+   + + +

+

Parameters:
+ + +
fineness for the fineness [0-1]
+
+
+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Segment.QuadraticMesh   self  ) 
+
+ + + + + +
+   + + +

+If the 2D mesher sees that all boundary edges are quadratic ones, it generates quadratic faces, else it generates linear faces using medium nodes as if they were vertex ones. The 3D mesher generates quadratic volumes only if all boundary faces are quadratic ones, else it fails.

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetSubMesh   self  )  [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetAlgorithm   self  )  [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.TreatHypoStatus   self,
  status,
  hypName,
  geomName,
  isAlgo
[inherited]
+
+ + + + + +
+   + + +

+Print error message if a hypothesis was not assigned.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Create   self,
  mesh,
  geom,
  hypo,
  so = "libStdMeshersEngine.so"
[inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Hypothesis   self,
  hyp,
  args = [],
  so = "libStdMeshersEngine.so"
[inherited]
+
+ + + + + +
+   + + +

+

+


Field Documentation

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.mesh = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.mesh [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.geom = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.geom [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.subm = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.subm [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.algo = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.algo [inherited]
+
+ + + + + +
+   + + +

+

+ + diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment__Python.html b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment__Python.html new file mode 100644 index 000000000..230c9c259 --- /dev/null +++ b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment__Python.html @@ -0,0 +1,910 @@ + + +SALOME - SMESH - v.version: smesh.Mesh_Segment_Python Class Reference + + + + +

smesh.Mesh_Segment_Python Class Reference

Class to define a segment 1D algorithm for discretization with python function. +More... +

+Inheritance diagram for smesh.Mesh_Segment_Python:

Inheritance graph
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

def __init__
 Private constructor.
def PythonSplit1D
 Define "PythonSplit1D" hypothesis based on the Erwan Adam patch, awaiting equivalent SALOME functionality.
def LocalLength
 Define "LocalLength" hypothesis to cut an edge in several segments with the same length.
def NumberOfSegments
 Define "NumberOfSegments" hypothesis to cut an edge in several fixed number of segments.
def Arithmetic1D
 Define "Arithmetic1D" hypothesis to cut an edge in several segments with arithmetic length increasing.
def StartEndLength
 Define "StartEndLength" hypothesis to cut an edge in several segments with geometric length increasing.
def Deflection1D
 Define "Deflection1D" hypothesis.
def Propagation
 Define "Propagation" hypothesis that propagate all other hypothesis on all others edges that are in the opposite side in the case of quadrangular faces.
def AutomaticLength
 Define "AutomaticLength" hypothesis.
def QuadraticMesh
 Define "QuadraticMesh" hypothesis, forcing construction of quadratic edges.
def GetSubMesh
def GetAlgorithm
 Return the wrapped mesher.
def TreatHypoStatus
 Private method.
def Create
 Private method.
def Hypothesis
 Private method.

Data Fields

 mesh
 geom
 subm
 algo

Static Public Attributes

int mesh = 0
int geom = 0
int subm = 0
int algo = 0
+

Detailed Description

+More details. +

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Segment_Python.__init__   self,
  mesh,
  geom = 0
+
+ + + + + +
+   + + +

+ +

+Reimplemented from smesh.Mesh_Segment.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Segment_Python.PythonSplit1D   self,
  n,
  func
+
+ + + + + +
+   + + +

+

Parameters:
+ + + +
n for the number of segments that cut an edge
func for the python function that calculate the length of all segments
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Segment.LocalLength   self,
  l
[inherited]
+
+ + + + + +
+   + + +

+

Parameters:
+ + +
l for the length of segments that cut an edge
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Segment.NumberOfSegments   self,
  n,
  s = []
[inherited]
+
+ + + + + +
+   + + +

+

Parameters:
+ + + +
n for the number of segments that cut an edge
s for the scale factor (optional)
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Segment.Arithmetic1D   self,
  start,
  end
[inherited]
+
+ + + + + +
+   + + +

+

Parameters:
+ + + +
start for the length of the first segment
end for the length of the last segment
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Segment.StartEndLength   self,
  start,
  end
[inherited]
+
+ + + + + +
+   + + +

+

Parameters:
+ + + +
start for the length of the first segment
end for the length of the last segment
+
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Segment.Deflection1D   self,
  d
[inherited]
+
+ + + + + +
+   + + +

+

Parameters:
+ + +
d for the deflection
+
+
+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Segment.Propagation   self  )  [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Segment.AutomaticLength   self,
  fineness = 0
[inherited]
+
+ + + + + +
+   + + +

+

Parameters:
+ + +
fineness for the fineness [0-1]
+
+
+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Segment.QuadraticMesh   self  )  [inherited]
+
+ + + + + +
+   + + +

+If the 2D mesher sees that all boundary edges are quadratic ones, it generates quadratic faces, else it generates linear faces using medium nodes as if they were vertex ones. The 3D mesher generates quadratic volumes only if all boundary faces are quadratic ones, else it fails.

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetSubMesh   self  )  [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetAlgorithm   self  )  [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.TreatHypoStatus   self,
  status,
  hypName,
  geomName,
  isAlgo
[inherited]
+
+ + + + + +
+   + + +

+Print error message if a hypothesis was not assigned.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Create   self,
  mesh,
  geom,
  hypo,
  so = "libStdMeshersEngine.so"
[inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Hypothesis   self,
  hyp,
  args = [],
  so = "libStdMeshersEngine.so"
[inherited]
+
+ + + + + +
+   + + +

+

+


Field Documentation

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.mesh = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.mesh [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.geom = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.geom [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.subm = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.subm [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.algo = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.algo [inherited]
+
+ + + + + +
+   + + +

+

+ + diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment__Python__inherit__graph.jpg b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment__Python__inherit__graph.jpg new file mode 100644 index 000000000..68ae8f3e6 Binary files /dev/null and b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment__Python__inherit__graph.jpg differ diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment__inherit__graph.jpg b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment__inherit__graph.jpg new file mode 100644 index 000000000..a5de47112 Binary files /dev/null and b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Segment__inherit__graph.jpg differ diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Tetrahedron.html b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Tetrahedron.html new file mode 100644 index 000000000..e0064eea3 --- /dev/null +++ b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Tetrahedron.html @@ -0,0 +1,553 @@ + + +SALOME - SMESH - v.version: smesh.Mesh_Tetrahedron Class Reference + + + + +

smesh.Mesh_Tetrahedron Class Reference

Class to define a tetrahedron 3D algorithm. +More... +

+Inheritance diagram for smesh.Mesh_Tetrahedron:

Inheritance graph
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

def __init__
 Private constructor.
def MaxElementVolume
 Define "MaxElementVolume" hypothesis to give the maximun volume of each tetrahedral.
def GetSubMesh
def GetAlgorithm
 Return the wrapped mesher.
def TreatHypoStatus
 Private method.
def Create
 Private method.
def Hypothesis
 Private method.

Data Fields

 mesh
 geom
 subm
 algo

Static Public Attributes

int mesh = 0
int geom = 0
int subm = 0
int algo = 0
+

Detailed Description

+More details. +

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Tetrahedron.__init__   self,
  mesh,
  algo,
  geom = 0
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Tetrahedron.MaxElementVolume   self,
  vol
+
+ + + + + +
+   + + +

+

Parameters:
+ + +
vol for the maximum volume of each tetrahedral
+
+
+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetSubMesh   self  )  [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetAlgorithm   self  )  [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.TreatHypoStatus   self,
  status,
  hypName,
  geomName,
  isAlgo
[inherited]
+
+ + + + + +
+   + + +

+Print error message if a hypothesis was not assigned.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Create   self,
  mesh,
  geom,
  hypo,
  so = "libStdMeshersEngine.so"
[inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Hypothesis   self,
  hyp,
  args = [],
  so = "libStdMeshersEngine.so"
[inherited]
+
+ + + + + +
+   + + +

+

+


Field Documentation

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.mesh = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.mesh [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.geom = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.geom [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.subm = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.subm [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.algo = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.algo [inherited]
+
+ + + + + +
+   + + +

+

+ + diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Tetrahedron__inherit__graph.jpg b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Tetrahedron__inherit__graph.jpg new file mode 100644 index 000000000..78d01b1be Binary files /dev/null and b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Tetrahedron__inherit__graph.jpg differ diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Triangle.html b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Triangle.html new file mode 100644 index 000000000..718cfc3de --- /dev/null +++ b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Triangle.html @@ -0,0 +1,578 @@ + + +SALOME - SMESH - v.version: smesh.Mesh_Triangle Class Reference + + + + +

smesh.Mesh_Triangle Class Reference

Class to define a triangle 2D algorithm. +More... +

+Inheritance diagram for smesh.Mesh_Triangle:

Inheritance graph
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

def __init__
 Private constructor.
def MaxElementArea
 Define "MaxElementArea" hypothesis to give the maximun area of each triangles.
def LengthFromEdges
 Define "LengthFromEdges" hypothesis to build triangles based on the length of the edges taken from the wire.
def GetSubMesh
def GetAlgorithm
 Return the wrapped mesher.
def TreatHypoStatus
 Private method.
def Create
 Private method.
def Hypothesis
 Private method.

Data Fields

 mesh
 geom
 subm
 algo

Static Public Attributes

int mesh = 0
int geom = 0
int subm = 0
int algo = 0
+

Detailed Description

+More details. +

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Triangle.__init__   self,
  mesh,
  geom = 0
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Triangle.MaxElementArea   self,
  area
+
+ + + + + +
+   + + +

+

Parameters:
+ + +
area for the maximum area of each triangles
+
+
+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Triangle.LengthFromEdges   self  ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetSubMesh   self  )  [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + +
def smesh.Mesh_Algorithm.GetAlgorithm   self  )  [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.TreatHypoStatus   self,
  status,
  hypName,
  geomName,
  isAlgo
[inherited]
+
+ + + + + +
+   + + +

+Print error message if a hypothesis was not assigned.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Create   self,
  mesh,
  geom,
  hypo,
  so = "libStdMeshersEngine.so"
[inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def smesh.Mesh_Algorithm.Hypothesis   self,
  hyp,
  args = [],
  so = "libStdMeshersEngine.so"
[inherited]
+
+ + + + + +
+   + + +

+

+


Field Documentation

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.mesh = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.mesh [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.geom = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.geom [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.subm = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.subm [inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.Mesh_Algorithm.algo = 0 [static, inherited]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
smesh.Mesh_Algorithm.algo [inherited]
+
+ + + + + +
+   + + +

+

+ + diff --git a/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Triangle__inherit__graph.jpg b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Triangle__inherit__graph.jpg new file mode 100644 index 000000000..30692a195 Binary files /dev/null and b/doc/salome/gui/SMESH/smeshpy_doc/classsmesh_1_1Mesh__Triangle__inherit__graph.jpg differ diff --git a/doc/salome/gui/SMESH/smeshpy_doc/doxygen.css b/doc/salome/gui/SMESH/smeshpy_doc/doxygen.css new file mode 100644 index 000000000..dc9da5220 --- /dev/null +++ b/doc/salome/gui/SMESH/smeshpy_doc/doxygen.css @@ -0,0 +1,218 @@ +H1 { + text-align: center; + font-family: Geneva, Arial, Helvetica, sans-serif; +} +H2 { + font-family: Geneva, Arial, Helvetica, sans-serif; +} +CAPTION { font-weight: bold } +DIV.qindex { + width: 100%; + background-color: #eeeeff; + border: 1px solid #B0B0B0; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 120%; +} +A.qindex { + text-decoration: none; + font-weight: bold; + color: #1A419D; + padding: 2px; +} +A.qindex:visited { + text-decoration: none; + font-weight: bold; + color: #1A419D + padding: 2px; +} +A.qindex:hover { + text-decoration: none; + background-color: #ddddff; + padding: 2px; +} +A.qindexHL { + text-decoration: none; + font-weight: bold; + background-color: #6666cc; + color: #ffffff; + padding: 2px 6px; + border: 1px double #9295C2; +} +A.qindexHL:hover { + text-decoration: none; + background-color: #6666cc; + color: #ffffff; + padding: 2px 6px; +} +A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } +A.el { text-decoration: none; font-weight: bold } +A.elRef { font-weight: bold } +A.code { text-decoration: none; font-weight: normal; color: #1A419D} +A.codeRef { font-weight: normal; color: #1A419D} +A:hover { text-decoration: none; background-color: #f2f2ff } +DL.el { margin-left: -1cm } +PRE.fragment { + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + margin-top: 4px; + margin-bottom: 4px; + margin-left: 2px; + margin-right: 8px; + padding-left: 6px; + padding-right: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +DIV.fragment { + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + padding: 6px; +} +DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } +TD.md { background-color: #F4F4FB; font-weight: bold; } +TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; } +TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; } +DIV.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold; + font-family: Geneva, Arial, Helvetica, sans-serif; +} +DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller } +BODY { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} +TD.indexkey { + background-color: #eeeeff; + font-weight: bold; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TD.indexvalue { + background-color: #eeeeff; + font-style: italic; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TR.memlist { + background-color: #f0f0f0; +} +P.formulaDsp { text-align: center; } +IMG.formulaDsp { } +IMG.formulaInl { vertical-align: middle; } +SPAN.keyword { color: #008000 } +SPAN.keywordtype { color: #604020 } +SPAN.keywordflow { color: #e08000 } +SPAN.comment { color: #800000 } +SPAN.preprocessor { color: #806020 } +SPAN.stringliteral { color: #002080 } +SPAN.charliteral { color: #008080 } +.mdTable { + border: 1px solid #868686; + background-color: #F4F4FB; +} +.mdRow { + padding: 8px 10px; +} +.mdescLeft { + font-size: smaller; + font-style: italic; + background-color: #FAFAFA; + padding-left: 8px; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.mdescRight { + font-size: smaller; + font-style: italic; + background-color: #FAFAFA; + padding-left: 4px; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; + padding-bottom: 0px; + padding-right: 8px; +} +.memItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-style: solid; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-family: Geneva, Arial, Helvetica, sans-serif; + font-size: 12px; +} +.memItemRight { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-style: solid; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-family: Geneva, Arial, Helvetica, sans-serif; + font-size: 13px; +} +.search { color: #003399; + font-weight: bold; +} +FORM.search { + margin-bottom: 0px; + margin-top: 0px; +} +INPUT.search { font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #eeeeff; +} +TD.tiny { font-size: 75%; +} +a { + color: #252E78; +} +a:visited { + color: #3D2185; +} diff --git a/doc/salome/gui/SMESH/smeshpy_doc/namespacesmesh.html b/doc/salome/gui/SMESH/smeshpy_doc/namespacesmesh.html new file mode 100644 index 000000000..130b8881f --- /dev/null +++ b/doc/salome/gui/SMESH/smeshpy_doc/namespacesmesh.html @@ -0,0 +1,268 @@ + + +SALOME - SMESH - v.version: Package smesh + + + + +

Package smesh

+

+Python package smesh defines several classes, destined for easy and clear mesh creation and edition. +

Example.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

class  Mesh_Algorithm
 Mother class to define algorithm, recommended to don't use directly. More...
class  Mesh_Segment
 Class to define a segment 1D algorithm for discretization. More...
class  Mesh_Segment_Python
 Class to define a segment 1D algorithm for discretization with python function. More...
class  Mesh_Triangle
 Class to define a triangle 2D algorithm. More...
class  Mesh_Quadrangle
 Class to define a quadrangle 2D algorithm. More...
class  Mesh_Tetrahedron
 Class to define a tetrahedron 3D algorithm. More...
class  Mesh_Hexahedron
 Class to define a hexahedron 3D algorithm. More...
class  Mesh_Netgen
 Class to define a NETGEN-based 2D or 3D algorithm that need no discrete boundary (i.e. More...
class  Mesh
 Class to define a mesh. More...

Functions

def GetName
def SetName

Variables

int REGULAR = 1
int PYTHON = 2
int NETGEN = 3
int GHS3D = 4
tuple smesh = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH")
string NO_NAME = "NoName"
+


Function Documentation

+

+ + + + +
+ + + + + + + + + +
def smesh.GetName   obj  ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def smesh.SetName   obj,
  name
+
+ + + + + +
+   + + +

+

+


Variable Documentation

+

+ + + + +
+ + + + +
int smesh.REGULAR = 1 [static]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.PYTHON = 2 [static]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.NETGEN = 3 [static]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
int smesh.GHS3D = 4 [static]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
tuple smesh.smesh = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH") [static]
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + +
string smesh.NO_NAME = "NoName" [static]
+
+ + + + + +
+   + + +

+

+ + diff --git a/doc/salome/gui/SMESH/volume.htm b/doc/salome/gui/SMESH/volume.htm new file mode 100755 index 000000000..f55993eaf --- /dev/null +++ b/doc/salome/gui/SMESH/volume.htm @@ -0,0 +1,123 @@ + + + + + +Volume + + + + + + + + + + + +

Volume

+ +

Volume mesh quality + criterion reflects the volume of meshes of a 3D object.

+ +

+ +

To + apply the Volume quality criterion to your mesh:

+ +

1. Display your mesh in the viewer.

+ +

2. Choose Controls + > Volume or click button in the toolbar. Your + mesh will be displayed in the viewer with its elements colored according + to the applied mesh quality control criterion:

+ +

See Also + a sample TUI Script of a Volume quality control operation. +  

+ +

 

+ +

 

+ +

 

+ + + + diff --git a/doc/salome/gui/SMESH/whd_dpns.htm b/doc/salome/gui/SMESH/whd_dpns.htm new file mode 100755 index 000000000..1bca23603 --- /dev/null +++ b/doc/salome/gui/SMESH/whd_dpns.htm @@ -0,0 +1,43 @@ + + +Navigator Pane + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/salome/gui/SMESH/whd_hide0.gif b/doc/salome/gui/SMESH/whd_hide0.gif new file mode 100755 index 000000000..97ea0bb6d Binary files /dev/null and b/doc/salome/gui/SMESH/whd_hide0.gif differ diff --git a/doc/salome/gui/SMESH/whd_hide1.gif b/doc/salome/gui/SMESH/whd_hide1.gif new file mode 100755 index 000000000..97ea0bb6d Binary files /dev/null and b/doc/salome/gui/SMESH/whd_hide1.gif differ diff --git a/doc/salome/gui/SMESH/whd_hide2.gif b/doc/salome/gui/SMESH/whd_hide2.gif new file mode 100755 index 000000000..97ea0bb6d Binary files /dev/null and b/doc/salome/gui/SMESH/whd_hide2.gif differ diff --git a/doc/salome/gui/SMESH/whd_next0.gif b/doc/salome/gui/SMESH/whd_next0.gif new file mode 100755 index 000000000..d92dda522 Binary files /dev/null and b/doc/salome/gui/SMESH/whd_next0.gif differ diff --git a/doc/salome/gui/SMESH/whd_next1.gif b/doc/salome/gui/SMESH/whd_next1.gif new file mode 100755 index 000000000..d92dda522 Binary files /dev/null and b/doc/salome/gui/SMESH/whd_next1.gif differ diff --git a/doc/salome/gui/SMESH/whd_next2.gif b/doc/salome/gui/SMESH/whd_next2.gif new file mode 100755 index 000000000..d92dda522 Binary files /dev/null and b/doc/salome/gui/SMESH/whd_next2.gif differ diff --git a/doc/salome/gui/SMESH/whd_nvp10.htm b/doc/salome/gui/SMESH/whd_nvp10.htm new file mode 100755 index 000000000..a57fe1e49 --- /dev/null +++ b/doc/salome/gui/SMESH/whd_nvp10.htm @@ -0,0 +1,15 @@ + + +Navigation Pane + + + + + + + + + + + + diff --git a/doc/salome/gui/SMESH/whd_nvp20.htm b/doc/salome/gui/SMESH/whd_nvp20.htm new file mode 100755 index 000000000..c5754bc41 --- /dev/null +++ b/doc/salome/gui/SMESH/whd_nvp20.htm @@ -0,0 +1,334 @@ + + +navigation pane + + + + + + + + + + + + + + + + + diff --git a/doc/salome/gui/SMESH/whd_prev0.gif b/doc/salome/gui/SMESH/whd_prev0.gif new file mode 100755 index 000000000..518561a0d Binary files /dev/null and b/doc/salome/gui/SMESH/whd_prev0.gif differ diff --git a/doc/salome/gui/SMESH/whd_prev1.gif b/doc/salome/gui/SMESH/whd_prev1.gif new file mode 100755 index 000000000..518561a0d Binary files /dev/null and b/doc/salome/gui/SMESH/whd_prev1.gif differ diff --git a/doc/salome/gui/SMESH/whd_prev2.gif b/doc/salome/gui/SMESH/whd_prev2.gif new file mode 100755 index 000000000..518561a0d Binary files /dev/null and b/doc/salome/gui/SMESH/whd_prev2.gif differ diff --git a/doc/salome/gui/SMESH/whd_show0.gif b/doc/salome/gui/SMESH/whd_show0.gif new file mode 100755 index 000000000..60e8e6897 Binary files /dev/null and b/doc/salome/gui/SMESH/whd_show0.gif differ diff --git a/doc/salome/gui/SMESH/whd_show1.gif b/doc/salome/gui/SMESH/whd_show1.gif new file mode 100755 index 000000000..60e8e6897 Binary files /dev/null and b/doc/salome/gui/SMESH/whd_show1.gif differ diff --git a/doc/salome/gui/SMESH/whd_show2.gif b/doc/salome/gui/SMESH/whd_show2.gif new file mode 100755 index 000000000..60e8e6897 Binary files /dev/null and b/doc/salome/gui/SMESH/whd_show2.gif differ diff --git a/doc/salome/gui/SMESH/whd_sync0.gif b/doc/salome/gui/SMESH/whd_sync0.gif new file mode 100755 index 000000000..1a9785ce6 Binary files /dev/null and b/doc/salome/gui/SMESH/whd_sync0.gif differ diff --git a/doc/salome/gui/SMESH/whd_sync1.gif b/doc/salome/gui/SMESH/whd_sync1.gif new file mode 100755 index 000000000..1a9785ce6 Binary files /dev/null and b/doc/salome/gui/SMESH/whd_sync1.gif differ diff --git a/doc/salome/gui/SMESH/whd_sync2.gif b/doc/salome/gui/SMESH/whd_sync2.gif new file mode 100755 index 000000000..1a9785ce6 Binary files /dev/null and b/doc/salome/gui/SMESH/whd_sync2.gif differ diff --git a/doc/salome/gui/SMESH/whd_tab0.gif b/doc/salome/gui/SMESH/whd_tab0.gif new file mode 100755 index 000000000..955c42f47 Binary files /dev/null and b/doc/salome/gui/SMESH/whd_tab0.gif differ diff --git a/doc/salome/gui/SMESH/whd_tab1.gif b/doc/salome/gui/SMESH/whd_tab1.gif new file mode 100755 index 000000000..b3ec41d6d Binary files /dev/null and b/doc/salome/gui/SMESH/whd_tab1.gif differ diff --git a/doc/salome/gui/SMESH/whd_tab2.gif b/doc/salome/gui/SMESH/whd_tab2.gif new file mode 100755 index 000000000..08fb0ce4f Binary files /dev/null and b/doc/salome/gui/SMESH/whd_tab2.gif differ diff --git a/doc/salome/gui/SMESH/whd_tab3.gif b/doc/salome/gui/SMESH/whd_tab3.gif new file mode 100755 index 000000000..1819c8e8f Binary files /dev/null and b/doc/salome/gui/SMESH/whd_tab3.gif differ diff --git a/doc/salome/gui/SMESH/whd_tab4.gif b/doc/salome/gui/SMESH/whd_tab4.gif new file mode 100755 index 000000000..1a6fc4f4a Binary files /dev/null and b/doc/salome/gui/SMESH/whd_tab4.gif differ diff --git a/doc/salome/gui/SMESH/whd_tab5.gif b/doc/salome/gui/SMESH/whd_tab5.gif new file mode 100755 index 000000000..934019260 Binary files /dev/null and b/doc/salome/gui/SMESH/whd_tab5.gif differ diff --git a/doc/salome/gui/SMESH/whd_tab6.gif b/doc/salome/gui/SMESH/whd_tab6.gif new file mode 100755 index 000000000..fe312d238 Binary files /dev/null and b/doc/salome/gui/SMESH/whd_tab6.gif differ diff --git a/doc/salome/gui/SMESH/whd_tab7.gif b/doc/salome/gui/SMESH/whd_tab7.gif new file mode 100755 index 000000000..3b95ae24e Binary files /dev/null and b/doc/salome/gui/SMESH/whd_tab7.gif differ diff --git a/doc/salome/gui/SMESH/whd_tab8.gif b/doc/salome/gui/SMESH/whd_tab8.gif new file mode 100755 index 000000000..c80acc8d5 Binary files /dev/null and b/doc/salome/gui/SMESH/whd_tab8.gif differ diff --git a/doc/salome/gui/SMESH/whd_tabs.htm b/doc/salome/gui/SMESH/whd_tabs.htm new file mode 100755 index 000000000..1568f573d --- /dev/null +++ b/doc/salome/gui/SMESH/whd_tabs.htm @@ -0,0 +1,533 @@ + + +WebHelp Tabs Frame in Navigation Pane + + + + + + + + + + + \ No newline at end of file diff --git a/doc/salome/gui/SMESH/whd_toc1.gif b/doc/salome/gui/SMESH/whd_toc1.gif new file mode 100755 index 000000000..11017258c Binary files /dev/null and b/doc/salome/gui/SMESH/whd_toc1.gif differ diff --git a/doc/salome/gui/SMESH/whd_toc2.gif b/doc/salome/gui/SMESH/whd_toc2.gif new file mode 100755 index 000000000..975e5f6f4 Binary files /dev/null and b/doc/salome/gui/SMESH/whd_toc2.gif differ diff --git a/doc/salome/gui/SMESH/whd_toc3.gif b/doc/salome/gui/SMESH/whd_toc3.gif new file mode 100755 index 000000000..4b8122f0f Binary files /dev/null and b/doc/salome/gui/SMESH/whd_toc3.gif differ diff --git a/doc/salome/gui/SMESH/whd_toc4.gif b/doc/salome/gui/SMESH/whd_toc4.gif new file mode 100755 index 000000000..3f9a03686 Binary files /dev/null and b/doc/salome/gui/SMESH/whd_toc4.gif differ diff --git a/doc/salome/gui/SMESH/whd_topic.xml b/doc/salome/gui/SMESH/whd_topic.xml new file mode 100755 index 000000000..a1b0320fb --- /dev/null +++ b/doc/salome/gui/SMESH/whd_topic.xml @@ -0,0 +1,85 @@ + + + + + + + + + + +"]]> + + + + +"]]> + + + + +"; +OutputInTopicNavBarDataWebSearch.form();]]> + + + + + + + + + + +"]]> + + + diff --git a/doc/salome/gui/SMESH/whd_wbsh0.gif b/doc/salome/gui/SMESH/whd_wbsh0.gif new file mode 100755 index 000000000..383688e7c Binary files /dev/null and b/doc/salome/gui/SMESH/whd_wbsh0.gif differ diff --git a/doc/salome/gui/SMESH/whd_wbsh1.gif b/doc/salome/gui/SMESH/whd_wbsh1.gif new file mode 100755 index 000000000..383688e7c Binary files /dev/null and b/doc/salome/gui/SMESH/whd_wbsh1.gif differ diff --git a/doc/salome/gui/SMESH/whd_wbsh2.gif b/doc/salome/gui/SMESH/whd_wbsh2.gif new file mode 100755 index 000000000..383688e7c Binary files /dev/null and b/doc/salome/gui/SMESH/whd_wbsh2.gif differ diff --git a/doc/salome/gui/SMESH/whgdata/whlstf13.htm b/doc/salome/gui/SMESH/whgdata/whlstf13.htm new file mode 100755 index 000000000..8275a922c --- /dev/null +++ b/doc/salome/gui/SMESH/whgdata/whlstf13.htm @@ -0,0 +1,46 @@ + + +Search Words List + + + + + + + +

<<

+

+will 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
window
wire 1 2 3 4 5 6 7
wire_discretisation
wireframe 1 2 3
wires
wish 1 2 3 4
within 1 2 3
without 1 2
words
work
works
worst
would 1 2
ww
+

+x 1 2 3
x0
+

+y 1 2
y0
your 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
+

+z 1 2
z0
zero
zoom


+ + + + diff --git a/doc/salome/tui/SMESH/doxyfile.in b/doc/salome/tui/SMESH/doxyfile.in new file mode 100755 index 000000000..e9705fdea --- /dev/null +++ b/doc/salome/tui/SMESH/doxyfile.in @@ -0,0 +1,242 @@ +# Doxyfile 1.4.6 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = "SALOME - SMESH - v.@VERSION@" +PROJECT_NUMBER = +OUTPUT_DIRECTORY = ../ +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = NO +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = YES +INLINE_INHERITED_MEMB = YES +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = ../../../share/salome \ + ../../../build/salome +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 5 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = YES +BUILTIN_STL_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = YES +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = NO +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 25 +SHOW_USED_FILES = NO +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = log.txt + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = ../../../share/salome/src \ + ../../../share/salome/idl \ + ../../../build/salome/bin +FILE_PATTERNS = *.hxx *.cxx *.h *.c *.hh *.cc *.idl python_extension_must_be_here +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = sources/ +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = YES + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 3 +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = SMESH +HTML_FILE_EXTENSION = .html +HTML_HEADER = sources/myheader.html +HTML_FOOTER = sources/footer.html +HTML_STYLESHEET = sources/static/doxygen.css +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = YES +TOC_EXPAND = YES +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = NO + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = NO +HAVE_DOT = YES +CLASS_GRAPH = YES +COLLABORATION_GRAPH = NO +GROUP_GRAPHS = NO +UML_LOOK = NO +TEMPLATE_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = NO +CALL_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = jpg +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1200 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = NO +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/doc/salome/tui/SMESH/doxyfile_py.in b/doc/salome/tui/SMESH/doxyfile_py.in new file mode 100755 index 000000000..78d1407fd --- /dev/null +++ b/doc/salome/tui/SMESH/doxyfile_py.in @@ -0,0 +1,242 @@ +# Doxyfile 1.4.6 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = "SALOME - SMESH - v.@VERSION@" +PROJECT_NUMBER = +OUTPUT_DIRECTORY = ../ +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = NO +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = YES +INLINE_INHERITED_MEMB = YES +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = ../../../share/salome \ + ../../../build/salome +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 5 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = YES +BUILTIN_STL_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = YES +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = NO +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 25 +SHOW_USED_FILES = NO +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = log.txt + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = ../../../share/salome/src \ + ../../../share/salome/idl \ + ../../../build/salome/bin +FILE_PATTERNS = *.hxx *.cxx *.h *.c *.hh *.cc *.idl python_extension_must_be_here +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = sources/ +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = YES + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 3 +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = SMESH +HTML_FILE_EXTENSION = .html +HTML_HEADER = sources/myheader.html +HTML_FOOTER = sources/footer.html +HTML_STYLESHEET = sources/static/doxygen.css +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = YES +TOC_EXPAND = YES +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = NO + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = NO +HAVE_DOT = YES +CLASS_GRAPH = YES +COLLABORATION_GRAPH = NO +GROUP_GRAPHS = NO +UML_LOOK = NO +TEMPLATE_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = NO +CALL_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = jpg +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1200 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = NO +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/doc/salome/tui/SMESH/sources/footer.html b/doc/salome/tui/SMESH/sources/footer.html new file mode 100755 index 000000000..cb55f397a --- /dev/null +++ b/doc/salome/tui/SMESH/sources/footer.html @@ -0,0 +1,5 @@ + + + + diff --git a/doc/salome/tui/SMESH/sources/static/tree.js.in b/doc/salome/tui/SMESH/sources/static/tree.js.in new file mode 100755 index 000000000..36d021fcb --- /dev/null +++ b/doc/salome/tui/SMESH/sources/static/tree.js.in @@ -0,0 +1,29 @@ +foldersTree = gFld("SALOME v.@VERSION@ ", "", "") + insDoc(foldersTree, gLnk("Main Page", "", "main.html")) + +aux1 = insFld(foldersTree, gFld("TUI Reference Guide", "")) + aux2 = insFld(aux1, gFld("Modules", "")) + aux3 = insFld(aux2, gFld("SALOME SMESH module", "")) +/*! insDoc(aux3, gLnk("Overview", "", "overview_SMESH.html"))*/ + aux4 = insFld(aux3, gFld("Packages", "")) + insDoc(aux4, gLnk("SMESH", "", "namespaceSMESH.html")) +/*! insDoc(aux3, gLnk("Examples", "", "examples_SMESH.html")) +*/ + + insDoc(aux1, gLnk("Data Structures", "", "annotated.html")) + insDoc(aux1, gLnk("Class Hierarchy", "", "hierarchy.html")) + insDoc(aux1, gLnk("Class methods list", "", "functions.html")) + insDoc(aux1, gLnk("Namespace Members", "", "namespacemembers.html")) + insDoc(aux1, gLnk("File List", "", "files.html")) + +aux1 = insFld(foldersTree, gFld("IDL/Python mapping", "")) + insDoc(aux1, gLnk("Mapping of SMESH IDL definitions to Python language", "", "page2.html")) + +aux1 = insFld(foldersTree, gFld("Python Commands", "", "meshpy_doc/main.html")) + insDoc(aux1, gLnk("Package List", "", "meshpy_doc/namespaces.html")) + insDoc(aux1, gLnk("Data Structures", "", "meshpy_doc/annotated.html")) + insDoc(aux1, gLnk("Namespace Members", "", "meshpy_doc/namespacemembers.html")) + insDoc(aux1, gLnk("File List", "", "meshpy_doc/files.html")) + +aux1 = insFld(foldersTree, gFld("Adding meshers in SMESH", "")) + insDoc(aux1, gLnk("Using Plugin mechanism in SMESH", "", "PluginMeshers.html")) diff --git a/resources/SMESHCatalog.xml.in b/resources/SMESHCatalog.xml.in new file mode 100644 index 000000000..d5d2bb072 --- /dev/null +++ b/resources/SMESHCatalog.xml.in @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + SMESH + Mesh + MESH + NRI + @VERSION@ + Mesh component + 1 + ModuleMesh.png + 1 + + + SMESH + + + + CreateHypothesis + + + + 1 + + + string + anHyp + + + + long + studyId + + + + + + SMESH_Hypothesis + aHyp + + + + + + Init + + + + 1 + + + GEOM_Gen + geomEngine + + + + long + studyId + + + + GEOM_Shape + aShape + + + + + + SMESH_Mesh + aMesh + + + + + + Compute + + + + 1 + + + SMESH_Mesh + aMesh + + + + GEOM_Shape + aSubShape + + + + + + boolean + res + Result + + + + + IsReadyToCompute + + + + 1 + + + SMESH_Mesh + aMesh + + + + GEOM_Shape + aSubShape + + + + + boolean + res + Result + + + + SMESH_Mesh + + + + AddHypothesis + + + + 1 + + + GEOM_Shape + aSubShape + + + + SMESH_Hypothesis + aHyp + + + + + + boolean + res + Result + + + + + + hostname = localhost + + + diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml new file mode 100644 index 000000000..3b4db83ca --- /dev/null +++ b/resources/SalomeApp.xml @@ -0,0 +1,47 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
diff --git a/resources/mesh_conv_to_quad.png b/resources/mesh_conv_to_quad.png new file mode 100755 index 000000000..ae39c7e0a Binary files /dev/null and b/resources/mesh_conv_to_quad.png differ diff --git a/resources/mesh_tree_algo_netgen_2d.png b/resources/mesh_tree_algo_netgen_2d.png new file mode 100755 index 000000000..092eae3c0 Binary files /dev/null and b/resources/mesh_tree_algo_netgen_2d.png differ diff --git a/resources/mesh_tree_algo_netgen_2d3d.png b/resources/mesh_tree_algo_netgen_2d3d.png new file mode 100644 index 000000000..eeaf98afe Binary files /dev/null and b/resources/mesh_tree_algo_netgen_2d3d.png differ diff --git a/resources/mesh_tree_hypo_netgen.png b/resources/mesh_tree_hypo_netgen.png new file mode 100644 index 000000000..ad5e9f3c4 Binary files /dev/null and b/resources/mesh_tree_hypo_netgen.png differ diff --git a/resources/mesh_tree_hypo_netgen_2d.png b/resources/mesh_tree_hypo_netgen_2d.png new file mode 100644 index 000000000..cd813c86a Binary files /dev/null and b/resources/mesh_tree_hypo_netgen_2d.png differ diff --git a/src/DriverUNV/UNV2417_Structure.cxx b/src/DriverUNV/UNV2417_Structure.cxx new file mode 100644 index 000000000..67d2cbe25 --- /dev/null +++ b/src/DriverUNV/UNV2417_Structure.cxx @@ -0,0 +1,184 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#include "UNV2417_Structure.hxx" +#include "UNV_Utilities.hxx" + +#include +#include + +using namespace std; +using namespace UNV; +using namespace UNV2417; + +#ifdef _DEBUG_ +static int MYDEBUG = 0; +#else +static int MYDEBUG = 0; +#endif + + +static string _group_labels[] = {"2417", "2429", "2430", "2432", "2435", "2452", "2467"}; +#define NBGROUP 7 + +static string _label_dataset = "2467"; + +void UNV2417::Read(std::ifstream& in_stream, TDataSet& theDataSet) +{ + if(!in_stream.good()) + EXCEPTION(runtime_error,"ERROR: Input file not good."); + + std::string olds, news; + + while(true){ + in_stream >> olds >> news; + /* + * a "-1" followed by a number means the beginning of a dataset + * stop combing at the end of the file + */ + while( ((olds != "-1") || (news == "-1") ) && !in_stream.eof() ){ + olds = news; + in_stream >> news; + } + if(in_stream.eof()) + return; + for (int i = 0; i < NBGROUP; i++) { + if (news == _group_labels[i]) { + ReadGroup(news, in_stream, theDataSet); + } + } + } +} + + + +void UNV2417::ReadGroup(const std::string& myGroupLabel, std::ifstream& in_stream, TDataSet& theDataSet) +{ + TGroupId aId; + for(; !in_stream.eof();){ + in_stream >> aId ; + if(aId == -1){ + // end of dataset is reached + break; + } + + int n_nodes; + TRecord aRec; + int aTmp; + in_stream>>aTmp; // miss not necessary values + in_stream>>aTmp; + in_stream>>aTmp; + in_stream>>aTmp; + in_stream>>aTmp; + in_stream>>aTmp; + in_stream>>n_nodes; + + std::getline(in_stream, aRec.GroupName, '\n'); // Finalise previous reading + std::getline(in_stream, aRec.GroupName, '\n'); + + int aElType; + int aElId; + int aNum; + for(int j=0; j < n_nodes; j++){ + in_stream>>aElType; + in_stream>>aElId; + if ((myGroupLabel.compare("2435") == 0) || (myGroupLabel.compare("2452") == 0) || (myGroupLabel.compare("2467") == 0)) { + in_stream>>aTmp; + in_stream>>aTmp; + } + switch (aElType) { + case 7: // Nodes + aNum = aRec.NodeList.size(); + aRec.NodeList.resize(aNum + 1); + aRec.NodeList[aNum] = aElId; + break; + case 8: // Elements + aNum = aRec.ElementList.size(); + aRec.ElementList.resize(aNum + 1); + aRec.ElementList[aNum] = aElId; + break; + } + } + theDataSet.insert(TDataSet::value_type(aId,aRec)); + } + +} + + +void UNV2417::Write(std::ofstream& out_stream, const TDataSet& theDataSet) +{ + if(!out_stream.good()) + EXCEPTION(runtime_error,"ERROR: Output file not good."); + + /* + * Write beginning of dataset + */ + out_stream<<" -1\n"; + out_stream<<" "<<_label_dataset<<"\n"; + + TDataSet::const_iterator anIter = theDataSet.begin(); + for(; anIter != theDataSet.end(); anIter++){ + const TGroupId& aLabel = anIter->first; + const TRecord& aRec = anIter->second; + int aNbNodes = aRec.NodeList.size(); + int aNbElements = aRec.ElementList.size(); + int aNbRecords = aNbNodes + aNbElements; + + out_stream< +#include +#include +#include + + +namespace UNV2417{ + + typedef std::vector TListOfId; // Nodal connectivitiesList of Id + + struct TRecord{ + std::string GroupName; + TListOfId NodeList; + TListOfId ElementList; + }; + + typedef int TGroupId; // type of element label + typedef std::map TDataSet; + + void Read(std::ifstream& in_stream, TDataSet& theDataSet); + void ReadGroup(const std::string& myGroupLabel, std::ifstream& in_stream, TDataSet& theDataSet); + + void Write(std::ofstream& out_stream, const TDataSet& theDataSet); +}; + + +#endif diff --git a/src/SMDS/SMDS_QuadraticEdge.cxx b/src/SMDS/SMDS_QuadraticEdge.cxx new file mode 100644 index 000000000..1dac4ef13 --- /dev/null +++ b/src/SMDS/SMDS_QuadraticEdge.cxx @@ -0,0 +1,187 @@ +// SMESH SMDS : implementaion of Salome mesh data structure +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File: SMDS_QuadraticEdge.cxx +// Created: 16.01.06 16:25:42 +// Author: Sergey KUUL + + +#include "SMDS_QuadraticEdge.hxx" + +#include "SMDS_SetIterator.hxx" +#include "SMDS_IteratorOfElements.hxx" +#include "SMDS_MeshNode.hxx" + +using namespace std; + +//======================================================================= +//function : SMDS_QuadraticEdge +//purpose : +//======================================================================= + +SMDS_QuadraticEdge::SMDS_QuadraticEdge(const SMDS_MeshNode * node1, + const SMDS_MeshNode * node2, + const SMDS_MeshNode * node12) + :SMDS_MeshEdge(node1,node2) +{ + myNodes[2]=node12; +} + + +//======================================================================= +//function : Print +//purpose : +//======================================================================= + +void SMDS_QuadraticEdge::Print(ostream & OS) const +{ + OS << "quadratic edge <" << GetID() << "> : ( first-" << myNodes[0] + << " , last-" << myNodes[1] << " , medium-" << myNodes[2] << ") " << endl; +} + + +//======================================================================= +//function : NbNodes +//purpose : +//======================================================================= + +int SMDS_QuadraticEdge::NbNodes() const +{ + return 3; +} + +//======================================================================= +//function : ChangeNodes +//purpose : +//======================================================================= + +bool SMDS_QuadraticEdge::ChangeNodes(const SMDS_MeshNode * node1, + const SMDS_MeshNode * node2, + const SMDS_MeshNode * node12) +{ + myNodes[0]=node1; + myNodes[1]=node2; + myNodes[2]=node12; + return true; +} + +//======================================================================= +//function : IsMediumNode +//purpose : +//======================================================================= + +bool SMDS_QuadraticEdge::IsMediumNode(const SMDS_MeshNode * node) const +{ + return (myNodes[2]==node); +} + +namespace +{ + //======================================================================= + //class : _MyInterlacedNodeIterator + //purpose : + //======================================================================= + + class _MyInterlacedNodeIterator: public SMDS_NodeArrayIterator + { + const SMDS_MeshNode * myNodes[3]; + public: + _MyInterlacedNodeIterator(const SMDS_MeshNode * const * nodes): + SMDS_NodeArrayIterator( myNodes, & myNodes[3] ) + { + myNodes[0] = nodes[0]; + myNodes[1] = nodes[2]; + myNodes[2] = nodes[1]; + } + }; + + //======================================================================= + //class : _MyInterlacedNodeElemIterator + //purpose : + //======================================================================= + + class _MyInterlacedNodeElemIterator : public SMDS_ElemIterator + { + SMDS_NodeIteratorPtr myItr; + public: + _MyInterlacedNodeElemIterator(SMDS_NodeIteratorPtr interlacedNodeItr): + myItr( interlacedNodeItr ) {} + bool more() { return myItr->more(); } + const SMDS_MeshElement* next() { return myItr->next(); } + }; + + //======================================================================= + //class : _MyNodeIterator + //purpose : + //======================================================================= + + class _MyNodeIterator:public SMDS_NodeArrayElemIterator + { + public: + _MyNodeIterator(const SMDS_MeshNode * const * nodes): + SMDS_NodeArrayElemIterator( nodes, & nodes[3] ) {} + }; +} + +//======================================================================= +//function : interlacedNodesIterator +//purpose : +//======================================================================= + +SMDS_NodeIteratorPtr SMDS_QuadraticEdge::interlacedNodesIterator() const +{ + return SMDS_NodeIteratorPtr (new _MyInterlacedNodeIterator (myNodes)); +} + + +//======================================================================= +//function : interlacedNodesElemIterator +//purpose : +//======================================================================= + +SMDS_ElemIteratorPtr SMDS_QuadraticEdge::interlacedNodesElemIterator() const +{ + return SMDS_ElemIteratorPtr + (new _MyInterlacedNodeElemIterator ( interlacedNodesIterator() )); +} + +//======================================================================= +//function : elementsIterator +//purpose : +//======================================================================= + +SMDS_ElemIteratorPtr SMDS_QuadraticEdge::elementsIterator(SMDSAbs_ElementType type) const +{ + switch(type) + { + case SMDSAbs_Edge: + return SMDS_MeshElement::elementsIterator(SMDSAbs_Edge); + case SMDSAbs_Node: + return SMDS_ElemIteratorPtr(new _MyNodeIterator(myNodes)); + default: + return SMDS_ElemIteratorPtr + (new SMDS_IteratorOfElements + (this,type, SMDS_ElemIteratorPtr(new _MyNodeIterator(myNodes)))); + } +} + diff --git a/src/SMDS/SMDS_QuadraticEdge.hxx b/src/SMDS/SMDS_QuadraticEdge.hxx new file mode 100644 index 000000000..6c6099602 --- /dev/null +++ b/src/SMDS/SMDS_QuadraticEdge.hxx @@ -0,0 +1,62 @@ +// SMESH SMDS : implementaion of Salome mesh data structure +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : SMDS_QuadraticEdge.hxx +// Module : SMESH + +#ifndef _SMDS_QuadraticEdge_HeaderFile +#define _SMDS_QuadraticEdge_HeaderFile + +#include "SMDS_MeshEdge.hxx" +#include + +class SMDS_WNT_EXPORT SMDS_QuadraticEdge: public SMDS_MeshEdge +{ + +public: + SMDS_QuadraticEdge(const SMDS_MeshNode * node1, + const SMDS_MeshNode * node2, + const SMDS_MeshNode * node12); + + bool ChangeNodes(const SMDS_MeshNode * node1, + const SMDS_MeshNode * node2, + const SMDS_MeshNode * node12); + + void Print(std::ostream & OS) const; + + int NbNodes() const; + + virtual bool IsQuadratic() const { return true; } + + virtual bool IsMediumNode(const SMDS_MeshNode* node) const; + + SMDS_NodeIteratorPtr interlacedNodesIterator() const; + + SMDS_ElemIteratorPtr interlacedNodesElemIterator() const; + +protected: + SMDS_ElemIteratorPtr + elementsIterator(SMDSAbs_ElementType type) const; + +}; +#endif diff --git a/src/SMDS/SMDS_QuadraticFaceOfNodes.cxx b/src/SMDS/SMDS_QuadraticFaceOfNodes.cxx new file mode 100644 index 000000000..fa4249e66 --- /dev/null +++ b/src/SMDS/SMDS_QuadraticFaceOfNodes.cxx @@ -0,0 +1,281 @@ +// SMESH SMDS : implementaion of Salome mesh data structure +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File: SMDS_QuadraticFaceOfNodes.cxx +// Created: 16.01.06 17:12:58 +// Author: Sergey KUUL + +#include "SMDS_QuadraticFaceOfNodes.hxx" + +#include "SMDS_SetIterator.hxx" +#include "SMDS_IteratorOfElements.hxx" +#include "SMDS_MeshNode.hxx" + +#include "utilities.h" + +using namespace std; + + +//======================================================================= +//function : SMDS_QuadraticFaceOfNodes() +//purpose : Constructor +//======================================================================= + +SMDS_QuadraticFaceOfNodes::SMDS_QuadraticFaceOfNodes(const SMDS_MeshNode * n1, + const SMDS_MeshNode * n2, + const SMDS_MeshNode * n3, + const SMDS_MeshNode * n12, + const SMDS_MeshNode * n23, + const SMDS_MeshNode * n31) +{ + myNodes.resize( 6 ); + myNodes[ 0 ] = n1; + myNodes[ 1 ] = n2; + myNodes[ 2 ] = n3; + myNodes[ 3 ] = n12; + myNodes[ 4 ] = n23; + myNodes[ 5 ] = n31; +} + + +//======================================================================= +//function : SMDS_QuadraticFaceOfNodes() +//purpose : Constructor +//======================================================================= + +SMDS_QuadraticFaceOfNodes::SMDS_QuadraticFaceOfNodes(const SMDS_MeshNode * n1, + const SMDS_MeshNode * n2, + const SMDS_MeshNode * n3, + const SMDS_MeshNode * n4, + const SMDS_MeshNode * n12, + const SMDS_MeshNode * n23, + const SMDS_MeshNode * n34, + const SMDS_MeshNode * n41) +{ + myNodes.resize( 8 ); + myNodes[ 0 ] = n1; + myNodes[ 1 ] = n2; + myNodes[ 2 ] = n3; + myNodes[ 3 ] = n4; + myNodes[ 4 ] = n12; + myNodes[ 5 ] = n23; + myNodes[ 6 ] = n34; + myNodes[ 7 ] = n41; +} + + +//======================================================================= +//function : IsMediumNode +//purpose : +//======================================================================= + +bool SMDS_QuadraticFaceOfNodes::IsMediumNode(const SMDS_MeshNode * node) const +{ + int i=NbNodes()/2; + for(; i : "; + int i, nbNodes = myNodes.size(); + for (i = 0; i < nbNodes - 1; i++) + OS << myNodes[i] << ","; + OS << myNodes[i] << ") " << endl; +} + +namespace { + + //======================================================================= + //class : _MyInterlacedNodeIterator + //purpose : + //======================================================================= + + class _MyInterlacedNodeIterator:public SMDS_NodeIterator + { + const vector& mySet; + int myIndex; + const int * myInterlace; + public: + _MyInterlacedNodeIterator(const vector& s, + const int * interlace): + mySet(s),myIndex(0),myInterlace(interlace) {} + + bool more() + { + return myIndex < mySet.size(); + } + + const SMDS_MeshNode* next() + { + return mySet[ myInterlace[ myIndex++ ]]; + } + }; + + //======================================================================= + //class : _MyInterlacedNodeElemIterator + //purpose : + //======================================================================= + + class _MyInterlacedNodeElemIterator : public SMDS_ElemIterator + { + SMDS_NodeIteratorPtr myItr; + public: + _MyInterlacedNodeElemIterator(SMDS_NodeIteratorPtr interlacedNodeItr): + myItr( interlacedNodeItr ) {} + bool more() { return myItr->more(); } + const SMDS_MeshElement* next() { return myItr->next(); } + }; + + //======================================================================= + //class : _MyNodeIterator + //purpose : + //======================================================================= + + class _MyNodeIterator : public SMDS_NodeVectorElemIterator + { + public: + _MyNodeIterator(const vector& s): + SMDS_NodeVectorElemIterator( s.begin(), s.end() ) {} + }; + +} + +//======================================================================= +//function : interlacedNodesIterator +//purpose : +//======================================================================= + +SMDS_NodeIteratorPtr SMDS_QuadraticFaceOfNodes::interlacedNodesIterator() const +{ + static int triaInterlace [] = { 0, 3, 1, 4, 2, 5 }; + static int quadInterlace [] = { 0, 4, 1, 5, 2, 6, 3, 7 }; + return SMDS_NodeIteratorPtr + (new _MyInterlacedNodeIterator (myNodes, myNodes.size()==6 ? triaInterlace : quadInterlace)); +} + +//======================================================================= +//function : interlacedNodesElemIterator +//purpose : +//======================================================================= + +SMDS_ElemIteratorPtr SMDS_QuadraticFaceOfNodes::interlacedNodesElemIterator() const +{ + return SMDS_ElemIteratorPtr + (new _MyInterlacedNodeElemIterator ( interlacedNodesIterator() )); +} + +//======================================================================= +//function : elementsIterator +//purpose : +//======================================================================= + +SMDS_ElemIteratorPtr SMDS_QuadraticFaceOfNodes::elementsIterator + (SMDSAbs_ElementType type) const +{ + switch(type) + { + case SMDSAbs_Face: + return SMDS_MeshElement::elementsIterator(SMDSAbs_Face); + case SMDSAbs_Node: + return SMDS_ElemIteratorPtr(new _MyNodeIterator(myNodes)); + case SMDSAbs_Edge: + MESSAGE("Error : edge iterator for SMDS_QuadraticFaceOfNodes not implemented"); + break; + default: + return SMDS_ElemIteratorPtr + (new SMDS_IteratorOfElements + (this,type,SMDS_ElemIteratorPtr (new _MyNodeIterator(myNodes)))); + } + return SMDS_ElemIteratorPtr(); +} + +/*! + * \brief Return node by its index + * \param ind - node index + * \retval const SMDS_MeshNode* - the node + * + * Index is wrapped if it is out of a valid range + */ +const SMDS_MeshNode* SMDS_QuadraticFaceOfNodes::GetNode(const int ind) const +{ + return myNodes[ WrappedIndex( ind )]; +} + diff --git a/src/SMDS/SMDS_QuadraticFaceOfNodes.hxx b/src/SMDS/SMDS_QuadraticFaceOfNodes.hxx new file mode 100644 index 000000000..d174e813e --- /dev/null +++ b/src/SMDS/SMDS_QuadraticFaceOfNodes.hxx @@ -0,0 +1,84 @@ +// SMESH SMDS : implementaion of Salome mesh data structure +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : SMDS_QuadraticVolumeOfNodes.hxx +// Module : SMESH + +#ifndef _SMDS_QuadraticFaceOfNodes_HeaderFile +#define _SMDS_QuadraticFaceOfNodes_HeaderFile + +#include "SMDS_MeshFace.hxx" + +class SMDS_WNT_EXPORT SMDS_QuadraticFaceOfNodes:public SMDS_MeshFace +{ +public: + SMDS_QuadraticFaceOfNodes (const SMDS_MeshNode * n1, + const SMDS_MeshNode * n2, + const SMDS_MeshNode * n3, + const SMDS_MeshNode * n12, + const SMDS_MeshNode * n23, + const SMDS_MeshNode * n31); + + SMDS_QuadraticFaceOfNodes(const SMDS_MeshNode * n1, + const SMDS_MeshNode * n2, + const SMDS_MeshNode * n3, + const SMDS_MeshNode * n4, + const SMDS_MeshNode * n12, + const SMDS_MeshNode * n23, + const SMDS_MeshNode * n34, + const SMDS_MeshNode * n41); + + virtual bool IsQuadratic() const { return true; } + + virtual bool IsMediumNode(const SMDS_MeshNode* node) const; + + bool ChangeNodes(const SMDS_MeshNode* nodes[], + const int nbNodes); + + virtual int NbNodes() const; + virtual int NbEdges() const; + virtual int NbFaces() const; + + virtual void Print (std::ostream & OS) const; + + SMDS_NodeIteratorPtr interlacedNodesIterator() const; + + SMDS_ElemIteratorPtr interlacedNodesElemIterator() const; + + /*! + * \brief Return node by its index + * \param ind - node index + * \retval const SMDS_MeshNode* - the node + * + * Index is wrapped if it is out of a valid range + */ + virtual const SMDS_MeshNode* GetNode(const int ind) const; + +protected: + virtual SMDS_ElemIteratorPtr elementsIterator (SMDSAbs_ElementType type) const; + + private: + std::vector myNodes; +}; + +#endif diff --git a/src/SMDS/SMDS_QuadraticVolumeOfNodes.cxx b/src/SMDS/SMDS_QuadraticVolumeOfNodes.cxx new file mode 100644 index 000000000..ce14eccd0 --- /dev/null +++ b/src/SMDS/SMDS_QuadraticVolumeOfNodes.cxx @@ -0,0 +1,347 @@ +// SMESH SMDS : implementaion of Salome mesh data structure +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File: SMDS_QuadraticVolumeOfNodes.cxx +// Created: 17.01.06 09:46:11 +// Author: Sergey KUUL + +#include "SMDS_QuadraticVolumeOfNodes.hxx" + +#include "SMDS_IteratorOfElements.hxx" +#include "SMDS_MeshNode.hxx" +#include "SMDS_SetIterator.hxx" + +#include "utilities.h" + +using namespace std; + + +//======================================================================= +//function : SMDS_QuadraticVolumeOfNodes() +//purpose : Constructor tetrahedron of 10 nodes +//======================================================================= + +SMDS_QuadraticVolumeOfNodes::SMDS_QuadraticVolumeOfNodes + (const SMDS_MeshNode * n1, + const SMDS_MeshNode * n2, + const SMDS_MeshNode * n3, + const SMDS_MeshNode * n4, + const SMDS_MeshNode * n12, + const SMDS_MeshNode * n23, + const SMDS_MeshNode * n31, + const SMDS_MeshNode * n14, + const SMDS_MeshNode * n24, + const SMDS_MeshNode * n34) +{ + myNodes.resize( 10 ); + myNodes[ 0 ] = n1; + myNodes[ 1 ] = n2; + myNodes[ 2 ] = n3; + myNodes[ 3 ] = n4; + myNodes[ 4 ] = n12; + myNodes[ 5 ] = n23; + myNodes[ 6 ] = n31; + myNodes[ 7 ] = n14; + myNodes[ 8 ] = n24; + myNodes[ 9 ] = n34; +} + + +//======================================================================= +//function : SMDS_QuadraticVolumeOfNodes() +//purpose : Constructor pyramid of 13 nodes +//======================================================================= + +SMDS_QuadraticVolumeOfNodes::SMDS_QuadraticVolumeOfNodes + (const SMDS_MeshNode * n1, + const SMDS_MeshNode * n2, + const SMDS_MeshNode * n3, + const SMDS_MeshNode * n4, + const SMDS_MeshNode * n5, + const SMDS_MeshNode * n12, + const SMDS_MeshNode * n23, + const SMDS_MeshNode * n34, + const SMDS_MeshNode * n41, + const SMDS_MeshNode * n15, + const SMDS_MeshNode * n25, + const SMDS_MeshNode * n35, + const SMDS_MeshNode * n45) +{ + myNodes.resize( 13 ); + myNodes[ 0 ] = n1; + myNodes[ 1 ] = n2; + myNodes[ 2 ] = n3; + myNodes[ 3 ] = n4; + myNodes[ 4 ] = n5; + myNodes[ 5 ] = n12; + myNodes[ 6 ] = n23; + myNodes[ 7 ] = n34; + myNodes[ 8 ] = n41; + myNodes[ 9 ] = n15; + myNodes[ 10 ] = n25; + myNodes[ 11 ] = n35; + myNodes[ 12 ] = n45; +} + + +//======================================================================= +//function : SMDS_QuadraticVolumeOfNodes() +//purpose : Constructor Pentahedron with 15 nodes +//======================================================================= + +SMDS_QuadraticVolumeOfNodes::SMDS_QuadraticVolumeOfNodes + (const SMDS_MeshNode * n1, + const SMDS_MeshNode * n2, + const SMDS_MeshNode * n3, + const SMDS_MeshNode * n4, + const SMDS_MeshNode * n5, + const SMDS_MeshNode * n6, + const SMDS_MeshNode * n12, + const SMDS_MeshNode * n23, + const SMDS_MeshNode * n31, + const SMDS_MeshNode * n45, + const SMDS_MeshNode * n56, + const SMDS_MeshNode * n64, + const SMDS_MeshNode * n14, + const SMDS_MeshNode * n25, + const SMDS_MeshNode * n36) +{ + myNodes.resize( 15 ); + myNodes[ 0 ] = n1; + myNodes[ 1 ] = n2; + myNodes[ 2 ] = n3; + myNodes[ 3 ] = n4; + myNodes[ 4 ] = n5; + myNodes[ 5 ] = n6; + myNodes[ 6 ] = n12; + myNodes[ 7 ] = n23; + myNodes[ 8 ] = n31; + myNodes[ 9 ] = n45; + myNodes[ 10 ] = n56; + myNodes[ 11 ] = n64; + myNodes[ 12 ] = n14; + myNodes[ 13 ] = n25; + myNodes[ 14 ] = n36; +} + + +//======================================================================= +//function : SMDS_QuadraticVolumeOfNodes() +//purpose : Constructor Hexahedrons with 20 nodes +//======================================================================= + +SMDS_QuadraticVolumeOfNodes::SMDS_QuadraticVolumeOfNodes + (const SMDS_MeshNode * n1, + const SMDS_MeshNode * n2, + const SMDS_MeshNode * n3, + const SMDS_MeshNode * n4, + const SMDS_MeshNode * n5, + const SMDS_MeshNode * n6, + const SMDS_MeshNode * n7, + const SMDS_MeshNode * n8, + const SMDS_MeshNode * n12, + const SMDS_MeshNode * n23, + const SMDS_MeshNode * n34, + const SMDS_MeshNode * n41, + const SMDS_MeshNode * n56, + const SMDS_MeshNode * n67, + const SMDS_MeshNode * n78, + const SMDS_MeshNode * n85, + const SMDS_MeshNode * n15, + const SMDS_MeshNode * n26, + const SMDS_MeshNode * n37, + const SMDS_MeshNode * n48) +{ + myNodes.resize( 20 ); + myNodes[ 0 ] = n1; + myNodes[ 1 ] = n2; + myNodes[ 2 ] = n3; + myNodes[ 3 ] = n4; + myNodes[ 4 ] = n5; + myNodes[ 5 ] = n6; + myNodes[ 6 ] = n7; + myNodes[ 7 ] = n8; + myNodes[ 8 ] = n12; + myNodes[ 9 ] = n23; + myNodes[ 10 ] = n34; + myNodes[ 11 ] = n41; + myNodes[ 12 ] = n56; + myNodes[ 13 ] = n67; + myNodes[ 14 ] = n78; + myNodes[ 15 ] = n85; + myNodes[ 16 ] = n15; + myNodes[ 17 ] = n26; + myNodes[ 18 ] = n37; + myNodes[ 19 ] = n48; +} + + +//======================================================================= +//function : IsMediumNode +//purpose : +//======================================================================= + +bool SMDS_QuadraticVolumeOfNodes::IsMediumNode(const SMDS_MeshNode* node) const +{ + int nbCorners = 0; + switch (myNodes.size()) { + case 10: nbCorners = 4; break; + case 13: nbCorners = 5; break; + case 15: nbCorners = 6; break; + default: nbCorners = 8; + } + for ( int i = nbCorners; i : "; + int i, nbNodes = myNodes.size(); + for (i = 0; i < nbNodes - 1; i++) + OS << myNodes[i] << ","; + OS << myNodes[i] << ") " << endl; +} + + +//======================================================================= +//private class : SMDS_QuadraticVolumeOfNodes_MyIterator +//purpose : +//======================================================================= + +class SMDS_QuadraticVolumeOfNodes_MyIterator : public SMDS_NodeVectorElemIterator +{ +public: + SMDS_QuadraticVolumeOfNodes_MyIterator(const vector& s): + SMDS_NodeVectorElemIterator( s.begin(), s.end() ) {} +}; + +//======================================================================= +//function : elementsIterator +//purpose : +//======================================================================= + +SMDS_ElemIteratorPtr SMDS_QuadraticVolumeOfNodes::elementsIterator + (SMDSAbs_ElementType type) const +{ + switch(type) + { + case SMDSAbs_Volume: + return SMDS_MeshElement::elementsIterator(SMDSAbs_Volume); + case SMDSAbs_Node: + return SMDS_ElemIteratorPtr(new SMDS_QuadraticVolumeOfNodes_MyIterator(myNodes)); + case SMDSAbs_Edge: + MESSAGE("Error : edge iterator for SMDS_QuadraticVolumeOfNodes not implemented"); + break; + case SMDSAbs_Face: + MESSAGE("Error : face iterator for SMDS_QuadraticVolumeOfNodes not implemented"); + break; + default: + return SMDS_ElemIteratorPtr + (new SMDS_IteratorOfElements + (this,type,SMDS_ElemIteratorPtr + (new SMDS_QuadraticVolumeOfNodes_MyIterator(myNodes)))); + } + return SMDS_ElemIteratorPtr(); +} + +/*! + * \brief Return node by its index + * \param ind - node index + * \retval const SMDS_MeshNode* - the node + * + * Index is wrapped if it is out of a valid range + */ +const SMDS_MeshNode* SMDS_QuadraticVolumeOfNodes::GetNode(const int ind) const +{ + return myNodes[ WrappedIndex( ind )]; +} + diff --git a/src/SMDS/SMDS_QuadraticVolumeOfNodes.hxx b/src/SMDS/SMDS_QuadraticVolumeOfNodes.hxx new file mode 100644 index 000000000..23f4369d3 --- /dev/null +++ b/src/SMDS/SMDS_QuadraticVolumeOfNodes.hxx @@ -0,0 +1,130 @@ +// SMESH SMDS : implementaion of Salome mesh data structure +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : SMDS_QuadraticVolumeOfNodes.hxx +// Module : SMESH + +#ifndef _SMDS_QuadraticVolumeOfNodes_HeaderFile +#define _SMDS_QuadraticVolumeOfNodes_HeaderFile + +#include "SMDS_MeshVolume.hxx" + +class SMDS_WNT_EXPORT SMDS_QuadraticVolumeOfNodes: public SMDS_MeshVolume +{ +public: + // tetrahedron of 10 nodes + SMDS_QuadraticVolumeOfNodes (const SMDS_MeshNode * n1, + const SMDS_MeshNode * n2, + const SMDS_MeshNode * n3, + const SMDS_MeshNode * n4, + const SMDS_MeshNode * n12, + const SMDS_MeshNode * n23, + const SMDS_MeshNode * n31, + const SMDS_MeshNode * n14, + const SMDS_MeshNode * n24, + const SMDS_MeshNode * n34); + + // pyramid of 13 nodes + SMDS_QuadraticVolumeOfNodes(const SMDS_MeshNode * n1, + const SMDS_MeshNode * n2, + const SMDS_MeshNode * n3, + const SMDS_MeshNode * n4, + const SMDS_MeshNode * n5, + const SMDS_MeshNode * n12, + const SMDS_MeshNode * n23, + const SMDS_MeshNode * n34, + const SMDS_MeshNode * n41, + const SMDS_MeshNode * n15, + const SMDS_MeshNode * n25, + const SMDS_MeshNode * n35, + const SMDS_MeshNode * n45); + + // Pentahedron with 15 nodes + SMDS_QuadraticVolumeOfNodes(const SMDS_MeshNode * n1, + const SMDS_MeshNode * n2, + const SMDS_MeshNode * n3, + const SMDS_MeshNode * n4, + const SMDS_MeshNode * n5, + const SMDS_MeshNode * n6, + const SMDS_MeshNode * n12, + const SMDS_MeshNode * n23, + const SMDS_MeshNode * n31, + const SMDS_MeshNode * n45, + const SMDS_MeshNode * n56, + const SMDS_MeshNode * n64, + const SMDS_MeshNode * n14, + const SMDS_MeshNode * n25, + const SMDS_MeshNode * n36); + + // Hexahedrons with 20 nodes + SMDS_QuadraticVolumeOfNodes(const SMDS_MeshNode * n1, + const SMDS_MeshNode * n2, + const SMDS_MeshNode * n3, + const SMDS_MeshNode * n4, + const SMDS_MeshNode * n5, + const SMDS_MeshNode * n6, + const SMDS_MeshNode * n7, + const SMDS_MeshNode * n8, + const SMDS_MeshNode * n12, + const SMDS_MeshNode * n23, + const SMDS_MeshNode * n34, + const SMDS_MeshNode * n41, + const SMDS_MeshNode * n56, + const SMDS_MeshNode * n67, + const SMDS_MeshNode * n78, + const SMDS_MeshNode * n85, + const SMDS_MeshNode * n15, + const SMDS_MeshNode * n26, + const SMDS_MeshNode * n37, + const SMDS_MeshNode * n48); + + virtual bool IsQuadratic() const { return true; } + + virtual bool IsMediumNode(const SMDS_MeshNode* node) const; + + bool ChangeNodes(const SMDS_MeshNode* nodes[], + const int nbNodes); + + virtual int NbNodes() const; + virtual int NbEdges() const; + virtual int NbFaces() const; + + virtual void Print (std::ostream & OS) const; + + /*! + * \brief Return node by its index + * \param ind - node index + * \retval const SMDS_MeshNode* - the node + * + * Index is wrapped if it is out of a valid range + */ + virtual const SMDS_MeshNode* GetNode(const int ind) const; + + protected: + virtual SMDS_ElemIteratorPtr elementsIterator (SMDSAbs_ElementType type) const; + + private: + std::vector myNodes; +}; + +#endif diff --git a/src/SMDS/SMDS_SetIterator.hxx b/src/SMDS/SMDS_SetIterator.hxx new file mode 100644 index 000000000..05fa6c046 --- /dev/null +++ b/src/SMDS/SMDS_SetIterator.hxx @@ -0,0 +1,101 @@ +// SMESH SMDS : implementaion of Salome mesh data structure +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : SMDS_SetIterator.hxx +// Created : Mon Feb 27 16:57:43 2006 +// Author : Edward AGAPOV (eap) + + +#ifndef SMDS_SetIterator_HeaderFile +#define SMDS_SetIterator_HeaderFile + +#include "SMDS_Iterator.hxx" + +/////////////////////////////////////////////////////////////////////////////// +/// specific SMDS_Iterator iterating over abstract set of values like STL containers +/// +/// BE CAREFUL: iterator pointed value is static_cast'ed to VALUE +/// +/////////////////////////////////////////////////////////////////////////////// + +template +class SMDS_SetIterator : public SMDS_Iterator +{ +protected: + VALUE_SET_ITERATOR _beg, _end; +public: + SMDS_SetIterator(const VALUE_SET_ITERATOR & begin, + const VALUE_SET_ITERATOR & end) + { init ( begin, end ); } + + /// Initialization + virtual void init(const VALUE_SET_ITERATOR & begin, + const VALUE_SET_ITERATOR & end) + { _beg = begin; _end = end; } + + /// Return true if and only if there are other object in this iterator + virtual bool more() { return _beg != _end; } + + /// Return the current object and step to the next one + virtual VALUE next() { return static_cast( *_beg++ ); } + +}; + +// useful specifications + +#include + +class SMDS_MeshElement; +class SMDS_MeshNode; + +typedef const SMDS_MeshElement* SMDS_pElement; +typedef const SMDS_MeshNode* SMDS_pNode; + +// element iterators + +typedef SMDS_SetIterator< SMDS_pElement, std::vector< SMDS_pElement >::const_iterator> +SMDS_ElementVectorIterator; + + +typedef SMDS_SetIterator< SMDS_pElement, SMDS_pElement const *> +SMDS_ElementArrayIterator; + + +typedef SMDS_SetIterator< SMDS_pElement, std::vector< SMDS_pNode >::const_iterator> +SMDS_NodeVectorElemIterator; + + +typedef SMDS_SetIterator< SMDS_pElement, SMDS_pNode const * > +SMDS_NodeArrayElemIterator; + +// node iterators + +typedef SMDS_SetIterator< SMDS_pNode, std::vector< SMDS_pNode >::const_iterator > +SMDS_NodeVectorIterator; + + +typedef SMDS_SetIterator< SMDS_pNode, SMDS_pNode const * > +SMDS_NodeArrayIterator; + + +#endif diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx new file mode 100644 index 000000000..fd0a0dcfb --- /dev/null +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -0,0 +1,698 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File: SMESH_MesherHelper.cxx +// Created: 15.02.06 15:22:41 +// Author: Sergey KUUL +// Copyright: Open CASCADE 2006 + + +#include "SMESH_MesherHelper.hxx" + +#include "SMDS_FacePosition.hxx" +#include "SMDS_EdgePosition.hxx" +#include "SMESH_MeshEditor.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : CheckShape +//purpose : +//======================================================================= + +bool SMESH_MesherHelper::IsQuadraticSubMesh(const TopoDS_Shape& aSh) +{ + SMESHDS_Mesh* meshDS = GetMesh()->GetMeshDS(); + // we can create quadratic elements only if all elements + // created on subshapes of given shape are quadratic + // also we have to fill myNLinkNodeMap + myCreateQuadratic = true; + mySeamShapeIds.clear(); + TopAbs_ShapeEnum subType( aSh.ShapeType()==TopAbs_FACE ? TopAbs_EDGE : TopAbs_FACE ); + SMDSAbs_ElementType elemType( subType==TopAbs_FACE ? SMDSAbs_Face : SMDSAbs_Edge ); + + TopExp_Explorer exp( aSh, subType ); + for (; exp.More() && myCreateQuadratic; exp.Next()) { + if ( SMESHDS_SubMesh * subMesh = meshDS->MeshElements( exp.Current() )) { + if ( SMDS_ElemIteratorPtr it = subMesh->GetElements() ) { + while(it->more()) { + const SMDS_MeshElement* e = it->next(); + if ( e->GetType() != elemType || !e->IsQuadratic() ) { + myCreateQuadratic = false; + break; + } + else { + // fill NLinkNodeMap + switch ( e->NbNodes() ) { + case 3: + AddNLinkNode(e->GetNode(0),e->GetNode(1),e->GetNode(2)); break; + case 6: + AddNLinkNode(e->GetNode(0),e->GetNode(1),e->GetNode(3)); + AddNLinkNode(e->GetNode(1),e->GetNode(2),e->GetNode(4)); + AddNLinkNode(e->GetNode(2),e->GetNode(0),e->GetNode(5)); break; + case 8: + AddNLinkNode(e->GetNode(0),e->GetNode(1),e->GetNode(4)); + AddNLinkNode(e->GetNode(1),e->GetNode(2),e->GetNode(5)); + AddNLinkNode(e->GetNode(2),e->GetNode(3),e->GetNode(6)); + AddNLinkNode(e->GetNode(3),e->GetNode(0),e->GetNode(7)); + break; + default: + myCreateQuadratic = false; + break; + } + } + } + } + } + } + + if(!myCreateQuadratic) { + myNLinkNodeMap.clear(); + } + else { + SetSubShape( aSh ); + } + return myCreateQuadratic; +} + +//================================================================================ +/*! + * \brief Set geomerty to make elements on + * \param aSh - geomertic shape + */ +//================================================================================ + +void SMESH_MesherHelper::SetSubShape(const int aShID) +{ + if ( aShID == myShapeID ) + return; + if ( aShID > 1 ) + SetSubShape( GetMesh()->GetMeshDS()->IndexToShape( aShID )); + else + SetSubShape( TopoDS_Shape() ); +} + +//================================================================================ +/*! + * \brief Set geomerty to make elements on + * \param aSh - geomertic shape + */ +//================================================================================ + +void SMESH_MesherHelper::SetSubShape(const TopoDS_Shape& aSh) +{ + if ( !myShape.IsNull() && !aSh.IsNull() && myShape.IsSame( aSh )) + return; + + myShape = aSh; + mySeamShapeIds.clear(); + + if ( myShape.IsNull() ) { + myShapeID = -1; + return; + } + SMESHDS_Mesh* meshDS = GetMesh()->GetMeshDS(); + myShapeID = meshDS->ShapeToIndex(aSh); + + // treatment of periodic faces + if ( aSh.ShapeType() == TopAbs_FACE ) + { + const TopoDS_Face& face = TopoDS::Face( aSh ); + BRepAdaptor_Surface surface( face ); + if ( surface.IsUPeriodic() || surface.IsVPeriodic() ) + { + // look for a seam edge + for ( TopExp_Explorer exp( face, TopAbs_EDGE ); exp.More(); exp.Next()) { + const TopoDS_Edge& edge = TopoDS::Edge( exp.Current() ); + if ( BRep_Tool::IsClosed( edge, face )) { + // initialize myPar1, myPar2 and myParIndex + if ( mySeamShapeIds.empty() ) { + gp_Pnt2d uv1, uv2; + BRep_Tool::UVPoints( edge, face, uv1, uv2 ); + if ( Abs( uv1.Coord(1) - uv2.Coord(1) ) < Abs( uv1.Coord(2) - uv2.Coord(2) )) + { + myParIndex = 1; // U periodic + myPar1 = surface.FirstUParameter(); + myPar2 = surface.LastUParameter(); + } + else { + myParIndex = 2; // V periodic + myPar1 = surface.FirstVParameter(); + myPar2 = surface.LastVParameter(); + } + } + // store shapes indices + mySeamShapeIds.insert( meshDS->ShapeToIndex( exp.Current() )); + for ( TopExp_Explorer v( exp.Current(), TopAbs_VERTEX ); v.More(); v.Next() ) + mySeamShapeIds.insert( meshDS->ShapeToIndex( v.Current() )); + } + } + } + } +} + +//================================================================================ + /*! + * \brief Check if inFaceNode argument is necessary for call GetNodeUV(F,..) + * \param F - the face + * \retval bool - return true if the face is periodic + */ +//================================================================================ + +bool SMESH_MesherHelper::GetNodeUVneedInFaceNode(const TopoDS_Face& F) const +{ + if ( F.IsNull() ) return !mySeamShapeIds.empty(); + + if ( !F.IsNull() && !myShape.IsNull() && myShape.IsSame( F )) + return !mySeamShapeIds.empty(); + + Handle(Geom_Surface) aSurface = BRep_Tool::Surface( F ); + if ( !aSurface.IsNull() ) + return ( aSurface->IsUPeriodic() || aSurface->IsVPeriodic() ); + + return false; +} + +//======================================================================= +//function : IsMedium +//purpose : +//======================================================================= + +bool SMESH_MesherHelper::IsMedium(const SMDS_MeshNode* node, + const SMDSAbs_ElementType typeToCheck) +{ + return SMESH_MeshEditor::IsMedium( node, typeToCheck ); +} + +//======================================================================= +//function : AddNLinkNode +//purpose : +//======================================================================= +/*! + * Auxilary function for filling myNLinkNodeMap + */ +void SMESH_MesherHelper::AddNLinkNode(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n12) +{ + NLink link( n1, n2 ); + if ( n1 > n2 ) link = NLink( n2, n1 ); + // add new record to map + myNLinkNodeMap.insert( make_pair(link,n12)); +} + +//======================================================================= +/*! + * \brief Select UV on either of 2 pcurves of a seam edge, closest to the given UV + * \param uv1 - UV on the seam + * \param uv2 - UV within a face + * \retval gp_Pnt2d - selected UV + */ +//======================================================================= + +gp_Pnt2d SMESH_MesherHelper::GetUVOnSeam( const gp_Pnt2d& uv1, const gp_Pnt2d& uv2 ) const +{ + double p1 = uv1.Coord( myParIndex ); + double p2 = uv2.Coord( myParIndex ); + double p3 = ( Abs( p1 - myPar1 ) < Abs( p1 - myPar2 )) ? myPar2 : myPar1; + if ( Abs( p2 - p1 ) > Abs( p2 - p3 )) + p1 = p3; + gp_Pnt2d result = uv1; + result.SetCoord( myParIndex, p1 ); + return result; +} + +//======================================================================= +/*! + * \brief Return node UV on face + * \param F - the face + * \param n - the node + * \param n2 - a node of element being created located inside a face + * \retval gp_XY - resulting UV + * + * Auxilary function called form GetMediumNode() + */ +//======================================================================= + +gp_XY SMESH_MesherHelper::GetNodeUV(const TopoDS_Face& F, + const SMDS_MeshNode* n, + const SMDS_MeshNode* n2) +{ + gp_Pnt2d uv; + const SMDS_PositionPtr Pos = n->GetPosition(); + if(Pos->GetTypeOfPosition()==SMDS_TOP_FACE) { + // node has position on face + const SMDS_FacePosition* fpos = + static_cast(n->GetPosition().get()); + uv = gp_Pnt2d(fpos->GetUParameter(),fpos->GetVParameter()); + } + else if(Pos->GetTypeOfPosition()==SMDS_TOP_EDGE) { + // node has position on edge => it is needed to find + // corresponding edge from face, get pcurve for this + // edge and recieve value from this pcurve + const SMDS_EdgePosition* epos = + static_cast(n->GetPosition().get()); + SMESHDS_Mesh* meshDS = GetMesh()->GetMeshDS(); + int edgeID = Pos->GetShapeId(); + TopoDS_Edge E = TopoDS::Edge(meshDS->IndexToShape(edgeID)); + double f, l; + TopLoc_Location loc; + Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(E, F, f, l); + uv = C2d->Value( epos->GetUParameter() ); + // for a node on a seam edge select one of UVs on 2 pcurves + if ( n2 && mySeamShapeIds.find( edgeID ) != mySeamShapeIds.end() ) + uv = GetUVOnSeam( uv, GetNodeUV( F, n2, 0 )); + } + else if(Pos->GetTypeOfPosition()==SMDS_TOP_VERTEX) { + SMESHDS_Mesh * meshDS = GetMesh()->GetMeshDS(); + int vertexID = n->GetPosition()->GetShapeId(); + const TopoDS_Vertex& V = TopoDS::Vertex(meshDS->IndexToShape(vertexID)); + uv = BRep_Tool::Parameters( V, F ); + if ( n2 && mySeamShapeIds.find( vertexID ) != mySeamShapeIds.end() ) + uv = GetUVOnSeam( uv, GetNodeUV( F, n2, 0 )); + } + return uv.XY(); +} + +//======================================================================= +/*! + * \brief Return node U on edge + * \param E - the Edge + * \param n - the node + * \retval double - resulting U + * + * Auxilary function called form GetMediumNode() + */ +//======================================================================= + +double SMESH_MesherHelper::GetNodeU(const TopoDS_Edge& E, + const SMDS_MeshNode* n) +{ + double param = 0; + const SMDS_PositionPtr Pos = n->GetPosition(); + if(Pos->GetTypeOfPosition()==SMDS_TOP_EDGE) { + const SMDS_EdgePosition* epos = + static_cast(n->GetPosition().get()); + param = epos->GetUParameter(); + } + else if(Pos->GetTypeOfPosition()==SMDS_TOP_VERTEX) { + SMESHDS_Mesh * meshDS = GetMesh()->GetMeshDS(); + int vertexID = n->GetPosition()->GetShapeId(); + const TopoDS_Vertex& V = TopoDS::Vertex(meshDS->IndexToShape(vertexID)); + param = BRep_Tool::Parameter( V, E ); + } + return param; +} + +//======================================================================= +//function : GetMediumNode +//purpose : +//======================================================================= +/*! + * Special function for search or creation medium node + */ +const SMDS_MeshNode* SMESH_MesherHelper::GetMediumNode(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + bool force3d) +{ + TopAbs_ShapeEnum shapeType = myShape.IsNull() ? TopAbs_SHAPE : myShape.ShapeType(); + + NLink link(( n1 < n2 ? n1 : n2 ), ( n1 < n2 ? n2 : n1 )); + ItNLinkNode itLN = myNLinkNodeMap.find( link ); + if ( itLN != myNLinkNodeMap.end() ) { + return (*itLN).second; + } + else { + // create medium node + SMDS_MeshNode* n12; + SMESHDS_Mesh* meshDS = GetMesh()->GetMeshDS(); + int faceID = -1, edgeID = -1; + const SMDS_PositionPtr Pos1 = n1->GetPosition(); + const SMDS_PositionPtr Pos2 = n2->GetPosition(); + + if( myShape.IsNull() ) + { + if( Pos1->GetTypeOfPosition()==SMDS_TOP_FACE ) { + faceID = Pos1->GetShapeId(); + } + else if( Pos2->GetTypeOfPosition()==SMDS_TOP_FACE ) { + faceID = Pos2->GetShapeId(); + } + + if( Pos1->GetTypeOfPosition()==SMDS_TOP_EDGE ) { + edgeID = Pos1->GetShapeId(); + } + if( Pos2->GetTypeOfPosition()==SMDS_TOP_EDGE ) { + edgeID = Pos2->GetShapeId(); + } + } + + if(!force3d) { + // we try to create medium node using UV parameters of + // nodes, else - medium between corresponding 3d points + if(faceID>-1 || shapeType == TopAbs_FACE) { + // obtaining a face and 2d points for nodes + TopoDS_Face F; + if( myShape.IsNull() ) + F = TopoDS::Face(meshDS->IndexToShape(faceID)); + else { + F = TopoDS::Face(myShape); + faceID = myShapeID; + } + + gp_XY p1 = GetNodeUV(F,n1,n2); + gp_XY p2 = GetNodeUV(F,n2,n1); + + //checking if surface is periodic + Handle(Geom_Surface) S = BRep_Tool::Surface(F); + Standard_Real UF,UL,VF,VL; + S->Bounds(UF,UL,VF,VL); + + Standard_Real u,v; + Standard_Boolean isUPeriodic = S->IsUPeriodic(); + if(isUPeriodic) { + Standard_Real UPeriod = S->UPeriod(); + Standard_Real p2x = p2.X()+ShapeAnalysis::AdjustByPeriod(p2.X(),p1.X(),UPeriod); + Standard_Real pmid = (p1.X()+p2x)/2.; + u = pmid+ShapeAnalysis::AdjustToPeriod(pmid,UF,UL); + } + else + u= (p1.X()+p2.X())/2.; + + Standard_Boolean isVPeriodic = S->IsVPeriodic(); + if(isVPeriodic) { + Standard_Real VPeriod = S->VPeriod(); + Standard_Real p2y = p2.Y()+ShapeAnalysis::AdjustByPeriod(p2.Y(),p1.Y(),VPeriod); + Standard_Real pmid = (p1.Y()+p2y)/2.; + v = pmid+ShapeAnalysis::AdjustToPeriod(pmid,VF,VL); + } + else + v = (p1.Y()+p2.Y())/2.; + + gp_Pnt P = S->Value(u, v); + n12 = meshDS->AddNode(P.X(), P.Y(), P.Z()); + meshDS->SetNodeOnFace(n12, faceID, u, v); + myNLinkNodeMap.insert(NLinkNodeMap::value_type(link,n12)); + return n12; + } + if (edgeID>-1 || shapeType == TopAbs_EDGE) { + + TopoDS_Edge E; + if( myShape.IsNull() ) + E = TopoDS::Edge(meshDS->IndexToShape(edgeID)); + else { + E = TopoDS::Edge(myShape); + edgeID = myShapeID; + } + + double p1 = GetNodeU(E,n1); + double p2 = GetNodeU(E,n2); + + double f,l; + Handle(Geom_Curve) C = BRep_Tool::Curve(E, f, l); + if(!C.IsNull()) { + + Standard_Boolean isPeriodic = C->IsPeriodic(); + double u; + if(isPeriodic) { + Standard_Real Period = C->Period(); + Standard_Real p = p2+ShapeAnalysis::AdjustByPeriod(p2,p1,Period); + Standard_Real pmid = (p1+p)/2.; + u = pmid+ShapeAnalysis::AdjustToPeriod(pmid,C->FirstParameter(),C->LastParameter()); + } + else + u = (p1+p2)/2.; + + gp_Pnt P = C->Value( u ); + n12 = meshDS->AddNode(P.X(), P.Y(), P.Z()); + meshDS->SetNodeOnEdge(n12, edgeID, u); + myNLinkNodeMap.insert(NLinkNodeMap::value_type(link,n12)); + return n12; + } + } + } + // 3d variant + double x = ( n1->X() + n2->X() )/2.; + double y = ( n1->Y() + n2->Y() )/2.; + double z = ( n1->Z() + n2->Z() )/2.; + n12 = meshDS->AddNode(x,y,z); + if(edgeID>-1) + meshDS->SetNodeOnEdge(n12, edgeID); + else if(faceID>-1) + meshDS->SetNodeOnFace(n12, faceID); + else + meshDS->SetNodeInVolume(n12, myShapeID); + myNLinkNodeMap.insert(NLinkNodeMap::value_type(link,n12)); + return n12; + } +} + +//======================================================================= +//function : AddQuadraticEdge +//purpose : +//======================================================================= +/** + * Special function for creation quadratic edge + */ +SMDS_QuadraticEdge* SMESH_MesherHelper::AddQuadraticEdge(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const int id, + const bool force3d) +{ + SMESHDS_Mesh * meshDS = GetMesh()->GetMeshDS(); + + const SMDS_MeshNode* n12 = GetMediumNode(n1,n2,force3d); + + myCreateQuadratic = true; + + if(id) + return (SMDS_QuadraticEdge*)(meshDS->AddEdgeWithID(n1, n2, n12, id)); + else + return (SMDS_QuadraticEdge*)(meshDS->AddEdge(n1, n2, n12)); +} + +//======================================================================= +//function : AddFace +//purpose : +//======================================================================= +/*! + * Special function for creation quadratic triangle + */ +SMDS_MeshFace* SMESH_MesherHelper::AddFace(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n3, + const int id, + const bool force3d) +{ + SMESHDS_Mesh * meshDS = GetMesh()->GetMeshDS(); + if(!myCreateQuadratic) { + if(id) + return meshDS->AddFaceWithID(n1, n2, n3, id); + else + return meshDS->AddFace(n1, n2, n3); + } + + const SMDS_MeshNode* n12 = GetMediumNode(n1,n2,force3d); + const SMDS_MeshNode* n23 = GetMediumNode(n2,n3,force3d); + const SMDS_MeshNode* n31 = GetMediumNode(n3,n1,force3d); + + if(id) + return meshDS->AddFaceWithID(n1, n2, n3, n12, n23, n31, id); + else + return meshDS->AddFace(n1, n2, n3, n12, n23, n31); +} + + +//======================================================================= +//function : AddFace +//purpose : +//======================================================================= +/*! + * Special function for creation quadratic quadrangle + */ +SMDS_MeshFace* SMESH_MesherHelper::AddFace(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n3, + const SMDS_MeshNode* n4, + const int id, + const bool force3d) +{ + SMESHDS_Mesh * meshDS = GetMesh()->GetMeshDS(); + if(!myCreateQuadratic) { + if(id) + return meshDS->AddFaceWithID(n1, n2, n3, n4, id); + else + return meshDS->AddFace(n1, n2, n3, n4); + } + + const SMDS_MeshNode* n12 = GetMediumNode(n1,n2,force3d); + const SMDS_MeshNode* n23 = GetMediumNode(n2,n3,force3d); + const SMDS_MeshNode* n34 = GetMediumNode(n3,n4,force3d); + const SMDS_MeshNode* n41 = GetMediumNode(n4,n1,force3d); + + if(id) + return meshDS->AddFaceWithID(n1, n2, n3, n4, n12, n23, n34, n41, id); + else + return meshDS->AddFace(n1, n2, n3, n4, n12, n23, n34, n41); +} + + +//======================================================================= +//function : AddVolume +//purpose : +//======================================================================= +/*! + * Special function for creation quadratic volume + */ +SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n3, + const SMDS_MeshNode* n4, + const SMDS_MeshNode* n5, + const SMDS_MeshNode* n6, + const int id, + const bool force3d) +{ + SMESHDS_Mesh * meshDS = GetMesh()->GetMeshDS(); + if(!myCreateQuadratic) { + if(id) + return meshDS->AddVolumeWithID(n1, n2, n3, n4, n5, n6, id); + else + return meshDS->AddVolume(n1, n2, n3, n4, n5, n6); + } + + const SMDS_MeshNode* n12 = GetMediumNode(n1,n2,force3d); + const SMDS_MeshNode* n23 = GetMediumNode(n2,n3,force3d); + const SMDS_MeshNode* n31 = GetMediumNode(n3,n1,force3d); + + const SMDS_MeshNode* n45 = GetMediumNode(n4,n5,force3d); + const SMDS_MeshNode* n56 = GetMediumNode(n5,n6,force3d); + const SMDS_MeshNode* n64 = GetMediumNode(n6,n4,force3d); + + const SMDS_MeshNode* n14 = GetMediumNode(n1,n4,force3d); + const SMDS_MeshNode* n25 = GetMediumNode(n2,n5,force3d); + const SMDS_MeshNode* n36 = GetMediumNode(n3,n6,force3d); + + if(id) + return meshDS->AddVolumeWithID(n1, n2, n3, n4, n5, n6, + n12, n23, n31, n45, n56, n64, n14, n25, n36, id); + else + return meshDS->AddVolume(n1, n2, n3, n4, n5, n6, + n12, n23, n31, n45, n56, n64, n14, n25, n36); +} + + +//======================================================================= +//function : AddVolume +//purpose : +//======================================================================= +/*! + * Special function for creation quadratic volume + */ +SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n3, + const SMDS_MeshNode* n4, + const int id, + const bool force3d) +{ + SMESHDS_Mesh * meshDS = GetMesh()->GetMeshDS(); + if(!myCreateQuadratic) { + if(id) + return meshDS->AddVolumeWithID(n1, n2, n3, n4, id); + else + return meshDS->AddVolume(n1, n2, n3, n4); + } + + const SMDS_MeshNode* n12 = GetMediumNode(n1,n2,force3d); + const SMDS_MeshNode* n23 = GetMediumNode(n2,n3,force3d); + const SMDS_MeshNode* n31 = GetMediumNode(n3,n1,force3d); + + const SMDS_MeshNode* n14 = GetMediumNode(n1,n4,force3d); + const SMDS_MeshNode* n24 = GetMediumNode(n2,n4,force3d); + const SMDS_MeshNode* n34 = GetMediumNode(n3,n4,force3d); + + if(id) + return meshDS->AddVolumeWithID(n1, n2, n3, n4, n12, n23, n31, n14, n24, n34, id); + else + return meshDS->AddVolume(n1, n2, n3, n4, n12, n23, n31, n14, n24, n34); +} + + +//======================================================================= +//function : AddVolume +//purpose : +//======================================================================= +/*! + * Special function for creation quadratic volume + */ +SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n3, + const SMDS_MeshNode* n4, + const SMDS_MeshNode* n5, + const SMDS_MeshNode* n6, + const SMDS_MeshNode* n7, + const SMDS_MeshNode* n8, + const int id, + const bool force3d) +{ + SMESHDS_Mesh * meshDS = GetMesh()->GetMeshDS(); + if(!myCreateQuadratic) { + if(id) + return meshDS->AddVolumeWithID(n1, n2, n3, n4, n5, n6, n7, n8, id); + else + return meshDS->AddVolume(n1, n2, n3, n4, n5, n6, n7, n8); + } + + const SMDS_MeshNode* n12 = GetMediumNode(n1,n2,force3d); + const SMDS_MeshNode* n23 = GetMediumNode(n2,n3,force3d); + const SMDS_MeshNode* n34 = GetMediumNode(n3,n4,force3d); + const SMDS_MeshNode* n41 = GetMediumNode(n4,n1,force3d); + + const SMDS_MeshNode* n56 = GetMediumNode(n5,n6,force3d); + const SMDS_MeshNode* n67 = GetMediumNode(n6,n7,force3d); + const SMDS_MeshNode* n78 = GetMediumNode(n7,n8,force3d); + const SMDS_MeshNode* n85 = GetMediumNode(n8,n5,force3d); + + const SMDS_MeshNode* n15 = GetMediumNode(n1,n5,force3d); + const SMDS_MeshNode* n26 = GetMediumNode(n2,n6,force3d); + const SMDS_MeshNode* n37 = GetMediumNode(n3,n7,force3d); + const SMDS_MeshNode* n48 = GetMediumNode(n4,n8,force3d); + + if(id) + return meshDS->AddVolumeWithID(n1, n2, n3, n4, n5, n6, n7, n8, + n12, n23, n34, n41, n56, n67, + n78, n85, n15, n26, n37, n48, id); + else + return meshDS->AddVolume(n1, n2, n3, n4, n5, n6, n7, n8, + n12, n23, n34, n41, n56, n67, + n78, n85, n15, n26, n37, n48); +} + + diff --git a/src/SMESH/SMESH_MesherHelper.hxx b/src/SMESH/SMESH_MesherHelper.hxx new file mode 100644 index 000000000..4ae2101ec --- /dev/null +++ b/src/SMESH/SMESH_MesherHelper.hxx @@ -0,0 +1,265 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File: SMESH_MesherHelper.hxx +// Created: 15.02.06 14:48:09 +// Author: Sergey KUUL +// Copyright: Open CASCADE 2006 + + +#ifndef SMESH_MesherHelper_HeaderFile +#define SMESH_MesherHelper_HeaderFile + +#include +#include +#include +#include +#include +#include + +#include + +typedef pair NLink; +typedef map NLinkNodeMap; +typedef map::iterator ItNLinkNode; + +/*! + * \brief It helps meshers to add elements + * + * It allow meshers not to care about creation of medium nodes + * when filling a quadratic mesh. Helper does it itself. + * It defines degree of elements to create when IsQuadraticSubMesh() + * is called. + */ + +class SMESH_MesherHelper +{ + public: + // ---------- PUBLIC METHODS ---------- + + /// Empty constructor + SMESH_MesherHelper(SMESH_Mesh& theMesh) + { myMesh=(void *)&theMesh; myCreateQuadratic = false; myShapeID=-1;} + + SMESH_Mesh* GetMesh() const + { return (SMESH_Mesh*)myMesh; } + + /// Copy constructor + //Standard_EXPORT SMESH_MesherHelper (const SMESH_MesherHelper& theOther); + + /// Destructor + //Standard_EXPORT virtual ~SMESH_MesherHelper (); + + /** + * Check submesh for given shape + * Check if all elements on this shape + * are quadratic, if yes => set true to myCreateQuadratic + * (default value is false). Also fill myNLinkNodeMap + * Returns myCreateQuadratic + */ + bool IsQuadraticSubMesh(const TopoDS_Shape& theShape); + + /*! + * \brief Returns true if given node is medium + * \param n - node to check + * \param typeToCheck - type of elements containing the node to ask about node status + * \retval bool - check result + */ + static bool IsMedium(const SMDS_MeshNode* node, + const SMDSAbs_ElementType typeToCheck = SMDSAbs_All); + + /** + * Auxilary function for filling myNLinkNodeMap + */ + void AddNLinkNode(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n12); + + /** + * Auxilary function for filling myNLinkNodeMap + */ + void AddNLinkNodeMap(const NLinkNodeMap& aMap) + { myNLinkNodeMap.insert(aMap.begin(), aMap.end()); } + + /** + * Returns myNLinkNodeMap + */ + const NLinkNodeMap& GetNLinkNodeMap() { return myNLinkNodeMap; } + + /*! + * \brief Return node UV on face + * \param F - the face + * \param n - the node + * \param inFaceNode - a node of element being created located inside a face + * \retval gp_XY - resulting UV + * + * Auxilary function called form GetMediumNode() + */ + gp_XY GetNodeUV(const TopoDS_Face& F, + const SMDS_MeshNode* n, + const SMDS_MeshNode* inFaceNode=0); + + /*! + * \brief Check if inFaceNode argument is necessary for call GetNodeUV(F,..) + * \param F - the face + * \retval bool - return true if the face is periodic + * + * if F is Null, answer about subshape set through IsQuadraticSubMesh() or + * SetSubShape() + */ + bool GetNodeUVneedInFaceNode(const TopoDS_Face& F = TopoDS_Face()) const; + + /*! + * \brief Return U on edge + * \param F - the edge + * \param n - the node + * \retval double - resulting U + * + * Auxilary function called from GetMediumNode() + */ + double GetNodeU(const TopoDS_Edge& E, + const SMDS_MeshNode* n); + + + /** + * Special function for search or creation medium node + */ + const SMDS_MeshNode* GetMediumNode(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const bool force3d); + + /** + * Special function for creation quadratic edge + */ + SMDS_QuadraticEdge* AddQuadraticEdge(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const int id = 0, + const bool force3d = true); + + /** + * Special function for creation quadratic triangle + */ + SMDS_MeshFace* AddFace(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n3, + const int id=0, + const bool force3d = false); + + /** + * Special function for creation quadratic quadrangle + */ + SMDS_MeshFace* AddFace(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n3, + const SMDS_MeshNode* n4, + const int id = 0, + const bool force3d = false); + + /** + * Special function for creation quadratic tetraahedron + */ + SMDS_MeshVolume* AddVolume(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n3, + const SMDS_MeshNode* n4, + const int id = 0, + const bool force3d = true); + + /** + * Special function for creation quadratic pentahedron + */ + SMDS_MeshVolume* AddVolume(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n3, + const SMDS_MeshNode* n4, + const SMDS_MeshNode* n5, + const SMDS_MeshNode* n6, + const int id = 0, + const bool force3d = true); + + /** + * Special function for creation quadratic hexahedron + */ + SMDS_MeshVolume* AddVolume(const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n3, + const SMDS_MeshNode* n4, + const SMDS_MeshNode* n5, + const SMDS_MeshNode* n6, + const SMDS_MeshNode* n7, + const SMDS_MeshNode* n8, + const int id = 0, + bool force3d = true); + + + /*! + * \brief Set order of elements to create + * \param theBuildQuadratic - to build quadratic or not + * + * To be used for quadratic elements creation without preceding + * IsQuadraticSubMesh() or AddQuadraticEdge() call + */ + void SetKeyIsQuadratic(const bool theBuildQuadratic) + { myCreateQuadratic = theBuildQuadratic; } + + /*! + * \brief Set shape to make elements on + * \param subShape, subShapeID - shape or its ID (==SMESHDS_Mesh::ShapeToIndex(shape)) + */ + void SetSubShape(const int subShapeID); + void SetSubShape(const TopoDS_Shape& subShape); + + /*! + * \brief Return shape or its ID, on which created elements are added + * \retval TopoDS_Shape, int - shape or its ID + */ + int GetSubShapeID() { return myShapeID; } + TopoDS_Shape GetSubShape() { return myShape; } + + protected: + + /*! + * \brief Select UV on either of 2 pcurves of a seam edge, closest to the given UV + * \param uv1 - UV on the seam + * \param uv2 - UV within a face + * \retval gp_Pnt2d - selected UV + */ + gp_Pnt2d GetUVOnSeam( const gp_Pnt2d& uv1, const gp_Pnt2d& uv2 ) const; + + private: + + void* myMesh; + + int myShapeID; + + // Key for creation quadratic faces + bool myCreateQuadratic; + + // special map for using during creation quadratic faces + NLinkNodeMap myNLinkNodeMap; + + std::set< int > mySeamShapeIds; + double myPar1, myPar2; // bounds of a closed periodic surface + int myParIndex; // bounds' index (1-U, 2-V) + TopoDS_Shape myShape; + +}; + + +#endif diff --git a/src/SMESHClient/Makefile.in b/src/SMESHClient/Makefile.in new file mode 100644 index 000000000..d367f0d27 --- /dev/null +++ b/src/SMESHClient/Makefile.in @@ -0,0 +1,103 @@ +# GEOM GEOMClient : tool to transfer BREP files from GEOM server to GEOM client +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# +# +# File : Makefile.in +# Author : Pavel TELKOV (OCC) +# Module : SHESM + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/idl + + +@COMMENCE@ + +# header files +EXPORT_HEADERS = \ + SMESH_Client.hxx + +# Libraries targets + +LIB = libSMESHClient.la +LIB_SRC = SMESH_Client.cxx + +LIB_CLIENT_IDL = SALOME_Comm.idl \ + SALOME_Component.idl \ + SALOMEDS.idl \ + SALOMEDS_Attributes.idl \ + SALOME_Exception.idl \ + SALOME_GenericObj.idl \ + SMESH_Mesh.idl \ + SMESH_Gen.idl \ + SMESH_Group.idl \ + SMESH_Hypothesis.idl \ + SMESH_Pattern.idl \ + SMESH_Filter.idl \ + GEOM_Gen.idl \ + MED.idl + +# Executables targets +BIN = SMESHClientBin +BIN_SRC = +BIN_CLIENT_IDL = +BIN_SERVER_IDL = + +# additionnal information to compil and link file +CPPFLAGS += $(OCC_INCLUDES) $(KERNEL_CXXFLAGS) $(BOOST_CPPFLAGS) +CXXFLAGS += $(OCC_CXXFLAGS) $(KERNEL_CXXFLAGS) +LDFLAGS += $(OCC_KERNEL_LIBS) \ + $(KERNEL_LDFLAGS) \ + $(GEOM_LDFLAGS) \ + $(MED_LDFLAGS) \ + -lSMDS \ + -lSMESHimpl \ + -lSMESHDS \ + -lSMESHControls \ + -lNMTTools \ + -lNMTDS \ + -lmed_V2_1 \ + -lMEDWrapper \ + -lMEDWrapperBase \ + -lMEDWrapper_V2_1 \ + -lMEDWrapper_V2_2 \ + -lSalomeResourcesManager \ + -lSalomeLifeCycleCORBA \ + -lSalomeNotification \ + -lSalomeContainer \ + -lRegistry \ + -lSalomeNS \ + -lSALOMELocalTrace \ + -lSALOMEBasics \ + -lOpUtil \ + -lTKShHealing \ + -lMeshDriverDAT \ + -lMeshDriverSTL \ + -lMeshDriverMED \ + -lMeshDriverUNV \ + -lMeshDriver + +LDFLAGSFORBIN += $(LDFLAGS) + +@CONCLUDE@ + diff --git a/src/SMESHClient/SMESHClientBin.cxx b/src/SMESHClient/SMESHClientBin.cxx new file mode 100644 index 000000000..998d10727 --- /dev/null +++ b/src/SMESHClient/SMESHClientBin.cxx @@ -0,0 +1,30 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File : +// Author : +// Module : +// $Header: + +#include "SMESH_Client.hxx" + +int main( int, char** ) +{ + return 0; +} diff --git a/src/SMESHClient/SMESH_Client.cxx b/src/SMESHClient/SMESH_Client.cxx new file mode 100644 index 000000000..bd52bc042 --- /dev/null +++ b/src/SMESHClient/SMESH_Client.cxx @@ -0,0 +1,797 @@ +// SMESH SMESHClient : tool to update client mesh structure by mesh from server +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : SMESH_Client.cxx +// Author : Pavel TELKOV +// Module : SMESH + +#include "SMESH_Client.hxx" +#include "SMESH_Mesh.hxx" + +#include "SALOME_NamingService.hxx" +#include "SALOME_LifeCycleCORBA.hxx" + +#include +#include CORBA_SERVER_HEADER(SALOME_Component) +#include CORBA_SERVER_HEADER(SALOME_Exception) + +#include "OpUtil.hxx" +#include "utilities.h" + +#ifdef WNT +#include +#else +#include +#endif + +#include + +#ifndef EXCEPTION +#define EXCEPTION(TYPE, MSG) {\ + std::ostringstream aStream;\ + aStream<<__FILE__<<"["<<__LINE__<<"]::"<FindNode(theId)) return anElem; + EXCEPTION(runtime_error,"SMDS_Mesh::FindNode - cannot find a SMDS_MeshNode for ID = "<FindElement(theId)) return anElem; + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot find a SMDS_MeshElement for ID = "<AddNodeWithID(aCoords[aCoordId], + aCoords[aCoordId+1], + aCoords[aCoordId+2], + anIndexes[anElemId]); + if(!anElem) + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddNodeWithID for ID = "<AddEdgeWithID(anIndexes[anIndexId+1], + anIndexes[anIndexId+2], + anIndexes[anIndexId]); + if(!anElem) + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddEdgeWithID for ID = "<AddFaceWithID(anIndexes[anIndexId+1], + anIndexes[anIndexId+2], + anIndexes[anIndexId+3], + anIndexes[anIndexId]); + if(!anElem) + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<AddFaceWithID(anIndexes[anIndexId+1], + anIndexes[anIndexId+2], + anIndexes[anIndexId+3], + anIndexes[anIndexId+4], + anIndexes[anIndexId]); + if(!anElem) + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "< nodes_ids (aNbNodes); + for (int i = 0; i < aNbNodes; i++) { + nodes_ids[i] = anIndexes[anIndexId++]; + } + + SMDS_MeshElement* anElem = theMesh->AddPolygonalFaceWithID(nodes_ids, aFaceId); + if (!anElem) + EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolygonalFaceWithID for ID = " + << anElemId); + } + } + + + //======================================================================= + //function : AddTetrasWithID + //======================================================================= + inline void AddTetrasWithID(SMDS_Mesh* theMesh, + SMESH::log_array_var& theSeq, + CORBA::Long theId) + { + const SMESH::long_array& anIndexes = theSeq[theId].indexes; + CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number; + if(5*aNbElems != anIndexes.length()) + EXCEPTION(runtime_error,"AddTetrasWithID - 5*aNbElems != anIndexes.length()"); + for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=5){ + SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1], + anIndexes[anIndexId+2], + anIndexes[anIndexId+3], + anIndexes[anIndexId+4], + anIndexes[anIndexId]); + if(!anElem) + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<AddVolumeWithID(anIndexes[anIndexId+1], + anIndexes[anIndexId+2], + anIndexes[anIndexId+3], + anIndexes[anIndexId+4], + anIndexes[anIndexId+5], + anIndexes[anIndexId]); + if(!anElem) + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<AddVolumeWithID(anIndexes[anIndexId+1], + anIndexes[anIndexId+2], + anIndexes[anIndexId+3], + anIndexes[anIndexId+4], + anIndexes[anIndexId+5], + anIndexes[anIndexId+6], + anIndexes[anIndexId]); + if(!anElem) + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<AddVolumeWithID(anIndexes[anIndexId+1], + anIndexes[anIndexId+2], + anIndexes[anIndexId+3], + anIndexes[anIndexId+4], + anIndexes[anIndexId+5], + anIndexes[anIndexId+6], + anIndexes[anIndexId+7], + anIndexes[anIndexId+8], + anIndexes[anIndexId]); + if(!anElem) + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "< nodes_ids (aNbNodes); + for (int i = 0; i < aNbNodes; i++) { + nodes_ids[i] = anIndexes[anIndexId++]; + } + + int aNbFaces = anIndexes[anIndexId++]; + std::vector quantities (aNbFaces); + for (int i = 0; i < aNbFaces; i++) { + quantities[i] = anIndexes[anIndexId++]; + } + + SMDS_MeshElement* anElem = + theMesh->AddPolyhedralVolumeWithID(nodes_ids, quantities, aFaceId); + if (!anElem) + EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolyhedralVolumeWithID for ID = " + << anElemId); + } + } + + + //======================================================================= + //function : AddQuadEdgesWithID + //======================================================================= + inline void AddQuadEdgesWithID(SMDS_Mesh* theMesh, + SMESH::log_array_var& theSeq, + CORBA::Long theId) + { + const SMESH::long_array& anIndexes = theSeq[theId].indexes; + CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number; + if(4*aNbElems != anIndexes.length()) + EXCEPTION(runtime_error,"AddQuadEdgeWithID - 4*aNbElems != aCoords.length()"); + for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=4){ + SMDS_MeshElement* anElem = theMesh->AddEdgeWithID(anIndexes[anIndexId+1], + anIndexes[anIndexId+2], + anIndexes[anIndexId+3], + anIndexes[anIndexId]); + if(!anElem) + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddEdgeWithID for ID = "<AddFaceWithID(anIndexes[anIndexId+1], + anIndexes[anIndexId+2], + anIndexes[anIndexId+3], + anIndexes[anIndexId+4], + anIndexes[anIndexId+5], + anIndexes[anIndexId+6], + anIndexes[anIndexId]); + if(!anElem) + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<AddFaceWithID(anIndexes[anIndexId+1], + anIndexes[anIndexId+2], + anIndexes[anIndexId+3], + anIndexes[anIndexId+4], + anIndexes[anIndexId+5], + anIndexes[anIndexId+6], + anIndexes[anIndexId+7], + anIndexes[anIndexId+8], + anIndexes[anIndexId]); + if(!anElem) + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<AddVolumeWithID(anIndexes[anIndexId+1], + anIndexes[anIndexId+2], + anIndexes[anIndexId+3], + anIndexes[anIndexId+4], + anIndexes[anIndexId+5], + anIndexes[anIndexId+6], + anIndexes[anIndexId+7], + anIndexes[anIndexId+8], + anIndexes[anIndexId+9], + anIndexes[anIndexId+10], + anIndexes[anIndexId]); + if(!anElem) + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<AddVolumeWithID(anIndexes[anIndexId+1], + anIndexes[anIndexId+2], + anIndexes[anIndexId+3], + anIndexes[anIndexId+4], + anIndexes[anIndexId+5], + anIndexes[anIndexId+6], + anIndexes[anIndexId+7], + anIndexes[anIndexId+8], + anIndexes[anIndexId+9], + anIndexes[anIndexId+10], + anIndexes[anIndexId+11], + anIndexes[anIndexId+12], + anIndexes[anIndexId+13], + anIndexes[anIndexId]); + if(!anElem) + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<AddVolumeWithID(anIndexes[anIndexId+1], + anIndexes[anIndexId+2], + anIndexes[anIndexId+3], + anIndexes[anIndexId+4], + anIndexes[anIndexId+5], + anIndexes[anIndexId+6], + anIndexes[anIndexId+7], + anIndexes[anIndexId+8], + anIndexes[anIndexId+9], + anIndexes[anIndexId+10], + anIndexes[anIndexId+11], + anIndexes[anIndexId+12], + anIndexes[anIndexId+13], + anIndexes[anIndexId+14], + anIndexes[anIndexId+15], + anIndexes[anIndexId]); + if(!anElem) + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<AddVolumeWithID(anIndexes[anIndexId+1], + anIndexes[anIndexId+2], + anIndexes[anIndexId+3], + anIndexes[anIndexId+4], + anIndexes[anIndexId+5], + anIndexes[anIndexId+6], + anIndexes[anIndexId+7], + anIndexes[anIndexId+8], + anIndexes[anIndexId+9], + anIndexes[anIndexId+10], + anIndexes[anIndexId+11], + anIndexes[anIndexId+12], + anIndexes[anIndexId+13], + anIndexes[anIndexId+14], + anIndexes[anIndexId+15], + anIndexes[anIndexId+16], + anIndexes[anIndexId+17], + anIndexes[anIndexId+18], + anIndexes[anIndexId+19], + anIndexes[anIndexId+20], + anIndexes[anIndexId]); + if(!anElem) + EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "< aNodes (nbNodes); + for (int iNode = 0; iNode < nbNodes; iNode++) { + aNodes[iNode] = FindNode(theMesh, anIndexes[iind++]); + } + // nb faces + int nbFaces = anIndexes[iind++]; + // quantities + std::vector quantities (nbFaces); + for (int iFace = 0; iFace < nbFaces; iFace++) { + quantities[iFace] = anIndexes[iind++]; + } + // change + theMesh->ChangePolyhedronNodes(elem, aNodes, quantities); + } + } +} + +//======================================================================= +SMESH::SMESH_Gen_var +SMESH_Client::GetSMESHGen(CORBA::ORB_ptr theORB, + CORBA::Boolean& theIsEmbeddedMode) +{ + static SMESH::SMESH_Gen_var aMeshGen; + + if(CORBA::is_nil(aMeshGen.in())){ +#ifdef WNT + long aClientPID = (long)_getpid(); +#else + long aClientPID = (long)getpid(); +#endif + + SALOME_NamingService aNamingService(theORB); + SALOME_LifeCycleCORBA aLifeCycleCORBA(&aNamingService); + Engines::Component_var aComponent = aLifeCycleCORBA.FindOrLoad_Component("FactoryServer","SMESH"); + aMeshGen = SMESH::SMESH_Gen::_narrow(aComponent); + + std::string aClientHostName = GetHostname(); + Engines::Container_var aServerContainer = aMeshGen->GetContainerRef(); + CORBA::String_var aServerHostName = aServerContainer->getHostName(); + CORBA::Long aServerPID = aServerContainer->getPID(); + aMeshGen->SetEmbeddedMode((aClientPID == aServerPID) && (aClientHostName == aServerHostName.in())); + } + theIsEmbeddedMode = aMeshGen->IsEmbeddedMode(); + + return aMeshGen; +} + + +//======================================================================= +// function : Create() +// purpose : +//======================================================================= +SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB, + SMESH::SMESH_Mesh_ptr theMesh): + myMeshServer(SMESH::SMESH_Mesh::_duplicate(theMesh)), + mySMESHDSMesh(NULL), + mySMDSMesh(NULL) +{ + myMeshServer->Register(); + + CORBA::Boolean anIsEmbeddedMode; + GetSMESHGen(theORB,anIsEmbeddedMode); + if(anIsEmbeddedMode){ + if ( MYDEBUG ) + MESSAGE("Info: The same process, update mesh by pointer "); + // just set client mesh pointer to server mesh pointer + SMESH_Mesh* aMesh = reinterpret_cast(theMesh->GetMeshPtr()); + if(aMesh->GetMeshDS()->IsEmbeddedMode()){ + mySMESHDSMesh = aMesh->GetMeshDS(); + mySMDSMesh = mySMESHDSMesh; + } + } + if(!mySMDSMesh) + mySMDSMesh = new SMDS_Mesh(); +} + + +//================================================================================= +// function : ~SMESH_Client +// purpose : Destructor +//================================================================================= +SMESH_Client::~SMESH_Client() +{ + myMeshServer->Destroy(); + if(!mySMESHDSMesh) + delete mySMDSMesh; +} + + +//================================================================================= +SMDS_Mesh* +SMESH_Client::GetMesh() const +{ + return mySMDSMesh; +} + + +//================================================================================= +SMDS_Mesh* +SMESH_Client::operator->() const +{ + return GetMesh(); +} + + +//================================================================================= +SMESH::SMESH_Mesh_ptr +SMESH_Client::GetMeshServer() +{ + return myMeshServer.in(); +} + + +//================================================================================= +// function : SMESH_Client +// purpose : Update mesh +//================================================================================= +bool +SMESH_Client::Update(bool theIsClear) +{ + bool anIsModified = true; + if(mySMESHDSMesh){ + SMESHDS_Script* aScript = mySMESHDSMesh->GetScript(); + anIsModified = aScript->IsModified(); + aScript->SetModified(false); + }else{ + SMESH::log_array_var aSeq = myMeshServer->GetLog( theIsClear ); + CORBA::Long aLength = aSeq->length(); + anIsModified = aLength > 0; + if( MYDEBUG ) + MESSAGE( "Update: length of the script is "<RemoveNode( FindNode( mySMDSMesh, anIndexes[anElemId] ) ); + break; + + case SMESH::REMOVE_ELEMENT: + for( ; anElemId < aNbElems; anElemId++ ) + mySMDSMesh->RemoveElement( FindElement( mySMDSMesh, anIndexes[anElemId] ) ); + break; + + case SMESH::MOVE_NODE: + for(CORBA::Long aCoordId=0; anElemId < aNbElems; anElemId++, aCoordId+=3) + { + SMDS_MeshNode* node = + const_cast( FindNode( mySMDSMesh, anIndexes[anElemId] )); + node->setXYZ( aCoords[aCoordId], aCoords[aCoordId+1], aCoords[aCoordId+2] ); + } + break; + + case SMESH::CHANGE_ELEMENT_NODES: + for ( CORBA::Long i = 0; anElemId < aNbElems; anElemId++ ) + { + // find element + const SMDS_MeshElement* elem = FindElement( mySMDSMesh, anIndexes[i++] ); + // nb nodes + int nbNodes = anIndexes[i++]; + // nodes + //ASSERT( nbNodes < 9 ); + const SMDS_MeshNode* aNodes[ nbNodes ]; + for ( int iNode = 0; iNode < nbNodes; iNode++ ) + aNodes[ iNode ] = FindNode( mySMDSMesh, anIndexes[i++] ); + // change + mySMDSMesh->ChangeElementNodes( elem, aNodes, nbNodes ); + } + break; + + case SMESH::CHANGE_POLYHEDRON_NODES: + ChangePolyhedronNodes(mySMDSMesh, aSeq, anId); + break; + case SMESH::RENUMBER: + for(CORBA::Long i=0; anElemId < aNbElems; anElemId++, i+=3) + { + mySMDSMesh->Renumber( anIndexes[i], anIndexes[i+1], anIndexes[i+2] ); + } + break; + + default:; + } + } + } + catch ( SALOME::SALOME_Exception& exc ) + { + INFOS("Following exception was cought:\n\t"<NbNodes() = "<NbNodes()); + MESSAGE("Update - mySMDSMesh->NbEdges() = "<NbEdges()); + MESSAGE("Update - mySMDSMesh->NbFaces() = "<NbFaces()); + MESSAGE("Update - mySMDSMesh->NbVolumes() = "<NbVolumes()); + } + } // end of update mesh by log script + + return anIsModified; +} diff --git a/src/SMESHClient/SMESH_Client.hxx b/src/SMESHClient/SMESH_Client.hxx new file mode 100644 index 000000000..cc17cf88c --- /dev/null +++ b/src/SMESHClient/SMESH_Client.hxx @@ -0,0 +1,79 @@ +// SMESH SMESHClient : tool to update client mesh structure by mesh from server +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : SMESH_Client.hxx +// Author : Pavel TELKOV +// Module : SMESH + +#ifndef _SMESH_Client_HeaderFile +#define _SMESH_Client_HeaderFile + +#include +#include CORBA_SERVER_HEADER(SMESH_Gen) +#include CORBA_SERVER_HEADER(SMESH_Mesh) + +#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS +#define SMESHCLIENT_WNT_EXPORT __declspec( dllexport ) +#else +#define SMESHCLIENT_WNT_EXPORT +#endif + +class SMESHDS_Mesh; +class SMDS_Mesh; + + +//===================================================================== +// SMESH_Client : class definition +//===================================================================== +class SMESHCLIENT_WNT_EXPORT SMESH_Client +{ +public: + static + SMESH::SMESH_Gen_var + GetSMESHGen(CORBA::ORB_ptr theORB, + CORBA::Boolean& theIsEmbeddedMode); + + SMESH_Client(CORBA::ORB_ptr theORB, + SMESH::SMESH_Mesh_ptr theMesh); + ~SMESH_Client(); + + bool + Update(bool theIsClear); + + SMDS_Mesh* + GetMesh() const; + + SMDS_Mesh* + operator->() const; + + SMESH::SMESH_Mesh_ptr + GetMeshServer(); + +protected: + SMESH::SMESH_Mesh_var myMeshServer; + SMESHDS_Mesh* mySMESHDSMesh; + SMDS_Mesh* mySMDSMesh; +}; + + +#endif diff --git a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx new file mode 100644 index 000000000..da47fe190 --- /dev/null +++ b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx @@ -0,0 +1,1101 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#include "SMESHGUI_AddQuadraticElementDlg.h" + +#include "SMESHGUI.h" +#include "SMESHGUI_Utils.h" +#include "SMESHGUI_VTKUtils.h" +#include "SMESHGUI_MeshUtils.h" +#include "SMESHGUI_IdValidator.h" +#include "SMESH_ActorUtils.h" + +#include "SMDS_Mesh.hxx" +#include "SMESH_Actor.h" + +#include "SUIT_Session.h" +#include "SUIT_MessageBox.h" +#include "LightApp_Application.h" + +#include "SVTK_Selection.h" +#include "SVTK_Selector.h" +#include "SALOME_ListIO.hxx" +#include "SALOME_ListIteratorOfListIO.hxx" + +#include "SalomeApp_Study.h" +#include "SalomeApp_Application.h" + +#include "SVTK_ViewModel.h" +#include "SVTK_ViewWindow.h" + +#include "utilities.h" + +// OCCT Includes +#include +#include + +// VTK Includes +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +// QT Includes +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// STL includes +#include + +using namespace std; + +namespace SMESH { + + void ReverseConnectivity( vector & ids, int type ) + { + // for reverse connectivity of other types keeping the first id, see + // void SMESH_VisualObjDef::buildElemPrs() in SMESH_Object.cxx:900 + const int* conn = 0; + + switch ( type ) { + case QUAD_TETRAHEDRON: { + static int aConn[] = {0,2,1,3,6,5,4,7,9,8}; + conn = aConn; + break; + } + case QUAD_PYRAMID: { + static int aConn[] = {0,3,2,1,4,8,7,6,5,9,12,11,10}; + conn = aConn; + break; + } + case QUAD_PENTAHEDRON: { + static int aConn[] = {0,2,1,3,5,4,8,7,6,11,10,9,12,14,13}; + conn = aConn; + break; + } + case QUAD_HEXAHEDRON: { + static int aConn[] = {0,3,2,1,4,7,6,5,11,10,9,8,15,14,13,12,16,19,18,17}; + conn = aConn; + break; + } + case QUAD_EDGE: { + static int aConn[] = {1,0,2}; + conn = aConn; + break; + } + case QUAD_TRIANGLE: { + static int aConn[] = {0,2,1,5,4,3}; + conn = aConn; + break; + } + case QUAD_QUADRANGLE: { + static int aConn[] = {0,3,2,1,7,6,5,4}; + conn = aConn; + break; + } + default:; + } + if ( !conn ) { + reverse( ids.begin(), ids.end() ); + } + else { + vector aRevIds( ids.size() ); + for ( int i = 0; i < ids.size(); i++) + aRevIds[ i ] = ids[ conn[ i ]]; + ids = aRevIds; + } + } + + class TElementSimulation { + SalomeApp_Application* myApplication; + SUIT_ViewWindow* myViewWindow; + SVTK_ViewWindow* myVTKViewWindow; + + SALOME_Actor* myPreviewActor; + vtkDataSetMapper* myMapper; + vtkUnstructuredGrid* myGrid; + //vtkProperty* myBackProp, *myProp; + + vtkFloatingPointType myRGB[3], myBackRGB[3]; + + public: + TElementSimulation (SalomeApp_Application* theApplication) + { + myApplication = theApplication; + SUIT_ViewManager* mgr = theApplication->activeViewManager(); + if (!mgr) return; + myViewWindow = mgr->getActiveView(); + myVTKViewWindow = GetVtkViewWindow(myViewWindow); + + myGrid = vtkUnstructuredGrid::New(); + + // Create and display actor + myMapper = vtkDataSetMapper::New(); + myMapper->SetInput(myGrid); + + myPreviewActor = SALOME_Actor::New(); + myPreviewActor->PickableOff(); + myPreviewActor->VisibilityOff(); + myPreviewActor->SetMapper(myMapper); + + vtkProperty* myProp = vtkProperty::New(); + GetColor( "SMESH", "fill_color", myRGB[0], myRGB[1], myRGB[2], QColor( 0, 170, 255 ) ); + myProp->SetColor( myRGB[0], myRGB[1], myRGB[2] ); + myPreviewActor->SetProperty( myProp ); + myProp->Delete(); + + vtkProperty* myBackProp = vtkProperty::New(); + GetColor( "SMESH", "backface_color", myBackRGB[0], myBackRGB[1], myBackRGB[2], QColor( 0, 0, 255 ) ); + myBackProp->SetColor( myBackRGB[0], myBackRGB[1], myBackRGB[2] ); + myPreviewActor->SetBackfaceProperty( myBackProp ); + myBackProp->Delete(); + + myVTKViewWindow->AddActor(myPreviewActor); + } + + typedef std::vector TVTKIds; + void SetPosition (SMESH_Actor* theActor, + const int theType, + TVTKIds& theIds, + const int theMode, + const bool theReverse) + { + vtkUnstructuredGrid *aGrid = theActor->GetUnstructuredGrid(); + myGrid->SetPoints(aGrid->GetPoints()); + + //add points + + vtkIdType aType = 0; + + switch (theType) { + case QUAD_EDGE: + aType = VTK_QUADRATIC_EDGE; + break; + case QUAD_TRIANGLE: + aType = VTK_QUADRATIC_TRIANGLE; + break; + case QUAD_QUADRANGLE: + aType = VTK_QUADRATIC_QUAD; + break; + case QUAD_TETRAHEDRON: + aType = VTK_QUADRATIC_TETRA; + break; + case QUAD_PYRAMID: + //aType = VTK_QUADRATIC_PYRAMID; // NOT SUPPORTED IN VTK4.2 + aType = VTK_CONVEX_POINT_SET; + break; + case QUAD_PENTAHEDRON: + //aType = VTK_QUADRATIC_WEDGE; // NOT SUPPORTED IN VTK4.2 + aType = VTK_CONVEX_POINT_SET; + break; + case QUAD_HEXAHEDRON: + aType = VTK_QUADRATIC_HEXAHEDRON; + break; + } + + // take care of orientation + if ( aType == VTK_CONVEX_POINT_SET ) { + if ( theReverse && theMode == VTK_SURFACE ) { + //myPreviewActor->GetProperty()->SetColor( myBackRGB[0], myBackRGB[1], myBackRGB[2] ); + } + } + else { + // VTK cell connectivity opposites the MED one for volumic elements + if ( theIds.size() > 8 ? !theReverse : theReverse ) { + ReverseConnectivity( theIds, theType ); + } + } + + myGrid->Reset(); + vtkIdList *anIds = vtkIdList::New(); + + for (int i = 0, iEnd = theIds.size(); i < iEnd; i++) { + anIds->InsertId(i,theIds[i]); + //std::cout << i<< ": " << theIds[i] << std::endl; + } + + myGrid->InsertNextCell(aType,anIds); + anIds->Delete(); + + myGrid->Modified(); + + myPreviewActor->GetMapper()->Update(); + myPreviewActor->SetRepresentation( theMode ); + SetVisibility(true); + + // restore normal orientation + if ( aType == VTK_CONVEX_POINT_SET ) { + if ( theReverse && theMode == VTK_SURFACE ) { + //myPreviewActor->GetProperty()->SetColor( myRGB[0], myRGB[1], myRGB[2] ); + } + } + } + + + void SetVisibility (bool theVisibility) + { + myPreviewActor->SetVisibility(theVisibility); + RepaintCurrentView(); + } + + + ~TElementSimulation() + { + if (FindVtkViewWindow(myApplication->activeViewManager(), myViewWindow)) { + myVTKViewWindow->RemoveActor(myPreviewActor); + } + myPreviewActor->Delete(); + + myMapper->RemoveAllInputs(); + myMapper->Delete(); + + myGrid->Delete(); + +// myProp->Delete(); +// myBackProp->Delete(); + } + }; +} + + +// Define the sequences of ids +static int FirstEdgeIds[] = {0}; +static int LastEdgeIds[] = {1}; + +static int FirstTriangleIds[] = {0,1,2}; +static int LastTriangleIds[] = {1,2,0}; + +static int FirstQuadrangleIds[] = {0,1,2,3}; +static int LastQuadrangleIds[] = {1,2,3,0}; + +static int FirstTetrahedronIds[] = {0,1,2,3,3,3}; +static int LastTetrahedronIds[] = {1,2,0,0,1,2}; + +static int FirstPyramidIds[] = {0,1,2,3,4,4,4,4}; +static int LastPyramidIds[] = {1,2,3,0,0,1,2,3}; + +static int FirstPentahedronIds[] = {0,1,2,3,4,5,0,1,2}; +static int LastPentahedronIds[] = {1,2,0,4,5,3,3,4,5}; + +static int FirstHexahedronIds[] = {0,1,2,3,4,5,6,7,0,1,2,3}; +static int LastHexahedronIds[] = {1,2,3,0,5,6,7,4,4,5,6,7}; + + + +//================================================================================= +// function : SMESHGUI_AddQuadraticElementDlg() +// purpose : constructor +//================================================================================= +SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theModule, + const int theType, + const char* name, + bool modal, WFlags fl) + : QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder | + WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose), + mySMESHGUI( theModule ), + mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ), + myType( theType ) +{ + SalomeApp_Application* anApp = dynamic_cast + (SUIT_Session::session()->activeApplication()); + + mySimulation = new SMESH::TElementSimulation (anApp); + mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector(); + + QString anElementName; + + switch ( myType ) { + case QUAD_EDGE: + anElementName = QString("QUADRATIC_EDGE"); + break; + case QUAD_TRIANGLE: + anElementName = QString("QUADRATIC_TRIANGLE"); + break; + case QUAD_QUADRANGLE: + anElementName = QString("QUADRATIC_QUADRANGLE"); + break; + case QUAD_TETRAHEDRON: + anElementName = QString("QUADRATIC_TETRAHEDRON"); + break; + case QUAD_PYRAMID: + anElementName = QString("QUADRATIC_PYRAMID"); + break; + case QUAD_PENTAHEDRON: + anElementName = QString("QUADRATIC_PENTAHEDRON"); + break; + case QUAD_HEXAHEDRON: + anElementName = QString("QUADRATIC_HEXAHEDRON"); + break; + default: + myType = QUAD_EDGE; + anElementName = QString("QUADRATIC_EDGE"); + } + + QString iconName = tr(QString("ICON_DLG_%1").arg(anElementName)); + QString caption = tr(QString("SMESH_ADD_%1_TITLE").arg(anElementName)); + QString argumentsGrTitle = tr(QString("SMESH_ADD_%1").arg(anElementName)); + QString constructorGrTitle = tr(QString("SMESH_%1").arg(anElementName)); + + QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", iconName)); + QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT"))); + + if (!name) + setName("SMESHGUI_AddQuadraticElementDlg"); + setCaption(caption); + + setSizeGripEnabled(TRUE); + QGridLayout* aDialogLayout = new QGridLayout(this); + aDialogLayout->setSpacing(6); + aDialogLayout->setMargin(11); + + /***************************************************************/ + GroupConstructors = new QButtonGroup(this, "GroupConstructors"); + GroupConstructors->setTitle(constructorGrTitle); + + GroupConstructors->setExclusive(TRUE); + GroupConstructors->setColumnLayout(0, Qt::Vertical); + GroupConstructors->layout()->setSpacing(0); + GroupConstructors->layout()->setMargin(0); + GroupConstructors->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed)); + QGridLayout* aGroupConstructorsLayout = new QGridLayout(GroupConstructors->layout()); + aGroupConstructorsLayout->setAlignment(Qt::AlignTop); + aGroupConstructorsLayout->setSpacing(6); + aGroupConstructorsLayout->setMargin(11); + myRadioButton1 = new QRadioButton(GroupConstructors, "myRadioButton1"); + myRadioButton1->setText(tr("" )); + myRadioButton1->setPixmap(image0); + myRadioButton1->setChecked(TRUE); + myRadioButton1->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, myRadioButton1->sizePolicy().hasHeightForWidth())); + aGroupConstructorsLayout->addWidget(myRadioButton1, 0, 0); + aGroupConstructorsLayout->addItem( new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1); + aDialogLayout->addWidget(GroupConstructors, 0, 0); + + /***************************************************************/ + GroupArguments = new QGroupBox(this, "GroupArguments"); + GroupArguments->setTitle(argumentsGrTitle); + GroupArguments->setColumnLayout(0, Qt::Vertical); + GroupArguments->layout()->setSpacing(0); + GroupArguments->layout()->setMargin(0); + GroupArguments->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding)); + QGridLayout* aGroupArgumentsLayout = new QGridLayout(GroupArguments->layout()); + aGroupArgumentsLayout->setAlignment(Qt::AlignTop); + aGroupArgumentsLayout->setSpacing(6); + aGroupArgumentsLayout->setMargin(11); + QLabel* aCornerNodesLabel = new QLabel(GroupArguments, "aCornerNodesLabel"); + aCornerNodesLabel->setText(tr("SMESH_CORNER_NODES" )); + aGroupArgumentsLayout->addWidget(aCornerNodesLabel, 0, 0); + mySelectButton = new QPushButton(GroupArguments, "mySelectButton"); + mySelectButton->setPixmap(image1); + aGroupArgumentsLayout->addWidget(mySelectButton, 0, 1); + myCornerNodes = new QLineEdit(GroupArguments, "myCornerNodes"); + aGroupArgumentsLayout->addWidget(myCornerNodes, 0, 2); + + myTable = new QTable(GroupArguments); + aGroupArgumentsLayout->addMultiCellWidget(myTable, 1, 1, 0, 2); + + myReverseCB = new QCheckBox(GroupArguments, "myReverseCB"); + myReverseCB->setText(tr("SMESH_REVERSE" )); + aGroupArgumentsLayout->addWidget(myReverseCB, 2, 0); + + aDialogLayout->addWidget(GroupArguments, 1, 0); + + + /***************************************************************/ + GroupButtons = new QGroupBox(this, "GroupButtons"); + GroupButtons->setColumnLayout(0, Qt::Vertical); + GroupButtons->layout()->setSpacing(0); + GroupButtons->layout()->setMargin(0); + GroupButtons->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); + QGridLayout* aGroupButtonsLayout = new QGridLayout(GroupButtons->layout()); + aGroupButtonsLayout->setAlignment(Qt::AlignTop); + aGroupButtonsLayout->setSpacing(6); + aGroupButtonsLayout->setMargin(11); + buttonCancel = new QPushButton(GroupButtons, "buttonCancel"); + buttonCancel->setText(tr("SMESH_BUT_CLOSE" )); + buttonCancel->setAutoDefault(TRUE); + aGroupButtonsLayout->addWidget(buttonCancel, 0, 3); + buttonApply = new QPushButton(GroupButtons, "buttonApply"); + buttonApply->setText(tr("SMESH_BUT_APPLY" )); + buttonApply->setAutoDefault(TRUE); + aGroupButtonsLayout->addWidget(buttonApply, 0, 1); + aGroupButtonsLayout->addItem( new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2); + buttonOk = new QPushButton(GroupButtons, "buttonOk"); + buttonOk->setText(tr("SMESH_BUT_OK" )); + buttonOk->setAutoDefault(TRUE); + buttonOk->setDefault(TRUE); + aGroupButtonsLayout->addWidget(buttonOk, 0, 0); + buttonHelp = new QPushButton(GroupButtons, "buttonHelp"); + buttonHelp->setText(tr("SMESH_BUT_HELP" )); + buttonHelp->setAutoDefault(TRUE); + aGroupButtonsLayout->addWidget(buttonHelp, 0, 4); + + aDialogLayout->addWidget(GroupButtons, 2, 0); + + Init(); /* Initialisations */ +} + +//================================================================================= +// function : ~SMESHGUI_AddQuadraticElementDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +SMESHGUI_AddQuadraticElementDlg::~SMESHGUI_AddQuadraticElementDlg() +{ + // no need to delete child widgets, Qt does it all for us + delete mySimulation; +} + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::Init() +{ + GroupArguments->show(); + myRadioButton1->setChecked(TRUE); + myIsEditCorners = true; + mySMESHGUI->SetActiveDialogBox((QDialog*)this); + + myActor = 0; + + int aNumRows; + + switch (myType) { + case QUAD_EDGE: + aNumRows = 1; + myNbCorners = 2; + myHelpFileName = "/adding_quadratic_nodes_and_elements.htm#?"; //Adding_edges + break; + case QUAD_TRIANGLE: + aNumRows = 3; + myNbCorners = 3; + myHelpFileName = "/adding_quadratic_nodes_and_elements.htm#?"; //Adding_triangles + break; + case QUAD_QUADRANGLE: + aNumRows = 4; + myNbCorners = 4; + myHelpFileName = "/adding_quadratic_nodes_and_elements.htm#?"; //Adding_quadrangles + break; + case QUAD_TETRAHEDRON: + aNumRows = 6; + myNbCorners = 4; + myHelpFileName = "/adding_quadratic_nodes_and_elements.htm#?"; //Adding_tetrahedrons + break; + case QUAD_PYRAMID: + aNumRows = 8; + myNbCorners = 5; + myHelpFileName = "/adding_quadratic_nodes_and_elements.htm#?"; //Adding_pyramids + break; + case QUAD_PENTAHEDRON: + aNumRows = 9; + myNbCorners = 6; + myHelpFileName = "/adding_quadratic_nodes_and_elements.htm#?"; //Adding_pentahedrons + break; + case QUAD_HEXAHEDRON: + aNumRows = 12; + myNbCorners = 8; + myHelpFileName = "/adding_quadratic_nodes_and_elements.htm#?"; //Adding_hexahedrons + break; + } + + myCornerNodes->setValidator(new SMESHGUI_IdValidator(this, "validator", myNbCorners)); + + /* initialize table */ + myTable->setNumCols(3); + myTable->setNumRows(aNumRows); + + QStringList aColLabels; + aColLabels.append(tr("SMESH_FIRST")); + aColLabels.append(tr("SMESH_MIDDLE")); + aColLabels.append(tr("SMESH_LAST")); + myTable->setColumnLabels(aColLabels); + + for ( int col = 0; col < myTable->numCols(); col++ ) + myTable->setColumnWidth(col, 80); + + myTable->setColumnReadOnly(0, true); + myTable->setColumnReadOnly(2, true); + + myTable->setEnabled( false ); + + for ( int row = 0; row < myTable->numRows(); row++ ) + { + SMESHGUI_IdEditItem* anEditItem = new SMESHGUI_IdEditItem( myTable, QTableItem::OnTyping, "" ); + anEditItem->setReplaceable(false); + myTable->setItem(row, 1, anEditItem); + } + + /* signals and slots connections */ + connect(mySelectButton, SIGNAL(clicked()), SLOT(SetEditCorners())); + connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(SelectionIntoArgument())); + connect(myTable, SIGNAL(doubleClicked(int, int, int, const QPoint&)), SLOT(onCellDoubleClicked(int, int, int, const QPoint&))); + connect(myTable, SIGNAL(valueChanged (int, int)), SLOT(onCellTextChange(int, int))); + connect(myCornerNodes, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&))); + connect(myReverseCB, SIGNAL(stateChanged(int)), SLOT(onReverse(int))); + + connect(buttonOk, SIGNAL(clicked()), SLOT(ClickOnOk())); + connect(buttonCancel, SIGNAL(clicked()), SLOT(ClickOnCancel())); + connect(buttonApply, SIGNAL(clicked()), SLOT(ClickOnApply())); + connect(buttonHelp, SIGNAL(clicked()), SLOT(ClickOnHelp())); + + connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), SLOT(DeactivateActiveDialog())); + connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), SLOT(ClickOnCancel())); + + this->show(); // displays Dialog + + // set selection mode + SMESH::SetPointRepresentation(true); + + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->SetSelectionMode( NodeSelection ); + + myBusy = false; + + SetEditCorners(); +} + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::ClickOnApply() +{ + if (IsValid() && !mySMESHGUI->isActiveStudyLocked()) { + myBusy = true; + + vector anIds; + + switch (myType) { + case QUAD_EDGE: + anIds.push_back(myTable->text(0, 0).toInt()); + anIds.push_back(myTable->text(0, 2).toInt()); + anIds.push_back(myTable->text(0, 1).toInt()); + break; + case QUAD_TRIANGLE: + case QUAD_QUADRANGLE: + case QUAD_TETRAHEDRON: + case QUAD_PYRAMID: + case QUAD_PENTAHEDRON: + case QUAD_HEXAHEDRON: + for ( int row = 0; row < myNbCorners; row++ ) + anIds.push_back(myTable->text(row, 0).toInt()); + for ( int row = 0; row < myTable->numRows(); row++ ) + anIds.push_back(myTable->text(row, 1).toInt()); + break; + } + if ( myReverseCB->isChecked()) + SMESH::ReverseConnectivity( anIds, myType ); + + int aNumberOfIds = anIds.size(); + SMESH::long_array_var anArrayOfIdeces = new SMESH::long_array; + anArrayOfIdeces->length( aNumberOfIds ); + + for (int i = 0; i < aNumberOfIds; i++) + anArrayOfIdeces[i] = anIds[ i ]; + + SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor(); + switch (myType) { + case QUAD_EDGE: + aMeshEditor->AddEdge(anArrayOfIdeces.inout()); break; + case QUAD_TRIANGLE: + case QUAD_QUADRANGLE: + aMeshEditor->AddFace(anArrayOfIdeces.inout()); break; + case QUAD_TETRAHEDRON: + case QUAD_PYRAMID: + case QUAD_PENTAHEDRON: + case QUAD_HEXAHEDRON: + aMeshEditor->AddVolume(anArrayOfIdeces.inout()); break; + } + + SALOME_ListIO aList; aList.Append( myActor->getIO() ); + mySelector->ClearIndex(); + mySelectionMgr->setSelectedObjects( aList, false ); + + SMESH::UpdateView(); + mySimulation->SetVisibility(false); + + buttonOk->setEnabled(false); + buttonApply->setEnabled(false); + + UpdateTable(); + SetEditCorners(); + + myBusy = false; + } +} + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::ClickOnOk() +{ + ClickOnApply(); + ClickOnCancel(); + return; +} + +//================================================================================= +// function : ClickOnCancel() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::ClickOnCancel() +{ + mySelectionMgr->clearSelected(); + mySimulation->SetVisibility(false); + SMESH::SetPointRepresentation(false); + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->SetSelectionMode( ActorSelection ); + disconnect(mySelectionMgr, 0, this, 0); + mySMESHGUI->ResetState(); + reject(); + return; +} + +//================================================================================= +// function : ClickOnHelp() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::ClickOnHelp() +{ + LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication()); + if (app) + app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName); + else { + SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), + QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). + arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName), + QObject::tr("BUT_OK")); + } +} + +//================================================================================= +// function : onTextChange() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::onTextChange (const QString& theNewText) +{ + if (myBusy) return; + myBusy = true; + + buttonOk->setEnabled(false); + buttonApply->setEnabled(false); + + mySimulation->SetVisibility(false); + + // hilight entered nodes + SMDS_Mesh* aMesh = 0; + if (myActor) + aMesh = myActor->GetObject()->GetMesh(); + + if (aMesh) { + TColStd_MapOfInteger newIndices; + + QStringList aListId = QStringList::split(" ", theNewText, false); + bool allOk = true; + for (int i = 0; i < aListId.count(); i++) { + if( const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() ) ) + newIndices.Add( n->GetID() ); + else + { + allOk = false; + break; + } + } + + mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false ); + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->highlight( myActor->getIO(), true, true ); + + if ( sender() == myCornerNodes ) + UpdateTable( allOk ); + } + + if( IsValid() ) { + buttonOk->setEnabled(true); + buttonApply->setEnabled(true); + } + + if ( sender() == myTable ) + displaySimulation(); + + myBusy = false; +} + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection has changed +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument() +{ + if (myBusy) return; + + if ( myIsEditCorners ) + { + // clear + myActor = 0; + + myBusy = true; + myCornerNodes->setText(""); + myBusy = false; + + if (!GroupButtons->isEnabled()) // inactive + return; + + buttonOk->setEnabled(false); + buttonApply->setEnabled(false); + + mySimulation->SetVisibility(false); + + // get selected mesh + SALOME_ListIO aList; + mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type()); + + if (aList.Extent() != 1) + { + UpdateTable(); + return; + } + + Handle(SALOME_InteractiveObject) anIO = aList.First(); + myMesh = SMESH::GetMeshByIO(anIO); + if (myMesh->_is_nil()) + return; + + myActor = SMESH::FindActorByEntry(anIO->getEntry()); + + } + + if (!myActor) + return; + + // get selected nodes + QString aString = ""; + int nbNodes = SMESH::GetNameOfSelectedNodes(mySelector,myActor->getIO(),aString); + + if ( myIsEditCorners ) + { + myBusy = true; + myCornerNodes->setText(aString); + myBusy = false; + + UpdateTable(); + } + else if ( myTable->isEnabled() && nbNodes == 1 ) + { + myBusy = true; + int theRow = myTable->currentRow(), theCol = myTable->currentColumn(); + if ( theCol == 1 ) + myTable->setText(theRow, 1, aString); + myBusy = false; + } + + if ( IsValid() ) + { + buttonOk->setEnabled( true ); + buttonApply->setEnabled( true ); + } + + displaySimulation(); +} + +//================================================================================= +// function : displaySimulation() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::displaySimulation() +{ + if (!myIsEditCorners) { + SMESH::TElementSimulation::TVTKIds anIds; + + // Collect ids from the dialog + int anID; + bool ok; + int aDisplayMode = VTK_SURFACE; + + if ( myType == QUAD_EDGE ) + { + anIds.push_back( myActor->GetObject()->GetNodeVTKId( myTable->text(0, 0).toInt() ) ); + anIds.push_back( myActor->GetObject()->GetNodeVTKId( myTable->text(0, 2).toInt() ) ); + anID = (myTable->text(0, 1)).toInt(&ok); + if (!ok) anID = (myTable->text(0, 0)).toInt(); + anIds.push_back( myActor->GetObject()->GetNodeVTKId(anID) ); + aDisplayMode = VTK_WIREFRAME; + } + else + { + for ( int row = 0; row < myNbCorners; row++ ) + anIds.push_back( myActor->GetObject()->GetNodeVTKId( myTable->text(row, 0).toInt() ) ); + + for ( int row = 0; row < myTable->numRows(); row++ ) + { + anID = (myTable->text(row, 1)).toInt(&ok); + if (!ok) { + anID = (myTable->text(row, 0)).toInt(); + aDisplayMode = VTK_WIREFRAME; + } + anIds.push_back( myActor->GetObject()->GetNodeVTKId(anID) ); + } + } + + mySimulation->SetPosition(myActor,myType,anIds,aDisplayMode,myReverseCB->isChecked()); + SMESH::UpdateView(); + } +} + +//================================================================================= +// function : SetEditCorners() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::SetEditCorners() +{ + myCornerNodes->setFocus(); + myIsEditCorners = true; + + SelectionIntoArgument(); +} + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::DeactivateActiveDialog() +{ + if (GroupConstructors->isEnabled()) { + GroupConstructors->setEnabled(false); + GroupArguments->setEnabled(false); + GroupButtons->setEnabled(false); + mySimulation->SetVisibility(false); + mySMESHGUI->ResetState(); + mySMESHGUI->SetActiveDialogBox(0); + } +} + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::ActivateThisDialog() +{ + /* Emit a signal to deactivate the active dialog */ + mySMESHGUI->EmitSignalDeactivateDialog(); + + GroupConstructors->setEnabled(true); + GroupArguments->setEnabled(true); + GroupButtons->setEnabled(true); + + SMESH::SetPointRepresentation(true); + + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->SetSelectionMode( NodeSelection ); + SelectionIntoArgument(); +} + +//================================================================================= +// function : enterEvent() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::enterEvent (QEvent*) +{ + if (GroupConstructors->isEnabled()) + return; + ActivateThisDialog(); + return; +} + +//================================================================================= +// function : closeEvent() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::closeEvent (QCloseEvent*) +{ + /* same than click on cancel button */ + ClickOnCancel(); + return; +} + +//================================================================================= +// function : hideEvent() +// purpose : caused by ESC key +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::hideEvent (QHideEvent*) +{ + if (!isMinimized()) + ClickOnCancel(); +} + +//================================================================================= +// function : onReverse() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::onReverse (int state) +{ + if (!IsValid()) + return; + + if (state >= 0) { + mySimulation->SetVisibility(false); + displaySimulation(); + } +} + + +//================================================================================= +// function : IsValid() +// purpose : +//================================================================================= +bool SMESHGUI_AddQuadraticElementDlg::IsValid() +{ + SMDS_Mesh* aMesh = 0; + if (myActor) + aMesh = myActor->GetObject()->GetMesh(); + if (!aMesh) + return false; + + bool ok; + + for ( int row = 0; row < myTable->numRows(); row++ ) + { + int anID = (myTable->text(row, 1)).toInt(&ok); + if ( !ok ) + return false; + + const SMDS_MeshNode * aNode = aMesh->FindNode(anID); + if ( !aNode ) + return false; + } + + return true; +} + +//================================================================================= +// function : UpdateTable() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity ) +{ + QStringList aListCorners = QStringList::split(" ", myCornerNodes->text(), false); + + if ( aListCorners.count() == myNbCorners && theConersValidity ) + { + myTable->setEnabled( true ); + + // clear the Middle column + for ( int row = 0; row < myTable->numRows(); row++ ) + myTable->setText( row, 1, ""); + + int* aFirstColIds; + int* aLastColIds; + + switch (myType) { + case QUAD_EDGE: + aFirstColIds = FirstEdgeIds; + aLastColIds = LastEdgeIds; + break; + case QUAD_TRIANGLE: + aFirstColIds = FirstTriangleIds; + aLastColIds = LastTriangleIds; + break; + case QUAD_QUADRANGLE: + aFirstColIds = FirstQuadrangleIds; + aLastColIds = LastQuadrangleIds; + break; + case QUAD_TETRAHEDRON: + aFirstColIds = FirstTetrahedronIds; + aLastColIds = LastTetrahedronIds; + break; + case QUAD_PYRAMID: + aFirstColIds = FirstPyramidIds; + aLastColIds = LastPyramidIds; + break; + case QUAD_PENTAHEDRON: + aFirstColIds = FirstPentahedronIds; + aLastColIds = LastPentahedronIds; + break; + case QUAD_HEXAHEDRON: + aFirstColIds = FirstHexahedronIds; + aLastColIds = LastHexahedronIds; + break; + } + + // fill the First and the Last columns + for (int i = 0, iEnd = myTable->numRows(); i < iEnd; i++) + myTable->setText( i, 0, aListCorners[ aFirstColIds[i] ] ); + + for (int i = 0, iEnd = myTable->numRows(); i < iEnd; i++) + myTable->setText( i, 2, aListCorners[ aLastColIds[i] ] ); + } + else + { + // clear table + for ( int row = 0; row < myTable->numRows(); row++ ) + for ( int col = 0; col < myTable->numCols(); col++ ) + myTable->setText(row, col, ""); + + myTable->setEnabled( false ); + } +} + + +//================================================================================= +// function : onTableActivate() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::onCellDoubleClicked( int theRow, int theCol, int theButton, const QPoint& theMousePos ) +{ + if ( theButton == 1 && theCol == 1 ) + myIsEditCorners = false; + + displaySimulation(); + return; +} + + +//================================================================================= +// function : onCellTextChange() +// purpose : +//================================================================================= +void SMESHGUI_AddQuadraticElementDlg::onCellTextChange(int theRow, int theCol) +{ + onTextChange( myTable->text(theRow, theCol) ); +} + + +QWidget* SMESHGUI_IdEditItem::createEditor() const +{ + QLineEdit *aLineEdit = new QLineEdit(text(), table()->viewport()); + aLineEdit->setValidator( new SMESHGUI_IdValidator(table()->viewport(), "validator", 1) ); + return aLineEdit; +} diff --git a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.h b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.h new file mode 100644 index 000000000..ea63a83ec --- /dev/null +++ b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.h @@ -0,0 +1,132 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#ifndef DIALOGBOX_ADD_QUADRATIC_ELEMENT_H +#define DIALOGBOX_ADD_QUADRATIC_ELEMENT_H + +#include "LightApp_SelectionMgr.h" + +// QT Includes +#include +#include + +class QButtonGroup; +class QGroupBox; +class QLineEdit; +class QPushButton; +class QRadioButton; +class QCheckBox; +class QTable; +class SMESHGUI; +class SMESH_Actor; +class SVTK_Selector; + +namespace SMESH{ + struct TElementSimulation; +} + +// IDL Headers +#include +#include CORBA_SERVER_HEADER(SMESH_Mesh) + +enum { QUAD_EDGE, QUAD_TRIANGLE, QUAD_QUADRANGLE, QUAD_TETRAHEDRON, QUAD_PYRAMID, QUAD_PENTAHEDRON, QUAD_HEXAHEDRON }; + +//================================================================================= +// class : SMESHGUI_AddQuadraticElementDlg +// purpose : +//================================================================================= +class SMESHGUI_AddQuadraticElementDlg : public QDialog +{ + Q_OBJECT + +public: + SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theModule, + const int theType, + const char* = 0, + bool modal = FALSE, WFlags fl = 0 ); + ~SMESHGUI_AddQuadraticElementDlg(); + +private: + void Init (); + void closeEvent (QCloseEvent*); + void hideEvent (QHideEvent*); /* ESC key */ + void enterEvent (QEvent*); /* mouse enter the QWidget */ + void displaySimulation(); + void UpdateTable( bool theConersValidity = true ); + bool IsValid(); + + SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */ + LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */ + int myNbCorners; /* The required number of corners */ + bool myBusy; + SVTK_Selector* mySelector; + + SMESH::SMESH_Mesh_var myMesh; + SMESH_Actor* myActor; + SMESH::TElementSimulation* mySimulation; + + int myType; + bool myIsEditCorners; + + QButtonGroup* GroupConstructors; + QRadioButton* myRadioButton1; + + QGroupBox* GroupArguments; + QLineEdit* myCornerNodes; + QPushButton* mySelectButton; + QTable* myTable; + QCheckBox* myReverseCB; + + QGroupBox* GroupButtons; + QPushButton* buttonOk; + QPushButton* buttonCancel; + QPushButton* buttonApply; + QPushButton * buttonHelp; + + QString myHelpFileName; + +private slots: + + void onTextChange(const QString&); + void onCellTextChange(int, int); + void onReverse( int ); + void onCellDoubleClicked(int, int, int, const QPoint&); + + void ClickOnOk(); + void ClickOnCancel(); + void ClickOnApply(); + void ClickOnHelp(); + void SetEditCorners() ; + void SelectionIntoArgument() ; + void DeactivateActiveDialog() ; + void ActivateThisDialog() ; +}; + +class SMESHGUI_IdEditItem: public QTableItem +{ +public: + SMESHGUI_IdEditItem(QTable* table, EditType et, const QString& text ): + QTableItem(table, et, text) {}; + ~SMESHGUI_IdEditItem() {}; + + QWidget* createEditor() const; +}; + + +#endif // DIALOGBOX_ADD_QUADRATIC_ELEMENT_H diff --git a/src/SMESHGUI/SMESHGUI_ConvToQuadDlg.cxx b/src/SMESHGUI/SMESHGUI_ConvToQuadDlg.cxx new file mode 100644 index 000000000..6c2cf5dab --- /dev/null +++ b/src/SMESHGUI/SMESHGUI_ConvToQuadDlg.cxx @@ -0,0 +1,130 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +/** +* SMESH SMESHGUI +* +* Copyright (C) 2005 CEA/DEN, EDF R&D +* +* +* +* File : SMESHGUI_ConvToQuadDlg.cxx +* Module : SMESH +*/ + +#include +#include + +#include +#include +#include +#include +#include + +SMESHGUI_ConvToQuadDlg::SMESHGUI_ConvToQuadDlg() +: SMESHGUI_Dialog( 0, false, true ) +{ + + setCaption( tr( "CAPTION" ) ); + + // Create top controls + QGroupBox* aGrp = new QGroupBox( 3, Qt::Horizontal, mainFrame() ); + aGrp->setFrameStyle( QFrame::NoFrame ); + aGrp->setInsideMargin( 0 ); + + // mesh + createObject( tr( "MESH" ), aGrp, 0 ); + + //Create check box + myMedNdsOnGeom = new QCheckBox( tr( "MEDIUMNDS" ), mainFrame() ); + + //Create RadioButtons + myBG = new QButtonGroup( 2, Qt::Vertical, "", mainFrame() ); + myBG->setExclusive( true ); + + myRB1 = new QRadioButton( myBG ); + myRB1->setText( tr( "RADIOBTN_1" ) ); + myRB1->setChecked( true ); + + myRB2 = new QRadioButton( myBG ); + myRB2->setText( tr( "RADIOBTN_2" ) ); + + // Fill layout + QVBoxLayout* aLay = new QVBoxLayout( mainFrame(), 5, 5 ); + aLay->addWidget( aGrp ); + aLay->addWidget( myMedNdsOnGeom ); + aLay->addWidget( myBG ); + + connect(myBG, SIGNAL( clicked( int ) ), this, SIGNAL( onClicked( int ) ) ); +} + +SMESHGUI_ConvToQuadDlg::~SMESHGUI_ConvToQuadDlg() +{ +} + +bool SMESHGUI_ConvToQuadDlg::IsMediumNdsOnGeom() const +{ + return !myMedNdsOnGeom->isChecked(); +} + +void SMESHGUI_ConvToQuadDlg::SetMediumNdsOnGeom(const bool theCheck) +{ + myMedNdsOnGeom->setChecked(theCheck); +} + +bool SMESHGUI_ConvToQuadDlg::IsEnabledCheck() const +{ + return myMedNdsOnGeom->isEnabled(); +} + +void SMESHGUI_ConvToQuadDlg::SetEnabledCheck( const bool theCheck ) +{ + myMedNdsOnGeom->setEnabled( theCheck ); +} + +int SMESHGUI_ConvToQuadDlg::CurrentRB( ) +{ + return myBG->selectedId(); +} + +void SMESHGUI_ConvToQuadDlg::SetEnabledControls( const bool theCheck ) +{ + myBG->setEnabled( theCheck ); + myMedNdsOnGeom->setEnabled( theCheck ); + setButtonEnabled( theCheck, QtxDialog::OK | QtxDialog::Apply ); +} + +void SMESHGUI_ConvToQuadDlg::SetEnabledRB( const int idx, const bool theCheck ) +{ + if(idx) + { + myRB2->setEnabled( theCheck ); + myRB1->setEnabled( !theCheck ); + myRB1->setChecked( true ); + } + else + { + myRB1->setEnabled( theCheck ); + myRB2->setEnabled( !theCheck ); + myRB2->setChecked( true ); + } + emit onClicked( myBG->selectedId() ); +} + + diff --git a/src/SMESHGUI/SMESHGUI_ConvToQuadDlg.h b/src/SMESHGUI/SMESHGUI_ConvToQuadDlg.h new file mode 100644 index 000000000..68d024bc6 --- /dev/null +++ b/src/SMESHGUI/SMESHGUI_ConvToQuadDlg.h @@ -0,0 +1,81 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +/** +* SMESH SMESHGUI +* +* Copyright (C) 2005 CEA/DEN, EDF R&D +* +* +* +* File : SMESHGUI_ConvToQuadDlg.h +* Module : SMESH +*/ + + +#ifndef SMESHGUI_ConvToQuadDlg_H +#define SMESHGUI_ConvToQuadDlg_H + +#include "SMESHGUI_Dialog.h" +/*#include +#include +#include */ + +//idl headers +#include +#include CORBA_SERVER_HEADER(SMESH_Mesh) + +class QCheckBox; +class QRadioButton; +class QButtonGroup; + +class SMESHGUI_ConvToQuadDlg : public SMESHGUI_Dialog +{ + Q_OBJECT + +public: + SMESHGUI_ConvToQuadDlg(); + virtual ~SMESHGUI_ConvToQuadDlg(); + + bool IsMediumNdsOnGeom() const; + void SetMediumNdsOnGeom(const bool theCheck); + bool IsEnabledCheck() const; + void SetEnabledCheck( const bool theCheck ); + void SetEnabledGroup( const bool theCheck ); + void SetEnabledControls( const bool theCheck ); + void SetEnabledRB( const int idx, const bool theCheck ); + int CurrentRB();//returns the ID of the selected toggle button + +signals: + void onClicked( int ); + +private: + + QCheckBox* myMedNdsOnGeom; + QButtonGroup* myBG; + QRadioButton* myRB1; + QRadioButton* myRB2; + +}; + +#endif + + + + diff --git a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx new file mode 100644 index 000000000..a5095e6a9 --- /dev/null +++ b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx @@ -0,0 +1,286 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +/** +* SMESH SMESHGUI +* +* Copyright (C) 2005 CEA/DEN, EDF R&D +* +* +* +* File : SMESHGUI_ConvToQuadOp.h +* Module : SMESHGUI +*/ + +#include "SMESHGUI_ConvToQuadOp.h" +#include "SMESHGUI_ConvToQuadDlg.h" + +#include "SMESHGUI.h" +#include "SMESHGUI_Utils.h" + +#include "SMESH_TypeFilter.hxx" + +#include "SalomeApp_Tools.h" + +#include "SUIT_MessageBox.h" + +#include "LightApp_UpdateFlags.h" + +//================================================================================ +/*! + * \brief Constructor + * + * Initialize operation +*/ +//================================================================================ +SMESHGUI_ConvToQuadOp::SMESHGUI_ConvToQuadOp() + : SMESHGUI_SelectionOp(), + myDlg( 0 ) +{ +} + +//================================================================================ +/*! + * \brief Destructor +*/ +//================================================================================ +SMESHGUI_ConvToQuadOp::~SMESHGUI_ConvToQuadOp() +{ + if ( myDlg ) + delete myDlg; +} + +//================================================================================ +/*! + * \brief Gets dialog of this operation + * \retval LightApp_Dialog* - pointer to dialog of this operation +*/ +//================================================================================ +LightApp_Dialog* SMESHGUI_ConvToQuadOp::dlg() const +{ + return myDlg; +} + +//================================================================================ +/*! + * \brief Creates dialog if necessary and shows it + * + * Virtual method redefined from base class called when operation is started creates + * dialog if necessary and shows it, activates selection + */ +//================================================================================ +void SMESHGUI_ConvToQuadOp::startOperation() +{ + if( !myDlg ) + { + myDlg = new SMESHGUI_ConvToQuadDlg( ); + } + connect( myDlg, SIGNAL( onClicked( int ) ), SLOT( ConnectRadioButtons( int ) ) ); + + SMESHGUI_SelectionOp::startOperation(); + + myDlg->SetMediumNdsOnGeom( false ); + myDlg->activateObject( 0 ); + myDlg->show(); + + selectionDone(); +} + +//================================================================================ +/*! + * \brief Updates dialog's look and feel + * + * Virtual method redefined from the base class updates dialog's look and feel + */ +//================================================================================ +void SMESHGUI_ConvToQuadOp::selectionDone() +{ + if ( !dlg()->isShown() ) + return; + + SMESHGUI_SelectionOp::selectionDone(); + try + { + QString anMeshEntry = myDlg->selectedObject( 0 ); + _PTR(SObject) pMesh = studyDS()->FindObjectID( anMeshEntry.latin1() ); + if ( !pMesh ) return; + + SMESH::SMESH_Mesh_var mesh = + SMESH::SObjectToInterface( pMesh ); + + if( mesh->_is_nil() ) + { + myDlg->SetEnabledControls( false ); + } + else if( ConsistMesh( mesh ) == SMESHGUI_ConvToQuadOp::Quadratic ) + { + myDlg->SetEnabledRB( 0, false ); + } + else if( ConsistMesh( mesh ) == SMESHGUI_ConvToQuadOp::Linear ) + { + myDlg->SetEnabledRB( 1, false ); + } + else + { + myDlg->SetEnabledControls( true ); + } + } + catch ( const SALOME::SALOME_Exception& S_ex ) + { + SalomeApp_Tools::QtCatchCorbaException( S_ex ); + } + catch ( ... ) + { + } +} + +//================================================================================ +/*! + * \brief Creates selection filter + * \param theId - identifier of current selection widget + * \retval SUIT_SelectionFilter* - pointer to the created filter or null + * + * Creates selection filter in accordance with identifier of current selection widget + */ +//================================================================================ +SUIT_SelectionFilter* SMESHGUI_ConvToQuadOp::createFilter( const int theId ) const +{ + if ( theId == 0 ) + return new SMESH_TypeFilter( MESH ); + else + return 0; +} + +//================================================================================ +/*! + * \brief Edits mesh + * + * Virtual slot redefined from the base class called when "Apply" button is clicked + */ +//================================================================================ +bool SMESHGUI_ConvToQuadOp::onApply() +{ + + QString aMess; + + QString anMeshEntry = myDlg->selectedObject( 0 ); + _PTR(SObject) pMesh = studyDS()->FindObjectID( anMeshEntry.latin1() ); + if ( !pMesh ) + { + dlg()->show(); + SUIT_MessageBox::warn1( myDlg, + tr( "SMESH_WRN_WARNING" ), tr("MESH_IS_NOT_SELECTED"), tr( "SMESH_BUT_OK" ) ); + + return false; + } + + SMESH::SMESH_Mesh_var mesh = + SMESH::SObjectToInterface( pMesh ); + + if( CORBA::is_nil(mesh) ) + { + SUIT_MessageBox::warn1( myDlg, + tr( "SMESH_WRN_WARNING" ), tr("REF_IS_NULL"), tr( "SMESH_BUT_OK" ) ); + + return false; + } + + bool aResult = false; + + try + { + SMESH::SMESH_MeshEditor_var aEditor = mesh->GetMeshEditor(); + if( !myDlg->CurrentRB() ) + { + bool aParam = true; + if( myDlg->IsEnabledCheck() ) + aParam = myDlg->IsMediumNdsOnGeom(); + + aEditor->ConvertToQuadratic( aParam ); + aResult = true; + } + else + { + aResult = aEditor->ConvertFromQuadratic(); + } + } + catch ( const SALOME::SALOME_Exception& S_ex ) + { + SalomeApp_Tools::QtCatchCorbaException( S_ex ); + aResult = false; + } + catch ( ... ) + { + aResult = false; + } + if( aResult ) + { + update( UF_ObjBrowser | UF_Model | UF_Viewer ); + selectionDone(); + } + return aResult; +} + +//================================================================================ +/*! ConsistMesh + * Determines, what elements this mesh contains. + */ +//================================================================================ +SMESHGUI_ConvToQuadOp::MeshType SMESHGUI_ConvToQuadOp::ConsistMesh( const SMESH::SMESH_Mesh_var& mesh) const +{ + int nbAllElem = 0, nbQEdges =0, nbQFaces =0, nbQVolum = 0; + int nbEdges = 0, nbFaces = 0, nbVolum = 0; + + nbAllElem = (int)mesh->NbElements(); + nbQEdges = (int)mesh->NbEdgesOfOrder(SMESH::ORDER_QUADRATIC); + nbQFaces = (int)mesh->NbFacesOfOrder(SMESH::ORDER_QUADRATIC); + nbQVolum = (int)mesh->NbVolumesOfOrder(SMESH::ORDER_QUADRATIC); + + nbEdges = (int)mesh->NbEdgesOfOrder(SMESH::ORDER_LINEAR); + nbFaces = (int)mesh->NbFacesOfOrder(SMESH::ORDER_LINEAR); + nbVolum = (int)mesh->NbVolumesOfOrder(SMESH::ORDER_LINEAR); + + if( nbAllElem == (nbQEdges+nbQFaces+nbQVolum) ) + return SMESHGUI_ConvToQuadOp::Quadratic; + else if ( nbAllElem == (nbEdges+nbFaces+nbVolum) ) + return SMESHGUI_ConvToQuadOp::Linear; + else + return SMESHGUI_ConvToQuadOp::Comp; +} + + +void SMESHGUI_ConvToQuadOp::ConnectRadioButtons( int id ) +{ + QString anMeshEntry = myDlg->selectedObject( 0 ); + _PTR(SObject) pMesh = studyDS()->FindObjectID( anMeshEntry.latin1() ); + if ( !pMesh ) return; + + SMESH::SMESH_Mesh_var mesh = + SMESH::SObjectToInterface( pMesh ); + + GEOM::GEOM_Object_var mainGeom; + mainGeom = mesh->GetShapeToMesh(); + + if( id || mainGeom->_is_nil() ) + myDlg->SetEnabledCheck( false ); + else + myDlg->SetEnabledCheck( true ); +} + + diff --git a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.h b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.h new file mode 100644 index 000000000..129a4b91a --- /dev/null +++ b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.h @@ -0,0 +1,70 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +/** +* SMESH SMESHGUI +* +* Copyright (C) 2005 CEA/DEN, EDF R&D +* +* +* +* File : SMESHGUI_ConvToQuadOp.h +* Module : SMESHGUI +*/ + +#ifndef SMESHGUI_ConvToQuadOp_H +#define SMESHGUI_ConvToQuadOp_H + +#include +//#include + +#include +#include CORBA_SERVER_HEADER(SMESH_Mesh) + +class SMESHGUI_ConvToQuadDlg; + +class SMESHGUI_ConvToQuadOp : public SMESHGUI_SelectionOp +{ + Q_OBJECT + +public: +enum MeshType{ Comp = 0, Linear, Quadratic }; + +public: + SMESHGUI_ConvToQuadOp(); + virtual ~SMESHGUI_ConvToQuadOp(); + + virtual LightApp_Dialog* dlg() const; + +protected: + virtual void startOperation(); + virtual void selectionDone(); + virtual SUIT_SelectionFilter* createFilter( const int ) const; + MeshType ConsistMesh( const SMESH::SMESH_Mesh_var& ) const; + +protected slots: + virtual bool onApply(); + void ConnectRadioButtons( int); + +private: + SMESHGUI_ConvToQuadDlg* myDlg; +}; + +#endif + diff --git a/src/SMESH_SWIG/SMESH_AdvancedEditor.py b/src/SMESH_SWIG/SMESH_AdvancedEditor.py new file mode 100644 index 000000000..914cd7931 --- /dev/null +++ b/src/SMESH_SWIG/SMESH_AdvancedEditor.py @@ -0,0 +1,209 @@ +# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +import smesh +import SMESH +import math + +def GetNewNodes(mesh,Elems,OldNodes): + """ + Auxilary function, which return list of nodes from + given Elems avoided nodes from OldNodes + """ + newnodes = [] + for i in Elems: + nbn = mesh.GetElemNbNodes(i) + for j in range(0,nbn): + nn = mesh.GetElemNode(i,j) + isold = 0 + for k in range(0,len(newnodes)): + if nn==newnodes[k]: + isold = 1 + break + pass + if isold: continue + for k in range(0,len(OldNodes)): + if nn==OldNodes[k]: + isold = 1 + break + pass + if isold: continue + newnodes.append(nn) + pass + pass + return newnodes + + +# create empty mesh +mesh = smesh.smesh.CreateEmptyMesh() + +ed = mesh.GetMeshEditor() +tol = 0.001 + +# create a cross from quadrangle faces +# 1. create first edge and make extrusion along 0x +n1 = ed.AddNode(55,-5,0) +n2 = ed.AddNode(55,5,0) +e1 = ed.AddEdge([n1,n2]) +dir1 = SMESH.DirStruct(SMESH.PointStruct(-10,0,0)) +ed.ExtrusionSweep([e1],dir1,11) +# 2. create second edge and make extrusion along 0y +n3 = ed.AddNode(-5,-55,0) +n4 = ed.AddNode(5,-55,0) +e2 = ed.AddEdge([n3,n4]) +dir2 = SMESH.DirStruct(SMESH.PointStruct(0,10,0)) +ed.ExtrusionSweep([e2],dir2,11) + +# since result has coincident nodes and faces +# we have to make merge +nodes = ed.FindCoincidentNodes(0.001) +ed.MergeNodes(nodes) +ed.MergeEqualElements() + +# make extrusion faces along 0z +faces = mesh.GetElementsByType(SMESH.FACE) +nbf = len(faces) +maxang = 2.0 +zstep = 5 +nbzsteps = 50 +dir3 = SMESH.DirStruct(SMESH.PointStruct(0,0,zstep)) +newfaces = [] # list for keeping created top faces + # during extrusion + +for i in range(0,nbzsteps): + ed.ExtrusionSweep(faces,dir3,1) + # find top faces after each extrusion and keep them + res = ed.GetLastCreatedElems() + nbr = len(res) + nfaces = [] + for j in res: + nbn = mesh.GetElemNbNodes(j) + if nbn!=4: continue + nn1 = mesh.GetElemNode(j,0) + xyz1 = mesh.GetNodeXYZ(nn1) + nn2 = mesh.GetElemNode(j,1) + xyz2 = mesh.GetNodeXYZ(nn2) + nn3 = mesh.GetElemNode(j,2) + xyz3 = mesh.GetNodeXYZ(nn3) + if abs(xyz1[2]-xyz2[2])2: faces1.append(i) + pass +nbf1 = len(faces1) + +# create other two edges and rotate them for creation +# other full circle +n8 = ed.AddNode(-65,0,0) +n9 = ed.AddNode(-67.5,0,0) +n10 = ed.AddNode(-70,0,0) +e8 = ed.AddEdge([n8,n9]) +e9 = ed.AddEdge([n9,n10]) +axisr3 = SMESH.AxisStruct(-65,0,0,0,-1,0) +ed.RotationSweep([e8,e9],axisr3, math.pi/6, 12, tol) +res = ed.GetLastCreatedElems() +faces2 = [] +for i in res: + nbn = mesh.GetElemNbNodes(i) + if nbn>2: faces2.append(i) + pass +nbf2 = len(faces2) + +# there are coincident nodes after rotation +# therefore we have to merge nodes +nodes = ed.FindCoincidentNodes(0.001) +ed.MergeNodes(nodes) + +nbcircs = 2 +nbrsteps = 24 +nbrs = nbcircs*nbrsteps +dz = nbzsteps*zstep/nbrs + +# create first spiral +oldnodes = [] +newnodes = GetNewNodes(mesh,faces1,oldnodes) +oldnodes = newnodes + +nodes = [] +ed.RotationSweep(faces1,axisr1, math.pi*2/nbrsteps, nbrs, tol) +res = ed.GetLastCreatedElems() + +for i in range(0,nbrs): + volumes = [] + for j in range(0,nbf1): volumes.append(res[i+j*nbrs]) + newnodes = GetNewNodes(mesh,volumes,oldnodes) + for j in newnodes: + xyz = mesh.GetNodeXYZ(j) + ed.MoveNode(j,xyz[0],xyz[1],xyz[2]+dz*(i+1)) + pass + oldnodes = newnodes + pass + +# create second spiral +oldnodes = [] +newnodes = GetNewNodes(mesh,faces2,oldnodes) +oldnodes = newnodes + +nodes = [] +ed.RotationSweep(faces2,axisr1, math.pi*2/nbrsteps, nbrs, tol) +res = ed.GetLastCreatedElems() + +for i in range(0,nbrs): + volumes = [] + for j in range(0,nbf2): volumes.append(res[i+j*nbrs]) + newnodes = GetNewNodes(mesh,volumes,oldnodes) + for j in newnodes: + xyz = mesh.GetNodeXYZ(j) + ed.MoveNode(j,xyz[0],xyz[1],xyz[2]+dz*(i+1)) + pass + oldnodes = newnodes + pass + + diff --git a/src/SMESH_SWIG/SMESH_fixation_netgen.py b/src/SMESH_SWIG/SMESH_fixation_netgen.py new file mode 100644 index 000000000..31114905c --- /dev/null +++ b/src/SMESH_SWIG/SMESH_fixation_netgen.py @@ -0,0 +1,75 @@ +# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# +# Tetrahedrization of the geometry generated by the Python script +# SMESH_fixation.py +# The new Netgen algorithm is used that discretizes baoundaries itself +# + +import StdMeshers +import NETGENPlugin +import SMESH_fixation +import smesh + +compshell = SMESH_fixation.compshell +idcomp = SMESH_fixation.idcomp +geompy = SMESH_fixation.geompy +salome = SMESH_fixation.salome + +print "Analysis of the geometry to be meshed :" +subShellList = geompy.SubShapeAll(compshell, geompy.ShapeType["SHELL"]) +subFaceList = geompy.SubShapeAll(compshell, geompy.ShapeType["FACE"]) +subEdgeList = geompy.SubShapeAll(compshell, geompy.ShapeType["EDGE"]) + +print "number of Shells in compshell : ", len(subShellList) +print "number of Faces in compshell : ", len(subFaceList) +print "number of Edges in compshell : ", len(subEdgeList) + +status = geompy.CheckShape(compshell) +print " check status ", status + +### ---------------------------- SMESH -------------------------------------- + +print "-------------------------- create Mesh, algorithm, hypothesis" + +mesh = smesh.Mesh(compshell, "MeshcompShel"); +netgen = mesh.Netgen(1) +hyp = netgen.Parameters() +hyp.SetMaxSize( 50 ) +#hyp.SetSecondOrder( 0 ) +hyp.SetFineness( 3 ) +#hyp.SetOptimize( 1 ) + +salome.sg.updateObjBrowser(1) + +print "-------------------------- compute mesh" +ret = mesh.Compute() +print ret +if ret != 0: + print "Information about the MeshcompShel:" + print "Number of nodes : ", mesh.GetMesh().NbNodes() + print "Number of edges : ", mesh.GetMesh().NbEdges() + print "Number of faces : ", mesh.GetMesh().NbFaces() + print "Number of triangles : ", mesh.GetMesh().NbTriangles() + print "Number of volumes : ", mesh.GetMesh().NbVolumes() + print "Number of tetrahedrons : ", mesh.GetMesh().NbTetras() + +else: + print "problem when computing the mesh" diff --git a/src/SMESH_SWIG/SMESH_mechanic_netgen.py b/src/SMESH_SWIG/SMESH_mechanic_netgen.py new file mode 100644 index 000000000..b3a0ea2a7 --- /dev/null +++ b/src/SMESH_SWIG/SMESH_mechanic_netgen.py @@ -0,0 +1,136 @@ +# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# +# Quadrangulation of the geometry generated by the Python script +# SMESH_mechanic.py +# The new Netgen algorithm is used that discretizes baoundaries itself +# + +import salome +import geompy + +geom = geompy.geom + +import StdMeshers +import NETGENPlugin +import smesh + +# ---------------------------- GEOM -------------------------------------- + +# ---- define contigous arcs and segment to define a closed wire +p1 = geompy.MakeVertex( 100.0, 0.0, 0.0 ) +p2 = geompy.MakeVertex( 50.0, 50.0, 0.0 ) +p3 = geompy.MakeVertex( 100.0, 100.0, 0.0 ) +arc1 = geompy.MakeArc( p1, p2, p3 ) + +p4 = geompy.MakeVertex( 170.0, 100.0, 0.0 ) +seg1 = geompy.MakeVector( p3, p4 ) + +p5 = geompy.MakeVertex( 200.0, 70.0, 0.0 ) +p6 = geompy.MakeVertex( 170.0, 40.0, 0.0 ) +arc2 = geompy.MakeArc( p4, p5, p6 ) + +p7 = geompy.MakeVertex( 120.0, 30.0, 0.0 ) +arc3 = geompy.MakeArc( p6, p7, p1 ) + +# ---- define a closed wire with arcs and segment +List1 = [] +List1.append( arc1 ) +List1.append( seg1 ) +List1.append( arc2 ) +List1.append( arc3 ) + +wire1 = geompy.MakeWire( List1 ) +Id_wire1 = geompy.addToStudy( wire1, "wire1" ) + +# ---- define a planar face with wire +WantPlanarFace = 1 #True +face1 = geompy.MakeFace( wire1, WantPlanarFace ) +Id_face1 = geompy.addToStudy( face1, "face1" ) + +# ---- create a shape by extrusion +pO = geompy.MakeVertex( 0.0, 0.0, 0.0 ) +pz = geompy.MakeVertex( 0.0, 0.0, 100.0 ) +vz = geompy.MakeVector( pO, pz ) + +prism1 = geompy.MakePrismVecH( face1, vz, 100.0 ) +Id_prism1 = geompy.addToStudy( prism1, "prism1") + +# ---- create two cylinders + +pc1 = geompy.MakeVertex( 90.0, 50.0, -40.0 ) +pc2 = geompy.MakeVertex( 170.0, 70.0, -40.0 ) +radius = 20.0 +height = 180.0 +cyl1 = geompy.MakeCylinder( pc1, vz, radius, height ) +cyl2 = geompy.MakeCylinder( pc2, vz, radius, height ) + +Id_Cyl1 = geompy.addToStudy( cyl1, "cyl1" ) +Id_Cyl2 = geompy.addToStudy( cyl2, "cyl2" ) + +# ---- cut with cyl1 +shape = geompy.MakeBoolean( prism1, cyl1, 2 ) + +# ---- fuse with cyl2 to obtain the final mechanic piece :) +mechanic = geompy.MakeBoolean( shape, cyl2, 3 ) +Id_mechanic = geompy.addToStudy( mechanic, "mechanic" ) + +# ---- Analysis of the geometry + +print "Analysis of the geometry mechanic :" + +subShellList = geompy.SubShapeAll(mechanic,geompy.ShapeType["SHELL"]) +subFaceList = geompy.SubShapeAll(mechanic,geompy.ShapeType["FACE"]) +subEdgeList = geompy.SubShapeAll(mechanic,geompy.ShapeType["EDGE"]) + +print "number of Shells in mechanic : ",len(subShellList) +print "number of Faces in mechanic : ",len(subFaceList) +print "number of Edges in mechanic : ",len(subEdgeList) + +### ---------------------------- SMESH -------------------------------------- + +print "-------------------------- create Mesh, algorithm, hypothesis" + +mesh = smesh.Mesh(mechanic, "Mesh_mechanic"); +netgen = mesh.Netgen(0) +hyp = netgen.Parameters() +hyp.SetMaxSize( 50 ) +#hyp.SetSecondOrder( 0 ) +hyp.SetFineness( 3 ) +hyp.SetQuadAllowed( 1 ) +#hyp.SetOptimize( 1 ) + +salome.sg.updateObjBrowser(1) + +print "-------------------------- compute mesh" +ret = mesh.Compute() +print ret +if ret != 0: + print "Information about the MeshcompShel:" + print "Number of nodes : ", mesh.GetMesh().NbNodes() + print "Number of edges : ", mesh.GetMesh().NbEdges() + print "Number of faces : ", mesh.GetMesh().NbFaces() + print "Number of triangles : ", mesh.GetMesh().NbTriangles() + print "Number of quadrangles : ", mesh.GetMesh().NbQuadrangles() + print "Number of volumes : ", mesh.GetMesh().NbVolumes() + print "Number of tetrahedrons : ", mesh.GetMesh().NbTetras() + +else: + print "problem when computing the mesh" diff --git a/src/SMESH_SWIG/ex21_lamp.py b/src/SMESH_SWIG/ex21_lamp.py new file mode 100644 index 000000000..fd6277369 --- /dev/null +++ b/src/SMESH_SWIG/ex21_lamp.py @@ -0,0 +1,125 @@ +# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# CEA/LGLS 2006, Francis KLOSS (OCC) +# ================================== + +from geompy import * + +import smesh + +# Geometry +# ======== + +# an assembly of a box, a cylinder and a truncated cone meshed with tetrahedral. + +# Define values +# ------------- + +name = "ex21_lamp" + +cote = 60 + +section = 20 +size = 200 + +radius_1 = 80 +radius_2 = 40 +height = 100 + +# Build a box +# ----------- + +box = MakeBox(-cote, -cote, -cote, +cote, +cote, +cote) + +# Build a cylinder +# ---------------- + +pt1 = MakeVertex(0, 0, cote/3) +di1 = MakeVectorDXDYDZ(0, 0, 1) +cyl = MakeCylinder(pt1, di1, section, size) + +# Build a truncated cone +# ---------------------- + +pt2 = MakeVertex(0, 0, size) +cone = MakeCone(pt2, di1, radius_1, radius_2, height) + +# Fuse +# ---- + +box_cyl = MakeFuse(box, cyl) +piece = MakeFuse(box_cyl, cone) + +# Add in study +# ------------ + +addToStudy(piece, name) + +# Create a group of faces +# ----------------------- + +group = CreateGroup(piece, ShapeType["FACE"]) + +group_name = name + "_grp" +addToStudy(group, group_name) +group.SetName(group_name) + +# Add faces in the group +# ---------------------- + +faces = SubShapeAllIDs(piece, ShapeType["FACE"]) + +UnionIDs(group, faces) + +# Create a mesh +# ============= + +# Define a mesh on a geometry +# --------------------------- + +tetra = smesh.Mesh(piece, name) + +# Define 1D hypothesis +# -------------------- + +algo1d = tetra.Segment() +algo1d.LocalLength(10) + +# Define 2D hypothesis +# -------------------- + +algo2d = tetra.Triangle() +algo2d.LengthFromEdges() + +# Define 3D hypothesis +# -------------------- + +algo3d = tetra.Tetrahedron(smesh.NETGEN) +algo3d.MaxElementVolume(100) + +# Compute the mesh +# ---------------- + +tetra.Compute() + +# Create a groupe of faces +# ------------------------ + +tetra.Group(group) diff --git a/src/StdMeshers/StdMeshers_QuadraticMesh.cxx b/src/StdMeshers/StdMeshers_QuadraticMesh.cxx new file mode 100644 index 000000000..2e56a6560 --- /dev/null +++ b/src/StdMeshers/StdMeshers_QuadraticMesh.cxx @@ -0,0 +1,111 @@ +// SMESH StdMeshers_QuadraticMesh : implementaion of SMESH idl descriptions +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : StdMeshers_QuadraticMesh.cxx +// Module : SMESH +// $Header$ + +#include "StdMeshers_QuadraticMesh.hxx" +#include "utilities.h" + +using namespace std; + +//============================================================================= +/*! + * + */ +//============================================================================= + +StdMeshers_QuadraticMesh::StdMeshers_QuadraticMesh(int hypId, + int studyId, + SMESH_Gen * gen) + :SMESH_Hypothesis(hypId, studyId, gen) +{ + _name = "QuadraticMesh"; + _param_algo_dim = -1; // it means auxiliary, dim = 1 +} + +//============================================================================= +/*! + * + */ +//============================================================================= + +StdMeshers_QuadraticMesh::~StdMeshers_QuadraticMesh() +{ +} + +//============================================================================= +/*! + * + */ +//============================================================================= + +ostream & StdMeshers_QuadraticMesh::SaveTo(ostream & save) +{ + return save; +} + +//============================================================================= +/*! + * + */ +//============================================================================= + +istream & StdMeshers_QuadraticMesh::LoadFrom(istream & load) +{ + return load; +} + +//============================================================================= +/*! + * + */ +//============================================================================= + +ostream & operator <<(ostream & save, StdMeshers_QuadraticMesh & hyp) +{ + return hyp.SaveTo( save ); +} + +//============================================================================= +/*! + * + */ +//============================================================================= + +istream & operator >>(istream & load, StdMeshers_QuadraticMesh & hyp) +{ + return hyp.LoadFrom( load ); +} +//================================================================================ +/*! + * \brief Initialize my parameter values by the mesh built on the geometry + * \retval bool - false as this hypothesis does not have parameters values + */ +//================================================================================ + +bool StdMeshers_QuadraticMesh::SetParametersByMesh(const SMESH_Mesh*, const TopoDS_Shape&) +{ + return false; +} diff --git a/src/StdMeshers/StdMeshers_QuadraticMesh.hxx b/src/StdMeshers/StdMeshers_QuadraticMesh.hxx new file mode 100644 index 000000000..db601eec8 --- /dev/null +++ b/src/StdMeshers/StdMeshers_QuadraticMesh.hxx @@ -0,0 +1,65 @@ +// SMESH StdMeshers : implementaion of SMESH idl descriptions +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : StdMeshers_QuadraticMesh.hxx +// Module : SMESH +// $Header$ + +#ifndef _StdMeshers_QuadraticMesh_HXX_ +#define _StdMeshers_QuadraticMesh_HXX_ + +#include "SMESH_Hypothesis.hxx" +#include "Utils_SALOME_Exception.hxx" + +/*! + * \brief Hypothesis for StdMeshers_Regular_1D, forcing construction of quadratic edges. + * If the 2D mesher sees that all boundary edges are quadratic ones, + * it generates quadratic faces, else it generates linear faces using + * medium nodes as if they were vertex ones. + * The 3D mesher generates quadratic volumes only if all boundary faces + * are quadratic ones, else it fails. + */ +class StdMeshers_QuadraticMesh:public SMESH_Hypothesis +{ + public: + StdMeshers_QuadraticMesh(int hypId, int studyId, SMESH_Gen * gen); + virtual ~ StdMeshers_QuadraticMesh(); + + virtual std::ostream & SaveTo(std::ostream & save); + virtual std::istream & LoadFrom(std::istream & load); + friend std::ostream & operator <<(std::ostream & save, StdMeshers_QuadraticMesh & hyp); + friend std::istream & operator >>(std::istream & load, StdMeshers_QuadraticMesh & hyp); + + /*! + * \brief Initialize my parameter values by the mesh built on the geometry + * \param theMesh - the built mesh + * \param theShape - the geometry of interest + * \retval bool - true if parameter values have been successfully defined + * + * Just return false as this hypothesis does not have parameters values + */ + virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape); + +}; + +#endif diff --git a/src/StdMeshers_I/StdMeshers_QuadraticMesh_i.cxx b/src/StdMeshers_I/StdMeshers_QuadraticMesh_i.cxx new file mode 100644 index 000000000..80c18738f --- /dev/null +++ b/src/StdMeshers_I/StdMeshers_QuadraticMesh_i.cxx @@ -0,0 +1,99 @@ +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : StdMeshers_QuadraticMesh_i.cxx +// Moved here from SMESH_LocalLength_i.cxx +// Author : Paul RASCLE, EDF +// Module : SMESH +// $Header$ + +#include "StdMeshers_QuadraticMesh_i.hxx" +#include "SMESH_Gen_i.hxx" +#include "SMESH_Gen.hxx" + +#include "Utils_CorbaException.hxx" +#include "utilities.h" + +//#include + +using namespace std; + +//============================================================================= +/*! + * StdMeshers_QuadraticMesh_i::StdMeshers_QuadraticMesh_i + * + * Constructor + */ +//============================================================================= + +StdMeshers_QuadraticMesh_i::StdMeshers_QuadraticMesh_i +( PortableServer::POA_ptr thePOA, + int theStudyId, + ::SMESH_Gen* theGenImpl ) + : SALOME::GenericObj_i( thePOA ),SMESH_Hypothesis_i( thePOA ) +{ + myBaseImpl = new ::StdMeshers_QuadraticMesh( theGenImpl->GetANewId(), + theStudyId, + theGenImpl ); +} + +//============================================================================= +/*! + * StdMeshers_QuadraticMesh_i::~StdMeshers_QuadraticMesh_i + * + * Destructor + */ +//============================================================================= + +StdMeshers_QuadraticMesh_i::~StdMeshers_QuadraticMesh_i() +{ +} + +//============================================================================= +/*! + * StdMeshers_QuadraticMesh_i::GetImpl + * + * Get implementation + */ +//============================================================================= + +::StdMeshers_QuadraticMesh* StdMeshers_QuadraticMesh_i::GetImpl() +{ + return ( ::StdMeshers_QuadraticMesh* )myBaseImpl; +} + +//================================================================================ +/*! + * \brief Verify whether hypothesis supports given entity type + * \param type - dimension (see SMESH::Dimension enumeration) + * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise + * + * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration) + */ +//================================================================================ + +CORBA::Boolean StdMeshers_QuadraticMesh_i::IsDimSupported( SMESH::Dimension type ) +{ + return type == SMESH::DIM_1D; +} + diff --git a/src/StdMeshers_I/StdMeshers_QuadraticMesh_i.hxx b/src/StdMeshers_I/StdMeshers_QuadraticMesh_i.hxx new file mode 100644 index 000000000..90c74e3d9 --- /dev/null +++ b/src/StdMeshers_I/StdMeshers_QuadraticMesh_i.hxx @@ -0,0 +1,64 @@ +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : StdMeshers_QuadraticMesh_i.hxx +// Moved here from SMESH_LocalLength_i.hxx +// Author : Paul RASCLE, EDF +// Module : SMESH +// $Header$ + +#ifndef _SMESH_QuadraticMesh_I_HXX_ +#define _SMESH_QuadraticMesh_I_HXX_ + +#include +#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis) + +#include "SMESH_Hypothesis_i.hxx" +#include "StdMeshers_QuadraticMesh.hxx" + +class SMESH_Gen; + +// ====================================================== +// Local Length hypothesis +// ====================================================== +class StdMeshers_QuadraticMesh_i: + public virtual POA_StdMeshers::StdMeshers_QuadraticMesh, + public virtual SMESH_Hypothesis_i +{ +public: + // Constructor + StdMeshers_QuadraticMesh_i( PortableServer::POA_ptr thePOA, + int theStudyId, + ::SMESH_Gen* theGenImpl ); + // Destructor + virtual ~StdMeshers_QuadraticMesh_i(); + + // Get implementation + ::StdMeshers_QuadraticMesh* GetImpl(); + + // Verify whether hypothesis supports given entity type + CORBA::Boolean IsDimSupported( SMESH::Dimension type ); +}; + +#endif +