]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Merge imn/IMACS branch into imn/IMACS_8_3_0 imn/IMACS_8_3_0
authorrnv <rnv@opencascade.com>
Thu, 23 Nov 2017 15:52:07 +0000 (18:52 +0300)
committerrnv <rnv@opencascade.com>
Fri, 24 Nov 2017 13:40:48 +0000 (16:40 +0300)
293 files changed:
CMakeLists.txt
ChangeLog
adm_local/unix/config_files/check_qwt.m4
doc/salome/examples/CMakeLists.txt
doc/salome/examples/creating_meshes_ex07.py
doc/salome/examples/defining_hypotheses_ex06.py
doc/salome/examples/defining_hypotheses_ex10.py
doc/salome/examples/defining_hypotheses_ex11.py
doc/salome/examples/filters_ex03.py
doc/salome/examples/filters_ex07.py
doc/salome/examples/filters_ex09.py
doc/salome/examples/grouping_elements_ex04.py
doc/salome/examples/grouping_elements_ex05.py
doc/salome/examples/grouping_elements_ex08.py
doc/salome/gui/SMESH/images/create_group.png [changed mode: 0755->0644]
doc/salome/gui/SMESH/images/cut_groups1.png [changed mode: 0755->0644]
doc/salome/gui/SMESH/images/cut_groups2.png [deleted file]
doc/salome/gui/SMESH/images/cut_groups3.png [deleted file]
doc/salome/gui/SMESH/images/dimgroup_tui1.png
doc/salome/gui/SMESH/images/dimgroup_tui2.png [deleted file]
doc/salome/gui/SMESH/images/editing_groups1.png [changed mode: 0755->0644]
doc/salome/gui/SMESH/images/editing_groups2.png [deleted file]
doc/salome/gui/SMESH/images/eleminfo1.png [changed mode: 0755->0644]
doc/salome/gui/SMESH/images/eleminfo2.png [changed mode: 0755->0644]
doc/salome/gui/SMESH/images/intersect_groups1.png [changed mode: 0755->0644]
doc/salome/gui/SMESH/images/intersect_groups2.png [deleted file]
doc/salome/gui/SMESH/images/intersect_groups3.png [deleted file]
doc/salome/gui/SMESH/images/mergenodes.png
doc/salome/gui/SMESH/images/mergenodes_auto.png
doc/salome/gui/SMESH/images/union_groups1.png [changed mode: 0755->0644]
doc/salome/gui/SMESH/images/union_groups2.png [deleted file]
doc/salome/gui/SMESH/images/union_groups3.png [deleted file]
doc/salome/gui/SMESH/input/about_meshes.doc
doc/salome/gui/SMESH/input/adding_quadratic_elements.doc
doc/salome/gui/SMESH/input/merging_nodes.doc
doc/salome/gui/SMESH/input/mesh_infos.doc
doc/salome/gui/SMESH/input/over_constrained_faces.doc
doc/salome/gui/SMESH/input/skew.doc
doc/salome/gui/SMESH/input/smesh_migration.doc
doc/salome/gui/SMESH/input/tui_creating_meshes.doc
doc/salome/gui/SMESH/input/tui_grouping_elements.doc
doc/salome/gui/SMESH/static/footer.html
doc/salome/tui/static/footer.html
idl/SMESH_BasicHypothesis.idl
idl/SMESH_Filter.idl
idl/SMESH_Hypothesis.idl
idl/SMESH_Mesh.idl
idl/SMESH_Pattern.idl
resources/CMakeLists.txt
resources/StdMeshers.xml.in
resources/mesh_hide.png [new file with mode: 0644]
resources/mesh_quality.png [new file with mode: 0644]
resources/mesh_show.png [new file with mode: 0644]
resources/mesh_tree_hypo_cartesian.png [new file with mode: 0644]
resources/mesh_tree_hypo_quadratic.png [new file with mode: 0644]
src/Controls/SMESH_Controls.cxx
src/Controls/SMESH_ControlsDef.hxx
src/DriverCGNS/DriverCGNS_Read.cxx
src/DriverDAT/DriverDAT_R_SMDS_Mesh.cxx
src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx
src/DriverMED/DriverMED_Family.cxx
src/DriverMED/DriverMED_Family.h
src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx
src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx
src/DriverMED/DriverMED_W_SMESHDS_Mesh.h
src/DriverSTL/DriverSTL_R_SMDS_Mesh.cxx
src/DriverSTL/DriverSTL_R_SMDS_Mesh.h
src/DriverSTL/DriverSTL_W_SMDS_Mesh.cxx
src/DriverSTL/DriverSTL_W_SMDS_Mesh.h
src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx
src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx
src/DriverUNV/UNV_Utilities.hxx
src/MEDWrapper/Base/MED_SliceArray.hxx
src/MEDWrapper/Base/MED_Structures.hxx
src/MEDWrapper/Base/MED_Wrapper.hxx
src/OBJECT/CMakeLists.txt
src/OBJECT/SMESH_Actor.cxx
src/OBJECT/SMESH_ActorDef.h
src/OBJECT/SMESH_Object.cxx
src/OBJECT/SMESH_ScalarBarActor.cxx
src/SMDS/SMDS_MemoryLimit.cxx
src/SMDS/SMDS_Mesh.cxx
src/SMDS/SMDS_Mesh.hxx
src/SMDS/SMDS_MeshElement.hxx
src/SMDS/SMDS_MeshElementIDFactory.cxx
src/SMDS/SMDS_MeshNode.cxx
src/SMDS/SMDS_MeshNode.hxx
src/SMDS/SMDS_TypeOfPosition.hxx
src/SMDS/SMDS_VolumeTool.cxx
src/SMDS/SMDS_VolumeTool.hxx
src/SMDS/chrono.cxx
src/SMDS/chrono.hxx
src/SMESH/SMESH_Algo.cxx
src/SMESH/SMESH_Algo.hxx
src/SMESH/SMESH_Gen.cxx
src/SMESH/SMESH_Hypothesis.cxx
src/SMESH/SMESH_Hypothesis.hxx
src/SMESH/SMESH_Mesh.cxx
src/SMESH/SMESH_Mesh.hxx
src/SMESH/SMESH_MesherHelper.cxx
src/SMESH/SMESH_MesherHelper.hxx
src/SMESH/SMESH_Pattern.cxx
src/SMESH/SMESH_Pattern.hxx
src/SMESH/SMESH_subMesh.cxx
src/SMESH/SMESH_subMesh.hxx
src/SMESH/SMESH_subMeshEventListener.hxx
src/SMESH/memoire.h
src/SMESHDS/SMESHDS_GroupBase.cxx
src/SMESHFiltersSelection/CMakeLists.txt
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI.h
src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx
src/SMESHGUI/SMESHGUI_ClippingDlg.cxx
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx
src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h
src/SMESHGUI/SMESHGUI_DisplayEntitiesDlg.cxx
src/SMESHGUI/SMESHGUI_DisplayEntitiesDlg.h
src/SMESHGUI/SMESHGUI_FilterDlg.cxx
src/SMESHGUI/SMESHGUI_GroupDlg.cxx
src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
src/SMESHGUI/SMESHGUI_IdPreview.h
src/SMESHGUI/SMESHGUI_MeshDlg.cxx
src/SMESHGUI/SMESHGUI_MeshDlg.h
src/SMESHGUI/SMESHGUI_MeshInfo.cxx
src/SMESHGUI/SMESHGUI_MeshInfo.h
src/SMESHGUI/SMESHGUI_MeshOp.cxx
src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx
src/SMESHGUI/SMESHGUI_Operation.cxx
src/SMESHGUI/SMESHGUI_Operations.h
src/SMESHGUI/SMESHGUI_ReorientFacesDlg.cxx
src/SMESHGUI/SMESHGUI_Selection.cxx
src/SMESHGUI/SMESHGUI_Selection.h
src/SMESHGUI/SMESHGUI_Utils.h
src/SMESHGUI/SMESHGUI_VTKUtils.cxx
src/SMESHGUI/SMESHGUI_XmlHandler.cxx
src/SMESHGUI/SMESH_images.ts
src/SMESHGUI/SMESH_msg_en.ts
src/SMESHGUI/SMESH_msg_fr.ts
src/SMESHUtils/CMakeLists.txt
src/SMESHUtils/SMESH_Block.cxx
src/SMESHUtils/SMESH_Block.hxx
src/SMESHUtils/SMESH_ComputeError.hxx
src/SMESHUtils/SMESH_DeMerge.cxx [new file with mode: 0644]
src/SMESHUtils/SMESH_MAT2d.cxx
src/SMESHUtils/SMESH_MeshAlgos.cxx
src/SMESHUtils/SMESH_OctreeNode.cxx
src/SMESH_I/SMESH_2smeshpy.cxx
src/SMESH_I/SMESH_2smeshpy.hxx
src/SMESH_I/SMESH_DumpPython.cxx
src/SMESH_I/SMESH_Filter_i.cxx
src/SMESH_I/SMESH_Filter_i.hxx
src/SMESH_I/SMESH_Gen_i.cxx
src/SMESH_I/SMESH_Gen_i_1.cxx
src/SMESH_I/SMESH_Group_i.cxx
src/SMESH_I/SMESH_Hypothesis_i.cxx
src/SMESH_I/SMESH_Mesh_i.cxx
src/SMESH_I/SMESH_NoteBook.cxx
src/SMESH_I/SMESH_PythonDump.hxx
src/SMESH_I/SMESH_subMesh_i.cxx
src/SMESH_SWIG/SMESH_AdvancedEditor.py
src/SMESH_SWIG/StdMeshersBuilder.py
src/SMESH_SWIG/smesh_algorithm.py
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.i
src/StdMeshers/StdMeshers_AutomaticLength.cxx
src/StdMeshers/StdMeshers_CartesianParameters3D.hxx
src/StdMeshers/StdMeshers_Cartesian_3D.cxx
src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx
src/StdMeshers/StdMeshers_FaceSide.cxx
src/StdMeshers/StdMeshers_FaceSide.hxx
src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx
src/StdMeshers/StdMeshers_Hexa_3D.cxx
src/StdMeshers/StdMeshers_Import_1D.cxx
src/StdMeshers/StdMeshers_Import_1D2D.cxx
src/StdMeshers/StdMeshers_LayerDistribution.cxx
src/StdMeshers/StdMeshers_LayerDistribution2D.cxx
src/StdMeshers/StdMeshers_MEFISTO_2D.cxx
src/StdMeshers/StdMeshers_MaxElementVolume.cxx
src/StdMeshers/StdMeshers_NumberOfLayers.cxx
src/StdMeshers/StdMeshers_NumberOfLayers2D.cxx
src/StdMeshers/StdMeshers_Penta_3D.cxx
src/StdMeshers/StdMeshers_PolygonPerFace_2D.cxx
src/StdMeshers/StdMeshers_Prism_3D.cxx
src/StdMeshers/StdMeshers_ProjectionSource1D.cxx
src/StdMeshers/StdMeshers_ProjectionSource2D.cxx
src/StdMeshers/StdMeshers_ProjectionSource3D.cxx
src/StdMeshers/StdMeshers_ProjectionUtils.cxx
src/StdMeshers/StdMeshers_ProjectionUtils.hxx
src/StdMeshers/StdMeshers_Projection_1D2D.cxx
src/StdMeshers/StdMeshers_Projection_2D.cxx
src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx
src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx
src/StdMeshers/StdMeshers_Quadrangle_2D.cxx
src/StdMeshers/StdMeshers_Quadrangle_2D.hxx
src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx
src/StdMeshers/StdMeshers_Regular_1D.cxx
src/StdMeshers/StdMeshers_Regular_1D.hxx
src/StdMeshers/StdMeshers_ViscousLayers.cxx
src/StdMeshers/StdMeshers_ViscousLayers2D.cxx
src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.cxx
src/StdMeshersGUI/StdMeshersGUI_DistrTable.cxx
src/StdMeshersGUI/StdMeshersGUI_RadioButtonsGrpWdg.cxx
src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx
src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.h
src/StdMeshersGUI/StdMeshers_images.ts
src/StdMeshers_I/StdMeshers_Adaptive1D_i.cxx
src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx
src/StdMeshers_I/StdMeshers_AutomaticLength_i.cxx
src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.cxx
src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.hxx
src/StdMeshers_I/StdMeshers_Cartesian_3D_i.cxx
src/StdMeshers_I/StdMeshers_CompositeSegment_1D_i.cxx
src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx
src/StdMeshers_I/StdMeshers_FixedPoints1D_i.cxx
src/StdMeshers_I/StdMeshers_Hexa_3D_i.cxx
src/StdMeshers_I/StdMeshers_ImportSource1D_i.cxx
src/StdMeshers_I/StdMeshers_ImportSource2D_i.cxx
src/StdMeshers_I/StdMeshers_Import_1D2D_i.cxx
src/StdMeshers_I/StdMeshers_Import_1D_i.cxx
src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.cxx
src/StdMeshers_I/StdMeshers_LayerDistribution_i.cxx
src/StdMeshers_I/StdMeshers_LengthFromEdges_i.cxx
src/StdMeshers_I/StdMeshers_LocalLength_i.cxx
src/StdMeshers_I/StdMeshers_MEFISTO_2D_i.cxx
src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx
src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx
src/StdMeshers_I/StdMeshers_NotConformAllowed_i.cxx
src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.cxx
src/StdMeshers_I/StdMeshers_NumberOfLayers_i.cxx
src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx
src/StdMeshers_I/StdMeshers_PolygonPerFace_2D_i.cxx
src/StdMeshers_I/StdMeshers_Prism_3D_i.cxx
src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx
src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.cxx
src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.cxx
src/StdMeshers_I/StdMeshers_Projection_1D_2D_3D_i.cxx
src/StdMeshers_I/StdMeshers_Propagation_i.cxx
src/StdMeshers_I/StdMeshers_QuadrangleParams_i.cxx
src/StdMeshers_I/StdMeshers_RadialQuadrangle_1D2D_i.cxx
src/StdMeshers_I/StdMeshers_SegmentAroundVertex_0D_i.cxx
src/StdMeshers_I/StdMeshers_SegmentLengthAroundVertex_i.cxx
src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx
src/StdMeshers_I/StdMeshers_UseExisting_1D2D_i.cxx
src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.cxx
src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py
src/Tools/MGCleanerPlug/doc/conf.py.in
src/Tools/MacMesh/MacMesh/CutnGroup.py
src/Tools/MacMesh/MacMesh/MacObject.py
src/Tools/MeshCut/MeshCut_DC.cxx
src/Tools/MeshCut/MeshCut_Utils.cxx
src/Tools/MeshCut/MeshCut_Utils.hxx
src/Tools/Verima/Doc/conf.py.in
src/Tools/YamsPlug/YamsPlugDialog.ui
src/Tools/YamsPlug/doc/conf.py.in
src/Tools/YamsPlug/monYamsPlugDialog.py
src/Tools/ZCracksPlug/__init__.py
src/Tools/ZCracksPlug/casTests/launchCas.py
src/Tools/ZCracksPlug/doc/conf.py.in
src/Tools/ZCracksPlug/main.py
src/Tools/ZCracksPlug/output.py
src/Tools/ZCracksPlug/utilityFunctions.py
src/Tools/ZCracksPlug/zcracks.ui
src/Tools/ZCracksPlug/zcracks_ui.py
src/Tools/blocFissure/CasTests/cubeAngle.py
src/Tools/blocFissure/CasTests/cubeCoin.py
src/Tools/blocFissure/CasTests/cubeMilieu.py
src/Tools/blocFissure/CasTests/cylindre.py
src/Tools/blocFissure/CasTests/disquePerce.py
src/Tools/blocFissure/CasTests/ellipse_1.py
src/Tools/blocFissure/CasTests/ellipse_2.py
src/Tools/blocFissure/CasTests/fissure_Coude.py
src/Tools/blocFissure/CasTests/vis_1.py
src/Tools/blocFissure/doc/conf.py.in
src/Tools/blocFissure/gmu/construitEdgesRadialesDebouchantes.py
src/Tools/blocFissure/gmu/fissureCoude.py
src/Tools/blocFissure/gmu/identifieEdgesPeau.py
src/Tools/padder/doc/input/padder_userguide.doc
src/Tools/padder/meshjob/idl/CMakeLists.txt [changed mode: 0755->0644]
src/Tools/padder/meshjob/idl/MESHJOB.idl
src/Tools/padder/meshjob/impl/MeshJobManager_i.cxx
src/Tools/padder/meshjob/impl/MeshJobManager_i.hxx
src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.cxx
src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.hxx
src/Tools/padder/spadderpy/__init__.py
src/Tools/padder/spadderpy/gui/inputdata.py
src/Tools/padder/spadderpy/gui/inputdialog.py
src/Tools/padder/spadderpy/gui/inputframe.ui
src/Tools/padder/spadderpy/gui/plugindialog.py
src/Tools/padder/spadderpy/padder.cfg.in
src/Tools/padder/unittests/usecase_meshJobManager.py

index 250b8deac28d00c9fdd59fdd55f6ffed18508b5f..ef42ec11a15c27be58e43f59c1df56dc18f78d42 100755 (executable)
@@ -31,7 +31,7 @@ ENDIF(WIN32)
 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
 
 SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 2)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 3)
 SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
 SET(${PROJECT_NAME_UC}_VERSION
   ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
index 46cf0c99215365ade05a5bc57976e0487d492aa4..85c700e46b384a279d31307c83cc98aeaabe0951 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 2003-12-09 14:13  Nadir Bouhamou <nadir.bouhamou@cea.fr>
 
        * src/SMESH/Makefile.in: Correcting a problem araising when
-         building the SMESH module whithout Netgen.
+         building the SMESH module without Netgen.
 
 2003-12-09 10:00  Nadir Bouhamou <nadir.bouhamou@cea.fr>
 
index 8c0fe5f73f1861ad6c49141a7978f735ffe8290f..3552fb6af5c5e75941cb91c484a373b592695d62 100644 (file)
@@ -57,7 +57,7 @@ if test -z $QWTHOME; then
               QWTHOME=$d
               AC_MSG_RESULT(lib${extension}.so detected in $d/lib)
               libqwt_name=${extension}
-              dnl  break, libqwt-qt4.so is choosen before libqwt.so since it is surely the Qt4 version.
+              dnl  break, libqwt-qt4.so is chosen before libqwt.so since it is surely the Qt4 version.
               break
            fi
         done
index 4e35dc4968c3432fa03d539e7f5c30a2f557488d..552a9d1b2d2f6684a87c961a83e414fd3886bb11 100644 (file)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-# examples that cant be used for testing because they use external mesher plug-ins
+# examples that can't be used for testing because they use external mesher plug-ins
 SET(BAD_TESTS
   3dmesh.py
   a3DmeshOnModified2Dmesh.py
index acaaf5dc302834c98cb14127fc692e8c0c4e6a5d..4ddb69702ac8697566ef2d860b3353d0d890deec 100644 (file)
@@ -69,13 +69,13 @@ Ginf2=Mesh_sup.Group(Finf2, "Inf")
 
 ## create compounds
 # create a compound of two meshes with renaming namesake groups and
-# merging of elements with the given tolerance
+# merging elements with the given tolerance
 Compound1 = smesh.Concatenate([Mesh_inf, Mesh_sup], 0, 1, 1e-05,
-                              name='Compound_with_RenamedGrps_and_MergeElems')
+                              name='Compound with RenamedGrps and MergeElems')
 # create a compound of two meshes with uniting namesake groups and
 # creating groups of all elements
 Compound2 = smesh.Concatenate([Mesh_inf, Mesh_sup], 1, 0, 1e-05, True,
-                              name='Compound_with_UniteGrps_and_GrpsOfAllElems')
+                              name='Compound with UniteGrps and GrpsOfAllElems')
 
 if salome.sg.hasDesktop():
     salome.sg.updateObjBrowser(True)
index d6978dfc36321bc974eb3fc32d899f86ada90814..495067aa6e5a909bcc3345337522a713459691ec 100644 (file)
@@ -32,6 +32,6 @@ algo3D.MaxElementVolume(200.)
 # compute the mesh
 ret = tetra.Compute()
 if ret == 0:
-    print "probleme when computing the mesh"
+    print "problem when computing the mesh"
 else:
-    print "Computation succeded"
+    print "Computation succeeded"
index 115abfadfbc0289e4028f143703c0728dc7b2b93..6e6bf84bbc185d38dc8616ec9143a892d4055822 100644 (file)
@@ -52,7 +52,7 @@ src_mesh.Triangle(f1) # triangular sub-mesh
 src_mesh.Compute()
 
 
-# Mesh the box using projection algoritms
+# Mesh the box using projection algorithms
 
 # Define the same global 1D and 2D hypotheses
 tgt_mesh = smesh.Mesh(box, "Target mesh")
index dc6c3c5aece618b5f092aa6fb98e30fa73aaecd4..2510ed6f0b75275e70dd9dd6196aaaee79dc203f 100644 (file)
@@ -34,7 +34,7 @@ src_mesh.Segment().NumberOfSegments(15)
 src_mesh.Triangle()
 src_mesh.Compute()
 
-# Mesh the target mesh using the algoritm Projection1D2D
+# Mesh the target mesh using the algorithm Projection1D2D
 tgt_mesh = smesh.Mesh(Face_2, "Target mesh")
 tgt_mesh.Projection1D2D().SourceFace(Face_1,src_mesh)
 tgt_mesh.Compute()
index c9313bceb7745608afc9a8824988e10c9b4dba41..9d5467e6fe638ca80ef2ec3843048a9abea8f68d 100644 (file)
@@ -3,9 +3,6 @@
 # create mesh
 from SMESH_mechanic import *
 # get faces with warping angle = 2.0e-13 with tolerance 5.0e-14
-criterion = smesh.GetCriterion(SMESH.FACE, SMESH.FT_Warping, SMESH.FT_EqualTo, 2.0e-13)
-criterion.Tolerance = 5.0e-14
-filter = smesh.CreateFilterManager().CreateFilter()
-filter.SetCriteria([criterion])
+filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Warping, "=", 2.0e-13, Tolerance=5.0e-14)
 ids = mesh.GetIdsFromFilter(filter)
 print "Number of faces with warping angle = 2.0e-13 (tolerance 5.0e-14):", len(ids)
index 6c42d521767fa7eaf93cfeb9da5f89ced20a43d1..3afee5e1a705b941b5591b6146c5af90b5f8823b 100644 (file)
@@ -3,10 +3,8 @@
 # create mesh
 from SMESH_mechanic import *
 # get faces with area > 60 and < 90
-criterion1 = smesh.GetCriterion(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, 60,\
-                                SMESH.FT_Undefined, SMESH.FT_LogicalAND)
+criterion1 = smesh.GetCriterion(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, 60)
 criterion2 = smesh.GetCriterion(SMESH.FACE, SMESH.FT_Area, SMESH.FT_LessThan, 90)
-filter = smesh.CreateFilterManager().CreateFilter()
-filter.SetCriteria([criterion1,criterion2])
+filter = smesh.GetFilterFromCriteria([criterion1,criterion2], SMESH.FT_LogicalAND)
 ids = mesh.GetIdsFromFilter(filter)
 print "Number of faces with area in range (60,90):", len(ids)
index dd64159309da441e22395791a6ffe4e5da32d091..032d55ddda5f6b4f2c239f727c00908adeed016d 100644 (file)
@@ -9,8 +9,7 @@ from salome.smesh import smeshBuilder
 smesh =  smeshBuilder.New(salome.myStudy)
 
 # create mesh
-face = geompy.MakeFaceHW(100, 100, 1)
-geompy.addToStudy( face, "quadrangle" )
+face = geompy.MakeFaceHW(100, 100, 1, theName="quadrangle")
 mesh = smesh.Mesh(face)
 mesh.Segment().NumberOfSegments(10)
 mesh.Triangle().MaxElementArea(25)
index 56901320a2e108cdc5882212b42745162992887b..9beb77e364512bac452ac2f5b2520bc1114ad37c 100644 (file)
@@ -27,6 +27,7 @@ print "Criterion: Area > 40, Nb = ", len(anIds)
 
 # create a group of elements with area [35; 40] by removing elements with area > 40 from group aGroup
 aGroup.Remove(anIds) 
+aGroup.SetName("35 < Area < 40")
 
 # print the result
 aGroupElemIDs = aGroup.GetListOfID()
index aa526d2952d7a82a7e6357cd45c7c94d89db06fc..047691b863aba6b0a22d4baa88c72b181fe0c5ae 100644 (file)
@@ -1,7 +1,7 @@
 # Union of groups
 
 import SMESH_mechanic
-import SMESH
+import SMESH, SALOMEDS
 
 smesh  = SMESH_mechanic.smesh
 mesh   = SMESH_mechanic.mesh
@@ -32,6 +32,7 @@ aGroup2.Add(anIds)
 
 # create union group : area >= 20
 aGroup3 = mesh.UnionListOfGroups([aGroup1, aGroup2], "Area >= 20")
+aGroup3.SetColor( SALOMEDS.Color(1.,1.,0.));
 print "Criterion: Area >= 20, Nb = ", len(aGroup3.GetListOfID())
 # Please note that also there is UnionGroups() method which works with two groups only
 
@@ -45,6 +46,7 @@ print "Criterion: Area < 20, Nb = ", len(anIds)
 # create a group by adding elements with area < 20
 aGroup4 = mesh.CreateEmptyGroup(SMESH.FACE, "Area < 20")
 aGroup4.Add(anIds)
+aGroup4.SetColor( SALOMEDS.Color(1.,0.,0.));
 
 # create union group : area >= 20 and area < 20
 aGroup5 = mesh.UnionListOfGroups([aGroup3, aGroup4], "Any Area")
index c06e8e39ecacd3739a4418e3d3554cc2d0d997db..459a50dc24a8556aec8db00120e699013495dfe8 100644 (file)
@@ -1,7 +1,7 @@
 # Creating groups of entities basing on nodes of other groups
 
 import SMESH_mechanic
-import SMESH
+import SMESH, SALOMEDS
 
 smesh  = SMESH_mechanic.smesh
 mesh   = SMESH_mechanic.mesh
@@ -12,6 +12,7 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, 100.)
 
 # create a group by adding elements with area > 100
 aSrcGroup1 = mesh.GroupOnFilter(SMESH.FACE, "Area > 100", aFilter)
+aSrcGroup1.SetColor( SALOMEDS.Color(1.,1.,0.))
 print "Criterion: Area > 100, Nb = ", aSrcGroup1.Size()
 
 # Criterion : AREA < 30
@@ -19,6 +20,7 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_LessThan, 30.)
 
 # create a group by adding elements with area < 30
 aSrcGroup2 = mesh.GroupOnFilter(SMESH.FACE, "Area < 30", aFilter)
+aSrcGroup2.SetColor( SALOMEDS.Color(1.,0.,0.))
 print "Criterion: Area < 30, Nb = ", aSrcGroup2.Size()
 
 
old mode 100755 (executable)
new mode 100644 (file)
index 6fc2367..82e8f86
Binary files a/doc/salome/gui/SMESH/images/create_group.png and b/doc/salome/gui/SMESH/images/create_group.png differ
old mode 100755 (executable)
new mode 100644 (file)
index f066a55..d78c4fe
Binary files a/doc/salome/gui/SMESH/images/cut_groups1.png and b/doc/salome/gui/SMESH/images/cut_groups1.png differ
diff --git a/doc/salome/gui/SMESH/images/cut_groups2.png b/doc/salome/gui/SMESH/images/cut_groups2.png
deleted file mode 100755 (executable)
index 3ec7a93..0000000
Binary files a/doc/salome/gui/SMESH/images/cut_groups2.png and /dev/null differ
diff --git a/doc/salome/gui/SMESH/images/cut_groups3.png b/doc/salome/gui/SMESH/images/cut_groups3.png
deleted file mode 100755 (executable)
index 1c5ebed..0000000
Binary files a/doc/salome/gui/SMESH/images/cut_groups3.png and /dev/null differ
index a2faf39b5066777aa293a4e994066e3f17d02485..91617ce819fbbe763422785b26966f414caac767 100644 (file)
Binary files a/doc/salome/gui/SMESH/images/dimgroup_tui1.png and b/doc/salome/gui/SMESH/images/dimgroup_tui1.png differ
diff --git a/doc/salome/gui/SMESH/images/dimgroup_tui2.png b/doc/salome/gui/SMESH/images/dimgroup_tui2.png
deleted file mode 100644 (file)
index cb040a9..0000000
Binary files a/doc/salome/gui/SMESH/images/dimgroup_tui2.png and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
index beb946a..a565ed3
Binary files a/doc/salome/gui/SMESH/images/editing_groups1.png and b/doc/salome/gui/SMESH/images/editing_groups1.png differ
diff --git a/doc/salome/gui/SMESH/images/editing_groups2.png b/doc/salome/gui/SMESH/images/editing_groups2.png
deleted file mode 100755 (executable)
index 7cff181..0000000
Binary files a/doc/salome/gui/SMESH/images/editing_groups2.png and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
index 74c76db..9f9e03a
Binary files a/doc/salome/gui/SMESH/images/eleminfo1.png and b/doc/salome/gui/SMESH/images/eleminfo1.png differ
old mode 100755 (executable)
new mode 100644 (file)
index b7a785b..34061d9
Binary files a/doc/salome/gui/SMESH/images/eleminfo2.png and b/doc/salome/gui/SMESH/images/eleminfo2.png differ
old mode 100755 (executable)
new mode 100644 (file)
index 9251b0e..ad2ff52
Binary files a/doc/salome/gui/SMESH/images/intersect_groups1.png and b/doc/salome/gui/SMESH/images/intersect_groups1.png differ
diff --git a/doc/salome/gui/SMESH/images/intersect_groups2.png b/doc/salome/gui/SMESH/images/intersect_groups2.png
deleted file mode 100755 (executable)
index eeaed8d..0000000
Binary files a/doc/salome/gui/SMESH/images/intersect_groups2.png and /dev/null differ
diff --git a/doc/salome/gui/SMESH/images/intersect_groups3.png b/doc/salome/gui/SMESH/images/intersect_groups3.png
deleted file mode 100755 (executable)
index 74f5c2d..0000000
Binary files a/doc/salome/gui/SMESH/images/intersect_groups3.png and /dev/null differ
index 5b34361cb92541527510a8644626ce88d4b24373..fc75f70dd9c5d91df331d56d70eeccf1ac1bfd7f 100644 (file)
Binary files a/doc/salome/gui/SMESH/images/mergenodes.png and b/doc/salome/gui/SMESH/images/mergenodes.png differ
index 4f177f605fbce3dcea99859915a1fc8e84681e8b..e2704690873c304d78de876bf13fa0c7de3007bb 100644 (file)
Binary files a/doc/salome/gui/SMESH/images/mergenodes_auto.png and b/doc/salome/gui/SMESH/images/mergenodes_auto.png differ
old mode 100755 (executable)
new mode 100644 (file)
index 7b2fc75..598c33d
Binary files a/doc/salome/gui/SMESH/images/union_groups1.png and b/doc/salome/gui/SMESH/images/union_groups1.png differ
diff --git a/doc/salome/gui/SMESH/images/union_groups2.png b/doc/salome/gui/SMESH/images/union_groups2.png
deleted file mode 100755 (executable)
index 980e48d..0000000
Binary files a/doc/salome/gui/SMESH/images/union_groups2.png and /dev/null differ
diff --git a/doc/salome/gui/SMESH/images/union_groups3.png b/doc/salome/gui/SMESH/images/union_groups3.png
deleted file mode 100755 (executable)
index caf6bb4..0000000
Binary files a/doc/salome/gui/SMESH/images/union_groups3.png and /dev/null differ
index b58293d6a5291de936c80e6acb6d3cea5c344b0e..be900bc1decb309399b3aa196b3631197ef327fc 100644 (file)
@@ -3,8 +3,7 @@
 \page about_meshes_page About meshes
 
 \n \b MESH represents a discrete approximation of a subset of the
-three-dimensional space by \ref mesh_entities "elementary geometrical
-elements".
+three-dimensional space by \ref mesh_entities "elementary geometrical elements".
 
 A SALOME study can contain multiple meshes, but they do not
 implicitly compose one super-mesh, and finally each of them
index 912e59baa32ec18962187603e901be1a57a4d51c..222774cb98229bb766f2debc2830a606c43c5265 100644 (file)
@@ -41,7 +41,7 @@ to the specified group or to create the group anew using
 <b>Add to group</b> box, that allows choosing an existing group for
 the created node or element or giving the name to a new group. By
 default, the <b>Add to group</b> check box is switched off. If the user
-swiches this check box on, the combo box listing all currently
+switches this check box on, the combo box listing all currently
 existing groups of the corresponding type becomes available. By
 default, no group is selected. In this case, when the user presses
 <b>Apply</b> or <b>Apply & Close</b> button, the warning message box
index 8aff9aa0944e5c6ba8ebdad16e85d2d47d4a22c9..872f9eeed681fde8152a09ac8dcf894864ee4708 100644 (file)
@@ -26,6 +26,9 @@ merging.</li>
     cells</b> check-box prevents merging medium nodes of quadratic
     elements with corner nodes. This check-box is enabled provided
     that the selected mesh includes quadratic elements.</li>
+<li>Activation of <b>Avoid making holes</b> check-box prevents merging
+    nodes that make elements invalid (but not degenerated) and hence
+    removed. Thus, no holes in place of removed elements appear. </li>
 <li><b>Exclude groups from detection</b> group allows to ignore the
   nodes which belong to the specified mesh groups. This control is
   active provided that the mesh includes groups.</li>
index 49a5a5ce43044df0730206b35b16805946a6de4f..e20375251f09ea41831b53b21eaf3d70f918a857 100644 (file)
@@ -78,6 +78,9 @@ The user can either input the ID of a node or element he wants to
 analyze directly in the dialog box or select the node(s) or element(s) in
 the 3D viewer.
 
+If <b>Show IDs</b> is activated, IDs of selected nodes or elements are
+displayed in the 3D viewer.
+
 \note The information about the groups, to which the node or element belongs,
 can be shown in a short or in a detailed form. By default, for performance
 reasons, this information is shown in a short form (group names
index d4c563030b01c9e6d4be31f8762a8cc4e0418cdb..acd29bb5bdf96c2f07df567edf66aa2ff5492964 100644 (file)
@@ -3,7 +3,7 @@
 \page over_constrained_faces_page Over-constrained faces
 
 \n This mesh quality control highlights faces sharing only one border
-with other faces. In other words, the faces having all thier nodes on
+with other faces. In other words, the faces having all their nodes on
 the free border of the 2D mesh are highlighted.
 
 \note The highlighted faces are actually over-constrained only if, at
index 036c70d83aaf7e9a655c1f646e0c97286e16cd28..01f3c5feaf6f530ce4fe54955736c57585e24de3 100644 (file)
@@ -3,8 +3,8 @@
 \page skew_page Skew
 
 \n \b Skew mesh quality criterion reflects the angle between the lines
-that join opposite sides of a quadrangle element or the greatesr angle
-between three medians in triangle elements. This mesh quality
+that join opposite sides of a quadrangle element or the greatest angle
+between a median and a midline in a triangle element. This mesh quality
 criterion can be applied to elements composed of 4 and 3 nodes
 (quadrangles and triangles).
 
index 2846b0884c24f0048d90854b6e6c2ae6e8e2289f..3713fae3752f9ace9d6ba3d5003cc71eba043e98 100644 (file)
@@ -42,7 +42,7 @@ is replaced by:
 \code
 MEFISTO_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Face_1)
 \endcode
-\n StdMeshers algoritms concerned are <em>REGULAR, PYTHON, COMPOSITE, MEFISTO, Hexa, QUADRANGLE, RADIAL_QUAD</em>.
+\n StdMeshers algorithms concerned are <em>REGULAR, PYTHON, COMPOSITE, MEFISTO, Hexa, QUADRANGLE, RADIAL_QUAD</em>.
 \n SMESH Plugins provide such algorithms as: <em> NETGEN, NETGEN_FULL, FULL_NETGEN, NETGEN_1D2D3D, NETGEN_1D2D, NETGEN_2D, NETGEN_3D</em>.
 \n If you use DISTENE plugins, you also have <em>BLSURF, GHS3D, GHS3DPRL, Hexotic</em>.
 
index 79b98b49d0c4431fc27ce164aa2c3231419998d7..53ad3f8a44dd61dbe5bb2cb6a46b57ff326a54fc 100644 (file)
@@ -24,7 +24,7 @@
 \tui_script{a3DmeshOnModified2Dmesh.py}
 
 <br>
-\section tui_editing_mesh Editing a mesh
+\section tui_editing_mesh Editing a mesh (i.e. changing hypotheses)
 \tui_script{creating_meshes_ex04.py}
 
 <br>
index 535c47640697a323290b0493fdb79f8f559e5b0f..87a7073fbcabb5a37e22da24baf2f088ae781819 100644 (file)
 
 \image html editing_groups1.png
 
-\image html editing_groups2.png
-
 <br>
 \section tui_union_of_groups Union of groups
 \tui_script{grouping_elements_ex05.py}
 
 \image html union_groups1.png
 
-\image html union_groups2.png
-
-\image html union_groups3.png
-
 <br>
 \section tui_intersection_of_groups Intersection of groups
 \tui_script{grouping_elements_ex06.py}
 
 \image html intersect_groups1.png
 
-\image html intersect_groups2.png
-
-\image html intersect_groups3.png
-
 <br>
 \section tui_cut_of_groups Cut of groups
 \tui_script{grouping_elements_ex07.py}
 
 \image html cut_groups1.png
 
-\image html cut_groups2.png
-
-\image html cut_groups3.png
-
 <br>
-\section tui_create_dim_group Creating groups of entities from existing groups of superior dimensions
+\section tui_create_dim_group Creating groups of entities basing on nodes of other groups
 \tui_script{grouping_elements_ex08.py}
 
 \image html dimgroup_tui1.png
-<center>Source groups of faces</center>
-
-\image html dimgroup_tui2.png
-<center>Result groups of edges and nodes</center>
 
 
 
index 91afd6cc8ab252063767ab204030ae63dd6ee52b..7cf11feba01a088027958a2e4c7639c64f7adb19 100755 (executable)
@@ -4,7 +4,7 @@
   <ul>
     $navpath
     <li class="footer">
-      Copyright &copy; 2007-2016  CEA/DEN, EDF R&amp;D, OPEN CASCADE<br>
+      Copyright &copy; 2007-2017  CEA/DEN, EDF R&amp;D, OPEN CASCADE<br>
       Copyright &copy; 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&amp;D, LEG, PRINCIPIA R&amp;D, BUREAU VERITAS<br>
     </li>
   </ul>
index 91afd6cc8ab252063767ab204030ae63dd6ee52b..7cf11feba01a088027958a2e4c7639c64f7adb19 100755 (executable)
@@ -4,7 +4,7 @@
   <ul>
     $navpath
     <li class="footer">
-      Copyright &copy; 2007-2016  CEA/DEN, EDF R&amp;D, OPEN CASCADE<br>
+      Copyright &copy; 2007-2017  CEA/DEN, EDF R&amp;D, OPEN CASCADE<br>
       Copyright &copy; 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&amp;D, LEG, PRINCIPIA R&amp;D, BUREAU VERITAS<br>
     </li>
   </ul>
index a6a0fef9feaf2863e11511f843b753b2acf9497b..565d189ef5d2ac11a65ab05a4bd95d13399043f0 100644 (file)
@@ -994,8 +994,8 @@ module StdMeshers
      *  \param internalPoints - points dividing a grid into parts along an axis
      *  \param axis - index of an axis counterd from zero, i.e. 0==X, 1==Y, 2==Z
      *
-     * Parameter t of spaceFunction f(t) is a position [0,1] withing bounding box of
-     * the shape to mesh or withing an interval defined by internal points
+     * Parameter t of spaceFunction f(t) is a position [0,1] within bounding box of
+     * the shape to mesh or within an interval defined by internal points
      */
     void SetGridSpacing(in SMESH::string_array spaceFunctions,
                         in SMESH::double_array internalPoints,
index f5c5645224f1ddca9e6f834c561cf345e6e560ee..c354e064d8fa26db7e34bf8072baad3bcf98e64c 100644 (file)
@@ -645,7 +645,7 @@ module SMESH
     Filter            CreateFilter();
 
     /*!
-    *  Load filter library. If libary does not exist it is created
+    *  Load filter library. If library does not exist it is created
     */
     FilterLibrary     LoadLibrary( in string aFileName );
 
index 397079a96a908bf1bd9ab66103670ed1412360a1..5f096d2d20e89b0f719e1595a28d709477bc520d 100644 (file)
@@ -91,7 +91,7 @@ module SMESH
     /*!
      * Return true if a hypothesis has parameters.
      *
-     * This method is intended for GUI to know if "Edit" menu item sould be available
+     * This method is intended for GUI to know if "Edit" menu item should be available
      */
     boolean HasParameters();
   };
index 51c98282cb4bdb0e36ef3c20880394575c90d43f..805b21df68590e0e04a7c16b1de072b6bd6eba82 100644 (file)
@@ -263,7 +263,7 @@ module SMESH
   };
 
   /*!
-   * Auxilary flags for advanced extrusion.
+   * Auxiliary flags for advanced extrusion.
    * BOUNDARY: create or not boundary for result of extrusion
    * SEW:      try to use existing nodes or create new nodes in any case
    */
@@ -349,7 +349,7 @@ module SMESH
       raises (SALOME::SALOME_Exception);
 
     /*!
-     * Get geom shape to mesh. A result sould not be nil. Use HasShapeToMesh()
+     * Get geom shape to mesh. A result should not be nil. Use HasShapeToMesh()
      * to know if a returned shape 
      */
     GEOM::GEOM_Object GetShapeToMesh()
@@ -389,7 +389,7 @@ module SMESH
      * Get the subMesh object associated to a Sub-shape. The subMesh object
      * gives access to nodes and elements IDs.
      * SubMesh will be used instead of Sub-shape in a next idl version to
-     * adress a specific subMesh...
+     * address a specific subMesh...
      */
     SMESH_subMesh GetSubMesh(in GEOM::GEOM_Object aSubObject, in string name)
       raises (SALOME::SALOME_Exception);
index 4e3b37f408b790b4a250b8f3df2995c394ad30f2..4229c0345eaded6d86128b6841c6532f2a356e55 100644 (file)
@@ -144,10 +144,10 @@ module SMESH
       ERR_LOADF_CANT_PROJECT, // impossible to project nodes
       // Load(volume)
       ERR_LOADV_BAD_SHAPE, // volume is not a brick of 6 faces
-      ERR_LOADV_COMPUTE_PARAMS, // cant compute point parameters
+      ERR_LOADV_COMPUTE_PARAMS, // can't compute point parameters
       // Apply(shape)
       ERR_APPL_NOT_LOADED, // pattern was not loaded
-      ERR_APPL_BAD_DIMENTION, // wrong shape dimention
+      ERR_APPL_BAD_DIMENTION, // wrong shape dimension
       ERR_APPL_BAD_NB_VERTICES, // keypoints - vertices mismatch
       // Apply(face)
       ERR_APPLF_BAD_TOPOLOGY, // bad pattern topology
index 9975b95b238d0e9561cdde77553f72e32020d836..d2801c905efd76ec6449a9fe71667736a261fc43 100755 (executable)
@@ -109,6 +109,7 @@ SET(SMESH_RESOURCES_FILES
   mesh_tree_hypo.png
   mesh_tree_hypo_segment.png
   mesh_tree_hypo_volume.png
+  mesh_tree_hypo_cartesian.png
   mesh_tree_mesh.png
   mesh_tree_importedmesh.png
   mesh_tree_mesh_warn.png
@@ -192,6 +193,7 @@ SET(SMESH_RESOURCES_FILES
   mesh_tree_hypo_source_3d_shape.png
   mesh_tree_hypo_projection_3d.png
   mesh_tree_hypo_projection_2d.png
+  mesh_tree_hypo_quadratic.png
   mesh_build_compound.png
   copy_mesh.png
   mesh_node_to_point.png
@@ -223,6 +225,9 @@ SET(SMESH_RESOURCES_FILES
   mesh_extmeth_node_offset.png
   mesh_extmeth_surf_offset_smooth.png
   mesh_extmeth_face_offset.png
+  mesh_quality.png
+  mesh_show.png
+  mesh_hide.png
 )
 
 INSTALL(FILES ${SMESH_RESOURCES_FILES} DESTINATION ${SALOME_SMESH_INSTALL_RES_DATA})
index 19b9f895a099be52c9a210a5bed7c70a2092d1d3..5a858500da2682406b1cddb619d69cb554c95c54 100644 (file)
                 label-id ="Quadratic Mesh"
                 icon-id  ="mesh_algo_quad.png"
                 dim      ="1"
-                context  ="GLOBAL"
                 auxiliary="true"/>                
 
     <hypothesis type     ="MaxElementArea"
diff --git a/resources/mesh_hide.png b/resources/mesh_hide.png
new file mode 100644 (file)
index 0000000..31c505d
Binary files /dev/null and b/resources/mesh_hide.png differ
diff --git a/resources/mesh_quality.png b/resources/mesh_quality.png
new file mode 100644 (file)
index 0000000..9a5c974
Binary files /dev/null and b/resources/mesh_quality.png differ
diff --git a/resources/mesh_show.png b/resources/mesh_show.png
new file mode 100644 (file)
index 0000000..61ebe47
Binary files /dev/null and b/resources/mesh_show.png differ
diff --git a/resources/mesh_tree_hypo_cartesian.png b/resources/mesh_tree_hypo_cartesian.png
new file mode 100644 (file)
index 0000000..d34ea42
Binary files /dev/null and b/resources/mesh_tree_hypo_cartesian.png differ
diff --git a/resources/mesh_tree_hypo_quadratic.png b/resources/mesh_tree_hypo_quadratic.png
new file mode 100644 (file)
index 0000000..6516bf8
Binary files /dev/null and b/resources/mesh_tree_hypo_quadratic.png differ
index bf8c097c0037c7ec85b048bd7f02d66fc3f6c5ff..6e80cc77ad1a53324ea380b885c3cc6eb78c1a8b 100644 (file)
@@ -134,7 +134,7 @@ namespace {
     //  +-----+------+  +-----+------+ 
     //  |            |  |            |
     //  |            |  |            |
-    // result sould be 2 in both cases
+    // result should be 2 in both cases
     //
     int aResult0 = 0, aResult1 = 0;
      // last node, it is a medium one in a quadratic edge
@@ -2650,7 +2650,7 @@ bool FreeFaces::IsSatisfy( long theId )
   for ( ; volItr != volEnd; ++volItr )
     if ( (*volItr).second >= nbNode )
        nbVol++;
-  // face is not free if number of volumes constructed on thier nodes more than one
+  // face is not free if number of volumes constructed on their nodes more than one
   return (nbVol < 2);
 }
 
@@ -2698,7 +2698,7 @@ SMDSAbs_ElementType LinearOrQuadratic::GetType() const
 //================================================================================
 /*
   Class       : GroupColor
-  Description : Functor for check color of group to whic mesh element belongs to
+  Description : Functor for check color of group to which mesh element belongs to
 */
 //================================================================================
 
index 830d43b81b4d9777bcc6f5ebd34100167283ea97..cd39ab3d95d820f98bc0a86e633d3821d8a50607 100644 (file)
@@ -1041,7 +1041,7 @@ namespace SMESH{
 
     /*
       Class       : GroupColor
-      Description : Functor for check color of group to whic mesh element belongs to
+      Description : Functor for check color of group to which mesh element belongs to
     */
     class SMESHCONTROLS_EXPORT GroupColor: public virtual Predicate{
     public:
index e511cecd08802f389ddb5ca2a801a21862056cc0..c784acc9fa2f598f15b1f79eb8cca26a483025f2 100644 (file)
@@ -766,7 +766,7 @@ Driver_Mesh::Status DriverCGNS_Read::Perform()
     }
 
     // Read connectivity between zones. Nodes of the zone interface will be
-    // replaced withing the zones read later
+    // replaced within the zones read later
     string err = zone.ReadZonesConnection( _fn, cgnsBase, zonesByName, myMesh );
     if ( !err.empty() )
       addMessage( err );
index e047bc711ef0ac15f3bf6a412dc900d589d8e255..5d2956c578588d79636d27d4821fbdd77ed6e7b2 100644 (file)
@@ -47,7 +47,6 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
   int NoeudsMaille[20];
   int NoeudMaille;
   
-  MESSAGE("in DriverDAT_R_SMDS_Mesh::Read()");
   /****************************************************************************
    *                      OUVERTURE DU FICHIER EN LECTURE                      *
    ****************************************************************************/
index a86d1b2954c189c842503a854a0ff485098ca8d2..7ab288f86783fbf2ee439b4a2530f4a57cee52de 100644 (file)
@@ -41,7 +41,8 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
 
   char *file2Read = (char *)myFile.c_str();
   FILE* aFileId = fopen(file2Read, "w+");
-  if ( !aFileId ) {
+  if ( !aFileId )
+  {
     fprintf(stderr, ">> ERREUR : ouverture du fichier %s \n", file2Read);
     return DRS_FAIL;
   }
@@ -71,20 +72,23 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
    ****************************************************************************/
 
   SMDS_NodeIteratorPtr itNodes=myMesh->nodesIterator();
-  while(itNodes->more()){               
+  while(itNodes->more())
+  {
     const SMDS_MeshNode * node = itNodes->next();
     fprintf(aFileId, "%d %.14e %.14e %.14e\n", node->GetID(), node->X(), node->Y(), node->Z());
   }
-        
+
   /****************************************************************************
    *                       ECRITURE DES ELEMENTS                                *
    ****************************************************************************/
   /* Ecriture des connectivites, noms, numeros des mailles */
-  
+
   SMDS_EdgeIteratorPtr itEdges=myMesh->edgesIterator();
-  while(itEdges->more()){
+  while(itEdges->more())
+  {
     const SMDS_MeshElement * elem = itEdges->next();
-    switch (elem->NbNodes()) {
+    switch (elem->NbNodes())
+    {
     case 2:
       fprintf(aFileId, "%d %d ", elem->GetID(), 102);
       break;
@@ -93,33 +97,51 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
       break;
     }
     SMDS_ElemIteratorPtr it=elem->nodesIterator();
-    while(it->more()) 
+    while(it->more())
       fprintf(aFileId, "%d ", it->next()->GetID());
     fprintf(aFileId, "\n");
   }
-  
+
   SMDS_FaceIteratorPtr itFaces=myMesh->facesIterator();
-  while(itFaces->more()){
+  while(itFaces->more())
+  {
     const SMDS_MeshElement * elem = itFaces->next();
     if ( elem->IsPoly() )
       fprintf(aFileId, "%d %d ", elem->GetID(), 400+elem->NbNodes());
     else
       fprintf(aFileId, "%d %d ", elem->GetID(), 200+elem->NbNodes());
     SMDS_ElemIteratorPtr it=elem->nodesIterator();
-    while(it->more()) 
+    while(it->more())
       fprintf(aFileId, "%d ", it->next()->GetID());
     fprintf(aFileId, "\n");
   }
 
   SMDS_VolumeIteratorPtr itVolumes=myMesh->volumesIterator();
-  while(itVolumes->more()){
+  const SMDS_VtkVolume* v;
+  while(itVolumes->more())
+  {
     const SMDS_MeshElement * elem = itVolumes->next();
     if ( elem->IsPoly() )
+    {
       fprintf(aFileId, "%d %d ", elem->GetID(), 500+elem->NbNodes());
+
+      if (( v = dynamic_cast< const SMDS_VtkVolume*>( elem )))
+      {
+        std::vector<int> quant = v->GetQuantities();
+        if ( !quant.empty() )
+        {
+          fprintf(aFileId, "%d %d ", (int)quant.size(), quant[0]);
+          for ( size_t i = 1; i < quant.size(); ++i )
+            fprintf(aFileId, "%d ", quant[i]);
+        }
+      }
+    }
     else
+    {
       fprintf(aFileId, "%d %d ", elem->GetID(), 300+elem->NbNodes());
+    }
     SMDS_ElemIteratorPtr it=elem->nodesIterator();
-    while(it->more()) 
+    while(it->more())
       fprintf(aFileId, "%d ", it->next()->GetID());
 
     fprintf(aFileId, "\n");
index 577879462120528b10274b8e62efa3e0c9e57275..f6d67ea597d72ee76eb19488b0b9f874c7c4bc52 100644 (file)
@@ -152,7 +152,8 @@ DriverMED_Family
                const bool doGroupOfFaces,
                const bool doGroupOfVolumes,
                const bool doGroupOf0DElems,
-               const bool doGroupOfBalls)
+               const bool doGroupOfBalls,
+               const bool doAllInGroups)
 {
   DriverMED_FamilyPtrList aFamilies;
 
@@ -330,10 +331,38 @@ DriverMED_Family
   }
 
   DriverMED_FamilyPtr aNullFam (new DriverMED_Family);
-  aNullFam->SetId(0);
+  aNullFam->SetId( 0 );
   aNullFam->myType = SMDSAbs_All;
   aFamilies.push_back(aNullFam);
 
+  if ( doAllInGroups )
+  {
+    if ( !doGroupOfEdges )
+    {
+      DriverMED_FamilyPtr aNigEdgeFam (new DriverMED_Family);
+      aNigEdgeFam->SetId( NIG_EDGES_FAMILY );
+      aNigEdgeFam->myType = SMDSAbs_Edge;
+      aNigEdgeFam->myGroupNames.insert( NIG_GROUP_PREFIX "_EDGES" );
+      aFamilies.push_back(aNigEdgeFam);
+    }
+    if ( !doGroupOfFaces )
+    {
+      DriverMED_FamilyPtr aNigFaceFam (new DriverMED_Family);
+      aNigFaceFam->SetId( NIG_FACES_FAMILY );
+      aNigFaceFam->myType = SMDSAbs_Face;
+      aNigFaceFam->myGroupNames.insert( NIG_GROUP_PREFIX "_FACES" );
+      aFamilies.push_back(aNigFaceFam);
+    }
+    if ( !doGroupOfVolumes )
+    {
+      DriverMED_FamilyPtr aNigVolFam (new DriverMED_Family);
+      aNigVolFam->SetId( NIG_VOLS_FAMILY );
+      aNigVolFam->myType = SMDSAbs_Volume;
+      aNigVolFam->myGroupNames.insert( NIG_GROUP_PREFIX "_VOLS" );
+      aFamilies.push_back(aNigVolFam);
+    }
+  }
+
   return aFamilies;
 }
 
@@ -342,7 +371,7 @@ DriverMED_Family
  *  Create TFamilyInfo for this family
  */
 //=============================================================================
-MED::PFamilyInfo 
+MED::PFamilyInfo
 DriverMED_Family::GetFamilyInfo(const MED::PWrapper& theWrapper, 
                                 const MED::PMeshInfo& theMeshInfo) const
 {
@@ -445,9 +474,8 @@ void DriverMED_Family::Init (SMESHDS_GroupBase* theGroup)
  */
 //=============================================================================
 DriverMED_FamilyPtrList 
-DriverMED_Family
-::SplitByType (SMESHDS_SubMesh* theSubMesh,
-               const int        theId)
+DriverMED_Family::SplitByType (SMESHDS_SubMesh* theSubMesh,
+                               const int        theId)
 {
   DriverMED_FamilyPtrList aFamilies;
   DriverMED_FamilyPtr aNodesFamily   (new DriverMED_Family);
index 0f77a01ed27536f4ae988a5207e8d0a04fe9680a..1325617f13203d0b34b2e28223f5c52d59d0d6eb 100644 (file)
@@ -38,6 +38,7 @@
 
 #include <boost/shared_ptr.hpp>
 #include <set>
+#include <limits>
 
 #define REST_NODES_FAMILY 1
 #define FIRST_NODE_FAMILY 2
 #define REST_BALL_FAMILY    -5
 #define FIRST_ELEM_FAMILY   -6
 
+// Not In Group families
+#define NIG_EDGES_FAMILY   INT_MAX-1
+#define NIG_FACES_FAMILY   INT_MAX-2
+#define NIG_VOLS_FAMILY    INT_MAX-3
+#define NIG_0DELEM_FAMILY  INT_MAX-4
+#define NIG_BALL_FAMILY    INT_MAX-5
+#define NIG_GROUP_PREFIX "NOT_IN_GRP"
+
 typedef std::list<DriverMED_FamilyPtr               > DriverMED_FamilyPtrList;
 typedef std::map<int,SMESHDS_SubMesh*               > SMESHDS_SubMeshPtrMap;
 typedef std::list<SMESHDS_GroupBase*                > SMESHDS_GroupBasePtrList;
@@ -76,7 +85,8 @@ class MESHDRIVERMED_EXPORT DriverMED_Family
                 const bool doGroupOfFaces,
                 const bool doGroupOfVolumes,
                 const bool doGroupOf0DElems,
-                const bool doGroupOfBalls);
+                const bool doGroupOfBalls,
+                const bool doAllInGroups);
 
   //! Create TFamilyInfo for this family
   MED::PFamilyInfo 
index 3164ae065ebda3f53366536501a55335e10927e6..16c555eaf4723c41a7dfb138aea43e0d6f266f54 100644 (file)
@@ -155,7 +155,8 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
               aFamily->SetGroupAttributVal(anAttrVal);
             }
             if(MYDEBUG) MESSAGE(aGroupName);
-            aFamily->AddGroupName(aGroupName);
+            if ( strncmp( aGroupName.c_str(), NIG_GROUP_PREFIX, strlen(NIG_GROUP_PREFIX) ) != 0 )
+              aFamily->AddGroupName(aGroupName);
           }
           aFamily->SetId( aFamId );
           myFamilies[aFamId] = aFamily;
index f31f262c03438b16bd4bcd561a227484f13ab973..64d6b6a3b687b3ac68c3030c1cb28744e93107b0 100644 (file)
@@ -61,7 +61,8 @@ DriverMED_W_SMESHDS_Mesh::DriverMED_W_SMESHDS_Mesh():
   myDoGroupOf0DElems(false),
   myDoGroupOfBalls(false),
   myAutoDimension(false),
-  myAddODOnVertices(false)
+  myAddODOnVertices(false),
+  myDoAllInGroups(false)
 {}
 
 void DriverMED_W_SMESHDS_Mesh::SetFile(const std::string& theFileName, 
@@ -129,6 +130,32 @@ void DriverMED_W_SMESHDS_Mesh::AddGroupOfVolumes()
   myDoGroupOfVolumes = true;
 }
 
+void DriverMED_W_SMESHDS_Mesh::AddGroupOf0DElems()
+{
+  myDoGroupOf0DElems = true;
+}
+
+void DriverMED_W_SMESHDS_Mesh::AddGroupOfBalls()
+{
+  myDoGroupOfBalls = true;
+}
+
+//================================================================================
+/*!
+ * \brief Set up a flag to add all elements not belonging to any group to
+ *        some auxiliary group. This is needed for SMESH -> SAUVE -> SMESH conversion,
+ *        which since PAL0023285 reads only SAUVE elements belonging to any group,
+ *        and hence can lose some elements. That auxiliary group is ignored while
+ *        reading a MED file.
+ */
+//================================================================================
+
+void DriverMED_W_SMESHDS_Mesh::AddAllToGroup()
+{
+  myDoAllInGroups = true;
+}
+
+
 namespace
 {
   typedef double (SMDS_MeshNode::* TGetCoord)() const;
@@ -429,7 +456,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
         break;
       }
     }
-    
+
     MED::PWrapper myMed = CrWrapper(myFile,myMedVersion);
     PMeshInfo aMeshInfo = myMed->CrMeshInfo(aMeshDimension,aSpaceDimension,aMeshName);
     //MESSAGE("Add - aMeshName : "<<aMeshName<<"; "<<aMeshInfo->GetName());
@@ -449,12 +476,20 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
     int nbEdges      = myMesh->NbEdges();
     int nbFaces      = myMesh->NbFaces();
     int nbVolumes    = myMesh->NbVolumes();
-    if (myDoGroupOfNodes && nbNodes) myNodesDefaultFamilyId = REST_NODES_FAMILY;
-    if (myDoGroupOfEdges && nbEdges) myEdgesDefaultFamilyId = REST_EDGES_FAMILY;
-    if (myDoGroupOfFaces && nbFaces) myFacesDefaultFamilyId = REST_FACES_FAMILY;
-    if (myDoGroupOfVolumes && nbVolumes) myVolumesDefaultFamilyId = REST_VOLUMES_FAMILY;
-    if (myDoGroupOf0DElems && nb0DElements) my0DElementsDefaultFamilyId = REST_0DELEM_FAMILY;
-    if (myDoGroupOfBalls && nbBalls) myBallsDefaultFamilyId = REST_BALL_FAMILY;
+    if (myDoGroupOfNodes)   myNodesDefaultFamilyId      = REST_NODES_FAMILY;
+    if (myDoGroupOfEdges)   myEdgesDefaultFamilyId      = REST_EDGES_FAMILY;
+    if (myDoGroupOfFaces)   myFacesDefaultFamilyId      = REST_FACES_FAMILY;
+    if (myDoGroupOfVolumes) myVolumesDefaultFamilyId    = REST_VOLUMES_FAMILY;
+    if (myDoGroupOf0DElems) my0DElementsDefaultFamilyId = REST_0DELEM_FAMILY;
+    if (myDoGroupOfBalls)   myBallsDefaultFamilyId      = REST_BALL_FAMILY;
+    if (myDoAllInGroups )
+    {
+      if (!myDoGroupOfEdges)   myEdgesDefaultFamilyId      = NIG_EDGES_FAMILY   ;
+      if (!myDoGroupOfFaces)   myFacesDefaultFamilyId      = NIG_FACES_FAMILY   ;
+      if (!myDoGroupOfVolumes) myVolumesDefaultFamilyId    = NIG_VOLS_FAMILY    ;
+      if (!myDoGroupOf0DElems) my0DElementsDefaultFamilyId = NIG_0DELEM_FAMILY  ;
+      if (!myDoGroupOfBalls)   myBallsDefaultFamilyId      = NIG_BALL_FAMILY    ;
+    }
 
     //MESSAGE("Perform - aFamilyInfo");
     list<DriverMED_FamilyPtr> aFamilies;
@@ -466,7 +501,8 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
          myDoGroupOfFaces   && nbFaces,
          myDoGroupOfVolumes && nbVolumes,
          myDoGroupOf0DElems && nb0DElements,
-         myDoGroupOfBalls   && nbBalls);
+         myDoGroupOfBalls   && nbBalls,
+         myDoAllInGroups);
     }
     else {
       aFamilies = DriverMED_Family::MakeFamilies
@@ -476,7 +512,8 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
          myDoGroupOfFaces   && nbFaces,
          myDoGroupOfVolumes && nbVolumes,
          myDoGroupOf0DElems && nb0DElements,
-         myDoGroupOfBalls   && nbBalls);
+         myDoGroupOfBalls   && nbBalls,
+         myDoAllInGroups);
     }
     list<DriverMED_FamilyPtr>::iterator aFamsIter;
     for (aFamsIter = aFamilies.begin(); aFamsIter != aFamilies.end(); aFamsIter++)
index 873adf45028478205f94bb9fa0086296ea5f3ddd..a9539b9e8741fe509dc95803d76eab4d74c5e345 100644 (file)
@@ -59,6 +59,7 @@ class MESHDRIVERMED_EXPORT DriverMED_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh
   void AddGroupOfVolumes();
   void AddGroupOf0DElems();
   void AddGroupOfBalls();
+  void AddAllToGroup();
 
   /*! functions to prepare adding one mesh
    */
@@ -88,6 +89,7 @@ class MESHDRIVERMED_EXPORT DriverMED_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh
   bool myDoGroupOfBalls;
   bool myAutoDimension;
   bool myAddODOnVertices;
+  bool myDoAllInGroups;
 };
 
 #endif
index 9a531668c66351f5fd8fb7e17ba60c979e1dbe1d..ae7e48cca98a1d0b25af2faae85e51dca1d9962b 100644 (file)
@@ -69,7 +69,7 @@ namespace
   };
   typedef NCollection_DataMap<gp_Pnt,SMDS_MeshNode*,Hasher> TDataMapOfPntNodePtr;
 
-  const int HEADER_SIZE           = 84;
+  const int HEADER_SIZE           = 84; // 80 chars + int
   const int SIZEOF_STL_FACET      = 50;
   const int ASCII_LINES_PER_FACET = 7;
   const int SIZE_OF_FLOAT         = 4;
@@ -150,11 +150,12 @@ Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::Perform()
 static Standard_Real readFloat(SMESH_File& theFile)
 {
   union {
-    Standard_Boolean i;
-    Standard_ShortReal f;
+    int   i;
+    float f;
   } u;
 
   const char* c = theFile;
+  u.i  = 0;
   u.i  =  c[0] & 0xFF;
   u.i |= (c[1] & 0xFF) << 0x08;
   u.i |= (c[2] & 0xFF) << 0x10;
@@ -205,30 +206,48 @@ static SMDS_MeshNode* readNode(SMESH_File& theFile,
 
 //=======================================================================
 //function : readAscii
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::readAscii(SMESH_File& theFile) const
 {
   Status aResult = DRS_OK;
 
+  // get a solid name
+  if ( strncmp( "solid ", theFile, strlen("solid ")) == 0 ) // not empty
+  {
+    const char * header = theFile;
+    std::string& name = const_cast<std::string&>( myName );
+    for ( header += strlen("solid "); !iscntrl( *header ); ++header )
+      name.push_back( *header );
+
+    std::string::iterator i = name.begin();
+    while ( i != name.end() && isspace( *i )) ++i;
+    name.erase( name.begin(), i );
+
+    size_t n = name.size();
+    while ( n > 0 && isspace( name[ n - 1 ] )) --n;
+    name.resize( n );
+  }
+
   // get the file size
   long filesize = theFile.size();
   theFile.close();
 
-  // Open the file 
+  // Open the file
   FILE* file = fopen( myFile.c_str(),"r");
 
   // count the number of lines
   Standard_Integer nbLines = 0;
-  for (long ipos = 0; ipos < filesize; ++ipos) {
+  for (long ipos = 0; ipos < filesize; ++ipos)
+  {
     if (getc(file) == '\n')
       nbLines++;
   }
 
   // go back to the beginning of the file
   rewind(file);
-  
+
   Standard_Integer nbTri = (nbLines / ASCII_LINES_PER_FACET);
 
   TDataMapOfPntNodePtr uniqnodes;
@@ -236,8 +255,8 @@ Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::readAscii(SMESH_File& theFile) const
   while (getc(file) != '\n');
 
   // main reading
-  for (Standard_Integer iTri = 0; iTri < nbTri; ++iTri) {
-
+  for (Standard_Integer iTri = 0; iTri < nbTri; ++iTri)
+  {
     // skipping the facet normal
     Standard_ShortReal normal[3];
     fscanf(file,"%*s %*s %f %f %f\n",&normal[0],&normal[1],&normal[2]);
@@ -278,7 +297,7 @@ Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::readBinary(SMESH_File& file) const
 
   long filesize = file.size();
 
-  if ( (filesize - HEADER_SIZE) % SIZEOF_STL_FACET !=0 
+  if ( (filesize - HEADER_SIZE) % SIZEOF_STL_FACET != 
       // Commented to allow reading small files (ex: 1 face)
       /*|| (filesize < STL_MIN_FILE_SIZE)*/) {
     Standard_NoMoreObject::Raise("DriverSTL_R_SMDS_MESH::readBinary (wrong file size)");
@@ -288,6 +307,19 @@ Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::readBinary(SMESH_File& file) const
   // sometimes it is wrong, and with this technique we don't need to swap endians for integer
   Standard_Integer nbTri = ((filesize - HEADER_SIZE) / SIZEOF_STL_FACET);
 
+  // get a solid name
+  if ( strncmp( "name: ", file, strlen("name: ")) == 0 ) // name present
+  {
+    const char * header = file;
+    std::string&   name = const_cast<std::string&>( myName );
+    header += strlen("name: ");
+    name.assign( header, HEADER_SIZE - strlen("name: ") - 4);
+
+    size_t n = name.size();
+    while ( n > 0 && isspace( name[ n - 1 ] )) --n;
+    name.resize( n );
+  }
+
   // skip the header
   file += HEADER_SIZE;
 
index 5459b5181d232f841d0e9671fd1db8acc3183e61..d30366bfb7dfcb927c2010d4303cbfa3f5779ab7 100644 (file)
@@ -35,16 +35,18 @@ class MESHDRIVERSTL_EXPORT DriverSTL_R_SMDS_Mesh: public Driver_SMDS_Mesh
   DriverSTL_R_SMDS_Mesh();
   virtual Status Perform();
   void           SetIsCreateFaces( const bool theIsCreate = true );
+  std::string    GetName() const { return myName; }
   
  private:
   // PRIVATE METHODS
-  Status           readAscii (SMESH_File& file) const;
-  Status           readBinary(SMESH_File& file) const;
-  
+  Status         readAscii (SMESH_File& file) const;
+  Status         readBinary(SMESH_File& file) const;
+
  private:
   // PRIVATE FIELDS
-  bool myIsCreateFaces;
-  bool myIsAscii;
+  bool        myIsCreateFaces;
+  bool        myIsAscii;
+  std::string myName;
 };
 
 #endif
index cb42a321b81a9f1a64be47b8cb8ae0915ac269a1..333c72d96af80d11dfb031cad24825458e0aecba 100644 (file)
@@ -176,7 +176,7 @@ static void writeFloat( const Standard_ShortReal& theVal, SMESH_File& ofile)
 {
   union {
     Standard_ShortReal f;
-    char c[4]; 
+    char c[4];
   } u;
 
   u.f = theVal;
@@ -485,7 +485,8 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeAscii() const
   SMESH_File aFile( myFile, /*openForReading=*/false );
   aFile.openForWriting();
 
-  std::string buf("solid\n");
+  std::string buf("solid ");
+  buf += myName + "\n";
   aFile.writeRaw( buf.c_str(), buf.size() );
 
   char sval[128];
@@ -520,7 +521,8 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeAscii() const
                       " endfacet\n", 21 );
     }
   }
-  aFile.writeRaw ("endsolid\n" , 9 );
+  buf = "endsolid " + myName + "\n";
+  aFile.writeRaw( buf.c_str(), buf.size() );
 
   return aResult;
 }
@@ -554,6 +556,11 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeBinary() const
     }
   }
   std::string sval( LABEL_SIZE, ' ' );
+  if ( !myName.empty() )
+  {
+    sval = "name: " + myName;
+    sval.resize( LABEL_SIZE, ' ' );
+  }
   aFile.write( sval.c_str(), LABEL_SIZE );
 
   // write number of triangles
index efc027be1e32fd7accae5e051c188637d26359c7..66c4741bf8274ace5d999d31f7d5acc6a8db88e5 100644 (file)
@@ -45,6 +45,7 @@ class MESHDRIVERSTL_EXPORT DriverSTL_W_SMDS_Mesh: public Driver_SMDS_Mesh
   ~DriverSTL_W_SMDS_Mesh();
   virtual Status Perform();
   void    SetIsAscii( const bool theIsAscii = false );
+  void    SetName( const std::string name ) { myName = name; }
 
  private:
   // PRIVATE METHODS
@@ -56,7 +57,8 @@ class MESHDRIVERSTL_EXPORT DriverSTL_W_SMDS_Mesh: public Driver_SMDS_Mesh
 
  private:
   // PRIVATE FIELDS
-  bool myIsAscii;
+  bool        myIsAscii;
+  std::string myName;
   int                                  myNbVolumeTrias;
   std::vector<const SMDS_MeshElement*> myVolumeFacets; // tmp faces
 };
index aade6ceaeaaeaacecab1bf55b5d0817269f166c7..27576a613eaaf6abc26b65c4685a65a9c4613a9f 100644 (file)
@@ -374,6 +374,9 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
                                                 aRec.node_labels[6],
                                                 aRec.node_labels[4],
                                                 aRec.node_labels[2],
+
+                                                aRec.node_labels[12],
+
                                                 aRec.node_labels[7],
                                                 aRec.node_labels[5],
                                                 aRec.node_labels[3],
@@ -383,7 +386,6 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
                                                 aRec.node_labels[11],
                                                 aRec.node_labels[10],
                                                 aRec.node_labels[9],
-                                                aRec.node_labels[12],
                                                 aRec.label);
             break;
 
index d94571ab649d285dc0c46c822e6819198572efbb..d8bca84a0a723dc6827813ef0e10f9939baaddaa 100644 (file)
@@ -59,7 +59,6 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
       TDataSet aDataSet2411;
       // Storing SMDS nodes to the UNV file
       //-----------------------------------
-      MESSAGE("Perform - myMesh->NbNodes() = "<<myMesh->NbNodes());
       SMDS_NodeIteratorPtr aNodesIter = myMesh->nodesIterator();
       TRecord aRec;
       while ( aNodesIter->more() )
@@ -71,7 +70,6 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
         aRec.coord[2] = aNode->Z();
         aDataSet2411.push_back( aRec );
       }
-      MESSAGE("Perform - aDataSet2411.size() = "<<aDataSet2411.size());
       UNV2411::Write(out_stream,aDataSet2411);
     }
     {
@@ -79,7 +77,6 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
       TDataSet aDataSet2412;
 
       // Storing SMDS Edges
-      MESSAGE("Perform - myMesh->NbEdges() = "<<myMesh->NbEdges());
       if(myMesh->NbEdges()){
         SMDS_EdgeIteratorPtr anIter = myMesh->edgesIterator();
         while( anIter->more() )
@@ -102,10 +99,8 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
           }
           aDataSet2412.push_back(aRec);
         }
-        MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
       }
 
-      MESSAGE("Perform - myMesh->NbFaces() = "<<myMesh->NbFaces());
       if ( myMesh->NbFaces() )
       {
         SMDS_FaceIteratorPtr anIter = myMesh->facesIterator();
@@ -134,10 +129,8 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
           }
           aDataSet2412.push_back(aRec);
         }
-        MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
       }
 
-      MESSAGE("Perform - myMesh->NbVolumes() = "<<myMesh->NbVolumes());
       if ( myMesh->NbVolumes() )
       {
         SMDS_VolumeIteratorPtr anIter = myMesh->volumesIterator();
@@ -174,7 +167,6 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
             aDataSet2412.push_back(aRec);
           }
         }
-        MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
       }
       UNV2412::Write(out_stream,aDataSet2412);
     }
index 5f38f3aaab94c5c865114529c1ae07fd4ef07a25..03c2a1caee55d6259f70dc5aa7b00f2ae5548f47 100644 (file)
@@ -20,8 +20,8 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-#ifndef MED_Utilities_HeaderFile
-#define MED_Utilities_HeaderFile
+#ifndef UNV_Utilities_HeaderFile
+#define UNV_Utilities_HeaderFile
 
 #include "SMESH_DriverUNV.hxx"
 
@@ -48,7 +48,7 @@ namespace UNV{
   };
 
   /**
-   * @returns \p false when error occured, \p true otherwise.
+   * @returns \p false when error occurred, \p true otherwise.
    * Adjusts the \p in_stream to the beginning of the
    * dataset \p ds_name.
    */
@@ -95,7 +95,7 @@ namespace UNV{
   {
     /* find "D" in string, start looking at
      * 6th element, to improve speed.
-     * We dont expect a "D" earlier
+     * We don't expect a "D" earlier
      */
     const size_t position = number.find("D",6);
     if ( position != std::string::npos )
index 0de392301fb76846e544a347a4228dcd62ef324f..24e01f6f4de74070d319e48e15af00309547d036 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef MED_SliceArray_HeaderFile
 #define MED_SliceArray_HeaderFile
 
-#ifdef WIN32 // for correctly compiling "valarray" in modules, which are includes this file
+#ifdef WIN32 // for correctly compiling "valarray" in modules, which includes this file
   #undef max
   #undef min
 #endif
 namespace MED
 {
   //---------------------------------------------------------------
-  //! This class intends to provide an uniform way to handle multy-dimention data (const version)
+  //! This class intends to provide a uniform way to handle multidimensional data (const version)
   /*! 
-    It just contains pointer to real sequence and implement proper calcultion of its indexes.
-    This class deal with constant pointer to the sources data and provide const method to
-    read the them (data).
+    It just contains a pointer to real sequence and implement proper calculation of its indexes.
+    This class deals with constant pointer to the sources data and provides const method to
+    read them (data).
    */
   template<class TValueType> 
   class TCSlice
   {
-    const TValueType* myCValuePtr; //!< Reference to source multy-dimension data
-    size_t mySourceSize; //!< Size of the source multy-dimension data
+    const TValueType* myCValuePtr; //!< Reference to source multidimensional data
+    size_t mySourceSize; //!< Size of the source multidimensional data
     std::slice mySlice; //!< Defines algorithm of index calculation
 
   protected:
@@ -63,7 +63,7 @@ namespace MED
       throw std::out_of_range("TCSlice::check_id");
     }
 
-    //! Calculate internal index to get proper element from the source multy-dimension data
+    //! Calculate internal index to get proper element from the source multidimensional data
     size_t
     calculate_id(size_t theId) const
     {
@@ -134,7 +134,7 @@ namespace MED
   
 
   //---------------------------------------------------------------
-  //! This class extend TCSlice functionality for non-constant case
+  //! This class extends TCSlice functionality for non-constant case
   template<class TValueType> 
   class TSlice: public TCSlice<TValueType>
   {
index b2153ed911b66196673365cc74812b32a73e03eb..b6029949b56eddc6e0c9f3ee15c07551ad47a6f8 100644 (file)
@@ -283,15 +283,15 @@ namespace MED
     virtual TModeSwitchInfo 
   {
     EEntiteMaillage myEntity; //!< Defines the MED Entity where the mesh cells belongs to
-    //! Let known what MED ENTITY the cells belong to
+    //! Find out what MED ENTITY the cells belong to
     EEntiteMaillage GetEntity() const { return myEntity;}
 
     EGeometrieElement myGeom; //!< Defines the MED Geometric type of the instance
-    //! Let known what MED geometrical type the cells belong to
+    //! Find out what MED geometrical type the cells belong to
     EGeometrieElement GetGeom() const { return myGeom;}
 
     EConnectivite myConnMode; //!< Defines connectivity mode
-    //! Let known in what connectivity the cells are writen
+    //! Find out in what connectivity the cells are written
     EConnectivite GetConnMode() const { return myConnMode;}
 
     virtual TInt GetConnDim() const = 0; //!< Gives step in the connectivity sequence
@@ -311,17 +311,17 @@ namespace MED
   {
     //! Defines the MED Entity where the polygons belongs to
     EEntiteMaillage myEntity; // MED_FACE|MED_MAILLE
-    //! Let known what MED ENTITY the MED Polygons belong to
+    //! Find out what MED ENTITY the MED Polygons belong to
     EEntiteMaillage GetEntity() const { return myEntity;}
 
     //! Defines the MED Geometric type of the instance
     EGeometrieElement myGeom; // ePOLYGONE
-    //! Let known what MED geometrical type the MED Polygons belong to
+    //! Find out what MED geometrical type the MED Polygons belong to
     EGeometrieElement GetGeom() const { return ePOLYGONE;}
 
     //! Defines connectivity mode
     EConnectivite myConnMode; // eNOD|eDESC(eDESC not used)
-    //! Let known in what connectivity the cells are writen
+    //! Find out in what connectivity the cells are written
     EConnectivite GetConnMode() const { return myConnMode;}
 
     PElemNum myConn; //!< Table de connectivities
@@ -359,17 +359,17 @@ namespace MED
   {
     //! Defines the MED Entity where the polyedres belongs to
     EEntiteMaillage myEntity; // MED_FACE|MED_MAILLE
-    //! Let known what MED ENTITY the MED Polyedres belong to
+    //! Find out what MED ENTITY the MED Polyedres belong to
     EEntiteMaillage GetEntity() const { return myEntity;}
 
     //! Defines the MED Geometric type of the instance
     EGeometrieElement myGeom; // ePOLYEDRE
-    //! Let known what MED geometrical type the MED Polyedres belong to
+    //! Find out what MED geometrical type the MED Polyedres belong to
     EGeometrieElement GetGeom() const { return ePOLYEDRE;}
 
     //! Defines connectivity mode
     EConnectivite myConnMode; // eNOD|eDESC(eDESC not used)
-    //! Let known in what connectivity the cells are writen
+    //! Find out in what connectivity the cells are written
     EConnectivite GetConnMode() const { return myConnMode;}
 
     PElemNum myConn; //!< Table de connectivities
@@ -392,24 +392,24 @@ namespace MED
   struct MEDWRAPPER_EXPORT TFieldInfo: 
     virtual TNameInfo
   {
-    PMeshInfo myMeshInfo; //!< A reference to correspondig MED Mesh
+    PMeshInfo myMeshInfo; //!< A reference to corresponding MED Mesh
     //! Get a reference to corresponding MED Mesh
     const PMeshInfo& GetMeshInfo() const { return myMeshInfo;}
 
-    ETypeChamp myType; //!< Defines type of the MED Field
-    //! Let known what type of the MED FIELD is used
+    ETypeChamp myType; //!< Defines type of MED Field
+    //! Find out what type of MED FIELD is used
     ETypeChamp GetType() const { return myType;}
 
     TInt myNbComp; //!< Defines number of components stored in the field
-    //! Get number of components for the MED FIELD
+    //! Get number of components for MED FIELD
     TInt GetNbComp() const { return myNbComp;}
 
     EBooleen myIsLocal; //!< Defines if the MED Field is local
-    //! Let known is the MED FIELD is local or not
+    //! Find out if MED FIELD is local or not
     EBooleen GetIsLocal() const { return myIsLocal;}
 
-    TInt myNbRef; //!< Defines number of refereces of the field
-    //! Let known number of references for the MED FIELD
+    TInt myNbRef; //!< Defines number of references of the field
+    //! Find out number of references for the MED FIELD
     TInt GetNbRef() const { return myNbRef;}
 
     TString myCompNames; //!< Contains names for each of MED Field components
@@ -458,7 +458,7 @@ namespace MED
 
     //! Defines, which geometrical type the MED Gauss entity belongs to
     EGeometrieElement myGeom; 
-    //! Let known what MED geometrical type the MED GAUSS entity belong to
+    //! Find out what MED geometrical type the MED GAUSS entity belong to
     EGeometrieElement GetGeom() const { return myGeom;}
 
     //! Contains coordinates for the refereced nodes
@@ -505,7 +505,7 @@ namespace MED
 
     //! Defines the MED Entity where the MED TimeStamp belongs to
     EEntiteMaillage myEntity;
-    //! Let known to what MED Entity the MED TimeStamp belong to
+    //! Find out to what MED Entity the MED TimeStamp belong to
     EEntiteMaillage GetEntity() const { return myEntity;}
 
     //! Keeps map of number of cells per geometric type where the MED TimeStamp belongs to
@@ -547,7 +547,7 @@ namespace MED
     typedef boost::tuple<TKey,TInt> TInfo;
 
     EModeProfil myMode; //!< Keeps mode for the MED Profile
-    //! Let known what mode of MED Profile is used
+    //! Find out what mode of MED Profile is used
     EModeProfil GetMode() const { return myMode;}
     //! Set mode for the MED Profile
     void SetMode(EModeProfil theMode) { myMode = theMode;}
@@ -558,10 +558,10 @@ namespace MED
     //! Set number of mesh elelemts by its order number
     void SetElemNum(TInt theId, TInt theVal);
 
-    //! Let known is the MED Profile defined
+    //! Find out if the MED Profile defined
     bool IsPresent() const { return GetName() != "";}
 
-    //! Let known size of the MED Profile
+    //! Find out size of the MED Profile
     TInt GetSize() const { return (TInt)myElemNum->size();}
   };
 
index 1ccf6f4c3af25ec499f23bab16de6d9b05187802..8a7075524156de517b11be3ff984053c8b786985 100644 (file)
@@ -38,7 +38,7 @@ namespace MED
   struct MEDWRAPPER_EXPORT TWrapper
   {
     typedef boost::mutex TMutex;
-    //! This is a syncronization primitive which allow to support thread safety for the MED access
+    //! This is a synchronization primitive which allow to support thread safety for the MED access
     TMutex myMutex;
 
     virtual
index 24999862f7f658b73bd8ce9ce1ed1bd4a263712c..44940d59e5b6aab3f30aee0c58dfba01aafff2a4 100644 (file)
@@ -20,7 +20,6 @@
 # --- options ---
 # additional include directories
 INCLUDE_DIRECTORIES(
-  ${QT_INCLUDES}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
   ${MEDFILE_INCLUDE_DIRS}
index 7159bc19763bbb3b6ae0456b6bcacf2f69dc1869..70b24aa43e63a285bcb2136c6be8c069c2d43b16 100644 (file)
@@ -126,6 +126,7 @@ SMESH_ActorDef::SMESH_ActorDef()
 
   myIsPointsVisible = false;
   myIsEntityModeCache = false;
+  myRepresentationCache = 0;
 
   myHighlightActor = SMESH_SVTKActor::New();
   myHighlightActor->Delete(); // vtkSmartPointer!
@@ -1474,8 +1475,8 @@ void SMESH_ActorDef::SetVisibility(int theMode, bool theIsUpdateRepersentation)
 
   myScalarBarActor->VisibilityOff();
 
-  if(GetVisibility()){
-    if(theIsUpdateRepersentation)
+  if ( GetVisibility() ) {
+    if ( theIsUpdateRepersentation )
       SetRepresentation(GetRepresentation());
 
     if(myControlMode != eNone) {
@@ -1563,30 +1564,30 @@ void SMESH_ActorDef::SetVisibility(int theMode, bool theIsUpdateRepersentation)
 
 void SMESH_ActorDef::SetEntityMode(unsigned int theMode)
 {
-  myEntityState = eAllEntity;
+  unsigned int anObjectEntities = eAllEntity; // entities present in my object
 
   if(!myVisualObj->GetNbEntities(SMDSAbs_0DElement)) {
-    myEntityState &= ~e0DElements;
+    anObjectEntities &= ~e0DElements;
     theMode &= ~e0DElements;
   }
 
   if(!myVisualObj->GetNbEntities(SMDSAbs_Ball)) {
-    myEntityState &= ~eBallElem;
+    anObjectEntities &= ~eBallElem;
     theMode &= ~eBallElem;
   }
 
   if(!myVisualObj->GetNbEntities(SMDSAbs_Edge)) {
-    myEntityState &= ~eEdges;
+    anObjectEntities &= ~eEdges;
     theMode &= ~eEdges;
   }
 
   if(!myVisualObj->GetNbEntities(SMDSAbs_Face)) {
-    myEntityState &= ~eFaces;
+    anObjectEntities &= ~eFaces;
     theMode &= ~eFaces;
   }
 
   if(!myVisualObj->GetNbEntities(SMDSAbs_Volume)) {
-    myEntityState &= ~eVolumes;
+    anObjectEntities &= ~eVolumes;
     theMode &= ~eVolumes;
   }
 
@@ -1607,102 +1608,109 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode)
       theMode |= eVolumes;
   }
 
-  myBaseActor->myGeomFilter->SetInside(myEntityMode != myEntityState);
+  myBaseActor->myGeomFilter->SetInside(myEntityMode != anObjectEntities);
 
-  myEntityMode = theMode;
-
-  VTKViewer_ExtractUnstructuredGrid* aFilter = myBaseActor->GetExtractUnstructuredGrid();
-  aFilter->ClearRegisteredCellsWithType();
-  VTKViewer_ExtractUnstructuredGrid* aHightFilter = myHighlitableActor->GetExtractUnstructuredGrid();
-  aHightFilter->ClearRegisteredCellsWithType();
-
-  bool isPassAll =
-    (( myEntityMode & e0DElements || myVisualObj->GetNbEntities(SMDSAbs_0DElement) == 0 ) &&
-     ( myEntityMode & eBallElem   || myVisualObj->GetNbEntities(SMDSAbs_Ball)      == 0 ) &&
-     ( myEntityMode & eEdges      || myVisualObj->GetNbEntities(SMDSAbs_Edge)      == 0 ) &&
-     ( myEntityMode & eFaces      || myVisualObj->GetNbEntities(SMDSAbs_Face)      == 0 ) &&
-     ( myEntityMode & eVolumes    || myVisualObj->GetNbEntities(SMDSAbs_Volume)    == 0 ));
-  if ( isPassAll && myEntityMode )
+  if ( anObjectEntities == 0 && myRepresentation != ePoint ) // no elements, show nodes
   {
-    aFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::ePassAll);
-    aHightFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::ePassAll);
+    myRepresentationCache = GetRepresentation();
+    SetRepresentation( ePoint );
   }
-  else
+
+  if ( myEntityMode != theMode )
   {
-    aFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
-    aHightFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
+    myEntityMode = theMode; // entities to show
 
-    if (myEntityMode & e0DElements) {
-      aFilter->RegisterCellsWithType(VTK_VERTEX);
-      aHightFilter->RegisterCellsWithType(VTK_VERTEX);
-    }
+    // Set cell types to extract
+
+    VTKViewer_ExtractUnstructuredGrid*    aFilter = myBaseActor->GetExtractUnstructuredGrid();
+    VTKViewer_ExtractUnstructuredGrid* aHltFilter = myHighlitableActor->GetExtractUnstructuredGrid();
+    aFilter->ClearRegisteredCellsWithType();
+    aHltFilter->ClearRegisteredCellsWithType();
 
-    if (myEntityMode & eBallElem) {
-      aFilter->RegisterCellsWithType(VTK_POLY_VERTEX);
+    bool isPassAll = ( myEntityMode == anObjectEntities && myEntityMode );
+    if ( isPassAll )
+    {
+      aFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::ePassAll);
+      aHltFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::ePassAll);
     }
+    else
+    {
+      aFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
+      aHltFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
 
-    if (myEntityMode & eEdges) {
-      aFilter->RegisterCellsWithType(VTK_LINE);
-      aFilter->RegisterCellsWithType(VTK_QUADRATIC_EDGE);
+      if (myEntityMode & e0DElements) {
+        aFilter->RegisterCellsWithType(VTK_VERTEX);
+        aHltFilter->RegisterCellsWithType(VTK_VERTEX);
+      }
 
-      aHightFilter->RegisterCellsWithType(VTK_LINE);
-      aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_EDGE);
-    }
+      if (myEntityMode & eBallElem) {
+        aFilter->RegisterCellsWithType(VTK_POLY_VERTEX);
+      }
 
-    if (myEntityMode & eFaces) {
-      aFilter->RegisterCellsWithType(VTK_TRIANGLE);
-      aFilter->RegisterCellsWithType(VTK_QUAD);
-      aFilter->RegisterCellsWithType(VTK_POLYGON);
-      aFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
-      aFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
-      aFilter->RegisterCellsWithType(VTK_QUADRATIC_POLYGON);
-      aFilter->RegisterCellsWithType(VTK_BIQUADRATIC_QUAD);
-      aFilter->RegisterCellsWithType(VTK_BIQUADRATIC_TRIANGLE);
-
-      aHightFilter->RegisterCellsWithType(VTK_TRIANGLE);
-      aHightFilter->RegisterCellsWithType(VTK_QUAD);
-      aHightFilter->RegisterCellsWithType(VTK_POLYGON);
-      aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
-      aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
-      aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_POLYGON);
-      aHightFilter->RegisterCellsWithType(VTK_BIQUADRATIC_QUAD);
-      aHightFilter->RegisterCellsWithType(VTK_BIQUADRATIC_TRIANGLE);
-    }
+      if (myEntityMode & eEdges) {
+        aFilter->RegisterCellsWithType(VTK_LINE);
+        aFilter->RegisterCellsWithType(VTK_QUADRATIC_EDGE);
 
-    if (myEntityMode & eVolumes) {
-      aFilter->RegisterCellsWithType(VTK_TETRA);
-      aFilter->RegisterCellsWithType(VTK_VOXEL);
-      aFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
-      aFilter->RegisterCellsWithType(VTK_WEDGE);
-      aFilter->RegisterCellsWithType(VTK_PYRAMID);
-      aFilter->RegisterCellsWithType(VTK_HEXAGONAL_PRISM);
-      aFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
-      aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
-      aFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON);
-      aFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID);
-      aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
-      aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
-      aFilter->RegisterCellsWithType(VTK_POLYHEDRON);
-
-      aHightFilter->RegisterCellsWithType(VTK_TETRA);
-      aHightFilter->RegisterCellsWithType(VTK_VOXEL);
-      aHightFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
-      aHightFilter->RegisterCellsWithType(VTK_WEDGE);
-      aHightFilter->RegisterCellsWithType(VTK_PYRAMID);
-      aHightFilter->RegisterCellsWithType(VTK_HEXAGONAL_PRISM);
-      aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
-      aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
-      aHightFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON);
-      aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
-      aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID);
-      aHightFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
-      aHightFilter->RegisterCellsWithType(VTK_POLYHEDRON);
+        aHltFilter->RegisterCellsWithType(VTK_LINE);
+        aHltFilter->RegisterCellsWithType(VTK_QUADRATIC_EDGE);
+      }
+
+      if (myEntityMode & eFaces) {
+        aFilter->RegisterCellsWithType(VTK_TRIANGLE);
+        aFilter->RegisterCellsWithType(VTK_QUAD);
+        aFilter->RegisterCellsWithType(VTK_POLYGON);
+        aFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
+        aFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
+        aFilter->RegisterCellsWithType(VTK_QUADRATIC_POLYGON);
+        aFilter->RegisterCellsWithType(VTK_BIQUADRATIC_QUAD);
+        aFilter->RegisterCellsWithType(VTK_BIQUADRATIC_TRIANGLE);
+
+        aHltFilter->RegisterCellsWithType(VTK_TRIANGLE);
+        aHltFilter->RegisterCellsWithType(VTK_QUAD);
+        aHltFilter->RegisterCellsWithType(VTK_POLYGON);
+        aHltFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
+        aHltFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
+        aHltFilter->RegisterCellsWithType(VTK_QUADRATIC_POLYGON);
+        aHltFilter->RegisterCellsWithType(VTK_BIQUADRATIC_QUAD);
+        aHltFilter->RegisterCellsWithType(VTK_BIQUADRATIC_TRIANGLE);
+      }
+
+      if (myEntityMode & eVolumes) {
+        aFilter->RegisterCellsWithType(VTK_TETRA);
+        aFilter->RegisterCellsWithType(VTK_VOXEL);
+        aFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
+        aFilter->RegisterCellsWithType(VTK_WEDGE);
+        aFilter->RegisterCellsWithType(VTK_PYRAMID);
+        aFilter->RegisterCellsWithType(VTK_HEXAGONAL_PRISM);
+        aFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
+        aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
+        aFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON);
+        aFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID);
+        aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
+        aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
+        aFilter->RegisterCellsWithType(VTK_POLYHEDRON);
+
+        aHltFilter->RegisterCellsWithType(VTK_TETRA);
+        aHltFilter->RegisterCellsWithType(VTK_VOXEL);
+        aHltFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
+        aHltFilter->RegisterCellsWithType(VTK_WEDGE);
+        aHltFilter->RegisterCellsWithType(VTK_PYRAMID);
+        aHltFilter->RegisterCellsWithType(VTK_HEXAGONAL_PRISM);
+        aHltFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
+        aHltFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
+        aHltFilter->RegisterCellsWithType(VTK_TRIQUADRATIC_HEXAHEDRON);
+        aHltFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE);
+        aHltFilter->RegisterCellsWithType(VTK_QUADRATIC_PYRAMID);
+        aHltFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
+        aHltFilter->RegisterCellsWithType(VTK_POLYHEDRON);
+      }
     }
+    if ( GetVisibility() )
+      aFilter->Update();
+    if (MYDEBUG) MESSAGE(aFilter->GetOutput()->GetNumberOfCells());
   }
-  if ( GetVisibility() )
-    aFilter->Update();
-  if (MYDEBUG) MESSAGE(aFilter->GetOutput()->GetNumberOfCells());
-  SetVisibility(GetVisibility(),false);
+
+  SetVisibility( GetVisibility(), myRepresentationCache != 0 );
 }
 
 void SMESH_ActorDef::SetRepresentation (int theMode)
@@ -1713,6 +1721,15 @@ void SMESH_ActorDef::SetRepresentation (int theMode)
   int aNb0Ds     = myVisualObj->GetNbEntities(SMDSAbs_0DElement);
   int aNbBalls   = myVisualObj->GetNbEntities(SMDSAbs_Ball);
 
+  if ( myRepresentationCache && aNbEdges + aNbFaces + aNbVolumes + aNb0Ds + aNbBalls )
+  {
+    theMode = myRepresentationCache;
+    if ( theMode == eSurface && aNbFaces + aNbVolumes == 0 )
+      theMode = eEdge;
+    else
+      myRepresentationCache = 0;
+  }
+
   if (theMode < 0) {
     myRepresentation = eSurface;
     if (!aNbFaces && !aNbVolumes && !aNbBalls && aNbEdges) {
@@ -1793,7 +1810,7 @@ void SMESH_ActorDef::SetRepresentation (int theMode)
     case eLength:
     case eMultiConnection:
       aProp = aBackProp = my1DProp;
-      if(myRepresentation != ePoint)
+      if ( myRepresentation != ePoint )
         aReperesent = SMESH_DeviceActor::eInsideframe;
       break;
     default:;
@@ -1987,9 +2004,9 @@ void SMESH_ActorDef::Update()
     SetFacesOriented(myIsFacesOriented);
   }
 
-  if(myVisualObj->GetEntitiesFlag()) {
-    myEntityMode |= myVisualObj->GetEntitiesState();
-  }
+  // if(myVisualObj->GetEntitiesFlag()) { IPAL53915
+  //   myEntityMode |= myVisualObj->GetEntitiesState();
+  // }
 
   SetEntityMode(GetEntityMode());
   SetVisibility(GetVisibility());
index 746b5b76f504599d20e2745bdffddffbc3c61439..3b9d9c68f97a4de811e5531ed78b268ce4ddf815 100644 (file)
@@ -296,8 +296,8 @@ class SMESH_ActorDef : public SMESH_Actor
   SMESH_DeviceActor* my0DExtActor;
 
   unsigned int myEntityMode;
-  unsigned int myEntityState;
   unsigned int myEntityModeCache;
+  int  myRepresentationCache;
   bool myIsEntityModeCache;
   bool myIsPointsVisible;
 
index 3b9cd0b8ce28e9ad97222dccbb9caa0b1c4de46f..a1a69ff3fc4e4df79c066ceeaedf55cb468b1c94 100644 (file)
@@ -32,6 +32,8 @@
 #include "SMDS_Mesh.hxx"
 #include "SMDS_MeshCell.hxx"
 #include "SMDS_PolyhedralVolumeOfNodes.hxx"
+#include "SMESHDS_Mesh.hxx"
+#include "SMESHDS_Script.hxx"
 #include "SMESH_Actor.h"
 #include "SMESH_ControlsDef.hxx"
 
@@ -54,7 +56,7 @@
 #include <stdexcept>
 #include <set>
 
-#include "utilities.h"
+#include <utilities.h>
 
 using namespace std;
 
@@ -283,6 +285,8 @@ void SMESH_VisualObjDef::buildPrs(bool buildGrid)
       NulData(); // detach from the SMDS grid to allow immediate memory de-allocation in compactMesh()
       if ( MYDEBUG ) MESSAGE("*** buildPrs ==> compactMesh!");
       GetMesh()->compactMesh();
+      if ( SMESHDS_Mesh* m = dynamic_cast<SMESHDS_Mesh*>( GetMesh() )) // IPAL53915
+        m->GetScript()->SetModified(false); // drop IsModified set in compactMesh()
     }
     vtkUnstructuredGrid *theGrid = GetMesh()->getGrid();
     updateEntitiesFlags();
@@ -459,7 +463,7 @@ void SMESH_VisualObjDef::buildElemPrs()
 
         SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
         {
-          // Convertions connectivities from SMDS to VTK
+          // Convert connectivities from SMDS to VTK
 
           if (aType == SMDSAbs_Volume && anElem->IsPoly() && aNbNodes > 3) { // POLYEDRE
             anIdList->Reset();
@@ -573,6 +577,8 @@ vtkUnstructuredGrid* SMESH_VisualObjDef::GetUnstructuredGrid()
   {
     NulData(); // detach from the SMDS grid to allow immediate memory de-allocation in compactMesh()
     GetMesh()->compactMesh();
+    if ( SMESHDS_Mesh* m = dynamic_cast<SMESHDS_Mesh*>( GetMesh() )) // IPAL53915
+      m->GetScript()->SetModified(false); // drop IsModified set in compactMesh()
     updateEntitiesFlags();
     vtkUnstructuredGrid *theGrid = GetMesh()->getGrid();
     myGrid->ShallowCopy(theGrid);
index 1f5b00b63a5ee13e16f5c72587cd3addce35024e..a45696d7e9a4e6059276eb03d76a41930f92f374 100644 (file)
@@ -578,15 +578,18 @@ int SMESH_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
       
       // rnv begin
       // Customization of the vtkScalarBarActor to show distribution histogram.
-      if(myDistributionColoringType == SMESH_MULTICOLOR_TYPE && GetDistributionVisibility() && distrVisibility)
-        {
-          rgb = distColors->GetPointer(3*dcCount); //write into array directly
-          rgb[0] = rgba[0];
-          rgb[1] = rgba[1];
-          rgb[2] = rgba[2];
-          dcCount++;
-        }
+      if ( myDistributionColoringType == SMESH_MULTICOLOR_TYPE &&
+           GetDistributionVisibility() &&
+           distrVisibility &&
+           myNbValues[i] > 0 )
+      {
+        rgb = distColors->GetPointer(3*dcCount); //write into array directly
+        rgb[0] = rgba[0];
+        rgb[1] = rgba[1];
+        rgb[2] = rgba[2];
+        dcCount++;
       }
+    }
 
     // Now position everything properly
     //
index c254b50ba6234008ba8ab3cd04f71a5728380c57..3086a8f7b887cd3966e3702cfc2168dce071da57 100644 (file)
@@ -25,7 +25,7 @@
 // This is not done inside a function of SALOME because allocated memory is not always
 // returned to the system. (PAL16631)
 //
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
 #include <sys/sysinfo.h>
 #endif
 
@@ -36,7 +36,7 @@
 int main (int argc, char ** argv)
 {
   // To better understand what is going on here, consult bug [SALOME platform 0019911]
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
   struct sysinfo si;
   int err = sysinfo( &si );
   if ( err )
index d70ff4bcdf59aebdf0e0fbcaf26a83f0033fae89..5d8294700d96607f3d3cd38eb93ad8405dd1e60a 100644 (file)
@@ -56,7 +56,7 @@
 #include <iterator>
 using namespace std;
 
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
 #include <sys/sysinfo.h>
 #endif
 
@@ -77,7 +77,7 @@ int SMDS_Mesh::chunkSize = 1024;
 
 int SMDS_Mesh::CheckMemory(const bool doNotRaise) throw (std::bad_alloc)
 {
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
   struct sysinfo si;
   int err = sysinfo( &si );
   if ( err )
@@ -383,7 +383,7 @@ SMDS_MeshEdge* SMDS_Mesh::AddEdgeWithID(const SMDS_MeshNode * n1,
   if ( !n1 || !n2 ) return 0;
   SMDS_MeshEdge * edge = 0;
 
-  // --- retreive nodes ID
+  // --- retrieve nodes ID
   vector<vtkIdType> nodeIds;
   nodeIds.clear();
   nodeIds.push_back(n1->getVtkId());
@@ -2570,6 +2570,13 @@ int SMDS_Mesh::NbNodes() const
   return myInfo.NbNodes();
 }
 
+///////////////////////////////////////////////////////////////////////////////
+/// Return the number of elements
+///////////////////////////////////////////////////////////////////////////////
+int SMDS_Mesh::NbElements() const
+{
+  return myInfo.NbElements();
+}
 ///////////////////////////////////////////////////////////////////////////////
 /// Return the number of 0D elements
 ///////////////////////////////////////////////////////////////////////////////
@@ -2812,7 +2819,7 @@ namespace {
     IdSortedIterator(const SMDS_MeshElementIDFactory& fact,
                      const SMDSAbs_ElementType        type, // SMDSAbs_All NOT allowed!!! 
                      const int                        totalNb)
-      :myIDFact( fact ),
+      :myIDFact( const_cast<SMDS_MeshElementIDFactory&>(fact) ),
        myID(1), myMaxID( myIDFact.GetMaxID() ),myNbFound(0), myTotalNb( totalNb ),
        myType( type ),
        myElem(0)
@@ -3226,7 +3233,7 @@ void SMDS_Mesh::RemoveElement(const SMDS_MeshElement *        elem,
           if (const SMDS_VtkEdge* vtkElem = dynamic_cast<const SMDS_VtkEdge*>(*it))
             myEdgePool->destroy((SMDS_VtkEdge*) vtkElem);
           else {
-            ((SMDS_MeshElement*) *it)->init( -1, -1, -1 ); // avoid reuse
+            ((SMDS_MeshElement*) *it)->init( 0, -1, -1 ); // avoid reuse
             delete (*it);
           }
           break;
@@ -3241,7 +3248,7 @@ void SMDS_Mesh::RemoveElement(const SMDS_MeshElement *        elem,
           if (const SMDS_VtkFace* vtkElem = dynamic_cast<const SMDS_VtkFace*>(*it))
             myFacePool->destroy((SMDS_VtkFace*) vtkElem);
           else {
-            ((SMDS_MeshElement*) *it)->init( -1, -1, -1 ); // avoid reuse
+            ((SMDS_MeshElement*) *it)->init( 0, -1, -1 ); // avoid reuse
             delete (*it);
           }
           break;
@@ -3256,7 +3263,7 @@ void SMDS_Mesh::RemoveElement(const SMDS_MeshElement *        elem,
           if (const SMDS_VtkVolume* vtkElem = dynamic_cast<const SMDS_VtkVolume*>(*it))
             myVolumePool->destroy((SMDS_VtkVolume*) vtkElem);
           else {
-            ((SMDS_MeshElement*) *it)->init( -1, -1, -1 ); // avoid reuse
+            ((SMDS_MeshElement*) *it)->init( 0, -1, -1 ); // avoid reuse
             delete (*it);
           }
           break;
@@ -3271,7 +3278,7 @@ void SMDS_Mesh::RemoveElement(const SMDS_MeshElement *        elem,
           if (const SMDS_BallElement* vtkElem = dynamic_cast<const SMDS_BallElement*>(*it))
             myBallPool->destroy(const_cast<SMDS_BallElement*>( vtkElem ));
           else {
-            ((SMDS_MeshElement*) *it)->init( -1, -1, -1 ); // avoid reuse
+            ((SMDS_MeshElement*) *it)->init( 0, -1, -1 ); // avoid reuse
             delete (*it);
           }
           break;
@@ -3322,22 +3329,24 @@ void SMDS_Mesh::RemoveElement(const SMDS_MeshElement *        elem,
 void SMDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elem)
 {
   int elemId = elem->GetID();
-  int vtkId = elem->getVtkId();
+  int  vtkId = elem->getVtkId();
   SMDSAbs_ElementType aType = elem->GetType();
-  SMDS_MeshElement* todest = (SMDS_MeshElement*)(elem);
-  if (aType == SMDSAbs_Node) {
+  SMDS_MeshElement*  todest = (SMDS_MeshElement*)(elem);
+  if ( aType == SMDSAbs_Node )
+  {
     // only free node can be removed by this method
     const SMDS_MeshNode* n = static_cast<SMDS_MeshNode*>(todest);
-    SMDS_ElemIteratorPtr itFe = n->GetInverseElementIterator();
-    if (!itFe->more()) { // free node
+    if ( n->NbInverseElements() == 0 ) { // free node
       myNodes[elemId] = 0;
       myInfo.myNbNodes--;
       ((SMDS_MeshNode*) n)->SetPosition(SMDS_SpacePosition::originSpacePosition());
-      ((SMDS_MeshNode*) n)->SMDS_MeshElement::init( -1, -1, -1 ); // avoid reuse
+      ((SMDS_MeshNode*) n)->SMDS_MeshElement::init( 0, -1, -1 ); // avoid reuse
       myNodePool->destroy(static_cast<SMDS_MeshNode*>(todest));
       myNodeIDFactory->ReleaseID(elemId, vtkId);
     }
-  } else {
+  }
+  else
+  {
     if (hasConstructionEdges() || hasConstructionFaces())
       // this methods is only for meshes without descendants
       return;
@@ -3387,7 +3396,7 @@ void SMDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elem)
     // --- to do: keep vtkid in a list of reusable cells
 
     if ( elem )
-      ((SMDS_MeshElement*) elem)->init( -1, -1, -1 ); // avoid reuse
+      ((SMDS_MeshElement*) elem)->init( 0, -1, -1 ); // avoid reuse
   }
 }
 
index 459befaa9d8eaf087bb99552db9e3a603f031d6e..b1af99a1d1e6c2d0e8f5b8347130ccd2f4328f93 100644 (file)
@@ -69,7 +69,7 @@ public:
 
   SMDS_Mesh();
   
-  //! to retreive this SMDS_Mesh instance from its elements (index stored in SMDS_Elements)
+  //! to retrieve this SMDS_Mesh instance from its elements (index stored in SMDS_Elements)
   static std::vector<SMDS_Mesh*> _meshList;
 
   //! actual nodes coordinates, cells definition and reverse connectivity are stored in a vtkUnstructuredGrid
@@ -705,6 +705,7 @@ public:
   const SMDS_MeshInfo& GetMeshInfo() const { return myInfo; }
 
   virtual int NbNodes() const;
+  virtual int NbElements() const;
   virtual int Nb0DElements() const;
   virtual int NbBalls() const;
   virtual int NbEdges() const;
index d114c02da8f4e9ce6044210b9e6a30ab3376558f..620e4d82df2bc5e80ff00d21f3b8250bfc0475c5 100644 (file)
@@ -57,7 +57,7 @@ class SMDS_Mesh;
 // ============================================================
 
 
-class SMDS_EXPORT SMDS_MeshElement:public SMDS_MeshObject
+class SMDS_EXPORT SMDS_MeshElement : public SMDS_MeshObject
 {
 public:
 
index a029b101ec7324ae2e8b8f6952cb6532d0318565..43a51d5cf972b26f15615819075c4b5bf05f95b3 100644 (file)
@@ -80,7 +80,6 @@ int SMDS_MeshElementIDFactory::SetInVtkGrid(SMDS_MeshElement * elem)
 
 bool SMDS_MeshElementIDFactory::BindID(int ID, SMDS_MeshElement * elem)
 {
-  MESSAGE("SMDS_MeshElementIDFactory::BindID " << ID);
   SetInVtkGrid(elem);
   return myMesh->registerElement(ID, elem);
 }
index 1f49f82dc6f45a18c0c3434f43b3b81286e1cc15..53054f8e4cb93c7ddbfc503f033b9b640e6d58c0 100644 (file)
@@ -67,7 +67,8 @@ void SMDS_MeshNode::init(int id, int meshId, int shapeId, double x, double y, do
   SMDS_UnstructuredGrid * grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
   vtkPoints *points = grid->GetPoints();
   points->InsertPoint(myVtkID, x, y, z);
-  grid->GetLinks()->ResizeForPoint( myVtkID );
+  if ( grid->HasLinks() )
+    grid->GetLinks()->ResizeForPoint( myVtkID );
 }
 
 SMDS_MeshNode::~SMDS_MeshNode()
@@ -143,22 +144,29 @@ public:
   SMDS_MeshNode_MyInvIterator(SMDS_Mesh *mesh, vtkIdType* cells, int ncells, SMDSAbs_ElementType type) :
     myMesh(mesh), myCells(cells), myNcells(ncells), myType(type), iter(0)
   {
-    cellList.reserve( ncells );
-    if (type == SMDSAbs_All)
-      cellList.assign( cells, cells + ncells );
-    else
-      for (int i = 0; i < ncells; i++)
+    if ( ncells )
+    {
+      cellList.reserve( ncells );
+      if (type == SMDSAbs_All)
+      {
+        cellList.assign( cells, cells + ncells );
+      }
+      else
       {
-        int vtkId = cells[i];
-        int smdsId = myMesh->fromVtkToSmds(vtkId);
-        const SMDS_MeshElement* elem = myMesh->FindElement(smdsId);
-        if (elem->GetType() == type)
+        for (int i = 0; i < ncells; i++)
         {
-          cellList.push_back(vtkId);
+          int vtkId = cells[i];
+          int smdsId = myMesh->fromVtkToSmds(vtkId);
+          const SMDS_MeshElement* elem = myMesh->FindElement(smdsId);
+          if (elem->GetType() == type)
+          {
+            cellList.push_back(vtkId);
+          }
         }
       }
-    myCells = cellList.empty() ? 0 : &cellList[0];
-    myNcells = cellList.size();
+      myCells = cellList.empty() ? 0 : &cellList[0];
+      myNcells = cellList.size();
+    }
   }
 
   bool more()
@@ -183,64 +191,23 @@ public:
 
 SMDS_ElemIteratorPtr SMDS_MeshNode::GetInverseElementIterator(SMDSAbs_ElementType type) const
 {
-  vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetLinks()->GetLink(myVtkID);
-  return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type));
-}
-
-// Same as GetInverseElementIterator but the created iterator only returns
-// wanted type elements.
-class SMDS_MeshNode_MyIterator:public SMDS_ElemIterator
-{
-private:
-  SMDS_Mesh*                myMesh;
-  vtkIdType*                myCells;
-  int                       myNcells;
-  SMDSAbs_ElementType       myType;
-  int                       iter;
-  vector<SMDS_MeshElement*> myFiltCells;
-
-public:
-  SMDS_MeshNode_MyIterator(SMDS_Mesh *mesh,
-                           vtkIdType* cells,
-                           int ncells,
-                           SMDSAbs_ElementType type):
-    myMesh(mesh), myCells(cells), myNcells(ncells), myType(type), iter(0)
+  if ( SMDS_Mesh::_meshList[myMeshId]->NbElements() > 0 ) // avoid building links
   {
-    for (; iter<ncells; iter++)
-    {
-      int vtkId = myCells[iter];
-      int smdsId = myMesh->fromVtkToSmds(vtkId);
-      const SMDS_MeshElement* elem = myMesh->FindElement(smdsId);
-      if (elem->GetType() == type)
-        myFiltCells.push_back((SMDS_MeshElement*)elem);
-    }
-    myNcells = myFiltCells.size();
-    iter = 0;
-  }
-
-  bool more()
-  {
-    return (iter< myNcells);
+    vtkCellLinks::Link& l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetLinks()->GetLink(myVtkID);
+    return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type));
   }
-
-  const SMDS_MeshElement* next()
+  else
   {
-    const SMDS_MeshElement* elem = myFiltCells[iter];
-    iter++;
-    return elem;
+    return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(SMDS_Mesh::_meshList[myMeshId], 0, 0, type));
   }
-};
+}
 
-SMDS_ElemIteratorPtr SMDS_MeshNode::
-elementsIterator(SMDSAbs_ElementType type) const
+SMDS_ElemIteratorPtr SMDS_MeshNode::elementsIterator(SMDSAbs_ElementType type) const
 {
-  if(type==SMDSAbs_Node)
-    return SMDS_MeshElement::elementsIterator(SMDSAbs_Node);
+  if ( type == SMDSAbs_Node )
+    return SMDS_MeshElement::elementsIterator( SMDSAbs_Node );
   else
-  {
-    vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetLinks()->GetLink(myVtkID);
-    return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type));
-  }
+    return GetInverseElementIterator( type );
 }
 
 int SMDS_MeshNode::NbNodes() const
@@ -275,12 +242,14 @@ double SMDS_MeshNode::Z() const
 /*!
  * \brief thread safe getting coords
  */
+//================================================================================
+
 void SMDS_MeshNode::GetXYZ(double xyz[3]) const
 {
   return SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetPoint(myVtkID,xyz);
 }
 
-//* resize the vtkPoints structure every SMDS_Mesh::chunkSize points
+//================================================================================
 void SMDS_MeshNode::setXYZ(double x, double y, double z)
 {
   SMDS_Mesh *mesh = SMDS_Mesh::_meshList[myMeshId];
@@ -307,9 +276,12 @@ vtkIdType SMDS_MeshNode::GetVtkType() const
 void SMDS_MeshNode::AddInverseElement(const SMDS_MeshElement* ME)
 {
   SMDS_UnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-  vtkCellLinks *Links = grid->GetLinks();
-  Links->ResizeCellList(myVtkID, 1);
-  Links->AddCellReference(ME->getVtkId(), myVtkID);
+  if ( grid->HasLinks() )
+  {
+    vtkCellLinks *Links = grid->GetLinks();
+    Links->ResizeCellList(myVtkID, 1);
+    Links->AddCellReference(ME->getVtkId(), myVtkID);
+  }
 }
 
 //=======================================================================
@@ -321,12 +293,6 @@ void SMDS_MeshNode::ClearInverseElements()
   SMDS_Mesh::_meshList[myMeshId]->getGrid()->ResizeCellList(myVtkID, 0);
 }
 
-bool SMDS_MeshNode::emptyInverseElements()
-{
-  vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetLinks()->GetLink(myVtkID);
-  return (l.ncells == 0);
-}
-
 //================================================================================
 /*!
  * \brief Count inverse elements of given type
@@ -335,35 +301,20 @@ bool SMDS_MeshNode::emptyInverseElements()
 
 int SMDS_MeshNode::NbInverseElements(SMDSAbs_ElementType type) const
 {
-  vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetLinks()->GetLink(myVtkID);
-
-  if ( type == SMDSAbs_All )
-    return l.ncells;
-
   int nb = 0;
-  SMDS_Mesh *mesh = SMDS_Mesh::_meshList[myMeshId];
-  for (int i=0; i<l.ncells; i++)
+  if ( SMDS_Mesh::_meshList[myMeshId]->NbElements() > 0 ) // avoid building links
   {
-    const SMDS_MeshElement* elem = mesh->FindElement(mesh->fromVtkToSmds(l.cells[i]));
-    if (elem->GetType() == type)
-      nb++;
-  }
-  return nb;
-}
+    vtkCellLinks::Link& l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetLinks()->GetLink(myVtkID);
 
-///////////////////////////////////////////////////////////////////////////////
-/// To be used with STL set
-///////////////////////////////////////////////////////////////////////////////
-bool operator<(const SMDS_MeshNode& e1, const SMDS_MeshNode& e2)
-{
-  return e1.getVtkId()<e2.getVtkId();
-  /*if(e1.myX<e2.myX) return true;
-    else if(e1.myX==e2.myX)
+    if ( type == SMDSAbs_All )
+      return l.ncells;
+
+    SMDS_Mesh *mesh = SMDS_Mesh::_meshList[myMeshId];
+    for ( int i = 0; i < l.ncells; i++ )
     {
-    if(e1.myY<e2.myY) return true;
-    else if(e1.myY==e2.myY) return (e1.myZ<e2.myZ);
-    else return false;
+      const SMDS_MeshElement* elem = mesh->FindElement( mesh->fromVtkToSmds( l.cells[i] ));
+      nb += ( elem->GetType() == type );
     }
-    else return false;*/
+  }
+  return nb;
 }
-
index a61e673f302700627a0219f328e5027085bb5c09..43dc9c7f2ffa7d861dbc2b8132ca1ce809e268c3 100644 (file)
@@ -69,7 +69,6 @@ protected:
   void AddInverseElement(const SMDS_MeshElement * ME);
   void RemoveInverseElement(const SMDS_MeshElement * parent);
   void ClearInverseElements();
-  bool emptyInverseElements();
 
   SMDS_ElemIteratorPtr
   elementsIterator(SMDSAbs_ElementType type) const;
index 89c5c6c234d3d82f69bea4c424198ebf48d305b6..0bedf136b43274524f09e83f1f0b6f26c165db15 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef _SMDS_TypeOfPosition_HeaderFile
 #define _SMDS_TypeOfPosition_HeaderFile
 
-enum SMDS_TypeOfPosition // Value is equal to shape dimention
+enum SMDS_TypeOfPosition // Value is equal to shape dimension
 {
         SMDS_TOP_UNSPEC  = -1,
         SMDS_TOP_VERTEX  = 0,
index dca32c2580a6ff6ecb91d4724797cb3325c546ae..f7857c3eb486e19b45656d8bcc51ad081bbeca1f 100644 (file)
@@ -425,11 +425,13 @@ struct SMDS_VolumeTool::SaveFacet
   SaveFacet( SMDS_VolumeTool::Facet& facet ): myToRestore( facet )
   {
     mySaved = facet;
+    mySaved.myNodes.swap( facet.myNodes );
   }
   ~SaveFacet()
   {
     if ( myToRestore.myIndex != mySaved.myIndex )
       myToRestore = mySaved;
+    myToRestore.myNodes.swap( mySaved.myNodes );
   }
 };
 
@@ -469,8 +471,9 @@ SMDS_VolumeTool::~SMDS_VolumeTool()
 //purpose  : Set volume to iterate on
 //=======================================================================
 
-bool SMDS_VolumeTool::Set (const SMDS_MeshElement* theVolume,
-                           const bool              ignoreCentralNodes)
+bool SMDS_VolumeTool::Set (const SMDS_MeshElement*                  theVolume,
+                           const bool                               ignoreCentralNodes,
+                           const std::vector<const SMDS_MeshNode*>* otherNodes)
 {
   // reset fields
   myVolume = 0;
@@ -508,11 +511,22 @@ bool SMDS_VolumeTool::Set (const SMDS_MeshElement* theVolume,
   }
 
   // set nodes
-  int iNode = 0;
   myVolumeNodes.resize( myVolume->NbNodes() );
-  SMDS_ElemIteratorPtr nodeIt = myVolume->nodesIterator();
-  while ( nodeIt->more() )
-    myVolumeNodes[ iNode++ ] = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
+  if ( otherNodes )
+  {
+    if ( otherNodes->size() != myVolumeNodes.size() )
+      return ( myVolume = 0 );
+    for ( size_t i = 0; i < otherNodes->size(); ++i )
+      if ( ! ( myVolumeNodes[i] = (*otherNodes)[0] ))
+        return ( myVolume = 0 );
+  }
+  else
+  {
+    int iNode = 0;
+    SMDS_ElemIteratorPtr nodeIt = myVolume->nodesIterator();
+    while ( nodeIt->more() )
+      myVolumeNodes[ iNode++ ] = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
+  }
 
   // check validity
   if ( !setFace(0) )
index b42a0ae07db606dcee12098e17140c934685c2d1..4e018c0c73c1828080826921b797fe07ff170154 100644 (file)
@@ -58,15 +58,17 @@ class SMDS_EXPORT SMDS_VolumeTool
 
   SMDS_VolumeTool ();
   ~SMDS_VolumeTool ();
-  SMDS_VolumeTool (const SMDS_MeshElement* theVolume,
-                   const bool              ignoreCentralNodes=true);
+  SMDS_VolumeToolconst SMDS_MeshElement* theVolume,
+                   const bool              ignoreCentralNodes = true);
 
-  bool Set (const SMDS_MeshElement* theVolume,
-            const bool              ignoreCentralNodes=true);
+  bool Set( const SMDS_MeshElement*                  theVolume,
+            const bool                               ignoreCentralNodes = true,
+            const std::vector<const SMDS_MeshNode*>* nodes = 0);
   // Set volume.
   // Return false if theVolume is not of type SMDSAbs_Volume.
   // ignoreCentralNodes makes skip nodes at face centers when returning
-  // nodes of faces of SMDSEntity_TriQuad_Hexa
+  // nodes of faces of SMDSEntity_TriQuad_Hexa.
+  // alternative nodes can be provided
 
   const SMDS_MeshVolume* Element() const;
   // return element
@@ -91,10 +93,10 @@ class SMDS_EXPORT SMDS_VolumeTool
   // top and bottom faces are reversed.
   // Result of IsForward() and methods returning nodes change
 
-  const SMDS_MeshNode** GetNodes() { return &myVolumeNodes[0]; }
+  const SMDS_MeshNode** GetNodes() const { return (const SMDS_MeshNode**) &myVolumeNodes[0]; }
   // Return array of volume nodes
 
-  int NbNodes() { return myVolumeNodes.size(); }
+  int NbNodes() const { return myVolumeNodes.size(); }
   // Return array of volume nodes
 
   double GetSize() const;
index f2f076df50bc71d0a59cb561d9fd6c5ae14fb042..9493b7d165e8e8dce61e416b215c62dcada93ab4 100644 (file)
@@ -59,20 +59,20 @@ void counters::stats()
       }
 }
 
-chrono::chrono(int i) :
+salome_chrono::salome_chrono(int i) :
   _run(true), _ctr(i)
 {
   //MESSAGE("chrono::chrono " << _ctr << " " << _run);
   _start = clock();
 }
 
-chrono::~chrono()
+salome_chrono::~salome_chrono()
 {
   if (_run)
     stop();
 }
 
-void chrono::stop()
+void salome_chrono::stop()
 {
   //MESSAGE("chrono::stop " << _ctr << " " << _run);
   if (_run)
index 31e2828e0e6e9878d22ec188365f09de6c2a203b..38ebff8a50f2dfb77ed7e7700dc8997f5c247ac7 100644 (file)
@@ -46,11 +46,11 @@ protected:
   static int _nbChrono;
 };
 
-class SMDS_EXPORT chrono
+class SMDS_EXPORT salome_chrono
 {
 public:
-  chrono(int i);
-  ~chrono();
+  salome_chrono(int i);
+  ~salome_chrono();
   void stop();
 protected:
   bool _run;
@@ -61,7 +61,7 @@ protected:
 #ifdef CHRONODEF
 #define CHRONO(i) counters::_ctrs[i]._ctrNames = (char *)__FILE__; \
   counters::_ctrs[i]._ctrLines = __LINE__; \
-  chrono aChrono##i(i);
+  salome_chrono aChrono##i(i);
 
 #define CHRONOSTOP(i) aChrono##i.stop();
 
index a6806c3d8eb5ca5e05ee643099be7c6ab182d7c5..035c23c5919ccc309f758165820aa958c4cdbd78 100644 (file)
@@ -231,7 +231,7 @@ SMESH_3D_Algo::SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen)
 
 //=============================================================================
 /*!
- * Usually an algoritm has nothing to save
+ * Usually an algorithm has nothing to save
  */
 //=============================================================================
 
@@ -440,13 +440,15 @@ bool SMESH_Algo::GetSortedNodesOnEdge(const SMESHDS_Mesh*                   theM
   TopExp::Vertices(theEdge, v1, v2);
   const SMDS_MeshNode* n1 = VertexNode( v1, eSubMesh, 0 );
   const SMDS_MeshNode* n2 = VertexNode( v2, eSubMesh, 0 );
+  const SMDS_MeshNode* nEnd[2] = { nbNodes ? theNodes.begin()->second  : 0,
+                                   nbNodes ? theNodes.rbegin()->second : 0 };
   Standard_Real f, l;
   BRep_Tool::Range(theEdge, f, l);
   if ( v1.Orientation() != TopAbs_FORWARD )
     std::swap( f, l );
-  if ( n1 && ++nbNodes )
+  if ( n1 && n1 != nEnd[0] && n1 != nEnd[1] && ++nbNodes )
     theNodes.insert( make_pair( f, n1 ));
-  if ( n2 && ++nbNodes )
+  if ( n2 && n2 != nEnd[0] && n2 != nEnd[1] && ++nbNodes )
     theNodes.insert( make_pair( l, n2 ));
 
   return (int)theNodes.size() == nbNodes;
@@ -749,7 +751,7 @@ SMESH_Algo::EMeshError SMESH_Algo::GetMeshError(SMESH_subMesh* subMesh)
     if ( !fIt->more() )
       return MEr_EMPTY;
 
-    // We check that olny links on EDGEs encouter once, the rest links, twice
+    // We check that only links on EDGEs encouter once, the rest links, twice
     set< SMESH_TLink > links;
     while ( fIt->more() )
     {
index e51b2329c32f7422f5b1a38f6a85b8b84f19ff22..d4c8f3e877aa50143fae1dc2e54a8b328fa497c4 100644 (file)
@@ -255,7 +255,7 @@ public:
   // ==================================================================
 
   // SMESH_Hypothesis::GetDim();
-  // 1 - dimention of target mesh
+  // 1 - dimension of target mesh
 
   bool OnlyUnaryInput() const { return _onlyUnaryInput; }
   // 2 - is collection of tesselatable shapes inacceptable as input;
@@ -269,7 +269,7 @@ public:
   // 3 - is a Dim-1 mesh prerequisite
 
   bool NeedShape() const { return _requireShape; }
-  // 4 - is shape existance required
+  // 4 - is shape existence required
 
   bool SupportSubmeshes() const { return _supportSubmeshes; }
   // 5 - whether supports submeshes if !NeedDiscreteBoundary()
index 752b5f6ebaded468801dc43866724e1972e05ace..bd5654c89588eb1bd05ddde3ae963e978e7cd8eb 100644 (file)
@@ -73,6 +73,19 @@ SMESH_Gen::SMESH_Gen()
   //vtkDebugLeaks::SetExitError(0);
 }
 
+namespace
+{
+  // a structure used to nullify SMESH_Gen field of SMESH_Hypothesis,
+  // which is needed for SMESH_Hypothesis not deleted before ~SMESH_Gen()
+  struct _Hyp : public SMESH_Hypothesis
+  {
+    void NullifyGen()
+    {
+      _gen = 0;
+    }
+  };
+}
+
 //=============================================================================
 /*!
  * Destructor
@@ -84,9 +97,16 @@ SMESH_Gen::~SMESH_Gen()
   std::map < int, StudyContextStruct * >::iterator i_sc = _mapStudyContext.begin();
   for ( ; i_sc != _mapStudyContext.end(); ++i_sc )
   {
-    delete i_sc->second->myDocument;
-    delete i_sc->second;
-  }  
+    StudyContextStruct* context = i_sc->second;
+    std::map < int, SMESH_Hypothesis * >::iterator i_hyp = context->mapHypothesis.begin();
+    for ( ; i_hyp != context->mapHypothesis.end(); ++i_hyp )
+    {
+      if ( _Hyp* h = static_cast< _Hyp*>( i_hyp->second ))
+        h->NullifyGen();
+    }
+    delete context->myDocument;
+    delete context;
+  }
 }
 
 //=============================================================================
@@ -148,6 +168,8 @@ bool SMESH_Gen::Compute(SMESH_Mesh &          aMesh,
   // one face only.
   SMESH_subMesh::compute_event computeEvent =
     aShapeOnly ? SMESH_subMesh::COMPUTE_SUBMESH : SMESH_subMesh::COMPUTE;
+  if ( !aMesh.HasShapeToMesh() )
+    computeEvent = SMESH_subMesh::COMPUTE_NOGEOM; // if several algos and no geometry
 
   if ( anUpward ) // is called from the below code in this method
   {
@@ -584,7 +606,6 @@ bool SMESH_Gen::Evaluate(SMESH_Mesh &          aMesh,
     ret = Evaluate( aMesh, aShape, aResMap, /*anUpward=*/true, aShapesId );
   }
 
-  MESSAGE( "VSR - SMESH_Gen::Evaluate() finished, OK = " << ret);
   return ret;
 }
 
@@ -1058,7 +1079,8 @@ SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_subMesh * aSubMesh,
   SMESH_Mesh&          aMesh  = *aSubMesh->GetFather();
 
   SMESH_HypoFilter filter( SMESH_HypoFilter::IsAlgo() );
-  filter.And( filter.IsApplicableTo( aShape ));
+  if ( aMesh.HasShapeToMesh() )
+    filter.And( filter.IsApplicableTo( aShape ));
 
   typedef SMESH_Algo::Features AlgoData;
 
@@ -1166,7 +1188,7 @@ int SMESH_Gen::GetShapeDim(const TopAbs_ShapeEnum & aShapeType)
 
 //=============================================================================
 /*!
- * Genarate a new id unique withing this Gen
+ * Genarate a new id unique within this Gen
  */
 //=============================================================================
 
index 2d1e10c165906c40776ccded4f72a2fcf5e6eb45..c4107fb3892bed30a88f0b640277375422e4640c 100644 (file)
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
 //
-#include "SMESH_Hypothesis.hxx"
 
-#include "SMESHDS_Mesh.hxx"
 #include "SMESH_Gen.hxx"
-#include "SMESH_Mesh.hxx"
-#include "SMESH_subMesh.hxx"
 
-#include "utilities.h"
+#include "SMESHDS_Mesh.hxx"
+#include "SMESH_Hypothesis.hxx"
+#include "SMESH_Mesh.hxx"
 
 using namespace std;
 
 //=============================================================================
 /*!
- * 
+ *
  */
 //=============================================================================
 
@@ -63,8 +61,11 @@ SMESH_Hypothesis::SMESH_Hypothesis(int hypId,
 
 SMESH_Hypothesis::~SMESH_Hypothesis()
 {
-  StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId);
-  myStudyContext->mapHypothesis[_hypId] = 0;
+  if ( _gen )
+  {
+    StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId);
+    myStudyContext->mapHypothesis[_hypId] = 0;
+  }
 }
 
 //=============================================================================
@@ -77,20 +78,20 @@ int SMESH_Hypothesis::GetDim() const
 {
   int dim = 0;
   switch (_type)
-    {
-    case ALGO_1D: dim = 1; break;
-    case ALGO_2D: dim = 2; break;
-    case ALGO_3D: dim = 3; break;
-    case ALGO_0D: dim = 0; break;
-    case PARAM_ALGO:
-      dim = ( _param_algo_dim < 0 ) ? -_param_algo_dim : _param_algo_dim; break;
-    }
+  {
+  case ALGO_1D: dim = 1; break;
+  case ALGO_2D: dim = 2; break;
+  case ALGO_3D: dim = 3; break;
+  case ALGO_0D: dim = 0; break;
+  case PARAM_ALGO:
+    dim = ( _param_algo_dim < 0 ) ? -_param_algo_dim : _param_algo_dim; break;
+  }
   return dim;
 }
 
 //=============================================================================
 /*!
- *  
+ *
  */
 //=============================================================================
 
index de77b1b97b7cb2413dd0a6a09c10d3ed972fc2a8..bfcd2f518daa7b303628e8c246220738c9024c5d 100644 (file)
@@ -114,7 +114,7 @@ public:
    * 
    * An auxiliary hypothesis is optional, i.e. an algorithm
    * can work without it and another hypothesis of the same
-   * dimention can be assigned to the shape
+   * dimension can be assigned to the shape
    */
   virtual bool IsAuxiliary() const
   { return GetType() == PARAM_ALGO && _param_algo_dim < 0; }
index ff127dece72588a29e297dde56a32e072bd7efb2..893a28aba659e6f8fbfb93475a251acddc4c0b97 100644 (file)
@@ -559,7 +559,7 @@ int SMESH_Mesh::MEDToMesh(const char* theFileName, const char* theMeshName)
 //purpose  : 
 //=======================================================================
 
-int SMESH_Mesh::STLToMesh(const char* theFileName)
+std::string SMESH_Mesh::STLToMesh(const char* theFileName)
 {
   if(_isShapeToMesh)
     throw SALOME_Exception(LOCALIZED("a shape to mesh has already been defined"));
@@ -571,7 +571,7 @@ int SMESH_Mesh::STLToMesh(const char* theFileName)
   myReader.SetMeshId(-1);
   myReader.Perform();
 
-  return 1;
+  return myReader.GetName();
 }
 
 //================================================================================
@@ -714,6 +714,7 @@ SMESH_Mesh::AddHypothesis(const TopoDS_Shape & aSubShape,
     }
   }
   HasModificationsToDiscard(); // to reset _isModified flag if a mesh becomes empty
+  GetMeshDS()->Modified();
 
   if(MYDEBUG) subMesh->DumpAlgoState(true);
   if(MYDEBUG) SCRUTE(ret);
@@ -784,6 +785,7 @@ SMESH_Mesh::RemoveHypothesis(const TopoDS_Shape & aSubShape,
   }
 
   HasModificationsToDiscard(); // to reset _isModified flag if mesh become empty
+  GetMeshDS()->Modified();
 
   if(MYDEBUG) subMesh->DumpAlgoState(true);
   if(MYDEBUG) SCRUTE(ret);
@@ -1078,7 +1080,7 @@ SMESH_subMesh * SMESH_Mesh::GetSubMesh(const TopoDS_Shape & aSubShape)
 
 //=============================================================================
 /*!
- * Get the SMESH_subMesh object implementation. Dont create it, return null
+ * Get the SMESH_subMesh object implementation. Don't create it, return null
  * if it does not exist.
  */
 //=============================================================================
@@ -1092,7 +1094,7 @@ SMESH_subMesh *SMESH_Mesh::GetSubMeshContaining(const TopoDS_Shape & aSubShape)
 
 //=============================================================================
 /*!
- * Get the SMESH_subMesh object implementation. Dont create it, return null
+ * Get the SMESH_subMesh object implementation. Don't create it, return null
  * if it does not exist.
  */
 //=============================================================================
@@ -1384,6 +1386,8 @@ bool SMESH_Mesh::HasDuplicatedGroupNamesMED()
      *         - 2D if all mesh nodes lie on XOY coordinate plane, or
      *         - 3D in the rest cases.
      *         If \a theAutoDimension is \c false, the space dimension is always 3.
+ *  \param [in] theAddODOnVertices - to create 0D elements on all vertices
+ *  \param [in] theAllElemsToGroup - to make every element to belong to any group (PAL23413)
  *  \return int - mesh index in the file
  */
 //================================================================================
@@ -1394,7 +1398,8 @@ void SMESH_Mesh::ExportMED(const char *        file,
                            int                 theVersion,
                            const SMESHDS_Mesh* meshPart,
                            bool                theAutoDimension,
-                           bool                theAddODOnVertices)
+                           bool                theAddODOnVertices,
+                           bool                theAllElemsToGroup)
   throw(SALOME_Exception)
 {
   SMESH_TRY;
@@ -1416,7 +1421,11 @@ void SMESH_Mesh::ExportMED(const char *        file,
     myWriter.AddGroupOfEdges();
     myWriter.AddGroupOfFaces();
     myWriter.AddGroupOfVolumes();
+    myWriter.AddGroupOf0DElems();
+    myWriter.AddGroupOfBalls();
   }
+  if ( theAllElemsToGroup )
+    myWriter.AddAllToGroup();
 
   // Pass groups to writer. Provide unique group names.
   //set<string> aGroupNames; // Corrected for Mantis issue 0020028
@@ -1472,7 +1481,9 @@ void SMESH_Mesh::ExportSAUV(const char *file,
   cmd += "from medutilities import my_remove ; my_remove(r'" + medfilename + "')";
   cmd += "\"";
   system(cmd.c_str());
-  ExportMED(medfilename.c_str(), theMeshName, theAutoGroups, 1);
+  ExportMED(medfilename.c_str(), theMeshName, theAutoGroups, /*theVersion=*/1,
+            /*meshPart=*/NULL, /*theAutoDimension=*/false, /*theAddODOnVertices=*/false,
+            /*theAllElemsToGroup=*/true ); // theAllElemsToGroup is for PAL0023413
 #ifdef WIN32
   cmd = "%PYTHONBIN% ";
 #else
@@ -1549,6 +1560,7 @@ void SMESH_Mesh::ExportUNV(const char *        file,
 
 void SMESH_Mesh::ExportSTL(const char *        file,
                            const bool          isascii,
+                           const char *        name,
                            const SMESHDS_Mesh* meshPart) throw(SALOME_Exception)
 {
   Unexpect aCatch(SalomeException);
@@ -1557,6 +1569,7 @@ void SMESH_Mesh::ExportSTL(const char *        file,
   myWriter.SetIsAscii( isascii );
   myWriter.SetMesh( meshPart ? (SMESHDS_Mesh*) meshPart : _myMeshDS);
   myWriter.SetMeshId(_id);
+  if ( name ) myWriter.SetName( name );
   myWriter.Perform();
 }
 
@@ -1918,7 +1931,7 @@ int SMESH_Mesh::NbMeshes() const // nb meshes in the Study
 
 //=======================================================================
 //function : IsNotConformAllowed
-//purpose  : check if a hypothesis alowing notconform mesh is present
+//purpose  : check if a hypothesis allowing notconform mesh is present
 //=======================================================================
 
 bool SMESH_Mesh::IsNotConformAllowed() const
@@ -2090,7 +2103,7 @@ bool SMESH_Mesh::RemoveGroup( const int theGroupID )
 //=======================================================================
 //function : GetAncestors
 //purpose  : return list of ancestors of theSubShape in the order
-//           that lower dimention shapes come first.
+//           that lower dimension shapes come first.
 //=======================================================================
 
 const TopTools_ListOfShape& SMESH_Mesh::GetAncestors(const TopoDS_Shape& theS) const
index 6a6953074e85bdbfbd509106740cae528ecbe56f..a8ec5dfae4e0fdfc1762cd981c82ddcccc53dea1 100644 (file)
@@ -121,7 +121,7 @@ class SMESH_EXPORT SMESH_Mesh
 
   int MEDToMesh(const char* theFileName, const char* theMeshName);
   
-  int STLToMesh(const char* theFileName);
+  std::string STLToMesh(const char* theFileName);
 
   int CGNSToMesh(const char* theFileName, const int theMeshIndex, std::string& theMeshName);
   
@@ -206,14 +206,14 @@ class SMESH_EXPORT SMESH_Mesh
   bool IsUsedHypothesis(SMESHDS_Hypothesis *  anHyp,
                         const SMESH_subMesh * aSubMesh);
   /*!
-   * \brief check if a hypothesis alowing notconform mesh is present
+   * \brief check if a hypothesis allowing notconform mesh is present
    */
   bool IsNotConformAllowed() const;
   
   bool IsMainShape(const TopoDS_Shape& theShape) const;
   /*!
    * \brief Return list of ancestors of theSubShape in the order
-   *        that lower dimention shapes come first
+   *        that lower dimension shapes come first
    */
   const TopTools_ListOfShape& GetAncestors(const TopoDS_Shape& theSubShape) const;
 
@@ -253,7 +253,8 @@ class SMESH_EXPORT SMESH_Mesh
                  int                 theVersion = 0,
                  const SMESHDS_Mesh* theMeshPart = 0,
                  bool                theAutoDimension = false,
-                 bool                theAddODOnVertices = false)
+                 bool                theAddODOnVertices = false,
+                 bool                theAllElemsToGroup = false)
     throw(SALOME_Exception);
 
   void ExportDAT(const char *        file,
@@ -262,6 +263,7 @@ class SMESH_EXPORT SMESH_Mesh
                  const SMESHDS_Mesh* meshPart = 0) throw(SALOME_Exception);
   void ExportSTL(const char *        file,
                  const bool          isascii,
+                 const char *        name = 0,
                  const SMESHDS_Mesh* meshPart = 0) throw(SALOME_Exception);
   void ExportCGNS(const char *        file,
                   const SMESHDS_Mesh* mesh,
index 67df8daebb388f8127ad0e94026a6bcb89fea7ec..e03128dc84d92994c16584069d702820e70982b1 100644 (file)
@@ -139,9 +139,9 @@ SMESHDS_Mesh* SMESH_MesherHelper::GetMeshDS() const
 
 //=======================================================================
 //function : IsQuadraticSubMesh
-//purpose  : Check submesh for given shape: if all elements on this shape 
+//purpose  : Check sub-meshes of a given shape: if all elements on sub-shapes
 //           are quadratic, quadratic elements will be created.
-//           Also fill myTLinkNodeMap
+//           Fill myTLinkNodeMap
 //=======================================================================
 
 bool SMESH_MesherHelper::IsQuadraticSubMesh(const TopoDS_Shape& aSh)
@@ -149,7 +149,6 @@ bool SMESH_MesherHelper::IsQuadraticSubMesh(const TopoDS_Shape& aSh)
   SMESHDS_Mesh* meshDS = GetMeshDS();
   // we can create quadratic elements only if all elements
   // created on sub-shapes of given shape are quadratic
-  // also we have to fill myTLinkNodeMap
   myCreateQuadratic = true;
   mySeamShapeIds.clear();
   myDegenShapeIds.clear();
@@ -162,9 +161,6 @@ bool SMESH_MesherHelper::IsQuadraticSubMesh(const TopoDS_Shape& aSh)
   }
   SMDSAbs_ElementType elemType( subType==TopAbs_FACE ? SMDSAbs_Face : SMDSAbs_Edge );
 
-
-  //int nbOldLinks = myTLinkNodeMap.size();
-
   if ( !myMesh->HasShapeToMesh() )
   {
     if (( myCreateQuadratic = myMesh->NbFaces( ORDER_QUADRATIC )))
@@ -373,6 +369,27 @@ void SMESH_MesherHelper::SetSubShape(const TopoDS_Shape& aSh)
   }
 }
 
+//=======================================================================
+/*!
+ * \brief Copy shape information from another helper. Used to improve performance
+ *        since SetSubShape() can be time consuming if there are many edges
+ */
+//=======================================================================
+
+void SMESH_MesherHelper::CopySubShapeInfo(const SMESH_MesherHelper& other)
+{
+  this->myShape         = other.myShape;
+  this->myShapeID       = other.myShapeID;
+  this->myDegenShapeIds = other.myDegenShapeIds;
+  this->mySeamShapeIds  = other.mySeamShapeIds;
+  this->myPar1[0]       = other.myPar1[0];
+  this->myPar1[1]       = other.myPar1[1];
+  this->myPar2[0]       = other.myPar2[0];
+  this->myPar2[1]       = other.myPar2[1];
+  this->myParIndex      = other.myParIndex;
+  this->myFace2Surface  = other.myFace2Surface;
+}
+
 //=======================================================================
 //function : ShapeToIndex
 //purpose  : Convert a shape to its index in the SMESHDS_Mesh
@@ -1889,7 +1906,7 @@ const SMDS_MeshNode* SMESH_MesherHelper::getMediumNodeOnComposedWire(const SMDS_
 
   if ( !bestEdge.IsNull() )
   {
-    // move n12 to position of a successfull projection
+    // move n12 to position of a successful projection
     //double tol = BRep_Tool::Tolerance(edges[ iOkEdge ]);
     if ( !force3d /*&& distMiddleProj > 2*tol*/ )
     {
@@ -2568,6 +2585,7 @@ bool SMESH_MesherHelper::LoadNodeColumns(TParam2ColumnMap &            theParam2
     }
 
     // get nodes on theBaseEdge sorted by param on edge and initialize theParam2ColumnMap with them
+    const SMDS_MeshNode* prevEndNodes[2] = { 0, 0 };
     edge = theBaseSide.begin();
     for ( int iE = 0; edge != theBaseSide.end(); ++edge, ++iE )
     {
@@ -2635,11 +2653,16 @@ bool SMESH_MesherHelper::LoadNodeColumns(TParam2ColumnMap &            theParam2
       const double prevPar = theParam2ColumnMap.empty() ? 0 : theParam2ColumnMap.rbegin()->first;
       for ( u_n = sortedBaseNN.begin(); u_n != sortedBaseNN.end(); u_n++ )
       {
+        if ( u_n->second == prevEndNodes[0] ||
+             u_n->second == prevEndNodes[1] )
+          continue;
         double par = prevPar + coeff * ( u_n->first - f );
         TParam2ColumnMap::iterator u2nn =
           theParam2ColumnMap.insert( theParam2ColumnMap.end(), make_pair( par, TNodeColumn()));
         u2nn->second.push_back( u_n->second );
       }
+      prevEndNodes[0] = sortedBaseNN.begin()->second;
+      prevEndNodes[1] = sortedBaseNN.rbegin()->second;
     }
     if ( theParam2ColumnMap.size() < 2 )
       return false;
@@ -2819,8 +2842,9 @@ bool SMESH_MesherHelper::IsStructured( SMESH_subMesh* faceSM )
 //purpose  : Return true if 2D mesh on FACE is ditorted
 //=======================================================================
 
-bool SMESH_MesherHelper::IsDistorted2D( SMESH_subMesh* faceSM,
-                                        bool           checkUV)
+bool SMESH_MesherHelper::IsDistorted2D( SMESH_subMesh*      faceSM,
+                                        bool                checkUV,
+                                        SMESH_MesherHelper* faceHelper)
 {
   if ( !faceSM || faceSM->GetSubShape().ShapeType() != TopAbs_FACE )
     return false;
@@ -2828,12 +2852,26 @@ bool SMESH_MesherHelper::IsDistorted2D( SMESH_subMesh* faceSM,
   bool haveBadFaces = false;
 
   SMESH_MesherHelper helper( *faceSM->GetFather() );
+  if ( faceHelper )
+    helper.CopySubShapeInfo( *faceHelper );
   helper.SetSubShape( faceSM->GetSubShape() );
 
   const TopoDS_Face&  F = TopoDS::Face( faceSM->GetSubShape() );
   SMESHDS_SubMesh* smDS = helper.GetMeshDS()->MeshElements( F );
   if ( !smDS || smDS->NbElements() == 0 ) return false;
 
+  bool subIdsValid = true; // shape ID of nodes is OK
+  if ( helper.HasSeam() )
+  {
+    // check if nodes are bound to seam edges
+    SMESH_subMeshIteratorPtr smIt = faceSM->getDependsOnIterator(/*includeSelf=*/false);
+    while ( smIt->more() && subIdsValid )
+    {
+      SMESH_subMesh* sm = smIt->next();
+      if ( helper.IsSeamShape( sm->GetId() ) && sm->IsEmpty() )
+        subIdsValid = false;
+    }
+  }
   SMDS_ElemIteratorPtr faceIt = smDS->GetElements();
   double prevArea = 0;
   vector< const SMDS_MeshNode* > nodes;
@@ -2858,12 +2896,20 @@ bool SMESH_MesherHelper::IsDistorted2D( SMESH_subMesh* faceSM,
       if ( isOnDegen )
         continue;
     }
-    // prepare to getting UVs
+    // prepare for getting UVs
     const SMDS_MeshNode* inFaceNode = 0;
     if ( helper.HasSeam() ) {
       for ( size_t i = 0; ( i < nodes.size() && !inFaceNode ); ++i )
         if ( !helper.IsSeamShape( nodes[ i ]->getshapeId() ))
+        {
           inFaceNode = nodes[ i ];
+          if ( !subIdsValid )
+          {
+            gp_XY uv = helper.GetNodeUV( F, inFaceNode );
+            if ( helper.IsOnSeam( uv ))
+              inFaceNode = NULL;
+          }
+        }
       if ( !inFaceNode )
         continue;
     }
@@ -2872,6 +2918,14 @@ bool SMESH_MesherHelper::IsDistorted2D( SMESH_subMesh* faceSM,
     for ( size_t i = 0; i < nodes.size(); ++i )
       uv[ i ] = helper.GetNodeUV( F, nodes[ i ], inFaceNode, toCheckUV );
 
+    if ( !subIdsValid ) // fix uv on seam
+    {
+      gp_XY uvInFace = helper.GetNodeUV( F, inFaceNode );
+      for ( size_t i = 0; i < uv.size(); ++i )
+        if ( helper.IsOnSeam( uv[i] ))
+          uv[i] = helper.getUVOnSeam( uv[i], uvInFace ).XY();
+    }
+
     // compare orientation of triangles
     double faceArea = 0;
     for ( int iT = 0, nbT = nodes.size()-2; iT < nbT; ++iT )
@@ -3081,7 +3135,7 @@ TopAbs_Orientation SMESH_MesherHelper::GetSubShapeOri(const TopoDS_Shape& shape,
 
 //=======================================================================
 //function : IsSubShape
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 bool SMESH_MesherHelper::IsSubShape( const TopoDS_Shape& shape,
@@ -3179,7 +3233,7 @@ double SMESH_MesherHelper::getFaceMaxTol( const TopoDS_Shape& face ) const
  *        of the FACE normal
  *  \return double - the angle (between -Pi and Pi), negative if the angle is concave,
  *                   1e100 in case of failure
- *  \waring Care about order of the EDGEs and their orientation to be as they are
+ *  \warning Care about order of the EDGEs and their orientation to be as they are
  *          within the FACE! Don't pass degenerated EDGEs neither!
  */
 //================================================================================
@@ -3389,6 +3443,25 @@ double SMESH_MesherHelper::GetOtherParam(const double param) const
   return fabs(param-myPar1[i]) < fabs(param-myPar2[i]) ? myPar2[i] : myPar1[i];
 }
 
+//=======================================================================
+//function : IsOnSeam
+//purpose  : Check if UV is on seam. Return 0 if not, 1 for U seam, 2 for V seam
+//=======================================================================
+
+int SMESH_MesherHelper::IsOnSeam(const gp_XY& uv) const
+{
+  for ( int i = U_periodic; i <= V_periodic ; ++i )
+    if ( myParIndex & i )
+    {
+      double p   = uv.Coord( i );
+      double tol = ( myPar2[i-1] - myPar1[i-1] ) / 100.;
+      if ( Abs( p - myPar1[i-1] ) < tol ||
+           Abs( p - myPar2[i-1] ) < tol )
+        return i;
+    }
+  return 0;
+}
+
 namespace {
 
   //=======================================================================
@@ -3402,11 +3475,16 @@ namespace {
     TopTools_ListIteratorOfListOfShape _ancIter;
     TopAbs_ShapeEnum                   _type;
     TopTools_MapOfShape                _encountered;
-    TAncestorsIterator( const TopTools_ListOfShape& ancestors, TopAbs_ShapeEnum type)
+    TopTools_IndexedMapOfShape         _allowed;
+    TAncestorsIterator( const TopTools_ListOfShape& ancestors,
+                        TopAbs_ShapeEnum            type,
+                        const TopoDS_Shape*         container/* = 0*/)
       : _ancIter( ancestors ), _type( type )
     {
+      if ( container && !container->IsNull() )
+        TopExp::MapShapes( *container, type, _allowed);
       if ( _ancIter.More() ) {
-        if ( _ancIter.Value().ShapeType() != _type ) next();
+        if ( !isCurrentAllowed() ) next();
         else _encountered.Add( _ancIter.Value() );
       }
     }
@@ -3419,25 +3497,32 @@ namespace {
       const TopoDS_Shape* s = _ancIter.More() ? & _ancIter.Value() : 0;
       if ( _ancIter.More() )
         for ( _ancIter.Next();  _ancIter.More(); _ancIter.Next())
-          if ( _ancIter.Value().ShapeType() == _type && _encountered.Add( _ancIter.Value() ))
+          if ( isCurrentAllowed() && _encountered.Add( _ancIter.Value() ))
             break;
       return s;
     }
+    bool isCurrentAllowed()
+    {
+      return (( _ancIter.Value().ShapeType() == _type ) &&
+              ( _allowed.IsEmpty() || _allowed.Contains( _ancIter.Value() )));
+    }
   };
 
 } // namespace
 
 //=======================================================================
 /*!
- * \brief Return iterator on ancestors of the given type
+ * \brief Return iterator on ancestors of the given type, included into a container shape
  */
 //=======================================================================
 
 PShapeIteratorPtr SMESH_MesherHelper::GetAncestors(const TopoDS_Shape& shape,
                                                    const SMESH_Mesh&   mesh,
-                                                   TopAbs_ShapeEnum    ancestorType)
+                                                   TopAbs_ShapeEnum    ancestorType,
+                                                   const TopoDS_Shape* container)
 {
-  return PShapeIteratorPtr( new TAncestorsIterator( mesh.GetAncestors(shape), ancestorType));
+  return PShapeIteratorPtr
+    ( new TAncestorsIterator( mesh.GetAncestors(shape), ancestorType, container));
 }
 
 //=======================================================================
@@ -3715,7 +3800,7 @@ namespace { // Structures used by FixQuadraticElements()
    * \brief Make up a chain of links
    *  \param iSide - link to add first
    *  \param chain - chain to fill in
-   *  \param pos   - postion of medium nodes the links should have
+   *  \param pos   - position of medium nodes the links should have
    *  \param error - out, specifies what is wrong
    *  \retval bool - false if valid chain can't be built; "valid" means that links
    *                 of the chain belongs to rectangles bounding hexahedrons
@@ -3729,7 +3814,7 @@ namespace { // Structures used by FixQuadraticElements()
     if ( _sideIsAdded[ iSide ]) // already in chain
       return true;
 
-    if ( _sides.size() != 4 ) { // triangle - visit all my continous faces
+    if ( _sides.size() != 4 ) { // triangle - visit all my continuous faces
       MSGBEG( *this );
       TLinkSet links;
       list< const QFace* > faces( 1, this );
@@ -3775,7 +3860,7 @@ namespace { // Structures used by FixQuadraticElements()
     if ( link->MediumPos() >= pos ) {
       int nbLinkFaces = link->_faces.size();
       if ( nbLinkFaces == 4 || (/*nbLinkFaces < 4 && */link->OnBoundary())) {
-        // hexahedral mesh or boundary quadrangles - goto a continous face
+        // hexahedral mesh or boundary quadrangles - goto a continuous face
         if ( const QFace* f = link->GetContinuesFace( this ))
           if ( f->_sides.size() == 4 )
             return f->GetLinkChain( *chLink, chain, pos, error );
@@ -3903,7 +3988,7 @@ namespace { // Structures used by FixQuadraticElements()
    * \brief Move medium node of theLink according to its distance from boundary
    *  \param theLink - link to fix
    *  \param theRefVec - movement of boundary
-   *  \param theLinks - all adjacent links of continous triangles
+   *  \param theLinks - all adjacent links of continuous triangles
    *  \param theFaceHelper - helper is not used so far
    *  \param thePrevLen - distance from the boundary
    *  \param theStep - number of steps till movement propagation limit
@@ -4634,8 +4719,8 @@ namespace { // Structures used by FixQuadraticElements()
         < const SMDS_MeshElement*, vector< SMDS_ElemIteratorPtr > > TIterOnIter;
       SMDS_ElemIteratorPtr faceIter( new TIterOnIter( faceIterVec ));
 
-      // a seacher to check if a volume is close to a concave face
-      std::auto_ptr< SMESH_ElementSearcher > faceSearcher
+      // search to check if a volume is close to a concave face
+      SMESHUtils::Deleter< SMESH_ElementSearcher > faceSearcher
         ( SMESH_MeshAlgos::GetElementSearcher( *theHelper.GetMeshDS(), faceIter ));
 
       // classifier
@@ -4737,7 +4822,7 @@ namespace { // Structures used by FixQuadraticElements()
                     gp_Pnt pMedium = SMESH_TNodeXYZ( linkIt->second );
                     double hMedium = faceNorm * gp_Vec( pOnFace0, pMedium ).XYZ();
                     double hVol    = faceNorm * gp_Vec( pOnFace0, pInSolid ).XYZ();
-                    isDistorted = ( Abs( hMedium ) > Abs( hVol * 0.5 ));
+                    isDistorted = ( Abs( hMedium ) > Abs( hVol * 0.75 ));
                   }
                 }
               }
index 8c598fb62ffeecdb5b0bd14619d60fa9f422ad15..cf3506fea7af1d83ed6c12f37debde26c5b88622 100644 (file)
@@ -122,7 +122,9 @@ class SMESH_EXPORT SMESH_MesherHelper
   /*!
    * \brief Return true if 2D mesh on FACE is distored
    */
-  static bool IsDistorted2D( SMESH_subMesh* faceSM, bool checkUV=false );
+  static bool IsDistorted2D( SMESH_subMesh*      faceSM,
+                             bool                checkUV = false,
+                             SMESH_MesherHelper* faceHelper = NULL);
 
   /*!
    * \brief Returns true if given node is medium
@@ -187,7 +189,7 @@ class SMESH_EXPORT SMESH_MesherHelper
    * \brief Count nb of sub-shapes
     * \param shape - the shape
     * \param type - the type of sub-shapes to count
-    * \param ignoreSame - if true, use map not to count same shapes, esle use explorer
+    * \param ignoreSame - if true, use map not to count same shapes, else use explorer
     * \retval int - the calculated number
    */
   static int Count(const TopoDS_Shape&    shape,
@@ -201,11 +203,12 @@ class SMESH_EXPORT SMESH_MesherHelper
                          const SMESH_Mesh&   mesh,
                          TopAbs_ShapeEnum    ancestorType=TopAbs_SHAPE);
   /*!
-   * \brief Return iterator on ancestors of the given type
+   * \brief Return iterator on ancestors of the given type, included into a container shape
    */
   static PShapeIteratorPtr GetAncestors(const TopoDS_Shape& shape,
                                         const SMESH_Mesh&   mesh,
-                                        TopAbs_ShapeEnum    ancestorType);
+                                        TopAbs_ShapeEnum    ancestorType,
+                                        const TopoDS_Shape* container = 0);
   /*!
    * \brief Find a common ancestor, of the given type, of two shapes
    */
@@ -317,6 +320,12 @@ public:
    * \brief Return the shape set by IsQuadraticSubMesh() or SetSubShape() 
    */
   const TopoDS_Shape& GetSubShape() const  { return myShape; }
+  /*!
+   * \brief Copy shape information from another helper to improve performance
+   *        since SetSubShape() can be time consuming if there are many edges
+   */
+  void CopySubShapeInfo(const SMESH_MesherHelper& other);
+
 
   /*!
    * \brief Convert a shape to its index in the SMESHDS_Mesh
@@ -610,6 +619,10 @@ public:
    * \brief Return an alternative parameter for a node on seam
    */
   double GetOtherParam(const double param) const;
+  /*!
+   * \brief Check if UV is on seam. Return 0 if not, 1 for U seam, 2 for V seam
+   */
+  int IsOnSeam(const gp_XY& uv) const;
 
   /*!
    * \brief Return existing or create new medium nodes between given ones
@@ -692,6 +705,7 @@ public:
 
   static void WriteShape(const TopoDS_Shape& s);
 
+
  protected:
 
   /*!
@@ -708,9 +722,10 @@ public:
 
   double getFaceMaxTol( const TopoDS_Shape& face ) const;
 
+
  private:
 
-  // Forbiden copy constructor
+  // forbidden copy constructor
   SMESH_MesherHelper (const SMESH_MesherHelper& theOther);
 
   // key of a map of bi-quadratic face to it's central node
index bfcaeab50f6305d16ee8d23a13024ef1ffd07269..0f14f5ef68d24f82f1e1c50bde6bd90a93e10de9 100644 (file)
@@ -267,8 +267,6 @@ SMESH_Pattern::SMESH_Pattern (): myToKeepNodes(false)
 
 bool SMESH_Pattern::Load (const char* theFileContents)
 {
-  MESSAGE("Load( file ) ");
-
   Kernel_Utils::Localizer loc;
   
   // file structure:
@@ -276,7 +274,7 @@ bool SMESH_Pattern::Load (const char* theFileContents)
   // ! This is a comment
   // NB_POINTS               ! 1 integer - the number of points in the pattern.
   //   X1 Y1 [Z1]            ! 2 or 3 reals - nodes coordinates within 2D or 3D domain:
-  //   X2 Y2 [Z2]            ! the pattern dimention is defined by the number of coordinates
+  //   X2 Y2 [Z2]            ! the pattern dimension is defined by the number of coordinates
   //   ...
   // [ ID1 ID2 ... IDn ]     ! Indices of key-points for a 2D pattern (only).
   // ! elements description goes after all
@@ -299,7 +297,7 @@ bool SMESH_Pattern::Load (const char* theFileContents)
 
   //   X1 Y1 [Z1]            ! 2 or 3 reals - nodes coordinates within 2D or 3D domain:
 
-  // read the first point coordinates to define pattern dimention
+  // read the first point coordinates to define pattern dimension
   int dim = readLine( fields, lineBeg, clearFields );
   if ( dim == 2 )
     myIs2D = true;
@@ -413,8 +411,6 @@ bool SMESH_Pattern::Load (const char* theFileContents)
 
 bool SMESH_Pattern::Save (ostream& theFile)
 {
-  MESSAGE(" ::Save(file) " );
-  
   Kernel_Utils::Localizer loc;
     
   if ( !IsLoaded() ) {
@@ -568,7 +564,6 @@ bool SMESH_Pattern::Load (SMESH_Mesh*        theMesh,
                           TopoDS_Vertex      the1stVertex,
                           bool               theKeepNodes)
 {
-  MESSAGE(" ::Load(face) " );
   Clear();
   myIs2D = true;
   myToKeepNodes = theKeepNodes;
@@ -616,7 +611,6 @@ bool SMESH_Pattern::Load (SMESH_Mesh*        theMesh,
 
   if ( needProject )
   {
-    MESSAGE("Project the submesh");
     // ---------------------------------------------------------------
     // The case where the submesh is projected to theFace
     // ---------------------------------------------------------------
@@ -794,7 +788,7 @@ bool SMESH_Pattern::Load (SMESH_Mesh*        theMesh,
           double u = epos->GetUParameter();
           paramNodeMap.insert( make_pair( u, node ));
         }
-        if ((int) paramNodeMap.size() != eSubMesh->NbNodes() ) {
+        if ((int) paramNodeMap.size() != eSubMesh->NbNodes() - nbMeduimNodes ) {
           // wrong U on edge, project
           Extrema_ExtPC proj;
           BRepAdaptor_Curve aCurve( edge );
@@ -1104,10 +1098,10 @@ static bool intersectIsolines(const gp_XY& uv11, const gp_XY& uv12, const double
 
 //   resUV /= 2.;
 //     }
-  if ( isDeformed ) {
-    MESSAGE("intersectIsolines(), d1 = " << d1 << ", d2 = " << d2 << ", delta = " << delta <<
-            ", " << (loc1 - loc2).SquareModulus() << " > " << delta * delta);
-  }
+  // if ( isDeformed ) {
+  //   MESSAGE("intersectIsolines(), d1 = " << d1 << ", d2 = " << d2 << ", delta = " << delta <<
+  //           ", " << (loc1 - loc2).SquareModulus() << " > " << delta * delta);
+  // }
   return true;
 }
 
@@ -1200,7 +1194,7 @@ bool SMESH_Pattern::compUVByIsoIntersection (const list< list< TPoint* > >& theB
   }
   if ( !intersectIsolines( uv1[0], uv2[0], ratio[0],
                           uv1[1], uv2[1], ratio[1], theUV, theIsDeformed )) {
-    MESSAGE(" Cant intersect isolines for a point "<<theInitUV.X()<<", "<<theInitUV.Y());
+    MESSAGE(" Can't intersect isolines for a point "<<theInitUV.X()<<", "<<theInitUV.Y());
     return setErrorCode( ERR_APPLF_BAD_TOPOLOGY );
   }
 
@@ -1470,7 +1464,7 @@ static bool checkQuads (const TIsoNode* node,
         return false;
       }
       else {
-        //MESSAGE(" Cant improve UV, uv: "<<uv.X()<<" "<<uv.Y());
+        //MESSAGE(" Can't improve UV, uv: "<<uv.X()<<" "<<uv.Y());
       }
     }
     if ( !oldIsIn && nbOldFix ) {
@@ -1485,7 +1479,7 @@ static bool checkQuads (const TIsoNode* node,
         return false;
       }
       else {
-        //MESSAGE(" Cant fix UV, uv: "<<uv.X()<<" "<<uv.Y());
+        //MESSAGE(" Can't fix UV, uv: "<<uv.X()<<" "<<uv.Y());
       }
     }
     if ( newIsIn && oldIsIn )
@@ -1902,7 +1896,7 @@ bool SMESH_Pattern::
   list < TIsoNode* > internNodes;
   bool needIteration = true;
   if ( startNodes.empty() ) {
-    MESSAGE( " Starting UV by compUVByIsoIntersection()");
+    //MESSAGE( " Starting UV by compUVByIsoIntersection()");
     needIteration = false;
     map < double, TIsoLine >& isos = isoMap[ 0 ];
     map < double, TIsoLine >::iterator isoIt = isos.begin();
@@ -2122,7 +2116,7 @@ bool SMESH_Pattern::
 #endif
   } while ( maxMove > 1e-8 && nbIter++ < maxNbIter );
 
-  MESSAGE( "compUVByElasticIsolines(): Nb iterations " << nbIter << " dist: " << sqrt( maxMove ));
+  //MESSAGE( "compUVByElasticIsolines(): Nb iterations " << nbIter << " dist: " << sqrt( maxMove ));
 
   if ( nbIter >= maxNbIter && sqrt(maxMove) > minUvSize * 0.05 ) {
     MESSAGE( "compUVByElasticIsolines() failed: "<<sqrt(maxMove)<<">"<<minUvSize * 0.05);
@@ -2303,7 +2297,7 @@ bool SMESH_Pattern::sortSameSizeWires (TListOfEdgesList &                theWire
       list< TPoint* > & ePoints = getShapePoints( eID++ );
       TPoint* p = ePoints.front();
       if ( !compUVByIsoIntersection( theEdgesPointsList, p->myInitUV, p->myUV, aBool )) {
-        MESSAGE("cant sortSameSizeWires()");
+        MESSAGE("can't sortSameSizeWires()");
         return false;
       }
       gcVec[iW] += p->myUV;
@@ -2407,7 +2401,6 @@ bool SMESH_Pattern::Apply (const TopoDS_Face&   theFace,
                            const TopoDS_Vertex& theVertexOnKeyPoint1,
                            const bool           theReverse)
 {
-  MESSAGE(" ::Apply(face) " );
   TopoDS_Face face  = theReverse ? TopoDS::Face( theFace.Reversed() ) : theFace;
   if ( !setShapeToMesh( face ))
     return false;
@@ -2472,7 +2465,7 @@ bool SMESH_Pattern::Apply (const TopoDS_Face&   theFace,
   if ( nbWires > 1 )
   {
     // compute UV of inner edge-points using the method for in-face points
-    // and devide eList into a list of separate wires
+    // and divide eList into a list of separate wires
     bool aBool;
     list< list< TopoDS_Edge > > wireList;
     list<TopoDS_Edge>::iterator eIt = elIt;
@@ -2489,7 +2482,7 @@ bool SMESH_Pattern::Apply (const TopoDS_Face&   theFace,
         for (  pIt++; pIt != ePoints.end(); pIt++ ) {
           TPoint* p = (*pIt);
           if ( !compUVByIsoIntersection( edgesPointsList, p->myInitUV, p->myUV, aBool )) {
-            MESSAGE("cant Apply(face)");
+            MESSAGE("can't Apply(face)");
             return false;
           }
           // keep the computed UV to compare against by setFirstEdge()
@@ -2608,7 +2601,7 @@ bool SMESH_Pattern::Apply (const TopoDS_Face&   theFace,
   for ( pIt = fPoints.begin(); !isDeformed && pIt != fPoints.end(); pIt++ )
     if ( !compUVByIsoIntersection( edgesPointsList, (*pIt)->myInitUV,
                                   (*pIt)->myUV, isDeformed )) {
-      MESSAGE("cant Apply(face)");
+      MESSAGE("can't Apply(face)");
       return false;
     }
   // try to use a complex algo if it is a difficult case
@@ -2617,7 +2610,7 @@ bool SMESH_Pattern::Apply (const TopoDS_Face&   theFace,
     for ( ; pIt != fPoints.end(); pIt++ ) // continue with the simple algo
       if ( !compUVByIsoIntersection( edgesPointsList, (*pIt)->myInitUV,
                                     (*pIt)->myUV, isDeformed )) {
-        MESSAGE("cant Apply(face)");
+        MESSAGE("can't Apply(face)");
         return false;
       }
   }
@@ -2757,7 +2750,7 @@ bool SMESH_Pattern::Apply (const SMDS_MeshFace* theFace,
   for ( pIt = fPoints.begin(); !isDeformed && pIt != fPoints.end(); pIt++ )
     if ( !compUVByIsoIntersection( edgesPointsList, (*pIt)->myInitUV,
                                   (*pIt)->myUV, isDeformed )) {
-      MESSAGE("cant Apply(face)");
+      MESSAGE("can't Apply(face)");
       return false;
     }
   // try to use a complex algo if it is a difficult case
@@ -2766,7 +2759,7 @@ bool SMESH_Pattern::Apply (const SMDS_MeshFace* theFace,
     for ( ; pIt != fPoints.end(); pIt++ ) // continue with the simple algo
       if ( !compUVByIsoIntersection( edgesPointsList, (*pIt)->myInitUV,
                                     (*pIt)->myUV, isDeformed )) {
-        MESSAGE("cant Apply(face)");
+        MESSAGE("can't Apply(face)");
         return false;
       }
   }
@@ -2910,7 +2903,7 @@ bool SMESH_Pattern::Apply (SMESH_Mesh*          theMesh,
   for ( pIt = fPoints.begin(); !isDeformed && pIt != fPoints.end(); pIt++ )
     if ( !compUVByIsoIntersection( edgesPointsList, (*pIt)->myInitUV,
                                   (*pIt)->myUV, isDeformed )) {
-      MESSAGE("cant Apply(face)");
+      MESSAGE("can't Apply(face)");
       return false;
     }
   // try to use a complex algo if it is a difficult case
@@ -2919,7 +2912,7 @@ bool SMESH_Pattern::Apply (SMESH_Mesh*          theMesh,
     for ( ; pIt != fPoints.end(); pIt++ ) // continue with the simple algo
       if ( !compUVByIsoIntersection( edgesPointsList, (*pIt)->myInitUV,
                                     (*pIt)->myUV, isDeformed )) {
-        MESSAGE("cant Apply(face)");
+        MESSAGE("can't Apply(face)");
         return false;
       }
   }
@@ -3090,8 +3083,6 @@ bool SMESH_Pattern::Apply (std::set<const SMDS_MeshVolume*> & theVolumes,
                            const int                          theNode000Index,
                            const int                          theNode001Index)
 {
-  MESSAGE(" ::Apply(set<MeshVolumes>) " );
-
   if ( !IsLoaded() ) {
     MESSAGE( "Pattern not loaded" );
     return setErrorCode( ERR_APPL_NOT_LOADED );
@@ -3199,7 +3190,6 @@ bool SMESH_Pattern::Load (SMESH_Mesh*         theMesh,
                           const TopoDS_Shell& theBlock,
                           bool                theKeepNodes)
 {
-  MESSAGE(" ::Load(volume) " );
   Clear();
   myIs2D = false;
   myToKeepNodes = theKeepNodes;
@@ -3363,8 +3353,6 @@ bool SMESH_Pattern::Apply (const TopoDS_Shell&  theBlock,
                            const TopoDS_Vertex& theVertex000,
                            const TopoDS_Vertex& theVertex001)
 {
-  MESSAGE(" ::Apply(volume) " );
-
   if (!findBoundaryPoints()     || // bind ID to points
       !setShapeToMesh( theBlock )) // check theBlock is a suitable shape
     return false;
@@ -3424,8 +3412,6 @@ bool SMESH_Pattern::Apply (const SMDS_MeshVolume* theVolume,
                            const int              theNode000Index,
                            const int              theNode001Index)
 {
-  //MESSAGE(" ::Apply(MeshVolume) " );
-
   if (!findBoundaryPoints()) // bind ID to points
     return false;
 
@@ -4016,7 +4002,6 @@ bool SMESH_Pattern::MakeMesh(SMESH_Mesh* theMesh,
                              const bool  toCreatePolygons,
                              const bool  toCreatePolyedrs)
 {
-  MESSAGE(" ::MakeMesh() " );
   if ( !myIsComputed )
     return setErrorCode( ERR_MAKEM_NOT_COMPUTED );
 
@@ -4552,8 +4537,6 @@ bool SMESH_Pattern::findBoundaryPoints()
 {
   if ( myIsBoundaryPointsFound ) return true;
 
-  MESSAGE(" findBoundaryPoints() ");
-
   myNbKeyPntInBoundary.clear();
 
   if ( myIs2D )
@@ -4795,7 +4778,7 @@ bool SMESH_Pattern::setShapeToMesh(const TopoDS_Shape& theShape)
   TopAbs_ShapeEnum aType = theShape.ShapeType();
   bool dimOk = ( myIs2D ? aType == TopAbs_FACE : aType == TopAbs_SHELL );
   if ( !dimOk ) {
-    MESSAGE( "Pattern dimention mismatch" );
+    MESSAGE( "Pattern dimension mismatch" );
     return setErrorCode( ERR_APPL_BAD_DIMENTION );
   }
 
index 8b405de2138930c0edcd834f8070afa18114ef50..836cd179041360a585e80bf59de44cd0422f9754 100644 (file)
@@ -178,11 +178,11 @@ class SMESH_EXPORT SMESH_Pattern {
     ERR_LOADF_CANT_PROJECT, // impossible to project nodes
     // Load(volume)
     ERR_LOADV_BAD_SHAPE, // volume is not a brick of 6 faces
-    ERR_LOADV_COMPUTE_PARAMS, // cant compute point parameters
+    ERR_LOADV_COMPUTE_PARAMS, // can't compute point parameters
     // Apply(shape)
     ERR_APPL_NOT_COMPUTED, // mapping failed
     ERR_APPL_NOT_LOADED, // pattern was not loaded
-    ERR_APPL_BAD_DIMENTION, // wrong shape dimention
+    ERR_APPL_BAD_DIMENTION, // wrong shape dimension
     ERR_APPL_BAD_NB_VERTICES, // keypoints - vertices mismatch
     // Apply(face)
     ERR_APPLF_BAD_TOPOLOGY, // bad pattern topology
@@ -241,7 +241,7 @@ private:
   // private methods
 
   struct TPoint {
-    gp_XYZ myInitXYZ; // loaded postion
+    gp_XYZ myInitXYZ; // loaded position
     gp_XY  myInitUV;
     double myInitU; // [0,1]
     gp_Pnt myXYZ; // position to compute
@@ -260,8 +260,8 @@ private:
   std::list< TPoint* > & getShapePoints(const TopoDS_Shape& theShape);
   // Return list of points located on theShape.
   // A list of edge-points include vertex-points (for 2D pattern only).
-  // A list of face-points doesnt include edge-points.
-  // A list of volume-points doesnt include face-points.
+  // A list of face-points doesn't include edge-points.
+  // A list of volume-points doesn't include face-points.
 
   std::list< TPoint* > & getShapePoints(const int theShapeID);
   // Return list of points located on the shape
index 19f10229a442b7929e16a2c930e80312d21541e1..22fa65b99d5e44273d574cf5b00fe4a95e25ecce 100644 (file)
 
 using namespace std;
 
+#ifdef _DEBUG_
+// enable printing algo + shape id + hypo used while meshing
+//#define PRINT_WHO_COMPUTE_WHAT
+#endif
+
 //=============================================================================
 /*!
  * \brief Allocate some memory at construction and release it at destruction.
@@ -488,7 +493,7 @@ const TopoDS_Shape & SMESH_subMesh::GetSubShape() const
 //=======================================================================
 //function : CanAddHypothesis
 //purpose  : return true if theHypothesis can be attached to me:
-//           its dimention is checked
+//           its dimension is checked
 //=======================================================================
 
 bool SMESH_subMesh::CanAddHypothesis(const SMESH_Hypothesis* theHypothesis) const
@@ -510,7 +515,20 @@ bool SMESH_subMesh::CanAddHypothesis(const SMESH_Hypothesis* theHypothesis) cons
 
 //=======================================================================
 //function : IsApplicableHypotesis
-//purpose  :
+//purpose  : check if this sub-mesh can be computed using a hypothesis
+//=======================================================================
+
+bool SMESH_subMesh::IsApplicableHypotesis(const SMESH_Hypothesis* theHypothesis) const
+{
+  if ( !_father->HasShapeToMesh() && _subShape.ShapeType() == TopAbs_SOLID )
+    return true; // true for the PseudoShape
+
+  return IsApplicableHypotesis( theHypothesis, _subShape.ShapeType() );
+}
+
+//=======================================================================
+//function : IsApplicableHypotesis
+//purpose  : compare shape type and hypothesis type
 //=======================================================================
 
 bool SMESH_subMesh::IsApplicableHypotesis(const SMESH_Hypothesis* theHypothesis,
@@ -628,7 +646,7 @@ SMESH_Hypothesis::Hypothesis_Status
       filter.Or( SMESH_HypoFilter::HasType( algo->GetType()+1 ));
       filter.Or( SMESH_HypoFilter::HasType( algo->GetType()+2 ));
       if ( SMESH_Algo * curAlgo = (SMESH_Algo*)_father->GetHypothesis( this, filter, true ))
-        if ( !curAlgo->NeedDiscreteBoundary() )
+        if ( !curAlgo->NeedDiscreteBoundary() && curAlgo != anHyp )
           algoRequiringCleaning = curAlgo;
     }
   }
@@ -1436,6 +1454,31 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
           _computeState = READY_TO_COMPUTE;
       }
       break;
+
+    case COMPUTE_NOGEOM:  // no geometry; can be several algos
+      if ( !_father->HasShapeToMesh() )
+      {
+        algo = GetAlgo(); // current algo
+        if ( algo )
+        {
+          // apply algos in the order of increasing dimension
+          std::list< const SMESHDS_Hypothesis * > algos = _father->GetHypothesisList( _subShape );
+          for ( int t = SMESHDS_Hypothesis::ALGO_1D; t <= SMESHDS_Hypothesis::ALGO_3D; ++t )
+          {
+            std::list<const SMESHDS_Hypothesis *>::iterator al = algos.begin();
+            for ( ; al != algos.end(); ++al )
+              if ( (*al)->GetType() == t )
+              {
+                _algo = (SMESH_Algo*) *al;
+                _computeState = READY_TO_COMPUTE;
+                if ( !ComputeStateEngine( COMPUTE ))
+                  break;
+              }
+          }
+          _algo = algo; // restore
+        }
+        break;
+      }
     case COMPUTE:
     case COMPUTE_SUBMESH:
       {
@@ -1575,6 +1618,23 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
                    !algo->isDegenerated( TopoDS::Edge( subS.Current() ))))
               ret = false;
         }
+#ifdef PRINT_WHO_COMPUTE_WHAT
+        for (subS.ReInit(); subS.More(); subS.Next())
+        {
+          const std::list <const SMESHDS_Hypothesis *> & hyps =
+            _algo->GetUsedHypothesis( *_father, _subShape );
+          SMESH_Comment hypStr;
+          if ( !hyps.empty() )
+          {
+            hypStr << hyps.front()->GetName() << " ";
+            ((SMESHDS_Hypothesis*)hyps.front())->SaveTo( hypStr.Stream() );
+            hypStr << " ";
+          }
+          cout << _algo->GetName()
+               << " " << _father->GetSubMesh( subS.Current() )->GetId()
+               << " " << hypStr << endl;
+        }
+#endif
         // Set _computeError
         if ( !ret && !isComputeErrorSet )
         {
@@ -1708,7 +1768,7 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
     case COMPUTE_CANCELED:      // nothing to do
       break;
     case CLEAN:
-      cleanDependants();  // clean sub-meshes, dependant on this one, with event CLEAN
+      cleanDependants();  // clean sub-meshes, dependent on this one, with event CLEAN
       removeSubMeshElementsAndNodes();
       _computeState = NOT_READY;
       if ( _algoState == HYP_OK )
@@ -2157,8 +2217,6 @@ const SMESH_Hypothesis* SMESH_subMesh::getSimilarAttached(const TopoDS_Shape&
 SMESH_Hypothesis::Hypothesis_Status
   SMESH_subMesh::CheckConcurentHypothesis (const int theHypType)
 {
-  MESSAGE ("SMESH_subMesh::CheckConcurentHypothesis");
-
   // is there local hypothesis on me?
   if ( getSimilarAttached( _subShape, 0, theHypType ) )
     return SMESH_Hypothesis::HYP_OK;
@@ -2328,7 +2386,7 @@ EventListenerData* SMESH_subMesh::GetEventListenerData(const string& listenerNam
 
 //================================================================================
 /*!
- * \brief Notify stored event listeners on the occured event
+ * \brief Notify stored event listeners on the occurred event
  * \param event - algo_event or compute_event itself
  * \param eventType - algo_event or compute_event
  * \param hyp - hypothesis, if eventType is algo_event
@@ -2434,7 +2492,7 @@ void SMESH_subMesh::loadDependentMeshes()
  * \brief Do something on a certain event
  * \param event - algo_event or compute_event itself
  * \param eventType - algo_event or compute_event
- * \param subMesh - the submesh where the event occures
+ * \param subMesh - the submesh where the event occurs
  * \param data - listener data stored in the subMesh
  * \param hyp - hypothesis, if eventType is algo_event
  * 
index 05890e8cef1ac776e7bab1caee33890127abb1ef..ef3cb629f46f3da9e982fa4f59f3bcfb81e9f01c 100644 (file)
@@ -112,7 +112,7 @@ class SMESH_EXPORT SMESH_subMesh
   };
   enum compute_event
   {
-    MODIF_ALGO_STATE, COMPUTE, COMPUTE_SUBMESH, COMPUTE_CANCELED,
+    MODIF_ALGO_STATE, COMPUTE, COMPUTE_SUBMESH, COMPUTE_NOGEOM, COMPUTE_CANCELED,
     CLEAN, SUBMESH_COMPUTED, SUBMESH_RESTORED, SUBMESH_LOADED,
     MESH_ENTITY_REMOVED, CHECK_COMPUTE_STATE
   };
@@ -190,7 +190,7 @@ protected:
   void setEventListener(EventListener* listener, EventListenerData* data);
 
   /*!
-   * \brief Notify stored event listeners on the occured event
+   * \brief Notify stored event listeners on the occurred event
    * \param event - algo_event or compute_event itself
    * \param eventType - algo_event or compute_event
    * \param hyp - hypothesis, if eventType is algo_event
@@ -236,13 +236,12 @@ public:
 
   bool CanAddHypothesis(const SMESH_Hypothesis* theHypothesis) const;
   // return true if theHypothesis can be attached to me:
-  // its dimention is checked
+  // its dimension is checked
 
   static bool IsApplicableHypotesis(const SMESH_Hypothesis* theHypothesis,
                                     const TopAbs_ShapeEnum  theShapeType);
 
-  bool IsApplicableHypotesis(const SMESH_Hypothesis* theHypothesis) const
-  { return IsApplicableHypotesis( theHypothesis, _subShape.ShapeType() ); }
+  bool IsApplicableHypotesis(const SMESH_Hypothesis* theHypothesis) const;
   // return true if theHypothesis can be used to mesh me:
   // its shape type is checked
   
index 222f3e5c2606a9a68afc74930f99f729748b2557..ad07dd4d2d20e81360e7705b4d9f402d2f933066 100644 (file)
@@ -62,7 +62,7 @@ class SMESH_EXPORT SMESH_subMeshEventListener
    * \brief Do something on a certain event
    * \param event - algo_event or compute_event itself (of SMESH_subMesh)
    * \param eventType - ALGO_EVENT or COMPUTE_EVENT (of SMESH_subMesh)
-   * \param subMesh - the submesh where the event occures
+   * \param subMesh - the submesh where the event occurs
    * \param data - listener data stored in the subMesh
    * \param hyp - hypothesis, if eventType is algo_event
    * 
index b153ac73d75b7fd3cdf5437ccc1256a021aab9cb..ef953601fd8e7e51376ec621764f860dd98fb7d9 100644 (file)
 #ifndef _MEMOIRE_H_
 #define _MEMOIRE_H_
 
+#ifdef __APPLE__
+#include <stdlib.h>
+#else
 #include <malloc.h>
+#endif
 #include <iostream>
 
 void memostat(const char* f, int l);
 
 void memostat(const char* f, int l)
 {
-#ifdef WIN32
+#if defined WIN32 || defined __APPLE__
         //rnv: TODO: find alternative of the malloc_stats() on windows platform
 #else
   struct mallinfo mem = mallinfo();
index 818c52009306bfed4f4b76d5096f4f8543377c49..7d4d10fdfc9f41f8fff17b1f3db466370501b952 100644 (file)
@@ -124,6 +124,9 @@ int SMESHDS_GroupBase::Extent() const
 
 bool SMESHDS_GroupBase::IsEmpty()
 {
+  if ( myMesh->GetMeshInfo().NbElements( myType ) == 0 )
+    // avoid long iteration over sub-meshes of a complex sub-mesh of a group on geometry
+    return false;
   SMDS_ElemIteratorPtr it = GetElements();
   return ( !it || !it->more() );
 }
index 366df239946ac4445d65e5ce71726c6fa572e4e0..9c13dc614113d2824e11ac6ec456504415e8a7f0 100644 (file)
@@ -21,7 +21,6 @@
 # additional include directories
 INCLUDE_DIRECTORIES(
   ${CAS_INCLUDE_DIRS}
-  ${QT_INCLUDES}
   ${PYTHON_INCLUDE_DIRS}
   ${VTK_INCLUDE_DIRS}
   ${KERNEL_INCLUDE_DIRS}
index 1803c634dfa3d4da6cf9b6304aaa1601b722bffb..526b6c6500b2b1b0e4a8d2567e86a45669ec2d7e 100644 (file)
@@ -215,29 +215,34 @@ namespace
     QStringList filter;
     std::string myExtension;
 
-    if ( theCommandID == SMESHOp::OpImportMED ) {
+    if ( theCommandID == SMESHOp::OpImportMED ||
+         theCommandID == SMESHOp::OpPopupImportMED ) {
       filter.append( QObject::tr( "MED_FILES_FILTER" ) + " (*.*med)" );
       filter.append( QObject::tr( "ALL_FILES_FILTER" ) + " (*)" );
     }
-    else if ( theCommandID == SMESHOp::OpImportUNV ) {
+    else if ( theCommandID == SMESHOp::OpImportUNV ||
+              theCommandID == SMESHOp::OpPopupImportUNV ) {
       filter.append( QObject::tr( "IDEAS_FILES_FILTER" ) + " (*.unv)" );
     }
-    else if ( theCommandID == SMESHOp::OpImportDAT ) {
+    else if ( theCommandID == SMESHOp::OpImportDAT ||
+              theCommandID == SMESHOp::OpPopupImportDAT ) {
       filter.append( QObject::tr( "DAT_FILES_FILTER" ) + " (*.dat)" );
     }
-    else if ( theCommandID == SMESHOp::OpImportSTL ) {
+    else if ( theCommandID == SMESHOp::OpImportSTL ||
+              theCommandID == SMESHOp::OpPopupImportSTL ) {
       filter.append( QObject::tr( "STL_FILES_FILTER" ) + " (*.stl)" );
     }
-  #ifdef WITH_CGNS
-    else if ( theCommandID == SMESHOp::OpImportCGNS ) {
+    else if ( theCommandID == SMESHOp::OpImportCGNS ||
+              theCommandID == SMESHOp::OpPopupImportCGNS ) {
       filter.append( QObject::tr( "CGNS_FILES_FILTER" ) + " (*.cgns)" );
     }
-  #endif
-    else if ( theCommandID == SMESHOp::OpImportSAUV ) {
+    else if ( theCommandID == SMESHOp::OpImportSAUV ||
+              theCommandID == SMESHOp::OpPopupImportSAUV ) {
       filter.append( QObject::tr( "SAUV files (*.sauv*)" ) );
       filter.append( QObject::tr( "All files (*)" ) );
     }
-    else if ( theCommandID == SMESHOp::OpImportGMF ) {
+    else if ( theCommandID == SMESHOp::OpImportGMF ||
+              theCommandID == SMESHOp::OpPopupImportGMF ) {
       filter.append( QObject::tr( "GMF_ASCII_FILES_FILTER" ) + " (*.mesh)"  );
       filter.append( QObject::tr( "GMF_BINARY_FILES_FILTER") + " (*.meshb)" );
     }
@@ -283,6 +288,7 @@ namespace
         try {
           switch ( theCommandID ) {
           case SMESHOp::OpImportDAT:
+          case SMESHOp::OpPopupImportDAT:
             {
               // DAT format (currently unsupported)
               errors.append( QString( "%1 :\n\t%2" ).arg( filename ).
@@ -290,6 +296,7 @@ namespace
               break;
             }
           case SMESHOp::OpImportUNV:
+          case SMESHOp::OpPopupImportUNV:
             {
               // UNV format
               aMeshes->length( 1 );
@@ -300,6 +307,7 @@ namespace
               break;
             }
           case SMESHOp::OpImportMED:
+          case SMESHOp::OpPopupImportMED:
             {
               // MED format
               SMESH::DriverMED_ReadStatus res;
@@ -311,6 +319,7 @@ namespace
               break;
             }
           case SMESHOp::OpImportSTL:
+          case SMESHOp::OpPopupImportSTL:
             {
               // STL format
               aMeshes->length( 1 );
@@ -321,8 +330,8 @@ namespace
               }
               break;
             }
-        #ifdef WITH_CGNS
           case SMESHOp::OpImportCGNS:
+          case SMESHOp::OpPopupImportCGNS:
             {
               // CGNS format
               SMESH::DriverMED_ReadStatus res;
@@ -333,8 +342,8 @@ namespace
               }
               break;
             }
-        #endif
           case SMESHOp::OpImportSAUV:
+          case SMESHOp::OpPopupImportSAUV:
             {
               // SAUV format
               SMESH::DriverMED_ReadStatus res;
@@ -346,6 +355,7 @@ namespace
               break;
             }
           case SMESHOp::OpImportGMF:
+          case SMESHOp::OpPopupImportGMF:
             {
               // GMF format
               SMESH::ComputeError_var res;
@@ -433,12 +443,8 @@ namespace
                          theCommandID == SMESHOp::OpPopupExportUNV );
     const bool isSTL = ( theCommandID == SMESHOp::OpExportSTL ||
                          theCommandID == SMESHOp::OpPopupExportSTL );
-#ifdef WITH_CGNS
     const bool isCGNS= ( theCommandID == SMESHOp::OpExportCGNS ||
                          theCommandID == SMESHOp::OpPopupExportCGNS );
-#else
-    const bool isCGNS= false;
-#endif
     const bool isSAUV= ( theCommandID == SMESHOp::OpExportSAUV ||
                          theCommandID == SMESHOp::OpPopupExportSAUV );
     const bool isGMF = ( theCommandID == SMESHOp::OpExportGMF ||
@@ -467,10 +473,14 @@ namespace
                                   QObject::tr( "SMESH_BAD_MESH_SELECTION" ));
         return;
       }
-      SMESH::SMESH_GroupBase_var aGroup   = SMESH::SMESH_GroupBase::_narrow( aMeshItem );
-      if ( aCheckWarn && !aGroup->_is_nil() ) {
-        QMessageBox msgBox(SUIT_MessageBox::Warning,QObject::tr("SMESH_WRN_WARNING"),
-                            QObject::tr("SMESH_EXPORT_ONLY_GPOUP"),QMessageBox::StandardButton::NoButton, SMESHGUI::desktop());
+      SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( aMeshItem );
+      if ( aCheckWarn && !aGroup->_is_nil() )
+      {
+        QMessageBox msgBox(SUIT_MessageBox::Warning,
+                           QObject::tr("SMESH_WRN_WARNING"),
+                           QObject::tr("SMESH_EXPORT_ONLY_GPOUP"),
+                           QMessageBox::StandardButton::NoButton,
+                           SMESHGUI::desktop());
         QCheckBox dontShowCheckBox(QObject::tr("SMESH_WRN_SHOW_DLG_CHECKBOX"));
         msgBox.addButton(QMessageBox::Ok);
         msgBox.addButton(QMessageBox::Cancel);
@@ -481,12 +491,12 @@ namespace
         lt->addWidget(btnbox, lt->rowCount(), 0, lt->rowCount(), lt->columnCount());
         if(msgBox.exec() == QMessageBox::Ok)
         {
-            if(dontShowCheckBox.checkState() == Qt::Checked)
-            {
-              if ( resMgr )
-                resMgr->setValue( "SMESH", "show_warning", false);
-            }
-            aCheckWarn = false;
+          if(dontShowCheckBox.checkState() == Qt::Checked)
+          {
+            if ( resMgr )
+              resMgr->setValue( "SMESH", "show_warning", false);
+          }
+          aCheckWarn = false;
         }
         else
           return;
@@ -2447,11 +2457,16 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
   case SMESHOp::OpImportUNV:
   case SMESHOp::OpImportMED:
   case SMESHOp::OpImportSTL:
-#ifdef WITH_CGNS
   case SMESHOp::OpImportCGNS:
-#endif
   case SMESHOp::OpImportSAUV:
   case SMESHOp::OpImportGMF:
+  case SMESHOp::OpPopupImportDAT:
+  case SMESHOp::OpPopupImportUNV:
+  case SMESHOp::OpPopupImportMED:
+  case SMESHOp::OpPopupImportSTL:
+  case SMESHOp::OpPopupImportCGNS:
+  case SMESHOp::OpPopupImportSAUV:
+  case SMESHOp::OpPopupImportGMF:
     {
       if(checkLock(aStudy)) break;
       ::ImportMeshesFromFile(GetSMESHGen(),theCommandID);
@@ -2480,18 +2495,14 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
   case SMESHOp::OpExportMED:
   case SMESHOp::OpExportUNV:
   case SMESHOp::OpExportSTL:
-#ifdef WITH_CGNS
   case SMESHOp::OpExportCGNS:
-#endif
   case SMESHOp::OpExportSAUV:
   case SMESHOp::OpExportGMF:
   case SMESHOp::OpPopupExportDAT:
   case SMESHOp::OpPopupExportMED:
   case SMESHOp::OpPopupExportUNV:
   case SMESHOp::OpPopupExportSTL:
-#ifdef WITH_CGNS
   case SMESHOp::OpPopupExportCGNS:
-#endif
   case SMESHOp::OpPopupExportSAUV:
   case SMESHOp::OpPopupExportGMF:
     {
@@ -2667,9 +2678,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       extractContainers( sel_objects, to_process );
 
       try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
         OCC_CATCH_SIGNALS;
-#endif
         if (vtkwnd) {
           SALOME_ListIteratorOfListIO It( to_process );
           for ( ; It.More(); It.Next())
@@ -3817,13 +3826,21 @@ void SMESHGUI::initialize( CAM_Application* app )
   //createSMESHAction(  SMESHOp::OpImportDAT, "IMPORT_DAT", "", (Qt::CTRL+Qt::Key_B) );
   createSMESHAction( SMESHOp::OpImportUNV, "IMPORT_UNV", "", (Qt::CTRL+Qt::Key_I) );
   createSMESHAction( SMESHOp::OpImportMED, "IMPORT_MED", "", (Qt::CTRL+Qt::Key_M) );
-  //createSMESHAction(  114, "NUM" );
   createSMESHAction( SMESHOp::OpImportSTL, "IMPORT_STL"  );
 #ifdef WITH_CGNS
   createSMESHAction( SMESHOp::OpImportCGNS, "IMPORT_CGNS" );
 #endif
   createSMESHAction( SMESHOp::OpImportSAUV, "IMPORT_SAUV" );
   createSMESHAction( SMESHOp::OpImportGMF,  "IMPORT_GMF"  );
+  createSMESHAction( SMESHOp::OpPopupImportUNV, "IMPORT_UNV");
+  createSMESHAction( SMESHOp::OpPopupImportMED, "IMPORT_MED");
+  createSMESHAction( SMESHOp::OpPopupImportSTL, "IMPORT_STL"  );
+#ifdef WITH_CGNS
+  createSMESHAction( SMESHOp::OpPopupImportCGNS, "IMPORT_CGNS" );
+#endif
+  createSMESHAction( SMESHOp::OpPopupImportSAUV, "IMPORT_SAUV" );
+  createSMESHAction( SMESHOp::OpPopupImportGMF,  "IMPORT_GMF"  );
+
   createSMESHAction( SMESHOp::OpExportDAT,  "DAT" );
   createSMESHAction( SMESHOp::OpExportMED,  "MED" );
   createSMESHAction( SMESHOp::OpExportUNV,  "UNV" );
@@ -3853,7 +3870,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createSMESHAction( SMESHOp::OpBuildCompoundMesh,    "BUILD_COMPOUND",          "ICON_BUILD_COMPOUND" );
   createSMESHAction( SMESHOp::OpCopyMesh,             "COPY_MESH",               "ICON_COPY_MESH" );
   createSMESHAction( SMESHOp::OpCompute,              "COMPUTE",                 "ICON_COMPUTE" );
-  createSMESHAction( SMESHOp::OpComputeSubMesh,        "COMPUTE_SUBMESH",         "ICON_COMPUTE" );
+  createSMESHAction( SMESHOp::OpComputeSubMesh,       "COMPUTE_SUBMESH",         "ICON_COMPUTE" );
   createSMESHAction( SMESHOp::OpPreCompute,           "PRECOMPUTE",              "ICON_PRECOMPUTE" );
   createSMESHAction( SMESHOp::OpEvaluate,             "EVALUATE",                "ICON_EVALUATE" );
   createSMESHAction( SMESHOp::OpMeshOrder,            "MESH_ORDER",              "ICON_MESH_ORDER");
@@ -3866,8 +3883,8 @@ void SMESHGUI::initialize( CAM_Application* app )
   createSMESHAction( SMESHOp::OpIntersectGroups,      "INT_GROUP",               "ICON_INTERSECT" );
   createSMESHAction( SMESHOp::OpCutGroups,            "CUT_GROUP",               "ICON_CUT" );
   createSMESHAction( SMESHOp::OpGroupUnderlyingElem,  "UNDERLYING_ELEMS",        "ICON_UNDERLYING_ELEMS" );
-  createSMESHAction( SMESHOp::OpAddElemGroupPopup,    "ADD" );
-  createSMESHAction( SMESHOp::OpRemoveElemGroupPopup, "REMOVE" );
+  createSMESHAction( SMESHOp::OpAddElemGroupPopup,    "ADD_TO_GROUP" );
+  createSMESHAction( SMESHOp::OpRemoveElemGroupPopup, "REMOVE_FROM_GROUP" );
   createSMESHAction( SMESHOp::OpDeleteGroup,          "DEL_GROUP",               "ICON_DEL_GROUP" );
   createSMESHAction( SMESHOp::OpMeshInformation ,     "ADV_INFO",                "ICON_ADV_INFO" );
   //createSMESHAction( SMESHOp::OpStdInfo, "STD_INFO",        "ICON_STD_INFO" );
@@ -3901,7 +3918,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createSMESHAction( SMESHOp::OpBareBorderVolume,      "BARE_BORDER_VOLUME",      "ICON_BARE_BORDER_VOLUME",      0, true );
   createSMESHAction( SMESHOp::OpOverConstrainedVolume, "OVER_CONSTRAINED_VOLUME", "ICON_OVER_CONSTRAINED_VOLUME", 0, true );
   createSMESHAction( SMESHOp::OpEqualVolume,           "EQUAL_VOLUME",            "ICON_EQUAL_VOLUME",  0, true );
-  createSMESHAction( SMESHOp::OpOverallMeshQuality,    "OVERALL_MESH_QUALITY" );
+  createSMESHAction( SMESHOp::OpOverallMeshQuality,    "OVERALL_MESH_QUALITY",    "ICON_OVL_MESH_QUALITY" );
 
   createSMESHAction( SMESHOp::OpNode,                   "NODE",            "ICON_DLG_NODE" );
   createSMESHAction( SMESHOp::OpElem0D,                 "ELEM0D",          "ICON_DLG_ELEM0D" );
@@ -4003,8 +4020,8 @@ void SMESHGUI::initialize( CAM_Application* app )
   createSMESHAction( SMESHOp::OpPropertiesArea,   "MEASURE_AREA",     "ICON_MEASURE_AREA" );
   createSMESHAction( SMESHOp::OpPropertiesVolume, "MEASURE_VOLUME",   "ICON_MEASURE_VOLUME" );
 
-  createSMESHAction( SMESHOp::OpHide,     "HIDE" );
-  createSMESHAction( SMESHOp::OpShow,     "SHOW" );
+  createSMESHAction( SMESHOp::OpHide,     "HIDE", "ICON_HIDE" );
+  createSMESHAction( SMESHOp::OpShow,     "SHOW", "ICON_SHOW" );
   createSMESHAction( SMESHOp::OpShowOnly, "DISPLAY_ONLY" );
 
   createSMESHAction( SMESHOp::OpSortChild, "SORT_CHILD_ITEMS" );
@@ -4360,6 +4377,7 @@ void SMESHGUI::initialize( CAM_Application* app )
     group   = pat.arg( SMESHGUI_Selection::typeName( SMESH::GROUP ) ),
     hypo    = pat.arg( SMESHGUI_Selection::typeName( SMESH::HYPOTHESIS ) ),
     algo    = pat.arg( SMESHGUI_Selection::typeName( SMESH::ALGORITHM ) ),
+    smesh   = pat.arg( SMESHGUI_Selection::typeName( SMESH::COMPONENT ) ),
     elems   = QString( "'%1' '%2' '%3' '%4' '%5' '%6'" ).
     arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_VERTEX ) ).
     arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_EDGE ) ).
@@ -4383,6 +4401,7 @@ void SMESHGUI::initialize( CAM_Application* app )
     hasNodes("(numberOfNodes > 0 ) && hasActor"),
     hasElems("(count( elemTypes ) > 0)"),
     hasDifferentElems("(count( elemTypes ) > 1)"),
+    hasDifferentObjElems("(count( objElemTypes ) > 1)"),
     hasBalls("({'BallElem'} in elemTypes)"),
     hasElems0d("({'Elem0d'} in elemTypes)"),
     hasEdges("({'Edge'} in elemTypes)"),
@@ -4437,12 +4456,23 @@ void SMESHGUI::initialize( CAM_Application* app )
   createPopupItem( SMESHOp::OpPopupExportDAT,  OB, mesh_group, only_one_non_empty, anId );
   createPopupItem( SMESHOp::OpDelete,          OB, mesh_part + " " + hyp_alg );
   createPopupItem( SMESHOp::OpDeleteGroup,     OB, group );
+
+  anId = popupMgr()->insert( tr( "MEN_IMPORT" ), -1, -1 );        // IMPORT submenu
+  createPopupItem( SMESHOp::OpPopupImportMED,  OB, smesh, "", anId );
+  createPopupItem( SMESHOp::OpPopupImportUNV,  OB, smesh, "", anId );
+  createPopupItem( SMESHOp::OpPopupImportSTL,  OB, smesh, "", anId );
+#ifdef WITH_CGNS
+  createPopupItem( SMESHOp::OpPopupImportCGNS, OB, smesh, "", anId );
+#endif
+  createPopupItem( SMESHOp::OpPopupImportSAUV, OB, smesh, "", anId );
+  createPopupItem( SMESHOp::OpPopupImportGMF,  OB, smesh, "", anId );
+  createPopupItem( SMESHOp::OpPopupImportDAT,  OB, smesh, "", anId );
   popupMgr()->insert( separator(), -1, 0 );
 
   // popup for viewer
   createPopupItem( SMESHOp::OpEditGroup,            View, group );
-  createPopupItem( SMESHOp::OpAddElemGroupPopup,    View, elems );
-  createPopupItem( SMESHOp::OpRemoveElemGroupPopup, View, elems );
+  createPopupItem( SMESHOp::OpAddElemGroupPopup,    View, elems, "&& guiState = 800" );
+  createPopupItem( SMESHOp::OpRemoveElemGroupPopup, View, elems, "&& guiState = 800" );
 
   popupMgr()->insert( separator(), -1, 0 );
   createPopupItem( SMESHOp::OpUpdate,             View, mesh_part );
@@ -4493,7 +4523,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   popupMgr()->setRule( action( SMESHOp::OpDMShading ), "displayMode = 'eSurface'", QtxPopupMgr::ToggleRule );
 
   popupMgr()->insert( action( SMESHOp::OpDMNodes ), anId, -1 );
-  popupMgr()->setRule( action( SMESHOp::OpDMNodes ), aMeshInVTK + "&&" + hasNodes, QtxPopupMgr::VisibleRule );
+  popupMgr()->setRule( action( SMESHOp::OpDMNodes ), aMeshInVTK + "&&" + hasNodes + "&&" + hasElems, QtxPopupMgr::VisibleRule );
   popupMgr()->setRule( action( SMESHOp::OpDMNodes ), "displayMode = 'ePoint'", QtxPopupMgr::ToggleRule );
 
   popupMgr()->insert( separator(), anId, -1 );
@@ -4532,7 +4562,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   popupMgr()->insert( separator(), anId, -1 );
 
   popupMgr()->insert( action( SMESHOp::OpDEChoose ), anId, -1 );
-  popupMgr()->setRule( action( SMESHOp::OpDEChoose ), aClient + "&& $type in {" + mesh + "} &&" + isNotEmpty, QtxPopupMgr::VisibleRule );
+  popupMgr()->setRule( action( SMESHOp::OpDEChoose ), aClient + "&& $type in {" + mesh + "} &&" + hasDifferentObjElems, QtxPopupMgr::VisibleRule );
 
   popupMgr()->insert( separator(), anId, -1 );
 
@@ -4575,9 +4605,9 @@ void SMESHGUI::initialize( CAM_Application* app )
   // Controls
   //-------------------------------------------------
   QString
-    aMeshInVtkHasNodes = aMeshInVTK + "&&" + hasNodes,
-    aMeshInVtkHasEdges = aMeshInVTK + "&&" + hasEdges,
-    aMeshInVtkHasFaces = aMeshInVTK + "&&" + hasFaces,
+    aMeshInVtkHasNodes   = aMeshInVTK + "&&" + hasNodes,
+    aMeshInVtkHasEdges   = aMeshInVTK + "&&" + hasEdges,
+    aMeshInVtkHasFaces   = aMeshInVTK + "&&" + hasFaces,
     aMeshInVtkHasVolumes = aMeshInVTK + "&&" + hasVolumes;
 
   anId = popupMgr()->insert( tr( "MEN_CTRL" ), -1, -1 );
@@ -5483,7 +5513,7 @@ void SMESHGUI::update( const int flags )
 /*!
  * \brief Set default selection mode
 *
-* SLOT called when operation commited. Sets default selection mode
+* SLOT called when operation committed. Sets default selection mode
 */
 //================================================================================
 void SMESHGUI::onOperationCommited( SUIT_Operation* )
@@ -5805,7 +5835,7 @@ void SMESHGUI::storeVisualParameters (int savePoint)
                 Handle(SALOME_InteractiveObject) io = aSmeshActor->getIO();
                 if (io->hasEntry())
                 {
-                  // entry is "encoded" = it does NOT contain component adress,
+                  // entry is "encoded" = it does NOT contain component address,
                   // since it is a subject to change on next component loading
                   std::string entry = ip->encodeEntry(io->getEntry(), componentName);
 
@@ -6206,7 +6236,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
 
   for (std::vector<std::string>::iterator entIt = entries.begin(); entIt != entries.end(); ++entIt)
   {
-    // entry is a normal entry - it should be "decoded" (setting base adress of component)
+    // entry is a normal entry - it should be "decoded" (setting base address of component)
     QString entry (ip->decodeEntry(*entIt).c_str());
 
     // Check that the entry corresponds to a real object in the Study
index 1cf6e353b9102a2832d14363983e8cddf24d0820..92a51bf56bb073f03f6c8a6dec22384d713d0f44 100644 (file)
@@ -115,6 +115,7 @@ public :
 
   void                            ResetState();
   void                            SetState( int );
+  int                             GetState() const { return myState; }
   bool                            DefineDlgPosition( QWidget*, int&, int& );
   void                            switchToOperation( int );
 
index 0f6172b0565506a732e4237573ed02707a56e458..aac578ba22440c023b86bdbc78fd84907d199f1c 100644 (file)
@@ -135,7 +135,7 @@ SMESHGUI_BuildCompoundDlg::SMESHGUI_BuildCompoundDlg( SMESHGUI* theModule )
   CheckBoxMerge = new QCheckBox(tr("MERGE_NODES_AND_ELEMENTS"), GroupArgs);
 
   TextLabelTol = new QLabel(tr("SMESH_TOLERANCE"), GroupArgs);
-  TextLabelTol->setAlignment(Qt::AlignCenter);
+  //TextLabelTol->setAlignment(Qt::AlignCenter);
   SpinBoxTol = new SMESHGUI_SpinBox(GroupArgs);
   SpinBoxTol->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, "len_tol_precision" );
 
@@ -146,8 +146,8 @@ SMESHGUI_BuildCompoundDlg::SMESHGUI_BuildCompoundDlg( SMESHGUI* theModule )
   GroupArgsLayout->addWidget(ComboBoxUnion,   1, 3);
   GroupArgsLayout->addWidget(CheckBoxCommon,  2, 0, 1, 4);
   GroupArgsLayout->addWidget(CheckBoxMerge,   3, 0, 1, 4);
-  GroupArgsLayout->addWidget(TextLabelTol,    4, 0, 1, 2);
-  GroupArgsLayout->addWidget(SpinBoxTol,      4, 2, 1, 2);
+  GroupArgsLayout->addWidget(TextLabelTol,    4, 0);
+  GroupArgsLayout->addWidget(SpinBoxTol,      4, 1, 1, 3);
 
   /***************************************************************/
   GroupButtons = new QGroupBox(this);
@@ -289,6 +289,8 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
   if (!isValid())
     return false;
 
+  SUIT_OverrideCursor aWaitCursor;
+
   SMESH::SMESH_Mesh_var aMesh;
 
   if (!myMesh->_is_nil())
@@ -298,7 +300,6 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
 
     QStringList anEntryList;
     try {
-      SUIT_OverrideCursor aWaitCursor;
 
       aMesh = myMeshArray[0]->GetMesh();
       aMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
index 09c3a39420f869d27685f798771776cca1b77fbf..d7d455b6d79cf5dd58d9cb0247e70e8f802e4cb9 100644 (file)
@@ -1086,6 +1086,8 @@ void SMESHGUI_ClippingDlg::updateActorList()
   std::for_each( myPlanes.begin(),myPlanes.end(), TSetVisibility( PreviewCheckBox->isChecked() ) );
   aPlaneData.Plane.GetPointer()->myActor->SetVisibility( false );
 
+  std::map< std::string, QListWidgetItem* > itemMap; // used to sort items by entry
+
   VTK::ActorCollectionCopy aCopy( myViewWindow->getRenderer()->GetActors() );
   vtkActorCollection* anAllActors = aCopy.GetActors();
   anAllActors->InitTraversal();
@@ -1111,13 +1113,20 @@ void SMESHGUI_ClippingDlg::updateActorList()
           if ( !aFatherName.isEmpty() )
             aName = aFatherName + " / " + aName;
           aName += QString(" (%1)").arg( aSObj->GetID().c_str() );
-          QListWidgetItem* anItem = new ActorItem( anActor, aName, ActorList );
+          QListWidgetItem* anItem = new ActorItem( anActor, aName, 0 );
           anItem->setCheckState( anIsChecked ? Qt::Checked : Qt::Unchecked );
-          updateActorItem( anItem, true, false );
+          itemMap.insert( std::make_pair( aSObj->GetID(), anItem ));
         }
       }
     }
   }
+  std::map< std::string, QListWidgetItem* >::iterator s2i = itemMap.begin();
+  for ( ; s2i != itemMap.end(); ++s2i )
+  {
+    QListWidgetItem* anItem = s2i->second;
+    ActorList->addItem( anItem );
+  }
+  updateActorItem( 0, true, false );
 }
 
 /*!
@@ -1258,16 +1267,19 @@ void SMESHGUI_ClippingDlg::ClickOnNew()
     SMESH::OrientedPlane* aPlane = SMESH::OrientedPlane::New(myViewWindow);
     SMESH::TPlane aTPlane(aPlane);
     aPlane->PlaneMode = CurrentMode;
-    SMESH::TActorList anActorList;
+    SMESH::TActorList anActorList, aVisibleActorList;
     VTK::ActorCollectionCopy aCopy( myViewWindow->getRenderer()->GetActors() );
     vtkActorCollection* anAllActors = aCopy.GetActors();
     anAllActors->InitTraversal();
     while( vtkActor* aVTKActor = anAllActors->GetNextActor() )
       if( SMESH_Actor* anActor = SMESH_Actor::SafeDownCast( aVTKActor ) )
+      {
         anActorList.push_back( anActor );
-
-    SMESH::TPlaneData aPlaneData(aTPlane, anActorList);
-
+        if ( anActor->GetVisibility() )
+          aVisibleActorList.push_back( anActor );
+      }
+    SMESH::TPlaneData aPlaneData(aTPlane,
+                                 aVisibleActorList.empty() ? anActorList : aVisibleActorList);
     myPlanes.push_back(aPlaneData);
 
 
index 072b481752a647c102876e2dcfde1d6e226e7315..5a32503a1ae6f702a5a77476fc44675e3a1cbbc8 100644 (file)
@@ -54,6 +54,7 @@
 #include <SUIT_Session.h>
 #include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
+#include <SVTK_Renderer.h>
 #include <SalomeApp_Application.h>
 
 // SALOME KERNEL includes
 
 // VTK includes
 #include <vtkProperty.h>
+#include <vtkRenderer.h>
 
 // STL includes
 #include <vector>
 #include <set>
 
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
 #include <sys/sysinfo.h>
 #endif
 
@@ -784,7 +786,7 @@ SMESHGUI_ComputeDlg_QThreadQDialog(QWidget             * parent,
   QLabel * nbElemsName = new QLabel(tr("SMESH_MESHINFO_ELEMENTS"), this );
   nbNodesLabel = new QLabel("0", this );
   nbElemsLabel = new QLabel("0", this );
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
   QLabel * freeRAMName = new QLabel(tr("SMESH_FREERAM"), this );
   freeRAMLabel = new QLabel("", this );
 #endif
@@ -800,7 +802,7 @@ SMESHGUI_ComputeDlg_QThreadQDialog(QWidget             * parent,
   layout->addWidget(nbNodesLabel, row++, 1);
   layout->addWidget(nbElemsName,  row,   0);
   layout->addWidget(nbElemsLabel, row++, 1);
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
   layout->addWidget(freeRAMName,  row,   0);
   layout->addWidget(freeRAMLabel, row++, 1);
 #endif
@@ -840,7 +842,7 @@ void SMESHGUI_ComputeDlg_QThreadQDialog::timerEvent(QTimerEvent *event)
   {
     nbNodesLabel->setText( QString("%1").arg( qthread.getMesh()->NbNodes() ));
     nbElemsLabel->setText( QString("%1").arg( qthread.getMesh()->NbElements() ));
-#ifndef WIN32
+#if !defined WIN32 && !defined __APPLE__
     struct sysinfo si;
     const int err = sysinfo( &si );
     if ( err )
@@ -1009,6 +1011,10 @@ void SMESHGUI_BaseComputeOp::computeMesh()
                 ( (*anIter).second->GetID().c_str(), "SMESH", (*anIter).second->GetName().c_str() );
               SMESH::Update(anIO, toDisplay);
 
+              if ( SVTK_ViewWindow* vtkWnd = SMESH::GetVtkViewWindow(SMESH::GetActiveWindow() ))
+                if ( vtkWnd->getRenderer() )
+                  vtkWnd->getRenderer()->ResetCameraClippingRange();
+
               if ( limitExceeded && !aMesh->_is_nil() )
               {
                 QStringList hiddenMsg;
@@ -1766,7 +1772,7 @@ void SMESHGUI_PrecomputeOp::initDialog()
 
 //================================================================================
 /*!
- * \brief detect asigned mesh algorithms
+ * \brief detect assigned mesh algorithms
  */
 //================================================================================
 
index 6627b417af6d794901769676461aba1f1a87c6d8..0f061100302b716a540192067a33ada86f45e197 100755 (executable)
@@ -244,7 +244,7 @@ SMESHGUI_CreatePatternDlg::~SMESHGUI_CreatePatternDlg()
 
 //=======================================================================
 // function : onProject()
-// purpose  : SLOT. Called when state of "Project nodes on ther face"
+// purpose  : SLOT. Called when state of "Project nodes on other face"
 //            checkbox is changed
 //=======================================================================
 void SMESHGUI_CreatePatternDlg::onProject( bool )
@@ -636,7 +636,7 @@ void SMESHGUI_CreatePatternDlg::onDeactivate()
 //=======================================================================
 void SMESHGUI_CreatePatternDlg::enterEvent( QEvent* )
 {
-  // there is a stange problem that enterEvent() comes after onSave()
+  // there is a strange problem that enterEvent() comes after onSave()
   if ( isVisible () ) {
     mySMESHGUI->EmitSignalDeactivateDialog();
     setEnabled( true );
index 330bd429ec731a54f8ad19cafa02155c20d35223..e0fe05b0185c24ec099db350231db20e33403ac6 100644 (file)
@@ -79,7 +79,7 @@ private:
     
   bool                     isValid();
   
-  int                      checkEditLine( bool = true ); /*! Checking for indices, return 1 if all ok, esle -1*/
+  int                      checkEditLine( bool = true ); /*! Checking for indices, return 1 if all ok, else -1*/
     
   SMESHGUI*                mySMESHGUI;                   /* Current SMESHGUI object */
   LightApp_SelectionMgr*   mySelectionMgr;               /* User shape selection */
index 8c9ac135b6137183b53c83b867e22a35485f2084..5af7f78159e78780147431139fad3136f9e6f62e 100644 (file)
@@ -97,6 +97,7 @@ SMESHGUI_DisplayEntitiesDlg::SMESHGUI_DisplayEntitiesDlg( QWidget* parent )
   hl->addWidget( nb0DElemsLab, 0, 1 );
   my0DElemsTB->setEnabled( nbElements );
   nb0DElemsLab->setEnabled( nbElements );
+  myNbTypes += ( nbElements > 0 );
 
   // Edges
   nbElements = myActor ? myActor->GetObject()->GetNbEntities( SMDSAbs_Edge ) : aMesh->NbEdges();
@@ -112,6 +113,7 @@ SMESHGUI_DisplayEntitiesDlg::SMESHGUI_DisplayEntitiesDlg( QWidget* parent )
   hl->addWidget( nbEdgesLab, 1, 1 );
   myEdgesTB->setEnabled( nbElements );
   nbEdgesLab->setEnabled( nbElements );
+  myNbTypes += ( nbElements > 0 );
 
   // Faces
   nbElements = myActor ? myActor->GetObject()->GetNbEntities( SMDSAbs_Face ) : aMesh->NbFaces();
@@ -127,6 +129,7 @@ SMESHGUI_DisplayEntitiesDlg::SMESHGUI_DisplayEntitiesDlg( QWidget* parent )
   hl->addWidget( nbFacesLab, 2, 1 );
   myFacesTB->setEnabled( nbElements );
   nbFacesLab->setEnabled( nbElements );
+  myNbTypes += ( nbElements > 0 );
 
   // Volumes
   nbElements = myActor ? myActor->GetObject()->GetNbEntities( SMDSAbs_Volume ) : aMesh->NbVolumes();
@@ -142,6 +145,7 @@ SMESHGUI_DisplayEntitiesDlg::SMESHGUI_DisplayEntitiesDlg( QWidget* parent )
   hl->addWidget( nbVolumesLab, 3, 1 );
   myVolumesTB->setEnabled( nbElements );
   nbVolumesLab->setEnabled( nbElements );
+  myNbTypes += ( nbElements > 0 );
 
   // Balls
   nbElements = myActor ? myActor->GetObject()->GetNbEntities( SMDSAbs_Ball ) : aMesh->NbBalls();
@@ -157,6 +161,7 @@ SMESHGUI_DisplayEntitiesDlg::SMESHGUI_DisplayEntitiesDlg( QWidget* parent )
   hl->addWidget( nbBallsLab, 4, 1 );
   myBallsTB->setEnabled( nbElements );
   nbBallsLab->setEnabled( nbElements );
+  myNbTypes += ( nbElements > 0 );
 
   QVBoxLayout* aDlgLay = new QVBoxLayout( mainFrame() );
   aDlgLay->setMargin( 0 );
@@ -165,8 +170,10 @@ SMESHGUI_DisplayEntitiesDlg::SMESHGUI_DisplayEntitiesDlg( QWidget* parent )
   
   button( OK )->setText( tr( "SMESH_BUT_OK" ) );
 
-  connect( this, SIGNAL( dlgHelp() ), this, SLOT( onHelp() ) );
-  connect( this, SIGNAL( dlgOk() ),   this, SLOT( onOk() ) );
+  connect( this, SIGNAL( dlgHelp() ), this, SLOT( onHelp() ));
+  connect( this, SIGNAL( dlgOk() ),   this, SLOT( onOk() ));
+
+  updateButtons();
 }
 
 /*
@@ -192,14 +199,6 @@ void SMESHGUI_DisplayEntitiesDlg::InverseEntityMode(unsigned int& theOutputMode,
 void SMESHGUI_DisplayEntitiesDlg::onChangeEntityMode( bool isChecked )
 {
   QCheckBox* aSender = (QCheckBox*)sender();
-  if ( myNbCheckedButtons == 1 && !isChecked ) {
-    SUIT_MessageBox::warning(this, tr("SMESH_WRN_WARNING"),
-                             tr("WRN_AT_LEAST_ONE"));
-    disconnect( aSender, SIGNAL(toggled(bool)), this, SLOT(onChangeEntityMode(bool)) );
-    aSender->setChecked( true );
-    connect( aSender, SIGNAL(toggled(bool)), this, SLOT(onChangeEntityMode(bool)) );
-    return;
-  }
   if ( my0DElemsTB == aSender )
     InverseEntityMode( myEntityMode, SMESH_Actor::e0DElements );
   else if ( myEdgesTB == aSender )
@@ -210,9 +209,9 @@ void SMESHGUI_DisplayEntitiesDlg::onChangeEntityMode( bool isChecked )
     InverseEntityMode( myEntityMode, SMESH_Actor::eVolumes );
   else if ( myBallsTB == aSender )
     InverseEntityMode( myEntityMode, SMESH_Actor::eBallElem );
-  
+
   isChecked ? myNbCheckedButtons++ : myNbCheckedButtons--;
-  
+  updateButtons();
 }
 
 /*!
@@ -248,3 +247,11 @@ void SMESHGUI_DisplayEntitiesDlg::onOk()
     SMESH::UpdateView( wnd, SMESH::eDisplay, entry );
   }
 }
+
+/*!
+ * \brief Enable/disable OK button depending on nb of selected entities
+ */
+void SMESHGUI_DisplayEntitiesDlg::updateButtons()
+{
+  setButtonEnabled( myNbCheckedButtons > 0 || myNbTypes == 0, OK );
+}
index e6305b2d6245511d931a129f855bc8f3a48ebbdf..4901bd6ce857f01c64a3e049c5480dc52f10186a 100644 (file)
@@ -40,6 +40,7 @@ public:
 private:
   void InverseEntityMode( unsigned int& theOutputMode,
                           unsigned int theMode );
+  void updateButtons();
 
 private slots:
   void              onOk();
@@ -51,6 +52,7 @@ private:
   unsigned int myEntityMode;
   SMESH_Actor *myActor;
   int myNbCheckedButtons;
+  int myNbTypes;
   QCheckBox* my0DElemsTB;
   QCheckBox* myEdgesTB;
   QCheckBox* myFacesTB;
index d182aa07cbb4d6d9b2e82908d30065bbe9a717f8..4e7f6bf5ff91f1fb827ca8e6f3a2088478e904ae 100755 (executable)
@@ -1546,7 +1546,7 @@ void SMESHGUI_FilterTable::onRemoveBtn()
 
 //=======================================================================
 // name    : SMESHGUI_FilterTable::updateAdditionalWidget
-// Purpose : Enable/Disable widget with additonal parameters
+// Purpose : Enable/Disable widget with additional parameters
 //=======================================================================
 void SMESHGUI_FilterTable::updateAdditionalWidget()
 {
@@ -2116,7 +2116,7 @@ QTableWidgetItem* SMESHGUI_FilterTable::getCriterionItem (const int theType) con
 
 //=======================================================================
 // name    : SMESHGUI_FilterTable::getCompareItem
-// Purpose : Get combo table item for operation of comparision
+// Purpose : Get combo table item for operation of comparison
 //=======================================================================
 QTableWidgetItem* SMESHGUI_FilterTable::getCompareItem () const
 {
index ea5c5fe03781907c56d462672127e189e23070cf..c7d806b7da09362543e0ff236a00ef96c5072eb5 100644 (file)
@@ -444,7 +444,6 @@ void SMESHGUI_GroupDlg::initDialog( bool create)
 
   /* Init selection */
   mySMESHGUI->SetActiveDialogBox(this);
-  mySMESHGUI->SetState(800);
 
   SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( mySMESHGUI->application()->activeStudy() );
   mySelectionMode = grpNoSelection;
@@ -1609,6 +1608,8 @@ void SMESHGUI_GroupDlg::onSelectAll()
   mySortBtn->setEnabled    ( !noElemsModif );
   mySelectBox->setEnabled  ( !noElemsModif );
   myAllowElemsModif->setEnabled( !mySelectAll->isChecked() );
+  if ( noElemsModif ) mySMESHGUI->ResetState();
+  else                mySMESHGUI->SetState(800);
 
   int selMode     = mySelectionMode;
   mySelectionMode = grpNoSelection;
@@ -2332,9 +2333,9 @@ void SMESHGUI_GroupDlg::enterEvent (QEvent*)
     setEnabled(true);
     mySelectionMode = grpNoSelection;
     setSelectionMode(myTypeId);
-    //mySMESHGUI->SetActiveDialogBox((QDialog*)this);
     mySMESHGUI->SetActiveDialogBox(this);
-    mySMESHGUI->SetState(800);
+    if ( mySelectBox->isEnabled() ) mySMESHGUI->SetState(800);
+    else                            mySMESHGUI->ResetState();
   }
 }
 
index d5cc3cc5ea7dda1addf59a55e8c63377a39b8b5f..915933dc40e028d5e138cbc5b3c2133f0a8a940d 100644 (file)
@@ -258,7 +258,7 @@ bool SMESHGUI_GroupOpDlg::isValid( const QList<SMESH::SMESH_GroupBase_var>& theL
   {
     SMESH::SMESH_GroupBase_var aGrp = *anIter;
     if ( CORBA::is_nil( aGrp ) )
-      continue; // nonsence
+      continue; // nonsense
 
     SMESH::SMESH_Mesh_var aMesh = aGrp->GetMesh();
     if ( CORBA::is_nil( aMesh ) )
index 33baabf0beee9064dcdf6ed4cc1939b0f95a32de..021e003b93ada81e5b8ac34a605df6fa074364ff 100644 (file)
@@ -519,7 +519,7 @@ namespace SMESH
         if(MYDEBUG) MESSAGE("Loading client meshers plugin library ...");
         LibHandle libHandle = LoadLib( aClientLibName.toLatin1().data() );
         if (!libHandle) {
-          // report any error, if occured
+          // report any error, if occurred
           {
 #ifdef WIN32
             const char* anError = "Can't load client meshers plugin library";
index 6c72b1fd545d92d56d1f6b837e863842ef31c14a..6890f1df652b7b4d28d42dbab56bf310019927d4 100644 (file)
@@ -55,6 +55,14 @@ public:
   void SetPointsData( SMDS_Mesh* theMesh, const TColStd_MapOfInteger & theNodesIdMap );
   void SetElemsData ( const std::vector<int> &  theElemsIdMap,
                       const std::list<gp_XYZ> & theGrCentersXYZ );
+  template< class INT_ITER, class XYZ_ITER >
+  void SetElemsData ( INT_ITER theElemsBegin, INT_ITER theElemsEnd,
+                      XYZ_ITER theGrCentersBegin, XYZ_ITER theGrCentersEnd )
+  {
+    std::vector<int> elemsIds( theElemsBegin, theElemsEnd );
+    std::list<gp_XYZ> gcXYZ( theGrCentersBegin, theGrCentersEnd );
+    SetElemsData( elemsIds, gcXYZ );
+  }
   void SetPointsLabeled( bool theIsPointsLabeled, bool theIsActorVisible = true );
 
   void AddToRender     ( vtkRenderer* theRenderer );
index 0c492b5d7ffd317f3a3a977c9b43c0b39c574017..b99c8a4f6a59a4931f56fb51f5ae63a5c8513650 100644 (file)
@@ -31,6 +31,7 @@
 #include <SUIT_Session.h>
 #include <SUIT_ResourceMgr.h>
 #include <QtxMenu.h>
+#include <QtxToolButton.h>
 
 // Qt includes
 #include <QComboBox>
@@ -74,11 +75,11 @@ SMESHGUI_MeshTab::SMESHGUI_MeshTab( QWidget* theParent )
   
   // Algorifm
   QLabel* anAlgoLbl = new QLabel( tr( "ALGORITHM" ), this );
-  myHypCombo[ Algo ] = new QComboBox( this );
+  myHypCombo[ Algo ] = new QtxToolButton( this );
   
   // Hypothesis
   QLabel* aHypLbl = new QLabel( tr( "HYPOTHESIS" ), this );
-  myHypCombo[ MainHyp ] = new QComboBox( this );
+  myHypCombo[ MainHyp ] = new QtxToolButton( this );
   myHypCombo[ MainHyp ]->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
   myCreateHypBtn[ MainHyp ] = new QToolButton( this );
   myCreateHypBtn[ MainHyp ]->setIcon( aCreateIcon );
@@ -91,7 +92,7 @@ SMESHGUI_MeshTab::SMESHGUI_MeshTab( QWidget* theParent )
 
   // Add. hypothesis
   QLabel* anAddHypLbl = new QLabel( tr( "ADD_HYPOTHESIS" ), this );
-  myHypCombo[ AddHyp ] = new QComboBox( this );
+  myHypCombo[ AddHyp ] = new QtxToolButton( this );
   myHypCombo[ AddHyp ]->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
   myCreateHypBtn[ AddHyp ] = new QToolButton( this );
   myCreateHypBtn[ AddHyp ]->setIcon( aCreateIcon );
@@ -126,6 +127,7 @@ SMESHGUI_MeshTab::SMESHGUI_MeshTab( QWidget* theParent )
   aLay->addWidget( myMoreAddHypBtn, 4, 2 );
   aLay->addWidget( myEditHypBtn[ MoreAddHyp ], 4, 3 );
   aLay->addWidget( myLessAddHypBtn, 5, 2 );
+
   aLay->addItem( new QSpacerItem( 0, 0, QSizePolicy::Fixed, QSizePolicy::Expanding ), 6, 0 );
 
   // Connect signals and slots
@@ -172,24 +174,21 @@ void SMESHGUI_MeshTab::addItem( const QString& txt,
                                 const int      index,
                                 const bool     isGroup )
 {
-  const char* prefix = "  ";
   if ( type <= AddHyp )
   {
     if ( isGroup )
     {
-      int idx = myHypCombo[ type ]->count();
-      myHypCombo[ type ]->addItem( txt.mid( 6 ), QVariant( index ));
-      myHypCombo[ type ]->setItemData( idx, "separator", Qt::AccessibleDescriptionRole );
+      myHypCombo[ type ]->addSeparator( txt.mid( 6 ) );
     }
     else
     {
-      myHypCombo[ type ]->addItem( prefix + txt, QVariant( index ));
+      myHypCombo[ type ]->addItem( txt, QVariant( index ));
     }
     //myHypCombo[ type ]->setMaxVisibleItems( qMax( 10, myHypCombo[ type ]->count() ) );
   }
   else
   {
-    QListWidgetItem* item = new QListWidgetItem( prefix + txt, myAddHypList );
+    QListWidgetItem* item = new QListWidgetItem( txt, myAddHypList );
     item->setData( Qt::UserRole, QVariant( index ));
   }
 }
@@ -405,7 +404,7 @@ void SMESHGUI_MeshTab::onCreateHyp()
     QAction* a = 0;
     if ( aHypNames[ i ].startsWith( "GROUP:" ))
     {
-      aPopup.appendGroupTitle( aHypNames[ i ].mid( 6 ));
+      aPopup.addGroup( aHypNames[ i ].mid( 6 ));
     }
     else
     {
@@ -704,7 +703,7 @@ void SMESHGUI_MeshDlg::setCurrentTab( const int theId  )
 //================================================================================
 /*!
  * \brief Enable/disable tabs
-  * \param int - maximum possible dimention
+  * \param int - maximum possible dimension
  */
 //================================================================================
 void SMESHGUI_MeshDlg::setMaxHypoDim( const int maxDim )
@@ -842,7 +841,7 @@ void SMESHGUI_MeshDlg::onGeomSelectionButton(bool isBtnOn)
 
 //================================================================================
 /*!
- * \brief SLOT called when a item of Geom selection popup is choosen
+ * \brief SLOT called when a item of Geom selection popup is chosen
  */
 //================================================================================
 void SMESHGUI_MeshDlg::onGeomPopup( QAction* a )
index afc499f34e2ee4bddfcf9de36b8945ccb51c4218..dc846e183c08189ab03f237764cdf68ac9e4b8e2 100644 (file)
@@ -44,6 +44,7 @@ class QListWidget;
 class QMenu;
 class QTabWidget;
 class QToolButton;
+class QtxToolButton;
 
 /*!
  * \brief Dialog for mech creation or editing
@@ -135,11 +136,11 @@ public:
 
 signals:  
   void                         createHyp( const int, const int );
-  //!< Emited when "Create hypothesis" button clicked
+  //!< Emitted when "Create hypothesis" button clicked
   void                         editHyp( const int, const int );
-  //!< Emited when "Edit hypothesis" button clicked
+  //!< Emitted when "Edit hypothesis" button clicked
   void                         selectAlgo( const int );
-  //!< Emited when an algorithm is selected
+  //!< Emitted when an algorithm is selected
   
 private slots:  
   void                         onCreateHyp();  
@@ -155,14 +156,13 @@ private:
 
   QMap<int, QStringList>       myAvailableHypTypes;
 
-  QMap<int, QComboBox*>        myHypCombo;
+  QMap<int, QtxToolButton*>    myHypCombo;
   QMap<int, QToolButton*>      myCreateHypBtn;
   QMap<int, QToolButton*>      myEditHypBtn;
 
   QToolButton*                 myMoreAddHypBtn;
   QToolButton*                 myLessAddHypBtn;
   QListWidget*                 myAddHypList; // 2-nd, etc. additional hyps
-
 };
 
 #endif // SMESHGUI_MESHDLG_H
index db07868adc8aa84375d316c348700b8cf074deff..c2932c2032730c788df81e2b55bf9fcdc5a9576f 100644 (file)
@@ -33,6 +33,7 @@
 #include "SMESHDS_Mesh.hxx"
 #include "SMESHGUI.h"
 #include "SMESHGUI_FilterUtils.h"
+#include "SMESHGUI_IdPreview.h"
 #include "SMESHGUI_IdValidator.h"
 #include "SMESHGUI_SpinBox.h"
 #include "SMESHGUI_Utils.h"
@@ -136,7 +137,7 @@ void ExtraWidget::updateControls( int total, int index, int blockSize )
 {
   setVisible( total > blockSize );
   QString format = brief ? QString( "%1-%2 / %3" ) : SMESHGUI_MeshInfoDlg::tr( "X_FROM_Y_ITEMS_SHOWN" );
-  current->setText( format.arg( index*blockSize+1 ).arg( qMin( index*blockSize+blockSize, total ) ).arg( total ) );
+  current->setText( format.arg( index*blockSize+1 ).arg( qMin( index*blockSize+blockSize, total )).arg( total ));
   prev->setEnabled( index > 0 );
   next->setEnabled( (index+1)*blockSize < total );
 }
@@ -400,7 +401,7 @@ SMESHGUI_MeshInfo::SMESHGUI_MeshInfo( QWidget* parent )
 
   myLoadBtn = new QPushButton( tr( "BUT_LOAD_MESH" ), this );
   myLoadBtn->setAutoDefault( true );
-  connect( myLoadBtn, SIGNAL( clicked() ), this, SLOT( loadMesh() ) );
+  connect( myLoadBtn, SIGNAL( clicked() ), this, SLOT( loadMesh() ));
   
   setFontAttributes( aNameLab,    Bold );
   setFontAttributes( aObjLab,     Bold );
@@ -518,7 +519,7 @@ SMESHGUI_MeshInfo::~SMESHGUI_MeshInfo()
 void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
 {
   clear();
-  if ( !CORBA::is_nil( obj ) ) {
+  if ( !CORBA::is_nil( obj )) {
     _PTR(SObject) sobj = SMESH::ObjectToSObject( obj );
     if ( sobj ) 
       myWidgets[iName][iSingle]->setProperty( "text", sobj->GetName().c_str() );
@@ -526,10 +527,10 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
     SMESH::SMESH_subMesh_var   aSubMesh = SMESH::SMESH_subMesh::_narrow( obj );
     SMESH::SMESH_GroupBase_var aGroup   = SMESH::SMESH_GroupBase::_narrow( obj );
     if ( !aMesh->_is_nil() ) {
-      myWidgets[iObject][iSingle]->setProperty( "text", tr( "OBJECT_MESH" ) );
+      myWidgets[iObject][iSingle]->setProperty( "text", tr( "OBJECT_MESH" ));
     }
     else if ( !aSubMesh->_is_nil() ) {
-      myWidgets[iObject][iSingle]->setProperty( "text", tr( "OBJECT_SUBMESH" ) );
+      myWidgets[iObject][iSingle]->setProperty( "text", tr( "OBJECT_SUBMESH" ));
     }
     else if ( !aGroup->_is_nil() ) {
       QString objType;
@@ -545,13 +546,13 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
       myWidgets[iObject][iSingle]->setProperty( "text", objType );
     }
     SMESH::long_array_var info = obj->GetMeshInfo();
-    myWidgets[iNodes][iTotal] ->setProperty( "text", QString::number( info[SMDSEntity_Node] ) );
-    myWidgets[i0D][iTotal]    ->setProperty( "text", QString::number( info[SMDSEntity_0D] ) );
-    myWidgets[iBalls][iTotal] ->setProperty( "text", QString::number( info[SMDSEntity_Ball] ) );
+    myWidgets[iNodes][iTotal] ->setProperty( "text", QString::number( info[SMDSEntity_Node] ));
+    myWidgets[i0D][iTotal]    ->setProperty( "text", QString::number( info[SMDSEntity_0D] ));
+    myWidgets[iBalls][iTotal] ->setProperty( "text", QString::number( info[SMDSEntity_Ball] ));
     long nbEdges = info[SMDSEntity_Edge] + info[SMDSEntity_Quad_Edge];
-    myWidgets[i1D][iTotal]    ->setProperty( "text", QString::number( nbEdges ) );
-    myWidgets[i1D][iLinear]   ->setProperty( "text", QString::number( info[SMDSEntity_Edge] ) );
-    myWidgets[i1D][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Edge] ) );
+    myWidgets[i1D][iTotal]    ->setProperty( "text", QString::number( nbEdges ));
+    myWidgets[i1D][iLinear]   ->setProperty( "text", QString::number( info[SMDSEntity_Edge] ));
+    myWidgets[i1D][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Edge] ));
     long nbTriangles     = info[SMDSEntity_Triangle]   + info[SMDSEntity_Quad_Triangle]   + info[SMDSEntity_BiQuad_Triangle];
     long nbQuadrangles   = info[SMDSEntity_Quadrangle] + info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle];
     long nb2DPolygons    = info[SMDSEntity_Polygon]    + info[SMDSEntity_Quad_Polygon];
@@ -561,20 +562,20 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
     long nb2DTotal       = nb2DLinear + nb2DQuadratic + nb2DBiQuadratic;
 
     myWidgets[i2D][iTotal]                  ->setProperty( "text", QString::number( nb2DTotal ));
-    myWidgets[i2D][iLinear]                 ->setProperty( "text", QString::number( nb2DLinear ) );
-    myWidgets[i2D][iQuadratic]              ->setProperty( "text", QString::number( nb2DQuadratic ) );
-    myWidgets[i2D][iBiQuadratic]            ->setProperty( "text", QString::number( nb2DBiQuadratic ) );
-    myWidgets[i2DTriangles][iTotal]         ->setProperty( "text", QString::number( nbTriangles ) );
-    myWidgets[i2DTriangles][iLinear]        ->setProperty( "text", QString::number( info[SMDSEntity_Triangle] ) );
-    myWidgets[i2DTriangles][iQuadratic]     ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Triangle] ) );
-    myWidgets[i2DTriangles][iBiQuadratic]   ->setProperty( "text", QString::number( info[SMDSEntity_BiQuad_Triangle] ) );
-    myWidgets[i2DQuadrangles][iTotal]       ->setProperty( "text", QString::number( nbQuadrangles ) );
-    myWidgets[i2DQuadrangles][iLinear]      ->setProperty( "text", QString::number( info[SMDSEntity_Quadrangle] ) );
-    myWidgets[i2DQuadrangles][iQuadratic]   ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Quadrangle] ) );
-    myWidgets[i2DQuadrangles][iBiQuadratic] ->setProperty( "text", QString::number( info[SMDSEntity_BiQuad_Quadrangle] ) );
+    myWidgets[i2D][iLinear]                 ->setProperty( "text", QString::number( nb2DLinear ));
+    myWidgets[i2D][iQuadratic]              ->setProperty( "text", QString::number( nb2DQuadratic ));
+    myWidgets[i2D][iBiQuadratic]            ->setProperty( "text", QString::number( nb2DBiQuadratic ));
+    myWidgets[i2DTriangles][iTotal]         ->setProperty( "text", QString::number( nbTriangles ));
+    myWidgets[i2DTriangles][iLinear]        ->setProperty( "text", QString::number( info[SMDSEntity_Triangle] ));
+    myWidgets[i2DTriangles][iQuadratic]     ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Triangle] ));
+    myWidgets[i2DTriangles][iBiQuadratic]   ->setProperty( "text", QString::number( info[SMDSEntity_BiQuad_Triangle] ));
+    myWidgets[i2DQuadrangles][iTotal]       ->setProperty( "text", QString::number( nbQuadrangles ));
+    myWidgets[i2DQuadrangles][iLinear]      ->setProperty( "text", QString::number( info[SMDSEntity_Quadrangle] ));
+    myWidgets[i2DQuadrangles][iQuadratic]   ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Quadrangle] ));
+    myWidgets[i2DQuadrangles][iBiQuadratic] ->setProperty( "text", QString::number( info[SMDSEntity_BiQuad_Quadrangle] ));
     myWidgets[i2DPolygons][iTotal]          ->setProperty( "text", QString::number( nb2DPolygons ));
-    myWidgets[i2DPolygons][iLinear]         ->setProperty( "text", QString::number( info[SMDSEntity_Polygon] ) );
-    myWidgets[i2DPolygons][iQuadratic]      ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Polygon] ) );
+    myWidgets[i2DPolygons][iLinear]         ->setProperty( "text", QString::number( info[SMDSEntity_Polygon] ));
+    myWidgets[i2DPolygons][iQuadratic]      ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Polygon] ));
     long nbTetrahedrons  = info[SMDSEntity_Tetra]   + info[SMDSEntity_Quad_Tetra];
     long nbHexahedrons   = info[SMDSEntity_Hexa]    + info[SMDSEntity_Quad_Hexa] + info[SMDSEntity_TriQuad_Hexa];
     long nbPyramids      = info[SMDSEntity_Pyramid] + info[SMDSEntity_Quad_Pyramid];
@@ -583,33 +584,33 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
     long nb3DQuadratic   = info[SMDSEntity_Quad_Tetra] + info[SMDSEntity_Quad_Hexa] + info[SMDSEntity_Quad_Pyramid] + info[SMDSEntity_Quad_Penta];
     long nb3DBiQuadratic = info[SMDSEntity_TriQuad_Hexa];
     long nb3DTotal       = nb3DLinear + nb3DQuadratic + nb3DBiQuadratic;
-    myWidgets[i3D][iTotal]                  ->setProperty( "text", QString::number( nb3DTotal ) );
-    myWidgets[i3D][iLinear]                 ->setProperty( "text", QString::number( nb3DLinear ) );
-    myWidgets[i3D][iQuadratic]              ->setProperty( "text", QString::number( nb3DQuadratic ) );
-    myWidgets[i3D][iBiQuadratic]            ->setProperty( "text", QString::number( nb3DBiQuadratic ) );
-    myWidgets[i3DTetrahedrons][iTotal]      ->setProperty( "text", QString::number( nbTetrahedrons ) );
-    myWidgets[i3DTetrahedrons][iLinear]     ->setProperty( "text", QString::number( info[SMDSEntity_Tetra] ) );
-    myWidgets[i3DTetrahedrons][iQuadratic]  ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Tetra] ) );
-    myWidgets[i3DHexahedrons][iTotal]       ->setProperty( "text", QString::number( nbHexahedrons ) );
-    myWidgets[i3DHexahedrons][iLinear]      ->setProperty( "text", QString::number( info[SMDSEntity_Hexa] ) );
-    myWidgets[i3DHexahedrons][iQuadratic]   ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Hexa] ) );
-    myWidgets[i3DHexahedrons][iBiQuadratic] ->setProperty( "text", QString::number( info[SMDSEntity_TriQuad_Hexa] ) );
-    myWidgets[i3DPyramids][iTotal]          ->setProperty( "text", QString::number( nbPyramids ) );
-    myWidgets[i3DPyramids][iLinear]         ->setProperty( "text", QString::number( info[SMDSEntity_Pyramid] ) );
-    myWidgets[i3DPyramids][iQuadratic]      ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Pyramid] ) );
-    myWidgets[i3DPrisms][iTotal]            ->setProperty( "text", QString::number( nbPrisms ) );
-    myWidgets[i3DPrisms][iLinear]           ->setProperty( "text", QString::number( info[SMDSEntity_Penta] ) );
-    myWidgets[i3DPrisms][iQuadratic]        ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Penta] ) );
-    myWidgets[i3DHexaPrisms][iTotal]        ->setProperty( "text", QString::number( info[SMDSEntity_Hexagonal_Prism] ) );
-    myWidgets[i3DPolyhedrons][iTotal]       ->setProperty( "text", QString::number( info[SMDSEntity_Polyhedra] ) );
+    myWidgets[i3D][iTotal]                  ->setProperty( "text", QString::number( nb3DTotal ));
+    myWidgets[i3D][iLinear]                 ->setProperty( "text", QString::number( nb3DLinear ));
+    myWidgets[i3D][iQuadratic]              ->setProperty( "text", QString::number( nb3DQuadratic ));
+    myWidgets[i3D][iBiQuadratic]            ->setProperty( "text", QString::number( nb3DBiQuadratic ));
+    myWidgets[i3DTetrahedrons][iTotal]      ->setProperty( "text", QString::number( nbTetrahedrons ));
+    myWidgets[i3DTetrahedrons][iLinear]     ->setProperty( "text", QString::number( info[SMDSEntity_Tetra] ));
+    myWidgets[i3DTetrahedrons][iQuadratic]  ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Tetra] ));
+    myWidgets[i3DHexahedrons][iTotal]       ->setProperty( "text", QString::number( nbHexahedrons ));
+    myWidgets[i3DHexahedrons][iLinear]      ->setProperty( "text", QString::number( info[SMDSEntity_Hexa] ));
+    myWidgets[i3DHexahedrons][iQuadratic]   ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Hexa] ));
+    myWidgets[i3DHexahedrons][iBiQuadratic] ->setProperty( "text", QString::number( info[SMDSEntity_TriQuad_Hexa] ));
+    myWidgets[i3DPyramids][iTotal]          ->setProperty( "text", QString::number( nbPyramids ));
+    myWidgets[i3DPyramids][iLinear]         ->setProperty( "text", QString::number( info[SMDSEntity_Pyramid] ));
+    myWidgets[i3DPyramids][iQuadratic]      ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Pyramid] ));
+    myWidgets[i3DPrisms][iTotal]            ->setProperty( "text", QString::number( nbPrisms ));
+    myWidgets[i3DPrisms][iLinear]           ->setProperty( "text", QString::number( info[SMDSEntity_Penta] ));
+    myWidgets[i3DPrisms][iQuadratic]        ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Penta] ));
+    myWidgets[i3DHexaPrisms][iTotal]        ->setProperty( "text", QString::number( info[SMDSEntity_Hexagonal_Prism] ));
+    myWidgets[i3DPolyhedrons][iTotal]       ->setProperty( "text", QString::number( info[SMDSEntity_Polyhedra] ));
     long nbElemTotal       = info[SMDSEntity_0D] + info[SMDSEntity_Ball] + nbEdges + nb2DTotal + nb3DTotal;
     long nbElemLinerial    = info[SMDSEntity_Edge] + nb2DLinear + nb3DLinear;
     long nbElemQuadratic   = info[SMDSEntity_Quad_Edge] + nb2DQuadratic + nb3DQuadratic;
     long nbElemBiQuadratic = nb2DBiQuadratic + nb3DBiQuadratic;
-    myWidgets[iNb][iTotal]      ->setProperty( "text", QString::number( nbElemTotal ) );
-    myWidgets[iNb][iLinear]     ->setProperty( "text", QString::number( nbElemLinerial ) );
-    myWidgets[iNb][iQuadratic]  ->setProperty( "text", QString::number( nbElemQuadratic ) );
-    myWidgets[iNb][iBiQuadratic]->setProperty( "text", QString::number( nbElemBiQuadratic ) );
+    myWidgets[iNb][iTotal]      ->setProperty( "text", QString::number( nbElemTotal ));
+    myWidgets[iNb][iLinear]     ->setProperty( "text", QString::number( nbElemLinerial ));
+    myWidgets[iNb][iQuadratic]  ->setProperty( "text", QString::number( nbElemQuadratic ));
+    myWidgets[iNb][iBiQuadratic]->setProperty( "text", QString::number( nbElemBiQuadratic ));
     // before full loading from study file, type of elements in a sub-mesh can't be defined
     // in some cases
     bool infoOK = obj->IsMeshInfoCorrect();
@@ -732,7 +733,7 @@ void SMESHGUI_MeshInfo::loadMesh()
   if ( selected.Extent() == 1 ) {
     Handle(SALOME_InteractiveObject) IO = selected.First();
     SMESH::SMESH_IDSource_var obj = SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( IO );
-    if ( !CORBA::is_nil( obj ) ) {
+    if ( !CORBA::is_nil( obj )) {
       SMESH::SMESH_Mesh_var mesh = obj->GetMesh();
       if ( !mesh->_is_nil() )
       {
@@ -750,50 +751,50 @@ void SMESHGUI_MeshInfo::clear()
 {
   myWidgets[iName][iSingle]               ->setProperty( "text", QString() );
   myWidgets[iObject][iSingle]             ->setProperty( "text", QString() );
-  myWidgets[iNodes][iTotal]               ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i0D][iTotal]                  ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[iBalls][iTotal]               ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i1D][iTotal]                  ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i1D][iLinear]                 ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i1D][iQuadratic]              ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2D][iTotal]                  ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2D][iLinear]                 ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2D][iQuadratic]              ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2D][iBiQuadratic]            ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DTriangles][iTotal]         ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DTriangles][iLinear]        ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DTriangles][iQuadratic]     ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DTriangles][iBiQuadratic]   ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DQuadrangles][iTotal]       ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DQuadrangles][iLinear]      ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DQuadrangles][iQuadratic]   ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DQuadrangles][iBiQuadratic] ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DPolygons][iLinear]         ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DPolygons][iQuadratic]      ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DPolygons][iTotal]          ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3D][iTotal]                  ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3D][iLinear]                 ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3D][iQuadratic]              ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3D][iBiQuadratic]            ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DTetrahedrons][iTotal]      ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DTetrahedrons][iLinear]     ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DTetrahedrons][iQuadratic]  ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DHexahedrons][iTotal]       ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DHexahedrons][iLinear]      ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DHexahedrons][iQuadratic]   ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DHexahedrons][iBiQuadratic] ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DPyramids][iTotal]          ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DPyramids][iLinear]         ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DPyramids][iQuadratic]      ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DPrisms][iTotal]            ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DPrisms][iLinear]           ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DPrisms][iQuadratic]        ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DHexaPrisms][iTotal]        ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DPolyhedrons][iTotal]       ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[iNb][iTotal]                  ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[iNb][iLinear]                 ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[iNb][iQuadratic]              ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[iNb][iBiQuadratic]            ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[iNodes][iTotal]               ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i0D][iTotal]                  ->setProperty( "text", QString::number( 0 ));
+  myWidgets[iBalls][iTotal]               ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i1D][iTotal]                  ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i1D][iLinear]                 ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i1D][iQuadratic]              ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i2D][iTotal]                  ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i2D][iLinear]                 ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i2D][iQuadratic]              ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i2D][iBiQuadratic]            ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i2DTriangles][iTotal]         ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i2DTriangles][iLinear]        ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i2DTriangles][iQuadratic]     ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i2DTriangles][iBiQuadratic]   ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i2DQuadrangles][iTotal]       ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i2DQuadrangles][iLinear]      ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i2DQuadrangles][iQuadratic]   ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i2DQuadrangles][iBiQuadratic] ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i2DPolygons][iLinear]         ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i2DPolygons][iQuadratic]      ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i2DPolygons][iTotal]          ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3D][iTotal]                  ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3D][iLinear]                 ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3D][iQuadratic]              ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3D][iBiQuadratic]            ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3DTetrahedrons][iTotal]      ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3DTetrahedrons][iLinear]     ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3DTetrahedrons][iQuadratic]  ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3DHexahedrons][iTotal]       ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3DHexahedrons][iLinear]      ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3DHexahedrons][iQuadratic]   ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3DHexahedrons][iBiQuadratic] ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3DPyramids][iTotal]          ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3DPyramids][iLinear]         ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3DPyramids][iQuadratic]      ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3DPrisms][iTotal]            ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3DPrisms][iLinear]           ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3DPrisms][iQuadratic]        ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3DHexaPrisms][iTotal]        ->setProperty( "text", QString::number( 0 ));
+  myWidgets[i3DPolyhedrons][iTotal]       ->setProperty( "text", QString::number( 0 ));
+  myWidgets[iNb][iTotal]                  ->setProperty( "text", QString::number( 0 ));
+  myWidgets[iNb][iLinear]                 ->setProperty( "text", QString::number( 0 ));
+  myWidgets[iNb][iQuadratic]              ->setProperty( "text", QString::number( 0 ));
+  myWidgets[iNb][iBiQuadratic]            ->setProperty( "text", QString::number( 0 ));
 }
 
 /*!
@@ -807,7 +808,7 @@ QLabel* SMESHGUI_MeshInfo::createField()
   lab->setAlignment( Qt::AlignCenter );
   lab->setAutoFillBackground( true );
   QPalette pal = lab->palette();
-  pal.setColor( QPalette::Window, QApplication::palette().color( QPalette::Active, QPalette::Base ) );
+  pal.setColor( QPalette::Window, QApplication::palette().color( QPalette::Active, QPalette::Base ));
   lab->setPalette( pal );
   lab->setMinimumWidth( 70 );
   return lab;
@@ -861,67 +862,67 @@ void SMESHGUI_MeshInfo::saveInfo( QTextStream &out )
   out << QString( 9, '-' ) << "\n";
   out << tr( "BASE_INFO" ) << "\n";
   out << QString( 9, '-' ) << "\n";
-  out <<                                   tr( "NAME_LAB" )         << "  " << ( myWidgets[iName][iSingle]->property( "text" ) ).toString() << "\n";
-  out <<                                   tr( "OBJECT_LAB" )       << "  " << ( myWidgets[iObject][iSingle]->property( "text" ) ).toString() << "\n";
-  out <<                                   tr( "NODES_LAB" )        << "  " << ( myWidgets[iNodes][iTotal]->property( "text" ) ).toString() << "\n";
+  out <<                                   tr( "NAME_LAB" )         << "  " << ( myWidgets[iName][iSingle]->property( "text" )).toString() << "\n";
+  out <<                                   tr( "OBJECT_LAB" )       << "  " << ( myWidgets[iObject][iSingle]->property( "text" )).toString() << "\n";
+  out <<                                   tr( "NODES_LAB" )        << "  " << ( myWidgets[iNodes][iTotal]->property( "text" )).toString() << "\n";
   out <<                                   tr( "ELEMENTS_LAB" )     << "\n";
-  out << QString( SPACING_INFO,   ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[iNb][iTotal]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO,   ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[iNb][iLinear]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO,   ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[iNb][iQuadratic]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO,   ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[iNb][iBiQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO,   ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[iNb][iTotal]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO,   ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[iNb][iLinear]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO,   ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[iNb][iQuadratic]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO,   ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[iNb][iBiQuadratic]->property( "text" )).toString() << "\n";
   out << QString( SPACING_INFO,   ' ' ) << tr( "0D_LAB" )           << "\n";
-  out << QString( SPACING_INFO*2, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i0D][iTotal]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*2, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i0D][iTotal]->property( "text" )).toString() << "\n";
   out << QString( SPACING_INFO,   ' ' ) << tr( "BALL_LAB" )         << "\n";
-  out << QString( SPACING_INFO*2, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[iBalls][iTotal]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*2, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[iBalls][iTotal]->property( "text" )).toString() << "\n";
   out << QString( SPACING_INFO,   ' ' ) << tr( "1D_LAB" )           << "\n";
-  out << QString( SPACING_INFO*2, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i1D][iTotal]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*2, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i1D][iLinear]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*2, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i1D][iQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*2, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i1D][iTotal]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*2, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i1D][iLinear]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*2, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i1D][iQuadratic]->property( "text" )).toString() << "\n";
   out << QString( SPACING_INFO,   ' ' ) << tr( "2D_LAB" )           << "\n";
-  out << QString( SPACING_INFO*2, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i2D][iTotal]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*2, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i2D][iLinear]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*2, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i2D][iQuadratic]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*2, ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[i2D][iBiQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*2, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i2D][iTotal]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*2, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i2D][iLinear]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*2, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i2D][iQuadratic]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*2, ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[i2D][iBiQuadratic]->property( "text" )).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "TRIANGLES_LAB" )    << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i2DTriangles][iTotal]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i2DTriangles][iLinear]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i2DTriangles][iQuadratic]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[i2DTriangles][iBiQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i2DTriangles][iTotal]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i2DTriangles][iLinear]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i2DTriangles][iQuadratic]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[i2DTriangles][iBiQuadratic]->property( "text" )).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "QUADRANGLES_LAB" )  << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i2DQuadrangles][iTotal]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i2DQuadrangles][iLinear]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i2DQuadrangles][iQuadratic]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[i2DQuadrangles][iBiQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i2DQuadrangles][iTotal]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i2DQuadrangles][iLinear]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i2DQuadrangles][iQuadratic]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[i2DQuadrangles][iBiQuadratic]->property( "text" )).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "POLYGONS_LAB" )     << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i2DPolygons][iTotal]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i2DPolygons][iLinear]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i2DPolygons][iQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i2DPolygons][iTotal]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i2DPolygons][iLinear]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i2DPolygons][iQuadratic]->property( "text" )).toString() << "\n";
   out << QString( SPACING_INFO,   ' ' ) << tr( "3D_LAB" )           << "\n";
-  out << QString( SPACING_INFO*2, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3D][iTotal]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*2, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i3D][iLinear]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*2, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i3D][iQuadratic]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*2, ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[i3D][iBiQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*2, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3D][iTotal]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*2, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i3D][iLinear]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*2, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i3D][iQuadratic]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*2, ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[i3D][iBiQuadratic]->property( "text" )).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "TETRAHEDRONS_LAB" ) << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3DTetrahedrons][iTotal]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i3DTetrahedrons][iLinear]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i3DTetrahedrons][iQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3DTetrahedrons][iTotal]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i3DTetrahedrons][iLinear]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i3DTetrahedrons][iQuadratic]->property( "text" )).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "HEXAHEDONRS_LAB" )  << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3DHexahedrons][iTotal]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i3DHexahedrons][iLinear]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i3DHexahedrons][iQuadratic]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[i3DHexahedrons][iBiQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3DHexahedrons][iTotal]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i3DHexahedrons][iLinear]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i3DHexahedrons][iQuadratic]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[i3DHexahedrons][iBiQuadratic]->property( "text" )).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "PYRAMIDS_LAB" )     << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3DPyramids][iTotal]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i3DPyramids][iLinear]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i3DPyramids][iQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3DPyramids][iTotal]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i3DPyramids][iLinear]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i3DPyramids][iQuadratic]->property( "text" )).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "PRISMS_LAB" )       << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3DPrisms][iTotal]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i3DPrisms][iLinear]->property( "text" ) ).toString() << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i3DPrisms][iQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3DPrisms][iTotal]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i3DPrisms][iLinear]->property( "text" )).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i3DPrisms][iQuadratic]->property( "text" )).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "HEX_PRISMS_LAB" )   << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3DHexaPrisms][iTotal]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3DHexaPrisms][iTotal]->property( "text" )).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "POLYHEDRONS_LAB" )  << "\n";
-  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3DPolyhedrons][iTotal]->property( "text" ) ).toString() << "\n" << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3DPolyhedrons][iTotal]->property( "text" )).toString() << "\n" << "\n";
 }
 
 /*!
@@ -943,8 +944,8 @@ SMESHGUI_ElemInfo::SMESHGUI_ElemInfo( QWidget* parent )
   vbl->setSpacing( 0 );
   vbl->addWidget( myFrame );
   vbl->addWidget( myExtra );
-  connect( myExtra->prev, SIGNAL( clicked() ), this, SLOT( showPrevious() ) );
-  connect( myExtra->next, SIGNAL( clicked() ), this, SLOT( showNext() ) );
+  connect( myExtra->prev, SIGNAL( clicked() ), this, SLOT( showPrevious() ));
+  connect( myExtra->next, SIGNAL( clicked() ), this, SLOT( showNext() ));
   clear();
 }
 
@@ -995,7 +996,7 @@ void SMESHGUI_ElemInfo::showInfo( QSet<long> ids, bool isElem )
   myIsElement = isElem;
   myIndex = 0;
   updateControls();
-  information( myIDs.mid( myIndex*MAXITEMS, MAXITEMS ) );
+  information( myIDs.mid( myIndex*MAXITEMS, MAXITEMS ));
 }
 
 /*!
@@ -1079,7 +1080,7 @@ SMESHGUI_ElemInfo::Connectivity SMESHGUI_ElemInfo::nodeConnectivity( const SMDS_
 QString SMESHGUI_ElemInfo::formatConnectivity( Connectivity connectivity, int type )
 {
   QStringList str;
-  if ( connectivity.contains( type ) ) {
+  if ( connectivity.contains( type )) {
     QList<int> elements = connectivity[ type ];
     qSort( elements );
     foreach( int id, elements )
@@ -1112,7 +1113,7 @@ SMESHGUI_ElemInfo::XYZ SMESHGUI_ElemInfo::gravityCenter( const SMDS_MeshElement*
 */
 SMESHGUI_ElemInfo::XYZ SMESHGUI_ElemInfo::normal( const SMDS_MeshElement* element )
 {
-  gp_XYZ n = SMESH::getNormale( dynamic_cast<const SMDS_MeshFace*>( element ) );
+  gp_XYZ n = SMESH::getNormale( dynamic_cast<const SMDS_MeshFace*>( element ));
   return XYZ(n.X(), n.Y(), n.Z());
 }
 
@@ -1124,7 +1125,7 @@ void SMESHGUI_ElemInfo::showPrevious()
 {
   myIndex = qMax( 0, myIndex-1 );
   updateControls();
-  information( myIDs.mid( myIndex*MAXITEMS, MAXITEMS ) );
+  information( myIDs.mid( myIndex*MAXITEMS, MAXITEMS ));
 }
 
 /*!
@@ -1135,7 +1136,7 @@ void SMESHGUI_ElemInfo::showNext()
 {
   myIndex = qMin( myIndex+1, myIDs.count() / MAXITEMS );
   updateControls();
-  information( myIDs.mid( myIndex*MAXITEMS, MAXITEMS ) );
+  information( myIDs.mid( myIndex*MAXITEMS, MAXITEMS ));
 }
 
 /*!
@@ -1176,7 +1177,7 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
     int grp_details = SMESHGUI::resourceMgr()->booleanValue( "SMESH", "elem_info_grp_details", false );
     int precision   = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 );
     int cprecision = -1;
-    if ( SMESHGUI::resourceMgr()->booleanValue( "SMESH", "use_precision", false ) 
+    if ( SMESHGUI::resourceMgr()->booleanValue( "SMESH", "use_precision", false )) 
       cprecision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "controls_precision", -1 );
     foreach ( long id, ids ) {
       if ( !isElements() ) {
@@ -1187,42 +1188,42 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
         if ( !node ) return;
 
         // node ID
-        myInfo->append( QString( "<b>%1 #%2</b>" ).arg( SMESHGUI_ElemInfo::tr( "NODE" ) ).arg( id ) );
+        myInfo->append( QString( "<b>%1 #%2</b>" ).arg( SMESHGUI_ElemInfo::tr( "NODE" )).arg( id ));
         // separator
         myInfo->append( "" );
         // coordinates
-        myInfo->append( QString( "<b>%1:</b> (%2, %3, %4)" ).arg( SMESHGUI_ElemInfo::tr( "COORDINATES" ) ).
-                        arg( node->X(), 0, precision > 0 ? 'f' : 'g', qAbs( precision ) ).
-                        arg( node->Y(), 0, precision > 0 ? 'f' : 'g', qAbs( precision ) ).
-                        arg( node->Z(), 0, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+        myInfo->append( QString( "<b>%1:</b> (%2, %3, %4)" ).arg( SMESHGUI_ElemInfo::tr( "COORDINATES" )).
+                        arg( node->X(), 0, precision > 0 ? 'f' : 'g', qAbs( precision )).
+                        arg( node->Y(), 0, precision > 0 ? 'f' : 'g', qAbs( precision )).
+                        arg( node->Z(), 0, precision > 0 ? 'f' : 'g', qAbs( precision )) );
         // separator
         myInfo->append( "" );
         // connectivity
         Connectivity connectivity = nodeConnectivity( node );
         if ( !connectivity.isEmpty() ) {
-          myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_ElemInfo::tr( "CONNECTIVITY" ) ) );
+          myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_ElemInfo::tr( "CONNECTIVITY" )) );
           QString con = formatConnectivity( connectivity, SMDSAbs_0DElement );
           if ( !con.isEmpty() )
-            myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "0D_ELEMENTS" ) ).arg( con ) );
+            myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "0D_ELEMENTS" )).arg( con ));
           con = formatConnectivity( connectivity, SMDSAbs_Edge );
           if ( !con.isEmpty() )
-            myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "EDGES" ) ).arg( con ) );
+            myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "EDGES" )).arg( con ));
           con = formatConnectivity( connectivity, SMDSAbs_Ball );
           if ( !con.isEmpty() )
-            myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "BALL_ELEMENTS" ) ).arg( con ) );
+            myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "BALL_ELEMENTS" )).arg( con ));
           con = formatConnectivity( connectivity, SMDSAbs_Face );
           if ( !con.isEmpty() )
-            myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "FACES" ) ).arg( con ) );
+            myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "FACES" )).arg( con ));
           con = formatConnectivity( connectivity, SMDSAbs_Volume );
           if ( !con.isEmpty() )
-            myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "VOLUMES" ) ).arg( con ) );
+            myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "VOLUMES" )).arg( con ));
         }
         else {
-          myInfo->append( QString( "<b>%1</b>" ).arg( SMESHGUI_ElemInfo::tr( "FREE_NODE" ) ).arg( id ) );
+          myInfo->append( QString( "<b>%1</b>" ).arg( SMESHGUI_ElemInfo::tr( "FREE_NODE" )).arg( id ));
         }
         // node position
         SMESH::SMESH_Mesh_ptr aMeshPtr = actor()->GetObject()->GetMeshServer();   
-        if ( !CORBA::is_nil( aMeshPtr ) ) {
+        if ( !CORBA::is_nil( aMeshPtr )) {
           SMESH::NodePosition_var pos = aMeshPtr->GetNodePosition( id );
           int shapeID = pos->shapeID;
           if ( shapeID > 0 ) {
@@ -1250,67 +1251,67 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
             }
             // separator
             myInfo->append( "" );
-            myInfo->append( QString( "<b>%1:" ).arg( SMESHGUI_ElemInfo::tr( "POSITION" ) ) );
-            myInfo->append( QString( "- <b>%1: #%2</b>" ).arg( shapeType ).arg( shapeID ) );
+            myInfo->append( QString( "<b>%1:" ).arg( SMESHGUI_ElemInfo::tr( "POSITION" )) );
+            myInfo->append( QString( "- <b>%1: #%2</b>" ).arg( shapeType ).arg( shapeID ));
             if ( pos->shapeType == GEOM::EDGE || pos->shapeType == GEOM::FACE ) {
-              myInfo->append( QString( "- <b>%1: #%2</b>" ).arg( SMESHGUI_ElemInfo::tr( "U_POSITION" ) ).
-                              arg( QString::number( u, precision > 0 ? 'f' : 'g', qAbs( precision )) ) );
+              myInfo->append( QString( "- <b>%1: #%2</b>" ).arg( SMESHGUI_ElemInfo::tr( "U_POSITION" )).
+                              arg( QString::number( u, precision > 0 ? 'f' : 'g', qAbs( precision )) ));
               if ( pos->shapeType == GEOM::FACE ) {
-                myInfo->append( QString( "- <b>%1: #%2</b>" ).arg( SMESHGUI_ElemInfo::tr( "V_POSITION" ) ).
-                                arg( QString::number( v, precision > 0 ? 'f' : 'g', qAbs( precision )) ) );
+                myInfo->append( QString( "- <b>%1: #%2</b>" ).arg( SMESHGUI_ElemInfo::tr( "V_POSITION" )).
+                                arg( QString::number( v, precision > 0 ? 'f' : 'g', qAbs( precision )) ));
               }
             }
           }
         }
         // groups node belongs to
         SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
-        if ( !CORBA::is_nil( aMesh ) ) {
+        if ( !CORBA::is_nil( aMesh )) {
           SMESH::ListOfGroups_var groups = aMesh->GetGroups();
           myInfo->append( "" ); // separator
           bool top_created = false;
           for ( CORBA::ULong i = 0; i < groups->length(); i++ ) {
             SMESH::SMESH_GroupBase_var aGrp = groups[i];
-            if ( CORBA::is_nil( aGrp ) ) continue;
+            if ( CORBA::is_nil( aGrp )) continue;
             QString aName = aGrp->GetName();
-            if ( aGrp->GetType() == SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id ) ) {
+            if ( aGrp->GetType() == SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id )) {
               if ( !top_created ) {
-                myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_AddInfo::tr( "GROUPS" ) ) );
+                myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_AddInfo::tr( "GROUPS" )) );
                 top_created = true;
               }
-              myInfo->append( QString( "+ <b>%1:</b>" ).arg( aName.trimmed() ) );
+              myInfo->append( QString( "+ <b>%1:</b>" ).arg( aName.trimmed() ));
               if ( grp_details ) {
                 SMESH::SMESH_Group_var         aStdGroup  = SMESH::SMESH_Group::_narrow( aGrp );
                 SMESH::SMESH_GroupOnGeom_var   aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGrp );
                 SMESH::SMESH_GroupOnFilter_var aFltGroup  = SMESH::SMESH_GroupOnFilter::_narrow( aGrp );
                 
                 // type : group on geometry, standalone group, group on filter
-                if ( !CORBA::is_nil( aStdGroup ) ) {
-                  myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
-                                  arg( SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" ) ) );
+                if ( !CORBA::is_nil( aStdGroup )) {
+                  myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" )).
+                                  arg( SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" )) );
                 }
-                else if ( !CORBA::is_nil( aGeomGroup ) ) {
-                  myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
-                                  arg( SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" ) ) );
+                else if ( !CORBA::is_nil( aGeomGroup )) {
+                  myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" )).
+                                  arg( SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" )) );
                   GEOM::GEOM_Object_var gobj = aGeomGroup->GetShape();
                   _PTR(SObject) sobj = SMESH::ObjectToSObject( gobj );
                   if ( sobj ) {
-                    myInfo->append( QString( "  - <b>%1:</b> %2: %3" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
-                                    arg( SMESHGUI_AddInfo::tr( "GEOM_OBJECT" ) ).arg( sobj->GetName().c_str() ) );
+                    myInfo->append( QString( "  - <b>%1:</b> %2: %3" ).arg( SMESHGUI_AddInfo::tr( "TYPE" )).
+                                    arg( SMESHGUI_AddInfo::tr( "GEOM_OBJECT" )).arg( sobj->GetName().c_str() ));
                   }
                 }
-                else if ( !CORBA::is_nil( aFltGroup ) ) {
-                  myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
-                                  arg( SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) ) );
+                else if ( !CORBA::is_nil( aFltGroup )) {
+                  myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" )).
+                                  arg( SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" )) );
                 }
                 
                 // size
-                myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "SIZE" ) ).
-                                arg( QString::number( aGrp->Size() ) ) );
+                myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "SIZE" )).
+                                arg( QString::number( aGrp->Size() )) );
                 
                 // color
                 SALOMEDS::Color color = aGrp->GetColor();
-                myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "COLOR" ) ).
-                                arg( QColor( color.R*255., color.G*255., color.B*255. ).name() ) );
+                myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "COLOR" )).
+                                arg( QColor( color.R*255., color.G*255., color.B*255. ).name() ));
               }
             }
           }
@@ -1341,7 +1342,7 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
           break;
         }
         if ( stype.isEmpty() ) return;
-        myInfo->append( QString( "<b>%1 #%2</b>" ).arg( stype ).arg( id ) );
+        myInfo->append( QString( "<b>%1 #%2</b>" ).arg( stype ).arg( id ));
         // separator
         myInfo->append( "" );
 
@@ -1381,15 +1382,15 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
           break;
         }
         if ( !gtype.isEmpty() )
-          myInfo->append( QString( "<b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "TYPE" ) ).arg( gtype ) );
+          myInfo->append( QString( "<b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "TYPE" )).arg( gtype ));
 
         // Quadratic flag (any element except 0D)
         if ( e->GetEntityType() > SMDSEntity_0D && e->GetEntityType() < SMDSEntity_Ball ) {
-          myInfo->append( QString( "<b>%1?</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "QUADRATIC" ) ).arg( e->IsQuadratic() ? SMESHGUI_ElemInfo::tr( "YES" ) : SMESHGUI_ElemInfo::tr( "NO" ) ) );
+          myInfo->append( QString( "<b>%1?</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "QUADRATIC" )).arg( e->IsQuadratic() ? SMESHGUI_ElemInfo::tr( "YES" ) : SMESHGUI_ElemInfo::tr( "NO" )) );
         }
         if ( const SMDS_BallElement* ball = dynamic_cast<const SMDS_BallElement*>( e )) {
           // Ball diameter
-          myInfo->append( QString( "<b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "BALL_DIAMETER" ) ).arg( ball->GetDiameter() ));
+          myInfo->append( QString( "<b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "BALL_DIAMETER" )).arg( ball->GetDiameter() ));
         }
         // separator
         myInfo->append( "" );
@@ -1399,111 +1400,111 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
         for ( int idx = 1; nodeIt->more(); idx++ ) {
           const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
           // node number and ID
-          myInfo->append( QString( "<b>%1 %2/%3</b> - #%4" ).arg( SMESHGUI_ElemInfo::tr( "NODE" ) ).arg( idx ).arg( e->NbNodes() ).arg( node->GetID() ) );
+          myInfo->append( QString( "<b>%1 %2/%3</b> - #%4" ).arg( SMESHGUI_ElemInfo::tr( "NODE" )).arg( idx ).arg( e->NbNodes() ).arg( node->GetID() ));
           // node coordinates
-          myInfo->append( QString( "<b>%1:</b> (%2, %3, %4)" ).arg( SMESHGUI_ElemInfo::tr( "COORDINATES" ) ).
-                          arg( node->X(), 0, precision > 0 ? 'f' : 'g', qAbs( precision ) ).
-                          arg( node->Y(), 0, precision > 0 ? 'f' : 'g', qAbs( precision ) ).
-                          arg( node->Z(), 0, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+          myInfo->append( QString( "<b>%1:</b> (%2, %3, %4)" ).arg( SMESHGUI_ElemInfo::tr( "COORDINATES" )).
+                          arg( node->X(), 0, precision > 0 ? 'f' : 'g', qAbs( precision )).
+                          arg( node->Y(), 0, precision > 0 ? 'f' : 'g', qAbs( precision )).
+                          arg( node->Z(), 0, precision > 0 ? 'f' : 'g', qAbs( precision )) );
           // node connectivity
           Connectivity connectivity = nodeConnectivity( node );
           if ( !connectivity.isEmpty() ) {
-            myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_ElemInfo::tr( "CONNECTIVITY" ) ) );
+            myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_ElemInfo::tr( "CONNECTIVITY" )) );
             QString con = formatConnectivity( connectivity, SMDSAbs_0DElement );
             if ( !con.isEmpty() )
-              myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "0D_ELEMENTS" ) ).arg( con ) );
+              myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "0D_ELEMENTS" )).arg( con ));
             con = formatConnectivity( connectivity, SMDSAbs_Edge );
             if ( !con.isEmpty() )
-              myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "EDGES" ) ).arg( con ) );
+              myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "EDGES" )).arg( con ));
             con = formatConnectivity( connectivity, SMDSAbs_Face );
             if ( !con.isEmpty() )
-              myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "FACES" ) ).arg( con ) );
+              myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "FACES" )).arg( con ));
             con = formatConnectivity( connectivity, SMDSAbs_Volume );
             if ( !con.isEmpty() )
-              myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "VOLUMES" ) ).arg( con ) );
+              myInfo->append( QString( "- <b>%1:</b> %2" ).arg( SMESHGUI_ElemInfo::tr( "VOLUMES" )).arg( con ));
           }
           else {
-            myInfo->append( QString( "<b>%1</b>" ).arg( SMESHGUI_ElemInfo::tr( "FREE_NODE" ) ).arg( id ) );
+            myInfo->append( QString( "<b>%1</b>" ).arg( SMESHGUI_ElemInfo::tr( "FREE_NODE" )).arg( id ));
           }
         }
         // separator
         myInfo->append( "" );
 
         // Controls
-        myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_ElemInfo::tr( "CONTROLS" ) ) );
+        myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_ElemInfo::tr( "CONTROLS" )) );
         //Length
         if ( e->GetType() == SMDSAbs_Edge ) {
           afunctor.reset( new SMESH::Controls::Length() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           afunctor->SetPrecision( cprecision );
-          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "LENGTH_EDGES" ) ).arg( afunctor->GetValue( id ) ) );  
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "LENGTH_EDGES" )).arg( afunctor->GetValue( id )) );  
         }
         if( e->GetType() == SMDSAbs_Face ) {
           //Area
           afunctor.reset(  new SMESH::Controls::Area() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           afunctor->SetPrecision( cprecision );  
-          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "AREA_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "AREA_ELEMENTS" )).arg( afunctor->GetValue( id )) );
           //Taper
           afunctor.reset( new SMESH::Controls::Taper() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );  
           afunctor->SetPrecision( cprecision );
-          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "TAPER_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "TAPER_ELEMENTS" )).arg( afunctor->GetValue( id )) );
           //AspectRatio2D
           afunctor.reset( new SMESH::Controls::AspectRatio() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
-          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "ASPECTRATIO_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "ASPECTRATIO_ELEMENTS" )).arg( afunctor->GetValue( id )) );
           //Minimum angle         
           afunctor.reset( new SMESH::Controls::MinimumAngle() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           afunctor->SetPrecision( cprecision );
-          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MINIMUMANGLE_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MINIMUMANGLE_ELEMENTS" )).arg( afunctor->GetValue( id )) );
           //Wraping angle        
           afunctor.reset( new SMESH::Controls::Warping() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           afunctor->SetPrecision( cprecision );
-          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "WARP_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "WARP_ELEMENTS" )).arg( afunctor->GetValue( id )) );
           //Skew         
           afunctor.reset( new SMESH::Controls::Skew() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           afunctor->SetPrecision( cprecision );
-          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "SKEW_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "SKEW_ELEMENTS" )).arg( afunctor->GetValue( id )) );
           //ElemDiam2D   
           afunctor.reset( new SMESH::Controls::MaxElementLength2D() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
-          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MAX_ELEMENT_LENGTH_2D" ) ).arg( afunctor->GetValue( id ) ) );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MAX_ELEMENT_LENGTH_2D" )).arg( afunctor->GetValue( id )) );
         }
         if( e->GetType() == SMDSAbs_Volume ) {
           //AspectRatio3D
           afunctor.reset(  new SMESH::Controls::AspectRatio3D() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
-          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "ASPECTRATIO_3D_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "ASPECTRATIO_3D_ELEMENTS" )).arg( afunctor->GetValue( id )) );
           //Volume      
           afunctor.reset(  new SMESH::Controls::Volume() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
-          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "VOLUME_3D_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "VOLUME_3D_ELEMENTS" )).arg( afunctor->GetValue( id )) );
           //ElementDiameter3D    
           afunctor.reset(  new SMESH::Controls::Volume() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
-          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MAX_ELEMENT_LENGTH_3D" ) ).arg( afunctor->GetValue( id ) ) );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MAX_ELEMENT_LENGTH_3D" )).arg( afunctor->GetValue( id )) );
         }
         // separator
         myInfo->append( "" );
 
         // Gravity center
         XYZ gc = gravityCenter( e );
-        myInfo->append( QString( "<b>%1:</b> (%2, %3, %4)" ).arg( SMESHGUI_ElemInfo::tr( "GRAVITY_CENTER" ) ).arg( gc.x() ).arg( gc.y() ).arg( gc.z() ) );
+        myInfo->append( QString( "<b>%1:</b> (%2, %3, %4)" ).arg( SMESHGUI_ElemInfo::tr( "GRAVITY_CENTER" )).arg( gc.x() ).arg( gc.y() ).arg( gc.z() ));
         
         // Normal vector
         if( e->GetType() == SMDSAbs_Face ) {
           XYZ gc = normal( e );
-          myInfo->append( QString( "<b>%1:</b> (%2, %3, %4)" ).arg( SMESHGUI_ElemInfo::tr( "NORMAL_VECTOR" ) ).arg( gc.x() ).arg( gc.y() ).arg( gc.z() ) );
+          myInfo->append( QString( "<b>%1:</b> (%2, %3, %4)" ).arg( SMESHGUI_ElemInfo::tr( "NORMAL_VECTOR" )).arg( gc.x() ).arg( gc.y() ).arg( gc.z() ));
         }
 
         // Element position
         if ( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
           SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();    
-          if ( !CORBA::is_nil( aMesh ) ) {
+          if ( !CORBA::is_nil( aMesh )) {
             SMESH::ElementPosition pos = aMesh->GetElementPosition( id );
             int shapeID = pos.shapeID;
             if ( shapeID > 0 ) {
@@ -1517,59 +1518,59 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
               case GEOM::SHELL:  shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SHELL" );  break;
               default:           shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SHAPE" );  break;
               }
-              myInfo->append( QString( "<b>%1:</b> %2 #%3" ).arg( SMESHGUI_ElemInfo::tr( "POSITION" ) ).arg( shapeType ).arg( shapeID ) );
+              myInfo->append( QString( "<b>%1:</b> %2 #%3" ).arg( SMESHGUI_ElemInfo::tr( "POSITION" )).arg( shapeType ).arg( shapeID ));
             }
           }
         }
 
         // Groups the element belongs to
         SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
-        if ( !CORBA::is_nil( aMesh ) ) {
+        if ( !CORBA::is_nil( aMesh )) {
           SMESH::ListOfGroups_var  groups = aMesh->GetGroups();
           myInfo->append( "" ); // separator
           bool top_created = false;
           for ( CORBA::ULong i = 0; i < groups->length(); i++ ) {
             SMESH::SMESH_GroupBase_var aGrp = groups[i];
-            if ( CORBA::is_nil( aGrp ) ) continue;
+            if ( CORBA::is_nil( aGrp )) continue;
             QString aName = aGrp->GetName();
-            if ( aGrp->GetType() != SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id ) ) {
+            if ( aGrp->GetType() != SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id )) {
               if ( !top_created ) {
-                myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_AddInfo::tr( "GROUPS" ) ) );
+                myInfo->append( QString( "<b>%1:</b>" ).arg( SMESHGUI_AddInfo::tr( "GROUPS" )) );
                 top_created = true;
               }
-              myInfo->append( QString( "+ <b>%1:</b>" ).arg( aName.trimmed() ) );
+              myInfo->append( QString( "+ <b>%1:</b>" ).arg( aName.trimmed() ));
               if ( grp_details ) {
                 SMESH::SMESH_Group_var         aStdGroup  = SMESH::SMESH_Group::_narrow( aGrp );
                 SMESH::SMESH_GroupOnGeom_var   aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGrp );
                 SMESH::SMESH_GroupOnFilter_var aFltGroup  = SMESH::SMESH_GroupOnFilter::_narrow( aGrp );
                 
                 // type : group on geometry, standalone group, group on filter
-                if ( !CORBA::is_nil( aStdGroup ) ) {
-                  myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
-                                  arg( SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" ) ) );
+                if ( !CORBA::is_nil( aStdGroup )) {
+                  myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" )).
+                                  arg( SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" )) );
                 }
-                else if ( !CORBA::is_nil( aGeomGroup ) ) {
-                  myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
-                                  arg( SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" ) ) );
+                else if ( !CORBA::is_nil( aGeomGroup )) {
+                  myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" )).
+                                  arg( SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" )) );
                   GEOM::GEOM_Object_var gobj = aGeomGroup->GetShape();
                   _PTR(SObject) sobj = SMESH::ObjectToSObject( gobj );
                   if ( sobj ) {
-                    myInfo->append( QString( "  - <b>%1:</b> %2: %3" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
-                                    arg( SMESHGUI_AddInfo::tr( "GEOM_OBJECT" ) ).arg( sobj->GetName().c_str() ) );
+                    myInfo->append( QString( "  - <b>%1:</b> %2: %3" ).arg( SMESHGUI_AddInfo::tr( "TYPE" )).
+                                    arg( SMESHGUI_AddInfo::tr( "GEOM_OBJECT" )).arg( sobj->GetName().c_str() ));
                   }
                 }
-                else if ( !CORBA::is_nil( aFltGroup ) ) {
-                  myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" ) ).
-                                  arg( SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) ) );
+                else if ( !CORBA::is_nil( aFltGroup )) {
+                  myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "TYPE" )).
+                                  arg( SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" )) );
                 }
                 
-                myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "SIZE" ) ).
-                                arg( QString::number( aGrp->Size() ) ) );
+                myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "SIZE" )).
+                                arg( QString::number( aGrp->Size() )) );
                 
                 // color
                 SALOMEDS::Color color = aGrp->GetColor();
-                myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "COLOR" ) ).
-                                arg( QColor( color.R*255., color.G*255., color.B*255. ).name() ) );
+                myInfo->append( QString( "  - <b>%1:</b> %2" ).arg( SMESHGUI_AddInfo::tr( "COLOR" )).
+                                arg( QColor( color.R*255., color.G*255., color.B*255. ).name() ));
               }
             }
           }
@@ -1630,7 +1631,7 @@ SMESHGUI_TreeElemInfo::ItemDelegate::ItemDelegate( QObject* parent ) : QItemDele
 QWidget* SMESHGUI_TreeElemInfo::ItemDelegate::createEditor( QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index ) const
 {
   QWidget* w = index.column() == 0 ? 0: QItemDelegate::createEditor( parent, option, index );
-  if ( qobject_cast<QLineEdit*>( w ) ) qobject_cast<QLineEdit*>( w )->setReadOnly(  true );
+  if ( qobject_cast<QLineEdit*>( w )) qobject_cast<QLineEdit*>( w )->setReadOnly(  true );
   return w;
 }
 
@@ -1648,18 +1649,20 @@ SMESHGUI_TreeElemInfo::SMESHGUI_TreeElemInfo( QWidget* parent )
 {
   myInfo = new QTreeWidget( frame() );
   myInfo->setColumnCount( 2 );
-  myInfo->setHeaderLabels( QStringList() << tr( "PROPERTY" ) << tr( "VALUE" ) );
+  myInfo->setHeaderLabels( QStringList() << tr( "PROPERTY" ) << tr( "VALUE" ));
   myInfo->header()->setStretchLastSection( true );
 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
   myInfo->header()->setResizeMode( 0, QHeaderView::ResizeToContents );
 #else
   myInfo->header()->setSectionResizeMode( 0, QHeaderView::ResizeToContents );
 #endif
-  myInfo->setItemDelegate( new ItemDelegate( myInfo ) );
+  myInfo->setItemDelegate( new ItemDelegate( myInfo ));
   QVBoxLayout* l = new QVBoxLayout( frame() );
   l->setMargin( 0 );
   l->addWidget( myInfo );
-  connect( myInfo, SIGNAL( itemDoubleClicked( QTreeWidgetItem*, int ) ), this, SLOT( itemDoubleClicked( QTreeWidgetItem*, int ) ) );
+  connect( myInfo, SIGNAL( itemDoubleClicked( QTreeWidgetItem*, int )), this, SLOT( itemDoubleClicked( QTreeWidgetItem*, int )) );
+  connect( myInfo, SIGNAL( itemCollapsed( QTreeWidgetItem* )), this, SLOT( saveExpanded( QTreeWidgetItem* )) );
+  connect( myInfo, SIGNAL( itemExpanded( QTreeWidgetItem* )), this, SLOT( saveExpanded( QTreeWidgetItem* )) );
 }
 
 /*!
@@ -1674,7 +1677,7 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
     int grp_details = SMESHGUI::resourceMgr()->booleanValue( "SMESH", "elem_info_grp_details", false );
     int precision   = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 );
     int cprecision = -1;
-    if ( SMESHGUI::resourceMgr()->booleanValue( "SMESH", "use_precision", false ) 
+    if ( SMESHGUI::resourceMgr()->booleanValue( "SMESH", "use_precision", false )) 
       cprecision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "controls_precision", -1 );
     foreach ( long id, ids ) {
       if ( !isElements() ) {
@@ -1687,66 +1690,66 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
       
         // node ID
         QTreeWidgetItem* nodeItem = createItem( 0, Bold | All );
-        nodeItem->setText( 0, SMESHGUI_ElemInfo::tr( "NODE" ) );
-        nodeItem->setText( 1, QString( "#%1" ).arg( id ) );
+        nodeItem->setText( 0, SMESHGUI_ElemInfo::tr( "NODE" ));
+        nodeItem->setText( 1, QString( "#%1" ).arg( id ));
         // coordinates
         QTreeWidgetItem* coordItem = createItem( nodeItem, Bold );
-        coordItem->setText( 0, SMESHGUI_ElemInfo::tr( "COORDINATES" ) );
+        coordItem->setText( 0, SMESHGUI_ElemInfo::tr( "COORDINATES" ));
         QTreeWidgetItem* xItem = createItem( coordItem );
         xItem->setText( 0, "X" );
-        xItem->setText( 1, QString::number( node->X(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+        xItem->setText( 1, QString::number( node->X(), precision > 0 ? 'f' : 'g', qAbs( precision )) );
         QTreeWidgetItem* yItem = createItem( coordItem );
         yItem->setText( 0, "Y" );
-        yItem->setText( 1, QString::number( node->Y(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+        yItem->setText( 1, QString::number( node->Y(), precision > 0 ? 'f' : 'g', qAbs( precision )) );
         QTreeWidgetItem* zItem = createItem( coordItem );
         zItem->setText( 0, "Z" );
-        zItem->setText( 1, QString::number( node->Z(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+        zItem->setText( 1, QString::number( node->Z(), precision > 0 ? 'f' : 'g', qAbs( precision )) );
         // connectivity
         QTreeWidgetItem* conItem = createItem( nodeItem, Bold );
-        conItem->setText( 0, SMESHGUI_ElemInfo::tr( "CONNECTIVITY" ) );
+        conItem->setText( 0, SMESHGUI_ElemInfo::tr( "CONNECTIVITY" ));
         Connectivity connectivity = nodeConnectivity( node );
         if ( !connectivity.isEmpty() ) {
           QString con = formatConnectivity( connectivity, SMDSAbs_0DElement );
           if ( !con.isEmpty() ) {
             QTreeWidgetItem* i = createItem( conItem );
-            i->setText( 0, SMESHGUI_ElemInfo::tr( "0D_ELEMENTS" ) );
+            i->setText( 0, SMESHGUI_ElemInfo::tr( "0D_ELEMENTS" ));
             i->setText( 1, con );
           }
           con = formatConnectivity( connectivity, SMDSAbs_Ball );
           if ( !con.isEmpty() ) {
             QTreeWidgetItem* i = createItem( conItem );
-            i->setText( 0, SMESHGUI_ElemInfo::tr( "BALL_ELEMENTS" ) );
+            i->setText( 0, SMESHGUI_ElemInfo::tr( "BALL_ELEMENTS" ));
             i->setText( 1, con );
             i->setData( 1, TypeRole, NodeConnectivity );
           }
           con = formatConnectivity( connectivity, SMDSAbs_Edge );
           if ( !con.isEmpty() ) {
             QTreeWidgetItem* i = createItem( conItem );
-            i->setText( 0, SMESHGUI_ElemInfo::tr( "EDGES" ) );
+            i->setText( 0, SMESHGUI_ElemInfo::tr( "EDGES" ));
             i->setText( 1, con );
             i->setData( 1, TypeRole, NodeConnectivity );
           }
           con = formatConnectivity( connectivity, SMDSAbs_Face );
           if ( !con.isEmpty() ) {
             QTreeWidgetItem* i = createItem( conItem );
-            i->setText( 0, SMESHGUI_ElemInfo::tr( "FACES" ) );
+            i->setText( 0, SMESHGUI_ElemInfo::tr( "FACES" ));
             i->setText( 1, con );
             i->setData( 1, TypeRole, NodeConnectivity );
           }
           con = formatConnectivity( connectivity, SMDSAbs_Volume );
           if ( !con.isEmpty() ) {
             QTreeWidgetItem* i = createItem( conItem );
-            i->setText( 0, SMESHGUI_ElemInfo::tr( "VOLUMES" ) );
+            i->setText( 0, SMESHGUI_ElemInfo::tr( "VOLUMES" ));
             i->setText( 1, con );
             i->setData( 1, TypeRole, NodeConnectivity );
           }
         }
         else {
-          conItem->setText( 1, SMESHGUI_ElemInfo::tr( "FREE_NODE" ) );
+          conItem->setText( 1, SMESHGUI_ElemInfo::tr( "FREE_NODE" ));
         }
         // node position
         SMESH::SMESH_Mesh_ptr aMeshPtr = actor()->GetObject()->GetMeshServer();   
-        if ( !CORBA::is_nil( aMeshPtr ) ) {
+        if ( !CORBA::is_nil( aMeshPtr )) {
           SMESH::NodePosition_var pos = aMeshPtr->GetNodePosition( id );
           int shapeID = pos->shapeID;
           if ( shapeID > 0 ) {
@@ -1789,17 +1792,17 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
         }
         // groups node belongs to
         SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
-        if ( !CORBA::is_nil( aMesh ) ) {
+        if ( !CORBA::is_nil( aMesh )) {
           SMESH::ListOfGroups_var groups = aMesh->GetGroups();
           QTreeWidgetItem* groupsItem = 0;
           for ( CORBA::ULong i = 0; i < groups->length(); i++ ) {
             SMESH::SMESH_GroupBase_var aGrp = groups[i];
-            if ( CORBA::is_nil( aGrp ) ) continue;
+            if ( CORBA::is_nil( aGrp )) continue;
             QString aName = aGrp->GetName();
-            if ( aGrp->GetType() == SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id ) ) {
+            if ( aGrp->GetType() == SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id )) {
               if ( !groupsItem ) {
                 groupsItem = createItem( nodeItem, Bold );
-                groupsItem->setText( 0, SMESHGUI_AddInfo::tr( "GROUPS" ) );
+                groupsItem->setText( 0, SMESHGUI_AddInfo::tr( "GROUPS" ));
               }
               QTreeWidgetItem* it = createItem( groupsItem, Bold );
               it->setText( 0, aName.trimmed() );
@@ -1810,34 +1813,34 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
                 
                 // type : group on geometry, standalone group, group on filter
                 QTreeWidgetItem* typeItem = createItem( it );
-                typeItem->setText( 0, SMESHGUI_AddInfo::tr( "TYPE" ) );
-                if ( !CORBA::is_nil( aStdGroup ) ) {
-                  typeItem->setText( 1, SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" ) );
+                typeItem->setText( 0, SMESHGUI_AddInfo::tr( "TYPE" ));
+                if ( !CORBA::is_nil( aStdGroup )) {
+                  typeItem->setText( 1, SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" ));
                 }
-                else if ( !CORBA::is_nil( aGeomGroup ) ) {
-                  typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" ) );
+                else if ( !CORBA::is_nil( aGeomGroup )) {
+                  typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" ));
                   GEOM::GEOM_Object_var gobj = aGeomGroup->GetShape();
                   _PTR(SObject) sobj = SMESH::ObjectToSObject( gobj );
                   if ( sobj ) {
                     QTreeWidgetItem* gobjItem = createItem( typeItem );
-                    gobjItem->setText( 0, SMESHGUI_AddInfo::tr( "GEOM_OBJECT" ) );
+                    gobjItem->setText( 0, SMESHGUI_AddInfo::tr( "GEOM_OBJECT" ));
                     gobjItem->setText( 1, sobj->GetName().c_str() );
                   }
                 }
-                else if ( !CORBA::is_nil( aFltGroup ) ) {
-                  typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) );
+                else if ( !CORBA::is_nil( aFltGroup )) {
+                  typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ));
                 }
                 
                 // size
                 QTreeWidgetItem* sizeItem = createItem( it );
-                sizeItem->setText( 0, SMESHGUI_AddInfo::tr( "SIZE" ) );
-                sizeItem->setText( 1, QString::number( aGrp->Size() ) );
+                sizeItem->setText( 0, SMESHGUI_AddInfo::tr( "SIZE" ));
+                sizeItem->setText( 1, QString::number( aGrp->Size() ));
                 
                 // color
                 SALOMEDS::Color color = aGrp->GetColor();
                 QTreeWidgetItem* colorItem = createItem( it );
-                colorItem->setText( 0, SMESHGUI_AddInfo::tr( "COLOR" ) );
-                colorItem->setBackground( 1, QBrush( QColor( color.R*255., color.G*255., color.B*255.) ) );
+                colorItem->setText( 0, SMESHGUI_AddInfo::tr( "COLOR" ));
+                colorItem->setBackground( 1, QBrush( QColor( color.R*255., color.G*255., color.B*255.) ));
               }
             }
           }
@@ -1864,7 +1867,7 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
         if ( stype.isEmpty() ) return;
         QTreeWidgetItem* elemItem = createItem( 0, Bold | All );
         elemItem->setText( 0, stype );
-        elemItem->setText( 1, QString( "#%1" ).arg( id ) );
+        elemItem->setText( 1, QString( "#%1" ).arg( id ));
         // geometry type
         QString gtype;
         switch( e->GetEntityType() ) {
@@ -1902,25 +1905,25 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
         }
         if ( !gtype.isEmpty() ) {
           QTreeWidgetItem* typeItem = createItem( elemItem, Bold );
-          typeItem->setText( 0, SMESHGUI_ElemInfo::tr( "TYPE" ) );
+          typeItem->setText( 0, SMESHGUI_ElemInfo::tr( "TYPE" ));
           typeItem->setText( 1, gtype );
         }
         // quadratic flag (for edges, faces and volumes)
         if ( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
           // quadratic flag
           QTreeWidgetItem* quadItem = createItem( elemItem, Bold );
-          quadItem->setText( 0, SMESHGUI_ElemInfo::tr( "QUADRATIC" ) );
-          quadItem->setText( 1, e->IsQuadratic() ? SMESHGUI_ElemInfo::tr( "YES" ) : SMESHGUI_ElemInfo::tr( "NO" ) );
+          quadItem->setText( 0, SMESHGUI_ElemInfo::tr( "QUADRATIC" ));
+          quadItem->setText( 1, e->IsQuadratic() ? SMESHGUI_ElemInfo::tr( "YES" ) : SMESHGUI_ElemInfo::tr( "NO" ));
         }
         if ( const SMDS_BallElement* ball = dynamic_cast<const SMDS_BallElement*>( e )) {
           // ball diameter
           QTreeWidgetItem* diamItem = createItem( elemItem, Bold );
-          diamItem->setText( 0, SMESHGUI_ElemInfo::tr( "BALL_DIAMETER" ) );
+          diamItem->setText( 0, SMESHGUI_ElemInfo::tr( "BALL_DIAMETER" ));
           diamItem->setText( 1, QString( "%1" ).arg( ball->GetDiameter() ));
         }
         // connectivity
         QTreeWidgetItem* conItem = createItem( elemItem, Bold );
-        conItem->setText( 0, SMESHGUI_ElemInfo::tr( "CONNECTIVITY" ) );
+        conItem->setText( 0, SMESHGUI_ElemInfo::tr( "CONNECTIVITY" ));
 
 
         if( e->GetGeomType() != SMDSGeom_POLYHEDRA ) {
@@ -1941,7 +1944,7 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
           const int nbFaces = vtool.NbFaces();
           for( int face_id = 0; face_id < nbFaces; face_id++ ) {
             QTreeWidgetItem* faceItem = createItem( conItem, Bold );
-            faceItem->setText( 0, QString( "%1 %2 / %3" ).arg( SMESHGUI_ElemInfo::tr( "FACE" ) ).arg( face_id + 1 ).arg( nbFaces ) );
+            faceItem->setText( 0, QString( "%1 %2 / %3" ).arg( SMESHGUI_ElemInfo::tr( "FACE" )).arg( face_id + 1 ).arg( nbFaces ));
             faceItem->setExpanded( true );
 
             const SMDS_MeshNode** aNodeIds = vtool.GetFaceNodes( face_id );
@@ -1954,120 +1957,135 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
         }
         //Controls
         QTreeWidgetItem* cntrItem = createItem( elemItem, Bold );
-        cntrItem->setText( 0, SMESHGUI_ElemInfo::tr( "CONTROLS" ) );
+        cntrItem->setText( 0, SMESHGUI_ElemInfo::tr( "CONTROLS" ));
         //Length
-        if( e->GetType()==SMDSAbs_Edge){         
+        if( e->GetType()==SMDSAbs_Edge){
           afunctor.reset( new SMESH::Controls::Length() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           afunctor->SetPrecision( cprecision );
           QTreeWidgetItem* lenItem = createItem( cntrItem, Bold );
-          lenItem->setText( 0, tr( "LENGTH_EDGES" ) );
-          lenItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );         
+          lenItem->setText( 0, tr( "LENGTH_EDGES" ));
+          lenItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id )) );
         }
         if( e->GetType() == SMDSAbs_Face ) {
-          //Area         
-          afunctor.reset( new SMESH::Controls::Area() );        
+          //Area
+          afunctor.reset( new SMESH::Controls::Area() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           afunctor->SetPrecision( cprecision );
           QTreeWidgetItem* areaItem = createItem( cntrItem, Bold );
-          areaItem->setText( 0, tr( "AREA_ELEMENTS" ) );
-          areaItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue(id) ) );         
+          areaItem->setText( 0, tr( "AREA_ELEMENTS" ));
+          areaItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue(id) ));
           //Taper
-          afunctor.reset( new SMESH::Controls::Taper() );
-          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
-          afunctor->SetPrecision( cprecision );
-          QTreeWidgetItem* taperlItem = createItem( cntrItem, Bold );
-          taperlItem->setText( 0, tr( "TAPER_ELEMENTS" ) );
-          taperlItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );    
+          if ( e->NbNodes() == 4 ) // see SMESH_Controls.cxx
+          {
+            afunctor.reset( new SMESH::Controls::Taper() );
+            afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+            afunctor->SetPrecision( cprecision );
+            QTreeWidgetItem* taperlItem = createItem( cntrItem, Bold );
+            taperlItem->setText( 0, tr( "TAPER_ELEMENTS" ));
+            taperlItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id )) );
+            //Wraping angle
+            afunctor.reset( new SMESH::Controls::Warping() );
+            afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+            afunctor->SetPrecision( cprecision );
+            QTreeWidgetItem* warpItem = createItem( cntrItem, Bold );
+            warpItem->setText( 0, tr( "WARP_ELEMENTS" ));
+            warpItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id )) );
+          }
           //AspectRatio2D
-          afunctor.reset( new SMESH::Controls::AspectRatio() );
-          afunctor->SetMesh( actor()->GetObject()->GetMesh() );  
-          QTreeWidgetItem* ratlItem = createItem( cntrItem, Bold );
-          ratlItem->setText( 0, tr( "ASPECTRATIO_ELEMENTS" ));
-          ratlItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );      
+          if ( !e->IsPoly() )
+          {
+            afunctor.reset( new SMESH::Controls::AspectRatio() );
+            afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+            QTreeWidgetItem* ratlItem = createItem( cntrItem, Bold );
+            ratlItem->setText( 0, tr( "ASPECTRATIO_ELEMENTS" ));
+            ratlItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id )) );
+          }
           //Minimum angle
           afunctor.reset( new SMESH::Controls::MinimumAngle() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           afunctor->SetPrecision( cprecision );
           QTreeWidgetItem* minanglItem = createItem( cntrItem, Bold );
-          minanglItem->setText( 0, tr( "MINIMUMANGLE_ELEMENTS" ) );
-          minanglItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );    
-          //Wraping angle       
-          afunctor.reset( new SMESH::Controls::Warping() );
-          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
-          afunctor->SetPrecision( cprecision );
-          QTreeWidgetItem* warpItem = createItem( cntrItem, Bold );
-          warpItem->setText( 0, tr( "WARP_ELEMENTS" ));
-          warpItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );        
-          //Skew          
-          afunctor.reset( new SMESH::Controls::Skew() );
-          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
-          afunctor->SetPrecision( cprecision );
-          QTreeWidgetItem* skewItem = createItem( cntrItem, Bold );
-          skewItem->setText( 0, tr( "SKEW_ELEMENTS" ) );
-          skewItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );       
-          //ElemDiam2D    
-          afunctor.reset( new SMESH::Controls::MaxElementLength2D() );
-          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
-          QTreeWidgetItem* diamItem = createItem( cntrItem, Bold );
-          diamItem->setText( 0, tr( "MAX_ELEMENT_LENGTH_2D" ));
-          diamItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );       
+          minanglItem->setText( 0, tr( "MINIMUMANGLE_ELEMENTS" ));
+          minanglItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id )) );
+          //Skew
+          if ( e->NbNodes() == 3 || e->NbNodes() == 4 )
+          {
+            afunctor.reset( new SMESH::Controls::Skew() );
+            afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+            afunctor->SetPrecision( cprecision );
+            QTreeWidgetItem* skewItem = createItem( cntrItem, Bold );
+            skewItem->setText( 0, tr( "SKEW_ELEMENTS" ));
+            skewItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id )) );
+          }
+          //ElemDiam2D
+          if ( !e->IsPoly() )
+          {
+            afunctor.reset( new SMESH::Controls::MaxElementLength2D() );
+            afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+            QTreeWidgetItem* diamItem = createItem( cntrItem, Bold );
+            diamItem->setText( 0, tr( "MAX_ELEMENT_LENGTH_2D" ));
+            diamItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id )) );
+          }
         }
         if( e->GetType() == SMDSAbs_Volume ) {
-          //AspectRatio3D
-          afunctor.reset( new SMESH::Controls::AspectRatio3D() );
-          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
-          QTreeWidgetItem* ratlItem3 = createItem( cntrItem, Bold );
-          ratlItem3->setText( 0, tr( "ASPECTRATIO_3D_ELEMENTS" ) );
-          ratlItem3->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );      
+          if ( !e->IsPoly() )
+          {
+            //AspectRatio3D
+            afunctor.reset( new SMESH::Controls::AspectRatio3D() );
+            afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+            QTreeWidgetItem* ratlItem3 = createItem( cntrItem, Bold );
+            ratlItem3->setText( 0, tr( "ASPECTRATIO_3D_ELEMENTS" ));
+            ratlItem3->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id )) );
+          }
           //Volume
           afunctor.reset( new SMESH::Controls::Volume() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           QTreeWidgetItem* volItem = createItem( cntrItem, Bold );
-          volItem->setText( 0, tr( "VOLUME_3D_ELEMENTS" ) );
-          volItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );
+          volItem->setText( 0, tr( "VOLUME_3D_ELEMENTS" ));
+          volItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id )) );
           //ElementDiameter3D
           afunctor.reset( new SMESH::Controls::MaxElementLength3D() );
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           QTreeWidgetItem* diam3Item = createItem( cntrItem, Bold );
-          diam3Item->setText( 0, tr( "MAX_ELEMENT_LENGTH_3D" ) );
-          diam3Item->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );     
+          diam3Item->setText( 0, tr( "MAX_ELEMENT_LENGTH_3D" ));
+          diam3Item->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id )) );
         }
 
         // gravity center
         XYZ gc = gravityCenter( e );
         QTreeWidgetItem* gcItem = createItem( elemItem, Bold );
-        gcItem->setText( 0, SMESHGUI_ElemInfo::tr( "GRAVITY_CENTER" ) );
+        gcItem->setText( 0, SMESHGUI_ElemInfo::tr( "GRAVITY_CENTER" ));
         QTreeWidgetItem* xItem = createItem( gcItem );
         xItem->setText( 0, "X" );
-        xItem->setText( 1, QString::number( gc.x(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+        xItem->setText( 1, QString::number( gc.x(), precision > 0 ? 'f' : 'g', qAbs( precision )) );
         QTreeWidgetItem* yItem = createItem( gcItem );
         yItem->setText( 0, "Y" );
-        yItem->setText( 1, QString::number( gc.y(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+        yItem->setText( 1, QString::number( gc.y(), precision > 0 ? 'f' : 'g', qAbs( precision )) );
         QTreeWidgetItem* zItem = createItem( gcItem );
         zItem->setText( 0, "Z" );
-        zItem->setText( 1, QString::number( gc.z(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+        zItem->setText( 1, QString::number( gc.z(), precision > 0 ? 'f' : 'g', qAbs( precision )) );
 
         // normal vector
         if( e->GetType() == SMDSAbs_Face ) {
           XYZ gc = normal( e );
           QTreeWidgetItem* nItem = createItem( elemItem, Bold );
-          nItem->setText( 0, SMESHGUI_ElemInfo::tr( "NORMAL_VECTOR" ) );
+          nItem->setText( 0, SMESHGUI_ElemInfo::tr( "NORMAL_VECTOR" ));
           QTreeWidgetItem* xItem = createItem( nItem );
           xItem->setText( 0, "X" );
-          xItem->setText( 1, QString::number( gc.x(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+          xItem->setText( 1, QString::number( gc.x(), precision > 0 ? 'f' : 'g', qAbs( precision )) );
           QTreeWidgetItem* yItem = createItem( nItem );
           yItem->setText( 0, "Y" );
-          yItem->setText( 1, QString::number( gc.y(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+          yItem->setText( 1, QString::number( gc.y(), precision > 0 ? 'f' : 'g', qAbs( precision )) );
           QTreeWidgetItem* zItem = createItem( nItem );
           zItem->setText( 0, "Z" );
-          zItem->setText( 1, QString::number( gc.z(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+          zItem->setText( 1, QString::number( gc.z(), precision > 0 ? 'f' : 'g', qAbs( precision )) );
         }
 
         // element position
         SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
         if ( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
-          if ( !CORBA::is_nil( aMesh ) ) {
+          if ( !CORBA::is_nil( aMesh )) {
             SMESH::ElementPosition pos = aMesh->GetElementPosition( id );
             int shapeID = pos.shapeID;
             if ( shapeID > 0 ) {
@@ -2081,23 +2099,23 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
               case GEOM::SHELL:  shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SHELL" );  break;
               default:           shapeType = SMESHGUI_ElemInfo::tr( "GEOM_SHAPE" );  break;
               }
-              shItem->setText( 0, SMESHGUI_ElemInfo::tr( "POSITION" ) );
-              shItem->setText( 1, QString( "%1 #%2" ).arg( shapeType ).arg( shapeID ) );
+              shItem->setText( 0, SMESHGUI_ElemInfo::tr( "POSITION" ));
+              shItem->setText( 1, QString( "%1 #%2" ).arg( shapeType ).arg( shapeID ));
             }
           }
         }
         // groups element belongs to
-        if ( !CORBA::is_nil( aMesh ) ) {
+        if ( !CORBA::is_nil( aMesh )) {
           SMESH::ListOfGroups_var  groups = aMesh->GetGroups();
           QTreeWidgetItem* groupsItem = 0;
           for ( CORBA::ULong i = 0; i < groups->length(); i++ ) {
             SMESH::SMESH_GroupBase_var aGrp = groups[i];
-            if ( CORBA::is_nil( aGrp ) ) continue;
+            if ( CORBA::is_nil( aGrp )) continue;
             QString aName = aGrp->GetName();
-            if ( aGrp->GetType() != SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id ) ) {
+            if ( aGrp->GetType() != SMESH::NODE && !aName.isEmpty() && aGrp->Contains( id )) {
               if ( !groupsItem ) {
                 groupsItem = createItem( elemItem, Bold );
-                groupsItem->setText( 0, SMESHGUI_AddInfo::tr( "GROUPS" ) );
+                groupsItem->setText( 0, SMESHGUI_AddInfo::tr( "GROUPS" ));
               }
               QTreeWidgetItem* it = createItem( groupsItem, Bold );
               it->setText( 0, aName.trimmed() );
@@ -2108,34 +2126,34 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
                 
                 // type : group on geometry, standalone group, group on filter
                 QTreeWidgetItem* typeItem = createItem( it );
-                typeItem->setText( 0, SMESHGUI_AddInfo::tr( "TYPE" ) );
-                if ( !CORBA::is_nil( aStdGroup ) ) {
-                  typeItem->setText( 1, SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" ) );
+                typeItem->setText( 0, SMESHGUI_AddInfo::tr( "TYPE" ));
+                if ( !CORBA::is_nil( aStdGroup )) {
+                  typeItem->setText( 1, SMESHGUI_AddInfo::tr( "STANDALONE_GROUP" ));
                 }
-                else if ( !CORBA::is_nil( aGeomGroup ) ) {
-                  typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" ) );
+                else if ( !CORBA::is_nil( aGeomGroup )) {
+                  typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_GEOMETRY" ));
                   GEOM::GEOM_Object_var gobj = aGeomGroup->GetShape();
                   _PTR(SObject) sobj = SMESH::ObjectToSObject( gobj );
                   if ( sobj ) {
                     QTreeWidgetItem* gobjItem = createItem( typeItem );
-                    gobjItem->setText( 0, SMESHGUI_AddInfo::tr( "GEOM_OBJECT" ) );
+                    gobjItem->setText( 0, SMESHGUI_AddInfo::tr( "GEOM_OBJECT" ));
                     gobjItem->setText( 1, sobj->GetName().c_str() );
                   }
                 }
-                else if ( !CORBA::is_nil( aFltGroup ) ) {
-                  typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) );
+                else if ( !CORBA::is_nil( aFltGroup )) {
+                  typeItem->setText( 1, SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ));
                 }
                 
                 // size
                 QTreeWidgetItem* sizeItem = createItem( it );
-                sizeItem->setText( 0, SMESHGUI_AddInfo::tr( "SIZE" ) );
-                sizeItem->setText( 1, QString::number( aGrp->Size() ) );
+                sizeItem->setText( 0, SMESHGUI_AddInfo::tr( "SIZE" ));
+                sizeItem->setText( 1, QString::number( aGrp->Size() ));
                 
                 // color
                 SALOMEDS::Color color = aGrp->GetColor();
                 QTreeWidgetItem* colorItem = createItem( it );
-                colorItem->setText( 0, SMESHGUI_AddInfo::tr( "COLOR" ) );
-                colorItem->setBackground( 1, QBrush( QColor( color.R*255., color.G*255., color.B*255.) ) );
+                colorItem->setText( 0, SMESHGUI_AddInfo::tr( "COLOR" ));
+                colorItem->setBackground( 1, QBrush( QColor( color.R*255., color.G*255., color.B*255.) ));
               }
             }
           }
@@ -2158,59 +2176,59 @@ void SMESHGUI_TreeElemInfo::nodeInfo( const SMDS_MeshNode* node, int index,
   int precision   = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 );
   // node number and ID
   QTreeWidgetItem* nodeItem = createItem( parentItem, Bold );
-  nodeItem->setText( 0, QString( "%1 %2 / %3" ).arg( SMESHGUI_ElemInfo::tr( "NODE" ) ).arg( index ).arg( nbNodes ) );
-  nodeItem->setText( 1, QString( "#%1" ).arg( node->GetID() ) );
+  nodeItem->setText( 0, QString( "%1 %2 / %3" ).arg( SMESHGUI_ElemInfo::tr( "NODE" )).arg( index ).arg( nbNodes ));
+  nodeItem->setText( 1, QString( "#%1" ).arg( node->GetID() ));
   nodeItem->setData( 1, TypeRole, ElemConnectivity );
   nodeItem->setData( 1, IdRole, node->GetID() );
   nodeItem->setExpanded( false );
   // node coordinates
   QTreeWidgetItem* coordItem = createItem( nodeItem );
-  coordItem->setText( 0, SMESHGUI_ElemInfo::tr( "COORDINATES" ) );
+  coordItem->setText( 0, SMESHGUI_ElemInfo::tr( "COORDINATES" ));
   QTreeWidgetItem* xItem = createItem( coordItem );
   xItem->setText( 0, "X" );
-  xItem->setText( 1, QString::number( node->X(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+  xItem->setText( 1, QString::number( node->X(), precision > 0 ? 'f' : 'g', qAbs( precision )) );
   QTreeWidgetItem* yItem = createItem( coordItem );
   yItem->setText( 0, "Y" );
-  yItem->setText( 1, QString::number( node->Y(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+  yItem->setText( 1, QString::number( node->Y(), precision > 0 ? 'f' : 'g', qAbs( precision )) );
   QTreeWidgetItem* zItem = createItem( coordItem );
   zItem->setText( 0, "Z" );
-  zItem->setText( 1, QString::number( node->Z(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+  zItem->setText( 1, QString::number( node->Z(), precision > 0 ? 'f' : 'g', qAbs( precision )) );
   // node connectivity
   QTreeWidgetItem* nconItem = createItem( nodeItem );
-  nconItem->setText( 0, SMESHGUI_ElemInfo::tr( "CONNECTIVITY" ) );
+  nconItem->setText( 0, SMESHGUI_ElemInfo::tr( "CONNECTIVITY" ));
   Connectivity connectivity = nodeConnectivity( node );
   if ( !connectivity.isEmpty() ) {
     QString con = formatConnectivity( connectivity, SMDSAbs_0DElement );
     if ( !con.isEmpty() ) {
       QTreeWidgetItem* i = createItem( nconItem );
-      i->setText( 0, SMESHGUI_ElemInfo::tr( "0D_ELEMENTS" ) );
+      i->setText( 0, SMESHGUI_ElemInfo::tr( "0D_ELEMENTS" ));
       i->setText( 1, con );
     }
     con = formatConnectivity( connectivity, SMDSAbs_Edge );
     if ( !con.isEmpty() ) {
       QTreeWidgetItem* i = createItem( nconItem );
-      i->setText( 0, SMESHGUI_ElemInfo::tr( "EDGES" ) );
+      i->setText( 0, SMESHGUI_ElemInfo::tr( "EDGES" ));
       i->setText( 1, con );
       i->setData( 1, TypeRole, NodeConnectivity );
     }
     con = formatConnectivity( connectivity, SMDSAbs_Ball );
     if ( !con.isEmpty() ) {
       QTreeWidgetItem* i = createItem( nconItem );
-      i->setText( 0, SMESHGUI_ElemInfo::tr( "BALL_ELEMENTS" ) );
+      i->setText( 0, SMESHGUI_ElemInfo::tr( "BALL_ELEMENTS" ));
       i->setText( 1, con );
       i->setData( 1, TypeRole, NodeConnectivity );
     }
     con = formatConnectivity( connectivity, SMDSAbs_Face );
     if ( !con.isEmpty() ) {
       QTreeWidgetItem* i = createItem( nconItem );
-      i->setText( 0, SMESHGUI_ElemInfo::tr( "FACES" ) );
+      i->setText( 0, SMESHGUI_ElemInfo::tr( "FACES" ));
       i->setText( 1, con );
       i->setData( 1, TypeRole, NodeConnectivity );
     }
     con = formatConnectivity( connectivity, SMDSAbs_Volume );
     if ( !con.isEmpty() ) {
       QTreeWidgetItem* i = createItem( nconItem );
-      i->setText( 0, SMESHGUI_ElemInfo::tr( "VOLUMES" ) );
+      i->setText( 0, SMESHGUI_ElemInfo::tr( "VOLUMES" ));
       i->setText( 1, con );
       i->setData( 1, TypeRole, NodeConnectivity );
     }
@@ -2244,10 +2262,16 @@ QTreeWidgetItem* SMESHGUI_TreeElemInfo::createItem( QTreeWidgetItem* parent, int
   QFont f = item->font( 0 );
   f.setBold( true );
   for ( int i = 0; i < myInfo->columnCount(); i++ ) {
-    if ( ( flags & Bold ) && ( i == 0 || flags & All ) )
+    if ( ( flags & Bold ) && ( i == 0 || flags & All ))
       item->setFont( i, f );
   }
 
+  if ( parent && parent->childCount() == 1 && itemDepth( parent ) == 1 )
+  {
+    QString resName = expandedResource( parent );
+    parent->setExpanded( SMESHGUI::resourceMgr()->booleanValue("SMESH", resName, true ));
+  }
+
   item->setExpanded( true );
   return item;
 }
@@ -2260,25 +2284,36 @@ void SMESHGUI_TreeElemInfo::contextMenuEvent( QContextMenuEvent* e )
   int type = aTreeItem->data( 1, TypeRole ).toInt();
   int id   = aTreeItem->data( 1, IdRole ).toInt();
   QMenu menu;
-  QAction* a = menu.addAction( tr( "SHOW_ITEM_INFO" ) );
+  QAction* a = menu.addAction( tr( "SHOW_ITEM_INFO" ));
   if ( type == ElemConnectivity && id > 0 && menu.exec( e->globalPos() ) == a )
-    emit( itemInfo( id ) );
+    emit( itemInfo( id ));
   else if ( type == NodeConnectivity && menu.exec( e->globalPos() ) == a )
-    emit( itemInfo( aTreeItem->text( 1 ) ) );
+    emit( itemInfo( aTreeItem->text( 1 )) );
 }
 
-void  SMESHGUI_TreeElemInfo::itemDoubleClicked( QTreeWidgetItem* theItem, int theColumn )
+void SMESHGUI_TreeElemInfo::itemDoubleClicked( QTreeWidgetItem* theItem, int theColumn )
 {
   if ( theItem ) {
     int type = theItem->data( 1, TypeRole ).toInt();
     int id   = theItem->data( 1, IdRole ).toInt();
     if ( type == ElemConnectivity && id > 0 )
-      emit( itemInfo( id ) );
+      emit( itemInfo( id ));
     else if ( type == NodeConnectivity )
-      emit( itemInfo( theItem->text( 1 ) ) );
+      emit( itemInfo( theItem->text( 1 )) );
   }
 }
 
+void SMESHGUI_TreeElemInfo::saveExpanded( QTreeWidgetItem* theItem )
+{
+  if ( theItem )
+    SMESHGUI::resourceMgr()->setValue("SMESH", expandedResource( theItem ), theItem->isExpanded() );
+}
+
+QString SMESHGUI_TreeElemInfo::expandedResource( QTreeWidgetItem* theItem )
+{
+  return QString("Expanded_") + ( isElements() ? "E_" : "N_" ) + theItem->text(0);
+}
+
 void SMESHGUI_TreeElemInfo::saveInfo( QTextStream &out )
 {
   out << QString( 12, '-' ) << "\n";
@@ -2373,14 +2408,14 @@ void SMESHGUI_AddInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
   myComputors.clear();
   clear();
 
-  if ( CORBA::is_nil( obj ) ) return;
+  if ( CORBA::is_nil( obj )) return;
 
   _PTR(SObject) sobj = SMESH::ObjectToSObject( obj );
   if ( !sobj ) return;
 
   // name
   QTreeWidgetItem* nameItem = createItem( 0, Bold | All );
-  nameItem->setText( 0, tr( "NAME" ) );
+  nameItem->setText( 0, tr( "NAME" ));
   nameItem->setText( 1, sobj->GetName().c_str() );
   
   SMESH::SMESH_Mesh_var      aMesh    = SMESH::SMESH_Mesh::_narrow( obj );
@@ -2415,7 +2450,7 @@ QTreeWidgetItem* SMESHGUI_AddInfo::createItem( QTreeWidgetItem* parent, int flag
   QFont f = item->font( 0 );
   f.setBold( true );
   for ( int i = 0; i < columnCount(); i++ ) {
-    if ( ( flags & Bold ) && ( i == 0 || flags & All ) )
+    if ( ( flags & Bold ) && ( i == 0 || flags & All ))
       item->setFont( i, f );
   }
 
@@ -2434,24 +2469,24 @@ void SMESHGUI_AddInfo::meshInfo( SMESH::SMESH_Mesh_ptr mesh, QTreeWidgetItem* pa
   GEOM::GEOM_Object_var shape = mesh->GetShapeToMesh();
   SMESH::MedFileInfo_var inf = mesh->GetMEDFileInfo();
   QTreeWidgetItem* typeItem = createItem( parent, Bold );
-  typeItem->setText( 0, tr( "TYPE" ) );
-  if ( !CORBA::is_nil( shape ) ) {
-    typeItem->setText( 1, tr( "MESH_ON_GEOMETRY" ) );
+  typeItem->setText( 0, tr( "TYPE" ));
+  if ( !CORBA::is_nil( shape )) {
+    typeItem->setText( 1, tr( "MESH_ON_GEOMETRY" ));
     _PTR(SObject) sobj = SMESH::ObjectToSObject( shape );
     if ( sobj ) {
       QTreeWidgetItem* gobjItem = createItem( typeItem );
-      gobjItem->setText( 0, tr( "GEOM_OBJECT" ) );
+      gobjItem->setText( 0, tr( "GEOM_OBJECT" ));
       gobjItem->setText( 1, sobj->GetName().c_str() );
     }
   }
   else if ( strlen( (char*)inf->fileName ) > 0 ) {
-    typeItem->setText( 1, tr( "MESH_FROM_FILE" ) );
+    typeItem->setText( 1, tr( "MESH_FROM_FILE" ));
     QTreeWidgetItem* fileItem = createItem( typeItem );
-    fileItem->setText( 0, tr( "FILE_NAME" ) );
+    fileItem->setText( 0, tr( "FILE_NAME" ));
     fileItem->setText( 1, (char*)inf->fileName );
   }
   else {
-    typeItem->setText( 1, tr( "STANDALONE_MESH" ) );
+    typeItem->setText( 1, tr( "STANDALONE_MESH" ));
   }
   
   // groups
@@ -2477,7 +2512,7 @@ void SMESHGUI_AddInfo::subMeshInfo( SMESH::SMESH_subMesh_ptr subMesh, QTreeWidge
     _PTR(SObject) sobj = SMESH::ObjectToSObject( subMesh->GetFather() );
     if ( sobj ) {
       QTreeWidgetItem* nameItem = createItem( parent, Bold );
-      nameItem->setText( 0, tr( "PARENT_MESH" ) );
+      nameItem->setText( 0, tr( "PARENT_MESH" ));
       nameItem->setText( 1, sobj->GetName().c_str() );
     }
   }
@@ -2487,7 +2522,7 @@ void SMESHGUI_AddInfo::subMeshInfo( SMESH::SMESH_subMesh_ptr subMesh, QTreeWidge
   _PTR(SObject) sobj = SMESH::ObjectToSObject( gobj );
   if ( sobj ) {
     QTreeWidgetItem* gobjItem = createItem( parent, Bold );
-    gobjItem->setText( 0, tr( "GEOM_OBJECT" ) );
+    gobjItem->setText( 0, tr( "GEOM_OBJECT" ));
     gobjItem->setText( 1, sobj->GetName().c_str() );
   }
 }
@@ -2510,29 +2545,29 @@ void SMESHGUI_AddInfo::groupInfo( SMESH::SMESH_GroupBase_ptr grp, QTreeWidgetIte
     _PTR(SObject) sobj = SMESH::ObjectToSObject( grp->GetMesh() );
     if ( sobj ) {
       QTreeWidgetItem* nameItem = createItem( parent, Bold );
-      nameItem->setText( 0, tr( "PARENT_MESH" ) );
+      nameItem->setText( 0, tr( "PARENT_MESH" ));
       nameItem->setText( 1, sobj->GetName().c_str() );
     }
   }
 
   // type : group on geometry, standalone group, group on filter
   QTreeWidgetItem* typeItem = createItem( parent, Bold );
-  typeItem->setText( 0, tr( "TYPE" ) );
-  if ( !CORBA::is_nil( aStdGroup ) ) {
-    typeItem->setText( 1, tr( "STANDALONE_GROUP" ) );
+  typeItem->setText( 0, tr( "TYPE" ));
+  if ( !CORBA::is_nil( aStdGroup )) {
+    typeItem->setText( 1, tr( "STANDALONE_GROUP" ));
   }
-  else if ( !CORBA::is_nil( aGeomGroup ) ) {
-    typeItem->setText( 1, tr( "GROUP_ON_GEOMETRY" ) );
+  else if ( !CORBA::is_nil( aGeomGroup )) {
+    typeItem->setText( 1, tr( "GROUP_ON_GEOMETRY" ));
     GEOM::GEOM_Object_var gobj = aGeomGroup->GetShape();
     _PTR(SObject) sobj = SMESH::ObjectToSObject( gobj );
     if ( sobj ) {
       QTreeWidgetItem* gobjItem = createItem( typeItem );
-      gobjItem->setText( 0, tr( "GEOM_OBJECT" ) );
+      gobjItem->setText( 0, tr( "GEOM_OBJECT" ));
       gobjItem->setText( 1, sobj->GetName().c_str() );
     }
   }
-  else if ( !CORBA::is_nil( aFltGroup ) ) {
-    typeItem->setText( 1, tr( "GROUP_ON_FILTER" ) );
+  else if ( !CORBA::is_nil( aFltGroup )) {
+    typeItem->setText( 1, tr( "GROUP_ON_FILTER" ));
   }
 
   if ( !isShort ) {
@@ -2561,7 +2596,7 @@ void SMESHGUI_AddInfo::groupInfo( SMESH::SMESH_GroupBase_ptr grp, QTreeWidgetIte
       break;
     }
     QTreeWidgetItem* etypeItem = createItem( parent, Bold );
-    etypeItem->setText( 0, tr( "ENTITY_TYPE" ) );
+    etypeItem->setText( 0, tr( "ENTITY_TYPE" ));
     etypeItem->setText( 1, etype );
   }
 
@@ -2574,44 +2609,44 @@ void SMESHGUI_AddInfo::groupInfo( SMESH::SMESH_GroupBase_ptr grp, QTreeWidgetIte
     groupSize = grp->Size();
 
   QTreeWidgetItem* sizeItem = createItem( parent, Bold );
-  sizeItem->setText( 0, tr( "SIZE" ) );
+  sizeItem->setText( 0, tr( "SIZE" ));
   if ( groupSize > -1 ) {
-    sizeItem->setText( 1, QString::number( groupSize ) );
+    sizeItem->setText( 1, QString::number( groupSize ));
   }
   else {
     QPushButton* btn = new QPushButton( tr( meshLoaded ? "COMPUTE" : "LOAD"), this );
     setItemWidget( sizeItem, 1, btn );
     GrpComputor* comp = new GrpComputor( grp, sizeItem, this, /*size=*/true );
-    connect( btn, SIGNAL( clicked() ), comp, SLOT( compute() ) );
+    connect( btn, SIGNAL( clicked() ), comp, SLOT( compute() ));
     myComputors.append( comp );
     if ( !meshLoaded )
-      connect( btn, SIGNAL( clicked() ), this, SLOT( changeLoadToCompute() ) );
+      connect( btn, SIGNAL( clicked() ), this, SLOT( changeLoadToCompute() ));
   }
 
   // color
   SALOMEDS::Color color = grp->GetColor();
   QTreeWidgetItem* colorItem = createItem( parent, Bold );
-  colorItem->setText( 0, tr( "COLOR" ) );
-  colorItem->setBackground( 1, QBrush( QColor( color.R*255., color.G*255., color.B*255.) ) );
+  colorItem->setText( 0, tr( "COLOR" ));
+  colorItem->setBackground( 1, QBrush( QColor( color.R*255., color.G*255., color.B*255.) ));
 
   // nb of underlying nodes
   if ( grp->GetType() != SMESH::NODE) {
     QTreeWidgetItem* nodesItem = createItem( parent, Bold );
-    nodesItem->setText( 0, tr( "NB_NODES" ) );
+    nodesItem->setText( 0, tr( "NB_NODES" ));
     int nbNodesLimit = SMESHGUI::resourceMgr()->integerValue( "SMESH", "info_groups_nodes_limit", 100000 );
     bool toShowNodes = groupSize >= 0 ? ( grp->IsNodeInfoAvailable() || nbNodesLimit <= 0 || groupSize <= nbNodesLimit ) : false;
     if ( toShowNodes && meshLoaded ) {
       // already calculated and up-to-date
-      nodesItem->setText( 1, QString::number( grp->GetNumberOfNodes() ) );
+      nodesItem->setText( 1, QString::number( grp->GetNumberOfNodes() ));
     }
     else {
       QPushButton* btn = new QPushButton( tr( meshLoaded ? "COMPUTE" : "LOAD"), this );
       setItemWidget( nodesItem, 1, btn );
       GrpComputor* comp = new GrpComputor( grp, nodesItem, this ); 
-      connect( btn, SIGNAL( clicked() ), comp, SLOT( compute() ) );
+      connect( btn, SIGNAL( clicked() ), comp, SLOT( compute() ));
       myComputors.append( comp );
       if ( !meshLoaded )
-        connect( btn, SIGNAL( clicked() ), this, SLOT( changeLoadToCompute() ) );
+        connect( btn, SIGNAL( clicked() ), this, SLOT( changeLoadToCompute() ));
     }
   }
 }
@@ -2629,7 +2664,7 @@ void SMESHGUI_AddInfo::showGroups()
   for ( int i = 0; i < parent->childCount() && !itemGroups; i++ ) {
     if ( parent->child( i )->data( 0, Qt::UserRole ).toInt() == GROUPS_ID ) {
       itemGroups = parent->child( i );
-      ExtraWidget* extra = dynamic_cast<ExtraWidget*>( itemWidget( itemGroups, 1 ) );
+      ExtraWidget* extra = dynamic_cast<ExtraWidget*>( itemWidget( itemGroups, 1 ));
       if ( extra )
         extra->updateControls( myGroups->length(), idx );
       while ( itemGroups->childCount() ) delete itemGroups->child( 0 ); // clear child items
@@ -2639,7 +2674,7 @@ void SMESHGUI_AddInfo::showGroups()
   QMap<int, QTreeWidgetItem*> grpItems;
   for ( int i = idx*MAXITEMS ; i < qMin( (idx+1)*MAXITEMS, (int)myGroups->length() ); i++ ) {
     SMESH::SMESH_GroupBase_var grp = myGroups[i];
-    if ( CORBA::is_nil( grp ) ) continue;
+    if ( CORBA::is_nil( grp )) continue;
     _PTR(SObject) grpSObj = SMESH::ObjectToSObject( grp );
     if ( !grpSObj ) continue;
 
@@ -2648,14 +2683,14 @@ void SMESHGUI_AddInfo::showGroups()
     if ( !itemGroups ) {
       // create top-level groups container item
       itemGroups = createItem( parent, Bold | All );
-      itemGroups->setText( 0, tr( "GROUPS" ) );
+      itemGroups->setText( 0, tr( "GROUPS" ));
       itemGroups->setData( 0, Qt::UserRole, GROUPS_ID );
 
       // total number of groups > 10, show extra widgets for info browsing
       if ((int) myGroups->length() > MAXITEMS ) {
         ExtraWidget* extra = new ExtraWidget( this, true );
-        connect( extra->prev, SIGNAL( clicked() ), this, SLOT( showPreviousGroups() ) );
-        connect( extra->next, SIGNAL( clicked() ), this, SLOT( showNextGroups() ) );
+        connect( extra->prev, SIGNAL( clicked() ), this, SLOT( showPreviousGroups() ));
+        connect( extra->next, SIGNAL( clicked() ), this, SLOT( showNextGroups() ));
         setItemWidget( itemGroups, 1, extra );
         extra->updateControls( myGroups->length(), idx );
       }
@@ -2663,7 +2698,7 @@ void SMESHGUI_AddInfo::showGroups()
 
     if ( grpItems.find( grpType ) == grpItems.end() ) {
       grpItems[ grpType ] = createItem( itemGroups, Bold | All );
-      grpItems[ grpType ]->setText( 0, tr( QString( "GROUPS_%1" ).arg( grpType ).toLatin1().constData() ) );
+      grpItems[ grpType ]->setText( 0, tr( QString( "GROUPS_%1" ).arg( grpType ).toLatin1().constData() ));
       itemGroups->insertChild( grpType-1, grpItems[ grpType ] );
     }
   
@@ -2687,7 +2722,7 @@ void SMESHGUI_AddInfo::showSubMeshes()
   for ( int i = 0; i < parent->childCount() && !itemSubMeshes; i++ ) {
     if ( parent->child( i )->data( 0, Qt::UserRole ).toInt() == SUBMESHES_ID ) {
       itemSubMeshes = parent->child( i );
-      ExtraWidget* extra = dynamic_cast<ExtraWidget*>( itemWidget( itemSubMeshes, 1 ) );
+      ExtraWidget* extra = dynamic_cast<ExtraWidget*>( itemWidget( itemSubMeshes, 1 ));
       if ( extra )
         extra->updateControls( mySubMeshes->length(), idx );
       while ( itemSubMeshes->childCount() ) delete itemSubMeshes->child( 0 ); // clear child items
@@ -2697,26 +2732,26 @@ void SMESHGUI_AddInfo::showSubMeshes()
   QMap<int, QTreeWidgetItem*> smItems;
   for ( int i = idx*MAXITEMS ; i < qMin( (idx+1)*MAXITEMS, (int)mySubMeshes->length() ); i++ ) {
     SMESH::SMESH_subMesh_var sm = mySubMeshes[i];
-    if ( CORBA::is_nil( sm ) ) continue;
+    if ( CORBA::is_nil( sm )) continue;
     _PTR(SObject) smSObj = SMESH::ObjectToSObject( sm );
     if ( !smSObj ) continue;
     
     GEOM::GEOM_Object_var gobj = sm->GetSubShape();
-    if ( CORBA::is_nil(gobj ) ) continue;
+    if ( CORBA::is_nil(gobj )) continue;
     
     int smType = gobj->GetShapeType();
     if ( smType == GEOM::COMPSOLID ) smType = GEOM::COMPOUND;
 
     if ( !itemSubMeshes ) {
       itemSubMeshes = createItem( parent, Bold | All );
-      itemSubMeshes->setText( 0, tr( "SUBMESHES" ) );
+      itemSubMeshes->setText( 0, tr( "SUBMESHES" ));
       itemSubMeshes->setData( 0, Qt::UserRole, SUBMESHES_ID );
 
       // total number of sub-meshes > 10, show extra widgets for info browsing
       if ((int) mySubMeshes->length() > MAXITEMS ) {
         ExtraWidget* extra = new ExtraWidget( this, true );
-        connect( extra->prev, SIGNAL( clicked() ), this, SLOT( showPreviousSubMeshes() ) );
-        connect( extra->next, SIGNAL( clicked() ), this, SLOT( showNextSubMeshes() ) );
+        connect( extra->prev, SIGNAL( clicked() ), this, SLOT( showPreviousSubMeshes() ));
+        connect( extra->next, SIGNAL( clicked() ), this, SLOT( showNextSubMeshes() ));
         setItemWidget( itemSubMeshes, 1, extra );
         extra->updateControls( mySubMeshes->length(), idx );
       }
@@ -2724,7 +2759,7 @@ void SMESHGUI_AddInfo::showSubMeshes()
          
     if ( smItems.find( smType ) == smItems.end() ) {
       smItems[ smType ] = createItem( itemSubMeshes, Bold | All );
-      smItems[ smType ]->setText( 0, tr( QString( "SUBMESHES_%1" ).arg( smType ).toLatin1().constData() ) );
+      smItems[ smType ]->setText( 0, tr( QString( "SUBMESHES_%1" ).arg( smType ).toLatin1().constData() ));
       itemSubMeshes->insertChild( smType, smItems[ smType ] );
     }
     
@@ -2746,7 +2781,7 @@ void SMESHGUI_AddInfo::changeLoadToCompute()
   {
     if ( QTreeWidgetItem* item = myComputors[i]->getItem() )
     {
-      if ( QPushButton* btn = qobject_cast<QPushButton*>( itemWidget ( item, 1 ) ) )
+      if ( QPushButton* btn = qobject_cast<QPushButton*>( itemWidget ( item, 1 )) )
         btn->setText( tr("COMPUTE") );
     }
   }
@@ -2789,7 +2824,7 @@ void SMESHGUI_AddInfo::saveInfo( QTextStream &out )
   while ( *it ) {
     if ( !( ( *it )->text(0) ).isEmpty() ) {
       out << QString( SPACING_INFO * itemDepth( *it ), ' ' ) << ( *it )->text(0);
-      if ( ( *it )->text(0)  == tr( "COLOR" ) ) {
+      if ( ( *it )->text(0)  == tr( "COLOR" )) {
         out << ": " << ( ( ( *it )->background(1) ).color() ).name();
       }
       else if ( !( ( *it )->text(1) ).isEmpty() ) out << ": " << ( *it )->text(1);
@@ -2811,22 +2846,22 @@ void SMESHGUI_AddInfo::saveInfo( QTextStream &out )
   \param page specifies the dialog page to be shown at the start-up
 */
 SMESHGUI_MeshInfoDlg::SMESHGUI_MeshInfoDlg( QWidget* parent, int page )
-: QDialog( parent ), myActor( 0 )
+  : QDialog( parent ), myActor( 0 )
 {
   setModal( false );
   setAttribute( Qt::WA_DeleteOnClose, true );
-  setWindowTitle( tr( "MESH_INFO" ) );
+  setWindowTitle( tr( "MESH_INFO" ));
   setSizeGripEnabled( true );
 
   myTabWidget = new QTabWidget( this );
 
-  // base info 
+  // base info
 
   myBaseInfo = new SMESHGUI_MeshInfo( myTabWidget );
-  myTabWidget->addTab( myBaseInfo, tr( "BASE_INFO" ) );
+  myTabWidget->addTab( myBaseInfo, tr( "BASE_INFO" ));
 
   // elem info 
-  
+
   QWidget* w = new QWidget( myTabWidget );
 
   myMode = new QButtonGroup( this );
@@ -2834,12 +2869,14 @@ SMESHGUI_MeshInfoDlg::SMESHGUI_MeshInfoDlg( QWidget* parent, int page )
   myMode->addButton( new QRadioButton( tr( "ELEM_MODE" ), w ), ElemMode );
   myMode->button( NodeMode )->setChecked( true );
   myID = new QLineEdit( w );
-  myID->setValidator( new SMESHGUI_IdValidator( this ) );
+  myID->setValidator( new SMESHGUI_IdValidator( this ));
+  myIDPreviewCheck = new QCheckBox( tr( "SHOW_IDS" ), w );
+  myIDPreview = new SMESHGUI_IdPreview( SMESH::GetViewWindow( SMESHGUI::GetSMESHGUI() ));
 
   int mode = SMESHGUI::resourceMgr()->integerValue( "SMESH", "mesh_elem_info", 1 );
-  mode = qMin( 1, qMax( 0, mode ) );
-  
-  if ( mode == 0 ) 
+  mode = qMin( 1, qMax( 0, mode ));
+
+  if ( mode == 0 )
     myElemInfo = new SMESHGUI_SimpleElemInfo( w );
   else
     myElemInfo = new SMESHGUI_TreeElemInfo( w );
@@ -2849,20 +2886,21 @@ SMESHGUI_MeshInfoDlg::SMESHGUI_MeshInfoDlg( QWidget* parent, int page )
   elemLayout->setSpacing( SPACING );
   elemLayout->addWidget( myMode->button( NodeMode ), 0, 0 );
   elemLayout->addWidget( myMode->button( ElemMode ), 0, 1 );
-  elemLayout->addWidget( myID, 0, 2 );
-  elemLayout->addWidget( myElemInfo, 1, 0, 1, 3 );
-  
-  myTabWidget->addTab( w, tr( "ELEM_INFO" ) );
+  elemLayout->addWidget( myID,                       0, 2 );
+  elemLayout->addWidget( myIDPreviewCheck,           1, 0, 1, 2 );
+  elemLayout->addWidget( myElemInfo,                 2, 0, 1, 3 );
+
+  myTabWidget->addTab( w, tr( "ELEM_INFO" ));
 
   // additional info
 
   myAddInfo = new SMESHGUI_AddInfo( myTabWidget );
-  myTabWidget->addTab( myAddInfo, tr( "ADDITIONAL_INFO" ) );
+  myTabWidget->addTab( myAddInfo, tr( "ADDITIONAL_INFO" ));
 
   // controls info
 
   myCtrlInfo = new SMESHGUI_CtrlInfo( myTabWidget );
-  myTabWidget->addTab( myCtrlInfo, tr( "CTRL_INFO" ) );
+  myTabWidget->addTab( myCtrlInfo, tr( "CTRL_INFO" ));
 
   // buttons
 
@@ -2890,18 +2928,19 @@ SMESHGUI_MeshInfoDlg::SMESHGUI_MeshInfoDlg( QWidget* parent, int page )
   l->addWidget( myTabWidget );
   l->addLayout( btnLayout );
 
-  myTabWidget->setCurrentIndex( qMax( (int)BaseInfo, qMin( (int)ElemInfo, page ) ) );
+  myTabWidget->setCurrentIndex( qMax( (int)BaseInfo, qMin( (int)ElemInfo, page )));
 
-  connect( okBtn,       SIGNAL( clicked() ),              this, SLOT( reject() ) );
-  connect( dumpBtn,     SIGNAL( clicked() ),              this, SLOT( dump() ) );
-  connect( helpBtn,     SIGNAL( clicked() ),              this, SLOT( help() ) );
-  connect( myTabWidget, SIGNAL( currentChanged( int  ) ), this, SLOT( updateSelection() ) );
-  connect( myMode,      SIGNAL( buttonClicked( int  ) ),  this, SLOT( modeChanged() ) );
-  connect( myID,        SIGNAL( textChanged( QString ) ), this, SLOT( idChanged() ) );
-  connect( SMESHGUI::GetSMESHGUI(),  SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( deactivate() ) );
-  connect( SMESHGUI::GetSMESHGUI(),  SIGNAL( SignalCloseAllDialogs() ),        this, SLOT( reject() ) );
-  connect( myElemInfo,  SIGNAL( itemInfo( int ) ),     this, SLOT( showItemInfo( int ) ) );
-  connect( myElemInfo,  SIGNAL( itemInfo( QString ) ), this, SLOT( showItemInfo( QString ) ) );
+  connect( okBtn,       SIGNAL( clicked() ),              this, SLOT( reject() ));
+  connect( dumpBtn,     SIGNAL( clicked() ),              this, SLOT( dump() ));
+  connect( helpBtn,     SIGNAL( clicked() ),              this, SLOT( help() ));
+  connect( myTabWidget, SIGNAL( currentChanged( int  )), this, SLOT( updateSelection() ));
+  connect( myMode,      SIGNAL( buttonClicked( int  )),  this, SLOT( modeChanged() ));
+  connect( myID,        SIGNAL( textChanged( QString )), this, SLOT( idChanged() ));
+  connect( myIDPreviewCheck,         SIGNAL( toggled(bool) ), this, SLOT( idPreviewChange(bool) ));
+  connect( SMESHGUI::GetSMESHGUI(),  SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( deactivate() ));
+  connect( SMESHGUI::GetSMESHGUI(),  SIGNAL( SignalCloseAllDialogs() ),        this, SLOT( reject() ));
+  connect( myElemInfo,  SIGNAL( itemInfo( int )),     this, SLOT( showItemInfo( int )));
+  connect( myElemInfo,  SIGNAL( itemInfo( QString )), this, SLOT( showItemInfo( QString )));
 
   updateSelection();
 }
@@ -2911,6 +2950,7 @@ SMESHGUI_MeshInfoDlg::SMESHGUI_MeshInfoDlg( QWidget* parent, int page )
 */
 SMESHGUI_MeshInfoDlg::~SMESHGUI_MeshInfoDlg()
 {
+  delete myIDPreview;
 }
 
 /*!
@@ -2923,7 +2963,7 @@ void SMESHGUI_MeshInfoDlg::showInfo( const Handle(SALOME_InteractiveObject)& IO
     myIO = IO;
 
   SMESH::SMESH_IDSource_var obj = SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( IO );
-  if ( !CORBA::is_nil( obj ) )
+  if ( !CORBA::is_nil( obj ))
   {
     myAddInfo->showInfo( obj );  // nb of nodes in a group can be computed by myAddInfo,
     myBaseInfo->showInfo( obj ); // and it will be used by myBaseInfo (IPAL52871)
@@ -2968,6 +3008,7 @@ void SMESHGUI_MeshInfoDlg::reject()
   if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow() )
     aViewWindow->SetSelectionMode( ActorSelection );
   QDialog::reject();
+  myIDPreview->SetPointsLabeled(false);
 }
 
 /*!
@@ -3001,7 +3042,9 @@ void SMESHGUI_MeshInfoDlg::updateSelection()
   disconnect( selMgr, 0, this, 0 );
   selMgr->clearFilters();
 
-  if ( myTabWidget->currentIndex() == BaseInfo || myTabWidget->currentIndex() == AddInfo || myTabWidget->currentIndex() == CtrlInfo ) {
+  if ( myTabWidget->currentIndex() == BaseInfo ||
+       myTabWidget->currentIndex() == AddInfo ||
+       myTabWidget->currentIndex() == CtrlInfo ) {
     SMESH::SetPointRepresentation( false );
     if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow() )
       aViewWindow->SetSelectionMode( ActorSelection );
@@ -3023,7 +3066,7 @@ void SMESHGUI_MeshInfoDlg::updateSelection()
   SMESH_Actor* oldActor = myActor;
   myID->clear();
   
-  connect( selMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( updateInfo() ) );
+  connect( selMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( updateInfo() ));
   updateInfo();
   
   if ( oldActor == myActor && myActor && !oldID.isEmpty() ) {
@@ -3078,7 +3121,7 @@ void SMESHGUI_MeshInfoDlg::activate()
 void SMESHGUI_MeshInfoDlg::deactivate()
 {
   myTabWidget->setEnabled( false );
-  disconnect( SMESHGUI::selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( updateInfo() ) );
+  disconnect( SMESHGUI::selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( updateInfo() ));
 }
 
 /*!
@@ -3091,28 +3134,48 @@ void SMESHGUI_MeshInfoDlg::modeChanged()
 }
 
 /*!
-  \brief Caled when users prints mesh element ID in the corresponding field.
+  \brief Called when users prints mesh element ID in the corresponding field.
 */
 void SMESHGUI_MeshInfoDlg::idChanged()
 {
+  myIDPreview->SetPointsLabeled( false );
+
   SVTK_Selector* selector = SMESH::GetSelector();
   if ( myActor && selector ) {
     Handle(SALOME_InteractiveObject) IO = myActor->getIO();
     TColStd_MapOfInteger ID;
-    QSet<long> ids;
+    QSet<long>           ids;
+    std::vector<int>     idVec;
+    std::list< gp_XYZ >  aGrCentersXYZ;
     QStringList idTxt = myID->text().split( " ", QString::SkipEmptyParts );
     foreach ( QString tid, idTxt ) {
       long id = tid.trimmed().toLong();
-      const SMDS_MeshElement* e = myMode->checkedId() == ElemMode ? 
+      const SMDS_MeshElement* e = myMode->checkedId() == ElemMode ?
         myActor->GetObject()->GetMesh()->FindElement( id ) :
         myActor->GetObject()->GetMesh()->FindNode( id );
       if ( e ) {
         ID.Add( id );
         ids << id;
+        if ( myMode->checkedId() == ElemMode )
+        {
+          idVec.push_back( id );
+          aGrCentersXYZ.push_back( myElemInfo->getGravityCenter( e ));
+        }
       }
     }
     selector->AddOrRemoveIndex( IO, ID, false );
     if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow() ) {
+
+      if ( myMode->checkedId() == NodeMode )
+        myIDPreview->SetPointsData( myActor->GetObject()->GetMesh(), ID );
+      else
+        myIDPreview->SetElemsData( idVec, aGrCentersXYZ );
+
+      bool showIDs = ( !ID.IsEmpty() &&
+                       myIDPreviewCheck->isChecked() &&
+                       myTabWidget->currentIndex() == ElemInfo );
+      myIDPreview->SetPointsLabeled( showIDs, myActor->GetVisibility() );
+
       aViewWindow->highlight( IO, true, true );
       aViewWindow->Repaint();
     }
@@ -3120,11 +3183,21 @@ void SMESHGUI_MeshInfoDlg::idChanged()
   }
 }
 
+/*!
+ * \brief Show IDs clicked
+ */
+void SMESHGUI_MeshInfoDlg::idPreviewChange( bool isOn )
+{
+  myIDPreview->SetPointsLabeled( isOn && !myID->text().simplified().isEmpty() );
+  if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow() )
+    aViewWindow->Repaint();
+}
+
 void SMESHGUI_MeshInfoDlg::showItemInfo( int id )
 {
-  if ( id > 0 &&  myActor->GetObject()->GetMesh()->FindNode( id ) ) {
+  if ( id > 0 &&  myActor->GetObject()->GetMesh()->FindNode( id )) {
     myMode->button( NodeMode )->click();
-    myID->setText( QString::number( id ) );
+    myID->setText( QString::number( id ));
   }
 }
 
@@ -3145,7 +3218,7 @@ void SMESHGUI_MeshInfoDlg::dump()
   _PTR( Study ) aStudy = appStudy->studyDS();
 
   QStringList aFilters;
-  aFilters.append( tr( "TEXT_FILES" ) );
+  aFilters.append( tr( "TEXT_FILES" ));
 
   bool anIsBase = true;
   bool anIsElem = true;
@@ -3160,7 +3233,7 @@ void SMESHGUI_MeshInfoDlg::dump()
   }
 
   DumpFileDlg fd( this );
-  fd.setWindowTitle( tr( "SAVE_INFO" ) );
+  fd.setWindowTitle( tr( "SAVE_INFO" ));
   fd.setNameFilters( aFilters );
   fd.myBaseChk->setChecked( anIsBase );
   fd.myElemChk->setChecked( anIsElem );
@@ -3181,7 +3254,7 @@ void SMESHGUI_MeshInfoDlg::dump()
         return;
  
       QFile aFile( aFileName );
-      if ( !aFile.open( QIODevice::WriteOnly | QIODevice::Text ) )
+      if ( !aFile.open( QIODevice::WriteOnly | QIODevice::Text ))
         return;
       
       QTextStream out( &aFile );
@@ -3219,7 +3292,7 @@ SMESHGUI_CtrlInfo::SMESHGUI_CtrlInfo( QWidget* parent )
   myWidgets << aName;
 
   SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
-  QIcon aComputeIcon( aResMgr->loadPixmap( "SMESH", tr( "ICON_COMPUTE" ) ) );
+  QIcon aComputeIcon( aResMgr->loadPixmap( "SMESH", tr( "ICON_COMPUTE" )) );
 
   SMESH::FilterManager_var aFilterMgr = SMESH::GetFilterManager();
 
@@ -3243,7 +3316,7 @@ SMESHGUI_CtrlInfo::SMESHGUI_CtrlInfo( QWidget* parent )
   myToleranceWidget = new SMESHGUI_SpinBox( this );
   myToleranceWidget->RangeStepAndValidator(0.0000000001, 1000000.0, 0.0000001, "length_precision" );
   myToleranceWidget->setAcceptNames( false );
-  myToleranceWidget->SetValue( SMESHGUI::resourceMgr()->doubleValue( "SMESH", "equal_nodes_tolerance", 1e-7 ) );
+  myToleranceWidget->SetValue( SMESHGUI::resourceMgr()->doubleValue( "SMESH", "equal_nodes_tolerance", 1e-7 ));
 
   // edges info
   QLabel* anEdgesLab = new QLabel( tr( "EDGES_INFO" ),  this );
@@ -3320,16 +3393,16 @@ SMESHGUI_CtrlInfo::SMESHGUI_CtrlInfo( QWidget* parent )
   aComputeVolumeBtn->setIcon(aComputeIcon);
   myButtons << aComputeVolumeBtn;   //9
 
-  connect( aComputeFaceBtn,   SIGNAL( clicked() ), this, SLOT( computeAspectRatio() ) );
-  connect( aComputeVolumeBtn, SIGNAL( clicked() ), this, SLOT( computeAspectRatio3D() ) );
-  connect( aFreeNodesBtn,     SIGNAL( clicked() ), this, SLOT( computeFreeNodesInfo() ) );
-  connect( aNodesNbConnBtn,   SIGNAL( clicked() ), this, SLOT( computeNodesNbConnInfo() ) );
-  connect( aDoubleNodesBtn,   SIGNAL( clicked() ), this, SLOT( computeDoubleNodesInfo() ) );
-  connect( aDoubleEdgesBtn,   SIGNAL( clicked() ), this, SLOT( computeDoubleEdgesInfo() ) );
-  connect( aDoubleFacesBtn,   SIGNAL( clicked() ), this, SLOT( computeDoubleFacesInfo() ) );
-  connect( aOverContFacesBtn, SIGNAL( clicked() ), this, SLOT( computeOverConstrainedFacesInfo() ) );
-  connect( aDoubleVolumesBtn, SIGNAL( clicked() ), this, SLOT( computeDoubleVolumesInfo() ) );
-  connect( aOverContVolumesBtn,SIGNAL( clicked() ), this, SLOT( computeOverConstrainedVolumesInfo() ) );
+  connect( aComputeFaceBtn,   SIGNAL( clicked() ), this, SLOT( computeAspectRatio() ));
+  connect( aComputeVolumeBtn, SIGNAL( clicked() ), this, SLOT( computeAspectRatio3D() ));
+  connect( aFreeNodesBtn,     SIGNAL( clicked() ), this, SLOT( computeFreeNodesInfo() ));
+  connect( aNodesNbConnBtn,   SIGNAL( clicked() ), this, SLOT( computeNodesNbConnInfo() ));
+  connect( aDoubleNodesBtn,   SIGNAL( clicked() ), this, SLOT( computeDoubleNodesInfo() ));
+  connect( aDoubleEdgesBtn,   SIGNAL( clicked() ), this, SLOT( computeDoubleEdgesInfo() ));
+  connect( aDoubleFacesBtn,   SIGNAL( clicked() ), this, SLOT( computeDoubleFacesInfo() ));
+  connect( aOverContFacesBtn, SIGNAL( clicked() ), this, SLOT( computeOverConstrainedFacesInfo() ));
+  connect( aDoubleVolumesBtn, SIGNAL( clicked() ), this, SLOT( computeDoubleVolumesInfo() ));
+  connect( aOverContVolumesBtn,SIGNAL( clicked() ), this, SLOT( computeOverConstrainedVolumesInfo() ));
   connect( myToleranceWidget, SIGNAL(valueChanged(double)), this, SLOT( setTolerance( double )));
 
   setFontAttributes( aNameLab );
@@ -3417,7 +3490,7 @@ QLabel* SMESHGUI_CtrlInfo::createField()
   lab->setAlignment( Qt::AlignCenter );
   lab->setAutoFillBackground( true );
   QPalette pal = lab->palette();
-  pal.setColor( QPalette::Window, QApplication::palette().color( QPalette::Active, QPalette::Base ) );
+  pal.setColor( QPalette::Window, QApplication::palette().color( QPalette::Active, QPalette::Base ));
   lab->setPalette( pal );
   lab->setMinimumWidth( 60 );
   return lab;
@@ -3726,7 +3799,7 @@ Plot2d_Histogram* SMESHGUI_CtrlInfo::getHistogram( SMESH::NumericalFunctor_ptr a
   aNumFun->SetMesh( mesh );
 
   CORBA::Long cprecision = 6;
-  if ( SMESHGUI::resourceMgr()->booleanValue( "SMESH", "use_precision", false ) 
+  if ( SMESHGUI::resourceMgr()->booleanValue( "SMESH", "use_precision", false )) 
     cprecision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "controls_precision", -1 );
   aNumFun->SetPrecision( cprecision );
 
@@ -3736,7 +3809,7 @@ Plot2d_Histogram* SMESHGUI_CtrlInfo::getHistogram( SMESH::NumericalFunctor_ptr a
                                                                   /*isLogarithmic=*/false,
                                                                   myObject );
   Plot2d_Histogram* aHistogram = new Plot2d_Histogram();
-  aHistogram->setColor( palette().color( QPalette::Highlight ) );
+  aHistogram->setColor( palette().color( QPalette::Highlight ));
   if ( &histogramVar.in() )
   {
     for ( size_t i = 0, nb = histogramVar->length(); i < nb; i++ )
@@ -3779,7 +3852,7 @@ SMESHGUI_CtrlInfoDlg::SMESHGUI_CtrlInfoDlg( QWidget* parent )
 : QDialog( parent )
 {
   setAttribute( Qt::WA_DeleteOnClose, true );
-  setWindowTitle( tr( "CTRL_INFO" ) );
+  setWindowTitle( tr( "CTRL_INFO" ));
   setMinimumSize( 400, 600 );
 
   myCtrlInfo = new SMESHGUI_CtrlInfo( this );
@@ -3809,11 +3882,11 @@ SMESHGUI_CtrlInfoDlg::SMESHGUI_CtrlInfoDlg( QWidget* parent )
   l->addWidget( myCtrlInfo );
   l->addLayout( btnLayout );
 
-  connect( okBtn,   SIGNAL( clicked() ), this, SLOT( reject() ) );
-  connect( dumpBtn, SIGNAL( clicked() ), this, SLOT( dump() ) );
-  connect( helpBtn, SIGNAL( clicked() ), this, SLOT( help() ) );
-  connect( SMESHGUI::GetSMESHGUI(), SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( deactivate() ) );
-  connect( SMESHGUI::GetSMESHGUI(), SIGNAL( SignalCloseAllDialogs() ),        this, SLOT( reject() ) );
+  connect( okBtn,   SIGNAL( clicked() ), this, SLOT( reject() ));
+  connect( dumpBtn, SIGNAL( clicked() ), this, SLOT( dump() ));
+  connect( helpBtn, SIGNAL( clicked() ), this, SLOT( help() ));
+  connect( SMESHGUI::GetSMESHGUI(), SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( deactivate() ));
+  connect( SMESHGUI::GetSMESHGUI(), SIGNAL( SignalCloseAllDialogs() ),        this, SLOT( reject() ));
 
   updateSelection();
 }
@@ -3831,7 +3904,7 @@ SMESHGUI_CtrlInfoDlg::~SMESHGUI_CtrlInfoDlg()
 */
 void SMESHGUI_CtrlInfoDlg::showInfo( const Handle(SALOME_InteractiveObject)& IO )
 {  
-  if ( SMESH::SMESH_IDSource_var obj = SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( IO ) )
+  if ( SMESH::SMESH_IDSource_var obj = SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( IO ))
     myCtrlInfo->showInfo( obj );
 }
 
@@ -3852,7 +3925,7 @@ void SMESHGUI_CtrlInfoDlg::updateSelection()
   LightApp_SelectionMgr* selMgr = SMESHGUI::selectionMgr();
   disconnect( selMgr, 0, this, 0 );
   SMESH::SetPointRepresentation( false );  
-  connect( selMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( updateInfo() ) );
+  connect( selMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( updateInfo() ));
   updateInfo();  
 }
 
@@ -3887,7 +3960,7 @@ void SMESHGUI_CtrlInfoDlg::activate()
 */
 void SMESHGUI_CtrlInfoDlg::deactivate()
 {
-  disconnect( SMESHGUI::selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( updateInfo() ) );
+  disconnect( SMESHGUI::selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( updateInfo() ));
 }
 
 /*!
@@ -3902,10 +3975,10 @@ void SMESHGUI_CtrlInfoDlg::dump()
   _PTR( Study ) aStudy = appStudy->studyDS();
 
   QStringList aFilters;
-  aFilters.append( tr( "TEXT_FILES" ) );
+  aFilters.append( tr( "TEXT_FILES" ));
 
   DumpFileDlg fd( this );
-  fd.setWindowTitle( tr( "SAVE_INFO" ) );
+  fd.setWindowTitle( tr( "SAVE_INFO" ));
   fd.setNameFilters( aFilters );
   fd.myBaseChk->hide();
   fd.myElemChk->hide();
@@ -3920,7 +3993,7 @@ void SMESHGUI_CtrlInfoDlg::dump()
         return;
  
       QFile aFile( aFileName );
-      if ( !aFile.open( QIODevice::WriteOnly | QIODevice::Text ) )
+      if ( !aFile.open( QIODevice::WriteOnly | QIODevice::Text ))
         return;
       
       QTextStream out( &aFile );
index 2edf2e58a42033271e1121d5b1fe1fe792cafd75..4b43e1aa43f323055c18ae4c3d61a0a0c0e5ace0 100644 (file)
 
 class QAbstractButton;
 class QButtonGroup;
+class QCheckBox;
 class QContextMenuEvent;
+class QGridLayout;
 class QLabel;
 class QLineEdit;
 class QPushButton;
 class QTabWidget;
 class QTextBrowser;
-class QGridLayout;
-class SMESH_Actor;
-class SMDS_MeshNode;
 class SMDS_MeshElement;
+class SMDS_MeshNode;
+class SMESHGUI_IdPreview;
 class SMESHGUI_SpinBox;
+class SMESH_Actor;
 
 class ExtraWidget;
 
@@ -157,6 +159,8 @@ public:
   void         clear();
   virtual void saveInfo( QTextStream &out ) = 0;
 
+  gp_XYZ       getGravityCenter( const SMDS_MeshElement* e ) { return gravityCenter(e); }
+
 protected:
   struct XYZ
   {
@@ -168,6 +172,7 @@ protected:
     double x() const  { return myX; }
     double y() const  { return myY; }
     double z() const  { return myZ; }
+    operator gp_XYZ() const { return gp_XYZ( myX, myY, myZ ); }
   };
   typedef QMap< int, QList<int> > Connectivity;
 
@@ -237,9 +242,11 @@ protected:
 
 private slots:
   void             itemDoubleClicked( QTreeWidgetItem*, int );
+  void             saveExpanded( QTreeWidgetItem* );
   
 private:
   QTreeWidgetItem* createItem( QTreeWidgetItem* = 0, int = 0 );
+  QString          expandedResource( QTreeWidgetItem* );
   
 private:
   QTreeWidget*     myInfo;
@@ -382,19 +389,22 @@ private slots:
   void deactivate();
   void modeChanged();
   void idChanged();
+  void idPreviewChange(bool);
   void showItemInfo( int );
   void showItemInfo( const QString& );
   void dump();
 
 private:
-  QTabWidget*        myTabWidget;
-  SMESHGUI_MeshInfo* myBaseInfo;
-  QButtonGroup*      myMode;
-  QLineEdit*         myID;
-  SMESHGUI_ElemInfo* myElemInfo;   
-  SMESHGUI_AddInfo*  myAddInfo;
-  SMESHGUI_CtrlInfo* myCtrlInfo;
-  SMESH_Actor*       myActor;
+  QTabWidget*                      myTabWidget;
+  SMESHGUI_MeshInfo*               myBaseInfo;
+  QButtonGroup*                    myMode;
+  QLineEdit*                       myID;
+  QCheckBox*                       myIDPreviewCheck;
+  SMESHGUI_IdPreview*              myIDPreview;
+  SMESHGUI_ElemInfo*               myElemInfo;   
+  SMESHGUI_AddInfo*                myAddInfo;
+  SMESHGUI_CtrlInfo*               myCtrlInfo;
+  SMESH_Actor*                     myActor;
   Handle(SALOME_InteractiveObject) myIO;
 };
 
index 52920773b97b13cffbbbc363a74c6fc4775f4fe5..43d92b9fc96c191ae3db98324bbbf30fb1e3a2f5 100644 (file)
@@ -271,7 +271,7 @@ void SMESHGUI_MeshOp::startOperation()
 /*!
  * \brief Selects a recently created mesh or sub-mesh if necessary
  *
- * Virtual method redefined from base class called when operation is commited
+ * Virtual method redefined from base class called when operation is committed
  * selects a recently created mesh or sub-mesh if necessary. Allows to perform
  * selection when the custom selection filters are removed.
  */
@@ -709,15 +709,14 @@ void SMESHGUI_MeshOp::selectionDone()
       }
     }
     else { // no geometry defined
-      myDlg->enableTab( SMESH::DIM_3D );
-      QStringList hypList;
-      availableHyps( SMESH::DIM_3D, Algo, hypList,
-                     myAvailableHypData[SMESH::DIM_3D][Algo]);
 
-      SMESHGUI_MeshTab* aTab = myDlg->tab( SMESH::DIM_3D );
-      aTab->setAvailableHyps( Algo, hypList );
-      for (int i = SMESH::DIM_0D;i < SMESH::DIM_3D; ++i) {
-        myDlg->disableTab(i);
+      QStringList hypList;
+      for ( int dim = SMESH::DIM_0D; dim <= SMESH::DIM_3D; dim++ )
+      {
+        availableHyps( dim, Algo, hypList, myAvailableHypData[dim][Algo]);
+        myDlg->tab( dim )->setAvailableHyps( Algo, hypList );
+        if ( hypList.empty() ) myDlg->disableTab( dim );
+        else                   myDlg->enableTab( dim );
       }
       myMaxShapeDim = -1;
       //Hide labels and fields (Mesh and Geometry)
@@ -1245,10 +1244,10 @@ void SMESHGUI_MeshOp::initHypCreator( SMESHGUI_GenericHypothesisCreator* theCrea
 
 //================================================================================
 /*!
- * \Brief Returns tab dimention
+ * \Brief Returns tab dimension
   * \param tab - the tab in the dlg
   * \param dlg - my dialogue
-  * \retval int - dimention
+  * \retval int - dimension
  */
 //================================================================================
 static int getTabDim (const QObject* tab, SMESHGUI_MeshDlg* dlg )
@@ -1505,7 +1504,8 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
   if ( myIgnoreAlgoSelection )
     return;
 
-  int aDim = theDim < 0 ? getTabDim( sender(), myDlg ): theDim;
+  int curDim = getTabDim( sender(), myDlg );
+  int aDim = theDim < 0 ? curDim : theDim;
   if (aDim == -1)
     return;
 
@@ -1587,7 +1587,7 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
       myDlg->tab( dim )->setAvailableHyps( Algo, anAvailable );
       noCompatible = anAvailable.isEmpty();
       algoIndex = myAvailableHypData[dim][Algo].indexOf( curAlgo );
-      if ( !isSubmesh && algoIndex < 0 && soleCompatible && !forward && dim != SMESH::DIM_0D) {
+      if ( !isSubmesh && algoIndex < 0 && soleCompatible && !forward && dim == curDim ) {
         // select the sole compatible algo
         algoIndex = 0;
       }
@@ -1682,7 +1682,8 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
         hypIndex = this->find( curHyp, myExistingHyps[ dim ][ type ]);
       else
         hypIndex = -1;
-      if ( !isSubmesh && myToCreate && hypIndex < 0 && anExisting.count() == 1 ) {
+      if ( !isSubmesh && myToCreate && hypIndex < 0 && anExisting.count() == 1 && dim == curDim )
+      {
         // none is yet selected => select the sole existing if it is not optional
         CORBA::String_var hypTypeName = myExistingHyps[ dim ][ type ].first().first->GetName();
         bool isOptional = true;
@@ -2184,7 +2185,7 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
       {
         // Call hypothesis creation server method (without GUI)
         SMESH::SMESH_Hypothesis_var aHyp =
-          SMESH::CreateHypothesis(aHypName, aHypName, true);
+          SMESH::CreateHypothesis(aHypName, aHypData->Label, true);
         aHyp.out();
       }
       else
@@ -2197,7 +2198,7 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
           aCreator->create( true, aHypName, myDlg, 0, QString::null );
         else {
           SMESH::SMESH_Hypothesis_var aHyp =
-            SMESH::CreateHypothesis(aHypName, aHypName, true);
+            SMESH::CreateHypothesis(aHypName, aHypData->Label, true);
           aHyp.out();
         }
         delete aCreator;
@@ -2260,7 +2261,7 @@ void SMESHGUI_MeshOp::readMesh()
 
   // Get hypotheses and algorithms assigned to the mesh/sub-mesh
   QStringList anExisting;
-  const int lastDim = ( myIsOnGeometry ) ? SMESH::DIM_0D : SMESH::DIM_3D;
+  const int lastDim = ( myIsOnGeometry ) ? SMESH::DIM_0D : SMESH::DIM_2D;
   bool algoFound = false;
   for ( int dim = SMESH::DIM_3D; dim >= lastDim; --dim )
   {
@@ -2384,7 +2385,7 @@ int SMESHGUI_MeshOp::find( const SMESH::SMESH_Hypothesis_var& theHyp,
 /*!
  * \brief Edits mesh or sub-mesh
   * \param theMess - Output parameter intended for returning error message
-  * \retval bool  - TRUE if mesh is edited succesfully, FALSE otherwise
+  * \retval bool  - TRUE if mesh is edited successfully, FALSE otherwise
  *
  * Assigns new name hypotheses and algoriths to the mesh or sub-mesh
  */
@@ -2407,7 +2408,7 @@ bool SMESHGUI_MeshOp::editMeshOrSubMesh( QString& theMess )
   // Set new name
   QString aName = myDlg->objectText( SMESHGUI_MeshDlg::Obj );
   SMESH::SetName( pObj, aName );
-  int aDim = ( myIsOnGeometry ) ? SMESH::DIM_0D : SMESH::DIM_3D;
+  int aDim = ( myIsOnGeometry ) ? SMESH::DIM_0D : SMESH::DIM_2D;
 
   // First, remove old algos in order to avoid messages on algorithm hiding
   for ( int dim = aDim; dim <= SMESH::DIM_3D; dim++ )
@@ -2554,7 +2555,7 @@ bool SMESHGUI_MeshOp::checkSubMeshConcurrency(SMESH::SMESH_Mesh_ptr    mesh,
  *
  * method redefined from base class verifies whether given operator is valid for
  * this one (i.e. can be started "above" this operator). In current implementation method
- * retuns false if theOtherOp operation is not intended for deleting objects or mesh
+ * returns false if theOtherOp operation is not intended for deleting objects or mesh
  * elements.
  */
 //================================================================================
@@ -2743,8 +2744,9 @@ void SMESHGUI_MeshOp::setFilteredAlgoData( const int theTabIndex, const int theI
     }
     if ( !myIsOnGeometry )
       for ( int i = SMESH::DIM_0D; i <= SMESH::DIM_3D; i++ ) {
-        if ( i < SMESH::DIM_3D ) myDlg->disableTab( i );
-        else                     myDlg->enableTab( i );
+        bool disable = myAvailableHypData[i][Algo].isEmpty();
+        if ( disable ) myDlg->disableTab( i );
+        else           myDlg->enableTab( i );
       }
     else
       for ( int i = SMESH::DIM_0D; i <= SMESH::DIM_3D; i++ ) {
index e8429fd5879b3f5172702023e794bfd044a7d952..53e60ce65f9153acf8287c81e517ca0a0bb30952 100755 (executable)
@@ -1302,7 +1302,7 @@ vtkUnstructuredGrid* SMESHGUI_MeshPatternDlg::getGrid()
     for (int i = 0, n = elemPoints->length(); i < n; i++)
       aCellsSize += elemPoints[ i ].length();
 
-    // Create unstructured grid and other  usefull arrays
+    // Create unstructured grid and other useful arrays
     vtkUnstructuredGrid* aGrid = vtkUnstructuredGrid::New();
 
     vtkCellArray* aConnectivity = vtkCellArray::New();
index bf243ff41f3059102af7cda41a1b74c2902302df..0a6b8bc2739757a6b65eb306c41e71e60e6616e6 100755 (executable)
@@ -267,7 +267,7 @@ bool SMESHGUI_Operation::isStudyLocked( const bool theMess ) const
 *
 * Virtual method redefined from base class verifies whether given operator is valid for
 * this one (i.e. can be started "above" this operator). In current implementation method
-* retuns false if theOtherOp operation is not intended for deleting objects or mesh
+* returns false if theOtherOp operation is not intended for deleting objects or mesh
 * elements.
 */
 bool SMESHGUI_Operation::isValid( SUIT_Operation* theOtherOp ) const
index df810f7dfe4391c706b2924c86f3011ab4c5174e..89f53472bd9664f4c447f7c5067ce547a26742a9 100644 (file)
@@ -32,37 +32,36 @@ namespace SMESHOp {
     OpShowScalarBar          = 1022,   // SHOW SCALAR BAR
     OpSaveDistribution       = 1030,   // SAVE DISTRIBUTION
     OpShowDistribution       = 1031,   // SHOW DISTRIBUTION
-#ifndef DISABLE_PLOT2DVIEWER
     OpPlotDistribution       = 1032,   // PLOT DISTRIBUTION
-#endif
     OpFileInformation        = 1040,   // POPUP MENU - FILE INFORMATION
     // Import -------------------------//--------------------------------
     OpImportDAT              = 1100,   // MENU FILE - IMPORT - DAT FILE
     OpImportUNV              = 1101,   // MENU FILE - IMPORT - UNV FILE
     OpImportMED              = 1102,   // MENU FILE - IMPORT - MED FILE
     OpImportSTL              = 1103,   // MENU FILE - IMPORT - STL FILE
-#ifdef WITH_CGNS
     OpImportCGNS             = 1104,   // MENU FILE - IMPORT - CGNS FILE
-#endif
     OpImportSAUV             = 1105,   // MENU FILE - IMPORT - SAUV FILE
     OpImportGMF              = 1106,   // MENU FILE - IMPORT - GMF FILE
+    OpPopupImportDAT         = 1120,   // POPUP MENU - IMPORT - DAT FILE
+    OpPopupImportUNV         = 1121,   // POPUP MENU - IMPORT - UNV FILE
+    OpPopupImportMED         = 1122,   // POPUP MENU - IMPORT - MED FILE
+    OpPopupImportSTL         = 1123,   // POPUP MENU - IMPORT - STL FILE
+    OpPopupImportCGNS        = 1124,   // POPUP MENU - IMPORT - CGNS FILE
+    OpPopupImportSAUV        = 1125,   // POPUP MENU - IMPORT - SAUV FILE
+    OpPopupImportGMF         = 1126,   // POPUP MENU - IMPORT - GMF FILE
     // Export -------------------------//--------------------------------
     OpExportDAT              = 1200,   // MENU FILE  - EXPORT - DAT FILE
     OpExportMED              = 1201,   // MENU FILE  - EXPORT - MED FILE
     OpExportUNV              = 1202,   // MENU FILE  - EXPORT - UNV FILE
     OpExportSTL              = 1203,   // MENU FILE  - EXPORT - STL FILE
-#ifdef WITH_CGNS
     OpExportCGNS             = 1204,   // MENU FILE  - EXPORT - CGNS FILE
-#endif
     OpExportSAUV             = 1205,   // MENU FILE  - EXPORT - SAUV FILE
     OpExportGMF              = 1206,   // MENU FILE  - EXPORT - GMF FILE
     OpPopupExportDAT         = 1210,   // POPUP MENU - EXPORT - DAT FILE
     OpPopupExportMED         = 1211,   // POPUP MENU - EXPORT - MED FILE
     OpPopupExportUNV         = 1212,   // POPUP MENU - EXPORT - UNV FILE
     OpPopupExportSTL         = 1213,   // POPUP MENU - EXPORT - STL FILE
-#ifdef WITH_CGNS
     OpPopupExportCGNS        = 1214,   // POPUP MENU - EXPORT - CGNS FILE
-#endif
     OpPopupExportSAUV        = 1215,   // POPUP MENU - EXPORT - SAUV FILE
     OpPopupExportGMF         = 1216,   // POPUP MENU - EXPORT - GMF FILE
     // Mesh ---------------------------//--------------------------------
index 9d4495083b5e00ed1e316db6e50036aa80dc6f28..cb3828246dbc0af8776cf4467737349e085ee480 100644 (file)
@@ -203,9 +203,9 @@ QWidget* SMESHGUI_ReorientFacesDlg::createMainFrame (QWidget* theParent)
   myDY->SetValue(0);
   myDZ->SetValue(0);
 
-  myDX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
-  myDY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
-  myDZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myDX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 1.0, "length_precision");
+  myDY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 1.0, "length_precision");
+  myDZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 1.0, "length_precision");
 
   width = Max( aFaceBut->fontMetrics().width( tr("SMESH_X")),
                aFaceBut->fontMetrics().width( tr("SMESH_DX")));
index 757238eab9af524f9f3240ebd82fe8b8fa7b9cb5..b6976df864921b7e5219e1bf10c74d7c794b9f9a 100644 (file)
 // SMESH includes
 #include "SMESHGUI_Selection.h"
 
-#include "SMESHGUI_Utils.h"
-#include "SMESHGUI_VTKUtils.h"
-#include "SMESHGUI_GEOMGenUtils.h"
+#include "SMESHGUI.h"
 #include "SMESHGUI_ComputeDlg.h"
 #include "SMESHGUI_ConvToQuadOp.h"
+#include "SMESHGUI_GEOMGenUtils.h"
+#include "SMESHGUI_Utils.h"
+#include "SMESHGUI_VTKUtils.h"
 
 #include <SMESH_Type.h>
 #include <SMESH_Actor.h>
@@ -119,7 +120,8 @@ QVariant SMESHGUI_Selection::parameter( const int ind, const QString& p ) const
   if      ( p=="client" )               val = QVariant( LightApp_Selection::parameter( p ) );
   else if ( p=="type" )                 val = QVariant( myTypes[ind] );
   else if ( p=="hasActor" )             val = QVariant( getActor( ind ) != 0 );
-  else if ( p=="elemTypes" )            val = QVariant( elemTypes( ind ) );
+  else if ( p=="elemTypes" )            val = QVariant( elemTypes( ind, false ) );
+  else if ( p=="objElemTypes" )         val = QVariant( elemTypes( ind, true ) );
   else if ( p=="isAutoColor" )          val = QVariant( isAutoColor( ind ) );
   else if ( p=="numberOfNodes" )        val = QVariant( numberOfNodes( ind ) );
   else if ( p=="dim" )                  val = QVariant( dim( ind ) );
@@ -142,6 +144,7 @@ QVariant SMESHGUI_Selection::parameter( const int ind, const QString& p ) const
   else if ( p=="hasChildren")           val = QVariant( hasChildren( ind ) );
   else if ( p=="nbChildren")            val = QVariant( nbChildren( ind ) );
   else if ( p=="isContainer")           val = QVariant( isContainer( ind ) );
+  else if ( p=="guiState")              val = QVariant( guiState() );
 
   if ( val.isValid() )
     return val;
@@ -166,7 +169,7 @@ QVariant SMESHGUI_Selection::parameter( const QString& p ) const
 
 //=======================================================================
 //function : getVtkOwner
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 SMESH_Actor* SMESHGUI_Selection::getActor( int ind ) const
@@ -182,18 +185,42 @@ SMESH_Actor* SMESHGUI_Selection::getActor( int ind ) const
 //purpose  : may return {'Elem0d' 'Edge' 'Face' 'Volume' 'BallElem'} at most
 //=======================================================================
 
-QList<QVariant> SMESHGUI_Selection::elemTypes( int ind ) const
+QList<QVariant> SMESHGUI_Selection::elemTypes( int ind, bool fromObj ) const
 {
   QList<QVariant> types;
   SMESH_Actor* actor = getActor( ind );
   if ( actor ) {
     TVisualObjPtr object = actor->GetObject();
     if ( object ) {
-      if ( object->GetNbEntities( SMDSAbs_0DElement )) types.append( "Elem0d" );
-      if ( object->GetNbEntities( SMDSAbs_Ball ))      types.append( "BallElem" );
       if ( object->GetNbEntities( SMDSAbs_Edge ))      types.append( "Edge" );
       if ( object->GetNbEntities( SMDSAbs_Face ))      types.append( "Face" );
       if ( object->GetNbEntities( SMDSAbs_Volume ))    types.append( "Volume" );
+      if ( object->GetNbEntities( SMDSAbs_0DElement )) types.append( "Elem0d" );
+      if ( object->GetNbEntities( SMDSAbs_Ball ))      types.append( "BallElem" );
+    }
+  }
+  else if ( fromObj )
+  {
+    if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
+    {
+      _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
+      CORBA::Object_var obj = SMESH::SObjectToObject( sobj, SMESH::GetActiveStudyDocument() );
+      SMESH::SMESH_IDSource_var idSrc = SMESH::SMESH_IDSource::_narrow( obj );
+      if ( !CORBA::is_nil( idSrc ) )
+      {
+        SMESH::array_of_ElementType_var typeVar = idSrc->GetTypes();
+        for ( CORBA::ULong i = 0; i < typeVar->length(); ++i )
+          switch ( typeVar[i] ) {
+          case SMESH::EDGE:   types.append( "Edge" );     break;
+          case SMESH::FACE:   types.append( "Face" );     break;
+          case SMESH::VOLUME: types.append( "Volume" );   break;
+          case SMESH::ELEM0D: types.append( "Elem0d" );   break;
+          case SMESH::BALL:   types.append( "BallElem" ); break;
+          case SMESH::ALL:
+          case SMESH::NODE:
+          case SMESH::NB_ELEMENT_TYPES: break;
+          }
+      }
     }
   }
   return types;
@@ -437,13 +464,10 @@ bool SMESHGUI_Selection::isAutoColor( int ind ) const
   if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
   {
     _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
-    CORBA::Object_var obj = SMESH::SObjectToObject( sobj, SMESH::GetActiveStudyDocument() );
-
-    if ( !CORBA::is_nil( obj ) ) {
-      SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( obj );
-      if ( !CORBA::is_nil( mesh ) )
-        return mesh->GetAutoColor();
-    }
+    CORBA::Object_var      obj = SMESH::SObjectToObject( sobj, SMESH::GetActiveStudyDocument() );
+    SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( obj );
+    if ( !CORBA::is_nil( mesh ) )
+      return mesh->GetAutoColor();
   }
   return false;
 }
@@ -775,6 +799,16 @@ bool SMESHGUI_Selection::isImported( const int ind ) const
   return res;
 }
 
+//=======================================================================
+//function : guiState
+//purpose  : 
+//=======================================================================
+
+int SMESHGUI_Selection::guiState()
+{
+  return SMESHGUI::GetSMESHGUI() ? SMESHGUI::GetSMESHGUI()->GetState() : -1;
+}
+
 //=======================================================================
 //function : groupType
 //purpose  : 
index c7b7915abf5628b1dc082009de09b9f6d8a12e4c..71690c7137dfbe63f99ccda2ab828ed6a1502ea6 100644 (file)
@@ -71,8 +71,8 @@ public:
   virtual int             nbChildren( int ) const;
   virtual bool            isContainer( int ) const;
 
-  // parameters got from actor return nothing if an actor is not visible
-  virtual QList<QVariant> elemTypes( int ) const;
+  // parameters got from actor, return nothing if an actor is not visible
+  virtual QList<QVariant> elemTypes( int, bool ) const; // == objElemTypes w/o actor
   virtual QList<QVariant> labeledTypes( int ) const;
   virtual QString         displayMode( int ) const;
   virtual QString         shrinkMode( int ) const;
@@ -87,7 +87,8 @@ public:
 
   static int              type( const QString&, _PTR(Study) );
   static QString          typeName( const int );
-
+  static  int             guiState();
+  
   bool                    isImported( const int ) const;
 
 private:
index 2f2ff723ab08f29e2d95a3b78b374c8c3b60c2bc..5b2e0b89ba662fb1caa7aa102767b8e7f04a880c 100644 (file)
@@ -185,7 +185,7 @@ SMESHGUI_EXPORT
   typedef SALOME::GenericObj_wrap<SMESH_IDSource> IDSource_wrap;
 
   /*!
-   * \brief Class usefull to convert a string returned from a CORBA call
+   * \brief Class useful to convert a string returned from a CORBA call
    *        to other string types w/o memory leak.
    *
    *        Usage (of instantiations): QString s = toQStr( objVar->GetName() );
index bd52efd4ba770957a18268d44ff4f7afc8aacbc4..5c5bbab522936705450cfde8bf5554ba1045539b 100644 (file)
@@ -372,7 +372,7 @@ namespace SMESH
       if ( freeMB > 0 && usedMB * 5 > freeMB ) {
         bool continu = false;
         if ( usedMB * 3 > freeMB )
-          // even dont try to show
+          // don't even try to show
           SUIT_MessageBox::warning(SMESHGUI::desktop(), QObject::tr("SMESH_WRN_WARNING"),
                                    QObject::tr("SMESH_NO_MESH_VISUALIZATION"));
         else
@@ -762,6 +762,7 @@ namespace SMESH
                 if ((anActor = CreateActor(aDocument,theEntry,true))) {
                   bool needFitAll = noSmeshActors(theWnd); // fit for the first object only
                   DisplayActor(theWnd,anActor);
+                  anActor->SetVisibility(true);
                   aStudy->setVisibilityState(theEntry, Qtx::ShownState);
                   // FitAll(); - PAL16770(Display of a group performs an automatic fit all)
                   if (needFitAll) FitAll();
index 3482d7672fd632e6f0433a016194abb9f4992a73..a3c1c5b19b43a451297b2d350df3f8d18028ca8a 100644 (file)
@@ -91,11 +91,12 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
        */
       if( !myClientLib.isEmpty() )
       {
-#ifdef WIN32
+#if defined(WIN32)
         //myServerLib += ".dll";
         myClientLib += ".dll";
+#elif defined(__APPLE__)
+        myClientLib = "lib" + myClientLib + ".dylib";
 #else
-        //myServerLib = "lib" + myServerLib + ".so";
         myClientLib = "lib" + myClientLib + ".so";
 #endif
       }
index a0c988e6c11c36ef49c160a5ad539f8f33255856..9531e409fada3f9ad40e3e40d09df9c7ae7453da 100644 (file)
             <source>ICON_COMPUTE</source>
             <translation>mesh_compute.png</translation>
         </message>
+        <message>
+            <source>ICON_OVL_MESH_QUALITY</source>
+            <translation>mesh_quality.png</translation>
+        </message>
         <message>
             <source>ICON_EVALUATE</source>
             <translation>mesh_evaluate.png</translation>
             <source>ICON_MEASURE_BND_BOX</source>
             <translation>mesh_bounding_box.png</translation>
         </message>
+        <message>
+            <source>ICON_SHOW</source>
+            <translation>mesh_show.png</translation>
+        </message>
+        <message>
+            <source>ICON_HIDE</source>
+            <translation>mesh_hide.png</translation>
+        </message>
     </context>
 </TS>
index 5d052e3dd296932b0c7a220c48ad1d9b49c0e717..2a0601830e89c7583f3eff093d7cb9f815b95811 100644 (file)
         <source>MEN_DEL_GROUP</source>
         <translation>Delete Groups with Contents</translation>
     </message>
+    <message>
+        <source>MEN_ADD_TO_GROUP</source>
+        <translation>Add to Group</translation>
+    </message>
+    <message>
+        <source>MEN_REMOVE_FROM_GROUP</source>
+        <translation>Remove from Group</translation>
+    </message>
+    <message>
+        <source>STB_ADD_TO_GROUP</source>
+        <translation>Add selected elements to group</translation>
+    </message>
+    <message>
+        <source>STB_REMOVE_FROM_GROUP</source>
+        <translation>Remove selected elements from group</translation>
+    </message>
     <message>
         <source>MEN_FACE_ORIENTATION</source>
         <translation>Orientation of Faces</translation>
@@ -1944,7 +1960,7 @@ Check algorithm documentation for supported geometry</translation>
     </message>
     <message>
         <source>SMESH_HYP_9</source>
-        <translation>Such dimention hypothesis is already assigned to the shape</translation>
+        <translation>Such dimension hypothesis is already assigned to the shape</translation>
     </message>
     <message>
         <source>SMESH_ID_DIAGONAL</source>
@@ -5306,6 +5322,10 @@ Please select a group and try again</translation>
         <source>SEPARATE_CORNERS_AND_MEDIUM</source>
         <translation>No merge of corner and medium nodes of quadratic cells</translation>
     </message>
+    <message>
+        <source>AVOID_MAKING_HOLES</source>
+        <translation>Avoid making holes</translation>
+    </message>
     <message>
         <source>KEEP_NODES</source>
         <translation>Nodes to keep during the merge</translation>
@@ -7406,6 +7426,10 @@ as they are of improper type:
         <source>ELEM_MODE</source>
         <translation>Element</translation>
     </message>
+    <message>
+        <source>SHOW_IDS</source>
+        <translation>Show IDs</translation>
+    </message>
     <message>
         <source>BUT_DUMP_MESH</source>
         <translation>&amp;Dump</translation>
index 506912cfea99033ad886eac27861dd85d3c3fc44..032411ca789cf23b2d482ffef36fc8b8c3b7c975 100755 (executable)
@@ -5117,11 +5117,11 @@ Sélectionner des éléments et essayer encore</translation>
     </message>
     <message>
         <source>RADIOBTN_1</source>
-        <translation>Convertir en éléments quadratiques</translation>
+        <translation>Convertir en éléments linéaires</translation>
     </message>
     <message>
         <source>RADIOBTN_2</source>
-        <translation>Convertir à partir d&apos;éléments quadratiques</translation>
+        <translation>Convertir en éléments quadratiques</translation>
     </message>
     <message>
         <source>RADIOBTN_3</source>
@@ -6389,7 +6389,7 @@ Spécifiez-le et essayez de nouveau</translation>
     </message>
     <message>
         <source>MT_TETRAHEDRAL</source>
-        <translation>Tetrahèdre</translation>
+        <translation>Tetraèdre</translation>
     </message>
     <message>
         <source>MT_TRIANGULAR</source>
index c21a8a6d5c4d8e8493a50531b66bb1eff76f0e87..3641d913cdd06639fd7a5cdc3ccbc18b6ce1bc8c 100644 (file)
@@ -83,7 +83,8 @@ SET(SMESHUtils_SOURCES
   SMESH_MAT2d.cxx
   SMESH_FreeBorders.cxx
   SMESH_ControlPnt.cxx
-)
+  SMESH_DeMerge.cxx
+  )
 
 # --- rules ---
 
index 4e6229c305e84adf37ef7267e3a9f0d64f75d6fc..3b46da1b4dcf80176daa165daadd3fc62f2a4356 100644 (file)
@@ -1029,7 +1029,7 @@ bool SMESH_Block::findUVByHalfDivision( const gp_Pnt&             thePoint,
       dy *= 1.2;
       xSol = 0.5 * (xMax + xMin) ;
       ySol = 0.5 * (yMax + yMin) ;
-      if ( xMin == 0. && yMin == 0. && xMax == 1. && yMax == 1. ) // avoid infinit loop
+      if ( xMin == 0. && yMin == 0. && xMax == 1. && yMax == 1. ) // avoid infinite loop
       {
 #ifdef _DEBUG_REFINE_
         cout << "SMESH_Block::refineParametersOnFace(): tface.IsUVInQuad() fails" << endl;
@@ -1114,7 +1114,7 @@ bool SMESH_Block::findUVByHalfDivision( const gp_Pnt&             thePoint,
     if ( saveBetterSolution( sol, theParams, thePoint.SquareDistance( tface.Point( sol ))))
     {
 #ifdef _DEBUG_REFINE_
-      cout << "SMESH_Block::refineParametersOnFace(): dividing suceeded" << endl;
+      cout << "SMESH_Block::refineParametersOnFace(): dividing succeeded" << endl;
       cout << " nbGetUV = " << nbGetUV << endl;
 #endif
         return true;
index 1d340b48650f28233c29b3da68284ccf76bfea79..cd680a811445d679febf83140f08b6214f235927 100644 (file)
@@ -314,7 +314,7 @@ public:
   // TFace, TEdge's and points for that face only
 
   // Note 2: curve adaptors need to have only Value(double), FirstParameter() and
-  // LastParameter() defined to be used by Block algoritms
+  // LastParameter() defined to be used by Block algorithms
 
   class SMESHUtils_EXPORT TEdge {
     int                myCoordInd;
index 6e007e3a11719a8c2e4ffd8612e825b096554316..4055741ff4a7c4b11facdaac06b50cf79f2e2824 100644 (file)
@@ -65,7 +65,7 @@ enum SMESH_ComputeErrorName
 
 // =============================================================
 /*!
- * \brief Contains an algorithm and description of an occured error
+ * \brief Contains an algorithm and description of an occurred error
  */
 // =============================================================
 
diff --git a/src/SMESHUtils/SMESH_DeMerge.cxx b/src/SMESHUtils/SMESH_DeMerge.cxx
new file mode 100644 (file)
index 0000000..427ce52
--- /dev/null
@@ -0,0 +1,215 @@
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  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, or (at your option) any later version.
+//
+// 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_DeMerge.hxx
+// Created   : Fri Mar 10 16:06:54 2017
+// Author    : Edward AGAPOV (eap)
+
+// Implementation of SMESH_MeshAlgos::DeMerge()
+
+#include "SMESH_MeshAlgos.hxx"
+
+#include "SMDS_VolumeTool.hxx"
+#include "SMDS_MeshVolume.hxx"
+
+namespace
+{
+  bool isDegenFace(const std::vector< const SMDS_MeshNode* >& nodes)
+  {
+    // in a degenerated face each link sticks to another
+
+    typedef std::map< SMESH_TLink , int > TLink2Nb;
+    TLink2Nb link2nb;
+    for ( size_t iPrev = nodes.size() - 1, i = 0; i < nodes.size(); iPrev = i++ )
+    {
+      SMESH_TLink link( nodes[iPrev], nodes[i] );
+      TLink2Nb::iterator l2n = link2nb.insert( std::make_pair( link, 0 )).first;
+      l2n->second++;
+    }
+
+    if ( link2nb.size() == 1 )
+      return true;
+
+    for ( TLink2Nb::iterator l2n = link2nb.begin(); l2n != link2nb.end(); ++l2n )
+      if ( l2n->second == 1 )
+        return false;
+
+    return true;
+  }
+
+  void deMergeFace(const SMDS_MeshElement*              face,
+                   std::vector< const SMDS_MeshNode* >& newNodes,
+                   std::vector< const SMDS_MeshNode* >& noMergeNodes)
+  {
+    if ( face->IsQuadratic() )
+    {
+      const int nbCorners = face->NbCornerNodes();
+      const int nbNodes = (int) newNodes.size();
+
+      // de-merge sticking medium nodes
+      for ( int i = 1; i < nbNodes; i += 2 ) // loop om medium nodes
+      {
+        int iPrev = ( i - 1 );
+        int iNext = ( i + 1 ) % nbNodes;
+        if ( newNodes[ iPrev ] == newNodes[ iNext ] )
+        {
+          if ( newNodes[ iPrev ] != newNodes[ i ] || nbCorners == 3 )
+          {
+            // corners stick but the medium does not, or a link of triangle collapses
+            noMergeNodes.push_back( face->GetNode( iPrev / 2 ));
+            noMergeNodes.push_back( face->GetNode( iNext / 2 ));
+            noMergeNodes.push_back( face->GetNode( nbCorners + i / 2 ));
+          }
+        }
+        else if ( newNodes[ i ] == newNodes[ iPrev ] )
+        {
+          // the medium node sticks to a neighbor corner one
+          noMergeNodes.push_back( face->GetNode( nbCorners + i / 2 ));
+          noMergeNodes.push_back( face->GetNode( iPrev / 2 ));
+        }
+        else if ( newNodes[ i ] == newNodes[ iNext ] )
+        {
+          // the medium node sticks to a neighbor corner one
+          noMergeNodes.push_back( face->GetNode( nbCorners + i / 2 ));
+          noMergeNodes.push_back( face->GetNode( iNext / 2 ));
+        }
+        else
+        {
+          // find if the medium sticks to any other node
+          std::vector<const SMDS_MeshNode*>::iterator pos;
+          pos = std::find( newNodes.begin(), newNodes.begin() + iPrev, newNodes[i] );
+          if ( pos == newNodes.begin() + iPrev )
+            pos = std::find( newNodes.begin() + i + 1, newNodes.end(), newNodes[i] );
+          if ( pos == newNodes.end() )
+            continue;
+
+          int iStick = std::distance( newNodes.begin(), pos );
+          if ( iStick % 2 == 0 )
+          {
+            // the medium sticks to a distant corner
+            noMergeNodes.push_back( face->GetNode( nbCorners + i / 2 ));
+            noMergeNodes.push_back( face->GetNode( iStick / 2 ));
+          }
+          else
+          {
+            // the medium sticks to a distant medium;
+            // it's OK if two links stick
+            int iPrev2 = ( iStick - 1 );
+            int iNext2 = ( iStick + 1 ) % nbNodes;
+            if (( newNodes[ iPrev ] == newNodes[ iPrev2 ] &&
+                  newNodes[ iNext ] == newNodes[ iNext2 ] )
+                ||
+                ( newNodes[ iPrev ] == newNodes[ iNext2 ] &&
+                  newNodes[ iNext ] == newNodes[ iPrev2 ] ))
+              ; // OK
+            else
+            {
+              noMergeNodes.push_back( face->GetNode( nbCorners + i / 2 ));
+              noMergeNodes.push_back( face->GetNode( nbCorners + iStick / 2 ));
+            }
+          }
+        }
+      }
+    }
+  } // deMergeFace()
+
+  bool isDegenVolume(const SMDS_VolumeTool& vt)
+  {
+    // TMP: it's necessary to use a topological check instead of a geometrical one
+    return vt.GetSize() < 1e-100;
+  }
+
+  void deMergeVolume(const SMDS_VolumeTool&               vt,
+                     std::vector< const SMDS_MeshNode* >& noMergeNodes)
+  {
+    // temporary de-merge all nodes
+    for ( int i = 0; i < vt.NbNodes(); ++i )
+    {
+      const SMDS_MeshNode* n = vt.GetNodes()[i];
+      if ( n != vt.Element()->GetNode( i ))
+        noMergeNodes.push_back( n );
+    }
+  }
+
+} // namespace
+
+//================================================================================
+/*!
+ * \brief Find nodes whose merge makes the element invalid. (Degenerated elem is OK)
+ *  \param [in] elem - the element
+ *  \param [in] newNodes - nodes of the element after the merge
+ *  \param [out] noMergeNodes - nodes to undo merge 
+ */
+//================================================================================
+
+void SMESH_MeshAlgos::DeMerge(const SMDS_MeshElement*              elem,
+                              std::vector< const SMDS_MeshNode* >& newNodes,
+                              std::vector< const SMDS_MeshNode* >& noMergeNodes)
+{
+  switch ( elem->GetType() )
+  {
+  case SMDSAbs_Face:
+  {
+    if ( newNodes.size() <= 4 )
+      return; // degenerated
+
+    if ( elem->IsQuadratic() )
+      SMDS_MeshCell::applyInterlace // interlace medium and corner nodes
+        ( SMDS_MeshCell::interlacedSmdsOrder( elem->GetEntityType(), newNodes.size() ), newNodes );
+
+    if ( isDegenFace( newNodes ))
+      return;
+
+    deMergeFace( elem, newNodes, noMergeNodes );
+  }
+  break;
+
+  case SMDSAbs_Volume:
+  {
+    if ( newNodes.size() <= 4 )
+      return; // degenerated
+
+    SMDS_VolumeTool vt;
+    if ( !vt.Set( elem, /*skipCentral=*/true, &newNodes ))
+      return; // strange
+
+    if ( isDegenVolume( vt ))
+      return;
+
+    deMergeVolume( elem, noMergeNodes );
+  }
+  break;
+
+  case SMDSAbs_Edge:
+  {
+    if ( newNodes.size() == 3 )
+      if (( newNodes[2] == newNodes[0] && newNodes[2] != newNodes[1] ) ||
+          ( newNodes[2] == newNodes[1] && newNodes[2] != newNodes[0]))
+      {
+        // the medium node sticks to a corner
+        noMergeNodes.push_back( newNodes[2] );
+        noMergeNodes.push_back( newNodes[ newNodes[2] == newNodes[1] ]);
+      }
+  }
+  break;
+  default:;
+  }
+}
index 2c20eb81515fdb3544440b957549b061b8b12f47..aad6899d32debaa1f322d69d3123b24902fe804a 100644 (file)
@@ -340,7 +340,7 @@ namespace
       return ( _inSeg->getGeomEdge( _edge->twin()->cell() ) != theNoEdgeID );
     }
 
-    // check a next segment in CW order
+    // check a next segment in CCW order
     bool isSameBranch( const BndSeg& seg2 )
     {
       if ( !_edge || !seg2._edge )
@@ -1011,6 +1011,8 @@ namespace
     int branchID = 1; // we code orientation as branchID sign
     branchEdges.resize( branchID );
 
+    vector< std::pair< int, const TVDVertex* > > branchesToCheckEnd;
+
     for ( size_t iE = 0; iE < bndSegsPerEdge.size(); ++iE )
     {
       vector< BndSeg >& bndSegs = bndSegsPerEdge[ iE ];
@@ -1039,7 +1041,13 @@ namespace
         {
           branchEdges.resize(( branchID = branchEdges.size()) + 1 );
           if ( bndSegs[i]._edge && bndSegs[i]._prev )
+          {
             endType.insert( make_pair( bndSegs[i]._edge->vertex1(), SMESH_MAT2d::BE_BRANCH_POINT ));
+            if ( bndSegs[i]._prev->_branchID < 0 )
+              // 0023404: a branch-point is inside a branch
+              branchesToCheckEnd.push_back( make_pair( bndSegs[i]._prev->branchID(),
+                                                       bndSegs[i]._edge->vertex1() ));
+          }
         }
         else if ( bndSegs[i]._prev->_branchID )
         {
@@ -1063,6 +1071,37 @@ namespace
       }
     }
 
+    if ( !ignoreCorners && !branchesToCheckEnd.empty() )
+    {
+      // split branches having branch-point inside
+      // (a branch-point was not detected since another branch is joined at the opposite side)
+      for ( size_t i = 0; i < branchesToCheckEnd.size(); ++i )
+      {
+        vector<const TVDEdge*> & branch = branchEdges[ branchesToCheckEnd[i].first ];
+        const TVDVertex*    branchPoint = branchesToCheckEnd[i].second;
+        if ( branch.front()->vertex1() == branchPoint ||
+             branch.back ()->vertex0() == branchPoint )
+          continue; // OK - branchPoint is at a branch end
+
+        // find a MA edge where another branch begins
+        size_t iE;
+        for ( iE = 0; iE < branch.size(); ++iE )
+          if ( branch[iE]->vertex1() == branchPoint )
+            break;
+        if ( iE < branch.size() )
+        {
+          // split the branch
+          branchEdges.resize(( branchID = branchEdges.size()) + 1 );
+          vector<const TVDEdge*> & branch2 = branchEdges[ branchID ];
+          branch2.assign( branch.begin()+iE, branch.end() );
+          branch.resize( iE );
+          for ( iE = 0; iE < branch2.size(); ++iE )
+            if ( BndSeg* bs = BndSeg::getBndSegOfEdge( branch2[iE], bndSegsPerEdge ))
+              bs->setBranch( branchID, bndSegsPerEdge );
+        }
+      }
+    }
+
     // join the 1st and the last branch edges if it is the same branch
     // if ( bndSegs.back().branchID() != bndSegs.front().branchID() &&
     //      bndSegs.back().isSameBranch( bndSegs.front() ))
@@ -1073,10 +1112,14 @@ namespace
     //   br2.clear();
     // }
 
-    // remove branches ending at BE_ON_VERTEX
+    // remove branches ending at BE_ON_VERTEX and BE_END
 
     vector<bool> isBranchRemoved( branchEdges.size(), false );
 
+    std::set< SMESH_MAT2d::BranchEndType > endTypeToRm;
+    endTypeToRm.insert( SMESH_MAT2d::BE_ON_VERTEX );
+    endTypeToRm.insert( SMESH_MAT2d::BE_END );
+
     if ( ignoreCorners && branchEdges.size() > 2 && !branchEdges[2].empty() )
     {
       // find branches to remove
@@ -1088,10 +1131,10 @@ namespace
         const TVDVertex* v0 = branchEdges[iB][0]->vertex1();
         const TVDVertex* v1 = branchEdges[iB].back()->vertex0();
         v2et = endType.find( v0 );
-        if ( v2et != endType.end() && v2et->second == SMESH_MAT2d::BE_ON_VERTEX )
+        if ( v2et != endType.end() && endTypeToRm.count( v2et->second ))
           isBranchRemoved[ iB ] = true;
         v2et = endType.find( v1 );
-        if ( v2et != endType.end() && v2et->second == SMESH_MAT2d::BE_ON_VERTEX )
+        if ( v2et != endType.end() && endTypeToRm.count( v2et->second ))
           isBranchRemoved[ iB ] = true;
       }
       // try to join not removed branches into one
index 4bcfc1d97ac42121e6d072fbf0723c15f237efdb..69ba8fb5b70198dbf3f2213e3467b860b699de09 100644 (file)
@@ -1962,12 +1962,3 @@ SMESH_ElementSearcher* SMESH_MeshAlgos::GetElementSearcher(SMDS_Mesh&
 {
   return new SMESH_ElementSearcherImpl( mesh, tolerance, elemIt );
 }
-
-// TMP for ASERIS in V8_2_BR -- to remove when merging to master
-void SMESH_MeshAlgos::DeMerge(const SMDS_MeshElement*              elem,
-                              std::vector< const SMDS_MeshNode* >& newNodes,
-                              std::vector< const SMDS_MeshNode* >& noMergeNodes)
-{
-// TMP for ASERIS in V8_2_BR -- to remove when merging to master
-}
-// TMP for ASERIS in V8_2_BR -- to remove when merging to master
index 1832462509f0866639a4e2a9cdb0d9c7f07571da..03e99b50f99d2b207ba40008698350284c3deb68 100644 (file)
@@ -334,7 +334,7 @@ void SMESH_OctreeNode::FindCoincidentNodes ( TIDSortedNodeSet*
 
     if ( !ListOfCoincidentNodes.empty() )
     {
-      // We build a list {n1 + his neigbours} and add this list in theGroupsOfNodes
+      // We build a list {n1 + his neighbors} and add this list in theGroupsOfNodes
       if ( idLess( n1, ListOfCoincidentNodes.front() )) ListOfCoincidentNodes.push_front( n1 );
       else                                              ListOfCoincidentNodes.push_back ( n1 );
       ListOfCoincidentNodes.sort( idLess );
index d5dadd0e1a15447ff2fa4633c9b3b19adf8be59f..f3a0a556cf1f207d763f09df3900c39a2aa20d0a 100644 (file)
@@ -452,7 +452,7 @@ namespace {
  *  \param theRemovedObjIDs - entries of objects whose created commands were removed
  *  \param theHistoricalDump - true means to keep all commands, false means
  *         to exclude commands relating to objects removed from study
- *  \retval TCollection_AsciiString - Convertion result
+ *  \retval TCollection_AsciiString - Conversion result
  */
 //================================================================================
 
@@ -686,6 +686,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
       _AString indent = aCommand->GetIndentation();
       _AString tryStr = indent + "try:";
       _AString newCmd = indent + tab + ( aCommand->GetString().ToCString() + indent.Length() );
+      _AString pasCmd = indent + tab + "pass"; // to keep valid if newCmd is erased
       _AString excStr = indent + "except:";
       _AString msgStr = indent + "\tprint '"; msgStr += method + "() failed. Invalid file name?'";
 
@@ -693,6 +694,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
       aCommand->Clear();
       aCommand->GetString() = newCmd;
       aCommand->SetOrderNb( ++myNbCommands );
+      myCommands.push_back( new _pyCommand( pasCmd, ++myNbCommands ));
       myCommands.push_back( new _pyCommand( excStr, ++myNbCommands ));
       myCommands.push_back( new _pyCommand( msgStr, ++myNbCommands ));
     }
@@ -1334,7 +1336,7 @@ Handle(_pyHypothesis) _pyGen::FindHyp( const _pyID& theHypID )
  * \brief Find algorithm able to create a hypothesis
   * \param theGeom - The shape ID the algorithm was created on
   * \param theMesh - The mesh ID that created the algorithm
-  * \param theHypothesis - The hypothesis the algorithm sould be able to create
+  * \param theHypothesis - The hypothesis the algorithm should be able to create
   * \retval Handle(_pyHypothesis) - The found algo
  */
 //================================================================================
@@ -2048,7 +2050,7 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
         {
           addCmd = *cmd;
           cmd    = addHypCmds.erase( cmd );
-          if ( !theGen->IsToKeepAllCommands() && CanClear() ) {
+          if ( !theGen->IsToKeepAllCommands() /*&& CanClear()*/ ) {
             addCmd->Clear();
             theCommand->Clear();
           }
@@ -2159,7 +2161,7 @@ void _pyMesh::Flush()
     for ( ; m != fatherMeshes.end(); ++m )
       addFatherMesh( *m );
     // if ( removedGeom )
-    //     SetRemovedFromStudy(); // as reffered geometry not in study
+    //     SetRemovedFromStudy(); // as referred geometry not in study
   }
   if ( myGeomNotInStudy )
     return;
@@ -2722,7 +2724,7 @@ bool _pyHypothesis::IsWrappable(const _pyID& theMesh) const
  * \brief Convert the command adding a hypothesis to mesh into a smesh command
   * \param theCmd - The command like mesh.AddHypothesis( geom, hypo )
   * \param theAlgo - The algo that can create this hypo
-  * \retval bool - false if the command cant be converted
+  * \retval bool - false if the command can't be converted
  */
 //================================================================================
 
@@ -2847,7 +2849,7 @@ void _pyHypothesis::Flush()
 
 //================================================================================
 /*!
- * \brief clear creation, arg and unkown commands
+ * \brief clear creation, arg and unknown commands
  */
 //================================================================================
 
@@ -3381,7 +3383,7 @@ void _pyLayerDistributionHypo::Flush()
  * \brief additionally to Addition2Creation, clears SetDistrType() command
   * \param theCmd - AddHypothesis() command
   * \param theMesh - mesh to which a hypothesis is added
-  * \retval bool - convertion result
+  * \retval bool - conversion result
  */
 //================================================================================
 
@@ -3463,7 +3465,7 @@ void _pyNumberOfSegmentsHyp::Flush()
  * into regular1D.LengthNearVertex( length, vertex )
   * \param theCmd - The command like mesh.AddHypothesis( vertex, SegmentLengthAroundVertex )
   * \param theMesh - The mesh needing this hypo
-  * \retval bool - false if the command cant be converted
+  * \retval bool - false if the command can't be converted
  */
 //================================================================================
 
@@ -3474,28 +3476,31 @@ bool _pySegmentLengthAroundVertexHyp::Addition2Creation( const Handle(_pyCommand
 
     _pyID vertex = theCmd->GetArg( 1 );
 
-    // the problem here is that segment algo will not be found
+    // the problem here is that segment algo can be not found
     // by pyHypothesis::Addition2Creation() for <vertex>, so we try to find
     // geometry where segment algorithm is assigned
-    Handle(_pyHypothesis) algo;
     _pyID geom = vertex;
+    Handle(_pyHypothesis) algo = theGen->FindAlgo( geom, theMeshID, this );
     while ( algo.IsNull() && !geom.IsEmpty()) {
       // try to find geom as a father of <vertex>
       geom = FatherID( geom );
       algo = theGen->FindAlgo( geom, theMeshID, this );
     }
-    if ( algo.IsNull() )
+    if ( algo.IsNull() || geom.IsEmpty() )
       return false; // also possible to find geom as brother of veretex...
+
     // set geom instead of vertex
     theCmd->SetArg( 1, geom );
 
-    // set vertex as a second arg
-    if ( myCurCrMethod->myArgs.size() < 1) setCreationArg( 1, "1" ); // :(
-    setCreationArg( 2, vertex );
-
     // mesh.AddHypothesis(vertex, SegmentLengthAroundVertex) -->
-    // theMeshID.LengthNearVertex( length, vertex )
-    return _pyHypothesis::Addition2Creation( theCmd, theMeshID );
+    // SegmentLengthAroundVertex = Regular_1D.LengthNearVertex( length )
+    if ( _pyHypothesis::Addition2Creation( theCmd, theMeshID ))
+    {
+      // set vertex as a second arg
+      theCmd->SetArg( 2, vertex );
+
+      return true;
+    }
   }
   return false;
 }
@@ -3518,7 +3523,7 @@ _pyAlgorithm::_pyAlgorithm(const Handle(_pyCommand)& theCreationCmd)
  * \brief Convert the command adding an algorithm to mesh
   * \param theCmd - The command like mesh.AddHypothesis( geom, algo )
   * \param theMesh - The mesh needing this algo
-  * \retval bool - false if the command cant be converted
+  * \retval bool - false if the command can't be converted
  */
 //================================================================================
 
index a24b40d7a592568bebc72b486d2b326652f82e96..6fd991533bd9188f7e6fc9f06a404adb5399f633 100644 (file)
@@ -105,7 +105,7 @@ class _pyCommand: public Standard_Transient
   TColStd_SequenceOfAsciiString   myArgs;               //!< found arguments
   TColStd_SequenceOfAsciiString   myResults;            //!< found results
   TColStd_SequenceOfInteger       myBegPos;             //!< where myRes, myObj, ... begin
-  std::list< Handle(_pyCommand) > myDependentCmds; //!< commands that sould follow me in the script
+  std::list< Handle(_pyCommand) > myDependentCmds; //!< commands that should follow me in the script
 
   enum { UNKNOWN=-1, EMPTY=0, RESULT_IND, OBJECT_IND, METHOD_IND, ARG1_IND };
   int  GetBegPos( int thePartIndex ) const;
index e22a87c775c723d496a38bcfa515e8a9ebc08668..cc842f215462cc31dedfe6acfedeca3f84b65e55 100644 (file)
@@ -1035,7 +1035,7 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
         lines.push_back( theSavedTrace.SubString( from, to - 1 ));
       from = to + 1;
     }
-    // For the convertion of IDL API calls -> smeshBuilder.py API, "smesh" standing for SMESH_Gen
+    // For the conversion of IDL API calls -> smeshBuilder.py API, "smesh" standing for SMESH_Gen
     // was replaces with "smeshgen" (==TPythonDump::SMESHGenName()).
     // Change "smesh" -> "smeshgen" in the trace saved before passage to smeshBuilder.py API
     bool isNewVersion =
index 3e46a2039b7c68cb4297caeb543d23da3ce793f5..739a4d904ffe1fd5f6cf0e7041e8ec17ab85ad1f 100644 (file)
@@ -1429,7 +1429,7 @@ FunctorType LinearOrQuadratic_i::GetFunctorType()
 
 /*
   Class       : GroupColor_i
-  Description : Functor for check color of group to whic mesh element belongs to
+  Description : Functor for check color of group to which mesh element belongs to
 */
 GroupColor_i::GroupColor_i()
 {
index b9d290c47d0bd55c731e09828cd742ebdb14f148..9baf0f3bf5e6f3c0cdfe16ed96334ccdefb30ae6 100644 (file)
@@ -704,7 +704,7 @@ namespace SMESH
   
   /*
     Class       : GroupColor_i
-    Description : Functor for check color of group to whic mesh element belongs to
+    Description : Functor for check color of group to which mesh element belongs to
   */
   class SMESH_I_EXPORT GroupColor_i: public virtual POA_SMESH::GroupColor,
                                      public virtual Predicate_i
index 845e0d9f081da9ac32d720fdcb1db1a0dd68ec66..44cbff77a89b9974ac9e027ab25c9ce86307d1fd 100644 (file)
@@ -54,6 +54,7 @@
  #include <process.h>
 #else
  #include <dlfcn.h>
+ #include <libgen.h> // for basename function
 #endif
 
 #ifdef WIN32
@@ -382,8 +383,10 @@ GenericHypothesisCreator_i* SMESH_Gen_i::getHypothesisCreator(const char* theHyp
         !strcmp( theLibName+libNameLen-3, ".so" ))
     {
       //the old format
-#ifdef WIN32
+#if defined(WIN32)
       aPlatformLibName = std::string( theLibName+3, libNameLen-6 ) + ".dll";
+#elif defined(__APPLE__)
+      aPlatformLibName = std::string( theLibName, libNameLen-3 ) + ".dylib";
 #else
       aPlatformLibName = theLibName;
 #endif
@@ -391,11 +394,13 @@ GenericHypothesisCreator_i* SMESH_Gen_i::getHypothesisCreator(const char* theHyp
     else
     {
       //try to use new format
-#ifdef WIN32
+#if defined(WIN32)
       aPlatformLibName = theLibName;
       aPlatformLibName += ".dll";
+#elif defined(__APPLE__)
+      aPlatformLibName = std::string( "lib" ) + std::string( theLibName ) + ".dylib";
 #else
-      aPlatformLibName = "lib" + std::string( theLibName ) + ".so";
+      aPlatformLibName = std::string( "lib" ) + std::string( theLibName ) + ".so";
 #endif
     }
   }
@@ -416,7 +421,7 @@ GenericHypothesisCreator_i* SMESH_Gen_i::getHypothesisCreator(const char* theHyp
       LibHandle libHandle = LoadLib( aPlatformLibName.c_str() );
       if (!libHandle)
       {
-        // report any error, if occured
+        // report any error, if occurred
 #ifndef WIN32
         const char* anError = dlerror();
         throw(SALOME_Exception(anError));
@@ -1169,7 +1174,7 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromMEDorSAUV( const char* theFileNa
   _splitpath( theFileNameForPython, NULL, NULL, bname, NULL );
   string aFileName = bname;
 #else
-  string aFileName = basename( theFileNameForPython );
+  string aFileName = basename( const_cast<char *>(theFileNameForPython) );
 #endif
   // Retrieve mesh names from the file
   DriverMED_R_SMESHDS_Mesh myReader;
@@ -1212,11 +1217,11 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromMEDorSAUV( const char* theFileNa
         // - as names of meshes are stored in MED file, we use them for data publishing
         // - as mesh name is not stored in UNV file, we use file name as name of mesh when publishing data
         aSO = PublishMesh( myCurrentStudy, mesh.in(), ( theFileName == theFileNameForPython ) ? (*it).c_str() : aFileName.c_str() );
+
+      // Python Dump
       if ( !aSO->_is_nil() ) {
-        // Python Dump
         aPythonDump << aSO;
       } else {
-        // Python Dump
         aPythonDump << "mesh_" << i;
       }
 
@@ -1318,7 +1323,7 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateMeshesFromSTL( const char* theFileName
   _splitpath( theFileName, NULL, NULL, bname, NULL );
   string aFileName = bname;
 #else
-  string aFileName = basename( theFileName );
+  string aFileName = basename( const_cast<char *>(theFileName) );
 #endif
   // publish mesh in the study
   if ( CanPublishInStudy( aMesh ) ) {
@@ -1447,7 +1452,7 @@ SMESH_Gen_i::CreateMeshesFromGMF( const char*             theFileName,
   _splitpath( theFileName, NULL, NULL, bname, NULL );
   string aFileName = bname;
 #else
-  string aFileName = basename( theFileName );
+  string aFileName = basename( const_cast<char *>(theFileName) );
 #endif
   // publish mesh in the study
   if ( CanPublishInStudy( aMesh ) ) {
@@ -3137,7 +3142,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
               if( libname_len > 4 )
                 libname.resize( libname_len - 4 );
 #else
-              // PAL17753 (Regresion: missing hypothesis in restored study)
+              // PAL17753 (Regression: missing hypothesis in restored study)
               // "lib" also should be removed from the beginning
               //if( libname_len > 3 )
                 //libname.resize( libname_len - 3 );
@@ -3206,7 +3211,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
               if( libname_len > 4 )
                 libname.resize( libname_len - 4 );
 #else
-              // PAL17753 (Regresion: missing hypothesis in restored study)
+              // PAL17753 (Regression: missing hypothesis in restored study)
               // "lib" also should be removed from the beginning
               //if( libname_len > 3 )
                 //libname.resize( libname_len - 3 );
index c03faa32c2b81e6ccf0a7ac498abcae7eb26a884..b08b7e3e6d35d8b09a536a17ca8b5b5e75a68af5 100644 (file)
@@ -277,6 +277,10 @@ static SALOMEDS::SObject_ptr publish(SALOMEDS::Study_ptr   theStudy,
       SO = aStudyBuilder->NewObjectToTag( theFatherObject, theTag );
       isNewSO = true;
     }
+    else
+    {
+      isInUseCaseTree = useCaseBuilder->IsUseCaseNode( SO );
+    }
   }
   else
   {
@@ -322,7 +326,7 @@ static SALOMEDS::SObject_ptr publish(SALOMEDS::Study_ptr   theStudy,
   {
     // define the next tag after given one in the data tree to insert SObject
     SALOMEDS::SObject_wrap curObj, objAfter;
-    if ( theFatherObject->GetLastChildTag() > theTag )
+    if ( theFatherObject->GetLastChildTag() > theTag && theTag > 0 )
     {
       SALOMEDS::UseCaseIterator_wrap
         anUseCaseIter = useCaseBuilder->GetUseCaseIterator(theFatherObject);
@@ -763,7 +767,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr    theStudy
       "Groups of Faces", "Groups of Volumes", "Groups of 0D Elements",
       "Groups of Balls" };
 
-    // Currently, groups with heterogenous content are not supported
+    // Currently, groups with heterogeneous content are not supported
     if ( aType != SMESH::ALL )
     {
       long aRootTag = GetNodeGroupsTag() + aType - 1;
@@ -917,7 +921,7 @@ bool SMESH_Gen_i::AddHypothesisToShape(SALOMEDS::Study_ptr         theStudy,
   if ( aMeshSO->_is_nil() || aHypSO->_is_nil())
     return false;
 
-  // Find a mesh or submesh refering to theShape
+  // Find a mesh or submesh referring to theShape
   SALOMEDS::SObject_wrap aMeshOrSubMesh =
     GetMeshOrSubmeshByShape( theStudy, theMesh, theShape );
   if ( aMeshOrSubMesh->_is_nil() )
@@ -1093,7 +1097,7 @@ void SMESH_Gen_i::UpdateParameters(CORBA::Object_ptr theObject, const char* theP
         if ( pos < varStr.size() )
         {
           varFound = ( varStr.compare( pos, myLastParameters[i].size(), myLastParameters[i] ) == 0 &&
-                       // same string begining but is length same?
+                       // same string beginning but is length same?
                        ( pos + myLastParameters[i].size() >= varStr.size() ||
                          separators.find( varStr[ pos+1 ]) != std::string::npos ));
           if ( varFound )
index 7df1384caa24d0f716c5cf7621dc44525bc08f1f..d9c4b0961d208e34d40bcacc65d9bff6804a6e37 100644 (file)
@@ -480,7 +480,6 @@ SMESH::long_array* SMESH_GroupBase_i::GetListOfID()
     if ( 0 < aSize && aSize < 100 ) // for comfortable testing ;)
       std::sort( &aRes[0], &aRes[0]+aSize );
   }
-  MESSAGE("get list of IDs of a vague group");
   return aRes._retn();
 }
 
@@ -673,7 +672,6 @@ void SMESH_GroupBase_i::SetColorNumber(CORBA::Long color)
     aGroupDS->SetColorGroup(color);
     TPythonDump()<<SMESH::SMESH_GroupBase_var(_this())<<".SetColorNumber( "<<color<<" )";
   }
-  MESSAGE("set color number of a group");
   return ;
 }
 
index cbce54f50f6a6c2f627f8404f5dbaeaef5d05c71..b3e4e48325a354797167f1a2e8973ca85d028712 100644 (file)
@@ -60,7 +60,7 @@ SMESH_Hypothesis_i::SMESH_Hypothesis_i( PortableServer::POA_ptr thePOA )
 
 SMESH_Hypothesis_i::~SMESH_Hypothesis_i()
 {
-  MESSAGE( "SMESH_Hypothesis_i::~SMESH_Hypothesis_i" );
+  //MESSAGE( "SMESH_Hypothesis_i::~SMESH_Hypothesis_i" );
   if ( myBaseImpl )
     delete myBaseImpl;
 };
index 44195b8c8d748ec8c2061a04058112ae9a384466..a075dadce83d21437eebba69f9bbb11eeac2a505 100644 (file)
@@ -496,7 +496,13 @@ int SMESH_Mesh_i::ImportSTLFile( const char* theFileName )
   SMESH_TRY;
 
   // Read mesh with name = <theMeshName> into SMESH_Mesh
-  _impl->STLToMesh( theFileName );
+  std::string name = _impl->STLToMesh( theFileName );
+  if ( !name.empty() )
+  {
+    SALOMEDS::Study_var     study = _gen_i->GetCurrentStudy();
+    SALOMEDS::SObject_wrap meshSO = _gen_i->ObjectToSObject( study, _this() );
+    _gen_i->SetName( meshSO, name.c_str() );
+  }
 
   SMESH_CATCH( SMESH::throwCorbaException );
 
@@ -1125,7 +1131,7 @@ void SMESH_Mesh_i::RemoveGroupWithContents( SMESH::SMESH_GroupBase_ptr theGroup
         if ( n->NbInverseElements() == 0 )
           _impl->GetMeshDS()->RemoveFreeNode( n, /*sm=*/0 );
 
-  TPythonDump pyDump; // Supress dump from RemoveGroup()
+  TPythonDump pyDump; // Suppress dump from RemoveGroup()
 
   // Update Python script (theGroup must be alive for this)
   pyDump << SMESH::SMESH_Mesh_var(_this())
@@ -2943,7 +2949,7 @@ void SMESH_Mesh_i::PrepareForWriting (const char* file, bool overwrite)
     if ( !aFile.openForWriting() ) {
       msg << "You cannot create the file "
           << aFile.getName()
-          << ". Check the directory existance and access rights";
+          << ". Check the directory existence and access rights";
     }
     aFile.remove();
   }
@@ -3144,9 +3150,15 @@ void SMESH_Mesh_i::ExportSTL (const char *file, const bool isascii)
   TPythonDump() << SMESH::SMESH_Mesh_var(_this())
                 << ".ExportSTL( r'" << file << "', " << isascii << " )";
 
+  CORBA::String_var name;
+  SALOMEDS::Study_var study = _gen_i->GetCurrentStudy();
+  SALOMEDS::SObject_wrap so = _gen_i->ObjectToSObject( study, _this() );
+  if ( !so->_is_nil() )
+    name = so->GetName();
+
   // Perform Export
-  PrepareForWriting(file);
-  _impl->ExportSTL(file, isascii);
+  PrepareForWriting( file );
+  _impl->ExportSTL( file, isascii, name.in() );
 }
 
 //================================================================================
@@ -3595,8 +3607,14 @@ void SMESH_Mesh_i::ExportPartToSTL(::SMESH::SMESH_IDSource_ptr meshPart,
 
   PrepareForWriting(file);
 
+  CORBA::String_var name;
+  SALOMEDS::Study_var study = _gen_i->GetCurrentStudy();
+  SALOMEDS::SObject_wrap so = _gen_i->ObjectToSObject( study, meshPart );
+  if ( !so->_is_nil() )
+    name = so->GetName();
+
   SMESH_MeshPartDS partDS( meshPart );
-  _impl->ExportSTL(file, isascii, &partDS);
+  _impl->ExportSTL( file, isascii, name.in(), &partDS );
 
   TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportPartToSTL( "
                 << meshPart<< ", r'" << file << "', " << isascii << ")";
index 4848a447a8155757ead6e087044bf503c09c4b9e..e4deee310cd1452ca5f53878725df143bdb6ac09 100644 (file)
@@ -231,7 +231,7 @@ SMESH_NoteBook::~SMESH_NoteBook()
 /*!
  * \brief Replace parameters of the functions on the Salome NoteBook Variables
  * \param theString - Input string
- * \retval TCollection_AsciiString - Convertion result
+ * \retval TCollection_AsciiString - Conversion result
  */
 //================================================================================
 void SMESH_NoteBook::ReplaceVariables()
index 7fb82c5644a8a33a55c2c248af32ad69f739ec29..52baab3035244f082942031af4abba8771853635 100644 (file)
@@ -62,7 +62,7 @@ public:
    * \param theRemovedObjIDs - entries of objects whose created commands were removed
    * \param theHistoricalDump - true means to keep all commands, false means
    *        to exclude commands relating to objects removed from study
-   * \retval TCollection_AsciiString - Convertion result
+   * \retval TCollection_AsciiString - Conversion result
    */
   static void
   ConvertScript(std::list< TCollection_AsciiString >&     theScriptLines,
index 9328f4b77d1fe503782d040bc484df7a2247bfc1..48ed4a1341b4a358838be88de1bfb8d7a1f33f47 100644 (file)
@@ -80,7 +80,6 @@ SMESH_subMesh_i::SMESH_subMesh_i( PortableServer::POA_ptr thePOA,
 
 SMESH_subMesh_i::~SMESH_subMesh_i()
 {
-  MESSAGE("SMESH_subMesh_i::~SMESH_subMesh_i");
   if ( _preMeshInfo ) delete _preMeshInfo;
   _preMeshInfo = NULL;
 }
index fdea2f1379dcbcc7e155f515d250ccacfd5778d3..7d2ee5a0955f0e9463d71e24fab1bbbd51c78d93 100644 (file)
@@ -35,7 +35,7 @@ import math
 
 def GetNewNodes(mesh,Elems,OldNodes):
     """
-    Auxilary function, which return list of nodes from
+    Auxiliary function, which return list of nodes from
     given Elems avoided nodes from OldNodes
     """
     newnodes = []
index 19f3375f71b7914497900c6aa57c531bc0d97077..4fef40fab884171b624d58acd2f477d1db1fa34e 100644 (file)
@@ -381,7 +381,8 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm):
             pass
         # 0D algorithm
         if self.geom is None:
-            raise RuntimeError, "Attemp to create SegmentAroundVertex_0D algoritm on None shape"
+            self.geom = store_geom
+            raise RuntimeError, "Attempt to create SegmentAroundVertex_0D algorithm on None shape"
         from salome.smesh.smeshBuilder import AssureGeomPublished, GetName, TreatHypoStatus
         AssureGeomPublished( self.mesh, self.geom )
         name = GetName(self.geom)
@@ -1469,7 +1470,7 @@ class StdMeshersBuilder_Cartesian_3D(Mesh_Algorithm):
     #    several functions, they must be accompanied by relative coordinates of
     #    points dividing the whole shape into ranges where the functions apply; points
     #    coodrinates should vary within (0.0, 1.0) range. Parameter \a t of the spacing
-    #    function f(t) varies from 0.0 to 1.0 witin a shape range. 
+    #    function f(t) varies from 0.0 to 1.0 within a shape range. 
     #    Examples:
     #    - "10.5" - defines a grid with a constant spacing
     #    - [["1", "1+10*t", "11"] [0.1, 0.6]] - defines different spacing in 3 ranges.
@@ -1565,7 +1566,7 @@ class StdMeshersBuilder_Cartesian_3D(Mesh_Algorithm):
     pass # end of StdMeshersBuilder_Cartesian_3D class
 
 ## Defines a stub 1D algorithm, which enables "manual" creation of nodes and
-#  segments usable by 2D algoritms
+#  segments usable by 2D algorithms
 #
 #  It is created by calling smeshBuilder.Mesh.UseExistingSegments(geom=0)
 #
@@ -1593,7 +1594,7 @@ class StdMeshersBuilder_UseExisting_1D(Mesh_Algorithm):
     pass # end of StdMeshersBuilder_UseExisting_1D class
 
 ## Defines a stub 2D algorithm, which enables "manual" creation of nodes and
-#  faces usable by 3D algoritms
+#  faces usable by 3D algorithms
 #
 #  It is created by calling smeshBuilder.Mesh.UseExistingFaces(geom=0)
 #
index 3a2939151d54fc2daf86d51e91e910ed07a75568..3690f76d8f57ace4a10910a25f3ed29a06b83dd7 100644 (file)
@@ -183,7 +183,7 @@ class Mesh_Algorithm:
     ## Private method.
     def Create(self, mesh, geom, hypo, so="libStdMeshersEngine.so"):
         if geom is None and mesh.mesh.HasShapeToMesh():
-            raise RuntimeError, "Attemp to create " + hypo + " algoritm on None shape"
+            raise RuntimeError, "Attempt to create " + hypo + " algorithm on None shape"
         algo = self.FindAlgorithm(hypo, mesh.smeshpyD)
         if algo is None:
             algo = mesh.smeshpyD.CreateHypothesis(hypo, so)
@@ -195,7 +195,7 @@ class Mesh_Algorithm:
     def Assign(self, algo, mesh, geom):
         from salome.smesh.smeshBuilder import AssureGeomPublished, TreatHypoStatus, GetName
         if geom is None and mesh.mesh.HasShapeToMesh():
-            raise RuntimeError, "Attemp to create " + algo + " algoritm on None shape"
+            raise RuntimeError, "Attempt to create " + algo + " algorithm on None shape"
         self.mesh = mesh
         if not geom or geom.IsSame( mesh.geom ):
             self.geom = mesh.geom
@@ -288,6 +288,8 @@ class Mesh_Algorithm:
             raise TypeError, "ViscousLayers are supported by 3D algorithms only"
         if not "ViscousLayers" in self.GetCompatibleHypothesis():
             raise TypeError, "ViscousLayers are not supported by %s"%self.algo.GetName()
+        if faces and isinstance( faces, geomBuilder.GEOM._objref_GEOM_Object ):
+            faces = [ faces ]
         if faces and isinstance( faces[0], geomBuilder.GEOM._objref_GEOM_Object ):
             faceIDs = []
             for shape in faces:
@@ -324,6 +326,8 @@ class Mesh_Algorithm:
             raise TypeError, "ViscousLayers2D are supported by 2D algorithms only"
         if not "ViscousLayers2D" in self.GetCompatibleHypothesis():
             raise TypeError, "ViscousLayers2D are not supported by %s"%self.algo.GetName()
+        if edges and not isinstance( edges, list ) and not isinstance( edges, tuple ):
+            edges = [edges]
         if edges and isinstance( edges[0], geomBuilder.GEOM._objref_GEOM_Object ):
             edgeIDs = []
             for shape in edges:
index f8a61b76644f80cf43f82c62d3b3275818768bb8..e5a7aeeb068b838349bca1e1a913d45b8a99ec4b 100644 (file)
@@ -427,7 +427,6 @@ SMESH_Swig::~SMESH_Swig()
 //===============================================================
 const char* SMESH_Swig::AddNewMesh(const char* theIOR)
 {
-  MESSAGE("AddNewMesh");
 
   // VSR: added temporarily - to be removed - objects are published automatically by engine
   SALOMEDS::SObject_var aSObject = myStudy->FindObjectIOR(theIOR);
@@ -462,8 +461,6 @@ const char* SMESH_Swig::AddNewMesh(const char* theIOR)
 //===============================================================
 const char* SMESH_Swig::AddNewHypothesis(const char* theIOR)
 {
-  MESSAGE("AddNewHypothesis");
-
   SALOMEDS::SObject_var aSObject = ::AddHypothesis(theIOR,
                                                    mySComponentMesh,
                                                    myStudyBuilder);
@@ -477,8 +474,6 @@ const char* SMESH_Swig::AddNewHypothesis(const char* theIOR)
 //===============================================================
 const char* SMESH_Swig::AddNewAlgorithms(const char* theIOR)
 {
-  MESSAGE("AddNewAlgorithms");
-
   SALOMEDS::SObject_var aSObject = ::AddAlgorithms(theIOR,
                                                    mySComponentMesh,
                                                    myStudyBuilder);
@@ -621,6 +616,148 @@ const char* SMESH_Swig::AddSubMeshOnShape(const char* theMeshEntry,
   return "";
 }
 
+/*!
+  \brief Gets window with specified identifier
+  \internal
+  \param id window identifier
+  \return pointer on the window
+*/
+
+SUIT_ViewWindow* getWnd( const int id )
+{
+  SUIT_ViewWindow* resWnd = 0;
+  SUIT_Session* aSession          = SUIT_Session::session();
+  SUIT_Application* anApplication = aSession->activeApplication();
+  SalomeApp_Application* app    = dynamic_cast<SalomeApp_Application*>(anApplication);
+  if ( app ) {
+    ViewManagerList vmlist = app->viewManagers();
+    foreach( SUIT_ViewManager* vm, vmlist ) {
+      QVector<SUIT_ViewWindow*> vwlist = vm->getViews();
+      foreach ( SUIT_ViewWindow* vw, vwlist ) {
+        if ( id == vw->getId() ) {
+          resWnd = vw;
+          break;
+        }
+      }
+    }
+  }
+  return resWnd;
+}
+
+class TGetActorAspect: public SALOME_Event
+{
+public:
+  typedef actorAspect TResult;
+  TResult myResult;
+  const char* _entry;
+  int _wid;
+  TGetActorAspect( const char* Mesh_Entry, int viewId )
+  {
+    _entry = Mesh_Entry;
+    _wid = viewId;
+  }
+  virtual void Execute()
+    {
+      SMESH_Actor* anActor;
+      if (_wid)
+        {
+          SUIT_ViewWindow* w = getWnd(_wid);
+          anActor = SMESH::FindActorByEntry( w, _entry );
+        }
+      else
+        anActor = SMESH::FindActorByEntry( _entry );
+      if ( !anActor )
+        {
+          MESSAGE("GetActorAspect: no actor corresponding to: " << _entry);
+          return;
+        }
+      anActor->GetSufaceColor(myResult.surfaceColor.r,
+                              myResult.surfaceColor.g,
+                              myResult.surfaceColor.b,
+                              myResult.surfaceColor.delta);
+      anActor->GetVolumeColor(myResult.volumeColor.r,
+                              myResult.volumeColor.g,
+                              myResult.volumeColor.b,
+                              myResult.volumeColor.delta);
+      anActor->GetEdgeColor(myResult.edgeColor.r,
+                            myResult.edgeColor.g,
+                            myResult.edgeColor.b);
+      anActor->GetNodeColor(myResult.nodeColor.r,
+                            myResult.nodeColor.g,
+                            myResult.nodeColor.b);
+      myResult.opacity= anActor->GetOpacity();
+      MESSAGE("opacity: " << myResult.opacity);
+    }
+};
+
+actorAspect SMESH_Swig::GetActorAspect( const char* Mesh_Entry, int viewId )
+{
+  return ProcessEvent(new TGetActorAspect( Mesh_Entry, viewId));
+}
+
+void SMESH_Swig::SetActorAspect( const actorAspect& actorPres, const char* Mesh_Entry, int viewId )
+{
+  class TSetActorAspect: public SALOME_Event
+  {
+  public:
+    const char* _entry;
+    actorAspect _actorPres;
+    int _wid;
+    TSetActorAspect(const actorAspect& actorPres, const char* Mesh_Entry, int viewId )
+    {
+      _entry = Mesh_Entry;
+      _actorPres = actorPres;
+      _wid = viewId;
+    }
+    virtual void Execute()
+    {
+      SMESH_Actor* anActor;
+      if (_wid)
+        {
+          SUIT_ViewWindow* w = getWnd(_wid);
+          anActor = SMESH::FindActorByEntry( w, _entry );
+        }
+      else
+        anActor = SMESH::FindActorByEntry( _entry );
+      if ( !anActor )
+        {
+          MESSAGE("SetActorAspect: no actor corresponding to: " << _entry);
+          return;
+        }
+      anActor->SetSufaceColor(_actorPres.surfaceColor.r,
+                              _actorPres.surfaceColor.g,
+                              _actorPres.surfaceColor.b,
+                              _actorPres.surfaceColor.delta);
+      anActor->SetVolumeColor(_actorPres.volumeColor.r,
+                              _actorPres.volumeColor.g,
+                              _actorPres.volumeColor.b,
+                              _actorPres.volumeColor.delta);
+      anActor->SetEdgeColor(_actorPres.edgeColor.r,
+                            _actorPres.edgeColor.g,
+                            _actorPres.edgeColor.b);
+      anActor->SetNodeColor(_actorPres.nodeColor.r,
+                            _actorPres.nodeColor.g,
+                            _actorPres.nodeColor.b);
+      anActor->SetOpacity(_actorPres.opacity);
+      if (_wid)
+        {
+          SUIT_ViewWindow* w = getWnd(_wid);
+          w->repaint();
+        }
+      else
+        {
+          SUIT_Session* aSession          = SUIT_Session::session();
+          SUIT_Application* anApplication = aSession->activeApplication();
+          SalomeApp_Application* anApp    = dynamic_cast<SalomeApp_Application*>(anApplication);
+          SUIT_ViewManager* vman          = anApp->getViewManager(VTKViewer_Viewer::Type(),true);
+          vman->getActiveView()->repaint();
+        }
+    }
+  };
+
+  ProcessVoidEvent(new TSetActorAspect(actorPres, Mesh_Entry, viewId));
+}
+
 void SMESH_Swig::CreateAndDisplayActor( const char* Mesh_Entry )
 {
   //  SMESH_Actor* Mesh = smeshGUI->ReadScript(aM);
index 654c3e699c200ba8e0fdec51d6d9d1c0f6dafa8b..931614c1ef0082a5216bb505475e78dfafc3e329 100644 (file)
@@ -60,6 +60,37 @@ typedef enum
     Ball       = BallSelection
   } SelectionMode;
 
+typedef struct
+{
+  double r, g, b;
+  int delta;
+} surfaceColorStruct;
+
+typedef struct
+{
+  double r, g, b;
+  int delta;
+} volumeColorStruct;
+
+typedef struct
+{
+  double r, g, b;
+} edgeColorStruct;
+
+typedef struct
+{
+  double r, g, b;
+} nodeColorStruct;
+
+struct actorAspect
+{
+  surfaceColorStruct surfaceColor;
+  volumeColorStruct volumeColor;
+  edgeColorStruct edgeColor;
+  nodeColorStruct nodeColor;
+  double opacity;
+};
+
 class SMESH_SWIG_EXPORT SMESH_Swig
 {
 public:
@@ -98,6 +129,9 @@ public:
    */
   void                       SetMeshIcon( const char*, const bool, const bool );
 
+  actorAspect                GetActorAspect(const char* Mesh_Entry, int viewId = 0 );
+  void                       SetActorAspect( const actorAspect& actorPres, const char* Mesh_Entry, int viewId = 0  );
+
   void setSelectionMode( SelectionMode selectionMode );
   std::vector<int> getSelected( const char* Mesh_Entry );
   std::vector<std::pair<int, int> > getSelectedEdgeOfCell( const char* Mesh_Entry );
index 68b0e1ec5618d51a0aac5c44b623d2d879d02917..d00fff057496da611c9107bf70ab65b27461a133 100644 (file)
@@ -73,6 +73,37 @@ enum SelectionMode
     Ball
   };
 
+typedef struct
+{
+  double r, g, b;
+  int delta;
+} surfaceColorStruct;
+
+typedef struct
+{
+  double r, g, b;
+  int delta;
+} volumeColorStruct;
+
+typedef struct
+{
+  double r, g, b;
+} edgeColorStruct;
+
+typedef struct
+{
+  double r, g, b;
+} nodeColorStruct;
+
+struct actorAspect
+{
+  surfaceColorStruct surfaceColor;
+  volumeColorStruct volumeColor;
+  edgeColorStruct edgeColor;
+  nodeColorStruct nodeColor;
+  double opacity;
+};
+
 class SMESH_Swig
 {
  public:
@@ -107,6 +138,9 @@ class SMESH_Swig
   std::vector<int> getSelected( const char* Mesh_Entry );
   std::vector<std::pair<int,int> > getSelectedEdgeOfCell( const char* Mesh_Entry );
 
+  actorAspect GetActorAspect(const char* Mesh_Entry, int viewId = 0 );
+  void SetActorAspect( const actorAspect& actorPres, const char* Mesh_Entry, int viewId = 0 );
+
   // --------------------- for the test purposes -----------------------
   SelectionMode  getSelectionMode();
   void select( const char *id, std::vector<int> ids, bool append = false );
index a22a334151bd7cce234e59e82fc1ff3e158e9222..ad5f5263f42152e2100bbfa441c0470d718e2e70 100644 (file)
@@ -216,7 +216,7 @@ namespace {
       NbSeg += ( Lrat2 - Lratio ) / ( Lrat2 - Lrat1 )  * ( NbSegMax - NbSegMin );
 
     double S0 = Lmin / (int) NbSeg;
-    MESSAGE( "S0 = " << S0 << ", Lmin = " << Lmin << ", Nbseg = " << (int) NbSeg);
+    //MESSAGE( "S0 = " << S0 << ", Lmin = " << Lmin << ", Nbseg = " << (int) NbSeg);
 
     // Compute segments length for all edges
 
index ce4e6a443689af4413c222f0ca2d64ea05a90ed8..f87cd346bc17e602274ef88f4f5e82f4f02049b3 100644 (file)
@@ -65,7 +65,7 @@ public:
    *  \param spaceFunctions - functions defining spacing values at given point on axis
    *  \param internalPoints - points dividing a grid into parts along each direction
    *
-   * Parameter t of spaceFunction f(t) is a position [0,1] withing bounding box of
+   * Parameter t of spaceFunction f(t) is a position [0,1] within bounding box of
    * the shape to mesh
    */
   void SetGridSpacing(std::vector<std::string>& spaceFunctions,
index 70fe2368d063191ccee137a29eb00ae13086bdc2..aebd779eea189c77019b1ac01a7b7bc6ea636687 100644 (file)
@@ -3056,7 +3056,7 @@ namespace
     else if ( eMidOut != edges.end() )
       edges.splice( edges.end(), edges, edges.begin(), eMidOut );
 
-    // sort nodes accoring to the order of edges
+    // sort nodes according to the order of edges
     _Node*  orderNodes   [20];
     //TGeomID orderShapeIDs[20];
     size_t nbN = 0;
@@ -3167,7 +3167,7 @@ namespace
         const F_IntersectPoint* firstIntPnt = 0;
         if ( link._nodes[0]->Node() ) // 1st node is a hexa corner
         {
-          curIntPnt._paramOnLine = coords[ ijk[ iDir ]] - coords[0];
+          curIntPnt._paramOnLine = coords[ ijk[ iDir ]] - coords[0] + _grid->_tol;
           const GridLine& line = _grid->_lines[ iDir ][ lineIndex[ iL ]];
           multiset< F_IntersectPoint >::const_iterator ip =
             line._intPoints.upper_bound( curIntPnt );
index 3d04f7aac72630c7ef146c881c7b6ebd8c04eda5..9a66a56334c295bb11f540a4f5269b1fcdc3edfc 100644 (file)
@@ -126,7 +126,7 @@ namespace {
      * \brief Restore nodes on internal vertices of a complex side
      * \param event - algo_event or compute_event itself (of SMESH_subMesh)
      * \param eventType - ALGO_EVENT or COMPUTE_EVENT (of SMESH_subMesh)
-     * \param subMesh - the submesh where the event occures
+     * \param subMesh - the submesh where the event occurs
      * \param data - listener data stored in the subMesh
      * \param hyp - hypothesis, if eventType is algo_event
      */
@@ -247,7 +247,6 @@ StdMeshers_CompositeSegment_1D::StdMeshers_CompositeSegment_1D(int         hypId
                                                                SMESH_Gen * gen)
   :StdMeshers_Regular_1D(hypId, studyId, gen)
 {
-  MESSAGE("StdMeshers_CompositeSegment_1D::StdMeshers_CompositeSegment_1D");
   _name = AlgoName();
 }
 
@@ -375,7 +374,7 @@ bool StdMeshers_CompositeSegment_1D::Compute(SMESH_Mesh &         aMesh,
   if ( side->NbEdges() < 2 )
     return StdMeshers_Regular_1D::Compute( aMesh, aShape );
 
-  // update segment lenght computed by StdMeshers_AutomaticLength
+  // update segment length computed by StdMeshers_AutomaticLength
   const list <const SMESHDS_Hypothesis * > & hyps = GetUsedHypothesis(aMesh, aShape);
   if ( !hyps.empty() ) {
     StdMeshers_AutomaticLength * autoLenHyp = const_cast<StdMeshers_AutomaticLength *>
index 9212691267cbaf6a4876d4fa94ab655fa7f19985..9f5929e3681a9a4bcb5b2957c64bf752ac1781f6 100644 (file)
@@ -63,7 +63,7 @@ using namespace std;
  * \brief Constructor of a side of one edge
   * \param theFace - the face
   * \param theEdge - the edge
- */
 */
 //================================================================================
 
 StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face&   theFace,
@@ -71,11 +71,15 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face&   theFace,
                                          SMESH_Mesh*          theMesh,
                                          const bool           theIsForward,
                                          const bool           theIgnoreMediumNodes,
+                                         SMESH_MesherHelper*  theFaceHelper,
                                          SMESH_ProxyMesh::Ptr theProxyMesh)
 {
   std::list<TopoDS_Edge> edges(1,theEdge);
-  *this = StdMeshers_FaceSide( theFace, edges, theMesh, theIsForward,
-                               theIgnoreMediumNodes, theProxyMesh );
+  StdMeshers_FaceSide tmp( theFace, edges, theMesh, theIsForward,
+                           theIgnoreMediumNodes, theFaceHelper, theProxyMesh );
+  *this = tmp;
+
+  tmp.myHelper = NULL;
 }
 
 //================================================================================
@@ -89,6 +93,7 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face&      theFace,
                                          SMESH_Mesh*             theMesh,
                                          const bool              theIsForward,
                                          const bool              theIgnoreMediumNodes,
+                                         SMESH_MesherHelper*     theFaceHelper,
                                          SMESH_ProxyMesh::Ptr    theProxyMesh)
 {
   int nbEdges = theEdges.size();
@@ -108,7 +113,13 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face&      theFace,
   myMissingVertexNodes = false;
   myIgnoreMediumNodes  = theIgnoreMediumNodes;
   myDefaultPnt2d       = gp_Pnt2d( 1e+100, 1e+100 );
+  myHelper             = NULL;
   if ( !myProxyMesh ) myProxyMesh.reset( new SMESH_ProxyMesh( *theMesh ));
+  if ( theFaceHelper && theFaceHelper->GetSubShape() == myFace )
+  {
+    myHelper           = new SMESH_MesherHelper( * myProxyMesh->GetMesh() );
+    myHelper->CopySubShapeInfo( *theFaceHelper );
+  }
   if ( nbEdges == 0 ) return;
 
   SMESHDS_Mesh* meshDS = myProxyMesh->GetMeshDS();
@@ -203,6 +214,7 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const StdMeshers_FaceSide*  theSide,
   myLast.push_back     ( theULast );
   myNormPar.push_back  ( 1. );
   myIsUniform.push_back( true );
+  myHelper       = NULL;
   myLength       = 0;
   myProxyMesh    = theSide->myProxyMesh;
   myDefaultPnt2d = *thePnt2d1;
@@ -260,6 +272,7 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(UVPtStructVec&     theSideNodes,
   }
 
   myFace       = theFace;
+  myHelper     = NULL;
   myPoints     = theSideNodes;
   myNbPonits   = myPoints.size();
   myNbSegments = myNbPonits + 1;
@@ -312,6 +325,17 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(UVPtStructVec&     theSideNodes,
   myEdgeLength.resize( 1, myLength );
 }
 
+//================================================================================
+/*!
+ * \brief Destructor
+ */
+//================================================================================
+
+StdMeshers_FaceSide::~StdMeshers_FaceSide()
+{
+  delete myHelper; myHelper = NULL;
+}
+
 //================================================================================
 /*
  * Return info on nodes on the side
@@ -326,12 +350,12 @@ const std::vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXCons
     if ( NbEdges() == 0 ) return myPoints;
 
     StdMeshers_FaceSide* me = const_cast< StdMeshers_FaceSide* >( this );
-    SMESH_MesherHelper eHelper( *myProxyMesh->GetMesh() );
-    SMESH_MesherHelper fHelper( *myProxyMesh->GetMesh() );
-    fHelper.SetSubShape( myFace );
-    bool paramOK;
+    bool paramOK = true;
     double eps = 1e-100;
 
+    SMESH_MesherHelper  eHelper( *myProxyMesh->GetMesh() );
+    SMESH_MesherHelper& fHelper = *FaceHelper();
+
     // sort nodes of all edges by putting them into a map
 
     map< double, const SMDS_MeshNode*>            u2node;
@@ -469,25 +493,39 @@ const std::vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXCons
       if ( proxySubMesh[ iE ] ) // copy data from a proxy sub-mesh
       {
         const UVPtStructVec& edgeUVPtStruct = proxySubMesh[iE]->GetUVPtStructVec();
-        std::copy( edgeUVPtStruct.begin(), edgeUVPtStruct.end(), & points[iPt] );
+        UVPtStruct* pointsPtr = & points[iPt];
+        std::copy( edgeUVPtStruct.begin(), edgeUVPtStruct.end(), pointsPtr );
         // check orientation
         double du1 = edgeUVPtStruct.back().param - edgeUVPtStruct[0].param;
         double du2 = myLast[iE] - myFirst[iE];
         if ( du1 * du2 < 0 )
         {
-          std::reverse( & points[iPt], & points[iPt + edgeUVPtStruct.size()]);
+          std::reverse( pointsPtr, pointsPtr + edgeUVPtStruct.size());
           for ( size_t i = 0; i < edgeUVPtStruct.size(); ++i )
-            points[iPt+i].normParam = 1. - points[iPt+i].normParam;
+            pointsPtr[i].normParam = 1. - pointsPtr[i].normParam;
         }
         // update normalized params
         if ( myEdge.size() > 1 ) {
-          for ( size_t i = 0; i < edgeUVPtStruct.size(); ++i, ++iPt )
+          for ( size_t i = 0; i < edgeUVPtStruct.size(); ++i )
           {
-            UVPtStruct & uvPt = points[iPt];
+            UVPtStruct & uvPt = pointsPtr[i];
             uvPt.normParam    = prevNormPar + uvPt.normParam * paramSize;
             uvPt.x = uvPt.y   = uvPt.normParam;
           }
-          --iPt; // to point to the 1st VERTEX of the next EDGE
+          iPt += edgeUVPtStruct.size() - 1; // to point to the 1st VERTEX of the next EDGE
+        }
+        // update UV on a seam EDGE
+        if ( fHelper.IsRealSeam( myEdgeID[ iE ]))
+        {
+          // check if points lye on the EDGE
+          const UVPtStruct& pm = edgeUVPtStruct[ edgeUVPtStruct.size()/2 ];
+          gp_Pnt         pNode = SMESH_TNodeXYZ( pm.node );
+          gp_Pnt         pCurv = myC3dAdaptor[ iE ].Value( pm.param );
+          double           tol = BRep_Tool::Tolerance( myEdge[ iE ]) * 10;
+          bool   isPointOnEdge = ( pNode.SquareDistance( pCurv ) < tol * tol );
+          if ( isPointOnEdge )
+            for ( size_t i = 0; i < edgeUVPtStruct.size(); ++i )
+              pointsPtr[i].SetUV( myC2d[ iE ]->Value( pointsPtr[i].param ).XY() );
         }
       }
       else
@@ -495,7 +533,7 @@ const std::vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXCons
         for ( ; u_node != u2node.end(); ++u_node, ++iPt )
         {
           if ( myNormPar[ iE ]-eps < u_node->first )
-            break; // u_node is at VERTEX of the next EDGE 
+            break; // u_node is at VERTEX of the next EDGE
 
           UVPtStruct & uvPt = points[iPt];
           uvPt.node       = u_node->second;
@@ -604,9 +642,8 @@ std::vector<const SMDS_MeshNode*> StdMeshers_FaceSide::GetOrderedNodes(int theEd
     if ( NbEdges() == 0 ) return resultNodes;
 
     //SMESHDS_Mesh* meshDS = myProxyMesh->GetMeshDS();
-    SMESH_MesherHelper eHelper( *myProxyMesh->GetMesh() );
-    SMESH_MesherHelper fHelper( *myProxyMesh->GetMesh() );
-    fHelper.SetSubShape( myFace );
+    SMESH_MesherHelper  eHelper( *myProxyMesh->GetMesh() );
+    SMESH_MesherHelper& fHelper = * FaceHelper();
     bool paramOK = true;
 
     // Sort nodes of all edges putting them into a map
@@ -1000,8 +1037,7 @@ int StdMeshers_FaceSide::NbPoints(const bool update) const
       }
     }
 
-    SMESH_MesherHelper helper( *myProxyMesh->GetMesh() );
-    helper.SetSubShape( myFace );
+    SMESH_MesherHelper* helper = FaceHelper();
 
     std::set< const SMDS_MeshNode* > vNodes;
     const int nbV = NbEdges() + !IsClosed();
@@ -1009,8 +1045,8 @@ int StdMeshers_FaceSide::NbPoints(const bool update) const
       if ( const SMDS_MeshNode* n = VertexNode( i ))
       {
         if ( !vNodes.insert( n ).second &&
-             ( helper.IsRealSeam  ( n->getshapeId() ) ||
-               helper.IsDegenShape( n->getshapeId() )))
+             ( helper->IsRealSeam  ( n->getshapeId() ) ||
+               helper->IsDegenShape( n->getshapeId() )))
           me->myNbPonits++;
       }
       else
@@ -1227,9 +1263,14 @@ TSideVector StdMeshers_FaceSide::GetFaceWires(const TopoDS_Face&   theFace,
                                               SMESH_Mesh &         theMesh,
                                               const bool           theIgnoreMediumNodes,
                                               TError &             theError,
+                                              SMESH_MesherHelper*  theFaceHelper,
                                               SMESH_ProxyMesh::Ptr theProxyMesh,
                                               const bool           theCheckVertexNodes)
 {
+  SMESH_MesherHelper helper( theMesh );
+  if ( theFaceHelper && theFaceHelper->GetSubShape() == theFace )
+    helper.CopySubShapeInfo( *theFaceHelper );
+
   list< TopoDS_Edge > edges, internalEdges;
   list< int > nbEdgesInWires;
   int nbWires = SMESH_Block::GetOrderedEdges (theFace, edges, nbEdgesInWires);
@@ -1273,7 +1314,7 @@ TSideVector StdMeshers_FaceSide::GetFaceWires(const TopoDS_Face&   theFace,
 
     StdMeshers_FaceSide* wire = new StdMeshers_FaceSide( theFace, wireEdges, &theMesh,
                                                          /*isForward=*/true, theIgnoreMediumNodes,
-                                                         theProxyMesh );
+                                                         &helper, theProxyMesh );
     wires[ iW ] = StdMeshers_FaceSidePtr( wire );
     from = to;
   }
@@ -1281,7 +1322,7 @@ TSideVector StdMeshers_FaceSide::GetFaceWires(const TopoDS_Face&   theFace,
   {
     StdMeshers_FaceSide* wire = new StdMeshers_FaceSide( theFace, internalEdges.back(), &theMesh,
                                                          /*isForward=*/true, theIgnoreMediumNodes,
-                                                         theProxyMesh );
+                                                         &helper, theProxyMesh );
     wires.push_back( StdMeshers_FaceSidePtr( wire ));
     internalEdges.pop_back();
   }
@@ -1337,3 +1378,20 @@ bool StdMeshers_FaceSide::IsClosed() const
 {
   return myEdge.empty() ? false : FirstVertex().IsSame( LastVertex() );
 }
+
+//================================================================================
+/*!
+ * \brief Return a helper initialized with the FACE
+ */
+//================================================================================
+
+SMESH_MesherHelper* StdMeshers_FaceSide::FaceHelper() const
+{
+  StdMeshers_FaceSide* me = const_cast< StdMeshers_FaceSide* >( this );
+  if ( !myHelper && myProxyMesh )
+  {
+    me->myHelper = new SMESH_MesherHelper( *myProxyMesh->GetMesh() );
+    me->myHelper->SetSubShape( myFace );
+  }
+  return me->myHelper;
+}
index 37e025f824eeb94b8200f47280e4e0e6ab20762b..6759f50a920ce7ccbd08c67e1b46c9a9b0c239f5 100644 (file)
 #include <list>
 #include <boost/shared_ptr.hpp>
 
-class SMDS_MeshNode;
-class SMESH_Mesh;
 class Adaptor2d_Curve2d;
 class Adaptor3d_Curve;
 class BRepAdaptor_CompCurve;
-struct SMESH_ComputeError;
+class SMDS_MeshNode;
+class SMESH_Mesh;
+class SMESH_MesherHelper;
 class StdMeshers_FaceSide;
+struct SMESH_ComputeError;
 
 typedef boost::shared_ptr< SMESH_ComputeError >  TError;
 typedef boost::shared_ptr< StdMeshers_FaceSide > StdMeshers_FaceSidePtr;
@@ -65,6 +66,9 @@ typedef std::vector< StdMeshers_FaceSidePtr >    TSideVector;
 class STDMESHERS_EXPORT StdMeshers_FaceSide
 {
 public:
+
+  enum { ALL_EDGES = -1, LAST_EDGE = -1 }; //!< constants
+
   /*!
    * \brief Wrap one edge
    */
@@ -73,6 +77,7 @@ public:
                       SMESH_Mesh*          theMesh,
                       const bool           theIsForward,
                       const bool           theIgnoreMediumNodes,
+                      SMESH_MesherHelper*  theFaceHelper = NULL,
                       SMESH_ProxyMesh::Ptr theProxyMesh = SMESH_ProxyMesh::Ptr());
   /*!
    * \brief Wrap several edges. Edges must be properly ordered and oriented.
@@ -82,6 +87,7 @@ public:
                       SMESH_Mesh*             theMesh,
                       const bool              theIsForward,
                       const bool              theIgnoreMediumNodes,
+                      SMESH_MesherHelper*     theFaceHelper = NULL,
                       SMESH_ProxyMesh::Ptr    theProxyMesh = SMESH_ProxyMesh::Ptr());
   /*!
    * \brief Simulate a side from a vertex using data from other FaceSide
@@ -89,10 +95,10 @@ public:
   StdMeshers_FaceSide(const StdMeshers_FaceSide*  theSide,
                       const SMDS_MeshNode*        theNode,
                       const gp_Pnt2d*             thePnt2d1,
-                      const gp_Pnt2d*             thePnt2d2=NULL,
-                      const Handle(Geom2d_Curve)& theC2d=NULL,
-                      const double                theUFirst=0.,
-                      const double                theULast=1.);
+                      const gp_Pnt2d*             thePnt2d2 = NULL,
+                      const Handle(Geom2d_Curve)& theC2d = NULL,
+                      const double                theUFirst = 0.,
+                      const double                theULast = 1.);
   /*!
    * \brief Create a side from an UVPtStructVec
    */
@@ -101,32 +107,36 @@ public:
                       const TopoDS_Edge& theEdge = TopoDS_Edge(),
                       SMESH_Mesh*        theMesh = 0);
 
+  ~StdMeshers_FaceSide();
+
   // static "consrtuctors"
   static StdMeshers_FaceSidePtr New(const TopoDS_Face&   Face,
                                     const TopoDS_Edge&   Edge,
                                     SMESH_Mesh*          Mesh,
                                     const bool           IsForward,
                                     const bool           IgnoreMediumNodes,
+                                    SMESH_MesherHelper*  FaceHelper = NULL,
                                     SMESH_ProxyMesh::Ptr ProxyMesh = SMESH_ProxyMesh::Ptr())
   { return StdMeshers_FaceSidePtr
-      ( new StdMeshers_FaceSide( Face,Edge,Mesh,IsForward,IgnoreMediumNodes,ProxyMesh ));
+      ( new StdMeshers_FaceSide( Face,Edge,Mesh,IsForward,IgnoreMediumNodes,FaceHelper,ProxyMesh ));
   }
   static StdMeshers_FaceSidePtr New (const TopoDS_Face&      Face,
                                      std::list<TopoDS_Edge>& Edges,
                                      SMESH_Mesh*             Mesh,
                                      const bool              IsForward,
                                      const bool              IgnoreMediumNodes,
+                                     SMESH_MesherHelper*     FaceHelper = NULL,
                                      SMESH_ProxyMesh::Ptr    ProxyMesh = SMESH_ProxyMesh::Ptr())
   { return StdMeshers_FaceSidePtr
-      ( new StdMeshers_FaceSide( Face,Edges,Mesh,IsForward,IgnoreMediumNodes,ProxyMesh ));
+      ( new StdMeshers_FaceSide( Face,Edges,Mesh,IsForward,IgnoreMediumNodes,FaceHelper,ProxyMesh ));
   }
   static StdMeshers_FaceSidePtr New (const StdMeshers_FaceSide*  Side,
                                      const SMDS_MeshNode*        Node,
                                      const gp_Pnt2d*             Pnt2d1,
-                                     const gp_Pnt2d*             Pnt2d2=NULL,
-                                     const Handle(Geom2d_Curve)& C2d=NULL,
-                                     const double                UFirst=0.,
-                                     const double                ULast=1.)
+                                     const gp_Pnt2d*             Pnt2d2 = NULL,
+                                     const Handle(Geom2d_Curve)& C2d = NULL,
+                                     const double                UFirst = 0.,
+                                     const double                ULast = 1.)
   { return StdMeshers_FaceSidePtr
       ( new StdMeshers_FaceSide( Side,Node,Pnt2d1,Pnt2d2,C2d,UFirst,ULast ));
   }
@@ -143,8 +153,9 @@ public:
                                   SMESH_Mesh &         theMesh,
                                   const bool           theIgnoreMediumNodes,
                                   TError &             theError,
+                                  SMESH_MesherHelper*  theFaceHelper = NULL,
                                   SMESH_ProxyMesh::Ptr theProxyMesh = SMESH_ProxyMesh::Ptr(),
-                                  const bool           theCheckVertexNodes=true);
+                                  const bool           theCheckVertexNodes = true);
   /*!
    * \brief Change orientation of side geometry
    */
@@ -183,7 +194,7 @@ public:
     * Missing nodes are allowed only on internal vertices.
     * For a closed side, the 1st point repeats at end
    */
-  const UVPtStructVec& GetUVPtStruct(bool isXConst =0, double constValue =0) const;
+  const UVPtStructVec& GetUVPtStruct( bool isXConst = 0, double constValue = 0 ) const;
   /*!
    * \brief Simulates detailed data on nodes
     * \param isXConst - true if normalized parameter X is constant
@@ -194,10 +205,10 @@ public:
                                           double constValue = 0) const;
   /*!
    * \brief Return nodes in the order they encounter while walking along
-   *  the while side or a specified EDGE.
-    * For a closed side, the 1st point repeats at end
+   *  the while side or a specified EDGE. For a closed side, the 1st point repeats at end.
+   *  \param iE - index of the EDGE. Default is "all EDGEs".
    */
-  std::vector<const SMDS_MeshNode*> GetOrderedNodes(int iE=-1) const;
+  std::vector<const SMDS_MeshNode*> GetOrderedNodes( int iE = ALL_EDGES ) const;
 
   /*!
    * \brief Return nodes of the i-th EDGE.
@@ -262,7 +273,7 @@ public:
   /*!
    * \brief Return last vertex of the i-th edge (count starts from zero)
    */
-  TopoDS_Vertex LastVertex(int i=-1) const;
+  TopoDS_Vertex LastVertex(int i = LAST_EDGE) const;
   /*!
    * \brief Return \c true if the chain of EDGEs is closed
    */
@@ -276,8 +287,6 @@ public:
    */
   inline int EdgeIndex( double U ) const;
 
-  //virtual gp_Pnt Value(double U) const;
-  
   void dump(const char* msg=0) const;
   
   /*!
@@ -314,6 +323,10 @@ public:
    * \brief Return orientation of i-th wrapped edge (count starts from zero)
    */
   inline bool IsReversed(int i) const;
+  /*!
+   * \brief Return a helper initialized with the FACE
+   */
+  SMESH_MesherHelper* FaceHelper() const;
 
 protected:
 
@@ -335,6 +348,7 @@ protected:
   SMESH_ProxyMesh::Ptr              myProxyMesh;
   bool                              myMissingVertexNodes, myIgnoreMediumNodes;
   gp_Pnt2d                          myDefaultPnt2d;
+  SMESH_MesherHelper*               myHelper;
 };
 
 
index 52ed47d013935baff02cfab915bb457e32f1d059..12ae7326fe23332323e1de39f919cb7ae1efed15 100644 (file)
@@ -1025,13 +1025,11 @@ namespace
 StdMeshers_HexaFromSkin_3D::StdMeshers_HexaFromSkin_3D(int hypId, int studyId, SMESH_Gen* gen)
   :SMESH_3D_Algo(hypId, studyId, gen)
 {
-  MESSAGE("StdMeshers_HexaFromSkin_3D::StdMeshers_HexaFromSkin_3D");
   _name = "HexaFromSkin_3D";
 }
 
 StdMeshers_HexaFromSkin_3D::~StdMeshers_HexaFromSkin_3D()
 {
-  MESSAGE("StdMeshers_HexaFromSkin_3D::~StdMeshers_HexaFromSkin_3D");
 }
 
 //================================================================================
index 0dfff42b9b10d1d7b64e933f717c6c130ebfafc7..335a36a788b8cea444ca57efa21dc221dca77efd 100644 (file)
@@ -73,7 +73,6 @@ static bool EvaluatePentahedralMesh(SMESH_Mesh &, const TopoDS_Shape &,
 StdMeshers_Hexa_3D::StdMeshers_Hexa_3D(int hypId, int studyId, SMESH_Gen * gen)
   :SMESH_3D_Algo(hypId, studyId, gen)
 {
-  MESSAGE("StdMeshers_Hexa_3D::StdMeshers_Hexa_3D");
   _name = "Hexa_3D";
   _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);       // 1 bit /shape type
   _requireShape = false;
@@ -88,7 +87,6 @@ StdMeshers_Hexa_3D::StdMeshers_Hexa_3D(int hypId, int studyId, SMESH_Gen * gen)
 
 StdMeshers_Hexa_3D::~StdMeshers_Hexa_3D()
 {
-  MESSAGE("StdMeshers_Hexa_3D::~StdMeshers_Hexa_3D");
 }
 
 //=============================================================================
@@ -382,7 +380,8 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh &         aMesh,
   StdMeshers_Quadrangle_2D quadAlgo( _gen->GetANewId(), GetStudyId(), _gen);
   for ( int i = 0; i < 6; ++i )
   {
-    if ( !( quad[i] = FaceQuadStructPtr( quadAlgo.CheckNbEdges( aMesh, FF( i+1 )))))
+    if ( !( quad[i] = FaceQuadStructPtr( quadAlgo.CheckNbEdges( aMesh, FF( i+1 ),
+                                                                /*considerMesh=*/true))))
       return error( quadAlgo.GetComputeError() );
     if ( quad[i]->side.size() != 4 )
       return error( COMPERR_BAD_SHAPE, "Not a quadrangular box side" );
index 94770855a188ceb31258d51a3662adafb2f75c40..193448010e2ca3ae596a8d70a97d2678e8215c41 100644 (file)
@@ -63,7 +63,6 @@ using namespace std;
 StdMeshers_Import_1D::StdMeshers_Import_1D(int hypId, int studyId, SMESH_Gen * gen)
   :SMESH_1D_Algo(hypId, studyId, gen), _sourceHyp(0)
 {
-  MESSAGE("StdMeshers_Import_1D::StdMeshers_Import_1D");
   _name = "Import_1D";
   _shapeType = (1 << TopAbs_EDGE);
 
@@ -290,7 +289,7 @@ namespace // INTERNAL STUFF
   //--------------------------------------------------------------------------------
   /*!
    * \brief Remove imported mesh and/or groups if needed
-   *  \param sm - submesh loosing Import algo
+   *  \param sm - submesh losing Import algo
    *  \param data - data holding imported groups
    */
   void _Listener::removeSubmesh( SMESH_subMesh* sm, _ListenerData* data )
@@ -312,7 +311,7 @@ namespace // INTERNAL STUFF
   //--------------------------------------------------------------------------------
   /*!
    * \brief Clear _ImportData::_n2n.
-   *        _n2n is usefull within one mesh.Compute() only
+   *        _n2n is useful within one mesh.Compute() only
    */
   void _Listener::clearN2N( SMESH_Mesh* tgtMesh )
   {
index e54a2bf7e038a18bc42c4cc94281b0e885c22795..0d4a369e881b5970018fe4e2d679ea76caefd457 100644 (file)
@@ -98,7 +98,6 @@ namespace
 StdMeshers_Import_1D2D::StdMeshers_Import_1D2D(int hypId, int studyId, SMESH_Gen * gen)
   :SMESH_2D_Algo(hypId, studyId, gen), _sourceHyp(0)
 {
-  MESSAGE("StdMeshers_Import_1D2D::StdMeshers_Import_1D2D");
   _name = "Import_1D2D";
   _shapeType = (1 << TopAbs_FACE);
 
index cac7ccf861dd99975dfea064741464cac3ec55ed..05f0b2fd62e1503d9d1878e190155d364c8ba8c9 100644 (file)
@@ -59,7 +59,6 @@ StdMeshers_LayerDistribution::StdMeshers_LayerDistribution(int hypId, int studyI
 
 StdMeshers_LayerDistribution::~StdMeshers_LayerDistribution()
 {
-  MESSAGE( "StdMeshers_LayerDistribution::~StdMeshers_LayerDistribution" );
 }
 
 //=============================================================================
index 3d77fdabd66091a8404c9fd6d5e089250df8e2ff..664995684537c90450d3f1f3976160a2d17567bf 100644 (file)
@@ -55,5 +55,4 @@ StdMeshers_LayerDistribution2D::StdMeshers_LayerDistribution2D(int hypId,
 
 StdMeshers_LayerDistribution2D::~StdMeshers_LayerDistribution2D()
 {
-  MESSAGE( "StdMeshers_LayerDistribution2D::~StdMeshers_LayerDistribution2D" );
 }
index 4eb038550a5a77e4c06c6c29ea01a305bd662194..972d4b12c04314e0fdf18256625d2a0da1cc0f40 100644 (file)
@@ -203,7 +203,7 @@ bool StdMeshers_MEFISTO_2D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh
   // get all edges of a face
   TError problem;
   TWireVector wires =
-    StdMeshers_FaceSide::GetFaceWires( F, aMesh, skipMediumNodes, problem, proxyMesh );
+    StdMeshers_FaceSide::GetFaceWires( F, aMesh, skipMediumNodes, problem, _helper, proxyMesh );
   int nbWires = wires.size();
   if ( problem && !problem->IsOK() ) return error( problem );
   if ( nbWires == 0 ) return error( "Problem in StdMeshers_FaceSide::GetFaceWires()");
@@ -824,7 +824,7 @@ void StdMeshers_MEFISTO_2D::StoreResult(Z nbst, R2 * uvst, Z nbt, Z * nust,
     bool isDegen = ( _helper->HasDegeneratedEdges() &&
                      ( nn[0] == nn[1] || nn[1] == nn[2] || nn[2] == nn[0] ));
 
-    // It was an attemp to fix a problem of a zero area face whose all nodes
+    // It was an attempt to fix a problem of a zero area face whose all nodes
     // are on one staight EDGE. But omitting this face makes a hole in the mesh :(
     // if ( !isDegen && allNodesAreOld )
     //   isDegen = isDegenTria( nn );
index 4839f9b218b68052f47ed2498b0cda628fc7aacb..7cdb3e488a6b9497011a9f351c037a68e0e284e3 100644 (file)
@@ -64,7 +64,6 @@ StdMeshers_MaxElementVolume::StdMeshers_MaxElementVolume(int hypId, int studyId,
 
 StdMeshers_MaxElementVolume::~StdMeshers_MaxElementVolume()
 {
-  MESSAGE("StdMeshers_MaxElementVolume::~StdMeshers_MaxElementVolume");
 }
 
 //=============================================================================
index 95a764d56352c28324e6f3be1d4bfc00af0657bf..55967940c81e29139fa115333ee4ff1c14c0a74b 100644 (file)
@@ -61,7 +61,6 @@ StdMeshers_NumberOfLayers::StdMeshers_NumberOfLayers(int hypId, int studyId,
 
 StdMeshers_NumberOfLayers::~StdMeshers_NumberOfLayers()
 {
-  MESSAGE( "StdMeshers_NumberOfLayers::~StdMeshers_NumberOfLayers" );
 }
 
 //=============================================================================
index f1f6e9b0361b6cb66e98ea2056e3c51b70fee5b6..74d6b0c9ac112bb052b4cbb478ebda35036e239f 100644 (file)
@@ -55,6 +55,5 @@ StdMeshers_NumberOfLayers2D::StdMeshers_NumberOfLayers2D(int hypId,
 
 StdMeshers_NumberOfLayers2D::~StdMeshers_NumberOfLayers2D()
 {
-  MESSAGE( "StdMeshers_NumberOfLayers2D::~StdMeshers_NumberOfLayers2D" );
 }
 
index 413ec1f7e5ae6eddf72c322eda9ebbbb322e8e28..b6fc7449da78bbdc18c2a44634fed2badc2e620d 100644 (file)
@@ -96,8 +96,6 @@ StdMeshers_Penta_3D::~StdMeshers_Penta_3D()
 bool StdMeshers_Penta_3D::Compute(SMESH_Mesh& aMesh, 
                                   const TopoDS_Shape& aShape)
 {
-  MESSAGE("StdMeshers_Penta_3D::Compute()");
-  //
   bool bOK=false;
   //
   myShape=aShape;
@@ -426,7 +424,7 @@ void StdMeshers_Penta_3D::MakeNodes()
       //   suporting shape ID
       ShapeSupportID(bIsUpperLayer, aBNSSID, aSSID);
       if (!myErrorStatus->IsOK()) {
-        MESSAGE("StdMeshers_Penta_3D::MakeNodes() ");
+        MESSAGE("StdMeshers_Penta_3D::MakeNodes() pb");
         return;
       }
       //
@@ -473,7 +471,7 @@ void StdMeshers_Penta_3D::MakeNodes()
         }
       }
       if (!myErrorStatus->IsOK()) {
-        MESSAGE("StdMeshers_Penta_3D::MakeNodes() ");
+        MESSAGE("StdMeshers_Penta_3D::MakeNodes() err");
         return;
       }
       //
@@ -685,7 +683,7 @@ void StdMeshers_Penta_3D::MakeVolumeMesh()
       aID0 = pNode->GetID();
       aJ[k] = GetIndexOnLayer(aID0);
       if (!myErrorStatus->IsOK()) {
-        MESSAGE("StdMeshers_Penta_3D::MakeVolumeMesh");
+        MESSAGE("StdMeshers_Penta_3D::MakeVolumeMesh pb");
         return;
       }
     }
@@ -820,7 +818,7 @@ void StdMeshers_Penta_3D::MakeMeshOnFxy1()
       aID0 = pNode->GetID();
       aJ = GetIndexOnLayer(aID0);
       if (!myErrorStatus->IsOK()) {
-        MESSAGE("StdMeshers_Penta_3D::MakeMeshOnFxy1() ");
+        MESSAGE("StdMeshers_Penta_3D::MakeMeshOnFxy1() pb");
         return;
       }
       //
@@ -1047,7 +1045,7 @@ void StdMeshers_Penta_3D::MakeBlock()
           if (iCnt>1) {
             // \begin{E.A.}
             // The current algorithm fails if there is more that one
-            // face wich contains triangles ...
+            // face which contains triangles ...
             // In that case, replace return by break to try another
             // method (coded in "if (iCnt != 1) { ... }")
             //
@@ -1224,7 +1222,7 @@ void StdMeshers_Penta_3D::MakeBlock()
   // 1.1 Base vertex V000
   iNbE = aME.Extent();
   if (iNbE!= NB_WALL_FACES ){
-    MESSAGE("StdMeshers_Penta_3D::MakeBlock() ");
+    MESSAGE("StdMeshers_Penta_3D::MakeBlock() err");
     myErrorStatus->myName=7; // too few edges are in base face aFTr
     myErrorStatus->myComment=SMESH_Comment("Not a quadrilateral face #")
       <<pMesh->GetMeshDS()->ShapeToIndex( aFTr )<<": "<<iNbE<<" edges" ;
@@ -1241,7 +1239,7 @@ void StdMeshers_Penta_3D::MakeBlock()
   }
   iNbEV=aMEV.Extent();
   if (iNbEV!=3){
-    MESSAGE("StdMeshers_Penta_3D::MakeBlock() ");
+    MESSAGE("StdMeshers_Penta_3D::MakeBlock() err");
     myErrorStatus->myName=7; // too few edges meet in base vertex 
     myErrorStatus->myComment=SMESH_Comment("3 edges must share vertex #")
       <<pMesh->GetMeshDS()->ShapeToIndex( aV000 )<<" but there are "<<iNbEV<<" edges";
@@ -1268,7 +1266,7 @@ void StdMeshers_Penta_3D::MakeBlock()
   }
   //
   if (!bFound) {
-    MESSAGE("StdMeshers_Penta_3D::MakeBlock() ");
+    MESSAGE("StdMeshers_Penta_3D::MakeBlock() err");
     myErrorStatus->myName=8; // can not find reper V001
     myErrorStatus->myComment=SMESH_Comment("Can't find opposite vertex for vertex #")
       <<pMesh->GetMeshDS()->ShapeToIndex( aV000 );
@@ -1863,8 +1861,6 @@ bool StdMeshers_Penta_3D::Evaluate(SMESH_Mesh& aMesh,
                                    const TopoDS_Shape& aShape,
                                    MapShapeNbElems& aResMap)
 {
-  MESSAGE("StdMeshers_Penta_3D::Evaluate()");
-
   // find face contains only triangles
   vector < SMESH_subMesh * >meshFaces;
   TopTools_SequenceOfShape aFaces;
index 5f3a21e8ad455b3ddf7eb1b6feb2f53a8d98eefe..78c4d62e5728cb26ab06988240050b5b413cd1f3 100644 (file)
@@ -87,10 +87,10 @@ bool StdMeshers_PolygonPerFace_2D::Compute(SMESH_Mesh&         theMesh,
   if ( !proxyMesh )
     return false;
 
-  TError erorr;
+  TError err;
   TSideVector wires = StdMeshers_FaceSide::GetFaceWires(face, theMesh,
                                                         /*skipMediumNodes=*/_quadraticMesh,
-                                                        erorr, proxyMesh,
+                                                        err, &helper, proxyMesh,
                                                         /*checkVertexNodes=*/false);
   if ( wires.size() != 1 )
     return error( COMPERR_BAD_SHAPE, SMESH_Comment("One wire required, not ") << wires.size() );
index b3f34cadb7cbbb3613de17c4de15abd01bee04af..a7dae02832c902abde6f7a23301d04c86bc7c1a8 100644 (file)
@@ -872,7 +872,7 @@ bool StdMeshers_Prism_3D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theSh
 
 
     // TODO. there are other ways to find out the source FACE:
-    // propagation, topological similarity, ect.
+    // propagation, topological similarity, etc...
 
     // simply try to mesh all not meshed SOLIDs
     if ( meshedFaces.empty() )
@@ -1603,7 +1603,7 @@ bool StdMeshers_Prism_3D::computeWalls(const Prism_3D::TPrismTopo& thePrism)
       if ( ! fSM->IsMeshComputed() )
       {
         // Top EDGEs must be projections from the bottom ones
-        // to compute stuctured quad mesh on wall FACEs
+        // to compute structured quad mesh on wall FACEs
         // ---------------------------------------------------
         const TopoDS_Edge& botE = (*quad)->side[ QUAD_BOTTOM_SIDE ].grid->Edge(0);
         const TopoDS_Edge& topE = (*quad)->side[ QUAD_TOP_SIDE    ].grid->Edge(0);
@@ -3258,9 +3258,11 @@ bool StdMeshers_Prism_3D::initPrism(Prism_3D::TPrismTopo& thePrism,
                     "Non-quadrilateral faces are not opposite"));
 
     // check that the found top and bottom FACEs are opposite
+    TopTools_IndexedMapOfShape topEdgesMap( thePrism.myBottomEdges.size() );
+    TopExp::MapShapes( thePrism.myTop, topEdgesMap );
     list< TopoDS_Edge >::iterator edge = thePrism.myBottomEdges.begin();
     for ( ; edge != thePrism.myBottomEdges.end(); ++edge )
-      if ( myHelper->IsSubShape( *edge, thePrism.myTop ))
+      if ( topEdgesMap.Contains( *edge ))
         return toSM( error
                      (notQuadGeomSubMesh.empty() ? COMPERR_BAD_INPUT_MESH : COMPERR_BAD_SHAPE,
                       "Non-quadrilateral faces are not opposite"));
index 06550eb6b6b7aaad436a587c63d8a56b3fa3aefd..c3dd4ec00d02ac9616b8711a1653f7559e3dde6c 100644 (file)
@@ -63,13 +63,12 @@ StdMeshers_ProjectionSource1D::StdMeshers_ProjectionSource1D(int hypId, int stud
 
 StdMeshers_ProjectionSource1D::~StdMeshers_ProjectionSource1D()
 {
-  MESSAGE( "StdMeshers_ProjectionSource1D::~StdMeshers_ProjectionSource1D" );
 }
 
 //=============================================================================
-  /*!
  * Sets source <edge> to take a mesh pattern from
  */
+/*!
+ * Sets source <edge> to take a mesh pattern from
+ */
 //=============================================================================
 
 void StdMeshers_ProjectionSource1D::SetSourceEdge(const TopoDS_Shape& edge)
index d56fe4deabf2cc9bb8f66a8a495a0180a63d4674..0a0f3a81a4793523957d2bc3a14af4f3c2fb540f 100644 (file)
@@ -64,13 +64,12 @@ StdMeshers_ProjectionSource2D::StdMeshers_ProjectionSource2D(int hypId, int stud
 
 StdMeshers_ProjectionSource2D::~StdMeshers_ProjectionSource2D()
 {
-  MESSAGE( "StdMeshers_ProjectionSource2D::~StdMeshers_ProjectionSource2D" );
 }
 
 //=============================================================================
-  /*!
  * Sets a source <face> to take a mesh pattern from
  */
+/*!
+ * Sets a source <face> to take a mesh pattern from
+ */
 //=============================================================================
 
 void StdMeshers_ProjectionSource2D::SetSourceFace(const TopoDS_Shape& Face)
index 0fdfad774529e4f0c866511c0a6a41005d3a2d73..868553480bec4a8d907483909607c0c1a8e00b05 100644 (file)
@@ -62,13 +62,12 @@ StdMeshers_ProjectionSource3D::StdMeshers_ProjectionSource3D(int hypId, int stud
 
 StdMeshers_ProjectionSource3D::~StdMeshers_ProjectionSource3D()
 {
-  MESSAGE( "StdMeshers_ProjectionSource3D::~StdMeshers_ProjectionSource3D" );
 }
 
 //=============================================================================
-  /*!
  * Sets a source <face> to take a mesh pattern from
  */
+/*!
* Sets a source shape to take a mesh pattern from
+ */
 //=============================================================================
 
 void StdMeshers_ProjectionSource3D::SetSource3DShape(const TopoDS_Shape& Shape)
index c13ea9fcba3fab24ea0dd5c91c1f5fe4054913a4..a0164ef01e073439895d4a43bc8d8c62b6ab092f 100644 (file)
@@ -742,8 +742,8 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the
         int nbE = FindFaceAssociation( face1, VV1, face2, VV2, edges1, edges2, isVCloseness );
         if ( !nbE ) RETURN_BAD_RESULT("FindFaceAssociation() failed");
         InsertAssociation( face1, face2, theMap ); // assoc faces
-        MESSAGE("Assoc FACE " << theMesh1->GetMeshDS()->ShapeToIndex( face1 )<<
-                " to "        << theMesh2->GetMeshDS()->ShapeToIndex( face2 ));
+        // MESSAGE("Assoc FACE " << theMesh1->GetMeshDS()->ShapeToIndex( face1 )<<
+        //         " to "        << theMesh2->GetMeshDS()->ShapeToIndex( face2 ));
         if ( nbE == 2 && (edge1.IsSame( edges1.front())) != (edge2.IsSame( edges2.front())))
         {
           reverseEdges( edges2, nbE );
@@ -847,8 +847,8 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the
       }
       // Associate shells
       //
-      int nbFaces1 = SMESH_MesherHelper:: Count( shell1, TopAbs_FACE, 0 );
-      int nbFaces2 = SMESH_MesherHelper:: Count( shell2, TopAbs_FACE, 0 );
+      int nbFaces1 = SMESH_MesherHelper::Count( shell1, TopAbs_FACE, 0 );
+      int nbFaces2 = SMESH_MesherHelper::Count( shell2, TopAbs_FACE, 0 );
       if ( nbFaces1 != nbFaces2 )
         RETURN_BAD_RESULT("Different nb of faces found for shells");
       if ( nbFaces1 > 0 ) {
@@ -954,14 +954,14 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the
             v2e[0].UnBind( V[0] );
             v2e[1].UnBind( V[1] );
             InsertAssociation( e0, e1, theMap );
-            MESSAGE("Assoc edge " << theMesh1->GetMeshDS()->ShapeToIndex( e0 )<<
-                    " to "        << theMesh2->GetMeshDS()->ShapeToIndex( e1 ));
+            // MESSAGE("Assoc edge " << theMesh1->GetMeshDS()->ShapeToIndex( e0 )<<
+            //         " to "        << theMesh2->GetMeshDS()->ShapeToIndex( e1 ));
             V[0] = GetNextVertex( e0, V[0] );
             V[1] = GetNextVertex( e1, V[1] );
             if ( !V[0].IsNull() ) {
               InsertAssociation( V[0], V[1], theMap );
-              MESSAGE("Assoc vertex " << theMesh1->GetMeshDS()->ShapeToIndex( V[0] )<<
-                      " to "          << theMesh2->GetMeshDS()->ShapeToIndex( V[1] ));
+              // MESSAGE("Assoc vertex " << theMesh1->GetMeshDS()->ShapeToIndex( V[0] )<<
+              //         " to "          << theMesh2->GetMeshDS()->ShapeToIndex( V[1] ));
             }
           }
           else if ( nbE0 == 2 )
@@ -988,12 +988,12 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the
             InsertAssociation( e0b, e1b, theMap );
             InsertAssociation( e0n, e1n, theMap );
             InsertAssociation( v0n, v1n, theMap );
-            MESSAGE("Assoc edge " << theMesh1->GetMeshDS()->ShapeToIndex( e0b )<<
-                    " to "        << theMesh2->GetMeshDS()->ShapeToIndex( e1b ));
-            MESSAGE("Assoc edge " << theMesh1->GetMeshDS()->ShapeToIndex( e0n )<<
-                    " to "        << theMesh2->GetMeshDS()->ShapeToIndex( e1n ));
-            MESSAGE("Assoc vertex " << theMesh1->GetMeshDS()->ShapeToIndex( v0n )<<
-                    " to "          << theMesh2->GetMeshDS()->ShapeToIndex( v1n ));
+            // MESSAGE("Assoc edge " << theMesh1->GetMeshDS()->ShapeToIndex( e0b )<<
+            //         " to "        << theMesh2->GetMeshDS()->ShapeToIndex( e1b ));
+            // MESSAGE("Assoc edge " << theMesh1->GetMeshDS()->ShapeToIndex( e0n )<<
+            //         " to "        << theMesh2->GetMeshDS()->ShapeToIndex( e1n ));
+            // MESSAGE("Assoc vertex " << theMesh1->GetMeshDS()->ShapeToIndex( v0n )<<
+            //         " to "          << theMesh2->GetMeshDS()->ShapeToIndex( v1n ));
             v2e[0].UnBind( V[0] );
             v2e[1].UnBind( V[1] );
             V[0] = v0n;
@@ -1342,10 +1342,10 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the
 
   InsertAssociation( VV1[ 0 ], VV2[ 0 ], theMap );
   InsertAssociation( VV1[ 1 ], VV2[ 1 ], theMap );
-  MESSAGE("Initial assoc VERT " << theMesh1->GetMeshDS()->ShapeToIndex( VV1[ 0 ] )<<
-          " to "                << theMesh2->GetMeshDS()->ShapeToIndex( VV2[ 0 ] )<<
-          "\nand         VERT " << theMesh1->GetMeshDS()->ShapeToIndex( VV1[ 1 ] )<<
-          " to "                << theMesh2->GetMeshDS()->ShapeToIndex( VV2[ 1 ] ));
+  // MESSAGE("Initial assoc VERT " << theMesh1->GetMeshDS()->ShapeToIndex( VV1[ 0 ] )<<
+  //         " to "                << theMesh2->GetMeshDS()->ShapeToIndex( VV2[ 0 ] )<<
+  //         "\nand         VERT " << theMesh1->GetMeshDS()->ShapeToIndex( VV1[ 1 ] )<<
+  //         " to "                << theMesh2->GetMeshDS()->ShapeToIndex( VV2[ 1 ] ));
   if ( theShape1.ShapeType() == TopAbs_EDGE ) {
     InsertAssociation( theShape1, theShape2, theMap );
     return true;
@@ -1589,7 +1589,7 @@ int StdMeshers_ProjectionUtils::FindFaceAssociation(const TopoDS_Face&    face1,
           std::advance( edge2End, *nbE2 );
           if ( *nbE1 == *nbE2 && iW2 >= iW1 )
           {
-            // rotate edge2 untill coincidence with edge1 in 2D
+            // rotate edge2 until coincides with edge1 in 2D
             int i = *nbE2;
             bool sameUV = false;
             while ( !( sameUV = sameVertexUV( *edge2Beg, face2, 0, v0f1UV, vTolUV )) && --i > 0 )
@@ -1638,7 +1638,7 @@ int StdMeshers_ProjectionUtils::FindFaceAssociation(const TopoDS_Face&    face1,
               break;
             }
           }
-          // prepare to the next wire loop
+          // prepare for the next wire loop
           edge2Beg = edge2End;
         }
         edge1Beg = edge1End;
@@ -2387,7 +2387,7 @@ std::string StdMeshers_ProjectionUtils::SourceNotComputedError( SMESH_subMesh *
   if ( !sm || sm->GetAlgoState() != SMESH_subMesh::NO_ALGO )
     return usualMessage; // algo is OK, anything else is KO.
 
-  // Try to find a type of all-dimentional algorithm that would compute the
+  // Try to find a type of all-dimensional algorithm that would compute the
   // given sub-mesh if it could be launched before projection
   const TopoDS_Shape shape = sm->GetSubShape();
   const int       shapeDim = SMESH_Gen::GetShapeDim( shape );
@@ -2568,7 +2568,7 @@ namespace StdMeshers_ProjectionUtils
 
   //================================================================================
   /*!
-   * \brief Computes transformation beween two sets of 2D points using
+   * \brief Computes transformation between two sets of 2D points using
    *        a least square approximation
    *
    * See "Surface Mesh Projection For Hexahedral Mesh Generation By Sweeping"
@@ -2651,7 +2651,7 @@ namespace StdMeshers_ProjectionUtils
 
   //================================================================================
   /*!
-   * \brief Computes transformation beween two sets of 3D points using
+   * \brief Computes transformation between two sets of 3D points using
    *        a least square approximation
    *
    * See "Surface Mesh Projection For Hexahedral Mesh Generation By Sweeping"
index dc42ed22f24068e44835f8308ece6c271cdba7e6..ced8febbd93fa0d5909844e70b5a39c901296daa 100644 (file)
@@ -92,7 +92,7 @@ namespace StdMeshers_ProjectionUtils
 
 
   /*!
-   * \brief Finds transformation beween two sets of 2D points using
+   * \brief Finds transformation between two sets of 2D points using
    *        a least square approximation
    */
   class TrsfFinder2D
@@ -112,7 +112,7 @@ namespace StdMeshers_ProjectionUtils
     bool IsIdentity() const { return ( _trsf.Form() == gp_Identity ); }
   };
   /*!
-   * \brief Finds transformation beween two sets of 3D points using
+   * \brief Finds transformation between two sets of 3D points using
    *        a least square approximation
    */
   class TrsfFinder3D
index 523043c6afd2a03e69ac62011f3e92d775b9f0de..c0e53ceebc99d2c577aa1c7872bc7e8b4a7959be 100644 (file)
@@ -71,7 +71,7 @@ namespace
   /*!
    * \brief Structure used to temporary remove EventProparatorToEdges from faceSubMesh
    *  in order to prevent propagation of CLEAN event from FACE to EDGEs during 
-   *  StdMeshers_Projection_1D2D::Compute(). The CLEAN event is emmited by Pattern mapper
+   *  StdMeshers_Projection_1D2D::Compute(). The CLEAN event is emitted by Pattern mapper
    *  and causes removal of faces generated on adjacent FACEs.
    */
   struct UnsetterOfEventProparatorToEdges
@@ -160,8 +160,8 @@ bool StdMeshers_Projection_1D2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape
   }
   TopoDS_Face F = TopoDS::Face( theShape );
   TError err;
-  TSideVector wires = StdMeshers_FaceSide::GetFaceWires( F, theMesh,
-                                                         /*ignoreMediumNodes=*/false, err);
+  TSideVector wires = StdMeshers_FaceSide::GetFaceWires( F, theMesh, /*ignoreMediumNodes=*/false,
+                                                         err, &helper);
   if ( err && !err->IsOK() )
     return error( err );
 
index 2888a362cf23aeda129c0e8ea361791f16d9bb58..eeb20f00981b187845326a9f89555d493339c052 100644 (file)
 using namespace std;
 
 #define RETURN_BAD_RESULT(msg) { MESSAGE(")-: Error: " << msg); return false; }
+#ifdef _DEBUG_
+// enable printing algo + projection shapes while meshing
+//#define PRINT_WHO_COMPUTE_WHAT
+#endif
 
 namespace TAssocTool = StdMeshers_ProjectionUtils;
 //typedef StdMeshers_ProjectionUtils TAssocTool;
@@ -422,6 +426,7 @@ namespace {
                   const TopoDS_Face&                 srcFace,
                   SMESH_Mesh *                       tgtMesh,
                   SMESH_Mesh *                       srcMesh,
+                  SMESH_MesherHelper*                tgtHelper,
                   const TAssocTool::TShapeShapeMap&  shape2ShapeMap,
                   TSideVector&                       srcWires,
                   TSideVector&                       tgtWires,
@@ -432,13 +437,15 @@ namespace {
 
     // get ordered src EDGEs
     TError err;
-    srcWires = StdMeshers_FaceSide::GetFaceWires( srcFace, *srcMesh,/*skipMediumNodes=*/0, err);
+    srcWires = StdMeshers_FaceSide::GetFaceWires( srcFace, *srcMesh,/*skipMediumNodes=*/0, err );
     if (( err && !err->IsOK() ) ||
         ( srcWires.empty() ))
       return err;
-
-    SMESH_MesherHelper srcHelper( *srcMesh );
-    srcHelper.SetSubShape( srcFace );
+#ifdef PRINT_WHO_COMPUTE_WHAT
+    cout << "Projection_2D" <<  " F "
+         << tgtMesh->GetMeshDS()->ShapeToIndex( tgtFace ) << " <- "
+         << srcMesh->GetMeshDS()->ShapeToIndex( srcFace ) << endl;
+#endif
 
     // make corresponding sequence of tgt EDGEs
     tgtWires.resize( srcWires.size() );
@@ -485,13 +492,19 @@ namespace {
 
       tgtWires[ iW ].reset( new StdMeshers_FaceSide( tgtFace, tgtEdges, tgtMesh,
                                                      /*theIsForward = */ true,
-                                                     /*theIgnoreMediumNodes = */false));
+                                                     /*theIgnoreMediumNodes = */false,
+                                                     tgtHelper ));
       StdMeshers_FaceSidePtr tgtWire = tgtWires[ iW ];
 
       // Fill map of src to tgt nodes with nodes on edges
 
       for ( int iE = 0; iE < srcWire->NbEdges(); ++iE )
       {
+#ifdef PRINT_WHO_COMPUTE_WHAT
+        if ( tgtMesh->GetSubMesh( tgtWire->Edge(iE) )->IsEmpty() )
+          cout << "Projection_2D" <<  " E "
+               << tgtWire->EdgeID(iE) << " <- " << srcWire->EdgeID(iE) << endl;
+#endif
         if ( srcMesh->GetSubMesh( srcWire->Edge(iE) )->IsEmpty() ||
              tgtMesh->GetSubMesh( tgtWire->Edge(iE) )->IsEmpty() )
         {
@@ -504,9 +517,11 @@ namespace {
         else
         {
           const bool skipMedium = true, isFwd = true;
-          StdMeshers_FaceSide srcEdge( srcFace, srcWire->Edge(iE), srcMesh, isFwd, skipMedium);
-          StdMeshers_FaceSide tgtEdge( tgtFace, tgtWire->Edge(iE), tgtMesh, isFwd, skipMedium);
-          
+          StdMeshers_FaceSide srcEdge( srcFace, srcWire->Edge(iE),
+                                       srcMesh, isFwd, skipMedium, srcWires[0]->FaceHelper() );
+          StdMeshers_FaceSide tgtEdge( tgtFace, tgtWire->Edge(iE),
+                                       tgtMesh, isFwd, skipMedium, tgtHelper);
+
           vector< const SMDS_MeshNode* > srcNodes = srcEdge.GetOrderedNodes();
           vector< const SMDS_MeshNode* > tgtNodes = tgtEdge.GetOrderedNodes();
 
@@ -540,7 +555,7 @@ namespace {
 
   //================================================================================
   /*!
-   * \brief Preform projection in case if tgtFace.IsPartner( srcFace ) and in case
+   * \brief Perform projection in case if tgtFace.IsPartner( srcFace ) and in case
    * if projection by 3D transformation is possible
    */
   //================================================================================
@@ -553,11 +568,11 @@ namespace {
                       TAssocTool::TNodeNodeMap&          src2tgtNodes,
                       const bool                         is1DComputed)
   {
-    SMESH_Mesh *    tgtMesh = tgtWires[0]->GetMesh();
-    SMESH_Mesh *    srcMesh = srcWires[0]->GetMesh();
-    SMESHDS_Mesh* tgtMeshDS = tgtMesh->GetMeshDS();
-    SMESHDS_Mesh* srcMeshDS = srcMesh->GetMeshDS();
-    SMESH_MesherHelper helper( *tgtMesh );
+    SMESH_Mesh *       tgtMesh = tgtWires[0]->GetMesh();
+    SMESH_Mesh *       srcMesh = srcWires[0]->GetMesh();
+    SMESHDS_Mesh*    tgtMeshDS = tgtMesh->GetMeshDS();
+    SMESHDS_Mesh*    srcMeshDS = srcMesh->GetMeshDS();
+    SMESH_MesherHelper* helper = tgtWires[0]->FaceHelper();
 
     const double tol = 1.e-7 * srcMeshDS->getMaxDim();
 
@@ -634,7 +649,7 @@ namespace {
                          0.123 * ( srcSurf.FirstVParameter() + srcSurf.LastVParameter() ));
         gp_Pnt tgtTrsfP = trsf.Transform( srcP );
         TopLoc_Location loc;
-        GeomAPI_ProjectPointOnSurf& proj = helper.GetProjector( tgtFace, loc, 0.1*tol );
+        GeomAPI_ProjectPointOnSurf& proj = helper->GetProjector( tgtFace, loc, 0.1*tol );
         if ( !loc.IsIdentity() )
           tgtTrsfP.Transform( loc.Transformation().Inverted() );
         proj.Perform( tgtTrsfP );
@@ -649,16 +664,14 @@ namespace {
     // Make new faces
 
     // prepare the helper to adding quadratic elements if necessary
-    //helper.SetSubShape( tgtFace );
-    helper.IsQuadraticSubMesh( tgtFace );
+    helper->IsQuadraticSubMesh( tgtFace );
 
     SMESHDS_SubMesh* srcSubDS = srcMeshDS->MeshElements( srcFace );
     if ( !is1DComputed && srcSubDS->NbElements() )
-      helper.SetIsQuadratic( srcSubDS->GetElements()->next()->IsQuadratic() );
+      helper->SetIsQuadratic( srcSubDS->GetElements()->next()->IsQuadratic() );
 
-    SMESH_MesherHelper srcHelper( *srcMesh );
-    srcHelper.SetSubShape( srcFace );
-    SMESH_MesherHelper edgeHelper( *tgtMesh );
+    SMESH_MesherHelper* srcHelper = srcWires[0]->FaceHelper();
+    SMESH_MesherHelper  edgeHelper( *tgtMesh );
     edgeHelper.ToFixNodeParameters( true );
 
     const SMDS_MeshNode* nullNode = 0;
@@ -677,7 +690,7 @@ namespace {
       const SMDS_MeshElement* elem = elemIt->next();
       const int nbN = elem->NbCornerNodes(); 
       tgtNodes.resize( nbN );
-      helper.SetElementsOnShape( false );
+      helper->SetElementsOnShape( false );
       for ( int i = 0; i < nbN; ++i ) // loop on nodes of the source element
       {
         const SMDS_MeshNode* srcNode = elem->GetNode(i);
@@ -686,21 +699,21 @@ namespace {
         {
           // create a new node
           gp_Pnt tgtP = trsf.Transform( SMESH_TNodeXYZ( srcNode ));
-          SMDS_MeshNode* n = helper.AddNode( tgtP.X(), tgtP.Y(), tgtP.Z() );
+          SMDS_MeshNode* n = helper->AddNode( tgtP.X(), tgtP.Y(), tgtP.Z() );
           srcN_tgtN->second = n;
           switch ( srcNode->GetPosition()->GetTypeOfPosition() )
           {
           case SMDS_TOP_FACE:
           {
-            gp_Pnt2d srcUV = srcHelper.GetNodeUV( srcFace, srcNode );
-            tgtMeshDS->SetNodeOnFace( n, helper.GetSubShapeID(), srcUV.X(), srcUV.Y() );
+            gp_Pnt2d srcUV = srcHelper->GetNodeUV( srcFace, srcNode );
+            tgtMeshDS->SetNodeOnFace( n, helper->GetSubShapeID(), srcUV.X(), srcUV.Y() );
             break;
           }
           case SMDS_TOP_EDGE:
           {
             const TopoDS_Edge& srcE = TopoDS::Edge( srcMeshDS->IndexToShape( srcNode->getshapeId()));
             const TopoDS_Edge& tgtE = TopoDS::Edge( shape2ShapeMap( srcE, /*isSrc=*/true ));
-            double srcU = srcHelper.GetNodeU( srcE, srcNode );
+            double srcU = srcHelper->GetNodeU( srcE, srcNode );
             tgtMeshDS->SetNodeOnEdge( n, tgtE, srcU );
             if ( !tgtFace.IsPartner( srcFace ))
             {
@@ -736,14 +749,14 @@ namespace {
         tgtNodes[i] = srcN_tgtN->second;
       }
       // create a new face
-      helper.SetElementsOnShape( true );
+      helper->SetElementsOnShape( true );
       switch ( nbN )
       {
-      case 3: helper.AddFace(tgtNodes[0], tgtNodes[tri1], tgtNodes[tri2]); break;
-      case 4: helper.AddFace(tgtNodes[0], tgtNodes[quad1], tgtNodes[2], tgtNodes[quad3]); break;
+      case 3: helper->AddFace(tgtNodes[0], tgtNodes[tri1], tgtNodes[tri2]); break;
+      case 4: helper->AddFace(tgtNodes[0], tgtNodes[quad1], tgtNodes[2], tgtNodes[quad3]); break;
       default:
         if ( isReverse ) std::reverse( tgtNodes.begin(), tgtNodes.end() );
-        helper.AddPolygonalFace( tgtNodes );
+        helper->AddPolygonalFace( tgtNodes );
       }
     }
 
@@ -751,7 +764,7 @@ namespace {
 
     if ( !tgtFace.IsPartner( srcFace ) )
     {
-      helper.ToFixNodeParameters( true );
+      helper->ToFixNodeParameters( true );
 
       int nbOkPos = 0;
       const double tol2d = 1e-12;
@@ -764,8 +777,8 @@ namespace {
         case SMDS_TOP_FACE:
         {
           if ( nbOkPos > 10 ) break;
-          gp_XY uv = helper.GetNodeUV( tgtFace, n ), uvBis = uv;
-          if (( helper.CheckNodeUV( tgtFace, n, uv, tol )) &&
+          gp_XY uv = helper->GetNodeUV( tgtFace, n ), uvBis = uv;
+          if (( helper->CheckNodeUV( tgtFace, n, uv, tol )) &&
               (( uv - uvBis ).SquareModulus() < tol2d ))
             ++nbOkPos;
           else
@@ -790,7 +803,7 @@ namespace {
 
   //================================================================================
   /*!
-   * \brief Preform projection in case if the faces are similar in 2D space
+   * \brief Perform projection in case if the faces are similar in 2D space
    */
   //================================================================================
 
@@ -885,18 +898,16 @@ namespace {
 
     SMESHDS_SubMesh* srcSubDS = srcMesh->GetMeshDS()->MeshElements( srcFace );
 
-    SMESH_MesherHelper helper( *tgtMesh );
-    helper.SetSubShape( tgtFace );
+    SMESH_MesherHelper* helper = tgtWires[0]->FaceHelper();
     if ( is1DComputed )
-      helper.IsQuadraticSubMesh( tgtFace );
+      helper->IsQuadraticSubMesh( tgtFace );
     else
-      helper.SetIsQuadratic( srcSubDS->GetElements()->next()->IsQuadratic() );
-    helper.SetElementsOnShape( true );
+      helper->SetIsQuadratic( srcSubDS->GetElements()->next()->IsQuadratic() );
+    helper->SetElementsOnShape( true );
     Handle(Geom_Surface) tgtSurface = BRep_Tool::Surface( tgtFace );
     SMESHDS_Mesh* tgtMeshDS = tgtMesh->GetMeshDS();
 
-    SMESH_MesherHelper srcHelper( *srcMesh );
-    srcHelper.SetSubShape( srcFace );
+    SMESH_MesherHelper* srcHelper = srcWires[0]->FaceHelper();
 
     const SMDS_MeshNode* nullNode = 0;
     TAssocTool::TNodeNodeMap::iterator srcN_tgtN;
@@ -907,7 +918,7 @@ namespace {
     while ( elemIt->more() ) // loop on all mesh faces on srcFace
     {
       const SMDS_MeshElement* elem = elemIt->next();
-      const int nbN = elem->NbCornerNodes(); 
+      const int nbN = elem->NbCornerNodes();
       tgtNodes.resize( nbN );
       for ( int i = 0; i < nbN; ++i ) // loop on nodes of the source element
       {
@@ -916,27 +927,27 @@ namespace {
         if ( srcN_tgtN->second == nullNode )
         {
           // create a new node
-          gp_Pnt2d srcUV = srcHelper.GetNodeUV( srcFace, srcNode,
-                                                elem->GetNode( helper.WrapIndex(i+1,nbN)), &uvOK);
+          gp_Pnt2d srcUV = srcHelper->GetNodeUV( srcFace, srcNode,
+                                                 elem->GetNode( helper->WrapIndex(i+1,nbN)), &uvOK);
           gp_Pnt2d   tgtUV = trsf.Transform( srcUV );
           gp_Pnt      tgtP = tgtSurface->Value( tgtUV.X(), tgtUV.Y() );
           SMDS_MeshNode* n = tgtMeshDS->AddNode( tgtP.X(), tgtP.Y(), tgtP.Z() );
           switch ( srcNode->GetPosition()->GetTypeOfPosition() )
           {
           case SMDS_TOP_FACE: {
-            tgtMeshDS->SetNodeOnFace( n, helper.GetSubShapeID(), tgtUV.X(), tgtUV.Y() );
+            tgtMeshDS->SetNodeOnFace( n, helper->GetSubShapeID(), tgtUV.X(), tgtUV.Y() );
             break;
           }
           case SMDS_TOP_EDGE: {
-            TopoDS_Shape srcEdge = srcHelper.GetSubShapeByNode( srcNode, srcHelper.GetMeshDS() );
+            TopoDS_Shape srcEdge = srcHelper->GetSubShapeByNode( srcNode, srcHelper->GetMeshDS() );
             TopoDS_Edge  tgtEdge = TopoDS::Edge( shape2ShapeMap( srcEdge, /*isSrc=*/true ));
             double U = Precision::Infinite();
-            helper.CheckNodeU( tgtEdge, n, U, Precision::PConfusion());
+            helper->CheckNodeU( tgtEdge, n, U, Precision::PConfusion());
             tgtMeshDS->SetNodeOnEdge( n, TopoDS::Edge( tgtEdge ), U );
             break;
           }
           case SMDS_TOP_VERTEX: {
-            TopoDS_Shape srcV = srcHelper.GetSubShapeByNode( srcNode, srcHelper.GetMeshDS() );
+            TopoDS_Shape srcV = srcHelper->GetSubShapeByNode( srcNode, srcHelper->GetMeshDS() );
             TopoDS_Shape tgtV = shape2ShapeMap( srcV, /*isSrc=*/true );
             tgtMeshDS->SetNodeOnVertex( n, TopoDS::Vertex( tgtV ));
             break;
@@ -950,8 +961,8 @@ namespace {
       // create a new face (with reversed orientation)
       switch ( nbN )
       {
-      case 3: helper.AddFace(tgtNodes[0], tgtNodes[2], tgtNodes[1]); break;
-      case 4: helper.AddFace(tgtNodes[0], tgtNodes[3], tgtNodes[2], tgtNodes[1]); break;
+      case 3: helper->AddFace(tgtNodes[0], tgtNodes[2], tgtNodes[1]); break;
+      case 4: helper->AddFace(tgtNodes[0], tgtNodes[3], tgtNodes[2], tgtNodes[1]); break;
       }
     }  // loop on all mesh faces on srcFace
 
@@ -960,7 +971,7 @@ namespace {
 
   //================================================================================
   /*!
-   * \brief Preform projection in case of quadrilateral faces
+   * \brief Perform projection in case of quadrilateral faces
    */
   //================================================================================
 
@@ -1057,7 +1068,7 @@ namespace {
     //       }
     //       else 
     //       {
-    //         // find XY of src node withing the quadrilateral srcFace
+    //         // find XY of src node within the quadrilateral srcFace
     //         if ( !block.ComputeParameters( SMESH_TNodeXYZ( srcNode ),
     //                                        tgtNodeOrXY.second, srcFaceBID ))
     //           return false;
@@ -1069,8 +1080,7 @@ namespace {
 
     // // as all XY are computed, create tgt nodes and faces
 
-    // SMESH_MesherHelper helper( *tgtMesh );
-    // helper.SetSubShape( tgtFace );
+    // SMESH_MesherHelper helper = *tgtWires[0]->FaceHelper();
     // if ( is1DComputed )
     //   helper.IsQuadraticSubMesh( tgtFace );
     // else
@@ -1078,8 +1088,7 @@ namespace {
     // helper.SetElementsOnShape( true );
     // Handle(Geom_Surface) tgtSurface = BRep_Tool::Surface( tgtFace );
 
-    // SMESH_MesherHelper srcHelper( *srcMesh );
-    // srcHelper.SetSubShape( srcFace );
+    // SMESH_MesherHelper srcHelper = *srcWires[0]->FaceHelper();
 
     // vector< const SMDS_MeshNode* > tgtNodes;
     // gp_XY uv;
@@ -1528,7 +1537,7 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
   // get ordered src and tgt EDGEs
   TSideVector srcWires, tgtWires;
   bool is1DComputed = false; // if any tgt EDGE is meshed
-  TError err = getWires( tgtFace, srcFace, tgtMesh, srcMesh,
+  TError err = getWires( tgtFace, srcFace, tgtMesh, srcMesh, &helper,
                          shape2ShapeMap, srcWires, tgtWires, _src2tgtNodes, is1DComputed );
   if ( err && !err->IsOK() )
     return error( err );
@@ -1922,7 +1931,7 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
     // boundary, also bad face can be created if EDGEs already discretized
     // --> fix bad faces by smoothing
     // ----------------------------------------------------------------
-    if ( helper.IsDistorted2D( tgtSubMesh, /*checkUV=*/false ))
+    if ( helper.IsDistorted2D( tgtSubMesh, /*checkUV=*/false, &helper ))
     {
       morph( helper, tgtFace, srcFace, tgtWires, srcWires, _src2tgtNodes );
 
index 76f3a31f2314ddb9af6ec18d6e472af9e7bdf6c7..a4d3ffbdd04d533ae97ba9083fa8df465e3bbfc3 100644 (file)
@@ -1072,7 +1072,7 @@ namespace
       if ( ! ( theDivPoints[0]._iEdge     == 0 &&
                theDivPoints[0]._edgeParam == 0. )) // recursive call
       {
-        SMESH_MAT2d::BranchPoint brp( &branch, 0, 0 );
+        SMESH_MAT2d::BranchPoint brp( &branch, 0, 0. );
         vector< SMESH_MAT2d::BranchPoint > divPoint( 1, brp );
         vector< std::size_t > edgeIDs1(2), edgeIDs2(2);
         edgeIDs1[0] = theEdgeIDs1.back();
@@ -1084,9 +1084,10 @@ namespace
       }
     }
 
-    // project theDivPoints
+    // project theDivPoints and keep projections to merge
 
     TMAPar2NPoints::iterator u2NP;
+    vector< TMAPar2NPoints::iterator > projToMerge;
     for ( size_t i = 0; i < theDivPoints.size(); ++i )
     {
       if ( !branch.getParameter( theDivPoints[i], uMA ))
@@ -1129,9 +1130,18 @@ namespace
       if ( isVertex[0] && isVertex[1] )
         continue;
 
-      bool isOppComputed = theIsEdgeComputed[ np[ iNode ]._edgeInd ];
-      if ( !isOppComputed )
-        continue;
+      // bool isOppComputed = theIsEdgeComputed[ np[ iNode ]._edgeInd ];
+      // if ( isOppComputed )
+        projToMerge.push_back( u2NP );
+    }
+
+    // merge projections
+
+    for ( size_t i = 0; i < projToMerge.size(); ++i )
+    {
+      u2NP = projToMerge[i];
+      const size_t iVert = get( u2NP->second, 0 )._node ? 0 : 1; // side with a VERTEX
+      const size_t iNode = 1 - iVert;                            // opposite (meshed?) side
 
       // a VERTEX is projected on a meshed EDGE; there are two options:
       // 1) a projected point is joined with a closet node if a strip between this and neighbor
@@ -1145,10 +1155,6 @@ namespace
       bool isShortPrev[2], isShortNext[2], isPrevCloser[2];
       TMAPar2NPoints::iterator u2NPPrev = u2NP, u2NPNext = u2NP;
       --u2NPPrev; ++u2NPNext;
-      // bool hasPrev = ( u2NP     != thePointsOnE.begin() );
-      // bool hasNext = ( u2NPNext != thePointsOnE.end() );
-      // if ( !hasPrev ) u2NPPrev = u2NP0;
-      // if ( !hasNext ) u2NPNext = u2NP1;
       for ( int iS = 0; iS < 2; ++iS ) // side with Vertex and side with Nodes
       {
         NodePoint np     = get( u2NP->second,     iS );
@@ -1161,11 +1167,9 @@ namespace
         double  distNext = p.Distance( pNext );
         double         r = distPrev / ( distPrev + distNext );
         isShortPrev [iS] = ( r < rShort );
-        isShortNext [iS] = (( 1 - r ) > ( 1 - rShort ));
-        isPrevCloser[iS] = (( r < 0.5 ) && ( u2NPPrev->first > 0 ));
+        isShortNext [iS] = (( 1 - r ) < rShort );
+        isPrevCloser[iS] = (( r < 0.5 ) && ( theSinuFace.IsRing() || u2NPPrev->first > 0 ));
       }
-      // if ( !hasPrev ) isShortPrev[0] = isShortPrev[1] = false;
-      // if ( !hasNext ) isShortNext[0] = isShortNext[1] = false;
 
       TMAPar2NPoints::iterator u2NPClose;
 
@@ -1174,17 +1178,18 @@ namespace
       {
         u2NPClose = isPrevCloser[0] ? u2NPPrev : u2NPNext;
         NodePoint& npProj  = get( u2NP->second,      iNode ); // NP of VERTEX projection
+        NodePoint& npVert  = get( u2NP->second,      iVert ); // NP of VERTEX
         NodePoint npCloseN = get( u2NPClose->second, iNode ); // NP close to npProj
-        NodePoint npCloseV = get( u2NPClose->second, iVert ); // NP close to VERTEX
-        if ( !npCloseV._node )
+        NodePoint npCloseV = get( u2NPClose->second, iVert ); // NP close to npVert
+        if ( !npCloseV._node || npCloseV._node == npVert._node )
         {
           npProj = npCloseN;
-          thePointsOnE.erase( isPrevCloser[0] ? u2NPPrev : u2NPNext );
+          thePointsOnE.erase( u2NPClose );
           continue;
         }
         else
         {
-          // can't remove the neighbor projection as it is also from VERTEX, -> option 1)
+          // can't remove the neighbor projection as it is also from VERTEX -> option 1)
         }
       }
       // else: option 1) - wide enough -> "duplicate" existing node
@@ -1379,10 +1384,13 @@ namespace
                    const SMESH_MAT2d::MedialAxis& theMA,
                    TMAPar2NPoints &               thePointsOnE )
   {
+    SMESH_Mesh*     mesh = theHelper.GetMesh();
+    SMESHDS_Mesh* meshDS = theHelper.GetMeshDS();
+
     list< TopoDS_Edge > ee1( theSinuFace._sinuSide [0].begin(), theSinuFace._sinuSide [0].end() );
     list< TopoDS_Edge > ee2( theSinuFace._sinuSide [1].begin(), theSinuFace._sinuSide [1].end() );
-    StdMeshers_FaceSide sideOut( theSinuFace.Face(), ee1, theHelper.GetMesh(), true, true );
-    StdMeshers_FaceSide sideIn ( theSinuFace.Face(), ee2, theHelper.GetMesh(), true, true );
+    StdMeshers_FaceSide sideOut( theSinuFace.Face(), ee1, mesh, true, true, &theHelper );
+    StdMeshers_FaceSide sideIn ( theSinuFace.Face(), ee2, mesh, true, true, &theHelper );
     const UVPtStructVec& uvsOut = sideOut.GetUVPtStruct();
     const UVPtStructVec& uvsIn  = sideIn.GetUVPtStruct();
     // if ( uvs1.size() != uvs2.size() )
@@ -1391,7 +1399,6 @@ namespace
     const SMESH_MAT2d::Branch& branch = *theMA.getBranch(0);
     SMESH_MAT2d::BoundaryPoint bp[2];
     SMESH_MAT2d::BranchPoint   brp;
-    SMESHDS_Mesh*              meshDS = theHelper.GetMeshDS();
 
     map< double, const SMDS_MeshNode* > nodeParams; // params of existing nodes
     map< double, const SMDS_MeshNode* >::iterator u2n;
@@ -1505,7 +1512,8 @@ namespace
     for ( int i = 0; i < 4; ++i )
     {
       theFace._quad->side[i] = StdMeshers_FaceSide::New( face, side[i], mesh, i < QUAD_TOP_SIDE,
-                                                         /*skipMediumNodes=*/true, proxyMesh );
+                                                         /*skipMediumNodes=*/true,
+                                                         &theHelper, proxyMesh );
     }
 
     if ( theFace.IsRing() )
@@ -1887,7 +1895,7 @@ namespace
           continue;
 
         StdMeshers_FaceSide side( face, theSinuEdges[i], mesh,
-                                  /*isFwd=*/true, /*skipMediumNodes=*/true );
+                                  /*isFwd=*/true, /*skipMediumNodes=*/true, &theHelper );
         vector<const SMDS_MeshNode*> nodes = side.GetOrderedNodes();
         for ( size_t in = 1; in < nodes.size(); ++in )
         {
index 9259d2e1da78a081c93fa908e9e84da2e1154cd5..2e4ea50b8fb3effa05cc7ff8904de0bbbf3d0df4 100644 (file)
@@ -485,9 +485,6 @@ static bool HasIntersection3(const gp_Pnt& P, const gp_Pnt& PC, gp_Pnt& Pint,
   gp_XYZ vert1 = P2.XYZ();
   gp_XYZ vert2 = P3.XYZ();
 
-  /* calculate distance from vert0 to ray origin */
-  gp_XYZ  tvec = orig - vert0;
-
   gp_XYZ edge1 = vert1 - vert0;
   gp_XYZ edge2 = vert2 - vert0;
 
@@ -497,9 +494,13 @@ static bool HasIntersection3(const gp_Pnt& P, const gp_Pnt& PC, gp_Pnt& Pint,
   /* if determinant is near zero, ray lies in plane of triangle */
   double det = edge1 * pvec;
 
-  if (det > -EPSILON && det < EPSILON)
+  const double ANGL_EPSILON = 1e-12;
+  if ( det > -ANGL_EPSILON && det < ANGL_EPSILON )
     return false;
 
+  /* calculate distance from vert0 to ray origin */
+  gp_XYZ  tvec = orig - vert0;
+
   /* calculate U parameter and test bounds */
   double u = ( tvec * pvec ) / det;
   //if (u < 0.0 || u > 1.0)
index d9b807c248ff98d8417fc7149aab1bd74a2a011a..ef472e49aedb00e20e3801668428cf71439ef8d4 100644 (file)
@@ -94,7 +94,6 @@ StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D (int hypId, int studyId,
     myQuadType(QUAD_STANDARD),
     myHelper( NULL )
 {
-  MESSAGE("StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D");
   _name = "Quadrangle_2D";
   _shapeType = (1 << TopAbs_FACE);
   _compatibleHypothesis.push_back("QuadrangleParams");
@@ -111,7 +110,6 @@ StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D (int hypId, int studyId,
 
 StdMeshers_Quadrangle_2D::~StdMeshers_Quadrangle_2D()
 {
-  MESSAGE("StdMeshers_Quadrangle_2D::~StdMeshers_Quadrangle_2D");
 }
 
 //=============================================================================
@@ -232,7 +230,7 @@ bool StdMeshers_Quadrangle_2D::Compute (SMESH_Mesh&         aMesh,
   myNeedSmooth = false;
   myCheckOri   = false;
 
-  FaceQuadStruct::Ptr quad = CheckNbEdges( aMesh, F, /*considerMesh=*/true );
+  FaceQuadStruct::Ptr quad = CheckNbEdges( aMesh, F, /*considerMesh=*/true, myHelper );
   if (!quad)
     return false;
   myQuadList.clear();
@@ -493,7 +491,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
   int nbright = (int) uv_e1.size();
   int nbleft  = (int) uv_e3.size();
 
-  if (quad->nbNodeOut(0) && nbvertic == 2) // this should not occure
+  if (quad->nbNodeOut(0) && nbvertic == 2) // this should not occur
   {
     // Down edge is out
     // 
@@ -723,7 +721,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
   }
 
   // right or left boundary quadrangles
-  if (quad->nbNodeOut( QUAD_RIGHT_SIDE ) && nbhoriz == 2) // this should not occure
+  if (quad->nbNodeOut( QUAD_RIGHT_SIDE ) && nbhoriz == 2) // this should not occur
   {
     int g = 0; // last processed node in the grid
     int stop = nbright - 1;
@@ -739,7 +737,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
       // find node c in the grid, nearest to the b
       c = 0;
       int near = g;
-      if (i == stop - 1) { // up bondary reached
+      if (i == stop - 1) { // up boundary reached
         c = quad->uv_grid[nbhoriz*(jup + 1) - 2].node;
         near = jup;
       } else {
@@ -839,7 +837,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
 
         // find node c in the grid, nearest to the b
         int near = g;
-        if (i == stop + 1) { // down bondary reached
+        if (i == stop + 1) { // down boundary reached
           c = quad->uv_grid[nbhoriz*jlow + 1].node;
           near = jlow;
         }
@@ -1054,7 +1052,8 @@ static bool twoEdgesMeatAtVertex(const TopoDS_Edge& e1,
 
 FaceQuadStruct::Ptr StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &         aMesh,
                                                            const TopoDS_Shape & aShape,
-                                                           const bool           considerMesh)
+                                                           const bool           considerMesh,
+                                                           SMESH_MesherHelper*  aFaceHelper)
 {
   if ( !myQuadList.empty() && myQuadList.front()->face.IsSame( aShape ))
     return myQuadList.front();
@@ -1073,6 +1072,7 @@ FaceQuadStruct::Ptr StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &
   }
 
   // find corner vertices of the quad
+  myHelper = ( aFaceHelper && aFaceHelper->GetSubShape() == aShape ) ? aFaceHelper : NULL;
   vector<TopoDS_Vertex> corners;
   int nbDegenEdges, nbSides = getCorners( F, aMesh, edges, corners, nbDegenEdges, considerMesh );
   if ( nbSides == 0 )
@@ -1098,7 +1098,7 @@ FaceQuadStruct::Ptr StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &
           sideEdges.push_back( *edgeIt++ );
       if ( !sideEdges.empty() )
         quad->side.push_back( StdMeshers_FaceSide::New(F, sideEdges, &aMesh, iSide < QUAD_TOP_SIDE,
-                                                       ignoreMediumNodes, myProxyMesh));
+                                                       ignoreMediumNodes, myHelper, myProxyMesh));
       else
         --iSide;
     }
@@ -1152,7 +1152,7 @@ FaceQuadStruct::Ptr StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &
       {
         quad->side.push_back
           ( StdMeshers_FaceSide::New( F, sideEdges, &aMesh, iSide < QUAD_TOP_SIDE,
-                                      ignoreMediumNodes, myProxyMesh ));
+                                      ignoreMediumNodes, myHelper, myProxyMesh ));
         ++iSide;
       }
       if ( quad->side.size() == 4 )
@@ -1576,7 +1576,7 @@ bool StdMeshers_Quadrangle_2D::setNormalizedGrid (FaceQuadStruct::Ptr quad)
 
 //=======================================================================
 //function : ShiftQuad
-//purpose  : auxilary function for computeQuadPref
+//purpose  : auxiliary function for computeQuadPref
 //=======================================================================
 
 void StdMeshers_Quadrangle_2D::shiftQuad(FaceQuadStruct::Ptr& quad, const int num )
@@ -1660,7 +1660,7 @@ void FaceQuadStruct::shift( size_t nb, bool ori, bool keepGrid )
 
 //=======================================================================
 //function : calcUV
-//purpose  : auxilary function for computeQuadPref
+//purpose  : auxiliary function for computeQuadPref
 //=======================================================================
 
 static gp_UV calcUV(double x0, double x1, double y0, double y1,
@@ -1683,7 +1683,7 @@ static gp_UV calcUV(double x0, double x1, double y0, double y1,
 
 //=======================================================================
 //function : calcUV2
-//purpose  : auxilary function for computeQuadPref
+//purpose  : auxiliary function for computeQuadPref
 //=======================================================================
 
 static gp_UV calcUV2(double x, double y,
@@ -2160,7 +2160,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
   }
 
   int nnn = Min(nr,nl);
-  // auxilary sequence of XY for creation nodes
+  // auxiliary sequence of XY for creation nodes
   // in the bottom part of central domain
   // Length of UVL and UVR must be == nbv-nnn
   TColgp_SequenceOfXY UVL, UVR, UVT;
@@ -2518,7 +2518,7 @@ bool StdMeshers_Quadrangle_2D::evaluateQuadPref(SMESH_Mesh &        aMesh,
                                                 MapShapeNbElems&    aResMap,
                                                 bool                IsQuadratic)
 {
-  // Auxilary key in order to keep old variant
+  // Auxiliary key in order to keep old variant
   // of meshing after implementation new variant
   // for bug 0016220 from Mantis.
   bool OldVersion = false;
@@ -3027,7 +3027,7 @@ bool StdMeshers_Quadrangle_2D::computeReduced (SMESH_Mesh &        aMesh,
     gp_XY a3 (uv_et.front().u, uv_et.front().v);
 
     int nnn = Min(nr,nl);
-    // auxilary sequence of XY for creation of nodes
+    // auxiliary sequence of XY for creation of nodes
     // in the bottom part of central domain
     // it's length must be == nbv-nnn-1
     TColgp_SequenceOfXY UVL;
@@ -3988,7 +3988,7 @@ void StdMeshers_Quadrangle_2D::smooth (FaceQuadStruct::Ptr quad)
         }
       }
 
-  // define refernce orientation in 2D
+  // define reference orientation in 2D
   TNo2SmooNoMap::iterator n2sn = smooNoMap.begin();
   for ( ; n2sn != smooNoMap.end(); ++n2sn )
     if ( !n2sn->second._triangles.empty() )
@@ -4112,7 +4112,7 @@ bool StdMeshers_Quadrangle_2D::check()
   {
     TError err;
     TSideVector wireVec =
-      StdMeshers_FaceSide::GetFaceWires( geomFace, *myHelper->GetMesh(), true, err );
+      StdMeshers_FaceSide::GetFaceWires( geomFace, *myHelper->GetMesh(), true, err, myHelper );
     StdMeshers_FaceSidePtr wire = wireVec[0];
 
     // find a right angle VERTEX
@@ -4253,7 +4253,10 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face&          theFace,
   theNbDegenEdges = 0;
 
   SMESH_MesherHelper helper( theMesh );
-  StdMeshers_FaceSide faceSide( theFace, theWire, &theMesh, /*isFwd=*/true, /*skipMedium=*/true);
+  if ( myHelper )
+    helper.CopySubShapeInfo( *myHelper );
+  StdMeshers_FaceSide faceSide( theFace, theWire, &theMesh,
+                                /*isFwd=*/true, /*skipMedium=*/true, &helper );
 
   // sort theVertices by angle
   multimap<double, TopoDS_Vertex> vertexByAngle;
@@ -4525,7 +4528,7 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face&          theFace,
       // move corners to make sides equal by length
       int nbEqualV  = equVerts.size();
       int nbExcessV = nbEqualV - ( 1 + nbC[0] + nbC[1] );
-      if ( nbExcessV > 0 ) // there is nbExcessV vertices that can become corners
+      if ( nbExcessV > 0 ) // there are nbExcessV vertices that can become corners
       {
         // calculate normalized length of each "side" enclosed between neighbor equVerts
         vector< double > accuLength;
@@ -4586,6 +4589,7 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face&          theFace,
           if ( iBestEV > iS-1 + nbExcessV )
             iBestEV = iS-1 + nbExcessV;
           theVertices[ iCorner ] = helper.IthVertex( 0, edgeVec[ evVec[ iBestEV ]]);
+          cornerInd  [ iCorner ] = evVec[ iBestEV ];
           refinedCorners.insert( evVec[ iBestEV ]);
           iCorner = helper.WrapIndex( iCorner + 1, cornerInd.size() );
         }
index fd40f12d20baea7a298d885fa3d92f9d16591b53..a1938bde983a2d5353f6ddc8f719caa1b2dfb2f9 100644 (file)
@@ -155,7 +155,8 @@ class STDMESHERS_EXPORT StdMeshers_Quadrangle_2D: public SMESH_2D_Algo
 
   FaceQuadStruct::Ptr CheckNbEdges(SMESH_Mesh&         aMesh,
                                    const TopoDS_Shape& aShape,
-                                   const bool          considerMesh=false);
+                                   const bool          considerMesh = false,
+                                   SMESH_MesherHelper* aFaceHelper = 0);
 
   static bool IsApplicable(const TopoDS_Shape & aShape, bool toCheckAll);
 
index ec3c297fcf8fe37280da30f10d2dc3f877e9592a..dc573828efbe53b0b3df87d1827214f6deae49d5 100644 (file)
@@ -208,7 +208,8 @@ namespace
                   SMESH_Mesh*             aMesh,
                   StdMeshers_FaceSidePtr& aCircSide,
                   StdMeshers_FaceSidePtr& aLinSide1,
-                  StdMeshers_FaceSidePtr& aLinSide2)
+                  StdMeshers_FaceSidePtr& aLinSide2,
+                  SMESH_MesherHelper*     helper)
   {
     const TopoDS_Face& face = TopoDS::Face( aShape );
     aCircSide.reset(); aLinSide1.reset(); aLinSide2.reset();
@@ -259,7 +260,7 @@ namespace
       StdMeshers_FaceSidePtr side;
       if ( aMesh ) 
         side = StdMeshers_FaceSide::New( face, sideEdges, aMesh,
-                                         /*isFwd=*/true, /*skipMedium=*/ true );
+                                         /*isFwd=*/true, /*skipMedium=*/ true, helper );
       sides.push_back( side );
     }
 
@@ -357,7 +358,7 @@ namespace
           edges.push_back( aCircSide->Edge( iE % aCircSide->NbEdges() ));
 
         aCircSide = StdMeshers_FaceSide::New( face, edges, aMesh,
-                                              /*isFwd=*/true, /*skipMedium=*/ true );
+                                              /*isFwd=*/true, /*skipMedium=*/ true, helper );
       }
     }
 
@@ -773,8 +774,11 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
   StdMeshers_Quadrangle_2D::myCheckOri   = false;
   StdMeshers_Quadrangle_2D::myQuadList.clear();
 
+  myHelper->SetSubShape( aShape );
+  myHelper->SetElementsOnShape( true );
+
   StdMeshers_FaceSidePtr circSide, linSide1, linSide2;
-  int nbSides = analyseFace( aShape, &aMesh, circSide, linSide1, linSide2 );
+  int nbSides = analyseFace( aShape, &aMesh, circSide, linSide1, linSide2, myHelper );
   if( nbSides > 3 || nbSides < 1 )
     return error("The face must be a full ellipse or a part of ellipse (i.e. the number "
                  "of edges is less or equal to 3 and one of them is an ellipse curve)");
@@ -797,7 +801,6 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
   Handle(Geom_Surface) S = BRep_Tool::Surface(F);
 
   myHelper->IsQuadraticSubMesh( aShape );
-  myHelper->SetElementsOnShape( true );
 
   vector< double > layerPositions; // [0,1]
 
@@ -811,7 +814,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
     TopoDS_Edge linEdge = makeEdgeToCenter( circSide, F, circNode );
 
     StdMeshers_FaceSidePtr tmpSide =
-      StdMeshers_FaceSide::New( F, linEdge, &aMesh, /*isFrw=*/true, /*skipMedium=*/true );
+      StdMeshers_FaceSide::New( F, linEdge, &aMesh, /*isFrw=*/true, /*skipMedium=*/true, myHelper );
 
     if ( !computeLayerPositions( tmpSide, layerPositions ))
       return false;
@@ -855,7 +858,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
       isVIn0Shared = vIn0.IsSame( circSide->FirstVertex( iE ));
 
     linSide1 = StdMeshers_FaceSide::New( F, edges, &aMesh,
-                                         /*isFrw=*/isVIn0Shared, /*skipMedium=*/true );
+                                         /*isFrw=*/isVIn0Shared, /*skipMedium=*/true, myHelper );
 
     int nbMeshedEdges;
     if ( !computeLayerPositions( linSide1, layerPositions, &nbMeshedEdges ))
@@ -1105,7 +1108,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh&         aMesh,
   TNodeDistributor* algo1d = TNodeDistributor::GetDistributor(aMesh);
 
   StdMeshers_FaceSidePtr circSide, linSide1, linSide2;
-  int nbSides = analyseFace( aShape, &aMesh, circSide, linSide1, linSide2 );
+  int nbSides = analyseFace( aShape, &aMesh, circSide, linSide1, linSide2, myHelper );
   if( nbSides > 3 || nbSides < 1 )
     return false;
 
@@ -1123,7 +1126,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh&         aMesh,
     TopoDS_Edge linEdge = makeEdgeToCenter( circSide, F, circNode );
 
     StdMeshers_FaceSidePtr tmpSide =
-      StdMeshers_FaceSide::New( F, linEdge, &aMesh, /*isFrw=*/true, /*skipMedium=*/true );
+      StdMeshers_FaceSide::New( F, linEdge, &aMesh, /*isFrw=*/true, /*skipMedium=*/true, myHelper );
 
     if ( !computeLayerPositions( tmpSide, layerPositions ))
       return false;
@@ -1220,7 +1223,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::IsApplicable( const TopoDS_Shape & aShape
   for (TopExp_Explorer exp( aShape, TopAbs_FACE ); exp.More(); exp.Next(), ++nbFoundFaces )
   {
     StdMeshers_FaceSidePtr circSide, linSide1, linSide2;
-    int nbSides = analyseFace( exp.Current(), NULL, circSide, linSide1, linSide2 );
+    int nbSides = analyseFace( exp.Current(), NULL, circSide, linSide1, linSide2, NULL );
     bool ok = ( 0 < nbSides && nbSides <= 3 &&
                 isCornerInsideCircle( circSide, linSide1, linSide2 ));
     if( toCheckAll  && !ok ) return false;
index 331cb75e689815f865815b66773d8cf9cdb766ab..6746a502c1daef9cd0bd9655ceae17c87baafcde 100644 (file)
@@ -50,8 +50,8 @@
 #include "StdMeshers_SegmentLengthAroundVertex.hxx"
 #include "StdMeshers_StartEndLength.hxx"
 
-#include "Utils_SALOME_Exception.hxx"
-#include "utilities.h"
+#include <Utils_SALOME_Exception.hxx>
+#include <utilities.h>
 
 #include <BRepAdaptor_Curve.hxx>
 #include <BRep_Tool.hxx>
@@ -122,10 +122,11 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh&         aMesh,
                                              const TopoDS_Shape& aShape,
                                              Hypothesis_Status&  aStatus )
 {
-  _hypType = NONE;
-  _quadraticMesh = false;
+  _hypType        = NONE;
+  _quadraticMesh  = false;
   _onlyUnaryInput = true;
 
+  // check propagation in a redefined GetUsedHypothesis()
   const list <const SMESHDS_Hypothesis * > & hyps =
     GetUsedHypothesis(aMesh, aShape, /*ignoreAuxiliaryHyps=*/false);
 
@@ -156,13 +157,17 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh&         aMesh,
 
   string hypName = theHyp->GetName();
 
-  if ( hypName == "LocalLength" )
+  if ( !_mainEdge.IsNull() && _hypType == DISTRIB_PROPAGATION )
+  {
+    aStatus = SMESH_Hypothesis::HYP_OK;
+  }
+  else if ( hypName == "LocalLength" )
   {
     const StdMeshers_LocalLength * hyp =
       dynamic_cast <const StdMeshers_LocalLength * >(theHyp);
     ASSERT(hyp);
     _value[ BEG_LENGTH_IND ] = hyp->GetLength();
-    _value[ PRECISION_IND ] = hyp->GetPrecision();
+    _value[ PRECISION_IND  ] = hyp->GetPrecision();
     ASSERT( _value[ BEG_LENGTH_IND ] > 0 );
     _hypType = LOCAL_LENGTH;
     aStatus = SMESH_Hypothesis::HYP_OK;
@@ -386,6 +391,7 @@ static bool computeParamByFunc(Adaptor3d_Curve& C3d,
   }
   if ( theReverse )
     theParams.reverse();
+
   return true;
 }
 
@@ -393,15 +399,15 @@ static bool computeParamByFunc(Adaptor3d_Curve& C3d,
 //================================================================================
 /*!
  * \brief adjust internal node parameters so that the last segment length == an
 * \param a1 - the first segment length
 * \param an - the last segment length
 * \param U1 - the first edge parameter
 * \param Un - the last edge parameter
 * \param length - the edge length
 * \param C3d - the edge curve
 * \param theParams - internal node parameters to adjust
 * \param adjustNeighbors2an - to adjust length of segments next to the last one
 *  and not to remove parameters
 \param a1 - the first segment length
 \param an - the last segment length
 \param U1 - the first edge parameter
 \param Un - the last edge parameter
 \param length - the edge length
 \param C3d - the edge curve
 \param theParams - internal node parameters to adjust
 \param adjustNeighbors2an - to adjust length of segments next to the last one
  and not to remove parameters
  */
 //================================================================================
 
@@ -496,7 +502,7 @@ static void compensateError(double a1, double an,
 //    * \brief Clean mesh on edges
 //    * \param event - algo_event or compute_event itself (of SMESH_subMesh)
 //    * \param eventType - ALGO_EVENT or COMPUTE_EVENT (of SMESH_subMesh)
-//    * \param subMesh - the submesh where the event occures
+//    * \param subMesh - the submesh where the event occurs
 //    */
 //   void ProcessEvent(const int event, const int eventType, SMESH_subMesh* subMesh,
 //                     EventListenerData*, const SMESH_Hypothesis*)
@@ -672,7 +678,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh &     theMesh,
 
   // Propagation Of Distribution
   //
-  if ( !_mainEdge.IsNull() && _isPropagOfDistribution )
+  if ( !_mainEdge.IsNull() && _hypType == DISTRIB_PROPAGATION )
   {
     TopoDS_Edge mainEdge = TopoDS::Edge( _mainEdge ); // should not be a reference!
     _gen->Compute( theMesh, mainEdge, SMESH_Gen::SHAPE_ONLY_UPWARD );
@@ -1164,7 +1170,7 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
       // take into account reversing the edge the hypothesis is propagated from
       // (_mainEdge.Orientation() marks mutual orientation of EDGEs in propagation chain)
       reversed = ( _mainEdge.Orientation() == TopAbs_REVERSED );
-      if ( !_isPropagOfDistribution ) {
+      if ( _hypType != DISTRIB_PROPAGATION ) {
         int mainID = meshDS->ShapeToIndex(_mainEdge);
         if ( std::find( _revEdgesIDs.begin(), _revEdgesIDs.end(), mainID) != _revEdgesIDs.end())
           reversed = !reversed;
@@ -1276,9 +1282,9 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
  */
 //=============================================================================
 
-bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh & theMesh,
+bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh &         theMesh,
                                      const TopoDS_Shape & theShape,
-                                     MapShapeNbElems& aResMap)
+                                     MapShapeNbElems&     theResMap)
 {
   if ( _hypType == NONE )
     return false;
@@ -1286,7 +1292,7 @@ bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh & theMesh,
   if ( _hypType == ADAPTIVE )
   {
     _adaptiveHyp->GetAlgo()->InitComputeError();
-    _adaptiveHyp->GetAlgo()->Evaluate( theMesh, theShape, aResMap );
+    _adaptiveHyp->GetAlgo()->Evaluate( theMesh, theShape, theResMap );
     return error( _adaptiveHyp->GetAlgo()->GetComputeError() );
   }
 
@@ -1311,7 +1317,7 @@ bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh & theMesh,
     BRepAdaptor_Curve C3d( E );
     if ( ! computeInternalParameters( theMesh, C3d, length, f, l, params, false, true )) {
       SMESH_subMesh * sm = theMesh.GetSubMesh(theShape);
-      aResMap.insert(std::make_pair(sm,aVec));
+      theResMap.insert(std::make_pair(sm,aVec));
       SMESH_ComputeErrorPtr& smError = sm->GetComputeError();
       smError.reset( new SMESH_ComputeError(COMPERR_ALGO_FAILED,"Submesh can not be evaluated",this));
       return false;
@@ -1319,7 +1325,7 @@ bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh & theMesh,
     redistributeNearVertices( theMesh, C3d, length, params, VFirst, VLast );
 
     if(_quadraticMesh) {
-      aVec[SMDSEntity_Node] = 2*params.size() + 1;
+      aVec[SMDSEntity_Node     ] = 2*params.size() + 1;
       aVec[SMDSEntity_Quad_Edge] = params.size() + 1;
     }
     else {
@@ -1331,7 +1337,7 @@ bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh & theMesh,
   else {
     // Edge is a degenerated Edge : We put n = 5 points on the edge.
     if ( _quadraticMesh ) {
-      aVec[SMDSEntity_Node] = 11;
+      aVec[SMDSEntity_Node     ] = 11;
       aVec[SMDSEntity_Quad_Edge] = 6;
     }
     else {
@@ -1340,8 +1346,8 @@ bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh & theMesh,
     }
   }
 
-  SMESH_subMesh * sm = theMesh.GetSubMesh(theShape);
-  aResMap.insert(std::make_pair(sm,aVec));
+  SMESH_subMesh * sm = theMesh.GetSubMesh( theShape );
+  theResMap.insert( std::make_pair( sm, aVec ));
 
   return true;
 }
@@ -1370,10 +1376,13 @@ StdMeshers_Regular_1D::GetUsedHypothesis(SMESH_Mesh &         aMesh,
   if (nbHyp == 0 && aShape.ShapeType() == TopAbs_EDGE)
   {
     // Check, if propagated from some other edge
+    bool isPropagOfDistribution = false;
     _mainEdge = StdMeshers_Propagation::GetPropagationSource( aMesh, aShape,
-                                                              _isPropagOfDistribution );
+                                                              isPropagOfDistribution );
     if ( !_mainEdge.IsNull() )
     {
+      if ( isPropagOfDistribution )
+        _hypType = DISTRIB_PROPAGATION;
       // Propagation of 1D hypothesis from <aMainEdge> on this edge;
       // get non-auxiliary assigned to _mainEdge
       nbHyp = aMesh.GetHypotheses( _mainEdge, *compatibleFilter, _usedHypList, true );
index 7786f4ac70e38055913903f8fd87cae12ce7f3f2..d2af675f7d182f892601886c0e53eb4d10975239 100644 (file)
@@ -104,7 +104,7 @@ protected:
   StdMeshers_SegmentLengthAroundVertex* getVertexHyp(SMESH_Mesh &          theMesh,
                                                      const TopoDS_Vertex & theV);
 
-  enum HypothesisType { LOCAL_LENGTH, MAX_LENGTH, NB_SEGMENTS, BEG_END_LENGTH, DEFLECTION, ARITHMETIC_1D, FIXED_POINTS_1D, ADAPTIVE, GEOMETRIC_1D, NONE };
+  enum HypothesisType { LOCAL_LENGTH, MAX_LENGTH, NB_SEGMENTS, BEG_END_LENGTH, DEFLECTION, ARITHMETIC_1D, FIXED_POINTS_1D, ADAPTIVE, GEOMETRIC_1D, DISTRIB_PROPAGATION, NONE };
 
   enum ValueIndex {
     SCALE_FACTOR_IND = 0,
@@ -142,7 +142,6 @@ protected:
   // a source of propagated hypothesis, is set by CheckHypothesis()
   // always called before Compute()
   TopoDS_Shape _mainEdge;
-  bool         _isPropagOfDistribution;
 };
 
 #endif
index 393e2799c01714de60e0edae02ef2ab991cb1bb0..a6530b9244a5782abe3a820e82075e2aab951077 100644 (file)
@@ -409,7 +409,7 @@ namespace VISCOUS_3D
 
     gp_XYZ              _normal;    // to boundary of solid
     vector<gp_XYZ>      _pos;       // points computed during inflation
-    double              _len;       // length achived with the last inflation step
+    double              _len;       // length achieved with the last inflation step
     double              _maxLen;    // maximal possible length
     double              _cosin;     // of angle (_normal ^ surface)
     double              _minAngle;  // of _simplices
@@ -439,11 +439,13 @@ namespace VISCOUS_3D
                   SMOOTHED_C1     = 0x0000800, // is on _eosC1
                   DISTORTED       = 0x0001000, // was bad before smoothing
                   RISKY_SWOL      = 0x0002000, // SWOL is parallel to a source FACE
-                  UNUSED_FLAG     = 0x0100000
+                  SHRUNK          = 0x0004000, // target node reached a tgt position while shrink()
+                  UNUSED_FLAG     = 0x0100000  // to add use flags after
     };
     bool Is   ( int flag ) const { return _flags & flag; }
     void Set  ( int flag ) { _flags |= flag; }
     void Unset( int flag ) { _flags &= ~flag; }
+    std::string DumpFlags() const; // debug
 
     void SetNewLength( double len, _EdgesOnShape& eos, SMESH_MesherHelper& helper );
     bool SetNewLength2d( Handle(Geom_Surface)& surface,
@@ -721,6 +723,7 @@ namespace VISCOUS_3D
   {
     typedef const StdMeshers_ViscousLayers* THyp;
     TopoDS_Shape                    _solid;
+    TopTools_MapOfShape             _before; // SOLIDs to be computed before _solid
     TGeomID                         _index; // SOLID id
     _MeshOfSolid*                   _proxyMesh;
     list< THyp >                    _hyps;
@@ -891,6 +894,7 @@ namespace VISCOUS_3D
   private:
 
     bool findSolidsWithLayers();
+    bool setBefore( _SolidData& solidBefore, _SolidData& solidAfter );
     bool findFacesWithLayers(const bool onlyWith=false);
     void getIgnoreFaces(const TopoDS_Shape&             solid,
                         const StdMeshers_ViscousLayers* hyp,
@@ -957,7 +961,7 @@ namespace VISCOUS_3D
                         _LayerEdge&   edge,
                         const gp_XYZ& newNormal);
     bool refine(_SolidData& data);
-    bool shrink();
+    bool shrink(_SolidData& data);
     bool prepareEdgeToShrink( _LayerEdge& edge, _EdgesOnShape& eos,
                               SMESH_MesherHelper& helper,
                               const SMESHDS_SubMesh* faceSubMesh );
@@ -967,7 +971,7 @@ namespace VISCOUS_3D
                      const bool                  is2D,
                      const int                   step,
                      set<const SMDS_MeshNode*> * involvedNodes=NULL);
-    bool addBoundaryElements();
+    bool addBoundaryElements(_SolidData& data);
 
     bool error( const string& text, int solidID=-1 );
     SMESHDS_Mesh* getMeshDS() const { return _mesh->GetMeshDS(); }
@@ -975,11 +979,14 @@ namespace VISCOUS_3D
     // debug
     void makeGroupOfLE();
 
-    SMESH_Mesh*           _mesh;
-    SMESH_ComputeErrorPtr _error;
+    SMESH_Mesh*                _mesh;
+    SMESH_ComputeErrorPtr      _error;
 
-    vector< _SolidData >  _sdVec;
-    int                   _tmpFaceID;
+    vector<                    _SolidData >  _sdVec;
+    TopTools_IndexedMapOfShape _solids; // to find _SolidData by a solid
+    TopTools_MapOfShape        _shrinkedFaces;
+
+    int                        _tmpFaceID;
   };
   //--------------------------------------------------------------------------------
   /*!
@@ -1232,8 +1239,8 @@ StdMeshers_ViscousLayers::Compute(SMESH_Mesh&         theMesh,
                                   const bool          toMakeN2NMap) const
 {
   using namespace VISCOUS_3D;
-  _ViscousBuilder bulder;
-  SMESH_ComputeErrorPtr err = bulder.Compute( theMesh, theShape );
+  _ViscousBuilder builder;
+  SMESH_ComputeErrorPtr err = builder.Compute( theMesh, theShape );
   if ( err && !err->IsOK() )
     return SMESH_ProxyMesh::Ptr();
 
@@ -1245,7 +1252,7 @@ StdMeshers_ViscousLayers::Compute(SMESH_Mesh&         theMesh,
          _ViscousListener::GetSolidMesh( &theMesh, exp.Current(), /*toCreate=*/false))
     {
       if ( toMakeN2NMap && !pm->_n2nMapComputed )
-        if ( !bulder.MakeN2NMap( pm ))
+        if ( !builder.MakeN2NMap( pm ))
           return SMESH_ProxyMesh::Ptr();
       components.push_back( SMESH_ProxyMesh::Ptr( pm ));
       pm->myIsDeletable = false; // it will de deleted by boost::shared_ptr
@@ -1309,8 +1316,8 @@ StdMeshers_ViscousLayers::CheckHypothesis(SMESH_Mesh&                          t
                                           const TopoDS_Shape&                  theShape,
                                           SMESH_Hypothesis::Hypothesis_Status& theStatus)
 {
-  VISCOUS_3D::_ViscousBuilder bulder;
-  SMESH_ComputeErrorPtr err = bulder.CheckHypotheses( theMesh, theShape );
+  VISCOUS_3D::_ViscousBuilder builder;
+  SMESH_ComputeErrorPtr err = builder.CheckHypotheses( theMesh, theShape );
   if ( err && !err->IsOK() )
     theStatus = SMESH_Hypothesis::HYP_INCOMPAT_HYPS;
   else
@@ -1834,8 +1841,6 @@ bool _ViscousBuilder::MakeN2NMap( _MeshOfSolid* pm )
 SMESH_ComputeErrorPtr _ViscousBuilder::Compute(SMESH_Mesh&         theMesh,
                                                const TopoDS_Shape& theShape)
 {
-  // TODO: set priority of solids during Gen::Compute()
-
   _mesh = & theMesh;
 
   // check if proxy mesh already computed
@@ -1857,22 +1862,37 @@ SMESH_ComputeErrorPtr _ViscousBuilder::Compute(SMESH_Mesh&         theMesh,
 
   for ( size_t i = 0; i < _sdVec.size(); ++i )
   {
-    if ( ! makeLayer(_sdVec[i]) )
+    size_t iSD = 0;
+    for ( iSD = 0; iSD < _sdVec.size(); ++iSD ) // find next SOLID to compute
+      if ( _sdVec[iSD]._before.IsEmpty() &&
+           !_sdVec[iSD]._solid.IsNull() &&
+           _sdVec[iSD]._n2eMap.empty() )
+        break;
+
+    if ( ! makeLayer(_sdVec[iSD]) )   // create _LayerEdge's
       return _error;
 
-    if ( _sdVec[i]._n2eMap.size() == 0 )
+    if ( _sdVec[iSD]._n2eMap.size() == 0 ) // no layers in a SOLID
+    {
+      _sdVec[iSD]._solid.Nullify();
       continue;
-    
-    if ( ! inflate(_sdVec[i]) )
+    }
+
+    if ( ! inflate(_sdVec[iSD]) )     // increase length of _LayerEdge's
       return _error;
 
-    if ( ! refine(_sdVec[i]) )
+    if ( ! refine(_sdVec[iSD]) )      // create nodes and prisms
       return _error;
-  }
-  if ( !shrink() )
-    return _error;
 
-  addBoundaryElements();
+    if ( ! shrink(_sdVec[iSD]) )      // shrink 2D mesh on FACEs w/o layer
+      return _error;
+
+    addBoundaryElements(_sdVec[iSD]); // create quadrangles on prism bare sides
+
+    const TopoDS_Shape& solid = _sdVec[iSD]._solid;
+    for ( iSD = 0; iSD < _sdVec.size(); ++iSD )
+      _sdVec[iSD]._before.Remove( solid );
+  }
 
   makeGroupOfLE(); // debug
   debugDump.Finish();
@@ -1921,12 +1941,14 @@ bool _ViscousBuilder::findSolidsWithLayers()
   TopExp::MapShapes( _mesh->GetShapeToMesh(), TopAbs_SOLID, allSolids );
   _sdVec.reserve( allSolids.Extent());
 
-  SMESH_Gen* gen = _mesh->GetGen();
   SMESH_HypoFilter filter;
   for ( int i = 1; i <= allSolids.Extent(); ++i )
   {
     // find StdMeshers_ViscousLayers hyp assigned to the i-th solid
-    SMESH_Algo* algo = gen->GetAlgo( *_mesh, allSolids(i) );
+    SMESH_subMesh* sm = _mesh->GetSubMesh( allSolids(i) );
+    if ( sm->GetSubMeshDS() && sm->GetSubMeshDS()->NbElements() > 0 )
+      continue; // solid is already meshed
+    SMESH_Algo* algo = sm->GetAlgo();
     if ( !algo ) continue;
     // TODO: check if algo is hidden
     const list <const SMESHDS_Hypothesis *> & allHyps =
@@ -1951,6 +1973,7 @@ bool _ViscousBuilder::findSolidsWithLayers()
           soData->_index = getMeshDS()->ShapeToIndex( allSolids(i));
           soData->_helper = new SMESH_MesherHelper( *_mesh );
           soData->_helper->SetSubShape( allSolids(i) );
+          _solids.Add( allSolids(i) );
         }
         soData->_hyps.push_back( viscHyp );
         soData->_hypShapes.push_back( hypShape );
@@ -1965,7 +1988,37 @@ bool _ViscousBuilder::findSolidsWithLayers()
 
 //================================================================================
 /*!
- * \brief 
+ * \brief Set a _SolidData to be computed before another
+ */
+//================================================================================
+
+bool _ViscousBuilder::setBefore( _SolidData& solidBefore, _SolidData& solidAfter )
+{
+  // check possibility to set this order; get all solids before solidBefore
+  TopTools_IndexedMapOfShape allSolidsBefore;
+  allSolidsBefore.Add( solidBefore._solid );
+  for ( int i = 1; i <= allSolidsBefore.Extent(); ++i )
+  {
+    int iSD = _solids.FindIndex( allSolidsBefore(i) );
+    if ( iSD )
+    {
+      TopTools_MapIteratorOfMapOfShape soIt( _sdVec[ iSD-1 ]._before );
+      for ( ; soIt.More(); soIt.Next() )
+        allSolidsBefore.Add( soIt.Value() );
+    }
+  }
+  if ( allSolidsBefore.Contains( solidAfter._solid ))
+    return false;
+
+  for ( int i = 1; i <= allSolidsBefore.Extent(); ++i )
+    solidAfter._before.Add( allSolidsBefore(i) );
+
+  return true;
+}
+
+//================================================================================
+/*!
+ * \brief
  */
 //================================================================================
 
@@ -1973,13 +2026,10 @@ bool _ViscousBuilder::findFacesWithLayers(const bool onlyWith)
 {
   SMESH_MesherHelper helper( *_mesh );
   TopExp_Explorer exp;
-  TopTools_IndexedMapOfShape solids;
 
   // collect all faces-to-ignore defined by hyp
   for ( size_t i = 0; i < _sdVec.size(); ++i )
   {
-    solids.Add( _sdVec[i]._solid );
-
     // get faces-to-ignore defined by each hyp
     typedef const StdMeshers_ViscousLayers* THyp;
     typedef std::pair< set<TGeomID>, THyp > TFacesOfHyp;
@@ -2075,8 +2125,9 @@ bool _ViscousBuilder::findFacesWithLayers(const bool onlyWith)
     }
   }
 
-  // Find faces to shrink mesh on (solution 2 in issue 0020832);
+  // Find FACEs to shrink mesh on (solution 2 in issue 0020832): fill in _shrinkShape2Shape
   TopTools_IndexedMapOfShape shapes;
+  std::string structAlgoName = "Hexa_3D";
   for ( size_t i = 0; i < _sdVec.size(); ++i )
   {
     shapes.Clear();
@@ -2084,121 +2135,32 @@ bool _ViscousBuilder::findFacesWithLayers(const bool onlyWith)
     for ( int iE = 1; iE <= shapes.Extent(); ++iE )
     {
       const TopoDS_Shape& edge = shapes(iE);
-      // find 2 faces sharing an edge
+      // find 2 FACEs sharing an EDGE
       TopoDS_Shape FF[2];
-      PShapeIteratorPtr fIt = helper.GetAncestors(edge, *_mesh, TopAbs_FACE);
+      PShapeIteratorPtr fIt = helper.GetAncestors(edge, *_mesh, TopAbs_FACE, &_sdVec[i]._solid);
       while ( fIt->more())
       {
         const TopoDS_Shape* f = fIt->next();
-        if ( helper.IsSubShape( *f, _sdVec[i]._solid))
-          FF[ int( !FF[0].IsNull()) ] = *f;
+        FF[ int( !FF[0].IsNull()) ] = *f;
       }
       if( FF[1].IsNull() ) continue; // seam edge can be shared by 1 FACE only
+
       // check presence of layers on them
       int ignore[2];
       for ( int j = 0; j < 2; ++j )
-        ignore[j] = _sdVec[i]._ignoreFaceIds.count ( getMeshDS()->ShapeToIndex( FF[j] ));
+        ignore[j] = _sdVec[i]._ignoreFaceIds.count( getMeshDS()->ShapeToIndex( FF[j] ));
       if ( ignore[0] == ignore[1] )
         continue; // nothing interesting
       TopoDS_Shape fWOL = FF[ ignore[0] ? 0 : 1 ];
-      // check presence of layers on fWOL within an adjacent SOLID
-      bool collision = false;
-      PShapeIteratorPtr sIt = helper.GetAncestors( fWOL, *_mesh, TopAbs_SOLID );
-      while ( const TopoDS_Shape* solid = sIt->next() )
-        if ( !solid->IsSame( _sdVec[i]._solid ))
-        {
-          int iSolid = solids.FindIndex( *solid );
-          int  iFace = getMeshDS()->ShapeToIndex( fWOL );
-          if ( iSolid > 0 && !_sdVec[ iSolid-1 ]._ignoreFaceIds.count( iFace ))
-          {
-            //_sdVec[i]._noShrinkShapes.insert( iFace );
-            //fWOL.Nullify();
-            collision = true;
-          }
-        }
-      // add edge to maps
+
+      // add EDGE to maps
       if ( !fWOL.IsNull())
       {
         TGeomID edgeInd = getMeshDS()->ShapeToIndex( edge );
         _sdVec[i]._shrinkShape2Shape.insert( make_pair( edgeInd, fWOL ));
-        if ( collision )
-        {
-          // _shrinkShape2Shape will be used to temporary inflate _LayerEdge's based
-          // on the edge but shrink won't be performed
-          _sdVec[i]._noShrinkShapes.insert( edgeInd );
-        }
       }
     }
   }
-  // Exclude from _shrinkShape2Shape FACE's that can't be shrinked since
-  // the algo of the SOLID sharing the FACE does not support it
-  set< string > notSupportAlgos; notSupportAlgos.insert("Hexa_3D");
-  for ( size_t i = 0; i < _sdVec.size(); ++i )
-  {
-    map< TGeomID, TopoDS_Shape >::iterator e2f = _sdVec[i]._shrinkShape2Shape.begin();
-    for ( ; e2f != _sdVec[i]._shrinkShape2Shape.end(); ++e2f )
-    {
-      const TopoDS_Shape& fWOL = e2f->second;
-      const TGeomID     edgeID = e2f->first;
-      bool notShrinkFace = false;
-      PShapeIteratorPtr soIt = helper.GetAncestors(fWOL, *_mesh, TopAbs_SOLID);
-      while ( soIt->more() )
-      {
-        const TopoDS_Shape* solid = soIt->next();
-        if ( _sdVec[i]._solid.IsSame( *solid )) continue;
-        SMESH_Algo* algo = _mesh->GetGen()->GetAlgo( *_mesh, *solid );
-        if ( !algo || !notSupportAlgos.count( algo->GetName() )) continue;
-        notShrinkFace = true;
-        size_t iSolid = 0;
-        for ( ; iSolid < _sdVec.size(); ++iSolid )
-        {
-          if ( _sdVec[iSolid]._solid.IsSame( *solid ) ) {
-            if ( _sdVec[iSolid]._shrinkShape2Shape.count( edgeID ))
-              notShrinkFace = false;
-            break;
-          }
-        }
-        if ( notShrinkFace )
-        {
-          _sdVec[i]._noShrinkShapes.insert( edgeID );
-
-          // add VERTEXes of the edge in _noShrinkShapes
-          TopoDS_Shape edge = getMeshDS()->IndexToShape( edgeID );
-          for ( TopoDS_Iterator vIt( edge ); vIt.More(); vIt.Next() )
-            _sdVec[i]._noShrinkShapes.insert( getMeshDS()->ShapeToIndex( vIt.Value() ));
-
-          // check if there is a collision with to-shrink-from EDGEs in iSolid
-          if ( iSolid == _sdVec.size() )
-            continue; // no VL in the solid
-          shapes.Clear();
-          TopExp::MapShapes( fWOL, TopAbs_EDGE, shapes);
-          for ( int iE = 1; iE <= shapes.Extent(); ++iE )
-          {
-            const TopoDS_Edge& E = TopoDS::Edge( shapes( iE ));
-            const TGeomID    eID = getMeshDS()->ShapeToIndex( E );
-            if ( eID == edgeID ||
-                 !_sdVec[iSolid]._shrinkShape2Shape.count( eID ) ||
-                 _sdVec[i]._noShrinkShapes.count( eID ))
-              continue;
-            for ( int is1st = 0; is1st < 2; ++is1st )
-            {
-              TopoDS_Vertex V = helper.IthVertex( is1st, E );
-              if ( _sdVec[i]._noShrinkShapes.count( getMeshDS()->ShapeToIndex( V ) ))
-              {
-                // _sdVec[i]._noShrinkShapes.insert( eID );
-                // V = helper.IthVertex( !is1st, E );
-                // _sdVec[i]._noShrinkShapes.insert( getMeshDS()->ShapeToIndex( V ));
-                //iE = 0; // re-start the loop on EDGEs of fWOL
-                return error("No way to make a conformal mesh with "
-                             "the given set of faces with layers", _sdVec[i]._index);
-              }
-            }
-          }
-        }
-
-      } // while ( soIt->more() )
-    } // loop on _sdVec[i]._shrinkShape2Shape
-  } // loop on _sdVec to fill in _SolidData::_noShrinkShapes
 
   // Find the SHAPE along which to inflate _LayerEdge based on VERTEX
 
@@ -2212,18 +2174,14 @@ bool _ViscousBuilder::findFacesWithLayers(const bool onlyWith)
       // find faces WOL sharing the vertex
       vector< TopoDS_Shape > facesWOL;
       size_t totalNbFaces = 0;
-      PShapeIteratorPtr fIt = helper.GetAncestors(vertex, *_mesh, TopAbs_FACE);
+      PShapeIteratorPtr fIt = helper.GetAncestors(vertex, *_mesh, TopAbs_FACE, &_sdVec[i]._solid );
       while ( fIt->more())
       {
         const TopoDS_Shape* f = fIt->next();
-        if ( helper.IsSubShape( *f, _sdVec[i]._solid ) )
-        {
-          totalNbFaces++;
-          const int fID = getMeshDS()->ShapeToIndex( *f );
-          if ( _sdVec[i]._ignoreFaceIds.count ( fID ) /*&&
-               !_sdVec[i]._noShrinkShapes.count( fID )*/)
-            facesWOL.push_back( *f );
-        }
+        totalNbFaces++;
+        const int fID = getMeshDS()->ShapeToIndex( *f );
+        if ( _sdVec[i]._ignoreFaceIds.count ( fID ) /*&& !_sdVec[i]._noShrinkShapes.count( fID )*/)
+          facesWOL.push_back( *f );
       }
       if ( facesWOL.size() == totalNbFaces || facesWOL.empty() )
         continue; // no layers at this vertex or no WOL
@@ -2273,7 +2231,130 @@ bool _ViscousBuilder::findFacesWithLayers(const bool onlyWith)
     }
   }
 
-  // add FACEs of other SOLIDs to _ignoreFaceIds
+  // Add to _noShrinkShapes sub-shapes of FACE's that can't be shrinked since
+  // the algo of the SOLID sharing the FACE does not support it or for other reasons
+  set< string > notSupportAlgos; notSupportAlgos.insert( structAlgoName );
+  for ( size_t i = 0; i < _sdVec.size(); ++i )
+  {
+    map< TGeomID, TopoDS_Shape >::iterator e2f = _sdVec[i]._shrinkShape2Shape.begin();
+    for ( ; e2f != _sdVec[i]._shrinkShape2Shape.end(); ++e2f )
+    {
+      const TopoDS_Shape& fWOL = e2f->second;
+      const TGeomID     edgeID = e2f->first;
+      TGeomID           faceID = getMeshDS()->ShapeToIndex( fWOL );
+      TopoDS_Shape        edge = getMeshDS()->IndexToShape( edgeID );
+      if ( edge.ShapeType() != TopAbs_EDGE )
+        continue; // shrink shape is VERTEX
+
+      TopoDS_Shape solid;
+      PShapeIteratorPtr soIt = helper.GetAncestors(fWOL, *_mesh, TopAbs_SOLID);
+      while ( soIt->more() && solid.IsNull() )
+      {
+        const TopoDS_Shape* so = soIt->next();
+        if ( !so->IsSame( _sdVec[i]._solid ))
+          solid = *so;
+      }
+      if ( solid.IsNull() )
+        continue;
+
+      bool noShrinkE = false;
+      SMESH_Algo*  algo = _mesh->GetSubMesh( solid )->GetAlgo();
+      bool isStructured = ( algo && algo->GetName() == structAlgoName );
+      size_t     iSolid = _solids.FindIndex( solid ) - 1;
+      if ( iSolid < _sdVec.size() && _sdVec[ iSolid ]._ignoreFaceIds.count( faceID ))
+      {
+        // the adjacent SOLID has NO layers on fWOL;
+        // shrink allowed if
+        // - there are layers on the EDGE in the adjacent SOLID
+        // - there are NO layers in the adjacent SOLID && algo is unstructured and computed later
+        bool hasWLAdj = (_sdVec[iSolid]._shrinkShape2Shape.count( edgeID ));
+        bool shrinkAllowed = (( hasWLAdj ) ||
+                              ( !isStructured && setBefore( _sdVec[ i ], _sdVec[ iSolid ] )));
+        noShrinkE = !shrinkAllowed;
+      }
+      else if ( iSolid < _sdVec.size() )
+      {
+        // the adjacent SOLID has layers on fWOL;
+        // check if SOLID's mesh is unstructured and then try to set it
+        // to be computed after the i-th solid
+        if ( isStructured || !setBefore( _sdVec[ i ], _sdVec[ iSolid ] ))
+          noShrinkE = true; // don't shrink fWOL
+      }
+      else
+      {
+        // the adjacent SOLID has NO layers at all
+        noShrinkE = isStructured;
+      }
+
+      if ( noShrinkE )
+      {
+        _sdVec[i]._noShrinkShapes.insert( edgeID );
+
+        // check if there is a collision with to-shrink-from EDGEs in iSolid
+        // if ( iSolid < _sdVec.size() )
+        // {
+        //   shapes.Clear();
+        //   TopExp::MapShapes( fWOL, TopAbs_EDGE, shapes);
+        //   for ( int iE = 1; iE <= shapes.Extent(); ++iE )
+        //   {
+        //     const TopoDS_Edge& E = TopoDS::Edge( shapes( iE ));
+        //     const TGeomID    eID = getMeshDS()->ShapeToIndex( E );
+        //     if ( eID == edgeID ||
+        //          !_sdVec[iSolid]._shrinkShape2Shape.count( eID ) ||
+        //          _sdVec[i]._noShrinkShapes.count( eID ))
+        //       continue;
+        //     for ( int is1st = 0; is1st < 2; ++is1st )
+        //     {
+        //       TopoDS_Vertex V = helper.IthVertex( is1st, E );
+        //       if ( _sdVec[i]._noShrinkShapes.count( getMeshDS()->ShapeToIndex( V ) ))
+        //       {
+        //         return error("No way to make a conformal mesh with "
+        //                      "the given set of faces with layers", _sdVec[i]._index);
+        //       }
+        //     }
+        //   }
+        // }
+      }
+
+      // add VERTEXes of the edge in _noShrinkShapes, which is necessary if
+      // _shrinkShape2Shape is different in the adjacent SOLID
+      for ( TopoDS_Iterator vIt( edge ); vIt.More(); vIt.Next() )
+      {
+        TGeomID vID = getMeshDS()->ShapeToIndex( vIt.Value() );
+        bool noShrinkV = false;
+
+        if ( iSolid < _sdVec.size() )
+        {
+          if ( _sdVec[ iSolid ]._ignoreFaceIds.count( faceID ))
+          {
+            map< TGeomID, TopoDS_Shape >::iterator i2S, i2SAdj;
+            i2S    = _sdVec[i     ]._shrinkShape2Shape.find( vID );
+            i2SAdj = _sdVec[iSolid]._shrinkShape2Shape.find( vID );
+            if ( i2SAdj == _sdVec[iSolid]._shrinkShape2Shape.end() )
+              noShrinkV = ( i2S->second.ShapeType() == TopAbs_EDGE || isStructured );
+            else
+              noShrinkV = ( ! i2S->second.IsSame( i2SAdj->second ));
+          }
+          else
+          {
+            noShrinkV = noShrinkE;
+          }
+        }
+        else
+        {
+          // the adjacent SOLID has NO layers at all
+          noShrinkV = ( isStructured ||
+                        _sdVec[i]._shrinkShape2Shape[ vID ].ShapeType() == TopAbs_EDGE );
+        }
+        if ( noShrinkV )
+          _sdVec[i]._noShrinkShapes.insert( vID );
+      }
+
+    } // loop on _sdVec[i]._shrinkShape2Shape
+  } // loop on _sdVec to fill in _SolidData::_noShrinkShapes
+
+
+    // add FACEs of other SOLIDs to _ignoreFaceIds
   for ( size_t i = 0; i < _sdVec.size(); ++i )
   {
     shapes.Clear();
@@ -2872,7 +2953,7 @@ bool _ViscousBuilder::findShapesToSmooth( _SolidData& data )
   //const double tgtThick = /*Min( 0.5 * data._geomSize, */data._maxThickness;
 
   // Find shapes needing smoothing; such a shape has _LayerEdge._normal on it's
-  // boundry inclined to the shape at a sharp angle
+  // boundary inclined to the shape at a sharp angle
 
   //list< TGeomID > shapesToSmooth;
   TopTools_MapOfShape edgesOfSmooFaces;
@@ -4081,7 +4162,7 @@ void _LayerEdge::SetDataByNeighbors( const SMDS_MeshNode* n1,
 //================================================================================
 /*!
  * \brief Copy data from a _LayerEdge of other SOLID and based on the same node;
- * this and other _LayerEdge's are inflated along a FACE or an EDGE
+ * this and the other _LayerEdge are inflated along a FACE or an EDGE
  */
 //================================================================================
 
@@ -4431,7 +4512,10 @@ bool _ViscousBuilder::inflate(_SolidData& data)
       const double shapeTgtThick = eos._hyp.GetTotalThickness();
       for ( size_t i = 0; i < eos._edges.size(); ++i )
       {
-        avgThick      += Min( 1., eos._edges[i]->_len / shapeTgtThick );
+        if ( eos._edges[i]->_nodes.size() > 1 )
+          avgThick    += Min( 1., eos._edges[i]->_len / shapeTgtThick );
+        else
+          avgThick    += shapeTgtThick;
         nbActiveEdges += ( ! eos._edges[i]->Is( _LayerEdge::BLOCKED ));
       }
     }
@@ -6605,11 +6689,9 @@ bool _ViscousBuilder::updateNormals( _SolidData&         data,
         else // edge inflates along a FACE
         {
           TopoDS_Shape V = helper.GetSubShapeByNode( edge->_nodes[0], getMeshDS() );
-          PShapeIteratorPtr eIt = helper.GetAncestors( V, *_mesh, TopAbs_EDGE );
+          PShapeIteratorPtr eIt = helper.GetAncestors( V, *_mesh, TopAbs_EDGE, &eos->_sWOL );
           while ( const TopoDS_Shape* E = eIt->next() )
           {
-            if ( !helper.IsSubShape( *E, /*FACE=*/eos->_sWOL ))
-              continue;
             gp_Vec edgeDir = getEdgeDir( TopoDS::Edge( *E ), TopoDS::Vertex( V ));
             double   angle = edgeDir.Angle( newEdge._normal ); // [0,PI]
             if ( angle < M_PI / 2 )
@@ -7546,7 +7628,7 @@ bool _LayerEdge::SegTriaInter( const gp_Ax1& lastSegment,
   const gp_Dir& dir  = lastSegment.Direction();
 
   /* calculate distance from vert0 to ray origin */
-  gp_XYZ tvec = orig.XYZ() - vert0;
+  //gp_XYZ tvec = orig.XYZ() - vert0;
 
   //if ( tvec * dir > EPSILON )
     // intersected face is at back side of the temporary face this _LayerEdge belongs to
@@ -7565,6 +7647,9 @@ bool _LayerEdge::SegTriaInter( const gp_Ax1& lastSegment,
   if ( det > -ANGL_EPSILON && det < ANGL_EPSILON )
     return false;
 
+  /* calculate distance from vert0 to ray origin */
+  gp_XYZ tvec = orig.XYZ() - vert0;
+
   /* calculate U parameter and test bounds */
   double u = ( tvec * pvec ) / det;
   //if (u < 0.0 || u > 1.0)
@@ -8430,7 +8515,7 @@ gp_XYZ _LayerEdge::smoothNefPolygon()
 {
   gp_XYZ newPos(0,0,0);
 
-  // get a plane to seach a solution on
+  // get a plane to search a solution on
 
   vector< gp_XYZ > vecs( _simplices.size() + 1 );
   size_t i;
@@ -8621,7 +8706,7 @@ gp_XYZ _LayerEdge::smoothNefPolygon()
 { ////////////////////////////////// NEW
   gp_XYZ newPos(0,0,0);
 
-  // get a plane to seach a solution on
+  // get a plane to search a solution on
 
   size_t i;
   gp_XYZ center(0,0,0);
@@ -8968,7 +9053,7 @@ void _LayerEdge::Block( _SolidData& data )
       minDist   = Min( pSrc.SquareDistance( pTgtN ), minDist );
       minDist   = Min( pTgt.SquareDistance( pSrcN ), minDist );
       double newMaxLen = edge->_maxLen + 0.5 * Sqrt( minDist );
-      if ( edge->_nodes[0]->getshapeId() == neibor->_nodes[0]->getshapeId() )
+      //if ( edge->_nodes[0]->getshapeId() == neibor->_nodes[0]->getshapeId() ) viscous_layers_00/A3
       {
         newMaxLen *= edge->_lenFactor / neibor->_lenFactor;
       }
@@ -9122,10 +9207,48 @@ void _LayerEdge::SmoothPos( const vector< double >& segLen, const double tol )
 
 //================================================================================
 /*!
- * \brief Create layers of prisms
+ * \brief Print flags
  */
 //================================================================================
 
+std::string _LayerEdge::DumpFlags() const
+{
+  SMESH_Comment dump;
+  for ( int flag = 1; flag < 0x1000000; flag *= 2 )
+    if ( _flags & flag )
+    {
+      EFlags f = (EFlags) flag;
+      switch ( f ) {
+      case TO_SMOOTH:       dump << "TO_SMOOTH";       break;
+      case MOVED:           dump << "MOVED";           break;
+      case SMOOTHED:        dump << "SMOOTHED";        break;
+      case DIFFICULT:       dump << "DIFFICULT";       break;
+      case ON_CONCAVE_FACE: dump << "ON_CONCAVE_FACE"; break;
+      case BLOCKED:         dump << "BLOCKED";         break;
+      case INTERSECTED:     dump << "INTERSECTED";     break;
+      case NORMAL_UPDATED:  dump << "NORMAL_UPDATED";  break;
+      case MARKED:          dump << "MARKED";          break;
+      case MULTI_NORMAL:    dump << "MULTI_NORMAL";    break;
+      case NEAR_BOUNDARY:   dump << "NEAR_BOUNDARY";   break;
+      case SMOOTHED_C1:     dump << "SMOOTHED_C1";     break;
+      case DISTORTED:       dump << "DISTORTED";       break;
+      case RISKY_SWOL:      dump << "RISKY_SWOL";      break;
+      case SHRUNK:          dump << "SHRUNK";          break;
+      case UNUSED_FLAG:     dump << "UNUSED_FLAG";     break;
+      }
+      dump << " ";
+    }
+  cout << dump << endl;
+  return dump;
+}
+
+//================================================================================
+/*!
+  case brief:
+  default:
+*/
+//================================================================================
+
 bool _ViscousBuilder::refine(_SolidData& data)
 {
   SMESH_MesherHelper& helper = data.GetHelper();
@@ -9472,7 +9595,6 @@ bool _ViscousBuilder::refine(_SolidData& data)
   set< vector<const SMDS_MeshNode*>* >    nnSet;
   set< int >                       degenEdgeInd;
   vector<const SMDS_MeshElement*>     degenVols;
-  vector<int>                       isRiskySWOL;
 
   TopExp_Explorer exp( data._solid, TopAbs_FACE );
   for ( ; exp.More(); exp.Next() )
@@ -9490,7 +9612,6 @@ bool _ViscousBuilder::refine(_SolidData& data)
       nnVec.resize( nbNodes );
       nnSet.clear();
       degenEdgeInd.clear();
-      isRiskySWOL.resize( nbNodes );
       size_t maxZ = 0, minZ = std::numeric_limits<size_t>::max();
       SMDS_NodeIteratorPtr nIt = face->nodeIterator();
       for ( int iN = 0; iN < nbNodes; ++iN )
@@ -9501,7 +9622,6 @@ bool _ViscousBuilder::refine(_SolidData& data)
         nnVec[ i ] = & edge->_nodes;
         maxZ = std::max( maxZ, nnVec[ i ]->size() );
         minZ = std::min( minZ, nnVec[ i ]->size() );
-        //isRiskySWOL[ i ] = edge->Is( _LayerEdge::RISKY_SWOL );
 
         if ( helper.HasDegeneratedEdges() )
           nnSet.insert( nnVec[ i ]);
@@ -9610,7 +9730,7 @@ bool _ViscousBuilder::refine(_SolidData& data)
     if ( !err || err->IsOK() )
     {
       err.reset( new SMESH_ComputeError( COMPERR_WARNING,
-                                         "Degenerated volumes created" ));
+                                         "Bad quality volumes created" ));
       err->myBadElements.insert( err->myBadElements.end(),
                                  degenVols.begin(),degenVols.end() );
     }
@@ -9625,71 +9745,94 @@ bool _ViscousBuilder::refine(_SolidData& data)
  */
 //================================================================================
 
-bool _ViscousBuilder::shrink()
+bool _ViscousBuilder::shrink(_SolidData& theData)
 {
-  // make map of (ids of FACEs to shrink mesh on) to (_SolidData containing _LayerEdge's
-  // inflated along FACE or EDGE)
-  map< TGeomID, _SolidData* > f2sdMap;
+  // make map of (ids of FACEs to shrink mesh on) to (list of _SolidData containing
+  // _LayerEdge's inflated along FACE or EDGE)
+  map< TGeomID, list< _SolidData* > > f2sdMap;
   for ( size_t i = 0 ; i < _sdVec.size(); ++i )
   {
     _SolidData& data = _sdVec[i];
-    TopTools_MapOfShape FFMap;
     map< TGeomID, TopoDS_Shape >::iterator s2s = data._shrinkShape2Shape.begin();
     for (; s2s != data._shrinkShape2Shape.end(); ++s2s )
-      if ( s2s->second.ShapeType() == TopAbs_FACE )
+      if ( s2s->second.ShapeType() == TopAbs_FACE && !_shrinkedFaces.Contains( s2s->second ))
       {
-        f2sdMap.insert( make_pair( getMeshDS()->ShapeToIndex( s2s->second ), &data ));
+        f2sdMap[ getMeshDS()->ShapeToIndex( s2s->second )].push_back( &data );
 
-        if ( FFMap.Add( (*s2s).second ))
-          // Put mesh faces on the shrinked FACE to the proxy sub-mesh to avoid
-          // usage of mesh faces made in addBoundaryElements() by the 3D algo or
-          // by StdMeshers_QuadToTriaAdaptor
-          if ( SMESHDS_SubMesh* smDS = getMeshDS()->MeshElements( s2s->second ))
+        // Put mesh faces on the shrinked FACE to the proxy sub-mesh to avoid
+        // usage of mesh faces made in addBoundaryElements() by the 3D algo or
+        // by StdMeshers_QuadToTriaAdaptor
+        if ( SMESHDS_SubMesh* smDS = getMeshDS()->MeshElements( s2s->second ))
+        {
+          SMESH_ProxyMesh::SubMesh* proxySub =
+            data._proxyMesh->getFaceSubM( TopoDS::Face( s2s->second ), /*create=*/true);
+          if ( proxySub->NbElements() == 0 )
           {
-            SMESH_ProxyMesh::SubMesh* proxySub =
-              data._proxyMesh->getFaceSubM( TopoDS::Face( s2s->second ), /*create=*/true);
             SMDS_ElemIteratorPtr fIt = smDS->GetElements();
             while ( fIt->more() )
-              proxySub->AddElement( fIt->next() );
-            // as a result 3D algo will use elements from proxySub and not from smDS
+            {
+              const SMDS_MeshElement* f = fIt->next();
+              // as a result 3D algo will use elements from proxySub and not from smDS
+              proxySub->AddElement( f );
+              f->setIsMarked( true );
+
+              // Mark nodes on the FACE to discriminate them from nodes
+              // added by addBoundaryElements(); marked nodes are to be smoothed while shrink()
+              for ( int iN = 0, nbN = f->NbNodes(); iN < nbN; ++iN )
+              {
+                const SMDS_MeshNode* n = f->GetNode( iN );
+                if ( n->GetPosition()->GetDim() == 2 )
+                  n->setIsMarked( true );
+              }
+            }
           }
+        }
       }
   }
 
   SMESH_MesherHelper helper( *_mesh );
   helper.ToFixNodeParameters( true );
 
-  // EDGE's to shrink
+  // EDGEs to shrink
   map< TGeomID, _Shrinker1D > e2shrMap;
   vector< _EdgesOnShape* > subEOS;
   vector< _LayerEdge* > lEdges;
 
-  // loop on FACES to srink mesh on
-  map< TGeomID, _SolidData* >::iterator f2sd = f2sdMap.begin();
+  // loop on FACEs to srink mesh on
+  map< TGeomID, list< _SolidData* > >::iterator f2sd = f2sdMap.begin();
   for ( ; f2sd != f2sdMap.end(); ++f2sd )
   {
-    _SolidData&      data = *f2sd->second;
+    list< _SolidData* > & dataList = f2sd->second;
+    if ( dataList.front()->_n2eMap.empty() ||
+         dataList.back() ->_n2eMap.empty() )
+      continue; // not yet computed
+    if ( dataList.front() != &theData &&
+         dataList.back()  != &theData )
+      continue;
+
+    _SolidData&      data = *dataList.front();
+    _SolidData*     data2 = dataList.size() > 1 ? dataList.back() : 0;
     const TopoDS_Face&  F = TopoDS::Face( getMeshDS()->IndexToShape( f2sd->first ));
     SMESH_subMesh*     sm = _mesh->GetSubMesh( F );
     SMESHDS_SubMesh* smDS = sm->GetSubMeshDS();
 
-    Handle(Geom_Surface) surface = BRep_Tool::Surface(F);
+    Handle(Geom_Surface) surface = BRep_Tool::Surface( F );
 
-    helper.SetSubShape(F);
+    _shrinkedFaces.Add( F );
+    helper.SetSubShape( F );
 
     // ===========================
     // Prepare data for shrinking
     // ===========================
 
-    // Collect nodes to smooth, as src nodes are not yet replaced by tgt ones
-    // and hence all nodes on a FACE connected to 2d elements are to be smoothed
+    // Collect nodes to smooth (they are marked at the beginning of this method)
     vector < const SMDS_MeshNode* > smoothNodes;
     {
       SMDS_NodeIteratorPtr nIt = smDS->GetNodes();
       while ( nIt->more() )
       {
         const SMDS_MeshNode* n = nIt->next();
-        if ( n->NbInverseElements( SMDSAbs_Face ) > 0 )
+        if ( n->isMarked() )
           smoothNodes.push_back( n );
       }
     }
@@ -9701,10 +9844,10 @@ bool _ViscousBuilder::shrink()
     {
       vector<_Simplex> simplices;
       _Simplex::GetSimplices( smoothNodes[0], simplices, ignoreShapes );
-      helper.GetNodeUV( F, simplices[0]._nPrev, 0, &isOkUV ); // fix UV of silpmex nodes
+      helper.GetNodeUV( F, simplices[0]._nPrev, 0, &isOkUV ); // fix UV of simplex nodes
       helper.GetNodeUV( F, simplices[0]._nNext, 0, &isOkUV );
       gp_XY uv = helper.GetNodeUV( F, smoothNodes[0], 0, &isOkUV );
-      if ( !simplices[0].IsForward(uv, smoothNodes[0], F, helper,refSign) )
+      if ( !simplices[0].IsForward(uv, smoothNodes[0], F, helper, refSign ))
         refSign = -1;
     }
 
@@ -9720,8 +9863,13 @@ bool _ViscousBuilder::shrink()
         if ( data._noShrinkShapes.count( subID ))
           continue;
         _EdgesOnShape* eos = data.GetShapeEdges( subID );
-        if ( !eos || eos->_sWOL.IsNull() ) continue;
-
+        if ( !eos || eos->_sWOL.IsNull() )
+          if ( data2 ) // check in adjacent SOLID
+          {
+            eos = data2->GetShapeEdges( subID );
+            if ( !eos || eos->_sWOL.IsNull() )
+              continue;
+          }
         subEOS.push_back( eos );
 
         for ( size_t i = 0; i < eos->_edges.size(); ++i )
@@ -9754,7 +9902,7 @@ bool _ViscousBuilder::shrink()
         while ( fIt->more() )
         {
           const SMDS_MeshElement* f = fIt->next();
-          if ( !smDS->Contains( f ))
+          if ( !smDS->Contains( f ) || !f->isMarked() )
             continue;
           SMDS_NodeIteratorPtr nIt = f->nodeIterator();
           for ( int iN = 0; nIt->more(); ++iN )
@@ -9781,7 +9929,7 @@ bool _ViscousBuilder::shrink()
       {
         const SMDS_MeshNode* n = smoothNodes[i];
         nodesToSmooth[ i ]._node = n;
-        // src nodes must be replaced by tgt nodes to have tgt nodes in _simplices
+        // src nodes must be already replaced by tgt nodes to have tgt nodes in _simplices
         _Simplex::GetSimplices( n, nodesToSmooth[ i ]._simplices, ignoreShapes, 0, sortSimplices);
         // fix up incorrect uv of nodes on the FACE
         helper.GetNodeUV( F, n, 0, &isOkUV);
@@ -9812,6 +9960,10 @@ bool _ViscousBuilder::shrink()
         {
           _LayerEdge& edge = * eos._edges[i];
           _Simplex::GetSimplices( /*tgtNode=*/edge._nodes.back(), edge._simplices, ignoreShapes );
+
+          // additionally mark tgt node; only marked nodes will be used in SetNewLength2d()
+          // not-marked nodes are those added by refine()
+          edge._nodes.back()->setIsMarked( true );
         }
       }
     }
@@ -9948,6 +10100,8 @@ bool _ViscousBuilder::shrink()
 
     if ( !errMsg.empty() ) // Try to re-compute the shrink FACE
     {
+      debugMsg( "Re-compute FACE " << f2sd->first << " because " << errMsg );
+
       // remove faces
       SMESHDS_SubMesh* psm = data._proxyMesh->getFaceSubM( F );
       {
@@ -9987,7 +10141,8 @@ bool _ViscousBuilder::shrink()
         {
           _LayerEdge*       edge = subEOS[iS]->_edges[i];
           SMDS_MeshNode* tgtNode = const_cast< SMDS_MeshNode*& >( edge->_nodes.back() );
-          if ( edge->_pos.empty() ) continue;
+          if ( edge->_pos.empty() ||
+               edge->Is( _LayerEdge::SHRUNK )) continue;
           if ( subEOS[iS]->SWOLType() == TopAbs_FACE )
           {
             SMDS_FacePosition* pos = static_cast<SMDS_FacePosition*>( tgtNode->GetPosition() );
@@ -10143,6 +10298,8 @@ bool _ViscousBuilder::shrink()
 
     // Set an event listener to clear FACE sub-mesh together with SOLID sub-mesh
     VISCOUS_3D::ToClearSubWithMain( sm, data._solid );
+    if ( data2 )
+      VISCOUS_3D::ToClearSubWithMain( sm, data2->_solid );
 
   } // loop on FACES to srink mesh on
 
@@ -10175,6 +10332,7 @@ bool _ViscousBuilder::prepareEdgeToShrink( _LayerEdge&            edge,
     if ( tgtNode->GetPosition()->GetDim() != 2 ) // not inflated edge
     {
       edge._pos.clear();
+      edge.Set( _LayerEdge::SHRUNK );
       return srcNode == tgtNode;
     }
     gp_XY srcUV ( edge._pos[0].X(), edge._pos[0].Y() );          //helper.GetNodeUV( F, srcNode );
@@ -10185,7 +10343,7 @@ bool _ViscousBuilder::prepareEdgeToShrink( _LayerEdge&            edge,
     edge._normal.SetCoord( uvDir.X(),uvDir.Y(), 0 );
     edge._len = uvLen;
 
-    edge._pos.resize(1);
+    //edge._pos.resize(1);
     edge._pos[0].SetCoord( tgtUV.X(), tgtUV.Y(), 0 );
 
     // set UV of source node to target node
@@ -10198,6 +10356,7 @@ bool _ViscousBuilder::prepareEdgeToShrink( _LayerEdge&            edge,
     if ( tgtNode->GetPosition()->GetDim() != 1 ) // not inflated edge
     {
       edge._pos.clear();
+      edge.Set( _LayerEdge::SHRUNK );
       return srcNode == tgtNode;
     }
     const TopoDS_Edge&    E = TopoDS::Edge( eos._sWOL );
@@ -10219,16 +10378,17 @@ bool _ViscousBuilder::prepareEdgeToShrink( _LayerEdge&            edge,
 
     double uSrc = helper.GetNodeU( E, srcNode, n2 );
     double uTgt = helper.GetNodeU( E, tgtNode, srcNode );
-    double u2   = helper.GetNodeU( E, n2, srcNode );
+    double u2   = helper.GetNodeU( E, n2,      srcNode );
 
-    edge._pos.clear();
+    //edge._pos.clear();
 
     if ( fabs( uSrc-uTgt ) < 0.99 * fabs( uSrc-u2 ))
     {
       // tgtNode is located so that it does not make faces with wrong orientation
+      edge.Set( _LayerEdge::SHRUNK );
       return true;
     }
-    edge._pos.resize(1);
+    //edge._pos.resize(1);
     edge._pos[0].SetCoord( U_TGT, uTgt );
     edge._pos[0].SetCoord( U_SRC, uSrc );
     edge._pos[0].SetCoord( LEN_TGT, fabs( uSrc-uTgt ));
@@ -10449,7 +10609,7 @@ bool _LayerEdge::SetNewLength2d( Handle(Geom_Surface)& surface,
                                  _EdgesOnShape&        eos,
                                  SMESH_MesherHelper&   helper )
 {
-  if ( _pos.empty() )
+  if ( Is( SHRUNK ))
     return false; // already at the target position
 
   SMDS_MeshNode* tgtNode = const_cast< SMDS_MeshNode*& >( _nodes.back() );
@@ -10466,6 +10626,10 @@ bool _LayerEdge::SetNewLength2d( Handle(Geom_Surface)& surface,
     double stepSize = 1e100;
     for ( size_t i = 0; i < _simplices.size(); ++i )
     {
+      if ( !_simplices[i]._nPrev->isMarked() ||
+           !_simplices[i]._nNext->isMarked() )
+        continue; // simplex of quadrangle created by addBoundaryElements()
+
       // find intersection of 2 lines: curUV-tgtUV and that connecting simplex nodes
       gp_XY uvN1 = helper.GetNodeUV( F, _simplices[i]._nPrev );
       gp_XY uvN2 = helper.GetNodeUV( F, _simplices[i]._nNext );
@@ -10481,7 +10645,8 @@ bool _LayerEdge::SetNewLength2d( Handle(Geom_Surface)& surface,
     if ( uvLen <= stepSize )
     {
       newUV = tgtUV;
-      _pos.clear();
+      Set( SHRUNK );
+      //_pos.clear();
     }
     else if ( stepSize > 0 )
     {
@@ -10514,7 +10679,8 @@ bool _LayerEdge::SetNewLength2d( Handle(Geom_Surface)& surface,
     double newU = _pos[0].Coord( U_TGT );
     if ( lenTgt < 0.99 * fabs( uSrc-u2 )) // n2 got out of src-tgt range
     {
-      _pos.clear();
+      Set( _LayerEdge::SHRUNK );
+      //_pos.clear();
     }
     else
     {
@@ -10747,7 +10913,7 @@ void _Shrinker1D::AddEdge( const _LayerEdge*   e,
     _done = false;
   }
   // check _LayerEdge
-  if ( e == _edges[0] || e == _edges[1] )
+  if ( e == _edges[0] || e == _edges[1] || e->_nodes.size() < 2 )
     return;
   if ( eos.SWOLType() != TopAbs_EDGE )
     throw SALOME_Exception(LOCALIZED("Wrong _LayerEdge is added"));
@@ -10784,9 +10950,18 @@ void _Shrinker1D::AddEdge( const _LayerEdge*   e,
     while ( nIt->more() )
     {
       const SMDS_MeshNode* node = nIt->next();
+
+      // skip refinement nodes
       if ( node->NbInverseElements(SMDSAbs_Edge) == 0 ||
            node == tgtNode0 || node == tgtNode1 )
-        continue; // refinement nodes
+        continue;
+      bool hasMarkedFace = false;
+      SMDS_ElemIteratorPtr fIt = node->GetInverseElementIterator(SMDSAbs_Face);
+      while ( fIt->more() && !hasMarkedFace )
+        hasMarkedFace = fIt->next()->isMarked();
+      if ( !hasMarkedFace )
+        continue;
+
       _nodes.push_back( node );
       _initU.push_back( helper.GetNodeU( _geomEdge, node ));
       double len = GCPnts_AbscissaPoint::Length(aCurve, f, _initU.back());
@@ -10819,8 +10994,8 @@ void _Shrinker1D::Compute(bool set3D, SMESH_MesherHelper& helper)
   if ( !e ) e = _edges[1];
   if ( !e ) return;
 
-  _done =  (( !_edges[0] || _edges[0]->_pos.empty() ) &&
-            ( !_edges[1] || _edges[1]->_pos.empty() ));
+  _done =  (( !_edges[0] || _edges[0]->Is( _LayerEdge::SHRUNK )) &&
+            ( !_edges[1] || _edges[1]->Is( _LayerEdge::SHRUNK )));
 
   double f,l;
   if ( set3D || _done )
@@ -10901,11 +11076,12 @@ void _Shrinker1D::SwapSrcTgtNodes( SMESHDS_Mesh* mesh )
     if ( !eSubMesh ) return;
     const SMDS_MeshNode* srcNode = _edges[i]->_nodes[0];
     const SMDS_MeshNode* tgtNode = _edges[i]->_nodes.back();
+    const SMDS_MeshNode* scdNode = _edges[i]->_nodes[1];
     SMDS_ElemIteratorPtr eIt = srcNode->GetInverseElementIterator(SMDSAbs_Edge);
     while ( eIt->more() )
     {
       const SMDS_MeshElement* e = eIt->next();
-      if ( !eSubMesh->Contains( e ))
+      if ( !eSubMesh->Contains( e ) || e->GetNodeIndex( scdNode ) >= 0 )
           continue;
       SMDS_ElemIteratorPtr nIt = e->nodesIterator();
       for ( int iN = 0; iN < e->NbNodes(); ++iN )
@@ -10924,21 +11100,22 @@ void _Shrinker1D::SwapSrcTgtNodes( SMESHDS_Mesh* mesh )
  */
 //================================================================================
 
-bool _ViscousBuilder::addBoundaryElements()
+bool _ViscousBuilder::addBoundaryElements(_SolidData& data)
 {
   SMESH_MesherHelper helper( *_mesh );
 
   vector< const SMDS_MeshNode* > faceNodes;
 
-  for ( size_t i = 0; i < _sdVec.size(); ++i )
+  //for ( size_t i = 0; i < _sdVec.size(); ++i )
   {
-    _SolidData& data = _sdVec[i];
+    //_SolidData& data = _sdVec[i];
     TopTools_IndexedMapOfShape geomEdges;
     TopExp::MapShapes( data._solid, TopAbs_EDGE, geomEdges );
     for ( int iE = 1; iE <= geomEdges.Extent(); ++iE )
     {
       const TopoDS_Edge& E = TopoDS::Edge( geomEdges(iE));
-      if ( data._noShrinkShapes.count( getMeshDS()->ShapeToIndex( E )))
+      const TGeomID edgeID = getMeshDS()->ShapeToIndex( E );
+      if ( data._noShrinkShapes.count( edgeID ))
         continue;
 
       // Get _LayerEdge's based on E
@@ -10987,10 +11164,9 @@ bool _ViscousBuilder::addBoundaryElements()
       // Find out orientation and type of face to create
 
       bool reverse = false, isOnFace;
-      
-      map< TGeomID, TopoDS_Shape >::iterator e2f =
-        data._shrinkShape2Shape.find( getMeshDS()->ShapeToIndex( E ));
       TopoDS_Shape F;
+
+      map< TGeomID, TopoDS_Shape >::iterator e2f = data._shrinkShape2Shape.find( edgeID );
       if (( isOnFace = ( e2f != data._shrinkShape2Shape.end() )))
       {
         F = e2f->second.Oriented( TopAbs_FORWARD );
@@ -11000,17 +11176,12 @@ bool _ViscousBuilder::addBoundaryElements()
         if ( helper.IsReversedSubMesh( TopoDS::Face(F) ))
           reverse = !reverse;
       }
-      else
+      else if ( !data._ignoreFaceIds.count( e2f->first ))
       {
         // find FACE with layers sharing E
-        PShapeIteratorPtr fIt = helper.GetAncestors( E, *_mesh, TopAbs_FACE );
-        while ( fIt->more() && F.IsNull() )
-        {
-          const TopoDS_Shape* pF = fIt->next();
-          if ( helper.IsSubShape( *pF, data._solid) &&
-               !data._ignoreFaceIds.count( e2f->first ))
-            F = *pF;
-        }
+        PShapeIteratorPtr fIt = helper.GetAncestors( E, *_mesh, TopAbs_FACE, &data._solid );
+        if ( fIt->more() )
+          F = *( fIt->next() );
       }
       // Find the sub-mesh to add new faces
       SMESHDS_SubMesh* sm = 0;
@@ -11021,18 +11192,44 @@ bool _ViscousBuilder::addBoundaryElements()
       if ( !sm )
         return error("error in addBoundaryElements()", data._index);
 
+      // Find a proxy sub-mesh of the FACE of an adjacent SOLID, which will use the new boundary
+      // faces for 3D meshing (PAL23414)
+      SMESHDS_SubMesh* adjSM = 0;
+      if ( isOnFace )
+      {
+        const TGeomID   faceID = sm->GetID();
+        PShapeIteratorPtr soIt = helper.GetAncestors( F, *_mesh, TopAbs_SOLID );
+        while ( const TopoDS_Shape* solid = soIt->next() )
+          if ( !solid->IsSame( data._solid ))
+          {
+            size_t iData = _solids.FindIndex( *solid ) - 1;
+            if ( iData < _sdVec.size() &&
+                 _sdVec[ iData ]._ignoreFaceIds.count( faceID ) &&
+                 _sdVec[ iData ]._shrinkShape2Shape.count( edgeID ) == 0 )
+            {
+              SMESH_ProxyMesh::SubMesh* proxySub =
+                _sdVec[ iData ]._proxyMesh->getFaceSubM( TopoDS::Face( F ), /*create=*/false);
+              if ( proxySub && proxySub->NbElements() > 0 )
+                adjSM = proxySub;
+            }
+          }
+      }
+
       // Make faces
       const int dj1 = reverse ? 0 : 1;
       const int dj2 = reverse ? 1 : 0;
+      vector< const SMDS_MeshElement*> ff; // new faces row
+      SMESHDS_Mesh* m = getMeshDS();
       for ( size_t j = 1; j < ledges.size(); ++j )
       {
         vector< const SMDS_MeshNode*>&  nn1 = ledges[j-dj1]->_nodes;
         vector< const SMDS_MeshNode*>&  nn2 = ledges[j-dj2]->_nodes;
+        ff.resize( std::max( nn1.size(), nn2.size() ), NULL );
         if ( nn1.size() == nn2.size() )
         {
           if ( isOnFace )
             for ( size_t z = 1; z < nn1.size(); ++z )
-              sm->AddElement( getMeshDS()->AddFace( nn1[z-1], nn2[z-1], nn2[z], nn1[z] ));
+              sm->AddElement( ff[z-1] = m->AddFace( nn1[z-1], nn2[z-1], nn2[z], nn1[z] ));
           else
             for ( size_t z = 1; z < nn1.size(); ++z )
               sm->AddElement( new SMDS_FaceOfNodes( nn1[z-1], nn2[z-1], nn2[z], nn1[z] ));
@@ -11041,7 +11238,7 @@ bool _ViscousBuilder::addBoundaryElements()
         {
           if ( isOnFace )
             for ( size_t z = 1; z < nn2.size(); ++z )
-              sm->AddElement( getMeshDS()->AddFace( nn1[0], nn2[z-1], nn2[z] ));
+              sm->AddElement( ff[z-1] = m->AddFace( nn1[0], nn2[z-1], nn2[z] ));
           else
             for ( size_t z = 1; z < nn2.size(); ++z )
               sm->AddElement( new SMDS_FaceOfNodes( nn1[0], nn2[z-1], nn2[z] ));
@@ -11050,11 +11247,19 @@ bool _ViscousBuilder::addBoundaryElements()
         {
           if ( isOnFace )
             for ( size_t z = 1; z < nn1.size(); ++z )
-              sm->AddElement( getMeshDS()->AddFace( nn1[z-1], nn2[0], nn1[z] ));
+              sm->AddElement( ff[z-1] = m->AddFace( nn1[z-1], nn2[0], nn1[z] ));
           else
             for ( size_t z = 1; z < nn1.size(); ++z )
               sm->AddElement( new SMDS_FaceOfNodes( nn1[z-1], nn2[0], nn2[z] ));
         }
+
+        if ( adjSM ) // add faces to a proxy SM of the adjacent SOLID
+        {
+          for ( size_t z = 0; z < ff.size(); ++z )
+            if ( ff[ z ])
+              adjSM->AddElement( ff[ z ]);
+          ff.clear();
+        }
       }
 
       // Make edges
@@ -11065,7 +11270,7 @@ bool _ViscousBuilder::addBoundaryElements()
         if ( eos && eos->SWOLType() == TopAbs_EDGE )
         {
           vector< const SMDS_MeshNode*>&  nn = edge->_nodes;
-          if ( nn.size() < 2 || nn[1]->GetInverseElementIterator( SMDSAbs_Edge )->more() )
+          if ( nn.size() < 2 || nn[1]->NbInverseElements( SMDSAbs_Edge ) >= 2 )
             continue;
           helper.SetSubShape( eos->_sWOL );
           helper.SetElementsOnShape( true );
index 32cf255ecc95f616c59f1565b3125dc0263d3b3b..ecd62abc20462cf179b9dd8fb116eb631d0b7dad 100644 (file)
@@ -585,7 +585,7 @@ StdMeshers_ViscousLayers2D::CheckHypothesis(SMESH_Mesh&
       VISCOUS_2D::_ViscousBuilder2D builder( theMesh, face, hyps, hypShapes );
       builder._faceSideVec =
         StdMeshers_FaceSide::GetFaceWires( face, theMesh, true, error,
-                                           SMESH_ProxyMesh::Ptr(),
+                                           NULL, SMESH_ProxyMesh::Ptr(),
                                            /*theCheckVertexNodes=*/false);
       if ( error->IsOK() && !builder.findEdgesWithLayers())
       {
@@ -686,7 +686,7 @@ bool _ViscousBuilder2D::error(const string& text )
 
 SMESH_ProxyMesh::Ptr _ViscousBuilder2D::Compute()
 {
-  _faceSideVec = StdMeshers_FaceSide::GetFaceWires( _face, *_mesh, true, _error);
+  _faceSideVec = StdMeshers_FaceSide::GetFaceWires( _face, *_mesh, true, _error, &_helper );
 
   if ( !_error->IsOK() )
     return _proxyMesh;
@@ -1263,7 +1263,7 @@ void _ViscousBuilder2D::adjustCommonEdge( _PolyLine& LL, _PolyLine& LR )
           if ( isR )
             LR._lEdges.erase( LR._lEdges.begin()+1, eIt );
           else
-            LL._lEdges.erase( eIt, --LL._lEdges.end() );
+            LL._lEdges.erase( eIt+1, --LL._lEdges.end() );
           // eIt = isR ? L._lEdges.begin()+1 : L._lEdges.end()-2;
           // for ( size_t i = 1; i < iLE; ++i, eIt += dIt )
           //   eIt->_isBlocked = true;
@@ -1744,11 +1744,13 @@ bool _ViscousBuilder2D::shrink()
         }
       } // loop on FACEs sharing E
 
+    // Check if L is an already shrinked seam
+    if ( adjFace.IsNull() && _helper.IsRealSeam( edgeID ))
+      if ( L._wire->Edge( L._edgeInd ).Orientation() == TopAbs_FORWARD )
+        continue;
     // Commented as a case with a seam EDGE (issue 0052461) is hard to support
     // because SMESH_ProxyMesh can't hold different sub-meshes for two
     // 2D representations of the seam. But such a case is not a real practice one.
-    // Check if L is an already shrinked seam
-    // if ( adjFace.IsNull() && _helper.IsRealSeam( edgeID ))
     // {
     //   for ( int iL2 = iL1-1; iL2 > -1; --iL2 )
     //   {
@@ -2185,7 +2187,7 @@ bool _ViscousBuilder2D::refine()
     vector< double > segLen( L._lEdges.size() );
     segLen[0] = 0.0;
 
-    // check if length modification is usefull: look for _LayerEdge's
+    // check if length modification is useful: look for _LayerEdge's
     // with length limited due to collisions
     bool lenLimited = false;
     for ( size_t iLE = 1; ( iLE < L._lEdges.size()-1 && !lenLimited ); ++iLE )
@@ -2438,6 +2440,19 @@ bool _ViscousBuilder2D::refine()
     nodeDataVec.front().param = L._wire->FirstU( L._edgeInd );
     nodeDataVec.back() .param = L._wire->LastU ( L._edgeInd );
 
+    if (( nodeDataVec[0].node == nodeDataVec.back().node ) &&
+        ( _helper.GetPeriodicIndex() == 1 || _helper.GetPeriodicIndex() == 2 )) // closed EDGE
+    {
+      const int iCoord = _helper.GetPeriodicIndex();
+      gp_XY uv = nodeDataVec[0].UV();
+      uv.SetCoord( iCoord, L._lEdges[0]._uvOut.Coord( iCoord ));
+      nodeDataVec[0].SetUV( uv );
+
+      uv = nodeDataVec.back().UV();
+      uv.SetCoord( iCoord, L._lEdges.back()._uvOut.Coord( iCoord ));
+      nodeDataVec.back().SetUV( uv );
+    }
+
     _ProxyMeshOfFace::_EdgeSubMesh* edgeSM
       = getProxyMesh()->GetEdgeSubMesh( L._wire->EdgeID( L._edgeInd ));
     edgeSM->SetUVPtStructVec( nodeDataVec );
index e122efa8e2c716e7cb8f43ad06d669526879ff04..eddf11b3ca74d57cc92a5dac7bdda9051084c75c 100644 (file)
@@ -980,7 +980,7 @@ QFrame* StdMeshersGUI_CartesianParamCreator::buildFrame()
 
 //================================================================================
 /*!
- * \brief Tranfer parameters from hypothesis to widgets
+ * \brief Transfer parameters from hypothesis to widgets
  */
 //================================================================================
 
@@ -1068,7 +1068,7 @@ void StdMeshersGUI_CartesianParamCreator::retrieveParams() const
 
 //================================================================================
 /*!
- * \brief Tranfer parameters from widgets to hypothesis
+ * \brief Transfer parameters from widgets to hypothesis
  */
 //================================================================================
 
index 4e2b157eeffc451c41fbe7908a662fadd8b620fb..d1acacfef479efdb954220f71916df7a8575cae6 100644 (file)
@@ -331,7 +331,7 @@ StdMeshersGUI_DistrTableFrame::Table::
 argMinimum( int r ) const
 {
   // for the first row the minimum value is always 0.0
-  // for the other rows the minumum value is the above row's value
+  // for the other rows the minimum value is the above row's value
   double val = 0.0;
   if ( r > 0 && r < rowCount() )
     val = value( r-1, ArgColumn );
@@ -343,7 +343,7 @@ StdMeshersGUI_DistrTableFrame::Table::
 argMaximum( int r ) const
 {
   // for the last row the maximum value is always 1.0
-  // for the other rows the maxumum value is the below row's value
+  // for the other rows the maximum value is the below row's value
   double val = 1.0;
   if ( r >= 0 && r < rowCount()-1 ) {
     val = value( r+1, ArgColumn );
index c8a6c204f32e96b9e700034d4467c4799484f1e7..f81c04db0ea4c052917b4bf04c6c2af45c3b5624 100644 (file)
@@ -45,7 +45,7 @@ StdMeshersGUI_RadioButtonsGrpWdg::StdMeshersGUI_RadioButtonsGrpWdg( const QStrin
 
 //================================================================================
 /*!
- * \brief Creates a given nubmer of button labels with given labels (QString's)
+ * \brief Creates a given number of button labels with given labels (QString's)
  */
 //================================================================================
 
index 0ba30408664397aa29ab0530d5bebb0d15f58942..0518ee07ced03b644f3a84aa120d19bba24d92bc 100644 (file)
@@ -37,6 +37,7 @@
 #include <SALOME_ListIO.hxx>
 #include <SUIT_OverrideCursor.h>
 #include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
 #include <SVTK_Selector.h>
 #include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
 StdMeshersGUI_SubShapeSelectorWdg
 ::StdMeshersGUI_SubShapeSelectorWdg( QWidget *        parent,
                                      TopAbs_ShapeEnum subShType,
-                                     const bool       toShowList ):
+                                     const bool       toShowList,
+                                     const bool       toShowActivateBtn ):
   QWidget( parent ),
   myMaxSize( -1 ),
   myPreviewActor( 0 )
 {
   QPixmap image0( SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap( "SMESH", tr( "ICON_SELECT" ) ) );
 
-  QGridLayout* edgesLayout = new QGridLayout( this );
-  edgesLayout->setMargin( MARGIN );
-  edgesLayout->setSpacing( SPACING );
+  QGridLayout* layout = new QGridLayout( this );
+  layout->setMargin( MARGIN );
+  layout->setSpacing( SPACING );
 
   if ( toShowList )
   {
-    myListWidget   = new QListWidget( this );
-    myAddButton    = new QPushButton( tr( "SMESH_BUT_ADD" ),    this );
-    myRemoveButton = new QPushButton( tr( "SMESH_BUT_REMOVE" ), this );
+    QPixmap iconSelect (SUIT_Session::session()->resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
+    myListWidget     = new QListWidget( this );
+    myActivateButton = new QPushButton( iconSelect, "", this );
+    myAddButton      = new QPushButton( tr( "SMESH_BUT_ADD" ),    this );
+    myRemoveButton   = new QPushButton( tr( "SMESH_BUT_REMOVE" ), this );
     myListWidget->setSelectionMode( QListWidget::ExtendedSelection );
     myListWidget->setMinimumWidth(300);
+    myListWidget->setWrapping(true);
+    myActivateButton->setCheckable( true );
   }
   else
   {
-    myListWidget   = 0;
-    myAddButton    = 0;
-    myRemoveButton = 0;
+    myListWidget     = 0;
+    myActivateButton = 0;
+    myAddButton      = 0;
+    myRemoveButton   = 0;
   }
   myInfoLabel    = new QLabel( this );
   myPrevButton   = new QPushButton( "<<", this );
@@ -103,21 +110,27 @@ StdMeshersGUI_SubShapeSelectorWdg
 
   if ( myListWidget )
   {
-    edgesLayout->addWidget(myListWidget,   0, 0, 3, 3);
-    edgesLayout->addWidget(myAddButton,    0, 3);
-    edgesLayout->addWidget(myRemoveButton, 1, 3);
-    edgesLayout->addWidget(myInfoLabel,    3, 0, 1, 3);
-    edgesLayout->addWidget(myPrevButton,   4, 0);
-    edgesLayout->addWidget(myNextButton,   4, 2);
-
-    edgesLayout->setRowStretch(2, 5);
-    edgesLayout->setColumnStretch(1, 5);
+    int row = 0;
+    layout->addWidget(myListWidget,   row, 0, 3+toShowActivateBtn, 3);
+    if ( toShowActivateBtn )
+      layout->addWidget( myActivateButton, row++, 3 );
+    else
+      myActivateButton->hide();
+    layout->addWidget(myAddButton,      row, 3);
+    layout->addWidget(myRemoveButton, ++row, 3);
+    ++row;
+    layout->addWidget(myInfoLabel,    ++row, 0, 1, 3);
+    layout->addWidget(myPrevButton,   ++row, 0);
+    layout->addWidget(myNextButton,     row, 2);
+
+    layout->setRowStretch(row-2, 5);
+    layout->setColumnStretch(1, 5);
   }
   else // show only Prev and Next buttons
   {
-    edgesLayout->addWidget(myInfoLabel,    0, 0, 1, 2);
-    edgesLayout->addWidget(myPrevButton,   1, 0);
-    edgesLayout->addWidget(myNextButton,   1, 1);
+    layout->addWidget(myInfoLabel,    0, 0, 1, 2);
+    layout->addWidget(myPrevButton,   1, 0);
+    layout->addWidget(myNextButton,   1, 1);
   }
   //myInfoLabel->setMinimumWidth(300);
   //myInfoLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
@@ -187,6 +200,7 @@ void StdMeshersGUI_SubShapeSelectorWdg::init()
     myRemoveButton->setEnabled( false );
 
     connect( myListWidget,   SIGNAL(itemSelectionChanged()),    this, SLOT(onListSelectionChanged()));
+    connect( myActivateButton, SIGNAL( toggled(bool) ), SLOT( ActivateSelection(bool)));
     connect( myAddButton,    SIGNAL(clicked()), SLOT(onAdd()));
     connect( myRemoveButton, SIGNAL(clicked()), SLOT(onRemove()));
   }
@@ -248,6 +262,15 @@ void StdMeshersGUI_SubShapeSelectorWdg::ShowPreview( bool visible)
 
 void StdMeshersGUI_SubShapeSelectorWdg::ActivateSelection( bool toActivate )
 {
+  // adjust state of myActivateButton
+  if ( myActivateButton &&
+       myActivateButton != sender() &&
+       myActivateButton->isChecked() != toActivate )
+  {
+    myActivateButton->toggle();
+    return;
+  }
+
   if ( !mySelectionMgr ) return;
 
   if ( toActivate )
@@ -258,6 +281,9 @@ void StdMeshersGUI_SubShapeSelectorWdg::ActivateSelection( bool toActivate )
   {
     disconnect(mySelectionMgr, 0, this, 0 );
   }
+
+  if ( sender() == myActivateButton )
+    ShowPreview( toActivate );
 }
 
 //================================================================================
@@ -361,6 +387,7 @@ void StdMeshersGUI_SubShapeSelectorWdg::selectionIntoArgument()
     myAddButton->setEnabled(( myListWidget->count() < myMaxSize || myMaxSize == -1 ) &&
                             ( mySelectedIDs.size() > 0                             ) &&
                             ( mySelectedIDs.size() <= myMaxSize || myMaxSize == -1 ) );
+    myRemoveButton->setEnabled( mySelectedIDs.size() > 0 );
 
     //Connect Selected Ids in viewer and dialog's Ids list
     bool signalsBlocked = myListWidget->blockSignals( true );
index adf62f1d6cdb5fd43c521a1ec05810afeb062c7d..577d310419bb33afd3197f2ae9a0e62dfb47a283 100644 (file)
@@ -52,7 +52,8 @@ class STDMESHERSGUI_EXPORT StdMeshersGUI_SubShapeSelectorWdg : public QWidget
 public:
   StdMeshersGUI_SubShapeSelectorWdg( QWidget*         parent = 0,
                                      TopAbs_ShapeEnum subShType = TopAbs_EDGE,
-                                     const bool       toShowList = true);
+                                     const bool       toShowList = true,
+                                     const bool       toShowActivateBtn = false);
   ~StdMeshersGUI_SubShapeSelectorWdg();
 
   SMESH::long_array_var          GetListOfIDs();
@@ -80,6 +81,8 @@ public:
   vtkRenderer*                   GetRenderer() { return myRenderer; }
   SMESH_PreviewActorsCollection* GetActorCollection() { return myPreviewActor; }
   void                           ClearSelected();
+
+public slots:
   void                           ActivateSelection( bool );
 
 signals:
@@ -114,6 +117,7 @@ private:
   vtkRenderer*                   myRenderer;
   
   QListWidget*                   myListWidget;
+  QPushButton*                   myActivateButton;
   QPushButton*                   myAddButton;
   QPushButton*                   myRemoveButton;
   QLabel*                        myInfoLabel;
index 0f56903ef2b147f423333fdf675f5f97c8c54168..5957a63ad08c50c6d127314f0fbd0cdeda715001 100644 (file)
             <source>ICON_SMESH_TREE_ALGO_Projection_2D</source>
             <translation>mesh_tree_algo_projection_2d.png</translation>
         </message>
+        <message>
+            <source>ICON_SMESH_TREE_ALGO_Projection_1D2D</source>
+            <translation>mesh_tree_algo_projection_2d.png</translation>
+        </message>
         <message>
             <source>ICON_SMESH_TREE_ALGO_Projection_3D</source>
             <translation>mesh_tree_hypo_projection_3d.png</translation>
             <source>ICON_SMESH_TREE_HYPO_Arithmetic1D</source>
             <translation>mesh_tree_hypo_length.png</translation>
         </message>
+        <message>
+            <source>ICON_SMESH_TREE_HYPO_CartesianParameters3D</source>
+            <translation>mesh_tree_hypo_cartesian.png</translation>
+        </message>
         <message>
             <source>ICON_SMESH_TREE_HYPO_Geometric1D</source>
             <translation>mesh_tree_hypo_length.png</translation>
             <source>ICON_SMESH_TREE_HYPO_QuadranglePreference</source>
             <translation>mesh_tree_algo_quad.png</translation>
         </message>
+        <message>
+            <source>ICON_SMESH_TREE_HYPO_QuadrangleParams</source>
+            <translation>mesh_tree_algo_quad.png</translation>
+        </message>
         <message>
             <source>ICON_SMESH_TREE_HYPO_TrianglePreference</source>
             <translation>mesh_tree_algo_mefisto.png</translation>
         </message>
         <message>
             <source>ICON_SMESH_TREE_HYPO_QuadraticMesh</source>
-            <translation>mesh_tree_hypo_length.png</translation>
+            <translation>mesh_tree_hypo_quadratic.png</translation>
         </message>
         <message>
             <source>ICON_SMESH_TREE_HYPO_SegmentLengthAroundVertex</source>
index 4b2214cfc50f09215c0fd68329d31bd32fad84bf..d0439c955f07ca29aaa536f396150e689ed82c28 100644 (file)
@@ -56,7 +56,6 @@ StdMeshers_Adaptive1D_i::StdMeshers_Adaptive1D_i( PortableServer::POA_ptr thePOA
 
 StdMeshers_Adaptive1D_i::~StdMeshers_Adaptive1D_i()
 {
-  MESSAGE( "StdMeshers_Adaptive1D_i::~StdMeshers_Adaptive1D_i" );
 }
 
 //=======================================================================
index 01ebbfa7b22fac5b23ade43d4a7827eeff78c740..824530ec2b2db20ede5d099baee0371fe5bae779 100644 (file)
@@ -51,7 +51,6 @@ StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i( PortableServer::POA_ptr th
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i" );
   myBaseImpl = new ::StdMeshers_Arithmetic1D( theGenImpl->GetANewId(),
                                              theStudyId,
                                              theGenImpl );
@@ -67,7 +66,6 @@ StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i( PortableServer::POA_ptr th
 
 StdMeshers_Arithmetic1D_i::~StdMeshers_Arithmetic1D_i()
 {
-  MESSAGE( "StdMeshers_Arithmetic1D_i::~StdMeshers_Arithmetic1D_i" );
 }
 
 //=============================================================================
@@ -82,7 +80,6 @@ void StdMeshers_Arithmetic1D_i::SetLength(CORBA::Double theLength,
                                           CORBA::Boolean theIsStart )
      throw ( SALOME::SALOME_Exception )
 {
-  MESSAGE( "StdMeshers_StartEndLength_i::SetLength" );
   ASSERT( myBaseImpl );
   try {
     this->GetImpl()->SetLength( theLength, theIsStart );
@@ -132,7 +129,6 @@ void StdMeshers_Arithmetic1D_i::SetEndLength( CORBA::Double length)
 
 CORBA::Double StdMeshers_Arithmetic1D_i::GetLength( CORBA::Boolean theIsStart)
 {
-  MESSAGE( "StdMeshers_Arithmetic1D_i::GetLength" );
   ASSERT( myBaseImpl );
   return this->GetImpl()->GetLength( theIsStart );
 }
@@ -197,7 +193,6 @@ void StdMeshers_Arithmetic1D_i::SetObjectEntry( const char* theEntry )
 
 char* StdMeshers_Arithmetic1D_i::GetObjectEntry()
 {
-  MESSAGE( "StdMeshers_Arithmetic1D_i::SetObjectEntry" );
   ASSERT( myBaseImpl );
   const char* entry;
   try {
@@ -220,7 +215,6 @@ char* StdMeshers_Arithmetic1D_i::GetObjectEntry()
 
 SMESH::long_array* StdMeshers_Arithmetic1D_i::GetReversedEdges()
 {
-  MESSAGE( "StdMeshers_StartEndLength_i::GetReversedEdges" );
   ASSERT( myBaseImpl );
   SMESH::long_array_var anArray = new SMESH::long_array;
   std::vector<int> ids = this->GetImpl()->GetReversedEdges();
@@ -241,7 +235,6 @@ SMESH::long_array* StdMeshers_Arithmetic1D_i::GetReversedEdges()
 
 ::StdMeshers_Arithmetic1D* StdMeshers_Arithmetic1D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_Arithmetic1D_i::GetImpl" );
   return ( ::StdMeshers_Arithmetic1D* )myBaseImpl;
 }
 
index 580ccb6533bfdbebc8679ed208037719edf9b563..d532e39351b70d0d476c027e3facebdcc83c221d 100644 (file)
@@ -52,7 +52,6 @@ StdMeshers_AutomaticLength_i::StdMeshers_AutomaticLength_i( PortableServer::POA_
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_AutomaticLength_i::StdMeshers_AutomaticLength_i" );
   myBaseImpl = new ::StdMeshers_AutomaticLength( theGenImpl->GetANewId(),
                                                  theStudyId,
                                                  theGenImpl );
@@ -68,7 +67,6 @@ StdMeshers_AutomaticLength_i::StdMeshers_AutomaticLength_i( PortableServer::POA_
 
 StdMeshers_AutomaticLength_i::~StdMeshers_AutomaticLength_i()
 {
-  MESSAGE( "StdMeshers_AutomaticLength_i::~StdMeshers_AutomaticLength_i" );
 }
 
 //=============================================================================
index b8b54ddbc4574617dce497b7ccb03891095fdbaa..90d4ea4928062f0d2af688fa1410da4b8ff0d739 100644 (file)
@@ -64,7 +64,6 @@ StdMeshers_CartesianParameters3D_i( PortableServer::POA_ptr thePOA,
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_CartesianParameters3D_i::StdMeshers_CartesianParameters3D_i" );
   myBaseImpl = new ::StdMeshers_CartesianParameters3D( theGenImpl->GetANewId(),
                                                        theStudyId,
                                                        theGenImpl );
@@ -80,7 +79,6 @@ StdMeshers_CartesianParameters3D_i( PortableServer::POA_ptr thePOA,
 
 StdMeshers_CartesianParameters3D_i::~StdMeshers_CartesianParameters3D_i()
 {
-  MESSAGE( "StdMeshers_CartesianParameters3D_i::~StdMeshers_CartesianParameters3D_i" );
 }
 
 //=============================================================================
@@ -169,8 +167,8 @@ CORBA::Double StdMeshers_CartesianParameters3D_i::GetSizeThreshold()
 //\brief Set grid spacing along the three axes
 // \param spaceFunctions - functions defining spacing values at given point on axis
 // \param internalPoints - points dividing a grid into parts along each direction
-// Parameter t of spaceFunction f(t) is a position [0,1] withing bounding box of
-// the shape to mesh or withing an interval defined by internal points
+// Parameter t of spaceFunction f(t) is a position [0,1] within bounding box of
+// the shape to mesh or within an interval defined by internal points
 //=======================================================================
 
 void StdMeshers_CartesianParameters3D_i::SetGridSpacing(const SMESH::string_array& spaceFunctions,
@@ -419,7 +417,6 @@ StdMeshers_CartesianParameters3D_i::ComputeCoordinates(CORBA::Double
 
 ::StdMeshers_CartesianParameters3D* StdMeshers_CartesianParameters3D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_CartesianParameters3D_i::GetImpl" );
   return ( ::StdMeshers_CartesianParameters3D* )myBaseImpl;
 }
 
index f4b3ef304a93ea41d0b289bd08061826bfa68271..fb1fc91b3839f5b4a947196bb67be0f59e75c158 100644 (file)
@@ -73,8 +73,8 @@ class STDMESHERS_I_EXPORT StdMeshers_CartesianParameters3D_i:
    *  \param internalPoints - points dividing a grid into parts along each direction
    *  \param axis - index of an axis counterd from zero, i.e. 0==X, 1==Y, 2==Z
    *
-   * Parameter t of spaceFunction f(t) is a position [0,1] withing bounding box of
-   * the shape to mesh or withing an interval defined by internal points
+   * Parameter t of spaceFunction f(t) is a position [0,1] within bounding box of
+   * the shape to mesh or within an interval defined by internal points
    */
   void SetGridSpacing(const SMESH::string_array& spaceFunctions,
                       const SMESH::double_array& internalPoints,
index cc11d2205f9e83f26ca2bf98d972bbc129487602..2eeaff8d14adb02798aa8b4f725b886b0e47f97a 100644 (file)
@@ -45,7 +45,6 @@ StdMeshers_Cartesian_3D_i::StdMeshers_Cartesian_3D_i( PortableServer::POA_ptr th
     SMESH_Algo_i( thePOA ),
     SMESH_3D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_Cartesian_3D_i::StdMeshers_Cartesian_3D_i" );
   myBaseImpl = new ::StdMeshers_Cartesian_3D( theGenImpl->GetANewId(),
                                               theStudyId,
                                               theGenImpl );
@@ -61,7 +60,6 @@ StdMeshers_Cartesian_3D_i::StdMeshers_Cartesian_3D_i( PortableServer::POA_ptr th
 
 StdMeshers_Cartesian_3D_i::~StdMeshers_Cartesian_3D_i()
 {
-  MESSAGE( "StdMeshers_Cartesian_3D_i::~StdMeshers_Cartesian_3D_i" );
 }
 
 //=============================================================================
@@ -74,6 +72,5 @@ StdMeshers_Cartesian_3D_i::~StdMeshers_Cartesian_3D_i()
 
 ::StdMeshers_Cartesian_3D* StdMeshers_Cartesian_3D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_Cartesian_3D_i::GetImpl" );
   return ( ::StdMeshers_Cartesian_3D* )myBaseImpl;
 }
index 48c6f4bac69f21661e207077363f56c509658a42..01a579b56c5dd5108eb6f82e7c20fbd269e51d61 100644 (file)
@@ -50,7 +50,6 @@ StdMeshers_CompositeSegment_1D_i::StdMeshers_CompositeSegment_1D_i
        SMESH_Algo_i( thePOA ),
        SMESH_1D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_CompositeSegment_1D_i::StdMeshers_CompositeSegment_1D_i" );
   myBaseImpl = new ::StdMeshers_CompositeSegment_1D( theGenImpl->GetANewId(),
                                                      theStudyId,
                                                      theGenImpl );
@@ -66,7 +65,6 @@ StdMeshers_CompositeSegment_1D_i::StdMeshers_CompositeSegment_1D_i
 
 StdMeshers_CompositeSegment_1D_i::~StdMeshers_CompositeSegment_1D_i()
 {
-  MESSAGE( "StdMeshers_CompositeSegment_1D_i::~StdMeshers_CompositeSegment_1D_i" );
 }
 
 //=============================================================================
@@ -79,7 +77,6 @@ StdMeshers_CompositeSegment_1D_i::~StdMeshers_CompositeSegment_1D_i()
 
 ::StdMeshers_CompositeSegment_1D* StdMeshers_CompositeSegment_1D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_CompositeSegment_1D_i::GetImpl" );
   return ( ::StdMeshers_CompositeSegment_1D* )myBaseImpl;
 }
 
index d9782962377b5093374e515859c49c8de6071006..add0ede6dd369d9e5f1d8fee54ab2a52368f36ba 100644 (file)
@@ -52,7 +52,6 @@ StdMeshers_Deflection1D_i::StdMeshers_Deflection1D_i( PortableServer::POA_ptr th
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_Deflection1D_i::StdMeshers_Deflection1D_i" );
   myBaseImpl = new ::StdMeshers_Deflection1D( theGenImpl->GetANewId(),
                                         theStudyId,
                                         theGenImpl );
@@ -68,7 +67,6 @@ StdMeshers_Deflection1D_i::StdMeshers_Deflection1D_i( PortableServer::POA_ptr th
 
 StdMeshers_Deflection1D_i::~StdMeshers_Deflection1D_i()
 {
-  MESSAGE( "StdMeshers_Deflection1D_i::~StdMeshers_Deflection1D_i" );
 }
 
 //=============================================================================
@@ -82,7 +80,6 @@ StdMeshers_Deflection1D_i::~StdMeshers_Deflection1D_i()
 void StdMeshers_Deflection1D_i::SetDeflection( CORBA::Double theValue )
      throw ( SALOME::SALOME_Exception )
 {
-  MESSAGE( "StdMeshers_Deflection1D_i::SetDeflection" );
   ASSERT( myBaseImpl );
   try {
     this->GetImpl()->SetDeflection( theValue );
@@ -106,7 +103,6 @@ void StdMeshers_Deflection1D_i::SetDeflection( CORBA::Double theValue )
 
 CORBA::Double StdMeshers_Deflection1D_i::GetDeflection()
 {
-  MESSAGE( "StdMeshers_Deflection1D_i::GetDeflection" );
   ASSERT( myBaseImpl );
   return this->GetImpl()->GetDeflection();
 }
@@ -121,7 +117,6 @@ CORBA::Double StdMeshers_Deflection1D_i::GetDeflection()
 
 ::StdMeshers_Deflection1D* StdMeshers_Deflection1D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_Deflection1D_i::GetImpl" );
   return ( ::StdMeshers_Deflection1D* )myBaseImpl;
 }
 
index e11ceb98787e6ab91ee4df332f97db2fffadbc41..fbaa715c6aabe4e899d7c840f3bef6478480ed14 100644 (file)
@@ -49,7 +49,6 @@ StdMeshers_FixedPoints1D_i::StdMeshers_FixedPoints1D_i( PortableServer::POA_ptr
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_FixedPoints1D_i::StdMeshers_FixedPoints1D_i" );
   myBaseImpl = new ::StdMeshers_FixedPoints1D(theGenImpl->GetANewId(),
                                               theStudyId,
                                               theGenImpl);
@@ -65,7 +64,6 @@ StdMeshers_FixedPoints1D_i::StdMeshers_FixedPoints1D_i( PortableServer::POA_ptr
 
 StdMeshers_FixedPoints1D_i::~StdMeshers_FixedPoints1D_i()
 {
-  MESSAGE( "StdMeshers_FixedPoints1D_i::~StdMeshers_FixedPoints1D_i" );
 }
 
 //=============================================================================
@@ -77,7 +75,6 @@ StdMeshers_FixedPoints1D_i::~StdMeshers_FixedPoints1D_i()
 void StdMeshers_FixedPoints1D_i::SetNbSegments(const SMESH::long_array& listNbSeg) 
      throw ( SALOME::SALOME_Exception )
 {
-  MESSAGE( "StdMeshers_FixedPoints1D_i::SetNbSegments" );
   ASSERT( myBaseImpl );
   try {
     std::vector<int> nbsegs( listNbSeg.length() );
@@ -104,7 +101,6 @@ void StdMeshers_FixedPoints1D_i::SetNbSegments(const SMESH::long_array& listNbSe
 void StdMeshers_FixedPoints1D_i::SetPoints(const SMESH::double_array& listParams) 
      throw ( SALOME::SALOME_Exception )
 {
-  MESSAGE( "StdMeshers_FixedPoints1D_i::SetPoints" );
   ASSERT( myBaseImpl );
   try {
     std::vector<double> params( listParams.length() );
@@ -132,7 +128,6 @@ void StdMeshers_FixedPoints1D_i::SetPoints(const SMESH::double_array& listParams
 
 SMESH::double_array* StdMeshers_FixedPoints1D_i::GetPoints()
 {
-  MESSAGE( "StdMeshers_FixedPoints1D_i::GetPoints" );
   ASSERT( myBaseImpl );
   SMESH::double_array_var anArray = new SMESH::double_array;
   std::vector<double> params = this->GetImpl()->GetPoints();
@@ -153,7 +148,6 @@ SMESH::double_array* StdMeshers_FixedPoints1D_i::GetPoints()
 
 SMESH::long_array* StdMeshers_FixedPoints1D_i::GetNbSegments()
 {
-  MESSAGE( "StdMeshers_FixedPoints1D_i::GetNbSegments" );
   ASSERT( myBaseImpl );
   SMESH::long_array_var anArray = new SMESH::long_array;
   std::vector<int> nbsegs = this->GetImpl()->GetNbSegments();
@@ -224,7 +218,6 @@ void StdMeshers_FixedPoints1D_i::SetObjectEntry( const char* theEntry )
 
 char* StdMeshers_FixedPoints1D_i::GetObjectEntry()
 {
-  MESSAGE( "StdMeshers_FixedPoints1D_i::SetObjectEntry" );
   ASSERT( myBaseImpl );
   const char* entry;
   try {
@@ -247,7 +240,6 @@ char* StdMeshers_FixedPoints1D_i::GetObjectEntry()
 
 SMESH::long_array* StdMeshers_FixedPoints1D_i::GetReversedEdges()
 {
-  MESSAGE( "StdMeshers_FixedPoints1D_i::GetReversedEdges" );
   ASSERT( myBaseImpl );
   SMESH::long_array_var anArray = new SMESH::long_array;
   std::vector<int> ids = this->GetImpl()->GetReversedEdges();
@@ -268,7 +260,6 @@ SMESH::long_array* StdMeshers_FixedPoints1D_i::GetReversedEdges()
 
 ::StdMeshers_FixedPoints1D* StdMeshers_FixedPoints1D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_FixedPoints1D_i::GetImpl" );
   return ( ::StdMeshers_FixedPoints1D* )myBaseImpl;
 }
 
index 739bda3eaaf01203e12cc1f6e06a98fc6d1fe138..88e418edf738164c99184c134d9c2fff833192b6 100644 (file)
@@ -50,7 +50,6 @@ StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
     SMESH_Algo_i( thePOA ),
     SMESH_3D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i" );
   myBaseImpl = new ::StdMeshers_Hexa_3D( theGenImpl->GetANewId(),
                                          theStudyId,
                                          theGenImpl );
@@ -66,7 +65,6 @@ StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
 
 StdMeshers_Hexa_3D_i::~StdMeshers_Hexa_3D_i()
 {
-  MESSAGE( "StdMeshers_Hexa_3D_i::~StdMeshers_Hexa_3D_i" );
 }
 
 //=============================================================================
@@ -79,7 +77,6 @@ StdMeshers_Hexa_3D_i::~StdMeshers_Hexa_3D_i()
 
 ::StdMeshers_Hexa_3D* StdMeshers_Hexa_3D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_Hexa_3D_i::GetImpl" );
   return ( ::StdMeshers_Hexa_3D* )myBaseImpl;
 }
 
index 7b6a2b80e0c0781a6166375ee3d45db46d2d7ad7..61ec24bd4affaa6d55f584d40b11ce8905359884 100644 (file)
@@ -56,7 +56,6 @@ StdMeshers_ImportSource1D_i::StdMeshers_ImportSource1D_i( PortableServer::POA_pt
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_ImportSource1D_i::StdMeshers_ImportSource1D_i" );
   myBaseImpl = new ::StdMeshers_ImportSource1D( theGenImpl->GetANewId(),
                                                 theStudyId,
                                                 theGenImpl );
@@ -73,7 +72,6 @@ StdMeshers_ImportSource1D_i::StdMeshers_ImportSource1D_i( PortableServer::POA_pt
 
 StdMeshers_ImportSource1D_i::~StdMeshers_ImportSource1D_i()
 {
-  MESSAGE( "StdMeshers_ImportSource1D_i::~StdMeshers_ImportSource1D_i" );
 }
 
 //=============================================================================
@@ -84,7 +82,6 @@ StdMeshers_ImportSource1D_i::~StdMeshers_ImportSource1D_i()
 
 void StdMeshers_ImportSource1D_i::SetSourceEdges(const SMESH::ListOfGroups& groups)
 {
-  MESSAGE( "StdMeshers_ImportSource1D_i::SetSourceEdges" );
   ASSERT( myBaseImpl );
   try
   {
@@ -129,7 +126,6 @@ void StdMeshers_ImportSource1D_i::SetSourceEdges(const SMESH::ListOfGroups& grou
 
 SMESH::string_array*  StdMeshers_ImportSource1D_i::GetSourceEdges()
 {
-  MESSAGE( "StdMeshers_ImportSource1D_i::GetImportSource" );
   SMESH::string_array_var res = new SMESH::string_array( _groupEntries );
   return res._retn();
 }
@@ -261,7 +257,6 @@ void StdMeshers_ImportSource1D_i::UpdateAsMeshesRestored()
 
 ::StdMeshers_ImportSource1D* StdMeshers_ImportSource1D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_ImportSource1D_i::GetImpl" );
   return ( ::StdMeshers_ImportSource1D* )myBaseImpl;
 }
 
index f8d31a414ded0b93efc4c899b9fcdb97048fc46f..dc61b9cdd9ea22b3bd8e94e3abc2e418ef1d6665 100644 (file)
@@ -55,7 +55,6 @@ StdMeshers_ImportSource2D_i::StdMeshers_ImportSource2D_i( PortableServer::POA_pt
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_ImportSource2D_i::StdMeshers_ImportSource2D_i" );
   myBaseImpl = new ::StdMeshers_ImportSource2D( theGenImpl->GetANewId(),
                                                 theStudyId,
                                                 theGenImpl );
@@ -72,7 +71,6 @@ StdMeshers_ImportSource2D_i::StdMeshers_ImportSource2D_i( PortableServer::POA_pt
 
 StdMeshers_ImportSource2D_i::~StdMeshers_ImportSource2D_i()
 {
-  MESSAGE( "StdMeshers_ImportSource2D_i::~StdMeshers_ImportSource2D_i" );
 }
 
 //=============================================================================
@@ -83,7 +81,6 @@ StdMeshers_ImportSource2D_i::~StdMeshers_ImportSource2D_i()
 
 void StdMeshers_ImportSource2D_i::SetSourceFaces(const SMESH::ListOfGroups& groups)
 {
-  MESSAGE( "StdMeshers_ImportSource2D_i::SetSourceFaces" );
   ASSERT( myBaseImpl );
   try
   {
@@ -129,7 +126,6 @@ void StdMeshers_ImportSource2D_i::SetSourceFaces(const SMESH::ListOfGroups& grou
 
 SMESH::string_array*  StdMeshers_ImportSource2D_i::GetSourceFaces()
 {
-  MESSAGE( "StdMeshers_ImportSource2D_i::GetImportSource" );
   SMESH::string_array_var res = new SMESH::string_array( _groupEntries );
   return res._retn();
 }
@@ -263,7 +259,6 @@ void StdMeshers_ImportSource2D_i::UpdateAsMeshesRestored()
 
 ::StdMeshers_ImportSource2D* StdMeshers_ImportSource2D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_ImportSource2D_i::GetImpl" );
   return ( ::StdMeshers_ImportSource2D* )myBaseImpl;
 }
 
index ed2f3cefe808402ce7cd5826724203d183b4f5bd..061257e9f7955238115829df870558551056b5f6 100644 (file)
@@ -44,7 +44,6 @@ StdMeshers_Import_1D2D_i::StdMeshers_Import_1D2D_i (PortableServer::POA_ptr theP
     SMESH_Algo_i( thePOA ),
     SMESH_2D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_Import_1D2D_i::StdMeshers_Import_1D2D_i" );
   myBaseImpl = new ::StdMeshers_Import_1D2D(theGenImpl->GetANewId(),
                                             theStudyId,
                                             theGenImpl );
@@ -54,14 +53,12 @@ StdMeshers_Import_1D2D_i::StdMeshers_Import_1D2D_i (PortableServer::POA_ptr theP
 
 StdMeshers_Import_1D2D_i::~StdMeshers_Import_1D2D_i()
 {
-  MESSAGE( "StdMeshers_Import_1D2D_i::~StdMeshers_Import_1D2D_i" );
 }
 
 //-----------------------------------------------------------------------------
 
 ::StdMeshers_Import_1D2D* StdMeshers_Import_1D2D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_Import_1D2D_i::GetImpl" );
   return ( ::StdMeshers_Import_1D2D* )myBaseImpl;
 }
 
index 260516a3d7d32e3541c4ad7ffc93673cd48e44d1..dfbda1eb99785bee3687587cafd068d9f3245db6 100644 (file)
@@ -50,7 +50,6 @@ StdMeshers_Import_1D_i::StdMeshers_Import_1D_i( PortableServer::POA_ptr thePOA,
     SMESH_Algo_i( thePOA ),
     SMESH_1D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_Import_1D_i::StdMeshers_Import_1D_i" );
   myBaseImpl = new ::StdMeshers_Import_1D( theGenImpl->GetANewId(),
                                            theStudyId,
                                            theGenImpl );
@@ -66,7 +65,6 @@ StdMeshers_Import_1D_i::StdMeshers_Import_1D_i( PortableServer::POA_ptr thePOA,
 
 StdMeshers_Import_1D_i::~StdMeshers_Import_1D_i()
 {
-  MESSAGE( "StdMeshers_Import_1D_i::~StdMeshers_Import_1D_i" );
 }
 
 //=============================================================================
@@ -79,7 +77,6 @@ StdMeshers_Import_1D_i::~StdMeshers_Import_1D_i()
 
 ::StdMeshers_Import_1D* StdMeshers_Import_1D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_Import_1D_i::GetImpl" );
   return ( ::StdMeshers_Import_1D* )myBaseImpl;
 }
 
index 37e780ec21297ab5b137b27bcbcc0af81af1d861..013db3995da4ea1dc654502303af07c2218d20dc 100644 (file)
@@ -41,7 +41,6 @@ StdMeshers_LayerDistribution2D_i::StdMeshers_LayerDistribution2D_i
 :SMESH_Hypothesis_i( thePOA ),
  StdMeshers_LayerDistribution_i(thePOA,theStudyId,theGenImpl)
 {
-  MESSAGE( "StdMeshers_LayerDistribution2D_i::StdMeshers_LayerDistribution2D_i" );
   myBaseImpl = new ::StdMeshers_LayerDistribution2D(theGenImpl->GetANewId(),
                                                     theStudyId,
                                                     theGenImpl);
@@ -57,7 +56,6 @@ StdMeshers_LayerDistribution2D_i::StdMeshers_LayerDistribution2D_i
 
 StdMeshers_LayerDistribution2D_i::~StdMeshers_LayerDistribution2D_i()
 {
-  MESSAGE("StdMeshers_LayerDistribution2D_i::~StdMeshers_LayerDistribution2D_i");
 }
 
 //=============================================================================
index d958478e73e0f86e3ec6edd70a09bb37f4919827..d8bb021801de5bdee13585d8c2b7e53b3632aec9 100644 (file)
@@ -50,7 +50,6 @@ StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i( PortableServer::
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i" );
   myBaseImpl = new ::StdMeshers_LayerDistribution( theGenImpl->GetANewId(),
                                                    theStudyId,
                                                    theGenImpl );
@@ -66,7 +65,6 @@ StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i( PortableServer::
 
 StdMeshers_LayerDistribution_i::~StdMeshers_LayerDistribution_i()
 {
-  MESSAGE( "StdMeshers_LayerDistribution_i::~StdMeshers_LayerDistribution_i" );
   if ( !myHyp->_is_nil() )
     myHyp->UnRegister();
 }
index 599b3d861450e928a72e92ce162b1bc2e879fc13..7404b9e133fa6d528ef0e02b202969ae4353e820 100644 (file)
@@ -49,7 +49,6 @@ StdMeshers_LengthFromEdges_i::StdMeshers_LengthFromEdges_i( PortableServer::POA_
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_LengthFromEdges_i::StdMeshers_LengthFromEdges_i" );
   myBaseImpl = new ::StdMeshers_LengthFromEdges( theGenImpl->GetANewId(),
                                             theStudyId,
                                             theGenImpl );
@@ -65,7 +64,6 @@ StdMeshers_LengthFromEdges_i::StdMeshers_LengthFromEdges_i( PortableServer::POA_
 
 StdMeshers_LengthFromEdges_i::~StdMeshers_LengthFromEdges_i()
 {
-  MESSAGE( "StdMeshers_LengthFromEdges_i::~StdMeshers_LengthFromEdges_i" );
 }
 
 //=============================================================================
@@ -79,7 +77,6 @@ StdMeshers_LengthFromEdges_i::~StdMeshers_LengthFromEdges_i()
 void StdMeshers_LengthFromEdges_i::SetMode( CORBA::Long theMode )
   throw (SALOME::SALOME_Exception)
 {
-  MESSAGE( "StdMeshers_LengthFromEdges_i::SetMode" );
   ASSERT( myBaseImpl );
   try {
     this->GetImpl()->SetMode( theMode );
@@ -100,7 +97,6 @@ void StdMeshers_LengthFromEdges_i::SetMode( CORBA::Long theMode )
 
 CORBA::Long StdMeshers_LengthFromEdges_i::GetMode()
 {
-  MESSAGE( "StdMeshers_LengthFromEdges_i::GetMode" );
   ASSERT( myBaseImpl );
   return this->GetImpl()->GetMode();
 }
@@ -126,7 +122,6 @@ CORBA::Boolean StdMeshers_LengthFromEdges_i::HasParameters()
 
 ::StdMeshers_LengthFromEdges* StdMeshers_LengthFromEdges_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_LengthFromEdges_i::GetImpl" );
   return ( ::StdMeshers_LengthFromEdges* )myBaseImpl;
 }
 
index 75a74e1814b6c340813ea892a583e3a6e78f1db9..af0e63a4895e3368db1063fd2c4a505e7c354430 100644 (file)
@@ -52,7 +52,6 @@ StdMeshers_LocalLength_i::StdMeshers_LocalLength_i( PortableServer::POA_ptr theP
      : SALOME::GenericObj_i( thePOA ),
        SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_LocalLength_i::StdMeshers_LocalLength_i" );
   myBaseImpl = new ::StdMeshers_LocalLength( theGenImpl->GetANewId(),
                                              theStudyId,
                                              theGenImpl );
@@ -68,7 +67,6 @@ StdMeshers_LocalLength_i::StdMeshers_LocalLength_i( PortableServer::POA_ptr theP
 
 StdMeshers_LocalLength_i::~StdMeshers_LocalLength_i()
 {
-  MESSAGE( "StdMeshers_LocalLength_i::~StdMeshers_LocalLength_i" );
 }
 
 //=============================================================================
@@ -81,7 +79,6 @@ StdMeshers_LocalLength_i::~StdMeshers_LocalLength_i()
 void StdMeshers_LocalLength_i::SetLength( CORBA::Double theLength )
      throw ( SALOME::SALOME_Exception )
 {
-  MESSAGE( "StdMeshers_LocalLength_i::SetLength" );
   ASSERT( myBaseImpl );
   try {
     this->GetImpl()->SetLength( theLength );
@@ -105,7 +102,6 @@ void StdMeshers_LocalLength_i::SetLength( CORBA::Double theLength )
 void StdMeshers_LocalLength_i::SetPrecision( CORBA::Double thePrecision )
      throw ( SALOME::SALOME_Exception )
 {
-  MESSAGE( "StdMeshers_LocalLength_i::SetPrecision" );
   ASSERT( myBaseImpl );
   try {
     this->GetImpl()->SetPrecision( thePrecision );
@@ -128,7 +124,6 @@ void StdMeshers_LocalLength_i::SetPrecision( CORBA::Double thePrecision )
 //=============================================================================
 CORBA::Double StdMeshers_LocalLength_i::GetLength()
 {
-  MESSAGE( "StdMeshers_LocalLength_i::GetLength" );
   ASSERT( myBaseImpl );
   return this->GetImpl()->GetLength();
 }
@@ -142,7 +137,6 @@ CORBA::Double StdMeshers_LocalLength_i::GetLength()
 //=============================================================================
 CORBA::Double StdMeshers_LocalLength_i::GetPrecision()
 {
-  MESSAGE( "StdMeshers_LocalLength_i::GetPrecision" );
   ASSERT( myBaseImpl );
   return this->GetImpl()->GetPrecision();
 }
@@ -156,7 +150,6 @@ CORBA::Double StdMeshers_LocalLength_i::GetPrecision()
 //=============================================================================
 ::StdMeshers_LocalLength* StdMeshers_LocalLength_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_LocalLength_i::GetImpl" );
   return ( ::StdMeshers_LocalLength* )myBaseImpl;
 }
 
index 00417f7471caf697575267f41be6a8696040ffef..d463a4ebec9f4782cc3e5de8030a6594afc9d51d 100644 (file)
@@ -51,7 +51,6 @@ StdMeshers_MEFISTO_2D_i::StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA
        SMESH_Algo_i( thePOA ),
        SMESH_2D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_MEFISTO_2D_i::StdMeshers_MEFISTO_2D_i" );
   myBaseImpl = new ::StdMeshers_MEFISTO_2D( theGenImpl->GetANewId(),
                                        theStudyId,
                                        theGenImpl );
@@ -67,7 +66,6 @@ StdMeshers_MEFISTO_2D_i::StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA
 
 StdMeshers_MEFISTO_2D_i::~StdMeshers_MEFISTO_2D_i()
 {
-  MESSAGE( "StdMeshers_MEFISTO_2D_i::~StdMeshers_MEFISTO_2D_i" );
 }
 
 //=============================================================================
@@ -80,7 +78,6 @@ StdMeshers_MEFISTO_2D_i::~StdMeshers_MEFISTO_2D_i()
 
 ::StdMeshers_MEFISTO_2D* StdMeshers_MEFISTO_2D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_MEFISTO_2D_i::GetImpl" );
   return ( ::StdMeshers_MEFISTO_2D* )myBaseImpl;
 }
 
index 12d9838206c8946c075131b2c3d7cd3a727d928b..017c33bb071eadbdfdccd70501866a92c4e8c12d 100644 (file)
@@ -52,7 +52,6 @@ StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i( PortableServer::POA_pt
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ) 
 {
-  MESSAGE( "StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i" );
   myBaseImpl = new ::StdMeshers_MaxElementArea( theGenImpl->GetANewId(),
                                            theStudyId,
                                            theGenImpl );
@@ -68,7 +67,6 @@ StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i( PortableServer::POA_pt
 
 StdMeshers_MaxElementArea_i::~StdMeshers_MaxElementArea_i()
 {
-  MESSAGE( "StdMeshers_MaxElementArea_i::~StdMeshers_MaxElementArea_i" );
 }
 
 //=============================================================================
@@ -82,7 +80,6 @@ StdMeshers_MaxElementArea_i::~StdMeshers_MaxElementArea_i()
 void StdMeshers_MaxElementArea_i::SetMaxElementArea( CORBA::Double theArea )
      throw ( SALOME::SALOME_Exception )
 {
-  MESSAGE( "StdMeshers_MaxElementArea_i::SetMaxElementArea" );
   ASSERT( myBaseImpl );
   try {
     this->GetImpl()->SetMaxArea( theArea );
@@ -106,7 +103,6 @@ void StdMeshers_MaxElementArea_i::SetMaxElementArea( CORBA::Double theArea )
 
 CORBA::Double StdMeshers_MaxElementArea_i::GetMaxElementArea()
 {
-  MESSAGE( "StdMeshers_MaxElementArea_i::GetMaxElementArea" );
   ASSERT( myBaseImpl );
   return this->GetImpl()->GetMaxArea();
 }
@@ -121,7 +117,6 @@ CORBA::Double StdMeshers_MaxElementArea_i::GetMaxElementArea()
 
 ::StdMeshers_MaxElementArea* StdMeshers_MaxElementArea_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_MaxElementArea_i::GetImpl" );
   return ( ::StdMeshers_MaxElementArea* )myBaseImpl;
 }
 
index af7f0a9484523b06a79eceef340f246d5660bc9d..c9861c1f6d1482fe3aa75cefa989b379d48e0ce8 100644 (file)
@@ -52,7 +52,6 @@ StdMeshers_MaxElementVolume_i::StdMeshers_MaxElementVolume_i( PortableServer::PO
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_MaxElementVolume_i::StdMeshers_MaxElementVolume_i" );
   myBaseImpl = new ::StdMeshers_MaxElementVolume( theGenImpl->GetANewId(),
                                              theStudyId,
                                              theGenImpl );
@@ -68,7 +67,6 @@ StdMeshers_MaxElementVolume_i::StdMeshers_MaxElementVolume_i( PortableServer::PO
 
 StdMeshers_MaxElementVolume_i::~StdMeshers_MaxElementVolume_i()
 {
-  MESSAGE( "StdMeshers_MaxElementVolume_i::~StdMeshers_MaxElementVolume_i()" );
 }
 
 //=============================================================================
@@ -82,7 +80,6 @@ StdMeshers_MaxElementVolume_i::~StdMeshers_MaxElementVolume_i()
 void StdMeshers_MaxElementVolume_i::SetMaxElementVolume( CORBA::Double theVolume )
      throw ( SALOME::SALOME_Exception )
 {
-  MESSAGE( "StdMeshers_MaxElementVolume_i::SetMaxElementVolume" );
   ASSERT( myBaseImpl );
   try {
     this->GetImpl()->SetMaxVolume( theVolume );
@@ -106,7 +103,6 @@ void StdMeshers_MaxElementVolume_i::SetMaxElementVolume( CORBA::Double theVolume
 
 CORBA::Double StdMeshers_MaxElementVolume_i::GetMaxElementVolume()
 {
-  MESSAGE( "StdMeshers_MaxElementVolume_i::GetMaxElementVolume" );
   ASSERT( myBaseImpl );
   return this->GetImpl()->GetMaxVolume();
 }
@@ -121,7 +117,6 @@ CORBA::Double StdMeshers_MaxElementVolume_i::GetMaxElementVolume()
 
 ::StdMeshers_MaxElementVolume* StdMeshers_MaxElementVolume_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_MaxElementVolume_i::GetImpl" );
   return ( ::StdMeshers_MaxElementVolume* )myBaseImpl;
 }
 
index 7e218532795b1a3041ae7b0bd5dda604b1424c17..ba1f768c270dd8d81db18bb8288eed39601a4736 100644 (file)
@@ -47,7 +47,6 @@ StdMeshers_NotConformAllowed_i::StdMeshers_NotConformAllowed_i
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE("StdMeshers_NotConformAllowed_i::StdMeshers_NotConformAllowed_i");
   myBaseImpl = new ::StdMeshers_NotConformAllowed(genImpl->GetANewId(),
                                                   studyId,
                                                   genImpl);
index d7e085dfa2bb5d73d9ee43d7cc2cd16a15cb0507..263e4d5c38dc7aea33f7d64f51161cb6c1fa8e52 100644 (file)
@@ -41,7 +41,6 @@ StdMeshers_NumberOfLayers2D_i::StdMeshers_NumberOfLayers2D_i
  :SMESH_Hypothesis_i( thePOA ),
   StdMeshers_NumberOfLayers_i(thePOA,theStudyId,theGenImpl)
 {
-  MESSAGE("StdMeshers_NumberOfLayers2D_i::StdMeshers_NumberOfLayers2D_i");
   myBaseImpl = new ::StdMeshers_NumberOfLayers2D(theGenImpl->GetANewId(),
                                                  theStudyId,
                                                  theGenImpl);
@@ -57,7 +56,6 @@ StdMeshers_NumberOfLayers2D_i::StdMeshers_NumberOfLayers2D_i
 
 StdMeshers_NumberOfLayers2D_i::~StdMeshers_NumberOfLayers2D_i()
 {
-  MESSAGE( "StdMeshers_NumberOfLayers2D_i::~StdMeshers_NumberOfLayers2D_i" );
 }
 
 //=============================================================================
index 59bab3103dd41d3f63e03f7753b3b0b008cd919d..40905a6725928ec2be1bc2d4c3f24db8854f82fa 100644 (file)
@@ -51,7 +51,6 @@ StdMeshers_NumberOfLayers_i::StdMeshers_NumberOfLayers_i( PortableServer::POA_pt
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_NumberOfLayers_i::StdMeshers_NumberOfLayers_i" );
   myBaseImpl = new ::StdMeshers_NumberOfLayers( theGenImpl->GetANewId(),
                                                  theStudyId,
                                                  theGenImpl );
@@ -67,7 +66,6 @@ StdMeshers_NumberOfLayers_i::StdMeshers_NumberOfLayers_i( PortableServer::POA_pt
 
 StdMeshers_NumberOfLayers_i::~StdMeshers_NumberOfLayers_i()
 {
-  MESSAGE( "StdMeshers_NumberOfLayers_i::~StdMeshers_NumberOfLayers_i" );
 }
 
 //=============================================================================
index e512a74b5b2c23aad21535bbe20ff66efb09966f..5a75bf78e45a6b2e7bc3d38b2193532f83a50593 100644 (file)
@@ -51,7 +51,6 @@ StdMeshers_NumberOfSegments_i::StdMeshers_NumberOfSegments_i( PortableServer::PO
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_NumberOfSegments_i::StdMeshers_NumberOfSegments_i" );
   myBaseImpl = new ::StdMeshers_NumberOfSegments( theGenImpl->GetANewId(),
                                              theStudyId,
                                              theGenImpl );
@@ -67,7 +66,6 @@ StdMeshers_NumberOfSegments_i::StdMeshers_NumberOfSegments_i( PortableServer::PO
 
 StdMeshers_NumberOfSegments_i::~StdMeshers_NumberOfSegments_i()
 {
-  MESSAGE( "StdMeshers_NumberOfSegments_i::~StdMeshers_NumberOfSegments_i" );
 }
 
 //=============================================================================
@@ -247,7 +245,6 @@ char* StdMeshers_NumberOfSegments_i::GetObjectEntry()
 
 SMESH::long_array* StdMeshers_NumberOfSegments_i::GetReversedEdges()
 {
-  MESSAGE( "StdMeshers_NumberOfSegments_i::GetReversedEdges" );
   ASSERT( myBaseImpl );
   SMESH::long_array_var anArray = new SMESH::long_array;
   std::vector<int> ids = this->GetImpl()->GetReversedEdges();
index 660ab6c68b20f0ed66debb89275c981db35b89cc..4659ab42bc2dc829404052cfb428ccf47aefe43d 100644 (file)
@@ -43,7 +43,6 @@ StdMeshers_PolygonPerFace_2D_i::StdMeshers_PolygonPerFace_2D_i( PortableServer::
     SMESH_Algo_i( thePOA ),
     SMESH_2D_Algo_i( thePOA )
 {
-  //MESSAGE( "StdMeshers_PolygonPerFace_2D_i::StdMeshers_PolygonPerFace_2D_i" );
   myBaseImpl = new ::StdMeshers_PolygonPerFace_2D( theGenImpl->GetANewId(),
                                                    theStudyId,
                                                    theGenImpl );
@@ -57,5 +56,4 @@ StdMeshers_PolygonPerFace_2D_i::StdMeshers_PolygonPerFace_2D_i( PortableServer::
 
 StdMeshers_PolygonPerFace_2D_i::~StdMeshers_PolygonPerFace_2D_i()
 {
-  //MESSAGE( "StdMeshers_PolygonPerFace_2D_i::~StdMeshers_PolygonPerFace_2D_i" );
 }
index 4ce0380e553bb1748c8f1a2898cb40f25fdf0cf9..8f5999d65a3ad6deaa0f2953445ff2c7ed671b39 100644 (file)
@@ -48,7 +48,6 @@ StdMeshers_Prism_3D_i::StdMeshers_Prism_3D_i( PortableServer::POA_ptr thePOA,
     SMESH_Algo_i( thePOA ),
     SMESH_3D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_Prism_3D_i::StdMeshers_Prism_3D_i" );
   myBaseImpl = new ::StdMeshers_Prism_3D( theGenImpl->GetANewId(),
                                           theStudyId,
                                           theGenImpl );
@@ -57,13 +56,11 @@ StdMeshers_Prism_3D_i::StdMeshers_Prism_3D_i( PortableServer::POA_ptr thePOA,
 
 StdMeshers_Prism_3D_i::~StdMeshers_Prism_3D_i()
 {
-  MESSAGE( "StdMeshers_Prism_3D_i::~StdMeshers_Prism_3D_i" );
 }
 //-----------------------------------------------------------------------------
 
 ::StdMeshers_Prism_3D* StdMeshers_Prism_3D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_Prism_3D_i::GetImpl" );
   return ( ::StdMeshers_Prism_3D* )myBaseImpl;
 }
 //-----------------------------------------------------------------------------
@@ -89,7 +86,6 @@ StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i( PortableServer::POA_pt
     SMESH_Algo_i( thePOA ),
     SMESH_3D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i" );
   myBaseImpl = new ::StdMeshers_RadialPrism_3D( theGenImpl->GetANewId(),
                                                 theStudyId,
                                                 theGenImpl );
@@ -98,13 +94,11 @@ StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i( PortableServer::POA_pt
 
 StdMeshers_RadialPrism_3D_i::~StdMeshers_RadialPrism_3D_i()
 {
-  MESSAGE( "StdMeshers_RadialPrism_3D_i::~StdMeshers_RadialPrism_3D_i" );
 }
 //-----------------------------------------------------------------------------
 
 ::StdMeshers_RadialPrism_3D* StdMeshers_RadialPrism_3D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_RadialPrism_3D_i::GetImpl" );
   return ( ::StdMeshers_RadialPrism_3D* )myBaseImpl;
 }
 //-----------------------------------------------------------------------------
index 8c0d9778b3803e30017311df07924dc37e5c28ee..6067de55bd7116ce39f241a40dbdfb2cb1742a9d 100644 (file)
@@ -52,7 +52,6 @@ StdMeshers_ProjectionSource1D_i::StdMeshers_ProjectionSource1D_i
   ::SMESH_Gen*            theGenImpl ) : SALOME::GenericObj_i( thePOA ), 
                                          SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_ProjectionSource1D_i::StdMeshers_ProjectionSource1D_i" );
   myBaseImpl = new ::StdMeshers_ProjectionSource1D( theGenImpl->GetANewId(),
                                                     theStudyId,
                                                     theGenImpl );
@@ -68,7 +67,6 @@ StdMeshers_ProjectionSource1D_i::StdMeshers_ProjectionSource1D_i
 
 StdMeshers_ProjectionSource1D_i::~StdMeshers_ProjectionSource1D_i()
 {
-  MESSAGE( "StdMeshers_ProjectionSource1D_i::~StdMeshers_ProjectionSource1D_i" );
 }
 
 //=============================================================================
index 0c030a040e9d69c63118b0efa09b1cd27eb0c190..369cc29dfee7cdd46bb10df40e91c1501715443c 100644 (file)
@@ -52,7 +52,6 @@ StdMeshers_ProjectionSource2D_i::StdMeshers_ProjectionSource2D_i
   ::SMESH_Gen*            theGenImpl ) : SALOME::GenericObj_i( thePOA ), 
                                          SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_ProjectionSource2D_i::StdMeshers_ProjectionSource2D_i" );
   myBaseImpl = new ::StdMeshers_ProjectionSource2D( theGenImpl->GetANewId(),
                                                     theStudyId,
                                                     theGenImpl );
@@ -68,7 +67,6 @@ StdMeshers_ProjectionSource2D_i::StdMeshers_ProjectionSource2D_i
 
 StdMeshers_ProjectionSource2D_i::~StdMeshers_ProjectionSource2D_i()
 {
-  MESSAGE( "StdMeshers_ProjectionSource2D_i::~StdMeshers_ProjectionSource2D_i" );
 }
 
 //=============================================================================
index 84ad6ca62d67acd3b8e16db247ba11a026b60fc8..195fafc656e29e7d1f4f836369980cce6f16e28d 100644 (file)
@@ -52,7 +52,6 @@ StdMeshers_ProjectionSource3D_i::StdMeshers_ProjectionSource3D_i
   ::SMESH_Gen*            theGenImpl ) : SALOME::GenericObj_i( thePOA ), 
                                          SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_ProjectionSource3D_i::StdMeshers_ProjectionSource3D_i" );
   myBaseImpl = new ::StdMeshers_ProjectionSource3D( theGenImpl->GetANewId(),
                                                     theStudyId,
                                                     theGenImpl );
@@ -68,7 +67,6 @@ StdMeshers_ProjectionSource3D_i::StdMeshers_ProjectionSource3D_i
 
 StdMeshers_ProjectionSource3D_i::~StdMeshers_ProjectionSource3D_i()
 {
-  MESSAGE( "StdMeshers_ProjectionSource3D_i::~StdMeshers_ProjectionSource3D_i" );
 }
 
 //=============================================================================
index a86b40f1fda3d9535ef81bbabc70c92c85f948a5..515b7e85b92bbd065b95c57801e353f35ca53b31 100644 (file)
@@ -47,7 +47,6 @@ StdMeshers_Projection_3D_i::StdMeshers_Projection_3D_i( PortableServer::POA_ptr
        SMESH_Algo_i( thePOA ),
        SMESH_3D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_Projection_3D_i::StdMeshers_Projection_3D_i" );
   myBaseImpl = new ::StdMeshers_Projection_3D( theGenImpl->GetANewId(),
                                     theStudyId,
                                     theGenImpl );
@@ -56,13 +55,11 @@ StdMeshers_Projection_3D_i::StdMeshers_Projection_3D_i( PortableServer::POA_ptr
 
 StdMeshers_Projection_3D_i::~StdMeshers_Projection_3D_i()
 {
-  MESSAGE( "StdMeshers_Projection_3D_i::~StdMeshers_Projection_3D_i" );
 }
 //-----------------------------------------------------------------------------
 
 ::StdMeshers_Projection_3D* StdMeshers_Projection_3D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_Projection_3D_i::GetImpl" );
   return ( ::StdMeshers_Projection_3D* )myBaseImpl;
 }
 
@@ -92,7 +89,6 @@ StdMeshers_Projection_2D_i::StdMeshers_Projection_2D_i( PortableServer::POA_ptr
        SMESH_Algo_i( thePOA ),
        SMESH_2D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_Projection_2D_i::StdMeshers_Projection_2D_i" );
   myBaseImpl = new ::StdMeshers_Projection_2D( theGenImpl->GetANewId(),
                                     theStudyId,
                                     theGenImpl );
@@ -101,13 +97,11 @@ StdMeshers_Projection_2D_i::StdMeshers_Projection_2D_i( PortableServer::POA_ptr
 
 StdMeshers_Projection_2D_i::~StdMeshers_Projection_2D_i()
 {
-  MESSAGE( "StdMeshers_Projection_2D_i::~StdMeshers_Projection_2D_i" );
 }
 //-----------------------------------------------------------------------------
 
 ::StdMeshers_Projection_2D* StdMeshers_Projection_2D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_Projection_2D_i::GetImpl" );
   return ( ::StdMeshers_Projection_2D* )myBaseImpl;
 }
 
@@ -126,7 +120,6 @@ StdMeshers_Projection_1D2D_i::StdMeshers_Projection_1D2D_i( PortableServer::POA_
        SMESH_Algo_i( thePOA ),
        SMESH_2D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_Projection_1D2D_i::StdMeshers_Projection_1D2D_i" );
   myBaseImpl = new ::StdMeshers_Projection_1D2D( theGenImpl->GetANewId(),
                                                  theStudyId,
                                                  theGenImpl );
@@ -135,13 +128,11 @@ StdMeshers_Projection_1D2D_i::StdMeshers_Projection_1D2D_i( PortableServer::POA_
 
 StdMeshers_Projection_1D2D_i::~StdMeshers_Projection_1D2D_i()
 {
-  MESSAGE( "StdMeshers_Projection_1D2D_i::~StdMeshers_Projection_1D2D_i" );
 }
 //-----------------------------------------------------------------------------
 
 ::StdMeshers_Projection_1D2D* StdMeshers_Projection_1D2D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_Projection_1D2D_i::GetImpl" );
   return ( ::StdMeshers_Projection_1D2D* )myBaseImpl;
 }
 
@@ -160,7 +151,6 @@ StdMeshers_Projection_1D_i::StdMeshers_Projection_1D_i( PortableServer::POA_ptr
        SMESH_Algo_i( thePOA ),
        SMESH_1D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_Projection_1D_i::StdMeshers_Projection_1D_i" );
   myBaseImpl = new ::StdMeshers_Projection_1D( theGenImpl->GetANewId(),
                                     theStudyId,
                                     theGenImpl );
@@ -169,12 +159,10 @@ StdMeshers_Projection_1D_i::StdMeshers_Projection_1D_i( PortableServer::POA_ptr
 
 StdMeshers_Projection_1D_i::~StdMeshers_Projection_1D_i()
 {
-  MESSAGE( "StdMeshers_Projection_1D_i::~StdMeshers_Projection_1D_i" );
 }
 //-----------------------------------------------------------------------------
 
 ::StdMeshers_Projection_1D* StdMeshers_Projection_1D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_Projection_1D_i::GetImpl" );
   return ( ::StdMeshers_Projection_1D* )myBaseImpl;
 }
index d5c2d2c8217a7ec09f41363abc19e6ecc0b4e5bc..6d086c514902089c61e7206cc5d74b922025c03b 100644 (file)
@@ -45,7 +45,6 @@ StdMeshers_Propagation_i::StdMeshers_Propagation_i (PortableServer::POA_ptr theP
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_Propagation_i::StdMeshers_Propagation_i" );
   myBaseImpl = new ::StdMeshers_Propagation(theGenImpl->GetANewId(),
                                             theStudyId,
                                             theGenImpl);
index 7f17b00f6ba44f15daa0366a03315350e9eefa54..1681544faff61bd86766d6c4b0e51985b121377c 100644 (file)
@@ -50,7 +50,6 @@ StdMeshers_QuadrangleParams_i::StdMeshers_QuadrangleParams_i
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_QuadrangleParams_i::StdMeshers_QuadrangleParams_i" );
   myBaseImpl = new ::StdMeshers_QuadrangleParams(theGenImpl->GetANewId(),
                                                  theStudyId,
                                                  theGenImpl);
@@ -66,7 +65,6 @@ StdMeshers_QuadrangleParams_i::StdMeshers_QuadrangleParams_i
 
 StdMeshers_QuadrangleParams_i::~StdMeshers_QuadrangleParams_i()
 {
-  MESSAGE( "StdMeshers_QuadrangleParams_i::~StdMeshers_QuadrangleParams_i" );
 }
 
 //=============================================================================
@@ -79,7 +77,6 @@ StdMeshers_QuadrangleParams_i::~StdMeshers_QuadrangleParams_i()
 
 void StdMeshers_QuadrangleParams_i::SetTriaVertex(CORBA::Long vertID)
 {
-  MESSAGE( "StdMeshers_QuadrangleParams_i::SetTriaVertex" );
   ASSERT( myBaseImpl );
   try {
     this->GetImpl()->SetTriaVertex( vertID );
@@ -102,7 +99,6 @@ void StdMeshers_QuadrangleParams_i::SetTriaVertex(CORBA::Long vertID)
 
 CORBA::Long StdMeshers_QuadrangleParams_i::GetTriaVertex()
 {
-  MESSAGE( "StdMeshers_QuadrangleParams_i::GetTriaVertex" );
   ASSERT( myBaseImpl );
   return this->GetImpl()->GetTriaVertex();
 }
@@ -117,7 +113,6 @@ CORBA::Long StdMeshers_QuadrangleParams_i::GetTriaVertex()
 
 void StdMeshers_QuadrangleParams_i::SetObjectEntry( const char* entry )
 {
-  MESSAGE( "StdMeshers_QuadrangleParams_i::SetObjectEntry" );
   ASSERT( myBaseImpl );
 
   try {
@@ -141,7 +136,6 @@ void StdMeshers_QuadrangleParams_i::SetObjectEntry( const char* entry )
 
 char* StdMeshers_QuadrangleParams_i::GetObjectEntry()
 {
-  MESSAGE( "StdMeshers_QuadrangleParams_i::SetObjectEntry" );
   ASSERT( myBaseImpl );
   const char* entry;
   try {
@@ -162,7 +156,6 @@ char* StdMeshers_QuadrangleParams_i::GetObjectEntry()
 //=============================================================================
 void StdMeshers_QuadrangleParams_i::SetQuadType(StdMeshers::QuadType type)
 {
-  MESSAGE("StdMeshers_QuadrangleParams_i::SetQuadType");
   ASSERT(myBaseImpl);
 
   if (int(type) >= int(StdMeshers::QUAD_NB_TYPES)) {
@@ -204,7 +197,6 @@ void StdMeshers_QuadrangleParams_i::SetQuadType(StdMeshers::QuadType type)
 //=============================================================================
 StdMeshers::QuadType StdMeshers_QuadrangleParams_i::GetQuadType()
 {
-  MESSAGE("StdMeshers_QuadrangleParams_i::GetQuadType");
   ASSERT(myBaseImpl);
   return StdMeshers::QuadType(int(this->GetImpl()->GetQuadType()));
 }
@@ -313,7 +305,6 @@ SMESH::string_array* StdMeshers_QuadrangleParams_i::GetEnfVertices()
 
 ::StdMeshers_QuadrangleParams* StdMeshers_QuadrangleParams_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_QuadrangleParams_i::GetImpl" );
   return ( ::StdMeshers_QuadrangleParams* )myBaseImpl;
 }
 
index ff019673a90ce0af1518dc128e671c5708cb7c8e..1bb991a8bbb17523543f70c570d5ca68bd8ed0a6 100644 (file)
@@ -45,7 +45,6 @@ StdMeshers_RadialQuadrangle_1D2D_i::StdMeshers_RadialQuadrangle_1D2D_i
        SMESH_Algo_i( thePOA ),
        SMESH_2D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_RadialQuadrangle_1D2D_i::StdMeshers_RadialQuadrangle_1D2D_i" );
   myBaseImpl = new ::StdMeshers_RadialQuadrangle_1D2D(theGenImpl->GetANewId(),
                                                       theStudyId,
                                                       theGenImpl );
@@ -55,14 +54,12 @@ StdMeshers_RadialQuadrangle_1D2D_i::StdMeshers_RadialQuadrangle_1D2D_i
 
 StdMeshers_RadialQuadrangle_1D2D_i::~StdMeshers_RadialQuadrangle_1D2D_i()
 {
-  MESSAGE( "StdMeshers_RadialQuadrangle_1D2D_i::~StdMeshers_RadialQuadrangle_1D2D_i" );
 }
 
 //-----------------------------------------------------------------------------
 
 ::StdMeshers_RadialQuadrangle_1D2D* StdMeshers_RadialQuadrangle_1D2D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_RadialQuadrangle_1D2D_i::GetImpl" );
   return ( ::StdMeshers_RadialQuadrangle_1D2D* )myBaseImpl;
 }
 
index 578deff576869221713a982bcd49c5701dbe28cc..57cbb7071924dfb4aa6149627820d1d837b0f099 100644 (file)
@@ -51,7 +51,6 @@ StdMeshers_SegmentAroundVertex_0D_i::StdMeshers_SegmentAroundVertex_0D_i
        SMESH_Algo_i( thePOA ),
        SMESH_0D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_SegmentAroundVertex_0D_i::StdMeshers_SegmentAroundVertex_0D_i" );
   myBaseImpl = new ::StdMeshers_SegmentAroundVertex_0D( theGenImpl->GetANewId(),
                                                         theStudyId,
                                                         theGenImpl );
@@ -60,12 +59,10 @@ StdMeshers_SegmentAroundVertex_0D_i::StdMeshers_SegmentAroundVertex_0D_i
 
 StdMeshers_SegmentAroundVertex_0D_i::~StdMeshers_SegmentAroundVertex_0D_i()
 {
-  MESSAGE( "StdMeshers_SegmentAroundVertex_0D_i::~StdMeshers_SegmentAroundVertex_0D_i" );
 }
 //-----------------------------------------------------------------------------
 
 ::StdMeshers_SegmentAroundVertex_0D* StdMeshers_SegmentAroundVertex_0D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_SegmentAroundVertex_0D_i::GetImpl" );
   return ( ::StdMeshers_SegmentAroundVertex_0D* )myBaseImpl;
 }
index 605395f2b7352e01ac8c81bf1039113a0f415cf1..5801115bb8c81ddf1e3853d80b2ebce576255658 100644 (file)
@@ -50,7 +50,6 @@ StdMeshers_SegmentLengthAroundVertex_i::StdMeshers_SegmentLengthAroundVertex_i
   : SALOME::GenericObj_i( thePOA ), 
     SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_SegmentLengthAroundVertex_i::StdMeshers_SegmentLengthAroundVertex_i" );
   myBaseImpl = new ::StdMeshers_SegmentLengthAroundVertex( theGenImpl->GetANewId(),
                                                            theStudyId,
                                                            theGenImpl );
@@ -66,7 +65,6 @@ StdMeshers_SegmentLengthAroundVertex_i::StdMeshers_SegmentLengthAroundVertex_i
 
 StdMeshers_SegmentLengthAroundVertex_i::~StdMeshers_SegmentLengthAroundVertex_i()
 {
-  MESSAGE( "StdMeshers_SegmentLengthAroundVertex_i::~StdMeshers_SegmentLengthAroundVertex_i" );
 }
 
 //=============================================================================
@@ -80,7 +78,6 @@ StdMeshers_SegmentLengthAroundVertex_i::~StdMeshers_SegmentLengthAroundVertex_i(
 void StdMeshers_SegmentLengthAroundVertex_i::SetLength( CORBA::Double theLength )
      throw ( SALOME::SALOME_Exception )
 {
-  MESSAGE( "StdMeshers_SegmentLengthAroundVertex_i::SetLength" );
   ASSERT( myBaseImpl );
   try {
     this->GetImpl()->SetLength( theLength );
@@ -103,7 +100,6 @@ void StdMeshers_SegmentLengthAroundVertex_i::SetLength( CORBA::Double theLength
 
 CORBA::Double StdMeshers_SegmentLengthAroundVertex_i::GetLength()
 {
-  MESSAGE( "StdMeshers_SegmentLengthAroundVertex_i::GetLength" );
   ASSERT( myBaseImpl );
   return this->GetImpl()->GetLength();
 }
@@ -118,7 +114,6 @@ CORBA::Double StdMeshers_SegmentLengthAroundVertex_i::GetLength()
 
 ::StdMeshers_SegmentLengthAroundVertex* StdMeshers_SegmentLengthAroundVertex_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_SegmentLengthAroundVertex_i::GetImpl" );
   return ( ::StdMeshers_SegmentLengthAroundVertex* )myBaseImpl;
 }
 
index 1748ef6fbba6f464d94f6ba1e0bd6587bf989c1d..8d1edd67f317314a1eb74554bc5b9307f7f7ba75 100644 (file)
@@ -52,7 +52,6 @@ StdMeshers_StartEndLength_i::StdMeshers_StartEndLength_i( PortableServer::POA_pt
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_StartEndLength_i::StdMeshers_StartEndLength_i" );
   myBaseImpl = new ::StdMeshers_StartEndLength( theGenImpl->GetANewId(),
                                                theStudyId,
                                                theGenImpl );
@@ -68,7 +67,6 @@ StdMeshers_StartEndLength_i::StdMeshers_StartEndLength_i( PortableServer::POA_pt
 
 StdMeshers_StartEndLength_i::~StdMeshers_StartEndLength_i()
 {
-  MESSAGE( "StdMeshers_StartEndLength_i::~StdMeshers_StartEndLength_i" );
 }
 
 //=============================================================================
@@ -83,7 +81,6 @@ void StdMeshers_StartEndLength_i::SetLength(CORBA::Double theLength,
                                             CORBA::Boolean theIsStart )
      throw ( SALOME::SALOME_Exception )
 {
-  MESSAGE( "StdMeshers_StartEndLength_i::SetLength" );
   ASSERT( myBaseImpl );
   try {
     this->GetImpl()->SetLength( theLength, theIsStart );
@@ -133,7 +130,6 @@ void StdMeshers_StartEndLength_i::SetEndLength( CORBA::Double length)
 
 CORBA::Double StdMeshers_StartEndLength_i::GetLength( CORBA::Boolean theIsStart)
 {
-  MESSAGE( "StdMeshers_StartEndLength_i::GetLength" );
   ASSERT( myBaseImpl );
   return this->GetImpl()->GetLength( theIsStart );
 }
@@ -239,7 +235,6 @@ SMESH::long_array* StdMeshers_StartEndLength_i::GetReversedEdges()
 
 ::StdMeshers_StartEndLength* StdMeshers_StartEndLength_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_StartEndLength_i::GetImpl" );
   return ( ::StdMeshers_StartEndLength* )myBaseImpl;
 }
 
index be95101b1e43dd4bb6a7cb96a1adbef5621f2265..ce339913d6a16898b4dc6fdac2f65f6d77cbdb81 100644 (file)
@@ -45,7 +45,6 @@ StdMeshers_UseExisting_1D_i::StdMeshers_UseExisting_1D_i
        SMESH_Algo_i( thePOA ),
        SMESH_1D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_UseExisting_1D_i::StdMeshers_UseExisting_1D_i" );
   myBaseImpl = new ::StdMeshers_UseExisting_1D( theGenImpl->GetANewId(),
                                                 theStudyId,
                                                 theGenImpl );
@@ -54,13 +53,11 @@ StdMeshers_UseExisting_1D_i::StdMeshers_UseExisting_1D_i
 
 StdMeshers_UseExisting_1D_i::~StdMeshers_UseExisting_1D_i()
 {
-  MESSAGE( "StdMeshers_UseExisting_1D_i::~StdMeshers_UseExisting_1D_i" );
 }
 //-----------------------------------------------------------------------------
 
 ::StdMeshers_UseExisting_1D* StdMeshers_UseExisting_1D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_UseExisting_1D_i::GetImpl" );
   return ( ::StdMeshers_UseExisting_1D* )myBaseImpl;
 }
 
@@ -80,7 +77,6 @@ StdMeshers_UseExisting_2D_i::StdMeshers_UseExisting_2D_i
        SMESH_Algo_i( thePOA ),
        SMESH_2D_Algo_i( thePOA )
 {
-  MESSAGE( "StdMeshers_UseExisting_2D_i::StdMeshers_UseExisting_2D_i" );
   myBaseImpl = new ::StdMeshers_UseExisting_2D( theGenImpl->GetANewId(),
                                                 theStudyId,
                                                 theGenImpl );
@@ -89,12 +85,10 @@ StdMeshers_UseExisting_2D_i::StdMeshers_UseExisting_2D_i
 
 StdMeshers_UseExisting_2D_i::~StdMeshers_UseExisting_2D_i()
 {
-  MESSAGE( "StdMeshers_UseExisting_2D_i::~StdMeshers_UseExisting_2D_i" );
 }
 //-----------------------------------------------------------------------------
 
 ::StdMeshers_UseExisting_2D* StdMeshers_UseExisting_2D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_UseExisting_2D_i::GetImpl" );
   return ( ::StdMeshers_UseExisting_2D* )myBaseImpl;
 }
index 3f828a372e221d2e153271af9eb60e9124dd711f..fb0bbbcfd0e1c470af5c4da19ebac8387cb6fd7d 100644 (file)
@@ -52,7 +52,6 @@ StdMeshers_ViscousLayers2D_i::StdMeshers_ViscousLayers2D_i( PortableServer::POA_
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_ViscousLayers2D_i::StdMeshers_ViscousLayers2D_i" );
   myBaseImpl = new ::StdMeshers_ViscousLayers2D( theGenImpl->GetANewId(),
                                                  theStudyId,
                                                  theGenImpl );
@@ -68,7 +67,6 @@ StdMeshers_ViscousLayers2D_i::StdMeshers_ViscousLayers2D_i( PortableServer::POA_
 
 StdMeshers_ViscousLayers2D_i::~StdMeshers_ViscousLayers2D_i()
 {
-  MESSAGE( "StdMeshers_ViscousLayers2D_i::~StdMeshers_ViscousLayers2D_i" );
 }
 
 //================================================================================
@@ -234,7 +232,6 @@ throw ( SALOME::SALOME_Exception )
 
 ::StdMeshers_ViscousLayers2D* StdMeshers_ViscousLayers2D_i::GetImpl()
 {
-  MESSAGE( "StdMeshers_ViscousLayers2D_i::GetImpl" );
   return ( ::StdMeshers_ViscousLayers2D* )myBaseImpl;
 }
 
index 0472b6e28c0734829ae6a29a71ce0985b9535d8c..e7a1d5ddd3d178f0ab283397ed94b348ae928c00 100644 (file)
@@ -43,7 +43,7 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
     self.num=1
     self.__selectedMesh=None
 
-    # complex whith QResources: not used
+    # complex with QResources: not used
     # The icon are supposed to be located in the $SMESH_ROOT_DIR/share/salome/resources/smesh folder,
     # other solution could be in the same folder than this python module file:
     # iconfolder=os.path.dirname(os.path.abspath(__file__))
index 778165c64b09d327bd9f39f86ba80804fa8eb81a..0f6894ffd1e074049f6d14370cf6e04a9cd79d17 100644 (file)
@@ -36,7 +36,7 @@ master_doc = 'index'
 
 # General substitutions.
 project = 'MGCleaner Plug-in'
-copyright = '2013-2016, EDF R&D'
+copyright = '2013-2017, EDF R&D'
 
 # The default replacements for |version| and |release|, also used in various
 # other places throughout the built documents.
index af7d2c5d06104998d2288509e8a22d55ac80f3d6..f7f250637015aa9c43c99583185bd1d73b0495bb 100644 (file)
@@ -36,7 +36,7 @@ def Go(GeoObj, CutPlnLst, OutLvlLst, PrefixLst, Publish):
                Example 2: [(0,0,0,1,0,0),(50,0,0,0,1,0)]: in addition to the first plane cut, cut through a plane passing by (50,0,0) and normal to the y axis.
                Note that the plane size us determined automatically from the size of the geometry in question (using a very big trim size = 100 x length of geometry!)
          - OutLvlLst is a list containing integers that represent the inner sectioning level with respect to the original geometry type
-               A value of 1 means that the section will provide elements of one level lower than the original type. For exemple a solid sectioned at level 1 will produce faces. A Face sectioned at level 1 will produce edges.
+               A value of 1 means that the section will provide elements of one level lower than the original type. For example a solid sectioned at level 1 will produce faces. A Face sectioned at level 1 will produce edges.
                A value of 2 means that a deeper sectioning will be applied. A solid sectioned with level 2 will give faces and edges. A face will give edges and vertices. An edge will give only vertices
                The number of elements in this list should be (this is verified in the code) equal to the number of elements in the plane cut list. This is logical.
                Example 1: [1]
@@ -98,7 +98,7 @@ def GoTrim(GeoObj, CutPlnLst, OutLvlLst, PrefixLst, Publish):
                Example 1: [(0,0,0,1,0,0,5)]: cut along a plane passing through the origin and normal to the x-axis with a trim size of 5
                Example 2: [(0,0,0,1,0,0,5),(50,0,0,0,1,0,10)]: in addition to the first plane cut, cut through a plane passing by (50,0,0) and normal to the y axis with a trim size of 10
          - OutLvlLst is a list containing integers that represent the inner sectioning level with respect to the original geometry type
-               A value of 1 means that the section will provide elements of one level lower than the original type. For exemple a solid sectioned at level 1 will produce faces. A Face sectioned at level 1 will produce edges.
+               A value of 1 means that the section will provide elements of one level lower than the original type. For example a solid sectioned at level 1 will produce faces. A Face sectioned at level 1 will produce edges.
                A value of 2 means that a deeper sectioning will be applied. A solid sectioned with level 2 will give faces and edges. A face will give edges and vertices. An edge will give only vertices
                The number of elements in this list should be (this is verified in the code) equal to the number of elements in the plane cut list. This is logical.
                Example 1: [1]
index db3fb2b77298653590cac8ffacabecdb7bc9b8bf..6589ac8b01e85d0849796f74804ce5b95717df92 100644 (file)
@@ -281,7 +281,7 @@ class MacObject:
         def PrincipleBoxes (self):
                 """
                 This function returns all possible combination rectangular shape objects that can contain at least 3 of the principle vertices
-                constituting the MacObject. This is indispensible for the Non-ortho types and shall return a number of 24 possible combinations
+                constituting the MacObject. This is indispensable for the Non-ortho types and shall return a number of 24 possible combinations
                 """
                 from itertools import combinations
                 Boxes = []
index 1639f0bdc6939a93836cd1aacc43423a44409760..b05d434d346dca5bb1c62c75a6627a39f8f24d6c 100644 (file)
@@ -180,10 +180,10 @@ int main(int argc, char *argv[])
   //int NG[4]; // Num. globaux des sommets
 
   // Acquisition maillage initial
-  //cout << chrono() << " - Acquisition du maillage initial" << endl;
+  //cout << salome_chrono() << " - Acquisition du maillage initial" << endl;
   MAILLAGE1 = new Maillage((string) "TEMP");
   MAILLAGE1->inputMED(ficMEDin);
-  cout << chrono() << " - End of mesh read" << endl;
+  cout << salome_chrono() << " - End of mesh read" << endl;
   indexNouveauxNoeuds = MAILLAGE1->nombreNoeudsMaillage;
 
   // Le maillage ne contient aucun TETRA4 : on rend le maillage initial sans modification
@@ -192,7 +192,7 @@ int main(int argc, char *argv[])
       cout << "WARNING: mesh does not contain tetra4 elements, it will not be modified" << endl;
       MAILLAGE1->ID = str_id_maillagenew;
       MAILLAGE1->outputMED(ficMEDout);
-      cout << chrono() << " - Finished!" << endl << endl;
+      cout << salome_chrono() << " - Finished!" << endl << endl;
       exit(0);
     }
   // A partir de cet instant le maillage contient forcément des TETRA4
@@ -202,7 +202,7 @@ int main(int argc, char *argv[])
   DNP = (float*) malloc(sizeof(float) * MAILLAGE1->nombreNoeudsMaillage);
   for (int k = 0; k < MAILLAGE1->nombreNoeudsMaillage; k++)
     DNP[k] = distanceNoeudPlan(k + 1);
-  cout << chrono() << " - End of computation of distances between nodes and plane" << endl;
+  cout << salome_chrono() << " - End of computation of distances between nodes and plane" << endl;
 
   // Longueur d'arête moyenne des T4 intersectant le plan de coupe
   float LONGUEURS = 0.0;
@@ -246,7 +246,7 @@ int main(int argc, char *argv[])
           << endl;
       MAILLAGE1->ID = str_id_maillagenew;
       MAILLAGE1->outputMED(ficMEDout);
-      cout << chrono() << " - Finished!" << endl << endl;
+      cout << salome_chrono() << " - Finished!" << endl << endl;
       exit(0);
     }
   // A partir de cet instant le maillage contient forcément des TETRA4 intersectant le plan de coupe
@@ -256,7 +256,7 @@ int main(int argc, char *argv[])
   epsilon = tolerance * longueurMoyenne;
 
   int nT4coupe = cptLONGUEURS / 6;
-  cout << chrono() << " - End of computation of mean length of tetra4 edges near the cut plane" << endl;
+  cout << salome_chrono() << " - End of computation of mean length of tetra4 edges near the cut plane" << endl;
 
   cout << "Number of tetra4 to be cut = " << nT4coupe << endl;
   cout << "Mean length = " << longueurMoyenne << endl;
@@ -274,7 +274,7 @@ int main(int argc, char *argv[])
       else
         POSN[k] = 0;
     }
-  cout << chrono() << " - End of nodes qualification above or below the cut plane" << endl;
+  cout << salome_chrono() << " - End of nodes qualification above or below the cut plane" << endl;
   cout << "Start of iteration on tetra4" << endl;
 
   for (int it4 = 0; it4 < MAILLAGE1->EFFECTIFS_TYPES[TETRA4]; it4++)
@@ -993,7 +993,7 @@ int main(int argc, char *argv[])
         ERREUR("Case not taken into account");
 
     }
-  cout << chrono() << " - End of iteration on tetra4" << endl;
+  cout << salome_chrono() << " - End of iteration on tetra4" << endl;
 
   // cout << "indexNouveauxNoeuds = " << indexNouveauxNoeuds << endl;
   newXX.resize(indexNouveauxNoeuds - MAILLAGE1->nombreNoeudsMaillage);
@@ -1011,7 +1011,7 @@ int main(int argc, char *argv[])
   //                          2. Constitution du maillage final
   // =========================================================================================
 
-  cout << chrono() << " - Constitution of final mesh" << endl;
+  cout << salome_chrono() << " - Constitution of final mesh" << endl;
 
   MAILLAGE2 = new Maillage(str_id_maillagenew);
   MAILLAGE2->dimensionMaillage = MAILLAGE1->dimensionMaillage;
@@ -1114,10 +1114,10 @@ int main(int argc, char *argv[])
 
   MAILLAGE2->eliminationMailles(TETRA4, cutTetras);
 
-  cout << chrono() << " - MED file writing" << endl;
+  cout << salome_chrono() << " - MED file writing" << endl;
 
   MAILLAGE2->outputMED(ficMEDout);
-  cout << chrono() << " - Finished!" << endl << endl;
+  cout << salome_chrono() << " - Finished!" << endl << endl;
 
   return 0;
 
index b17e2b4d759e114d60b80699805101acc280c609..3a41721cafda0cccae8d70cce7e845831bb84f38 100644 (file)
@@ -589,7 +589,7 @@ med_geometry_type MESHCUT::InstanceMGE(TYPE_MAILLE TYPE)
   return typeBanaliseMED;
 }
 
-int MESHCUT::chrono()
+int MESHCUT::salome_chrono()
 {
   return clock() / CLOCKS_PER_SEC;
 }
index df52ed3a9b96f1600151e9ce2c769cfc56d5037e..7ac8e197b498242ceb8f77e1db6dfe2a00ff43bb 100644 (file)
@@ -57,7 +57,7 @@ namespace MESHCUT
 
     int copieFichier(std::string source, std::string cible);
     med_geometry_type InstanceMGE(TYPE_MAILLE TYPE);
-    int chrono();
+    int salome_chrono();
     TYPE_MAILLE typeMaille(std::string type);
     std::string MGE2string(med_geometry_type MGE);
     std::string TM2string(TYPE_MAILLE MGE);
index 8778ac7dc373a51b3932ebed0537fae29ad2a131..dd67de87c8a2f0427bb96af5ee592f0792476a46 100644 (file)
@@ -36,7 +36,7 @@ master_doc = 'index'
 
 # General substitutions.
 project = 'Verima Plug-in'
-copyright = '2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE'
+copyright = '2007-2017 CEA/DEN, EDF R&D, OPEN CASCADE'
 
 # The default replacements for |version| and |release|, also used in various
 # other places throughout the built documents.
index f9ae2a42a1aed6e0c941be5943c106d0b8690e98..fa37e7ff444942e8261d1170a1031b090d880132 100644 (file)
@@ -703,7 +703,7 @@ the edge common to the faces is a ridge.</string>
         <property name="toolTip">
          <string>This parameter allows the user to prescribe a maximal size hmax
 for the mesh elements i.e., the lengths of the edges with respect to the specified
- size map. The corresponding values are either relative or absolute depending on the choosen parameter.
+ size map. The corresponding values are either relative or absolute depending on the chosen parameter.
 The default values are automatically set based on the surface geometry (curvature dependent) and its
 bounding box size.
 Please note that, as it is not strictly possible to obey the given or computed size map, the actual maximal
@@ -748,7 +748,7 @@ the lengths of the edges with respect to the specified size map.</string>
         <property name="toolTip">
          <string>This parameter allows the user to prescribe a maximal size hmax
 for the mesh elements i.e., the lengths of the edges with respect to the specified
- size map. The corresponding values are either relative or absolute depending on the choosen parameter.
+ size map. The corresponding values are either relative or absolute depending on the chosen parameter.
 The default values are automatically set based on the surface geometry (curvature dependent) and its
 bounding box size.
 Please note that, as it is not strictly possible to obey the given or computed size map, the actual maximal
index 3ac36bee321011d60517fcae40c4c7e79a9e9c51..29d094d19b25e0b85c4f3ad424e0c9b22c3b986c 100644 (file)
@@ -36,7 +36,7 @@ master_doc = 'index'
 
 # General substitutions.
 project = 'MeshGems-SurfOpt Plug-in'
-copyright = '2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE'
+copyright = '2007-2017 CEA/DEN, EDF R&D, OPEN CASCADE'
 
 # The default replacements for |version| and |release|, also used in various
 # other places throughout the built documents.
index 7d778774e01fb8301dc9c06b816f9b0087b73506..efdaa315438bd6a50f7fa7b029933f9ef6cd985f 100644 (file)
@@ -43,7 +43,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
     self.num=1
     self.__selectedMesh=None
 
-    # complex whith QResources: not used
+    # complex with QResources: not used
     # The icon are supposed to be located in the $SMESH_ROOT_DIR/share/salome/resources/smesh folder,
     # other solution could be in the same folder than this python module file:
     # iconfolder=os.path.dirname(os.path.abspath(__file__))
index 61ea883f46427fe143991b1030c0b7f224ea977a..ed56ab165946dcf6ec85c0dfaf6d5b140165b80e 100644 (file)
@@ -2,15 +2,14 @@ import sys, os, shutil, pickle, tempfile
 import main, genereCrack, Zset
 import utilityFunctions as uF
 
+os.environ['QT_QPA_PLATFORM_PLUGIN_PATH']=os.path.join(os.environ['QTDIR'],'plugins','platforms')
+
 #commande="/bin/bash -c ""source $HOME/zebulon/Z8.6.6_NEW/do_config_bash"""
 #os.system(commande)
 
 def IHM():
 
-  try:
-    from PyQt5.QtWidgets import QApplication
-  except:
-    from PyQt4.QtGui import QApplication
+  from PyQt5.QtWidgets import QApplication
 
   app = QApplication(sys.argv)
   myapp = main.ShipHolderApplication()
@@ -31,8 +30,7 @@ def SCRIPT(dataFile=None, data=None, dim=3, names=None):
 
   print data
 
-  tmpdir=tempfile.mkdtemp()
-  uF.removeFromSessionPath('LD_LIBRARY_PATH', 'Meshgems-2111')
+  tmpdir=tempfile.mkdtemp(prefix='tmpZcracks')
 
   if names==None: names={'saneGeoName':'salome_sane', 'crackGeoName':'salome_crack', 'crackedGeoName':'salome_cracked'}
 
index e4a4d163c0d58c1904a4ea1c2fc8005392dc569c..4672776ec901f77b553ea1717468fb5be5a746fc 100644 (file)
@@ -18,13 +18,13 @@ import string
 
 #tmpdir = "/local00/home/B27118/projets/Zcracks/Zcracks/casTests/tmpdir"
 #if not os.path.isdir(tmpdir): os.mkdir(tmpdir)
-tmpdir=tempfile.mktemp(prefix='tmpZcracks')
+tmpdir=tempfile.mkdtemp(prefix='tmpZcracks')
 print "tmpdir=", tmpdir
 
-meshgemsdir=os.environ('MESHGEMSHOME')
-if len(meshgemsdir) > 0:
-  meshgems=string.split(meshgemsdir,os.sep)[-1]
-  uF.removeFromSessionPath('LD_LIBRARY_PATH', meshgems)
+#meshgemsdir=os.environ('MESHGEMSHOME')
+#if len(meshgemsdir) > 0:
+  #meshgems=string.split(meshgemsdir,os.sep)[-1]
+  #uF.removeFromSessionPath('LD_LIBRARY_PATH', meshgems)
 
 def LAUNCH(listCas=[]):
   if type(listCas)!=list: listCas=[listCas]
index d8d457c80fb0b2111d662d1dbc5de99090ec98c2..db09764fc74a3fb85ac7032a4ac551a9d63e0fd1 100644 (file)
@@ -36,7 +36,7 @@ master_doc = 'index'
 
 # General substitutions.
 project = 'ZCracks Plug-in'
-copyright = '2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE'
+copyright = '2007-2017 CEA/DEN, EDF R&D, OPEN CASCADE'
 
 # The default replacements for |version| and |release|, also used in various
 # other places throughout the built documents.
index e4b3e526dfdb5e20f075e7a1414d1005abf6f59b..4d3384de0d64aeb04d6eab57462b60ac78048465 100644 (file)
@@ -1,13 +1,9 @@
 import sys, pickle, tempfile, shutil
 from os import path, getpid, environ, remove, system
 
-try:
-  from PyQt5.QtCore import *
-  from PyQt5.QtGui import *
-  from PyQt5.QtWidgets import *
-except:
-  from PyQt4.QtCore import *
-  from PyQt4.QtGui import *
+from PyQt5.QtCore import *
+from PyQt5.QtGui import *
+from PyQt5.QtWidgets import *
 
 import utilityFunctions as uF
 import genereCrack, Zset, output, zcracks_ui
@@ -21,8 +17,6 @@ from zcracks_ui import Ui_Zui
 #  ---------------------
 
 
-uF.removeFromSessionPath('LD_LIBRARY_PATH', 'Meshgems-2111')
-
 def stringToFloat(string, typ=float):
   if str(string).replace(' ','')=='':
     out=[]
@@ -78,25 +72,6 @@ class ShipHolderApplication(QGroupBox):
 
     self.verbose=1
 
-    #self.connect(self.ui.CBQuad, SIGNAL("toggled(bool)"),self.pressQuad)
-    #self.connect(self.ui.btReset, SIGNAL("clicked()"),self.pressReset)
-    #self.connect(self.ui.btCancel, SIGNAL("clicked()"),self.pressCancel)
-    #self.connect(self.ui.btApply, SIGNAL("clicked()"),self.pressApply)
-    #self.connect(self.ui.btApplyClose, SIGNAL("clicked()"),self.pressApplyClose)
-    #self.connect(self.ui.btLoad, SIGNAL("clicked()"),self.pressCharger)
-    #self.connect(self.ui.btSave, SIGNAL("clicked()"),self.pressSauver)
-    #self.connect(self.ui.btLoadCracked, SIGNAL("clicked()"),self.pressLoadCracked)
-    #self.connect(self.ui.btLoadSane, SIGNAL("clicked()"),self.pressLoadSane)
-
-    #self.connect(self.ui.btGrVol, SIGNAL("clicked()"),self.pressLoadGroupVOL)
-    #self.connect(self.ui.btGrFace, SIGNAL("clicked()"),self.pressLoadGroupFACE)
-    #self.connect(self.ui.btGrEdge, SIGNAL("clicked()"),self.pressLoadGroupEDGE)
-    #self.connect(self.ui.btGrNode, SIGNAL("clicked()"),self.pressLoadGroupNODE)
-    #self.connect(self.ui.btGrAll, SIGNAL("clicked()"),self.pressLoadGroupALL)
-    #self.connect(self.ui.btVisu, SIGNAL("clicked()"),self.pressVisu)
-
-    #self.connect(self.ui.CBAdvanced, SIGNAL("toggled(bool)"),self.pressAdvanced)
-
     self.ui.CBQuad.toggled.connect(self.pressQuad)
     self.ui.btReset.clicked.connect(self.pressReset)
     self.ui.btCancel.clicked.connect(self.pressCancel)
@@ -144,9 +119,9 @@ class ShipHolderApplication(QGroupBox):
   def pressQuad(self):
     if self.ui.CBQuad.isChecked():
       self.ui.CBBarsoum.setEnabled(True)
-      self.ui.valGradation.setText(QString('2.3'))
+      self.ui.valGradation.setText('2.3')
     else:
-      self.ui.valGradation.setText(QString('1.3'))
+      self.ui.valGradation.setText('1.3')
       self.ui.CBBarsoum.setChecked(False)
       self.ui.CBBarsoum.setEnabled(False)
 
@@ -162,10 +137,10 @@ class ShipHolderApplication(QGroupBox):
       tab=onglet.findChildren(QTableWidget)[0]
       for irow in range(tab.rowCount()):
         if tab.item(irow,0) != None:
-          tab.item(irow,0).setText(QString(''))
-    self.ui.valGradation.setText(QString('1.3'))
-    self.ui.valLayers.setText(QString('5'))
-    self.ui.valIterations.setText(QString('2'))
+          tab.item(irow,0).setText('')
+    self.ui.valGradation.setText('1.3')
+    self.ui.valLayers.setText('6')
+    self.ui.valIterations.setText('2')
     self.ui.CBIs2D.setChecked(False)
     self.ui.CBRefine.setChecked(False)
 
@@ -257,7 +232,7 @@ class ShipHolderApplication(QGroupBox):
       fileNames = fileDiag.selectedFiles()
       filedef = fileNames[0]
       filedef = addExtension(str(filedef), 'med')
-      self.ui.valCrackedName.setText(QString(filedef))
+      self.ui.valCrackedName.setText(filedef)
 
 
   def pressLoadSane(self):
@@ -268,7 +243,7 @@ class ShipHolderApplication(QGroupBox):
     if fileDiag.exec_() :
       fileNames = fileDiag.selectedFiles()
       filedef = fileNames[0]
-      self.ui.valSaneName.setText(QString(filedef))
+      self.ui.valSaneName.setText(filedef)
 
 
   def pressCharger(self):
@@ -287,23 +262,15 @@ class ShipHolderApplication(QGroupBox):
 
       for cont, obj in enumerate(self.lineEditObjects):
         if self.lineEditTypes[cont] in [float, int]:
-          obj.setText(QString(self.data['TXT'+self.lineEditNames[cont]]))
+          obj.setText(self.data['TXT'+self.lineEditNames[cont]])
         else:
-          obj.setText(QString(self.data[self.lineEditNames[cont]]))
+          obj.setText(self.data[self.lineEditNames[cont]])
 
       self.ui.CBQuad.setChecked(True if 'quad' in self.data.keys() and self.data['quad'] else False)
       self.ui.CBBarsoum.setChecked(True if 'barsoum' in self.data.keys() and self.data['barsoum'] else False)
       self.ui.CBIs2D.setChecked(True if 'is2D' in self.data.keys() and self.data['is2D'] else False)
       self.ui.CBRefine.setChecked(True if 'refine' in self.data.keys() and self.data['refine'] else False)
 
-
-
-
-
-      #if self.data['quad']: self.ui.CBQuad.setChecked(True)
-      #if self.data['barsoum']: self.ui.CBBarsoum.setChecked(True)
-      #if self.data['is2D']: self.ui.CBIs2D.setChecked(True)
-      #if self.data['refine']: self.ui.CBRefine.setChecked(True)
       self.setTableParameters()
 
 
@@ -451,7 +418,7 @@ class ShipHolderApplication(QGroupBox):
         if tab.item(irow,0) == None:
           item = QTableWidgetItem()
           tab.setItem(irow, 0, item)
-        tab.item(irow,0).setText(QString(self.data['TXTcrack'][str(self.ui.tabWidget.tabText(iongl))][str(label)]))
+        tab.item(irow,0).setText(self.data['TXTcrack'][str(self.ui.tabWidget.tabText(iongl))][str(label)])
       if str(self.ui.tabWidget.tabText(iongl)) == self.data['TXTcrack']['actif']:
         self.ui.tabWidget.setCurrentWidget(onglet)
 
@@ -475,19 +442,19 @@ class ShipHolderApplication(QGroupBox):
 
       for group in objetSain.GetGroups():
         if (self.GroupToLoad in ['VOL','ALL']) and (group.GetType()==SMESH.VOLUME):
-          groupsVOL+=group.GetName().replace(' ','')+" "
+          groupsVOL+=self.cleanGroupName(group)
           nGr+=1
 
         if (self.GroupToLoad in ['FACE','ALL']) and (group.GetType()==SMESH.FACE):
-          groupsFAC+=group.GetName().replace(' ','')+" "
+          groupsFAC+=self.cleanGroupName(group)
           nGr+=1
 
         if (self.GroupToLoad in ['EDGE','ALL']) and (group.GetType()==SMESH.EDGE):
-          groupsEDG+=group.GetName().replace(' ','')+" "
+          groupsEDG+=self.cleanGroupName(group)
           nGr+=1
 
         if (self.GroupToLoad in ['NODE','ALL']) and (group.GetType()==SMESH.NODE):
-          groupsNOD+=group.GetName().replace(' ','')+" "
+          groupsNOD+=self.cleanGroupName(group)
           nGr+=1
 
       if groupsVOL!='':  self.ui.valGrVol.setText(groupsVOL)
@@ -503,6 +470,24 @@ class ShipHolderApplication(QGroupBox):
         remove(f)
       except:
         pass
+        
+  def cleanGroupName(self, group):
+    name=group.GetName()
+    while name.endswith(' '): name=name[:-1]
+    if ' ' in name: 
+      message('A','%s group has a space in its name --> ignored' %name)
+      return('')
+    else:
+      return(name+" ")
+      
+  def checkNamesSpaces(self, names):
+    if type(names) is str: names=[names]
+    ok=True
+    for n in names:
+      if ' ' in n:
+        message('E','%s has a space in its name, please remove it' %n, goOn=True)
+        ok=False
+    return(ok)
 
 
 #  ---------------------------------
index 8a316b0ddbeb82ca75c21e9e6daf101fdbd1644b..00b31f59f1f4c6fb804933e8e1b19e9c1fdab72d 100644 (file)
@@ -22,9 +22,9 @@ class output():
       pass
     f = open(self.tmpFile,'w')
     f.write('\n      ------------------------------\n')
-    f.write('     |   BIENVENU DANS L\'INTERFACE  |\n')
+    f.write('     |  BIENVENUE DANS L\'INTERFACE  |\n')
     f.write('     |      ZCRACKS DE SALOME       |\n')
-    f.write('     |        VERSION ALPHA         |\n')
+    f.write('     |        VERSION BETA          |\n')
     f.write('       ------------------------------\n\n')
     f.close()
 
index 36db725808755552d288701ac6b4ab9a165c1322..9571fd8d922ff035f48ee09d68fec83dda91742d 100644 (file)
@@ -178,7 +178,13 @@ def extendElsets(meshFile, outFile=None):
   smesh = smeshBuilder.New(theStudy)
 
   ([mesh], status) = smesh.CreateMeshesFromMED(meshFile)
-
+  
+  if mesh.NbVolumes()>0: 
+    case2D=False
+    mesh.Reorient2DBy3D( [ mesh ], mesh, 1 )
+  else:
+    case2D=True
+    
   mesh=cleanGroups(mesh)
 
   # Node color status
@@ -339,91 +345,6 @@ def getMaxAspectRatio(tmpdir):
   return(float(maxAR))
 
 
-#def extendElsets(meshFile):
-  #if not path.isfile(meshFile):
-    #message('E','Mesh med file is not valid')
-    #return(-1)
-
-  #import SMESH, salome
-  ##salome.salome_init()
-  #theStudy = salome.myStudy
-  #from salome.smesh import smeshBuilder
-  #smesh = smeshBuilder.New(theStudy)
-
-  #([mesh], status) = smesh.CreateMeshesFromMED(meshFile)
-
-  ## Node color status
-  #nodeList=mesh.GetNodesId()
-  #colorList=[0]*len(nodeList)
-
-  ## Init using SIDE0 SIDE1
-  #for group in mesh.GetGroups():
-    #if group.GetType()==SMESH.FACE :
-      #color=0
-      #if group.GetName()[0:4]=='SIDE0' :
-        #color=1
-      #elif group.GetName()[0:4]=='SIDE1' :
-        #color=2
-      #else : continue
-      ## Get faces
-      #faces=group.GetIDs()
-      ## Set faces nodes to given color
-      #for face_id in faces :
-        #for face_node_id in mesh.GetElemNodes(face_id) :
-          #colorList[face_node_id-1]=color
-
-  ## Propagates color using elem connectivity
-  ## Always propagates max color
-  #volElemList=mesh.GetElementsByType(SMESH.VOLUME)
-  #ifChanged=True
-  #while ifChanged :
-    #ifChanged=False
-    #minColor=100
-    #maxColor=0
-    #for elemId in volElemList:
-      #for elemNodeId in mesh.GetElemNodes(elemId) :
-        #nodeColor=colorList[elemNodeId-1]
-        #if nodeColor<minColor : minColor=nodeColor
-        #if nodeColor>maxColor : maxColor=nodeColor
-      #if minColor!=maxColor :
-        #ifChanged = True
-        #for elemNodeId in mesh.GetElemNodes(elemId) :
-          #colorList[elemNodeId-1]=maxColor
-
-  #velem0 = []
-  #velem1 = []
-  #for elemId in volElemList:
-    #elemNodesId=mesh.GetElemNodes(elemId)
-    #elemColor=colorList[elemNodesId[0]-1]
-    #if(elemColor==1) : velem0.append(elemId)
-    #if(elemColor==2) : velem1.append(elemId)
-
-  #mesh.MakeGroupByIds('SIDE_co',SMESH.VOLUME,velem0)
-  #mesh.MakeGroupByIds('SIDE_ext',SMESH.VOLUME,velem1)
-
-  #surfElemList=mesh.GetElementsByType(SMESH.FACE)
-  #selem0 = []
-  #selem1 = []
-  #nbelem0=0
-  #nbelem1=0
-
-  #for elemId in surfElemList:
-    #elemNodesId=mesh.GetElemNodes(elemId)
-    #elemColor=colorList[elemNodesId[0]-1]
-    #if(elemColor==1) : selem0.append(elemId)
-    #if(elemColor==2) : selem1.append(elemId)
-
-  #mesh.MakeGroupByIds('SIDE_co',SMESH.FACE,selem0)
-  #mesh.MakeGroupByIds('SIDE_ext',SMESH.FACE,selem1)
-
-  #maxAR=0.
-  #for elem in volElemList:
-    #maxAR=max(mesh.GetAspectRatio(elem),maxAR)
-  #for elem in surfElemList:
-    #maxAR=max(mesh.GetAspectRatio(elem),maxAR)
-
-  #mesh.ExportMED(meshFile, 0, SMESH.MED_V2_2, 1, None ,1)
-  #return(maxAR)
 
 
 def removeFromSessionPath(envVar, patern):
index d464158f1b4d27f24d99bea89ef09cf9bd5b08be..8fc299d22f12083a4d7dcead90dc2a61cf9c7516 100644 (file)
@@ -90,7 +90,7 @@
        </size>
       </property>
       <property name="toolTip">
-       <string>Clear all paramters</string>
+       <string>Clear all parameters</string>
       </property>
       <property name="text">
        <string>Reset</string>
         </size>
        </property>
        <property name="toolTip">
-        <string>file adress (ex: /home/A123456/cracked.med)</string>
+        <string>file address (ex: /home/A123456/cracked.med)</string>
        </property>
        <property name="autoFillBackground">
         <bool>true</bool>
      <item row="1" column="1">
       <widget class="QLineEdit" name="valSaneName">
        <property name="toolTip">
-        <string notr="true">file adress (ex: /home/A123456/cuve.med)</string>
+        <string notr="true">file address (ex: /home/A123456/cuve.med)</string>
        </property>
        <property name="autoFillBackground">
         <bool>true</bool>
index 9b5d278b39e716d3e4fa5edc5f0c1b1eab43a8f5..449e30b4261f0895b5186130d3b7792e9859c64c 100644 (file)
@@ -116,7 +116,7 @@ class Ui_Zui(object):
         self.txtSaneName.setObjectName(_fromUtf8("txtSaneName"))
         self.gridLayout.addWidget(self.txtSaneName, 1, 0, 1, 1)
         self.valSaneName = QtGui.QLineEdit(self.gridLayoutWidget)
-        self.valSaneName.setToolTip(_fromUtf8("file adress (ex: /home/A123456/cuve.med)"))
+        self.valSaneName.setToolTip(_fromUtf8("file address (ex: /home/A123456/cuve.med)"))
         self.valSaneName.setAutoFillBackground(True)
         self.valSaneName.setInputMask(_fromUtf8(""))
         self.valSaneName.setText(_fromUtf8(""))
@@ -591,7 +591,7 @@ class Ui_Zui(object):
 
     def retranslateUi(self, Zui):
         Zui.setWindowTitle(_translate("Zui", "Zcracks interface - version dev", None))
-        self.btReset.setToolTip(_translate("Zui", "Clear all paramters", None))
+        self.btReset.setToolTip(_translate("Zui", "Clear all parameters", None))
         self.btReset.setText(_translate("Zui", "Reset", None))
         self.btSave.setToolTip(_translate("Zui", "Save parameters in a file", None))
         self.btSave.setText(_translate("Zui", "Save", None))
@@ -605,7 +605,7 @@ class Ui_Zui(object):
         self.btApplyClose.setText(_translate("Zui", "Apply and close", None))
         self.txtCrackedName.setToolTip(_translate("Zui", "Name of the resulting cracked mesh", None))
         self.txtCrackedName.setText(_translate("Zui", "Cracked name", None))
-        self.valCrackedName.setToolTip(_translate("Zui", "file adress (ex: /home/A123456/cracked.med)", None))
+        self.valCrackedName.setToolTip(_translate("Zui", "file address (ex: /home/A123456/cracked.med)", None))
         self.txtSaneName.setToolTip(_translate("Zui", "Name of the sane mesh", None))
         self.txtSaneName.setText(_translate("Zui", "Sane mesh", None))
         self.btLoadCracked.setText(_translate("Zui", "...", None))
index 38d11ea404dcbdefbfc35b57c74b5315a5ff125c..772e465b86e2dd843b4953009252bf9abf30b007 100644 (file)
@@ -57,7 +57,7 @@ class cubeAngle(fissureGenerique):
 
     shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/CubeAngleFiss.brep"), "BREP")
     fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
-    geompy.UnionIDs(fondFiss, [4])
+    geompy.UnionIDs(fondFiss, [3])
     geompy.addToStudy( shellFiss, 'shellFiss' )
     geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
 
index 97d18a45db98ba518de1c0bcf255719c840c276e..c70801eaaeb232c795d126f987bc9488f7ebfc3f 100644 (file)
@@ -6,7 +6,7 @@ from blocFissure import gmu
 dicoParams = dict(nomCas            = 'cubeCoin',
                   maillageSain      = os.path.join(gmu.pathBloc, 'materielCasTests/cubeFin.med'),
                   brepFaceFissure   = os.path.join(gmu.pathBloc, "materielCasTests/cubeFin_Coin.brep"),
-                  edgeFissIds       = [7],
+                  edgeFissIds       = [6],
                   lgInfluence       = 50,
                   meshBrep          = (5,10),
                   rayonPipe         = 10,
index 0d93518cde90a80eb1ce3d1b83db278da202580e..cd3db8cb2482a72e5e258e8d50471fd37e46ce55 100644 (file)
@@ -6,7 +6,7 @@ from blocFissure import gmu
 dicoParams = dict(nomCas            = 'cubeMilieu',
                   maillageSain      = os.path.join(gmu.pathBloc, 'materielCasTests/cubeFin.med'),
                   brepFaceFissure   = os.path.join(gmu.pathBloc, "materielCasTests/cubeFin_Milieu.brep"),
-                  edgeFissIds       = [7],
+                  edgeFissIds       = [6],
                   lgInfluence       = 50,
                   meshBrep          = (5,10),
                   rayonPipe         = 10,
index 9885a96a385a27a1a4884337e829a9c92c15b754..628831869a1d1a48692fd5e87f0de1477428da08 100644 (file)
@@ -61,7 +61,7 @@ class cylindre(fissureGenerique):
 
     shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/FissInCylindre2.brep"), "BREP")
     fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
-    geompy.UnionIDs(fondFiss, [7])
+    geompy.UnionIDs(fondFiss, [6])
     geompy.addToStudy( shellFiss, 'shellFiss' )
     geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
 
index 5c4b63f3dbaec1247b47d2360967caa609a15076..0e54cca992c44be5f789f2fa542336db8cc999cf 100644 (file)
@@ -6,7 +6,7 @@ from blocFissure import gmu
 dicoParams = dict(nomCas            = 'disque',
                   maillageSain      = os.path.join(gmu.pathBloc, 'materielCasTests/disque.med'),
                   brepFaceFissure   = os.path.join(gmu.pathBloc, "materielCasTests/ellipse_disque.brep"),
-                  edgeFissIds       = [4],
+                  edgeFissIds       = [3],
                   lgInfluence       = 10,
                   meshBrep          = (0.5,2.5),
                   rayonPipe         = 1.0,
index 2e39357ae5b9a76a4dce43217eccbd338c5c2ced..53ac507b8b07250d2211c9aa4a65d0b64a852502 100644 (file)
@@ -34,7 +34,7 @@ class ellipse_1(fissureGenerique):
 #    logging.info("genereGeometrieSaine %s", self.nomCas)
 #    box = geompy.MakeBox(0, -500, 0, 400, 500, 800, "boiteSaine")
 #    return [box]
-    
+
   # ---------------------------------------------------------------------------
   def genereMaillageSain(self, geometriesSaines, meshParams):
     logging.info("genereMaillageSain %s", self.nomCas)
@@ -65,7 +65,7 @@ class ellipse_1(fissureGenerique):
 
     shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/ellipse1.brep"), "BREP")
     fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
-    geompy.UnionIDs(fondFiss, [4])
+    geompy.UnionIDs(fondFiss, [3])
     geompy.addToStudy( shellFiss, 'shellFiss' )
     geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
 
index 69ae3ed958c7568e67dbb1abc02ea7b13aef72d2..35c8598d95b86b039c87df13a490f6656ae7ad03 100644 (file)
@@ -37,7 +37,7 @@ class ellipse_2(ellipse_1):
 
     shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/ellipse1_pb.brep"), "BREP")
     fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
-    geompy.UnionIDs(fondFiss, [4])
+    geompy.UnionIDs(fondFiss, [3])
     geompy.addToStudy( shellFiss, 'shellFiss' )
     geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
 
index 6f87ec6b461436a5a12d9801eab13613c51450fc..a348ae4543975e90d04cd1c988d3bcce1f59621f 100644 (file)
@@ -140,10 +140,11 @@ class fissure_Coude(fissureGenerique):
 
     # --- peau tube exterieur (PEAUEXT)
 
-    cercle1 = geompy.MakeCircle(centre, OZ, de/2.)
-    extru1 = geompy.MakePrismVecH(cercle1, OZ, l_tube_p1)
-    revol1 = geompy.MakeRevolution(cercle1, axe, angleCoude*math.pi/180.0)
-    rot1 = geompy.MakeRotation(cercle1, axe, angleCoude*math.pi/180.0)
+    Disk_3 = geompy.MakeDiskPntVecR(centre, OZ, de/2. +epais)
+    couronne1 = geompy.MakeCut(Disk_3, Disk_1)
+    extru1 = geompy.MakePrismVecH(couronne1, OZ, l_tube_p1)
+    revol1 = geompy.MakeRevolution(couronne1, axe, angleCoude*math.pi/180.0)
+    rot1 = geompy.MakeRotation(couronne1, axe, angleCoude*math.pi/180.0)
     extru2 = geompy.MakePrismVecH(rot1, Rotation_2, -l_tube_p2)
     externe = geompy.MakeFuse(extru1, revol1)
     externe = geompy.MakeFuse(extru2, externe)
@@ -294,7 +295,7 @@ class fissure_Coude(fissureGenerique):
 
     azimut = -azimut # axe inverse / ASCOUF
     axe = geompy.MakeTranslation(OY, -r_cintr, 0, -l_tube_p1)
-    
+
     if not lgInfluence:
       lgInfluence = profondeur
 
index cf4400faa918e2fdd0205e7dcb1a899bb245a3f8..34ab003227e69c754a5be4a490e9557c52c75988 100644 (file)
@@ -59,7 +59,7 @@ class vis_1(fissureGenerique):
 
     shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/visFiss.brep"), "BREP")
     fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
-    geompy.UnionIDs(fondFiss, [7, 9])
+    geompy.UnionIDs(fondFiss, [6, 8])
     geompy.addToStudy( shellFiss, 'shellFiss' )
     geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
 
index 72abf4e5ff8107581cf10522b8f4ff2372776702..accd55b19d16c63ebb21aca19631918b4f1cd705 100644 (file)
@@ -36,7 +36,7 @@ master_doc = 'index'
 
 # General substitutions.
 project = 'Plug-in blocFissure'
-copyright = '2010-2016 EDF R&D'
+copyright = '2010-2017 EDF R&D'
 
 # The default replacements for |version| and |release|, also used in various
 # other places throughout the built documents.
index d77ccafd65d77cfbe49f1fedee9dec725e340a90..0dcd41f39fa9c9e33d552bcc53ad329a9a72528d 100644 (file)
@@ -12,12 +12,12 @@ from sortEdges import sortEdges
 def construitEdgesRadialesDebouchantes(idisklim, idiskout, gptsdisks, raydisks,
                                        facesPipePeau, edgeRadFacePipePeau, nbsegCercle):
   """
-  construction des listes d'edges radiales sur chaque extrémité débouchante 
+  construction des listes d'edges radiales sur chaque extrémité débouchante
   """
   logging.info('start')
-    
+
   # --- listes de nappes radiales en filling à chaque extrémité débouchante
-  
+
   facesDebouchantes = [False, False]
   idFacesDebouchantes = [-1, -1] # contiendra les indices des faces disque débouchantes (facesPipePeau)
   listNappes =[]
@@ -47,7 +47,7 @@ def construitEdgesRadialesDebouchantes(idisklim, idiskout, gptsdisks, raydisks,
         geomPublish(initLog.debug, nappe, name)
         facesDebouchantes[i] = True
     listNappes.append(nappes)
-      
+
   # --- mise en correspondance avec les indices des faces disque débouchantes (facesPipePeau)
   for i, nappes in enumerate(listNappes):
     if facesDebouchantes[i]:
@@ -82,27 +82,48 @@ def construitEdgesRadialesDebouchantes(idisklim, idiskout, gptsdisks, raydisks,
           else:
             maxl = geompy.BasicProperties(edge)[0]
           if maxl < 0.01: # problème MakeSection
-            logging.debug("problème MakeSection recherche edge radiale %s, longueur trop faible: %s, utilisation partition", k, maxl)
+            logging.info("problème MakeSection recherche edge radiale %s, longueur trop faible: %s, utilisation partition", k, maxl)
             partNappeFace = geompy.MakePartition([face, nappes[k]], [] , [], [], geompy.ShapeType["FACE"], 0, [], 0)
             edps= geompy.ExtractShapes(partNappeFace, geompy.ShapeType["EDGE"], False)
             ednouv = []
             for ii, ed in enumerate(edps):
+              dmax=100.
               vxs = geompy.ExtractShapes(ed, geompy.ShapeType["VERTEX"], False)
               distx = [geompy.MinDistance(vx, face) for vx in vxs]
               distx += [geompy.MinDistance(vx, nappes[k]) for vx in vxs]
               dmax = max(distx)
-              logging.debug("  dmax %s",dmax)
-              if dmax < 0.01:
+              lgedge = geompy.BasicProperties(ed)[0]
+              logging.debug("  dmax %s, longueur edge %s",dmax, lgedge)
+              if dmax < 0.01 and  lgedge > 0.01:
                 ednouv.append(ed)
-            logging.debug("  edges issues de la partition: %s", ednouv)
-            for ii, ed in enumerate(ednouv):
-              geomPublish(initLog.debug, ed, "ednouv%d"%ii)
-            [edsorted, minl,maxl] = sortEdges(ednouv)
-            logging.debug("  longueur edge trouvée: %s", maxl) 
-            edge = edsorted[-1]
+            if (len(ednouv) > 0):
+              logging.debug("  edges issues de la partition: %s", ednouv)
+              for ii, ed in enumerate(ednouv):
+                geomPublish(initLog.debug, ed, "ednouv%d"%ii)
+              [edsorted, minl,maxl] = sortEdges(ednouv)
+              logging.debug("  longueur edge trouvée: %s", maxl)
+              edge = edsorted[-1]
+            else:
+              logging.info("problème partition recherche edge radiale %s", k)
+              vxs = geompy.ExtractShapes(partNappeFace, geompy.ShapeType["VERTEX"], False)
+              vxnouv=[]
+              for ii,vx in enumerate(vxs):
+                distx = geompy.MinDistance(vx, face)
+                distx += geompy.MinDistance(vx, nappes[k])
+                logging.debug("vertex distance: %s", distx)
+                if distx < 0.005:
+                  vxnouv.append(vx)
+              logging.debug("nombre vertex candidats %s", len(vxnouv))
+              if len(vxnouv) >= 2:
+                eds = [geompy.MakeEdge(vxnouv[j],vxnouv[(j+1)%len(vxnouv)]) for j in range(len(vxnouv))]
+                [edsorted2, minl,maxl] = sortEdges(eds)
+                edge = edsorted2[-1]
+                logging.debug("lg edge: %s", maxl)
+              else:
+                logging.debug("problème recherche edge radiale %s non résolu", k)
           edges.append(edge)
           name = 'edgeEndPipe%d'%k
           geomPublish(initLog.debug, edge, name)
       listEdges.append(edges)
-      
+
   return (listEdges, idFacesDebouchantes)
\ No newline at end of file
index bf8e0e63927e700efe5d9b19805c4e5e27884784..22432356795be3b685b24b92b10135e0ca3947b8 100644 (file)
@@ -178,10 +178,10 @@ class fissureCoude(fissureGenerique):
 
     # --- peau tube exterieur (PEAUEXT)
 
-    cercle1 = geompy.MakeCircle(centre, OZ, de/2.)
-    extru1 = geompy.MakePrismVecH(cercle1, OZ, l_tube_p1)
-    revol1 = geompy.MakeRevolution(cercle1, axe, angleCoude*math.pi/180.0)
-    rot1 = geompy.MakeRotation(cercle1, axe, angleCoude*math.pi/180.0)
+    Disk_3 = geompy.MakeDiskPntVecR(centre, OZ, de/2. +epais)
+    extru1 = geompy.MakePrismVecH(Disk_3, OZ, l_tube_p1)
+    revol1 = geompy.MakeRevolution(Disk_3, axe, angleCoude*math.pi/180.0)
+    rot1 = geompy.MakeRotation(Disk_3, axe, angleCoude*math.pi/180.0)
     extru2 = geompy.MakePrismVecH(rot1, Rotation_2, -l_tube_p2)
     externe = geompy.MakeFuse(extru1, revol1)
     externe = geompy.MakeFuse(extru2, externe)
@@ -338,13 +338,13 @@ class fissureCoude(fissureGenerique):
     self.elliptique  = False
     if shapeFissureParams.has_key('elliptique'):
       self.elliptique = shapeFissureParams['elliptique']
-      
+
 
 
     azimut = -azimut # axe inverse / ASCOUF
     axe = geompy.MakeTranslation(OY, -r_cintr, 0, -l_tube_p1)
     geomPublish(initLog.debug, axe,"axe")
-    
+
     if not lgInfluence:
       lgInfluence = profondeur
 
@@ -377,7 +377,7 @@ class fissureCoude(fissureGenerique):
       lgfond = longueur -2*profondeur
       angle = lgfond/(2*raybor)
       pb = geompy.MakeVertex(raybor, 0, 0)
-      pi = geompy.MakeVertex(rayint, 0, 0)      
+      pi = geompy.MakeVertex(rayint, 0, 0)
       pbl = geompy.MakeRotation(pb, OZ, angle)
       pbr = geompy.MakeRotation(pb, OZ, -angle)
       geomPublish(initLog.debug, pbl,"pbl")
@@ -395,7 +395,7 @@ class fissureCoude(fissureGenerique):
         pt = geompy.MakeRotation(pil, axl, angi)
         points.append(pt)
       for i in range(nbp):
-        angi = angle -2.0*i*angle/nbp      
+        angi = angle -2.0*i*angle/nbp
         pt = geompy.MakeRotation(pi, OZ, angi)
         points.append(pt)
       for i in range(nbp+1):
@@ -407,30 +407,30 @@ class fissureCoude(fissureGenerique):
         pt = geompy.MakeTranslation(pt, 0, 0, -l_tube_p1)
         pt = geompy.MakeRotation(pt, axe, alpha*math.pi/180.)
         points[i] = pt
-      wire0 = geompy.MakeInterpol(points[0:nbp+1])     
-      wire1 = geompy.MakeInterpol(points[nbp:2*nbp+1])     
-      wire2 = geompy.MakeInterpol(points[2*nbp:3*nbp+1])     
+      wire0 = geompy.MakeInterpol(points[0:nbp+1])
+      wire1 = geompy.MakeInterpol(points[nbp:2*nbp+1])
+      wire2 = geompy.MakeInterpol(points[2*nbp:3*nbp+1])
       #wiretube = geompy.MakeInterpol(points)
       wiretube=geompy.MakeWire([wire0,wire1,wire2])
       geomPublish(initLog.debug, wiretube,"wiretube")
-      
+
       pe = geompy.MakeVertex(rayext, 0, 0)
       pe = geompy.MakeRotation(pe, OZ, azimut*math.pi/180.)
       pe = geompy.MakeTranslation(pe, 0, 0, -l_tube_p1)
       pe = geompy.MakeRotation(pe, axe, alpha*math.pi/180.)
-     
+
       arce = geompy.MakeArc(points[0], pe, points[-1])
       geomPublish(initLog.debug, arce,"arce")
-      
+
       facefiss = geompy.MakeFaceWires([arce, wiretube], 1)
       geomPublish(initLog.debug,  facefiss, 'facefissPlace' )
-      
+
       pc = geompy.MakeVertex((raybor + rayint)/2.0, 0, 0)
       centre = geompy.MakeRotation(pc, OZ, azimut*math.pi/180.)
       centre = geompy.MakeTranslation(centre, 0, 0, -l_tube_p1)
       centre = geompy.MakeRotation(centre, axe, alpha*math.pi/180.)
       geomPublish(initLog.debug,  centre, 'centrefissPlace' )
-      
+
       wiretube = geompy.GetInPlace(facefiss, wiretube)
       geomPublish(initLog.debug, wiretube, 'wiretubePlace' )
       try:
@@ -449,7 +449,7 @@ class fissureCoude(fissureGenerique):
       else:
         raybor = de/2. - epais
         dp = +1.0
-      prof = dp * profondeur     
+      prof = dp * profondeur
       lgfond = longueur -2*profondeur
       cosaz = math.cos(azimut*math.pi/180.)
       sinaz = math.sin(azimut*math.pi/180.)
@@ -477,9 +477,9 @@ class fissureCoude(fissureGenerique):
       for i in range(nbp+2):
         x = math.sin(i*math.pi/(nbp+1)) # fonction de répartition des points : distance relative
         x2 = x*x
-        totx += x2        
+        totx += x2
         xs.append(totx)
-        logging.debug("x2: %s, totx: %s", x2, totx)     
+        logging.debug("x2: %s, totx: %s", x2, totx)
       for i in range(nbp+1):
         #posi = nbp -i             # répartition équidistante des points sur la courbe
         posi = nbp*(1 -xs[i]/totx) # points plus resserrés aux extrémités de la courbe
@@ -501,11 +501,11 @@ class fissureCoude(fissureGenerique):
         x = math.sin(i*math.pi/nbp)
         #x = 1.0 # répartition équidistante des points sur la courbe
         x2 = x*x # points plus resserrés aux extrémités de la courbe
-        totx += x2        
+        totx += x2
         xs.append(totx)
-        logging.debug("x2: %s, totx: %s", x2, totx)     
+        logging.debug("x2: %s, totx: %s", x2, totx)
       for i in range(nbp):
-        angi = alfrd -angle +2.0*angle*xs[i]/totx      
+        angi = alfrd -angle +2.0*angle*xs[i]/totx
         pt = geompy.MakeRotation(pi, axe, angi)
         points.append(pt)
       curves.append(geompy.MakeInterpol(points))
@@ -521,9 +521,9 @@ class fissureCoude(fissureGenerique):
       for i in range(nbp+2):
         x = math.sin(i*math.pi/(nbp+1))
         x2 = x*x
-        totx += x2        
+        totx += x2
         xs.append(totx)
-        logging.debug("x2: %s, totx: %s", x2, totx)     
+        logging.debug("x2: %s, totx: %s", x2, totx)
       for i in range(nbp+1):
         #posi = nbp -i        # répartition équidistante des points sur la courbe
         posi = nbp*xs[i]/totx # points plus resserrés aux extrémités de la courbe
@@ -536,7 +536,7 @@ class fissureCoude(fissureGenerique):
 #      for i, pt in enumerate(points):
 #        name = "point%d"%i
 #        geomPublishInFather(initLog.debug,curves[-1], pt, name)
-      
+
       wiretube = geompy.MakeWire(curves)
       geomPublish(initLog.debug, wiretube,"wiretube")
       try:
@@ -545,26 +545,26 @@ class fissureCoude(fissureGenerique):
       except:
         logging.debug("erreur MakeEdgeWire sur fond de fissure, on fait sans")
         edgetube = None
-      
+
       pts = []
       pts.append(point0)
       dpr = prof*math.cos(5.0*math.pi/8.0)
       pe = geompy.MakeTranslation(pb, dpr*cosaz, dpr*sinaz, 0., "pe")
       for i in range(nbp):
-        angi = alfrd -angle +2.0*i*angle/nbp      
+        angi = alfrd -angle +2.0*i*angle/nbp
         pt = geompy.MakeRotation(pe, axe, angi)
         pts.append(pt)
       pts.append(point1)
       arce = geompy.MakeInterpol(pts)
       geomPublish(initLog.debug, arce,"arce")
-      
+
       facefiss = geompy.MakeFaceWires([arce, wiretube], 0)
       geomPublish(initLog.debug,  facefiss, 'facefissPlace' )
-      
+
       pc = geompy.MakeTranslation(pb, 0.5*prof*cosaz, 0.5*prof*sinaz, 0.)
       centre = geompy.MakeRotation(pc, axe, alfrd)
       geomPublish(initLog.debug,  centre, 'centrefissPlace' )
-      
+
       edges = geompy.ExtractShapes(facefiss, geompy.ShapeType["EDGE"], True)
       edgesTriees, minl, maxl = sortEdges(edges)
       edges = edgesTriees[:-1] # la plus grande correspond à arce, on l'elimine
@@ -581,7 +581,7 @@ class fissureCoude(fissureGenerique):
       else:
         raybor = de/2. - epais
         dp = +1.0
-      prof = dp * profondeur     
+      prof = dp * profondeur
       cosaz = math.cos(azimut*math.pi/180.)
       sinaz = math.sin(azimut*math.pi/180.)
       alfrd = alpha*math.pi/180.
@@ -602,7 +602,7 @@ class fissureCoude(fissureGenerique):
       cox = geompy.VectorCoordinates(ax1)
       coy = geompy.VectorCoordinates(ay1)
       localLCS = geompy.MakeMarker(coo[0], coo[1], coo[2], cox[0], cox[1], cox[2], coy[0], coy[1], coy[2], "localLCS")
-      
+
       pco = geompy.MakeVertex(0, 0, -profondeur, "pco")
       pao = geompy.MakeRotation(pco, OY, 0.6*math.pi, "pao")
       pbo = geompy.MakeRotation(pco, OY, -0.6*math.pi, "pbo")
@@ -620,7 +620,7 @@ class fissureCoude(fissureGenerique):
       edgesTriees, minl, maxl = sortEdges(edges)
       edgetube = edgesTriees[-1] # la plus grande correspond à arci
       wiretube = edgetube
-      
+
       pc = geompy.MakeTranslation(pb, 0.5*prof*cosaz, 0.5*prof*sinaz, 0.)
       centre = geompy.MakeRotation(pc, axe, alfrd)
       geomPublish(initLog.debug,  centre, 'centrefissPlace' )
index a3abb62086425a279d28964a5ce3ebac689ffcb2..70595896ef34d9461632b806c2840defafa5b0ba 100644 (file)
@@ -15,16 +15,16 @@ def identifieEdgesPeau(edgesFissExtPipe,verticesPipePeau, facePeau, facesPeauSor
   identification précise des edges et disques des faces de peau selon index extremité fissure
   """
   logging.info('start')
-  
+
   facesPipePeau = [None for i in range(len(edgesFissExtPipe))]
   endsEdgeFond = [None for i in range(len(edgesFissExtPipe))]
   edgeRadFacePipePeau = [None for i in range(len(edgesFissExtPipe))]
-  
+
   edgesListees = []
   edgesCircPeau = []
   verticesCircPeau = []
   if len(verticesPipePeau) > 0: # --- au moins une extrémité du pipe sur cette face de peau
-    
+
     for face in facesPeauSorted[:-1]: # la ou les faces débouchantes, pas la grande face de peau
       logging.debug("examen face debouchante circulaire")
       for i,efep in enumerate(edgesFissExtPipe):
@@ -52,11 +52,11 @@ def identifieEdgesPeau(edgesFissExtPipe,verticesPipePeau, facePeau, facesPeauSor
           pass
         pass
       pass
-    
+
     # --- edges circulaires de la face de peau et points de jonction de la face externe de fissure
     logging.debug("facesPipePeau: %s", facesPipePeau)
     edgesCircPeau = [None for i in range(len(facesPipePeau))]
-    verticesCircPeau = [None for i in range(len(facesPipePeau))]        
+    verticesCircPeau = [None for i in range(len(facesPipePeau))]
     for i,fcirc in enumerate(facesPipePeau):
       edges = geompy.GetSharedShapesMulti([facePeau, fcirc], geompy.ShapeType["EDGE"])
       grpEdgesCirc = geompy.CreateGroup(facePeau, geompy.ShapeType["EDGE"])
@@ -96,8 +96,26 @@ def identifieEdgesPeau(edgesFissExtPipe,verticesPipePeau, facePeau, facesPeauSor
   geompy.UnionList(groupEdgesBordPeau, edgesBords)
   bordsVifs = None
   if aretesVivesC is not None:
-    logging.debug("identification des bords vifs par GetInPlace (old)")
+    logging.debug("identification des bords vifs par GetInPlace")
     bordsVifs = geompy.GetInPlace(facePeau, aretesVivesC)
+    if bordsVifs is None:
+      logging.debug("pas d'identification des bords vifs par GetInPlace: test par distance")
+      edvifs = []
+      arvives = geompy.ExtractShapes(aretesVivesC, geompy.ShapeType["EDGE"], False)
+      edgs = geompy.ExtractShapes(facePeau, geompy.ShapeType["EDGE"], False)
+      for ed in edgs:
+        vxs = geompy.ExtractShapes(ed, geompy.ShapeType["VERTEX"], False)
+        for ar in arvives:
+          d = geompy.MinDistance(vxs[0], ar)
+          d += geompy.MinDistance(vxs[1], ar)
+          logging.debug("test distance bord face peau - arete vive: %s",d)
+          if d < 0.001:
+            edvifs.append(ed)
+            break
+      if len(edvifs) >0:
+        bordsVifs = geompy.CreateGroup(facePeau,geompy.ShapeType["EDGE"])
+        for ed in edvifs:
+          geompy.AddObject(bordsVifs, geompy.GetSubShapeID(facePeau, ed))
   if bordsVifs is not None:
     geomPublishInFather(initLog.debug, facePeau, bordsVifs, "bordsVifs")
     groupEdgesBordPeau = geompy.CutGroups(groupEdgesBordPeau, bordsVifs)
@@ -114,9 +132,9 @@ def identifieEdgesPeau(edgesFissExtPipe,verticesPipePeau, facePeau, facesPeauSor
       aretesVivesCoupees += edv
   logging.debug("aretesVivesCoupees %s",aretesVivesCoupees)
   geomPublishInFather(initLog.debug, facePeau, groupEdgesBordPeau , "EdgesBords")
-    
+
   # ---  edges de la face de peau partagées avec la face de fissure
-  
+
   edgesPeau = geompy.ExtractShapes(facePeau, geompy.ShapeType["EDGE"], False)
   edges = substractSubShapes(facePeau, edgesPeau, edgesListees)
   edgesFissurePeau = []
@@ -136,7 +154,7 @@ def identifieEdgesPeau(edgesFissExtPipe,verticesPipePeau, facePeau, facesPeauSor
       edgesFissurePeau.append(edge)
       name = "edgeFissurePeau%d"%i
       geomPublishInFather(initLog.debug, facePeau,  edge, name)
-      
+
   return (endsEdgeFond, facesPipePeau, edgeRadFacePipePeau,
           edgesCircPeau, verticesCircPeau, groupEdgesBordPeau,
           bordsVifs, edgesFissurePeau, aretesVivesCoupees)
index 3efd9ce852f141f572a93079a4b4dcf12246f855..445fa678e8080c1cd1c76f41067bbe741fca95ce 100644 (file)
@@ -181,7 +181,7 @@ remote  = nepal
 defaultres = local
 
 # The following sections defines the available configurations.
-# The name of the section can be choosen arbitrary. But the value of
+# The name of the section can be chosen arbitrarily. But the value of
 # the resname key MUST be the name of a SALOME resource defined in the
 # catalog of resources (CatalogResources.xml).
 
old mode 100755 (executable)
new mode 100644 (file)
index 3179daff36b51e72a801a854cdb0b55a86a76915..f403e55f324752ff68d410380657eb5e3ea2ab9f 100644 (file)
@@ -62,13 +62,23 @@ module MESHJOB
   enum FileType {MED_CONCRETE, MED_STEELBAR};
 
   // This defines a single parameter for the job initialization (a med file)
-  struct MeshJobParameter
+  struct MeshJobFile
   {
     string file_name;
     FileType file_type;
     string group_name;
   };
   
+  // This defines a set of parameters for the job initialization
+  typedef sequence<MESHJOB::MeshJobFile> MeshJobFileList;
+
+  // This defines a single parameter for the job initialization
+  struct MeshJobParameter
+  {
+    string name;
+    string value;
+  };
+  
   // This defines a set of parameters for the job initialization
   typedef sequence<MESHJOB::MeshJobParameter> MeshJobParameterList;
 
@@ -97,7 +107,9 @@ module MESHJOB
       raises (SALOME::SALOME_Exception);
 
     /*! Initialize a smesh computation job and return the job identifier */
-    long    initialize(in MESHJOB::MeshJobParameterList meshJobParameterList, in string configId)
+    long    initialize(in MESHJOB::MeshJobFileList meshJobFileList,
+                       in MESHJOB::MeshJobParameterList MeshJobParameterList,
+                       in string configId)
       raises (SALOME::SALOME_Exception);
 
     /*! Submit the job execution and return true if submission is OK */
index 8986182c02b9c6dcbf389aecfd08eef2f8bc7168..7a77330d808917261ac0d461bb2c51f13bc8b749 100644 (file)
@@ -129,6 +129,7 @@ MeshJobManager_i::~MeshJobManager_i() {
 #include <direct.h>    // to get _mkdir
 #else
 #include <unistd.h>    // to get basename
+#include <libgen.h>    // to get basename - as per posix
 #include <sys/stat.h>  // to get mkdir
 #include <sys/types.h> // to get mkdir options
 #endif
@@ -166,8 +167,9 @@ static std::string REMOTE_WORKDIR("/tmp/spadder.remote.workdir."+USER);
  * <steelBarMeshFile_N>   <steelBarGroupName_N>
  * <outputMedFile>
  */
-const char * MeshJobManager_i::_writeDataFile(std::vector<MESHJOB::MeshJobParameter> listConcreteMesh,
-                                              std::vector<MESHJOB::MeshJobParameter> listSteelBarMesh) {
+const char * MeshJobManager_i::_writeDataFile(std::vector<MESHJOB::MeshJobFile> listConcreteMesh,
+                                              std::vector<MESHJOB::MeshJobFile> listSteelBarMesh,
+                                              const MESHJOB::MeshJobParameterList & meshJobParameterList) {
 #ifdef WIN32
   _mkdir(LOCAL_INPUTDIR.c_str());
 #else
@@ -211,15 +213,23 @@ const char * MeshJobManager_i::_writeDataFile(std::vector<MESHJOB::MeshJobParame
     dataFile << line.c_str() << std::endl;
   }
   
-  // Finally, we conclude with the name of the output file
+  // We conclude the list of files with the name of the output file
   line = OUTPUTFILE;
   dataFile << line.c_str() << std::endl;
+
+  // We put the numerical parameters at the end of the data file
+  for(CORBA::ULong i=0; i<meshJobParameterList.length(); i++) {
+    MESHJOB::MeshJobParameter param = meshJobParameterList[i];
+    line = std::string(param.name) + " " + std::string(param.value);
+    dataFile << line.c_str() << std::endl;
+  }
+
   dataFile.close();
   return dataFilename->c_str();  
 }
 
 /*!
- * This function creates a shell script that runs padder whith the
+ * This function creates a shell script that runs padder with the
  * specified data file, and returns the path of the created script
  * file. The config id is used to retrieve the path to the binary file
  * and other required files.
@@ -242,7 +252,7 @@ const char* MeshJobManager_i::_writeScriptFile(const char * dataFileName, const
         _splitpath( dataFileName, NULL, NULL, fname, NULL );
         const char* bname = &fname[0];
 #else
-        const char* bname = basename(dataFileName);
+        const char* bname = basename(const_cast<char *>(dataFileName));
 #endif
 
 
@@ -280,17 +290,18 @@ bool MeshJobManager_i::configure(const char *configId,
 long MeshJobManager_i::JOBID_UNDEFINED = -1;
 
 /*! Initialize a smesh computation job and return the job identifier */
-CORBA::Long MeshJobManager_i::initialize(const MESHJOB::MeshJobParameterList & meshJobParameterList,
+CORBA::Long MeshJobManager_i::initialize(const MESHJOB::MeshJobFileList & meshJobFileList,
+                                         const MESHJOB::MeshJobParameterList & meshJobParameterList,
                                          const char * configId)
 {
   beginService("MeshJobManager_i::initialize");
   //
   // We first analyse the CORBA sequence to store data in C++ vectors
   //
-  std::vector<MESHJOB::MeshJobParameter> listConcreteMesh;
-  std::vector<MESHJOB::MeshJobParameter> listSteelBarMesh;
-  for(CORBA::ULong i=0; i<meshJobParameterList.length(); i++) {
-    MESHJOB::MeshJobParameter currentMesh = meshJobParameterList[i];
+  std::vector<MESHJOB::MeshJobFile> listConcreteMesh;
+  std::vector<MESHJOB::MeshJobFile> listSteelBarMesh;
+  for(CORBA::ULong i=0; i<meshJobFileList.length(); i++) {
+    MESHJOB::MeshJobFile currentMesh = meshJobFileList[i];
     switch ( currentMesh.file_type ) {
     case MESHJOB::MED_CONCRETE:
       listConcreteMesh.push_back(currentMesh);
@@ -339,7 +350,7 @@ CORBA::Long MeshJobManager_i::initialize(const MESHJOB::MeshJobParameterList & m
   // data is a text file containing the list of file names and group
   // names.
   //
-  const char * dataFilename = this->_writeDataFile(listConcreteMesh, listSteelBarMesh);
+  const char * dataFilename = this->_writeDataFile(listConcreteMesh, listSteelBarMesh, meshJobParameterList);
   LOG("dataFilename = " << dataFilename);
   const char * scriptFilename = this->_writeScriptFile(dataFilename, configId);
   LOG("scriptFilename = " << scriptFilename);
@@ -407,7 +418,7 @@ CORBA::Long MeshJobManager_i::initialize(const MESHJOB::MeshJobParameterList & m
     }
   }
 
-  // Then, we have to specify the existance of an output filename. The
+  // Then, we have to specify the existence of an output filename. The
   // path is supposed to be a path on the remote resource, i.e. where
   // the job is executed.
   jobParameters->out_files.length(1);
@@ -461,14 +472,14 @@ CORBA::Long MeshJobManager_i::initialize(const MESHJOB::MeshJobParameterList & m
   // account not only the data that could be loaded by the batch
   // process but also the linked dynamic library.
   //
-  // A possible problem, for exemple in the case where you use the ssh
+  // A possible problem, for example in the case where you use the ssh
   // emulation of a batch system, is to get an error message as below
   // when libBatch try to run the ssh command:
   //
   // ## /usr/bin/ssh: error while loading shared libraries: libcrypto.so.0.9.8: failed
   // ## to map segment from shared object: Cannot allocate memory
   //
-  // In this exemple, the mem_mb was set to 1MB, value that is not
+  // In this example, the mem_mb was set to 1MB, value that is not
   // sufficient to load the dynamic libraries linked to the ssh
   // executable (libcrypto.so in the error message).
   //
index 7b2952d8459af05c6c2ff68ad6cdc9d61f46f587..618a4a2f2239e0bb03a02f210c4745a06bcdfba8 100644 (file)
@@ -55,7 +55,8 @@ public:
 
   bool           configure  (const char *configId,
                              const MESHJOB::ConfigParameter & configParameter);
-  CORBA::Long    initialize (const MESHJOB::MeshJobParameterList & meshJobParameterList,
+  CORBA::Long    initialize (const MESHJOB::MeshJobFileList & meshJobFileList,
+                             const MESHJOB::MeshJobParameterList & meshJobParameterList,
                              const char *configId);
   bool           start      (CORBA::Long jobId);
   char*          getState   (CORBA::Long jobId);
@@ -83,8 +84,9 @@ private:
   std::map<long, long> _jobDateTimeMap;
   std::map<long, MESHJOB::MeshJobPaths*> _jobPathsMap;
 
-  const char* _writeDataFile   (std::vector<MESHJOB::MeshJobParameter> listConcreteMesh,
-                                std::vector<MESHJOB::MeshJobParameter> listSteelBarMesh);
+  const char* _writeDataFile   (std::vector<MESHJOB::MeshJobFile> listConcreteMesh,
+                                std::vector<MESHJOB::MeshJobFile> listSteelBarMesh,
+                                const MESHJOB::MeshJobParameterList & meshJobParameterList);
   const char* _writeScriptFile (const char * dataFileName, const char * configId);
 
   std::vector<std::string> * _getResourceNames();
index e1cd4e7d25836c6e36aa76d0341f691b625c0830..10b5b94c86575930175ac602b2969033f1aaae46 100644 (file)
@@ -146,11 +146,12 @@ bool SPADDERPluginTester_i::testsmesh(CORBA::Long studyId)
 //
 extern "C"
 {
-  PortableServer::ObjectId * SPADDERPluginTesterEngine_factory( CORBA::ORB_ptr orb,
-                                                                PortableServer::POA_ptr poa,
-                                                                PortableServer::ObjectId * contId,
-                                                                const char *instanceName,
-                                                                const char *interfaceName)
+  SPADDERPLUGINTESTERENGINE_EXPORT PortableServer::ObjectId * 
+  SPADDERPluginTesterEngine_factory( CORBA::ORB_ptr orb,
+                                     PortableServer::POA_ptr poa,
+                                     PortableServer::ObjectId * contId,
+                                     const char *instanceName,
+                                     const char *interfaceName)
   {
     MESSAGE("PortableServer::ObjectId * SPADDERPluginTesterEngine_factory()");
     SPADDERPluginTester_i * myEngine = new SPADDERPluginTester_i(orb, poa, contId, instanceName, interfaceName);
index 36c7637fcf4c171de7462f708a6c36759c8d1469..9a2193d556c2669274b0a55df51daa6a1a9aed73 100644 (file)
 #ifndef _SPADDER_PLUGINTESTER_HXX_
 #define _SPADDER_PLUGINTESTER_HXX_
 
+#ifdef WIN32
+ #if defined SPADDERPLUGINTESTERENGINE_EXPORTS || defined SPADDERPluginTesterEngine_EXPORTS
+  #define SPADDERPLUGINTESTERENGINE_EXPORT __declspec( dllexport )
+ #else
+  #define SPADDERPLUGINTESTERENGINE_EXPORT __declspec( dllimport )
+ #endif
+#else
+ #define SPADDERPLUGINTESTERENGINE_EXPORT
+#endif
+
 // include the stubs generating from SPADDERPluginTest.idl
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SPADDERPluginTest)
 #include <SALOME_Component.hh>
 #include "SALOME_Component_i.hxx"
 
-class SPADDERPluginTester_i:
+class SPADDERPLUGINTESTERENGINE_EXPORT SPADDERPluginTester_i:
   public virtual POA_SPADDERPluginTest::SPADDERPluginTester,
   public Engines_Component_i
 {
index 004256778103fe78b8e22284a0d05eaba9b23bfb..0031b907da0ef0eceaec8e87daeae25fc4ba45c0 100644 (file)
@@ -53,38 +53,38 @@ def getTestPadderDataDir():
     return datadir
 
 import MESHJOB # to get the enum constant values
-from MESHJOB import MeshJobParameter, MeshJobParameterList
+from MESHJOB import MeshJobFile, MeshJobFileList
 
 DEFAULT_CONCRETE_FILENAME=os.path.join(getTestDataDir(),'concrete.med')
 DEFAULT_STEELBAR_LISTFILENAME=[
     os.path.join(getTestDataDir(),'ferraill.med')
     ]
 
-def getMeshJobParameterList(concrete_filename=DEFAULT_CONCRETE_FILENAME,
+def getMeshJobFileList(concrete_filename=DEFAULT_CONCRETE_FILENAME,
                             steelbar_listfilename=DEFAULT_STEELBAR_LISTFILENAME):
     '''
     This helper function creates a complete set of parameters (a
-    MeshJobParameterList) for a simple test case, i.e. a case with a
+    MeshJobFileList) for a simple test case, i.e. a case with a
     concrete filename and a single steelbar filename.
     '''
-    # Note that a CORBA sequence (MeshJobParameterList) is mapped on a
+    # Note that a CORBA sequence (MeshJobFileList) is mapped on a
     # simple list in python
-    meshJobParameterList = []
+    meshJobFileList = []
     # We can add some parameters
-    param = MeshJobParameter(
+    param = MeshJobFile(
         file_name  = concrete_filename,
         file_type  = MESHJOB.MED_CONCRETE,
         group_name = "concrete")
-    meshJobParameterList.append(param)
+    meshJobFileList.append(param)
 
     for steelbar_filename in steelbar_listfilename:
-        param = MeshJobParameter(
+        param = MeshJobFile(
             file_name  = steelbar_filename,
             file_type  = MESHJOB.MED_STEELBAR,
             group_name = "steelbar")
-        meshJobParameterList.append(param)
+        meshJobFileList.append(param)
 
-    return meshJobParameterList
+    return meshJobFileList
 
 
 def getSpadderCatalogFilename():
index 2490af95559a0f77fe03e36bee1abc34ca2aba7b..6633fb60cbea7b2cf970ae77191c1af0762d8353 100644 (file)
@@ -25,10 +25,10 @@ from salome.kernel.datamodeler import DataModeler, TypeString, TypeInteger
 
 # __MEM__: Note that this module does not depend on the SPADDER
 # component on purpose (we could have use a derived structure of
-# SPADDER_ORB.MeshJobParameter). This choice is made to ease the test
+# SPADDER_ORB.MeshJobFile). This choice is made to ease the test
 # and development of the gui part of the plugin. If this data
 # structure becomes too important, we could make another arrangement
-# and use directly a SPADDER_ORB.MeshJobParameter.
+# and use directly a SPADDER_ORB.MeshJobFile.
 
 class InputData(DataModeler):
     MESHTYPES=Enumerate([
index 376a90039291f4cfd258687f099285b9b8a7c4db..2ca9f8fc9a3c0319778dbcccff7af8b3622fe027 100644 (file)
@@ -38,10 +38,18 @@ from inputdata import InputData
 DEBUG_MODE=True
 GROUPNAME_MAXLENGTH=8
 
+INPUTDATA_KEY_FILES="meshfiles"
+INPUTDATA_KEY_PARAM="parameters"
+
+PARAM_KEY_NBITER   = "NbIteration"
+PARAM_KEY_RMAXRMIN = "RmaxRmin"
+PARAM_NBITER_DEFAULT_VALUE = 10
+PARAM_RMAXRMIN_DEFAULT_VALUE = 3
+
 class InputDialog(GenericDialog):
 
     TBL_HEADER_LABEL=["Input Mesh", "Output group name"]
-    
+
     inputValidated = pyqtSignal()
 
     def __init__(self, parent=None, name="InputDialog", modal=0):
@@ -97,7 +105,7 @@ class InputDialog(GenericDialog):
         icon.addFile(os.path.join(iconfolder,"steelbar.png"))
         self.__ui.cmbMeshType.setItemIcon(meshTypeIndex, icon)
         self.MESHTYPE_ICONS[meshTypeIndex] = icon
-        
+
         # The click on btnSmeshObject (signal clicked() emitted by the
         # button btnSmeshObject) is connected to the slot
         # onSelectSmeshObject, etc ...
@@ -113,7 +121,11 @@ class InputDialog(GenericDialog):
         self.__ui.tblListInput.horizontalHeader().setStretchLastSection(True)
         # Note that the type is not display explicitly in the Qt table
         # because it is specified using an icon on the text of the
-        # name item. 
+        # name item.
+
+        # Setup default values for numerical parameters
+        self.__ui.txtParamNbIter.setValue(PARAM_NBITER_DEFAULT_VALUE)
+        self.__ui.txtParamRmaxRmin.setValue(PARAM_RMAXRMIN_DEFAULT_VALUE)
 
         # Note that PADDER does not support group name longer than 8
         # characters. We apply then this limit in the gui field.
@@ -135,7 +147,7 @@ class InputDialog(GenericDialog):
             self.__ui.txtSmeshObject.setEnabled(False)
             self.__ui.btnAddInput.setEnabled(False)
         self.__selectedMesh = None
-        self.__dictInputData = {}
+        self.__dictInputFiles = {}
         self.__nbConcreteMesh = 0
         self.__nbSteelbarMesh = 0
 
@@ -228,16 +240,16 @@ class InputDialog(GenericDialog):
         """
         # if the entry already exists, we remove it to replace by a
         # new one
-        if self.__dictInputData.has_key(meshName):
+        if self.__dictInputFiles.has_key(meshName):
             self.__delInputFromMap(meshName)
-        
+
         inputData = InputData()
         inputData.meshName   = meshName
         inputData.meshObject = meshObject
         inputData.meshType   = meshType
         inputData.groupName  = groupName
         # The key of the map is the mesh name
-        self.__dictInputData[meshName] = inputData
+        self.__dictInputFiles[meshName] = inputData
         if inputData.meshType == InputData.MESHTYPES.CONCRETE:
             self.__nbConcreteMesh += 1
         else:
@@ -247,7 +259,7 @@ class InputDialog(GenericDialog):
         print "meshType = ",inputData.meshType
         print "nb concrete mesh ",self.__nbConcreteMesh
         print "nb steelbar mesh ",self.__nbSteelbarMesh
-            
+
 
     def onDeleteInput(self):
         """
@@ -267,9 +279,9 @@ class InputDialog(GenericDialog):
     def __delInputFromMap(self, meshName):
         """
         This function removes the specified entry from the internal
-        map (for data management purpose) 
+        map (for data management purpose)
         """
-        inputData = self.__dictInputData.pop(meshName)
+        inputData = self.__dictInputFiles.pop(meshName)
         if inputData.meshType == InputData.MESHTYPES.CONCRETE:
             self.__nbConcreteMesh -= 1
         else:
@@ -280,34 +292,52 @@ class InputDialog(GenericDialog):
         print "nb steelbar mesh ",self.__nbSteelbarMesh
 
 
-    def setData(self, listInputData=[]):
+    def setData(self, dictInputData={}):
         """
         This function fills the dialog widgets with values provided by
         the specified data list.
         """
         self.clear()
-        for inputData in listInputData:
+        if dictInputData.has_key(INPUTDATA_KEY_FILES):
+            listInputData = dictInputData["meshfiles"]
+            for inputData in listInputData:
 
-            meshName   = inputData.meshName
-            meshObject = inputData.meshObject
-            meshType   = inputData.meshType
-            groupName  = inputData.groupName
-            
-            self.__addInputInGui(meshName, meshObject, meshType, groupName)
-            self.__addInputInMap(meshName, meshObject, meshType, groupName)
+                meshName   = inputData.meshName
+                meshObject = inputData.meshObject
+                meshType   = inputData.meshType
+                groupName  = inputData.groupName
 
-            if not DEBUG_MODE:
-                self.onSelectSmeshObject()
+                self.__addInputInGui(meshName, meshObject, meshType, groupName)
+                self.__addInputInMap(meshName, meshObject, meshType, groupName)
+
+                if not DEBUG_MODE:
+                    self.onSelectSmeshObject()
+
+           if dictInputData.has_key(INPUTDATA_KEY_PARAM):
+               dictInputParameters = dictInputData[INPUTDATA_KEY_PARAM]
+            if dictInputParameters.has_key(PARAM_KEY_NBITER):
+                self.__ui.txtParamNbIter.setValue(dictInputParameters[PARAM_KEY_NBITER])
+            if dictInputParameters.has_key(PARAM_KEY_RMAXRMIN):
+                self.__ui.txtParamRmaxRmin.setValue(dictInputParameters[PARAM_KEY_RMAXRMIN])
 
     def getData(self):
         """
         This function returns a list of InputData that corresponds to
         the data in the dialog widgets of the current dialog.
         """
+        # Get the list of mesh files
         # Note that the values() function returns a copy of the list
         # of values.
-        return self.__dictInputData.values()
-        
+        dictInputData={}
+        dictInputData[INPUTDATA_KEY_FILES] = self.__dictInputFiles.values()
+
+        # Get the list of additionnal parameters
+        dictInputParameters = {}
+        dictInputParameters[PARAM_KEY_NBITER] = self.__ui.txtParamNbIter.value()
+        dictInputParameters[PARAM_KEY_RMAXRMIN] = self.__ui.txtParamRmaxRmin.value()
+        dictInputData[INPUTDATA_KEY_PARAM] = dictInputParameters
+        return dictInputData
+
     def checkData(self):
         """
         This function checks if the data are valid, from the dialog
@@ -315,7 +345,7 @@ class InputDialog(GenericDialog):
         """
         if self.__nbConcreteMesh == 0 and self.__nbSteelbarMesh == 0:
             self.checkDataMessage = "You must define at least one mesh (CONCRETE or STEELBAR)"
-            return False        
+            return False
         if self.__nbConcreteMesh > 1:
             self.checkDataMessage  = "You define multiple CONCRETE meshes."
             self.checkDataMessage += "You should verify first that your version of PADDER support this configuration."
@@ -357,9 +387,9 @@ def TEST_InputDialog_setData():
     inputData.groupName  = "myGroup"
     listInputData = []
     listInputData.append(inputData)
-    
+
     dlg.setData2(listInputData)
-    
+
     dlg.displayAndWait()
     if dlg.wasOk():
         print "OK has been pressed"
index 9f98eb9916092d32b37cc12eaaa6d6d14fcebbd7..a8882f44cb67dd24170e0a88003e1faf02ef9f10 100644 (file)
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>InputFrame</class>
- <widget class="QDialog" name="InputFrame" >
-  <property name="geometry" >
+ <widget class="QDialog" name="InputFrame">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>509</width>
-    <height>307</height>
+    <width>759</width>
+    <height>656</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Input parameters</string>
   </property>
-  <layout class="QHBoxLayout" >
-   <property name="margin" >
-    <number>9</number>
-   </property>
-   <property name="spacing" >
-    <number>6</number>
-   </property>
+  <layout class="QHBoxLayout" name="horizontalLayout_3">
    <item>
-    <layout class="QVBoxLayout" >
-     <property name="margin" >
-      <number>0</number>
-     </property>
-     <property name="spacing" >
-      <number>6</number>
-     </property>
+    <layout class="QVBoxLayout" name="verticalLayout_5">
      <item>
-      <widget class="QLabel" name="lblSmeshObject" >
-       <property name="text" >
-        <string>Input MESH / Output group name / Type :</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" >
-       <property name="margin" >
-        <number>0</number>
-       </property>
-       <property name="spacing" >
-        <number>6</number>
-       </property>
+      <layout class="QHBoxLayout" name="horizontalLayout_2">
        <item>
-        <layout class="QVBoxLayout" >
-         <property name="margin" >
-          <number>0</number>
-         </property>
-         <property name="spacing" >
-          <number>6</number>
-         </property>
+        <layout class="QVBoxLayout" name="verticalLayout_3">
          <item>
-          <layout class="QHBoxLayout" >
-           <property name="margin" >
-            <number>0</number>
+          <widget class="QLabel" name="lblSmeshObject">
+           <property name="text">
+            <string>Input MESH / Output group name / Type :</string>
            </property>
-           <property name="spacing" >
+          </widget>
+         </item>
+         <item>
+          <layout class="QVBoxLayout">
+           <property name="spacing">
             <number>6</number>
            </property>
+           <property name="margin">
+            <number>0</number>
+           </property>
            <item>
-            <layout class="QHBoxLayout" >
-             <property name="margin" >
-              <number>0</number>
-             </property>
-             <property name="spacing" >
+            <layout class="QHBoxLayout">
+             <property name="spacing">
               <number>6</number>
              </property>
+             <property name="margin">
+              <number>0</number>
+             </property>
              <item>
-              <widget class="QPushButton" name="btnSmeshObject" >
-               <property name="sizePolicy" >
-                <sizepolicy>
-                 <hsizetype>0</hsizetype>
-                 <vsizetype>0</vsizetype>
-                 <horstretch>0</horstretch>
-                 <verstretch>0</verstretch>
-                </sizepolicy>
-               </property>
-               <property name="maximumSize" >
-                <size>
-                 <width>31</width>
-                 <height>16777215</height>
-                </size>
+              <layout class="QHBoxLayout">
+               <property name="spacing">
+                <number>6</number>
                </property>
-               <property name="text" >
-                <string/>
+               <property name="margin">
+                <number>0</number>
                </property>
-               <property name="icon" >
-                <iconset>select.png</iconset>
+               <item>
+                <widget class="QPushButton" name="btnSmeshObject">
+                 <property name="sizePolicy">
+                  <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                   <horstretch>0</horstretch>
+                   <verstretch>0</verstretch>
+                  </sizepolicy>
+                 </property>
+                 <property name="maximumSize">
+                  <size>
+                   <width>31</width>
+                   <height>16777215</height>
+                  </size>
+                 </property>
+                 <property name="text">
+                  <string/>
+                 </property>
+                 <property name="icon">
+                  <iconset>
+                   <normaloff>select.png</normaloff>select.png</iconset>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QLineEdit" name="txtSmeshObject">
+                 <property name="toolTip">
+                  <string comment="Select the input mesh in the object browser"/>
+                 </property>
+                </widget>
+               </item>
+              </layout>
+             </item>
+             <item>
+              <widget class="Line" name="line">
+               <property name="orientation">
+                <enum>Qt::Vertical</enum>
                </property>
               </widget>
              </item>
              <item>
-              <widget class="QLineEdit" name="txtSmeshObject" >
-               <property name="toolTip" >
-                <string comment="Select the input mesh in the object browser" />
+              <widget class="QLineEdit" name="txtGroupName">
+               <property name="toolTip">
+                <string comment="Specify the name of the associated group in the output mesh"/>
                </property>
               </widget>
              </item>
-            </layout>
-           </item>
-           <item>
-            <widget class="Line" name="line" >
-             <property name="orientation" >
-              <enum>Qt::Vertical</enum>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QLineEdit" name="txtGroupName" >
-             <property name="toolTip" >
-              <string comment="Specify the name of the associated group in the output mesh" />
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="Line" name="line_2" >
-             <property name="orientation" >
-              <enum>Qt::Vertical</enum>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QComboBox" name="cmbMeshType" >
-             <property name="toolTip" >
-              <string comment="Select the type of the mesh" />
-             </property>
              <item>
-              <property name="text" >
-               <string>Béton</string>
-              </property>
-              <property name="icon" >
-               <iconset>concrete.png</iconset>
-              </property>
+              <widget class="Line" name="line_2">
+               <property name="orientation">
+                <enum>Qt::Vertical</enum>
+               </property>
+              </widget>
              </item>
              <item>
-              <property name="text" >
-               <string>Acier</string>
-              </property>
-              <property name="icon" >
-               <iconset>steelbar.png</iconset>
-              </property>
+              <widget class="QComboBox" name="cmbMeshType">
+               <property name="toolTip">
+                <string comment="Select the type of the mesh"/>
+               </property>
+               <item>
+                <property name="text">
+                 <string>Beton</string>
+                </property>
+                <property name="icon">
+                 <iconset>
+                  <normaloff>concrete.png</normaloff>concrete.png</iconset>
+                </property>
+               </item>
+               <item>
+                <property name="text">
+                 <string>Acier</string>
+                </property>
+                <property name="icon">
+                 <iconset>
+                  <normaloff>steelbar.png</normaloff>steelbar.png</iconset>
+                </property>
+               </item>
+              </widget>
              </item>
-            </widget>
+            </layout>
+           </item>
+           <item>
+            <widget class="QTableView" name="tblListInput"/>
            </item>
           </layout>
          </item>
-         <item>
-          <widget class="QTableView" name="tblListInput" />
-         </item>
         </layout>
        </item>
        <item>
-        <layout class="QVBoxLayout" >
-         <property name="margin" >
-          <number>0</number>
-         </property>
-         <property name="spacing" >
+        <layout class="QVBoxLayout">
+         <property name="spacing">
           <number>6</number>
          </property>
+         <property name="margin">
+          <number>0</number>
+         </property>
          <item>
-          <widget class="QPushButton" name="btnAddInput" >
-           <property name="text" >
+          <widget class="QPushButton" name="btnAddInput">
+           <property name="text">
             <string/>
            </property>
-           <property name="icon" >
-            <iconset>addinput.png</iconset>
+           <property name="icon">
+            <iconset>
+             <normaloff>addinput.png</normaloff>addinput.png</iconset>
            </property>
           </widget>
          </item>
          <item>
-          <widget class="QPushButton" name="btnDeleteInput" >
-           <property name="text" >
+          <widget class="QPushButton" name="btnDeleteInput">
+           <property name="text">
             <string/>
            </property>
-           <property name="icon" >
-            <iconset>deleteinput.png</iconset>
+           <property name="icon">
+            <iconset>
+             <normaloff>deleteinput.png</normaloff>deleteinput.png</iconset>
            </property>
           </widget>
          </item>
          <item>
           <spacer>
-           <property name="orientation" >
+           <property name="orientation">
             <enum>Qt::Vertical</enum>
            </property>
-           <property name="sizeHint" >
+           <property name="sizeHint" stdset="0">
             <size>
              <width>20</width>
              <height>40</height>
        </item>
       </layout>
      </item>
+     <item>
+      <widget class="Line" name="line_3">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <layout class="QVBoxLayout" name="verticalLayout_4">
+       <item>
+        <widget class="QLabel" name="lblNumericalParameters">
+         <property name="text">
+          <string>Paramètres numériques:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout">
+         <item>
+          <layout class="QVBoxLayout" name="verticalLayout">
+           <item>
+            <widget class="QLabel" name="lblParamNbIter">
+             <property name="text">
+              <string>Nb. Itérations</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLabel" name="lblParamRmaxRmin">
+             <property name="text">
+              <string>Rmax / Rmin</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <layout class="QVBoxLayout" name="verticalLayout_2">
+           <item>
+            <widget class="QSpinBox" name="txtParamNbIter"/>
+           </item>
+           <item>
+            <widget class="QDoubleSpinBox" name="txtParamRmaxRmin"/>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </item>
     </layout>
    </item>
   </layout>
index 8bd4294a43f227956052d68eae8a7f671ad29dcd..4fec4e8d375a091325aa6d7f703ee01b3c5216b8 100644 (file)
@@ -23,7 +23,8 @@
 from qtsalome import QDialog, QIcon, Qt
 
 from plugindialog_ui import Ui_PluginDialog
-from inputdialog import InputDialog
+from inputdialog import InputDialog, INPUTDATA_KEY_FILES, INPUTDATA_KEY_PARAM
+from inputdialog import PARAM_KEY_NBITER, PARAM_KEY_RMAXRMIN
 from inputdata import InputData
 # __GBO__: uncomment this line and comment the previous one to use the
 # demo input dialog instead of the real one.
@@ -95,7 +96,7 @@ class PluginDialog(QDialog):
         self.clear()
 
         self.setupJobManager()
-        
+
 
     def setupJobManager(self):
         '''
@@ -105,8 +106,8 @@ class PluginDialog(QDialog):
         the initialize step, by specifing the name of the resource to
         be used.
         '''
-        # We first 
-        
+        # We first
+
         configReader = ConfigReader()
         config = configReader.getLocalConfig()
         configId = config.resname
@@ -137,10 +138,10 @@ class PluginDialog(QDialog):
             # items in the object browser:
             self.__inputDialog.setWindowFlags(
                 self.__inputDialog.windowFlags() | Qt.WindowStaysOnTopHint)
-            # The signal inputValidated emited from inputDialog is
+            # The signal inputValidated emitted from inputDialog is
             # connected to the slot function onProcessInput:
            self.__inputDialog.inputValidated.connect( self.onProcessInput )
-            
+
         else:
             self.__ui.frameInput.setVisible(True)
             self.__ui.btnInput.setVisible(False)
@@ -150,13 +151,13 @@ class PluginDialog(QDialog):
 
     def getInputFrame(self):
         return self.__ui.frameInput
-        
+
     def __setGuiState(self,states=["CAN_SELECT"]):
         if "CAN_SELECT" in states:
             self.__ui.btnInput.setEnabled(True)
         else:
             self.__ui.btnInput.setEnabled(False)
-            
+
         if "CAN_COMPUTE" in states:
             self.__ui.btnCompute.setEnabled(True)
         else:
@@ -200,7 +201,7 @@ class PluginDialog(QDialog):
     def __log(self, message):
         """
         This function prints the specified message in the log area
-        """ 
+        """
         self.__ui.txtLog.append(message)
 
     def __exportMesh(self, meshName, meshObject):
@@ -218,6 +219,7 @@ class PluginDialog(QDialog):
         This function clears the log area and the states of the buttons
         """
         self.__listInputData = []
+        self.__dictInputParameters = {}
         self.__ui.txtLog.clear()
         self.__setGuiState(["CAN_SELECT"])
         self.__isRunning = False
@@ -241,7 +243,10 @@ class PluginDialog(QDialog):
         windows to process the validation event (see the slot
         onProcessInput which is connected to this event).
         '''
-        self.__inputDialog.setData(self.__listInputData)
+        dictInputData = {}
+        dictInputData[INPUTDATA_KEY_FILES] = self.__listInputData
+        dictInputData[INPUTDATA_KEY_PARAM] = self.__dictInputParameters
+        self.__inputDialog.setData(dictInputData)
         self.__inputDialog.open()
 
     def onProcessInput(self):
@@ -252,45 +257,56 @@ class PluginDialog(QDialog):
         """
         # The processing simply consists in requesting the input data
         # from the dialog window.
-        self.__listInputData = self.__inputDialog.getData()
+        dictInputData = self.__inputDialog.getData()
+        self.__listInputData = dictInputData[INPUTDATA_KEY_FILES]
+        self.__dictInputParameters = dictInputData[INPUTDATA_KEY_PARAM]
+
         self.__ui.lblStatusBar.setText("Input data OK")
         self.__log("INF: Press \"Compute\" to start the job")
         self.__setGuiState(["CAN_SELECT", "CAN_COMPUTE"])
-        
+
     def onCompute(self):
         '''
         This function is the slot connected to the Compute button. It
         initializes a mesh computation job and start it using the
-        SALOME launcher.  
+        SALOME launcher.
         '''
         # We first have to create the list of parameters for the
         # initialize function. For that, we have to create the files
         # from the mesh objects:
-        meshJobParameterList=[]
+        meshJobFileList=[]
         concreteIndex=0
         for inputData in self.__listInputData:
             # For each input data, we have to create a
-            # MeshJobParameter and add it to the list.
+            # MeshJobFile and add it to the list.
             filename  = self.__exportMesh(inputData.meshName, inputData.meshObject)
             if inputData.meshType == InputData.MESHTYPES.CONCRETE:
                 filetype = MESHJOB.MED_CONCRETE
             else:
                 filetype = MESHJOB.MED_STEELBAR
 
-            parameter = MESHJOB.MeshJobParameter(
+            parameter = MESHJOB.MeshJobFile(
                 file_name  = filename,
                 file_type  = filetype,
                 group_name = inputData.groupName)
+            meshJobFileList.append(parameter)
+
+        # And to create a list of the additional parameters.
+        # WARN: the CORBA interface requires string values.
+        meshJobParameterList=[]
+        for inputParameterKey in self.__dictInputParameters.keys():
+            value = self.__dictInputParameters[inputParameterKey]
+            parameter = MESHJOB.MeshJobParameter(name=inputParameterKey,value=str(value))
             meshJobParameterList.append(parameter)
 
         jobManager = self.__getJobManager()
-        self.__jobid = jobManager.initialize(meshJobParameterList, self.__configId)
+        self.__jobid = jobManager.initialize(meshJobFileList, meshJobParameterList, self.__configId)
         if self.__jobid < 0:
             self.__log("ERR: the job can't be initialized")
             self.__log("ERR: %s"%jobManager.getLastErrorMessage())
             return
         self.__log("INF: the job has been initialized with jobid = "+str(self.__jobid))
-        
+
         startOk = jobManager.start(self.__jobid)
         if not startOk:
             self.__log("ERR: the job with jobid = "+str(self.__jobid)+" can't be started")
@@ -326,7 +342,7 @@ class PluginDialog(QDialog):
         This function is the slot connected on the Publish button. It
         requests the mesh job manager to download the results data
         from the computation resource host and load the med file in
-        the SALOME study. 
+        the SALOME study.
         """
         jobManager = self.__getJobManager()
         state = jobManager.getState(self.__jobid)
@@ -372,13 +388,13 @@ class PluginDialog(QDialog):
         one is running.
         """
         self.clear()
-        
+
 
 
 __dialog=None
 def getDialog():
     """
-    This function returns a singleton instance of the plugin dialog. 
+    This function returns a singleton instance of the plugin dialog.
     """
     global __dialog
     if __dialog is None:
@@ -402,5 +418,5 @@ def TEST_PluginDialog():
 if __name__ == "__main__":
     TEST_PluginDialog()
 
-        
+
 
index e872230a02517946a9f0034961faf5c93ec69eea..96cc788b03864ae15f21ce988fbe1cb1c7017476 100644 (file)
@@ -11,7 +11,7 @@ remote  = nepal
 defaultres = local
 
 # The following sections defines the available configurations.
-# The name of the section can be choosen arbitrary. But the value of
+# The name of the section can be chosen arbitrarily. But the value of
 # the resname key MUST be the name of a SALOME resource defined in the
 # catalog of resources (CatalogResources.xml).
 
index 8085105bd452a7faa72bc1fd02a2d9c49e04d02b..3f705458f0dd146fa52c530edd53da1250a1ed96 100644 (file)
@@ -83,70 +83,70 @@ PADDERTESTDIR = getPadderTestDir(defaultConfig)
 # padder.cfg).
 #
 def test00_parameters():
-    """Test using a concrete mesh and a single steelbar mesh""" 
+    """Test using a concrete mesh and a single steelbar mesh"""
     file_concrete=os.path.join(spadder.getTestDataDir(),"concrete.med")
     file_steelbar=os.path.join(spadder.getTestDataDir(),"ferraill.med")
 
-    meshJobParameterList = []
-    param = MESHJOB.MeshJobParameter(file_name=file_concrete,
+    meshJobFileList = []
+    param = MESHJOB.MeshJobFile(file_name=file_concrete,
                                      file_type=MESHJOB.MED_CONCRETE,
                                      group_name="concrete")
-    meshJobParameterList.append(param)
+    meshJobFileList.append(param)
 
-    param = MESHJOB.MeshJobParameter(file_name=file_steelbar,
+    param = MESHJOB.MeshJobFile(file_name=file_steelbar,
                                      file_type=MESHJOB.MED_STEELBAR,
                                      group_name="steelbar")
-    meshJobParameterList.append(param)
-    return meshJobParameterList
+    meshJobFileList.append(param)
+    return meshJobFileList
 
 def test01_parameters():
     """One concrete mesh and two steelbar meshes"""
     datadir = os.path.join(PADDERTESTDIR,"test01")
-    meshJobParameterList = []
+    meshJobFileList = []
 
     medfile = os.path.join(datadir,"concrete.med")
-    param = MESHJOB.MeshJobParameter(file_name=medfile,
+    param = MESHJOB.MeshJobFile(file_name=medfile,
                                      file_type=MESHJOB.MED_CONCRETE,
                                      group_name="concrete")
-    meshJobParameterList.append(param)
-    
+    meshJobFileList.append(param)
+
     medfile = os.path.join(datadir,"ferraill.med")
-    param = MESHJOB.MeshJobParameter(file_name=medfile,
+    param = MESHJOB.MeshJobFile(file_name=medfile,
                                      file_type=MESHJOB.MED_STEELBAR,
                                      group_name="ferraill")
-    meshJobParameterList.append(param)
+    meshJobFileList.append(param)
 
     medfile = os.path.join(datadir,"ferrtran.med")
-    param = MESHJOB.MeshJobParameter(file_name=medfile,
+    param = MESHJOB.MeshJobFile(file_name=medfile,
                                      file_type=MESHJOB.MED_STEELBAR,
                                      group_name="ferrtran")
-    meshJobParameterList.append(param)
-    
-    return meshJobParameterList
+    meshJobFileList.append(param)
+
+    return meshJobFileList
 
 def test02_parameters():
     """One steelbar mesh only, without a concrete mesh"""
     datadir = os.path.join(PADDERTESTDIR,"test02")
-    meshJobParameterList = []
+    meshJobFileList = []
 
     medfile = os.path.join(datadir,"cadreef.med")
-    param = MESHJOB.MeshJobParameter(file_name=medfile,
+    param = MESHJOB.MeshJobFile(file_name=medfile,
                                      file_type=MESHJOB.MED_STEELBAR,
                                      group_name="cadre")
-    meshJobParameterList.append(param)
-    return meshJobParameterList
+    meshJobFileList.append(param)
+    return meshJobFileList
 
 def test03_parameters():
     """One concrete mesh only, without a steelbar mesh"""
     datadir = os.path.join(PADDERTESTDIR,"test03")
-    meshJobParameterList = []
+    meshJobFileList = []
 
     medfile = os.path.join(datadir,"concrete.med")
-    param = MESHJOB.MeshJobParameter(file_name=medfile,
+    param = MESHJOB.MeshJobFile(file_name=medfile,
                                      file_type=MESHJOB.MED_CONCRETE,
                                      group_name="concrete")
-    meshJobParameterList.append(param)
-    return meshJobParameterList
+    meshJobFileList.append(param)
+    return meshJobFileList
 
 #
 # =======================================================================
@@ -155,20 +155,26 @@ def test03_parameters():
 #
 
 # Choose here the use case
-#meshJobParameterList = test00_parameters()
-#meshJobParameterList = test01_parameters()
-#meshJobParameterList = test02_parameters()
-meshJobParameterList = test03_parameters()
+#meshJobFileList = test00_parameters()
+#meshJobFileList = test01_parameters()
+#meshJobFileList = test02_parameters()
+meshJobFileList = test03_parameters()
+
+meshJobParameterList = []
+param = MESHJOB.MeshJobParameter(name="RmaxRmin",value="1.5")
+meshJobParameterList.append(param)
+param = MESHJOB.MeshJobParameter(name="NbIteration",value="3")
+meshJobParameterList.append(param)
 
 #
 # Prepare, start and follow-up the job
 #
-jobid = component.initialize(meshJobParameterList, configId)
+jobid = component.initialize(meshJobFileList, meshJobParameterList, configId)
 if jobid<0:
     msg = component.getLastErrorMessage()
     print "ERR: %s"%msg
     sys.exit(1)
-    
+
 created = False
 nbiter  = 0
 while not created:
@@ -211,11 +217,11 @@ while not ended:
         ended=True
     time.sleep(0.5)
     nbiter+=1
-        
+
 if state not in end_states:
     print "ERR: jobid = "+str(jobid)+" ended abnormally with state="+str(state)
     msg = component.getLastErrorMessage()
-    print "ERR: %s"%msg    
+    print "ERR: %s"%msg
 else:
     print "OK:  jobid = "+str(jobid)+" ended with state="+str(state)
     meshJobResults = component.finalize(jobid)