Salome HOME
PR: merged from V5_1_4rc1 smds_memimp_V5_1_4rc1
authorprascle <prascle>
Wed, 26 May 2010 07:13:13 +0000 (07:13 +0000)
committerprascle <prascle>
Wed, 26 May 2010 07:13:13 +0000 (07:13 +0000)
822 files changed:
Makefile.am
SMESH_version.h.in
adm_local/Makefile.am
adm_local/cmake_files/FindSMESH.cmake
adm_local/cmake_files/Makefile.am
adm_local/unix/Makefile.am
adm_local/unix/config_files/Makefile.am
adm_local/unix/config_files/check_Platform.m4
adm_local/unix/config_files/check_SMESH.m4
adm_local/unix/make_common_starter.am
bin/Makefile.am
bin/smesh_setenv.py
build_cmake
build_cmake.bat
build_configure
clean_configure
configure.ac
doc/Makefile.am
doc/salome/Makefile.am
doc/salome/gui/Makefile.am
doc/salome/gui/SMESH/Makefile.am
doc/salome/gui/SMESH/doxyfile.in
doc/salome/gui/SMESH/doxyfile_py.in
doc/salome/gui/SMESH/images/a-createpolyhedralvolume.png
doc/salome/gui/SMESH/images/add0delement.png
doc/salome/gui/SMESH/images/addedge.png
doc/salome/gui/SMESH/images/addhexahedron.png
doc/salome/gui/SMESH/images/addnode.png
doc/salome/gui/SMESH/images/addnode_notebook.png
doc/salome/gui/SMESH/images/addpolygon.png
doc/salome/gui/SMESH/images/addquadrangle.png
doc/salome/gui/SMESH/images/addtetrahedron.png
doc/salome/gui/SMESH/images/addtriangle.png
doc/salome/gui/SMESH/images/aqt.png
doc/salome/gui/SMESH/images/colors_size.png [new file with mode: 0755]
doc/salome/gui/SMESH/images/custom_point_marker.png [new file with mode: 0755]
doc/salome/gui/SMESH/images/dialog.png
doc/salome/gui/SMESH/images/findelement1.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/findelement2.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/findelement3.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/head.png [new file with mode: 0755]
doc/salome/gui/SMESH/images/hexotic_parameters.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/mergeelems.png
doc/salome/gui/SMESH/images/mergeelems_auto.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/mergenodes.png
doc/salome/gui/SMESH/images/mergenodes_auto.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/mesh_order_123.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/mesh_order_123_res.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/mesh_order_213.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/mesh_order_213_res.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/mesh_order_321.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/mesh_order_321_res.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/mesh_order_no_concurrent.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/mesh_order_preview.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/point_marker_widget1.png [new file with mode: 0755]
doc/salome/gui/SMESH/images/point_marker_widget2.png [new file with mode: 0755]
doc/salome/gui/SMESH/images/scale01.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/scale02.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/scale03.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/scale04.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/scale06.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/scale07.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/scale09.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/scaleinit01.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/scaleinit02.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/scaleres03.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/scaleres04.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/scaleres06.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/scaleres07.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/scaleres09.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/split_into_tetra.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/split_into_tetra_icon.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/std_point_marker.png [new file with mode: 0755]
doc/salome/gui/SMESH/input/2d_meshing_hypo.doc
doc/salome/gui/SMESH/input/about_hypo.doc
doc/salome/gui/SMESH/input/adding_nodes_and_elements.doc
doc/salome/gui/SMESH/input/adding_quadratic_elements.doc
doc/salome/gui/SMESH/input/basic_meshing_algos.doc
doc/salome/gui/SMESH/input/colors_size.doc [new file with mode: 0644]
doc/salome/gui/SMESH/input/constructing_meshes.doc
doc/salome/gui/SMESH/input/find_element_by_point.doc [new file with mode: 0644]
doc/salome/gui/SMESH/input/ghs3dprl_hypo.doc
doc/salome/gui/SMESH/input/hexotic_hypo.doc [new file with mode: 0644]
doc/salome/gui/SMESH/input/merging_elements.doc
doc/salome/gui/SMESH/input/merging_nodes.doc
doc/salome/gui/SMESH/input/modifying_meshes.doc
doc/salome/gui/SMESH/input/pattern_mapping.doc
doc/salome/gui/SMESH/input/point_marker.doc [new file with mode: 0644]
doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.doc
doc/salome/gui/SMESH/input/rotation.doc
doc/salome/gui/SMESH/input/scale.doc [new file with mode: 0644]
doc/salome/gui/SMESH/input/split_to_tetra.doc [new file with mode: 0644]
doc/salome/gui/SMESH/input/symmetry.doc
doc/salome/gui/SMESH/input/translation.doc
doc/salome/gui/SMESH/input/tui_creating_meshes.doc
doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc
doc/salome/gui/SMESH/input/tui_transforming_meshes.doc
doc/salome/gui/SMESH/input/tui_viewing_meshes.doc
doc/salome/gui/SMESH/input/viewing_meshes_overview.doc
doc/salome/gui/SMESH/static/doxygen.css
doc/salome/gui/SMESH/static/footer.html
doc/salome/gui/SMESH/static/header.html.in [new file with mode: 0755]
doc/salome/tui/Makefile.am
doc/salome/tui/doxyfile.in
doc/salome/tui/images/head.png [new file with mode: 0755]
doc/salome/tui/images/smeshscreen.png [new file with mode: 0755]
doc/salome/tui/input/index.doc [new file with mode: 0644]
doc/salome/tui/static/doxygen.css
doc/salome/tui/static/footer.html
doc/salome/tui/static/header.html.in [new file with mode: 0755]
idl/Makefile.am
idl/SMESH_BasicHypothesis.idl
idl/SMESH_Filter.idl
idl/SMESH_Gen.idl
idl/SMESH_Group.idl
idl/SMESH_Hypothesis.idl
idl/SMESH_Mesh.idl
idl/SMESH_MeshEditor.idl
idl/SMESH_Pattern.idl
resources/Makefile.am
resources/SMESHCatalog.xml.in
resources/SalomeApp.xml
resources/StdMeshers.xml
resources/mesh_find_elem_by_point.png [new file with mode: 0644]
resources/scale.png [new file with mode: 0644]
resources/scale_along_axes.png [new file with mode: 0644]
resources/split_into_tetra.png [new file with mode: 0644]
src/Controls/Makefile.am
src/Controls/SMESHControls.cxx
src/Controls/SMESH_Controls.cxx
src/Controls/SMESH_Controls.hxx
src/Controls/SMESH_ControlsDef.hxx
src/Driver/Driver_Document.cxx
src/Driver/Driver_Document.h
src/Driver/Driver_Mesh.cxx
src/Driver/Driver_Mesh.h
src/Driver/Driver_SMDS_Mesh.cxx
src/Driver/Driver_SMDS_Mesh.h
src/Driver/Driver_SMESHDS_Mesh.cxx
src/Driver/Driver_SMESHDS_Mesh.h
src/Driver/Makefile.am
src/DriverDAT/DAT_Test.cxx
src/DriverDAT/DriverDAT_R_SMDS_Mesh.cxx
src/DriverDAT/DriverDAT_R_SMDS_Mesh.h
src/DriverDAT/DriverDAT_R_SMESHDS_Document.cxx
src/DriverDAT/DriverDAT_R_SMESHDS_Document.h
src/DriverDAT/DriverDAT_R_SMESHDS_Mesh.cxx
src/DriverDAT/DriverDAT_R_SMESHDS_Mesh.h
src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx
src/DriverDAT/DriverDAT_W_SMDS_Mesh.h
src/DriverDAT/DriverDAT_W_SMESHDS_Document.cxx
src/DriverDAT/DriverDAT_W_SMESHDS_Document.h
src/DriverDAT/DriverDAT_W_SMESHDS_Mesh.cxx
src/DriverDAT/DriverDAT_W_SMESHDS_Mesh.h
src/DriverDAT/Makefile.am
src/DriverDAT/SMESH_DriverDAT.hxx
src/DriverMED/DriverMED_Family.cxx
src/DriverMED/DriverMED_Family.h
src/DriverMED/DriverMED_R_SMDS_Mesh.cxx
src/DriverMED/DriverMED_R_SMDS_Mesh.h
src/DriverMED/DriverMED_R_SMESHDS_Document.cxx
src/DriverMED/DriverMED_R_SMESHDS_Document.h
src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx
src/DriverMED/DriverMED_R_SMESHDS_Mesh.h
src/DriverMED/DriverMED_W_SMDS_Mesh.cxx
src/DriverMED/DriverMED_W_SMDS_Mesh.h
src/DriverMED/DriverMED_W_SMESHDS_Document.cxx
src/DriverMED/DriverMED_W_SMESHDS_Document.h
src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx
src/DriverMED/DriverMED_W_SMESHDS_Mesh.h
src/DriverMED/MED_Test.cxx
src/DriverMED/Makefile.am
src/DriverMED/SMESH_DriverMED.hxx
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/DriverSTL/Makefile.am
src/DriverSTL/SMESH_DriverSTL.hxx
src/DriverSTL/STL_Test.cxx
src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx
src/DriverUNV/DriverUNV_R_SMDS_Mesh.h
src/DriverUNV/DriverUNV_R_SMESHDS_Document.cxx
src/DriverUNV/DriverUNV_R_SMESHDS_Document.h
src/DriverUNV/DriverUNV_R_SMESHDS_Mesh.cxx
src/DriverUNV/DriverUNV_R_SMESHDS_Mesh.h
src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx
src/DriverUNV/DriverUNV_W_SMDS_Mesh.h
src/DriverUNV/DriverUNV_W_SMESHDS_Document.cxx
src/DriverUNV/DriverUNV_W_SMESHDS_Document.h
src/DriverUNV/DriverUNV_W_SMESHDS_Mesh.cxx
src/DriverUNV/DriverUNV_W_SMESHDS_Mesh.h
src/DriverUNV/Makefile.am
src/DriverUNV/SMESH_DriverUNV.hxx
src/DriverUNV/UNV2411_Structure.cxx
src/DriverUNV/UNV2411_Structure.hxx
src/DriverUNV/UNV2412_Structure.cxx
src/DriverUNV/UNV2412_Structure.hxx
src/DriverUNV/UNV2417_Structure.cxx
src/DriverUNV/UNV2417_Structure.hxx
src/DriverUNV/UNV_Test.cxx
src/DriverUNV/UNV_Utilities.cxx
src/DriverUNV/UNV_Utilities.hxx
src/MEFISTO2/Makefile.am
src/MEFISTO2/Rn.h
src/MEFISTO2/aptrte.cxx
src/MEFISTO2/aptrte.h
src/Makefile.am
src/OBJECT/Makefile.am
src/OBJECT/SMESH_Actor.cxx
src/OBJECT/SMESH_Actor.h
src/OBJECT/SMESH_ActorDef.h
src/OBJECT/SMESH_ActorUtils.cxx
src/OBJECT/SMESH_ActorUtils.h
src/OBJECT/SMESH_DeviceActor.cxx
src/OBJECT/SMESH_DeviceActor.h
src/OBJECT/SMESH_ExtractGeometry.cxx
src/OBJECT/SMESH_ExtractGeometry.h
src/OBJECT/SMESH_FaceOrientationFilter.cxx
src/OBJECT/SMESH_FaceOrientationFilter.h
src/OBJECT/SMESH_Object.cxx
src/OBJECT/SMESH_Object.h
src/OBJECT/SMESH_ObjectDef.h
src/OBJECT/SMESH_PreviewActorsCollection.cxx
src/OBJECT/SMESH_PreviewActorsCollection.h
src/PluginUtils/GeomSelectionTools.cxx [new file with mode: 0644]
src/PluginUtils/GeomSelectionTools.h [new file with mode: 0644]
src/PluginUtils/Makefile.am [new file with mode: 0644]
src/SMDS/Makefile.am
src/SMDS/Notes
src/SMDS/SMDSAbs_ElementType.hxx
src/SMDS/SMDS_EdgePosition.cxx
src/SMDS/SMDS_EdgePosition.hxx
src/SMDS/SMDS_ElemIterator.hxx
src/SMDS/SMDS_FaceOfEdges.cxx
src/SMDS/SMDS_FaceOfEdges.hxx
src/SMDS/SMDS_FaceOfNodes.cxx
src/SMDS/SMDS_FaceOfNodes.hxx
src/SMDS/SMDS_FacePosition.cxx
src/SMDS/SMDS_FacePosition.hxx
src/SMDS/SMDS_Iterator.hxx
src/SMDS/SMDS_IteratorOfElements.cxx
src/SMDS/SMDS_IteratorOfElements.hxx
src/SMDS/SMDS_MemoryLimit.cxx
src/SMDS/SMDS_Mesh.cxx
src/SMDS/SMDS_Mesh.hxx
src/SMDS/SMDS_Mesh0DElement.cxx
src/SMDS/SMDS_Mesh0DElement.hxx
src/SMDS/SMDS_MeshEdge.hxx
src/SMDS/SMDS_MeshElement.cxx
src/SMDS/SMDS_MeshElement.hxx
src/SMDS/SMDS_MeshElementIDFactory.cxx
src/SMDS/SMDS_MeshElementIDFactory.hxx
src/SMDS/SMDS_MeshFace.cxx
src/SMDS/SMDS_MeshFace.hxx
src/SMDS/SMDS_MeshGroup.cxx
src/SMDS/SMDS_MeshGroup.hxx
src/SMDS/SMDS_MeshIDFactory.cxx
src/SMDS/SMDS_MeshIDFactory.hxx
src/SMDS/SMDS_MeshInfo.hxx
src/SMDS/SMDS_MeshNode.cxx
src/SMDS/SMDS_MeshNode.hxx
src/SMDS/SMDS_MeshObject.cxx
src/SMDS/SMDS_MeshObject.hxx
src/SMDS/SMDS_MeshVolume.cxx
src/SMDS/SMDS_MeshVolume.hxx
src/SMDS/SMDS_PolygonalFaceOfNodes.cxx
src/SMDS/SMDS_PolygonalFaceOfNodes.hxx
src/SMDS/SMDS_PolyhedralVolumeOfNodes.cxx
src/SMDS/SMDS_PolyhedralVolumeOfNodes.hxx
src/SMDS/SMDS_Position.cxx
src/SMDS/SMDS_Position.hxx
src/SMDS/SMDS_QuadraticEdge.cxx
src/SMDS/SMDS_QuadraticEdge.hxx
src/SMDS/SMDS_QuadraticFaceOfNodes.cxx
src/SMDS/SMDS_QuadraticFaceOfNodes.hxx
src/SMDS/SMDS_QuadraticVolumeOfNodes.cxx
src/SMDS/SMDS_QuadraticVolumeOfNodes.hxx
src/SMDS/SMDS_SetIterator.hxx
src/SMDS/SMDS_SpacePosition.cxx
src/SMDS/SMDS_SpacePosition.hxx
src/SMDS/SMDS_StdIterator.hxx [new file with mode: 0644]
src/SMDS/SMDS_TypeOfPosition.hxx
src/SMDS/SMDS_VertexPosition.cxx
src/SMDS/SMDS_VertexPosition.hxx
src/SMDS/SMDS_VolumeOfFaces.cxx
src/SMDS/SMDS_VolumeOfFaces.hxx
src/SMDS/SMDS_VolumeOfNodes.cxx
src/SMDS/SMDS_VolumeOfNodes.hxx
src/SMDS/SMDS_VolumeTool.cxx
src/SMDS/SMDS_VolumeTool.hxx
src/SMDS/SMESH_SMDS.hxx
src/SMESH/Makefile.am
src/SMESH/SMESH_0D_Algo.cxx
src/SMESH/SMESH_0D_Algo.hxx
src/SMESH/SMESH_1D_Algo.cxx
src/SMESH/SMESH_1D_Algo.hxx
src/SMESH/SMESH_2D_Algo.cxx
src/SMESH/SMESH_2D_Algo.hxx
src/SMESH/SMESH_3D_Algo.cxx
src/SMESH/SMESH_3D_Algo.hxx
src/SMESH/SMESH_Algo.cxx
src/SMESH/SMESH_Algo.hxx
src/SMESH/SMESH_Block.cxx
src/SMESH/SMESH_Block.hxx
src/SMESH/SMESH_Comment.hxx
src/SMESH/SMESH_ComputeError.hxx
src/SMESH/SMESH_DataMapOfElemPtrSequenceOfElemPtr.hxx
src/SMESH/SMESH_File.cxx [new file with mode: 0644]
src/SMESH/SMESH_File.hxx [new file with mode: 0644]
src/SMESH/SMESH_Gen.cxx
src/SMESH/SMESH_Gen.hxx
src/SMESH/SMESH_Group.cxx
src/SMESH/SMESH_Group.hxx
src/SMESH/SMESH_HypoFilter.cxx
src/SMESH/SMESH_HypoFilter.hxx
src/SMESH/SMESH_Hypothesis.cxx
src/SMESH/SMESH_Hypothesis.hxx
src/SMESH/SMESH_IndexedDataMapOfShapeIndexedMapOfShape.hxx
src/SMESH/SMESH_Mesh.cxx
src/SMESH/SMESH_Mesh.hxx
src/SMESH/SMESH_MeshEditor.cxx
src/SMESH/SMESH_MeshEditor.hxx
src/SMESH/SMESH_MesherHelper.cxx
src/SMESH/SMESH_MesherHelper.hxx
src/SMESH/SMESH_Octree.cxx
src/SMESH/SMESH_Octree.hxx
src/SMESH/SMESH_OctreeNode.cxx
src/SMESH/SMESH_OctreeNode.hxx
src/SMESH/SMESH_Pattern.cxx
src/SMESH/SMESH_Pattern.hxx
src/SMESH/SMESH_SMESH.hxx
src/SMESH/SMESH_SequenceOfElemPtr.hxx
src/SMESH/SMESH_SequenceOfNode.hxx
src/SMESH/SMESH_subMesh.cxx
src/SMESH/SMESH_subMesh.hxx
src/SMESH/SMESH_subMeshEventListener.hxx
src/SMESHClient/Makefile.am
src/SMESHClient/SMESHClientBin.cxx
src/SMESHClient/SMESH_Client.cxx
src/SMESHClient/SMESH_Client.hxx
src/SMESHDS/Makefile.am
src/SMESHDS/SMESHDS_Command.cxx
src/SMESHDS/SMESHDS_Command.hxx
src/SMESHDS/SMESHDS_CommandType.hxx
src/SMESHDS/SMESHDS_DataMapOfShape.hxx
src/SMESHDS/SMESHDS_Document.cxx
src/SMESHDS/SMESHDS_Document.hxx
src/SMESHDS/SMESHDS_Group.cxx
src/SMESHDS/SMESHDS_Group.hxx
src/SMESHDS/SMESHDS_GroupBase.cxx
src/SMESHDS/SMESHDS_GroupBase.hxx
src/SMESHDS/SMESHDS_GroupOnGeom.cxx
src/SMESHDS/SMESHDS_GroupOnGeom.hxx
src/SMESHDS/SMESHDS_Hypothesis.cxx
src/SMESHDS/SMESHDS_Hypothesis.hxx
src/SMESHDS/SMESHDS_Mesh.cxx
src/SMESHDS/SMESHDS_Mesh.hxx
src/SMESHDS/SMESHDS_Script.cxx
src/SMESHDS/SMESHDS_Script.hxx
src/SMESHDS/SMESHDS_SubMesh.cxx
src/SMESHDS/SMESHDS_SubMesh.hxx
src/SMESHDS/SMESH_SMESHDS.hxx
src/SMESHFiltersSelection/Makefile.am
src/SMESHFiltersSelection/SMESH_LogicalFilter.cxx
src/SMESHFiltersSelection/SMESH_LogicalFilter.hxx
src/SMESHFiltersSelection/SMESH_NumberFilter.cxx
src/SMESHFiltersSelection/SMESH_NumberFilter.hxx
src/SMESHFiltersSelection/SMESH_Type.h
src/SMESHFiltersSelection/SMESH_TypeFilter.cxx
src/SMESHFiltersSelection/SMESH_TypeFilter.hxx
src/SMESHGUI/Makefile.am
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI.h
src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx
src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h
src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx
src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.h
src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx
src/SMESHGUI/SMESHGUI_BuildCompoundDlg.h
src/SMESHGUI/SMESHGUI_ClippingDlg.cxx
src/SMESHGUI/SMESHGUI_ClippingDlg.h
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
src/SMESHGUI/SMESHGUI_ComputeDlg.h
src/SMESHGUI/SMESHGUI_ConvToQuadDlg.cxx
src/SMESHGUI/SMESHGUI_ConvToQuadDlg.h
src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx
src/SMESHGUI/SMESHGUI_ConvToQuadOp.h
src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx
src/SMESHGUI/SMESHGUI_CreatePatternDlg.h
src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx
src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h
src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx
src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h
src/SMESHGUI/SMESHGUI_Dialog.cxx
src/SMESHGUI/SMESHGUI_Dialog.h
src/SMESHGUI/SMESHGUI_Displayer.cxx
src/SMESHGUI/SMESHGUI_Displayer.h
src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx
src/SMESHGUI/SMESHGUI_EditMeshDlg.h
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h
src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionDlg.h
src/SMESHGUI/SMESHGUI_FileInfoDlg.cxx
src/SMESHGUI/SMESHGUI_FileInfoDlg.h
src/SMESHGUI/SMESHGUI_FileValidator.cxx [new file with mode: 0755]
src/SMESHGUI/SMESHGUI_FileValidator.h [new file with mode: 0755]
src/SMESHGUI/SMESHGUI_Filter.cxx
src/SMESHGUI/SMESHGUI_Filter.h
src/SMESHGUI/SMESHGUI_FilterDlg.cxx
src/SMESHGUI/SMESHGUI_FilterDlg.h
src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx
src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h
src/SMESHGUI/SMESHGUI_FilterUtils.cxx
src/SMESHGUI/SMESHGUI_FilterUtils.h
src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx [new file with mode: 0644]
src/SMESHGUI/SMESHGUI_FindElemByPointDlg.h [new file with mode: 0644]
src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx
src/SMESHGUI/SMESHGUI_GEOMGenUtils.h
src/SMESHGUI/SMESHGUI_GroupDlg.cxx
src/SMESHGUI/SMESHGUI_GroupDlg.h
src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx
src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.h
src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx
src/SMESHGUI/SMESHGUI_GroupOpDlg.h
src/SMESHGUI/SMESHGUI_GroupUtils.cxx
src/SMESHGUI/SMESHGUI_GroupUtils.h
src/SMESHGUI/SMESHGUI_Hypotheses.cxx
src/SMESHGUI/SMESHGUI_Hypotheses.h
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
src/SMESHGUI/SMESHGUI_HypothesesUtils.h
src/SMESHGUI/SMESHGUI_IdValidator.h
src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.cxx
src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.h
src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx
src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.h
src/SMESHGUI/SMESHGUI_MeshDlg.cxx
src/SMESHGUI/SMESHGUI_MeshDlg.h
src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx
src/SMESHGUI/SMESHGUI_MeshEditPreview.h
src/SMESHGUI/SMESHGUI_MeshInfosBox.cxx
src/SMESHGUI/SMESHGUI_MeshInfosBox.h
src/SMESHGUI/SMESHGUI_MeshInfosDlg.cxx
src/SMESHGUI/SMESHGUI_MeshInfosDlg.h
src/SMESHGUI/SMESHGUI_MeshOp.cxx
src/SMESHGUI/SMESHGUI_MeshOp.h
src/SMESHGUI/SMESHGUI_MeshOrderDlg.cxx [new file with mode: 0644]
src/SMESHGUI/SMESHGUI_MeshOrderDlg.h [new file with mode: 0644]
src/SMESHGUI/SMESHGUI_MeshOrderOp.cxx [new file with mode: 0644]
src/SMESHGUI/SMESHGUI_MeshOrderOp.h [new file with mode: 0644]
src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx
src/SMESHGUI/SMESHGUI_MeshPatternDlg.h
src/SMESHGUI/SMESHGUI_MeshUtils.cxx
src/SMESHGUI/SMESHGUI_MeshUtils.h
src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx
src/SMESHGUI/SMESHGUI_MoveNodesDlg.h
src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
src/SMESHGUI/SMESHGUI_MultiEditDlg.h
src/SMESHGUI/SMESHGUI_NodesDlg.cxx
src/SMESHGUI/SMESHGUI_NodesDlg.h
src/SMESHGUI/SMESHGUI_Operation.cxx
src/SMESHGUI/SMESHGUI_Operation.h
src/SMESHGUI/SMESHGUI_PatternUtils.cxx
src/SMESHGUI/SMESHGUI_PatternUtils.h
src/SMESHGUI/SMESHGUI_PatternWidget.cxx
src/SMESHGUI/SMESHGUI_PatternWidget.h
src/SMESHGUI/SMESHGUI_Preferences_ColorDlg.cxx
src/SMESHGUI/SMESHGUI_Preferences_ColorDlg.h
src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx
src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.h
src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx
src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h
src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx
src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h
src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx
src/SMESHGUI/SMESHGUI_RenumberingDlg.h
src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx
src/SMESHGUI/SMESHGUI_RevolutionDlg.h
src/SMESHGUI/SMESHGUI_RotationDlg.cxx
src/SMESHGUI/SMESHGUI_RotationDlg.h
src/SMESHGUI/SMESHGUI_ScaleDlg.cxx [new file with mode: 0644]
src/SMESHGUI/SMESHGUI_ScaleDlg.h [new file with mode: 0644]
src/SMESHGUI/SMESHGUI_Selection.cxx
src/SMESHGUI/SMESHGUI_Selection.h
src/SMESHGUI/SMESHGUI_SelectionOp.cxx
src/SMESHGUI/SMESHGUI_SelectionOp.h
src/SMESHGUI/SMESHGUI_SewingDlg.cxx
src/SMESHGUI/SMESHGUI_SewingDlg.h
src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx
src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.h
src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx
src/SMESHGUI/SMESHGUI_SingleEditDlg.h
src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx
src/SMESHGUI/SMESHGUI_SmoothingDlg.h
src/SMESHGUI/SMESHGUI_SpinBox.cxx
src/SMESHGUI/SMESHGUI_SpinBox.h
src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.cxx
src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.h
src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx
src/SMESHGUI/SMESHGUI_SymmetryDlg.h
src/SMESHGUI/SMESHGUI_TranslationDlg.cxx
src/SMESHGUI/SMESHGUI_TranslationDlg.h
src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx
src/SMESHGUI/SMESHGUI_TransparencyDlg.h
src/SMESHGUI/SMESHGUI_Utils.cxx
src/SMESHGUI/SMESHGUI_Utils.h
src/SMESHGUI/SMESHGUI_VTKUtils.cxx
src/SMESHGUI/SMESHGUI_VTKUtils.h
src/SMESHGUI/SMESHGUI_WhatIsDlg.cxx
src/SMESHGUI/SMESHGUI_WhatIsDlg.h
src/SMESHGUI/SMESHGUI_XmlHandler.cxx
src/SMESHGUI/SMESHGUI_XmlHandler.h
src/SMESHGUI/SMESH_SMESHGUI.hxx
src/SMESHGUI/SMESH_images.ts
src/SMESHGUI/SMESH_msg_en.ts
src/SMESH_I/Makefile.am
src/SMESH_I/SMESH.hxx
src/SMESH_I/SMESHEngine.cxx
src/SMESH_I/SMESH_0D_Algo_i.cxx
src/SMESH_I/SMESH_0D_Algo_i.hxx
src/SMESH_I/SMESH_1D_Algo_i.cxx
src/SMESH_I/SMESH_1D_Algo_i.hxx
src/SMESH_I/SMESH_2D_Algo_i.cxx
src/SMESH_I/SMESH_2D_Algo_i.hxx
src/SMESH_I/SMESH_2smeshpy.cxx
src/SMESH_I/SMESH_2smeshpy.hxx
src/SMESH_I/SMESH_3D_Algo_i.cxx
src/SMESH_I/SMESH_3D_Algo_i.hxx
src/SMESH_I/SMESH_Algo_i.cxx
src/SMESH_I/SMESH_Algo_i.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.hxx
src/SMESH_I/SMESH_Gen_i_1.cxx
src/SMESH_I/SMESH_Group_i.cxx
src/SMESH_I/SMESH_Group_i.hxx
src/SMESH_I/SMESH_Hypothesis_i.cxx
src/SMESH_I/SMESH_Hypothesis_i.hxx
src/SMESH_I/SMESH_MEDFamily_i.cxx
src/SMESH_I/SMESH_MEDFamily_i.hxx
src/SMESH_I/SMESH_MEDMesh_i.cxx
src/SMESH_I/SMESH_MEDMesh_i.hxx
src/SMESH_I/SMESH_MEDSupport_i.cxx
src/SMESH_I/SMESH_MEDSupport_i.hxx
src/SMESH_I/SMESH_MeshEditor_i.cxx
src/SMESH_I/SMESH_MeshEditor_i.hxx
src/SMESH_I/SMESH_Mesh_i.cxx
src/SMESH_I/SMESH_Mesh_i.hxx
src/SMESH_I/SMESH_NoteBook.cxx
src/SMESH_I/SMESH_NoteBook.hxx
src/SMESH_I/SMESH_Pattern_i.cxx
src/SMESH_I/SMESH_Pattern_i.hxx
src/SMESH_I/SMESH_PythonDump.hxx
src/SMESH_I/SMESH_subMesh_i.cxx
src/SMESH_I/SMESH_subMesh_i.hxx
src/SMESH_I/smeshpy.py
src/SMESH_SWIG/Makefile.am
src/SMESH_SWIG/PAL_MESH_041_mesh.py
src/SMESH_SWIG/PAL_MESH_043_2D.py
src/SMESH_SWIG/PAL_MESH_043_3D.py
src/SMESH_SWIG/SMESH_AdvancedEditor.py
src/SMESH_SWIG/SMESH_BelongToGeom.py
src/SMESH_SWIG/SMESH_BuildCompound.py
src/SMESH_SWIG/SMESH_GroupFromGeom.py
src/SMESH_SWIG/SMESH_GroupFromGeom2.py
src/SMESH_SWIG/SMESH_GroupLyingOnGeom.py
src/SMESH_SWIG/SMESH_Nut.py
src/SMESH_SWIG/SMESH_Partition1_tetra.py
src/SMESH_SWIG/SMESH_Sphere.py
src/SMESH_SWIG/SMESH_blocks.py
src/SMESH_SWIG/SMESH_box.py
src/SMESH_SWIG/SMESH_box2_tetra.py
src/SMESH_SWIG/SMESH_box3_tetra.py
src/SMESH_SWIG/SMESH_box_tetra.py
src/SMESH_SWIG/SMESH_controls.py
src/SMESH_SWIG/SMESH_demo_hexa2_upd.py
src/SMESH_SWIG/SMESH_fixation.py
src/SMESH_SWIG/SMESH_fixation_hexa.py
src/SMESH_SWIG/SMESH_fixation_netgen.py
src/SMESH_SWIG/SMESH_fixation_tetra.py
src/SMESH_SWIG/SMESH_flight_skin.py
src/SMESH_SWIG/SMESH_freebord.py
src/SMESH_SWIG/SMESH_hexaedre.py
src/SMESH_SWIG/SMESH_mechanic.py
src/SMESH_SWIG/SMESH_mechanic_editor.py
src/SMESH_SWIG/SMESH_mechanic_netgen.py
src/SMESH_SWIG/SMESH_mechanic_tetra.py
src/SMESH_SWIG/SMESH_reg.py
src/SMESH_SWIG/SMESH_shared_modules.py
src/SMESH_SWIG/SMESH_test.py
src/SMESH_SWIG/SMESH_test0.py
src/SMESH_SWIG/SMESH_test1.py
src/SMESH_SWIG/SMESH_test1_AndDisplay.py
src/SMESH_SWIG/SMESH_test2.py
src/SMESH_SWIG/SMESH_test3.py
src/SMESH_SWIG/SMESH_test4.py
src/SMESH_SWIG/SMESH_test5.py
src/SMESH_SWIG/batchmode_mefisto.py
src/SMESH_SWIG/batchmode_smesh.py
src/SMESH_SWIG/ex00_all.py
src/SMESH_SWIG/ex01_cube2build.py
src/SMESH_SWIG/ex02_cube2primitive.py
src/SMESH_SWIG/ex03_cube2partition.py
src/SMESH_SWIG/ex04_cube5tetraHexa.py
src/SMESH_SWIG/ex05_hole1build.py
src/SMESH_SWIG/ex06_hole1boolean.py
src/SMESH_SWIG/ex07_hole1partition.py
src/SMESH_SWIG/ex08_hole2build.py
src/SMESH_SWIG/ex09_grid4build.py
src/SMESH_SWIG/ex10_grid4geometry.py
src/SMESH_SWIG/ex11_grid3partition.py
src/SMESH_SWIG/ex12_grid17partition.py
src/SMESH_SWIG/ex13_hole1partial.py
src/SMESH_SWIG/ex14_cyl1holed.py
src/SMESH_SWIG/ex15_cyl2geometry.py
src/SMESH_SWIG/ex16_cyl2complementary.py
src/SMESH_SWIG/ex17_dome1.py
src/SMESH_SWIG/ex18_dome2.py
src/SMESH_SWIG/ex19_sphereINcube.py
src/SMESH_SWIG/ex21_lamp.py
src/SMESH_SWIG/ex24_cylinder.py
src/SMESH_SWIG/ex29_refine.py
src/SMESH_SWIG/ex30_groupsOp.py
src/SMESH_SWIG/ex30_tepal.py
src/SMESH_SWIG/ex31_dimGroup.py
src/SMESH_SWIG/smesh.py
src/SMESH_SWIG/smeshDC.py
src/SMESH_SWIG_WITHIHM/Makefile.am
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.i
src/StdMeshers/Makefile.am
src/StdMeshers/SMESH_StdMeshers.hxx
src/StdMeshers/StdMeshers_Arithmetic1D.cxx
src/StdMeshers/StdMeshers_Arithmetic1D.hxx
src/StdMeshers/StdMeshers_AutomaticLength.cxx
src/StdMeshers/StdMeshers_AutomaticLength.hxx
src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx
src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx
src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx
src/StdMeshers/StdMeshers_CompositeSegment_1D.hxx
src/StdMeshers/StdMeshers_Deflection1D.cxx
src/StdMeshers/StdMeshers_Deflection1D.hxx
src/StdMeshers/StdMeshers_Distribution.cxx
src/StdMeshers/StdMeshers_Distribution.hxx
src/StdMeshers/StdMeshers_FaceSide.cxx
src/StdMeshers/StdMeshers_FaceSide.hxx
src/StdMeshers/StdMeshers_FixedPoints1D.cxx
src/StdMeshers/StdMeshers_FixedPoints1D.hxx
src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx [new file with mode: 0644]
src/StdMeshers/StdMeshers_HexaFromSkin_3D.hxx [new file with mode: 0644]
src/StdMeshers/StdMeshers_Hexa_3D.cxx
src/StdMeshers/StdMeshers_Hexa_3D.hxx
src/StdMeshers/StdMeshers_LayerDistribution.cxx
src/StdMeshers/StdMeshers_LayerDistribution.hxx
src/StdMeshers/StdMeshers_LayerDistribution2D.cxx
src/StdMeshers/StdMeshers_LayerDistribution2D.hxx
src/StdMeshers/StdMeshers_LengthFromEdges.cxx
src/StdMeshers/StdMeshers_LengthFromEdges.hxx
src/StdMeshers/StdMeshers_LocalLength.cxx
src/StdMeshers/StdMeshers_LocalLength.hxx
src/StdMeshers/StdMeshers_MEFISTO_2D.cxx
src/StdMeshers/StdMeshers_MEFISTO_2D.hxx
src/StdMeshers/StdMeshers_MaxElementArea.cxx
src/StdMeshers/StdMeshers_MaxElementArea.hxx
src/StdMeshers/StdMeshers_MaxElementVolume.cxx
src/StdMeshers/StdMeshers_MaxElementVolume.hxx
src/StdMeshers/StdMeshers_MaxLength.cxx
src/StdMeshers/StdMeshers_MaxLength.hxx
src/StdMeshers/StdMeshers_NotConformAllowed.cxx
src/StdMeshers/StdMeshers_NotConformAllowed.hxx
src/StdMeshers/StdMeshers_NumberOfLayers.cxx
src/StdMeshers/StdMeshers_NumberOfLayers.hxx
src/StdMeshers/StdMeshers_NumberOfLayers2D.cxx
src/StdMeshers/StdMeshers_NumberOfLayers2D.hxx
src/StdMeshers/StdMeshers_NumberOfSegments.cxx
src/StdMeshers/StdMeshers_NumberOfSegments.hxx
src/StdMeshers/StdMeshers_Penta_3D.cxx
src/StdMeshers/StdMeshers_Penta_3D.hxx
src/StdMeshers/StdMeshers_Prism_3D.cxx
src/StdMeshers/StdMeshers_Prism_3D.hxx
src/StdMeshers/StdMeshers_ProjectionSource1D.cxx
src/StdMeshers/StdMeshers_ProjectionSource1D.hxx
src/StdMeshers/StdMeshers_ProjectionSource2D.cxx
src/StdMeshers/StdMeshers_ProjectionSource2D.hxx
src/StdMeshers/StdMeshers_ProjectionSource3D.cxx
src/StdMeshers/StdMeshers_ProjectionSource3D.hxx
src/StdMeshers/StdMeshers_ProjectionUtils.cxx
src/StdMeshers/StdMeshers_ProjectionUtils.hxx
src/StdMeshers/StdMeshers_Projection_1D.cxx
src/StdMeshers/StdMeshers_Projection_1D.hxx
src/StdMeshers/StdMeshers_Projection_2D.cxx
src/StdMeshers/StdMeshers_Projection_2D.hxx
src/StdMeshers/StdMeshers_Projection_3D.cxx
src/StdMeshers/StdMeshers_Projection_3D.hxx
src/StdMeshers/StdMeshers_Propagation.cxx
src/StdMeshers/StdMeshers_Propagation.hxx
src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx
src/StdMeshers/StdMeshers_QuadToTriaAdaptor.hxx
src/StdMeshers/StdMeshers_QuadrangleParams.cxx
src/StdMeshers/StdMeshers_QuadrangleParams.hxx
src/StdMeshers/StdMeshers_QuadranglePreference.cxx
src/StdMeshers/StdMeshers_QuadranglePreference.hxx
src/StdMeshers/StdMeshers_Quadrangle_2D.cxx
src/StdMeshers/StdMeshers_Quadrangle_2D.hxx
src/StdMeshers/StdMeshers_QuadraticMesh.cxx
src/StdMeshers/StdMeshers_QuadraticMesh.hxx
src/StdMeshers/StdMeshers_RadialPrism_3D.cxx
src/StdMeshers/StdMeshers_RadialPrism_3D.hxx
src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx
src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.hxx
src/StdMeshers/StdMeshers_Regular_1D.cxx
src/StdMeshers/StdMeshers_Regular_1D.hxx
src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.cxx
src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.hxx
src/StdMeshers/StdMeshers_SegmentLengthAroundVertex.cxx
src/StdMeshers/StdMeshers_SegmentLengthAroundVertex.hxx
src/StdMeshers/StdMeshers_StartEndLength.cxx
src/StdMeshers/StdMeshers_StartEndLength.hxx
src/StdMeshers/StdMeshers_TrianglePreference.cxx
src/StdMeshers/StdMeshers_TrianglePreference.hxx
src/StdMeshers/StdMeshers_UseExisting_1D2D.cxx
src/StdMeshers/StdMeshers_UseExisting_1D2D.hxx
src/StdMeshersGUI/Makefile.am
src/StdMeshersGUI/SMESH_StdMeshersGUI.hxx
src/StdMeshersGUI/StdMeshersGUI.cxx
src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx
src/StdMeshersGUI/StdMeshersGUI_DistrPreview.h
src/StdMeshersGUI/StdMeshersGUI_DistrTable.cxx
src/StdMeshersGUI/StdMeshersGUI_DistrTable.h
src/StdMeshersGUI/StdMeshersGUI_FixedPointsParamWdg.cxx
src/StdMeshersGUI/StdMeshersGUI_FixedPointsParamWdg.h
src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.cxx
src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.h
src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx
src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.h
src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx
src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.h
src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx
src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.h
src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx
src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.h
src/StdMeshersGUI/StdMeshers_images.ts
src/StdMeshersGUI/StdMeshers_msg_en.ts
src/StdMeshers_I/Makefile.am
src/StdMeshers_I/SMESH_StdMeshers_I.hxx
src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx
src/StdMeshers_I/StdMeshers_Arithmetic1D_i.hxx
src/StdMeshers_I/StdMeshers_AutomaticLength_i.cxx
src/StdMeshers_I/StdMeshers_AutomaticLength_i.hxx
src/StdMeshers_I/StdMeshers_CompositeSegment_1D_i.cxx
src/StdMeshers_I/StdMeshers_CompositeSegment_1D_i.hxx
src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx
src/StdMeshers_I/StdMeshers_Deflection1D_i.hxx
src/StdMeshers_I/StdMeshers_FixedPoints1D_i.cxx
src/StdMeshers_I/StdMeshers_FixedPoints1D_i.hxx
src/StdMeshers_I/StdMeshers_Hexa_3D_i.cxx
src/StdMeshers_I/StdMeshers_Hexa_3D_i.hxx
src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.cxx
src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.hxx
src/StdMeshers_I/StdMeshers_LayerDistribution_i.cxx
src/StdMeshers_I/StdMeshers_LayerDistribution_i.hxx
src/StdMeshers_I/StdMeshers_LengthFromEdges_i.cxx
src/StdMeshers_I/StdMeshers_LengthFromEdges_i.hxx
src/StdMeshers_I/StdMeshers_LocalLength_i.cxx
src/StdMeshers_I/StdMeshers_LocalLength_i.hxx
src/StdMeshers_I/StdMeshers_MEFISTO_2D_i.cxx
src/StdMeshers_I/StdMeshers_MEFISTO_2D_i.hxx
src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx
src/StdMeshers_I/StdMeshers_MaxElementArea_i.hxx
src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx
src/StdMeshers_I/StdMeshers_MaxElementVolume_i.hxx
src/StdMeshers_I/StdMeshers_MaxLength_i.cxx
src/StdMeshers_I/StdMeshers_MaxLength_i.hxx
src/StdMeshers_I/StdMeshers_NotConformAllowed_i.cxx
src/StdMeshers_I/StdMeshers_NotConformAllowed_i.hxx
src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.cxx
src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.hxx
src/StdMeshers_I/StdMeshers_NumberOfLayers_i.cxx
src/StdMeshers_I/StdMeshers_NumberOfLayers_i.hxx
src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx
src/StdMeshers_I/StdMeshers_NumberOfSegments_i.hxx
src/StdMeshers_I/StdMeshers_ObjRefUlils.cxx
src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx
src/StdMeshers_I/StdMeshers_Prism_3D_i.cxx
src/StdMeshers_I/StdMeshers_Prism_3D_i.hxx
src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx
src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.hxx
src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.cxx
src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.hxx
src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.cxx
src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.hxx
src/StdMeshers_I/StdMeshers_Projection_1D_2D_3D_i.cxx
src/StdMeshers_I/StdMeshers_Projection_1D_2D_3D_i.hxx
src/StdMeshers_I/StdMeshers_Propagation_i.cxx
src/StdMeshers_I/StdMeshers_Propagation_i.hxx
src/StdMeshers_I/StdMeshers_QuadrangleParams_i.cxx
src/StdMeshers_I/StdMeshers_QuadrangleParams_i.hxx
src/StdMeshers_I/StdMeshers_QuadranglePreference_i.cxx
src/StdMeshers_I/StdMeshers_QuadranglePreference_i.hxx
src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.cxx
src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.hxx
src/StdMeshers_I/StdMeshers_QuadraticMesh_i.cxx
src/StdMeshers_I/StdMeshers_QuadraticMesh_i.hxx
src/StdMeshers_I/StdMeshers_RadialQuadrangle_1D2D_i.cxx
src/StdMeshers_I/StdMeshers_RadialQuadrangle_1D2D_i.hxx
src/StdMeshers_I/StdMeshers_Regular_1D_i.cxx
src/StdMeshers_I/StdMeshers_Regular_1D_i.hxx
src/StdMeshers_I/StdMeshers_SegmentAroundVertex_0D_i.cxx
src/StdMeshers_I/StdMeshers_SegmentAroundVertex_0D_i.hxx
src/StdMeshers_I/StdMeshers_SegmentLengthAroundVertex_i.cxx
src/StdMeshers_I/StdMeshers_SegmentLengthAroundVertex_i.hxx
src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx
src/StdMeshers_I/StdMeshers_StartEndLength_i.hxx
src/StdMeshers_I/StdMeshers_TrianglePreference_i.cxx
src/StdMeshers_I/StdMeshers_TrianglePreference_i.hxx
src/StdMeshers_I/StdMeshers_UseExisting_1D2D_i.cxx
src/StdMeshers_I/StdMeshers_UseExisting_1D2D_i.hxx
src/StdMeshers_I/StdMeshers_i.cxx

index f6395e9bdf83e149c8db9f86777519b7b7f0b37a..8b479765a247e9e650f4dc20ff8de1bf946fdd69 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # -* Makefile *- 
 # Author : Patrick GOLDBRONN (CEA)
 # Date : 28/06/2001
index d9b835afafb464a50f9b18c72186a74140daf1ea..64d31df91c6abc9f7241f161c4b17a293d147935 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_version.h
 //  Author : Vadim SANDLER
 //  Module : SALOME
index 0b7954458021c4372b8f37a4a2f901c718664a7c..8c38d3d2719e119ffd1d7a6360b05e239b9b58b5 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 SUBDIRS = unix cmake_files
index af250a4609d383f88cc26efccec3e0df59fc0991..cd7b4c55a9184fd68a93e6fd481899f4503913a7 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -22,6 +19,7 @@
 
 SET(SMESH_CXXFLAGS -I${SMESH_ROOT_DIR}/include/salome)
 
+FIND_LIBRARY(GeomSelectionTools GeomSelectionTools ${SMESH_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(MEFISTO2D MEFISTO2D ${SMESH_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(MeshDriverDAT MeshDriverDAT ${SMESH_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(MeshDriverMED MeshDriverMED ${SMESH_ROOT_DIR}/lib/salome)
index 95246b89782ac7658c671265fc3022196f3d6c39..8d4db5e06c29f7229c70ed96a13aa935f671f1ca 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 admlocal_cmakedir = $(admlocaldir)/cmake_files
index 5f6d5f7536c72fc43090c511c2a26518cb92af5d..190640454b95c4400f4dd63790e41f5d61e5a25e 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 SUBDIRS = config_files
index 54f5b3f5129afdac061109b57afac730f4ff698e..ef0b61dd06727d74a0cbb3e1c3b408e918078ef6 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 dist_admlocalm4_DATA = \
     check_SMESH.m4     \
-    check_f77.m4       \
-    check_Platform.m4   \
-    check_qwt.m4        
+    check_Platform.m4   
index ff6606562e82963016b55219b21ede6363059048..6262fbfaf8021a8c0f690b32afc79165230dd669 100755 (executable)
@@ -1,4 +1,4 @@
-dnl  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 dnl
 dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -19,6 +19,7 @@ dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 dnl
 dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 dnl
+
 AC_DEFUN([CHECK_PLATFORM],[
 AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_PROG_CPP])dnl
index 4c0cdb6e4399e90686bb4b0ba219444859a02928..6a704081e45cd49da558443673e6aba2cb4cf4f9 100644 (file)
@@ -1,4 +1,4 @@
-dnl  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 dnl
 dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -19,6 +19,7 @@ dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 dnl
 dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 dnl
+
 # Check availability of SMesh binary distribution
 #
 # Author : Nicolas REJNERI (OPEN CASCADE, 2003)
index cd851519b43b9a45f237e8476506361a49c93fb6..782a8154d27034f5e4b01b24d234fa80f21e9102 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -24,6 +21,7 @@
 # The following is to avoid PACKAGE_... env variable
 # redefinition compilation warnings
 # ============================================================
+#
 AM_CXXFLAGS = @KERNEL_CXXFLAGS@ -include SALOMEconfig.h
 AM_CPPFLAGS = @KERNEL_CXXFLAGS@ -include SALOMEconfig.h
 
index db97f629b1b5efcd260befcc6ac2b89ee5ce604f..35df158eba357509b864a526fe6e33f78fc70661 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # -* Makefile *- 
 # Author : Guillaume Boulant (CSSI)
 # Module : SMESH
index a25e5180bb331fbe48af8924c2641ddc8ed999e0..6cf6a32336677749c21853403b549520eb7bc0d2 100644 (file)
@@ -1,9 +1,6 @@
 #!/usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
index c7ead0ce703e19ed4678b66ee8810b5770ba3ffe..a0e084b9510ccc4450eb68b3b7b355a2408e5f04 100755 (executable)
@@ -1,8 +1,5 @@
 #!/bin/sh
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
index c763d56e4a3ce92aabeb6a4b9cc43bb23617184a..8de3956bf7cfb9445734831a64fdf92110dc2103 100644 (file)
@@ -1,2 +1,20 @@
-\r
+@REM  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+@REM
+@REM  This library is free software; you can redistribute it and/or
+@REM  modify it under the terms of the GNU Lesser General Public
+@REM  License as published by the Free Software Foundation; either
+@REM  version 2.1 of the License.
+@REM
+@REM  This library is distributed in the hope that it will be useful,
+@REM  but WITHOUT ANY WARRANTY; without even the implied warranty of
+@REM  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+@REM  Lesser General Public License for more details.
+@REM
+@REM  You should have received a copy of the GNU Lesser General Public
+@REM  License along with this library; if not, write to the Free Software
+@REM  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+@REM
+@REM  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+@REM
+
 %PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\am2cmake.py --smesh\r
index 6c5331b6a8d6557f96e9e7cb9933ada97be448a6..607c2558b10daef23b986e6bd6ac8333d5b6cb0c 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # Tool for updating list of .in file for the SALOME project 
 # and regenerating configure script
 # Author : Marc Tajchman - CEA
@@ -77,10 +78,19 @@ ABS_CONF_DIR=`pwd`
 #   autom4te.cache (directory)
 echo "====================================================== aclocal"
 
-aclocal -I adm_local/unix/config_files \
-        -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
-        -I ${MED_ROOT_DIR}/adm_local/unix/config_files \
-       -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files || exit 1
+if test -d "${GUI_ROOT_DIR}"; then
+  aclocal -I adm_local/unix/config_files \
+          -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+          -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
+          -I ${MED_ROOT_DIR}/adm_local/unix/config_files \
+          -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files || exit 1
+else
+  aclocal -I adm_local/unix/config_files \
+          -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+          -I ${MED_ROOT_DIR}/adm_local/unix/config_files \
+          -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files || exit 1
+fi
+
 
 # ____________________________________________________________________
 # libtoolize creates some configuration files (ltmain.sh,
index 423451e2b88924cdef9bea4013418cef8f9d4aa0..be3f7f1afa1d59a6322d8d69ec6504aa95134782 100755 (executable)
@@ -1,8 +1,5 @@
 #!/bin/sh
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -20,6 +17,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 rm -rf autom4te.cache aclocal.m4 configure make_config
 find . -name "*~" -print -exec rm {} \;
 find . -name "*.pyc" -print -exec rm {} \;
index 7f5e389b66336dfdb537322d361ff6210c50e11c..0cfcd12fa7a1ab4a39032a7440d859e387063fb8 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # Author : Marc Tajchman (CEA)
 # Date : 28/06/2001
 # Modified by : Patrick GOLDBRONN (CEA)
@@ -26,7 +24,7 @@
 # Modified by : Alexander BORODIN (OCN) - autotools usage
 # Created from configure.in.base
 #
-AC_INIT([Salome2 Project SMESH module], [5.1.3], [webmaster.salome@opencascade.com], [SalomeSMESH])
+AC_INIT([Salome2 Project SMESH module], [5.1.4], [webmaster.salome@opencascade.com], [SalomeSMESH])
 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
@@ -447,8 +445,10 @@ AC_OUTPUT([ \
   doc/salome/gui/SMESH/Makefile \
   doc/salome/gui/SMESH/doxyfile \
   doc/salome/gui/SMESH/doxyfile_py \
+  doc/salome/gui/SMESH/static/header.html \
   doc/salome/tui/Makefile \
   doc/salome/tui/doxyfile \
+  doc/salome/tui/static/header.html \
   src/Makefile \
   src/Controls/Makefile \
   src/Driver/Makefile \
@@ -458,6 +458,7 @@ AC_OUTPUT([ \
   src/DriverUNV/Makefile \
   src/MEFISTO2/Makefile \
   src/OBJECT/Makefile \
+  src/PluginUtils/Makefile \
   src/SMDS/Makefile \
   src/SMESH/Makefile \
   src/SMESHClient/Makefile \
index 1902d9d21933c19777904ac59742905c3fd400d5..f40fb81a5d12cb8d1b1c351e41b03059a6d13c7e 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # -* Makefile *- 
 # Author : Patrick GOLDBRONN (CEA)
 # Date : 30/11/2001
index 5a92861e53f2f5283ae565dbba7668f682714577..4a09173c6072a64b68e17fc08f095df5af9e2852 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # -* Makefile *- 
 # Author : Patrick GOLDBRONN (CEA)
 # Date : 30/11/2001
index 0e41ee5ff42a7bb1fa557a8ba0eca1bee931e84b..f2e7362f13c8a6537289b5c10bd055c604e60a2e 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : Makefile.in
 #  Author : Vasily Rusyaev (Open Cascade NN)
 #  Modified by : Alexander BORODIN (OCN) - autotools usage
index a93b57ccb0eaed84b96225b5f61b1c279c7b6111..1872953023382992481c8213f789096356e63fc4 100755 (executable)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : Makefile.in
 #  Author : Vasily Rusyaev (Open Cascade NN)
 #  Modified by : Alexander BORODIN (OCN) - autotools usage
 #
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
-EXTRA_DIST += images input static
+EXTRA_DIST += images input static/footer.html static/doxygen.css
+
+guidocdir = $(docdir)/gui/SMESH
+guidoc_DATA = images/head.png
+
 
 usr_docs: doxyfile_py doxyfile 
        echo "===========================================" ;            \
index b084396baeda1383b6fc2676be0042f8157beca6..ce268972f6265bb95fd685cc161c4f95df03ac8b 100755 (executable)
@@ -1,4 +1,4 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -22,7 +22,7 @@
 #---------------------------------------------------------------------------
 # Project related configuration options
 #---------------------------------------------------------------------------
-PROJECT_NAME      = "Mesh Module Reference Manual v.@VERSION@"
+PROJECT_NAME      = "SALOME Mesh User's Guide"
 OUTPUT_DIRECTORY  = .
 CREATE_SUBDIRS   = NO
 OUTPUT_LANGUAGE   = English
@@ -48,9 +48,9 @@ EXAMPLE_PATH      = @top_srcdir@/src/SMESH_SWIG
 #---------------------------------------------------------------------------
 GENERATE_HTML     = YES
 HTML_OUTPUT       = .
-HTML_HEADER       = @srcdir@/static/header.html
+HTML_HEADER       = @builddir@/static/header.html
 HTML_FOOTER       = @srcdir@/static/footer.html
-#HTML_STYLESHEET  = @srcdir@/static/doxygen.css
+HTML_STYLESHEET   = @srcdir@/static/doxygen.css
 TOC_EXPAND        = YES
 DISABLE_INDEX     = NO
 GENERATE_TREEVIEW = YES
index c35d4aaa7ba2fc15b304184d8337488d6d5129a4..6d45aa6b5928b5e68cff00f0aa9e36e61537c820 100755 (executable)
@@ -1,4 +1,4 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -22,7 +22,7 @@
 #---------------------------------------------------------------------------
 # Project related configuration options
 #---------------------------------------------------------------------------
-PROJECT_NAME           = "Mesh Module Reference Manual v.@VERSION@"
+PROJECT_NAME           = "SALOME Mesh User's Guide"
 OUTPUT_DIRECTORY       = .
 CREATE_SUBDIRS        = NO
 OUTPUT_LANGUAGE        = English
@@ -109,9 +109,9 @@ EXAMPLE_PATH      = @top_srcdir@/src/SMESH_SWIG
 #---------------------------------------------------------------------------
 GENERATE_HTML     = YES
 HTML_OUTPUT       = smeshpy_doc
-HTML_HEADER       = @srcdir@/static/header.html
+HTML_HEADER       = @builddir@/static/header.html
 HTML_FOOTER       = @srcdir@/static/footer.html
-#HTML_STYLESHEET  = @srcdir@/static/doxygen.css
+HTML_STYLESHEET   = @srcdir@/static/doxygen.css
 TOC_EXPAND        = YES
 DISABLE_INDEX     = YES
 GENERATE_TREEVIEW = NO
index 26403226c21097c979d38116cc5b062d5d08db2c..009f71d51a2d392c0d61f56b34b1b881454c35da 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/a-createpolyhedralvolume.png and b/doc/salome/gui/SMESH/images/a-createpolyhedralvolume.png differ
index e6578f888240f0654c8c08bf4f29cd1e5869283b..d3d8da302af093e1002bc6e573fc997ad6daecc2 100644 (file)
Binary files a/doc/salome/gui/SMESH/images/add0delement.png and b/doc/salome/gui/SMESH/images/add0delement.png differ
index f142dffb26b2e0f6427c8e9e5bac557615728ec3..34f4fe07a009a10e8e617d6afd651ef47ba2db32 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/addedge.png and b/doc/salome/gui/SMESH/images/addedge.png differ
index 78ea3b50f98248cf9b49a63ef8e785c7b0bd432e..65d881f86d2b94b1664bb9f0f24d1f91069b9fe0 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/addhexahedron.png and b/doc/salome/gui/SMESH/images/addhexahedron.png differ
index 1f5375b9ae2763c4f6ad0a59235e64223cffdc85..bbde71e6a93e0c9f568fa9b61a44c28ff501f545 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/addnode.png and b/doc/salome/gui/SMESH/images/addnode.png differ
index 4abab33589ea61a0b79c81146f571f4348eca47f..804f806df5011f49b736e619c55711d05c9d987e 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/addnode_notebook.png and b/doc/salome/gui/SMESH/images/addnode_notebook.png differ
index 5d02dd70dab6ebae6c7d4e9716053f9dffc55591..71b81ecca7225e7735c713320b905b01dd6b287d 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/addpolygon.png and b/doc/salome/gui/SMESH/images/addpolygon.png differ
index 3e5c87c42f7507497995eacfd02c3f9cbb604d93..3dccce258c08e80204accd307703a16308c33d73 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/addquadrangle.png and b/doc/salome/gui/SMESH/images/addquadrangle.png differ
index 37dc29659045fc2bec3c69edc034517a05a48938..0289a95e4872ad25363f105a9d293e92d3ff2b1a 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/addtetrahedron.png and b/doc/salome/gui/SMESH/images/addtetrahedron.png differ
index 52a644e51c44c62c2e859324cfbacf433dffa0a5..991085fd100a6b817e7bf6059a16b62c8729fea0 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/addtriangle.png and b/doc/salome/gui/SMESH/images/addtriangle.png differ
index ae8e0d081751435e7c48f3e17d03128a730b6b6f..46ee94dae56e995bb06e2f26bd9265eb3778b3af 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/aqt.png and b/doc/salome/gui/SMESH/images/aqt.png differ
diff --git a/doc/salome/gui/SMESH/images/colors_size.png b/doc/salome/gui/SMESH/images/colors_size.png
new file mode 100755 (executable)
index 0000000..58210c0
Binary files /dev/null and b/doc/salome/gui/SMESH/images/colors_size.png differ
diff --git a/doc/salome/gui/SMESH/images/custom_point_marker.png b/doc/salome/gui/SMESH/images/custom_point_marker.png
new file mode 100755 (executable)
index 0000000..a46e33e
Binary files /dev/null and b/doc/salome/gui/SMESH/images/custom_point_marker.png differ
index 1fa2c42635471fabd424ff507c3283580ff3abbf..2f3bbed31b4b2ff01bc2aead9c634005a0486267 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/dialog.png and b/doc/salome/gui/SMESH/images/dialog.png differ
diff --git a/doc/salome/gui/SMESH/images/findelement1.png b/doc/salome/gui/SMESH/images/findelement1.png
new file mode 100644 (file)
index 0000000..c741368
Binary files /dev/null and b/doc/salome/gui/SMESH/images/findelement1.png differ
diff --git a/doc/salome/gui/SMESH/images/findelement2.png b/doc/salome/gui/SMESH/images/findelement2.png
new file mode 100644 (file)
index 0000000..b351b32
Binary files /dev/null and b/doc/salome/gui/SMESH/images/findelement2.png differ
diff --git a/doc/salome/gui/SMESH/images/findelement3.png b/doc/salome/gui/SMESH/images/findelement3.png
new file mode 100644 (file)
index 0000000..26cfff2
Binary files /dev/null and b/doc/salome/gui/SMESH/images/findelement3.png differ
diff --git a/doc/salome/gui/SMESH/images/head.png b/doc/salome/gui/SMESH/images/head.png
new file mode 100755 (executable)
index 0000000..307d9ef
Binary files /dev/null and b/doc/salome/gui/SMESH/images/head.png differ
diff --git a/doc/salome/gui/SMESH/images/hexotic_parameters.png b/doc/salome/gui/SMESH/images/hexotic_parameters.png
new file mode 100644 (file)
index 0000000..c06ff3b
Binary files /dev/null and b/doc/salome/gui/SMESH/images/hexotic_parameters.png differ
index c5e160884b73adf5f09b59d80c3e6b4b16eb7fba..eaa5a9323dacc7abaa6eeb652288355bcffe0161 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/mergeelems.png and b/doc/salome/gui/SMESH/images/mergeelems.png differ
diff --git a/doc/salome/gui/SMESH/images/mergeelems_auto.png b/doc/salome/gui/SMESH/images/mergeelems_auto.png
new file mode 100644 (file)
index 0000000..f8ef74f
Binary files /dev/null and b/doc/salome/gui/SMESH/images/mergeelems_auto.png differ
index d14620101081839b2a35097703b160574acd66c3..024bc22e85cb1695b57f221f137c7c921952af37 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/mergenodes.png and b/doc/salome/gui/SMESH/images/mergenodes.png differ
diff --git a/doc/salome/gui/SMESH/images/mergenodes_auto.png b/doc/salome/gui/SMESH/images/mergenodes_auto.png
new file mode 100644 (file)
index 0000000..b292086
Binary files /dev/null and b/doc/salome/gui/SMESH/images/mergenodes_auto.png differ
diff --git a/doc/salome/gui/SMESH/images/mesh_order_123.png b/doc/salome/gui/SMESH/images/mesh_order_123.png
new file mode 100644 (file)
index 0000000..952f207
Binary files /dev/null and b/doc/salome/gui/SMESH/images/mesh_order_123.png differ
diff --git a/doc/salome/gui/SMESH/images/mesh_order_123_res.png b/doc/salome/gui/SMESH/images/mesh_order_123_res.png
new file mode 100644 (file)
index 0000000..7b7588c
Binary files /dev/null and b/doc/salome/gui/SMESH/images/mesh_order_123_res.png differ
diff --git a/doc/salome/gui/SMESH/images/mesh_order_213.png b/doc/salome/gui/SMESH/images/mesh_order_213.png
new file mode 100644 (file)
index 0000000..959ca38
Binary files /dev/null and b/doc/salome/gui/SMESH/images/mesh_order_213.png differ
diff --git a/doc/salome/gui/SMESH/images/mesh_order_213_res.png b/doc/salome/gui/SMESH/images/mesh_order_213_res.png
new file mode 100644 (file)
index 0000000..ca36759
Binary files /dev/null and b/doc/salome/gui/SMESH/images/mesh_order_213_res.png differ
diff --git a/doc/salome/gui/SMESH/images/mesh_order_321.png b/doc/salome/gui/SMESH/images/mesh_order_321.png
new file mode 100644 (file)
index 0000000..7ad61fa
Binary files /dev/null and b/doc/salome/gui/SMESH/images/mesh_order_321.png differ
diff --git a/doc/salome/gui/SMESH/images/mesh_order_321_res.png b/doc/salome/gui/SMESH/images/mesh_order_321_res.png
new file mode 100644 (file)
index 0000000..0514470
Binary files /dev/null and b/doc/salome/gui/SMESH/images/mesh_order_321_res.png differ
diff --git a/doc/salome/gui/SMESH/images/mesh_order_no_concurrent.png b/doc/salome/gui/SMESH/images/mesh_order_no_concurrent.png
new file mode 100644 (file)
index 0000000..6df59a1
Binary files /dev/null and b/doc/salome/gui/SMESH/images/mesh_order_no_concurrent.png differ
diff --git a/doc/salome/gui/SMESH/images/mesh_order_preview.png b/doc/salome/gui/SMESH/images/mesh_order_preview.png
new file mode 100644 (file)
index 0000000..f4b5e3b
Binary files /dev/null and b/doc/salome/gui/SMESH/images/mesh_order_preview.png differ
diff --git a/doc/salome/gui/SMESH/images/point_marker_widget1.png b/doc/salome/gui/SMESH/images/point_marker_widget1.png
new file mode 100755 (executable)
index 0000000..13b8e6d
Binary files /dev/null and b/doc/salome/gui/SMESH/images/point_marker_widget1.png differ
diff --git a/doc/salome/gui/SMESH/images/point_marker_widget2.png b/doc/salome/gui/SMESH/images/point_marker_widget2.png
new file mode 100755 (executable)
index 0000000..dbb81b4
Binary files /dev/null and b/doc/salome/gui/SMESH/images/point_marker_widget2.png differ
diff --git a/doc/salome/gui/SMESH/images/scale01.png b/doc/salome/gui/SMESH/images/scale01.png
new file mode 100644 (file)
index 0000000..72ae775
Binary files /dev/null and b/doc/salome/gui/SMESH/images/scale01.png differ
diff --git a/doc/salome/gui/SMESH/images/scale02.png b/doc/salome/gui/SMESH/images/scale02.png
new file mode 100644 (file)
index 0000000..9d6a5f3
Binary files /dev/null and b/doc/salome/gui/SMESH/images/scale02.png differ
diff --git a/doc/salome/gui/SMESH/images/scale03.png b/doc/salome/gui/SMESH/images/scale03.png
new file mode 100644 (file)
index 0000000..891ae8d
Binary files /dev/null and b/doc/salome/gui/SMESH/images/scale03.png differ
diff --git a/doc/salome/gui/SMESH/images/scale04.png b/doc/salome/gui/SMESH/images/scale04.png
new file mode 100644 (file)
index 0000000..a042834
Binary files /dev/null and b/doc/salome/gui/SMESH/images/scale04.png differ
diff --git a/doc/salome/gui/SMESH/images/scale06.png b/doc/salome/gui/SMESH/images/scale06.png
new file mode 100644 (file)
index 0000000..2bd8219
Binary files /dev/null and b/doc/salome/gui/SMESH/images/scale06.png differ
diff --git a/doc/salome/gui/SMESH/images/scale07.png b/doc/salome/gui/SMESH/images/scale07.png
new file mode 100644 (file)
index 0000000..8ee0923
Binary files /dev/null and b/doc/salome/gui/SMESH/images/scale07.png differ
diff --git a/doc/salome/gui/SMESH/images/scale09.png b/doc/salome/gui/SMESH/images/scale09.png
new file mode 100644 (file)
index 0000000..2816bac
Binary files /dev/null and b/doc/salome/gui/SMESH/images/scale09.png differ
diff --git a/doc/salome/gui/SMESH/images/scaleinit01.png b/doc/salome/gui/SMESH/images/scaleinit01.png
new file mode 100644 (file)
index 0000000..97990a8
Binary files /dev/null and b/doc/salome/gui/SMESH/images/scaleinit01.png differ
diff --git a/doc/salome/gui/SMESH/images/scaleinit02.png b/doc/salome/gui/SMESH/images/scaleinit02.png
new file mode 100644 (file)
index 0000000..008d2e3
Binary files /dev/null and b/doc/salome/gui/SMESH/images/scaleinit02.png differ
diff --git a/doc/salome/gui/SMESH/images/scaleres03.png b/doc/salome/gui/SMESH/images/scaleres03.png
new file mode 100644 (file)
index 0000000..99b65d7
Binary files /dev/null and b/doc/salome/gui/SMESH/images/scaleres03.png differ
diff --git a/doc/salome/gui/SMESH/images/scaleres04.png b/doc/salome/gui/SMESH/images/scaleres04.png
new file mode 100644 (file)
index 0000000..0880989
Binary files /dev/null and b/doc/salome/gui/SMESH/images/scaleres04.png differ
diff --git a/doc/salome/gui/SMESH/images/scaleres06.png b/doc/salome/gui/SMESH/images/scaleres06.png
new file mode 100644 (file)
index 0000000..059fa97
Binary files /dev/null and b/doc/salome/gui/SMESH/images/scaleres06.png differ
diff --git a/doc/salome/gui/SMESH/images/scaleres07.png b/doc/salome/gui/SMESH/images/scaleres07.png
new file mode 100644 (file)
index 0000000..b75f83c
Binary files /dev/null and b/doc/salome/gui/SMESH/images/scaleres07.png differ
diff --git a/doc/salome/gui/SMESH/images/scaleres09.png b/doc/salome/gui/SMESH/images/scaleres09.png
new file mode 100644 (file)
index 0000000..4708be5
Binary files /dev/null and b/doc/salome/gui/SMESH/images/scaleres09.png differ
diff --git a/doc/salome/gui/SMESH/images/split_into_tetra.png b/doc/salome/gui/SMESH/images/split_into_tetra.png
new file mode 100644 (file)
index 0000000..bc88b11
Binary files /dev/null and b/doc/salome/gui/SMESH/images/split_into_tetra.png differ
diff --git a/doc/salome/gui/SMESH/images/split_into_tetra_icon.png b/doc/salome/gui/SMESH/images/split_into_tetra_icon.png
new file mode 100644 (file)
index 0000000..b113c30
Binary files /dev/null and b/doc/salome/gui/SMESH/images/split_into_tetra_icon.png differ
diff --git a/doc/salome/gui/SMESH/images/std_point_marker.png b/doc/salome/gui/SMESH/images/std_point_marker.png
new file mode 100755 (executable)
index 0000000..2a62693
Binary files /dev/null and b/doc/salome/gui/SMESH/images/std_point_marker.png differ
index dd42e9962c130c5b30361c1751e2f5a1643db6ef..8e789536f0d2be87ac0cc544c5a3feeeee2c7d5a 100644 (file)
@@ -66,18 +66,25 @@ shows the good (left) and the bad (right) results of meshing.
 
 \image html hypo_quad_params_res_2.png "The resulting meshes"
 
-<br>
+<b>See Also</b> a sample TUI Script of a 
+\ref tui_quadrangle_parameters "Quadrangle Parameters" hypothesis.
+
 \anchor quadrangle_preference_anchor
 <h2>Quadrangle Preference</h2>
 
-This algorithm can be used only together with Quadrangle (Mapping)
-algorithm. It allows to build quadrangular meshes even if the number
+This algorithm can be used together with Quadrangle (Mapping) and Netgen 2D
+algorithms. 
+
+It allows Netgen 2D to build quadrangular meshes at any conditions.
+
+It allows Quadrangle (Mapping) to build quadrangular meshes even if the number
 of nodes at the opposite edges of a meshed face is not equal,
 otherwise this mesh will contain some triangular elements.
 <br>
 This hypothesis has one restriction on its work: the total quantity of
 segments on all four sides of the face must be even (divisible by 2).
 
+
 <br>
 \anchor triangle_preference_anchor
 <h2>Triangle Preference</h2>
index cc8f5fd5287d0f6fce56e615c16c3d3b987a4a97..9d9db7b32c46baba0dbbeb9021df4d31bd6b20f5 100644 (file)
@@ -45,6 +45,7 @@ meshers and thus, work only with definite algorithms.
 <li>\subpage ghs3d_hypo_page</li> - works with GHS3D algorithm.
 <li>\subpage ghs3dprl_hypo_page</li> - works with GHS3DPRL (tepal) algorithm.
 <li>\subpage blsurf_hypo_page</li> - works with BLSURF algorithm.
+<li>\subpage hexotic_hypo_page</li> - works with Hexotic algorithm.
 </ul>
 
 There also exist  
index 5cb3b15485b1e602ba115b04b8865c392e87fe04..451823b7432f8bb488b83a76b7da0a2539cf7f3b 100644 (file)
@@ -26,6 +26,10 @@ following associated submenu will appear:</li>
 \image html image146.png
 
 From this submenu select the type of element which you would like to add to your mesh.
+\note All dialogs intended for adding nodes or elements to mesh (except dialog for adding
+0D elements) provide a possibility to add these nodes/elements to the specified group
+(or to create the group if it doesn't exist). <b>Add to group</b> box allows to choose
+an existing group for created node or element or to specify a name for new group.
 </ol>
 
 <b>See Also</b> sample TUI Scripts of  
index afe9b77b51e3ea9458c659b06c9dc51a67d37211..2a587d1477e7c86ef111e227c808c795a650933e 100644 (file)
@@ -18,6 +18,11 @@ one of the following:
 
 \image html image152.png
 
+\note All dialogs intended for adding quadratic elements to mesh provide a possibility
+to add these elements to the specified group (or to create the group if it doesn't exist).
+<b>Add to group</b> box allows to choose an existing group for created element or
+to specify a name for new group.
+
 To create any <b>Quadratic Element</b> specify the nodes which will form your
 triangle by selecting them in the 3D viewer with pressed Shift
 button. Their numbers will appear in the dialog box as <b>Corner Nodes</b>
index a83a64f9f7f2f02b82e84c65569beae8f2890b9d..e957a97138435df1cbae9f24346b9d057968abeb 100644 (file)
@@ -47,6 +47,15 @@ tetrahedral (pyramidal) elements.</li>
 \image html image126.gif "Example of a hexahedral 3D mesh"
 </ul>
 
+Some of 3D meshing algorithms also can generate 3D meshes from 2D meshes, working without
+geometrical objects. Such algorithms are
+<ul>
+<li>Hexahedron meshing algorithm (i,j,k),</li>
+<li>Tetrahedron (Netgen and GHS3D) meshing algorithms,</li>
+<li>Hexotic.</li>
+</ul>
+
+
 \note BLSURF and GHS3D are commercial meshers and require a
 license to be used within the Mesh module.
 
diff --git a/doc/salome/gui/SMESH/input/colors_size.doc b/doc/salome/gui/SMESH/input/colors_size.doc
new file mode 100644 (file)
index 0000000..aa24457
--- /dev/null
@@ -0,0 +1,35 @@
+/*!
+
+\page colors_size_page Colors / Size
+
+\image html colors_size.png
+
+Using this dialog you can define the following set of mesh visualization
+parameters:
+<ul>
+<li><b>Elements</b></li>
+<ul>
+<li><b>Fill</b> - color of surface of elements (seen in Shading mode).</li>
+<li><b>Back Face</b> - color of interior surface of elements.</li>
+<li><b>Outline</b> - color of borders of elements.</li>
+<li><b>0D slements</b> - color of 0D elements.</li>
+<li><b>Size of 0D slements</b> - size of 0D elements.</li>
+<li><b>Width</b> - width of lines (edges and borders of elements).</li>
+<li><b>Shrink coef.</b> - relative space of elements compared to gaps between
+       them in shrink mode.</li>
+</ul>
+<li><b>Nodes</b></li>
+<ul>
+<li><b>Color</b> - color of nodes.</li>
+<li><b>Marker</b> - group of options allowing to change the representation of
+       points (see \subpage point_marker_page "Point Marker" page).</li>
+</ul>
+<li><b>Orientation of faces</b></li>
+<ul>
+<li><b>Color</b> - color of orientation vertors.</li>
+<li><b>Scale</b> - size of orientation vectors.</li>
+<li><b>3D vectors</b> - allows to choose between 2D planar and 3D vectors.</li>
+</ul>
+</ul>
+
+*/
\ No newline at end of file
index 625cff3bd1d510418a3a85d2e758cfee0478f724..042b66320d413ba63466268f27b8333c0be2a37b 100644 (file)
@@ -152,10 +152,92 @@ evaluation will be displayed in the following information box:
 
 \image html mesh_evaluation_succeed.png
 
+</li>
 
-Consider trying a sample script for construction of a mesh from our 
-\ref tui_creating_meshes_page "TUI Scripts" section.
+</ol>
+
+\anchor mesh_order_anchor
+It is allowed to change submesh priority in mesh computation when
+there are concurrent submeshes present. I.e. user can change priority of
+applying algorithms on shared subshapes of Mesh shape.
+<em>To change submesh priority:</em>
+<ol>
+<li>From the Mesh menu choose the "Change submesh priority" on
+selected Mesh item, or invoke from popup menu. The opened dialogue box
+shows a list of submeshes in the order of their priority. Algorithm and its
+hypotheses of a submesh being upper in the list are applied before those of
+a submesh lower in the list.
+
+There is an example of submesh order modifications of Mesh created on a Box
+shape. The main Mesh object:
+<ul>
+<li><i>3D</i> <b>Tetrahedron (Netgen)</b> with Hypothesis<b>Max Element Volume</b></li>
+<li><i>2D</i> <b>Triangle (Mefisto)</b> with Hypothesis<b>Max Element Area</b>
 </li>
+<li><i>1D</i> <b>Wire discretisation</b> with <b>Number of Segments</b>=20</li>
+</ul>
+The first submesh object <b>Submesh_1</b> created on <b>Face_1</b>
+is:
+<ul>
+<li><i>2D</i> Netgen 1D-2D with Hypothesis <b>Netgen Simple parameters</b>
+(Number of Segments = 4)</li>
+</ul>
+The second submesh object <b>Submesh_2</b> created on <b>Face_2</b>
+is:
+<ul>
+<li><i>2D</i> Netgen 1D-2D with Hypothesis <b>Netgen Simple parameters</b>
+(Number of Segments = 8)</li>
+</ul>
+
+And the last third submesh object <b>Submesh_3</b> created on <b>Face_3</b>
+is:
+<ul>
+<li><i>2D</i> Netgen 1D-2D with Hypothesis <b>Netgen Simple parameters</b>
+(Number of Segments = 12)</li>
+</ul>
+The submeshes can become concurrent if their algorithms leads to mesh shared subshape
+with different algorithms (or different algorithms parameters, i.e. hypothesises).
+In fact, we have three submeshes with concurrent algorithms, because
+they have different hypothesises assigned to them. 
+
+The first mesh computation made with:
+\image html mesh_order_123.png
+<center><em>"Mesh order SubMesh_1, SubMesh_2, SubMesh_3"</em></center>
+\image html mesh_order_123_res.png
+<center><em>"Result mesh with order SubMesh_1, SubMesh_2, SubMesh_3 "</em></center>
+
+The next mesh computation with:
+\image html mesh_order_213.png
+<center><em>"Mesh order SubMesh_2, SubMesh_1, SubMesh_3"</em></center>
+\image html mesh_order_213_res.png
+<center><em>"Result mesh with order SubMesh_2, SubMesh_1, SubMesh_3 "</em></center>
+
+And the last mesh computation with:
+\image html mesh_order_321.png
+<center><em>"Mesh order SubMesh_3, SubMesh_2, SubMesh_1"</em></center>
+\image html mesh_order_321_res.png
+<center><em>"Result mesh with order SubMesh_3, SubMesh_2, SubMesh_1 "</em></center>
+
+As we can see each mesh computation has different number of result
+elements and different mesh discretisation on shared edges (edges 
+that are shared between <b>Face_1</b>, <b>Face_2</b> and <b>Face_3</b>)
+
+Additionally, submesh priority (order of algorithms to be applied) can
+be modified not only in separate dialog box, but in <b>Preview</b>
+also. This helps to preview different mesh results, modifying submesh
+order.
+\image html mesh_order_preview.png
+<center><em>"Preview with submesh priority list box"</em></center>
+
+If there are no concurrent submeshes under Mesh object, then user will see the
+following information dialog box
+\image html mesh_order_no_concurrent.png
+<center><em>"No concurrent submeshes detected"</em></center>
+and no mesh order list box will appear in Preview dialog box.
+
 </ol>
 
+Consider trying a sample script for construction of a mesh from our 
+\ref tui_creating_meshes_page "TUI Scripts" section.
+
 */
diff --git a/doc/salome/gui/SMESH/input/find_element_by_point.doc b/doc/salome/gui/SMESH/input/find_element_by_point.doc
new file mode 100644 (file)
index 0000000..34380ae
--- /dev/null
@@ -0,0 +1,41 @@
+/*!
+
+\page find_element_by_point_page Find Element by Point
+
+\n This functionality allows you to find all mesh elements to which
+belongs a certain point.
+
+<em>To find the elements:</em>
+<ol>
+<li>Select the mesh</li>
+<li>Select from the Mesh menu or from the context menu the Find
+Element by Point item.
+
+\image html findelement3.png
+<center><em>"Find Element by Point" button</em></center>
+
+The following dialog box will appear:
+
+\image html findelement2.png
+
+</li>
+<li>In this dialog box you should select:
+
+<ul>
+<li>the coordinates of the point;</li>
+<li>the type of elements to be found; it is also possible to find elements
+of all types related to the reference point. To be exact, type "All"
+means to find elements of any type except nodes and 0D elements.</li>
+</ul>
+
+</li>
+<li>Click the \b Apply or \b OK button.</li>
+</ol>
+
+\image html findelement1.png 
+<center>The reference point and the related elements.</center>
+
+
+<br><b>See Also</b> a sample TUI Script of a \ref tui_find_element_by_point "Find Element by Point" operation.
+
+*/
index dc79859887be6b33186305c38f533bbf6af72aba..a7f69dfc82c2de5129847ae1627beef252381da5 100644 (file)
@@ -2,20 +2,22 @@
 
 \page ghs3dprl_hypo_page GHS3DPRL Parameters hypothesis
 
-\n GHS3DPRL Parameters hypothesis works only with <b>Tetrahedron (Tepal with TetMesh-GHS3D)</b> algorithm.
-\n
-\n This algorithm is a commercial software, its use requires a licence (http://www.distene.com/fr/build/offer.html).
-
-\n Tepal gives the possibility to generate a partitioned
+\n GHS3DPRL Parameters hypothesis works only with <b>Tetrahedron (Tepal with TetMesh-GHS3D)</b> algorithm. 
+This algorithm is a commercial software, its use requires a licence (http://www.distene.com/fr/build/offer.html).
+\n Tepal_V1.4 gives the possibility to generate a partitioned
 mesh with 200 million tetrahedrons on a computer with average memory size
-(2Go RAM) in about 50 hours on one CPU (Xeon, 2008). 
-This is a serious alternative to GHS3D, which requires a much less common
+(2Go RAM) in about 50 hours on one CPU (Xeon, 2008).
+\n New Tepal_V2.0 gives the possibility to generate a partitioned mesh with (for the moment) no more than 100 million 
+tetrahedrons on computers using MPI, (Total 16 Go RAM) 
+in about 900 seconds (!yes! : !seconds!) on 2 octo processors (Xeon, 2009).
+The launch of this beta-version is described below.
+\n This is a serious alternative to GHS3D, which requires a much less common
 configuration with 64Go RAM to only try to make a partition of a mesh with
 200 million tetrahedrons, no result guaranteed.
 \n
 \note The Plugin doesn't load in the Memory the supposedly large resulting meshes. 
 The meshes are saved in MED files and can be imported in the user-defined location via menu File-Import-MED Files.
-\n Pay attention, that Salome GUI needs 2Go RAM. to load a MED
+\n Pay attention, that Salome GUI needs 2Go RAM to load a MED
 file with 5 million tetrahedrons.
 
 \image html ghs3dprl_parameters_basic.png
@@ -89,11 +91,10 @@ example:
              --verbose=0 --test=yes --menu=no --launchtepal=no
 
 \endverbatim
-
+\n
 </li>
 <li>
-<p>
- <b>Advanced tepal Parameters</b> <p>
+<b>Advanced Tepal_V1.4 Parameters</b> <p>
 
 \verbatim
 
@@ -142,11 +143,10 @@ With options :
           Arguments to pass to Tetmesh during cutting process
 
 \endverbatim
-
+\n
 </li>
 <li>
-<p>
-<b>Advanced ghs3d Parameters (through tepal's --tetmesh_args)</b> - type "ghs3d -h" in a Terminal. <p>
+<b>Advanced ghs3d Parameters (through Tepal_V1.4's --tetmesh_args)</b> - type "ghs3d -h" in a Terminal. <p>
 
 \verbatim
 myname@myhost > ghs3d -h
@@ -231,14 +231,16 @@ DESCRIPTION
         EMail: support@distene.com )
 
 \endverbatim
-
+\n
 </li>
 <h1>Saving user's preferred GHS3DPRL Advanced Parameters</h1><br>
 GHS3DPRL Plugin launches standalone binary executable tepal2med.<br>
-You may rename tepal2med as tepal2med.exe for example, and replace
-tepal2med by a shell script at your convenience to overriding parameters.<br>... or else $PATH modification... .<br>Idem for tepal.<br><br>
+You may rename file tepal2med as tepal2med.exe for example, and replace
+tepal2med by a shell script at your convenience to overriding parameters.
+<br>... or else $PATH modification... .<br>Idem for file tepal.<br><br>
 <li>
 <b>Advanced tepal2med Parameters</b> - overriding parameter deletegroups<p>
+You may rename tepal2med as tepal2med.exe for example.
 
 \code
 #!/bin/bash
@@ -250,11 +252,11 @@ tepal2med by a shell script at your convenience to overriding parameters.<br>...
 tepal2med.exe $* --deletegroups="(\bAll_Nodes|\bAll_Faces)"
 
 \endcode
-
+\n
 </li>
 <li>
-<p>
-<b>Advanced tepal Parameters</b> - overriding parameter component of ghs3d (to mesh holes). <p>
+<b>Advanced Tepal_V1.4 Parameters</b> - overriding parameter component of ghs3d (to mesh holes). <p>
+You may rename tepal as tepal.exe for example.
 
 \code
 #!/bin/bash
@@ -269,11 +271,11 @@ SIMULOGD_LICENSE_FILE=29029@is142356
 tepal.exe $* --tetmesh_args "-c 0"
 
 \endcode
-
+\n
 </li>
 <li>
-<p>
 <b>Advanced tepal Parameters</b> - overriding launching tepal on other host. <p>
+You may rename tepal as tepal.exe for example.
 
 \code
 #!/bin/bash
@@ -293,13 +295,107 @@ ssh otherhost "tepal.exe $* > /home/myname/tmp/tepal.log"
 #ssh otherhost "tepal.exe $* --tetmesh_args \"-c 0\"" > /home/myname/tmp/tepal.log
 
 \endcode
+\n
+</li>
+
+<h1>Tepal_V2.0 and MPI use.</h1><br>
+This all new beta-version needs MPI, (openmpi-1.3.1 was used). To use it you have to proceed 
+as done in "overriding parameter component of ghs3d".
+Advanced ghs3d Parameters (through Tepal_V1.4's --tetmesh_args) are not assumed yet.
+It meshes holes.
+\n You may rename tepal as tepal64_v2.exe for example, and replace tepal by a shell script like below.
+
+<li>
+<b>example tepal_v2_mpirun.</b><p>
+
+\code
 
+#!/bin/bash
+#script tepal overriding launching Tepal_V2.0 with MPI (tepal run 64 bits only).
+#we have renamed binary executable tepal as tepal64_v2.exe.
+#typical command to launch tepal v1 :
+#tepal -f /tmp/myname/GHS3DPRL -n 16 > /tmp/myname/tepal.log
+#this file is an exemple to transform this call for tepal v2.0, 
+#   (beta version using .mesh input file)
+#you have to adapt for your convenience.
+
+#first problem  is convert v1 input files GHS3DPRL.faces and GHS3DPRL.points 
+#               to v2 input file GHS3DPRL.mesh.
+#second problem is to launch on heterogeneous system linux cluster of 
+#               2 hosts (64 bits) of 8 nodes (by example)
+#               with different 2 executables codes linked on 2 different
+#               openmpi shared library codes.
+#third problem  is convert tepal v2 output files GHS3DPRL*.mesh
+#               to v1 input files GHS3DPRL*.faces an GHS3DPRL*.points.
+
+#you have to work on the same physical disk and same path input and ouput files : $SAME_DIR
+#you have to work on different physical disk but same path and name for executable files 
+#    (and shared libraries) : $DIFF_DIR
+
+echo "parameter 0="$0
+echo "parameter 1="$1
+echo "parameter 2="$2
+echo "parameter 3="$3
+echo "parameter 4="$4
+
+export SAME_DIR=/same_physical_disk_and_same path/tmp
+export DIFF_DIR=/different_physical_disk_but_same path/myname
+
+#copy input local files from local current directory (something like /tmp/myname)
+#in this case we need /tmp/myname and $SAME_DIR different
+cd $SAME_DIR
+rm *
+cp $2* .
+
+export IN_FILES=`basename $2`
+export IN_DIR=`dirname $2`
+#created .mesh from .faces et .points
+/through_salome_path/facespoints2mesh.py $IN_FILES
+
+#there are 2 executable openmpi and library through 2 physical DIFF_DIR
+export PATH=$DIFF_DIR/openmpi-1.3.1_install/bin:${PATH}
+export LD_LIBRARY_PATH=$DIFF_DIR/openmpi-1.3.1_install/lib:${LD_LIBRARY_PATH}
+
+#there are 2 executables tepal_v2 through 2 physical DIFF_DIR
+export LD_LIBRARY_PATH=$DIFF_DIR/tepal-2.0.0/bin/Linux_64:${LD_LIBRARY_PATH}
+export PATH=$DIFF_DIR/tepal-2.0.0/bin/Linux_64:$PATH
+
+#small test betweeen friends
+#rm hostnames.log
+#mpirun -n $4 hostname >> hostnames.log
+
+#there necessary set env licence file for tepal v2
+export DISTENE_LICENSE_FILE="Use global envvar: DLIM8VAR"
+export DLIM8VAR="dlim8 1:1:29030@is142356/0016175ef08c::a1ba...9e19"
+export SIMULOGD_LICENSE_FILE=29029@is142356 
+export LICENSE_FILE=/product/distene/dlim8.var.sh
+
+#mpirun with necessary set envenvironment
+export TMP_ENV="-x PATH -x LD_LIBRARY_PATH -x DISTENE_LICENSE_FILE -x DLIM8VAR \
+                -x SIMULOGD_LICENSE_FILE -x LICENSE_FILE"
+#mpirun $TMPENV -n $4 which tepal64_v2.exe >> hostnames.log
+
+#real mpirun uncomment after verify small test
+mpirun $TMPENV -n $4 tepal64_v2.exe --in $IN_FILES.mesh --out $IN_FILES.mesh --verbose 100
+
+#convert output files tepalv1 format
+/through_salome_path/mesh2facespoints.py $IN_FILES
+
+#copy ouputs files from $SAME_DIR to local current directory (something like /tmp/myname)
+cp -f hostnames.log $IN_DIR
+cp -f $IN_FILES* $IN_DIR
+
+#ls -al $SAME_DIR
+#cat $SAME_DIR/hostnames.log
+#cat /tmp/myname/tepal.log
+
+\endcode
+\n
 </li>
 
 <h1>TUI use.</h1><br>
 
 <li>
-<p>
 <b>example ex30_tepal.py.</b><p>
 
 \code
@@ -367,7 +463,7 @@ if os.access(results+".xml", os.F_OK):
 else:
     print "KO: tepal"
 \endcode
-
+\n
 </li>
 </ul>
 
diff --git a/doc/salome/gui/SMESH/input/hexotic_hypo.doc b/doc/salome/gui/SMESH/input/hexotic_hypo.doc
new file mode 100644 (file)
index 0000000..902b93a
--- /dev/null
@@ -0,0 +1,30 @@
+/*!
+
+\page hexotic_hypo_page Hexotic Parameters hypothesis
+
+\n Hexotic Parameters hypothesis works only with <b>Hexotic</b> 
+algorithm. This algorithm is a commercial software.
+
+\image html hexotic_parameters.png
+
+<ul>
+<li><b>Name</b> - allows to define the name of the hypothesis (Hexotic 
+Parameters by default).</li>
+
+<li><b>Nb. Hexes Min Level</b> - allows defining the minimal level of recursive partitioning on the initial octree cube.</li>
+
+<li><b>Nb. Hexes Max Level</b> - allows defining the maximal level of recursive partitioning on the initial octree cube.</li>
+
+<li><b>Salome Quadrangles</b> - not documented.</li>
+
+<li><b>Generate smooth meshes no ridges</b> - specifies that the mesher can ignore ridges. A ridge is a geometrical entity (a sharp edge). The resulting meshes will have better quality elements, at the price of "smoothing" out the geometry.
+</li>
+
+<li><b>Authorize invalid elements</b> - specifies that the mesher must conform as much as possible to the geometry (especially the sharp edges). The resulting meshes may contain invalid elements (but with positive volumes: for example, three vertices of an hexahedron on the same edge), for the benefit of better geometry accuracy.
+</li>
+
+<li><b>Sharp angle threshold in degrees</b> - specifies the angle between two triangles above which the hex mesher will consider the edge common to these two triangles as being a "ridge". A ridge is a geometrical entity (a sharp edge) which has to be kept as it is in the final hex mesh.The default value is 60 (degrees).<br>If you raise this value, the hex mesher will detect less ridges, and the final solid mesh will therefore be smoother. On the other hand, if you reduce this value, more ridges will be detected and the algorithm will face harder situations to conform to.
+</li>
+</ul>
+
+*/
index 821f6f9f28b625d46d9a68e77987bf9cc0404fa3..d677e179e4c713e9c9f72a9370882efb80960021 100644 (file)
@@ -5,42 +5,59 @@
 \n This functionality allows to merge coincident elements of a mesh
 selectable in the dialog box.
 
-
 \image html mergeelems_ico.png "Merge elements button"
 
+<ol>
+<li>From the \b Modification choose \b Transformation and  from its
+sub-menu select the <b>Merge elements</b> item. The following dialog box
+shall appear:</li>
 
-\image html mergeelems.png
+\image html mergeelems_auto.png
+<br>
+<ul>
+<li>\b Name is the name of the mesh whose elements will be merged.</li>
+<li>\b Automatic Mode or \b Manual Mode is to switch the dialog
+controls type.
+</ul>
+
+<li><b>Automatic mode:</b>
+<ul>
+<li>In \b Automatic Mode the elements that were created on the same nodes will be merged.</li>
+</ul>
+</li>
+
+<li>If the \b Manual Mode is selected there are additional controls to 
+manage the elements to be merged in more detail:
 
+\image html mergeelems.png
+<br>
+<ul>
+<li>\b Detect button generates the list of coincident elements for the given \b Tolerance.</li>
+<li><b>Coincident elements</b> is a list of groupes of elements for
+merging. All elements of each group will form one after the operation.
 <ul>
-  <li>\b Name is the name of the mesh whose elements will be merged.</li>
-  <li>\b Tolerance is a maximum distance between elements sufficient for merging.
-    <ul>
-      <li>\b Detect button generates the list of coincident elements for the given \b Tolerance.</li>
-    </ul></li>
-  <li><b>Coincident elements</b> is a list of groupes of elements for
-    merging. All elements of each group will form one after the operation.
-    <ul>
-      <li>\b Remove button deletes the selected group from the list.</li>
-      <li>\b Add button adds to the list a group of elements selected in the
-        viewer with pressed "Shift" key.</li>
-      <li><b>Select all</b> checkbox selects all groups.</li>
-    </ul></li>
-  <li><b>Edit selected group</b> list allows editing the selected group:
-    <br><br>
-    \image html add.png
-    <center>adds to the group the element selected in the viewer.</center>
-    <br>
-    \image html remove.png
-    <center>removes from the group the selected element.</center>
-    <br>
-    \image html sort.png
-    <center>moves the selected element to the first position in the
-    group. This means that all other elements will be merged into this
-    one.</center>
-    <br>
-  </li>
-  <li>To confirm your choice click \b Apply or <b>Apply and Close</b> button.</li>
+<li>\b Remove button deletes the selected group from the list.</li>
+<li>\b Add button adds to the list a group of elements selected in the
+viewer with pressed "Shift" key.</li>
+<li><b>Select all</b> checkbox selects all groups.</li>
+</ul></li>
+<li><b>Edit selected group</b> list allows editing the selected group:
+<br><br>
+\image html add.png
+<center>adds to the group the element selected in the viewer.</center>
+<br>
+\image html remove.png
+<center>removes from the group the selected element.</center>
+<br>
+\image html sort.png
+<center>moves the selected element to the first position in the
+group. This means that all other elements will be merged into this
+one.</center>
+<br>
+</li>
+<li>To confirm your choice click \b Apply or <b>Apply and Close</b> button.</li>
 </ul>
+</ol>
 
 In this picture you see a triangle which coincides with one of the
 elements of the mesh. After we apply <b>Merge Elements</b> functionality, the
index fb88fb89e26492d3ea01eb832f636f5839bcac31..d94d6f49d55f22a44c8d658cdd339a6ac17e6770 100644 (file)
@@ -11,19 +11,30 @@ with desirable tolerance, edit these groups and merge.
 <ol>
 <li>From the \b Modification choose \b Transformation and  from its
 sub-menu select the <b>Merge nodes</b> item. The following dialog box
-shall appear:
-
-\image html mergenodes.png
+shall appear:</li>
 
+\image html mergenodes_auto.png
+<br>
 <ul>
 <li>\b Name is the name of the mesh whose nodes will be merged.</li>
+<li>\b Automatic Mode or \b Manual Mode is to switch the dialog
+controls type.
 <li>\b Tolerance is a maximum distance between nodes sufficient for
-merging.
+merging, that is able in both dialog modes.</li>
+</ul>
+
+<li><b>Automatic mode:</b>
+<br>
+<ul>
+<li>In \b Automatic Mode to merge the Nodes, just input the tolerance
+value and confirm by \b Apply button.</li>
+</ul>
+</li><br>
+<li>If the \b Manual Mode is selected there are additional controls to 
+manage the nodes to be merged in more detail:
 <ul>
 <li>\b Detect button generates the list of coincident nodes for the given
 \b Tolerance.</li>
-</ul>
-</li>
 <li><b>Coincident nodes</b> is a list of groupes of nodes for
 merging. All nodes of each group will form one after the
 operation.
@@ -33,6 +44,9 @@ operation.
 viewer with pressed "Shift" key.</li>
 <li><b>Select all</b> checkbox selects all groups.</li>
 </ul>
+
+\image html mergenodes.png
+
 </li>
 <li><b>Edit selected group</b> list allows editing the selected
 group:
@@ -60,4 +74,4 @@ one.</center><br>
 <br><b>See Also</b> a sample TUI Script of a 
 \ref tui_merging_nodes "Merge Nodes" operation.  
 
-*/
\ No newline at end of file
+*/
index cf63ff5f4a8c346743cea2e952da3d6b4dc253ea..afa553f1b00fce3bced42779f65b8ee203e0651a 100644 (file)
@@ -18,6 +18,7 @@ elements of the mesh.</li>
 its elements.</li>
 <li>\subpage rotation_page "Rotate" by the indicated axis and angle
 the mesh or some of its elements.</li>
+<li>\subpage scale_page "Scale Transform" the mesh or some of its elements.</li>
 <li>Create a \subpage symmetry_page "symmetrical copy" of the mesh
 through a point or a vector of symmetry.</li>
 <li>Unite meshes by \subpage sewing_meshes_page "sewing" free borders,
@@ -36,6 +37,7 @@ or created anew.</li>
 <li>\subpage changing_orientation_of_elements_page "Change orientation"
  of the selected elements.</li>
 <li>\subpage cutting_quadrangles_page "Cut a quadrangle" into two triangles.</li>
+<li>\subpage split_to_tetra_page "Split" volumic elements into tetrahedra.</li>
 <li>\subpage smoothing_page "Smooth" elements, reducung distortions in
 them by adjusting the locations of element corners.</li>
 <li>Create an \subpage extrusion_page "extrusion" along a vector.</li>
index cf556d51bb714014f79fcf10da665796c6b22092..db4be41447b2a6335ff945fd14ba80a9bd6b818b 100644 (file)
@@ -71,7 +71,7 @@ having a mesh built on it. Mesh nodes lying on face vertices become
 key-points. Additionally, you may choose the way of getting nodes
 coordinates by <b>projecting nodes on the face</b> instead of using
 "positions on face" generated by mesher (if there is any). Faces
-having a seam edge can?t be used for automatic pattern creation.
+having a seam edge can't be used for automatic pattern creation.
 
 When creating a pattern from an existing mesh, there are two possible
 cases:
@@ -132,4 +132,4 @@ isolines.
 <br><b>See Also</b> a sample TUI Script of a 
 \ref tui_pattern_mapping "Pattern Mapping" operation.
 
-*/
\ No newline at end of file
+*/
diff --git a/doc/salome/gui/SMESH/input/point_marker.doc b/doc/salome/gui/SMESH/input/point_marker.doc
new file mode 100644 (file)
index 0000000..c298893
--- /dev/null
@@ -0,0 +1,53 @@
+/*!
+
+\page point_marker_page Point Marker
+
+\n You can change the representation of points in
+the 3D viewer either by selecting one of the predefined
+shapes or by loading a custom texture from an external file.
+
+- Standard point markers
+
+The Mesh module provides a set of predefined point marker shapes
+which can be used to display points in 3D viewer.
+Each standard point marker has two attributes: type (defines shape
+form) and scale factor (defines shape size).
+
+\image html point_marker_widget1.png
+
+<br>
+
+\image html std_point_marker.png "Mesh presentation with standard point markers"
+
+- Custom point markers
+
+It is also possible to load a point marker shape from an external file.
+This file should provide a description of the point texture as a set
+of lines; each line is represented as sequence of "0" and "1" symbols,
+where "1" symbol means an opaque pixel and "0" symbol means a
+transparent pixel. The width of the texture correspond to the length
+of the longest line in the file, expanded to the nearest byte-aligned
+value. The height of the texture is equal to the number of non-empty
+lines in the file. Note that missing symbols are replaced by "0".
+
+Here is a texture file sample:
+
+<pre>
+00111100
+00111100
+11111111
+11111111
+11111111
+11111111
+00111100
+00111100
+</pre>
+
+\image html point_marker_widget2.png
+
+<br>
+
+\image html custom_point_marker.png "Mesh presentation with custom point markers"
+
+*/
+
index 9f54f3eefae244f7ba3b5dffea4c5e44c9487473..0854941eadda5303c36ae6d8f77f85841c154200 100644 (file)
@@ -8,9 +8,16 @@ following conditions: the face must be a full circle or a part of circle
 The resulting mesh consists of triangles (near the center point) and
 quadrangles.
 
-This algorithm requires the hypothesis indicating the number
+This algorithm is optionally parametrized by the hypothesis indicating the number
 of mesh layers along the radius. The distribution of layers can be set with any 1D Hypothesis.
 
+If no own hypothesis of the algorithm is assigned, any local or global hypothesis is used 
+by the algorithm to discretize edges. Note that if the geometrical face has two radial edges,
+they must be meshed with equal number of segments.
+
+If no 1D hypothesis is assigned to an edge, "Default Number of Segments" preferences parameter
+is used to discretize the edge.
+
 \image html hypo_radquad_dlg.png
 
 \image html mesh_radquad_01.png "Radial Quadrangle 2D mesh on the top and the bottom faces of a cylinder"
index 79d27d7c1b30dd4b26e37c8498d2f27f8a75e22b..d93473edab9b2665147bbc5e2d618653a67f27d9 100644 (file)
@@ -63,7 +63,7 @@ name in the adjacent box);</li>
 
 <li>Click \b Apply or <b> Apply and Close</b> button to confirm the
 operation.</li>
-
+</ul>
 </ol>
 
 
diff --git a/doc/salome/gui/SMESH/input/scale.doc b/doc/salome/gui/SMESH/input/scale.doc
new file mode 100644 (file)
index 0000000..5b10fb5
--- /dev/null
@@ -0,0 +1,134 @@
+/*!
+
+\page scale_page Scale
+
+\n This geometrical operation allows to scale in space your mesh
+or some of its elements.
+
+<em>To scale a mesh:</em>
+
+<ol>
+<li>From the \b Modification menu choose \b Transformation -> \b Scale
+\b Transform item.
+
+One of the following dialogs will appear:
+
+With one scale factor:
+\image html scale01.png
+
+Or with different scale factors for axes:
+\image html scale02.png
+
+</li>
+
+<li>
+In the dialog:
+<ul>
+<li>specify the IDs of the translated elements:
+
+<ul>
+<li><b>Select the whole mesh, submesh or group</b> activating this
+checkbox; or</li>
+<li>choose mesh elements with the mouse in the 3D Viewer. It is
+possible to select a whole area with a mouse frame; or</li> 
+<li>input the element IDs directly in <b>ID Elements</b> field. The selected elements will be highlighted in the
+viewer; or</li>
+<li>apply Filters. <b>Set filter</b> button allows to apply a filter to the selection of elements. See more
+about filters in the \ref selection_filter_library_page "Selection filter library" page.</li>
+</ul>
+</li>
+
+<li>specify the base point for scale</li>
+
+<li>specify the scale factor</li>
+
+<li>specify the conditions of scale:
+<ul>
+<li>activate <b>Move elements</b> radio button to create  the source
+mesh (or elements) at the new location and erase it from the previous location;</li>
+<li>activate <b>Copy elements</b> radio button to create the source
+mesh (or elements) at the new location, but leave it at the previous
+location, the source mesh will be considered one and single mesh with
+the result of the scale operation;</li>
+<li>activate <b>Create as new mesh</b> radio button to leave the
+source mesh (or elements) at its previous location and create a new
+mesh at the new location, the new mesh appears in the Object Browser
+with the default name MeshName_scaled (it is possible to change this
+name in the adjacent box);</li>
+<li>activate <b> Copy groups </b> checkbox to copy the groups of elements of the source mesh to the newly created mesh.</li>
+</ul>
+</li>
+
+</li>
+
+<li>Click \b Apply or <b> Apply and Close</b> button to confirm the operation.</li>
+</ul>
+</ol>
+
+
+
+<b>Example of using:</b>
+
+1. Create quandrangle mesh 3x3 on simple planar face (200x200)
+
+\image html scaleinit01.png
+
+and union 3 face (along axis Z) to group "gr_faces"
+
+\image html scaleinit02.png
+
+
+
+2. Perform scale operation for whole mesh with creation of new mesh:
+
+\image html scale03.png
+
+result after operation:
+
+\image html scaleres03.png
+
+
+
+3. Perform scale operation for whole mesh with copy of elements:
+
+\image html scale04.png
+
+result after operation:
+
+\image html scaleres04.png
+
+
+
+4. Perform scale operation for group of faces with copy of elements:
+
+\image html scale06.png
+
+result after operation:
+
+\image html scaleres06.png
+
+
+
+5. Perform scale operation for two edges with moving of elements:
+
+\image html scale07.png
+
+result after operation:
+
+\image html scaleres07.png
+
+
+
+6. Perform scale operation for one face with moving of elements:
+
+\image html scale09.png
+
+result after operation:
+
+\image html scaleres09.png
+
+
+<br><b>See Also</b> a sample TUI Script of a \ref tui_scale "Scale" operation.  
+
+
+*/
diff --git a/doc/salome/gui/SMESH/input/split_to_tetra.doc b/doc/salome/gui/SMESH/input/split_to_tetra.doc
new file mode 100644 (file)
index 0000000..57efb37
--- /dev/null
@@ -0,0 +1,55 @@
+/*!
+
+\page split_to_tetra_page Splitting volumes into tetrahedra
+
+\n This operation allows to split volumic elements into tetrahedra. 
+2D mesh is modified accordingly.
+
+<em>To split volumes:</em>
+<ol>
+<li>Display a mesh or a submesh in the 3D viewer.</li>
+<li>In the \b Modification menu select the <b>Split into Tetrahedra</b> item or
+click <em>"Split into Tetrahedra"</em> button in the toolbar.
+
+\image html split_into_tetra_icon.png
+<center><em>"Split into Tetrahedra" button</em></center>
+
+The following dialog box will appear:
+
+\image html split_into_tetra.png
+
+\par
+<ul>
+<li>The main list contains the list of volumes. You can click on
+a volume in the 3D viewer and it will be highlighted (lock Shift
+keyboard button to select several volumes). Click \b Add button and
+the ID of this volume will be added to the list. To remove a
+selected element or elements from the list click \b Remove button. <b>Sort
+list</b> button allows to sort the list of IDs. \b Filter button allows to
+apply a definite filter to the selection of volumes.
+<br><b>Note:</b> If you split not all adjacent non-tetrahedral volumes, your mesh becomes 
+non-conform.</li>
+<li><b>Apply to all</b> radio button allows to split all
+volumes of the currently displayed mesh or submesh.</li>
+</ul>
+
+<ul>
+<li>\b Split hexahedron
+
+<ul>
+<li><b>Into 5 tetrahedra</b> and <b>Into 6 tetrahedra</b> allows to
+specify the number of tetrahedra a hexahedron will be split into. If the specified method does
+not allow to get a conform mesh, a generic solution is applied: an additional node 
+is created at gravity center of a hexahedron, serving an apex of tetrahedra, all quadrangle sides of the hexahedron are split into two triangles each serving a base of a new tetrahedron.</li>
+</ul>
+
+</li>
+
+<li><b>Select from</b> set of fields allows to choose a submesh or an
+existing group whose elements will be automatically added to the
+list.</li>
+</ul>
+
+<li>Click the \b Apply or <b>Apply and Close</b> button to confirm the operation.</li>
+</ol>
+*/
index 967fff2c147a28f30e53dd2287b2b2dd8cec0552..9daebe39ebab3453795515ff7b118e190fea3cc4 100644 (file)
@@ -5,7 +5,7 @@
 \n This geometrical operation allows to perform a symmetrical copy of
 your mesh or some of its elements.
 
-<em>To create a symmtrical copy of the mesh:</em>
+<em>To create a symmetrical copy of the mesh:</em>
 
 <ol>
 <li>From the \b Modification menu choose \b Transformation -> \b Symmetry item  or click
@@ -76,6 +76,7 @@ name in the adjacent box);</li>
 </ul>
 <li>Click \b Apply or <b> Apply and Close</b> button to confirm the
 operation.</li>
+</ul>
 
 </ol>
 
index 2f0f0743e039e4ff6d08e979d23d951cb15da9db..b5e33809419428a3925e34bcdc0eb356d90de35a 100644 (file)
@@ -65,6 +65,7 @@ name in the adjacent box);</li>
 </li>
 
 <li>Click \b Apply or <b> Apply and Close</b> button to confirm the operation.</li>
+</ul>
 </ol>
 
 <br><b>See Also</b> a sample TUI Script of a \ref tui_translation "Translation" operation.  
index 87f740e984c5d87f248b062770024bad7978224a..359ffd7d5cde75615d5bc737e3bfc7d513e0410b 100644 (file)
@@ -82,6 +82,67 @@ quadra.Compute()
 
 \endcode
 
+<br>
+<h2>Change priority of submeshes in Mesh</h2>
+
+\code
+import salome
+import geompy
+import smesh
+import SMESH
+
+Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
+[Face_1,Face_2,Face_3,Face_4,Face_5,Face_6] = geompy.SubShapeAllSorted(Box_1, geompy.ShapeType["FACE"])
+
+# create Mesh object on Box shape
+Mesh_1 = smesh.Mesh(Box_1)
+
+# assign mesh algorithms
+Regular_1D = Mesh_1.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(20)
+Nb_Segments_1.SetDistrType( 0 )
+MEFISTO_2D = Mesh_1.Triangle()
+Max_Element_Area_1 = MEFISTO_2D.MaxElementArea(1200)
+Tetrahedron_Netgen = Mesh_1.Tetrahedron(algo=smesh.NETGEN)
+Max_Element_Volume_1 = Tetrahedron_Netgen.MaxElementVolume(40000)
+
+# create submesh and assign algorithms on Face_1
+Netgen_1D_2D = Mesh_1.Triangle(algo=smesh.NETGEN,geom=Face_1)
+SubMesh_1 = Netgen_1D_2D.GetSubMesh()
+NETGEN_2D_Simple_Parameters_1 = Netgen_1D_2D.Parameters(which=smesh.SIMPLE)
+NETGEN_2D_Simple_Parameters_1.SetNumberOfSegments( 4 )
+NETGEN_2D_Simple_Parameters_1.LengthFromEdges()
+
+# create submesh and assign algorithms on Face_2
+Netgen_1D_2D_1 = Mesh_1.Triangle(algo=smesh.NETGEN,geom=Face_2)
+SubMesh_2 = Netgen_1D_2D_1.GetSubMesh()
+NETGEN_2D_Simple_Parameters_2 = Netgen_1D_2D_1.Parameters(which=smesh.SIMPLE)
+NETGEN_2D_Simple_Parameters_2.SetNumberOfSegments( 8 )
+NETGEN_2D_Simple_Parameters_2.LengthFromEdges()
+smeshObj_1 = smesh.CreateHypothesis('NETGEN_SimpleParameters_2D',
+'NETGENEngine')
+
+# create submesh and assign algorithms on Face_3
+Netgen_1D_2D_2 = Mesh_1.Triangle(algo=smesh.NETGEN,geom=Face_3)
+SubMesh_3 = Netgen_1D_2D_2.GetSubMesh()
+NETGEN_2D_Simple_Parameters_3 = Netgen_1D_2D_2.Parameters(which=smesh.SIMPLE)
+NETGEN_2D_Simple_Parameters_3.SetNumberOfSegments( 12 )
+NETGEN_2D_Simple_Parameters_3.LengthFromEdges()
+
+# check exisiting submesh priority order
+[ [ SubMesh_1, SubMesh_3, SubMesh_2 ] ] = Mesh_1.GetMeshOrder()
+# set new submesh order
+isDone = Mesh_1.SetMeshOrder( [ [ SubMesh_1, SubMesh_2, SubMesh_3 ] ])
+# compute mesh
+isDone = Mesh_1.Compute()
+
+# clear mesh result and compute with other submesh order
+Mesh_1.Clear()
+isDone = Mesh_1.SetMeshOrder( [ [ SubMesh_2, SubMesh_1, SubMesh_3 ] ])
+isDone = Mesh_1.Compute()
+
+\endcode
+
 <br>
 \anchor tui_editing_mesh
 <h2>Editing of a mesh</h2>
index 04725fdc6c56d05882d01f37cf83c644abbbc2f7..80944666e8c2967672d8975da95a844aa30b0042 100644 (file)
@@ -514,32 +514,69 @@ Mesh_1.Compute()
 \anchor tui_radial_quadrangle
 <h2> Radial Quadrangle 1D2D example </h2>
 \code
-import salome
-import geompy
-import smesh
-import StdMeshers
+from smesh import *
+
+SetCurrentStudy(salome.myStudy)
 
 # Create face from the wire and add to study
-WirePath = geompy.MakeSketcher("Sketcher:F 0 0:TT 20 0:R 90:C 20 90:WW", [0, 0, 0, 1, 0, 0, 0, 0, 1])
-Face = geompy.MakeFace(WirePath,1)
+Face = geompy.MakeSketcher("Sketcher:F 0 0:TT 20 0:R 90:C 20 90:WF", [0, 0, 0, 1, 0, 0, 0, 0, 1])
 geompy.addToStudy(Face,"Face")
+edges = geompy.SubShapeAllSorted(Face, geompy.ShapeType["EDGE"])
+circle, radius1, radius2 = edges
+geompy.addToStudyInFather(Face, radius1,"radius1")
+geompy.addToStudyInFather(Face, radius2,"radius2")
+geompy.addToStudyInFather(Face, circle,"circle")
 
-# Define geometry for mesh, and 1D parameters
+
+# Define geometry for mesh, and Radial Quadrange algorithm
 mesh = smesh.Mesh(Face)
-Wire_discretisation = mesh.Segment()
-Nb_Segments = Wire_discretisation.NumberOfSegments(5)
-Nb_Segments.SetDistrType( 0 )
+radial_Quad_algo = mesh.Quadrangle(algo=RADIAL_QUAD)
 
-# Define 2D parameters and Radial Quadrange hypothesis
-Number_of_Layers = smesh.CreateHypothesis('NumberOfLayers2D')
-Number_of_Layers.SetNumberOfLayers( 4 )
-mesh.AddHypothesis(Number_of_Layers)
-RadialQuadrangle_1D2D = smesh.CreateHypothesis('RadialQuadrangle_1D2D')
-mesh.AddHypothesis(RadialQuadrangle_1D2D)
+# The Radial Quadrange algorithm can work without any hypothesis
+# In this case it uses "Default Nb of Segments" preferences parameter to discretize edges
+mesh.Compute()
 
+# The Radial Quadrange uses global or local 1d hypotheses if no its own hypotheses assigned.
+# Define global hypotheses to discretize radial edges and a local one for circular edge
+global_Nb_Segments = mesh.Segment().NumberOfSegments(5)
+local_Nb_Segments  = mesh.Segment(circle).NumberOfSegments(10)
+mesh.Compute()
+
+# Define own parameters of Radial Quadrange algorithm
+radial_Quad_algo.NumberOfLayers( 4 )
 mesh.Compute()
 \endcode
 
+\anchor tui_quadrangle_parameters
+<h2>Quadrangle Parameters example </h2>
+\code
+import geompy
+import smesh
+import StdMeshers
+
+# Get 1/4 part from the disk face.
+Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100)
+Disk_1 = geompy.MakeDiskR(100, 1)
+Common_1 = geompy.MakeCommon(Disk_1, Box_1)
+geompy.addToStudy( Disk_1, "Disk_1" )
+geompy.addToStudy( Box_1, "Box_1" )
+geompy.addToStudy( Common_1, "Common_1" )
+
+# Set the Geometry for meshing
+Mesh_1 = smesh.Mesh(Common_1)
+
+# Create Quadrangle parameters and define the Base Vertex.
+Quadrangle_Parameters_1 = smesh.CreateHypothesis('QuadrangleParams')
+Quadrangle_Parameters_1.SetTriaVertex( 8 )
+
+# Define 1D hypothesis and cmpute the mesh
+Regular_1D = Mesh_1.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
+Nb_Segments_1.SetDistrType( 0 )
+status = Mesh_1.AddHypothesis(Quadrangle_Parameters_1)
+Quadrangle_2D = Mesh_1.Quadrangle()
+Mesh_1.Compute()
+\endcode
 
 \n Other meshing algorithms:
 
index 163afe0e49f2bae1c8cb0b404add6cbaab50b21b..1658e58c59af8e655909af89f0cb3ff62d8a3f19 100644 (file)
@@ -44,6 +44,37 @@ angle270 = 1.5 * math.pi
 mesh.Rotate([], axisXYZ, angle270, 1)  
 \endcode
 
+<br>
+\anchor tui_scale
+<h3>Scale</h3>
+
+\code
+import geompy
+Box = geompy.MakeBoxDXDYDZ(200, 200, 200)
+f = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"])
+
+import smesh,SMESH
+import StdMeshers
+Mesh1 = smesh.Mesh(f[0])
+Regular_1D = Mesh1.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(3)
+Nb_Segments_1.SetDistrType( 0 )
+Quadrangle_2D = Mesh1.Quadrangle()
+isDone = Mesh1.Compute()
+
+#Perform scale opration for whole mesh with creation of new mesh
+newMesh = Mesh1.ScaleMakeMesh(Mesh1,SMESH.PointStruct(100,100,200),[0.5,0.3,0.7],True,"ScaledMesh")
+
+#Perform scale operation for whole mesh with copy of elements
+Mesh1.Scale(Mesh1,SMESH.PointStruct(200,100,100),[0.5,0.5,0.5],True,True)
+
+#Perform scale opration for two edges with moving of elements
+Mesh1.Scale([1,2],SMESH.PointStruct(-100,100,100),[0.8,1.0,0.7],False)
+
+#Perform scale opration for one face with moving of elements
+Mesh1.Scale([21],SMESH.PointStruct(0,200,200),[0.7,0.7,0.7],False)
+\endcode
+
 <br>
 \anchor tui_symmetry
 <h3>Symmetry</h3>
@@ -319,4 +350,4 @@ mesh.Compute()
 mesh.SewSideElements([69, 70, 71, 72], [91, 92, 89, 90], 8, 38, 23, 58)
 \endcode
 
-*/
\ No newline at end of file
+*/
index 862cb302ecbb9492015fe66cc43cf4d2e819d1f3..7b2af8cb960d8d429e3a55ad68f2261ca0ba383f 100644 (file)
@@ -83,4 +83,53 @@ for i in keys:
   pass
 \endcode
 
+
+
+<br>
+\anchor tui_find_element_by_point
+<h2>Find Element by Point</h2>
+
+\code
+import geompy
+import smesh
+import SMESH
+
+# Create a geometry to mesh
+box = geompy.MakeBoxDXDYDZ(100,100,100)
+
+# Create a mesh
+mesh = Mesh(box,"Mesh")
+mesh.AutomaticHexahedralization()
+mesh.Compute()
+
+# Create a point
+x,y,z = 0, 0, 1
+
+# Find all elements (except 0D ones) located at the point
+all_elems_except_0D = mesh.FindElementsByPoint(x,y,z)
+assert( len(all_elems_except_0D) == 4)
+
+# Find nodes at the point
+nodes = mesh.FindElementsByPoint(x,y,z, SMESH.NODE )
+assert( len(nodes) == 0)
+assert( len( mesh.FindElementsByPoint(x,y,0, SMESH.NODE)) == 1)
+
+# Find an edge at the point
+edges = mesh.FindElementsByPoint(x,y,z, SMESH.EDGE )
+assert( len(edges) == 1)
+
+# Find faces at the point
+edges = mesh.FindElementsByPoint(x,y,z, SMESH.FACE )
+assert( len(edges) == 2)
+
+# Find a volume at the point
+vols = mesh.FindElementsByPoint(x,y,z, SMESH.VOLUME )
+assert( len(vols) == 1)
+
+# Find 0D elements at the point
+edges = mesh.FindElementsByPoint(x,y,z, SMESH.ELEM0D )
+assert( len(edges) == 0)
+
+\endcode
+
 */
index ee4c6dd4a7091a34aa728e96389418c84d5b92c4..207c4dda5a160cc7cf260211cb3f5bf87874f20c 100644 (file)
@@ -24,6 +24,9 @@ Object Browser, applying all recent changes. </li>
 information about the mesh.</li>
 <li>\ref mesh_element_info_anchor "Mesh Element Info" - provides basic
 information about the selected element of the mesh. </li>
+<li>\subpage find_element_by_point_page "Find Element by Point" -
+allows to find all mesh elements, to which belongs a point with the
+given coordinates.</li>
 <li>\subpage numbering_page "Numbering"  - allows to display the ID
 numbers of all meshing elements or nodes composing your mesh in the
 viewer.</li>
@@ -31,9 +34,13 @@ viewer.</li>
 Wireframe, Shading and Nodes presentation.</li>
 <li>\subpage display_entity_page "Display Entity" - allows to display
 Faces, Edges or both.</li>
+<li><b>2D Quadratic</b> - allows to select between the representation
+of quadratic edges as broken <b>lines</b> or as <b>arcs</b></li>
 <li><b>Orientation of faces</b> - shows vectors of orientation of
-faces of the selected mesh</li> 
-<li><b>Colors / Size</b> - allows to select color and size of
+faces of the selected mesh. Vector is shown for each 2D mesh element 
+and for each free face of 3D mesh element. Vector direction is calculated by 
+the first three nodes of face as a cross product of vectors n1-n2 and n1-n3.</li> 
+<li>\subpage colors_size_page "Colors / Size" - allows to select color and size of
 meshes.</li>
 <li>\subpage transparency_page "Transparency" - allows to change the
 transparency of mesh elements.</li>
@@ -43,7 +50,12 @@ presents various information about meshes.</li>
 <li><b>Hide</b> - allows to hide the selected mesh from the viewer.</li>
 <li><b>Show Only</b> -allows to display only the selected mesh, hiding all other from the viewer.</li>
 <li><b>Dump view</b> - exports an object from the viewer in bmp, png, jpg or jpeg image format.</li>
-<li><b>Change background</b> - allows to redefine the background color. By default it is black.</li>
+<li><b>Change background</b> - allows to redefine the background
+color. By default it is black.</li>
+<li><b>View Operations</b> checkbox - allows to show/hide the
+visualization toolbar in the viewer window.</li>
+<li><b>Recording Operations</b> - allows to show/hide the recording
+toolbar in the viewer window.</li>
 </ul>
 
 */
index 88e613d2392388224ab7c6ba85e7aafb73185dac..eb9f3c6a2856ba7b605729096c3cd3002d0f5bf6 100755 (executable)
@@ -1,5 +1,35 @@
-H1 { 
+body {
+   font-family: Arial, Helvetica, sans-serif;
+   background-color: #ffffff;
+}
+
+h1 { 
    text-align: center; 
+   text-decoration: none;
+   border: none;
+   line-height: 25px;
+   text-align: center;
+//   text-transform:uppercase;
+   background: #D9f4fd;
+   font-size: 12pt;
+   font-weight: bold;
+   border: 1px solid #CCCCCC;
+   -moz-border-radius: 8px;
+   -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+/*   background-color: rgb(75, 140, 185);
+   color: #ffffff;
+   text-align: center;
+   height: 25px;*/
+
+}
+
+h2 {
+   font-size: 12pt;
+   font-weight: bold;
+}
+
+table {
+   font-size: 10pt;
 }
 
 CAPTION { 
@@ -11,16 +41,6 @@ A.qindex {}
 
 A.qindexRef {}
 
-/* Link to any cross-referenced Doxygen element */
-A.el { 
-   text-decoration: none; 
-   font-weight: bold 
-}
-
-A.elRef { 
-   font-weight: bold 
-}
-
 /* Link to any cross-referenced Doxygen element inside a code section 
    (ex: header)
 */
@@ -37,7 +57,49 @@ A.codeRef {
 
 A:hover { 
    text-decoration: none; 
-   background-color: lightblue 
+   background-color: lightblue; 
+}
+
+div.contents {
+  font-family: Arial, Helvetica, sans-serif;
+  font-size: 10pt;
+}
+
+div.navpath {
+  font-size: 11pt;
+}
+
+div.version {
+   background-color:#ffffde;
+   border:1px solid #cccccc;
+   font-family: Arial, Helvetica, sans-serif;
+   font-size: 9pt;
+   text-align: center;
+   width:100px;
+   -moz-border-radius: 8px;
+//   -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+div.header {
+  background: url("head.png");
+  background-color: #175783;
+  border: 1px solid;
+  height: 80px;
+  background-repeat: no-repeat;
+  margin-bottom: 10px;
+}
+
+div.tabs {
+  display: none;
+}
+
+div.footer {
+  background-color: #D9f4fd;
+  border: 1px solid #AAAAAA;
+  font-family: Arial, Helvetica, sans-serif;
+  font-size: 11px;
+  padding: 10px;
+  margin-top: 15px;
 }
 
 DL.el { 
@@ -45,10 +107,8 @@ DL.el {
 }
 
 /* A code fragment (ex: header) */
-DIV.fragment { 
-   width: 100%; 
+div.fragment { 
    border: none; 
-   background-color: #CCCCCC 
 }
 
 /* In the alpha list (coumpound index), style of an alphabetical index letter */
@@ -94,10 +154,6 @@ DIV.groupText {
    font-size: smaller 
 }
 
-BODY { 
-   background: #FFFFFF;
-}
-
 /*div.div-page { 
   background-color: #FFFFFF; 
   margin-left: 1em;
@@ -168,3 +224,212 @@ span.comment       { color: #800000 }
 span.preprocessor  { color: #806020 }
 span.stringliteral { color: #002080 }
 span.charliteral   { color: #008080 }
+
+/* @group Code Colorization */
+
+.fragment {
+       font-family: monospace, fixed;
+       font-size: 10pt;
+}
+
+pre.fragment {
+        width: 95%;
+       border: 1px solid #CCCCCC;
+        -moz-border-radius: 8px;
+        -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+        background-color:#EEF3F5;
+       padding: 4px 6px;
+       margin: 4px 1px 4px 1px;
+}
+
+/* Top Navigation style */
+
+div.navigation {
+  margin-bottom:20px;
+}
+
+/* Left navigation panel style */
+
+body.ftvtree {
+   background-color: #D9f4fd;
+  margin: 10px;
+}
+
+div.directory {
+  margin: 0;
+}
+
+div.directory.p {
+  margin: 0;
+}
+
+h3.swap {
+   font-size: 10pt;
+   margin-bottom: 0;
+}
+
+/* Link to any cross-referenced Doxygen element */
+a.el { 
+   text-decoration: none; 
+   font-family: Arial, Helvetica, sans-serif;
+   font-weight: bold;
+   font-size: 9pt;
+   color: #551a8b;
+}
+
+a.el:hover {
+   background-color: transparent;
+}
+
+a.elRef { 
+   font-weight: normal;
+}
+
+
+#MSearchBox {
+  -moz-border-radius:8px 8px 8px 8px;
+  background-color:white;
+  border:1px solid #84B0C7;
+  margin:0;
+  padding:0;
+  white-space:nowrap;
+}
+
+div.directory img {
+  vertical-align:-30%;
+}
+
+div.directory p {
+  white-space:nowrap;
+  margin: 0;
+}
+
+div.directory-alt div {
+       display: none;
+       margin: 0px;
+}
+
+
+div.directory div {
+       display: none;
+       margin: 0px;
+}
+
+div.version {
+   background-color:#ffffde;
+   border:1px solid #cccccc;
+   font-family: Arial, Helvetica, sans-serif;
+   font-size: 9pt;
+   text-align: center;
+   width:100px;
+   -moz-border-radius: 8px;
+//   -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+/* @group Member Descriptions */
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+        background-color: #FAFAFA;
+        border: none;
+        margin: 4px;
+        padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+        padding: 0px 8px 4px 8px;
+        color: #555;
+}
+
+.memItemLeft, .memItemRight, .memTemplParams {
+        border-top: 1px solid #ccc;
+}
+
+.memItemLeft, .memTemplItemLeft {
+        white-space: nowrap;
+}
+
+.memTemplParams {
+        color: #606060;
+        white-space: nowrap;
+}
+
+/* @end */
+
+/* Styles for detailed member documentation */
+
+.memtemplate {
+        font-size: 80%;
+        color: #606060;
+        font-weight: normal;
+        margin-left: 3px;
+}
+
+.memnav {
+        background-color: #e8eef2;
+        border: 1px solid #84b0c7;
+        text-align: center;
+        margin: 2px;
+        margin-right: 15px;
+        padding: 2px;
+}
+
+.memitem {
+        padding: 0;
+        margin-bottom: 10px;
+}
+
+.memname {
+        white-space: nowrap;
+        font-weight: bold;
+}
+
+.memproto, .memdoc {
+        border: 1px solid #84b0c7;
+}
+
+.memproto {
+        padding: 0;
+        background-color: #d5e1e8;
+        font-weight: bold;
+        -webkit-border-top-left-radius: 8px;
+        -webkit-border-top-right-radius: 8px;
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+        -moz-border-radius-topleft: 8px;
+        -moz-border-radius-topright: 8px;
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+
+}
+
+
+
+.memdoc {
+        padding: 2px 5px;
+        background-color: #eef3f5;
+        border-top-width: 0;
+        -webkit-border-bottom-left-radius: 8px;
+        -webkit-border-bottom-right-radius: 8px;
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+        -moz-border-radius-bottomleft: 8px;
+        -moz-border-radius-bottomright: 8px;
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+}
+
+.paramkey {
+        text-align: right;
+}
+
+.paramtype {
+        white-space: nowrap;
+}
+
+.paramname {
+        color: #602020;
+        white-space: nowrap;
+}
+.paramname em {
+        font-style: normal;
+}
+
+/* @end */
index 6eab03cf281c95fcba87f89c33eccea18dc3e7c4..fdfb138ca8e38a888e4d933bfa8089036b7329d7 100755 (executable)
@@ -3,10 +3,11 @@
 <head>
 </head>
 <body>
-<hr style="width: 100%; height: 2px;">
+<div class="footer">
 <div style="text-align: center;">
-Copyright &copy; 2007-2008  CEA/DEN, EDF R&amp;D, OPEN CASCADE<br>
+Copyright &copy; 2007-2010  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>
 </div>
+</div>
 </body>
 </html>
diff --git a/doc/salome/gui/SMESH/static/header.html.in b/doc/salome/gui/SMESH/static/header.html.in
new file mode 100755 (executable)
index 0000000..6795e96
--- /dev/null
@@ -0,0 +1,10 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>$title</title>
+   <link href="doxygen.css" rel="stylesheet" type="text/css">
+</head>
+<div class="header"></div>
+<div align="right"><div class="version">Version: @VERSION@</div></div>
+
index b8cd5eee5a651a9200cd2e499cf9a059969d015c..7cc0f4a8f3ccc2135475ac402ebb7018859f72d2 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : Makefile.in
 #  Author : Vasily Rusyaev (Open Cascade NN)
 #  Module : doc
 #
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
-EXTRA_DIST += images static
+EXTRA_DIST += images static/doxygen.css static/footer.html
+
+tuidocdir = $(docdir)/tui/SMESH
+tuidoc_DATA = images/head.png images/smeshscreen.png
 
 dist_doc_DATA = \
        extra/AddNetgenInSalome2.pdf    \
index 787e1646448475c971a4bc87fab3e68777c50f56..0eb988674db325136cc85fca3ca960aa56fed6ee 100755 (executable)
@@ -1,4 +1,4 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -24,7 +24,7 @@
 #---------------------------------------------------------------------------
 # Project related configuration options
 #---------------------------------------------------------------------------
-PROJECT_NAME           = "Mesh Module Programming Guide v.@VERSION@"
+PROJECT_NAME           = "SALOME Mesh Module Developer"
 PROJECT_NUMBER         = 
 OUTPUT_DIRECTORY       = SMESH
 CREATE_SUBDIRS         = NO
@@ -99,8 +99,9 @@ WARN_LOGFILE           = log.txt
 INPUT                  = @top_srcdir@/src \
                         @top_srcdir@/bin \
                         @top_srcdir@/idl \
-                        @top_builddir@/bin
-FILE_PATTERNS          = *.idl *.hxx *.cxx *.h *.c *.hh *.cc @DOXYGEN_PYTHON_EXTENSION@
+                        @top_builddir@/bin \
+                        @srcdir@/input
+FILE_PATTERNS          = *.idl *.hxx *.cxx *.h *.c *.hh *.cc @DOXYGEN_PYTHON_EXTENSION@ *.doc
 RECURSIVE              = YES
 EXCLUDE                = 
 EXCLUDE_SYMLINKS       = NO
@@ -137,9 +138,9 @@ IGNORE_PREFIX          =
 GENERATE_HTML          = YES
 HTML_OUTPUT            = .
 HTML_FILE_EXTENSION    = .html
-#HTML_HEADER            = @srcdir@/static/myheader.html
-#HTML_FOOTER            = @srcdir@/static/footer.html
-#HTML_STYLESHEET        = @srcdir@/static/doxygen.css
+HTML_HEADER            = @builddir@/static/header.html
+HTML_FOOTER            = @srcdir@/static/footer.html
+HTML_STYLESHEET        = @srcdir@/static/doxygen.css
 HTML_ALIGN_MEMBERS     = YES
 GENERATE_HTMLHELP      = NO
 CHM_FILE               = 
diff --git a/doc/salome/tui/images/head.png b/doc/salome/tui/images/head.png
new file mode 100755 (executable)
index 0000000..307d9ef
Binary files /dev/null and b/doc/salome/tui/images/head.png differ
diff --git a/doc/salome/tui/images/smeshscreen.png b/doc/salome/tui/images/smeshscreen.png
new file mode 100755 (executable)
index 0000000..638870e
Binary files /dev/null and b/doc/salome/tui/images/smeshscreen.png differ
diff --git a/doc/salome/tui/input/index.doc b/doc/salome/tui/input/index.doc
new file mode 100644 (file)
index 0000000..d0ef893
--- /dev/null
@@ -0,0 +1,13 @@
+/*! \mainpage
+
+\image html smeshscreen.png
+
+To browse the \b SALOME Mesh module Developer Documentation, follow the links below or use navigation menu at the top of the page:
+<ul>
+<li> <a href="modules.html">Modules</a> - documentation of TUI functionality.</li>
+<li> <a href="namespaces.html">Name Spaces</a> - list of TUI packages and scripts.</li>
+<li> <a href="annotated.html">Data Structures</a> - list of all data structures and classes with brief descriptions.</li>
+<li> <a href="files.html">Files</a> - list of all files with brief descriptions.</li>
+</ul>
+
+*/
\ No newline at end of file
index 389449d8746fde543d6fea6e87c8bd6955370b38..ad299dd322024b8c310b38a20e42e7fb490eeca5 100755 (executable)
@@ -1,5 +1,32 @@
-H1 { 
+body {
+   font-family: Arial, Helvetica, sans-serif;
+   background-color: #ffffff;
+}
+
+h1 { 
    text-align: center; 
+   text-decoration: none;
+   border: none;
+   line-height: 25px;
+   text-align: center;
+//   text-transform:uppercase;
+   background: #D9f4fd;
+   font-size: 12pt;
+   font-weight: bold;
+   border: 1px solid #CCCCCC;
+   margin-top: 50px;
+   -moz-border-radius: 8px;
+   -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+h2 {
+   font-size: 12pt;
+   font-weight: bold;
+}
+
+table {
+   font-size: 10pt;
+   padding-left: 20px;
 }
 
 CAPTION { 
@@ -11,16 +38,6 @@ A.qindex {}
 
 A.qindexRef {}
 
-/* Link to any cross-referenced Doxygen element */
-A.el { 
-   text-decoration: none; 
-   font-weight: bold 
-}
-
-A.elRef { 
-   font-weight: bold 
-}
-
 /* Link to any cross-referenced Doxygen element inside a code section 
    (ex: header)
 */
@@ -37,7 +54,53 @@ A.codeRef {
 
 A:hover { 
    text-decoration: none; 
-   background-color: lightblue 
+   background-color: lightblue; 
+}
+
+div.contents {
+  font-family: Arial, Helvetica, sans-serif;
+  font-size: 10pt;
+  padding: 20px;
+}
+
+div.navpath {
+  font-size: 11pt;
+}
+
+div.header {
+  background: url("head.png");
+  background-color: #175783;
+  border: 1px solid;
+  height: 80px;
+  background-repeat: no-repeat;
+  margin-bottom:20px;
+}
+
+div.tabs { 
+  text-align: justify; 
+  margin-left    : 2px;         
+  margin-right   : 2px;  
+  margin-top     : 2px; 
+  margin-bottom  : 2px
+  font-weight: bold;
+  color: #FFFFFF;
+}
+
+div.footer {
+  background-color: #D9f4fd;
+  border: 1px solid #AAAAAA;
+  font-family: Arial, Helvetica, sans-serif;
+  font-size: 11px;
+  padding: 10px;
+}
+
+div.div-footer {
+  background-color: #D9f4fd;
+  border: 1px solid #AAAAAA;
+  font-family: Arial, Helvetica, sans-serif;
+  font-size: 11px;
+  padding: 10px;
+  text-align: center;
 }
 
 DL.el { 
@@ -45,10 +108,8 @@ DL.el {
 }
 
 /* A code fragment (ex: header) */
-DIV.fragment { 
-   width: 100%; 
+div.fragment { 
    border: none; 
-   background-color: #CCCCCC 
 }
 
 /* In the alpha list (coumpound index), style of an alphabetical index letter */
@@ -94,10 +155,6 @@ DIV.groupText {
    font-size: smaller 
 }
 
-BODY { 
-   background: #FFFFFF;
-}
-
 /*div.div-page { 
   background-color: #FFFFFF; 
   margin-left: 1em;
@@ -115,17 +172,19 @@ BODY {
   border-color: #0D299A; 
 }*/
 
-DIV.div-footer { 
-  margin-left: 1em;
-  margin-right: 1em;
-  margin-bottom: 0.2em;
-  text-align: right;
-  font-size: 9pt; 
+div.tabs { 
+  text-align: justify; 
+  margin-left    : 2px;         
+  margin-right   : 2px;  
+  margin-top     : 2px; 
+  margin-bottom  : 2px
+  font-weight: bold;
+  color: #FFFFFF;
 }
 
 /* In File List, Coumpound List, etc, 1st column of the index */
 TD.indexkey { 
-   background-color: #CCCCCC
+   background-color: #DDDDEE
    font-weight: bold; 
    padding-right  : 10px; 
    padding-top    : 2px; 
@@ -139,7 +198,7 @@ TD.indexkey {
 
 /* In File List, Coumpound List, etc, 2nd column of the index */
 TD.indexvalue { 
-   background-color: #CCCCCC
+   background-color: #EEEEFF
    font-style: italic; 
    padding-right  : 10px; 
    padding-top    : 2px; 
@@ -158,3 +217,227 @@ span.comment       { color: #800000 }
 span.preprocessor  { color: #806020 }
 span.stringliteral { color: #002080 }
 span.charliteral   { color: #008080 }
+
+/* @group Code Colorization */
+
+.fragment {
+       font-family: monospace, fixed;
+       font-size: 10pt;
+}
+
+pre.fragment {
+        width: 95%;
+       border: 1px solid #CCCCCC;
+        -moz-border-radius: 8px;
+        -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+        background-color:#EEF3F5;
+       padding: 4px 6px;
+       margin: 20px;
+}
+
+/* Top Navigation style */
+
+div.navigation {
+  margin-bottom:20px;
+}
+
+/* Left navigation panel style */
+
+body.ftvtree {
+   background-color: #D9f4fd;
+  margin: 10px;
+}
+
+div.directory {
+  margin: 0;
+}
+
+div.directory.p {
+  margin: 0;
+}
+
+h3.swap {
+   font-size: 10pt;
+   margin-bottom: 0;
+}
+
+/* Link to any cross-referenced Doxygen element */
+a.el { 
+   text-decoration: none; 
+   font-family: Arial, Helvetica, sans-serif;
+   font-weight: bold;
+   font-size: 10pt;
+   color: #551a8b;
+}
+
+a.el:hover {
+   background-color: transparent;
+   color: #551acc;
+}
+
+a { 
+// text-decoration: none; 
+   font-family: Arial, Helvetica, sans-serif;
+   font-weight: bold;
+   font-size: 10pt;
+   color: #551a8b;
+}
+
+a:hover {
+   background-color: transparent;
+   color: #551acc;
+}
+
+a.elRef { 
+   font-weight: normal;
+}
+
+
+#MSearchBox {
+  -moz-border-radius:8px 8px 8px 8px;
+  background-color:white;
+  border:1px solid #84B0C7;
+  margin:0;
+  padding:0;
+  white-space:nowrap;
+}
+
+div.directory img {
+  vertical-align:-30%;
+}
+
+div.directory p {
+  white-space:nowrap;
+  margin: 0;
+}
+
+div.directory-alt div {
+       display: none;
+       margin: 0px;
+}
+
+
+div.directory div {
+       display: none;
+       margin: 0px;
+}
+
+div.version {
+   background-color:#ffffde;
+   border:1px solid #cccccc;
+   font-family: Arial, Helvetica, sans-serif;
+   font-size: 9pt;
+   text-align: center;
+   width:100px;
+   -moz-border-radius: 8px;
+ //   -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+
+/* @group Member Descriptions */
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+        background-color: #FAFAFA;
+        border: none;
+        margin: 4px;
+        padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+        padding: 0px 8px 4px 8px;
+        color: #555;
+}
+
+.memItemLeft, .memItemRight, .memTemplParams {
+        border-top: 1px solid #ccc;
+}
+
+.memItemLeft, .memTemplItemLeft {
+        white-space: nowrap;
+}
+
+.memTemplParams {
+        color: #606060;
+        white-space: nowrap;
+}
+
+/* @end */
+
+/* Styles for detailed member documentation */
+
+.memtemplate {
+        font-size: 80%;
+        color: #606060;
+        font-weight: normal;
+        margin-left: 3px;
+}
+
+.memnav {
+        background-color: #e8eef2;
+        border: 1px solid #84b0c7;
+        text-align: center;
+        margin: 2px;
+        margin-right: 15px;
+        padding: 2px;
+}
+
+.memitem {
+        padding: 0;
+        margin-bottom: 10px;
+}
+
+.memname {
+        white-space: nowrap;
+        font-weight: bold;
+}
+
+.memproto, .memdoc {
+        border: 1px solid #84b0c7;
+}
+
+.memproto {
+        padding: 0;
+        background-color: #d5e1e8;
+        font-weight: bold;
+        -webkit-border-top-left-radius: 8px;
+        -webkit-border-top-right-radius: 8px;
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+        -moz-border-radius-topleft: 8px;
+        -moz-border-radius-topright: 8px;
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+
+}
+
+
+
+.memdoc {
+        padding: 2px 5px;
+        background-color: #eef3f5;
+        border-top-width: 0;
+        -webkit-border-bottom-left-radius: 8px;
+        -webkit-border-bottom-right-radius: 8px;
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+        -moz-border-radius-bottomleft: 8px;
+        -moz-border-radius-bottomright: 8px;
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+}
+
+.paramkey {
+        text-align: right;
+}
+
+.paramtype {
+        white-space: nowrap;
+}
+
+.paramname {
+        color: #602020;
+        white-space: nowrap;
+}
+.paramname em {
+        font-style: normal;
+}
+
+/* @end */
index cb55f397acf510370ed145be8d3c5d7cb09d4f43..53f5a62fe84f53ed864cff9c2136ee5bc79b9087 100755 (executable)
@@ -1,5 +1,14 @@
-</DIV>
-<DIV class="div-footer">
-Generated on $datetime for $projectname by&nbsp;<A href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></A> $doxygenversion</DIV>
-</BODY>
-</HTML>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+</head>
+<body>
+<div class="footer">
+<!--hr style="width: 100%; height: 2px;"-->
+<div style="text-align: center;">
+Copyright &copy; 2007-2010  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>
+</div>
+</div>
+</body>
+</html>
diff --git a/doc/salome/tui/static/header.html.in b/doc/salome/tui/static/header.html.in
new file mode 100755 (executable)
index 0000000..791a37c
--- /dev/null
@@ -0,0 +1,14 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
+   <title>$title</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head>
+<body>
+<div class="header"></div>
+<div align="right"><div class="version">Version: @VERSION@</div></div>
+</body>
+</html>
index 03486bd078c5826f0c33e3afb18cb3b8e58909d2..5a88808b30e51f8c05385801643e8174ae7f700e 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # This Makefile is responsible of generating the client and server
 # implementation of IDL interfaces for both C++ and python usage.
 # The building process of the C++ files is in charge of each source
index 59b3a8a2cf5693d7c8ef51e70d3ac9318a939c9c..871f077148b64e3e20c525831e1d355969c724d8 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_BasicHypothesis.idl
 //  Author : Paul RASCLE, EDF
 //
index 83c1d43d21136b9d98efee561c8e8f64597fcd0a..56f2cdce21ae47d30ac08f6cbfa82da0b6b7f265 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_Filter.idl
 //  Author : Alexey Petrov, OCC
 //
index 9173c3f86dd382bb15a999987e0e8ae954e01126..14527a9b3b9244878734696a72c970429cf9416a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_Gen.idl
 //  Author : Paul RASCLE, EDF
-
+//
 #ifndef _SMESH_GEN_IDL_
 #define _SMESH_GEN_IDL_
 
@@ -339,6 +340,16 @@ module SMESH
      * Can be used to check if the object was created in the same container, as this engine.
      */
     long GetObjectId(in Object theObject);
+
+    /*!
+     * \brief Get MED version of the file by its name.
+     */
+    boolean GetMEDVersion(in string theFileName, out MED_VERSION theVersion);
+
+    /*!
+     * \brief Get names of meshes defined in file with the specified name.
+     */
+    string_array GetMeshNames(in string theFileName);
   };
 
 };
index aa9cee1252b48e8f90d82f2e8083e9417de7effd..c0bb54bc9ab15cb2429fc1a4167c5be9fcf3a2ab 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_Group.idl
 //  Author : Sergey ANIKIN, OCC
 //  $Header$
index 56ae48b0cfed28db8767c589560f11ab2949c2ba..443f7e75a66e08d385e0782211eb8e23964c58d2 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_Hypothesis.idl
 //  Author : Paul RASCLE, EDF
 //  $Header$
index 8a5c37daa91e4dd4348f67488e87d4b30da0e87c..4f5639fb1c632874f0bdff22b016511156f8f5c9 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_Mesh.idl
 //  Author : Paul RASCLE, EDF
 //
-
 #ifndef _SMESH_MESH_IDL_
 #define _SMESH_MESH_IDL_
 
@@ -263,6 +263,10 @@ module SMESH
   interface SMESH_GroupOnGeom;
   interface SMESH_subMesh;
   interface SMESH_MeshEditor;
+
+  typedef sequence<SMESH_subMesh>     submesh_array;
+  typedef sequence<submesh_array>     submesh_array_array;
+
   interface SMESH_Mesh : SALOME::GenericObj, SMESH_IDSource
   {
     /*!
@@ -528,13 +532,23 @@ module SMESH
      *   the groups Group_On_All_Nodes, Group_On_All_Faces, ... ;
      *   the typical use is auto_groups=false.
      * - theVersion : define the version of format of MED file, that will be created
+     * - overwrite : boolean parameter for overwriting/not overwriting the file, if it exists
+     */
+    void ExportToMEDX( in string file, in boolean auto_groups, in MED_VERSION theVersion, in boolean overwrite )
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+     * Export Mesh to different MED Formats
+     * Works, just the same as ExportToMEDX, with overwrite parameter equal to true.
+     * The method is kept in order to support old functionality
      */
     void ExportToMED( in string file, in boolean auto_groups, in MED_VERSION theVersion )
       raises (SALOME::SALOME_Exception);
 
     /*!
      * Export Mesh to MED_V2_1 MED format
-     * Works, just the same as ExportToMED, with MED_VERSION parameter equal to MED_V2_1.
+     * Works, just the same as ExportToMEDX with MED_VERSION parameter equal to MED_V2_1
+     * and overwrite parameter equal to true
      * The method is kept in order to support old functionality
      */
     void ExportMED( in string file, in boolean auto_groups )
@@ -652,6 +666,9 @@ module SMESH
     ElementType GetElementType( in long id, in boolean iselem )
       raises (SALOME::SALOME_Exception);
 
+    EntityType GetElementGeomType( in long id )
+      raises (SALOME::SALOME_Exception);
+
     long_array GetSubMeshElementsId(in long ShapeID)
       raises (SALOME::SALOME_Exception);
 
@@ -661,6 +678,22 @@ module SMESH
     ElementType GetSubMeshElementType(in long ShapeID)
       raises (SALOME::SALOME_Exception);
 
+
+    /*!
+     * Methods to set meshing order of submeshes
+     */
+
+    /*!
+     * \brief Return submesh objects list in meshing order
+     */
+    submesh_array_array GetMeshOrder();
+
+    /*!
+     * \brief Set submesh object order
+     */
+    boolean SetMeshOrder(in submesh_array_array theSubMeshArray);
+
+
     /*!
      * Get mesh description
      */
@@ -741,6 +774,16 @@ module SMESH
      */
     long ElemNbFaces(in long id);
 
+    /*!
+     * Returns nodes of given face (counted from zero) for given volumic element.
+     */
+    long_array GetElemFaceNodes(in long elemId, in short faceIndex);
+
+    /*!
+     * Returns an element based on all given nodes.
+     */
+    long FindElementByNodes(in long_array nodes);
+
     /*!
      * Returns true if given element is polygon
      */
index 62623567a5dbede64566b3cb6e3c47ba47870377..983b2f4865e36448eeb5b3546ed76dbe88b257ee 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,9 +19,9 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_MeshEditor.idl
 //
-
 #ifndef _SMESH_MESHEDITOR_IDL_
 #define _SMESH_MESHEDITOR_IDL_
 
@@ -35,6 +35,11 @@ module SMESH
   interface NumericalFunctor;
   interface SMESH_MeshEditor
   {
+    /*!
+     * \brief Wrap a sequence of ids in a SMESH_IDSource
+     */
+    SMESH_IDSource MakeIDSource(in long_array IDsOfElements);
+
     boolean RemoveElements(in long_array IDsOfElements);
 
     boolean RemoveNodes(in long_array IDsOfNodes);
@@ -211,6 +216,17 @@ module SMESH
     long BestSplit (in long             IDOfQuad,
                    in NumericalFunctor Criterion);
 
+    /*!
+     * \brief Split volumic elements into tetrahedrons
+     *  \param elems - elements to split
+     *  \param methodFlags - flags passing splitting method:
+     *         1 - split the hexahedron into 5 tetrahedrons
+     *         2 - split the hexahedron into 6 tetrahedrons
+     */
+    void SplitVolumesIntoTetra(in SMESH_IDSource elems, in short methodFlags)
+      raises (SALOME::SALOME_Exception);
+
+
     enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
 
     boolean Smooth(in long_array    IDsOfElements,
@@ -554,6 +570,19 @@ module SMESH
                                         in boolean        CopyGroups,
                                         in string         MeshName);
 
+    void Scale (in SMESH_IDSource theObject,
+                in PointStruct    thePoint,
+                in double_array   theScaleFact,
+                in boolean        Copy);
+    ListOfGroups ScaleMakeGroups (in SMESH_IDSource theObject,
+                                  in PointStruct    thePoint,
+                                  in double_array   theScaleFact);
+    SMESH_Mesh ScaleMakeMesh (in SMESH_IDSource theObject,
+                              in PointStruct    thePoint,
+                              in double_array   theScaleFact,
+                              in boolean        CopyGroups,
+                              in string         MeshName);
+
     void Rotate (in long_array IDsOfElements,
                  in AxisStruct Axis,
                  in double     AngleInRadians,
@@ -626,6 +655,12 @@ module SMESH
      */
     long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type);
 
+    /*!
+     * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
+     * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
+     */
+    short GetPointState(in double x, in double y, in double z);
+
     enum Sew_Error {
       SEW_OK,
       SEW_BORDER1_NOT_FOUND,
index 4f0bcfaa6e44994c383cd063eac85874c7d87eae..c00ab3a0754ea444b207d69e0bfbc5163da0e6fb 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File    : SMESH_Pattern.idl
 // Created : Mon Aug  2 10:48:36 2004
 // Author  : Edward AGAPOV (eap)
index 3fb97d2ae91521f311c90b9aa5d283e72b7b810a..ca671b982ccd2d82e5185df74b82125ee4651b50 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # -* Makefile *- 
 # Author : Patrick GOLDBRONN (CEA)
 # Date : 28/06/2001
@@ -55,6 +53,7 @@ dist_salomeres_DATA = \
        mesh_init.png \
        mesh_length.png \
        mesh_length_2d.png \
+       mesh_find_elem_by_point.png \
        mesh_free_edges.png \
        mesh_free_edges_2d.png \
        mesh_free_nodes.png \
@@ -166,7 +165,10 @@ dist_salomeres_DATA = \
        mesh_extractGroup.png \
        mesh_precompute.png \
        mesh_2d_from_3d.png \
-        mesh_free_faces.png
+        mesh_free_faces.png \
+        scale.png \
+        scale_along_axes.png \
+       split_into_tetra.png
 
 # VSR: little trick to avoid putting if SMESHCatalog.xml to the distribution archive
 nodist_salomeres_SCRIPTS = SMESHCatalog.xml
index 200d232973684bf574d7a256f6622c72b6dea3bb..5a5a8887912bc286bd7a40de3cc00b70c8b0c752 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='us-ascii' ?>
 <!--
-  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+  Copyright (C) 2007-2010  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
@@ -32,7 +32,7 @@
 </path-prefix-list>
 
 <type-list>
-  <objref name="SMESH_Mesh" id="IDL:Mesh/SMESH_Mesh:1.0"/>
+  <objref name="SMESH_Mesh" id="IDL:SMESH/SMESH_Mesh:1.0"/>
   <objref name="SMESH_Hypothesis" id="IDL:SMESH/SMESH_Hypothesis:1.0"/>
 </type-list>
 
index 3dba06efdbf6e71930d94edd9f08bb02ee063b4d..173cbd07773011ebe603184ae933f598560d99ca 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+  Copyright (C) 2007-2010  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
@@ -33,7 +33,8 @@
     <parameter name="backface_color"               value="0, 0,   255"/>
     <parameter name="elem0d_color"                 value="0, 255,   0"/>
     <parameter name="highlight_color"              value="0, 255, 255"/>
-    <parameter name="node_size"                    value="3" />
+    <parameter name="type_of_marker"               value="1"  />
+    <parameter name="marker_scale"                 value="9"  />
     <parameter name="elem0d_size"                  value="5" />
     <parameter name="element_width"                value="1" />
     <parameter name="shrink_coeff"                 value="75"/>
     <parameter name="nb_segments_per_edge"         value="15"/>
     <parameter name="quadratic_mode"               value="0"/>
     <parameter name="max_angle"                    value="2"/>
+    <parameter name="documentation"                value="smesh_help"/>
+    <!-- Input field precisions -->
+    <parameter name="def_precision"                value="3"  />
+    <parameter name="length_precision"             value="-6"  />
+    <parameter name="angle_precision"              value="-3"  />
+    <parameter name="len_tol_precision"            value="-7"  />
+    <parameter name="parametric_precision"         value="-6"  />
+    <parameter name="area_precision"               value="-6"  />
+    <parameter name="vol_precision"                value="-6"  />
+  </section>
+  <section name="smesh_help" >
+    <parameter name="sub_menu"          value="%1 module"/>
+    <parameter name="User's Guide"      value="${SMESH_ROOT_DIR}/share/doc/salome/gui/SMESH/index.html"/>
+    <parameter name="Developer's Guide" value="${SMESH_ROOT_DIR}/share/doc/salome/tui/SMESH/index.html"/>
   </section>
   <section name="resources">
     <!-- Module resources -->
index d6083f4b062ba8c34cd57e629ae7fb32c98fa4f5..d267ef1f679c0e5ecf66632ce1302b78722a64ac 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='us-ascii'?>
 <!DOCTYPE meshers PUBLIC "" "desktop.dtd">
 <!--
-  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+  Copyright (C) 2007-2010  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
                label-id="Hexahedron (i,j,k)"
                icon-id="mesh_algo_hexa.png"
                input="QUAD"
+              need-geom="false"
                dim="3"/>
 
     <algorithm type="Projection_1D"
diff --git a/resources/mesh_find_elem_by_point.png b/resources/mesh_find_elem_by_point.png
new file mode 100644 (file)
index 0000000..d4d1784
Binary files /dev/null and b/resources/mesh_find_elem_by_point.png differ
diff --git a/resources/scale.png b/resources/scale.png
new file mode 100644 (file)
index 0000000..d838d9f
Binary files /dev/null and b/resources/scale.png differ
diff --git a/resources/scale_along_axes.png b/resources/scale_along_axes.png
new file mode 100644 (file)
index 0000000..04a4ae0
Binary files /dev/null and b/resources/scale_along_axes.png differ
diff --git a/resources/split_into_tetra.png b/resources/split_into_tetra.png
new file mode 100644 (file)
index 0000000..b113c30
Binary files /dev/null and b/resources/split_into_tetra.png differ
index 05d06b465aabe7c48bd4b93315091c462cd7cef5..57e9551ce45480153ad3dbcf69a167ddca7155dd 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : Makefile.in
 #  Author : Patrick GOLDBRONN (CEA)
 #  Modified by : Alexander BORODIN (OCN) - autotools usage
index e12427015a0b244aee2099ac659aef5815ade6c4..a2ad1e688b99431c243efa3ab607e2a831ccae09 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "SMESH_ControlsDef.hxx"
 
 int main(int argc, char** argv)
index 996cb7604fde9419882e66a14568dd06ccf2ac9c..6116315ba2024b73c981489b25fde749f338d882 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "SMESH_ControlsDef.hxx"
 
 #include <set>
index 3bab160252de98f4acd8b77cc35877b08bc930fd..7a90f1f3459130a06d6d90fd92e5792441060db2 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _SMESH_CONTROLS_HXX_
 #define _SMESH_CONTROLS_HXX_
 
index 4f81bbd72f8ea2882d7f962d66e2507af501d8c1..5849c1f83647b8c058fc40d28d9fa41b50dd6844 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _SMESH_CONTROLSDEF_HXX_
 #define _SMESH_CONTROLSDEF_HXX_
 
index 77b99b8bbc2e84ab50272a4307f400e5cc528b41..de95863ddba09ce0c832def4ce3f287fb7dca4a5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "Driver_Document.h"
 
 Driver_Document::Driver_Document():
index d8779719d6405ec3ae31ff72c30396e30d786c2f..d31cc9695dc80bc1416ffc972799b960c8f067a8 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVER_DOCUMENT
 #define _INCLUDE_DRIVER_DOCUMENT
 
index 0f4b51a85072b1ffe690bff6d5eac332793a50ab..712c120f09131dedebf0d5d1ccdb3669c2942ef4 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,7 +19,8 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  SMESH Driver : implementaion of driver for reading and writing     
+
+//  SMESH Driver : implementaion of driver for reading and writing      
 //  File   : Mesh_Reader.cxx
 //  Module : SMESH
 //
index 94d03ad5eb5b187cbbb27245db64431e0a7b38f3..fcde9a63ace3c73998a1ac0bb9d0ed8aea78cb51 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH Driver : implementaion of driver for reading and writing  
 //  File   : Mesh_Reader.h
 //  Module : SMESH
index b723c5c7b8cbb8ace9870e49e174ebd78b43c256..ea99ad56f0e3a7c58476f89356402491a99124a2 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "Driver_SMDS_Mesh.h"
 
 using namespace std;
index 6391a009b99488264dd67d179c92825cb3d88493..ffa39173ba2fcdb53f1d8aae3e12c74b623412dc 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVER_SMDS_MESH
 #define _INCLUDE_DRIVER_SMDS_MESH
 
index bb0b75de49008f6d5668ca40f6c5be5704adaadc..09cbe2c8530e7331f1eb72cf9586e6fae9bba0c1 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "Driver_SMESHDS_Mesh.h"
 
 using namespace std;
index 4ea15e0ad12a5577e168f66834f3ae4ac302aec0..fffdfd399e81565c5f1c007f1a6f91e05fa61884 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVER_SMESHDS_MESH
 #define _INCLUDE_DRIVER_SMESHDS_MESH
 
index 70b7a2bc03ca096acb915889bd62742a3e46e3d5..c61e4c44977f3578935911aae5a2466694e0d184 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH Driver : implementaion of driver for reading and writing      
 #  File   : Makefile.in
 #  Author : Marc Tajchman (CEA)
index 799dff4620b6bda24ab64a98b8605cae01395855..e9ec35e93f6e3663e27a8a6e5e473183da1c04f2 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "DriverDAT_R_SMDS_Mesh.h"
 #include "DriverDAT_W_SMDS_Mesh.h"
 
index bb35dd4796ee4eef5bdf5e606e6adbc262bd32de..13a318479249b161091b21dfe866d5fa8a3aa28b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include <stdio.h>
 
 #include "DriverDAT_R_SMDS_Mesh.h"
@@ -102,58 +103,58 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
       ValDegre = 3;
       nbNoeuds = 2;
       ok = myMesh->AddEdgeWithID(NoeudsMaille[0], NoeudsMaille[1], 
-                                intNumMaille);
+                                 intNumMaille);
       break;
     case 204:
     case 208:
       ValDegre = 9;
       nbNoeuds = 4;
       ok = myMesh->AddFaceWithID(NoeudsMaille[0], NoeudsMaille[1],
-                                NoeudsMaille[2], NoeudsMaille[3], 
-                                intNumMaille);
+                                 NoeudsMaille[2], NoeudsMaille[3], 
+                                 intNumMaille);
       break;
     case 203:
     case 206:
       ValDegre = 5;
       nbNoeuds = 3;
       ok = myMesh->AddFaceWithID(NoeudsMaille[0], NoeudsMaille[1],
-                                NoeudsMaille[2], intNumMaille);
+                                 NoeudsMaille[2], intNumMaille);
       break;
     case 308:
     case 320:
       ValDegre = 12;
       nbNoeuds = 8;
       if (ValElement == 320){
-       //A voir, correspondance VTK
-       NoeudsMaille[4] = NoeudsMaille[8];
-       NoeudsMaille[5] = NoeudsMaille[9];
-       NoeudsMaille[6] = NoeudsMaille[10];
-       NoeudsMaille[7] = NoeudsMaille[11];
+        //A voir, correspondance VTK
+        NoeudsMaille[4] = NoeudsMaille[8];
+        NoeudsMaille[5] = NoeudsMaille[9];
+        NoeudsMaille[6] = NoeudsMaille[10];
+        NoeudsMaille[7] = NoeudsMaille[11];
       }
       ok = myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1],
-                                  NoeudsMaille[2], NoeudsMaille[3], 
-                                  NoeudsMaille[4], NoeudsMaille[5], 
-                                  NoeudsMaille[6], NoeudsMaille[7],
-                                  intNumMaille);
+                                   NoeudsMaille[2], NoeudsMaille[3], 
+                                   NoeudsMaille[4], NoeudsMaille[5], 
+                                   NoeudsMaille[6], NoeudsMaille[7],
+                                   intNumMaille);
       break;
     case 304:
     case 310:
       ValDegre = 10;
       nbNoeuds = 4;
       if (ValElement == 310)
-       NoeudsMaille[3] = NoeudsMaille[6];
+        NoeudsMaille[3] = NoeudsMaille[6];
       ok = myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1],
-                                  NoeudsMaille[2], NoeudsMaille[3], 
-                                  intNumMaille);
+                                   NoeudsMaille[2], NoeudsMaille[3], 
+                                   intNumMaille);
       break;
     case 306:
     case 315:
       ValDegre = 12;
       nbNoeuds = 8;
       if (ValElement == 315) {
-       NoeudsMaille[3] = NoeudsMaille[6];
-       NoeudsMaille[4] = NoeudsMaille[7];
-       NoeudsMaille[5] = NoeudsMaille[8];
+        NoeudsMaille[3] = NoeudsMaille[6];
+        NoeudsMaille[4] = NoeudsMaille[7];
+        NoeudsMaille[5] = NoeudsMaille[8];
       }
       NoeudsMaille[7] = NoeudsMaille[5];
       NoeudsMaille[6] = NoeudsMaille[5];
@@ -161,10 +162,10 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
       NoeudsMaille[4] = NoeudsMaille[3];
       NoeudsMaille[3] = NoeudsMaille[2];
       ok = myMesh->AddVolumeWithID(NoeudsMaille[0], NoeudsMaille[1],
-                                  NoeudsMaille[2], NoeudsMaille[3], 
-                                  NoeudsMaille[4], NoeudsMaille[5], 
-                                  intNumMaille);
-                               break;
+                                   NoeudsMaille[2], NoeudsMaille[3], 
+                                   NoeudsMaille[4], NoeudsMaille[5], 
+                                   intNumMaille);
+                                break;
     }
   }
   /****************************************************************************
index 1918963fb838f7fcfdabd9f97cb2667f18c30aac..af319c6f3b02a759e011d72a7be8bf9a2ac51722 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVERDAT_R_SMDS_MESH
 #define _INCLUDE_DRIVERDAT_R_SMDS_MESH
 
index 6418e4ce65cabc136fbe2df52e64a1957cbb75ff..07820a3f85e2d581c2b1aa8f77e9dd3297d86fab 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,4 +19,5 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "DriverDAT_R_SMESHDS_Document.h"
index 7a6bd7e3baf2b938d198e5ff6bb05cadcb5fd855..1536602b86280104f3f6d1df58a6ed064ec3c847 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVERDAT_R_SMESHDS_DOCUMENT
 #define _INCLUDE_DRIVERDAT_R_SMESHDS_DOCUMENT
 
index 5a7f445e64e49f7ac117cc404fc91d0928920e6b..fa2fad7cb482d6f9a1866636b26918304117c9ef 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,4 +19,5 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "DriverDAT_R_SMESHDS_Mesh.h"
index 5229e7f88a15582820e7c9cd6b39147013200088..2a413538e994b90c05f931b8776c5891f816c77b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVERDAT_R_SMESHDS_MESH
 #define _INCLUDE_DRIVERDAT_R_SMESHDS_MESH
 
index 54741eac3c85d886d93bb34a484b3efbf7335ae4..87bf155e3f7a4a070f2daff8c72be275c0ed4802 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include <stdio.h>
 
 #include "DriverDAT_W_SMDS_Mesh.h"
@@ -77,11 +78,11 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
   fprintf(stdout, "(************************)\n");
   
   SMDS_NodeIteratorPtr itNodes=myMesh->nodesIterator();
-  while(itNodes->more()){              
+  while(itNodes->more()){               
     const SMDS_MeshNode * node = itNodes->next();
     fprintf(aFileId, "%d %e %e %e\n", node->GetID(), node->X(), node->Y(), node->Z());
   }
-       
+        
   /****************************************************************************
    *                       ECRITURE DES ELEMENTS                                *
    ****************************************************************************/
index 9afbefc8fd871c0697371d22ceb7d0db3f4a46b3..ecc06eae12f493481e362cfbf850aed77f471364 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH DriverDAT : driver to read and write 'dat' files
 //  File   : DriverDAT_W_SMDS_Mesh.h
 //  Module : SMESH
index c6555a8f8b366d2167e196e70e00eec6c66b88ef..27b86087c3abf79d8d494ed83310c0a94839b033 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,4 +19,5 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "DriverDAT_W_SMESHDS_Document.h"
index 09bb0c88971e9f97efc8222bec89b588a37767bc..12ab3e362c8baf71b02646219e2d3b0765c1a250 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVERDAT_W_SMESHDS_DOCUMENT
 #define _INCLUDE_DRIVERDAT_W_SMESHDS_DOCUMENT
 
index bbef0270490a79a3c06107eff0d67ed786adc82e..2faacef7791e03e3530bf4c45bcbdabdb38d8b87 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,4 +19,5 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "DriverDAT_W_SMESHDS_Mesh.h"
index dffea1b93b79e226a2dc78bed68d07a2df2bd00c..d382ef25c27fb30f384b8cf2fc9747d32ba8f38f 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH DriverDAT : driver to read and write 'dat' files
 //  File   : DriverDAT_W_SMESHDS_Mesh.h
 //  Module : SMESH
index 2a4dead050857d35682b4c8893acf71c260e5b1a..4d701ec2deb4c1e0464684b440e3b74307509976 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH DriverDAT : driver to read and write 'dat' files
 #  File   : Makefile.in
 #  Author : Marc Tajchman (CEA)
index 182fd11221bafdc45471bb9e0d1a91201a088a93..42d1ac26979ca5fb12c7787b7b3afa29699f2724 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_DriverDAT.hxx
 //  Author : Alexander A. BORODIN
 //  Module : SMESH
index ca31e7b9c4f8d37afd02eac921416426e539bf46..0f0f5709f16081b703d189d197962b372de27705 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH DriverMED : tool to split groups on families
 //  File   : DriverMED_Family.cxx
 //  Author : Julia DOROVSKIKH
index ccc042b96e504799e45ccf33da2cfce24558b658..8110e56de4a240950af37563736476164322a624 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH DriverMED : tool to split groups on families
 //  File   : DriverMED_Family.hxx
 //  Author : Julia DOROVSKIKH
index baf81edb924aca4f855dac88dfefeb790dbc3f29..dbf7987727847cba10195b98a86667b43f214133 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,4 +19,5 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "DriverMED_R_SMDS_Mesh.h"
index e7373c35485d6fd8ba55153eeb8f138d87f39d81..0492502eb9fd49b2971b14557752418ff5335743 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVERMED_R_SMDS_MESH
 #define _INCLUDE_DRIVERMED_R_SMDS_MESH
 
index 0c97edee83a0578c7a2713bcb113685616d4445f..89d83a8a637e10e0aa7ea8621a556f1a9d3fdb53 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,4 +19,5 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "DriverMED_R_SMESHDS_Document.h"
index 640ea673670724fb14cb33d88e18841411a097fe..082457b187107c3b4e7e71c635a3b06e30389f72 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVERMED_R_SMESHDS_DOCUMENT
 #define _INCLUDE_DRIVERMED_R_SMESHDS_DOCUMENT
 
index af538f52f454eea091667a0eb98e2c2538520d2b..5b425f212c6981eaf66fcbc50876f758a53aa834 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH DriverMED : driver to read and write 'med' files
 //  File   : DriverMED_R_SMESHDS_Mesh.cxx
 //  Module : SMESH
index 3f63ff4852941c1e85dceda0c532fe9a3ea0a9a9..69711b9f3c94094ca1b520e25093b39d770a2d9d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH DriverMED : driver to read and write 'med' files
 //  File   : DriverMED_R_SMESHDS_Mesh.h
 //  Module : SMESH
index 4669cf0880d56cfe15c410f06f8b47601a024155..e851068b63a976549f4849fc5a4d85df86999c35 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,4 +19,5 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "DriverMED_W_SMDS_Mesh.h"
index da1f9b300985d8dd88fd94d4580af40a54dd2449..dea5506136aef71d55eda3b84ef3acac2c5c0c19 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVERMED_W_SMDS_MESH
 #define _INCLUDE_DRIVERMED_W_SMDS_MESH
 
index ac4ba94f421b2105a5f3d1aedbcc796ef552c00a..5bc9968f9c54b1c37a4356ecd63f184e449d7b52 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH DriverMED : driver to read and write 'med' files
 //  File   : DriverMED_W_SMESHDS_Document.cxx
 //  Module : SMESH
index 95764fdb313e795f12e04ce7b672958bb7291506..95de105ce5f385dc41e1ca899c0147e891d786ee 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVERMED_W_SMESHDS_DOCUMENT
 #define _INCLUDE_DRIVERMED_W_SMESHDS_DOCUMENT
 
index 9c97adb9bfde2b7e230db7da3b570bcfd15a6e96..d44e27675bb8f39d19d0416a4d17358af9043876 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH DriverMED : driver to read and write 'med' files
 //  File   : DriverMED_W_SMESHDS_Mesh.cxx
 //  Module : SMESH
@@ -392,7 +393,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
           }
       }
 
-      SMDS_NodeIteratorPtr aNodesIter = myMesh->nodesIterator();
+      SMDS_NodeIteratorPtr aNodesIter = myMesh->nodesIterator(/*idInceasingOrder=*/true);
       switch(aMeshDimension){
       case 3:
         aCoordHelperPtr.reset(new TCoordHelper(aNodesIter,aXYZGetCoord,aXYZName));
index 5b8287ef2bd3f5d9471a40336cd31661cdb10dc7..fbf5f83c988c967056f2eb38a81a3b1ce3d2fa39 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH DriverMED : driver to read and write 'med' files
 //  File   : DriverMED_W_SMESHDS_Mesh.h
 //  Module : SMESH
index edd86c556cfe8db2d0c922b94084047a05decb54..55af2ac1501df218aff884de8a7b48974104bd66 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "DriverMED_R_SMESHDS_Mesh.h"
 #include "DriverMED_W_SMESHDS_Mesh.h"
 
index e70d83000bfc7fd1d43c39c77d6fd092a80161ab..e9db01b300202e55699a9f93c2b577006af5623e 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH DriverMED : driver to read and write 'med' files
 #  File   : Makefile.in
 #  Author : Marc Tajchman (CEA)
index 83e94819456487db9d6965b5fec8043448818de9..38a86d95bbf83d25a6010c42a5bede5c62bcfbc4 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_DriverMED.hxx
 //  Author : Alexander A. BORODIN
 //  Module : SMESH
index bd01c08bf759c7296c8043b350ae74106ba79333..c8918cd3c5a8616f7516ddbf2e873612b9ab9e95 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include <stdio.h>
 #include <gp_Pnt.hxx>
 //=======================================================================
index c541daf1bd3eb15ebf35891927a719b7402f1a4e..135ffe2bf1066e97f2f5c114e38983cba1772758 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVERSTL_R_SMDS_MESH
 #define _INCLUDE_DRIVERSTL_R_SMDS_MESH
 
index 0f68b7583a11f47916976d69e59d58a451a5b764..7704cf26cbc9feb375701611656fa7513da4dafd 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include <stdio.h>
 
 #include "DriverSTL_W_SMDS_Mesh.h"
@@ -71,7 +72,7 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::Perform()
 // static methods
 
 static void writeInteger( const Standard_Integer& theVal,
-                        OSD_File& ofile )
+                         OSD_File& ofile )
 {
   union {
     Standard_Integer i;
@@ -90,7 +91,7 @@ static void writeInteger( const Standard_Integer& theVal,
 }
 
 static void writeFloat  ( const Standard_ShortReal& theVal,
-                        OSD_File& ofile)
+                         OSD_File& ofile)
 {
   union {
     Standard_ShortReal f;
@@ -179,7 +180,7 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeAscii() const
       
       SMDS_ElemIteratorPtr aNodeIter = aFace->nodesIterator();
       for (; aNodeIter->more(); ) {
-       SMDS_MeshNode* node = (SMDS_MeshNode*)aNodeIter->next();
+        SMDS_MeshNode* node = (SMDS_MeshNode*)aNodeIter->next();
         buf += "     vertex "; 
         sprintf (sval,"% 12e",node->X());
         buf += sval;
@@ -249,10 +250,10 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeBinary() const
 
       SMDS_ElemIteratorPtr aNodeIter = aFace->nodesIterator();
       for (; aNodeIter->more(); ) {
-       SMDS_MeshNode* node = (SMDS_MeshNode*)aNodeIter->next();
-       writeFloat(node->X(),aFile);
-       writeFloat(node->Y(),aFile);
-       writeFloat(node->Z(),aFile);
+        SMDS_MeshNode* node = (SMDS_MeshNode*)aNodeIter->next();
+        writeFloat(node->X(),aFile);
+        writeFloat(node->Y(),aFile);
+        writeFloat(node->Z(),aFile);
       }
       aFile.Write (&dum,2);
     } 
index 04979d4fcd945ebf5b42196d8466a25cdd0feec7..b9e184145a5b5cb4a1a62109b3e1c51625d50e60 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH DriverSTL : driver to read and write 'stl' files
 //  File   : DriverSTL_W_SMDS_Mesh.h
 //  Module : SMESH
index af0c75aa82de1bb438e03f156bab3e6d48cf0d12..b067fd4cbad212c57b3f38dcf8e6958006d8aecd 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH DriverSTL : driver to read and write 'stl' files
 #  File   : Makefile.in
 #  Author : Marc Tajchman (CEA)
index f30ef50fe69e84a82babc2ccba2d7b44c1491dd0..7f62a44f3bb089032033eec38152bb3849f66f04 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_DriverSTL.hxx
 //  Author : Alexander A. BORODIN
 //  Module : SMESH
index 1acfd97895e998bd0ad8e3b5737d09be2b52abfa..08003947965084b2fc2e630c7b494317a1430ead 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //#include "DriverSTL_R_SMDS_Mesh.h"
 //
 #include "DriverSTL_W_SMDS_Mesh.h"
index 617cb6dfb2cf437c518976dff43a13ee01b5316c..bfb1d63945cb1080ba96989163be3bdea11b7057 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "DriverUNV_R_SMDS_Mesh.h"
 #include "SMDS_Mesh.hxx"
 #include "SMDS_MeshGroup.hxx"
@@ -62,9 +63,9 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
       if(MYDEBUG) MESSAGE("Perform - aDataSet2411.size() = "<<aDataSet2411.size());
       TDataSet::const_iterator anIter = aDataSet2411.begin();
       for(; anIter != aDataSet2411.end(); anIter++){
-       const TNodeLab& aLabel = anIter->first;
-       const TRecord& aRec = anIter->second;
-       myMesh->AddNodeWithID(aRec.coord[0],aRec.coord[1],aRec.coord[2],aLabel);
+        const TNodeLab& aLabel = anIter->first;
+        const TRecord& aRec = anIter->second;
+        myMesh->AddNodeWithID(aRec.coord[0],aRec.coord[1],aRec.coord[2],aLabel);
       }
     }
     {
@@ -75,10 +76,10 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
       TDataSet::const_iterator anIter = aDataSet2412.begin();
       if(MYDEBUG) MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
       for(; anIter != aDataSet2412.end(); anIter++){
-       SMDS_MeshElement* anElement = NULL;
-       const TElementLab& aLabel = anIter->first;
-       const TRecord& aRec = anIter->second;
-       if(IsBeam(aRec.fe_descriptor_id)) {
+        SMDS_MeshElement* anElement = NULL;
+        const TElementLab& aLabel = anIter->first;
+        const TRecord& aRec = anIter->second;
+        if(IsBeam(aRec.fe_descriptor_id)) {
           switch ( aRec.node_labels.size() ) {
           case 2: // edge with two nodes
             anElement = myMesh->AddEdgeWithID(aRec.node_labels[0],
@@ -91,178 +92,178 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
                                               aRec.node_labels[1],
                                               aLabel);
           }
-       }
+        }
         else if(IsFace(aRec.fe_descriptor_id)) {
-         switch(aRec.fe_descriptor_id){
-         case 71: // TRI3
-         case 72:
-         case 74:
-           
-         case 41: // Plane Stress Linear Triangle - TRI3
-         case 91: // Thin Shell Linear Triangle - TRI3
-           anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
-                                             aRec.node_labels[1],
-                                             aRec.node_labels[2],
-                                             aLabel);
-           break;
-           
-         case 42: // Plane Stress Quadratic Triangle - TRI6
-         case 92: // Thin Shell Quadratic Triangle - TRI6
-           anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
-                                             aRec.node_labels[2],
-                                             aRec.node_labels[4],
-                                             aRec.node_labels[1],
-                                             aRec.node_labels[3],
-                                             aRec.node_labels[5],
-                                             aLabel);
-           break;
-           
-         case 44: // Plane Stress Linear Quadrilateral - QUAD4
-         case 94: // Thin Shell   Linear Quadrilateral -  QUAD4
-           anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
-                                             aRec.node_labels[1],
-                                             aRec.node_labels[2],
-                                             aRec.node_labels[3],
-                                             aLabel);
-           break;
-           
-         case 45: // Plane Stress Quadratic Quadrilateral - QUAD8
-         case 95: // Thin Shell   Quadratic Quadrilateral - QUAD8
-           anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
-                                             aRec.node_labels[2],
-                                             aRec.node_labels[4],
-                                             aRec.node_labels[6],
-                                             aRec.node_labels[1],
-                                             aRec.node_labels[3],
-                                             aRec.node_labels[5],
-                                             aRec.node_labels[7],
-                                             aLabel);
-           break;
-         }
-       }
+          switch(aRec.fe_descriptor_id){
+          case 71: // TRI3
+          case 72:
+          case 74:
+            
+          case 41: // Plane Stress Linear Triangle - TRI3
+          case 91: // Thin Shell Linear Triangle - TRI3
+            anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
+                                              aRec.node_labels[1],
+                                              aRec.node_labels[2],
+                                              aLabel);
+            break;
+            
+          case 42: // Plane Stress Quadratic Triangle - TRI6
+          case 92: // Thin Shell Quadratic Triangle - TRI6
+            anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
+                                              aRec.node_labels[2],
+                                              aRec.node_labels[4],
+                                              aRec.node_labels[1],
+                                              aRec.node_labels[3],
+                                              aRec.node_labels[5],
+                                              aLabel);
+            break;
+            
+          case 44: // Plane Stress Linear Quadrilateral - QUAD4
+          case 94: // Thin Shell   Linear Quadrilateral -  QUAD4
+            anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
+                                              aRec.node_labels[1],
+                                              aRec.node_labels[2],
+                                              aRec.node_labels[3],
+                                              aLabel);
+            break;
+            
+          case 45: // Plane Stress Quadratic Quadrilateral - QUAD8
+          case 95: // Thin Shell   Quadratic Quadrilateral - QUAD8
+            anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
+                                              aRec.node_labels[2],
+                                              aRec.node_labels[4],
+                                              aRec.node_labels[6],
+                                              aRec.node_labels[1],
+                                              aRec.node_labels[3],
+                                              aRec.node_labels[5],
+                                              aRec.node_labels[7],
+                                              aLabel);
+            break;
+          }
+        }
         else if(IsVolume(aRec.fe_descriptor_id)){
-         switch(aRec.fe_descriptor_id){
-           
-         case 111: // Solid Linear Tetrahedron - TET4
-           anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
-                                               aRec.node_labels[2],
-                                               aRec.node_labels[1],
-                                               aRec.node_labels[3],
-                                               aLabel);
-           break;
+          switch(aRec.fe_descriptor_id){
+            
+          case 111: // Solid Linear Tetrahedron - TET4
+            anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
+                                                aRec.node_labels[2],
+                                                aRec.node_labels[1],
+                                                aRec.node_labels[3],
+                                                aLabel);
+            break;
 
-         case 118: // Solid Quadratic Tetrahedron - TET10
-           anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
-                                               aRec.node_labels[4],
-                                               aRec.node_labels[2],
+          case 118: // Solid Quadratic Tetrahedron - TET10
+            anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
+                                                aRec.node_labels[4],
+                                                aRec.node_labels[2],
 
-                                               aRec.node_labels[9],
+                                                aRec.node_labels[9],
 
-                                               aRec.node_labels[5],
-                                               aRec.node_labels[3],
+                                                aRec.node_labels[5],
+                                                aRec.node_labels[3],
                                                 aRec.node_labels[1],
 
                                                 aRec.node_labels[6],
-                                               aRec.node_labels[8],
-                                               aRec.node_labels[7],
-                                               aLabel);
-           break;
-           
-         case 112: // Solid Linear Prism - PRISM6
-           anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
-                                               aRec.node_labels[2],
-                                               aRec.node_labels[1],
-                                               aRec.node_labels[3],
-                                               aRec.node_labels[5],
-                                               aRec.node_labels[4],
-                                               aLabel);
-           break;
-           
-         case 113: // Solid Quadratic Prism - PRISM15
-           anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
-                                               aRec.node_labels[4],
-                                               aRec.node_labels[2],
+                                                aRec.node_labels[8],
+                                                aRec.node_labels[7],
+                                                aLabel);
+            break;
+            
+          case 112: // Solid Linear Prism - PRISM6
+            anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
+                                                aRec.node_labels[2],
+                                                aRec.node_labels[1],
+                                                aRec.node_labels[3],
+                                                aRec.node_labels[5],
+                                                aRec.node_labels[4],
+                                                aLabel);
+            break;
+            
+          case 113: // Solid Quadratic Prism - PRISM15
+            anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
+                                                aRec.node_labels[4],
+                                                aRec.node_labels[2],
 
-                                               aRec.node_labels[9],
-                                               aRec.node_labels[13],
-                                               aRec.node_labels[11],
+                                                aRec.node_labels[9],
+                                                aRec.node_labels[13],
+                                                aRec.node_labels[11],
 
-                                               aRec.node_labels[5],
-                                               aRec.node_labels[3],
+                                                aRec.node_labels[5],
+                                                aRec.node_labels[3],
                                                 aRec.node_labels[1],
 
-                                               aRec.node_labels[14],
-                                               aRec.node_labels[12],
+                                                aRec.node_labels[14],
+                                                aRec.node_labels[12],
                                                 aRec.node_labels[10],
 
                                                 aRec.node_labels[6],
-                                               aRec.node_labels[8],
-                                               aRec.node_labels[7],
-                                               aLabel);
-           break;
-           
-         case 115: // Solid Linear Brick - HEX8
-           anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
-                                               aRec.node_labels[3],
-                                               aRec.node_labels[2],
-                                               aRec.node_labels[1],
-                                               aRec.node_labels[4],
-                                               aRec.node_labels[7],
-                                               aRec.node_labels[6],
-                                               aRec.node_labels[5],
-                                               aLabel);
-           break;
+                                                aRec.node_labels[8],
+                                                aRec.node_labels[7],
+                                                aLabel);
+            break;
+            
+          case 115: // Solid Linear Brick - HEX8
+            anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
+                                                aRec.node_labels[3],
+                                                aRec.node_labels[2],
+                                                aRec.node_labels[1],
+                                                aRec.node_labels[4],
+                                                aRec.node_labels[7],
+                                                aRec.node_labels[6],
+                                                aRec.node_labels[5],
+                                                aLabel);
+            break;
 
-         case 116: // Solid Quadratic Brick - HEX20
-           anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
-                                               aRec.node_labels[6],
-                                               aRec.node_labels[4],
-                                               aRec.node_labels[2],
+          case 116: // Solid Quadratic Brick - HEX20
+            anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
+                                                aRec.node_labels[6],
+                                                aRec.node_labels[4],
+                                                aRec.node_labels[2],
 
-                                               aRec.node_labels[12],
-                                               aRec.node_labels[18],
-                                               aRec.node_labels[16],
-                                               aRec.node_labels[14],
+                                                aRec.node_labels[12],
+                                                aRec.node_labels[18],
+                                                aRec.node_labels[16],
+                                                aRec.node_labels[14],
 
-                                               aRec.node_labels[7],
-                                               aRec.node_labels[5],
-                                               aRec.node_labels[3],
-                                               aRec.node_labels[1],
+                                                aRec.node_labels[7],
+                                                aRec.node_labels[5],
+                                                aRec.node_labels[3],
+                                                aRec.node_labels[1],
 
-                                               aRec.node_labels[19],
-                                               aRec.node_labels[17],
-                                               aRec.node_labels[15],
+                                                aRec.node_labels[19],
+                                                aRec.node_labels[17],
+                                                aRec.node_labels[15],
                                                 aRec.node_labels[13],
 
                                                 aRec.node_labels[8],
-                                               aRec.node_labels[11],
-                                               aRec.node_labels[10],
-                                               aRec.node_labels[9],
-                                               aLabel);
-           break;
+                                                aRec.node_labels[11],
+                                                aRec.node_labels[10],
+                                                aRec.node_labels[9],
+                                                aLabel);
+            break;
 
-         case 114: // pyramid of 13 nodes (quadratic) - PIRA13
-           anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
-                                               aRec.node_labels[6],
-                                               aRec.node_labels[4],
-                                               aRec.node_labels[2],
-                                               aRec.node_labels[7],
-                                               aRec.node_labels[5],
-                                               aRec.node_labels[3],
-                                               aRec.node_labels[1],
+          case 114: // pyramid of 13 nodes (quadratic) - PIRA13
+            anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
+                                                aRec.node_labels[6],
+                                                aRec.node_labels[4],
+                                                aRec.node_labels[2],
+                                                aRec.node_labels[7],
+                                                aRec.node_labels[5],
+                                                aRec.node_labels[3],
+                                                aRec.node_labels[1],
 
-                                               aRec.node_labels[8],
-                                               aRec.node_labels[11],
-                                               aRec.node_labels[10],
-                                               aRec.node_labels[9],
-                                               aRec.node_labels[12],
-                                               aLabel);
-           break;
+                                                aRec.node_labels[8],
+                                                aRec.node_labels[11],
+                                                aRec.node_labels[10],
+                                                aRec.node_labels[9],
+                                                aRec.node_labels[12],
+                                                aLabel);
+            break;
 
-         }
-       }
-       //      if(!anElement)
-       //        MESSAGE("DriverUNV_R_SMDS_Mesh::Perform - can not add element with ID = "<<aLabel<<" and type = "<<aRec.fe_descriptor_id);
+          }
+        }
+        //      if(!anElement)
+        //        MESSAGE("DriverUNV_R_SMDS_Mesh::Perform - can not add element with ID = "<<aLabel<<" and type = "<<aRec.fe_descriptor_id);
       }
     }
     {
@@ -272,89 +273,89 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
       UNV2417::Read(in_stream,aDataSet2417);
       if(MYDEBUG) MESSAGE("Perform - aDataSet2417.size() = "<<aDataSet2417.size());
       if  (aDataSet2417.size() > 0) {
-       myGroup = new SMDS_MeshGroup(myMesh);
-       TDataSet::const_iterator anIter = aDataSet2417.begin();
-       for(; anIter != aDataSet2417.end(); anIter++){
-         const TGroupId& aLabel = anIter->first;
-         const TRecord& aRec = anIter->second;
+        myGroup = new SMDS_MeshGroup(myMesh);
+        TDataSet::const_iterator anIter = aDataSet2417.begin();
+        for(; anIter != aDataSet2417.end(); anIter++){
+          const TGroupId& aLabel = anIter->first;
+          const TRecord& aRec = anIter->second;
 
-         int aNodesNb = aRec.NodeList.size();
-         int aElementsNb = aRec.ElementList.size();
+          int aNodesNb = aRec.NodeList.size();
+          int aElementsNb = aRec.ElementList.size();
 
-         bool useSuffix = ((aNodesNb > 0) && (aElementsNb > 0));
-         int i;
-         if (aNodesNb > 0) {
-           SMDS_MeshGroup* aNodesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Node);
-           std::string aGrName = (useSuffix) ? aRec.GroupName + "_Nodes" : aRec.GroupName;
-           int i = aGrName.find( "\r" );
-           if (i > 0)
-             aGrName.erase (i, 2);
-           myGroupNames.insert(TGroupNamesMap::value_type(aNodesGroup, aGrName));
-           myGroupId.insert(TGroupIdMap::value_type(aNodesGroup, aLabel));
+          bool useSuffix = ((aNodesNb > 0) && (aElementsNb > 0));
+          int i;
+          if (aNodesNb > 0) {
+            SMDS_MeshGroup* aNodesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Node);
+            std::string aGrName = (useSuffix) ? aRec.GroupName + "_Nodes" : aRec.GroupName;
+            int i = aGrName.find( "\r" );
+            if (i > 0)
+              aGrName.erase (i, 2);
+            myGroupNames.insert(TGroupNamesMap::value_type(aNodesGroup, aGrName));
+            myGroupId.insert(TGroupIdMap::value_type(aNodesGroup, aLabel));
 
-           for (i = 0; i < aNodesNb; i++) {
-             const SMDS_MeshNode* aNode = myMesh->FindNode(aRec.NodeList[i]);
-             if (aNode)
-               aNodesGroup->Add(aNode);
-           }
-         }
-         if (aElementsNb > 0){
-           SMDS_MeshGroup* aEdgesGroup = 0;
-           SMDS_MeshGroup* aFacesGroup = 0;
-           SMDS_MeshGroup* aVolumeGroup = 0;
-           bool createdGroup = false;
+            for (i = 0; i < aNodesNb; i++) {
+              const SMDS_MeshNode* aNode = myMesh->FindNode(aRec.NodeList[i]);
+              if (aNode)
+                aNodesGroup->Add(aNode);
+            }
+          }
+          if (aElementsNb > 0){
+            SMDS_MeshGroup* aEdgesGroup = 0;
+            SMDS_MeshGroup* aFacesGroup = 0;
+            SMDS_MeshGroup* aVolumeGroup = 0;
+            bool createdGroup = false;
 
-           for (i = 0; i < aElementsNb; i++) {
-             const SMDS_MeshElement* aElement = myMesh->FindElement(aRec.ElementList[i]);
-             if (aElement) {
-               switch (aElement->GetType()) {
-               case SMDSAbs_Edge:
-                 if (!aEdgesGroup) {
-                   aEdgesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Edge);
-                   if (!useSuffix && createdGroup) useSuffix = true;
-                   std::string aEdgesGrName = (useSuffix) ? aRec.GroupName + "_Edges" : aRec.GroupName;
-                   int i = aEdgesGrName.find( "\r" );
-                   if (i > 0)
-                     aEdgesGrName.erase (i, 2);
-                   myGroupNames.insert(TGroupNamesMap::value_type(aEdgesGroup, aEdgesGrName));
-                   myGroupId.insert(TGroupIdMap::value_type(aEdgesGroup, aLabel));
-                   createdGroup = true;
-                 }
-                 aEdgesGroup->Add(aElement);
-                 break;
-               case SMDSAbs_Face:
-                 if (!aFacesGroup) {
-                   aFacesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Face);
-                   if (!useSuffix && createdGroup) useSuffix = true;
-                   std::string aFacesGrName = (useSuffix) ? aRec.GroupName + "_Faces" : aRec.GroupName;
-                   int i = aFacesGrName.find( "\r" );
-                   if (i > 0)
-                     aFacesGrName.erase (i, 2);
-                   myGroupNames.insert(TGroupNamesMap::value_type(aFacesGroup, aFacesGrName));
-                   myGroupId.insert(TGroupIdMap::value_type(aFacesGroup, aLabel));
-                   createdGroup = true;
-                 }
-                 aFacesGroup->Add(aElement);
-                 break;
-               case SMDSAbs_Volume:
-                 if (!aVolumeGroup) {
-                   aVolumeGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Volume);
-                   if (!useSuffix && createdGroup) useSuffix = true;
-                   std::string aVolumeGrName = (useSuffix) ? aRec.GroupName + "_Volumes" : aRec.GroupName;
-                   int i = aVolumeGrName.find( "\r" );
-                   if (i > 0)
-                     aVolumeGrName.erase (i, 2);
-                   myGroupNames.insert(TGroupNamesMap::value_type(aVolumeGroup, aVolumeGrName));
-                   myGroupId.insert(TGroupIdMap::value_type(aVolumeGroup, aLabel));
-                   createdGroup = true;
-                 }
-                 aVolumeGroup->Add(aElement);
-                 break;
-               }
-             } 
-           }
-         }
-       }
+            for (i = 0; i < aElementsNb; i++) {
+              const SMDS_MeshElement* aElement = myMesh->FindElement(aRec.ElementList[i]);
+              if (aElement) {
+                switch (aElement->GetType()) {
+                case SMDSAbs_Edge:
+                  if (!aEdgesGroup) {
+                    aEdgesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Edge);
+                    if (!useSuffix && createdGroup) useSuffix = true;
+                    std::string aEdgesGrName = (useSuffix) ? aRec.GroupName + "_Edges" : aRec.GroupName;
+                    int i = aEdgesGrName.find( "\r" );
+                    if (i > 0)
+                      aEdgesGrName.erase (i, 2);
+                    myGroupNames.insert(TGroupNamesMap::value_type(aEdgesGroup, aEdgesGrName));
+                    myGroupId.insert(TGroupIdMap::value_type(aEdgesGroup, aLabel));
+                    createdGroup = true;
+                  }
+                  aEdgesGroup->Add(aElement);
+                  break;
+                case SMDSAbs_Face:
+                  if (!aFacesGroup) {
+                    aFacesGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Face);
+                    if (!useSuffix && createdGroup) useSuffix = true;
+                    std::string aFacesGrName = (useSuffix) ? aRec.GroupName + "_Faces" : aRec.GroupName;
+                    int i = aFacesGrName.find( "\r" );
+                    if (i > 0)
+                      aFacesGrName.erase (i, 2);
+                    myGroupNames.insert(TGroupNamesMap::value_type(aFacesGroup, aFacesGrName));
+                    myGroupId.insert(TGroupIdMap::value_type(aFacesGroup, aLabel));
+                    createdGroup = true;
+                  }
+                  aFacesGroup->Add(aElement);
+                  break;
+                case SMDSAbs_Volume:
+                  if (!aVolumeGroup) {
+                    aVolumeGroup = (SMDS_MeshGroup*) myGroup->AddSubGroup(SMDSAbs_Volume);
+                    if (!useSuffix && createdGroup) useSuffix = true;
+                    std::string aVolumeGrName = (useSuffix) ? aRec.GroupName + "_Volumes" : aRec.GroupName;
+                    int i = aVolumeGrName.find( "\r" );
+                    if (i > 0)
+                      aVolumeGrName.erase (i, 2);
+                    myGroupNames.insert(TGroupNamesMap::value_type(aVolumeGroup, aVolumeGrName));
+                    myGroupId.insert(TGroupIdMap::value_type(aVolumeGroup, aLabel));
+                    createdGroup = true;
+                  }
+                  aVolumeGroup->Add(aElement);
+                  break;
+                }
+              
+            }
+          }
+        }
       }
     } 
   }
index d385dac32ab5ffa6c952d3f6f032d8b224af8484..034c8d84a01273af6ee737f7f7a4a11ef285cf59 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVERUNV_R_SMDS_MESH
 #define _INCLUDE_DRIVERUNV_R_SMDS_MESH
 
index ff8190493474791c4d7520ad70b8bed3f293e49e..7e12bcf5c18df501a3a10e33bd0c814303af192d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,4 +19,5 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "DriverUNV_R_SMESHDS_Document.h"
index bf40922ebc6a276de06d39969817facf89491227..62bbac3dd881e5bd04d73d44ac167d9277f08f24 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVERUNV_R_SMESHDS_DOCUMENT
 #define _INCLUDE_DRIVERUNV_R_SMESHDS_DOCUMENT
 
index ee4f2cfe1d17a42b6a4f857734c9391088915712..0c2c48be2cd66b682a94d09aa86f5a96510fa3f2 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,4 +19,5 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "DriverUNV_R_SMESHDS_Mesh.h"
index 074faeb0abf3ab0df87b22f06f3d0ebadbe75c57..c0dcfcb77ef3c3fe5083f1a4f5100c84909caa22 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVERUNV_R_SMESHDS_MESH
 #define _INCLUDE_DRIVERUNV_R_SMESHDS_MESH
 
index 7b3a4d22ba4fd1d2439af5ae88f725f4407dab1f..cf7778300ca677beb810a70466de94f0d09c4395 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include <algorithm>
 
 #include "DriverUNV_W_SMDS_Mesh.h"
@@ -45,7 +46,7 @@ namespace{
   typedef std::vector<size_t> TConnect;
 
   int GetConnect(const SMDS_ElemIteratorPtr& theNodesIter, 
-                TConnect& theConnect)
+                 TConnect& theConnect)
   {
     theConnect.clear();
     for(; theNodesIter->more();){
@@ -71,13 +72,13 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
       MESSAGE("Perform - myMesh->NbNodes() = "<<myMesh->NbNodes());
       SMDS_NodeIteratorPtr aNodesIter = myMesh->nodesIterator();
       for(; aNodesIter->more();){
-       const SMDS_MeshNode* aNode = aNodesIter->next();
-       TRecord aRec;
-       aRec.coord[0] = aNode->X();
-       aRec.coord[1] = aNode->Y();
-       aRec.coord[2] = aNode->Z();
-       const TNodeLab& aLabel = aNode->GetID();
-       aDataSet2411.insert(TDataSet::value_type(aLabel,aRec));
+        const SMDS_MeshNode* aNode = aNodesIter->next();
+        TRecord aRec;
+        aRec.coord[0] = aNode->X();
+        aRec.coord[1] = aNode->Y();
+        aRec.coord[2] = aNode->Z();
+        const TNodeLab& aLabel = aNode->GetID();
+        aDataSet2411.insert(TDataSet::value_type(aLabel,aRec));
       }
       MESSAGE("Perform - aDataSet2411.size() = "<<aDataSet2411.size());
       UNV2411::Write(out_stream,aDataSet2411);
@@ -90,14 +91,14 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
       // Storing SMDS Edges
       MESSAGE("Perform - myMesh->NbEdges() = "<<myMesh->NbEdges());
       if(myMesh->NbEdges()){
-       SMDS_EdgeIteratorPtr anIter = myMesh->edgesIterator();
-       for(; anIter->more();){
-         const SMDS_MeshEdge* anElem = anIter->next();
-         TElementLab aLabel = anElem->GetID();
-         int aNbNodes = anElem->NbNodes();
-         TRecord aRec;
-         aRec.node_labels.reserve(aNbNodes);
-         SMDS_ElemIteratorPtr aNodesIter;
+        SMDS_EdgeIteratorPtr anIter = myMesh->edgesIterator();
+        for(; anIter->more();){
+          const SMDS_MeshEdge* anElem = anIter->next();
+          TElementLab aLabel = anElem->GetID();
+          int aNbNodes = anElem->NbNodes();
+          TRecord aRec;
+          aRec.node_labels.reserve(aNbNodes);
+          SMDS_ElemIteratorPtr aNodesIter;
           if( anElem->IsQuadratic() ) {
             aNodesIter = static_cast<const SMDS_QuadraticEdge* >
               ( anElem )->interlacedNodesElemIterator();
@@ -106,64 +107,64 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
             aNodesIter = anElem->nodesIterator();
             aRec.fe_descriptor_id = 11;
           }
-         for(; aNodesIter->more();){
-           const SMDS_MeshElement* aNode = aNodesIter->next();
-           aRec.node_labels.push_back(aNode->GetID());
-         }
-         aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
-       }
-       MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
+          for(; aNodesIter->more();){
+            const SMDS_MeshElement* aNode = aNodesIter->next();
+            aRec.node_labels.push_back(aNode->GetID());
+          }
+          aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
+        }
+        MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
       }
 
       MESSAGE("Perform - myMesh->NbFaces() = "<<myMesh->NbFaces());
       if(myMesh->NbFaces()){
-       SMDS_FaceIteratorPtr anIter = myMesh->facesIterator();
-       for(; anIter->more();){
-         const SMDS_MeshFace* anElem = anIter->next();
-         TElementLab aLabel = anElem->GetID();
-         int aNbNodes = anElem->NbNodes();
-         TRecord aRec;
-         aRec.node_labels.reserve(aNbNodes);
-         SMDS_ElemIteratorPtr aNodesIter;
+        SMDS_FaceIteratorPtr anIter = myMesh->facesIterator();
+        for(; anIter->more();){
+          const SMDS_MeshFace* anElem = anIter->next();
+          TElementLab aLabel = anElem->GetID();
+          int aNbNodes = anElem->NbNodes();
+          TRecord aRec;
+          aRec.node_labels.reserve(aNbNodes);
+          SMDS_ElemIteratorPtr aNodesIter;
           if( anElem->IsQuadratic() )
             aNodesIter = static_cast<const SMDS_QuadraticFaceOfNodes* >
               ( anElem )->interlacedNodesElemIterator();
           else
             aNodesIter = anElem->nodesIterator();
-         for(; aNodesIter->more();){
-           const SMDS_MeshElement* aNode = aNodesIter->next();
-           aRec.node_labels.push_back(aNode->GetID());
-         }
-         switch(aNbNodes){
-         case 3:
-           aRec.fe_descriptor_id = 41;
-           break;
-         case 4:
-           aRec.fe_descriptor_id = 44;
-           break;
-         case 6:
-           aRec.fe_descriptor_id = 42;
-           break;
-         case 8:
-           aRec.fe_descriptor_id = 45;
-           break;
-         default:
-           continue;
-         }
-         aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
-       }
-       MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
+          for(; aNodesIter->more();){
+            const SMDS_MeshElement* aNode = aNodesIter->next();
+            aRec.node_labels.push_back(aNode->GetID());
+          }
+          switch(aNbNodes){
+          case 3:
+            aRec.fe_descriptor_id = 41;
+            break;
+          case 4:
+            aRec.fe_descriptor_id = 44;
+            break;
+          case 6:
+            aRec.fe_descriptor_id = 42;
+            break;
+          case 8:
+            aRec.fe_descriptor_id = 45;
+            break;
+          default:
+            continue;
+          }
+          aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
+        }
+        MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
       }
 
       MESSAGE("Perform - myMesh->NbVolumes() = "<<myMesh->NbVolumes());
       if(myMesh->NbVolumes()){
-       SMDS_VolumeIteratorPtr anIter = myMesh->volumesIterator();
-       for(; anIter->more();){
-         const SMDS_MeshVolume* anElem = anIter->next();
-         TElementLab aLabel = anElem->GetID();
+        SMDS_VolumeIteratorPtr anIter = myMesh->volumesIterator();
+        for(; anIter->more();){
+          const SMDS_MeshVolume* anElem = anIter->next();
+          TElementLab aLabel = anElem->GetID();
 
-         int aNbNodes = anElem->NbNodes();
-         SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
+          int aNbNodes = anElem->NbNodes();
+          SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
           if ( anElem->IsPoly() ) {
             if ( const SMDS_PolyhedralVolumeOfNodes* ph =
                  dynamic_cast<const SMDS_PolyhedralVolumeOfNodes*> (anElem))
@@ -172,138 +173,138 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
               aNodesIter = ph->uniqueNodesIterator();
             }
           }
-         aConnect.resize(aNbNodes);
-         GetConnect(aNodesIter,aConnect);
+          aConnect.resize(aNbNodes);
+          GetConnect(aNodesIter,aConnect);
 
-         int anId = -1;
-         int* aConn = NULL;
-         switch(aNbNodes){
-         case 4: {
-           static int anIds[] = {0,2,1,3};
-           aConn = anIds;
-           anId = 111;
-           break;
-         }
-         case 6: {
-           static int anIds[] = {0,2,1,3,5,4};
-           aConn = anIds;
-           anId = 112;
-           break;
-         }
-         case 8: {
-           static int anIds[] = {0,3,2,1,4,7,6,5};
-           aConn = anIds;
-           anId = 115;
-           break;
-         }
-         case 10: {
-           static int anIds[] = {0,4,2,9,5,3, 1,6,8, 7};
-           aConn = anIds;
-           anId = 118;
-           break;
-         }
-         case 13: {
-           static int anIds[] = {0,6,4,2,7,5,3,1,8,11,10,9,12};
-           aConn = anIds;
-           anId = 114;
-           break;
-         }
-         case 15: {
-           static int anIds[] = {0,4,2,9,13,11,5,3,1,14,12,10,6,8,7};
-           aConn = anIds;
-           anId = 113;
-           break;
-         }
-         case 20: {
-           static int anIds[] = {0,6, 4,2, 12,18,16,14,7, 5, 3, 1, 19,17,15,13,8, 11,10,9};
-           aConn = anIds;
-           anId = 116;
-           break;
-         }
-         default:
-           continue;
-         }
-         if(aConn){
-           TRecord aRec;
-           aRec.fe_descriptor_id = anId;
-           aRec.node_labels.resize(aNbNodes);
-           for(int aNodeId = 0; aNodeId < aNbNodes; aNodeId++){
-             aRec.node_labels[aConn[aNodeId]] = aConnect[aNodeId];
-           }
-           aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
-         }
-       }
-       MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
+          int anId = -1;
+          int* aConn = NULL;
+          switch(aNbNodes){
+          case 4: {
+            static int anIds[] = {0,2,1,3};
+            aConn = anIds;
+            anId = 111;
+            break;
+          }
+          case 6: {
+            static int anIds[] = {0,2,1,3,5,4};
+            aConn = anIds;
+            anId = 112;
+            break;
+          }
+          case 8: {
+            static int anIds[] = {0,3,2,1,4,7,6,5};
+            aConn = anIds;
+            anId = 115;
+            break;
+          }
+          case 10: {
+            static int anIds[] = {0,4,2,9,5,3, 1,6,8, 7};
+            aConn = anIds;
+            anId = 118;
+            break;
+          }
+          case 13: {
+            static int anIds[] = {0,6,4,2,7,5,3,1,8,11,10,9,12};
+            aConn = anIds;
+            anId = 114;
+            break;
+          }
+          case 15: {
+            static int anIds[] = {0,4,2,9,13,11,5,3,1,14,12,10,6,8,7};
+            aConn = anIds;
+            anId = 113;
+            break;
+          }
+          case 20: {
+            static int anIds[] = {0,6, 4,2, 12,18,16,14,7, 5, 3, 1, 19,17,15,13,8, 11,10,9};
+            aConn = anIds;
+            anId = 116;
+            break;
+          }
+          default:
+            continue;
+          }
+          if(aConn){
+            TRecord aRec;
+            aRec.fe_descriptor_id = anId;
+            aRec.node_labels.resize(aNbNodes);
+            for(int aNodeId = 0; aNodeId < aNbNodes; aNodeId++){
+              aRec.node_labels[aConn[aNodeId]] = aConnect[aNodeId];
+            }
+            aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
+          }
+        }
+        MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
       }
       UNV2412::Write(out_stream,aDataSet2412);
     }
     {
       using namespace UNV2417;
       if (myGroups.size() > 0) {
-       TDataSet aDataSet2417;
-       TGroupList::const_iterator aIter = myGroups.begin();
-       for (; aIter != myGroups.end(); aIter++) {
-         SMESHDS_GroupBase* aGroupDS = *aIter;
-         TRecord aRec;
-         aRec.GroupName = aGroupDS->GetStoreName();
+        TDataSet aDataSet2417;
+        TGroupList::const_iterator aIter = myGroups.begin();
+        for (; aIter != myGroups.end(); aIter++) {
+          SMESHDS_GroupBase* aGroupDS = *aIter;
+          TRecord aRec;
+          aRec.GroupName = aGroupDS->GetStoreName();
 
-         int i;
-         SMDS_ElemIteratorPtr aIter = aGroupDS->GetElements();
-         if (aGroupDS->GetType() == SMDSAbs_Node) {
-           aRec.NodeList.resize(aGroupDS->Extent());
-           i = 0;
-           while (aIter->more()) {
-             const SMDS_MeshElement* aElem = aIter->next();
-             aRec.NodeList[i] = aElem->GetID(); 
-             i++;
-           }
-         } else {
-           aRec.ElementList.resize(aGroupDS->Extent());
-           i = 0;
-           while (aIter->more()) {
-             const SMDS_MeshElement* aElem = aIter->next();
-             aRec.ElementList[i] = aElem->GetID(); 
-             i++;
-           }
-         }
+          int i;
+          SMDS_ElemIteratorPtr aIter = aGroupDS->GetElements();
+          if (aGroupDS->GetType() == SMDSAbs_Node) {
+            aRec.NodeList.resize(aGroupDS->Extent());
+            i = 0;
+            while (aIter->more()) {
+              const SMDS_MeshElement* aElem = aIter->next();
+              aRec.NodeList[i] = aElem->GetID(); 
+              i++;
+            }
+          } else {
+            aRec.ElementList.resize(aGroupDS->Extent());
+            i = 0;
+            while (aIter->more()) {
+              const SMDS_MeshElement* aElem = aIter->next();
+              aRec.ElementList[i] = aElem->GetID(); 
+              i++;
+            }
+          }
           // 0019936: EDF 794 SMESH : Export UNV : Node color and group id
-         //aDataSet2417.insert(TDataSet::value_type(aGroupDS->GetID(), aRec));
+          //aDataSet2417.insert(TDataSet::value_type(aGroupDS->GetID(), aRec));
           aDataSet2417.insert(TDataSet::value_type(aGroupDS->GetID()+1, aRec));
-       }
-       UNV2417::Write(out_stream,aDataSet2417);
-       myGroups.clear();
+        }
+        UNV2417::Write(out_stream,aDataSet2417);
+        myGroups.clear();
       }
     }
     /*    {
       using namespace UNV2417;
       TDataSet aDataSet2417;
       for ( TGroupsMap::iterator it = myGroupsMap.begin(); it != myGroupsMap.end(); it++ ) {
-       SMESH_Group*       aGroup   = it->second;
-       SMESHDS_GroupBase* aGroupDS = aGroup->GetGroupDS();
-       if ( aGroupDS ) {
-         TRecord aRec;
-         aRec.GroupName = aGroup->GetName();
-         int i;
-         SMDS_ElemIteratorPtr aIter = aGroupDS->GetElements();
-         if (aGroupDS->GetType() == SMDSAbs_Node) {
-           aRec.NodeList.resize(aGroupDS->Extent());
-           i = 0;
-           while (aIter->more()) {
-             const SMDS_MeshElement* aElem = aIter->next();
-             aRec.NodeList[i] = aElem->GetID(); 
-             i++;
-           }
-         } else {
-           aRec.ElementList.resize(aGroupDS->Extent());
-           i = 0;
-           while (aIter->more()) {
-             const SMDS_MeshElement* aElem = aIter->next();
-             aRec.ElementList[i] = aElem->GetID(); 
-             i++;
-           }
-         }
-         aDataSet2417.insert(TDataSet::value_type(aGroupDS->GetID(), aRec));
-       }
+        SMESH_Group*       aGroup   = it->second;
+        SMESHDS_GroupBase* aGroupDS = aGroup->GetGroupDS();
+        if ( aGroupDS ) {
+          TRecord aRec;
+          aRec.GroupName = aGroup->GetName();
+          int i;
+          SMDS_ElemIteratorPtr aIter = aGroupDS->GetElements();
+          if (aGroupDS->GetType() == SMDSAbs_Node) {
+            aRec.NodeList.resize(aGroupDS->Extent());
+            i = 0;
+            while (aIter->more()) {
+              const SMDS_MeshElement* aElem = aIter->next();
+              aRec.NodeList[i] = aElem->GetID(); 
+              i++;
+            }
+          } else {
+            aRec.ElementList.resize(aGroupDS->Extent());
+            i = 0;
+            while (aIter->more()) {
+              const SMDS_MeshElement* aElem = aIter->next();
+              aRec.ElementList[i] = aElem->GetID(); 
+              i++;
+            }
+          }
+          aDataSet2417.insert(TDataSet::value_type(aGroupDS->GetID(), aRec));
+        }
       }
       UNV2417::Write(out_stream,aDataSet2417);
       }*/
index 6a76da655c0e778c10ba0ad9c9d783742b40a1cb..abe0575df1e2236868fa32db4ec9ffd888d3b3e7 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVERUNV_W_SMDS_MESH
 #define _INCLUDE_DRIVERUNV_W_SMDS_MESH
 
index d01c2615423f3800669a6ecfb3c3be68e444e447..15a99cba39bcbe4ce5697ebfe41b48a391d5643c 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,4 +19,5 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "DriverUNV_W_SMESHDS_Document.h"
index 8fa6bb0041fb98befe44d50ee8ac46c92d4feda8..269d9227ee50496ba332f7f3191b9c7daa822894 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVERUNV_W_SMESHDS_DOCUMENT
 #define _INCLUDE_DRIVERUNV_W_SMESHDS_DOCUMENT
 
index baf916e708228127b26c607189ddd5b42c0f0418..e90f8d95e439e9b7045aa154527fda527758ab78 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,4 +19,5 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "DriverUNV_W_SMESHDS_Mesh.h"
index 260f08dfb0ba13cca5a6f64b052359134979ee3c..f054250fbddb3f357c8257e2b0597e7de2a73b69 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _INCLUDE_DRIVERUNV_W_SMESHDS_MESH
 #define _INCLUDE_DRIVERUNV_W_SMESHDS_MESH
 
index bad160b7ffaa1e445245b632aa9a4bb198c23ab3..4fa349f3f198d07608fa11c4dcf5215b910de7c6 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH DriverUNV : driver to read and write 'unv' files
 #  File   : Makefile.in
 #  Author : Marc Tajchman (CEA)
index 212764429301e4e760c08c990fc1a8d436feaaa9..5a172d9a2f0ca03232c447c310a8329255846103 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_DriverUNV.hxx
 //  Author : Alexander A. BORODIN
 //  Module : SMESH
index 55ad1cec246128f5c5c467688240994953f246f1..1e904ed855810c97fc4507f8b4ac0ad496cafc42 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,8 +19,9 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-#include <fstream>     
-#include <stdio.h>     
+
+#include <fstream>      
+#include <stdio.h>      
 
 #include "UNV2411_Structure.hxx"
 #include "UNV_Utilities.hxx"
@@ -98,17 +99,17 @@ void UNV2411::Write(std::ofstream& out_stream, const TDataSet& theDataSet)
     const TRecord& aRec = anIter->second;
     char buf[78];
     sprintf(buf, "%10d%10d%10d%10d\n", 
-           aLabel,
-           aRec.exp_coord_sys_num,
-           aRec.disp_coord_sys_num,
-           aRec.color);
+            aLabel,
+            aRec.exp_coord_sys_num,
+            aRec.disp_coord_sys_num,
+            aRec.color);
     out_stream<<buf;
 
     // the coordinates
     sprintf(buf, "%25.16E%25.16E%25.16E\n", 
-           aRec.coord[0],
-           aRec.coord[1],
-           aRec.coord[2]);
+            aRec.coord[0],
+            aRec.coord[1],
+            aRec.coord[2]);
     out_stream<<buf;
   }
   
index 07195860ea1651a77c885a57c5d645e258e81181..8aa1c203213598df7bfa78cf0a90add865f2c0bd 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef UNV2411_Structure_HeaderFile
 #define UNV2411_Structure_HeaderFile
 
 #include "SMESH_DriverUNV.hxx"
 
 #include <map>
-#include <fstream>     
+#include <fstream>      
 
 namespace UNV2411{
   
index a522ecbc1d5c97ec7436be68ece031a6891d145c..893fa2391936c68d5fbee7e1ca3c1dfd7660a2bf 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,7 +19,8 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-#include <fstream>     
+
+#include <fstream>      
 #include <iomanip>
 
 #include "UNV2412_Structure.hxx"
@@ -125,11 +126,11 @@ void UNV2412::Write(std::ofstream& out_stream, const TDataSet& theDataSet)
     for(int i = 0, k = 0; i < iEnd; i++){
       int jEnd = n_nodes - 8*(i+1);
       if(jEnd < 0) 
-       jEnd = 8 + jEnd;
+        jEnd = 8 + jEnd;
       else
-       jEnd = 8;
+        jEnd = 8;
       for(int j = 0; j < jEnd ; k++, j++){
-       out_stream<<std::setw(10)<<aRec.node_labels[k];
+        out_stream<<std::setw(10)<<aRec.node_labels[k];
       }
       out_stream<<std::endl;
     }
index 5c6a532f1aa6429e0cbfb2cae1abb6b84d9383ac..6666c6361c33c8a2b6ed2605ef6f7b5c7ecfd27e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef UNV2412_Structure_HeaderFile
 #define UNV2412_Structure_HeaderFile
 
@@ -26,7 +27,7 @@
 
 #include <map>
 #include <vector>
-#include <fstream>     
+#include <fstream>      
 
 
 namespace UNV2412{
index 0e836f755a7e9afd84a66b1bf79cec964d3b3c25..0f7313b76d8b995aeb25f7f22442fc2ff28aadd8 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "UNV2417_Structure.hxx"
 #include "UNV_Utilities.hxx"
 
-#include <fstream>     
+#include <fstream>      
 #include <iomanip>
 
 using namespace std;
@@ -37,7 +38,7 @@ static int MYDEBUG = 0;
 
 
 static string _group_labels[] = {"2417", "2429", "2430", "2432",
-                                "2435", "2452", "2467", "2477"};
+                                 "2435", "2452", "2467", "2477"};
 #define NBGROUP 8
 
 static string _label_dataset = "2467";
@@ -55,7 +56,7 @@ void UNV2417::Read(std::ifstream& in_stream, TDataSet& theDataSet)
      * a "-1" followed by a number means the beginning of a dataset
      * stop combing at the end of the file
      */
-    while( ((olds != "-1") || (news == "-1") ) && !in_stream.eof() ){    
+    while( ((olds != "-1") || (news == "-1") ) && !in_stream.eof() ){     
       olds = news;
       in_stream >> news;
     }
@@ -63,7 +64,7 @@ void UNV2417::Read(std::ifstream& in_stream, TDataSet& theDataSet)
       return;
     for (int i = 0; i < NBGROUP; i++) {
       if (news == _group_labels[i]) {
-       ReadGroup(news, in_stream, theDataSet);
+        ReadGroup(news, in_stream, theDataSet);
       }
     }
   }
@@ -102,23 +103,23 @@ void UNV2417::ReadGroup(const std::string& myGroupLabel, std::ifstream& in_strea
       in_stream>>aElType;
       in_stream>>aElId;
       if ((myGroupLabel.compare("2435") == 0) ||
-         (myGroupLabel.compare("2452") == 0) ||
-         (myGroupLabel.compare("2467") == 0) ||
-         (myGroupLabel.compare("2477") == 0)) {
-       in_stream>>aTmp;
-       in_stream>>aTmp;
+          (myGroupLabel.compare("2452") == 0) ||
+          (myGroupLabel.compare("2467") == 0) ||
+          (myGroupLabel.compare("2477") == 0)) {
+        in_stream>>aTmp;
+        in_stream>>aTmp;
       }
       switch (aElType) {
       case 7: // Nodes
-       aNum = aRec.NodeList.size();
-       aRec.NodeList.resize(aNum + 1);
-       aRec.NodeList[aNum] = aElId;
-       break;
+        aNum = aRec.NodeList.size();
+        aRec.NodeList.resize(aNum + 1);
+        aRec.NodeList[aNum] = aElId;
+        break;
       case 8: // Elements
-       aNum = aRec.ElementList.size();
-       aRec.ElementList.resize(aNum + 1);
-       aRec.ElementList[aNum] = aElId;
-       break;
+        aNum = aRec.ElementList.size();
+        aRec.ElementList.resize(aNum + 1);
+        aRec.ElementList[aNum] = aElId;
+        break;
       }
     }
     theDataSet.insert(TDataSet::value_type(aId,aRec));
@@ -160,8 +161,8 @@ void UNV2417::Write(std::ofstream& out_stream, const TDataSet& theDataSet)
     int i;
     for (i = 0; i < aNbNodes; i++) {
       if (aRow == 2) {
-       out_stream<<std::endl; 
-       aRow = 0;
+        out_stream<<std::endl; 
+        aRow = 0;
       }
       out_stream<<std::setw(10)<<7;
       out_stream<<std::setw(10)<<aRec.NodeList[i];
@@ -171,8 +172,8 @@ void UNV2417::Write(std::ofstream& out_stream, const TDataSet& theDataSet)
     }
     for (i = 0; i < aNbElements; i++) {
       if (aRow == 2) {
-       out_stream<<std::endl; 
-       aRow = 0;
+        out_stream<<std::endl; 
+        aRow = 0;
       }
       out_stream<<std::setw(10)<<8;
       out_stream<<std::setw(10)<<aRec.ElementList[i];
index 2f7999012504374258fbe50bfbde5ad9166e8875..6e638750e26340e71b834a754f683f98f801364f 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef UNV2417_Structure_HeaderFile
 #define UNV2417_Structure_HeaderFile
 
 #include <map>
 #include <vector>
-#include <fstream>     
-#include <string>      
+#include <fstream>      
+#include <string>       
 
 
 namespace UNV2417{
index 0e274fd2358656ee1dd2f47a79bdb38db0f536e8..55964109a526683e746c73e386a8f98afd16b561 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "UNV2411_Structure.hxx"
 #include "UNV2412_Structure.hxx"
 #include "UNV_Utilities.hxx"
index 2928bd1003f8b2b567f3c278b50136b1b4189624..7a23dfd767d14f15f99c5034bd8edf23369c5556 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "UNV_Utilities.hxx"
 
 using namespace std;
index e53f75d95da120a9dd3cff3c5cb87e9117a0e313..29a747375309cf58ed2d42e150391da54d79ca7a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef MED_Utilities_HeaderFile
 #define MED_Utilities_HeaderFile
 
 #include "SMESH_DriverUNV.hxx"
 
-#include <iostream>    
-#include <sstream>     
+#include <iostream>     
+#include <sstream>      
 #include <fstream>
 #include <string>
 #include <stdexcept>
@@ -62,14 +63,14 @@ namespace UNV{
        * a "-1" followed by a number means the beginning of a dataset
        * stop combing at the end of the file
        */
-      while( ((olds != "-1") || (news == "-1") ) && !in_file.eof() ){    
-       olds = news;
-       in_file >> news;
+      while( ((olds != "-1") || (news == "-1") ) && !in_file.eof() ){     
+        olds = news;
+        in_file >> news;
       }
       if(in_file.eof())
-       return false;
+        return false;
       if (news == ds_name)
-       return true;
+        return true;
     }
     // should never end up here
     return false;
index b4e94a84011c393ab6217d18581336a213117ce1..d69040c390c6cdaf456d1fbd9f864693d1783f1e 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : Makefile.in
 #  Author : 
 #  Modified by : Alexander BORODIN (OCN) - autotools usage
index 63c6ec26640f6493d403fe2a6daac90852c03eb4..c9f780ade6627072620eaef6013d8d80f3896f18 100755 (executable)
@@ -172,8 +172,8 @@ public:
 
   bool  DansPave( R3 & xyzMin, R3 & xyzMax )
     { return xyzMin.x<=x && x<=xyzMax.x &&
-            xyzMin.y<=y && y<=xyzMax.y &&
-            xyzMin.z<=z && z<=xyzMax.z; }
+             xyzMin.y<=y && y<=xyzMax.y &&
+             xyzMin.z<=z && z<=xyzMax.z; }
 };
 
 //la classe R4
index 9d9e80c5b67004127d6d5ac372e13505d684cf19..04ed4670051d1567f44b63bb5243e99b294e8b43 100755 (executable)
@@ -87,11 +87,11 @@ deltacpu_( R & dtcpu )
 
 
 void  aptrte( Z   nutysu, R      aretmx,
-             Z   nblf,   Z  *   nudslf,  R2 * uvslf,
-             Z   nbpti,  R2 *   uvpti,
-             Z & nbst,   R2 * & uvst,
-             Z & nbt,    Z  * & nust,
-             Z & ierr )
+              Z   nblf,   Z  *   nudslf,  R2 * uvslf,
+              Z   nbpti,  R2 *   uvpti,
+              Z & nbst,   R2 * & uvst,
+              Z & nbt,    Z  * & nust,
+              Z & ierr )
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 // but : appel de la triangulation par un arbre-4 recouvrant
 // ----- de triangles equilateraux
@@ -184,7 +184,7 @@ void  aptrte( Z   nutysu, R      aretmx,
   mxsomm = Max( 20000, 64*nbpti+i*i );
   MESSAGE( "APTRTE: Debut de la triangulation plane avec " );
   MESSAGE( "nutysu=" << nutysu << "  aretmx=" << aretmx
-          << "  mxsomm=" << mxsomm );
+           << "  mxsomm=" << mxsomm );
   MESSAGE( nbarfr << " sommets sur la frontiere et " << nbpti << " points internes");
 
  NEWDEPART:
@@ -247,7 +247,7 @@ void  aptrte( Z   nutysu, R      aretmx,
     mnpxyd[ns0].y = uvslf[ns0].y;
     mnpxyd[ns0].z = areteideale();//( mnpxyd[ns0], direction );
 //     MESSAGE("Sommet " << ns0 << ": " << mnpxyd[ns0].x
-//      << " " << mnpxyd[ns0].y << " longueur arete=" << mnpxyd[ns0].z);
+//       << " " << mnpxyd[ns0].y << " longueur arete=" << mnpxyd[ns0].z);
 
     //carre de la longueur de l'arete 1 de la ligne fermee n
     d = pow( uvslf[ns0+1].x - uvslf[ns0].x, 2 ) 
@@ -268,8 +268,8 @@ void  aptrte( Z   nutysu, R      aretmx,
      //le numero n de la ligne du sommet et son numero ns1 dans la ligne
     mnslig[ns0-1] = 1000000 * n + ns1-nudslf[n-1];
     fasoar( ns1, ns2, moins1, moins1, n,
-            mosoar, mxsoar, n1soar, mnsoar, mnarst,
-            noar0,  ierr );
+             mosoar, mxsoar, n1soar, mnsoar, mnarst,
+             noar0,  ierr );
     //pas de test sur ierr car pas de saturation possible a ce niveau
 
     //le pointeur dans le hachage sur la premiere arete de la ligne fermee n
@@ -286,11 +286,11 @@ void  aptrte( Z   nutysu, R      aretmx,
     {
       ns1 = ns2; //le numero de l'arete et le numero du premier sommet de l'arete
       if( i < nbarli )
-       //nbs+1 est le 2-eme sommet de l'arete i de la ligne fermee n
-       ns2 = ns1+1;
+        //nbs+1 est le 2-eme sommet de l'arete i de la ligne fermee n
+        ns2 = ns1+1;
       else
-       //le 2-eme sommet de la derniere arete est le premier sommet de la ligne
-       ns2 = ns0;
+        //le 2-eme sommet de la derniere arete est le premier sommet de la ligne
+        ns2 = ns0;
 
       //l'arete precedente est dotee de sa suivante:celle cree ensuite
       //les 2 coordonnees du sommet ns2 de la ligne
@@ -302,7 +302,7 @@ void  aptrte( Z   nutysu, R      aretmx,
       mnpxyd[ns].y = uvslf[ns].y;
       mnpxyd[ns].z = areteideale();//( mnpxyd[ns], direction );
 //       MESSAGE("Sommet " << ns << ": " << mnpxyd[ns].x
-//        << " " << mnpxyd[ns].y << " longueur arete=" << mnpxyd[ns].z);
+//         << " " << mnpxyd[ns].y << " longueur arete=" << mnpxyd[ns].z);
 
       //carre de la longueur de l'arete
       d = pow( uvslf[ns2-1].x - uvslf[ns1-1].x, 2) 
@@ -323,8 +323,8 @@ void  aptrte( Z   nutysu, R      aretmx,
 
       //ajout de l'arete dans la liste
       fasoar( ns1, ns2, moins1, moins1, n,
-              mosoar, mxsoar, n1soar, mnsoar,
-              mnarst, noar, ierr );
+               mosoar, mxsoar, n1soar, mnsoar,
+               mnarst, noar, ierr );
       //pas de test sur ierr car pas de saturation possible a ce niveau
 
       //chainage des aretes frontalieres en position 6 du tableau mnsoar
@@ -368,7 +368,7 @@ void  aptrte( Z   nutysu, R      aretmx,
 
   MESSAGE("Sur  le  bord: arete min=" << aremin << " arete max=" << aremax );
   MESSAGE("Triangulation: arete mx=" << aretmx
-         << " triangle aire mx=" << airemx );
+          << " triangle aire mx=" << airemx );
 
   //chainage des aretes frontalieres : la derniere arete frontaliere
   mnsoar[ mosoar * noar - mosoar + 5 ] = 0;
@@ -444,9 +444,9 @@ void  aptrte( Z   nutysu, R      aretmx,
   if( mnqueu==NULL) goto ERREUR;
 
   tehote( nutysu, nbarpi, mxsomm, nbsomm, mnpxyd,
-          comxmi, aretmx,
-          mntree, mxqueu, mnqueu,
-          ierr );
+           comxmi, aretmx,
+           mntree, mxqueu, mnqueu,
+           ierr );
 
   deltacpu_( d );
   tcpu += d;
@@ -471,9 +471,9 @@ void  aptrte( Z   nutysu, R      aretmx,
   // et des points de la frontiere, des points internes imposes interieurs
   // ==========================================================================
   tetrte( comxmi, aretmx, nbarpi, mxsomm, mnpxyd,
-          mxqueu, mnqueu, mntree, mosoar, mxsoar, n1soar, mnsoar,
-          moartr, mxartr, n1artr, mnartr, mnarst,
-          ierr );
+           mxqueu, mnqueu, mntree, mosoar, mxsoar, n1soar, mnsoar,
+           moartr, mxartr, n1artr, mnartr, mnarst,
+           ierr );
 
   // destruction de la queue et de l'arbre devenus inutiles
   delete [] mnqueu;  mnqueu=NULL;
@@ -493,7 +493,7 @@ void  aptrte( Z   nutysu, R      aretmx,
 
   //qualites de la triangulation actuelle
   qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr,
-               nbt, quamoy, quamin );
+                nbt, quamoy, quamin );
 
   // boucle sur les aretes internes (non sur une ligne de la frontiere)
   // avec echange des 2 diagonales afin de rendre la triangulation delaunay
@@ -501,8 +501,8 @@ void  aptrte( Z   nutysu, R      aretmx,
   // formation du chainage 6 des aretes internes a echanger eventuellement
   aisoar( mosoar, mxsoar, mnsoar, na );
   tedela( mnpxyd, mnarst,
-          mosoar, mxsoar, n1soar, mnsoar, na,
-          moartr, mxartr, n1artr, mnartr, n );
+           mosoar, mxsoar, n1soar, mnsoar, na,
+           moartr, mxartr, n1artr, mnartr, n );
 
   MESSAGE( "Nombre d'echanges des diagonales de 2 triangles=" << n );
   deltacpu_( d );
@@ -512,7 +512,7 @@ void  aptrte( Z   nutysu, R      aretmx,
 
   //qualites de la triangulation actuelle
   qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr,
-               nbt, quamoy, quamin );
+                nbt, quamoy, quamin );
 
   // detection des aretes frontalieres initiales perdues
   // triangulation frontale pour les restaurer
@@ -532,10 +532,10 @@ void  aptrte( Z   nutysu, R      aretmx,
   if( mnarcf2 == NULL ) goto ERREUR;
 
   terefr( nbarpi, mnpxyd,
-          mosoar, mxsoar, n1soar, mnsoar,
-          moartr, mxartr, n1artr, mnartr, mnarst,
-          mxarcf, mn1arcf, mnarcf, mnarcf1, mnarcf2,
-          n, ierr );
+           mosoar, mxsoar, n1soar, mnsoar,
+           moartr, mxartr, n1artr, mnartr, mnarst,
+           mxarcf, mn1arcf, mnarcf, mnarcf1, mnarcf2,
+           n, ierr );
 
   MESSAGE( "Restauration de " << n << " aretes perdues de la frontiere  ierr=" << ierr );
   deltacpu_( d );
@@ -547,7 +547,7 @@ void  aptrte( Z   nutysu, R      aretmx,
 
   //qualites de la triangulation actuelle
   qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr,
-               nbt, quamoy, quamin );
+                nbt, quamoy, quamin );
 
   // fin de la triangulation avec respect des aretes initiales frontalieres
 
@@ -573,10 +573,10 @@ void  aptrte( Z   nutysu, R      aretmx,
     mnlftr[n] = n+1;
 
   tesuex( nblf,   mnlftr,
-          ndtri0, nbsomm, mnpxyd, mnslig,
-          mosoar, mxsoar, mnsoar,
-          moartr, mxartr, n1artr, mnartr, mnarst,
-          nbt, mntrsu, ierr );
+           ndtri0, nbsomm, mnpxyd, mnslig,
+           mosoar, mxsoar, mnsoar,
+           moartr, mxartr, n1artr, mnartr, mnarst,
+           nbt, mntrsu, ierr );
 
   delete [] mnlftr; mnlftr=NULL;
   delete [] mntrsu; mntrsu=NULL;
@@ -588,7 +588,7 @@ void  aptrte( Z   nutysu, R      aretmx,
 
   //qualites de la triangulation actuelle
   qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr,
-               nbt, quamoy, quamin );
+                nbt, quamoy, quamin );
 
   // amelioration de la qualite de la triangulation par
   // barycentrage des sommets internes a la triangulation
@@ -603,12 +603,12 @@ void  aptrte( Z   nutysu, R      aretmx,
     goto ERREUR;
   }
   teamqt( nutysu,  aretmx,  airemx,
-          mnarst,  mosoar,  mxsoar, n1soar, mnsoar,
-          moartr,  mxartr,  n1artr, mnartr,
-          mxarcf,  mnarcf2, mnarcf3,
-          mn1arcf, mnarcf,  mnarcf1,
-          nbarpi,  nbsomm, mxsomm, mnpxyd, mnslig,
-          ierr );
+           mnarst,  mosoar,  mxsoar, n1soar, mnsoar,
+           moartr,  mxartr,  n1artr, mnartr,
+           mxarcf,  mnarcf2, mnarcf3,
+           mn1arcf, mnarcf,  mnarcf1,
+           nbarpi,  nbsomm, mxsomm, mnpxyd, mnslig,
+           ierr );
   if( mnarcf3 != NULL ) {delete [] mnarcf3; mnarcf3=NULL;}
   if( mn1arcf != NULL ) {delete [] mn1arcf; mn1arcf=NULL;}
   if( mnarcf  != NULL ) {delete [] mnarcf;  mnarcf =NULL;}
@@ -623,7 +623,7 @@ void  aptrte( Z   nutysu, R      aretmx,
 
   //qualites de la triangulation finale
   qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr,
-               nbt, quamoy, quamin );
+                nbt, quamoy, quamin );
 
   // renumerotation des sommets internes: mnarst(i)=numero final du sommet
   // ===================================
@@ -669,22 +669,22 @@ void  aptrte( Z   nutysu, R      aretmx,
       n = mnslig[i];
       if( n > 0 )
       {
-       if( n >= 1000000 )
-       {
-         //sommet d'une ligne
-         //retour aux coordonnees initiales dans uvslf
-         l = n / 1000000;
-         n = n - 1000000 * l + nudslf[l-1] - 1;
-         uvst[nbst].x = uvslf[n].x;
-         uvst[nbst].y = uvslf[n].y;
-       }
-       else
-       {
-         //point utilisateur n interne impose
-         //retour aux coordonnees initiales dans uvpti
-         uvst[nbst].x = uvpti[n-1].x;
-         uvst[nbst].y = uvpti[n-1].y;
-       }
+        if( n >= 1000000 )
+        {
+          //sommet d'une ligne
+          //retour aux coordonnees initiales dans uvslf
+          l = n / 1000000;
+          n = n - 1000000 * l + nudslf[l-1] - 1;
+          uvst[nbst].x = uvslf[n].x;
+          uvst[nbst].y = uvslf[n].y;
+        }
+        else
+        {
+          //point utilisateur n interne impose
+          //retour aux coordonnees initiales dans uvpti
+          uvst[nbst].x = uvpti[n-1].x;
+          uvst[nbst].y = uvpti[n-1].y;
+        }
       }
     }
   }
@@ -712,7 +712,7 @@ void  aptrte( Z   nutysu, R      aretmx,
   }
   nbt /= nbsttria;  //le nombre final de triangles de la surface
   MESSAGE( "APTRTE: Fin de la triangulation plane avec "<<nbst<<" sommets et "
-          << nbt << " triangles" );
+           << nbt << " triangles" );
   deltacpu_( d );
   tcpu += d;
   MESSAGE( "APTRTE: Temps total de la triangulation plane=" << tcpu << " secondes" );
@@ -759,9 +759,9 @@ void
 #endif
 #endif
  qualitetrte( R3 *mnpxyd,
-                  Z & mosoar, Z & mxsoar, Z *mnsoar,
-                  Z & moartr, Z & mxartr, Z *mnartr,
-                  Z & nbtria, R & quamoy, R & quamin )
+                   Z & mosoar, Z & mxsoar, Z *mnsoar,
+                   Z & moartr, Z & mxartr, Z *mnartr,
+                   Z & nbtria, R & quamoy, R & quamin )
 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 // but :    calculer la qualite moyenne et minimale de la triangulation
 // -----    actuelle definie par les tableaux mnsoar et mnartr
@@ -815,7 +815,7 @@ void
 
       //la qualite du triangle ns1 ns2 ns3
       qutr2d( mnpxyd[nosotr[0]-1], mnpxyd[nosotr[1]-1], mnpxyd[nosotr[2]-1],
-              qualite );
+               qualite );
 
       //la qualite moyenne
       quamoy += qualite;
@@ -831,11 +831,11 @@ void
       d = surtd2( mnpxyd[nosotr[0]-1], mnpxyd[nosotr[1]-1], mnpxyd[nosotr[2]-1] );
       if( d<0 )
       {
-       //un triangle d'aire negative de plus
-       nbtrianeg++;
-       MESSAGE("ATTENTION: le triangle " << nt << " de sommets:"
-            << nosotr[0] << " " << nosotr[1] << " " << nosotr[2]
-            << " a une aire " << d <<"<=0");
+        //un triangle d'aire negative de plus
+        nbtrianeg++;
+        MESSAGE("ATTENTION: le triangle " << nt << " de sommets:"
+             << nosotr[0] << " " << nosotr[1] << " " << nosotr[2]
+             << " a une aire " << d <<"<=0");
       }
 
       //aire des triangles actuels
@@ -858,7 +858,7 @@ void
             <<nosotr[0]<<" "<<nosotr[1]<<" "<<nosotr[2]<<" ");
     for (int i=0;i<3;i++)
       MESSAGE("Sommet "<<nosotr[i]<<": x="<< mnpxyd[nosotr[i]-1].x
-             <<" y="<< mnpxyd[nosotr[i]-1].y);
+              <<" y="<< mnpxyd[nosotr[i]-1].y);
   }
 
   if( nbtrianeg>0 )
index a1f11cb8083f0c60199e34bf9eea3f3ef578a377..37a867ade257984f3516364069b7f696a6c40385 100755 (executable)
 
 MEFISTO2D_EXPORT
   void  aptrte( Z nutysu, R aretmx,
-             Z nblf,   Z *nudslf, R2 *uvslf,
-             Z nbpti,  R2 *uvpti,
-             Z & nbst, R2 * & uvst, Z & nbt, Z * & nust,
-             Z & ierr );
+              Z nblf,   Z *nudslf, R2 *uvslf,
+              Z nbpti,  R2 *uvpti,
+              Z & nbst, R2 * & uvst, Z & nbt, Z * & nust,
+              Z & ierr );
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 // but : appel de la triangulation par un arbre-4 recouvrant
 // ----- de triangles equilateraux
@@ -126,7 +126,7 @@ MEFISTO2D_EXPORT
   #define nusotr   NUSOTR
   #define qutr2d   QUTR2D
   #define surtd2   SURTD2
-  #define qualitetrte  QUALITETRTE
+  #define qualitetrte   QUALITETRTE
   
   #define areteideale ARETEIDEALE
   
@@ -162,9 +162,9 @@ extern "C" { void
 #endif
 #endif
    qualitetrte( R3 *mnpxyd,
-                  Z & mosoar, Z & mxsoar, Z *mnsoar,
-                  Z & moartr, Z & mxartr, Z *mnartr,
-                  Z & nbtria, R & quamoy, R & quamin ); }
+                   Z & mosoar, Z & mxsoar, Z *mnsoar,
+                   Z & moartr, Z & mxartr, Z *mnartr,
+                   Z & nbtria, R & quamoy, R & quamin ); }
 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 // but :    calculer la qualite moyenne et minimale de la triangulation
 // -----    actuelle definie par les tableaux nosoar et noartr
@@ -248,8 +248,8 @@ extern "C" {void
 #endif
 #endif
   fasoar( Z & ns1, Z & ns2, Z & nt1, Z & nt2, Z & nolign,
-                         Z & mosoar,  Z & mxsoar,  Z & n1soar,  Z * mnsoar,  Z * mnarst,
-                         Z & noar, Z & ierr );
+                          Z & mosoar,  Z & mxsoar,  Z & n1soar,  Z * mnsoar,  Z * mnarst,
+                          Z & noar, Z & ierr );
 }
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 // but :    former l'arete de sommet ns1-ns2 dans le hachage du tableau
@@ -303,8 +303,8 @@ extern "C" {void
 #endif
 #endif
   teajte( Z & mxsomm, Z &  nbsomm, R3 * mnpxyd,  R3 * comxmi,
-                           R & aretmx,  Z & mxtree, Z * letree,
-                           Z & ierr );
+                            R & aretmx,  Z & mxtree, Z * letree,
+                            Z & ierr );
 }
 
 extern "C" {void
@@ -315,9 +315,9 @@ extern "C" {void
 #endif
 #endif
   tehote( Z & nutysu, Z & nbarpi, Z &  mxsomm, Z &  nbsomm, R3 * mnpxyd,
-                           R3 * comxmi, R & aretmx,
-                           Z * letree, Z & mxqueu, Z * mnqueu,
-                           Z & ierr );
+                            R3 * comxmi, R & aretmx,
+                            Z * letree, Z & mxqueu, Z * mnqueu,
+                            Z & ierr );
 }
 // homogeneisation de l'arbre des te a un saut de taille au plus
 // prise en compte des tailles d'aretes souhaitees autour des sommets initiaux
@@ -330,10 +330,10 @@ extern "C" {void
 #endif
 #endif
   tetrte( R3 * comxmi, R & aretmx, Z & nbarpi, Z & mxsomm, R3 * mnpxyd,
-                           Z & mxqueu,  Z * mnqueu,  Z * mntree,
-                           Z & mosoar,  Z & mxsoar,  Z & n1soar, Z * mnsoar,
-                           Z & moartr, Z &  mxartr,  Z & n1artr,  Z * mnartr,  Z * mnarst,
-                           Z & ierr );
+                            Z & mxqueu,  Z * mnqueu,  Z * mntree,
+                            Z & mosoar,  Z & mxsoar,  Z & n1soar, Z * mnsoar,
+                            Z & moartr, Z &  mxartr,  Z & n1artr,  Z * mnartr,  Z * mnarst,
+                            Z & ierr );
 }
 // trianguler les triangles equilateraux feuilles a partir de leurs 3 sommets
 // et des points de la frontiere, des points internes imposes interieurs
@@ -357,8 +357,8 @@ extern "C" {void
 #endif
 #endif
   tedela( R3 * mnpxyd, Z * mnarst,
-                           Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar, Z & na,
-                           Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z & n );
+                            Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar, Z & na,
+                            Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z & n );
 }
 // boucle sur les aretes internes (non sur une ligne de la frontiere)
 // avec echange des 2 diagonales afin de rendre la triangulation delaunay
@@ -371,11 +371,11 @@ extern "C" {void
 #endif
 #endif
   terefr( Z & nbarpi, R3 * mnpxyd,
-                           Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar,
-                           Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst,
-                           Z & mxarcf, Z * mnarc1, Z * mnarc2,
-                           Z * mnarc3, Z * mnarc4,
-                           Z & n, Z & ierr );
+                            Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar,
+                            Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst,
+                            Z & mxarcf, Z * mnarc1, Z * mnarc2,
+                            Z * mnarc3, Z * mnarc4,
+                            Z & n, Z & ierr );
 }
 // detection des aretes frontalieres initiales perdues
 // triangulation frontale pour les restaurer
@@ -388,10 +388,10 @@ extern "C" {void
 #endif
 #endif
   tesuex( Z & nblf, Z * nulftr,
-                           Z & ndtri0, Z & nbsomm, R3 * mnpxyd, Z * mnslig,
-                           Z & mosoar, Z & mxsoar, Z * mnsoar,
-                           Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst,
-                           Z & nbtria, Z * mntrsu, Z & ierr );
+                            Z & ndtri0, Z & nbsomm, R3 * mnpxyd, Z * mnslig,
+                            Z & mosoar, Z & mxsoar, Z * mnsoar,
+                            Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr, Z * mnarst,
+                            Z & nbtria, Z * mntrsu, Z & ierr );
 }
 // suppression des triangles externes a la surface
 
@@ -403,13 +403,13 @@ extern "C" {void
 #endif
 #endif
   teamqt( Z & nutysu, R & aretmx, R & airemx,
-                           Z * mnarst, Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar,
-                           Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr,
-                           Z & mxarcf, Z * mntrcf, Z * mnstbo,
-                           Z * n1arcf, Z * mnarcf, Z * mnarc1,
-                           Z & nbarpi, Z & nbsomm, Z & mxsomm,
-                           R3 * mnpxyd, Z * mnslig,
-                           Z & ierr );
+                            Z * mnarst, Z & mosoar, Z & mxsoar, Z & n1soar, Z * mnsoar,
+                            Z & moartr, Z & mxartr, Z & n1artr, Z * mnartr,
+                            Z & mxarcf, Z * mntrcf, Z * mnstbo,
+                            Z * n1arcf, Z * mnarcf, Z * mnarc1,
+                            Z & nbarpi, Z & nbsomm, Z & mxsomm,
+                            R3 * mnpxyd, Z * mnslig,
+                            Z & ierr );
 }
 // amelioration de la qualite de la triangulation par
 // barycentrage des sommets internes a la triangulation
index 51c76c599a6f482533b640ff1a722ed197ae46c9..c77ff62a03aa9ffef69e0b393876449deb704594 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : Makefile.in
 #  Author : Patrick GOLDBRONN (CEA)
 #  Modified by : Alexander BORODIN (OCN) - autotools usage
@@ -49,10 +47,11 @@ if SMESH_ENABLE_GUI
        OBJECT \
        SMESHFiltersSelection \
        SMESHGUI \
+       PluginUtils \
        SMESH_SWIG_WITHIHM \
        StdMeshersGUI
 endif
 
 DIST_SUBDIRS =         SMDS SMESHDS Controls Driver DriverMED DriverDAT DriverUNV DriverSTL SMESH      \
                SMESH_I SMESHClient SMESH_SWIG MEFISTO2 StdMeshers StdMeshers_I OBJECT          \
-               SMESHFiltersSelection SMESHGUI SMESH_SWIG_WITHIHM StdMeshersGUI
+               SMESHFiltersSelection SMESHGUI PluginUtils SMESH_SWIG_WITHIHM StdMeshersGUI
index 34520f8289ed873912bb0a5b3c55a4b16fae1e4f..64d4d9b2d8e13c2edc32f07470aa07b3fc22e67b 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH OBJECT : interactive object for SMESH visualization
 #  File   : Makefile.in
 #  Modified by : Alexander BORODIN (OCN) - autotools usage
index 7a37d65410b17301f6db14ab0fb145891d3ea17f..cd9e0691967992a98cc2b113fd863498a0c67211 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH OBJECT : interactive object for SMESH visualization
 //  File   : SMESH_Actor.cxx
 //  Author : Nicolas REJNERI
 //  Module : SMESH
-
-
+//
 #include "SMESH_ActorDef.h"
 #include "SMESH_ActorUtils.h"
 #include "SMESH_DeviceActor.h"
@@ -86,7 +86,6 @@ static int MYDEBUG = 0;
 #endif
 
 static int aLineWidthInc = 2;
-static int aPointSizeInc = 2;
 
 
 SMESH_ActorDef* SMESH_ActorDef::New(){
@@ -129,7 +128,6 @@ SMESH_ActorDef::SMESH_ActorDef()
   if ( mgr && mgr->booleanValue( "SMESH", "use_precision", false ) )
     myControlsPrecision = mgr->integerValue( "SMESH", "controls_precision", -1);
 
-  vtkFloatingPointType aPointSize  = SMESH::GetFloat("SMESH:node_size",3);
   vtkFloatingPointType aElem0DSize = SMESH::GetFloat("SMESH:elem0d_size",5);
   vtkFloatingPointType aLineWidth  = SMESH::GetFloat("SMESH:element_width",1);
 
@@ -224,7 +222,7 @@ SMESH_ActorDef::SMESH_ActorDef()
   my1DProp = vtkProperty::New();
   my1DProp->DeepCopy(myEdgeProp);
   my1DProp->SetLineWidth(aLineWidth + aLineWidthInc);
-  my1DProp->SetPointSize(aPointSize);
+  my1DProp->SetPointSize(aElem0DSize);
   
   my1DExtProp = vtkProperty::New();
   my1DExtProp->DeepCopy(myEdgeProp);
@@ -233,7 +231,7 @@ SMESH_ActorDef::SMESH_ActorDef()
   anRGB[2] = 1 - anRGB[2];
   my1DExtProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
   my1DExtProp->SetLineWidth(aLineWidth + aLineWidthInc);
-  my1DExtProp->SetPointSize(aPointSize + aPointSizeInc);
+  my1DExtProp->SetPointSize(aElem0DSize);
 
   my1DExtActor = SMESH_DeviceActor::New();
   my1DExtActor->SetUserMatrix(aMatrix);
@@ -294,7 +292,6 @@ SMESH_ActorDef::SMESH_ActorDef()
   myNodeProp = vtkProperty::New();
   SMESH::GetColor( "SMESH", "node_color", anRGB[0], anRGB[1], anRGB[2], QColor( 255, 0, 0 ) );
   myNodeProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
-  myNodeProp->SetPointSize(aPointSize);
 
   myNodeActor = SMESH_DeviceActor::New();
   myNodeActor->SetUserMatrix(aMatrix);
@@ -312,7 +309,6 @@ SMESH_ActorDef::SMESH_ActorDef()
   anRGB[1] = 1 - anRGB[1];
   anRGB[2] = 1 - anRGB[2];
   myNodeExtProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
-  myNodeExtProp->SetPointSize(aPointSize);
 
   myNodeExtActor = SMESH_DeviceActor::New();
   myNodeExtActor->SetUserMatrix(aMatrix);
@@ -342,8 +338,7 @@ SMESH_ActorDef::SMESH_ActorDef()
   myHighlightProp->SetSpecular(0.0);
   SMESH::GetColor( "SMESH", "selection_object_color", anRGB[0], anRGB[1], anRGB[2], QColor( 255, 255, 255 ) );
   myHighlightProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
-  //myHighlightProp->SetPointSize(aPointSize);
-  myHighlightProp->SetPointSize(std::max(aElem0DSize,aPointSize)); // ??
+  myHighlightProp->SetPointSize(aElem0DSize); // ??
   myHighlightProp->SetRepresentation(1);
 
   myPreselectProp = vtkProperty::New();
@@ -352,8 +347,7 @@ SMESH_ActorDef::SMESH_ActorDef()
   myPreselectProp->SetSpecular(0.0);
   SMESH::GetColor( "SMESH", "highlight_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 255, 255 ) );
   myPreselectProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
-  //myPreselectProp->SetPointSize(aPointSize);
-  myPreselectProp->SetPointSize(std::max(aElem0DSize,aPointSize)); // ??
+  myPreselectProp->SetPointSize(aElem0DSize); // ??
   myPreselectProp->SetRepresentation(1);
 
   myHighlitableActor = SMESH_DeviceActor::New();
@@ -404,9 +398,7 @@ SMESH_ActorDef::SMESH_ActorDef()
     
   myPtsLabeledDataMapper = vtkLabeledDataMapper::New();
   myPtsLabeledDataMapper->SetInput(myPtsSelectVisiblePoints->GetOutput());
-#if (VTK_XVERSION >= 0x050200)
-  myPtsLabeledDataMapper->SetLabelFormat("%d");
-#else
+#if (VTK_XVERSION < 0x050200)
   myPtsLabeledDataMapper->SetLabelFormat("%g");
 #endif
   myPtsLabeledDataMapper->SetLabelModeToLabelScalars();
@@ -449,9 +441,7 @@ SMESH_ActorDef::SMESH_ActorDef()
     
   myClsLabeledDataMapper = vtkLabeledDataMapper::New();
   myClsLabeledDataMapper->SetInput(myClsSelectVisiblePoints->GetOutput());
-#if (VTK_XVERSION >= 0x050200)
-  myClsLabeledDataMapper->SetLabelFormat("%d");
-#else
+#if (VTK_XVERSION < 0x050200)
   myClsLabeledDataMapper->SetLabelFormat("%g");
 #endif
   myClsLabeledDataMapper->SetLabelModeToLabelScalars();
@@ -665,6 +655,39 @@ bool SMESH_ActorDef::GetFacesOriented()
   return myIsFacesOriented;
 }
 
+void SMESH_ActorDef::SetFacesOrientationColor(vtkFloatingPointType theColor[3])
+{
+  my2DActor->SetFacesOrientationColor( theColor );
+  my3DActor->SetFacesOrientationColor( theColor );
+}
+
+void SMESH_ActorDef::GetFacesOrientationColor(vtkFloatingPointType theColor[3])
+{
+  my3DActor->GetFacesOrientationColor( theColor );
+}
+
+void SMESH_ActorDef::SetFacesOrientationScale(vtkFloatingPointType theScale)
+{
+  my2DActor->SetFacesOrientationScale( theScale );
+  my3DActor->SetFacesOrientationScale( theScale );
+}
+
+vtkFloatingPointType SMESH_ActorDef::GetFacesOrientationScale()
+{
+  return my3DActor->GetFacesOrientationScale();
+}
+
+void SMESH_ActorDef::SetFacesOrientation3DVectors(bool theState)
+{
+  my2DActor->SetFacesOrientation3DVectors( theState );
+  my3DActor->SetFacesOrientation3DVectors( theState );
+}
+
+bool SMESH_ActorDef::GetFacesOrientation3DVectors()
+{
+  return my3DActor->GetFacesOrientation3DVectors();
+}
+
 
 void 
 SMESH_ActorDef::
@@ -858,8 +881,6 @@ SetControlMode(eControl theMode,
 
 
 void SMESH_ActorDef::AddToRender(vtkRenderer* theRenderer){
-  SALOME_Actor::AddToRender(theRenderer);
-
   theRenderer->AddActor(myNodeActor);
   theRenderer->AddActor(myBaseActor);
   
@@ -884,6 +905,10 @@ void SMESH_ActorDef::AddToRender(vtkRenderer* theRenderer){
 
   theRenderer->AddActor2D(myPointLabels);
   theRenderer->AddActor2D(myCellsLabels);
+
+  // the superclass' method should be called at the end
+  // (in particular, for correct work of selection)
+  SALOME_Actor::AddToRender(theRenderer);
 }
 
 void SMESH_ActorDef::RemoveFromRender(vtkRenderer* theRenderer){
@@ -983,6 +1008,10 @@ bool SMESH_ActorDef::Init(TVisualObjPtr theVisualObj,
   if( dynamic_cast<SMESH_GroupObj*>( myVisualObj.get() ) )
     SetIsDisplayNameActor( true );
 
+  int aMarkerType = mgr->integerValue( "SMESH", "type_of_marker", 1 ); // dot
+  int aMarkerScale = mgr->integerValue( "SMESH", "marker_scale", 9 );  // 5 pixels
+  SetMarkerStd( (VTK::MarkerType)aMarkerType, (VTK::MarkerScale)aMarkerScale );
+
   myTimeStamp->Modified();
   Modified();
   return true;
@@ -1190,15 +1219,15 @@ void SMESH_ActorDef::SetVisibility(int theMode, bool theIsUpdateRepersentation){
       my0DActor->VisibilityOn();
     }
 
-    if(myEntityMode & eEdges){
+    if(myEntityMode & eEdges && GetRepresentation() != ePoint){
       my1DActor->VisibilityOn();
     }
     
-    if(myEntityMode & eFaces){
+    if(myEntityMode & eFaces && GetRepresentation() != ePoint){
       my2DActor->VisibilityOn();
     }
     
-    if(myEntityMode & eVolumes){
+    if(myEntityMode & eVolumes && GetRepresentation() != ePoint){
       my3DActor->VisibilityOn();
     }
     
@@ -1263,11 +1292,7 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode)
 
   VTKViewer_ExtractUnstructuredGrid* aHightFilter = myHighlitableActor->GetExtractUnstructuredGrid();
   aHightFilter->ClearRegisteredCellsWithType();
-
-  // The following row has been commented (initially added in 1.28.2.3.1 revision)
-  // Reason: seems to be unnecessary, this filter should always have default (ePassAll) mode of changing
-  // In addition, it leads to exception (see bug IPAL21372)
-  //aHightFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
+  aHightFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
 
   if (myEntityMode & e0DElements) {
     if (MYDEBUG) MESSAGE("0D ELEMENTS");
@@ -1483,6 +1508,12 @@ void SMESH_ActorDef::UpdateHighlight(){
         SetModeOfExtraction(VTKViewer_ExtractUnstructuredGrid::ePoints);
       myHighlitableActor->SetVisibility(anIsVisible);
       myHighlitableActor->SetRepresentation(SMESH_DeviceActor::ePoint);
+
+      VTK::MarkerType aMarkerType = GetMarkerType();
+      if(aMarkerType != VTK::MT_USER)
+        myHighlitableActor->SetMarkerStd(aMarkerType, GetMarkerScale());
+      else
+        myHighlitableActor->SetMarkerTexture(GetMarkerTexture(), myMarkerTexture);
     }
   }
 }
@@ -1644,6 +1675,18 @@ void SMESH_ActorDef::GetNodeColor(vtkFloatingPointType& r,vtkFloatingPointType&
   ::GetColor(myNodeProp,r,g,b);
 }
 
+void SMESH_ActorDef::Set0DColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){ 
+  my0DProp->SetColor(r,g,b);
+  if( SMESH_GroupObj* aGroupObj = dynamic_cast<SMESH_GroupObj*>( myVisualObj.get() ) )
+    if( aGroupObj->GetElementType() == SMDSAbs_0DElement )
+      myNameActor->SetBackgroundColor(r,g,b);
+  Modified();
+}
+
+void SMESH_ActorDef::Get0DColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){ 
+  ::GetColor(my0DProp,r,g,b);
+}
+
 void SMESH_ActorDef::SetHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){ 
   myHighlightProp->SetColor(r,g,b);
   Modified();
@@ -1678,24 +1721,13 @@ void SMESH_ActorDef::SetLineWidth(vtkFloatingPointType theVal){
 }
 
 
-void SMESH_ActorDef::SetNodeSize(vtkFloatingPointType theVal){
-  myNodeProp->SetPointSize(theVal);
-  myNodeExtProp->SetPointSize(theVal);
-
-  vtkFloatingPointType aPointSize = my0DProp->GetPointSize() > theVal ? my0DProp->GetPointSize() : theVal;
-  //myHighlightProp->SetPointSize(theVal);
-  myHighlightProp->SetPointSize(aPointSize); // ??
-  //myPreselectProp->SetPointSize(theVal);
-  myPreselectProp->SetPointSize(aPointSize); // ??
-
-  my1DProp->SetPointSize(theVal + aPointSizeInc);
-  my1DExtProp->SetPointSize(theVal + aPointSizeInc);
-
+void SMESH_ActorDef::Set0DSize(vtkFloatingPointType theVal){
+  my0DProp->SetPointSize(theVal);
   Modified();
 }
 
-vtkFloatingPointType SMESH_ActorDef::GetNodeSize(){
-  return myNodeProp->GetPointSize();
+vtkFloatingPointType SMESH_ActorDef::Get0DSize(){
+  return my0DProp->GetPointSize();
 }
 
 int SMESH_ActorDef::GetObjDimension( const int theObjId )
@@ -1999,3 +2031,18 @@ SMESH_Actor::EQuadratic2DRepresentation SMESH_ActorDef::GetQuadratic2DRepresenta
   else
     return SMESH_Actor::eLines;
 }
+
+void SMESH_ActorDef::SetMarkerStd( VTK::MarkerType theMarkerType, VTK::MarkerScale theMarkerScale )
+{
+  SALOME_Actor::SetMarkerStd( theMarkerType, theMarkerScale );
+  myNodeActor->SetMarkerStd( theMarkerType, theMarkerScale );
+  myNodeExtActor->SetMarkerStd( theMarkerType, theMarkerScale );
+}
+
+void SMESH_ActorDef::SetMarkerTexture( int theMarkerId, VTK::MarkerTexture theMarkerTexture )
+{
+  SALOME_Actor::SetMarkerTexture( theMarkerId, theMarkerTexture );
+  myNodeActor->SetMarkerTexture( theMarkerId, theMarkerTexture );
+  myNodeExtActor->SetMarkerTexture( theMarkerId, theMarkerTexture );
+  myMarkerTexture = theMarkerTexture; // for deferred update of myHighlightActor
+}
index 89f4fc51acf9814560b0d56b40ab9cdd110ddd35..bb4e2fb68a2e7a58d89d41688cc76ce65e97fdbe 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH OBJECT : interactive object for SMESH visualization
 //  File   : SMESH_Actor.h
 //  Author : Nicolas REJNERI
 //  Module : SMESH
-
+//
 #ifndef SMESH_ACTOR_H
 #define SMESH_ACTOR_H
 
@@ -60,6 +61,9 @@ class SMESHOBJECT_EXPORT SMESH_Actor: public SALOME_Actor
   virtual void SetNodeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
   virtual void GetNodeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
 
+  virtual void Set0DColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
+  virtual void Get0DColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
+
   virtual void SetHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
   virtual void GetHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
 
@@ -69,8 +73,8 @@ class SMESHOBJECT_EXPORT SMESH_Actor: public SALOME_Actor
   virtual vtkFloatingPointType GetLineWidth() = 0;
   virtual void SetLineWidth(vtkFloatingPointType theVal) = 0;
 
-  virtual void SetNodeSize(vtkFloatingPointType size) = 0;
-  virtual vtkFloatingPointType GetNodeSize() = 0;
+  virtual void Set0DSize(vtkFloatingPointType size) = 0;
+  virtual vtkFloatingPointType Get0DSize() = 0;
 
   enum EReperesent { ePoint, eEdge, eSurface};
   
@@ -100,6 +104,15 @@ class SMESHOBJECT_EXPORT SMESH_Actor: public SALOME_Actor
   virtual void SetFacesOriented(bool theIsFacesOriented) = 0;
   virtual bool GetFacesOriented() = 0;
 
+  virtual void SetFacesOrientationColor(vtkFloatingPointType theColor[3]) = 0;
+  virtual void GetFacesOrientationColor(vtkFloatingPointType theColor[3]) = 0;
+
+  virtual void SetFacesOrientationScale(vtkFloatingPointType theScale) = 0;
+  virtual vtkFloatingPointType GetFacesOrientationScale() = 0;
+
+  virtual void SetFacesOrientation3DVectors(bool theState) = 0;
+  virtual bool GetFacesOrientation3DVectors() = 0;
+
   enum eControl{eNone, eLength, eLength2D, eFreeBorders, eFreeEdges, eFreeNodes,
                 eFreeFaces, eMultiConnection, eArea, eTaper, eAspectRatio,
                 eMinimumAngle, eWarping, eSkew, eAspectRatio3D, eMultiConnection2D, eVolume3D};
index 98f87fd047a4603e5a129159d6b0e7449d5c8cee..e3d65ff7a50e89857a01409219da7d5a69b5b18b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH OBJECT : interactive object for SMESH visualization
 //  File   : SMESH_ActorDef.h
 //  Author : Nicolas REJNERI
 //  Module : SMESH
 //
-
 #ifndef SMESH_ACTORDEF_H
 #define SMESH_ACTORDEF_H
 
@@ -115,6 +115,9 @@ class SMESH_ActorDef : public SMESH_Actor
   virtual void SetNodeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
   virtual void GetNodeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b);
 
+  virtual void Set0DColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
+  virtual void Get0DColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b);
+
   virtual void SetHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
   virtual void GetHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b);
 
@@ -124,8 +127,8 @@ class SMESH_ActorDef : public SMESH_Actor
   virtual vtkFloatingPointType GetLineWidth();
   virtual void SetLineWidth(vtkFloatingPointType theVal);
 
-  virtual void SetNodeSize(vtkFloatingPointType size) ;
-  virtual vtkFloatingPointType GetNodeSize() ;
+  virtual void Set0DSize(vtkFloatingPointType size);
+  virtual vtkFloatingPointType Get0DSize();
 
   virtual int GetNodeObjId(int theVtkID);
   virtual vtkFloatingPointType* GetNodeCoord(int theObjID);
@@ -170,6 +173,15 @@ class SMESH_ActorDef : public SMESH_Actor
   virtual void SetFacesOriented(bool theIsFacesOriented);
   virtual bool GetFacesOriented();
 
+  virtual void SetFacesOrientationColor(vtkFloatingPointType theColor[3]);
+  virtual void GetFacesOrientationColor(vtkFloatingPointType theColor[3]);
+
+  virtual void SetFacesOrientationScale(vtkFloatingPointType theScale);
+  virtual vtkFloatingPointType GetFacesOrientationScale();
+
+  virtual void SetFacesOrientation3DVectors(bool theState);
+  virtual bool GetFacesOrientation3DVectors();
+
   virtual void SetControlMode(eControl theMode);
   virtual eControl GetControlMode(){ return myControlMode;}
 
@@ -194,6 +206,9 @@ class SMESH_ActorDef : public SMESH_Actor
   virtual void SetQuadratic2DRepresentation(EQuadratic2DRepresentation);
   virtual EQuadratic2DRepresentation GetQuadratic2DRepresentation();
   
+  virtual void SetMarkerStd( VTK::MarkerType, VTK::MarkerScale );
+  virtual void SetMarkerTexture( int, VTK::MarkerTexture );
+
  protected:
   void SetControlMode(eControl theMode, bool theCheckEntityMode);
   void SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed);
@@ -268,6 +283,8 @@ class SMESH_ActorDef : public SMESH_Actor
 
   bool myIsFacesOriented;
 
+  VTK::MarkerTexture myMarkerTexture;
+
   SMESH_ActorDef();
   ~SMESH_ActorDef();
 
index 872a30acd4290739525619f8262e4d429502d12c..6808e145e1c668b6aecff46a237e1835cf05fd7b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "SMESH_ActorUtils.h"
 
 #include "SUIT_Tools.h"
index 69451fcac9b727700d22c8359a57362ef3d087dc..b1d14be2b2828f48b71286613072fcb17459c94b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef SMESH_ACTORUTILS_H
 #define SMESH_ACTORUTILS_H
 
index 4d0626902228f86a9e23f10e27d43179e588b445..4be8cadec51d855ad2af99e58b2fdf3d1a0c9b83 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH OBJECT : interactive object for SMESH visualization
 //  File   : SMESH_DeviceActor.cxx
 //  Author : 
 //  Module : SMESH
 //
-
 #include "SMESH_DeviceActor.h"
 #include "SMESH_ExtractGeometry.h"
 #include "SMESH_ControlsDef.hxx"
 #include "SMESH_ActorUtils.h"
 #include "SMESH_FaceOrientationFilter.h"
 #include "VTKViewer_CellLocationsArray.h"
+#include "VTKViewer_PolyDataMapper.h"
 
 #include <VTKViewer_Transform.h>
 #include <VTKViewer_TransformFilter.h>
@@ -88,7 +89,7 @@ SMESH_DeviceActor
   myRepresentation = eSurface;
 
   myProperty = vtkProperty::New();
-  myMapper = vtkPolyDataMapper::New();
+  myMapper = VTKViewer_PolyDataMapper::New();
 
   vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor,
                                                                  myPolygonOffsetUnits);
@@ -625,6 +626,48 @@ SMESH_DeviceActor
   }
 }
 
+void
+SMESH_DeviceActor
+::SetFacesOrientationColor(vtkFloatingPointType theColor[3])
+{
+  myFaceOrientation->GetProperty()->SetColor( theColor );
+}
+
+void
+SMESH_DeviceActor
+::GetFacesOrientationColor(vtkFloatingPointType theColor[3])
+{
+  myFaceOrientation->GetProperty()->GetColor( theColor );
+}
+
+void
+SMESH_DeviceActor
+::SetFacesOrientationScale(vtkFloatingPointType theScale)
+{
+  myFaceOrientationFilter->SetOrientationScale( theScale );
+}
+
+vtkFloatingPointType
+SMESH_DeviceActor
+::GetFacesOrientationScale()
+{
+  return myFaceOrientationFilter->GetOrientationScale();
+}
+
+void
+SMESH_DeviceActor
+::SetFacesOrientation3DVectors(bool theState)
+{
+  myFaceOrientationFilter->Set3dVectors( theState );
+}
+
+bool
+SMESH_DeviceActor
+::GetFacesOrientation3DVectors()
+{
+  return myFaceOrientationFilter->Get3dVectors();
+}
+
 void
 SMESH_DeviceActor
 ::UpdateFaceOrientation()
@@ -661,6 +704,7 @@ SMESH_DeviceActor
     myGeomFilter->SetWireframeMode(false);
     GetProperty()->SetRepresentation(theMode);
   }
+  SetMarkerEnabled(theMode == ePoint);
   myRepresentation = theMode;
   UpdateFaceOrientation();
   GetProperty()->Modified();
@@ -859,3 +903,58 @@ void SMESH_DeviceActor::SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle){
 vtkFloatingPointType SMESH_DeviceActor::GetQuadraticArcAngle(){
   return myGeomFilter->GetQuadraticArcAngle();
 }
+
+/*!
+ * Set point marker enabled
+ * \param theMarkerEnabled flag to enable/disable point marker
+ */
+void SMESH_DeviceActor::SetMarkerEnabled( bool theMarkerEnabled )
+{
+  myMapper->SetMarkerEnabled( theMarkerEnabled );
+}
+
+/*!
+ * Set standard point marker
+ * \param theMarkerType type of the marker
+ */
+void SMESH_DeviceActor::SetMarkerStd( VTK::MarkerType theMarkerType, VTK::MarkerScale theMarkerScale )
+{
+  myMapper->SetMarkerStd( theMarkerType, theMarkerScale );
+}
+
+/*!
+ * Set custom point marker
+ * \param theMarkerId id of the marker texture
+ * \param theMarkerTexture marker texture
+ */
+void SMESH_DeviceActor::SetMarkerTexture( int theMarkerId, VTK::MarkerTexture theMarkerTexture )
+{
+  myMapper->SetMarkerTexture( theMarkerId, theMarkerTexture );
+}
+
+/*!
+ * Get type of the point marker
+ * \return type of the point marker
+ */
+VTK::MarkerType SMESH_DeviceActor::GetMarkerType()
+{
+  return myMapper->GetMarkerType();
+}
+
+/*!
+  Get scale of the point marker
+  \return scale of the point marker
+*/
+VTK::MarkerScale SMESH_DeviceActor::GetMarkerScale()
+{
+  return myMapper->GetMarkerScale();
+}
+
+/*!
+ * Get texture identifier of the point marker
+ * \return texture identifier of the point marker
+ */
+int SMESH_DeviceActor::GetMarkerTexture()
+{
+  return myMapper->GetMarkerTexture();
+}
index 0b9acb48fe7886a213f04debac51d28d741ffc52..7c506bd38379926e22ca45c70b738b0292a7d8bd 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH OBJECT : interactive object for SMESH visualization
 //  File   : SMESH_DeviceActor.h
 //  Author : Nicolas REJNERI
@@ -29,6 +30,7 @@
 #define SMESH_DEVICE_ACTOR_H
 
 #include <VTKViewer_GeometryFilter.h>
+#include <VTKViewer_MarkerDef.h>
 #include "SMESH_Controls.hxx"
 #include "SMESH_Object.h"
 
@@ -39,7 +41,6 @@ class vtkCell;
 class vtkProperty;
 class vtkMergeFilter;
 class vtkShrinkFilter;
-class vtkPolyDataMapper;
 class vtkUnstructuredGrid;
 class vtkScalarBarActor;
 class vtkLookupTable;
@@ -49,6 +50,7 @@ class vtkPassThroughFilter;
 class VTKViewer_Transform;
 class VTKViewer_TransformFilter;
 class VTKViewer_ExtractUnstructuredGrid;
+class VTKViewer_PolyDataMapper;
 
 class SMESH_ExtractGeometry;
 class SMESH_FaceOrientationFilter;
@@ -77,6 +79,15 @@ class SMESHOBJECT_EXPORT SMESH_DeviceActor: public vtkLODActor{
   virtual void SetFacesOriented(bool theIsFacesOriented);
   virtual bool GetFacesOriented() { return myIsFacesOriented; }
 
+  virtual void SetFacesOrientationColor(vtkFloatingPointType theColor[3]);
+  virtual void GetFacesOrientationColor(vtkFloatingPointType theColor[3]);
+
+  virtual void SetFacesOrientationScale(vtkFloatingPointType theScale);
+  virtual vtkFloatingPointType GetFacesOrientationScale();
+
+  virtual void SetFacesOrientation3DVectors(bool theState);
+  virtual bool GetFacesOrientation3DVectors();
+
   //----------------------------------------------------------------------------
   //! Setting for displaying quadratic elements
   virtual void SetQuadraticArcMode(bool theFlag);
@@ -124,11 +135,18 @@ class SMESHOBJECT_EXPORT SMESH_DeviceActor: public vtkLODActor{
   void SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed);
   bool IsImplicitFunctionUsed() const{ return myIsImplicitFunctionUsed;}
 
+  void SetMarkerEnabled( bool );
+  void SetMarkerStd( VTK::MarkerType, VTK::MarkerScale );
+  void SetMarkerTexture( int, VTK::MarkerTexture );
+  VTK::MarkerType GetMarkerType();
+  VTK::MarkerScale GetMarkerScale();
+  int GetMarkerTexture();
+
  protected:
   void Init(TVisualObjPtr theVisualObj, vtkImplicitBoolean* theImplicitBoolean);
   void SetUnstructuredGrid(vtkUnstructuredGrid* theGrid);
 
-  vtkPolyDataMapper *myMapper;
+  VTKViewer_PolyDataMapper *myMapper;
   TVisualObjPtr myVisualObj;
 
   vtkProperty *myProperty;
index c7c63af364c2a6d136fbf75aae92922bfaacdbbd..39c3e44508607b3c9df33330eb16b7c3479f4f9b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "SMESH_ExtractGeometry.h"
 
 #include <vtkCell.h>
index f1796b098a24e3287d37e26168cc6d55f3b8bdbb..dce6c2b802444c32ace0edd275b93cc8a3021c1a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef SALOME_ExtractGeometry_HeaderFile
 #define SALOME_ExtractGeometry_HeaderFile
 
index cf09779d02985062d4d3dfa5444275ea1ee43017..9f01d0bdc6868f7ace845e4c49be869541d4b588 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "SMESH_FaceOrientationFilter.h"
 #include "SMESH_ActorUtils.h"
 
@@ -91,6 +89,19 @@ SMESH_FaceOrientationFilter::~SMESH_FaceOrientationFilter()
   myBaseGlyph->Delete();
 }
 
+void SMESH_FaceOrientationFilter::SetOrientationScale( vtkFloatingPointType theScale )
+{
+  myOrientationScale = theScale;
+  Modified();
+}
+
+void SMESH_FaceOrientationFilter::Set3dVectors( bool theState )
+{
+  my3dVectors = theState;
+  myBaseGlyph->SetSource(my3dVectors ? myArrowPolyData : myGlyphSource->GetOutput());
+  Modified();
+}
+
 vtkPolyData* SMESH_FaceOrientationFilter::CreateArrowPolyData()
 {
   vtkPoints* points = vtkPoints::New();
index d51b06b568cad684b42c9dc76a065af68ff4b01d..7a1721cb6321f88077508bf29ebd9dfb04a6c535 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef SMESH_FACEORIENTATIONFILTER_H
 #define SMESH_FACEORIENTATIONFILTER_H
 
@@ -39,6 +37,12 @@ public:
   /*!Create a new SMESH_FaceOrientationFilter.*/
   static SMESH_FaceOrientationFilter *New();
 
+  void SetOrientationScale( vtkFloatingPointType );
+  vtkFloatingPointType GetOrientationScale() const { return myOrientationScale; }
+
+  void Set3dVectors( bool );
+  bool Get3dVectors() const { return my3dVectors; }
+
 protected:
   SMESH_FaceOrientationFilter();
   virtual ~SMESH_FaceOrientationFilter();
index b9d857fad18477bd9b26832d13ef885cba1dc46c..169d2ed07b0648e36a9dfeea24bdf9627b709d37 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH OBJECT : interactive object for SMESH visualization
 //  File   : SMESH_Grid.cxx
 //  Author : Nicolas REJNERI
index 5dbf6d5ae6e8942b03d115e2dd84c5fe9444d5ae..160901d836f819f9a8a40bbcd169700e2e185124 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH OBJECT : interactive object for SMESH visualization
 //  File   : SMESH_Object.h
 //  Author : Nicolas REJNERI
index f136c3714289f4a8a02fc5e354a9fb0b401a8fa8..f8aec86be3f0d974c018ea1eb799212e5d314efa 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH OBJECT : interactive object for SMESH visualization
 //  File   : SMESH_Object.h
 //  Author : Nicolas REJNERI
index e565701dabe1d9cfc10ec8634aa0d58b20742034..d014af78c98ea1a60af3f7a07fad518daa79470f 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH OBJECT : interactive object for SMESH visualization
 //  File   : SMESH_PreviewActorsCollection.cxx
 //  Author : 
 //  Module : SMESH
 //
-
 #include "SMESH_PreviewActorsCollection.h"
 
 #include "utilities.h"
index c5b4c041a26c1d695b86fdc63811f33b93a3cd3e..470570398372b1a7b68ca0820c7436bb0941f456 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH OBJECT : interactive object for SMESH visualization
 //  File   : SMESH_PreviewActorsCollection.h
 //  Author : OCN
diff --git a/src/PluginUtils/GeomSelectionTools.cxx b/src/PluginUtils/GeomSelectionTools.cxx
new file mode 100644 (file)
index 0000000..a529733
--- /dev/null
@@ -0,0 +1,301 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// ---
+// File    : GeomSelectionTools.cxx
+// Authors : Nicolas GEIMER (OCC)
+// ---
+
+#include "GeomSelectionTools.h"
+
+#include <LightApp_SelectionMgr.h>
+#include <SalomeApp_Application.h>
+#include <SUIT_Session.h>
+
+#include <SALOME_ListIteratorOfListIO.hxx>
+#include <GEOM_Client.hxx>
+#include <SMESHGUI_Utils.h>
+#include <boost/shared_ptr.hpp>
+#include <GEOMImpl_Types.hxx>
+
+#include <TopoDS.hxx>
+#include <BRep_Tool.hxx>
+#include <Handle_Geom_Surface.hxx>
+#include <BRepAdaptor_Surface.hxx>
+
+#include "utilities.h"
+
+#include "SALOME_LifeCycleCORBA.hxx"
+#include <sstream>
+
+/*!
+ * Constructor
+ * @param aStudy pointer to the Study
+ *
+ */
+GeomSelectionTools::GeomSelectionTools(_PTR(Study) aStudy)
+{
+  myStudy = aStudy;
+}
+
+/*!
+ * Accessor to the Study used by this GeomSelectionTools object
+ * @return The study used by the GeomSelectionTools class
+ */
+_PTR(Study) GeomSelectionTools::getMyStudy()
+{
+    return myStudy;
+}
+
+/*!
+ * Allows to get the Salome Application
+ * @return A LightApp_SelectionMgr Pointer or 0 if it can't get it.
+ */
+SalomeApp_Application*  GeomSelectionTools::GetSalomeApplication()
+{
+  SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
+  if (anApp)
+    return anApp;
+  else
+    return 0;
+}
+
+/*!
+ * Allows to get the selection manager from LightApp
+ * @return A LightApp_SelectionMgr Pointer or 0 if it can't get it.
+ */
+LightApp_SelectionMgr*  GeomSelectionTools::selectionMgr()
+{
+   SalomeApp_Application* anApp = GetSalomeApplication();
+   if (anApp)
+     return dynamic_cast<LightApp_SelectionMgr*>( anApp->selectionMgr() );
+   else
+     return 0;
+}
+
+/*!
+ * Return the list of the selected Salome Interactive Object (SALOME_ListIO*)
+ * @return the list of the selected Salome Interactive Object
+ */
+SALOME_ListIO* GeomSelectionTools::getSelectedSalomeObjects()
+{
+  SALOME_ListIO* selected;
+  LightApp_SelectionMgr* aSel = selectionMgr();
+  aSel->selectedObjects( *selected, NULL, false );
+  return selected;
+}
+
+/*!
+ * Return the first selected Salome Interactive Object (Handle(Salome_InteractiveObject))
+ * @return the first selected Salome Interactive Object
+ */
+Handle(SALOME_InteractiveObject) GeomSelectionTools::getFirstSelectedSalomeObject()
+{
+  SALOME_ListIO selected;
+  LightApp_SelectionMgr* aSel = selectionMgr();
+  aSel->selectedObjects( selected, NULL, false );
+  if (!selected.IsEmpty()){
+    SALOME_ListIteratorOfListIO anIt(selected);
+    Handle(SALOME_InteractiveObject) anIO;
+    anIO = anIt.Value();
+    return anIO;
+  }
+  return NULL;
+}
+
+/*!
+ * Return the entry of the first selected Object
+ * @return the entry of the first selected Object
+ */
+std::string GeomSelectionTools::getFirstSelectedEntry()
+{
+  Handle(SALOME_InteractiveObject) anIO;
+  std::string entry="";
+  anIO=GeomSelectionTools::getFirstSelectedSalomeObject();
+  return GeomSelectionTools::getEntryOfObject(anIO);
+}
+
+/*!
+ * Return the entry of a Salome Interactive Object
+ * @param anIO the Handle of the Salome Interactive Object
+ * @return the entry of the Salome Interactive Object
+ */
+std::string GeomSelectionTools::getEntryOfObject(Handle(SALOME_InteractiveObject) anIO){
+  std::string entry="";
+  _PTR(SObject) aSO = myStudy->FindObjectID(anIO->getEntry());
+  if (aSO){
+    _PTR(SObject) aRefSObj;
+    // If selected object is a reference
+    if ( aSO->ReferencedObject( aRefSObj ))
+      entry = aRefSObj->GetID();
+    // If selected object is a reference is not a reference
+    else
+      entry= anIO->getEntry();
+  }
+  return entry;
+}
+
+/*!
+ * Retrieve the name from the entry of the object
+ * @param entry the entry of the object
+ * @return the name of the object
+ */
+std::string GeomSelectionTools::getNameFromEntry(std::string entry){
+  std::string name = "";
+  _PTR(SObject) aSO = myStudy->FindObjectID(entry);
+  if (aSO){
+    _PTR(SObject) aRefSObj;
+    // If selected object is a reference
+    if ( aSO->ReferencedObject( aRefSObj ))
+      name = aRefSObj->GetName();
+    // If selected object is a reference is not a reference
+    else
+      name = aSO->GetName();
+   }
+  return name;
+}
+
+
+/*!
+ * Retrieve the component type of the first selected object, it manages successfully references.
+ * @return the component type of the first selected object
+ */
+std::string GeomSelectionTools::getFirstSelectedComponentDataType()
+{
+  Handle(SALOME_InteractiveObject) anIO;
+  std::string DataType="";
+  anIO=GeomSelectionTools::getFirstSelectedSalomeObject();
+  _PTR(SObject) aSO = myStudy->FindObjectID(anIO->getEntry());
+  if (aSO){
+    _PTR(SObject) aRefSObj;
+    // If selected object is a reference
+    if ( aSO->ReferencedObject( aRefSObj ))
+      DataType= aRefSObj->GetFatherComponent()->ComponentDataType();
+    // If selected object is a reference is not a reference
+    else
+      DataType=anIO->getComponentDataType();
+ }
+ return DataType;
+}
+
+/*!
+ * Retrieve the shape type from the entry
+ * @return the shape type from the entry, return TopAbs_SHAPE if the object does not define a shape or a group.
+ */
+TopAbs_ShapeEnum GeomSelectionTools::entryToShapeType(std::string entry){
+//   MESSAGE("GeomSelectionTools::entryToShapeType"<<entry );
+  TopoDS_Shape S = TopoDS_Shape();
+  TopAbs_ShapeEnum ShapeType = TopAbs_SHAPE;
+   _PTR(SObject) aSO = myStudy->FindObjectID(entry);
+  if (aSO){
+    _PTR(SObject) aRefSObj;
+    GEOM::GEOM_Object_var aShape;
+    // MESSAGE("Got a SO");
+    // If selected object is a reference
+    if ( aSO->ReferencedObject( aRefSObj ))
+      aSO = aRefSObj;
+    // MESSAGE("aSO->GetFatherComponent()->ComponentDataType(): " << aSO->GetFatherComponent()->ComponentDataType());
+    if (  strcmp(aSO->GetFatherComponent()->ComponentDataType().c_str(),"GEOM") == 0)
+      aShape = SMESH::SObjectToInterface<GEOM::GEOM_Object>(aSO);
+    if ( !aShape->_is_nil() ){
+      // MESSAGE("Got the Geom Object ");
+      // MESSAGE("Geom Object Type "<< aShape->GetType());
+      SalomeApp_Application* anApp = GetSalomeApplication();
+      if (anApp) {
+//         MESSAGE("Got Application");
+        Engines::Component_var component = anApp->lcc()->FindOrLoad_Component( "FactoryServer","GEOM" );
+        GEOM::GEOM_Gen_var _geomEngine = GEOM::GEOM_Gen::_narrow(component);
+//         MESSAGE("Got GEOM engine");
+        // if the Geom Object is a group
+        if (aShape->GetType() == GEOM_GROUP){
+//           MESSAGE("It's a group");  
+          GEOM::GEOM_IGroupOperations_var aGroupOp = _geomEngine->GetIGroupOperations(myStudy->StudyId());
+          ShapeType= (TopAbs_ShapeEnum)aGroupOp->GetType(aShape);
+        } 
+        // if not
+        else { 
+          GEOM_Client* aClient = new GEOM_Client();
+          if ( aClient && !_geomEngine->_is_nil() ) {
+//             MESSAGE("GEOM client is OK and GEOM engine is not null");
+            S = aClient->GetShape( _geomEngine, aShape );
+            ShapeType=S.ShapeType();
+          }
+        }
+      }
+    }
+  }
+//   MESSAGE("ShapeType returned is " << ShapeType);
+  return ShapeType;
+}
+
+/*!
+ * Gives the ShapeType of the first Selected Object, return TopAbs_SHAPE if the first selected object does not define a shape.
+ * @return the ShapeType of the first Selected Object, return TopAbs_SHAPE if the first selected object does not define a shape.
+ */
+TopAbs_ShapeEnum GeomSelectionTools:: getFirstSelectedShapeType()
+{
+ Handle(SALOME_InteractiveObject) anIO;
+ anIO=GeomSelectionTools::getFirstSelectedSalomeObject();
+ return entryToShapeType(anIO->getEntry());
+}
+
+/*!
+ *  Print information to std output of the face
+ *  and return the OCC type of face: Plane, Cylinder,Cone, Sphere, Torus, BezierSurface,BSplineSurface, SurfaceOfRevolution,SurfaceOfExtrusion, OtherSurface
+ *  @param TopoDS_Shape S Face we want information about.
+ *  @return the OCC type of face: Plane, Cylinder,Cone, Sphere, Torus, BezierSurface,BSplineSurface, SurfaceOfRevolution,SurfaceOfExtrusion, OtherSurface
+ *  return Other_Surface if the selected face is not a face.
+ *  Information printed is :
+ *  U and V degrees
+ *  U and V number of poles
+ *  U and V number of knots
+ *  U or V is Rational ?
+ *
+ */
+GeomAbs_SurfaceType GeomSelectionTools::getFaceInformation(TopoDS_Shape S)
+{
+  GeomAbs_SurfaceType surf_type=GeomAbs_OtherSurface ;
+  if (!S.IsNull() &&  S.ShapeType()==TopAbs_FACE){
+    TopoDS_Face f=TopoDS::Face(S);
+    Handle(Geom_Surface) surf = BRep_Tool::Surface(f);
+    BRepAdaptor_Surface surf_adap=BRepAdaptor_Surface::BRepAdaptor_Surface(f);
+
+    /* Global Information */
+    std::cout << "GLOBAL INFORMATION" << std::endl;
+    std::cout << "******************" << std::endl;
+    std::stringstream buffer;
+    buffer << "Degre U : " <<  surf_adap.UDegree();
+   //conversion nécessaire pour affichage
+    std::cout << buffer.str() << std::endl;
+    std::cout <<  " Degre V : " <<  surf_adap.VDegree() << std::endl;
+    std::cout <<  " Nb Poles U : " <<  surf_adap.NbUPoles() << std::endl;
+    std::cout <<  " Nb Poles V : " <<  surf_adap.NbVPoles() << std::endl;
+    std::cout <<  " Nb Noeuds U : " <<  surf_adap.NbUKnots() << std::endl;
+    std::cout <<  " Nb Noeuds V : " <<  surf_adap.NbVKnots() << std::endl;
+    std::cout <<  " U Rationnel ? " <<  surf_adap.IsURational() << std::endl;
+    std::cout <<  " V Rationnel ? " <<  surf_adap.IsVRational() << std::endl;
+
+    surf_type=surf_adap.GetType();
+  }
+  return surf_type;
+}
+
+
+
+
diff --git a/src/PluginUtils/GeomSelectionTools.h b/src/PluginUtils/GeomSelectionTools.h
new file mode 100644 (file)
index 0000000..0995556
--- /dev/null
@@ -0,0 +1,83 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// ---
+// File    : GeomSelectionTools.h
+// Authors : Nicolas GEIMER (OCC)
+// ---
+
+#ifndef _GEOMSELECTIONTOOLS_H_
+#define _GEOMSELECTIONTOOLS_H_
+
+#ifdef WIN32
+#  ifdef GeomSelectionTools_EXPORTS
+#    define GEOMSELECTIONTOOLS_EXPORT __declspec( dllexport )
+#  else
+#    define GEOMSELECTIONTOOLS_EXPORT __declspec( dllimport )
+#  endif
+#else
+#  define GEOMSELECTIONTOOLS_EXPORT
+#endif
+
+#include "SALOMEDSClient.hxx"
+#include "SALOME_InteractiveObject.hxx"
+#include <SALOME_ListIO.hxx>
+#include <SalomeApp_Application.h>
+
+#include <TopoDS_Shape.hxx>
+#include <GeomAbs_SurfaceType.hxx>
+
+class LightApp_SelectionMgr;
+
+
+/*!
+ * The GeomSelectionTools class gives high level tools to select Geom (and other objects)
+ * A specific attention has been given to analyze selected GEOM objects.
+ *
+ * @param myStudy This class is specific to the study !
+ *
+ */
+
+class GEOMSELECTIONTOOLS_EXPORT GeomSelectionTools
+{
+
+private:
+
+  _PTR(Study) myStudy;
+
+public:
+
+  GeomSelectionTools(_PTR(Study));
+  static SalomeApp_Application*  GetSalomeApplication();
+  static LightApp_SelectionMgr* selectionMgr();
+  SALOME_ListIO* getSelectedSalomeObjects();
+  Handle(SALOME_InteractiveObject) getFirstSelectedSalomeObject();
+  std::string getFirstSelectedEntry();
+  std::string getEntryOfObject(Handle(SALOME_InteractiveObject));
+  std::string getNameFromEntry(std::string);
+  std::string getFirstSelectedComponentDataType();
+  TopAbs_ShapeEnum getFirstSelectedShapeType();
+  TopAbs_ShapeEnum entryToShapeType(std::string );
+  GeomAbs_SurfaceType getFaceInformation(TopoDS_Shape);
+  _PTR(Study) getMyStudy();
+};
+
+
+#endif // _GEOMSELECTIONTOOLS_H_
+
diff --git a/src/PluginUtils/Makefile.am b/src/PluginUtils/Makefile.am
new file mode 100644 (file)
index 0000000..c129681
--- /dev/null
@@ -0,0 +1,61 @@
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# ---
+# File   : Makefile.am
+# Author : Nicolas GEIMER (OCC)
+# ---
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+# header files 
+salomeinclude_HEADERS = \
+       GeomSelectionTools.h
+
+# Libraries targets
+lib_LTLIBRARIES = libGeomSelectionTools.la
+
+dist_libGeomSelectionTools_la_SOURCES =                \
+       GeomSelectionTools.h                    \
+       GeomSelectionTools.cxx
+
+# additionnal information to compil and link file
+libGeomSelectionTools_la_CPPFLAGS =    \
+       $(QT_INCLUDES)                  \
+       $(CAS_CPPFLAGS)                 \
+       $(PYTHON_INCLUDES)              \
+       $(KERNEL_CXXFLAGS)              \
+       $(GUI_CXXFLAGS)                 \
+       $(GEOM_CXXFLAGS)                \
+       $(MED_CXXFLAGS)                 \
+       $(BOOST_CPPFLAGS)               \
+       $(CORBA_CXXFLAGS)               \
+       $(CORBA_INCLUDES)               \
+       -I$(srcdir)/../SMESHGUI         \
+       -I$(top_builddir)/idl
+
+libGeomSelectionTools_la_LDFLAGS =             \
+       ../../idl/libSalomeIDLSMESH.la \
+       ../SMESHGUI/libSMESH.la \
+       $(QT_LIBS) \
+       $(CORBA_LIBS) \
+       $(KERNEL_LDFLAGS) -lSalomeIDLKernel -lSALOMELocalTrace -lSalomeLifeCycleCORBA \
+       $(GUI_LDFLAGS) -lSalomeObject -lsuit -lLightApp -lSalomeApp \
+       $(GEOM_LDFLAGS) -lSalomeIDLGEOM -lGEOMClient \
+       $(CAS_KERNEL) -lTKBRep -lTKG3d
index 44326fe5b9cfc321329a0ec82b62a5e17996acb8..dc6e47408b3b713e041e5ff200784b45a79fd301 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH SMDS : implementaion of Salome mesh data structure
 #  File   : Makefile.in
 #  Author : Patrick GOLDBRONN (CEA)
@@ -72,7 +70,8 @@ salomeinclude_HEADERS = \
        SMDS_SetIterator.hxx \
        SMESH_SMDS.hxx \
        SMDS_MeshInfo.hxx \
-       SMDS_UnstructuredGrid.hxx
+       SMDS_UnstructuredGrid.hxx \
+       SMDS_StdIterator.hxx
 
 
 # Libraries targets
@@ -134,3 +133,5 @@ dist_SMDS_MemoryLimit_SOURCES = \
 
 SMDS_MemoryLimit_LDADD = \
        $(KERNEL_LDFLAGS) -lSALOMELocalTrace
+
+#libSMDS_la_LDFLAGS += -L/data/eap/S5_MV/INSTALL/SMESH/lib/salome -lPerfmeter
index 0af44e59e19e038f4dd1a1d868b2b08e9e47c9d8..be6be615be6341459b3c441aca85fe6a91b453b0 100644 (file)
@@ -15,6 +15,7 @@ Problemes en cours
   mais script OK
   ==> cassé apres mode embedded ou elimination noeuds en trop ?
 - extrusion elements 2D along a path : affichage apres calcul pas toujours OK (filaire)
+- branche git a ouvrir pour merge avec V5_1_4_BR tag V5_1_4rc1
 
 A tester, non pris en compte
 ============================
index 1ffad0d92820e3087bb54c534c382cc518de4661..27a59972462ce79b890a7202739340c7e665ee6a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDSAbs_ElementType.hxx
 //  Module : SMESH
-
+//
 #ifndef _SMDSAbs_ElementType_HeaderFile
 #define _SMDSAbs_ElementType_HeaderFile
 
index ae5bf5ccd2075d06355945aef55d4e00ac005049..76df7471cece45eb03079d535e031a97bc4b7eae 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_EdgePosition.cxx
 //  Author : Jean-Michel BOULCOURT
index f6005e947138a9deaee714dccac98723626a7538..8c2148dfe55abc93944cc51cffacfeadc1724ada 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_EdgePosition.hxx
 //  Module : SMESH
@@ -34,15 +35,15 @@ class SMDS_EXPORT SMDS_EdgePosition:public SMDS_Position
 {
 
   public:
-       SMDS_EdgePosition(const int aEdgeId=0, const double aUParam=0);
-       const virtual double * Coords() const;
-       SMDS_TypeOfPosition GetTypeOfPosition() const;
-       void SetUParameter(double aUparam);
-       double GetUParameter() const;
+        SMDS_EdgePosition(const int aEdgeId=0, const double aUParam=0);
+        const virtual double * Coords() const;
+        SMDS_TypeOfPosition GetTypeOfPosition() const;
+        void SetUParameter(double aUparam);
+        double GetUParameter() const;
 
   private:
 
-       double myUParameter;
+        double myUParameter;
 
 };
 
index 936fd2686de9d01227305b5f9dda61c4f326b432..ec1657ec7147c1083d22691f9b5aa12d3330c51f 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_MeshElement.hxx
 //  Module : SMESH
 //  Created:   12.01.05 18:02:52
 //  Author:    Michael Sazonov
-
+//
 #ifndef SMDS_ElemIterator_HeaderFile
 #define SMDS_ElemIterator_HeaderFile
 
index 87107a4c4fb09951c6741d06dd417e878b0b4ec3..2d545861d5177a1a3d26f3ff8638b39d9cf33041 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //
 #ifdef _MSC_VER
@@ -38,12 +39,12 @@ using namespace std;
 
 int SMDS_FaceOfEdges::NbEdges() const
 {
-       return myNbEdges;
+        return myNbEdges;
 }
 
 int SMDS_FaceOfEdges::NbFaces() const
 {
-       return 1;
+        return 1;
 }
 //=======================================================================
 //function : Print
@@ -52,15 +53,15 @@ int SMDS_FaceOfEdges::NbFaces() const
 
 void SMDS_FaceOfEdges::Print(ostream & OS) const
 {
-       OS << "face <" << GetID() << " > : ";
-       int i;
-       for (i = 0; i < NbEdges() - 1; i++) OS << myEdges[i] << ",";
-       OS << myEdges[i] << ") " << endl;
+        OS << "face <" << GetID() << " > : ";
+        int i;
+        for (i = 0; i < NbEdges() - 1; i++) OS << myEdges[i] << ",";
+        OS << myEdges[i] << ") " << endl;
 }
 
 SMDSAbs_ElementType SMDS_FaceOfEdges::GetType() const
 {
-       return SMDSAbs_Face;
+        return SMDSAbs_Face;
 }
 
 //=======================================================================
@@ -86,7 +87,7 @@ class SMDS_FaceOfEdges_MyIterator:public SMDS_ElemIterator
   {
     index++;
     return mySet[index-1];
-  }    
+  }     
 };
 
 SMDS_ElemIteratorPtr SMDS_FaceOfEdges::elementsIterator
@@ -110,11 +111,11 @@ SMDS_FaceOfEdges::SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
                                    const SMDS_MeshEdge* edge2,
                                    const SMDS_MeshEdge* edge3)
 {
-       myNbEdges = 3;
-       myEdges[0]=edge1;
-       myEdges[1]=edge2;
-       myEdges[2]=edge3;
-       myEdges[3]=0;
+        myNbEdges = 3;
+        myEdges[0]=edge1;
+        myEdges[1]=edge2;
+        myEdges[2]=edge3;
+        myEdges[3]=0;
 }
 
 SMDS_FaceOfEdges::SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
@@ -122,38 +123,38 @@ SMDS_FaceOfEdges::SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
                                    const SMDS_MeshEdge* edge3,
                                    const SMDS_MeshEdge* edge4)
 {
-       myNbEdges = 4;
-       myEdges[0]=edge1;
-       myEdges[1]=edge2;
-       myEdges[2]=edge3;
-       myEdges[3]=edge4;       
+        myNbEdges = 4;
+        myEdges[0]=edge1;
+        myEdges[1]=edge2;
+        myEdges[2]=edge3;
+        myEdges[3]=edge4;       
 }
 
 /*bool operator<(const SMDS_FaceOfEdges& f1, const SMDS_FaceOfEdges& f2)
 {
-       set<SMDS_MeshNode> set1,set2;
-       SMDS_ElemIteratorPtr it;
-       const SMDS_MeshNode * n;
-
-       it=f1.nodesIterator();
-
-       while(it->more())
-       {
-               n=static_cast<const SMDS_MeshNode *>(it->next());
-               set1.insert(*n);
-       }
-
-       delete it;
-       it=f2.nodesIterator();
-       
-       while(it->more())
-       {       
-               n=static_cast<const SMDS_MeshNode *>(it->next());
-               set2.insert(*n);
-       }
-
-       delete it;
-       return set1<set2;       
+        set<SMDS_MeshNode> set1,set2;
+        SMDS_ElemIteratorPtr it;
+        const SMDS_MeshNode * n;
+
+        it=f1.nodesIterator();
+
+        while(it->more())
+        {
+                n=static_cast<const SMDS_MeshNode *>(it->next());
+                set1.insert(*n);
+        }
+
+        delete it;
+        it=f2.nodesIterator();
+        
+        while(it->more())
+        {       
+                n=static_cast<const SMDS_MeshNode *>(it->next());
+                set2.insert(*n);
+        }
+
+        delete it;
+        return set1<set2;       
 
 }*/
 
index 1b9a1d7d4fbb5f2ff075b3b73406a31f7bf7a233..91acdb17a3bb434417ca8b13318304755f92bd87 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //
 #ifndef _SMDS_FaceOfEdges_HeaderFile
 class SMDS_EXPORT SMDS_FaceOfEdges:public SMDS_MeshFace
 {
   public:
-       void Print(std::ostream & OS) const;
-       SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
+        void Print(std::ostream & OS) const;
+        SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
                          const SMDS_MeshEdge* edge2,
                          const SMDS_MeshEdge* edge3);
-       SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
+        SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
                          const SMDS_MeshEdge* edge2,
                          const SMDS_MeshEdge* edge3,
                          const SMDS_MeshEdge* edge4);
-               
-       SMDSAbs_ElementType GetType() const;
-  virtual SMDSAbs_EntityType   GetEntityType() const;
-       int NbNodes() const;
-       int NbEdges() const;
-       int NbFaces() const;
-//     friend bool operator<(const SMDS_FaceOfEdges& e1, const SMDS_FaceOfEdges& e2);
+                
+        SMDSAbs_ElementType GetType() const;
+        virtual SMDSAbs_EntityType   GetEntityType() const;
+        int NbNodes() const;
+        int NbEdges() const;
+        int NbFaces() const;
+//      friend bool operator<(const SMDS_FaceOfEdges& e1, const SMDS_FaceOfEdges& e2);
 
 
   /*!
@@ -61,11 +62,11 @@ class SMDS_EXPORT SMDS_FaceOfEdges:public SMDS_MeshFace
   virtual const SMDS_MeshNode* GetNode(const int ind) const;
 
   protected:
-       SMDS_ElemIteratorPtr
-               elementsIterator(SMDSAbs_ElementType type) const;
+        SMDS_ElemIteratorPtr
+                elementsIterator(SMDSAbs_ElementType type) const;
 
   private:
-       const SMDS_MeshEdge* myEdges[4];
+        const SMDS_MeshEdge* myEdges[4];
         int                  myNbEdges;
 
 };
index aa52343b4c6be062772cf3b59e0a82b3da824e24..d92a89a3ef58cdcf21f661646a10d2cd172e6d4c 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //
 #ifdef _MSC_VER
@@ -42,17 +43,17 @@ using namespace std;
 
 int SMDS_FaceOfNodes::NbEdges() const
 {
-       return NbNodes();
+        return NbNodes();
 }
 
 int SMDS_FaceOfNodes::NbFaces() const
 {
-       return 1;
+        return 1;
 }
 
 int SMDS_FaceOfNodes::NbNodes() const
 {
-       return myNbNodes;
+        return myNbNodes;
 }
 
 //=======================================================================
@@ -62,10 +63,10 @@ int SMDS_FaceOfNodes::NbNodes() const
 
 void SMDS_FaceOfNodes::Print(ostream & OS) const
 {
-       OS << "face <" << GetID() << " > : ";
-       int i;
-       for (i = 0; i < NbNodes() - 1; i++) OS << myNodes[i] << ",";
-       OS << myNodes[i] << ") " << endl;
+        OS << "face <" << GetID() << " > : ";
+        int i;
+        for (i = 0; i < NbNodes() - 1; i++) OS << myNodes[i] << ",";
+        OS << myNodes[i] << ") " << endl;
 }
 
 //=======================================================================
@@ -132,11 +133,11 @@ SMDS_FaceOfNodes::SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
                                    const SMDS_MeshNode* node2,
                                    const SMDS_MeshNode* node3)
 {
-       myNbNodes = 3;
-       myNodes[0]=node1;
-       myNodes[1]=node2;
-       myNodes[2]=node3;
-       myNodes[3]=0;
+        myNbNodes = 3;
+        myNodes[0]=node1;
+        myNodes[1]=node2;
+        myNodes[2]=node3;
+        myNodes[3]=0;
 }
 
 SMDS_FaceOfNodes::SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
@@ -144,11 +145,11 @@ SMDS_FaceOfNodes::SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
                                    const SMDS_MeshNode* node3,
                                    const SMDS_MeshNode* node4)
 {
-       myNbNodes = 4;
-       myNodes[0]=node1;
-       myNodes[1]=node2;
-       myNodes[2]=node3;
-       myNodes[3]=node4;       
+        myNbNodes = 4;
+        myNodes[0]=node1;
+        myNodes[1]=node2;
+        myNodes[2]=node3;
+        myNodes[3]=node4;       
 }
 bool SMDS_FaceOfNodes::ChangeNodes(const SMDS_MeshNode* nodes[],
                                    const int            nbNodes)
index c00511851b83c03ea0a7434c8bfb89fa027ba4df..6c2cfc6d3141141701994ab03c5e036656b0ca29 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //
 #ifndef _SMDS_FaceOfNodes_HeaderFile
 class SMDS_EXPORT SMDS_FaceOfNodes:public SMDS_MeshFace
 {
   public:
-       void Print(std::ostream & OS) const;
-       SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
+        void Print(std::ostream & OS) const;
+        SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
                          const SMDS_MeshNode* node2,
                          const SMDS_MeshNode* node3);
-       SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
+        SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
                          const SMDS_MeshNode* node2,
                          const SMDS_MeshNode* node3,
                          const SMDS_MeshNode* node4);
         bool ChangeNodes(const SMDS_MeshNode* nodes[],
                          const int            nbNodes);
-       int NbEdges() const;
-       int NbFaces() const;
-       int NbNodes() const;
+        int NbEdges() const;
+        int NbFaces() const;
+        int NbNodes() const;
 
   /*!
    * \brief Return node by its index
@@ -59,11 +60,11 @@ class SMDS_EXPORT SMDS_FaceOfNodes:public SMDS_MeshFace
   virtual SMDSAbs_EntityType   GetEntityType() const;
 
   protected:
-       SMDS_ElemIteratorPtr
-               elementsIterator(SMDSAbs_ElementType type) const;
+        SMDS_ElemIteratorPtr
+                elementsIterator(SMDSAbs_ElementType type) const;
 
   private:
-       const SMDS_MeshNode* myNodes[4];
+        const SMDS_MeshNode* myNodes[4];
         int                  myNbNodes;
 
 };
index 20498554e04d473acfed84767aca92198582ac23..da93899b627f8d61c620f13f464db77aaf6e869a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_FacePosition.cxx
 //  Author : Jean-Michel BOULCOURT
@@ -36,8 +37,8 @@ using namespace std;
 //=======================================================================
 
 SMDS_FacePosition::SMDS_FacePosition(const int aEdgeId,
-                                    const double aUParam,
-                                    const double aVParam)
+                                     const double aUParam,
+                                     const double aVParam)
   :SMDS_Position(aEdgeId),
    myUParameter(aUParam),myVParameter(aVParam)
 {
@@ -49,21 +50,21 @@ SMDS_FacePosition::SMDS_FacePosition(const int aEdgeId,
 //=======================================================================
 const double *SMDS_FacePosition::Coords() const
 {
-       static double origin[]={0,0,0};
-       MESSAGE("SMDS_EdgePosition::Coords not implemented");
-       return origin;
+        static double origin[]={0,0,0};
+        MESSAGE("SMDS_EdgePosition::Coords not implemented");
+        return origin;
 }
 
 /**
 */
 SMDS_TypeOfPosition SMDS_FacePosition::GetTypeOfPosition() const
 {
-       return SMDS_TOP_FACE;
+        return SMDS_TOP_FACE;
 }
 
 void SMDS_FacePosition::SetUParameter(double aUparam)
 {
-       myUParameter = aUparam;
+        myUParameter = aUparam;
 }
 
 //=======================================================================
@@ -73,7 +74,7 @@ void SMDS_FacePosition::SetUParameter(double aUparam)
 
 void SMDS_FacePosition::SetVParameter(double aVparam)
 {
-       myVParameter = aVparam;
+        myVParameter = aVparam;
 }
 
 //=======================================================================
@@ -83,7 +84,7 @@ void SMDS_FacePosition::SetVParameter(double aVparam)
 
 double SMDS_FacePosition::GetUParameter() const 
 {
-       return myUParameter;
+        return myUParameter;
 }
 
 //=======================================================================
@@ -93,5 +94,5 @@ double SMDS_FacePosition::GetUParameter() const
 
 double SMDS_FacePosition::GetVParameter() const 
 {
-       return myVParameter;
+        return myVParameter;
 }
index 425d7cf1c118a5cdbf376470f930e377d124e676..1b8967dc077779ce56c7c2705eec4901c266b73f 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_FacePosition.hxx
 //  Module : SMESH
@@ -34,17 +35,17 @@ class SMDS_EXPORT SMDS_FacePosition:public SMDS_Position
 {
 
   public:
-       SMDS_FacePosition(int aFaceId=0, double aUParam=0,
-               double aVParam=0);
-       const virtual double * Coords() const;
-       SMDS_TypeOfPosition GetTypeOfPosition() const;
-       void SetUParameter(double aUparam);
-       void SetVParameter(double aVparam);
-       double GetUParameter() const;
-       double GetVParameter() const;
+        SMDS_FacePosition(int aFaceId=0, double aUParam=0,
+                double aVParam=0);
+        const virtual double * Coords() const;
+        SMDS_TypeOfPosition GetTypeOfPosition() const;
+        void SetUParameter(double aUparam);
+        void SetVParameter(double aVparam);
+        double GetUParameter() const;
+        double GetVParameter() const;
 
   private:
-       double myUParameter;
-       double myVParameter;
+        double myUParameter;
+        double myVParameter;
 };
 #endif
index e4e900b5bc722e7fcc96986c0515fc79c5400969..260e1e278dea68c83f679a18382bc3af1cd0bc22 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //
 #ifndef _SMDS_Iterator_HeaderFile
 template<typename VALUE> class SMDS_Iterator
 {
   public:
-       /// Return true if and only if there are other object in this iterator
-         virtual bool more()=0;
-       
-       /// Return the current object and step to the next one
-         virtual VALUE next()=0;
-       
-       /// Delete the current element and step to the next one
-       virtual void remove(){}
-       
-       /// Provide virtual destructor just for case if some derived iterator
+        /// Return true if and only if there are other object in this iterator
+          virtual bool more()=0;
+        
+        /// Return the current object and step to the next one
+          virtual VALUE next()=0;
+        
+        /// Delete the current element and step to the next one
+        virtual void remove(){}
+        
+        /// Provide virtual destructor just for case if some derived iterator
         /// must have a destructor
-       virtual ~SMDS_Iterator(){}
+        virtual ~SMDS_Iterator(){}
 };
 
 #endif
index 220e67ac9cdbc24e363e41ec4d742d4d60b5a7c2..f3bdb9fa6e0ce9dbbce5a9c4ec44fd7fee72bed4 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //
 #ifdef _MSC_VER
 
 bool SMDS_IteratorOfElements::subMore()
 {
-       if((t2Iterator.get()==NULL)||(!t2Iterator->more()))
-       {
-               if(t1Iterator->more())
-               {
-                       t2Iterator=t1Iterator->next()->elementsIterator(myType);
-                       return subMore();
-               }
-               else return false;
-       }
-       else return true;
+        if((t2Iterator.get()==NULL)||(!t2Iterator->more()))
+        {
+                if(t1Iterator->more())
+                {
+                        t2Iterator=t1Iterator->next()->elementsIterator(myType);
+                        return subMore();
+                }
+                else return false;
+        }
+        else return true;
 }
 
 const SMDS_MeshElement * SMDS_IteratorOfElements::subNext()
 {
-       if((t2Iterator.get()==NULL)||(!t2Iterator->more()))
-               if(t1Iterator->more())
-                       t2Iterator=t1Iterator->next()->elementsIterator(myType);
-       return t2Iterator->next();
+        if((t2Iterator.get()==NULL)||(!t2Iterator->more()))
+                if(t1Iterator->more())
+                        t2Iterator=t1Iterator->next()->elementsIterator(myType);
+        return t2Iterator->next();
 }
 
 /////////////////////////////////////////////////////////////////////////////
@@ -61,48 +62,48 @@ SMDS_IteratorOfElements::SMDS_IteratorOfElements(const SMDS_MeshElement * elemen
        myType(type), myElement(element),
        myProxyElement(NULL)
 {
-       while(subMore())
-               alreadyReturnedElements.insert(subNext());
-       itAlreadyReturned= alreadyReturnedElements.begin();
-       switch(myElement->GetType())
-       {
-       case SMDSAbs_Node: 
-       case SMDSAbs_Edge: myReverseIteration=true; break;
-       case SMDSAbs_Face: myReverseIteration=(type==SMDSAbs_Volume); break;
-       default: myReverseIteration=false;
-       }       
+        while(subMore())
+                alreadyReturnedElements.insert(subNext());
+        itAlreadyReturned= alreadyReturnedElements.begin();
+        switch(myElement->GetType())
+        {
+        case SMDSAbs_Node: 
+        case SMDSAbs_Edge: myReverseIteration=true; break;
+        case SMDSAbs_Face: myReverseIteration=(type==SMDSAbs_Volume); break;
+        default: myReverseIteration=false;
+        }       
 }
 
 bool SMDS_IteratorOfElements::more()
 {
-       if(myProxyElement==NULL)
-       {
-               while(itAlreadyReturned!=alreadyReturnedElements.end())
-               {
-                       myProxyElement=*itAlreadyReturned;
-                       itAlreadyReturned++;    
+        if(myProxyElement==NULL)
+        {
+                while(itAlreadyReturned!=alreadyReturnedElements.end())
+                {
+                        myProxyElement=*itAlreadyReturned;
+                        itAlreadyReturned++;    
 
-                       if(myReverseIteration)
-                       {
-                               SMDS_ElemIteratorPtr it=
-                                       myProxyElement->elementsIterator(myElement->GetType());
-                               while(it->more())
-                               {                               
-                                       if(it->next()==myElement) return true;
-                               }
-                       }
-                       else return true;
-               }
-               myProxyElement=NULL;
-               return false;
-       }
-       else return true;
+                        if(myReverseIteration)
+                        {
+                                SMDS_ElemIteratorPtr it=
+                                        myProxyElement->elementsIterator(myElement->GetType());
+                                while(it->more())
+                                {                               
+                                        if(it->next()==myElement) return true;
+                                }
+                        }
+                        else return true;
+                }
+                myProxyElement=NULL;
+                return false;
+        }
+        else return true;
 }
 
 const SMDS_MeshElement * SMDS_IteratorOfElements::next()
 {
-       more();
-       const SMDS_MeshElement *e=myProxyElement;
-       myProxyElement=NULL;
-       return e;
+        more();
+        const SMDS_MeshElement *e=myProxyElement;
+        myProxyElement=NULL;
+        return e;
 }
index 381ff647a442f3f18c8b9d3fd21ac8cf35eb6411..c876a179f1ba959302810dddd1142b51a62953d6 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //
 #include "SMESH_SMDS.hxx"
@@ -35,22 +36,22 @@ class SMDS_EXPORT SMDS_IteratorOfElements:public SMDS_ElemIterator
 /// Create an iterator which look for elements of type type which are linked 
 /// to the element element. it is the iterator to get connectivity of element
 //////////////////////////////////////////////////////////////////////////////
-       SMDS_IteratorOfElements(const SMDS_MeshElement * element,
+        SMDS_IteratorOfElements(const SMDS_MeshElement * element,
                                 SMDSAbs_ElementType type,
                                 const SMDS_ElemIteratorPtr& it);
-       bool more();
-       const SMDS_MeshElement * next();
+        bool more();
+        const SMDS_MeshElement * next();
 
   private:
-       SMDS_ElemIteratorPtr t2Iterator;
-       SMDS_ElemIteratorPtr t1Iterator;
-       SMDSAbs_ElementType myType;     
-       const SMDS_MeshElement * myProxyElement;
-       const SMDS_MeshElement * myElement;             
-       bool myReverseIteration;
+        SMDS_ElemIteratorPtr t2Iterator;
+        SMDS_ElemIteratorPtr t1Iterator;
+        SMDSAbs_ElementType myType;     
+        const SMDS_MeshElement * myProxyElement;
+        const SMDS_MeshElement * myElement;             
+        bool myReverseIteration;
 
-       std::set<const SMDS_MeshElement*> alreadyReturnedElements;
-       std::set<const SMDS_MeshElement*>::iterator itAlreadyReturned;  
-       bool subMore();
-       const SMDS_MeshElement * subNext();
+        std::set<const SMDS_MeshElement*> alreadyReturnedElements;
+        std::set<const SMDS_MeshElement*>::iterator itAlreadyReturned;  
+        bool subMore();
+        const SMDS_MeshElement * subNext();
 };
index 4de22248e04cf97a9e8e5f8df2c925587d651d31..4372ee778d054c200f08c01ddc7c746cb678ce7f 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File      : SMDS_MemoryLimit.cxx
 // Created   : Fri Sep 21 17:16:42 2007
 // Author    : Edward AGAPOV (eap)
index ed42389f991d1d1b56ac0cc794843789a693ade6..bb53cb6b6b2902169f99d0dd8e8d1afba96b9751 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,8 +19,9 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  SMESH SMDS : implementaion of Salome mesh data structure
 
+//  SMESH SMDS : implementaion of Salome mesh data structure
+//
 #ifdef _MSC_VER
 #pragma warning(disable:4786)
 #endif
@@ -1084,11 +1085,11 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshFace * f1,
 /// Add a polygon defined by its nodes IDs
 ///////////////////////////////////////////////////////////////////////////////
 
-SMDS_MeshFace* SMDS_Mesh::AddPolygonalFaceWithID (std::vector<int> nodes_ids,
+SMDS_MeshFace* SMDS_Mesh::AddPolygonalFaceWithID (vector<int> nodes_ids,
                                                   const int        ID)
 {
   int nbNodes = nodes_ids.size();
-  std::vector<const SMDS_MeshNode*> nodes (nbNodes);
+  vector<const SMDS_MeshNode*> nodes (nbNodes);
   for (int i = 0; i < nbNodes; i++) {
     nodes[i] = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(nodes_ids[i]);
     if (!nodes[i]) return NULL;
@@ -1101,7 +1102,7 @@ SMDS_MeshFace* SMDS_Mesh::AddPolygonalFaceWithID (std::vector<int> nodes_ids,
 ///////////////////////////////////////////////////////////////////////////////
 
 SMDS_MeshFace* SMDS_Mesh::AddPolygonalFaceWithID
-                          (std::vector<const SMDS_MeshNode*> nodes,
+                          (vector<const SMDS_MeshNode*> nodes,
                            const int                         ID)
 {
   SMDS_MeshFace * face;
@@ -1134,7 +1135,7 @@ SMDS_MeshFace* SMDS_Mesh::AddPolygonalFaceWithID
 /// An ID is automatically affected to the created face.
 ///////////////////////////////////////////////////////////////////////////////
 
-SMDS_MeshFace* SMDS_Mesh::AddPolygonalFace (std::vector<const SMDS_MeshNode*> nodes)
+SMDS_MeshFace* SMDS_Mesh::AddPolygonalFace (vector<const SMDS_MeshNode*> nodes)
 {
   return SMDS_Mesh::AddPolygonalFaceWithID(nodes, myElementIDFactory->GetFreeID());
 }
@@ -1147,12 +1148,12 @@ SMDS_MeshFace* SMDS_Mesh::AddPolygonalFace (std::vector<const SMDS_MeshNode*> no
 ///////////////////////////////////////////////////////////////////////////////
 
 SMDS_MeshVolume * SMDS_Mesh::AddPolyhedralVolumeWithID
-                             (std::vector<int> nodes_ids,
-                              std::vector<int> quantities,
+                             (vector<int> nodes_ids,
+                              vector<int> quantities,
                               const int        ID)
 {
   int nbNodes = nodes_ids.size();
-  std::vector<const SMDS_MeshNode*> nodes (nbNodes);
+  vector<const SMDS_MeshNode*> nodes (nbNodes);
   for (int i = 0; i < nbNodes; i++) {
     nodes[i] = (SMDS_MeshNode *)myNodeIDFactory->MeshElement(nodes_ids[i]);
     if (!nodes[i]) return NULL;
@@ -1167,8 +1168,8 @@ SMDS_MeshVolume * SMDS_Mesh::AddPolyhedralVolumeWithID
 ///////////////////////////////////////////////////////////////////////////////
 
 SMDS_MeshVolume* SMDS_Mesh::AddPolyhedralVolumeWithID
-                            (std::vector<const SMDS_MeshNode*> nodes,
-                             std::vector<int>                  quantities,
+                            (vector<const SMDS_MeshNode*> nodes,
+                             vector<int>                  quantities,
                              const int                         ID)
 {
   SMDS_MeshVolume* volume;
@@ -1201,8 +1202,8 @@ SMDS_MeshVolume* SMDS_Mesh::AddPolyhedralVolumeWithID
 ///////////////////////////////////////////////////////////////////////////////
 
 SMDS_MeshVolume* SMDS_Mesh::AddPolyhedralVolume
-                            (std::vector<const SMDS_MeshNode*> nodes,
-                             std::vector<int>                  quantities)
+                            (vector<const SMDS_MeshNode*> nodes,
+                             vector<int>                  quantities)
 {
   int ID = myElementIDFactory->GetFreeID();
   SMDS_MeshVolume * v = SMDS_Mesh::AddPolyhedralVolumeWithID(nodes, quantities, ID);
@@ -1990,10 +1991,10 @@ const SMDS_MeshElement* SMDS_Mesh::FindElement(int IDelem) const
 //purpose  : find polygon
 //=======================================================================
 
-const SMDS_MeshFace* SMDS_Mesh::FindFace (std::vector<int> nodes_ids) const
+const SMDS_MeshFace* SMDS_Mesh::FindFace (const vector<int>& nodes_ids) const
 {
   int nbnodes = nodes_ids.size();
-  std::vector<const SMDS_MeshNode *> poly_nodes (nbnodes);
+  vector<const SMDS_MeshNode *> poly_nodes (nbnodes);
   for (int inode = 0; inode < nbnodes; inode++) {
     const SMDS_MeshNode * node = FindNode(nodes_ids[inode]);
     if (node == NULL) return NULL;
@@ -2002,22 +2003,43 @@ const SMDS_MeshFace* SMDS_Mesh::FindFace (std::vector<int> nodes_ids) const
   return FindFace(poly_nodes);
 }
 
-const SMDS_MeshFace* SMDS_Mesh::FindFace (std::vector<const SMDS_MeshNode *> nodes)
+const SMDS_MeshFace* SMDS_Mesh::FindFace (const vector<const SMDS_MeshNode *>& nodes)
 {
-  if ( nodes.size() > 2 && nodes[0] ) {
-    SMDS_ElemIteratorPtr itF = nodes[0]->GetInverseElementIterator(SMDSAbs_Face);
-    while (itF->more()) {
-      const SMDS_MeshElement* f = itF->next();
-      if ( f->NbNodes() == nodes.size() ) {
-        SMDS_ElemIteratorPtr it2 = f->nodesIterator();
-        while(it2->more()) {
-          if ( find( nodes.begin(), nodes.end(), it2->next() ) == nodes.end() ) {
-            f = 0;
-            break;
-          }
+  return (const SMDS_MeshFace*) FindElement( nodes, SMDSAbs_Face );
+}
+
+
+//================================================================================
+/*!
+ * \brief Return element based on all given nodes
+ *  \param nodes - node of element
+ *  \param type - type of element
+ *  \param noMedium - true if medium nodes of quadratic element are not included in <nodes>
+ *  \retval const SMDS_MeshElement* - found element or NULL
+ */
+//================================================================================
+
+const SMDS_MeshElement* SMDS_Mesh::FindElement (const vector<const SMDS_MeshNode *>& nodes,
+                                                const SMDSAbs_ElementType            type,
+                                                const bool                           noMedium)
+{
+  if ( nodes.size() > 0 && nodes[0] )
+  {
+    SMDS_ElemIteratorPtr itF = nodes[0]->GetInverseElementIterator(type);
+    while (itF->more())
+    {
+      const SMDS_MeshElement* e = itF->next();
+      int nbNodesToCheck = noMedium ? e->NbCornerNodes() : e->NbNodes();
+      if ( nbNodesToCheck == nodes.size() )
+      {
+        for ( int i = 1; e && i < nodes.size(); ++ i )
+        {
+          int nodeIndex = e->GetNodeIndex( nodes[ i ]);
+          if ( nodeIndex < 0 || nodeIndex >= nbNodesToCheck )
+            e = 0;
         }
-        if ( f )
-          return static_cast<const SMDS_MeshFace *> (f);
+        if ( e )
+          return static_cast<const SMDS_MeshFace *> (e);
       }
     }
   }
@@ -2373,10 +2395,12 @@ void SMDS_Mesh::setConstructionFaces(bool b)
 ///////////////////////////////////////////////////////////////////////////////
 void SMDS_Mesh::setInverseElements(bool b)
 {
-        if(!b) MESSAGE("Error : inverseElement=false not implemented");
-        myHasInverseElements=b;
+  if(!b) MESSAGE("Error : inverseElement=false not implemented");
+  myHasInverseElements=b;
 }
 
+namespace {
+
 ///////////////////////////////////////////////////////////////////////////////
 ///Iterator on NCollection_Map
 ///////////////////////////////////////////////////////////////////////////////
@@ -2421,7 +2445,7 @@ struct MYElem_Map_Iterator: public FATHER
       _type = typ;
   }
 
-  bool more()
+bool more()
   {
       while (_ctr < _map.size())
       {
@@ -2441,17 +2465,52 @@ struct MYElem_Map_Iterator: public FATHER
   }
 };
 
+//================================================================================
+  /*!
+   * \brief Iterator on elements in id increasing order
+   */
+  //================================================================================
+
+  template <typename ELEM=const SMDS_MeshElement*>
+  class IdSortedIterator : public SMDS_Iterator<ELEM>
+  {
+    const SMDS_MeshElementIDFactory& myIDFact;
+    int                              myID, myMaxID;
+    ELEM                             myElem;
+
+  public:
+    IdSortedIterator(const SMDS_MeshElementIDFactory& fact)
+      :myIDFact( fact ), myID(1), myMaxID( myIDFact.GetMaxID() ), myElem(0)
+    {
+      next();
+    }
+    bool more()
+    {
+      return myElem;
+    }
+    ELEM next()
+    {
+      ELEM current = myElem;
+      for ( myElem = 0; myID <= myMaxID && !myElem; ++myID )
+        myElem = (ELEM) myIDFact.MeshElement( myID );
+      return current;
+    }
+  };
+}
+
 ///////////////////////////////////////////////////////////////////////////////
 /// Return an iterator on nodes of the current mesh factory
 ///////////////////////////////////////////////////////////////////////////////
 
-SMDS_NodeIteratorPtr SMDS_Mesh::nodesIterator() const
+SMDS_NodeIteratorPtr SMDS_Mesh::nodesIterator(bool idInceasingOrder) const
 {
-  //return SMDS_NodeIteratorPtr
-  //  (new SMDS_Mesh_MyNodeIterator(myNodeIDFactory->elementsIterator()));
   typedef MYNode_Map_Iterator
     < SetOfNodes, const SMDS_MeshNode*, SMDS_NodeIterator > TIterator;
-  return SMDS_NodeIteratorPtr(new TIterator(myNodes));
+  typedef IdSortedIterator< const SMDS_MeshNode* >          TSortedIterator;
+/*  return ( idInceasingOrder ?
+           SMDS_NodeIteratorPtr( new TSortedIterator( *myNodeIDFactory )) :
+           SMDS_NodeIteratorPtr( new TIterator(myNodes)));*/
+  return ( SMDS_NodeIteratorPtr( new TIterator(myNodes)));
 }
 
 ///////////////////////////////////////////////////////////////////////////////
index 357ee8eebcd792389336e5a9acd083c17a7b37e5..d827ab18e8ea31720e77631f154c77a35c9e8320 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_Mesh.hxx
 //  Module : SMESH
-
+//
 #ifndef _SMDS_Mesh_HeaderFile
 #define _SMDS_Mesh_HeaderFile
 
@@ -68,7 +69,7 @@ public:
   inline vtkUnstructuredGrid* getGrid() {return myGrid; };
   inline int getMeshId() {return myMeshId; };
 
-  SMDS_NodeIteratorPtr nodesIterator() const;
+  SMDS_NodeIteratorPtr nodesIterator(bool idInceasingOrder=false) const;
   SMDS_0DElementIteratorPtr elements0dIterator() const;
   SMDS_EdgeIteratorPtr edgesIterator() const;
   SMDS_FaceIteratorPtr facesIterator() const;
@@ -511,8 +512,11 @@ public:
                                        const SMDS_MeshNode *n7,
                                        const SMDS_MeshNode *n8);
 
-  const SMDS_MeshFace *FindFace(std::vector<int> nodes_ids) const;
-  static const SMDS_MeshFace* FindFace(std::vector<const SMDS_MeshNode *> nodes);
+  const SMDS_MeshFace *FindFace(const std::vector<int>& nodes_ids) const;
+  static const SMDS_MeshFace* FindFace(const std::vector<const SMDS_MeshNode *>& nodes);
+  static const SMDS_MeshElement* FindElement(const std::vector<const SMDS_MeshNode *>& nodes,
+                                             const SMDSAbs_ElementType                 type=SMDSAbs_All,
+                                             const bool                                noMedium=true);
 
   /*!
    * \brief Raise an exception if free memory (ram+swap) too low
index f661b1137bfdabdeac215f4c56f78ae8bf881e45..14f5e3f3adae19e6f7ee1f59724087caac683d01 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_Mesh0DElement.cxx
 //  Author : Jean-Michel BOULCOURT
 //  Module : SMESH
-
+//
 #ifdef _MSC_VER
 #pragma warning(disable:4786)
 #endif
@@ -41,7 +39,7 @@ using namespace std;
 //=======================================================================
 SMDS_Mesh0DElement::SMDS_Mesh0DElement (const SMDS_MeshNode * node)
 {
-    MESSAGE("SMDS_Mesh0DElement " << GetID());
+  MESSAGE("SMDS_Mesh0DElement " << GetID());
   myNode = node;
 }
 
index cf7896d02f525ef28b91c9ceaac394ff6ca393e7..355986a4d796906aed7e3e307911e1b40c15d5d0 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_Mesh0DElement.hxx
 //  Module : SMESH
-
+//
 #ifndef _SMDS_Mesh0DElement_HeaderFile
 #define _SMDS_Mesh0DElement_HeaderFile
 
index 2f99b6c57096953ba28de490e877fecb1ceb08c7..3f5b089d6f433ff7fbbd942da2f2a4e6bc603e1c 100644 (file)
@@ -1,5 +1,31 @@
-#ifndef _SMDS_MESHEDGE_HXX_
-#define _SMDS_MESHEDGE_HXX_
+//  Copyright (C) 2007-2010  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.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//  SMESH SMDS : implementaion of Salome mesh data structure
+//  File   : SMDS_MeshEdge.hxx
+//  Module : SMESH
+//
+#ifndef _SMDS_MeshEdge_HeaderFile
+#define _SMDS_MeshEdge_HeaderFile
 
 #include "SMESH_SMDS.hxx"
 
@@ -9,7 +35,7 @@ class SMDS_EXPORT SMDS_MeshEdge:public SMDS_MeshCell
 {
        
   public:
-       SMDSAbs_ElementType GetType() const;
-  virtual vtkIdType GetVtkType() const;
+        SMDSAbs_ElementType GetType() const;
+        virtual vtkIdType GetVtkType() const;
 };
 #endif
index 6f5b5eb54b8844b645a2924c0b17449587932c89..8d0a608c4419e6ee3d3658e389b69fdf5854e0d5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //
 #ifdef _MSC_VER
@@ -45,13 +46,13 @@ SMDS_MeshElement::SMDS_MeshElement(int id, ShortType meshId, ShortType shapeId):
 
 void SMDS_MeshElement::Print(ostream & OS) const
 {
-       OS << "dump of mesh element" << endl;
+        OS << "dump of mesh element" << endl;
 }
 
 ostream & operator <<(ostream & OS, const SMDS_MeshElement * ME)
 {
-       ME->Print(OS);
-       return OS;
+        ME->Print(OS);
+        return OS;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -60,7 +61,7 @@ ostream & operator <<(ostream & OS, const SMDS_MeshElement * ME)
 ///////////////////////////////////////////////////////////////////////////////
 SMDS_ElemIteratorPtr SMDS_MeshElement::nodesIterator() const
 {
-       return elementsIterator(SMDSAbs_Node);
+        return elementsIterator(SMDSAbs_Node);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -69,7 +70,7 @@ SMDS_ElemIteratorPtr SMDS_MeshElement::nodesIterator() const
 ///////////////////////////////////////////////////////////////////////////////
 SMDS_ElemIteratorPtr SMDS_MeshElement::edgesIterator() const
 {
-       return elementsIterator(SMDSAbs_Edge);
+        return elementsIterator(SMDSAbs_Edge);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -78,7 +79,7 @@ SMDS_ElemIteratorPtr SMDS_MeshElement::edgesIterator() const
 ///////////////////////////////////////////////////////////////////////////////
 SMDS_ElemIteratorPtr SMDS_MeshElement::facesIterator() const
 {
-       return elementsIterator(SMDSAbs_Face);
+        return elementsIterator(SMDSAbs_Face);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -86,14 +87,14 @@ SMDS_ElemIteratorPtr SMDS_MeshElement::facesIterator() const
 ///////////////////////////////////////////////////////////////////////////////
 int SMDS_MeshElement::NbNodes() const
 {
-       int nbnodes=0;
-       SMDS_ElemIteratorPtr it=nodesIterator();
-       while(it->more())
-       {
-               it->next();
-               nbnodes++;
-       }
-       return nbnodes;
+        int nbnodes=0;
+        SMDS_ElemIteratorPtr it=nodesIterator();
+        while(it->more())
+        {
+                it->next();
+                nbnodes++;
+        }
+        return nbnodes;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -101,14 +102,14 @@ int SMDS_MeshElement::NbNodes() const
 ///////////////////////////////////////////////////////////////////////////////
 int SMDS_MeshElement::NbEdges() const
 {
-       int nbedges=0;
-       SMDS_ElemIteratorPtr it=edgesIterator();
-       while(it->more())
-       {
-               it->next();
-               nbedges++;
-       }
-       return nbedges;
+        int nbedges=0;
+        SMDS_ElemIteratorPtr it=edgesIterator();
+        while(it->more())
+        {
+                it->next();
+                nbedges++;
+        }
+        return nbedges;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -116,14 +117,14 @@ int SMDS_MeshElement::NbEdges() const
 ///////////////////////////////////////////////////////////////////////////////
 int SMDS_MeshElement::NbFaces() const
 {
-       int nbfaces=0;
-       SMDS_ElemIteratorPtr it=facesIterator();
-       while(it->more())
-       {
-               it->next();
-               nbfaces++;
-       }
-       return nbfaces;
+        int nbfaces=0;
+        SMDS_ElemIteratorPtr it=facesIterator();
+        while(it->more())
+        {
+                it->next();
+                nbfaces++;
+        }
+        return nbfaces;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -147,23 +148,23 @@ class SMDS_MeshElement_MyIterator:public SMDS_ElemIterator
   const SMDS_MeshElement* next()
   {
     myMore=false;
-    return myElement;  
-  }    
+    return myElement;   
+  }     
 };
 SMDS_ElemIteratorPtr SMDS_MeshElement::
-       elementsIterator(SMDSAbs_ElementType type) const
+        elementsIterator(SMDSAbs_ElementType type) const
 {
-       /** @todo Check that iterator in the child classes return elements
-       in the same order for each different implementation (i.e: SMDS_VolumeOfNodes
-       and SMDS_VolumeOfFaces */
-       
-       if(type==GetType())
+        /** @todo Check that iterator in the child classes return elements
+        in the same order for each different implementation (i.e: SMDS_VolumeOfNodes
+        and SMDS_VolumeOfFaces */
+        
+        if(type==GetType())
           return SMDS_ElemIteratorPtr(new SMDS_MeshElement_MyIterator(this));
-       else 
-       {
+        else 
+        {
           MESSAGE("Iterator not implemented");
           return SMDS_ElemIteratorPtr((SMDS_ElemIterator*)NULL);
-       }
+        }
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -171,32 +172,32 @@ SMDS_ElemIteratorPtr SMDS_MeshElement::
 ///////////////////////////////////////////////////////////////////////////////
 int SMDS_MeshElement::GetID() const
 {
-       return myID;
+        return myID;
 }
 
 bool operator<(const SMDS_MeshElement& e1, const SMDS_MeshElement& e2)
 {
-       if(e1.GetType()!=e2.GetType()) return false;
-       switch(e1.GetType())
-       {
-       case SMDSAbs_Node:
-               return static_cast<const SMDS_MeshNode &>(e1) <
-                       static_cast<const SMDS_MeshNode &>(e2);
+        if(e1.GetType()!=e2.GetType()) return false;
+        switch(e1.GetType())
+        {
+        case SMDSAbs_Node:
+                return static_cast<const SMDS_MeshNode &>(e1) <
+                        static_cast<const SMDS_MeshNode &>(e2);
 
-       case SMDSAbs_Edge:
-               return static_cast<const SMDS_MeshEdge &>(e1) <
-                       static_cast<const SMDS_MeshEdge &>(e2);
+        case SMDSAbs_Edge:
+                return static_cast<const SMDS_MeshEdge &>(e1) <
+                        static_cast<const SMDS_MeshEdge &>(e2);
 
-       case SMDSAbs_Face:
-               return static_cast<const SMDS_MeshFace &>(e1) <
-                       static_cast<const SMDS_MeshFace &>(e2);
+        case SMDSAbs_Face:
+                return static_cast<const SMDS_MeshFace &>(e1) <
+                        static_cast<const SMDS_MeshFace &>(e2);
 
-       case SMDSAbs_Volume:
-               return static_cast<const SMDS_MeshVolume &>(e1) <
-                       static_cast<const SMDS_MeshVolume &>(e2);
+        case SMDSAbs_Volume:
+                return static_cast<const SMDS_MeshVolume &>(e1) <
+                        static_cast<const SMDS_MeshVolume &>(e2);
 
-       default : MESSAGE("Internal Error");
-       }
+        default : MESSAGE("Internal Error");
+        }
         return false;
 }
 
@@ -227,6 +228,17 @@ bool SMDS_MeshElement::IsMediumNode(const SMDS_MeshNode* node) const
   return false;
 }
 
+//================================================================================
+/*!
+ * \brief Return number of nodes excluding medium ones
+ */
+//================================================================================
+
+int SMDS_MeshElement::NbCornerNodes() const
+{
+  return IsQuadratic() ? NbNodes() - NbEdges() : NbNodes();
+}
+
 //================================================================================
   /*!
    * \brief Check if a node belongs to the element
index 939eabd5cadb1df58072fb89a7755872b84f5edc..3f8459a4e25bb4eba63976b6a961ebe739324e1c 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_MeshElement.hxx
 //  Module : SMESH
 #define _SMDS_MeshElement_HeaderFile
 
 #include "SMESH_SMDS.hxx"
-       
+        
 #include "SMDSAbs_ElementType.hxx"
 #include "SMDS_MeshObject.hxx"
 #include "SMDS_ElemIterator.hxx"
 #include "SMDS_MeshElementIDFactory.hxx"
+#include "SMDS_StdIterator.hxx"
 
 #include <vector>
 #include <iostream>
@@ -63,6 +65,11 @@ public:
   SMDS_ElemIteratorPtr facesIterator() const;
   virtual SMDS_ElemIteratorPtr elementsIterator(SMDSAbs_ElementType type) const;
 
+  // std-like iteration on nodes
+  typedef SMDS_StdIterator< const SMDS_MeshNode*, SMDS_ElemIteratorPtr > iterator;
+  iterator begin_nodes() const { return iterator( nodesIterator() ); }
+  iterator end_nodes()   const { return iterator(); }
+
   virtual int NbNodes() const;
   virtual int NbEdges() const;
   virtual int NbFaces() const;
@@ -77,6 +84,7 @@ public:
   virtual SMDSAbs_EntityType  GetEntityType() const = 0;
 
   virtual bool IsMediumNode(const SMDS_MeshNode* node) const;
+  virtual int  NbCornerNodes() const;
 
   friend SMDS_EXPORT std::ostream & operator <<(std::ostream & OS, const SMDS_MeshElement *);
   friend SMDS_EXPORT bool SMDS_MeshElementIDFactory::BindID(int ID,SMDS_MeshElement* elem);
index e33e75ae9a807a89b2df2cefc0bb0a80a46e01c9..cee7145626d7f9727a719c647bb48716dfe8d92e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_MeshElementIDFactory.cxx
 //  Author : Jean-Michel BOULCOURT
index e55da180f236a43009cac0bbc2ef195d04020c9a..dddbdcb95b9fe140b0bf39b19a349667e932b0af 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_MeshElementIDFactory.hxx
 //  Module : SMESH
index a3219e8709d443f3e522fd46fc59e9ac4ce0b05e..691bdc1165b9145b885295c192ff9fec0669fc76 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //
 #include "SMDS_MeshFace.hxx"
 
 SMDSAbs_ElementType SMDS_MeshFace::GetType() const
 {
-       return SMDSAbs_Face;
+        return SMDSAbs_Face;
 }
 
 vtkIdType SMDS_MeshFace::GetVtkType() const
index 8013e70e3264af6bab3d8085f3a271fec14018e2..6587b2960ffa524fa70449e4fa0cd41b55922d51 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_MeshFace.hxx
 //  Module : SMESH
@@ -33,8 +34,8 @@
 class SMDS_EXPORT SMDS_MeshFace:public SMDS_MeshCell
 {
   public:
-       SMDSAbs_ElementType GetType() const;
-  virtual vtkIdType GetVtkType() const;
+        SMDSAbs_ElementType GetType() const;
+        virtual vtkIdType GetVtkType() const;
 };
 
 #endif
index 67c1df42616525e0e5abb2eb4412faf75ecfef33..1ee568ea969525a94fb7a4031235e0aa0eb135d5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_MeshGroup.cxx
 //  Author : Jean-Michel BOULCOURT
@@ -40,7 +41,7 @@ using namespace std;
 
 SMDS_MeshGroup::SMDS_MeshGroup(const SMDS_Mesh * theMesh,
                                const SMDSAbs_ElementType theType)
-       :myMesh(theMesh),myType(theType), myParent(NULL)
+        :myMesh(theMesh),myType(theType), myParent(NULL)
 {
 }
 
@@ -51,7 +52,7 @@ SMDS_MeshGroup::SMDS_MeshGroup(const SMDS_Mesh * theMesh,
 
 SMDS_MeshGroup::SMDS_MeshGroup(SMDS_MeshGroup * theParent,
                                const SMDSAbs_ElementType theType)
-       :myMesh(theParent->myMesh),myType(theType), myParent(theParent)
+        :myMesh(theParent->myMesh),myType(theType), myParent(theParent)
 {
 }
 
@@ -63,9 +64,9 @@ SMDS_MeshGroup::SMDS_MeshGroup(SMDS_MeshGroup * theParent,
 const SMDS_MeshGroup *SMDS_MeshGroup::AddSubGroup
                 (const SMDSAbs_ElementType theType)
 {
-       const SMDS_MeshGroup * subgroup = new SMDS_MeshGroup(this,theType);
-       myChildren.insert(myChildren.end(),subgroup);
-       return subgroup;
+        const SMDS_MeshGroup * subgroup = new SMDS_MeshGroup(this,theType);
+        myChildren.insert(myChildren.end(),subgroup);
+        return subgroup;
 }
 
 //=======================================================================
@@ -75,19 +76,19 @@ const SMDS_MeshGroup *SMDS_MeshGroup::AddSubGroup
 
 bool SMDS_MeshGroup::RemoveSubGroup(const SMDS_MeshGroup * theGroup)
 {
-       bool found = false;     
-       list<const SMDS_MeshGroup*>::iterator itgroup;
-       for(itgroup=myChildren.begin(); itgroup!=myChildren.end(); itgroup++)
-       {
-               const SMDS_MeshGroup* subgroup=*itgroup;
-               if (subgroup == theGroup)
-               {
-                       found = true;
-                       myChildren.erase(itgroup);
-               }
-       }
-
-       return found;
+        bool found = false;     
+        list<const SMDS_MeshGroup*>::iterator itgroup;
+        for(itgroup=myChildren.begin(); itgroup!=myChildren.end(); itgroup++)
+        {
+                const SMDS_MeshGroup* subgroup=*itgroup;
+                if (subgroup == theGroup)
+                {
+                        found = true;
+                        myChildren.erase(itgroup);
+                }
+        }
+
+        return found;
 }
 
 //=======================================================================
@@ -97,12 +98,12 @@ bool SMDS_MeshGroup::RemoveSubGroup(const SMDS_MeshGroup * theGroup)
 
 bool SMDS_MeshGroup::RemoveFromParent()
 {
-       
-       if (myParent==NULL) return false;
-       else
-       {
-               return (myParent->RemoveSubGroup(this));
-       }
+        
+        if (myParent==NULL) return false;
+        else
+        {
+                return (myParent->RemoveSubGroup(this));
+        }
 }
 //=======================================================================
 //function : Clear
@@ -111,8 +112,8 @@ bool SMDS_MeshGroup::RemoveFromParent()
 
 void SMDS_MeshGroup::Clear()
 {
-       myElements.clear();
-       myType = SMDSAbs_All;
+        myElements.clear();
+        myType = SMDSAbs_All;
 }
 
 //=======================================================================
@@ -122,14 +123,14 @@ void SMDS_MeshGroup::Clear()
 
 void SMDS_MeshGroup::Add(const SMDS_MeshElement * theElem)
 {
-       // the type of the group is determined by the first element added
-       if (myElements.empty()) myType = theElem->GetType();
-       else if (theElem->GetType() != myType) {
-         MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<<theElem->GetType()<<"!="<<myType);
-         return;
-       }
-       
-       myElements.insert(theElem);
+        // the type of the group is determined by the first element added
+        if (myElements.empty()) myType = theElem->GetType();
+        else if (theElem->GetType() != myType) {
+          MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<<theElem->GetType()<<"!="<<myType);
+          return;
+        }
+        
+        myElements.insert(theElem);
 }
 
 //=======================================================================
@@ -156,7 +157,7 @@ bool SMDS_MeshGroup::Remove(const SMDS_MeshElement * theElem)
 
 bool SMDS_MeshGroup::Contains(const SMDS_MeshElement * theElem) const
 {
-       return myElements.find(theElem)!=myElements.end();
+        return myElements.find(theElem)!=myElements.end();
 }
 
 //=======================================================================
index 788aaa79a729fc86e1efc5804cf33c18e0cd0b59..9e8a0f379a8f90b6700e50641f7136c6700274ca 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_MeshGroup.hxx
 //  Module : SMESH
 class SMDS_EXPORT SMDS_MeshGroup:public SMDS_MeshObject
 {
   public:
-       SMDS_MeshGroup(const SMDS_Mesh * theMesh,
+        SMDS_MeshGroup(const SMDS_Mesh * theMesh,
                        const SMDSAbs_ElementType theType = SMDSAbs_All);
-       const SMDS_MeshGroup * AddSubGroup
+        const SMDS_MeshGroup * AddSubGroup
                       (const SMDSAbs_ElementType theType = SMDSAbs_All);
-       virtual bool RemoveSubGroup(const SMDS_MeshGroup* theGroup);
-       virtual bool RemoveFromParent();
+        virtual bool RemoveSubGroup(const SMDS_MeshGroup* theGroup);
+        virtual bool RemoveFromParent();
 
         const SMDS_Mesh* GetMesh() const { return myMesh; }
 
         void SetType (const SMDSAbs_ElementType theType);
         void Clear();
-       void Add(const SMDS_MeshElement * theElem);
-       bool Remove(const SMDS_MeshElement * theElem);
-       bool IsEmpty() const { return myElements.empty(); }
-       int Extent() const { return myElements.size(); }
+        void Add(const SMDS_MeshElement * theElem);
+        bool Remove(const SMDS_MeshElement * theElem);
+        bool IsEmpty() const { return myElements.empty(); }
+        int Extent() const { return myElements.size(); }
 
-       int SubGroupsNb() const { return myChildren.size(); }
+        int SubGroupsNb() const { return myChildren.size(); }
 
         SMDSAbs_ElementType GetType() const { return myType; }
 
-       bool Contains(const SMDS_MeshElement * theElem) const;
+        bool Contains(const SMDS_MeshElement * theElem) const;
 
         void InitIterator() const
         { const_cast<TIterator&>(myIterator) = myElements.begin(); }
@@ -73,17 +74,17 @@ class SMDS_EXPORT SMDS_MeshGroup:public SMDS_MeshObject
         { return *(const_cast<TGroupIterator&>(myGroupIterator))++; }
 
   private:
-       SMDS_MeshGroup(SMDS_MeshGroup* theParent,
+        SMDS_MeshGroup(SMDS_MeshGroup* theParent,
                        const SMDSAbs_ElementType theType = SMDSAbs_All);
 
         typedef std::set<const SMDS_MeshElement *>::const_iterator TIterator;
         typedef std::list<const SMDS_MeshGroup *>::const_iterator TGroupIterator;
 
-       const SMDS_Mesh *                       myMesh;
-       SMDSAbs_ElementType                     myType;
-       std::set<const SMDS_MeshElement *>      myElements;
-       SMDS_MeshGroup *                        myParent;
-       std::list<const SMDS_MeshGroup*>        myChildren;
+        const SMDS_Mesh *                       myMesh;
+        SMDSAbs_ElementType                     myType;
+        std::set<const SMDS_MeshElement *>      myElements;
+        SMDS_MeshGroup *                        myParent;
+        std::list<const SMDS_MeshGroup*>        myChildren;
         TIterator                               myIterator;
         TGroupIterator                          myGroupIterator;
 };
index 8bde46aa5fba2b0c9a5063292d0b1dfae0bb9653..a1546e9020f4f512725fda2d14d3247bac1deca3 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_MeshIDFactory.cxx
 //  Author : Jean-Michel BOULCOURT
@@ -41,19 +42,19 @@ SMDS_MeshIDFactory::SMDS_MeshIDFactory():myMaxID(-1), myMesh(0)
 
 int SMDS_MeshIDFactory::GetFreeID()
 {
-    int newid;
-       if (myPoolOfID.empty())
+        int newid;
+        if (myPoolOfID.empty())
         {
             newid = ++myMaxID;
             //MESSAGE("GetFreeID new " << newid);
         }
-       else
-       {
-               set<int>::iterator i = myPoolOfID.begin();
-               newid = *i;//myPoolOfID.top();
-               myPoolOfID.erase( i );//myPoolOfID.pop();
-               //MESSAGE("GetFreeID pool " << newid);
-       }
+        else
+        {
+                set<int>::iterator i = myPoolOfID.begin();
+                newid = *i;//myPoolOfID.top();
+                myPoolOfID.erase( i );//myPoolOfID.pop();
+                //MESSAGE("GetFreeID pool " << newid);
+        }
     return newid;
 }
 
index 9e433c9518684e03b4508a57a29d59e2cb1419f6..9f1393bd0e7259541c04705994c29ee696988947 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_MeshIDFactory.hxx
 //  Module : SMESH
index 66e7177d24d8eda1e3f4ba6e4c618e90dcd32003..06030e27d3f8f671669d72d297549f90958e9b5a 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File      : SMDS_MeshInfo.hxx
 // Created   : Mon Sep 24 18:32:41 2007
 // Author    : Edward AGAPOV (eap)
index 1752046b0bf49607c5c9d52cf6d553bd2ac0ccc2..c774deb8c36b39c53496c5dc527f945a77db158b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //
 #ifdef _MSC_VER
@@ -103,8 +104,8 @@ void SMDS_MeshNode::RemoveInverseElement(const SMDS_MeshElement * parent)
 
 void SMDS_MeshNode::Print(ostream & OS) const
 {
-       OS << "Node <" << myID << "> : X = " << X() << " Y = "
-               << Y() << " Z = " << Z() << endl;
+        OS << "Node <" << myID << "> : X = " << X() << " Y = "
+                << Y() << " Z = " << Z() << endl;
 }
 
 //=======================================================================
@@ -114,7 +115,7 @@ void SMDS_MeshNode::Print(ostream & OS) const
 
 void SMDS_MeshNode::SetPosition(const SMDS_PositionPtr& aPos)
 {
-       myPosition = aPos;
+        myPosition = aPos;
 }
 
 //=======================================================================
@@ -124,7 +125,7 @@ void SMDS_MeshNode::SetPosition(const SMDS_PositionPtr& aPos)
 
 const SMDS_PositionPtr& SMDS_MeshNode::GetPosition() const
 {
-       return myPosition;
+        return myPosition;
 }
 
 //=======================================================================
@@ -164,17 +165,17 @@ private:
       const SMDS_MeshElement* elem = myMesh->FindElement(smdsId);
       if (!elem)
       {
-         assert(0);
-         throw SALOME_Exception("SMDS_MeshNode_MyInvIterator problem Null element");
+          assert(0);
+          throw SALOME_Exception("SMDS_MeshNode_MyInvIterator problem Null element");
       }
       //MESSAGE("vtkId " << vtkId << " smdsId " << smdsId << " " << (elem!=0));
       iter++;
       return elem;
-  }    
+  }
 };
 
 SMDS_ElemIteratorPtr SMDS_MeshNode::
-       GetInverseElementIterator(SMDSAbs_ElementType type) const
+        GetInverseElementIterator(SMDSAbs_ElementType type) const
 {
     vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myID);
     //MESSAGE("myID " << myID << " ncells " << l.ncells);
@@ -230,7 +231,7 @@ private:
 };
 
 SMDS_ElemIteratorPtr SMDS_MeshNode::
-       elementsIterator(SMDSAbs_ElementType type) const
+        elementsIterator(SMDSAbs_ElementType type) const
 {
   if(type==SMDSAbs_Node)
     return SMDS_MeshElement::elementsIterator(SMDSAbs_Node); 
@@ -243,7 +244,7 @@ SMDS_ElemIteratorPtr SMDS_MeshNode::
 
 int SMDS_MeshNode::NbNodes() const
 {
-       return 1;
+        return 1;
 }
 
 
@@ -279,7 +280,7 @@ void SMDS_MeshNode::setXYZ(double x, double y, double z)
 
 SMDSAbs_ElementType SMDS_MeshNode::GetType() const
 {
-       return SMDSAbs_Node;
+        return SMDSAbs_Node;
 }
 
 vtkIdType SMDS_MeshNode::GetVtkType() const
@@ -342,14 +343,14 @@ int SMDS_MeshNode::NbInverseElements(SMDSAbs_ElementType type) const
 ///////////////////////////////////////////////////////////////////////////////
 bool operator<(const SMDS_MeshNode& e1, const SMDS_MeshNode& e2)
 {
-       return e1.GetID()<e2.GetID();
-       /*if(e1.myX<e2.myX) return true;
-       else if(e1.myX==e2.myX)
-       {
-               if(e1.myY<e2.myY) return true;
-               else if(e1.myY==e2.myY) return (e1.myZ<e2.myZ);
-               else return false;
-       }
-       else return false;*/
+        return e1.GetID()<e2.GetID();
+        /*if(e1.myX<e2.myX) return true;
+        else if(e1.myX==e2.myX)
+        {
+                if(e1.myY<e2.myY) return true;
+                else if(e1.myY==e2.myY) return (e1.myZ<e2.myZ);
+                else return false;
+        }
+        else return false;*/
 }
 
index 1e778e655a59c7caedd5cfbe9ea4bfa65eb5d8fe..ece95778a5332770bdeb9f2e37f9eae621fd5f50 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_MeshNode.hxx
 //  Module : SMESH
index b023c73e966ef7f4dfe7dfcbe166ee97f5ec0c59..e11132342905aaf0066e95b0827afeaed834d28f 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_MeshObject.cxx
 //  Author : Jean-Michel BOULCOURT
index 8004fcbf9a6dd615a03a6080d65a6590d40be1c4..c6a6fbba71a71b5379d246b66ddece13cc253d59 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_MeshObject.hxx
 //  Module : SMESH
index d0b1433b62cdbedad4a721eceb200b2dfa5420df..dae6ee1db0a89f51d5c57db89494972dc9465062 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_MeshVolume.cxx
 //  Author : Jean-Michel BOULCOURT
@@ -32,7 +33,7 @@
 
 SMDSAbs_ElementType SMDS_MeshVolume::GetType() const
 {
-       return SMDSAbs_Volume;
+        return SMDSAbs_Volume;
 }
 
 vtkIdType SMDS_MeshVolume::GetVtkType() const
index e3eea3f97606545a7d899bfe8bc8be11389af7a6..0aac68b711ee97fe7d6f340287d9ab00e94f3bec 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_MeshVolume.hxx
 //  Module : SMESH
@@ -32,9 +33,9 @@
 
 class SMDS_EXPORT SMDS_MeshVolume:public SMDS_MeshCell
 {
-       
+        
   public:
-       SMDSAbs_ElementType GetType() const;
+        SMDSAbs_ElementType GetType() const;
   virtual vtkIdType GetVtkType() const;
 };
 #endif
index d6c8fb5b16dd7c35916e2e2c03bd39c6ffe0f8ab..b441db266e8db2c8a689d1f6d0dad9ca79cd7967 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //
 #ifdef _MSC_VER
index 34a7f4dab4d8662452a9d7a7e1f508a06ace8b82..751a6baf3ee46317fb75afd5c8f63199560f79b6 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //
 #ifndef _SMDS_PolygonalFaceOfNodes_HeaderFile
index ce8ace8300e9efde4316b00c9d1aab9c067b264f..54143251a4ed3009207fa1cc54b6f674c3bd6675 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //
 #ifdef _MSC_VER
index 52d1358c1eebf7fe44cc7816842cf0d5d729fee9..ff6706855e9a585e10b9cf825be93ab57a441cc8 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_PolyhedralVolumeOfNodes.hxx
 //  Module : SMESH
@@ -38,7 +39,7 @@ class SMDS_EXPORT SMDS_PolyhedralVolumeOfNodes:public SMDS_VolumeOfNodes
 
   //virtual ~SMDS_PolyhedralVolumeOfNodes();
 
-  virtual SMDSAbs_ElementType GetType() const; 
+  virtual SMDSAbs_ElementType GetType() const;  
   virtual SMDSAbs_EntityType   GetEntityType() const { return SMDSEntity_Polyhedra; }
   virtual bool IsPoly() const { return true; };
 
index 46b63e1f8ac4d5acc7f4ab99d576674888f0f0c8..a2dfc7847ffedba9683af5f42d6c01cd879c8baa 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_Position.cxx
 //  Author : Jean-Michel BOULCOURT
@@ -42,7 +43,7 @@ SMDS_Position::SMDS_Position(int aShapeId) :myShapeId(aShapeId)
 
 void SMDS_Position::SetShapeId(int aShapeId)
 {
-       myShapeId = aShapeId;
+        myShapeId = aShapeId;
 }
 
 //=======================================================================
@@ -52,7 +53,7 @@ void SMDS_Position::SetShapeId(int aShapeId)
 
 int SMDS_Position::GetShapeId() const
 {
-       return myShapeId;
+        return myShapeId;
 }
 
 //=======================================================================
index a92f4648fbef923a49a36f074c7ea1e9d4fd1648..d4b0a605dc36a9c507ab1100b1402db9432770dc 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_Position.hxx
 //  Module : SMESH
@@ -39,18 +40,18 @@ class SMDS_EXPORT SMDS_Position
 {
 
   public:
-       const virtual double * Coords() const = 0;
-       virtual SMDS_TypeOfPosition GetTypeOfPosition() const = 0;
-       virtual int GetDim() const;
-       void SetShapeId(int aShapeId);
-       int GetShapeId() const;
-       virtual ~SMDS_Position() {}
+        const virtual double * Coords() const = 0;
+        virtual SMDS_TypeOfPosition GetTypeOfPosition() const = 0;
+        virtual int GetDim() const;
+        void SetShapeId(int aShapeId);
+        int GetShapeId() const;
+        virtual ~SMDS_Position() {}
 
   protected:
-         SMDS_Position(int aShapeId);
+          SMDS_Position(int aShapeId);
 
   private:
-       int myShapeId;
+        int myShapeId;
 };
 
 
index a232bc99837501a459752995fe545e69982c62d3..dcb11b06b0d4c9ed3f7436cd814b10db9a33e6da 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 // File:      SMDS_QuadraticEdge.cxx
 // Created:   16.01.06 16:25:42
@@ -41,7 +42,7 @@ SMDS_QuadraticEdge::SMDS_QuadraticEdge(const SMDS_MeshNode * node1,
                                        const SMDS_MeshNode * node2,
                                        const SMDS_MeshNode * node12)
      :SMDS_LinearEdge(node1,node2)
-{      
+{
   myNodes[2]=node12;
 }
 
index f2be6e1353d323197b56a6830715485f66578825..367f3b0419faaa76f1b489355937a8ea03a82201 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_QuadraticEdge.hxx
 //  Module : SMESH
index 168457cf509085e4a82401c2a332ccdcd1ebb060..6b69227ced5ca29d46399a2f91ce7fff8be371f8 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 // File:      SMDS_QuadraticFaceOfNodes.cxx
 // Created:   16.01.06 17:12:58
index 2d374139b6e060ae434d922568e6b2be2c6e731d..605f348d4cac44ec29219bf2d36c3924d866f182 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_QuadraticVolumeOfNodes.hxx
 //  Module : SMESH
index 8d68ee4d0610b017f056186ded675ca3a14f9c74..ea1147a4c8114306a80b559a7b6c7b12f0d30e18 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 // File:      SMDS_QuadraticVolumeOfNodes.cxx
 // Created:   17.01.06 09:46:11
index f9ca633e48d9dea41b63e6718d9ae92af37ab851..2c6b39164c55d3d3f21d830783de86600ae6285e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_QuadraticVolumeOfNodes.hxx
 //  Module : SMESH
index e76ea8ce569927f86030f8701bdb67f93cfe75f4..e60f73eda317de0536ddb4fef067465393f16e0a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 // File      : SMDS_SetIterator.hxx
 // Created   : Mon Feb 27 16:57:43 2006
index 5647c1e95b416728674a2f6d454fbf59925a7cfb..14f9229109d1f1ece3586fd07fe8faffe4e6f584 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_SpacePosition.cxx
 //  Author : Jean-Michel BOULCOURT
index e8cde06a54b22a6588a9ae2fc552a1b78dbb9bdd..2b24d19704d616231adb62fd4b4321f8e2690834 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_SpacePosition.hxx
 //  Module : SMESH
diff --git a/src/SMDS/SMDS_StdIterator.hxx b/src/SMDS/SMDS_StdIterator.hxx
new file mode 100644 (file)
index 0000000..f14b7e3
--- /dev/null
@@ -0,0 +1,70 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//  SMESH SMDS : implementaion of Salome mesh data structure
+// File      : SMDS_StdIterator.hxx
+// Created   : Fri Feb  5 11:03:46 2010
+// Author    : Edward AGAPOV (eap)
+//
+#ifndef __SMDS_StdIterator_HXX__
+#define __SMDS_StdIterator_HXX__
+
+
+///////////////////////////////////////////////////////////////////////////////
+/*!
+ * \brief Wrapper over pointer to SMDS_Iterator, like SMDS_ElemIteratorPtr, enabling
+ *   its usage in std-like way: provide operators ++, *,  etc.
+ */
+///////////////////////////////////////////////////////////////////////////////
+
+template<typename VALUE, class PtrSMDSIterator, class EqualVALUE = std::equal_to<VALUE> >
+class SMDS_StdIterator : public std::iterator< std::input_iterator_tag, VALUE >
+{
+  VALUE           _value;
+  PtrSMDSIterator _piterator;
+  EqualVALUE      _EqualVALUE;
+
+public:
+  typedef SMDS_StdIterator<VALUE, PtrSMDSIterator> _Self;
+
+  // constructor to use as return from begin()
+  SMDS_StdIterator( PtrSMDSIterator pItr )
+    : _value( pItr->more() ? (VALUE)(pItr->next()) : 0 ), _piterator(pItr)
+  {}
+  // constructor to use as return from end()
+  SMDS_StdIterator(): _value( 0 )
+  {}
+
+  /// Return the current object
+  VALUE operator*() const
+  { return _value; }
+
+  //  Step to the next one
+  _Self&
+  operator++()
+  { _value = _piterator->more() ? VALUE( _piterator->next()) : 0; return *this; }
+
+  // Test of end
+  bool
+  operator!=(const _Self& __x) const
+  { return !_EqualVALUE( _value, __x._value); }
+
+};
+
+#endif
index da5b39c48eabe832344c15f4d424f11b7c507716..bafdfac4fd6cc0fd2cecde8661b01581088f5c3f 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_TypeOfPosition.hxx
 //  Module : SMESH
 
 enum SMDS_TypeOfPosition // Value is equal to shape dimention
 {
-       SMDS_TOP_UNSPEC  = -1,
-       SMDS_TOP_VERTEX  = 0,
-       SMDS_TOP_EDGE    = 1,
-       SMDS_TOP_FACE    = 2,
-       SMDS_TOP_3DSPACE = 3
+        SMDS_TOP_UNSPEC  = -1,
+        SMDS_TOP_VERTEX  = 0,
+        SMDS_TOP_EDGE    = 1,
+        SMDS_TOP_FACE    = 2,
+        SMDS_TOP_3DSPACE = 3
 };
 
 #endif
index c3311b5a599f8ba5a617185bbcb4733a865efcf7..6a2b7dc0d2e404642bb224d16a4bc14aead29daf 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_VertexPosition.cxx
 //  Author : Jean-Michel BOULCOURT
@@ -36,7 +37,7 @@ using namespace std;
 //=======================================================================
 
 SMDS_VertexPosition:: SMDS_VertexPosition(const int aVertexId)
-       :SMDS_Position(aVertexId)
+        :SMDS_Position(aVertexId)
 {
 }
 
@@ -47,13 +48,13 @@ SMDS_VertexPosition:: SMDS_VertexPosition(const int aVertexId)
 
 const double *SMDS_VertexPosition::Coords() const
 {
-       const static double origin[]={0,0,0};
-       MESSAGE("SMDS_VertexPosition::Coords not implemented");
-       return origin;
+        const static double origin[]={0,0,0};
+        MESSAGE("SMDS_VertexPosition::Coords not implemented");
+        return origin;
 }
 
 
 SMDS_TypeOfPosition SMDS_VertexPosition::GetTypeOfPosition() const
 {
-       return SMDS_TOP_VERTEX;
+        return SMDS_TOP_VERTEX;
 }
index dad7b5a1320831ef7940e6f486bf9cc41f6f933d..845f20aaf2e0c9ca05a46e94a8afd28b5954e7d3 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_VertexPosition.hxx
 //  Module : SMESH
 class SMDS_EXPORT SMDS_VertexPosition:public SMDS_Position
 {
 
-  public:      
-       SMDS_TypeOfPosition GetTypeOfPosition() const;
-       SMDS_VertexPosition(int aVertexId=0);
-       const double *Coords() const;
+  public:       
+        SMDS_TypeOfPosition GetTypeOfPosition() const;
+        SMDS_VertexPosition(int aVertexId=0);
+        const double *Coords() const;
 };
 
 #endif
index 76f47de39d525544d33e25984255dba27e1e3dbe..6b006b938f50989ec8bf2e64df362e6fce2d1ca4 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_VolumeOfFaces.cxx
 //  Author : Jean-Michel BOULCOURT
@@ -40,16 +41,16 @@ using namespace std;
 
 void SMDS_VolumeOfFaces::Print(ostream & OS) const
 {
-       OS << "volume <" << GetID() << "> : ";
-       int i;
-       for (i = 0; i < NbFaces()-1; ++i) OS << myFaces[i] << ",";
-       OS << myFaces[i]<< ") " << endl;
+        OS << "volume <" << GetID() << "> : ";
+        int i;
+        for (i = 0; i < NbFaces()-1; ++i) OS << myFaces[i] << ",";
+        OS << myFaces[i]<< ") " << endl;
 }
 
 
 int SMDS_VolumeOfFaces::NbFaces() const
 {
-       return myNbFaces;
+        return myNbFaces;
 }
 
 class SMDS_VolumeOfFaces_MyIterator:public SMDS_ElemIterator
@@ -74,7 +75,7 @@ class SMDS_VolumeOfFaces_MyIterator:public SMDS_ElemIterator
 };
 
 SMDS_ElemIteratorPtr SMDS_VolumeOfFaces::
-       elementsIterator(SMDSAbs_ElementType type) const
+        elementsIterator(SMDSAbs_ElementType type) const
 {
   switch(type)
   {
@@ -95,13 +96,13 @@ SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
                                        const SMDS_MeshFace * face3,
                                        const SMDS_MeshFace * face4)
 {
-       myNbFaces = 4;
-       myFaces[0]=face1;
-       myFaces[1]=face2;
-       myFaces[2]=face3;
-       myFaces[3]=face4;
-       myFaces[4]=0;
-       myFaces[5]=0;
+        myNbFaces = 4;
+        myFaces[0]=face1;
+        myFaces[1]=face2;
+        myFaces[2]=face3;
+        myFaces[3]=face4;
+        myFaces[4]=0;
+        myFaces[5]=0;
 }
 
 SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
@@ -110,13 +111,13 @@ SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
                                        const SMDS_MeshFace * face4,
                                        const SMDS_MeshFace * face5)
 {
-       myNbFaces = 5;
-       myFaces[0]=face1;
-       myFaces[1]=face2;
-       myFaces[2]=face3;
-       myFaces[3]=face4;
-       myFaces[4]=face5;
-       myFaces[5]=0;
+        myNbFaces = 5;
+        myFaces[0]=face1;
+        myFaces[1]=face2;
+        myFaces[2]=face3;
+        myFaces[3]=face4;
+        myFaces[4]=face5;
+        myFaces[5]=0;
 }
 
 SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
@@ -126,13 +127,13 @@ SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
                                        const SMDS_MeshFace * face5,
                                        const SMDS_MeshFace * face6)
 {
-       myNbFaces = 6;
-       myFaces[0]=face1;
-       myFaces[1]=face2;
-       myFaces[2]=face3;
-       myFaces[3]=face4;
-       myFaces[4]=face5;
-       myFaces[5]=face6;
+        myNbFaces = 6;
+        myFaces[0]=face1;
+        myFaces[1]=face2;
+        myFaces[2]=face3;
+        myFaces[3]=face4;
+        myFaces[4]=face5;
+        myFaces[5]=face6;
 }
 
 SMDSAbs_EntityType SMDS_VolumeOfFaces::GetEntityType() const
index 3c9ca131e6025d34ac9514a203cc88c3c7c9a940..1b3c8374fbb8dc2267fc7ff6cca0a150cc28c2d8 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_VolumeOfFaces.hxx
 //  Module : SMESH
 
 class SMDS_EXPORT SMDS_VolumeOfFaces:public SMDS_MeshVolume
 {
-       
+        
   public:
-       SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
+        SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
                            const SMDS_MeshFace * face2,
                            const SMDS_MeshFace * face3,
                            const SMDS_MeshFace * face4);
-       SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
+        SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
                            const SMDS_MeshFace * face2,
                            const SMDS_MeshFace * face3,
                            const SMDS_MeshFace * face4,
                            const SMDS_MeshFace * face5);
-       SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
+        SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
                            const SMDS_MeshFace * face2,
                            const SMDS_MeshFace * face3,
                            const SMDS_MeshFace * face4,
                            const SMDS_MeshFace * face5,
                            const SMDS_MeshFace * face6);
 
-  virtual SMDSAbs_EntityType GetEntityType() const;
-       void Print(std::ostream & OS) const;
-       
-       int NbFaces() const;
+        virtual SMDSAbs_EntityType GetEntityType() const;
+        void Print(std::ostream & OS) const;
+
+        int NbFaces() const;
 
   protected:
-       SMDS_ElemIteratorPtr
-               elementsIterator(SMDSAbs_ElementType type) const;
-       const SMDS_MeshFace * myFaces[6];
-       int                   myNbFaces;
+        SMDS_ElemIteratorPtr
+                elementsIterator(SMDSAbs_ElementType type) const;
+        const SMDS_MeshFace * myFaces[6];
+        int                   myNbFaces;
 };
 #endif
index b17e89318210be41214e784c77dee4a472edd100..507fea94eeb0b787e1dbcd96e535d7c891f4e638 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //
 #ifdef _MSC_VER
index 6b67328c64f45d643b51eb9501b1cb9b184068e8..c194ea3ba9b32392fa87f4fb7cb4f6d06b9b048e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 //  File   : SMDS_MeshVolume.hxx
 //  Module : SMESH
 
 class SMDS_EXPORT SMDS_VolumeOfNodes:public SMDS_MeshVolume
 {
-       
+        
   public:
-       SMDS_VolumeOfNodes(
-               const SMDS_MeshNode * node1,
-               const SMDS_MeshNode * node2,
-               const SMDS_MeshNode * node3,
-               const SMDS_MeshNode * node4);
-       SMDS_VolumeOfNodes(
-               const SMDS_MeshNode * node1,
-               const SMDS_MeshNode * node2,
-               const SMDS_MeshNode * node3,
-               const SMDS_MeshNode * node4,
-               const SMDS_MeshNode * node5);
-       SMDS_VolumeOfNodes(
-               const SMDS_MeshNode * node1,
-               const SMDS_MeshNode * node2,
-               const SMDS_MeshNode * node3,
-               const SMDS_MeshNode * node4,
-               const SMDS_MeshNode * node5,
-               const SMDS_MeshNode * node6);
-       SMDS_VolumeOfNodes(
-               const SMDS_MeshNode * node1,
-               const SMDS_MeshNode * node2,
-               const SMDS_MeshNode * node3,
-               const SMDS_MeshNode * node4,
-               const SMDS_MeshNode * node5,
-               const SMDS_MeshNode * node6,
-               const SMDS_MeshNode * node7,
-               const SMDS_MeshNode * node8);
+        SMDS_VolumeOfNodes(
+                const SMDS_MeshNode * node1,
+                const SMDS_MeshNode * node2,
+                const SMDS_MeshNode * node3,
+                const SMDS_MeshNode * node4);
+        SMDS_VolumeOfNodes(
+                const SMDS_MeshNode * node1,
+                const SMDS_MeshNode * node2,
+                const SMDS_MeshNode * node3,
+                const SMDS_MeshNode * node4,
+                const SMDS_MeshNode * node5);
+        SMDS_VolumeOfNodes(
+                const SMDS_MeshNode * node1,
+                const SMDS_MeshNode * node2,
+                const SMDS_MeshNode * node3,
+                const SMDS_MeshNode * node4,
+                const SMDS_MeshNode * node5,
+                const SMDS_MeshNode * node6);
+        SMDS_VolumeOfNodes(
+                const SMDS_MeshNode * node1,
+                const SMDS_MeshNode * node2,
+                const SMDS_MeshNode * node3,
+                const SMDS_MeshNode * node4,
+                const SMDS_MeshNode * node5,
+                const SMDS_MeshNode * node6,
+                const SMDS_MeshNode * node7,
+                const SMDS_MeshNode * node8);
         bool ChangeNodes(const SMDS_MeshNode* nodes[],
                          const int            nbNodes);
         ~SMDS_VolumeOfNodes();
 
-       void Print(std::ostream & OS) const;
-       int NbFaces() const;
-       int NbNodes() const;
-       int NbEdges() const;
-       virtual SMDSAbs_ElementType GetType() const;    
+        void Print(std::ostream & OS) const;
+        int NbFaces() const;
+        int NbNodes() const;
+        int NbEdges() const;
+        virtual SMDSAbs_ElementType GetType() const;    
         virtual SMDSAbs_EntityType GetEntityType() const;
 
   /*!
@@ -80,10 +81,10 @@ class SMDS_EXPORT SMDS_VolumeOfNodes:public SMDS_MeshVolume
   virtual const SMDS_MeshNode* GetNode(const int ind) const;
 
   protected:
-       SMDS_ElemIteratorPtr
-               elementsIterator(SMDSAbs_ElementType type) const;
-       const SMDS_MeshNode** myNodes;
-       int                   myNbNodes;
+        SMDS_ElemIteratorPtr
+                elementsIterator(SMDSAbs_ElementType type) const;
+        const SMDS_MeshNode** myNodes;
+        int                   myNbNodes;
 
 };
 
index 24509b255f6b536228c11861aaf6b7b51c1881b0..52633d6107bfa35f18162884796c627df7e3704e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File      : SMDS_VolumeTool.cxx
 // Created   : Tue Jul 13 12:22:13 2004
 // Author    : Edward AGAPOV (eap)
@@ -447,14 +448,11 @@ SMDS_VolumeTool::SMDS_VolumeTool (const SMDS_MeshElement* theVolume)
 
 SMDS_VolumeTool::~SMDS_VolumeTool()
 {
-  if (myVolumeNodes != NULL) {
-    delete [] myVolumeNodes;
-    myVolumeNodes = NULL;
-  }
-  if (myFaceNodes != NULL) {
-    delete [] myFaceNodes;
-    myFaceNodes = NULL;
-  }
+  if ( myVolumeNodes != NULL ) delete [] myVolumeNodes;
+  if ( myFaceNodes != NULL   ) delete [] myFaceNodes;
+
+  myFaceNodeIndices = NULL;
+  myVolumeNodes = myFaceNodes = NULL;
 }
 
 //=======================================================================
@@ -914,12 +912,16 @@ const SMDS_MeshNode** SMDS_VolumeTool::GetFaceNodes( int faceIndex )
 
 const int* SMDS_VolumeTool::GetFaceNodesIndices( int faceIndex )
 {
-  if (myVolume->IsPoly()) {
-    MESSAGE("Warning: attempt to obtain FaceNodesIndices of polyhedral volume");
-    return NULL;
-  }
   if ( !setFace( faceIndex ))
     return 0;
+
+  if (myVolume->IsPoly())
+  {
+    myPolyIndices.resize( myFaceNbNodes + 1 );
+    myFaceNodeIndices = & myPolyIndices[0];
+    for ( int i = 0; i <= myFaceNbNodes; ++i )
+      myFaceNodeIndices[i] = myVolume->GetNodeIndex( myFaceNodes[i] );
+  }
   return myFaceNodeIndices;
 }
 
@@ -1686,7 +1688,7 @@ int SMDS_VolumeTool::NbFaceNodes(VolumeType type,
 //purpose  : return element
 //=======================================================================
 
-const SMDS_MeshVolume* SMDS_VolumeTool::Get() const
+const SMDS_MeshVolume* SMDS_VolumeTool::Element() const
 {
   return static_cast<const SMDS_MeshVolume*>( myVolume );
 }
index 3b637c839586fab6ae4dfb148d574b424f363a1f..6791fb9c72a43560378ebe5efb95f8dd43d097be 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMDS : implementaion of Salome mesh data structure
 // File      : SMDS_VolumeTool.hxx
 // Module    : SMESH
@@ -61,7 +62,7 @@ class SMDS_EXPORT SMDS_VolumeTool
   // Set volume.
   // Return false if theVolume is not of type SMDSAbs_Volume
 
-  const SMDS_MeshVolume* Get() const;
+  const SMDS_MeshVolume* Element() const;
   // return element
 
   int ID() const;
@@ -210,6 +211,7 @@ private:
   int                     myNbFaces;
   int                     myVolumeNbNodes;
   const SMDS_MeshNode**   myVolumeNodes;
+  std::vector< int >      myPolyIndices;
 
   bool                    myExternalFaces;
 
index 97a1b63ff14f0c7c0d062b195462ce8811c8e01a..6056a0c1b0eca16ef0a439f10cfc630fe6d1f402 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_SMDS.hxx
 //  Author : Alexander A. BORODIN
 //  Module : SMESH
index e7045b594934ac1df00fbb6839c87e21c23ab5e6..9db3b14506b0ddd0594da91f39364a1183ee26dc 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH SMESH : implementaion of SMESH idl descriptions
 #  File   : Makefile.in
 #  Author : Paul RASCLE, EDF
@@ -54,6 +52,7 @@ salomeinclude_HEADERS = \
        SMESH_OctreeNode.hxx \
        SMESH_Comment.hxx \
        SMESH_ComputeError.hxx \
+       SMESH_File.hxx \
        SMESH_SMESH.hxx
 
 # Libraries targets
@@ -77,7 +76,8 @@ dist_libSMESHimpl_la_SOURCES = \
        SMESH_HypoFilter.cxx \
        SMESH_MesherHelper.cxx \
        SMESH_Octree.cxx \
-       SMESH_OctreeNode.cxx
+       SMESH_OctreeNode.cxx \
+       SMESH_File.cxx
 
 # additionnal information to compile and link file
 libSMESHimpl_la_CPPFLAGS = \
index f20074cc3d00a9d252a6e8cd8b6f55d4732999b5..a6e54e1643b0c7b2ebb940b78470981c4e42209d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_0D_Algo.cxx
 //  Module : SMESH
index 71f7476e6b86be87a9e559254110c2fac7918561..16e0536aa7aa9f4d0236bcaca0831591118441e3 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_0D_Algo.hxx
 //  Module : SMESH
index ff6b9f7ff2c8ae7f7f54b64d695959ab26450c20..3bbbf04f3d0ec982276aa915f388929c864e48dd 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_1D_Algo.cxx
 //  Author : Paul RASCLE, EDF
index 9da4fd9858aeebc354aa7143434b861d18edbda8..2224a5393b944099a9f9e21e57e346fadd2da0c5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_1D_Algo.hxx
 //  Author : Paul RASCLE, EDF
index 00723cbd7268d4a4ee18c4f333395c5ac854be32..034b4de00d946ebfc659e2807e730fc16db99dee 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_2D_Algo.cxx
 //  Author : Paul RASCLE, EDF
index 41a8bc1afae551e608dffc5c13d41b1ffea3992f..8e4bd1bf41788cca93f06f85181acc0e80cd1bf0 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_2D_Algo.hxx
 //  Author : Paul RASCLE, EDF
index ee547368fd03a9886a90ed1c311bb5c5cbe5d656..8d05c23a07b295b14c5251eea1c18da5e753129d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_3D_Algo.cxx
 //  Author : Paul RASCLE, EDF
index 9c47614088254db108a4089c10e0d4546eeee2bf..df869f15a3f0dbb857052594fef0abd4caa213e5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_3D_Algo.hxx
 //  Author : Paul RASCLE, EDF
index 579d5ad413f05a44888d2e02978bc7a43748b3c9..2a885349cdeabbdcc21042969e496354b85dcb47 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_Algo.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
 //
-
 #include "SMESH_Algo.hxx"
 #include "SMESH_Comment.hxx"
 #include "SMESH_Gen.hxx"
@@ -61,6 +61,7 @@
 #include "utilities.h"
 
 #include <algorithm>
+#include <limits>
 
 using namespace std;
 
@@ -76,7 +77,7 @@ SMESH_Algo::SMESH_Algo (int hypId, int studyId, SMESH_Gen * gen)
   gen->_mapAlgo[hypId] = this;
 
   _onlyUnaryInput = _requireDescretBoundary = _requireShape = true;
-  _quadraticMesh = false;
+  _quadraticMesh = _supportSubmeshes = false;
   _error = COMPERR_OK;
 }
 
@@ -175,6 +176,37 @@ double SMESH_Algo::EdgeLength(const TopoDS_Edge & E)
   return length;
 }
 
+//================================================================================
+/*!
+ * \brief Calculate normal of a mesh face
+ */
+//================================================================================
+
+bool SMESH_Algo::FaceNormal(const SMDS_MeshElement* F, gp_XYZ& normal, bool normalized)
+{
+  if ( !F || F->GetType() != SMDSAbs_Face )
+    return false;
+
+  normal.SetCoord(0,0,0);
+  int nbNodes = F->IsQuadratic() ? F->NbNodes()/2 : F->NbNodes();
+  for ( int i = 0; i < nbNodes-2; ++i )
+  {
+    gp_XYZ p[3];
+    for ( int n = 0; n < 3; ++n )
+    {
+      const SMDS_MeshNode* node = F->GetNode( i + n );
+      p[n].SetCoord( node->X(), node->Y(), node->Z() );
+    }
+    normal += ( p[2] - p[1] ) ^ ( p[0] - p[1] );
+  }
+  double size2 = normal.SquareModulus();
+  bool ok = ( size2 > numeric_limits<double>::min() * numeric_limits<double>::min());
+  if ( normalized && ok )
+    normal /= sqrt( size2 );
+
+  return ok;
+}
+
 //================================================================================
 /*!
  * \brief Find out elements orientation on a geometrical face
@@ -457,9 +489,10 @@ bool SMESH_Algo::InitCompatibleHypoFilter( SMESH_HypoFilter & theFilter,
  */
 //================================================================================
 
-GeomAbs_Shape SMESH_Algo::Continuity(const TopoDS_Edge & E1,
-                                     const TopoDS_Edge & E2)
+GeomAbs_Shape SMESH_Algo::Continuity(TopoDS_Edge E1,
+                                     TopoDS_Edge E2)
 {
+  E1.Orientation(TopAbs_FORWARD), E2.Orientation(TopAbs_FORWARD); // avoid pb with internal edges
   TopoDS_Vertex V = TopExp::LastVertex (E1, true);
   if ( !V.IsSame( TopExp::FirstVertex(E2, true )))
     if ( !TopExp::CommonVertex( E1, E2, V ))
@@ -500,6 +533,21 @@ const SMDS_MeshNode* SMESH_Algo::VertexNode(const TopoDS_Vertex& V,
   return 0;
 }
 
+//=======================================================================
+//function : GetCommonNodes
+//purpose  : Return nodes common to two elements
+//=======================================================================
+
+vector< const SMDS_MeshNode*> SMESH_Algo::GetCommonNodes(const SMDS_MeshElement* e1,
+                                                         const SMDS_MeshElement* e2)
+{
+  vector< const SMDS_MeshNode*> common;
+  for ( int i = 0 ; i < e1->NbNodes(); ++i )
+    if ( e2->GetNodeIndex( e1->GetNode( i )) >= 0 )
+      common.push_back( e1->GetNode( i ));
+  return common;
+}
+
 //================================================================================
 /*!
  * \brief Sets event listener to submeshes if necessary
index da108fbf6602be183ebe3e8ae128f88b52565d5c..03c0b7bdb11542d853733c945bbb981123288395 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_Algo.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
 //
-
 #ifndef _SMESH_ALGO_HXX_
 #define _SMESH_ALGO_HXX_
 
@@ -53,11 +53,20 @@ class SMESHDS_Mesh;
 class SMDS_MeshNode;
 class SMESH_subMesh;
 class SMESH_MesherHelper;
+class gp_XYZ;
 
-typedef std::map< SMESH_subMesh*, std::vector<int> > MapShapeNbElems;
-// vector must have size corresponding to EntityType_Last from SMDSAbs:
+typedef std::map< SMESH_subMesh*, std::vector<int> >           MapShapeNbElems;
 typedef std::map< SMESH_subMesh*, std::vector<int> >::iterator MapShapeNbElemsItr;
 
+/*!
+ * \brief Root of all algorithms
+ *
+ *  Methods of the class are grouped into several parts:
+ *  - main lifecycle methods, like Compute()
+ *  - methods describing features of the algorithm, like NeedShape()
+ *  - methods related to dependencies between sub-meshes imposed by the algorith
+ *  - static utilities, like EdgeLength()
+ */
 class SMESH_EXPORT SMESH_Algo:public SMESH_Hypothesis
 {
 public:
@@ -281,13 +290,18 @@ public:
    */
   static double EdgeLength(const TopoDS_Edge & E);
 
+  /*!
+   * \brief Calculate normal of a mesh face
+   */
+  static bool FaceNormal(const SMDS_MeshElement* F, gp_XYZ& normal, bool normalized=true);
+
   /*!
    * \brief Return continuity of two edges
     * \param E1 - the 1st edge
     * \param E2 - the 2nd edge
     * \retval GeomAbs_Shape - regularity at the junction between E1 and E2
    */
-  static GeomAbs_Shape Continuity(const TopoDS_Edge & E1, const TopoDS_Edge & E2);
+  static GeomAbs_Shape Continuity(TopoDS_Edge E1, TopoDS_Edge E2);
 
   /*!
    * \brief Return true if an edge can be considered as a continuation of another
@@ -302,9 +316,13 @@ public:
     * \param meshDS - mesh
     * \retval const SMDS_MeshNode* - found node or NULL
    */
-  static const SMDS_MeshNode* VertexNode(const TopoDS_Vertex& V,
-                                         const SMESHDS_Mesh* meshDS);
+  static const SMDS_MeshNode* VertexNode(const TopoDS_Vertex& V, const SMESHDS_Mesh* meshDS);
 
+  /*!
+   * \brief Return nodes common to two elements
+   */
+  static std::vector< const SMDS_MeshNode*> GetCommonNodes(const SMDS_MeshElement* e1,
+                                                           const SMDS_MeshElement* e2);
 protected:
 
   /*!
index 821d8fa9f7940c3208bcad592856a7a297e86abd..b26cfbd9ab435f0510aa6221b2e492743a6ac912 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File      : SMESH_Pattern.hxx
 // Created   : Mon Aug  2 10:30:00 2004
 // Author    : Edward AGAPOV (eap)
@@ -981,10 +982,13 @@ int SMESH_Block::GetOrderedEdges (const TopoDS_Face&   theFace,
   TopoDS_Wire anOuterWire =
     theShapeAnalysisAlgo ? ShapeAnalysis::OuterWire( theFace ) : BRepTools::OuterWire( theFace );
   for ( TopoDS_Iterator wIt (theFace); wIt.More(); wIt.Next() )
-    if ( !anOuterWire.IsSame( wIt.Value() ))
-      aWireList.push_back( TopoDS::Wire( wIt.Value() ));
-    else
-      aWireList.push_front( TopoDS::Wire( wIt.Value() ));
+    if ( wIt.Value().ShapeType() == TopAbs_WIRE ) // it can be internal vertex!
+    {
+      if ( !anOuterWire.IsSame( wIt.Value() ))
+        aWireList.push_back( TopoDS::Wire( wIt.Value() ));
+      else
+        aWireList.push_front( TopoDS::Wire( wIt.Value() ));
+    }
 
   // loop on edges of wires
   theNbVertexInWires.clear();
@@ -1000,6 +1004,11 @@ int SMESH_Block::GetOrderedEdges (const TopoDS_Face&   theFace,
       // edge = TopoDS::Edge( edge.Oriented( wExp.Orientation() ));
       theEdges.push_back( edge );
     }
+    if ( iE == 0 ) // wExp returns nothing if e.g. the wire contains one internal edge
+    { // Issue 0020676
+      for ( TopoDS_Iterator e( *wlIt ); e.More(); e.Next(), ++iE )
+        theEdges.push_back( TopoDS::Edge( e.Value() ));
+    }
     theNbVertexInWires.push_back( iE );
     iE = 0;
     if ( wlIt == aWireList.begin() && theEdges.size() > 1 ) { // the outer wire
index 97caf611610fa923c5fd0d8fdd40d6b92ae12121..f3d9510691666072b6cce9cb622a0e7cad40651b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File      : SMESH_Block.hxx
 // Created   : Tue Nov 30 12:42:18 2004
 // Author    : Edward AGAPOV (eap)
index d1d32b9e68e24efc769dbfd555039e03bf4e92c8..11fc593e7a0fff1bb72f3e5b86492cfd5a61428a 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : SMESH_Comment.hxx
 // Created   : Wed Mar 14 18:28:45 2007
@@ -50,6 +48,12 @@ public :
     this->string::operator=( _s.str() );
   }
 
+  SMESH_Comment & operator=(const SMESH_Comment& c) {
+    _s << c.c_str() ;
+    this->string::operator=( _s.str() );
+    return *this;
+  }
+
   template <class T>
   SMESH_Comment( const T &anything ) {
     _s << anything ;
index a764f0a3b34e43eb9815539ba6ffaece663d88af..1aa3ff2a9559c4fe3631afb44e493f96feeee91f 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_Hypothesis.hxx
 //  Author : Edward AGAPOV (eap)
@@ -98,6 +96,7 @@ std::string SMESH_ComputeError::CommonName() const
   _case2char(COMPERR_EXCEPTION     );
   _case2char(COMPERR_MEMORY_PB     );
   _case2char(COMPERR_ALGO_FAILED   );
+  _case2char(COMPERR_BAD_SHAPE     );
   default:;
   }
   return "";
index 0ac60ca29851ed5e3c1734916fe5e36f1059360e..bf26824bd926a9856d028ba7f08ea3cdb966cc50 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File:      SMESH_DataMapOfElemPtrSequenceOfElemPtr.hxx
 // Created:   26.09.05 17:41:10
 // Author:    Sergey KUUL
diff --git a/src/SMESH/SMESH_File.cxx b/src/SMESH/SMESH_File.cxx
new file mode 100644 (file)
index 0000000..77e1290
--- /dev/null
@@ -0,0 +1,239 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// File      : SMESH_File.cxx
+// Created   : Wed Mar 10 11:23:25 2010
+// Author    : Edward AGAPOV (eap)
+//
+#include "SMESH_File.hxx"
+#include "utilities.h"
+
+#include <OSD_File.hxx>
+#include <OSD_Path.hxx>
+#include <Standard_ProgramError.hxx>
+#include <Standard_ErrorHandler.hxx>
+#include <Standard_Failure.hxx>
+
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#ifdef WIN32
+#include <io.h>
+#else
+#include <sys/mman.h>
+#endif
+
+//================================================================================
+/*!
+ * \brief Creator opening the file for reading by default
+ */
+//================================================================================
+
+SMESH_File::SMESH_File(const std::string& name, bool open)
+  :_name(name), _size(-1), _file(0), _map(0), _pos(0), _end(0)
+{
+  if ( open ) this->open();
+}
+
+//================================================================================
+/*!
+ * \brief Destructor closing the file
+ */
+//================================================================================
+
+SMESH_File::~SMESH_File()
+{
+  close();
+}
+
+//================================================================================
+/*!
+ * \brief Open file for reading. Return true if there is something to read
+ */
+//================================================================================
+
+bool SMESH_File::open()
+{
+  int length = size();
+  if ( !_map && length > 0 )
+  {
+#ifdef WNT
+    _file = CreateFile(_name.data(), GENERIC_READ, FILE_SHARE_READ,
+                       NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+    bool ok = ( _file != INVALID_HANDLE_VALUE );
+#else
+    _file = ::open(_name.data(), O_RDONLY );
+    bool ok = ( _file > 0 );
+#endif
+    if ( ok )
+    {
+#ifdef WNT
+      _mapObj = CreateFileMapping(_file, NULL, PAGE_READONLY, 0, (DWORD)length, NULL);
+      _map = (void*) MapViewOfFile( _mapObj, FILE_MAP_READ, 0, 0, 0 );
+#else
+      _map = ::mmap(0,length,PROT_READ,MAP_PRIVATE,_file,0);
+      if ( _map == MAP_FAILED ) _map = NULL;
+#endif
+      if ( _map != NULL )
+      {
+        _size = length;
+        _pos = (char*) _map;
+        _end = _pos + _size;
+      }
+      else
+      {
+#ifdef WNT
+        CloseHandle(_mapObj);
+        CloseHandle(_file);
+#else
+        ::close(_file);
+#endif
+      }
+    }
+  }
+  return _pos;
+}
+
+//================================================================================
+/*!
+ * \brief Close the file
+ */
+//================================================================================
+
+void SMESH_File::close()
+{
+  if ( _map != NULL )
+  {
+#ifdef WNT
+    UnmapViewOfFile(_map);
+    CloseHandle(_mapObj);
+    CloseHandle(_file);
+#else
+    ::munmap(_map, _size);
+    ::close(_file);
+#endif
+    _map = NULL;
+    _pos = _end = 0;
+    _size = -1;
+  }
+}
+
+//================================================================================
+/*!
+ * \brief Remove the file
+ */
+//================================================================================
+
+bool SMESH_File::remove()
+{
+  close();
+  try {
+    OSD_Path filePath(TCollection_AsciiString((char*)_name.data()));
+    OSD_File(filePath).Remove();
+  }
+  catch ( Standard_ProgramError ) {
+    MESSAGE("Can't remove file: " << _name << " ; file does not exist or permission denied");
+    return false;
+  }
+  return true;
+}
+
+//================================================================================
+/*!
+ * \brief Return file size
+ */
+//================================================================================
+
+int SMESH_File::size() const
+{
+  if ( _size >= 0 ) return _size; // size of open file
+
+  int size = -1;
+  int file = ::open( _name.data(), O_RDONLY );
+  if ( file > 0 )
+  {
+    struct stat status;
+    int err = fstat( file, &status);
+    if ( !err )
+      size = status.st_size;
+    ::close( file );
+  }
+  return size;
+}
+
+//================================================================================
+/*!
+ * \brief Set cursor to the given position
+ */
+//================================================================================
+
+void SMESH_File::setPos(const char* pos)
+{
+  if ( pos > (const char*)_map && pos < _end )
+    _pos = (char*) pos;
+}
+
+//================================================================================
+/*!
+ * \brief Skip till current line end and return the skipped string
+ */
+//================================================================================
+
+std::string SMESH_File::getLine()
+{
+  std::string line;
+  const char* p = _pos;
+  while ( !eof() )
+    if ( *(++_pos) == '\n' )
+      break;
+  line.append( p, _pos );
+  if ( !eof() ) _pos++;
+  return line;
+}
+
+//================================================================================
+/*!
+ * \brief Move cursor to the file beginning
+ */
+//================================================================================
+
+void SMESH_File::rewind()
+{
+  _pos = (char*) _map;
+}
+
+//================================================================================
+/*!
+ * \brief Fill vector by reading out integers from file. Vector size gives number
+ * of integers to read
+ */
+//================================================================================
+
+bool SMESH_File::getInts(std::vector<int>& ints)
+{
+  int i = 0;
+  while ( i < ints.size() )
+  {
+    while ( !isdigit( *_pos ) && !eof()) ++_pos;
+    if ( eof() ) break;
+    if ( _pos[-1] == '-' ) --_pos;
+    ints[ i++ ] = strtol( _pos, (char**)&_pos, 10 );
+  }
+  return ( i == ints.size() );
+}
diff --git a/src/SMESH/SMESH_File.hxx b/src/SMESH/SMESH_File.hxx
new file mode 100644 (file)
index 0000000..152e0f2
--- /dev/null
@@ -0,0 +1,95 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// File      : SMESH_File.hxx
+// Created   : Wed Mar 10 10:33:04 2010
+// Author    : Edward AGAPOV (eap)
+//
+#ifndef __SMESH_File_HXX__
+#define __SMESH_File_HXX__
+
+#include "SMESH_SMESH.hxx"
+
+#include <string>
+#include <vector>
+
+#ifdef WNT
+#include <windows.h>
+#else
+#include <dlfcn.h>
+#endif
+
+/*!
+ * \brief High level util for effective file reading and other file operations
+ */
+class SMESH_EXPORT SMESH_File
+{
+public:
+
+  SMESH_File(const std::string& name, bool open=true);
+
+  ~SMESH_File();
+
+  std::string getName() const { return _name; }
+
+  bool open();
+
+  void close();
+
+  bool remove();
+
+  int size() const;
+
+  // ------------------------
+  // Access to file contents
+  // ------------------------
+
+  operator const char*() const { return _pos; }
+
+  bool operator++() { return ++_pos < _end; }
+
+  void operator +=(int posDelta) { _pos+=posDelta; }
+
+  bool eof() const { return _pos >= _end; }
+
+  const char* getPos() const { return _pos; }
+
+  void setPos(const char* pos);
+
+  std::string getLine();
+
+  void rewind();
+
+  bool getInts(std::vector<int>& ids);
+
+private:
+
+  std::string _name; //!< file name
+  int         _size; //!< file size
+#ifdef WNT
+  HANDLE      _file, _mapObj;
+#else
+  int         _file;
+#endif
+  void*       _map;
+  const char* _pos; //!< current position
+  const char* _end; //!< position after file end
+};
+
+#endif
index a86d65b3538add601f70c9a96f776ef887b37806..874a6efec992e6457dbafe558761e3815458b72c 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_Gen.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
-
+//
 #include "SMESH_Gen.hxx"
 #include "SMESH_subMesh.hxx"
 #include "SMESH_HypoFilter.hxx"
@@ -47,7 +48,7 @@ using namespace std;
 
 //=============================================================================
 /*!
- *  default constructor:
+ *  Constructor
  */
 //=============================================================================
 
@@ -63,47 +64,19 @@ SMESH_Gen::SMESH_Gen()
 
 //=============================================================================
 /*!
- *
+ * Destructor
  */
 //=============================================================================
 
 SMESH_Gen::~SMESH_Gen()
 {
-        MESSAGE("SMESH_Gen::~SMESH_Gen");
+  MESSAGE("SMESH_Gen::~SMESH_Gen");
 }
 
 //=============================================================================
 /*!
- *
- */
-//=============================================================================
-
-/*SMESH_Hypothesis *SMESH_Gen::CreateHypothesis(const char *anHyp, int studyId)
-        throw(SALOME_Exception)
-{
-
-        MESSAGE("CreateHypothesis("<<anHyp<<","<<studyId<<")");
-        // Get studyContext, create it if it does'nt exist, with a SMESHDS_Document
-
-        StudyContextStruct *myStudyContext = GetStudyContext(studyId);
-
-        // create a new hypothesis object, store its ref. in studyContext
-
-        SMESH_Hypothesis *myHypothesis = _hypothesisFactory.Create(anHyp, studyId);
-        int hypId = myHypothesis->GetID();
-        myStudyContext->mapHypothesis[hypId] = myHypothesis;
-        SCRUTE(studyId);
-        SCRUTE(hypId);
-
-        // store hypothesis in SMESHDS document
-
-        myStudyContext->myDocument->AddHypothesis(myHypothesis);
-        return myHypothesis;
-}*/
-
-//=============================================================================
-/*!
- *
+ * Creates a mesh in a study.
+ * if (theIsEmbeddedMode) { mesh modification commands are not logged }
  */
 //=============================================================================
 
@@ -213,7 +186,7 @@ bool SMESH_Gen::Compute(SMESH_Mesh &          aMesh,
       if ( algo && !algo->NeedDescretBoundary() )
       {
         if ( algo->SupportSubmeshes() )
-          smWithAlgoSupportingSubmeshes.push_back( smToCompute );
+          smWithAlgoSupportingSubmeshes.push_front( smToCompute );
         else
         {
           smToCompute->ComputeStateEngine( SMESH_subMesh::COMPUTE );
@@ -222,13 +195,19 @@ bool SMESH_Gen::Compute(SMESH_Mesh &          aMesh,
         }
       }
     }
+    
+    // ------------------------------------------------------------
+    // sort list of meshes according to mesh order
+    // ------------------------------------------------------------
+    aMesh.SortByMeshOrder( smWithAlgoSupportingSubmeshes );
+
     // ------------------------------------------------------------
     // compute submeshes under shapes with algos that DO NOT require
     // descretized boundaries and DO support submeshes
     // ------------------------------------------------------------
-    list< SMESH_subMesh* >::reverse_iterator subIt, subEnd;
-    subIt  = smWithAlgoSupportingSubmeshes.rbegin();
-    subEnd = smWithAlgoSupportingSubmeshes.rend();
+    list< SMESH_subMesh* >::iterator subIt, subEnd;
+    subIt  = smWithAlgoSupportingSubmeshes.begin();
+    subEnd = smWithAlgoSupportingSubmeshes.end();
     // start from lower shapes
     for ( ; subIt != subEnd; ++subIt )
     {
@@ -270,7 +249,7 @@ bool SMESH_Gen::Compute(SMESH_Mesh &          aMesh,
     // ----------------------------------------------------------
     // apply the algos that do not require descretized boundaries
     // ----------------------------------------------------------
-    for ( subIt = smWithAlgoSupportingSubmeshes.rbegin(); subIt != subEnd; ++subIt )
+    for ( subIt = smWithAlgoSupportingSubmeshes.begin(); subIt != subEnd; ++subIt )
     {
       sm = *subIt;
       if ( sm->GetComputeState() == SMESH_subMesh::READY_TO_COMPUTE)
@@ -377,7 +356,7 @@ bool SMESH_Gen::Evaluate(SMESH_Mesh &          aMesh,
       SMESH_Algo* algo = GetAlgo( aMesh, aSubShape );
       if ( algo && !algo->NeedDescretBoundary() ) {
         if ( algo->SupportSubmeshes() ) {
-          smWithAlgoSupportingSubmeshes.push_back( smToCompute );
+          smWithAlgoSupportingSubmeshes.push_front( smToCompute );
         }
         else {
           smToCompute->Evaluate(aResMap);
@@ -386,13 +365,19 @@ bool SMESH_Gen::Evaluate(SMESH_Mesh &          aMesh,
         }
       }
     }
+
+    // ------------------------------------------------------------
+    // sort list of meshes according to mesh order
+    // ------------------------------------------------------------
+    aMesh.SortByMeshOrder( smWithAlgoSupportingSubmeshes );
+
     // ------------------------------------------------------------
     // compute submeshes under shapes with algos that DO NOT require
     // descretized boundaries and DO support submeshes
     // ------------------------------------------------------------
-    list< SMESH_subMesh* >::reverse_iterator subIt, subEnd;
-    subIt  = smWithAlgoSupportingSubmeshes.rbegin();
-    subEnd = smWithAlgoSupportingSubmeshes.rend();
+    list< SMESH_subMesh* >::iterator subIt, subEnd;
+    subIt  = smWithAlgoSupportingSubmeshes.begin();
+    subEnd = smWithAlgoSupportingSubmeshes.end();
     // start from lower shapes
     for ( ; subIt != subEnd; ++subIt ) {
       sm = *subIt;
@@ -429,7 +414,7 @@ bool SMESH_Gen::Evaluate(SMESH_Mesh &          aMesh,
     // ----------------------------------------------------------
     // apply the algos that do not require descretized boundaries
     // ----------------------------------------------------------
-    for ( subIt = smWithAlgoSupportingSubmeshes.rbegin(); subIt != subEnd; ++subIt )
+    for ( subIt = smWithAlgoSupportingSubmeshes.begin(); subIt != subEnd; ++subIt )
     {
       sm = *subIt;
       sm->Evaluate(aResMap);
@@ -798,7 +783,7 @@ bool SMESH_Gen::IsGlobalHypothesis(const SMESH_Hypothesis* theHyp, SMESH_Mesh& a
 
 //=============================================================================
 /*!
- *
+ * Finds algo to mesh a shape. Optionally returns a shape the found algo is bound to
  */
 //=============================================================================
 
@@ -806,7 +791,6 @@ SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_Mesh &         aMesh,
                                const TopoDS_Shape & aShape,
                                TopoDS_Shape*        assignedTo)
 {
-
   SMESH_HypoFilter filter( SMESH_HypoFilter::IsAlgo() );
   filter.And( filter.IsApplicableTo( aShape ));
 
@@ -815,59 +799,28 @@ SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_Mesh &         aMesh,
 
 //=============================================================================
 /*!
- *
+ * Returns StudyContextStruct for a study
  */
 //=============================================================================
 
 StudyContextStruct *SMESH_Gen::GetStudyContext(int studyId)
 {
-        // Get studyContext, create it if it does'nt exist, with a SMESHDS_Document
+  // Get studyContext, create it if it does'nt exist, with a SMESHDS_Document
 
-        if (_mapStudyContext.find(studyId) == _mapStudyContext.end())
-        {
-                _mapStudyContext[studyId] = new StudyContextStruct;
-                _mapStudyContext[studyId]->myDocument = new SMESHDS_Document(studyId);
-        }
-        StudyContextStruct *myStudyContext = _mapStudyContext[studyId];
-//   ASSERT(_mapStudyContext.find(studyId) != _mapStudyContext.end());
-        return myStudyContext;
+  if (_mapStudyContext.find(studyId) == _mapStudyContext.end())
+  {
+    _mapStudyContext[studyId] = new StudyContextStruct;
+    _mapStudyContext[studyId]->myDocument = new SMESHDS_Document(studyId);
+  }
+  StudyContextStruct *myStudyContext = _mapStudyContext[studyId];
+  return myStudyContext;
 }
 
-// //=============================================================================
-// /*!
-//  *
-//  */
-// //=============================================================================
-
-// void SMESH_Gen::Save(int studyId, const char *aUrlOfFile)
-// {
-// }
-
-// //=============================================================================
-// /*!
-//  *
-//  */
-// //=============================================================================
-
-// void SMESH_Gen::Load(int studyId, const char *aUrlOfFile)
-// {
-// }
-
-// //=============================================================================
-// /*!
-//  *
-//  */
-// //=============================================================================
-
-// void SMESH_Gen::Close(int studyId)
-// {
-// }
-
-//=============================================================================
+//================================================================================
 /*!
- *
+ * \brief Return shape dimension by TopAbs_ShapeEnum
  */
-//=============================================================================
+//================================================================================
 
 int SMESH_Gen::GetShapeDim(const TopAbs_ShapeEnum & aShapeType)
 {
@@ -889,12 +842,11 @@ int SMESH_Gen::GetShapeDim(const TopAbs_ShapeEnum & aShapeType)
 
 //=============================================================================
 /*!
- *
+ * Genarate a new id unique withing this Gen
  */
 //=============================================================================
 
 int SMESH_Gen::GetANewId()
 {
-        //MESSAGE("SMESH_Gen::GetANewId");
-        return _hypId++;
+  return _hypId++;
 }
index ab610a00a7b8e7f3c4305cc5055011d8bcd3b63d..606c96d1866f30223a123f86b095390ebb68d8b4 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_Gen.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
 //
-
 #ifndef _SMESH_GEN_HXX_
 #define _SMESH_GEN_HXX_
 
@@ -148,7 +148,7 @@ public:
 
 private:
 
-  int _localId;                     // unique Id of created objects, within SMESH_Gen entity
+  int _localId;                         // unique Id of created objects, within SMESH_Gen entity
   std::map < int, StudyContextStruct * >_mapStudyContext;
 
   // hypotheses managing
index a05204d31f333a490cf3ca1a0f9311b47b17689d..4d88aed630d72a3612d6dea12b2b1412cb0620a5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_Group.cxx
 //  Author : Michael Sazonov (OCC)
index ab353082733e54458734e2114d51b28b3168fc8f..8d942bce4a79a3d5247ed8e2761e86d9bd9d35ed 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_Group.hxx
 //  Author : Michael Sazonov (OCC)
index d23f7cbe0825d0dadbe20d870dd2101a75016850..1f6685d15184a21bce84479e16b2cd81e86c1644 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_HypoFilter.cxx
 //  Module : SMESH
index c7aa1ed82ca67b9c250eac4059dda0d619b0a112..0fb043e57debecc43d06911a28a3afb488a8ea4e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_HypoFilter.hxx
 //  Module : SMESH
index 0fec4925c0665a1db95021b58466cf4e6ae43c96..34f45d480f9e01421def05d895f0b8acb98409e9 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_Hypothesis.cxx
 //  Author : Paul RASCLE, EDF
index 55ed9dd5fb2f84970161c6d1c523350965caa0db..1eb5ae8c85bc733c59e30084b0b6f57d38439c06 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_Hypothesis.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
 //
-
 #ifndef _SMESH_HYPOTHESIS_HXX_
 #define _SMESH_HYPOTHESIS_HXX_
 
index 7daa8b4bc2ff9835029e72ba7602a9388c070a65..90a034ac7210056a9ba3b1021037b24351772e70 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File:      SMESH_IndexedDataMapOfShapeIndexedMapOfShape.hxx
 // Created:   20.09.05 09:51:12
 // Author:    Sergey KUUL
index 67d78b4e683574b0f6bd43cf9db7e93cb6981126..9dad8b96760bcb265a9119b4a12383a7dde50862 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_Mesh.cxx
 //  Author : Paul RASCLE, EDF
@@ -61,6 +62,8 @@
 
 #include "Utils_ExceptHandlers.hxx"
 
+using namespace std;
+
 // maximum stored group name length in MED file
 #define MAX_MED_GROUP_NAME_LENGTH 80
 
@@ -116,7 +119,7 @@ SMESH_Mesh::~SMESH_Mesh()
     sm->ComputeStateEngine( SMESH_subMesh::MESH_ENTITY_REMOVED );
 
   // delete groups
-  std::map < int, SMESH_Group * >::iterator itg;
+  map < int, SMESH_Group * >::iterator itg;
   for (itg = _mapGroup.begin(); itg != _mapGroup.end(); itg++) {
     SMESH_Group *aGroup = (*itg).second;
     delete aGroup;
@@ -144,12 +147,12 @@ void SMESH_Mesh::ShapeToMesh(const TopoDS_Shape & aShape)
   {
     // removal of a shape to mesh, delete objects referring to sub-shapes:
     // - sub-meshes
-    std::map <int, SMESH_subMesh *>::iterator i_sm = _mapSubMesh.begin();
+    map <int, SMESH_subMesh *>::iterator i_sm = _mapSubMesh.begin();
     for ( ; i_sm != _mapSubMesh.end(); ++i_sm )
       delete i_sm->second;
     _mapSubMesh.clear();
     //  - groups on geometry
-    std::map <int, SMESH_Group *>::iterator i_gr = _mapGroup.begin();
+    map <int, SMESH_Group *>::iterator i_gr = _mapGroup.begin();
     while ( i_gr != _mapGroup.end() ) {
       if ( dynamic_cast<SMESHDS_GroupOnGeom*>( i_gr->second->GetGroupDS() )) {
         _myMeshDS->RemoveGroup( i_gr->second->GetGroupDS() );
@@ -175,14 +178,8 @@ void SMESH_Mesh::ShapeToMesh(const TopoDS_Shape & aShape)
     _isShapeToMesh = true;
     _nbSubShapes = _myMeshDS->MaxShapeIndex();
 
-    // fill _mapAncestors
-    int desType, ancType;
-    for ( desType = TopAbs_VERTEX; desType > TopAbs_COMPOUND; desType-- )
-      for ( ancType = desType - 1; ancType >= TopAbs_COMPOUND; ancType-- )
-        TopExp::MapShapesAndAncestors ( aShape,
-                                        (TopAbs_ShapeEnum) desType,
-                                        (TopAbs_ShapeEnum) ancType,
-                                        _mapAncestors );
+    // fill map of ancestors
+    fillAncestorsMap(aShape);
   }
   else
   {
@@ -270,47 +267,6 @@ void SMESH_Mesh::Clear()
       sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
     }
   }
-
-//   // clear sub-meshes; get ready to re-compute as a side-effect 
-
-//   if ( SMESH_subMesh *sm = GetSubMeshContaining( GetShapeToMesh() ) )
-//   {
-//     SMESH_subMeshIteratorPtr smIt = sm->getDependsOnIterator(/*includeSelf=*/true,
-//                                                              /*complexShapeFirst=*/false);
-//     while ( smIt->more() )
-//     {
-//       sm = smIt->next();
-//       TopAbs_ShapeEnum shapeType = sm->GetSubShape().ShapeType();      
-//       if ( shapeType == TopAbs_VERTEX || shapeType < TopAbs_SOLID )
-//         // all other shapes depends on vertices so they are already cleaned
-//         sm->ComputeStateEngine( SMESH_subMesh::CLEAN );
-//       // to recompute even if failed
-//       sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
-//     }
-//   }
-
-//   // clear entities not on sub-meshes
-
-//   SMDS_VolumeIteratorPtr vIt = _myMeshDS->volumesIterator();
-//   while ( vIt->more() )
-//     _myMeshDS->RemoveFreeElement( vIt->next(), 0 );
-
-//   SMDS_FaceIteratorPtr fIt = _myMeshDS->facesIterator();
-//   while ( fIt->more() )
-//     _myMeshDS->RemoveFreeElement( fIt->next(), 0 );
-
-//   SMDS_EdgeIteratorPtr eIt = _myMeshDS->edgesIterator();
-//   while ( eIt->more() )
-//     _myMeshDS->RemoveFreeElement( eIt->next(), 0 );
-
-//   SMDS_NodeIteratorPtr nIt = _myMeshDS->nodesIterator();
-//   while ( nIt->more() ) {
-//     const SMDS_MeshNode * node = nIt->next();
-//     if ( node->NbInverseElements() == 0 )
-//       _myMeshDS->RemoveFreeNode( node, 0 );
-//     else
-//       _myMeshDS->RemoveNode(node);
-//   }
 }
 
 //=======================================================================
@@ -368,7 +324,7 @@ int SMESH_Mesh::UNVToMesh(const char* theFileName)
     aGroup->InitSubGroupsIterator();
     while (aGroup->MoreSubGroups()) {
       SMDS_MeshGroup* aSubGroup = (SMDS_MeshGroup*) aGroup->NextSubGroup();
-      std::string aName = aGroupNames[aSubGroup];
+      string aName = aGroupNames[aSubGroup];
       int aId;
 
       SMESH_Group* aSMESHGroup = AddGroup( aSubGroup->GetType(), aName.c_str(), aId );
@@ -419,10 +375,10 @@ int SMESH_Mesh::MEDToMesh(const char* theFileName, const char* theMeshName)
   }
 
   // Reading groups (sub-meshes are out of scope of MED import functionality)
-  std::list<TNameAndType> aGroupNames = myReader.GetGroupNamesAndTypes();
+  list<TNameAndType> aGroupNames = myReader.GetGroupNamesAndTypes();
   if(MYDEBUG) MESSAGE("MEDToMesh - Nb groups = "<<aGroupNames.size()); 
   int anId;
-  std::list<TNameAndType>::iterator name_type = aGroupNames.begin();
+  list<TNameAndType>::iterator name_type = aGroupNames.begin();
   for ( ; name_type != aGroupNames.end(); name_type++ ) {
     SMESH_Group* aGroup = AddGroup( name_type->second, name_type->first.c_str(), anId );
     if ( aGroup ) {
@@ -479,33 +435,6 @@ SMESH_Hypothesis::Hypothesis_Status
   if ( !subMesh || !subMesh->GetId())
     return SMESH_Hypothesis::HYP_BAD_SUBSHAPE;
 
-  SMESHDS_SubMesh *subMeshDS = subMesh->GetSubMeshDS();
-  if ( subMeshDS && subMeshDS->IsComplexSubmesh() ) // group of sub-shapes and maybe of not sub-
-  {
-    MESSAGE("AddHypothesis() to complex submesh");
-    // return the worst but not fatal state of all group memebers
-    SMESH_Hypothesis::Hypothesis_Status aBestRet, aWorstNotFatal, ret;
-    aBestRet = SMESH_Hypothesis::HYP_BAD_DIM;
-    aWorstNotFatal = SMESH_Hypothesis::HYP_OK;
-    for ( TopoDS_Iterator itS ( aSubShape ); itS.More(); itS.Next())
-    {
-      if ( !GetMeshDS()->ShapeToIndex( itS.Value() ))
-        continue; // not sub-shape
-      ret = AddHypothesis( itS.Value(), anHypId );
-      if ( !SMESH_Hypothesis::IsStatusFatal( ret ) && ret > aWorstNotFatal )
-        aWorstNotFatal = ret;
-      if ( ret < aBestRet )
-        aBestRet = ret;
-    }
-    // bind hypotheses to a group just to know
-    SMESH_Hypothesis *anHyp = _gen->GetStudyContext(_studyId)->mapHypothesis[anHypId];
-    GetMeshDS()->AddHypothesis( aSubShape, anHyp );
-
-    if ( SMESH_Hypothesis::IsStatusFatal( aBestRet ))
-      return aBestRet;
-    return aWorstNotFatal;
-  }
-
   StudyContextStruct *sc = _gen->GetStudyContext(_studyId);
   if (sc->mapHypothesis.find(anHypId) == sc->mapHypothesis.end())
   {
@@ -551,7 +480,7 @@ SMESH_Hypothesis::Hypothesis_Status
     if (ret2 > ret)
       ret = ret2;
 
-    // check concurent hypotheses on ansestors
+    // check concurent hypotheses on ancestors
     if (ret < SMESH_Hypothesis::HYP_CONCURENT && !isGlobalHyp )
     {
       SMESH_subMeshIteratorPtr smIt = subMesh->getDependsOnIterator(false,false);
@@ -569,7 +498,7 @@ SMESH_Hypothesis::Hypothesis_Status
   }
 
   if(MYDEBUG) subMesh->DumpAlgoState(true);
-  SCRUTE(ret);
+  if(MYDEBUG) SCRUTE(ret);
   return ret;
 }
 
@@ -586,45 +515,23 @@ SMESH_Hypothesis::Hypothesis_Status
   Unexpect aCatch(SalomeException);
   if(MYDEBUG) MESSAGE("SMESH_Mesh::RemoveHypothesis");
   
-  SMESH_subMesh *subMesh = GetSubMesh(aSubShape);
-  SMESHDS_SubMesh *subMeshDS = subMesh->GetSubMeshDS();
-  if ( subMeshDS && subMeshDS->IsComplexSubmesh() )
-  {
-    // return the worst but not fatal state of all group memebers
-    SMESH_Hypothesis::Hypothesis_Status aBestRet, aWorstNotFatal, ret;
-    aBestRet = SMESH_Hypothesis::HYP_BAD_DIM;
-    aWorstNotFatal = SMESH_Hypothesis::HYP_OK;
-    for ( TopoDS_Iterator itS ( aSubShape ); itS.More(); itS.Next())
-    {
-      if ( !GetMeshDS()->ShapeToIndex( itS.Value() ))
-        continue; // not sub-shape
-      ret = RemoveHypothesis( itS.Value(), anHypId );
-      if ( !SMESH_Hypothesis::IsStatusFatal( ret ) && ret > aWorstNotFatal )
-        aWorstNotFatal = ret;
-      if ( ret < aBestRet )
-        aBestRet = ret;
-    }
-    SMESH_Hypothesis *anHyp = _gen->GetStudyContext(_studyId)->mapHypothesis[anHypId];
-    GetMeshDS()->RemoveHypothesis( aSubShape, anHyp );
-
-    if ( SMESH_Hypothesis::IsStatusFatal( aBestRet ))
-      return aBestRet;
-    return aWorstNotFatal;
-  }
-
   StudyContextStruct *sc = _gen->GetStudyContext(_studyId);
   if (sc->mapHypothesis.find(anHypId) == sc->mapHypothesis.end())
     throw SALOME_Exception(LOCALIZED("hypothesis does not exist"));
   
   SMESH_Hypothesis *anHyp = sc->mapHypothesis[anHypId];
-  int hypType = anHyp->GetType();
-  if(MYDEBUG) SCRUTE(hypType);
+  if(MYDEBUG) {
+    int hypType = anHyp->GetType();
+    SCRUTE(hypType);
+  }
   
   // shape 
   
   bool isAlgo = ( !anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO );
   int event = isAlgo ? SMESH_subMesh::REMOVE_ALGO : SMESH_subMesh::REMOVE_HYP;
 
+  SMESH_subMesh *subMesh = GetSubMesh(aSubShape);
+
   SMESH_Hypothesis::Hypothesis_Status ret = subMesh->AlgoStateEngine(event, anHyp);
 
   // there may appear concurrent hyps that were covered by the removed hyp
@@ -644,7 +551,7 @@ SMESH_Hypothesis::Hypothesis_Status
     if (ret2 > ret) // more severe
       ret = ret2;
 
-    // check concurent hypotheses on ansestors
+    // check concurent hypotheses on ancestors
     if (ret < SMESH_Hypothesis::HYP_CONCURENT && !IsMainShape( aSubShape ) )
     {
       SMESH_subMeshIteratorPtr smIt = subMesh->getDependsOnIterator(false,false);
@@ -672,7 +579,7 @@ SMESH_Hypothesis::Hypothesis_Status
  */
 //=============================================================================
 
-const std::list<const SMESHDS_Hypothesis*>&
+const list<const SMESHDS_Hypothesis*>&
 SMESH_Mesh::GetHypothesisList(const TopoDS_Shape & aSubShape) const
   throw(SALOME_Exception)
 {
@@ -697,8 +604,8 @@ const SMESH_Hypothesis * SMESH_Mesh::GetHypothesis(const TopoDS_Shape &    aSubS
                                                    TopoDS_Shape*           assignedTo) const
 {
   {
-    const std::list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(aSubShape);
-    std::list<const SMESHDS_Hypothesis*>::const_iterator hyp = hypList.begin();
+    const list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(aSubShape);
+    list<const SMESHDS_Hypothesis*>::const_iterator hyp = hypList.begin();
     for ( ; hyp != hypList.end(); hyp++ ) {
       const SMESH_Hypothesis * h = cSMESH_Hyp( *hyp );
       if ( aFilter.IsOk( h, aSubShape)) {
@@ -709,15 +616,18 @@ const SMESH_Hypothesis * SMESH_Mesh::GetHypothesis(const TopoDS_Shape &    aSubS
   }
   if ( andAncestors )
   {
-    TopTools_ListIteratorOfListOfShape it( GetAncestors( aSubShape ));
-    for (; it.More(); it.Next() )
+    // user sorted submeshes of ancestors, according to stored submesh priority
+    const list<SMESH_subMesh*> smList = getAncestorsSubMeshes( aSubShape );
+    list<SMESH_subMesh*>::const_iterator smIt = smList.begin(); 
+    for ( ; smIt != smList.end(); smIt++ )
     {
-      const std::list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(it.Value());
-      std::list<const SMESHDS_Hypothesis*>::const_iterator hyp = hypList.begin();
+      const TopoDS_Shape& curSh = (*smIt)->GetSubShape();
+      const list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(curSh);
+      list<const SMESHDS_Hypothesis*>::const_iterator hyp = hypList.begin();
       for ( ; hyp != hypList.end(); hyp++ ) {
         const SMESH_Hypothesis * h = cSMESH_Hyp( *hyp );
-        if (aFilter.IsOk( h, it.Value() )) {
-          if ( assignedTo ) *assignedTo = it.Value();
+        if (aFilter.IsOk( h, curSh )) {
+          if ( assignedTo ) *assignedTo = curSh;
           return h;
         }
       }
@@ -749,7 +659,7 @@ int SMESH_Mesh::GetHypotheses(const TopoDS_Shape &                aSubShape,
   bool mainHypFound = false;
 
   // fill in hypTypes
-  std::list<const SMESHDS_Hypothesis*>::const_iterator hyp;
+  list<const SMESHDS_Hypothesis*>::const_iterator hyp;
   for ( hyp = aHypList.begin(); hyp != aHypList.end(); hyp++ ) {
     if ( hypTypes.insert( (*hyp)->GetName() ).second )
       nbHyps++;
@@ -759,7 +669,7 @@ int SMESH_Mesh::GetHypotheses(const TopoDS_Shape &                aSubShape,
 
   // get hypos from aSubShape
   {
-    const std::list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(aSubShape);
+    const list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(aSubShape);
     for ( hyp = hypList.begin(); hyp != hypList.end(); hyp++ )
       if ( aFilter.IsOk (cSMESH_Hyp( *hyp ), aSubShape) &&
            ( cSMESH_Hyp(*hyp)->IsAuxiliary() || !mainHypFound ) &&
@@ -776,14 +686,18 @@ int SMESH_Mesh::GetHypotheses(const TopoDS_Shape &                aSubShape,
   if ( andAncestors )
   {
     TopTools_MapOfShape map;
-    TopTools_ListIteratorOfListOfShape it( GetAncestors( aSubShape ));
-    for (; it.More(); it.Next() )
+
+    // user sorted submeshes of ancestors, according to stored submesh priority
+    const list<SMESH_subMesh*> smList = getAncestorsSubMeshes( aSubShape );
+    list<SMESH_subMesh*>::const_iterator smIt = smList.begin(); 
+    for ( ; smIt != smList.end(); smIt++ )
     {
-     if ( !map.Add( it.Value() ))
+      const TopoDS_Shape& curSh = (*smIt)->GetSubShape();
+     if ( !map.Add( curSh ))
         continue;
-      const std::list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(it.Value());
+      const list<const SMESHDS_Hypothesis*>& hypList = _myMeshDS->GetHypothesis(curSh);
       for ( hyp = hypList.begin(); hyp != hypList.end(); hyp++ )
-        if (aFilter.IsOk( cSMESH_Hyp( *hyp ), it.Value() ) &&
+        if (aFilter.IsOk( cSMESH_Hyp( *hyp ), curSh ) &&
             ( cSMESH_Hyp(*hyp)->IsAuxiliary() || !mainHypFound ) &&
             hypTypes.insert( (*hyp)->GetName() ).second )
         {
@@ -803,7 +717,7 @@ int SMESH_Mesh::GetHypotheses(const TopoDS_Shape &                aSubShape,
  */
 //=============================================================================
 
-const std::list<SMESHDS_Command*> & SMESH_Mesh::GetLog() throw(SALOME_Exception)
+const list<SMESHDS_Command*> & SMESH_Mesh::GetLog() throw(SALOME_Exception)
 {
   Unexpect aCatch(SalomeException);
   if(MYDEBUG) MESSAGE("SMESH_Mesh::GetLog");
@@ -842,6 +756,9 @@ SMESH_subMesh *SMESH_Mesh::GetSubMesh(const TopoDS_Shape & aSubShape)
     {
       index = _myMeshDS->AddCompoundSubmesh( aSubShape, it.Value().ShapeType() );
       if ( index > _nbSubShapes ) _nbSubShapes = index; // not to create sm for this group again
+
+      // fill map of Ancestors
+      fillAncestorsMap(aSubShape);
     }
   }
 //   if ( !index )
@@ -856,6 +773,7 @@ SMESH_subMesh *SMESH_Mesh::GetSubMesh(const TopoDS_Shape & aSubShape)
   {
     aSubMesh = new SMESH_subMesh(index, this, _myMeshDS, aSubShape);
     _mapSubMesh[index] = aSubMesh;
+    ClearMeshOrder();
   }
   return aSubMesh;
 }
@@ -904,19 +822,19 @@ throw(SALOME_Exception)
  */
 //================================================================================
 
-std::list<SMESH_subMesh*>
+list<SMESH_subMesh*>
 SMESH_Mesh::GetGroupSubMeshesContaining(const TopoDS_Shape & aSubShape) const
   throw(SALOME_Exception)
 {
   Unexpect aCatch(SalomeException);
-  std::list<SMESH_subMesh*> found;
+  list<SMESH_subMesh*> found;
 
   SMESH_subMesh * subMesh = GetSubMeshContaining(aSubShape);
   if ( !subMesh )
     return found;
 
   // submeshes of groups have max IDs, so search from the map end
-  std::map<int, SMESH_subMesh *>::const_reverse_iterator i_sm;
+  map<int, SMESH_subMesh *>::const_reverse_iterator i_sm;
   for ( i_sm = _mapSubMesh.rbegin(); i_sm != _mapSubMesh.rend(); ++i_sm) {
     SMESHDS_SubMesh * ds = i_sm->second->GetSubMeshDS();
     if ( ds && ds->IsComplexSubmesh() ) {
@@ -1073,12 +991,15 @@ bool SMESH_Mesh::GetAutoColor() throw(SALOME_Exception)
 
 bool SMESH_Mesh::HasDuplicatedGroupNamesMED()
 {
-  set<string> aGroupNames;
-  for ( std::map<int, SMESH_Group*>::iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ ) {
+  //set<string> aGroupNames; // Corrected for Mantis issue 0020028
+  map< SMDSAbs_ElementType, set<string> > aGroupNames;
+  for ( map<int, SMESH_Group*>::iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ )
+  {
     SMESH_Group* aGroup = it->second;
-    std::string aGroupName = aGroup->GetName();
+    SMDSAbs_ElementType aType = aGroup->GetGroupDS()->GetType();
+    string aGroupName = aGroup->GetName();
     aGroupName.resize(MAX_MED_GROUP_NAME_LENGTH);
-    if (!aGroupNames.insert(aGroupName).second)
+    if (!aGroupNames[aType].insert(aGroupName).second)
       return true;
   }
 
@@ -1111,17 +1032,19 @@ void SMESH_Mesh::ExportMED(const char *file,
   }
 
   // Pass groups to writer. Provide unique group names.
-  set<string> aGroupNames;
+  //set<string> aGroupNames; // Corrected for Mantis issue 0020028
+  map< SMDSAbs_ElementType, set<string> > aGroupNames;
   char aString [256];
   int maxNbIter = 10000; // to guarantee cycle finish
-  for ( std::map<int, SMESH_Group*>::iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ ) {
+  for ( map<int, SMESH_Group*>::iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ ) {
     SMESH_Group*       aGroup   = it->second;
     SMESHDS_GroupBase* aGroupDS = aGroup->GetGroupDS();
     if ( aGroupDS ) {
+      SMDSAbs_ElementType aType = aGroupDS->GetType();
       string aGroupName0 = aGroup->GetName();
       aGroupName0.resize(MAX_MED_GROUP_NAME_LENGTH);
       string aGroupName = aGroupName0;
-      for (int i = 1; !aGroupNames.insert(aGroupName).second && i < maxNbIter; i++) {
+      for (int i = 1; !aGroupNames[aType].insert(aGroupName).second && i < maxNbIter; i++) {
         sprintf(&aString[0], "GR_%d_%s", i, aGroupName0.c_str());
         aGroupName = aString;
         aGroupName.resize(MAX_MED_GROUP_NAME_LENGTH);
@@ -1154,11 +1077,11 @@ void SMESH_Mesh::ExportUNV(const char *file) throw(SALOME_Exception)
   myWriter.SetMeshId(_idDoc);
   //  myWriter.SetGroups(_mapGroup);
 
-  for ( std::map<int, SMESH_Group*>::iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ ) {
+  for ( map<int, SMESH_Group*>::iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ ) {
     SMESH_Group*       aGroup   = it->second;
     SMESHDS_GroupBase* aGroupDS = aGroup->GetGroupDS();
     if ( aGroupDS ) {
-      std::string aGroupName = aGroup->GetName();
+      string aGroupName = aGroup->GetName();
       aGroupDS->SetStoreName( aGroupName.c_str() );
       myWriter.AddGroup( aGroupDS );
     }
@@ -1420,10 +1343,10 @@ SMESH_Group* SMESH_Mesh::GetGroup (const int theGroupID)
  */
 //=============================================================================
 
-std::list<int> SMESH_Mesh::GetGroupIds() const
+list<int> SMESH_Mesh::GetGroupIds() const
 {
-  std::list<int> anIds;
-  for ( std::map<int, SMESH_Group*>::const_iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ )
+  list<int> anIds;
+  for ( map<int, SMESH_Group*>::const_iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ )
     anIds.push_back( it->first );
   
   return anIds;
@@ -1488,7 +1411,7 @@ ostream& SMESH_Mesh::Dump(ostream& save)
       save << clause << ".1) Number of " << orderStr << " triangles:  \t" << nb3 << endl;
       save << clause << ".2) Number of " << orderStr << " quadrangles:\t" << nb4 << endl;
       if ( nb3 + nb4 !=  NbFaces(order) ) {
-        std::map<int,int> myFaceMap;
+        map<int,int> myFaceMap;
         SMDS_FaceIteratorPtr itFaces=_myMeshDS->facesIterator();
         while( itFaces->more( ) ) {
           int nbNodes = itFaces->next()->NbNodes();
@@ -1513,7 +1436,7 @@ ostream& SMESH_Mesh::Dump(ostream& save)
       save << clause << ".3) Number of " << orderStr << " prisms:      \t" << nb6 << endl;
       save << clause << ".4) Number of " << orderStr << " pyramids:\t" << nb5 << endl;
       if ( nb8 + nb4 + nb5 + nb6 != NbVolumes(order) ) {
-        std::map<int,int> myVolumesMap;
+        map<int,int> myVolumesMap;
         SMDS_VolumeIteratorPtr itVolumes=_myMeshDS->volumesIterator();
         while( itVolumes->more( ) ) {
           int nbNodes = itVolumes->next()->NbNodes();
@@ -1552,7 +1475,7 @@ SMDSAbs_ElementType SMESH_Mesh::GetElementType( const int id, const bool iselem
 SMESH_Group* SMESH_Mesh::ConvertToStandalone ( int theGroupID )
 {
   SMESH_Group* aGroup = 0;
-  std::map < int, SMESH_Group * >::iterator itg = _mapGroup.find( theGroupID );
+  map < int, SMESH_Group * >::iterator itg = _mapGroup.find( theGroupID );
   if ( itg == _mapGroup.end() )
     return aGroup;
 
@@ -1580,3 +1503,143 @@ SMESH_Group* SMESH_Mesh::ConvertToStandalone ( int theGroupID )
   return aGroup;
 }
 
+//=============================================================================
+/*!
+ *  \brief remove submesh order  from Mesh
+ */
+//=============================================================================
+
+void SMESH_Mesh::ClearMeshOrder()
+{
+  _mySubMeshOrder.clear();
+}
+
+//=============================================================================
+/*!
+ *  \brief remove submesh order  from Mesh
+ */
+//=============================================================================
+
+void SMESH_Mesh::SetMeshOrder(const TListOfListOfInt& theOrder )
+{
+  _mySubMeshOrder = theOrder;
+}
+
+//=============================================================================
+/*!
+ *  \brief return submesh order if any
+ */
+//=============================================================================
+
+const TListOfListOfInt& SMESH_Mesh::GetMeshOrder() const
+{
+  return _mySubMeshOrder;
+}
+
+//=============================================================================
+/*!
+ *  \brief fill _mapAncestors
+ */
+//=============================================================================
+
+void SMESH_Mesh::fillAncestorsMap(const TopoDS_Shape& theShape)
+{
+
+  int desType, ancType;
+  if ( !theShape.IsSame( GetShapeToMesh()) && theShape.ShapeType() == TopAbs_COMPOUND )
+  {
+    // a geom group is added. Insert it into lists of ancestors before
+    // the first ancestor more complex than group members
+    int memberType = TopoDS_Iterator( theShape ).Value().ShapeType();
+    for ( desType = TopAbs_VERTEX; desType >= memberType; desType-- )
+      for (TopExp_Explorer des( theShape, TopAbs_ShapeEnum( desType )); des.More(); des.Next())
+      {
+        TopTools_ListOfShape& ancList = _mapAncestors.ChangeFromKey( des.Current() );
+        TopTools_ListIteratorOfListOfShape ancIt (ancList);
+        while ( ancIt.More() && ancIt.Value().ShapeType() >= memberType )
+          ancIt.Next();
+        if ( ancIt.More() )
+          ancList.InsertBefore( theShape, ancIt );
+      }
+  }
+  {
+    for ( desType = TopAbs_VERTEX; desType > TopAbs_COMPOUND; desType-- )
+      for ( ancType = desType - 1; ancType >= TopAbs_COMPOUND; ancType-- )
+        TopExp::MapShapesAndAncestors ( theShape,
+                                        (TopAbs_ShapeEnum) desType,
+                                        (TopAbs_ShapeEnum) ancType,
+                                        _mapAncestors );
+  }
+}
+
+//=============================================================================
+/*!
+ * \brief sort submeshes according to stored mesh order
+ * \param theListToSort in out list to be sorted
+ * \return FALSE if nothing sorted
+ */
+//=============================================================================
+
+bool SMESH_Mesh::SortByMeshOrder(list<SMESH_subMesh*>& theListToSort) const
+{
+  if ( !_mySubMeshOrder.size() || theListToSort.size() < 2)
+    return true;
+  
+  bool res = false;
+  list<SMESH_subMesh*> onlyOrderedList;
+  // collect all ordered submeshes in one list as pointers
+  // and get their positions within theListToSort
+  typedef list<SMESH_subMesh*>::iterator TPosInList;
+  map< int, TPosInList > sortedPos;
+  TPosInList smBeg = theListToSort.begin(), smEnd = theListToSort.end();
+  TListOfListOfInt::const_iterator listIddIt = _mySubMeshOrder.begin();
+  for( ; listIddIt != _mySubMeshOrder.end(); listIddIt++) {
+    const TListOfInt& listOfId = *listIddIt;
+    TListOfInt::const_iterator idIt = listOfId.begin();
+    for ( ; idIt != listOfId.end(); idIt++ ) {
+      if ( SMESH_subMesh * sm = GetSubMeshContaining( *idIt )) {
+        TPosInList smPos = find( smBeg, smEnd, sm );
+        if ( smPos != smEnd ) {
+          onlyOrderedList.push_back( sm );
+          sortedPos[ distance( smBeg, smPos )] = smPos;
+        }
+      }
+    }
+  }
+  if (onlyOrderedList.size() < 2)
+    return res;
+  res = true;
+
+  list<SMESH_subMesh*>::iterator onlyBIt = onlyOrderedList.begin();
+  list<SMESH_subMesh*>::iterator onlyEIt = onlyOrderedList.end();
+
+  // iterates on ordered submeshes and insert them in detected positions
+  map< int, TPosInList >::iterator i_pos = sortedPos.begin();
+  for ( ; onlyBIt != onlyEIt; ++onlyBIt, ++i_pos )
+    *(i_pos->second) = *onlyBIt;
+
+  return res;
+}
+
+//=============================================================================
+/*!
+ * \brief sort submeshes according to stored mesh order
+ * \param theListToSort in out list to be sorted
+ * \return FALSE if nothing sorted
+ */
+//=============================================================================
+
+list<SMESH_subMesh*> SMESH_Mesh::getAncestorsSubMeshes
+  (const TopoDS_Shape& theSubShape) const
+{
+  list<SMESH_subMesh*> listOfSubMesh;
+  TopTools_ListIteratorOfListOfShape it( GetAncestors( theSubShape ));
+  for (; it.More(); it.Next() )
+    if ( SMESH_subMesh* sm = GetSubMeshContaining( it.Value() ))
+      listOfSubMesh.push_back(sm);
+
+  // sort submeshes according to stored mesh order
+  SortByMeshOrder( listOfSubMesh );
+
+  return listOfSubMesh;
+}
index 26339eb0957ef7b9a995822425ea49bd467462b1..59e5edf39bdcc8e64abf8995861238fe7d4e39fe 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_Mesh.hxx
 //  Author : Paul RASCLE, EDF
 #include <TopoDS_Shape.hxx>
 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
 
-#include <list>
 #include <map>
+#include <list>
+
+#ifdef WNT
+#pragma warning(disable:4251) // Warning DLL Interface ...
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
 
 class SMESH_Gen;
 class SMESHDS_Document;
@@ -51,6 +57,9 @@ class SMESH_subMesh;
 class SMESH_HypoFilter;
 class TopoDS_Solid;
 
+typedef std::list<int> TListOfInt;
+typedef std::list<TListOfInt> TListOfListOfInt;
+
 class SMESH_EXPORT SMESH_Mesh
 {
 public:
@@ -248,11 +257,26 @@ public:
 
   SMDSAbs_ElementType GetElementType( const int id, const bool iselem );
 
+  void ClearMeshOrder();
+  void SetMeshOrder(const TListOfListOfInt& theOrder );
+  const TListOfListOfInt& GetMeshOrder() const;
+
+  /*!
+   * \brief sort submeshes according to stored mesh order
+   * \param theListToSort in out list to be sorted
+   * \return FALSE if nothing sorted
+   */
+  bool SortByMeshOrder(std::list<SMESH_subMesh*>& theListToSort) const;
+
   //
   
   ostream& Dump(ostream & save);
   
 private:
+
+  void fillAncestorsMap(const TopoDS_Shape& theShape);
+  std::list<SMESH_subMesh*> getAncestorsSubMeshes
+    (const TopoDS_Shape& theSubShape) const;
   
 protected:
   int                        _id;           // id given by creator (unique within the creator instance)
@@ -267,13 +291,15 @@ protected:
   std::map <int, SMESH_subMesh*> _mapSubMesh;
   std::map <int, SMESH_Group*>   _mapGroup;
   SMESH_Gen *                _gen;
-
+  
   bool                       _isAutoColor;
 
   double                     _shapeDiagonal; //!< diagonal size of bounding box of shape to mesh
   
   TopTools_IndexedDataMapOfShapeListOfShape _mapAncestors;
 
+  TListOfListOfInt           _mySubMeshOrder;
+
 protected:
   SMESH_Mesh() {};
   SMESH_Mesh(const SMESH_Mesh&) {};
index 851108365593725e2d1f9d01ca315750d5ea3c22..b8a52e1759f3bbd2ba130b34e183f2c3cee564ff 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's classes
 // File      : SMESH_MeshEditor.cxx
 // Created   : Mon Apr 12 16:10:22 2004
 #include "SMDS_SpacePosition.hxx"
 #include "SMDS_QuadraticFaceOfNodes.hxx"
 #include "SMDS_MeshGroup.hxx"
+#include "SMDS_LinearEdge.hxx"
 
 #include "SMESHDS_Group.hxx"
 #include "SMESHDS_Mesh.hxx"
 
-#include "SMESH_subMesh.hxx"
+#include "SMESH_Algo.hxx"
 #include "SMESH_ControlsDef.hxx"
+#include "SMESH_Group.hxx"
 #include "SMESH_MesherHelper.hxx"
 #include "SMESH_OctreeNode.hxx"
-#include "SMESH_Group.hxx"
+#include "SMESH_subMesh.hxx"
 
 #include "utilities.h"
 
-#include <BRep_Tool.hxx>
+#include <BRepAdaptor_Surface.hxx>
 #include <BRepClass3d_SolidClassifier.hxx>
+#include <BRep_Tool.hxx>
 #include <ElCLib.hxx>
 #include <Extrema_GenExtPS.hxx>
+#include <Extrema_POnCurv.hxx>
 #include <Extrema_POnSurf.hxx>
+#include <GC_MakeSegment.hxx>
 #include <Geom2d_Curve.hxx>
+#include <GeomAPI_ExtremaCurveCurve.hxx>
 #include <GeomAdaptor_Surface.hxx>
 #include <Geom_Curve.hxx>
+#include <Geom_Line.hxx>
 #include <Geom_Surface.hxx>
+#include <IntAna_IntConicQuad.hxx>
+#include <IntAna_Quadric.hxx>
 #include <Precision.hxx>
 #include <TColStd_ListOfInteger.hxx>
 #include <TopAbs_State.hxx>
@@ -74,6 +84,7 @@
 #include <gp_Vec.hxx>
 #include <gp_XY.hxx>
 #include <gp_XYZ.hxx>
+
 #include <math.h>
 
 #include <map>
@@ -88,28 +99,6 @@ using namespace SMESH::Controls;
 
 typedef map<const SMDS_MeshElement*, list<const SMDS_MeshNode*> >    TElemOfNodeListMap;
 typedef map<const SMDS_MeshElement*, list<const SMDS_MeshElement*> > TElemOfElemListMap;
-//typedef map<const SMDS_MeshNode*, vector<const SMDS_MeshNode*> >     TNodeOfNodeVecMap;
-//typedef TNodeOfNodeVecMap::iterator                                  TNodeOfNodeVecMapItr;
-//typedef map<const SMDS_MeshElement*, vector<TNodeOfNodeVecMapItr> >  TElemOfVecOfMapNodesMap;
-
-//=======================================================================
-/*!
- * \brief SMDS_MeshNode -> gp_XYZ convertor
- */
-//=======================================================================
-
-struct TNodeXYZ : public gp_XYZ
-{
-  TNodeXYZ( const SMDS_MeshNode* n ):gp_XYZ( n->X(), n->Y(), n->Z() ) {}
-  double Distance( const SMDS_MeshNode* n )
-  {
-    return gp_Vec( *this, TNodeXYZ( n )).Magnitude();
-  }
-  double SquareDistance( const SMDS_MeshNode* n )
-  {
-    return gp_Vec( *this, TNodeXYZ( n )).SquareMagnitude();
-  }
-};
 
 //=======================================================================
 //function : SMESH_MeshEditor
@@ -137,6 +126,11 @@ SMESH_MeshEditor::AddElement(const vector<const SMDS_MeshNode*> & node,
   int nbnode = node.size();
   SMESHDS_Mesh* mesh = GetMeshDS();
   switch ( type ) {
+  case SMDSAbs_0DElement:
+    if ( nbnode == 1 )
+      if ( ID ) e = mesh->Add0DElementWithID(node[0], ID);
+      else      e = mesh->Add0DElement      (node[0] );
+    break;
   case SMDSAbs_Edge:
     if ( nbnode == 2 )
       if ( ID ) e = mesh->AddEdgeWithID(node[0], node[1], ID);
@@ -1123,6 +1117,7 @@ bool SMESH_MeshEditor::QuadToTri (TIDSortedElemSet &                   theElems,
 //function : BestSplit
 //purpose  : Find better diagonal for cutting.
 //=======================================================================
+
 int SMESH_MeshEditor::BestSplit (const SMDS_MeshElement*              theQuad,
                                  SMESH::Controls::NumericalFunctorPtr theCrit)
 {
@@ -1164,6 +1159,453 @@ int SMESH_MeshEditor::BestSplit (const SMDS_MeshElement*              theQuad,
   return -1;
 }
 
+namespace
+{
+  // Methods of splitting volumes into tetra
+
+  const int theHexTo5_1[5*4+1] =
+    {
+      0, 1, 2, 5,    0, 4, 5, 7,     0, 2, 3, 7,    2, 5, 6, 7,     0, 5, 2, 7,   -1
+    };
+  const int theHexTo5_2[5*4+1] =
+    {
+      1, 2, 3, 6,    1, 4, 5, 6,     0, 1, 3, 4,    3, 4, 6, 7,     1, 3, 4, 6,   -1
+    };
+  const int* theHexTo5[2] = { theHexTo5_1, theHexTo5_2 };
+
+  const int theHexTo6_1[6*4+1] =
+    {
+      1, 5, 6, 0,    0, 1, 2, 6,     0, 4, 5, 6,    0, 4, 6, 7,     0, 2, 3, 6,   0, 3, 7, 6,  -1
+    };
+  const int theHexTo6_2[6*4+1] =
+    {
+      2, 6, 7, 1,    1, 2, 3, 7,     1, 5, 6, 7,    1, 5, 7, 4,     1, 3, 0, 7,   1, 0, 4, 7,  -1
+    };
+  const int theHexTo6_3[6*4+1] =
+    {
+      3, 7, 4, 2,    2, 3, 0, 4,     2, 6, 7, 4,    2, 6, 4, 5,     2, 0, 1, 4,   2, 1, 5, 4,  -1
+    };
+  const int theHexTo6_4[6*4+1] =
+    {
+      0, 4, 5, 3,    3, 0, 1, 5,     3, 7, 4, 5,    3, 7, 5, 6,     3, 1, 2, 5,   3, 2, 6, 5,  -1
+    };
+  const int* theHexTo6[4] = { theHexTo6_1, theHexTo6_2, theHexTo6_3, theHexTo6_4 };
+
+  const int thePyraTo2_1[2*4+1] =
+    {
+      0, 1, 2, 4,    0, 2, 3, 4,   -1
+    };
+  const int thePyraTo2_2[2*4+1] =
+    {
+      1, 2, 3, 4,    1, 3, 0, 4,   -1
+    };
+  const int* thePyraTo2[2] = { thePyraTo2_1, thePyraTo2_2 };
+
+  const int thePentaTo3_1[3*4+1] =
+    {
+      0, 1, 2, 3,    1, 3, 4, 2,     2, 3, 4, 5,    -1
+    };
+  const int thePentaTo3_2[3*4+1] =
+    {
+      1, 2, 0, 4,    2, 4, 5, 0,     0, 4, 5, 3,    -1
+    };
+  const int thePentaTo3_3[3*4+1] =
+    {
+      2, 0, 1, 5,    0, 5, 3, 1,     1, 5, 3, 4,    -1
+    };
+  const int thePentaTo3_4[3*4+1] =
+    {
+      0, 1, 2, 3,    1, 3, 4, 5,     2, 3, 1, 5,    -1
+    };
+  const int thePentaTo3_5[3*4+1] =
+    {
+      1, 2, 0, 4,    2, 4, 5, 3,     0, 4, 2, 3,    -1
+    };
+  const int thePentaTo3_6[3*4+1] =
+    {
+      2, 0, 1, 5,    0, 5, 3, 4,     1, 5, 0, 4,    -1
+    };
+  const int* thePentaTo3[6] = { thePentaTo3_1, thePentaTo3_2, thePentaTo3_3,
+                                thePentaTo3_4, thePentaTo3_5, thePentaTo3_6 };
+
+  struct TTriangleFacet //!< stores indices of three nodes of tetra facet
+  {
+    int _n1, _n2, _n3;
+    TTriangleFacet(int n1, int n2, int n3): _n1(n1), _n2(n2), _n3(n3) {}
+    bool contains(int n) const { return ( n == _n1 || n == _n2 || n == _n3 ); }
+    bool hasAdjacentTetra( const SMDS_MeshElement* elem ) const;
+  };
+  struct TSplitMethod
+  {
+    int        _nbTetra;
+    const int* _connectivity; //!< foursomes of tetra connectivy finished by -1
+    bool       _baryNode;     //!< additional node is to be created at cell barycenter
+    bool       _ownConn;      //!< to delete _connectivity in destructor
+
+    TSplitMethod( int nbTet=0, const int* conn=0, bool addNode=false)
+      : _nbTetra(nbTet), _connectivity(conn), _baryNode(addNode), _ownConn(false) {}
+    ~TSplitMethod() { if ( _ownConn ) delete [] _connectivity; _connectivity = 0; }
+    bool hasFacet( const TTriangleFacet& facet ) const
+    {
+      const int* tetConn = _connectivity;
+      for ( ; tetConn[0] >= 0; tetConn += 4 )
+        if (( facet.contains( tetConn[0] ) +
+              facet.contains( tetConn[1] ) +
+              facet.contains( tetConn[2] ) +
+              facet.contains( tetConn[3] )) == 3 )
+          return true;
+      return false;
+    }
+  };
+
+  //=======================================================================
+  /*!
+   * \brief return TSplitMethod for the given element
+   */
+  //=======================================================================
+
+  TSplitMethod getSplitMethod( SMDS_VolumeTool& vol, const int theMethodFlags)
+  {
+    int iQ = vol.Element()->IsQuadratic() ? 2 : 1;
+
+    // Find out how adjacent volumes are split
+
+    vector < list< TTriangleFacet > > triaSplitsByFace( vol.NbFaces() ); // splits of each side
+    int hasAdjacentSplits = 0, maxTetConnSize = 0;
+    for ( int iF = 0; iF < vol.NbFaces(); ++iF )
+    {
+      int nbNodes = vol.NbFaceNodes( iF ) / iQ;
+      maxTetConnSize += 4 * ( nbNodes - 2 );
+      if ( nbNodes < 4 ) continue;
+
+      list< TTriangleFacet >& triaSplits = triaSplitsByFace[ iF ];
+      const int* nInd = vol.GetFaceNodesIndices( iF );
+      if ( nbNodes == 4 )
+      {
+        TTriangleFacet t012( nInd[0*iQ], nInd[1*iQ], nInd[2*iQ] );
+        TTriangleFacet t123( nInd[1*iQ], nInd[2*iQ], nInd[3*iQ] );
+        if      ( t012.hasAdjacentTetra( vol.Element() )) triaSplits.push_back( t012 );
+        else if ( t123.hasAdjacentTetra( vol.Element() )) triaSplits.push_back( t123 );
+      }
+      else
+      {
+        int iCom = 0; // common node of triangle faces to split into
+        for ( int iVar = 0; iVar < nbNodes; ++iVar, ++iCom )
+        {
+          TTriangleFacet t012( nInd[ iQ * ( iCom             )],
+                               nInd[ iQ * ( (iCom+1)%nbNodes )],
+                               nInd[ iQ * ( (iCom+2)%nbNodes )]);
+          TTriangleFacet t023( nInd[ iQ * ( iCom             )],
+                               nInd[ iQ * ( (iCom+2)%nbNodes )],
+                               nInd[ iQ * ( (iCom+3)%nbNodes )]);
+          if ( t012.hasAdjacentTetra( vol.Element() ) && t023.hasAdjacentTetra( vol.Element() ))
+          {
+            triaSplits.push_back( t012 );
+            triaSplits.push_back( t023 );
+            break;
+          }
+        }
+      }
+      if ( !triaSplits.empty() )
+        hasAdjacentSplits = true;
+    }
+
+    // Among variants of split method select one compliant with adjacent volumes
+
+    TSplitMethod method;
+    if ( !vol.Element()->IsPoly() )
+    {
+      int nbVariants = 2, nbTet = 0;
+      const int** connVariants = 0;
+      switch ( vol.Element()->GetEntityType() )
+      {
+      case SMDSEntity_Hexa:
+      case SMDSEntity_Quad_Hexa:
+        if ( theMethodFlags & SMESH_MeshEditor::HEXA_TO_5 )
+          connVariants = theHexTo5, nbTet = 5;
+        else
+          connVariants = theHexTo6, nbTet = 6, nbVariants = 4;
+        break;
+      case SMDSEntity_Pyramid:
+      case SMDSEntity_Quad_Pyramid:
+        connVariants = thePyraTo2;  nbTet = 2;
+        break;
+      case SMDSEntity_Penta:
+      case SMDSEntity_Quad_Penta:
+        connVariants = thePentaTo3; nbTet = 3; nbVariants = 6;
+        break;
+      default:
+        nbVariants = 0;
+      }
+      for ( int variant = 0; variant < nbVariants && method._nbTetra == 0; ++variant )
+      {
+        // check method compliancy with adjacent tetras,
+        // all found splits must be among facets of tetras described by this method
+        method = TSplitMethod( nbTet, connVariants[variant] );
+        if ( hasAdjacentSplits && method._nbTetra > 0 )
+        {
+          bool facetCreated = true;
+          for ( int iF = 0; facetCreated && iF < triaSplitsByFace.size(); ++iF )
+          {
+            list< TTriangleFacet >::const_iterator facet = triaSplitsByFace[iF].begin();
+            for ( ; facetCreated && facet != triaSplitsByFace[iF].end(); ++facet )
+              facetCreated = method.hasFacet( *facet );
+          }
+          if ( !facetCreated )
+            method = TSplitMethod(0); // incompatible method
+        }
+      }
+    }
+    if ( method._nbTetra < 1 )
+    {
+      // No standard method is applicable, use a generic solution:
+      // each facet of a volume is split into triangles and
+      // each of triangles and a volume barycenter form a tetrahedron.
+
+      int* connectivity = new int[ maxTetConnSize + 1 ];
+      method._connectivity = connectivity;
+      method._ownConn = true;
+      method._baryNode = true;
+
+      int connSize = 0;
+      int baryCenInd = vol.NbNodes();
+      for ( int iF = 0; iF < vol.NbFaces(); ++iF )
+      {
+        const int nbNodes = vol.NbFaceNodes( iF ) / iQ;
+        const int*   nInd = vol.GetFaceNodesIndices( iF );
+        // find common node of triangle facets of tetra to create
+        int iCommon = 0; // index in linear numeration
+        const list< TTriangleFacet >& triaSplits = triaSplitsByFace[ iF ];
+        if ( !triaSplits.empty() )
+        {
+          // by found facets
+          const TTriangleFacet* facet = &triaSplits.front();
+          for ( ; iCommon < nbNodes-1 ; ++iCommon )
+            if ( facet->contains( nInd[ iQ * iCommon ]) &&
+                 facet->contains( nInd[ iQ * ((iCommon+2)%nbNodes) ]))
+              break;
+        }
+        else if ( nbNodes > 3 )
+        {
+          // find the best method of splitting into triangles by aspect ratio
+          SMESH::Controls::NumericalFunctorPtr aspectRatio( new SMESH::Controls::AspectRatio);
+          map< double, int > badness2iCommon;
+          const SMDS_MeshNode** nodes = vol.GetFaceNodes( iF );
+          int nbVariants = ( nbNodes == 4 ? 2 : nbNodes );
+          for ( int iVar = 0; iVar < nbVariants; ++iVar, ++iCommon )
+            for ( int iLast = iCommon+2; iLast < iCommon+nbNodes; ++iLast )
+            {
+              SMDS_FaceOfNodes tria ( nodes[ iQ*( iCommon         )],
+                                      nodes[ iQ*((iLast-1)%nbNodes)],
+                                      nodes[ iQ*((iLast  )%nbNodes)]);
+              double badness = getBadRate( &tria, aspectRatio );
+              badness2iCommon.insert( make_pair( badness, iCommon ));
+            }
+          // use iCommon with lowest badness
+          iCommon = badness2iCommon.begin()->second;
+        }
+        if ( iCommon >= nbNodes )
+          iCommon = 0; // something wrong
+        // fill connectivity of tetra
+        int nbTet = nbNodes - 2;
+        for ( int i = 0; i < nbTet; ++i )
+        {
+          int i1 = (iCommon+1+i) % nbNodes, i2 = (iCommon+2+i) % nbNodes;
+          if ( !vol.IsFaceExternal( iF )) swap( i1, i2 );
+          connectivity[ connSize++ ] = nInd[ iQ * iCommon ];
+          connectivity[ connSize++ ] = nInd[ iQ * i1 ];
+          connectivity[ connSize++ ] = nInd[ iQ * i2 ];
+          connectivity[ connSize++ ] = baryCenInd;
+          ++method._nbTetra;
+        }
+      }
+      connectivity[ connSize++ ] = -1;
+    }
+    return method;
+  }
+  //================================================================================
+  /*!
+   * \brief Check if there is a tetraherdon adjacent to the given element via this facet
+   */
+  //================================================================================
+
+  bool TTriangleFacet::hasAdjacentTetra( const SMDS_MeshElement* elem ) const
+  {
+    // find the tetrahedron including the three nodes of facet
+    const SMDS_MeshNode* n1 = elem->GetNode(_n1);
+    const SMDS_MeshNode* n2 = elem->GetNode(_n2);
+    const SMDS_MeshNode* n3 = elem->GetNode(_n3);
+    SMDS_ElemIteratorPtr volIt1 = n1->GetInverseElementIterator(SMDSAbs_Volume);
+    while ( volIt1->more() )
+    {
+      const SMDS_MeshElement* v = volIt1->next();
+      if ( v->GetEntityType() != ( v->IsQuadratic() ? SMDSEntity_Quad_Tetra : SMDSEntity_Tetra ))
+        continue;
+      SMDS_ElemIteratorPtr volIt2 = n2->GetInverseElementIterator(SMDSAbs_Volume);
+      while ( volIt2->more() )
+        if ( v != volIt2->next() )
+          continue;
+      SMDS_ElemIteratorPtr volIt3 = n3->GetInverseElementIterator(SMDSAbs_Volume);
+      while ( volIt3->more() )
+        if ( v == volIt3->next() )
+          return true;
+    }
+    return false;
+  }
+} // namespace
+
+//=======================================================================
+//function : SplitVolumesIntoTetra
+//purpose  : Split volumic elements into tetrahedra.
+//=======================================================================
+
+void SMESH_MeshEditor::SplitVolumesIntoTetra (const TIDSortedElemSet & theElems,
+                                              const int                theMethodFlags)
+{
+  // std-like iterator on coordinates of nodes of mesh element
+  typedef SMDS_StdIterator< TNodeXYZ, SMDS_ElemIteratorPtr > NXyzIterator;
+  NXyzIterator xyzEnd;
+
+  SMDS_VolumeTool    volTool;
+  SMESH_MesherHelper helper( *GetMesh());
+
+  SMESHDS_SubMesh* subMesh = GetMeshDS()->MeshElements(1);
+  SMESHDS_SubMesh* fSubMesh = subMesh;
+  
+  SMESH_SequenceOfElemPtr newNodes, newElems;
+
+  TIDSortedElemSet::const_iterator elem = theElems.begin();
+  for ( ; elem != theElems.end(); ++elem )
+  {
+    SMDSAbs_EntityType geomType = (*elem)->GetEntityType();
+    if ( geomType <= SMDSEntity_Quad_Tetra )
+      continue; // tetra or face or ...
+
+    if ( !volTool.Set( *elem )) continue; // not volume? strange...
+
+    TSplitMethod splitMethod = getSplitMethod( volTool, theMethodFlags );
+    if ( splitMethod._nbTetra < 1 ) continue;
+
+    // find submesh to add new tetras in
+    if ( !subMesh || !subMesh->Contains( *elem ))
+    {
+      int shapeID = FindShape( *elem );
+      helper.SetSubShape( shapeID ); // helper will add tetras to the found submesh
+      subMesh = GetMeshDS()->MeshElements( shapeID );
+    }
+    int iQ;
+    if ( (*elem)->IsQuadratic() )
+    {
+      iQ = 2;
+      // add quadratic links to the helper
+      for ( int iF = 0; iF < volTool.NbFaces(); ++iF )
+      {
+        const SMDS_MeshNode** fNodes = volTool.GetFaceNodes( iF );
+        for ( int iN = 0; iN < volTool.NbFaceNodes( iF ); iN += iQ )
+          helper.AddTLinkNode( fNodes[iF], fNodes[iF+2], fNodes[iF+1] );
+      }
+      helper.SetIsQuadratic( true );
+    }
+    else
+    {
+      iQ = 1;
+      helper.SetIsQuadratic( false );
+    }
+    vector<const SMDS_MeshNode*> nodes( (*elem)->begin_nodes(), (*elem)->end_nodes() );
+    if ( splitMethod._baryNode )
+    {
+      // make a node at barycenter
+      gp_XYZ gc( 0,0,0 );
+      gc = accumulate( NXyzIterator((*elem)->nodesIterator()), xyzEnd, gc ) / nodes.size();
+      SMDS_MeshNode* gcNode = helper.AddNode( gc.X(), gc.Y(), gc.Z() );
+      nodes.push_back( gcNode );
+      newNodes.Append( gcNode );
+    }
+
+    // make tetras
+    helper.SetElementsOnShape( true );
+    vector<const SMDS_MeshElement* > tetras( splitMethod._nbTetra ); // splits of a volume
+    const int* tetConn = splitMethod._connectivity;
+    for ( int i = 0; i < splitMethod._nbTetra; ++i, tetConn += 4 )
+      newElems.Append( tetras[ i ] = helper.AddVolume( nodes[ tetConn[0] ],
+                                                       nodes[ tetConn[1] ],
+                                                       nodes[ tetConn[2] ],
+                                                       nodes[ tetConn[3] ]));
+
+    ReplaceElemInGroups( *elem, tetras, GetMeshDS() );
+
+    // Split faces on sides of the split volume
+
+    const SMDS_MeshNode** volNodes = volTool.GetNodes();
+    for ( int iF = 0; iF < volTool.NbFaces(); ++iF )
+    {
+      const int nbNodes = volTool.NbFaceNodes( iF ) / iQ;
+      if ( nbNodes < 4 ) continue;
+
+      // find an existing face
+      vector<const SMDS_MeshNode*> fNodes( volTool.GetFaceNodes( iF ),
+                                           volTool.GetFaceNodes( iF ) + nbNodes*iQ );
+      while ( const SMDS_MeshElement* face = GetMeshDS()->FindFace( fNodes ))
+      {
+        // among possible triangles create ones discribed by split method
+        const int* nInd = volTool.GetFaceNodesIndices( iF );
+        int nbVariants = ( nbNodes == 4 ? 2 : nbNodes );
+        int iCom = 0; // common node of triangle faces to split into
+        list< TTriangleFacet > facets;
+        for ( int iVar = 0; iVar < nbVariants; ++iVar, ++iCom )
+        {
+          TTriangleFacet t012( nInd[ iQ * ( iCom                )],
+                               nInd[ iQ * ( (iCom+1)%nbNodes )],
+                               nInd[ iQ * ( (iCom+2)%nbNodes )]);
+          TTriangleFacet t023( nInd[ iQ * ( iCom                )],
+                               nInd[ iQ * ( (iCom+2)%nbNodes )],
+                               nInd[ iQ * ( (iCom+3)%nbNodes )]);
+          if ( splitMethod.hasFacet( t012 ) && splitMethod.hasFacet( t023 ))
+          {
+            facets.push_back( t012 );
+            facets.push_back( t023 );
+            for ( int iLast = iCom+4; iLast < iCom+nbNodes; ++iLast )
+              facets.push_back( TTriangleFacet( nInd[ iQ * ( iCom             )],
+                                                nInd[ iQ * ((iLast-1)%nbNodes )],
+                                                nInd[ iQ * ((iLast  )%nbNodes )]));
+            break;
+          }
+        }
+        // find submesh to add new faces in
+        if ( !fSubMesh || !fSubMesh->Contains( face ))
+        {
+          int shapeID = FindShape( face );
+          fSubMesh = GetMeshDS()->MeshElements( shapeID );
+        }
+        // make triangles
+        helper.SetElementsOnShape( false );
+        vector< const SMDS_MeshElement* > triangles;
+        list< TTriangleFacet >::iterator facet = facets.begin();
+        for ( ; facet != facets.end(); ++facet )
+        {
+          if ( !volTool.IsFaceExternal( iF ))
+            swap( facet->_n2, facet->_n3 );
+          triangles.push_back( helper.AddFace( volNodes[ facet->_n1 ],
+                                               volNodes[ facet->_n2 ],
+                                               volNodes[ facet->_n3 ]));
+          if ( triangles.back() && fSubMesh )
+            fSubMesh->AddElement( triangles.back());
+          newElems.Append( triangles.back() );
+        }
+        ReplaceElemInGroups( face, triangles, GetMeshDS() );
+        GetMeshDS()->RemoveFreeElement( face, fSubMesh, /*fromGroups=*/false );
+      }
+
+    } // loop on volume faces to split them into triangles
+
+    GetMeshDS()->RemoveFreeElement( *elem, subMesh, /*fromGroups=*/false );
+
+  } // loop on volumes to split
+
+  myLastCreatedNodes = newNodes;
+  myLastCreatedElems = newElems;
+}
+
 //=======================================================================
 //function : AddToSameGroups
 //purpose  : add elemToAdd to the groups the elemInGroups belongs to
@@ -1205,10 +1647,11 @@ void SMESH_MeshEditor::RemoveElemFromGroups (const SMDS_MeshElement* removeelem,
   }
 }
 
-//=======================================================================
-//function : ReplaceElemInGroups
-//purpose  : replace elemToRm by elemToAdd in the all groups
-//=======================================================================
+//================================================================================
+/*!
+ * \brief Replace elemToRm by elemToAdd in the all groups
+ */
+//================================================================================
 
 void SMESH_MeshEditor::ReplaceElemInGroups (const SMDS_MeshElement* elemToRm,
                                             const SMDS_MeshElement* elemToAdd,
@@ -1225,6 +1668,29 @@ void SMESH_MeshEditor::ReplaceElemInGroups (const SMDS_MeshElement* elemToRm,
   }
 }
 
+//================================================================================
+/*!
+ * \brief Replace elemToRm by elemToAdd in the all groups
+ */
+//================================================================================
+
+void SMESH_MeshEditor::ReplaceElemInGroups (const SMDS_MeshElement*                elemToRm,
+                                            const vector<const SMDS_MeshElement*>& elemToAdd,
+                                            SMESHDS_Mesh *                         aMesh)
+{
+  const set<SMESHDS_GroupBase*>& groups = aMesh->GetGroups();
+  if (!groups.empty())
+  {
+    set<SMESHDS_GroupBase*>::const_iterator grIt = groups.begin();
+    for ( ; grIt != groups.end(); grIt++ ) {
+      SMESHDS_Group* group = dynamic_cast<SMESHDS_Group*>( *grIt );
+      if ( group && group->SMDSGroup().Remove( elemToRm ) )
+        for ( int i = 0; i < elemToAdd.size(); ++i )
+          group->SMDSGroup().Add( elemToAdd[ i ] );
+    }
+  }
+}
+
 //=======================================================================
 //function : QuadToTri
 //purpose  : Cut quadrangles into triangles.
@@ -4957,68 +5423,393 @@ SMESH_MeshEditor::Transform (TIDSortedElemSet & theElems,
   return newGroupIDs;
 }
 
+
 //=======================================================================
-/*!
- * \brief Create groups of elements made during transformation
- * \param nodeGens - nodes making corresponding myLastCreatedNodes
- * \param elemGens - elements making corresponding myLastCreatedElems
- * \param postfix - to append to names of new groups
- */
+//function : Scale
+//purpose  :
 //=======================================================================
 
 SMESH_MeshEditor::PGroupIDs
-SMESH_MeshEditor::generateGroups(const SMESH_SequenceOfElemPtr& nodeGens,
-                                 const SMESH_SequenceOfElemPtr& elemGens,
-                                 const std::string&             postfix,
-                                 SMESH_Mesh*                    targetMesh)
+SMESH_MeshEditor::Scale (TIDSortedElemSet & theElems,
+                         const gp_Pnt&            thePoint,
+                         const std::list<double>& theScaleFact,
+                         const bool         theCopy,
+                         const bool         theMakeGroups,
+                         SMESH_Mesh*        theTargetMesh)
 {
-  PGroupIDs newGroupIDs( new list<int> );
-  SMESH_Mesh* mesh = targetMesh ? targetMesh : GetMesh();
+  myLastCreatedElems.Clear();
+  myLastCreatedNodes.Clear();
 
-  // Sort existing groups by types and collect their names
+  SMESH_MeshEditor targetMeshEditor( theTargetMesh );
+  SMESHDS_Mesh* aTgtMesh = theTargetMesh ? theTargetMesh->GetMeshDS() : 0;
+  SMESHDS_Mesh* aMesh    = GetMeshDS();
 
-  // to store an old group and a generated new one
-  typedef pair< SMESHDS_GroupBase*, SMDS_MeshGroup* > TOldNewGroup;
-  vector< list< TOldNewGroup > > groupsByType( SMDSAbs_NbElementTypes );
-  // group names
-  set< string > groupNames;
-  //
-  SMDS_MeshGroup* nullNewGroup = (SMDS_MeshGroup*) 0;
-  SMESH_Mesh::GroupIteratorPtr groupIt = GetMesh()->GetGroups();
-  while ( groupIt->more() ) {
-    SMESH_Group * group = groupIt->next();
-    if ( !group ) continue;
-    SMESHDS_GroupBase* groupDS = group->GetGroupDS();
-    if ( !groupDS || groupDS->IsEmpty() ) continue;
-    groupNames.insert( group->GetName() );
-    groupDS->SetStoreName( group->GetName() );
-    groupsByType[ groupDS->GetType() ].push_back( make_pair( groupDS, nullNewGroup ));
-  }
+  double scaleX=1.0, scaleY=1.0, scaleZ=1.0;
+  std::list<double>::const_iterator itS = theScaleFact.begin();
+  scaleX = (*itS);
+  if(theScaleFact.size()==1) {
+    scaleY = (*itS);
+    scaleZ= (*itS);
+  }
+  if(theScaleFact.size()==2) {
+    itS++;
+    scaleY = (*itS);
+    scaleZ= (*itS);
+  }
+  if(theScaleFact.size()>2) {
+    itS++;
+    scaleY = (*itS);
+    itS++;
+    scaleZ= (*itS);
+  }
+  
+  // map old node to new one
+  TNodeNodeMap nodeMap;
 
-  // Groups creation
+  // elements sharing moved nodes; those of them which have all
+  // nodes mirrored but are not in theElems are to be reversed
+  TIDSortedElemSet inverseElemSet;
 
-  // loop on nodes and elements
-  for ( int isNodes = 0; isNodes < 2; ++isNodes )
-  {
-    const SMESH_SequenceOfElemPtr& gens  = isNodes ? nodeGens : elemGens;
-    const SMESH_SequenceOfElemPtr& elems = isNodes ? myLastCreatedNodes : myLastCreatedElems;
-    if ( gens.Length() != elems.Length() )
-      throw SALOME_Exception(LOCALIZED("invalid args"));
+  // source elements for each generated one
+  SMESH_SequenceOfElemPtr srcElems, srcNodes;
 
-    // loop on created elements
-    for (int iElem = 1; iElem <= elems.Length(); ++iElem )
-    {
-      const SMDS_MeshElement* sourceElem = gens( iElem );
-      if ( !sourceElem ) {
-        MESSAGE("generateGroups(): NULL source element");
-        continue;
-      }
-      list< TOldNewGroup > & groupsOldNew = groupsByType[ sourceElem->GetType() ];
-      if ( groupsOldNew.empty() ) {
-        while ( iElem < gens.Length() && gens( iElem+1 ) == sourceElem )
-          ++iElem; // skip all elements made by sourceElem
-        continue;
-      }
+  // loop on theElems
+  TIDSortedElemSet::iterator itElem;
+  for ( itElem = theElems.begin(); itElem != theElems.end(); itElem++ ) {
+    const SMDS_MeshElement* elem = *itElem;
+    if ( !elem )
+      continue;
+
+    // loop on elem nodes
+    SMDS_ElemIteratorPtr itN = elem->nodesIterator();
+    while ( itN->more() ) {
+
+      // check if a node has been already transformed
+      const SMDS_MeshNode* node = cast2Node( itN->next() );
+      pair<TNodeNodeMap::iterator,bool> n2n_isnew =
+        nodeMap.insert( make_pair ( node, node ));
+      if ( !n2n_isnew.second )
+        continue;
+
+      //double coord[3];
+      //coord[0] = node->X();
+      //coord[1] = node->Y();
+      //coord[2] = node->Z();
+      //theTrsf.Transforms( coord[0], coord[1], coord[2] );
+      double dx = (node->X() - thePoint.X()) * scaleX;
+      double dy = (node->Y() - thePoint.Y()) * scaleY;
+      double dz = (node->Z() - thePoint.Z()) * scaleZ;
+      if ( theTargetMesh ) {
+        //const SMDS_MeshNode * newNode = aTgtMesh->AddNode( coord[0], coord[1], coord[2] );
+        const SMDS_MeshNode * newNode =
+          aTgtMesh->AddNode( thePoint.X()+dx, thePoint.Y()+dy, thePoint.Z()+dz );
+        n2n_isnew.first->second = newNode;
+        myLastCreatedNodes.Append(newNode);
+        srcNodes.Append( node );
+      }
+      else if ( theCopy ) {
+        //const SMDS_MeshNode * newNode = aMesh->AddNode( coord[0], coord[1], coord[2] );
+        const SMDS_MeshNode * newNode =
+          aMesh->AddNode( thePoint.X()+dx, thePoint.Y()+dy, thePoint.Z()+dz );
+        n2n_isnew.first->second = newNode;
+        myLastCreatedNodes.Append(newNode);
+        srcNodes.Append( node );
+      }
+      else {
+        //aMesh->MoveNode( node, coord[0], coord[1], coord[2] );
+        aMesh->MoveNode( node, thePoint.X()+dx, thePoint.Y()+dy, thePoint.Z()+dz );
+        // node position on shape becomes invalid
+        const_cast< SMDS_MeshNode* > ( node )->SetPosition
+          ( SMDS_SpacePosition::originSpacePosition() );
+      }
+
+      // keep inverse elements
+      //if ( !theCopy && !theTargetMesh && needReverse ) {
+      //  SMDS_ElemIteratorPtr invElemIt = node->GetInverseElementIterator();
+      //  while ( invElemIt->more() ) {
+      //    const SMDS_MeshElement* iel = invElemIt->next();
+      //    inverseElemSet.insert( iel );
+      //  }
+      //}
+    }
+  }
+
+  // either create new elements or reverse mirrored ones
+  //if ( !theCopy && !needReverse && !theTargetMesh )
+  if ( !theCopy && !theTargetMesh )
+    return PGroupIDs();
+
+  TIDSortedElemSet::iterator invElemIt = inverseElemSet.begin();
+  for ( ; invElemIt != inverseElemSet.end(); invElemIt++ )
+    theElems.insert( *invElemIt );
+
+  // replicate or reverse elements
+
+  enum {
+    REV_TETRA   = 0,  //  = nbNodes - 4
+    REV_PYRAMID = 1,  //  = nbNodes - 4
+    REV_PENTA   = 2,  //  = nbNodes - 4
+    REV_FACE    = 3,
+    REV_HEXA    = 4,  //  = nbNodes - 4
+    FORWARD     = 5
+  };
+  int index[][8] = {
+    { 2, 1, 0, 3, 4, 0, 0, 0 },  // REV_TETRA
+    { 2, 1, 0, 3, 4, 0, 0, 0 },  // REV_PYRAMID
+    { 2, 1, 0, 5, 4, 3, 0, 0 },  // REV_PENTA
+    { 2, 1, 0, 3, 0, 0, 0, 0 },  // REV_FACE
+    { 2, 1, 0, 3, 6, 5, 4, 7 },  // REV_HEXA
+    { 0, 1, 2, 3, 4, 5, 6, 7 }   // FORWARD
+  };
+
+  for ( itElem = theElems.begin(); itElem != theElems.end(); itElem++ )
+  {
+    const SMDS_MeshElement* elem = *itElem;
+    if ( !elem || elem->GetType() == SMDSAbs_Node )
+      continue;
+
+    int nbNodes = elem->NbNodes();
+    int elemType = elem->GetType();
+
+    if (elem->IsPoly()) {
+      // Polygon or Polyhedral Volume
+      switch ( elemType ) {
+      case SMDSAbs_Face:
+        {
+          vector<const SMDS_MeshNode*> poly_nodes (nbNodes);
+          int iNode = 0;
+          SMDS_ElemIteratorPtr itN = elem->nodesIterator();
+          while (itN->more()) {
+            const SMDS_MeshNode* node =
+              static_cast<const SMDS_MeshNode*>(itN->next());
+            TNodeNodeMap::iterator nodeMapIt = nodeMap.find(node);
+            if (nodeMapIt == nodeMap.end())
+              break; // not all nodes transformed
+            //if (needReverse) {
+            //  // reverse mirrored faces and volumes
+            //  poly_nodes[nbNodes - iNode - 1] = (*nodeMapIt).second;
+            //} else {
+            poly_nodes[iNode] = (*nodeMapIt).second;
+            //}
+            iNode++;
+          }
+          if ( iNode != nbNodes )
+            continue; // not all nodes transformed
+
+          if ( theTargetMesh ) {
+            myLastCreatedElems.Append(aTgtMesh->AddPolygonalFace(poly_nodes));
+            srcElems.Append( elem );
+          }
+          else if ( theCopy ) {
+            myLastCreatedElems.Append(aMesh->AddPolygonalFace(poly_nodes));
+            srcElems.Append( elem );
+          }
+          else {
+            aMesh->ChangePolygonNodes(elem, poly_nodes);
+          }
+        }
+        break;
+      case SMDSAbs_Volume:
+        {
+          // ATTENTION: Reversing is not yet done!!!
+          const SMDS_PolyhedralVolumeOfNodes* aPolyedre =
+            dynamic_cast<const SMDS_PolyhedralVolumeOfNodes*>( elem );
+          if (!aPolyedre) {
+            MESSAGE("Warning: bad volumic element");
+            continue;
+          }
+
+          vector<const SMDS_MeshNode*> poly_nodes;
+          vector<int> quantities;
+
+          bool allTransformed = true;
+          int nbFaces = aPolyedre->NbFaces();
+          for (int iface = 1; iface <= nbFaces && allTransformed; iface++) {
+            int nbFaceNodes = aPolyedre->NbFaceNodes(iface);
+            for (int inode = 1; inode <= nbFaceNodes && allTransformed; inode++) {
+              const SMDS_MeshNode* node = aPolyedre->GetFaceNode(iface, inode);
+              TNodeNodeMap::iterator nodeMapIt = nodeMap.find(node);
+              if (nodeMapIt == nodeMap.end()) {
+                allTransformed = false; // not all nodes transformed
+              } else {
+                poly_nodes.push_back((*nodeMapIt).second);
+              }
+            }
+            quantities.push_back(nbFaceNodes);
+          }
+          if ( !allTransformed )
+            continue; // not all nodes transformed
+
+          if ( theTargetMesh ) {
+            myLastCreatedElems.Append(aTgtMesh->AddPolyhedralVolume(poly_nodes, quantities));
+            srcElems.Append( elem );
+          }
+          else if ( theCopy ) {
+            myLastCreatedElems.Append(aMesh->AddPolyhedralVolume(poly_nodes, quantities));
+            srcElems.Append( elem );
+          }
+          else {
+            aMesh->ChangePolyhedronNodes(elem, poly_nodes, quantities);
+          }
+        }
+        break;
+      default:;
+      }
+      continue;
+    }
+
+    // Regular elements
+    int* i = index[ FORWARD ];
+    //if ( needReverse && nbNodes > 2) // reverse mirrored faces and volumes
+    //  if ( elemType == SMDSAbs_Face )
+    //    i = index[ REV_FACE ];
+    //  else
+    //    i = index[ nbNodes - 4 ];
+
+    if(elem->IsQuadratic()) {
+      static int anIds[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
+      i = anIds;
+      //if(needReverse) {
+      //  if(nbNodes==3) { // quadratic edge
+      //    static int anIds[] = {1,0,2};
+      //    i = anIds;
+      //  }
+      //  else if(nbNodes==6) { // quadratic triangle
+      //    static int anIds[] = {0,2,1,5,4,3};
+      //    i = anIds;
+      //  }
+      //  else if(nbNodes==8) { // quadratic quadrangle
+      //    static int anIds[] = {0,3,2,1,7,6,5,4};
+      //    i = anIds;
+      //  }
+      //  else if(nbNodes==10) { // quadratic tetrahedron of 10 nodes
+      //    static int anIds[] = {0,2,1,3,6,5,4,7,9,8};
+      //    i = anIds;
+      //  }
+      //  else if(nbNodes==13) { // quadratic pyramid of 13 nodes
+      //    static int anIds[] = {0,3,2,1,4,8,7,6,5,9,12,11,10};
+      //    i = anIds;
+      //  }
+      //  else if(nbNodes==15) { // quadratic pentahedron with 15 nodes
+      //    static int anIds[] = {0,2,1,3,5,4,8,7,6,11,10,9,12,14,13};
+      //    i = anIds;
+      //  }
+      //  else { // nbNodes==20 - quadratic hexahedron with 20 nodes
+      //    static int anIds[] = {0,3,2,1,4,7,6,5,11,10,9,8,15,14,13,12,16,19,18,17};
+      //    i = anIds;
+      //  }
+      //}
+    }
+
+    // find transformed nodes
+    vector<const SMDS_MeshNode*> nodes(nbNodes);
+    int iNode = 0;
+    SMDS_ElemIteratorPtr itN = elem->nodesIterator();
+    while ( itN->more() ) {
+      const SMDS_MeshNode* node =
+        static_cast<const SMDS_MeshNode*>( itN->next() );
+      TNodeNodeMap::iterator nodeMapIt = nodeMap.find( node );
+      if ( nodeMapIt == nodeMap.end() )
+        break; // not all nodes transformed
+      nodes[ i [ iNode++ ]] = (*nodeMapIt).second;
+    }
+    if ( iNode != nbNodes )
+      continue; // not all nodes transformed
+
+    if ( theTargetMesh ) {
+      if ( SMDS_MeshElement* copy =
+           targetMeshEditor.AddElement( nodes, elem->GetType(), elem->IsPoly() )) {
+        myLastCreatedElems.Append( copy );
+        srcElems.Append( elem );
+      }
+    }
+    else if ( theCopy ) {
+      if ( SMDS_MeshElement* copy = AddElement( nodes, elem->GetType(), elem->IsPoly() )) {
+        myLastCreatedElems.Append( copy );
+        srcElems.Append( elem );
+      }
+    }
+    else {
+      // reverse element as it was reversed by transformation
+      if ( nbNodes > 2 )
+        aMesh->ChangeElementNodes( elem, &nodes[0], nbNodes );
+    }
+  }
+
+  PGroupIDs newGroupIDs;
+
+  if ( theMakeGroups && theCopy ||
+       theMakeGroups && theTargetMesh ) {
+    string groupPostfix = "scaled";
+    newGroupIDs = generateGroups( srcNodes, srcElems, groupPostfix, theTargetMesh );
+  }
+
+  return newGroupIDs;
+}
+
+
+//=======================================================================
+/*!
+ * \brief Create groups of elements made during transformation
+ * \param nodeGens - nodes making corresponding myLastCreatedNodes
+ * \param elemGens - elements making corresponding myLastCreatedElems
+ * \param postfix - to append to names of new groups
+ */
+//=======================================================================
+
+SMESH_MeshEditor::PGroupIDs
+SMESH_MeshEditor::generateGroups(const SMESH_SequenceOfElemPtr& nodeGens,
+                                 const SMESH_SequenceOfElemPtr& elemGens,
+                                 const std::string&             postfix,
+                                 SMESH_Mesh*                    targetMesh)
+{
+  PGroupIDs newGroupIDs( new list<int> );
+  SMESH_Mesh* mesh = targetMesh ? targetMesh : GetMesh();
+
+  // Sort existing groups by types and collect their names
+
+  // to store an old group and a generated new one
+  typedef pair< SMESHDS_GroupBase*, SMDS_MeshGroup* > TOldNewGroup;
+  vector< list< TOldNewGroup > > groupsByType( SMDSAbs_NbElementTypes );
+  // group names
+  set< string > groupNames;
+  //
+  SMDS_MeshGroup* nullNewGroup = (SMDS_MeshGroup*) 0;
+  SMESH_Mesh::GroupIteratorPtr groupIt = GetMesh()->GetGroups();
+  while ( groupIt->more() ) {
+    SMESH_Group * group = groupIt->next();
+    if ( !group ) continue;
+    SMESHDS_GroupBase* groupDS = group->GetGroupDS();
+    if ( !groupDS || groupDS->IsEmpty() ) continue;
+    groupNames.insert( group->GetName() );
+    groupDS->SetStoreName( group->GetName() );
+    groupsByType[ groupDS->GetType() ].push_back( make_pair( groupDS, nullNewGroup ));
+  }
+
+  // Groups creation
+
+  // loop on nodes and elements
+  for ( int isNodes = 0; isNodes < 2; ++isNodes )
+  {
+    const SMESH_SequenceOfElemPtr& gens  = isNodes ? nodeGens : elemGens;
+    const SMESH_SequenceOfElemPtr& elems = isNodes ? myLastCreatedNodes : myLastCreatedElems;
+    if ( gens.Length() != elems.Length() )
+      throw SALOME_Exception(LOCALIZED("invalid args"));
+
+    // loop on created elements
+    for (int iElem = 1; iElem <= elems.Length(); ++iElem )
+    {
+      const SMDS_MeshElement* sourceElem = gens( iElem );
+      if ( !sourceElem ) {
+        MESSAGE("generateGroups(): NULL source element");
+        continue;
+      }
+      list< TOldNewGroup > & groupsOldNew = groupsByType[ sourceElem->GetType() ];
+      if ( groupsOldNew.empty() ) {
+        while ( iElem < gens.Length() && gens( iElem+1 ) == sourceElem )
+          ++iElem; // skip all elements made by sourceElem
+        continue;
+      }
       // collect all elements made by sourceElem
       list< const SMDS_MeshElement* > resultElems;
       if ( const SMDS_MeshElement* resElem = elems( iElem ))
@@ -5223,7 +6014,7 @@ struct SMESH_NodeSearcherImpl: public SMESH_NodeSearcher
     const SMDS_MeshNode* closestNode = 0;
     list<const SMDS_MeshNode*>::iterator nIt = nodes.begin();
     for ( ; nIt != nodes.end(); ++nIt ) {
-      double sqDist = thePnt.SquareDistance( TNodeXYZ( *nIt ) );
+      double sqDist = thePnt.SquareDistance( SMESH_MeshEditor::TNodeXYZ( *nIt ) );
       if ( minSqDist > sqDist ) {
         closestNode = *nIt;
         minSqDist = sqDist;
@@ -5280,6 +6071,7 @@ namespace // Utils used in SMESH_ElementSearcherImpl::FindElementsByPoint()
 
     ElementBndBoxTree(const SMDS_Mesh& mesh, SMDSAbs_ElementType elemType);
     void getElementsNearPoint( const gp_Pnt& point, TIDSortedElemSet& foundElems);
+    void getElementsNearLine ( const gp_Ax1& line, TIDSortedElemSet& foundElems);
     ~ElementBndBoxTree();
 
   protected:
@@ -5395,13 +6187,38 @@ namespace // Utils used in SMESH_ElementSearcherImpl::FindElementsByPoint()
     if ( isLeaf() )
     {
       for ( int i = 0; i < _elements.size(); ++i )
-        if ( !_elements[i]->IsOut( point.XYZ() ))
+        if ( !_elements[i]->IsOut( point.XYZ() ))
+          foundElems.insert( _elements[i]->_element );
+    }
+    else
+    {
+      for (int i = 0; i < 8; i++)
+        ((ElementBndBoxTree*) myChildren[i])->getElementsNearPoint( point, foundElems );
+    }
+  }
+
+  //================================================================================
+  /*!
+   * \brief Return elements which can be intersected by the line
+   */
+  //================================================================================
+
+  void ElementBndBoxTree::getElementsNearLine( const gp_Ax1&     line,
+                                               TIDSortedElemSet& foundElems)
+  {
+    if ( level() && getBox().IsOut( line ))
+      return;
+
+    if ( isLeaf() )
+    {
+      for ( int i = 0; i < _elements.size(); ++i )
+        if ( !_elements[i]->IsOut( line ))
           foundElems.insert( _elements[i]->_element );
     }
     else
     {
       for (int i = 0; i < 8; i++)
-        ((ElementBndBoxTree*) myChildren[i])->getElementsNearPoint( point, foundElems );
+        ((ElementBndBoxTree*) myChildren[i])->getElementsNearLine( line, foundElems );
     }
   }
 
@@ -5417,7 +6234,7 @@ namespace // Utils used in SMESH_ElementSearcherImpl::FindElementsByPoint()
     _refCount = 1;
     SMDS_ElemIteratorPtr nIt = elem->nodesIterator();
     while ( nIt->more() )
-      Add( TNodeXYZ( cast2Node( nIt->next() )));
+      Add( SMESH_MeshEditor::TNodeXYZ( cast2Node( nIt->next() )));
     Enlarge( NodeRadius );
   }
 
@@ -5425,59 +6242,95 @@ namespace // Utils used in SMESH_ElementSearcherImpl::FindElementsByPoint()
 
 //=======================================================================
 /*!
- * \brief Implementation of search for the elements by point
+ * \brief Implementation of search for the elements by point and
+ *        of classification of point in 2D mesh
  */
 //=======================================================================
 
 struct SMESH_ElementSearcherImpl: public SMESH_ElementSearcher
 {
-  SMESHDS_Mesh*           _mesh;
-  ElementBndBoxTree*      _ebbTree;
-  SMESH_NodeSearcherImpl* _nodeSearcher;
-  SMDSAbs_ElementType     _elementType;
-
-  SMESH_ElementSearcherImpl( SMESHDS_Mesh& mesh ): _mesh(&mesh),_ebbTree(0),_nodeSearcher(0) {}
+  SMESHDS_Mesh*                _mesh;
+  ElementBndBoxTree*           _ebbTree;
+  SMESH_NodeSearcherImpl*      _nodeSearcher;
+  SMDSAbs_ElementType          _elementType;
+  double                       _tolerance;
+  bool                         _outerFacesFound;
+  set<const SMDS_MeshElement*> _outerFaces; // empty means "no internal faces at all"
+
+  SMESH_ElementSearcherImpl( SMESHDS_Mesh& mesh )
+    : _mesh(&mesh),_ebbTree(0),_nodeSearcher(0), _tolerance(-1), _outerFacesFound(false) {}
   ~SMESH_ElementSearcherImpl()
   {
     if ( _ebbTree )      delete _ebbTree;      _ebbTree      = 0;
     if ( _nodeSearcher ) delete _nodeSearcher; _nodeSearcher = 0;
   }
+  virtual int FindElementsByPoint(const gp_Pnt&                      point,
+                                  SMDSAbs_ElementType                type,
+                                  vector< const SMDS_MeshElement* >& foundElements);
+  virtual TopAbs_State GetPointState(const gp_Pnt& point);
 
-  /*!
-   * \brief Return elements of given type where the given point is IN or ON.
-   *
-   * 'ALL' type means elements of any type excluding nodes and 0D elements
-   */
-  void FindElementsByPoint(const gp_Pnt&                      point,
-                           SMDSAbs_ElementType                type,
-                           vector< const SMDS_MeshElement* >& foundElements)
+  double getTolerance();
+  bool getIntersParamOnLine(const gp_Lin& line, const SMDS_MeshElement* face,
+                            const double tolerance, double & param);
+  void findOuterBoundary(const SMDS_MeshElement* anyOuterFace);
+  bool isOuterBoundary(const SMDS_MeshElement* face) const
+  {
+    return _outerFaces.empty() || _outerFaces.count(face);
+  }
+  struct TInters //!< data of intersection of the line and the mesh face used in GetPointState()
+  {
+    const SMDS_MeshElement* _face;
+    gp_Vec                  _faceNorm;
+    bool                    _coincides; //!< the line lays in face plane
+    TInters(const SMDS_MeshElement* face, const gp_Vec& faceNorm, bool coinc=false)
+      : _face(face), _faceNorm( faceNorm ), _coincides( coinc ) {}
+  };
+  struct TFaceLink //!< link and faces sharing it (used in findOuterBoundary())
   {
-    foundElements.clear();
+    SMESH_TLink      _link;
+    TIDSortedElemSet _faces;
+    TFaceLink( const SMDS_MeshNode* n1, const SMDS_MeshNode* n2, const SMDS_MeshElement* face)
+      : _link( n1, n2 ), _faces( &face, &face + 1) {}
+  };
+};
+
+ostream& operator<< (ostream& out, const SMESH_ElementSearcherImpl::TInters& i)
+{
+  return out << "TInters(face=" << ( i._face ? i._face->GetID() : 0)
+             << ", _coincides="<<i._coincides << ")";
+}
+
+//=======================================================================
+/*!
+ * \brief define tolerance for search
+ */
+//=======================================================================
 
+double SMESH_ElementSearcherImpl::getTolerance()
+{
+  if ( _tolerance < 0 )
+  {
     const SMDS_MeshInfo& meshInfo = _mesh->GetMeshInfo();
 
-    // -----------------
-    // define tolerance
-    // -----------------
-    double tolerance = 0;
+    _tolerance = 0;
     if ( _nodeSearcher && meshInfo.NbNodes() > 1 )
     {
       double boxSize = _nodeSearcher->getTree()->maxSize();
-      tolerance = 1e-8 * boxSize/* / meshInfo.NbNodes()*/;
+      _tolerance = 1e-8 * boxSize/* / meshInfo.NbNodes()*/;
     }
     else if ( _ebbTree && meshInfo.NbElements() > 0 )
     {
       double boxSize = _ebbTree->maxSize();
-      tolerance = 1e-8 * boxSize/* / meshInfo.NbElements()*/;
+      _tolerance = 1e-8 * boxSize/* / meshInfo.NbElements()*/;
     }
-    if ( tolerance == 0 )
+    if ( _tolerance == 0 )
     {
       // define tolerance by size of a most complex element
       int complexType = SMDSAbs_Volume;
       while ( complexType > SMDSAbs_All &&
               meshInfo.NbElements( SMDSAbs_ElementType( complexType )) < 1 )
         --complexType;
-      if ( complexType == SMDSAbs_All ) return; // empty mesh
+      if ( complexType == SMDSAbs_All ) return 0; // empty mesh
 
       double elemSize;
       if ( complexType == int( SMDSAbs_Node ))
@@ -5485,63 +6338,445 @@ struct SMESH_ElementSearcherImpl: public SMESH_ElementSearcher
         SMDS_NodeIteratorPtr nodeIt = _mesh->nodesIterator();
         elemSize = 1;
         if ( meshInfo.NbNodes() > 2 )
-          elemSize = TNodeXYZ( nodeIt->next() ).Distance( nodeIt->next() );
+          elemSize = SMESH_MeshEditor::TNodeXYZ( nodeIt->next() ).Distance( nodeIt->next() );
       }
       else
       {
         const SMDS_MeshElement* elem =
           _mesh->elementsIterator( SMDSAbs_ElementType( complexType ))->next();
         SMDS_ElemIteratorPtr nodeIt = elem->nodesIterator();
-        TNodeXYZ n1( cast2Node( nodeIt->next() ));
+        SMESH_MeshEditor::TNodeXYZ n1( cast2Node( nodeIt->next() ));
         while ( nodeIt->more() )
         {
           double dist = n1.Distance( cast2Node( nodeIt->next() ));
           elemSize = max( dist, elemSize );
         }
       }
-      tolerance = 1e-6 * elemSize;
+      _tolerance = 1e-6 * elemSize;
     }
+  }
+  return _tolerance;
+}
+
+//================================================================================
+/*!
+ * \brief Find intersection of the line and an edge of face and return parameter on line
+ */
+//================================================================================
 
-    // =================================================================================
-    if ( type == SMDSAbs_Node || type == SMDSAbs_0DElement )
+bool SMESH_ElementSearcherImpl::getIntersParamOnLine(const gp_Lin&           line,
+                                                     const SMDS_MeshElement* face,
+                                                     const double            tol,
+                                                     double &                param)
+{
+  int nbInts = 0;
+  param = 0;
+
+  GeomAPI_ExtremaCurveCurve anExtCC;
+  Handle(Geom_Curve) lineCurve = new Geom_Line( line );
+  
+  int nbNodes = face->IsQuadratic() ? face->NbNodes()/2 : face->NbNodes();
+  for ( int i = 0; i < nbNodes && nbInts < 2; ++i )
+  {
+    GC_MakeSegment edge( SMESH_MeshEditor::TNodeXYZ( face->GetNode( i )),
+                         SMESH_MeshEditor::TNodeXYZ( face->GetNode( (i+1)%nbNodes) )); 
+    anExtCC.Init( lineCurve, edge);
+    if ( anExtCC.NbExtrema() > 0 && anExtCC.LowerDistance() <= tol)
     {
-      if ( !_nodeSearcher )
-        _nodeSearcher = new SMESH_NodeSearcherImpl( _mesh );
+      Quantity_Parameter pl, pe;
+      anExtCC.LowerDistanceParameters( pl, pe );
+      param += pl;
+      if ( ++nbInts == 2 )
+        break;
+    }
+  }
+  if ( nbInts > 0 ) param /= nbInts;
+  return nbInts > 0;
+}
+//================================================================================
+/*!
+ * \brief Find all faces belonging to the outer boundary of mesh
+ */
+//================================================================================
+
+void SMESH_ElementSearcherImpl::findOuterBoundary(const SMDS_MeshElement* outerFace)
+{
+  if ( _outerFacesFound ) return;
 
-      const SMDS_MeshNode* closeNode = _nodeSearcher->FindClosestTo( point );
-      if ( !closeNode ) return;
+  // Collect all outer faces by passing from one outer face to another via their links
+  // and BTW find out if there are internal faces at all.
 
-      if ( point.Distance( TNodeXYZ( closeNode )) > tolerance )
-        return; // to far from any node
+  // checked links and links where outer boundary meets internal one
+  set< SMESH_TLink > visitedLinks, seamLinks;
 
-      if ( type == SMDSAbs_Node )
+  // links to treat with already visited faces sharing them
+  list < TFaceLink > startLinks;
+
+  // load startLinks with the first outerFace
+  startLinks.push_back( TFaceLink( outerFace->GetNode(0), outerFace->GetNode(1), outerFace));
+  _outerFaces.insert( outerFace );
+
+  TIDSortedElemSet emptySet;
+  while ( !startLinks.empty() )
+  {
+    const SMESH_TLink& link  = startLinks.front()._link;
+    TIDSortedElemSet&  faces = startLinks.front()._faces;
+
+    outerFace = *faces.begin();
+    // find other faces sharing the link
+    const SMDS_MeshElement* f;
+    while (( f = SMESH_MeshEditor::FindFaceInSet(link.node1(), link.node2(), emptySet, faces )))
+      faces.insert( f );
+
+    // select another outer face among the found 
+    const SMDS_MeshElement* outerFace2 = 0;
+    if ( faces.size() == 2 )
+    {
+      outerFace2 = (outerFace == *faces.begin() ? *faces.rbegin() : *faces.begin());
+    }
+    else if ( faces.size() > 2 )
+    {
+      seamLinks.insert( link );
+
+      // link direction within the outerFace
+      gp_Vec n1n2( SMESH_MeshEditor::TNodeXYZ( link.node1()),
+                   SMESH_MeshEditor::TNodeXYZ( link.node2()));
+      int i1 = outerFace->GetNodeIndex( link.node1() );
+      int i2 = outerFace->GetNodeIndex( link.node2() );
+      bool rev = ( abs(i2-i1) == 1 ? i1 > i2 : i2 > i1 );
+      if ( rev ) n1n2.Reverse();
+      // outerFace normal
+      gp_XYZ ofNorm, fNorm;
+      if ( SMESH_Algo::FaceNormal( outerFace, ofNorm, /*normalized=*/false ))
       {
-        foundElements.push_back( closeNode );
+        // direction from the link inside outerFace
+        gp_Vec dirInOF = gp_Vec( ofNorm ) ^ n1n2;
+        // sort all other faces by angle with the dirInOF
+        map< double, const SMDS_MeshElement* > angle2Face;
+        set< const SMDS_MeshElement*, TIDCompare >::const_iterator face = faces.begin();
+        for ( ; face != faces.end(); ++face )
+        {
+          if ( !SMESH_Algo::FaceNormal( *face, fNorm, /*normalized=*/false ))
+            continue;
+          gp_Vec dirInF = gp_Vec( fNorm ) ^ n1n2;
+          double angle = dirInOF.AngleWithRef( dirInF, n1n2 );
+          if ( angle < 0 ) angle += 2*PI;
+          angle2Face.insert( make_pair( angle, *face ));
+        }
+        if ( !angle2Face.empty() )
+          outerFace2 = angle2Face.begin()->second;
       }
-      else
+    }
+    // store the found outer face and add its links to continue seaching from
+    if ( outerFace2 )
+    {
+      _outerFaces.insert( outerFace );
+      int nbNodes = outerFace2->NbNodes()/( outerFace2->IsQuadratic() ? 2 : 1 );
+      for ( int i = 0; i < nbNodes; ++i )
       {
-        SMDS_ElemIteratorPtr elemIt = closeNode->GetInverseElementIterator( SMDSAbs_0DElement );
-        while ( elemIt->more() )
-          foundElements.push_back( elemIt->next() );
+        SMESH_TLink link2( outerFace2->GetNode(i), outerFace2->GetNode((i+1)%nbNodes));
+        if ( visitedLinks.insert( link2 ).second )
+          startLinks.push_back( TFaceLink( link2.node1(), link2.node2(), outerFace2 ));
       }
     }
-    // =================================================================================
-    else // elements more complex than 0D
+    startLinks.pop_front();
+  }
+  _outerFacesFound = true;
+
+  if ( !seamLinks.empty() )
+  {
+    // There are internal boundaries touching the outher one,
+    // find all faces of internal boundaries in order to find
+    // faces of boundaries of holes, if any.
+    
+  }
+  else
+  {
+    _outerFaces.clear();
+  }
+}
+
+//=======================================================================
+/*!
+ * \brief Find elements of given type where the given point is IN or ON.
+ *        Returns nb of found elements and elements them-selves.
+ *
+ * 'ALL' type means elements of any type excluding nodes and 0D elements
+ */
+//=======================================================================
+
+int SMESH_ElementSearcherImpl::
+FindElementsByPoint(const gp_Pnt&                      point,
+                    SMDSAbs_ElementType                type,
+                    vector< const SMDS_MeshElement* >& foundElements)
+{
+  foundElements.clear();
+
+  double tolerance = getTolerance();
+
+  // =================================================================================
+  if ( type == SMDSAbs_Node || type == SMDSAbs_0DElement )
+  {
+    if ( !_nodeSearcher )
+      _nodeSearcher = new SMESH_NodeSearcherImpl( _mesh );
+
+    const SMDS_MeshNode* closeNode = _nodeSearcher->FindClosestTo( point );
+    if ( !closeNode ) return foundElements.size();
+
+    if ( point.Distance( SMESH_MeshEditor::TNodeXYZ( closeNode )) > tolerance )
+      return foundElements.size(); // to far from any node
+
+    if ( type == SMDSAbs_Node )
+    {
+      foundElements.push_back( closeNode );
+    }
+    else
+    {
+      SMDS_ElemIteratorPtr elemIt = closeNode->GetInverseElementIterator( SMDSAbs_0DElement );
+      while ( elemIt->more() )
+        foundElements.push_back( elemIt->next() );
+    }
+  }
+  // =================================================================================
+  else // elements more complex than 0D
+  {
+    if ( !_ebbTree || _elementType != type )
+    {
+      if ( _ebbTree ) delete _ebbTree;
+      _ebbTree = new ElementBndBoxTree( *_mesh, _elementType = type );
+    }
+    TIDSortedElemSet suspectElems;
+    _ebbTree->getElementsNearPoint( point, suspectElems );
+    TIDSortedElemSet::iterator elem = suspectElems.begin();
+    for ( ; elem != suspectElems.end(); ++elem )
+      if ( !SMESH_MeshEditor::isOut( *elem, point, tolerance ))
+        foundElements.push_back( *elem );
+  }
+  return foundElements.size();
+}
+
+//================================================================================
+/*!
+ * \brief Classify the given point in the closed 2D mesh
+ */
+//================================================================================
+
+TopAbs_State SMESH_ElementSearcherImpl::GetPointState(const gp_Pnt& point)
+{
+  double tolerance = getTolerance();
+  if ( !_ebbTree || _elementType != SMDSAbs_Face )
+  {
+    if ( _ebbTree ) delete _ebbTree;
+    _ebbTree = new ElementBndBoxTree( *_mesh, _elementType = SMDSAbs_Face );
+  }
+  // Algo: analyse transition of a line starting at the point through mesh boundary;
+  // try three lines parallel to axis of the coordinate system and perform rough
+  // analysis. If solution is not clear perform thorough analysis.
+
+  const int nbAxes = 3;
+  gp_Dir axisDir[ nbAxes ] = { gp::DX(), gp::DY(), gp::DZ() };
+  map< double, TInters >   paramOnLine2TInters[ nbAxes ];
+  list< TInters > tangentInters[ nbAxes ]; // of faces whose plane includes the line
+  multimap< int, int > nbInt2Axis; // to find the simplest case
+  for ( int axis = 0; axis < nbAxes; ++axis )
+  {
+    gp_Ax1 lineAxis( point, axisDir[axis]);
+    gp_Lin line    ( lineAxis );
+
+    TIDSortedElemSet suspectFaces; // faces possibly intersecting the line
+    _ebbTree->getElementsNearLine( lineAxis, suspectFaces );
+
+    // Intersect faces with the line
+
+    map< double, TInters > & u2inters = paramOnLine2TInters[ axis ];
+    TIDSortedElemSet::iterator face = suspectFaces.begin();
+    for ( ; face != suspectFaces.end(); ++face )
     {
-      if ( !_ebbTree || _elementType != type )
+      // get face plane
+      gp_XYZ fNorm;
+      if ( !SMESH_Algo::FaceNormal( *face, fNorm, /*normalized=*/false)) continue;
+      gp_Pln facePlane( SMESH_MeshEditor::TNodeXYZ( (*face)->GetNode(0)), fNorm );
+
+      // perform intersection
+      IntAna_IntConicQuad intersection( line, IntAna_Quadric( facePlane ));
+      if ( !intersection.IsDone() )
+        continue;
+      if ( intersection.IsInQuadric() )
+      {
+        tangentInters[ axis ].push_back( TInters( *face, fNorm, true ));
+      }
+      else if ( ! intersection.IsParallel() && intersection.NbPoints() > 0 )
       {
-        if ( _ebbTree ) delete _ebbTree;
-        _ebbTree = new ElementBndBoxTree( *_mesh, _elementType = type );
+        gp_Pnt intersectionPoint = intersection.Point(1);
+        if ( !SMESH_MeshEditor::isOut( *face, intersectionPoint, tolerance ))
+          u2inters.insert(make_pair( intersection.ParamOnConic(1), TInters( *face, fNorm )));
       }
-      TIDSortedElemSet suspectElems;
-      _ebbTree->getElementsNearPoint( point, suspectElems );
-      TIDSortedElemSet::iterator elem = suspectElems.begin();
-      for ( ; elem != suspectElems.end(); ++elem )
-        if ( !SMESH_MeshEditor::isOut( *elem, point, tolerance ))
-          foundElements.push_back( *elem );
     }
-  }
-}; // struct SMESH_ElementSearcherImpl
+    // Analyse intersections roughly
+
+    int nbInter = u2inters.size();
+    if ( nbInter == 0 )
+      return TopAbs_OUT; 
+
+    double f = u2inters.begin()->first, l = u2inters.rbegin()->first;
+    if ( nbInter == 1 ) // not closed mesh
+      return fabs( f ) < tolerance ? TopAbs_ON : TopAbs_UNKNOWN;
+
+    if ( fabs( f ) < tolerance || fabs( l ) < tolerance )
+      return TopAbs_ON;
+
+    if ( (f<0) == (l<0) )
+      return TopAbs_OUT;
+
+    int nbIntBeforePoint = std::distance( u2inters.begin(), u2inters.lower_bound(0));
+    int nbIntAfterPoint  = nbInter - nbIntBeforePoint;
+    if ( nbIntBeforePoint == 1 || nbIntAfterPoint == 1 )
+      return TopAbs_IN;
+
+    nbInt2Axis.insert( make_pair( min( nbIntBeforePoint, nbIntAfterPoint ), axis ));
+
+    if ( _outerFacesFound ) break; // pass to thorough analysis
+
+  } // three attempts - loop on CS axes
+
+  // Analyse intersections thoroughly.
+  // We make two loops maximum, on the first one we only exclude touching intersections,
+  // on the second, if situation is still unclear, we gather and use information on
+  // position of faces (internal or outer). If faces position is already gathered,
+  // we make the second loop right away.
+
+  for ( int hasPositionInfo = _outerFacesFound; hasPositionInfo < 2; ++hasPositionInfo )
+  {
+    multimap< int, int >::const_iterator nb_axis = nbInt2Axis.begin();
+    for ( ; nb_axis != nbInt2Axis.end(); ++nb_axis )
+    {
+      int axis = nb_axis->second;
+      map< double, TInters > & u2inters = paramOnLine2TInters[ axis ];
+
+      gp_Ax1 lineAxis( point, axisDir[axis]);
+      gp_Lin line    ( lineAxis );
+
+      // add tangent intersections to u2inters
+      double param;
+      list< TInters >::const_iterator tgtInt = tangentInters[ axis ].begin();
+      for ( ; tgtInt != tangentInters[ axis ].end(); ++tgtInt )
+        if ( getIntersParamOnLine( line, tgtInt->_face, tolerance, param ))
+          u2inters.insert(make_pair( param, *tgtInt ));
+      tangentInters[ axis ].clear();
+
+      // Count intersections before and after the point excluding touching ones.
+      // If hasPositionInfo we count intersections of outer boundary only
+
+      int nbIntBeforePoint = 0, nbIntAfterPoint = 0;
+      double f = numeric_limits<double>::max(), l = -numeric_limits<double>::max();
+      map< double, TInters >::iterator u_int1 = u2inters.begin(), u_int2 = u_int1;
+      bool ok = ! u_int1->second._coincides;
+      while ( ok && u_int1 != u2inters.end() )
+      {
+        double u = u_int1->first;
+        bool touchingInt = false;
+        if ( ++u_int2 != u2inters.end() )
+        {
+          // skip intersections at the same point (if the line passes through edge or node)
+          int nbSamePnt = 0;
+          while ( u_int2 != u2inters.end() && fabs( u_int2->first - u ) < tolerance )
+          {
+            ++nbSamePnt;
+            ++u_int2;
+          }
+
+          // skip tangent intersections
+          int nbTgt = 0;
+          const SMDS_MeshElement* prevFace = u_int1->second._face;
+          while ( ok && u_int2->second._coincides )
+          {
+            if ( SMESH_Algo::GetCommonNodes(prevFace , u_int2->second._face).empty() )
+              ok = false;
+            else
+            {
+              nbTgt++;
+              u_int2++;
+              ok = ( u_int2 != u2inters.end() );
+            }
+          }
+          if ( !ok ) break;
+
+          // skip intersections at the same point after tangent intersections
+          if ( nbTgt > 0 )
+          {
+            double u2 = u_int2->first;
+            ++u_int2;
+            while ( u_int2 != u2inters.end() && fabs( u_int2->first - u2 ) < tolerance )
+            {
+              ++nbSamePnt;
+              ++u_int2;
+            }
+          }
+          // decide if we skipped a touching intersection
+          if ( nbSamePnt + nbTgt > 0 )
+          {
+            double minDot = numeric_limits<double>::max(), maxDot = -numeric_limits<double>::max();
+            map< double, TInters >::iterator u_int = u_int1;
+            for ( ; u_int != u_int2; ++u_int )
+            {
+              if ( u_int->second._coincides ) continue;
+              double dot = u_int->second._faceNorm * line.Direction();
+              if ( dot > maxDot ) maxDot = dot;
+              if ( dot < minDot ) minDot = dot;
+            }
+            touchingInt = ( minDot*maxDot < 0 );
+          }
+        }
+        if ( !touchingInt )
+        {
+          if ( !hasPositionInfo || isOuterBoundary( u_int1->second._face ))
+          {
+            if ( u < 0 )
+              ++nbIntBeforePoint;
+            else
+              ++nbIntAfterPoint;
+          }
+          if ( u < f ) f = u;
+          if ( u > l ) l = u;
+        }
+
+        u_int1 = u_int2; // to next intersection
+
+      } // loop on intersections with one line
+
+      if ( ok )
+      {
+        if ( fabs( f ) < tolerance || fabs( l ) < tolerance )
+          return TopAbs_ON;
+
+        if ( nbIntBeforePoint == 0  || nbIntAfterPoint == 0)
+          return TopAbs_OUT; 
+
+        if ( nbIntBeforePoint + nbIntAfterPoint == 1 ) // not closed mesh
+          return fabs( f ) < tolerance ? TopAbs_ON : TopAbs_UNKNOWN;
+
+        if ( nbIntBeforePoint == 1 || nbIntAfterPoint == 1 )
+          return TopAbs_IN;
+
+        if ( (f<0) == (l<0) )
+          return TopAbs_OUT;
+
+        if ( hasPositionInfo )
+          return nbIntBeforePoint % 2 ? TopAbs_IN : TopAbs_OUT;
+      }
+    } // loop on intersections of the tree lines - thorough analysis
+
+    if ( !hasPositionInfo )
+    {
+      // gather info on faces position - is face in the outer boundary or not
+      map< double, TInters > & u2inters = paramOnLine2TInters[ 0 ];
+      findOuterBoundary( u2inters.begin()->second._face );
+    }
+
+  } // two attempts - with and w/o faces position info in the mesh
+
+  return TopAbs_UNKNOWN;
+}
 
 //=======================================================================
 /*!
@@ -5581,75 +6816,125 @@ bool SMESH_MeshEditor::isOut( const SMDS_MeshElement* element, const gp_Pnt& poi
   while ( nodeIt->more() )
     xyz.push_back( TNodeXYZ( cast2Node( nodeIt->next() )));
 
+  int i, nbNodes = element->NbNodes();
+
   if ( element->GetType() == SMDSAbs_Face ) // --------------------------------------------------
   {
-    // gravity center
-    gp_XYZ gc(0,0,0);
-    gc = accumulate( xyz.begin(), xyz.end(), gc );
-    gc /= element->NbNodes();
-
-    // compute face normal using gc
-    gp_Vec normal(0,0,0);
+    // compute face normal
+    gp_Vec faceNorm(0,0,0);
     xyz.push_back( xyz.front() );
-    for ( int i = 0; i < element->NbNodes(); ++i )
+    for ( i = 0; i < nbNodes; ++i )
     {
-      gp_Vec edge( xyz[i], xyz[i+1]);
-      gp_Vec n2gc( xyz[i], gc );
-      normal += edge ^ n2gc;
+      gp_Vec edge1( xyz[i+1], xyz[i]);
+      gp_Vec edge2( xyz[i+1], xyz[(i+2)%nbNodes] );
+      faceNorm += edge1 ^ edge2;
+    }
+    double normSize = faceNorm.Magnitude();
+    if ( normSize <= tol )
+    {
+      // degenerated face: point is out if it is out of all face edges
+      for ( i = 0; i < nbNodes; ++i )
+      {
+        SMDS_MeshNode n1( xyz[i].X(),   xyz[i].Y(),   xyz[i].Z() );
+        SMDS_MeshNode n2( xyz[i+1].X(), xyz[i+1].Y(), xyz[i+1].Z() );
+        SMDS_LinearEdge edge( &n1, &n2 );
+        if ( !isOut( &edge, point, tol ))
+          return false;
+      }
+      return true;
     }
-    double faceDoubleArea = normal.Magnitude();
-    if ( faceDoubleArea <= numeric_limits<double>::min() )
-      return true; // invalid face
-    normal /= faceDoubleArea;
+    faceNorm /= normSize;
 
     // check if the point lays on face plane
     gp_Vec n2p( xyz[0], point );
-    if ( fabs( n2p * normal ) > tol )
+    if ( fabs( n2p * faceNorm ) > tol )
       return true; // not on face plane
 
-    // check if point is out of face boundary
-    int i, out = false;
-    for ( i = 0; !out && i < element->NbNodes(); ++i )
+    // check if point is out of face boundary:
+    // define it by closest transition of a ray point->infinity through face boundary
+    // on the face plane.
+    // First, find normal of a plane perpendicular to face plane, to be used as a cutting tool
+    // to find intersections of the ray with the boundary.
+    gp_Vec ray = n2p;
+    gp_Vec plnNorm = ray ^ faceNorm;
+    normSize = plnNorm.Magnitude();
+    if ( normSize <= tol ) return false; // point coincides with the first node
+    plnNorm /= normSize;
+    // for each node of the face, compute its signed distance to the plane
+    vector<double> dist( nbNodes + 1);
+    for ( i = 0; i < nbNodes; ++i )
     {
-      gp_Vec edge( xyz[i], xyz[i+1]);
-      gp_Vec n2p ( xyz[i], point );
-      gp_Vec cross = edge ^ n2p;
-      out = ( cross * normal < -tol );
-    }
-    if ( out && element->IsPoly() )
+      gp_Vec n2p( xyz[i], point );
+      dist[i] = n2p * plnNorm;
+    }
+    dist.back() = dist.front();
+    // find the closest intersection
+    int    iClosest = -1;
+    double rClosest, distClosest = 1e100;;
+    gp_Pnt pClosest;
+    for ( i = 0; i < nbNodes; ++i )
     {
-      // define point position by the closest edge
-      double minDist = numeric_limits<double>::max();
-      int iMinDist;
-      for ( i = 0; i < element->NbNodes(); ++i )
+      double r;
+      if ( fabs( dist[i]) < tol )
+        r = 0.;
+      else if ( fabs( dist[i+1]) < tol )
+        r = 1.;
+      else if ( dist[i] * dist[i+1] < 0 )
+        r = dist[i] / ( dist[i] - dist[i+1] );
+      else
+        continue; // no intersection
+      gp_Pnt pInt = xyz[i] * (1.-r) + xyz[i+1] * r;
+      gp_Vec p2int ( point, pInt);
+      if ( p2int * ray > -tol ) // right half-space
       {
-        gp_Vec edge( xyz[i], xyz[i+1]);
-        gp_Vec n1p ( xyz[i], point);
-        double dist = ( edge ^ n1p ).Magnitude() / edge.Magnitude();
-        if ( dist < minDist )
-          iMinDist = i;
+        double intDist = p2int.SquareMagnitude();
+        if ( intDist < distClosest )
+        {
+          iClosest = i;
+          rClosest = r;
+          pClosest = pInt;
+          distClosest = intDist;
+        }
       }
-      gp_Vec edge( xyz[iMinDist], xyz[iMinDist+1]);
-      gp_Vec n2p ( xyz[iMinDist], point );
-      gp_Vec cross = edge ^ n2p;
-      out = ( cross * normal < -tol );
     }
-    return out;
+    if ( iClosest < 0 )
+      return true; // no intesections - out
+
+    // analyse transition
+    gp_Vec edge( xyz[iClosest], xyz[iClosest+1] );
+    gp_Vec edgeNorm = -( edge ^ faceNorm ); // normal to intersected edge pointing out of face
+    gp_Vec p2int ( point, pClosest );
+    bool out = (edgeNorm * p2int) < -tol;
+    if ( rClosest > 0. && rClosest < 1. ) // not node intersection
+      return out;
+
+    // ray pass through a face node; analyze transition through an adjacent edge
+    gp_Pnt p1 = xyz[ (rClosest == 0.) ? ((iClosest+nbNodes-1) % nbNodes) : (iClosest+1) ];
+    gp_Pnt p2 = xyz[ (rClosest == 0.) ? iClosest : ((iClosest+2) % nbNodes) ];
+    gp_Vec edgeAdjacent( p1, p2 );
+    gp_Vec edgeNorm2 = -( edgeAdjacent ^ faceNorm );
+    bool out2 = (edgeNorm2 * p2int) < -tol;
+
+    bool covexCorner = ( edgeNorm * edgeAdjacent * (rClosest==1. ? 1. : -1.)) < 0;
+    return covexCorner ? (out || out2) : (out && out2);
   }
   if ( element->GetType() == SMDSAbs_Edge ) // --------------------------------------------------
   {
-    for ( int i = 1; i < element->NbNodes(); ++i )
+    // point is out of edge if it is NOT ON any straight part of edge
+    // (we consider quadratic edge as being composed of two straight parts)
+    for ( i = 1; i < nbNodes; ++i )
     {
       gp_Vec edge( xyz[i-1], xyz[i]);
       gp_Vec n1p ( xyz[i-1], point);
       double dist = ( edge ^ n1p ).Magnitude() / edge.Magnitude();
       if ( dist > tol )
-        return true;
+        continue;
       gp_Vec n2p( xyz[i], point );
       if ( fabs( edge.Magnitude() - n1p.Magnitude() - n2p.Magnitude()) > tol )
-        return true;
+        continue;
+      return false; // point is ON this part
     }
-    return false;
+    return true;
   }
   // Node or 0D element -------------------------------------------------------------------------
   {
@@ -6447,83 +7732,65 @@ void SMESH_MeshEditor::MergeEqualElements()
 //purpose  : Return a face having linked nodes n1 and n2 and which is
 //           - not in avoidSet,
 //           - in elemSet provided that !elemSet.empty()
+//           i1 and i2 optionally returns indices of n1 and n2
 //=======================================================================
 
 const SMDS_MeshElement*
 SMESH_MeshEditor::FindFaceInSet(const SMDS_MeshNode*    n1,
                                 const SMDS_MeshNode*    n2,
                                 const TIDSortedElemSet& elemSet,
-                                const TIDSortedElemSet& avoidSet)
+                                const TIDSortedElemSet& avoidSet,
+                                int*                    n1ind,
+                                int*                    n2ind)
 
 {
+  int i1, i2;
+  const SMDS_MeshElement* face = 0;
+
   SMDS_ElemIteratorPtr invElemIt = n1->GetInverseElementIterator(SMDSAbs_Face);
-  while ( invElemIt->more() ) { // loop on inverse elements of n1
+  while ( invElemIt->more() && !face ) // loop on inverse faces of n1
+  {
     const SMDS_MeshElement* elem = invElemIt->next();
-    if (avoidSet.find( elem ) != avoidSet.end() )
+    if (avoidSet.count( elem ))
       continue;
-    if ( !elemSet.empty() && elemSet.find( elem ) == elemSet.end())
+    if ( !elemSet.empty() && !elemSet.count( elem ))
       continue;
-    // get face nodes and find index of n1
-    int i1, nbN = elem->NbNodes(), iNode = 0;
-    //const SMDS_MeshNode* faceNodes[ nbN ], *n;
-    vector<const SMDS_MeshNode*> faceNodes( nbN );
-    const SMDS_MeshNode* n;
-    SMDS_ElemIteratorPtr nIt = elem->nodesIterator();
-    while ( nIt->more() ) {
-      faceNodes[ iNode ] = static_cast<const SMDS_MeshNode*>( nIt->next() );
-      if ( faceNodes[ iNode++ ] == n1 )
-        i1 = iNode - 1;
-    }
+    // index of n1
+    i1 = elem->GetNodeIndex( n1 );
     // find a n2 linked to n1
-    if(!elem->IsQuadratic()) {
-      for ( iNode = 0; iNode < 2; iNode++ ) {
-        if ( iNode ) // node before n1
-          n = faceNodes[ i1 == 0 ? nbN - 1 : i1 - 1 ];
-        else         // node after n1
-          n = faceNodes[ i1 + 1 == nbN ? 0 : i1 + 1 ];
-        if ( n == n2 )
-          return elem;
-      }
-    }
-    else { // analysis for quadratic elements
-      bool IsFind = false;
-      // check using only corner nodes
-      for ( iNode = 0; iNode < 2; iNode++ ) {
-        if ( iNode ) // node before n1
-          n = faceNodes[ i1 == 0 ? nbN/2 - 1 : i1 - 1 ];
-        else         // node after n1
-          n = faceNodes[ i1 + 1 == nbN/2 ? 0 : i1 + 1 ];
-        if ( n == n2 )
-          IsFind = true;
-      }
-      if(IsFind) {
-        return elem;
-      }
-      else {
-        // check using all nodes
-        const SMDS_QuadraticFaceOfNodes* F =
-          static_cast<const SMDS_QuadraticFaceOfNodes*>(elem);
-        // use special nodes iterator
-        iNode = 0;
-        SMDS_NodeIteratorPtr anIter = F->interlacedNodesIterator();
-        while ( anIter->more() ) {
-          faceNodes[iNode] = static_cast<const SMDS_MeshNode*>(anIter->next());
-          if ( faceNodes[ iNode++ ] == n1 )
-            i1 = iNode - 1;
-        }
-        for ( iNode = 0; iNode < 2; iNode++ ) {
-          if ( iNode ) // node before n1
-            n = faceNodes[ i1 == 0 ? nbN - 1 : i1 - 1 ];
-          else         // node after n1
-            n = faceNodes[ i1 + 1 == nbN ? 0 : i1 + 1 ];
-          if ( n == n2 ) {
-            return elem;
-          }
+    int nbN = elem->IsQuadratic() ? elem->NbNodes()/2 : elem->NbNodes();
+    for ( int di = -1; di < 2 && !face; di += 2 )
+    {
+      i2 = (i1+di+nbN) % nbN;
+      if ( elem->GetNode( i2 ) == n2 )
+        face = elem;
+    }
+    if ( !face && elem->IsQuadratic())
+    {
+      // analysis for quadratic elements using all nodes
+      const SMDS_QuadraticFaceOfNodes* F =
+        static_cast<const SMDS_QuadraticFaceOfNodes*>(elem);
+      // use special nodes iterator
+      SMDS_NodeIteratorPtr anIter = F->interlacedNodesIterator();
+      const SMDS_MeshNode* prevN = cast2Node( anIter->next() );
+      for ( i1 = -1, i2 = 0; anIter->more() && !face; i1++, i2++ )
+      {
+        const SMDS_MeshNode* n = cast2Node( anIter->next() );
+        if ( n1 == prevN && n2 == n )
+        {
+          face = elem;
+        }
+        else if ( n2 == prevN && n1 == n )
+        {
+          face = elem; swap( i1, i2 );
         }
+        prevN = n;
       }
-    } // end analysis for quadratic elements
+    }
   }
-  return 0;
+  if ( n1ind ) *n1ind = i1;
+  if ( n2ind ) *n2ind = i2;
+  return face;
 }
 
 //=======================================================================
@@ -8655,6 +9922,7 @@ SMESH_MeshEditor::FindMatchingNodes(set<const SMDS_MeshElement*>& theSide1,
   return SEW_OK;
 }
 
+//================================================================================
 /*!
   \brief Creates a hole in a mesh by doubling the nodes of some particular elements
   \param theElems - the list of elements (edges or faces) to be replicated
@@ -8664,6 +9932,8 @@ SMESH_MeshEditor::FindMatchingNodes(set<const SMDS_MeshElement*>& theSide1,
   replicated nodes should be associated to.
   \return TRUE if operation has been completed successfully, FALSE otherwise
 */
+//================================================================================
+
 bool SMESH_MeshEditor::DoubleNodes( const TIDSortedElemSet& theElems,
                                     const TIDSortedElemSet& theNodesNot,
                                     const TIDSortedElemSet& theAffectedElems )
@@ -8687,6 +9957,7 @@ bool SMESH_MeshEditor::DoubleNodes( const TIDSortedElemSet& theElems,
   return res;
 }
 
+//================================================================================
 /*!
   \brief Creates a hole in a mesh by doubling the nodes of some particular elements
   \param theMeshDS - mesh instance
@@ -8696,6 +9967,8 @@ bool SMESH_MeshEditor::DoubleNodes( const TIDSortedElemSet& theElems,
   \param theIsDoubleElem - flag os to replicate element or modify
   \return TRUE if operation has been completed successfully, FALSE otherwise
 */
+//================================================================================
+
 bool SMESH_MeshEditor::doubleNodes( SMESHDS_Mesh*     theMeshDS,
                                     const TIDSortedElemSet& theElems,
                                     const TIDSortedElemSet& theNodesNot,
@@ -8747,28 +10020,7 @@ bool SMESH_MeshEditor::doubleNodes( SMESHDS_Mesh*     theMeshDS,
   return res;
 }
 
-/*!
-  \brief Check if element located inside shape
-  \return TRUE if IN or ON shape, FALSE otherwise
-*/
-
-static bool isInside(const SMDS_MeshElement* theElem,
-                     BRepClass3d_SolidClassifier& theBsc3d,
-                     const double theTol)
-{
-  gp_XYZ centerXYZ (0, 0, 0);
-  SMDS_ElemIteratorPtr aNodeItr = theElem->nodesIterator();
-  while (aNodeItr->more())
-  {
-    SMDS_MeshNode* aNode = (SMDS_MeshNode*)aNodeItr->next();
-    centerXYZ += gp_XYZ(aNode->X(), aNode->Y(), aNode->Z());
-  }
-  gp_Pnt aPnt(centerXYZ);
-  theBsc3d.Perform(aPnt, theTol);
-  TopAbs_State aState = theBsc3d.State();
-  return (aState == TopAbs_IN || aState == TopAbs_ON );
-}
-
+//================================================================================
 /*!
   \brief Creates a hole in a mesh by doubling the nodes of some particular elements
   \param theNodes - identifiers of nodes to be doubled
@@ -8777,6 +10029,8 @@ static bool isInside(const SMDS_MeshElement* theElem,
          they not assigned to elements
   \return TRUE if operation has been completed successfully, FALSE otherwise
 */
+//================================================================================
+
 bool SMESH_MeshEditor::DoubleNodes( const std::list< int >& theListOfNodes, 
                                     const std::list< int >& theListOfModifiedElems )
 {
@@ -8858,15 +10112,77 @@ bool SMESH_MeshEditor::DoubleNodes( const std::list< int >& theListOfNodes,
   return true;
 }
 
+namespace {
+
+  //================================================================================
+  /*!
+  \brief Check if element located inside shape
+  \return TRUE if IN or ON shape, FALSE otherwise
+  */
+  //================================================================================
+
+  template<class Classifier>
+  bool isInside(const SMDS_MeshElement* theElem,
+                Classifier&             theClassifier,
+                const double            theTol)
+  {
+    gp_XYZ centerXYZ (0, 0, 0);
+    SMDS_ElemIteratorPtr aNodeItr = theElem->nodesIterator();
+    while (aNodeItr->more())
+      centerXYZ += SMESH_MeshEditor::TNodeXYZ(cast2Node( aNodeItr->next()));
+
+    gp_Pnt aPnt = centerXYZ / theElem->NbNodes();
+    theClassifier.Perform(aPnt, theTol);
+    TopAbs_State aState = theClassifier.State();
+    return (aState == TopAbs_IN || aState == TopAbs_ON );
+  }
+
+  //================================================================================
+  /*!
+   * \brief Classifier of the 3D point on the TopoDS_Face
+   *        with interaface suitable for isInside()
+   */
+  //================================================================================
+
+  struct _FaceClassifier
+  {
+    Extrema_ExtPS       _extremum;
+    BRepAdaptor_Surface _surface;
+    TopAbs_State        _state;
+
+    _FaceClassifier(const TopoDS_Face& face):_extremum(),_surface(face),_state(TopAbs_OUT)
+    {
+      _extremum.Initialize( _surface,
+                            _surface.FirstUParameter(), _surface.LastUParameter(),
+                            _surface.FirstVParameter(), _surface.LastVParameter(),
+                            _surface.Tolerance(), _surface.Tolerance() );
+    }
+    void Perform(const gp_Pnt& aPnt, double theTol)
+    {
+      _state = TopAbs_OUT;
+      _extremum.Perform(aPnt);
+      if ( _extremum.IsDone() )
+        for ( int iSol = 1; iSol <= _extremum.NbExt() && _state == TopAbs_OUT; ++iSol)
+          _state = ( _extremum.Value(iSol) <= theTol ? TopAbs_IN : TopAbs_OUT );
+    }
+    TopAbs_State State() const
+    {
+      return _state;
+    }
+  };
+}
+
+//================================================================================
 /*!
   \brief Creates a hole in a mesh by doubling the nodes of some particular elements
   \param theElems - group of of elements (edges or faces) to be replicated
-  \param theNodesNot - group of nodes not to replicated
+  \param theNodesNot - group of nodes not to replicate
   \param theShape - shape to detect affected elements (element which geometric center
   located on or inside shape).
   The replicated nodes should be associated to affected elements.
   \return TRUE if operation has been completed successfully, FALSE otherwise
 */
+//================================================================================
 
 bool SMESH_MeshEditor::DoubleNodesInRegion( const TIDSortedElemSet& theElems,
                                             const TIDSortedElemSet& theNodesNot,
@@ -8876,8 +10192,17 @@ bool SMESH_MeshEditor::DoubleNodesInRegion( const TIDSortedElemSet& theElems,
     return false;
 
   const double aTol = Precision::Confusion();
-  BRepClass3d_SolidClassifier bsc3d(theShape);
-  bsc3d.PerformInfinitePoint(aTol);
+  auto_ptr< BRepClass3d_SolidClassifier> bsc3d;
+  auto_ptr<_FaceClassifier>              aFaceClassifier;
+  if ( theShape.ShapeType() == TopAbs_SOLID )
+  {
+    bsc3d.reset( new BRepClass3d_SolidClassifier(theShape));;
+    bsc3d->PerformInfinitePoint(aTol);
+  }
+  else if (theShape.ShapeType() == TopAbs_FACE )
+  {
+    aFaceClassifier.reset( new _FaceClassifier(TopoDS::Face(theShape)));
+  }
 
   // iterates on indicated elements and get elements by back references from their nodes
   TIDSortedElemSet anAffected;
@@ -8891,15 +10216,17 @@ bool SMESH_MeshEditor::DoubleNodesInRegion( const TIDSortedElemSet& theElems,
     SMDS_ElemIteratorPtr nodeItr = anElem->nodesIterator();
     while ( nodeItr->more() )
     {
-      const SMDS_MeshNode* aNode = static_cast<const SMDS_MeshNode*>(nodeItr->next());
+      const SMDS_MeshNode* aNode = cast2Node(nodeItr->next());
       if ( !aNode || theNodesNot.find(aNode) != theNodesNot.end() )
         continue;
       SMDS_ElemIteratorPtr backElemItr = aNode->GetInverseElementIterator();
       while ( backElemItr->more() )
       {
-        SMDS_MeshElement* curElem = (SMDS_MeshElement*)backElemItr->next();
+        const SMDS_MeshElement* curElem = backElemItr->next();
         if ( curElem && theElems.find(curElem) == theElems.end() &&
-             isInside( curElem, bsc3d, aTol ) )
+             ( bsc3d.get() ?
+               isInside( curElem, *bsc3d, aTol ) :
+               isInside( curElem, *aFaceClassifier, aTol )))
           anAffected.insert( curElem );
       }
     }
@@ -8907,11 +10234,13 @@ bool SMESH_MeshEditor::DoubleNodesInRegion( const TIDSortedElemSet& theElems,
   return DoubleNodes( theElems, theNodesNot, anAffected );
 }
 
+//================================================================================
 /*!
  * \brief Generated skin mesh (containing 2D cells) from 3D mesh
  * The created 2D mesh elements based on nodes of free faces of boundary volumes
  * \return TRUE if operation has been completed successfully, FALSE otherwise
  */
+//================================================================================
 
 bool SMESH_MeshEditor::Make2DMeshFrom3D()
 {
@@ -8919,46 +10248,39 @@ bool SMESH_MeshEditor::Make2DMeshFrom3D()
   SMESHDS_Mesh* aMesh = GetMeshDS();
   if (!aMesh)
     return false;
-  bool res = false;
+  //bool res = false;
+  int nbFree = 0, nbExisted = 0, nbCreated = 0;
   SMDS_VolumeIteratorPtr vIt = aMesh->volumesIterator();
   while(vIt->more())
   {
     const SMDS_MeshVolume* volume = vIt->next();
     SMDS_VolumeTool vTool( volume );
+    vTool.SetExternalNormal();
     const bool isPoly = volume->IsPoly();
     const bool isQuad = volume->IsQuadratic();
     for ( int iface = 0, n = vTool.NbFaces(); iface < n; iface++ )
     {
       if (!vTool.IsFreeFace(iface))
         continue;
+      nbFree++;
       vector<const SMDS_MeshNode *> nodes;
       int nbFaceNodes = vTool.NbFaceNodes(iface);
       const SMDS_MeshNode** faceNodes = vTool.GetFaceNodes(iface);
-      if (vTool.IsFaceExternal(iface)) 
-      {
-        int inode = 0;
-        for ( ; inode < nbFaceNodes; inode += isQuad ? 2 : 1)
-          nodes.push_back(faceNodes[inode]);
-        if (isQuad)
-          for ( inode = 1; inode < nbFaceNodes; inode += 2)
-            nodes.push_back(faceNodes[inode]);
-      }
-      else
-      {
-        int inode = nbFaceNodes-1;
-        for ( ; inode >=0; inode -= isQuad ? 2 : 1)
+      int inode = 0;
+      for ( ; inode < nbFaceNodes; inode += isQuad ? 2 : 1)
+        nodes.push_back(faceNodes[inode]);
+      if (isQuad)
+        for ( inode = 1; inode < nbFaceNodes; inode += 2)
           nodes.push_back(faceNodes[inode]);
-        if (isQuad)
-          for ( inode = nbFaceNodes-2; inode >=0; inode -= 2)
-            nodes.push_back(faceNodes[inode]);
-      }
 
       // add new face based on volume nodes
-      if (aMesh->FindFace( nodes ) )
+      if (aMesh->FindFace( nodes ) ) {
+        nbExisted++;
         continue; // face already exsist
+      }
       myLastCreatedElems.Append( AddElement(nodes, SMDSAbs_Face, isPoly && iface == 1) );
-      res = true;
+      nbCreated++;
     }
   }
-  return res;
+  return ( nbFree==(nbExisted+nbCreated) );
 }
index fba5047737618407f82766e85a10a628bf6f502e..d9f4b5d28a737e19894bb570146b6c9f0cb7f594 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 // File      : SMESH_MeshEditor.hxx
 // Created   : Mon Apr 12 14:56:19 2004
@@ -36,6 +37,8 @@
 #include "SMESH_SequenceOfElemPtr.hxx"
 #include "SMESH_SequenceOfNode.hxx"
 
+#include <utilities.h>
+
 #include <TColStd_HSequenceOfReal.hxx>
 #include <gp_Dir.hxx>
 
@@ -74,7 +77,9 @@ struct SMESH_NodeSearcher
 
 //=======================================================================
 /*!
- * \brief Return elements of given type where the given point is IN or ON.
+ * \brief Find elements of given type where the given point is IN or ON.
+ *        Returns nb of found elements and elements them-selves.
+ *        Another task is to find out if the given point is out of closed 2D mesh.
  *
  * 'ALL' type means elements of any type excluding nodes and 0D elements
  */
@@ -82,9 +87,11 @@ struct SMESH_NodeSearcher
 
 struct SMESH_ElementSearcher
 {
-  virtual void FindElementsByPoint(const gp_Pnt&                           point,
-                                   SMDSAbs_ElementType                     type,
-                                   std::vector< const SMDS_MeshElement* >& foundElems)=0;
+  virtual int FindElementsByPoint(const gp_Pnt&                           point,
+                                  SMDSAbs_ElementType                     type,
+                                  std::vector< const SMDS_MeshElement* >& foundElems)=0;
+
+  virtual TopAbs_State GetPointState(const gp_Pnt& point) = 0;
 };
 
 //=======================================================================
@@ -105,49 +112,16 @@ struct SMESH_TLink: public NLink
 
 //=======================================================================
 /*!
- * auxiliary class
+ * \brief SMESH_TLink knowing its orientation
  */
 //=======================================================================
-class SMESH_MeshEditor_PathPoint {
-public:
-  SMESH_MeshEditor_PathPoint() {
-    myPnt.SetCoord(99., 99., 99.);
-    myTgt.SetCoord(1.,0.,0.);
-    myAngle=0.;
-    myPrm=0.;
-  }
-  void SetPnt(const gp_Pnt& aP3D){
-    myPnt=aP3D;
-  }
-  void SetTangent(const gp_Dir& aTgt){
-    myTgt=aTgt;
-  }
-  void SetAngle(const double& aBeta){
-    myAngle=aBeta;
-  }
-  void SetParameter(const double& aPrm){
-    myPrm=aPrm;
-  }
-  const gp_Pnt& Pnt()const{
-    return myPnt;
-  }
-  const gp_Dir& Tangent()const{
-    return myTgt;
-  }
-  double Angle()const{
-    return myAngle;
-  }
-  double Parameter()const{
-    return myPrm;
-  }
-
-protected:
-  gp_Pnt myPnt;
-  gp_Dir myTgt;
-  double myAngle;
-  double myPrm;
-};
 
+struct SMESH_OrientedLink: public SMESH_TLink
+{
+  bool _reversed;
+  SMESH_OrientedLink(const SMDS_MeshNode* n1, const SMDS_MeshNode* n2 )
+    : SMESH_TLink( n1, n2 ), _reversed( n1 != node1() ) {}
+};
 
 // ============================================================
 /*!
@@ -155,7 +129,28 @@ protected:
  */
 // ============================================================
 
-class SMESH_EXPORT SMESH_MeshEditor {
+class SMESH_EXPORT SMESH_MeshEditor
+{
+public:
+  //------------------------------------------
+  /*!
+   * \brief SMDS_MeshNode -> gp_XYZ convertor
+   */
+  //------------------------------------------
+  struct TNodeXYZ : public gp_XYZ
+  {
+    const SMDS_MeshNode* _node;
+    TNodeXYZ( const SMDS_MeshElement* e):gp_XYZ(0,0,0),_node(0) {
+      if (e) {
+        ASSERT( e->GetType() == SMDSAbs_Node );
+        _node = static_cast<const SMDS_MeshNode*>(e);
+        SetCoord( _node->X(), _node->Y(), _node->Z() );
+      }
+    }
+    double Distance(const SMDS_MeshNode* n)       const { return (TNodeXYZ( n )-*this).Modulus(); }
+    double SquareDistance(const SMDS_MeshNode* n) const { return (TNodeXYZ( n )-*this).SquareModulus(); }
+    bool operator==(const TNodeXYZ& other) const { return _node == other._node; }
+  };
 
 public:
 
@@ -242,6 +237,13 @@ public:
                  SMESH::Controls::NumericalFunctorPtr theCriterion);
 
 
+  enum SplitVolumToTetraFlags { HEXA_TO_5 = 1, HEXA_TO_6 = 2 };//!<arg of SplitVolumesIntoTetra()
+  /*!
+   * \brief Split volumic elements into tetrahedra.
+   */
+  void SplitVolumesIntoTetra (const TIDSortedElemSet & theElems, const int theMethodFlags);
+
+
   enum SmoothMethod { LAPLACIAN = 0, CENTROIDAL };
 
   void Smooth (TIDSortedElemSet &               theElements,
@@ -380,6 +382,23 @@ public:
   // Move or copy theElements applying theTrsf to their nodes
 
 
+  /*!
+   * Generate new elements by extrusion of theElements
+   * param theElems - list of elements for scale
+   * param thePoint - base point for scale
+   * param theScaleFact - scale factors for axises
+   * param theCopy - allows copying the translated elements
+   * param theMakeGroups - forces the generation of new groups from existing ones
+   * param theTargetMesh - the name of the newly created mesh
+   * return instance of Mesh class
+   */
+  PGroupIDs Scale (TIDSortedElemSet&        theElements,
+                   const gp_Pnt&            thePoint,
+                   const std::list<double>& theScaleFact,
+                   const bool               theCopy,
+                   const bool               theMakeGroups,
+                   SMESH_Mesh*              theTargetMesh=0);
+
   typedef std::list< std::list< const SMDS_MeshNode* > > TListOfListOfNodes;
 
   void FindCoincidentNodes (std::set<const SMDS_MeshNode*> & theNodes,
@@ -520,18 +539,6 @@ public:
   //converts all mesh from quadratic to ordinary ones, deletes old quadratic elements, replacing 
   //them with ordinary mesh elements with the same id.
 
-
-//  static int SortQuadNodes (const SMDS_Mesh * theMesh,
-//                            int               theNodeIds[] );
-//  // Set 4 nodes of a quadrangle face in a good order.
-//  // Swap 1<->2 or 2<->3 nodes and correspondingly return
-//  // 1 or 2 else 0.
-//
-//  static bool SortHexaNodes (const SMDS_Mesh * theMesh,
-//                             int               theNodeIds[] );
-//  // Set 8 nodes of a hexahedron in a good order.
-//  // Return success status
-
   static void AddToSameGroups (const SMDS_MeshElement* elemToAdd,
                                const SMDS_MeshElement* elemInGroups,
                                SMESHDS_Mesh *          aMesh);
@@ -546,6 +553,11 @@ public:
                                    SMESHDS_Mesh *          aMesh);
   // replace elemToRm by elemToAdd in the all groups
 
+  static void ReplaceElemInGroups (const SMDS_MeshElement*                     elemToRm,
+                                   const std::vector<const SMDS_MeshElement*>& elemToAdd,
+                                   SMESHDS_Mesh *                              aMesh);
+  // replace elemToRm by elemToAdd in the all groups
+
   /*!
    * \brief Return nodes linked to the given one in elements of the type
    */
@@ -553,14 +565,16 @@ public:
                               TIDSortedElemSet &   linkedNodes,
                               SMDSAbs_ElementType  type = SMDSAbs_All );
 
-  static const SMDS_MeshElement*
-    FindFaceInSet(const SMDS_MeshNode*    n1,
-                  const SMDS_MeshNode*    n2,
-                  const TIDSortedElemSet& elemSet,
-                  const TIDSortedElemSet& avoidSet);
+  static const SMDS_MeshElement* FindFaceInSet(const SMDS_MeshNode*    n1,
+                                               const SMDS_MeshNode*    n2,
+                                               const TIDSortedElemSet& elemSet,
+                                               const TIDSortedElemSet& avoidSet,
+                                               int*                    i1=0,
+                                               int*                    i2=0);
   // Return a face having linked nodes n1 and n2 and which is
   // - not in avoidSet,
   // - in elemSet provided that !elemSet.empty()
+  // i1 and i2 optionally returns indices of n1 and n2
 
   /*!
    * \brief Find corresponding nodes in two sets of faces 
@@ -575,11 +589,11 @@ public:
    */
   static Sew_Error FindMatchingNodes(std::set<const SMDS_MeshElement*>& theSide1,
                                      std::set<const SMDS_MeshElement*>& theSide2,
-                                     const SMDS_MeshNode*          theFirstNode1,
-                                     const SMDS_MeshNode*          theFirstNode2,
-                                     const SMDS_MeshNode*          theSecondNode1,
-                                     const SMDS_MeshNode*          theSecondNode2,
-                                     TNodeNodeMap &                nReplaceMap);
+                                     const SMDS_MeshNode*               theFirstNode1,
+                                     const SMDS_MeshNode*               theFirstNode2,
+                                     const SMDS_MeshNode*               theSecondNode1,
+                                     const SMDS_MeshNode*               theSecondNode2,
+                                     TNodeNodeMap &                     theNodeReplaceMap);
 
   /*!
    * \brief Returns true if given node is medium
@@ -684,30 +698,42 @@ private:
                   const int                nbSteps,
                   SMESH_SequenceOfElemPtr& srcElements);
 
-  /*!
-   * auxilary for ExtrusionAlongTrack
-   */
-  Extrusion_Error MakeEdgePathPoints(std::list<double>& aPrms,
-                                     const TopoDS_Edge& aTrackEdge,
-                                     bool FirstIsStart,
-                                     list<SMESH_MeshEditor_PathPoint>& LPP);
-  Extrusion_Error MakeExtrElements(TIDSortedElemSet& theElements,
-                                   list<SMESH_MeshEditor_PathPoint>& fullList,
-                                   const bool theHasAngles,
-                                   list<double>& theAngles,
-                                   const bool theLinearVariation,
-                                   const bool theHasRefPoint,
-                                   const gp_Pnt& theRefPoint,
-                                   const bool theMakeGroups);
-  void LinearAngleVariation(const int NbSteps,
+  struct SMESH_MeshEditor_PathPoint
+  {
+    gp_Pnt myPnt;
+    gp_Dir myTgt;
+    double myAngle, myPrm;
+
+    SMESH_MeshEditor_PathPoint(): myPnt(99., 99., 99.), myTgt(1.,0.,0.), myAngle(0), myPrm(0) {}
+    void          SetPnt      (const gp_Pnt& aP3D)  { myPnt  =aP3D; }
+    void          SetTangent  (const gp_Dir& aTgt)  { myTgt  =aTgt; }
+    void          SetAngle    (const double& aBeta) { myAngle=aBeta; }
+    void          SetParameter(const double& aPrm)  { myPrm  =aPrm; }
+    const gp_Pnt& Pnt         ()const               { return myPnt; }
+    const gp_Dir& Tangent     ()const               { return myTgt; }
+    double        Angle       ()const               { return myAngle; }
+    double        Parameter   ()const               { return myPrm; }
+  };
+  Extrusion_Error MakeEdgePathPoints(std::list<double>&                     aPrms,
+                                     const TopoDS_Edge&                     aTrackEdge,
+                                     bool                                   aFirstIsStart,
+                                     std::list<SMESH_MeshEditor_PathPoint>& aLPP);
+  Extrusion_Error MakeExtrElements(TIDSortedElemSet&                      theElements,
+                                   std::list<SMESH_MeshEditor_PathPoint>& theFullList,
+                                   const bool                             theHasAngles,
+                                   std::list<double>&                     theAngles,
+                                   const bool                             theLinearVariation,
+                                   const bool                             theHasRefPoint,
+                                   const gp_Pnt&                          theRefPoint,
+                                   const bool                             theMakeGroups);
+  void LinearAngleVariation(const int     NbSteps,
                             list<double>& theAngles);
 
-  bool doubleNodes( SMESHDS_Mesh*     theMeshDS,
-                    const TIDSortedElemSet& theElems,
-                    const TIDSortedElemSet& theNodesNot,
-                    std::map< const SMDS_MeshNode*,
-                    const SMDS_MeshNode* >& theNodeNodeMap,
-                    const bool theIsDoubleElem );
+  bool doubleNodes( SMESHDS_Mesh*                                           theMeshDS,
+                    const TIDSortedElemSet&                                 theElems,
+                    const TIDSortedElemSet&                                 theNodesNot,
+                    std::map< const SMDS_MeshNode*, const SMDS_MeshNode* >& theNodeNodeMap,
+                    const bool                                              theIsDoubleElem );
 
 private:
 
index 829f5e324e9109c561c6e29d26b2b4ea05c6b286..12314b5cbc7c8b4decb389f7c41c23f594c07152 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File:      SMESH_MesherHelper.cxx
 // Created:   15.02.06 15:22:41
 // Author:    Sergey KUUL
@@ -35,6 +36,7 @@
 #include <BRepTools_WireExplorer.hxx>
 #include <BRep_Tool.hxx>
 #include <Geom2d_Curve.hxx>
+#include <GeomAPI_ProjectPointOnCurve.hxx>
 #include <GeomAPI_ProjectPointOnSurf.hxx>
 #include <Geom_Curve.hxx>
 #include <Geom_Surface.hxx>
 
 #include <limits>
 
+using namespace std;
+
 #define RETURN_BAD_RESULT(msg) { MESSAGE(msg); return false; }
 
 namespace {
 
   gp_XYZ XYZ(const SMDS_MeshNode* n) { return gp_XYZ(n->X(), n->Y(), n->Z()); }
 
+  enum { U_periodic = 1, V_periodic = 2 };
 }
 
 //================================================================================
@@ -71,16 +76,31 @@ namespace {
 //================================================================================
 
 SMESH_MesherHelper::SMESH_MesherHelper(SMESH_Mesh& theMesh)
-  : myMesh(&theMesh), myShapeID(0), myCreateQuadratic(false)
+  : myParIndex(0), myMesh(&theMesh), myShapeID(0), myCreateQuadratic(false)
 {
+  myPar1[0] = myPar2[0] = myPar1[1] = myPar2[1] = 0;
   mySetElemOnShape = ( ! myMesh->HasShapeToMesh() );
 }
 
 //=======================================================================
-//function : CheckShape
+//function : ~SMESH_MesherHelper
 //purpose  : 
 //=======================================================================
 
+SMESH_MesherHelper::~SMESH_MesherHelper()
+{
+  TID2Projector::iterator i_proj = myFace2Projector.begin();
+  for ( ; i_proj != myFace2Projector.end(); ++i_proj )
+    delete i_proj->second;
+}
+
+//=======================================================================
+//function : IsQuadraticSubMesh
+//purpose  : Check submesh for given shape: if all elements on this shape 
+//           are quadratic, quadratic elements will be created.
+//           Also fill myTLinkNodeMap
+//=======================================================================
+
 bool SMESH_MesherHelper::IsQuadraticSubMesh(const TopoDS_Shape& aSh)
 {
   SMESHDS_Mesh* meshDS = GetMeshDS();
@@ -141,12 +161,10 @@ bool SMESH_MesherHelper::IsQuadraticSubMesh(const TopoDS_Shape& aSh)
   return myCreateQuadratic;
 }
 
-//================================================================================
-/*!
- * \brief Set geomerty to make elements on
-  * \param aSh - geomertic shape
- */
-//================================================================================
+//=======================================================================
+//function : SetSubShape
+//purpose  : Set geomerty to make elements on
+//=======================================================================
 
 void SMESH_MesherHelper::SetSubShape(const int aShID)
 {
@@ -158,12 +176,10 @@ void SMESH_MesherHelper::SetSubShape(const int aShID)
     SetSubShape( TopoDS_Shape() );
 }
 
-//================================================================================
-/*!
- * \brief Set geomerty to make elements on
-  * \param aSh - geomertic shape
- */
-//================================================================================
+//=======================================================================
+//function : SetSubShape
+//purpose  : Set geomerty to create elements on
+//=======================================================================
 
 void SMESH_MesherHelper::SetSubShape(const TopoDS_Shape& aSh)
 {
@@ -180,6 +196,7 @@ void SMESH_MesherHelper::SetSubShape(const TopoDS_Shape& aSh)
   }
   SMESHDS_Mesh* meshDS = GetMeshDS();
   myShapeID = meshDS->ShapeToIndex(aSh);
+  myParIndex = 0;
 
   // treatment of periodic faces
   for ( TopExp_Explorer eF( aSh, TopAbs_FACE ); eF.More(); eF.Next() )
@@ -194,20 +211,18 @@ void SMESH_MesherHelper::SetSubShape(const TopoDS_Shape& aSh)
         const TopoDS_Edge& edge = TopoDS::Edge( exp.Current() );
         if ( BRep_Tool::IsClosed( edge, face )) {
           // initialize myPar1, myPar2 and myParIndex
-          if ( mySeamShapeIds.empty() ) {
-            gp_Pnt2d uv1, uv2;
-            BRep_Tool::UVPoints( edge, face, uv1, uv2 );
-            if ( Abs( uv1.Coord(1) - uv2.Coord(1) ) < Abs( uv1.Coord(2) - uv2.Coord(2) ))
-            {
-              myParIndex = 1; // U periodic
-              myPar1 = surface.FirstUParameter();
-              myPar2 = surface.LastUParameter();
-            }
-            else {
-              myParIndex = 2;  // V periodic
-              myPar1 = surface.FirstVParameter();
-              myPar2 = surface.LastVParameter();
-            }
+          gp_Pnt2d uv1, uv2;
+          BRep_Tool::UVPoints( edge, face, uv1, uv2 );
+          if ( Abs( uv1.Coord(1) - uv2.Coord(1) ) < Abs( uv1.Coord(2) - uv2.Coord(2) ))
+          {
+            myParIndex |= U_periodic;
+            myPar1[0] = surface.FirstUParameter();
+            myPar2[0] = surface.LastUParameter();
+          }
+          else {
+            myParIndex |= V_periodic;
+            myPar1[1] = surface.FirstVParameter();
+            myPar2[1] = surface.LastVParameter();
           }
           // store seam shape indices, negative if shape encounters twice
           int edgeID = meshDS->ShapeToIndex( edge );
@@ -229,13 +244,13 @@ void SMESH_MesherHelper::SetSubShape(const TopoDS_Shape& aSh)
   }
 }
 
-//================================================================================
-  /*!
-   * \brief Check if inFaceNode argument is necessary for call GetNodeUV(F,..)
-    * \param F - the face
-    * \retval bool - return true if the face is periodic
-   */
-//================================================================================
+//=======================================================================
+//function : GetNodeUVneedInFaceNode
+//purpose  : Check if inFaceNode argument is necessary for call GetNodeUV(F,..)
+//           Return true if the face is periodic.
+//           If F is Null, answer about subshape set through IsQuadraticSubMesh() or
+//           * SetSubShape()
+//=======================================================================
 
 bool SMESH_MesherHelper::GetNodeUVneedInFaceNode(const TopoDS_Face& F) const
 {
@@ -264,12 +279,8 @@ bool SMESH_MesherHelper::IsMedium(const SMDS_MeshNode*      node,
 }
 
 //=======================================================================
-/*!
- * \brief Return support shape of a node
- * \param node - the node
- * \param meshDS - mesh DS
- * \retval TopoDS_Shape - found support shape
- */
+//function : GetSubShapeByNode
+//purpose  : Return support shape of a node
 //=======================================================================
 
 TopoDS_Shape SMESH_MesherHelper::GetSubShapeByNode(const SMDS_MeshNode* node,
@@ -285,11 +296,9 @@ TopoDS_Shape SMESH_MesherHelper::GetSubShapeByNode(const SMDS_MeshNode* node,
 
 //=======================================================================
 //function : AddTLinkNode
-//purpose  : 
+//purpose  : add a link in my data structure
 //=======================================================================
-/*!
- * Auxilary function for filling myTLinkNodeMap
- */
+
 void SMESH_MesherHelper::AddTLinkNode(const SMDS_MeshNode* n1,
                                       const SMDS_MeshNode* n2,
                                       const SMDS_MeshNode* n12)
@@ -300,35 +309,36 @@ void SMESH_MesherHelper::AddTLinkNode(const SMDS_MeshNode* n1,
 }
 
 //=======================================================================
-/*!
- * \brief Select UV on either of 2 pcurves of a seam edge, closest to the given UV
- * \param uv1 - UV on the seam
- * \param uv2 - UV within a face
- * \retval gp_Pnt2d - selected UV
- */
+//function : GetUVOnSeam
+//purpose  : Select UV on either of 2 pcurves of a seam edge, closest to the given UV
 //=======================================================================
 
 gp_Pnt2d SMESH_MesherHelper::GetUVOnSeam( const gp_Pnt2d& uv1, const gp_Pnt2d& uv2 ) const
 {
-  double p1 = uv1.Coord( myParIndex );
-  double p2 = uv2.Coord( myParIndex );
-  double p3 = ( Abs( p1 - myPar1 ) < Abs( p1 - myPar2 )) ? myPar2 : myPar1;
-  if ( Abs( p2 - p1 ) > Abs( p2 - p3 ))
-    p1 = p3;
   gp_Pnt2d result = uv1;
-  result.SetCoord( myParIndex, p1 );
+  for ( int i = U_periodic; i <= V_periodic ; ++i )
+  {
+    if ( myParIndex & i )
+    {
+      double p1 = uv1.Coord( i );
+      double dp1 = Abs( p1-myPar1[i-1]), dp2 = Abs( p1-myPar2[i-1]);
+      if ( myParIndex == i ||
+           dp1 < ( myPar2[i-1] - myPar2[i-1] ) / 100. ||
+           dp2 < ( myPar2[i-1] - myPar2[i-1] ) / 100. )
+      {
+        double p2 = uv2.Coord( i );
+        double p1Alt = ( dp1 < dp2 ) ? myPar2[i-1] : myPar1[i-1];
+        if ( Abs( p2 - p1 ) > Abs( p2 - p1Alt ))
+          result.SetCoord( i, p1Alt );
+      }
+    }
+  }
   return result;
 }
 
 //=======================================================================
-/*!
- * \brief Return node UV on face
- * \param F - the face
- * \param n - the node
- * \param n2 - a node of element being created located inside a face
- * \param check - optional flag returing false if found UV are invalid
- * \retval gp_XY - resulting UV
- */
+//function : GetNodeUV
+//purpose  : Return node UV on face
 //=======================================================================
 
 gp_XY SMESH_MesherHelper::GetNodeUV(const TopoDS_Face&   F,
@@ -336,7 +346,7 @@ gp_XY SMESH_MesherHelper::GetNodeUV(const TopoDS_Face&   F,
                                     const SMDS_MeshNode* n2,
                                     bool*                check) const
 {
-  gp_Pnt2d uv( 1e100, 1e100 );
+  gp_Pnt2d uv( Precision::Infinite(), Precision::Infinite() );
   const SMDS_PositionPtr Pos = n->GetPosition();
   bool uvOK = false;
   if(Pos->GetTypeOfPosition()==SMDS_TOP_FACE)
@@ -345,7 +355,8 @@ gp_XY SMESH_MesherHelper::GetNodeUV(const TopoDS_Face&   F,
     const SMDS_FacePosition* fpos =
       static_cast<const SMDS_FacePosition*>(n->GetPosition());
     uv.SetCoord(fpos->GetUParameter(),fpos->GetVParameter());
-    uvOK = CheckNodeUV( F, n, uv.ChangeCoord(), BRep_Tool::Tolerance( F ));
+    if ( check )
+      uvOK = CheckNodeUV( F, n, uv.ChangeCoord(), BRep_Tool::Tolerance( F ));
   }
   else if(Pos->GetTypeOfPosition()==SMDS_TOP_EDGE)
   {
@@ -358,11 +369,13 @@ gp_XY SMESH_MesherHelper::GetNodeUV(const TopoDS_Face&   F,
     TopoDS_Edge E = TopoDS::Edge(GetMeshDS()->IndexToShape(edgeID));
     double f, l, u = epos->GetUParameter();
     Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(E, F, f, l);
-    if ( f < u && u < l )
+    bool validU = ( f < u && u < l );
+    if ( validU )
       uv = C2d->Value( u );
     else
       uv.SetCoord(0.,0.);
-    uvOK = CheckNodeUV( F, n, uv.ChangeCoord(), BRep_Tool::Tolerance( E ));
+    if ( check || !validU )
+      uvOK = CheckNodeUV( F, n, uv.ChangeCoord(), BRep_Tool::Tolerance( E ),/*force=*/ !validU );
 
     // for a node on a seam edge select one of UVs on 2 pcurves
     if ( n2 && IsSeamShape( edgeID ) )
@@ -418,6 +431,7 @@ gp_XY SMESH_MesherHelper::GetNodeUV(const TopoDS_Face&   F,
           }
         }
         else {
+          uvOK = false;
           TopTools_ListIteratorOfListOfShape it( myMesh->GetAncestors( V ));
           for ( ; it.More(); it.Next() ) {
             if ( it.Value().ShapeType() == TopAbs_EDGE ) {
@@ -427,6 +441,7 @@ gp_XY SMESH_MesherHelper::GetNodeUV(const TopoDS_Face&   F,
               if ( !C2d.IsNull() ) {
                 double u = ( V == TopExp::FirstVertex( edge ) ) ?  f : l;
                 uv = C2d->Value( u );
+                uvOK = true;
                 break;
               }
             }
@@ -445,28 +460,30 @@ gp_XY SMESH_MesherHelper::GetNodeUV(const TopoDS_Face&   F,
 }
 
 //=======================================================================
-/*!
- * \brief Check and fix node UV on a face
- *  \retval bool - false if UV is bad and could not be fixed
- */
+//function : CheckNodeUV
+//purpose  : Check and fix node UV on a face
 //=======================================================================
 
 bool SMESH_MesherHelper::CheckNodeUV(const TopoDS_Face&   F,
                                      const SMDS_MeshNode* n,
                                      gp_XY&               uv,
-                                     const double         tol) const
+                                     const double         tol,
+                                     const bool           force) const
 {
-  if ( !myOkNodePosShapes.count( n->GetPosition()->GetShapeId() ))
+  if ( force || !myOkNodePosShapes.count( n->GetPosition()->GetShapeId() ))
   {
     // check that uv is correct
     TopLoc_Location loc;
     Handle(Geom_Surface) surface = BRep_Tool::Surface( F,loc );
     gp_Pnt nodePnt = XYZ( n );
     if ( !loc.IsIdentity() ) nodePnt.Transform( loc.Transformation().Inverted() );
-    if ( nodePnt.Distance( surface->Value( uv.X(), uv.Y() )) > tol )
+    if ( Precision::IsInfinite( uv.X() ) ||
+         Precision::IsInfinite( uv.Y() ) ||
+         nodePnt.Distance( surface->Value( uv.X(), uv.Y() )) > tol )
     {
       // uv incorrect, project the node to surface
-      GeomAPI_ProjectPointOnSurf projector( nodePnt, surface, tol );
+      GeomAPI_ProjectPointOnSurf& projector = GetProjector( F, loc, tol );
+      projector.Perform( nodePnt );
       if ( !projector.IsDone() || projector.NbPoints() < 1 )
       {
         MESSAGE( "SMESH_MesherHelper::CheckNodeUV() failed to project" );
@@ -490,96 +507,207 @@ bool SMESH_MesherHelper::CheckNodeUV(const TopoDS_Face&   F,
 }
 
 //=======================================================================
-/*!
- * \brief Return middle UV taking in account surface period
- */
+//function : GetProjector
+//purpose  : Return projector intitialized by given face without location, which is returned
+//=======================================================================
+
+GeomAPI_ProjectPointOnSurf& SMESH_MesherHelper::GetProjector(const TopoDS_Face& F,
+                                                             TopLoc_Location&   loc,
+                                                             double             tol ) const
+{
+  Handle(Geom_Surface) surface = BRep_Tool::Surface( F,loc );
+  int faceID = GetMeshDS()->ShapeToIndex( F );
+  TID2Projector& i2proj = const_cast< TID2Projector&>( myFace2Projector );
+  TID2Projector::iterator i_proj = i2proj.find( faceID );
+  if ( i_proj == i2proj.end() )
+  {
+    if ( tol == 0 ) tol = BRep_Tool::Tolerance( F );
+    double U1, U2, V1, V2;
+    surface->Bounds(U1, U2, V1, V2);
+    GeomAPI_ProjectPointOnSurf* proj = new GeomAPI_ProjectPointOnSurf();
+    proj->Init( surface, U1, U2, V1, V2, tol );
+    i_proj = i2proj.insert( make_pair( faceID, proj )).first;
+  }
+  return *( i_proj->second );
+}
+
+namespace
+{
+  gp_XY AverageUV(const gp_XY& uv1, const gp_XY& uv2) { return ( uv1 + uv2 ) / 2.; }
+  gp_XY_FunPtr(Added); // define gp_XY_Added pointer to function calling gp_XY::Added(gp_XY)
+  gp_XY_FunPtr(Subtracted); 
+}
+
+//=======================================================================
+//function : applyIn2D
+//purpose  : Perform given operation on two 2d points in parameric space of given surface.
+//           It takes into account period of the surface. Use gp_XY_FunPtr macro
+//           to easily define pointer to function of gp_XY class.
+//=======================================================================
+
+gp_XY SMESH_MesherHelper::applyIn2D(const Handle(Geom_Surface)& surface,
+                                    const gp_XY&                uv1,
+                                    const gp_XY&                uv2,
+                                    xyFunPtr                    fun,
+                                    const bool                  resultInPeriod)
+{
+  Standard_Boolean isUPeriodic = surface.IsNull() ? false : surface->IsUPeriodic();
+  Standard_Boolean isVPeriodic = surface.IsNull() ? false : surface->IsVPeriodic();
+  if ( !isUPeriodic && !isVPeriodic )
+    return fun(uv1,uv2);
+
+  // move uv2 not far than half-period from uv1
+  double u2 = 
+    uv2.X()+(isUPeriodic ? ShapeAnalysis::AdjustByPeriod(uv2.X(),uv1.X(),surface->UPeriod()) :0);
+  double v2 = 
+    uv2.Y()+(isVPeriodic ? ShapeAnalysis::AdjustByPeriod(uv2.Y(),uv1.Y(),surface->VPeriod()) :0);
+
+  // execute operation
+  gp_XY res = fun( uv1, gp_XY(u2,v2) );
+
+  // move result within period
+  if ( resultInPeriod )
+  {
+    Standard_Real UF,UL,VF,VL;
+    surface->Bounds(UF,UL,VF,VL);
+    if ( isUPeriodic )
+      res.SetX( res.X() + ShapeAnalysis::AdjustToPeriod(res.X(),UF,UL));
+    if ( isVPeriodic )
+      res.SetY( res.Y() + ShapeAnalysis::AdjustToPeriod(res.Y(),VF,VL));
+  }
+
+  return res;
+}
+//=======================================================================
+//function : GetMiddleUV
+//purpose  : Return middle UV taking in account surface period
 //=======================================================================
 
 gp_XY SMESH_MesherHelper::GetMiddleUV(const Handle(Geom_Surface)& surface,
                                       const gp_XY&                p1,
                                       const gp_XY&                p2)
 {
-  if ( surface.IsNull() )
-    return 0.5 * ( p1 + p2 );
-  //checking if surface is periodic
-  Standard_Real UF,UL,VF,VL;
-  surface->Bounds(UF,UL,VF,VL);
-
-  Standard_Real u,v;
-  Standard_Boolean isUPeriodic = surface->IsUPeriodic();
-  if(isUPeriodic) {
-    Standard_Real UPeriod = surface->UPeriod();
-    Standard_Real p2x = p2.X()+ShapeAnalysis::AdjustByPeriod(p2.X(),p1.X(),UPeriod);
-    Standard_Real pmid = (p1.X()+p2x)/2.;
-    u = pmid+ShapeAnalysis::AdjustToPeriod(pmid,UF,UL);
-  }
-  else {
-    u= (p1.X()+p2.X())/2.;
-  }
-  Standard_Boolean isVPeriodic = surface->IsVPeriodic();
-  if(isVPeriodic) {
-    Standard_Real VPeriod = surface->VPeriod();
-    Standard_Real p2y = p2.Y()+ShapeAnalysis::AdjustByPeriod(p2.Y(),p1.Y(),VPeriod);
-    Standard_Real pmid = (p1.Y()+p2y)/2.;
-    v = pmid+ShapeAnalysis::AdjustToPeriod(pmid,VF,VL);
-  }
-  else {
-    v = (p1.Y()+p2.Y())/2.;
-  }
-  return gp_XY( u,v );
+  return applyIn2D( surface, p1, p2, & AverageUV );
 }
 
 //=======================================================================
-/*!
- * \brief Return node U on edge
- * \param E - the Edge
- * \param n - the node
- * \retval double - resulting U
- * 
- * Auxilary function called form GetMediumNode()
- */
+//function : GetNodeU
+//purpose  : Return node U on edge
 //=======================================================================
 
 double SMESH_MesherHelper::GetNodeU(const TopoDS_Edge&   E,
                                     const SMDS_MeshNode* n,
+                                    const SMDS_MeshNode* inEdgeNode,
                                     bool*                check)
 {
   double param = 0;
   const SMDS_PositionPtr Pos = n->GetPosition();
-  if(Pos->GetTypeOfPosition()==SMDS_TOP_EDGE) {
+  if ( Pos->GetTypeOfPosition()==SMDS_TOP_EDGE )
+  {
     const SMDS_EdgePosition* epos =
       static_cast<const SMDS_EdgePosition*>(n->GetPosition());
     param =  epos->GetUParameter();
   }
-  else if(Pos->GetTypeOfPosition()==SMDS_TOP_VERTEX) {
-    SMESHDS_Mesh * meshDS = GetMeshDS();
-    int vertexID = n->GetPosition()->GetShapeId();
-    const TopoDS_Vertex& V = TopoDS::Vertex(meshDS->IndexToShape(vertexID));
-    param =  BRep_Tool::Parameter( V, E );
+  else if( Pos->GetTypeOfPosition() == SMDS_TOP_VERTEX )
+  {
+    if ( inEdgeNode && TopExp::FirstVertex( E ).IsSame( TopExp::LastVertex( E ))) // issue 0020128
+    {
+      Standard_Real f,l;
+      BRep_Tool::Range( E, f,l );
+      double uInEdge = GetNodeU( E, inEdgeNode );
+      param = ( fabs( uInEdge - f ) < fabs( l - uInEdge )) ? f : l;
+    }
+    else
+    {
+      SMESHDS_Mesh * meshDS = GetMeshDS();
+      int vertexID = n->GetPosition()->GetShapeId();
+      const TopoDS_Vertex& V = TopoDS::Vertex(meshDS->IndexToShape(vertexID));
+      param =  BRep_Tool::Parameter( V, E );
+    }
   }
+  if ( check )
+    *check = CheckNodeU( E, n, param, BRep_Tool::Tolerance( E ));
   return param;
 }
 
-//================================================================================
-/*!
- * \brief Return existing or create new medium nodes between given ones
- *  \param force3d - if true, new node is the middle of n1 and n2,
- *                   else is located on geom face or geom edge
- */
-//================================================================================
+//=======================================================================
+//function : CheckNodeU
+//purpose  : Check and fix node U on an edge
+//           Return false if U is bad and could not be fixed
+//=======================================================================
+
+bool SMESH_MesherHelper::CheckNodeU(const TopoDS_Edge&   E,
+                                    const SMDS_MeshNode* n,
+                                    double&              u,
+                                    const double         tol,
+                                    const bool           force) const
+{
+  if ( force || !myOkNodePosShapes.count( n->GetPosition()->GetShapeId() ))
+  {
+    // check that u is correct
+    TopLoc_Location loc; double f,l;
+    Handle(Geom_Curve) curve = BRep_Tool::Curve( E,loc,f,l );
+    if ( curve.IsNull() ) // degenerated edge
+    {
+      if ( u+tol < f || u-tol > l )
+      {
+        double r = Max( 0.5, 1 - tol*n->GetID()); // to get a unique u on edge
+        u =  f*r + l*(1-r);
+      }
+    }
+    else
+    {
+      gp_Pnt nodePnt = SMESH_MeshEditor::TNodeXYZ( n );
+      if ( !loc.IsIdentity() ) nodePnt.Transform( loc.Transformation().Inverted() );
+      if ( nodePnt.Distance( curve->Value( u )) > tol )
+      {
+        // u incorrect, project the node to the curve
+        GeomAPI_ProjectPointOnCurve projector( nodePnt, curve, f, l );
+        if ( projector.NbPoints() < 1 )
+        {
+          MESSAGE( "SMESH_MesherHelper::CheckNodeU() failed to project" );
+          return false;
+        }
+        Quantity_Parameter U = projector.LowerDistanceParameter();
+        if ( nodePnt.Distance( curve->Value( U )) > tol )
+        {
+          MESSAGE( "SMESH_MesherHelper::CheckNodeU(), invalid projection" );
+          return false;
+        }
+        u = double( U );
+      }
+      else if ( fabs( u ) > numeric_limits<double>::min() )
+      {
+        ((SMESH_MesherHelper*) this)->myOkNodePosShapes.insert( n->GetPosition()->GetShapeId() );
+      }
+    }
+  }
+  return true;
+}
+
+//=======================================================================
+//function : GetMediumNode
+//purpose  : Return existing or create new medium nodes between given ones
+//=======================================================================
 
 const SMDS_MeshNode* SMESH_MesherHelper::GetMediumNode(const SMDS_MeshNode* n1,
                                                        const SMDS_MeshNode* n2,
-                                                       bool force3d)
+                                                       bool                 force3d)
 {
+  // Find existing node
+
   SMESH_TLink link(n1,n2);
   ItTLinkNode itLN = myTLinkNodeMap.find( link );
   if ( itLN != myTLinkNodeMap.end() ) {
     return (*itLN).second;
   }
-  // create medium node
+
+  // Create medium node
+
   SMDS_MeshNode* n12;
   SMESHDS_Mesh* meshDS = GetMeshDS();
+
+  // get type of shape for the new medium node
   int faceID = -1, edgeID = -1;
   const SMDS_PositionPtr Pos1 = n1->GetPosition();
   const SMDS_PositionPtr Pos2 = n2->GetPosition();
@@ -600,73 +728,78 @@ const SMDS_MeshNode* SMESH_MesherHelper::GetMediumNode(const SMDS_MeshNode* n1,
       edgeID = Pos2->GetShapeId();
     }
   }
+  // get positions of the given nodes on shapes
+  TopoDS_Edge E; double u [2];
+  TopoDS_Face F; gp_XY  uv[2];
+  bool uvOK[2] = { false, false };
+  TopAbs_ShapeEnum shapeType = myShape.IsNull() ? TopAbs_SHAPE : myShape.ShapeType();
+  if ( faceID>0 || shapeType == TopAbs_FACE)
+  {
+    if( myShape.IsNull() )
+      F = TopoDS::Face(meshDS->IndexToShape(faceID));
+    else {
+      F = TopoDS::Face(myShape);
+      faceID = myShapeID;
+    }
+    uv[0] = GetNodeUV(F,n1,n2, force3d ? 0 : &uvOK[0]);
+    uv[1] = GetNodeUV(F,n2,n1, force3d ? 0 : &uvOK[1]);
+  }
+  else if (edgeID>0 || shapeType == TopAbs_EDGE)
+  {
+    if( myShape.IsNull() )
+      E = TopoDS::Edge(meshDS->IndexToShape(edgeID));
+    else {
+      E = TopoDS::Edge(myShape);
+      edgeID = myShapeID;
+    }
+    u[0] = GetNodeU(E,n1,n2, force3d ? 0 : &uvOK[0]);
+    u[1] = GetNodeU(E,n2,n1, force3d ? 0 : &uvOK[1]);
+  }
   if(!force3d)
   {
     // we try to create medium node using UV parameters of
     // nodes, else - medium between corresponding 3d points
-
-    TopAbs_ShapeEnum shapeType = myShape.IsNull() ? TopAbs_SHAPE : myShape.ShapeType();
-    if(faceID>0 || shapeType == TopAbs_FACE) {
-      // obtaining a face and 2d points for nodes
-      TopoDS_Face F;
-      if( myShape.IsNull() )
-        F = TopoDS::Face(meshDS->IndexToShape(faceID));
-      else {
-        F = TopoDS::Face(myShape);
-        faceID = myShapeID;
-      }
-      bool uvOK1, uvOK2;
-      gp_XY p1 = GetNodeUV(F,n1,n2, &uvOK1);
-      gp_XY p2 = GetNodeUV(F,n2,n1, &uvOK2);
-
-      if ( uvOK1 && uvOK2 )
+    if( ! F.IsNull() )
+    {
+      if ( uvOK[0] && uvOK[1] )
       {
         if ( IsDegenShape( Pos1->GetShapeId() ))
-          p1.SetCoord( myParIndex, p2.Coord( myParIndex ));
+          if ( myParIndex & U_periodic ) uv[0].SetCoord( 1, uv[1].Coord( 1 ));
+          else                           uv[0].SetCoord( 2, uv[1].Coord( 2 ));
         else if ( IsDegenShape( Pos2->GetShapeId() ))
-          p2.SetCoord( myParIndex, p1.Coord( myParIndex ));
+          if ( myParIndex & U_periodic ) uv[1].SetCoord( 1, uv[0].Coord( 1 ));
+          else                           uv[1].SetCoord( 2, uv[0].Coord( 2 ));
 
         TopLoc_Location loc;
         Handle(Geom_Surface) S = BRep_Tool::Surface(F,loc);
-        gp_XY uv = GetMiddleUV( S, p1, p2 );
-        gp_Pnt P = S->Value( uv.X(), uv.Y() ).Transformed(loc);
+        gp_XY UV = GetMiddleUV( S, uv[0], uv[1] );
+        gp_Pnt P = S->Value( UV.X(), UV.Y() ).Transformed(loc);
         n12 = meshDS->AddNode(P.X(), P.Y(), P.Z());
-        meshDS->SetNodeOnFace(n12, faceID, uv.X(), uv.Y());
+        meshDS->SetNodeOnFace(n12, faceID, UV.X(), UV.Y());
         myTLinkNodeMap.insert(make_pair(link,n12));
         return n12;
       }
     }
-    if (edgeID>0 || shapeType == TopAbs_EDGE) {
-
-      TopoDS_Edge E;
-      if( myShape.IsNull() )
-        E = TopoDS::Edge(meshDS->IndexToShape(edgeID));
-      else {
-        E = TopoDS::Edge(myShape);
-        edgeID = myShapeID;
-      }
-
-      double p1 = GetNodeU(E,n1);
-      double p2 = GetNodeU(E,n2);
-
+    else if ( !E.IsNull() )
+    {
       double f,l;
       Handle(Geom_Curve) C = BRep_Tool::Curve(E, f, l);
-      if(!C.IsNull()) {
-
+      if(!C.IsNull())
+      {
         Standard_Boolean isPeriodic = C->IsPeriodic();
-        double u;
+        double U;
         if(isPeriodic) {
           Standard_Real Period = C->Period();
-          Standard_Real p = p2+ShapeAnalysis::AdjustByPeriod(p2,p1,Period);
-          Standard_Real pmid = (p1+p)/2.;
-          u = pmid+ShapeAnalysis::AdjustToPeriod(pmid,C->FirstParameter(),C->LastParameter());
+          Standard_Real p = u[1]+ShapeAnalysis::AdjustByPeriod(u[1],u[0],Period);
+          Standard_Real pmid = (u[0]+p)/2.;
+          U = pmid+ShapeAnalysis::AdjustToPeriod(pmid,C->FirstParameter(),C->LastParameter());
         }
         else
-          u = (p1+p2)/2.;
+          U = (u[0]+u[1])/2.;
 
-        gp_Pnt P = C->Value( u );
+        gp_Pnt P = C->Value( U );
         n12 = meshDS->AddNode(P.X(), P.Y(), P.Z());
-        meshDS->SetNodeOnEdge(n12, edgeID, u);
+        meshDS->SetNodeOnEdge(n12, edgeID, U);
         myTLinkNodeMap.insert(make_pair(link,n12));
         return n12;
       }
@@ -677,20 +810,29 @@ const SMDS_MeshNode* SMESH_MesherHelper::GetMediumNode(const SMDS_MeshNode* n1,
   double y = ( n1->Y() + n2->Y() )/2.;
   double z = ( n1->Z() + n2->Z() )/2.;
   n12 = meshDS->AddNode(x,y,z);
-  if(edgeID>0)
-    meshDS->SetNodeOnEdge(n12, edgeID);
-  else if(faceID>0)
-    meshDS->SetNodeOnFace(n12, faceID);
-  else
+  if ( !F.IsNull() )
+  {
+    gp_XY UV = ( uv[0] + uv[1] ) / 2.;
+    CheckNodeUV( F, n12, UV, BRep_Tool::Tolerance( F ), /*force=*/true);
+    meshDS->SetNodeOnFace(n12, faceID, UV.X(), UV.Y() );
+  }
+  else if ( !E.IsNull() )
+  {
+    double U = ( u[0] + u[1] ) / 2.;
+    CheckNodeU( E, n12, U, BRep_Tool::Tolerance( E ), /*force=*/true);
+    meshDS->SetNodeOnEdge(n12, edgeID, U);
+  }
+  else if ( myShapeID > 1 )
+  {
     meshDS->SetNodeInVolume(n12, myShapeID);
+  }
   myTLinkNodeMap.insert( make_pair( link, n12 ));
   return n12;
 }
 
 //=======================================================================
-/*!
- * Creates a node
- */
+//function : AddNode
+//purpose  : Creates a node
 //=======================================================================
 
 SMDS_MeshNode* SMESH_MesherHelper::AddNode(double x, double y, double z, int ID)
@@ -715,15 +857,14 @@ SMDS_MeshNode* SMESH_MesherHelper::AddNode(double x, double y, double z, int ID)
 }
 
 //=======================================================================
-/*!
- * Creates quadratic or linear edge
- */
+//function : AddEdge
+//purpose  : Creates quadratic or linear edge
 //=======================================================================
 
 SMDS_MeshEdge* SMESH_MesherHelper::AddEdge(const SMDS_MeshNode* n1,
-                                                const SMDS_MeshNode* n2,
-                                                const int id,
-                                                const bool force3d)
+                                           const SMDS_MeshNode* n2,
+                                           const int            id,
+                                           const bool           force3d)
 {
   SMESHDS_Mesh * meshDS = GetMeshDS();
   
@@ -749,9 +890,8 @@ SMDS_MeshEdge* SMESH_MesherHelper::AddEdge(const SMDS_MeshNode* n1,
 }
 
 //=======================================================================
-/*!
- * Creates quadratic or linear triangle
- */
+//function : AddFace
+//purpose  : Creates quadratic or linear triangle
 //=======================================================================
 
 SMDS_MeshFace* SMESH_MesherHelper::AddFace(const SMDS_MeshNode* n1,
@@ -789,17 +929,16 @@ SMDS_MeshFace* SMESH_MesherHelper::AddFace(const SMDS_MeshNode* n1,
 }
 
 //=======================================================================
-/*!
- * Creates quadratic or linear quadrangle
- */
+//function : AddFace
+//purpose  : Creates quadratic or linear quadrangle
 //=======================================================================
 
 SMDS_MeshFace* SMESH_MesherHelper::AddFace(const SMDS_MeshNode* n1,
                                            const SMDS_MeshNode* n2,
                                            const SMDS_MeshNode* n3,
                                            const SMDS_MeshNode* n4,
-                                           const int id,
-                                           const bool force3d)
+                                           const int            id,
+                                           const bool           force3d)
 {
   SMESHDS_Mesh * meshDS = GetMeshDS();
   SMDS_MeshFace* elem = 0;
@@ -847,9 +986,8 @@ SMDS_MeshFace* SMESH_MesherHelper::AddFace(const SMDS_MeshNode* n1,
 }
 
 //=======================================================================
-/*!
- * Creates quadratic or linear volume
- */
+//function : AddVolume
+//purpose  : Creates quadratic or linear prism
 //=======================================================================
 
 SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
@@ -896,9 +1034,8 @@ SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
 }
 
 //=======================================================================
-/*!
- * Creates quadratic or linear volume
- */
+//function : AddVolume
+//purpose  : Creates quadratic or linear tetrahedron
 //=======================================================================
 
 SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
@@ -937,9 +1074,8 @@ SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
 }
 
 //=======================================================================
-/*!
- * Creates quadratic or linear pyramid
- */
+//function : AddVolume
+//purpose  : Creates quadratic or linear pyramid
 //=======================================================================
 
 SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
@@ -985,9 +1121,8 @@ SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
 }
 
 //=======================================================================
-/*!
- * Creates quadratic or linear hexahedron
- */
+//function : AddVolume
+//purpose  : Creates quadratic or linear hexahedron
 //=======================================================================
 
 SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
@@ -1041,19 +1176,8 @@ SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
 }
 
 //=======================================================================
-/*!
- * \brief Load nodes bound to face into a map of node columns
- * \param theParam2ColumnMap - map of node columns to fill
- * \param theFace - the face on which nodes are searched for
- * \param theBaseEdge - the edge nodes of which are columns' bases
- * \param theMesh - the mesh containing nodes
- * \retval bool - false if something is wrong
- * 
- * The key of the map is a normalized parameter of each
- * base node on theBaseEdge.
- * This method works in supposition that nodes on the face
- * forms a rectangular grid and elements can be quardrangles or triangles
- */
+//function : LoadNodeColumns
+//purpose  : Load nodes bound to face into a map of node columns
 //=======================================================================
 
 bool SMESH_MesherHelper::LoadNodeColumns(TParam2ColumnMap & theParam2ColumnMap,
@@ -1061,251 +1185,69 @@ bool SMESH_MesherHelper::LoadNodeColumns(TParam2ColumnMap & theParam2ColumnMap,
                                          const TopoDS_Edge& theBaseEdge,
                                          SMESHDS_Mesh*      theMesh)
 {
-  // get vertices of theBaseEdge
-  TopoDS_Vertex vfb, vlb, vft; // first and last, bottom and top vertices
-  TopoDS_Edge eFrw = TopoDS::Edge( theBaseEdge.Oriented( TopAbs_FORWARD ));
-  TopExp::Vertices( eFrw, vfb, vlb );
-
-  // find the other edges of theFace and orientation of e1
-  TopoDS_Edge e1, e2, eTop;
-  bool rev1, CumOri = false;
-  TopExp_Explorer exp( theFace, TopAbs_EDGE );
-  int nbEdges = 0;
-  for ( ; exp.More(); exp.Next() ) {
-    if ( ++nbEdges > 4 ) {
-      return false; // more than 4 edges in theFace
-    }
-    TopoDS_Edge e = TopoDS::Edge( exp.Current() );
-    if ( theBaseEdge.IsSame( e ))
-      continue;
-    TopoDS_Vertex vCommon;
-    if ( !TopExp::CommonVertex( theBaseEdge, e, vCommon ))
-      eTop = e;
-    else if ( vCommon.IsSame( vfb )) {
-      e1 = e;
-      vft = TopExp::LastVertex( e1, CumOri );
-      rev1 = vfb.IsSame( vft );
-      if ( rev1 )
-        vft = TopExp::FirstVertex( e1, CumOri );
-    }
-    else
-      e2 = e;
-  }
-  if ( nbEdges < 4 ) {
-    return false; // less than 4 edges in theFace
-  }
-  if ( e2.IsNull() && vfb.IsSame( vlb ))
-    e2 = e1;
-
-  // submeshes corresponding to shapes
-  SMESHDS_SubMesh* smFace = theMesh->MeshElements( theFace );
-  SMESHDS_SubMesh* smb = theMesh->MeshElements( theBaseEdge );
-  SMESHDS_SubMesh* smt = theMesh->MeshElements( eTop );
-  SMESHDS_SubMesh* sm1 = theMesh->MeshElements( e1 );
-  SMESHDS_SubMesh* sm2 = theMesh->MeshElements( e2 );
-  SMESHDS_SubMesh* smVfb = theMesh->MeshElements( vfb );
-  SMESHDS_SubMesh* smVlb = theMesh->MeshElements( vlb );
-  SMESHDS_SubMesh* smVft = theMesh->MeshElements( vft );
-  if (!smFace || !smb || !smt || !sm1 || !sm2 || !smVfb || !smVlb || !smVft ) {
-    RETURN_BAD_RESULT( "NULL submesh " <<smFace<<" "<<smb<<" "<<smt<<" "<<
-                       sm1<<" "<<sm2<<" "<<smVfb<<" "<<smVlb<<" "<<smVft);
-  }
-  if ( smb->NbNodes() != smt->NbNodes() || sm1->NbNodes() != sm2->NbNodes() ) {
-    RETURN_BAD_RESULT(" Diff nb of nodes on opposite edges" );
-  }
-  if (smVfb->NbNodes() != 1 || smVlb->NbNodes() != 1 || smVft->NbNodes() != 1) {
-    RETURN_BAD_RESULT("Empty submesh of vertex");
-  }
-  // define whether mesh is quadratic
-  bool isQuadraticMesh = false;
-  SMDS_ElemIteratorPtr eIt = smFace->GetElements();
-  if ( !eIt->more() ) {
-    RETURN_BAD_RESULT("No elements on the face");
-  }
-  const SMDS_MeshElement* e = eIt->next();
-  isQuadraticMesh = e->IsQuadratic();
-  
-  if ( sm1->NbNodes() * smb->NbNodes() != smFace->NbNodes() ) {
-    // check quadratic case
-    if ( isQuadraticMesh ) {
-      // what if there are quadrangles and triangles mixed?
-//       int n1 = sm1->NbNodes()/2;
-//       int n2 = smb->NbNodes()/2;
-//       int n3 = sm1->NbNodes() - n1;
-//       int n4 = smb->NbNodes() - n2;
-//       int nf = sm1->NbNodes()*smb->NbNodes() - n3*n4;
-//       if( nf != smFace->NbNodes() ) {
-//         MESSAGE( "Wrong nb face nodes: " <<
-//                 sm1->NbNodes()<<" "<<smb->NbNodes()<<" "<<smFace->NbNodes());
-//         return false;
-//       }
-    }
-    else {
-      RETURN_BAD_RESULT( "Wrong nb face nodes: " <<
-                         sm1->NbNodes()<<" "<<smb->NbNodes()<<" "<<smFace->NbNodes());
-    }
+  SMESHDS_SubMesh* faceSubMesh = theMesh->MeshElements( theFace );
+  if ( !faceSubMesh || faceSubMesh->NbElements() == 0 )
+    return false;
+
+  // get nodes on theBaseEdge sorted by param on edge and initialize theParam2ColumnMap with them
+
+  map< double, const SMDS_MeshNode*> sortedBaseNodes;
+  if ( !SMESH_Algo::GetSortedNodesOnEdge( theMesh, theBaseEdge,/*noMedium=*/true, sortedBaseNodes)
+       || sortedBaseNodes.size() < 2 )
+    return false;
+
+  int nbRows = faceSubMesh->NbElements() / ( sortedBaseNodes.size()-1 ) + 1;
+  map< double, const SMDS_MeshNode*>::iterator u_n = sortedBaseNodes.begin();
+  double f = u_n->first, range = sortedBaseNodes.rbegin()->first - f;
+  for ( ; u_n != sortedBaseNodes.end(); u_n++ )
+  {
+    double par = ( u_n->first - f ) / range;
+    vector<const SMDS_MeshNode*>& nCol = theParam2ColumnMap[ par ];
+    nCol.resize( nbRows );
+    nCol[0] = u_n->second;
   }
-  // IJ size
-  int vsize = sm1->NbNodes() + 2;
-  int hsize = smb->NbNodes() + 2;
-  if(isQuadraticMesh) {
-    vsize = vsize - sm1->NbNodes()/2 -1;
-    hsize = hsize - smb->NbNodes()/2 -1;
-  }
-
-  // load nodes from theBaseEdge
-
-  std::set<const SMDS_MeshNode*> loadedNodes;
-  const SMDS_MeshNode* nullNode = 0;
-
-  std::vector<const SMDS_MeshNode*> & nVecf = theParam2ColumnMap[ 0.];
-  nVecf.resize( vsize, nullNode );
-  loadedNodes.insert( nVecf[ 0 ] = smVfb->GetNodes()->next() );
-
-  std::vector<const SMDS_MeshNode*> & nVecl = theParam2ColumnMap[ 1.];
-  nVecl.resize( vsize, nullNode );
-  loadedNodes.insert( nVecl[ 0 ] = smVlb->GetNodes()->next() );
-
-  double f, l;
-  BRep_Tool::Range( eFrw, f, l );
-  double range = l - f;
-  SMDS_NodeIteratorPtr nIt = smb->GetNodes();
-  const SMDS_MeshNode* node;
-  while ( nIt->more() ) {
-    node = nIt->next();
-    if(IsMedium(node, SMDSAbs_Edge))
-      continue;
-    const SMDS_EdgePosition* pos =
-      dynamic_cast<const SMDS_EdgePosition*>( node->GetPosition() );
-    if ( !pos ) {
-      return false;
-    }
-    double u = ( pos->GetUParameter() - f ) / range;
-    std::vector<const SMDS_MeshNode*> & nVec = theParam2ColumnMap[ u ];
-    nVec.resize( vsize, nullNode );
-    loadedNodes.insert( nVec[ 0 ] = node );
-  }
-  if ( theParam2ColumnMap.size() != hsize ) {
-    RETURN_BAD_RESULT( "Wrong node positions on theBaseEdge" );
-  }
-
-  // load nodes from e1
-
-  std::map< double, const SMDS_MeshNode*> sortedNodes; // sort by param on edge
-  nIt = sm1->GetNodes();
-  while ( nIt->more() ) {
-    node = nIt->next();
-    if(IsMedium(node))
-      continue;
-    const SMDS_EdgePosition* pos =
-      dynamic_cast<const SMDS_EdgePosition*>( node->GetPosition() );
-    if ( !pos ) {
-      return false;
-    }
-    sortedNodes.insert( std::make_pair( pos->GetUParameter(), node ));
-  }
-  loadedNodes.insert( nVecf[ vsize - 1 ] = smVft->GetNodes()->next() );
-  std::map< double, const SMDS_MeshNode*>::iterator u_n = sortedNodes.begin();
-  int row  = rev1 ? vsize - 1 : 0;
-  int dRow = rev1 ? -1 : +1;
-  for ( ; u_n != sortedNodes.end(); u_n++ ) {
-    row += dRow;
-    loadedNodes.insert( nVecf[ row ] = u_n->second );
-  }
-
-  // try to load the rest nodes
-
-  // get all faces from theFace
-  TIDSortedElemSet allFaces, foundFaces;
-  eIt = smFace->GetElements();
-  while ( eIt->more() ) {
-    const SMDS_MeshElement* e = eIt->next();
-    if ( e->GetType() == SMDSAbs_Face )
-      allFaces.insert( e );
-  }
-  // Starting from 2 neighbour nodes on theBaseEdge, look for a face
-  // the nodes belong to, and between the nodes of the found face,
-  // look for a not loaded node considering this node to be the next
-  // in a column of the starting second node. Repeat, starting
-  // from nodes next to the previous starting nodes in their columns,
-  // and so on while a face can be found. Then go the the next pair
-  // of nodes on theBaseEdge.
-  TParam2ColumnMap::iterator par_nVec_1 = theParam2ColumnMap.begin();
-  TParam2ColumnMap::iterator par_nVec_2 = par_nVec_1;
-  // loop on columns
-  int col = 0;
-  for ( par_nVec_2++; par_nVec_2 != theParam2ColumnMap.end(); par_nVec_1++, par_nVec_2++ ) {
-    col++;
-    row = 0;
-    const SMDS_MeshNode* n1 = par_nVec_1->second[ row ];
-    const SMDS_MeshNode* n2 = par_nVec_2->second[ row ];
-    const SMDS_MeshElement* face = 0;
-    bool lastColOnClosedFace = ( nVecf[ row ] == n2 );
-    do {
-      // look for a face by 2 nodes
-      face = SMESH_MeshEditor::FindFaceInSet( n1, n2, allFaces, foundFaces );
-      if ( face ) {
-        int nbFaceNodes = face->NbNodes();
-        if ( face->IsQuadratic() )
-          nbFaceNodes /= 2;
-        if ( nbFaceNodes>4 ) {
-          RETURN_BAD_RESULT(" Too many nodes in a face: " << nbFaceNodes );
-        }
-        // look for a not loaded node of the <face>
-        bool found = false;
-        const SMDS_MeshNode* n3 = 0; // a node defferent from n1 and n2
-        for ( int i = 0; i < nbFaceNodes && !found; ++i ) {
-          node = face->GetNode( i );
-          found = loadedNodes.insert( node ).second;
-          if ( !found && node != n1 && node != n2 )
-            n3 = node;
-        }
-        if ( lastColOnClosedFace && row + 1 < vsize ) {
-          node = nVecf[ row + 1 ];
-          found = ( face->GetNodeIndex( node ) >= 0 );
-        }
-        if ( found ) {
-          if ( ++row > vsize - 1 ) {
-            RETURN_BAD_RESULT( "Too many nodes in column "<< col <<": "<< row+1);
-          }
-          par_nVec_2->second[ row ] = node;
-          foundFaces.insert( face );
-          n2 = node;
-          if ( nbFaceNodes==4 ) {
-            n1 = par_nVec_1->second[ row ];
-          }
-        }
-        else if ( nbFaceNodes==3 && n3 == par_nVec_1->second[ row + 1 ] ) {
-          n1 = n3;
-        }
-        else  {
-          RETURN_BAD_RESULT( "Not quad mesh, column "<< col );
-        }
+
+  // fill theParam2ColumnMap column by column by passing from nodes on
+  // theBaseEdge up via mesh faces on theFace
+
+  TParam2ColumnMap::iterator par_nVec_2 = theParam2ColumnMap.begin();
+  TParam2ColumnMap::iterator par_nVec_1 = par_nVec_2++;
+  TIDSortedElemSet emptySet, avoidSet;
+  for ( ; par_nVec_2 != theParam2ColumnMap.end(); ++par_nVec_1, ++par_nVec_2 )
+  {
+    vector<const SMDS_MeshNode*>& nCol1 = par_nVec_1->second;
+    vector<const SMDS_MeshNode*>& nCol2 = par_nVec_2->second;
+
+    int i1, i2, iRow = 0;
+    const SMDS_MeshNode *n1 = nCol1[0], *n2 = nCol2[0];
+    // find face sharing node n1 and n2 and belonging to faceSubMesh
+    while ( const SMDS_MeshElement* face =
+            SMESH_MeshEditor::FindFaceInSet( n1, n2, emptySet, avoidSet, &i1, &i2))
+    {
+      if ( faceSubMesh->Contains( face ))
+      {
+        int nbNodes = face->IsQuadratic() ? face->NbNodes()/2 : face->NbNodes();
+        if ( nbNodes != 4 )
+          return false;
+        n1 = face->GetNode( (i2+2) % 4 ); // opposite corner of quadrangle face
+        n2 = face->GetNode( (i1+2) % 4 );
+        if ( ++iRow >= nbRows )
+          return false;
+        nCol1[ iRow ] = n1;
+        nCol2[ iRow ] = n2;
+        avoidSet.clear();
       }
+      avoidSet.insert( face );
     }
-    while ( face && n1 && n2 );
-
-    if ( row < vsize - 1 ) {
-      MESSAGE( "Too few nodes in column "<< col <<": "<< row+1);
-      MESSAGE( "Base node 1: "<< par_nVec_1->second[0]);
-      MESSAGE( "Base node 2: "<< par_nVec_2->second[0]);
-      if ( n1 ) { MESSAGE( "Current node 1: "<< n1); }
-      else      { MESSAGE( "Current node 1: NULL");  }
-      if ( n2 ) { MESSAGE( "Current node 2: "<< n2); }
-      else      { MESSAGE( "Current node 2: NULL");  }
-      MESSAGE( "first base node: "<< theParam2ColumnMap.begin()->second[0]);
-      MESSAGE( "last base node: "<< theParam2ColumnMap.rbegin()->second[0]);
-      return false;
-    }
-  } // loop on columns
-
+    if ( iRow + 1 < nbRows ) // compact if necessary
+      nCol1.resize( iRow + 1 ), nCol2.resize( iRow + 1 );
+  }
   return true;
 }
 
 //=======================================================================
-/*!
- * \brief Return number of unique ancestors of the shape
- */
+//function : NbAncestors
+//purpose  : Return number of unique ancestors of the shape
 //=======================================================================
 
 int SMESH_MesherHelper::NbAncestors(const TopoDS_Shape& shape,
@@ -1322,11 +1264,69 @@ int SMESH_MesherHelper::NbAncestors(const TopoDS_Shape& shape,
 }
 
 //=======================================================================
-/**
- * Check mesh without geometry for: if all elements on this shape are quadratic,
- * quadratic elements will be created.
- * Used then generated 3D mesh without geometry.
- */
+//function : GetSubShapeOri
+//purpose  : Return orientation of sub-shape in the main shape
+//=======================================================================
+
+TopAbs_Orientation SMESH_MesherHelper::GetSubShapeOri(const TopoDS_Shape& shape,
+                                                      const TopoDS_Shape& subShape)
+{
+  TopAbs_Orientation ori = TopAbs_Orientation(-1);
+  if ( !shape.IsNull() && !subShape.IsNull() )
+  {
+    TopExp_Explorer e( shape, subShape.ShapeType() );
+    if ( shape.Orientation() >= TopAbs_INTERNAL ) // TopAbs_INTERNAL or TopAbs_EXTERNAL
+      e.Init( shape.Oriented(TopAbs_FORWARD), subShape.ShapeType() );
+    for ( ; e.More(); e.Next())
+      if ( subShape.IsSame( e.Current() ))
+        break;
+    if ( e.More() )
+      ori = e.Current().Orientation();
+  }
+  return ori;
+}
+
+//=======================================================================
+//function : IsSubShape
+//purpose  : 
+//=======================================================================
+
+bool SMESH_MesherHelper::IsSubShape( const TopoDS_Shape& shape,
+                                     const TopoDS_Shape& mainShape )
+{
+  if ( !shape.IsNull() && !mainShape.IsNull() )
+  {
+    for ( TopExp_Explorer exp( mainShape, shape.ShapeType());
+          exp.More();
+          exp.Next() )
+      if ( shape.IsSame( exp.Current() ))
+        return true;
+  }
+  SCRUTE((shape.IsNull()));
+  SCRUTE((mainShape.IsNull()));
+  return false;
+}
+
+//=======================================================================
+//function : IsSubShape
+//purpose  : 
+//=======================================================================
+
+bool SMESH_MesherHelper::IsSubShape( const TopoDS_Shape& shape, SMESH_Mesh* aMesh )
+{
+  if ( shape.IsNull() || !aMesh )
+    return false;
+  return
+    aMesh->GetMeshDS()->ShapeToIndex( shape ) ||
+    // PAL16202
+    shape.ShapeType() == TopAbs_COMPOUND && aMesh->GetMeshDS()->IsGroupOfSubShapes( shape );
+}
+
+//=======================================================================
+//function : IsQuadraticMesh
+//purpose  : Check mesh without geometry for: if all elements on this shape are quadratic,
+//           quadratic elements will be created.
+//           Used then generated 3D mesh without geometry.
 //=======================================================================
 
 SMESH_MesherHelper:: MType SMESH_MesherHelper::IsQuadraticMesh()
@@ -1357,14 +1357,14 @@ SMESH_MesherHelper:: MType SMESH_MesherHelper::IsQuadraticMesh()
 }
 
 //=======================================================================
-/*!
- * \brief Return an alternative parameter for a node on seam
- */
+//function : GetOtherParam
+//purpose  : Return an alternative parameter for a node on seam
 //=======================================================================
 
 double SMESH_MesherHelper::GetOtherParam(const double param) const
 {
-  return fabs(param-myPar1) < fabs(param-myPar2) ? myPar2 : myPar1;
+  int i = myParIndex & U_periodic ? 0 : 1;
+  return fabs(param-myPar1[i]) < fabs(param-myPar2[i]) ? myPar2[i] : myPar1[i];
 }
 
 //=======================================================================
@@ -1475,8 +1475,11 @@ namespace { // Structures used by FixQuadraticElements()
     mutable vector< const QLink* >  _sides;
     mutable bool                    _sideIsAdded[4]; // added in chain of links
     gp_Vec                          _normal;
+#ifdef _DEBUG_
+    mutable const SMDS_MeshElement* _face;
+#endif
 
-    QFace( const vector< const QLink*>& links );
+    QFace( const vector< const QLink*>& links, const SMDS_MeshElement* face=0 );
 
     void SetVolume(const SMDS_MeshElement* v) const { _volumes[ _volumes[0] ? 1 : 0 ] = v; }
 
@@ -1490,16 +1493,16 @@ namespace { // Structures used by FixQuadraticElements()
       for (int i=0; i<_sides.size(); ++i ) if ( _sides[i] == side ) return i;
       return -1;
     }
-    bool GetLinkChain( int iSide, TChain& chain, SMDS_TypeOfPosition pos, int& error) const;
+    bool GetLinkChain( int iSide, TChain& chain, SMDS_TypeOfPosition pos, int& err) const;
 
-    bool GetLinkChain( TChainLink& link, TChain& chain, SMDS_TypeOfPosition pos, int& error) const
+    bool GetLinkChain( TChainLink& link, TChain& chain, SMDS_TypeOfPosition pos, int& err) const
     {
       int i = LinkIndex( link._qlink );
       if ( i < 0 ) return true;
       _sideIsAdded[i] = true;
       link.SetFace( this );
       // continue from opposite link
-      return GetLinkChain( (i+2)%_sides.size(), chain, pos, error );
+      return GetLinkChain( (i+2)%_sides.size(), chain, pos, err );
     }
     bool IsBoundary() const { return !_volumes[1]; }
 
@@ -1509,7 +1512,8 @@ namespace { // Structures used by FixQuadraticElements()
                                 const TChainLink&    avoidLink,
                                 TLinkInSet *         notBoundaryLink = 0,
                                 const SMDS_MeshNode* nodeToContain = 0,
-                                bool *               isAdjacentUsed = 0) const;
+                                bool *               isAdjacentUsed = 0,
+                                int                  nbRecursionsLeft = -1) const;
 
     TLinkInSet GetLinkByNode( const TLinkSet&      links,
                               const TChainLink&    avoidLink,
@@ -1563,7 +1567,7 @@ namespace { // Structures used by FixQuadraticElements()
    */
   //================================================================================
 
-  QFace::QFace( const vector< const QLink*>& links )
+  QFace::QFace( const vector< const QLink*>& links, const SMDS_MeshElement* face )
   {
     _volumes[0] = _volumes[1] = 0;
     _sides = links;
@@ -1584,6 +1588,10 @@ namespace { // Structures used by FixQuadraticElements()
       _normal /= sqrt( normSqSize );
     else
       _normal.SetCoord(1e-33,0,0);
+
+#ifdef _DEBUG_
+    _face = face;
+#endif
   }
   //================================================================================
   /*!
@@ -1606,14 +1614,18 @@ namespace { // Structures used by FixQuadraticElements()
 
     if ( _sides.size() != 4 ) { // triangle - visit all my continous faces
       MSGBEG( *this );
-      for ( int i = 0; i < _sides.size(); ++i ) {
-        if ( !_sideIsAdded[i] && _sides[i] ) {
-          _sideIsAdded[i]=true;
-          TChain::iterator chLink = chain.insert( chain.begin(), TChainLink(_sides[i]));
-          chLink->SetFace( this );
-          if ( _sides[i]->MediumPos() >= pos )
-            if ( const QFace* f = _sides[i]->GetContinuesFace( this ))
-              f->GetLinkChain( *chLink, chain, pos, error );
+      list< const QFace* > faces( 1, this );
+      for (list< const QFace* >::iterator fIt = faces.begin(); fIt != faces.end(); ++fIt ) {
+        const QFace* face = *fIt;
+        for ( int i = 0; i < face->_sides.size(); ++i ) {
+          if ( !face->_sideIsAdded[i] && face->_sides[i] ) {
+            face->_sideIsAdded[i] = true;
+            TChain::iterator chLink = chain.insert( chain.begin(), TChainLink(face->_sides[i]));
+            chLink->SetFace( face );
+            if ( face->_sides[i]->MediumPos() >= pos )
+              if ( const QFace* contFace = face->_sides[i]->GetContinuesFace( face ))
+                faces.push_back( contFace );
+          }
         }
       }
       if ( error < ERR_TRI )
@@ -1630,7 +1642,7 @@ namespace { // Structures used by FixQuadraticElements()
     chLink->SetFace( this );
     MSGBEG( *this );
 
-    // propagate from rectangle to neighbour faces
+    // propagate from quadrangle to neighbour faces
     if ( link->MediumPos() >= pos ) {
       int nbLinkFaces = link->_faces.size();
       if ( nbLinkFaces == 4 || nbLinkFaces < 4 && link->OnBoundary()) {
@@ -1660,6 +1672,7 @@ namespace { // Structures used by FixQuadraticElements()
    *  \param nodeToContain - node the returned link must contain; if provided, search
    *                         also performed on adjacent faces
    *  \param isAdjacentUsed - returns true if link is found in adjacent faces
+   *  \param nbRecursionsLeft - to limit recursion
    */
   //================================================================================
 
@@ -1667,7 +1680,8 @@ namespace { // Structures used by FixQuadraticElements()
                                      const TChainLink&    avoidLink,
                                      TLinkInSet *         notBoundaryLink,
                                      const SMDS_MeshNode* nodeToContain,
-                                     bool *               isAdjacentUsed) const
+                                     bool *               isAdjacentUsed,
+                                     int                  nbRecursionsLeft) const
   {
     TLinkInSet linksEnd = links.end(), boundaryLink = linksEnd;
 
@@ -1680,6 +1694,8 @@ namespace { // Structures used by FixQuadraticElements()
         continue;
       TLinkInSet link = links.find( _sides[iL] );
       if ( link == linksEnd ) continue;
+      if ( (*link)->MediumPos() > SMDS_TOP_FACE )
+        continue; // We work on faces here, don't go into a volume
 
       // check link
       if ( link->IsBoundary() ) {
@@ -1696,19 +1712,21 @@ namespace { // Structures used by FixQuadraticElements()
         if ( boundaryLink != linksEnd ) break;
       }
 
-      if ( boundaryLink == linksEnd && nodeToContain ) // cellect adjacent faces
+      if ( boundaryLink == linksEnd && nodeToContain ) // collect adjacent faces
         if ( const QFace* adj = link->NextFace( this ))
           if ( adj->Contains( nodeToContain ))
             adjacentFaces.push_back( make_pair( adj, link ));
     }
 
     if ( isAdjacentUsed ) *isAdjacentUsed = false;
-    if ( boundaryLink == linksEnd && nodeToContain ) // check adjacent faces
+    if ( boundaryLink == linksEnd && nodeToContain && nbRecursionsLeft) // check adjacent faces
     {
+      if ( nbRecursionsLeft < 0 )
+        nbRecursionsLeft = nodeToContain->NbInverseElements();
       TFaceLinkList::iterator adj = adjacentFaces.begin();
       for ( ; boundaryLink == linksEnd && adj != adjacentFaces.end(); ++adj )
-        boundaryLink = adj->first->GetBoundaryLink( links, *(adj->second),
-                                                    0, nodeToContain, isAdjacentUsed);
+        boundaryLink = adj->first->GetBoundaryLink( links, *(adj->second), 0, nodeToContain,
+                                                    isAdjacentUsed, nbRecursionsLeft-1);
       if ( isAdjacentUsed ) *isAdjacentUsed = true;
     }
     return boundaryLink;
@@ -1812,6 +1830,8 @@ namespace { // Structures used by FixQuadraticElements()
     int iL1 = (iL + 1) % 3, iL2 = (iL + 2) % 3; // indices of the two other links of triangle
     TLinkInSet link1 = theLinks.find( _sides[iL1] );
     TLinkInSet link2 = theLinks.find( _sides[iL2] );
+    if ( link1 == theLinks.end() || link2 == theLinks.end() )
+      return thePrevLen;
     const QFace* f1 = link1->NextFace( this ); // adjacent faces
     const QFace* f2 = link2->NextFace( this );
 
@@ -2247,14 +2267,14 @@ void SMESH_MesherHelper::FixQuadraticElements(bool volumeOnly)
     for ( TopExp_Explorer f(myShape,TopAbs_FACE,TopAbs_SOLID); f.More(); f.Next() ) {
       faces.Add( f.Current() );
     }
-    for ( TopExp_Explorer v(myShape,TopAbs_SOLID); v.More(); v.Next() ) {
-      if ( myMesh->GetSubMesh( v.Current() )->IsEmpty() ) { // get faces of solid
-        for ( TopExp_Explorer f( v.Current(), TopAbs_FACE); f.More(); f.Next() )
+    for ( TopExp_Explorer s(myShape,TopAbs_SOLID); s.More(); s.Next() ) {
+      if ( myMesh->GetSubMesh( s.Current() )->IsEmpty() ) { // get faces of solid
+        for ( TopExp_Explorer f( s.Current(), TopAbs_FACE); f.More(); f.Next() )
           faces.Add( f.Current() );
       }
       else { // fix nodes in the solid and its faces
         SMESH_MesherHelper h(*myMesh);
-        h.SetSubShape( v.Current() );
+        h.SetSubShape( s.Current() );
         h.FixQuadraticElements(false);
       }
     }
@@ -2262,7 +2282,7 @@ void SMESH_MesherHelper::FixQuadraticElements(bool volumeOnly)
     for ( TopTools_MapIteratorOfMapOfShape fIt( faces ); fIt.More(); fIt.Next() ) {
       SMESH_MesherHelper h(*myMesh);
       h.SetSubShape( fIt.Key() );
-      h.FixQuadraticElements();
+      h.FixQuadraticElements(true);
     }
     return;
   }
@@ -2331,6 +2351,13 @@ void SMESH_MesherHelper::FixQuadraticElements(bool volumeOnly)
         hasRectFaces = hasRectFaces ||
           ( volTool.GetVolumeType() == SMDS_VolumeTool::QUAD_HEXA ||
             volTool.GetVolumeType() == SMDS_VolumeTool::QUAD_PENTA );
+#ifdef _DEBUG_
+        if ( nbN == 6 )
+          pFace->_face = GetMeshDS()->FindFace(faceNodes[0],faceNodes[2],faceNodes[4]);
+        else
+          pFace->_face = GetMeshDS()->FindFace(faceNodes[0],faceNodes[2],
+                                               faceNodes[4],faceNodes[6] );
+#endif
       }
     }
     set< QLink >::iterator pLink = links.begin();
@@ -2373,7 +2400,7 @@ void SMESH_MesherHelper::FixQuadraticElements(bool volumeOnly)
   // not treat boundary of volumic submesh
   int isInside = ( elemType == SMDSAbs_Volume && volumeOnly ) ? 1 : 0;
   for ( ; isInside < 2; ++isInside ) {
-    MSG( "--------------- LOOP " << isInside << " ------------------");
+    MSG( "--------------- LOOP (inside=" << isInside << ") ------------------");
     SMDS_TypeOfPosition pos = isInside ? SMDS_TOP_3DSPACE : SMDS_TOP_FACE;
 
     for ( pFace = faces.begin(); pFace != faces.end(); ++pFace ) {
@@ -2390,18 +2417,18 @@ void SMESH_MesherHelper::FixQuadraticElements(bool volumeOnly)
         if ( !pFace->GetLinkChain( dir+2, rawChain, pos, error ) && error ==ERR_UNKNOWN ) continue;
 
         vector< TChain > chains;
-        if ( error == ERR_OK ) { // chains contains continues rectangles
+        if ( error == ERR_OK ) { // chain contains continues rectangles
           chains.resize(1);
           chains[0].splice( chains[0].begin(), rawChain );
         }
-        else if ( error == ERR_TRI ) {  // chains contains continues triangles
+        else if ( error == ERR_TRI ) {  // chain contains continues triangles
           TSplitTriaResult res = splitTrianglesIntoChains( rawChain, chains, pos );
-          if ( res != _OK ) { // not rectangles split into triangles
+          if ( res != _OK ) { // not quadrangles split into triangles
             fixTriaNearBoundary( rawChain, *this );
             break;
           }
         }
-        else if ( error == ERR_PRISM ) { // side faces of prisms
+        else if ( error == ERR_PRISM ) { // quadrangle side faces of prisms
           fixPrism( rawChain );
           break;
         }
@@ -2446,16 +2473,20 @@ void SMESH_MesherHelper::FixQuadraticElements(bool volumeOnly)
             // compute node displacement of end links in parametric space of face
             const SMDS_MeshNode* nodeOnFace = (*(++chain.begin()))->_mediumNode;
             TopoDS_Shape f = GetSubShapeByNode( nodeOnFace, GetMeshDS() );
-            if ( !f.IsNull() && f.ShapeType() == TopAbs_FACE ) {
+            if ( !f.IsNull() && f.ShapeType() == TopAbs_FACE )
+            {
               face = TopoDS::Face( f );
-              for ( int is1 = 0; is1 < 2; ++is1 ) { // move0 or move1
+              Handle(Geom_Surface) surf = BRep_Tool::Surface(face,loc);
+              for ( int is1 = 0; is1 < 2; ++is1 ) // move0 or move1
+              {
                 TChainLink& link = is1 ? chain.back() : chain.front();
+                gp_XY uvm = GetNodeUV( face, link->_mediumNode, nodeOnFace, &checkUV);
                 gp_XY uv1 = GetNodeUV( face, link->node1(), nodeOnFace, &checkUV);
                 gp_XY uv2 = GetNodeUV( face, link->node2(), nodeOnFace, &checkUV);
-                gp_XY uvm = GetNodeUV( face, link->_mediumNode, nodeOnFace, &checkUV);
-                gp_XY uvMove = uvm - GetMiddleUV( BRep_Tool::Surface(face,loc), uv1, uv2);
-                if ( is1 ) move1.SetCoord( uvMove.X(), uvMove.Y(), 0 );
-                else       move0.SetCoord( uvMove.X(), uvMove.Y(), 0 );
+                gp_XY uv12 = GetMiddleUV( surf, uv1, uv2);
+                // uvMove = uvm - uv12
+                gp_XY uvMove = applyIn2D(surf, uvm, uv12, gp_XY_Subtracted, /*inPeriod=*/false);
+                ( is1 ? move1 : move0 ).SetCoord( uvMove.X(), uvMove.Y(), 0 );
               }
               if ( move0.SquareMagnitude() < straightTol2 &&
                    move1.SquareMagnitude() < straightTol2 ) {
@@ -2500,9 +2531,10 @@ void SMESH_MesherHelper::FixQuadraticElements(bool volumeOnly)
             }
             else {
               // compute 3D displacement by 2D one
+              Handle(Geom_Surface) s = BRep_Tool::Surface(face,loc);
               gp_XY oldUV   = GetNodeUV( face, (*link1)->_mediumNode, 0, &checkUV);
-              gp_XY newUV   = oldUV + gp_XY( move.X(), move.Y() );
-              gp_Pnt newPnt = BRep_Tool::Surface(face,loc)->Value( newUV.X(), newUV.Y());
+              gp_XY newUV   = applyIn2D( s, oldUV, gp_XY( move.X(),move.Y()), gp_XY_Added);
+              gp_Pnt newPnt = s->Value( newUV.X(), newUV.Y());
               move = gp_Vec( XYZ((*link1)->_mediumNode), newPnt.Transformed(loc) );
 #ifdef _DEBUG_
               if ( (XYZ((*link1)->node1()) - XYZ((*link1)->node2())).SquareModulus() <
@@ -2539,3 +2571,46 @@ void SMESH_MesherHelper::FixQuadraticElements(bool volumeOnly)
     }
   }
 }
+
+//=======================================================================
+/*!
+ * \brief Iterator on ancestors of the given type
+ */
+//=======================================================================
+
+struct TAncestorsIterator : public SMDS_Iterator<const TopoDS_Shape*>
+{
+  TopTools_ListIteratorOfListOfShape _ancIter;
+  TopAbs_ShapeEnum                   _type;
+  TAncestorsIterator( const TopTools_ListOfShape& ancestors, TopAbs_ShapeEnum type)
+    : _ancIter( ancestors ), _type( type )
+  {
+    if ( _ancIter.More() && _ancIter.Value().ShapeType() != _type ) next();
+  }
+  virtual bool more()
+  {
+    return _ancIter.More();
+  }
+  virtual const TopoDS_Shape* next()
+  {
+    const TopoDS_Shape* s = _ancIter.More() ? & _ancIter.Value() : 0;
+    if ( _ancIter.More() )
+      for ( _ancIter.Next();  _ancIter.More(); _ancIter.Next())
+        if ( _ancIter.Value().ShapeType() == _type )
+          break;
+    return s;
+  }
+};
+
+//=======================================================================
+/*!
+ * \brief Return iterator on ancestors of the given type
+ */
+//=======================================================================
+
+PShapeIteratorPtr SMESH_MesherHelper::GetAncestors(const TopoDS_Shape& shape,
+                                                   const SMESH_Mesh&   mesh,
+                                                   TopAbs_ShapeEnum    ancestorType)
+{
+  return PShapeIteratorPtr( new TAncestorsIterator( mesh.GetAncestors(shape), ancestorType));
+}
index 80bd0affa1b09cbb6abdcbd59e3904ff36e8baf8..3fece8a8264aabfc4289f8873b54ccc6d3d3e74f 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File:      SMESH_MesherHelper.hxx
 // Created:   15.02.06 14:48:09
 // Author:    Sergey KUUL
 
 #include <map>
 
+class GeomAPI_ProjectPointOnSurf;
+
 typedef std::map<SMESH_TLink, const SMDS_MeshNode*>           TLinkNodeMap;
 typedef std::map<SMESH_TLink, const SMDS_MeshNode*>::iterator ItTLinkNode;
 
+typedef SMDS_Iterator<const TopoDS_Shape*>  PShapeIterator;
+typedef boost::shared_ptr< PShapeIterator > PShapeIteratorPtr;
+  
+typedef std::vector<const SMDS_MeshNode* > TNodeColumn;
+typedef std::map< double, TNodeColumn >    TParam2ColumnMap;
+
+typedef gp_XY (*xyFunPtr)(const gp_XY& uv1, const gp_XY& uv2);
+
+//=======================================================================
 /*!
  * \brief It helps meshers to add elements
  *
@@ -50,9 +62,7 @@ typedef std::map<SMESH_TLink, const SMDS_MeshNode*>::iterator ItTLinkNode;
  * It defines degree of elements to create when IsQuadraticSubMesh()
  * is called.
  */
-
-typedef std::vector<const SMDS_MeshNode* > TNodeColumn;
-typedef std::map< double, TNodeColumn > TParam2ColumnMap;
+//=======================================================================
 
 class SMESH_EXPORT SMESH_MesherHelper
 {
@@ -112,6 +122,23 @@ public:
   static int NbAncestors(const TopoDS_Shape& shape,
                          const SMESH_Mesh&   mesh,
                          TopAbs_ShapeEnum    ancestorType=TopAbs_SHAPE);
+  /*!
+   * \brief Return iterator on ancestors of the given type
+   */
+  static PShapeIteratorPtr GetAncestors(const TopoDS_Shape& shape,
+                                        const SMESH_Mesh&   mesh,
+                                        TopAbs_ShapeEnum    ancestorType);
+
+  /*!
+   * \brief Return orientation of sub-shape in the main shape
+   */
+  static TopAbs_Orientation GetSubShapeOri(const TopoDS_Shape& shape,
+                                           const TopoDS_Shape& subShape);
+
+  static bool IsSubShape( const TopoDS_Shape& shape, const TopoDS_Shape& mainShape );
+
+  static bool IsSubShape( const TopoDS_Shape& shape, SMESH_Mesh* aMesh );
+
 
 public:
   // ---------- PUBLIC INSTANCE METHODS ----------
@@ -164,7 +191,7 @@ public:
   /*!
    * \brief Return the shape set by IsQuadraticSubMesh() or SetSubShape() 
    */
-  TopoDS_Shape GetSubShape() const  { return myShape; }
+  const TopoDS_Shape& GetSubShape() const  { return myShape; }
 
   /*!
    * Creates a node
@@ -242,6 +269,7 @@ public:
    */
   double GetNodeU(const TopoDS_Edge&   theEdge,
                   const SMDS_MeshNode* theNode,
+                  const SMDS_MeshNode* inEdgeNode=0,
                   bool*                check=0);
   /*!
    * \brief Return node UV on face
@@ -253,27 +281,68 @@ public:
                   bool*                check=0) const;
   /*!
    * \brief Check and fix node UV on a face
+   *  \param force - check even if checks of other nodes on this face passed OK
    *  \retval bool - false if UV is bad and could not be fixed
    */
   bool CheckNodeUV(const TopoDS_Face&   F,
                    const SMDS_MeshNode* n,
                    gp_XY&               uv,
-                   const double         tol) const;
+                   const double         tol,
+                   const bool           force=false) const;
+  /*!
+   * \brief Check and fix node U on an edge
+   *  \param force - check even if checks of other nodes on this edge passed OK
+   *  \retval bool - false if U is bad and could not be fixed
+   */
+  bool CheckNodeU(const TopoDS_Edge&   E,
+                  const SMDS_MeshNode* n,
+                  double&              u,
+                  const double         tol,
+                  const bool           force=false) const;
   /*!
    * \brief Return middle UV taking in account surface period
    */
   static gp_XY GetMiddleUV(const Handle(Geom_Surface)& surface,
                            const gp_XY&                uv1,
                            const gp_XY&                uv2);
+  /*!
+   * \brief Define a pointer to wrapper over a function of gp_XY class,
+   *       suitable to pass as xyFunPtr to applyIn2D().
+   *       For exaple gp_XY_FunPtr(Added) defines pointer gp_XY_Added to function
+   *       calling gp_XY::Added(gp_XY), which is to be used like following
+   *       applyIn2D(surf, uv1, uv2, gp_XY_Added)
+   */
+#define gp_XY_FunPtr(meth) \
+  static gp_XY __gpXY_##meth (const gp_XY& uv1, const gp_XY& uv2) { return uv1.meth( uv2 ); } \
+  static xyFunPtr gp_XY_##meth = & __gpXY_##meth
+
+  /*!
+   * \brief Perform given operation on two 2d points in parameric space of given surface.
+   *        It takes into account period of the surface. Use gp_XY_FunPtr macro
+   *        to easily define pointer to function of gp_XY class.
+   */
+  static gp_XY applyIn2D(const Handle(Geom_Surface)& surface,
+                         const gp_XY&                uv1,
+                         const gp_XY&                uv2,
+                         xyFunPtr                    fun,
+                         const bool                  resultInPeriod=true);
+                          
   /*!
    * \brief Check if inFaceNode argument is necessary for call GetNodeUV(F,..)
     * \retval bool - return true if the face is periodic
     *
-    * if F is Null, answer about subshape set through IsQuadraticSubMesh() or
+    * If F is Null, answer about subshape set through IsQuadraticSubMesh() or
     * SetSubShape()
    */
   bool GetNodeUVneedInFaceNode(const TopoDS_Face& F = TopoDS_Face()) const;
 
+  /*!
+   * \brief Return projector intitialized by given face without location, which is returned
+   */
+  GeomAPI_ProjectPointOnSurf& GetProjector(const TopoDS_Face& F,
+                                           TopLoc_Location&   loc,
+                                           double             tol=0 ) const; 
+
   /*!
    * \brief Check if shape is a degenerated edge or it's vertex
     * \param subShape - edge or vertex index in SMESHDS
@@ -283,6 +352,13 @@ public:
    */
   bool IsDegenShape(const int subShape) const
   { return myDegenShapeIds.find( subShape ) != myDegenShapeIds.end(); }
+  /*!
+   * \brief Check if the shape set through IsQuadraticSubMesh() or SetSubShape()
+   *        has a degenerated edges
+    * \retval bool - true if it has
+   */
+  bool HasDegeneratedEdges() const { return !myDegenShapeIds.empty(); }
+
   /*!
    * \brief Check if shape is a seam edge or it's vertex
     * \param subShape - edge or vertex index in SMESHDS
@@ -331,20 +407,23 @@ public:
    */
   double GetOtherParam(const double param) const;
 
-  /**
-   * Special function for search or creation medium node
+  /*!
+   * \brief Return existing or create new medium nodes between given ones
+   *  \param force3d - true means node creation at the middle between the
+   *                   two given nodes, else node position is found on its
+   *                   supporting geometrical shape, if any.
    */
   const SMDS_MeshNode* GetMediumNode(const SMDS_MeshNode* n1,
                                      const SMDS_MeshNode* n2,
                                      const bool force3d);
   /*!
-   * Auxilary function for filling myTLinkNodeMap
+   * \brief Add a link in my data structure
    */
   void AddTLinkNode(const SMDS_MeshNode* n1,
                     const SMDS_MeshNode* n2,
                     const SMDS_MeshNode* n12);
-  /**
-   * Auxilary function for filling myTLinkNodeMap
+  /*!
+   * \brief Add many links in my data structure
    */
   void AddTLinkNodeMap(const TLinkNodeMap& aMap)
     { myTLinkNodeMap.insert(aMap.begin(), aMap.end()); }
@@ -362,6 +441,8 @@ public:
   enum MType{ LINEAR, QUADRATIC, COMP };
   MType IsQuadraticMesh();
   
+  virtual ~SMESH_MesherHelper();
+
 protected:
 
   /*!
@@ -382,8 +463,11 @@ protected:
 
   std::set< int > myDegenShapeIds;
   std::set< int > mySeamShapeIds;
-  double          myPar1, myPar2; // bounds of a closed periodic surface
-  int             myParIndex;     // bounds' index (1-U, 2-V)
+  double          myPar1[2], myPar2[2]; // U and V bounds of a closed periodic surface
+  int             myParIndex;     // bounds' index (1-U, 2-V, 3-both)
+
+  typedef std::map< int, GeomAPI_ProjectPointOnSurf* > TID2Projector;
+  TID2Projector   myFace2Projector;
 
   TopoDS_Shape    myShape;
   SMESH_Mesh*     myMesh;
index 00bdb26698cb480a6c7404cf29b5b1c84460a2a6..519f9ad14ba78550bee645270e2b0dad9fba4893 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH  SMESH_Octree : global Octree implementation
-//
 //  File      : SMESH_Octree.cxx
 //  Created   : Tue Jan 16 16:00:00 2007
 //  Author    : Nicolas Geimer & Aurélien Motteux(OCC)
 //  Module    : SMESH
-
+//
 #include "SMESH_Octree.hxx"
 
 //===========================================================================
index 79a641dd4c262b003d8063cf961b20dd924e2afd..9f5570f9cefed162218ee63ff7c8236239830c43 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_Octree : global Octree implementation
-//
 //  File      : SMESH_Octree.hxx
 //  Created   : Tue Jan 16 16:00:00 2007
 //  Author    : Nicolas Geimer & Aurélien Motteux (OCC)
 //  Module    : SMESH
-
+//
 #ifndef _SMESH_OCTREE_HXX_
 #define _SMESH_OCTREE_HXX_
 
index 8a230d72e5046c32dfc8009ecbcaaf05a5dab2f4..37a7d4f1bac9505bd33cf0f45a3f2a08f1ea8a9a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_OctreeNode : Octree with Nodes set
 //  inherites global class SMESH_Octree
-//
 //  File      : SMESH_OctreeNode.cxx
 //  Created   : Tue Jan 16 16:00:00 2007
 //  Author    : Nicolas Geimer & Aurélien Motteux (OCC)
 //  Module    : SMESH
-
+//
 #include "SMESH_OctreeNode.hxx"
 
 #include "SMDS_MeshNode.hxx"
index 7799765d0076a03d48cf88953eb02f34e7659df0..f5e3fbf52ccdfa7ca19e230f0f0cc7aa64bcbfce 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_OctreeNode : Octree with Nodes set
 //  inherites global class SMESH_Octree
-//
 //  File      : SMESH_OctreeNode.hxx
 //  Created   : Tue Jan 16 16:00:00 2007
 //  Author    : Nicolas Geimer & Aurélien Motteux  (OCC)
 //  Module    : SMESH
-
+//
 #ifndef _SMESH_OCTREENODE_HXX_
 #define _SMESH_OCTREENODE_HXX_
 
@@ -50,7 +50,7 @@ class SMESH_OctreeNode : public SMESH_Octree {
 public:
 
   // Constructor
-  SMESH_OctreeNode (const std::set<const SMDS_MeshNode*>& theNodes, const int maxLevel = -1,
+  SMESH_OctreeNode (const std::set<const SMDS_MeshNode*>& theNodes, const int maxLevel = 8,
                     const int maxNbNodes = 5, const double minBoxSize = 0.);
 
 //=============================
index ae63f672e0d3dcd9f42fa36ead294a6064a119b9..d6aee34df540c641a3dd3d648ad5dd98997bf57c 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File      : SMESH_Pattern.hxx
 // Created   : Mon Aug  2 10:30:00 2004
 // Author    : Edward AGAPOV (eap)
@@ -3922,7 +3923,7 @@ bool SMESH_Pattern::MakeMesh(SMESH_Mesh* theMesh,
                                                 point->myXYZ.Z());
         nodesVector [ pIndex ] = node;
 
-        if ( true /*subMeshDS*/ ) {
+        if ( !S.IsNull() /*subMeshDS*/ ) {
           // !!!!! do not merge new nodes with ones existing on submeshes (see method comment)
           switch ( S.ShapeType() ) {
           case TopAbs_VERTEX: {
index ee87cbfb85d46582e2d9c97de759740a5458ca6b..4bac41585212723f49a7fe9bb477de4a9a4726cd 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File      : SMESH_Pattern.hxx
 // Created   : Mon Aug  2 10:30:00 2004
 // Author    : Edward AGAPOV (eap)
index 72923b2e997ca9d0ff20a94337d76cf97856f579..bad45dc019da285591572f5b11299af1af50ed48 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_SMESH.hxx
 //  Author : Alexander A. BORODIN
 //  Module : SMESH
index 77c92ad5aa84f7d82bc6f3e0a09c8d2dbbc370e5..a9b79f242105abeeeba864070322b390a312eabe 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File:      SMESH_SequenceOfElemPtr.hxx
 // Created:   26.09.05 17:41:10
 // Author:    Sergey KUUL
index 4eabe0ee61fa54b6ab206422edc0b03247b24006..df64b26693513ad4e218ff63166798aab23ada5f 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File:      SMESH_SequenceOfNode.hxx
 // Created:   11.11.05 10:00:04
 // Author:    Sergey KUUL
index 21d1675184e5ce3f911484c3b2308fab9430fe54..4d92816fc560af3ed3ed77e3a0c3cc519fdb7163 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_subMesh.cxx
 //  Author : Paul RASCLE, EDF
@@ -39,6 +40,7 @@
 
 #include "utilities.h"
 #include "OpUtil.hxx"
+#include "Basics_Utils.hxx"
 
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
@@ -54,6 +56,8 @@
 #include <Standard_OutOfMemory.hxx>
 #include <Standard_ErrorHandler.hxx>
 
+#include <numeric>
+
 using namespace std;
 
 //=============================================================================
@@ -1368,6 +1372,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
           algo->InitComputeError();
           MemoryReserve aMemoryReserve;
           SMDS_Mesh::CheckMemory();
+          Kernel_Utils::Localizer loc;
           if ( !_father->HasShapeToMesh() ) // no shape
           {
             SMESH_MesherHelper helper( *_father );
@@ -1598,11 +1603,9 @@ bool SMESH_subMesh::Evaluate(MapShapeNbElems& aResMap)
   bool ret = true;
 
   if (_subShape.ShapeType() == TopAbs_VERTEX) {
-    std::vector<int> aVec(SMDSEntity_Last);
-    for(int i= SMDSEntity_Node; i < SMDSEntity_Last; i++)
-      aVec[i] = 0;
+    vector<int> aVec(SMDSEntity_Last,0);
     aVec[SMDSEntity_Node] = 1;
-    aResMap.insert(std::make_pair(this,aVec));
+    aResMap.insert(make_pair(this,aVec));
     return ret;
   }
 
@@ -1611,15 +1614,32 @@ bool SMESH_subMesh::Evaluate(MapShapeNbElems& aResMap)
   SMESH_Hypothesis::Hypothesis_Status hyp_status;
 
   algo = gen->GetAlgo((*_father), _subShape);
-  if(algo) {
+  if(algo && !aResMap.count(this) )
+  {
     ret = algo->CheckHypothesis((*_father), _subShape, hyp_status);
     if (!ret) return false;
 
-    TopoDS_Shape shape = _subShape;
-
+    if (_father->HasShapeToMesh() && algo->NeedDescretBoundary())
+    {
+      // check submeshes needed
+      bool subMeshEvaluated = true;
+      int dimToCheck = SMESH_Gen::GetShapeDim( _subShape ) - 1;
+      SMESH_subMeshIteratorPtr smIt = getDependsOnIterator(false,/*complexShapeFirst=*/true);
+      while ( smIt->more() && subMeshEvaluated )
+      {
+        SMESH_subMesh* sm = smIt->next();
+        int dim = SMESH_Gen::GetShapeDim( sm->GetSubShape() );
+        if (dim < dimToCheck) break; // the rest subMeshes are all of less dimension
+        const vector<int> & nbs = aResMap[ sm ];
+        subMeshEvaluated = (std::accumulate( nbs.begin(), nbs.end(), 0 ) > 0 );
+      }
+      if ( !subMeshEvaluated )
+        return false;
+    }
     _computeError = SMESH_ComputeError::New(COMPERR_OK,"",algo);
+    ret = algo->Evaluate((*_father), _subShape, aResMap);
 
-    ret = algo->Evaluate((*_father), shape, aResMap);
+    aResMap.insert( make_pair( this,vector<int>(0)));
   }
 
   return ret;
@@ -2191,3 +2211,29 @@ SMESH_subMeshIteratorPtr SMESH_subMesh::getDependsOnIterator(const bool includeS
       ( new _Iterator( new SMDS_mapIterator<TMap>( DependsOn() ), prepend, append ));
   }
 }
+
+//================================================================================
+/*!
+ * \brief  Find common submeshes (based on shared subshapes with other
+  * \param theOther submesh to check
+  * \param theSetOfCommon set of common submesh
+ */
+//================================================================================
+
+bool SMESH_subMesh::FindIntersection(const SMESH_subMesh* theOther,
+                                     std::set<const SMESH_subMesh*>& theSetOfCommon ) const
+{
+  int oldNb = theSetOfCommon.size();
+  // check main submeshes
+  const map <int, SMESH_subMesh*>::const_iterator otherEnd = theOther->_mapDepend.end();
+  if ( theOther->_mapDepend.find(this->GetId()) != otherEnd )
+    theSetOfCommon.insert( this );
+  if ( _mapDepend.find(theOther->GetId()) != _mapDepend.end() )
+    theSetOfCommon.insert( theOther );
+  // check common submeshes
+  map <int, SMESH_subMesh*>::const_iterator mapIt = _mapDepend.begin();
+  for( ; mapIt != _mapDepend.end(); mapIt++ )
+    if ( theOther->_mapDepend.find((*mapIt).first) != otherEnd )
+      theSetOfCommon.insert( (*mapIt).second );
+  return oldNb < theSetOfCommon.size();
+}
index 3aaf987af75c48c885ddb0c7c3fa5685bf8bb6c7..58318b1e1b167a92e50ed25c16a47c4d88942a48 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : SMESH_subMesh.hxx
 //  Author : Paul RASCLE, EDF
@@ -228,6 +229,15 @@ public:
   void SetIsAlwaysComputed(bool isAlCo);
   bool IsAlwaysComputed() { return _alwaysComputed; }
 
+  
+  /*!
+   * \brief  Find common submeshes (based on shared subshapes with other
+   * \param theOther submesh to check
+   * \param theCommonIds set of common submesh IDs
+   * NOTE: this method does not cleat set before collect common IDs
+   */
+  bool FindIntersection( const SMESH_subMesh *           theOther,
+                         std::set<const SMESH_subMesh*>& theSetOfCommon ) const;
 
 protected:
   // ==================================================================
index 51a79a9c27f20d2c4e01838eb590d302875b5a15..7d1f4f101c6c151a433fea02c4e84a1564fa3f3a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : SMESH_subMeshEventListener.hxx
 // Created   : Mon Nov 13 10:45:49 2006
index 1f54c88e01d8979e6a36315dea1a7e727e35b21f..647cf0e114474dad9bdaf7bd71b6840ad30348ee 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  GEOM GEOMClient : tool to transfer BREP files from GEOM server to GEOM client
 #  File   : Makefile.in
 #  Author : Pavel TELKOV (OCC)
index df47e31f13765bc5431d07224bd008515a0333ed..ebd93b791473a04991eb495759957b08fef7275e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : 
 //  Author : 
 //  Module : 
index 342a5d2d4ff34c325cf1f78b76c4830ea35f8118..061028c303c7acc452a79627d5bcab39ad170983 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHClient : tool to update client mesh structure by mesh from server
 //  File   : SMESH_Client.cxx
 //  Author : Pavel TELKOV
@@ -84,8 +85,8 @@ namespace
   //function : AddNodesWithID
   //=======================================================================
   inline void AddNodesWithID(SMDS_Mesh* theMesh, 
-                            SMESH::log_array_var& theSeq,
-                            CORBA::Long theId)
+                             SMESH::log_array_var& theSeq,
+                             CORBA::Long theId)
   {
     const SMESH::double_array& aCoords = theSeq[theId].coords;
     const SMESH::long_array& anIndexes = theSeq[theId].indexes;
@@ -94,11 +95,11 @@ namespace
       EXCEPTION(runtime_error,"AddNodesWithID - 3*aNbElems != aCoords.length()");
     for(CORBA::Long aCoordId = 0; anElemId < aNbElems; anElemId++, aCoordId+=3){
       SMDS_MeshElement* anElem = theMesh->AddNodeWithID(aCoords[aCoordId],
-                                                       aCoords[aCoordId+1],
-                                                       aCoords[aCoordId+2],
-                                                       anIndexes[anElemId]);
+                                                        aCoords[aCoordId+1],
+                                                        aCoords[aCoordId+2],
+                                                        anIndexes[anElemId]);
       if(!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddNodeWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddNodeWithID for ID = "<<anElemId);
     }
   }
 
@@ -120,7 +121,7 @@ namespace
       SMDS_MeshElement* anElem = theMesh->Add0DElementWithID(anIndexes[anIndexId+1],
                                                              anIndexes[anIndexId]);
       if (!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot Add0DElementWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot Add0DElementWithID for ID = "<<anElemId);
     }
   }
 
@@ -129,8 +130,8 @@ namespace
   //function : AddEdgesWithID
   //=======================================================================
   inline void AddEdgesWithID(SMDS_Mesh* theMesh, 
-                            SMESH::log_array_var& theSeq,
-                            CORBA::Long theId)
+                             SMESH::log_array_var& theSeq,
+                             CORBA::Long theId)
   {
     const SMESH::long_array& anIndexes = theSeq[theId].indexes;
     CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
@@ -138,10 +139,10 @@ namespace
       EXCEPTION(runtime_error,"AddEdgeWithID - 3*aNbElems != aCoords.length()");
     for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=3){
       SMDS_MeshElement* anElem = theMesh->AddEdgeWithID(anIndexes[anIndexId+1],
-                                                       anIndexes[anIndexId+2],
-                                                       anIndexes[anIndexId]);
+                                                        anIndexes[anIndexId+2],
+                                                        anIndexes[anIndexId]);
       if(!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddEdgeWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddEdgeWithID for ID = "<<anElemId);
     }
   }
 
@@ -150,8 +151,8 @@ namespace
   //function : AddTriasWithID
   //=======================================================================
   inline void AddTriasWithID(SMDS_Mesh* theMesh, 
-                            SMESH::log_array_var& theSeq,
-                            CORBA::Long theId)
+                             SMESH::log_array_var& theSeq,
+                             CORBA::Long theId)
   {
     const SMESH::long_array& anIndexes = theSeq[theId].indexes;
     CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
@@ -159,11 +160,11 @@ namespace
       EXCEPTION(runtime_error,"AddTriasWithID - 4*aNbElems != anIndexes.length()");
     for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=4){
       SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1],
-                                                       anIndexes[anIndexId+2],
-                                                       anIndexes[anIndexId+3],
-                                                       anIndexes[anIndexId]);
+                                                        anIndexes[anIndexId+2],
+                                                        anIndexes[anIndexId+3],
+                                                        anIndexes[anIndexId]);
       if(!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
     }
   }
 
@@ -172,8 +173,8 @@ namespace
   //function : AddQuadsWithID
   //=======================================================================
   inline void AddQuadsWithID(SMDS_Mesh* theMesh, 
-                            SMESH::log_array_var theSeq,
-                            CORBA::Long theId)
+                             SMESH::log_array_var theSeq,
+                             CORBA::Long theId)
   {
     const SMESH::long_array& anIndexes = theSeq[theId].indexes;
     CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
@@ -181,12 +182,12 @@ namespace
       EXCEPTION(runtime_error,"AddQuadsWithID - 4*aNbElems != anIndexes.length()");
     for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=5){
       SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1],
-                                                       anIndexes[anIndexId+2],
-                                                       anIndexes[anIndexId+3],
-                                                       anIndexes[anIndexId+4],
-                                                       anIndexes[anIndexId]);
+                                                        anIndexes[anIndexId+2],
+                                                        anIndexes[anIndexId+3],
+                                                        anIndexes[anIndexId+4],
+                                                        anIndexes[anIndexId]);
       if(!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
     }
   }
 
@@ -212,7 +213,7 @@ namespace
 
       SMDS_MeshElement* anElem = theMesh->AddPolygonalFaceWithID(nodes_ids, aFaceId);
       if (!anElem)
-       EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolygonalFaceWithID for ID = "
+        EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolygonalFaceWithID for ID = "
                   << anElemId);
     }
   }
@@ -222,8 +223,8 @@ namespace
   //function : AddTetrasWithID
   //=======================================================================
   inline void AddTetrasWithID(SMDS_Mesh* theMesh, 
-                             SMESH::log_array_var& theSeq,
-                             CORBA::Long theId)
+                              SMESH::log_array_var& theSeq,
+                              CORBA::Long theId)
   {
     const SMESH::long_array& anIndexes = theSeq[theId].indexes;
     CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
@@ -231,12 +232,12 @@ namespace
       EXCEPTION(runtime_error,"AddTetrasWithID - 5*aNbElems != anIndexes.length()");
     for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=5){
       SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
-                                                         anIndexes[anIndexId+2],
-                                                         anIndexes[anIndexId+3],
-                                                         anIndexes[anIndexId+4],
-                                                         anIndexes[anIndexId]);
+                                                          anIndexes[anIndexId+2],
+                                                          anIndexes[anIndexId+3],
+                                                          anIndexes[anIndexId+4],
+                                                          anIndexes[anIndexId]);
       if(!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
     }
   }
 
@@ -245,8 +246,8 @@ namespace
   //function : AddPiramidsWithID
   //=======================================================================
   inline void AddPiramidsWithID(SMDS_Mesh* theMesh, 
-                               SMESH::log_array_var& theSeq,
-                               CORBA::Long theId)
+                                SMESH::log_array_var& theSeq,
+                                CORBA::Long theId)
   {
     const SMESH::long_array& anIndexes = theSeq[theId].indexes;
     CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
@@ -254,13 +255,13 @@ namespace
       EXCEPTION(runtime_error,"AddPiramidsWithID - 6*aNbElems != anIndexes.length()");
     for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=6){
       SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
-                                                         anIndexes[anIndexId+2],
-                                                         anIndexes[anIndexId+3],
-                                                         anIndexes[anIndexId+4],
-                                                         anIndexes[anIndexId+5],
-                                                         anIndexes[anIndexId]);
+                                                          anIndexes[anIndexId+2],
+                                                          anIndexes[anIndexId+3],
+                                                          anIndexes[anIndexId+4],
+                                                          anIndexes[anIndexId+5],
+                                                          anIndexes[anIndexId]);
       if(!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
     }
   }
 
@@ -269,8 +270,8 @@ namespace
   //function : AddPrismsWithID
   //=======================================================================
   inline void AddPrismsWithID(SMDS_Mesh* theMesh, 
-                             SMESH::log_array_var& theSeq,
-                             CORBA::Long theId)
+                              SMESH::log_array_var& theSeq,
+                              CORBA::Long theId)
   {
     const SMESH::long_array& anIndexes = theSeq[theId].indexes;
     CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
@@ -278,14 +279,14 @@ namespace
       EXCEPTION(runtime_error,"AddPrismsWithID - 7*aNbElems != anIndexes.length()");
     for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=7){
       SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
-                                                         anIndexes[anIndexId+2],
-                                                         anIndexes[anIndexId+3],
-                                                         anIndexes[anIndexId+4],
-                                                         anIndexes[anIndexId+5],
-                                                         anIndexes[anIndexId+6],
-                                                         anIndexes[anIndexId]);
+                                                          anIndexes[anIndexId+2],
+                                                          anIndexes[anIndexId+3],
+                                                          anIndexes[anIndexId+4],
+                                                          anIndexes[anIndexId+5],
+                                                          anIndexes[anIndexId+6],
+                                                          anIndexes[anIndexId]);
       if(!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
     }
   }
 
@@ -294,8 +295,8 @@ namespace
   //function : AddHexasWithID
   //=======================================================================
   inline void AddHexasWithID(SMDS_Mesh* theMesh, 
-                            SMESH::log_array_var& theSeq,
-                            CORBA::Long theId)
+                             SMESH::log_array_var& theSeq,
+                             CORBA::Long theId)
   {
     const SMESH::long_array& anIndexes = theSeq[theId].indexes;
     CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
@@ -303,16 +304,16 @@ namespace
       EXCEPTION(runtime_error,"AddHexasWithID - 9*aNbElems != anIndexes.length()");
     for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=9){
       SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
-                                                         anIndexes[anIndexId+2],
-                                                         anIndexes[anIndexId+3],
-                                                         anIndexes[anIndexId+4],
-                                                         anIndexes[anIndexId+5],
-                                                         anIndexes[anIndexId+6],
-                                                         anIndexes[anIndexId+7],
-                                                         anIndexes[anIndexId+8],
-                                                         anIndexes[anIndexId]);
+                                                          anIndexes[anIndexId+2],
+                                                          anIndexes[anIndexId+3],
+                                                          anIndexes[anIndexId+4],
+                                                          anIndexes[anIndexId+5],
+                                                          anIndexes[anIndexId+6],
+                                                          anIndexes[anIndexId+7],
+                                                          anIndexes[anIndexId+8],
+                                                          anIndexes[anIndexId]);
       if(!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
     }
   }
 
@@ -345,7 +346,7 @@ namespace
       SMDS_MeshElement* anElem =
         theMesh->AddPolyhedralVolumeWithID(nodes_ids, quantities, aFaceId);
       if (!anElem)
-       EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolyhedralVolumeWithID for ID = "
+        EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolyhedralVolumeWithID for ID = "
                   << anElemId);
     }
   }
@@ -364,11 +365,11 @@ namespace
       EXCEPTION(runtime_error,"AddQuadEdgeWithID - 4*aNbElems != aCoords.length()");
     for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=4){
       SMDS_MeshElement* anElem = theMesh->AddEdgeWithID(anIndexes[anIndexId+1],
-                                                       anIndexes[anIndexId+2],
-                                                       anIndexes[anIndexId+3],
-                                                       anIndexes[anIndexId]);
+                                                        anIndexes[anIndexId+2],
+                                                        anIndexes[anIndexId+3],
+                                                        anIndexes[anIndexId]);
       if(!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddEdgeWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddEdgeWithID for ID = "<<anElemId);
     }
   }
 
@@ -386,14 +387,14 @@ namespace
       EXCEPTION(runtime_error,"AddQuadTriasWithID - 7*aNbElems != anIndexes.length()");
     for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=7){
       SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1],
-                                                       anIndexes[anIndexId+2],
-                                                       anIndexes[anIndexId+3],
-                                                       anIndexes[anIndexId+4],
-                                                       anIndexes[anIndexId+5],
-                                                       anIndexes[anIndexId+6],
-                                                       anIndexes[anIndexId]);
+                                                        anIndexes[anIndexId+2],
+                                                        anIndexes[anIndexId+3],
+                                                        anIndexes[anIndexId+4],
+                                                        anIndexes[anIndexId+5],
+                                                        anIndexes[anIndexId+6],
+                                                        anIndexes[anIndexId]);
       if(!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
     }
   }
 
@@ -411,16 +412,16 @@ namespace
       EXCEPTION(runtime_error,"AddQuadQuadsWithID - 9*aNbElems != anIndexes.length()");
     for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=9){
       SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1],
-                                                       anIndexes[anIndexId+2],
-                                                       anIndexes[anIndexId+3],
-                                                       anIndexes[anIndexId+4],
-                                                       anIndexes[anIndexId+5],
-                                                       anIndexes[anIndexId+6],
-                                                       anIndexes[anIndexId+7],
-                                                       anIndexes[anIndexId+8],
-                                                       anIndexes[anIndexId]);
+                                                        anIndexes[anIndexId+2],
+                                                        anIndexes[anIndexId+3],
+                                                        anIndexes[anIndexId+4],
+                                                        anIndexes[anIndexId+5],
+                                                        anIndexes[anIndexId+6],
+                                                        anIndexes[anIndexId+7],
+                                                        anIndexes[anIndexId+8],
+                                                        anIndexes[anIndexId]);
       if(!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<<anElemId);
     }
   }
 
@@ -438,18 +439,18 @@ namespace
       EXCEPTION(runtime_error,"AddQuadTetrasWithID - 11*aNbElems != anIndexes.length()");
     for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=11){
       SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
-                                                         anIndexes[anIndexId+2],
-                                                         anIndexes[anIndexId+3],
-                                                         anIndexes[anIndexId+4],
-                                                         anIndexes[anIndexId+5],
-                                                         anIndexes[anIndexId+6],
-                                                         anIndexes[anIndexId+7],
-                                                         anIndexes[anIndexId+8],
-                                                         anIndexes[anIndexId+9],
-                                                         anIndexes[anIndexId+10],
-                                                         anIndexes[anIndexId]);
+                                                          anIndexes[anIndexId+2],
+                                                          anIndexes[anIndexId+3],
+                                                          anIndexes[anIndexId+4],
+                                                          anIndexes[anIndexId+5],
+                                                          anIndexes[anIndexId+6],
+                                                          anIndexes[anIndexId+7],
+                                                          anIndexes[anIndexId+8],
+                                                          anIndexes[anIndexId+9],
+                                                          anIndexes[anIndexId+10],
+                                                          anIndexes[anIndexId]);
       if(!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
     }
   }
 
@@ -467,21 +468,21 @@ namespace
       EXCEPTION(runtime_error,"AddQuadPiramidsWithID - 14*aNbElems != anIndexes.length()");
     for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=14){
       SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
-                                                         anIndexes[anIndexId+2],
-                                                         anIndexes[anIndexId+3],
-                                                         anIndexes[anIndexId+4],
-                                                         anIndexes[anIndexId+5],
-                                                         anIndexes[anIndexId+6],
-                                                         anIndexes[anIndexId+7],
-                                                         anIndexes[anIndexId+8],
-                                                         anIndexes[anIndexId+9],
-                                                         anIndexes[anIndexId+10],
-                                                         anIndexes[anIndexId+11],
-                                                         anIndexes[anIndexId+12],
-                                                         anIndexes[anIndexId+13],
-                                                         anIndexes[anIndexId]);
+                                                          anIndexes[anIndexId+2],
+                                                          anIndexes[anIndexId+3],
+                                                          anIndexes[anIndexId+4],
+                                                          anIndexes[anIndexId+5],
+                                                          anIndexes[anIndexId+6],
+                                                          anIndexes[anIndexId+7],
+                                                          anIndexes[anIndexId+8],
+                                                          anIndexes[anIndexId+9],
+                                                          anIndexes[anIndexId+10],
+                                                          anIndexes[anIndexId+11],
+                                                          anIndexes[anIndexId+12],
+                                                          anIndexes[anIndexId+13],
+                                                          anIndexes[anIndexId]);
       if(!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
     }
   }
 
@@ -499,23 +500,23 @@ namespace
       EXCEPTION(runtime_error,"AddQuadPentasWithID - 16*aNbElems != anIndexes.length()");
     for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=16){
       SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
-                                                         anIndexes[anIndexId+2],
-                                                         anIndexes[anIndexId+3],
-                                                         anIndexes[anIndexId+4],
-                                                         anIndexes[anIndexId+5],
-                                                         anIndexes[anIndexId+6],
-                                                         anIndexes[anIndexId+7],
-                                                         anIndexes[anIndexId+8],
-                                                         anIndexes[anIndexId+9],
-                                                         anIndexes[anIndexId+10],
-                                                         anIndexes[anIndexId+11],
-                                                         anIndexes[anIndexId+12],
-                                                         anIndexes[anIndexId+13],
-                                                         anIndexes[anIndexId+14],
-                                                         anIndexes[anIndexId+15],
-                                                         anIndexes[anIndexId]);
+                                                          anIndexes[anIndexId+2],
+                                                          anIndexes[anIndexId+3],
+                                                          anIndexes[anIndexId+4],
+                                                          anIndexes[anIndexId+5],
+                                                          anIndexes[anIndexId+6],
+                                                          anIndexes[anIndexId+7],
+                                                          anIndexes[anIndexId+8],
+                                                          anIndexes[anIndexId+9],
+                                                          anIndexes[anIndexId+10],
+                                                          anIndexes[anIndexId+11],
+                                                          anIndexes[anIndexId+12],
+                                                          anIndexes[anIndexId+13],
+                                                          anIndexes[anIndexId+14],
+                                                          anIndexes[anIndexId+15],
+                                                          anIndexes[anIndexId]);
       if(!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
     }
   }
 
@@ -533,28 +534,28 @@ namespace
       EXCEPTION(runtime_error,"AddQuadHexasWithID - 21*aNbElems != anIndexes.length()");
     for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=21){
       SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
-                                                         anIndexes[anIndexId+2],
-                                                         anIndexes[anIndexId+3],
-                                                         anIndexes[anIndexId+4],
-                                                         anIndexes[anIndexId+5],
-                                                         anIndexes[anIndexId+6],
-                                                         anIndexes[anIndexId+7],
-                                                         anIndexes[anIndexId+8],
-                                                         anIndexes[anIndexId+9],
-                                                         anIndexes[anIndexId+10],
-                                                         anIndexes[anIndexId+11],
-                                                         anIndexes[anIndexId+12],
-                                                         anIndexes[anIndexId+13],
-                                                         anIndexes[anIndexId+14],
-                                                         anIndexes[anIndexId+15],
-                                                         anIndexes[anIndexId+16],
-                                                         anIndexes[anIndexId+17],
-                                                         anIndexes[anIndexId+18],
-                                                         anIndexes[anIndexId+19],
-                                                         anIndexes[anIndexId+20],
-                                                         anIndexes[anIndexId]);
+                                                          anIndexes[anIndexId+2],
+                                                          anIndexes[anIndexId+3],
+                                                          anIndexes[anIndexId+4],
+                                                          anIndexes[anIndexId+5],
+                                                          anIndexes[anIndexId+6],
+                                                          anIndexes[anIndexId+7],
+                                                          anIndexes[anIndexId+8],
+                                                          anIndexes[anIndexId+9],
+                                                          anIndexes[anIndexId+10],
+                                                          anIndexes[anIndexId+11],
+                                                          anIndexes[anIndexId+12],
+                                                          anIndexes[anIndexId+13],
+                                                          anIndexes[anIndexId+14],
+                                                          anIndexes[anIndexId+15],
+                                                          anIndexes[anIndexId+16],
+                                                          anIndexes[anIndexId+17],
+                                                          anIndexes[anIndexId+18],
+                                                          anIndexes[anIndexId+19],
+                                                          anIndexes[anIndexId+20],
+                                                          anIndexes[anIndexId]);
       if(!anElem)
-       EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
+        EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<<anElemId);
     }
   }
 
@@ -596,7 +597,7 @@ namespace
 //=======================================================================
 SMESH::SMESH_Gen_var 
 SMESH_Client::GetSMESHGen(CORBA::ORB_ptr theORB,
-                         CORBA::Boolean& theIsEmbeddedMode)
+                          CORBA::Boolean& theIsEmbeddedMode)
 {
   static SMESH::SMESH_Gen_var aMeshGen;
 
@@ -629,7 +630,7 @@ SMESH_Client::GetSMESHGen(CORBA::ORB_ptr theORB,
 // purpose  : 
 //=======================================================================
 SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB,
-                          SMESH::SMESH_Mesh_ptr theMesh):
+                           SMESH::SMESH_Mesh_ptr theMesh):
   myMeshServer(SMESH::SMESH_Mesh::_duplicate(theMesh)),
   mySMESHDSMesh(NULL),
   mySMDSMesh(NULL)
@@ -726,14 +727,14 @@ SMESH_Client::Update(bool theIsClear)
     {
       for ( CORBA::Long anId = 0; anId < aLength; anId++)
       {
-       const SMESH::double_array& aCoords = aSeq[anId].coords;
-       const SMESH::long_array& anIndexes = aSeq[anId].indexes;
-       CORBA::Long anElemId = 0, aNbElems = aSeq[anId].number;
-       CORBA::Long aCommand = aSeq[anId].commandType;
+        const SMESH::double_array& aCoords = aSeq[anId].coords;
+        const SMESH::long_array& anIndexes = aSeq[anId].indexes;
+        CORBA::Long anElemId = 0, aNbElems = aSeq[anId].number;
+        CORBA::Long aCommand = aSeq[anId].commandType;
 
-       switch(aCommand)
+        switch(aCommand)
         {
-       case SMESH::ADD_NODE       : AddNodesWithID      ( mySMDSMesh, aSeq, anId ); break;
+        case SMESH::ADD_NODE       : AddNodesWithID      ( mySMDSMesh, aSeq, anId ); break;
         case SMESH::ADD_ELEM0D     : Add0DElementsWithID ( mySMDSMesh, aSeq, anId ); break;
         case SMESH::ADD_EDGE       : AddEdgesWithID      ( mySMDSMesh, aSeq, anId ); break;
         case SMESH::ADD_TRIANGLE   : AddTriasWithID      ( mySMDSMesh, aSeq, anId ); break;
@@ -804,7 +805,7 @@ SMESH_Client::Update(bool theIsClear)
           break;
           
         default:;
-       }
+        }
       }
     }
     catch ( SALOME::SALOME_Exception& exc )
index ac2411676a37d343af7b7b57dca905c8194d5363..ef70666237ec52eb92f86a865f269bdd9fd85a45 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHClient : tool to update client mesh structure by mesh from server
 //  File   : SMESH_Client.hxx
 //  Author : Pavel TELKOV
@@ -54,10 +55,10 @@ public:
   static 
   SMESH::SMESH_Gen_var
   GetSMESHGen(CORBA::ORB_ptr theORB,
-             CORBA::Boolean& theIsEmbeddedMode);
+              CORBA::Boolean& theIsEmbeddedMode);
 
   SMESH_Client(CORBA::ORB_ptr theORB,
-              SMESH::SMESH_Mesh_ptr theMesh);
+               SMESH::SMESH_Mesh_ptr theMesh);
   ~SMESH_Client();
 
   bool 
index d1e49ad332c16430493c042686474d8c6fe1a773..91b485dae984fd351aec786a086f842dc0d6cd79 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH SMESHDS : management of mesh data and SMESH document
 #  File   : Makefile.in
 #  Author : Patrick GOLDBRONN (CEA)
index ab46ee27b4f9502a62e99406ef2aa5a2e5e69d36..bbfded7131341f5d545ad1262769749df1e0369c 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESH_Command.cxx
 //  Author : Yves FRICAUD, OCC
@@ -54,16 +55,16 @@ SMESHDS_Command::~SMESHDS_Command()
 //=======================================================================
 void SMESHDS_Command::AddNode(int NewNodeID, double x, double y, double z)
 {
-       if (!myType == SMESHDS_AddNode)
-       {
-               MESSAGE("SMESHDS_Command::AddNode : Bad Type");
-               return;
-       }
-       myIntegers.push_back(NewNodeID);
-       myReals.push_back(x);
-       myReals.push_back(y);
-       myReals.push_back(z);
-       myNumber++;
+        if (!myType == SMESHDS_AddNode)
+        {
+                MESSAGE("SMESHDS_Command::AddNode : Bad Type");
+                return;
+        }
+        myIntegers.push_back(NewNodeID);
+        myReals.push_back(x);
+        myReals.push_back(y);
+        myReals.push_back(z);
+        myNumber++;
 }
 
 //=======================================================================
@@ -72,16 +73,16 @@ void SMESHDS_Command::AddNode(int NewNodeID, double x, double y, double z)
 //=======================================================================
 void SMESHDS_Command::MoveNode(int NodeID, double x, double y, double z)
 {
-       if (!myType == SMESHDS_MoveNode)
-       {
-               MESSAGE("SMESHDS_Command::MoveNode : Bad Type");
-               return;
-       }
-       myIntegers.push_back(NodeID);
-       myReals.push_back(x);
-       myReals.push_back(y);
-       myReals.push_back(z);
-       myNumber++;
+        if (!myType == SMESHDS_MoveNode)
+        {
+                MESSAGE("SMESHDS_Command::MoveNode : Bad Type");
+                return;
+        }
+        myIntegers.push_back(NodeID);
+        myReals.push_back(x);
+        myReals.push_back(y);
+        myReals.push_back(z);
+        myNumber++;
 }
 
 //=======================================================================
@@ -106,15 +107,15 @@ void SMESHDS_Command::Add0DElement(int New0DElementID, int idnode)
 //=======================================================================
 void SMESHDS_Command::AddEdge(int NewEdgeID, int idnode1, int idnode2)
 {
-       if (!myType == SMESHDS_AddEdge)
-       {
-               MESSAGE("SMESHDS_Command::AddEdge : Bad Type");
-               return;
-       }
-       myIntegers.push_back(NewEdgeID);
-       myIntegers.push_back(idnode1);
-       myIntegers.push_back(idnode2);
-       myNumber++;
+        if (!myType == SMESHDS_AddEdge)
+        {
+                MESSAGE("SMESHDS_Command::AddEdge : Bad Type");
+                return;
+        }
+        myIntegers.push_back(NewEdgeID);
+        myIntegers.push_back(idnode1);
+        myIntegers.push_back(idnode2);
+        myNumber++;
 }
 
 //=======================================================================
@@ -122,18 +123,18 @@ void SMESHDS_Command::AddEdge(int NewEdgeID, int idnode1, int idnode2)
 //purpose  : 
 //=======================================================================
 void SMESHDS_Command::AddFace(int NewFaceID,
-       int idnode1, int idnode2, int idnode3)
+        int idnode1, int idnode2, int idnode3)
 {
-       if (!myType == SMESHDS_AddTriangle)
-       {
-               MESSAGE("SMESHDS_Command::AddFace : Bad Type");
-               return;
-       }
-       myIntegers.push_back(NewFaceID);
-       myIntegers.push_back(idnode1);
-       myIntegers.push_back(idnode2);
-       myIntegers.push_back(idnode3);
-       myNumber++;
+        if (!myType == SMESHDS_AddTriangle)
+        {
+                MESSAGE("SMESHDS_Command::AddFace : Bad Type");
+                return;
+        }
+        myIntegers.push_back(NewFaceID);
+        myIntegers.push_back(idnode1);
+        myIntegers.push_back(idnode2);
+        myIntegers.push_back(idnode3);
+        myNumber++;
 }
 
 //=======================================================================
@@ -141,19 +142,19 @@ void SMESHDS_Command::AddFace(int NewFaceID,
 //purpose  : 
 //=======================================================================
 void SMESHDS_Command::AddFace(int NewFaceID,
-       int idnode1, int idnode2, int idnode3, int idnode4)
+        int idnode1, int idnode2, int idnode3, int idnode4)
 {
-       if (!myType == SMESHDS_AddQuadrangle)
-       {
-               MESSAGE("SMESHDS_Command::AddFace : Bad Type");
-               return;
-       }
-       myIntegers.push_back(NewFaceID);
-       myIntegers.push_back(idnode1);
-       myIntegers.push_back(idnode2);
-       myIntegers.push_back(idnode3);
-       myIntegers.push_back(idnode4);
-       myNumber++;
+        if (!myType == SMESHDS_AddQuadrangle)
+        {
+                MESSAGE("SMESHDS_Command::AddFace : Bad Type");
+                return;
+        }
+        myIntegers.push_back(NewFaceID);
+        myIntegers.push_back(idnode1);
+        myIntegers.push_back(idnode2);
+        myIntegers.push_back(idnode3);
+        myIntegers.push_back(idnode4);
+        myNumber++;
 }
 
 //=======================================================================
@@ -161,19 +162,19 @@ void SMESHDS_Command::AddFace(int NewFaceID,
 //purpose  : 
 //=======================================================================
 void SMESHDS_Command::AddVolume(int NewVolID,
-       int idnode1, int idnode2, int idnode3, int idnode4)
+        int idnode1, int idnode2, int idnode3, int idnode4)
 {
-       if (!myType == SMESHDS_AddTetrahedron)
-       {
-               MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
-               return;
-       }
-       myIntegers.push_back(NewVolID);
-       myIntegers.push_back(idnode1);
-       myIntegers.push_back(idnode2);
-       myIntegers.push_back(idnode3);
-       myIntegers.push_back(idnode4);
-       myNumber++;
+        if (!myType == SMESHDS_AddTetrahedron)
+        {
+                MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
+                return;
+        }
+        myIntegers.push_back(NewVolID);
+        myIntegers.push_back(idnode1);
+        myIntegers.push_back(idnode2);
+        myIntegers.push_back(idnode3);
+        myIntegers.push_back(idnode4);
+        myNumber++;
 }
 
 //=======================================================================
@@ -181,20 +182,20 @@ void SMESHDS_Command::AddVolume(int NewVolID,
 //purpose  : 
 //=======================================================================
 void SMESHDS_Command::AddVolume(int NewVolID,
-       int idnode1, int idnode2, int idnode3, int idnode4, int idnode5)
+        int idnode1, int idnode2, int idnode3, int idnode4, int idnode5)
 {
-       if (!myType == SMESHDS_AddPyramid)
-       {
-               MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
-               return;
-       }
-       myIntegers.push_back(NewVolID);
-       myIntegers.push_back(idnode1);
-       myIntegers.push_back(idnode2);
-       myIntegers.push_back(idnode3);
-       myIntegers.push_back(idnode4);
-       myIntegers.push_back(idnode5);
-       myNumber++;
+        if (!myType == SMESHDS_AddPyramid)
+        {
+                MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
+                return;
+        }
+        myIntegers.push_back(NewVolID);
+        myIntegers.push_back(idnode1);
+        myIntegers.push_back(idnode2);
+        myIntegers.push_back(idnode3);
+        myIntegers.push_back(idnode4);
+        myIntegers.push_back(idnode5);
+        myNumber++;
 }
 
 //=======================================================================
@@ -202,22 +203,22 @@ void SMESHDS_Command::AddVolume(int NewVolID,
 //purpose  : 
 //=======================================================================
 void SMESHDS_Command::AddVolume(int NewVolID,
-       int idnode1,
-       int idnode2, int idnode3, int idnode4, int idnode5, int idnode6)
+        int idnode1,
+        int idnode2, int idnode3, int idnode4, int idnode5, int idnode6)
 {
-       if (!myType == SMESHDS_AddPrism)
-       {
-               MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
-               return;
-       }
-       myIntegers.push_back(NewVolID);
-       myIntegers.push_back(idnode1);
-       myIntegers.push_back(idnode2);
-       myIntegers.push_back(idnode3);
-       myIntegers.push_back(idnode4);
-       myIntegers.push_back(idnode5);
-       myIntegers.push_back(idnode6);
-       myNumber++;
+        if (!myType == SMESHDS_AddPrism)
+        {
+                MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
+                return;
+        }
+        myIntegers.push_back(NewVolID);
+        myIntegers.push_back(idnode1);
+        myIntegers.push_back(idnode2);
+        myIntegers.push_back(idnode3);
+        myIntegers.push_back(idnode4);
+        myIntegers.push_back(idnode5);
+        myIntegers.push_back(idnode6);
+        myNumber++;
 }
 
 //=======================================================================
@@ -225,26 +226,26 @@ void SMESHDS_Command::AddVolume(int NewVolID,
 //purpose  : 
 //=======================================================================
 void SMESHDS_Command::AddVolume(int NewVolID,
-       int idnode1,
-       int idnode2,
-       int idnode3,
-       int idnode4, int idnode5, int idnode6, int idnode7, int idnode8)
+        int idnode1,
+        int idnode2,
+        int idnode3,
+        int idnode4, int idnode5, int idnode6, int idnode7, int idnode8)
 {
-       if (!myType == SMESHDS_AddHexahedron)
-       {
-               MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
-               return;
-       }
-       myIntegers.push_back(NewVolID);
-       myIntegers.push_back(idnode1);
-       myIntegers.push_back(idnode2);
-       myIntegers.push_back(idnode3);
-       myIntegers.push_back(idnode4);
-       myIntegers.push_back(idnode5);
-       myIntegers.push_back(idnode6);
-       myIntegers.push_back(idnode7);
-       myIntegers.push_back(idnode8);
-       myNumber++;
+        if (!myType == SMESHDS_AddHexahedron)
+        {
+                MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
+                return;
+        }
+        myIntegers.push_back(NewVolID);
+        myIntegers.push_back(idnode1);
+        myIntegers.push_back(idnode2);
+        myIntegers.push_back(idnode3);
+        myIntegers.push_back(idnode4);
+        myIntegers.push_back(idnode5);
+        myIntegers.push_back(idnode6);
+        myIntegers.push_back(idnode7);
+        myIntegers.push_back(idnode8);
+        myNumber++;
 }
 
 //=======================================================================
@@ -304,13 +305,13 @@ void SMESHDS_Command::AddPolyhedralVolume (const int        ElementID,
 //=======================================================================
 void SMESHDS_Command::RemoveNode(int NodeID)
 {
-       if (!myType == SMESHDS_RemoveNode)
-       {
-               MESSAGE("SMESHDS_Command::RemoveNode : Bad Type");
-               return;
-       }
-       myIntegers.push_back(NodeID);
-       myNumber++;
+        if (!myType == SMESHDS_RemoveNode)
+        {
+                MESSAGE("SMESHDS_Command::RemoveNode : Bad Type");
+                return;
+        }
+        myIntegers.push_back(NodeID);
+        myNumber++;
 }
 
 //=======================================================================
@@ -319,13 +320,13 @@ void SMESHDS_Command::RemoveNode(int NodeID)
 //=======================================================================
 void SMESHDS_Command::RemoveElement(int ElementID)
 {
-       if (!myType == SMESHDS_RemoveElement)
-       {
-               MESSAGE("SMESHDS_Command::RemoveElement : Bad Type");
-               return;
-       }
-       myIntegers.push_back(ElementID);
-       myNumber++;
+        if (!myType == SMESHDS_RemoveElement)
+        {
+                MESSAGE("SMESHDS_Command::RemoveElement : Bad Type");
+                return;
+        }
+        myIntegers.push_back(ElementID);
+        myNumber++;
 }
 
 //=======================================================================
@@ -402,7 +403,7 @@ void SMESHDS_Command::Renumber (const bool isNodes, const int startID, const int
 //=======================================================================
 SMESHDS_CommandType SMESHDS_Command::GetType()
 {
-       return myType;
+        return myType;
 }
 
 //=======================================================================
@@ -411,7 +412,7 @@ SMESHDS_CommandType SMESHDS_Command::GetType()
 //=======================================================================
 int SMESHDS_Command::GetNumber()
 {
-       return myNumber;
+        return myNumber;
 }
 
 //=======================================================================
@@ -420,7 +421,7 @@ int SMESHDS_Command::GetNumber()
 //=======================================================================
 const list < int >&SMESHDS_Command::GetIndexes()
 {
-       return myIntegers;
+        return myIntegers;
 }
 
 //=======================================================================
@@ -429,7 +430,7 @@ const list < int >&SMESHDS_Command::GetIndexes()
 //=======================================================================
 const list < double >&SMESHDS_Command::GetCoords()
 {
-       return myReals;
+        return myReals;
 }
 
 
index d425a054acc39ba7cc9fd915a8df878953c805cd..a3634679500476c5eb99fccbb4446ff6b8f27a2a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESHDS_Command.hxx
 //  Module : SMESH
@@ -36,28 +37,28 @@ class SMESHDS_EXPORT SMESHDS_Command
 {
 
   public:
-       SMESHDS_Command(const SMESHDS_CommandType aType);
-       void AddNode(int NewNodeID, double x, double y, double z);
-       void Add0DElement(int New0DElementID, int idnode);
-       void AddEdge(int NewEdgeID, int idnode1, int idnode2);
-       void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3);
-       void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3,
-               int idnode4);
-       void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
-               int idnode4);
-       void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
-               int idnode4, int idnode5);
-       void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
-               int idnode4, int idnode5, int idnode6);
-       void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
-               int idnode4, int idnode5, int idnode6, int idnode7, int idnode8);
+        SMESHDS_Command(const SMESHDS_CommandType aType);
+        void AddNode(int NewNodeID, double x, double y, double z);
+        void Add0DElement(int New0DElementID, int idnode);
+        void AddEdge(int NewEdgeID, int idnode1, int idnode2);
+        void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3);
+        void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3,
+                int idnode4);
+        void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
+                int idnode4);
+        void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
+                int idnode4, int idnode5);
+        void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
+                int idnode4, int idnode5, int idnode6);
+        void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
+                int idnode4, int idnode5, int idnode6, int idnode7, int idnode8);
         void AddPolygonalFace (const int        ElementID,
                                std::vector<int> nodes_ids);
         void AddPolyhedralVolume (const int        ElementID,
                                   std::vector<int> nodes_ids,
                                   std::vector<int> quantities);
         // special methods for quadratic elements
-       void AddEdge(int NewEdgeID, int n1, int n2, int n12);
+        void AddEdge(int NewEdgeID, int n1, int n2, int n12);
         void AddFace(int NewFaceID, int n1, int n2, int n3,
                      int n12, int n23, int n31);
         void AddFace(int NewFaceID, int n1, int n2, int n3, int n4,
@@ -78,23 +79,23 @@ class SMESHDS_EXPORT SMESHDS_Command
                        int n56, int n67, int n78, int n85,
                        int n15, int n26, int n37, int n48);
         
-       void MoveNode(int NewNodeID, double x, double y, double z);
-       void RemoveNode(int NodeID);
-       void RemoveElement(int ElementID);
-       void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
-       void ChangePolyhedronNodes(const int ElementID,
+        void MoveNode(int NewNodeID, double x, double y, double z);
+        void RemoveNode(int NodeID);
+        void RemoveElement(int ElementID);
+        void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
+        void ChangePolyhedronNodes(const int ElementID,
                                    std::vector<int> nodes_ids,
                                    std::vector<int> quantities);
-       void Renumber (const bool isNodes, const int startID, const int deltaID);
-       SMESHDS_CommandType GetType();
-       int GetNumber();
-       const std::list<int> & GetIndexes();
-       const std::list<double> & GetCoords();
-        ~SMESHDS_Command();
+        void Renumber (const bool isNodes, const int startID, const int deltaID);
+        SMESHDS_CommandType GetType();
+        int GetNumber();
+        const std::list<int> & GetIndexes();
+        const std::list<double> & GetCoords();
+         ~SMESHDS_Command();
   private:
-       SMESHDS_CommandType myType;
-       int myNumber;
-       std::list<double> myReals;
-       std::list<int> myIntegers;
+        SMESHDS_CommandType myType;
+        int myNumber;
+        std::list<double> myReals;
+        std::list<int> myIntegers;
 };
 #endif
index 7279ba932043b6e956350c586a6015735a5d89ce..fcc4933b1969bea906f076375ed36d6255a2ce2e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESHDS_CommandType.hxx
 //  Module : SMESH
index ae748956484f5872f7b0bb29095be014fcf89f15..bb873b31149d7c34dd3e51a74c291f3f24c92746 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File:      SMESHDS_DataMapOfShape.hxx
 // Created:   20.09.05 09:51:12
 // Author:    Alexander BORODIN
index 9e568e2974ab123c639507851a097b14745f6c18..44cb1fda2a39bfdda9efab1d9e852461c86aadbd 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESHDS_Document.cxx
 //  Author : Yves FRICAUD, OCC
@@ -69,13 +70,13 @@ int SMESHDS_Document::NewMesh(bool theIsEmbeddedMode)
 //=======================================================================
 SMESHDS_Mesh *SMESHDS_Document::GetMesh(int MeshID)
 {
-       map<int,SMESHDS_Mesh*>::iterator it=myMeshes.find(MeshID);
-       if (it==myMeshes.end())
-       {
-               MESSAGE("SMESHDS_Document::GetMesh : ID not found");
-               return NULL;
-       }
-       else return (*it).second;
+        map<int,SMESHDS_Mesh*>::iterator it=myMeshes.find(MeshID);
+        if (it==myMeshes.end())
+        {
+                MESSAGE("SMESHDS_Document::GetMesh : ID not found");
+                return NULL;
+        }
+        else return (*it).second;
 }
 
 //=======================================================================
@@ -84,10 +85,10 @@ SMESHDS_Mesh *SMESHDS_Document::GetMesh(int MeshID)
 //=======================================================================
 void SMESHDS_Document::RemoveMesh(int MeshID)
 {
-       map<int,SMESHDS_Mesh*>::iterator it=myMeshes.find(MeshID);
-       if (it==myMeshes.end())
-               MESSAGE("SMESHDS_Document::RemoveMesh : ID not found"); 
-       myMeshes.erase(it);
+        map<int,SMESHDS_Mesh*>::iterator it=myMeshes.find(MeshID);
+        if (it==myMeshes.end())
+                MESSAGE("SMESHDS_Document::RemoveMesh : ID not found"); 
+        myMeshes.erase(it);
 }
 
 //=======================================================================
@@ -96,7 +97,7 @@ void SMESHDS_Document::RemoveMesh(int MeshID)
 //=======================================================================
 void SMESHDS_Document::AddHypothesis(SMESHDS_Hypothesis * H)
 {
-       myHypothesis[H->GetID()]=H;
+        myHypothesis[H->GetID()]=H;
 }
 
 //=======================================================================
@@ -105,13 +106,13 @@ void SMESHDS_Document::AddHypothesis(SMESHDS_Hypothesis * H)
 //=======================================================================
 SMESHDS_Hypothesis * SMESHDS_Document::GetHypothesis(int HypID)
 {
-       map<int,SMESHDS_Hypothesis*>::iterator it=myHypothesis.find(HypID);
-       if (it==myHypothesis.end())
-       {
-               MESSAGE("SMESHDS_Document::GetHypothesis : ID not found");
-               return NULL;
-       }
-       else return (*it).second;
+        map<int,SMESHDS_Hypothesis*>::iterator it=myHypothesis.find(HypID);
+        if (it==myHypothesis.end())
+        {
+                MESSAGE("SMESHDS_Document::GetHypothesis : ID not found");
+                return NULL;
+        }
+        else return (*it).second;
 }
 
 //=======================================================================
@@ -120,10 +121,10 @@ SMESHDS_Hypothesis * SMESHDS_Document::GetHypothesis(int HypID)
 //=======================================================================
 void SMESHDS_Document::RemoveHypothesis(int HypID)
 {
-       map<int,SMESHDS_Hypothesis*>::iterator it=myHypothesis.find(HypID);
-       if (it==myHypothesis.end())
-               MESSAGE("SMESHDS_Document::RemoveHypothesis : ID not found");   
-       myHypothesis.erase(it);
+        map<int,SMESHDS_Hypothesis*>::iterator it=myHypothesis.find(HypID);
+        if (it==myHypothesis.end())
+                MESSAGE("SMESHDS_Document::RemoveHypothesis : ID not found");   
+        myHypothesis.erase(it);
 }
 
 //=======================================================================
@@ -132,7 +133,7 @@ void SMESHDS_Document::RemoveHypothesis(int HypID)
 //=======================================================================
 int SMESHDS_Document::NbMeshes()
 {
-       return myMeshes.size();
+        return myMeshes.size();
 }
 
 //=======================================================================
@@ -141,7 +142,7 @@ int SMESHDS_Document::NbMeshes()
 //=======================================================================
 int SMESHDS_Document::NbHypothesis()
 {
-       return myHypothesis.size();
+        return myHypothesis.size();
 }
 
 //=======================================================================
@@ -150,7 +151,7 @@ int SMESHDS_Document::NbHypothesis()
 //=======================================================================
 void SMESHDS_Document::InitMeshesIterator()
 {
-       myMeshesIt=myMeshes.begin();
+        myMeshesIt=myMeshes.begin();
 }
 
 //=======================================================================
@@ -159,9 +160,9 @@ void SMESHDS_Document::InitMeshesIterator()
 //=======================================================================
 SMESHDS_Mesh * SMESHDS_Document::NextMesh()
 {
-       SMESHDS_Mesh * toReturn=(*myMeshesIt).second;
-       myMeshesIt++;
-       return toReturn;
+        SMESHDS_Mesh * toReturn=(*myMeshesIt).second;
+        myMeshesIt++;
+        return toReturn;
 }
 
 //=======================================================================
@@ -170,7 +171,7 @@ SMESHDS_Mesh * SMESHDS_Document::NextMesh()
 //=======================================================================
 bool SMESHDS_Document::MoreMesh()
 {
-       return myMeshesIt!=myMeshes.end();
+        return myMeshesIt!=myMeshes.end();
 }
 
 //=======================================================================
@@ -179,7 +180,7 @@ bool SMESHDS_Document::MoreMesh()
 //=======================================================================
 void SMESHDS_Document::InitHypothesisIterator()
 {
-       myHypothesisIt=myHypothesis.begin();
+        myHypothesisIt=myHypothesis.begin();
 }
 
 //=======================================================================
@@ -188,9 +189,9 @@ void SMESHDS_Document::InitHypothesisIterator()
 //=======================================================================
 SMESHDS_Hypothesis * SMESHDS_Document::NextHypothesis()
 {
-       SMESHDS_Hypothesis * toReturn=(*myHypothesisIt).second;
-       myHypothesisIt++;
-       return toReturn;
+        SMESHDS_Hypothesis * toReturn=(*myHypothesisIt).second;
+        myHypothesisIt++;
+        return toReturn;
 }
 
 //=======================================================================
@@ -199,5 +200,5 @@ SMESHDS_Hypothesis * SMESHDS_Document::NextHypothesis()
 //=======================================================================
 bool SMESHDS_Document::MoreHypothesis()
 {
-       return myHypothesisIt!=myHypothesis.end();
+        return myHypothesisIt!=myHypothesis.end();
 }
index 6abea04a4083f713921d8cd1fc61d254409139ef..81aecbf73c3d6abad2b52b0ea413854a8427b15b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESHDS_Document.hxx
 //  Module : SMESH
 class SMESHDS_EXPORT SMESHDS_Document
 {
   public:
-       SMESHDS_Document(int UserID);
-       int NewMesh(bool theIsEmbeddedMode);
-       void RemoveMesh(int MeshID);
-       SMESHDS_Mesh * GetMesh(int MeshID);
-       void AddHypothesis(SMESHDS_Hypothesis * H);
-       void RemoveHypothesis(int HypID);
-       SMESHDS_Hypothesis * GetHypothesis(int HypID);
-       int NbMeshes();
-       int NbHypothesis();
-       void InitMeshesIterator();
-       SMESHDS_Mesh * NextMesh();
-       bool MoreMesh();        
-       void InitHypothesisIterator();
-       SMESHDS_Hypothesis * NextHypothesis();
-       bool MoreHypothesis();  
-        ~SMESHDS_Document();
+        SMESHDS_Document(int UserID);
+        int NewMesh(bool theIsEmbeddedMode);
+        void RemoveMesh(int MeshID);
+        SMESHDS_Mesh * GetMesh(int MeshID);
+        void AddHypothesis(SMESHDS_Hypothesis * H);
+        void RemoveHypothesis(int HypID);
+        SMESHDS_Hypothesis * GetHypothesis(int HypID);
+        int NbMeshes();
+        int NbHypothesis();
+        void InitMeshesIterator();
+        SMESHDS_Mesh * NextMesh();
+        bool MoreMesh();        
+        void InitHypothesisIterator();
+        SMESHDS_Hypothesis * NextHypothesis();
+        bool MoreHypothesis();  
+         ~SMESHDS_Document();
 
   private:
-       int myUserID;
-       std::map<int,SMESHDS_Mesh*> myMeshes;
-       std::map<int,SMESHDS_Hypothesis*> myHypothesis;
-       std::map<int,SMESHDS_Mesh*>::iterator myMeshesIt;
-       std::map<int,SMESHDS_Hypothesis*>::iterator myHypothesisIt;
+        int myUserID;
+        std::map<int,SMESHDS_Mesh*> myMeshes;
+        std::map<int,SMESHDS_Hypothesis*> myHypothesis;
+        std::map<int,SMESHDS_Mesh*>::iterator myMeshesIt;
+        std::map<int,SMESHDS_Hypothesis*>::iterator myHypothesisIt;
 };
 
 #endif
index fd0ba61d512a95b346d446f795033ff1e289f215..46fc68259f86e6caed67fa4f5c3d94db8bdb2f61 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : idl implementation based on 'SMESH' unit's classes
 //  File   : SMESHDS_Group.cxx
 //  Module : SMESH
index 85d7d14c2407b6e95a777a97fda0068f55d38f49..fc4bbc50355af1a135988c6c45ef831aa8f7da5d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESHDS_Group.hxx
 //  Module : SMESH
index b14afd408ff1ac732e937a202c6c2df5e49d1daf..2535898e8eadcb251060f34009168a3ba2e8f814 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : idl implementation based on 'SMESH' unit's classes
 //  File   : SMESHDS_Group.cxx
 //  Module : SMESH
index ced9543fa5f37c5b6a9c7f5486712f2cfe36109a..9fefca27df21de2b8cca164e87b66fba69b81ad7 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESHDS_Group.hxx
 //  Module : SMESH
index 5fae9fda2ff724ab00753a9eec05cd07d2d3aae7..abd5d552b66a5809209fd7a9cf046ca406bf6842 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : idl implementation based on 'SMESH' unit's classes
 //  File   : SMESHDS_GroupOnGeom.cxx
 //  Module : SMESH
index ed01df758b7c61858ee91f37a0f2ef0d3eb4ea12..bb6f0900d5d9cef71f297961d3097c86a09cc233 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESHDS_GroupOnGeom.hxx
 //  Module : SMESH
index 84b3a6c32b5ea3279e074069396c582db317b011..5066e3f2aab9c7eedeb1244d703030febd2716eb 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESHDS_Hypothesis.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
-//  $Header$
 //
 #include "SMESHDS_Hypothesis.hxx"
 
+#include <sstream>
+
 using namespace std;
 
 //=============================================================================
@@ -37,11 +39,8 @@ using namespace std;
 
 SMESHDS_Hypothesis::SMESHDS_Hypothesis(int hypId)
 {
-//   MESSAGE("SMESHDS_Hypothesis::SMESHDS_Hypothesis");
   _hypId = hypId;
   _name = "generic";
-//   SCRUTE(_name);
-//   SCRUTE(_hypId);
 }
 
 //=============================================================================
@@ -52,7 +51,6 @@ SMESHDS_Hypothesis::SMESHDS_Hypothesis(int hypId)
 
 SMESHDS_Hypothesis::~SMESHDS_Hypothesis()
 {
-//   MESSAGE("SMESHDS_Hypothesis::~SMESHDS_Hypothesis");
 }
 
 //=============================================================================
@@ -63,9 +61,6 @@ SMESHDS_Hypothesis::~SMESHDS_Hypothesis()
 
 const char* SMESHDS_Hypothesis::GetName() const
 {
-//   MESSAGE("SMESHDS_Hypothesis::GetName");
-//   SCRUTE(_name);
-//   SCRUTE(&_name);
   return _name.c_str();
 }
 
@@ -77,8 +72,6 @@ const char* SMESHDS_Hypothesis::GetName() const
 
 int SMESHDS_Hypothesis::GetID() const
 {
-//   MESSAGE("SMESHDS_Hypothesis::GetId");
-//   SCRUTE(_hypId);
   return _hypId;
 }
 
@@ -90,8 +83,23 @@ int SMESHDS_Hypothesis::GetID() const
 
 int SMESHDS_Hypothesis::GetType() const
 {
-//   MESSAGE("SMESHDS_Hypothesis::GetType");
-//   SCRUTE(_type);
   return _type;
 }
 
+//=============================================================================
+/*!
+ * Equality
+ */
+//=============================================================================
+
+bool SMESHDS_Hypothesis::operator==(const SMESHDS_Hypothesis& other) const
+{
+  if ( this == &other )
+    return true;
+  if ( _name != other._name )
+    return false;
+  ostringstream mySave, otherSave;
+  ((SMESHDS_Hypothesis*)this  )->SaveTo(mySave);
+  ((SMESHDS_Hypothesis*)&other)->SaveTo(otherSave);
+  return mySave.str() == otherSave.str();
+}
index 4478b4a0b9317d6860616bff6f63c313e976baf2..97d0cbe2642d8925d07a9a6b6ef72054759da7c3 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESHDS_Hypothesis.hxx
 //  Author : Paul RASCLE, EDF
@@ -46,6 +47,9 @@ public:
   virtual std::ostream & SaveTo(std::ostream & save)=0;
   virtual std::istream & LoadFrom(std::istream & load)=0;
 
+  virtual bool operator==(const SMESHDS_Hypothesis& other) const;
+  bool operator!=(const SMESHDS_Hypothesis& other) const { return !(*this==other); }
+
 enum hypothesis_type {PARAM_ALGO, ALGO_0D, ALGO_1D, ALGO_2D, ALGO_3D};
 
 protected:
index 944df5abff9201b8bc555e706e74a16028dfed36..bb77e3bbd541b9735b629b1acf732d41fbda14dd 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESH_Mesh.cxx
 //  Author : Yves FRICAUD, OCC
 #include "SMDS_SpacePosition.hxx"
 #include "SMESHDS_GroupOnGeom.hxx"
 
-#include <TopExp_Explorer.hxx>
+#include <Standard_ErrorHandler.hxx>
+#include <Standard_OutOfRange.hxx>
 #include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
 #include <TopoDS_Iterator.hxx>
 
 #include "utilities.h"
@@ -1236,7 +1239,15 @@ int SMESHDS_Mesh::AddCompoundSubmesh(const TopoDS_Shape& S,
 //=======================================================================
 const TopoDS_Shape& SMESHDS_Mesh::IndexToShape(int ShapeIndex) const
 {
-        return myIndexToShape.FindKey(ShapeIndex);
+  try
+  {
+    return myIndexToShape.FindKey(ShapeIndex);
+  }
+  catch ( Standard_OutOfRange )
+  {
+  }
+  static TopoDS_Shape nullShape;
+  return nullShape;
 }
 
 //=======================================================================
index fa8d97d2040802d2f30e38555e7960bb6dafc755..b5ecf2988b9d9702b751d07b911a668289ec86a2 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESHDS_Mesh.hxx
 //  Module : SMESH
index a377b4e9e5cad3d4630f9d5fd237343e2fcf41e5..21183a18f730898cd3dc3cbc30987fb696f2a4c4 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESH_Script.cxx
 //  Author : Yves FRICAUD, OCC
index 9e01fc01c9c740e9bb8c57af3e9a64d49454fb2a..57cd907855e8710ac432627d645f64cf0db1bd07 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESHDS_Script.hxx
 //  Module : SMESH
 class SMESHDS_EXPORT SMESHDS_Script
 {
   public:
-       SMESHDS_Script(bool theIsEmbeddedMode);
-       ~SMESHDS_Script();
+        SMESHDS_Script(bool theIsEmbeddedMode);
+        ~SMESHDS_Script();
   
         void SetModified(bool theModified);
         bool IsModified();
 
-       void AddNode(int NewNodeID, double x, double y, double z);
-       void Add0DElement(int New0DElementID, int idnode);
-       void AddEdge(int NewEdgeID, int idnode1, int idnode2);
-       void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3);
-       void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3,
-               int idnode4);
-       void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
-               int idnode4);
-       void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
-               int idnode4, int idnode5);
-       void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
-               int idnode4, int idnode5, int idnode6);
-       void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
-               int idnode4, int idnode5, int idnode6, int idnode7, int idnode8);
+        void AddNode(int NewNodeID, double x, double y, double z);
+        void Add0DElement(int New0DElementID, int idnode);
+        void AddEdge(int NewEdgeID, int idnode1, int idnode2);
+        void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3);
+        void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3,
+                int idnode4);
+        void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
+                int idnode4);
+        void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
+                int idnode4, int idnode5);
+        void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
+                int idnode4, int idnode5, int idnode6);
+        void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
+                int idnode4, int idnode5, int idnode6, int idnode7, int idnode8);
 
         void AddPolygonalFace (const int NewFaceID,
                                std::vector<int> nodes_ids);
-       void AddPolyhedralVolume (const int NewVolID,
+        void AddPolyhedralVolume (const int NewVolID,
                                   std::vector<int> nodes_ids,
                                   std::vector<int> quantities);
 
         // special methods for quadratic elements
-       void AddEdge(int NewEdgeID, int n1, int n2, int n12);
+        void AddEdge(int NewEdgeID, int n1, int n2, int n12);
         void AddFace(int NewFaceID, int n1, int n2, int n3,
                      int n12, int n23, int n31);
         void AddFace(int NewFaceID, int n1, int n2, int n3, int n4,
@@ -86,21 +87,21 @@ class SMESHDS_EXPORT SMESHDS_Script
                        int n56, int n67, int n78, int n85,
                        int n15, int n26, int n37, int n48);
         void MoveNode(int NewNodeID, double x, double y, double z);
-       void RemoveNode(int NodeID);
-       void RemoveElement(int ElementID);
-       void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
-       void ChangePolyhedronNodes(const int        ElementID,
+        void RemoveNode(int NodeID);
+        void RemoveElement(int ElementID);
+        void ChangeElementNodes(int ElementID, int nodes[], int nbnodes);
+        void ChangePolyhedronNodes(const int        ElementID,
                                    std::vector<int> nodes_ids,
                                    std::vector<int> quantities);
-       void Renumber (const bool isNodes, const int startID, const int deltaID);
-       void ClearMesh();
-       void Clear();
-       const std::list<SMESHDS_Command*> & GetCommands();
+        void Renumber (const bool isNodes, const int startID, const int deltaID);
+        void ClearMesh();
+        void Clear();
+        const std::list<SMESHDS_Command*> & GetCommands();
 
   private:
-       SMESHDS_Command* getCommand(const SMESHDS_CommandType aType);
+        SMESHDS_Command* getCommand(const SMESHDS_CommandType aType);
 
-       std::list<SMESHDS_Command*> myCommands;
+        std::list<SMESHDS_Command*> myCommands;
 
         bool myIsEmbeddedMode;
         bool myIsModified;
index d45d9ddb8cf9c6b6081b43c451e4c799e133d176..7657c598455414cc949e37aef6e1d53457e61038 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESH_SubMesh.cxx
 //  Author : Yves FRICAUD, OCC
index 84b93d62d1ecb4355301de0d9643ce09e0cac5e5..7573d44e6a75da447e3a03458b4916598800122a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESHDS_SubMesh.hxx
 //  Module : SMESH
index 4e45bbfaaf4241b244d928cbc82a710e0f7b5ab5..0e4cda0add7cd52d03f50e2f08f7c47cfd44f2bd 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_SMESHDS.hxx
 //  Author : Alexander A. BORODIN
 //  Module : SMESH
index 527992db348be5e1555cc2d9a2c2078811a67eb5..7e3b23d8d797ee230f21ee769ac01336571f9d49 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH SMESHFiltersSelection : filter selector for viewer
 #  File   : Makefile.in
 #  Author : Patrick GOLDBRONN (CEA)
index f8f908f833ba3afd7130ba3b16d86e617b414455..f3c62d169c92041acff718ae682a948d1063883a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_LogicalFilter.cxx
 //  Module : SMESH
 //
index 928313f80507414d1fbbb8f94259f8232470adf1..9d36a73bce102dd2780f72785647ee211efc4cf8 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_LogicalFilter.hxx
 //  Module : SMESH
 //
index d8633f307516d25b168d1dfa282d3ca0a6490def..6b2cef05c7dbbfc3d0bb88fac7ee919178584e64 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_NumberFilter.cxx
 //  Module : SMESH
 //
index 45724cfa1a9b12de0bac9964e4624fde0f085832..3849f546e3b346d15e95ab82f2c8a59f0047ccfe 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_NumberFilter.hxx
 //  Module : SMESH
 //
index 881527ac1b184a4e3e7a9379858a7a475a959b6b..4531a8760494c30db65254344b120dcb03a4a07e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File      : SMESH_Type.h
 //  Created   : Mon Jun 03 15:14:15 2002
 //  Author    : Nicolas REJNERI
index 509b872405e0a524c92836266e5887a9cb212ffc..bfede041871ced4d17e2c54e8208ce7b03b0be04 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "SMESH_TypeFilter.hxx"
 
 #include <SUIT_Session.h>
@@ -87,90 +88,90 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
     switch (myType)
     {
       case HYPOTHESIS:
-       {
-         if      (aLevel == 2 && (objFather->Tag() == SMESH::Tag_HypothesisRoot))
+        {
+          if      (aLevel == 2 && (objFather->Tag() == SMESH::Tag_HypothesisRoot))
             // hypo definition
-           Ok = true;
-         else if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_RefOnAppliedHypothesis))
+            Ok = true;
+          else if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_RefOnAppliedHypothesis))
             // applied global hypo
-           Ok = true;
-         else if (aLevel == 5 && (objFather->Tag() == SMESH::Tag_RefOnAppliedHypothesis))
+            Ok = true;
+          else if (aLevel == 5 && (objFather->Tag() == SMESH::Tag_RefOnAppliedHypothesis))
             // applied local hypo
-           Ok = true;
-         break;
-       }
+            Ok = true;
+          break;
+        }
       case ALGORITHM:
-       {
-         if      (aLevel == 2 && (objFather->Tag() == SMESH::Tag_AlgorithmsRoot))
+        {
+          if      (aLevel == 2 && (objFather->Tag() == SMESH::Tag_AlgorithmsRoot))
             // algo definition
-           Ok = true;
-         else if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_RefOnAppliedAlgorithms))
+            Ok = true;
+          else if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_RefOnAppliedAlgorithms))
             // applied global algo
-           Ok = true;
-         else if (aLevel == 5 && (objFather->Tag() == SMESH::Tag_RefOnAppliedAlgorithms))
+            Ok = true;
+          else if (aLevel == 5 && (objFather->Tag() == SMESH::Tag_RefOnAppliedAlgorithms))
             // applied local algo
-           Ok = true;
-         break;
-       }
+            Ok = true;
+          break;
+        }
       case MESH:
-       {
-         if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
-           Ok = true;
-         break;
-       }
+        {
+          if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
+            Ok = true;
+          break;
+        }
       case SUBMESH:
-       {
-         // see SMESH_Gen_i.cxx for tag numbers
-         if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstSubMesh &&
+        {
+          // see SMESH_Gen_i.cxx for tag numbers
+          if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstSubMesh &&
                               objFather->Tag() <= SMESH::Tag_LastSubMesh))
-           Ok = true;
-         break;
-       }
+            Ok = true;
+          break;
+        }
       case MESHorSUBMESH:
-       {
-         if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
-           Ok = true; // mesh
+        {
+          if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
+            Ok = true; // mesh
           else if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstSubMesh &&
                                    objFather->Tag() <= SMESH::Tag_LastSubMesh))
-           Ok = true;
-         break;
-       }
+            Ok = true;
+          break;
+        }
       case SUBMESH_VERTEX: // Label "SubMeshes on vertexes"
-       {
-         if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnVertex))
-           Ok = true;
-         break;
-       }
+        {
+          if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnVertex))
+            Ok = true;
+          break;
+        }
       case SUBMESH_EDGE:
-       {
-         if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnEdge))
-           Ok = true;
-         break;
-       }
+        {
+          if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnEdge))
+            Ok = true;
+          break;
+        }
       case SUBMESH_FACE:
-       {
-         if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnFace))
-           Ok = true;
-         break;
-       }
+        {
+          if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnFace))
+            Ok = true;
+          break;
+        }
       case SUBMESH_SOLID:
-       {
-         if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnSolid))
-           Ok = true;
-         break;
-       }
+        {
+          if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnSolid))
+            Ok = true;
+          break;
+        }
       case SUBMESH_COMPOUND:
-       {
-         if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnCompound))
-           Ok = true;
-         break;
-       }
+        {
+          if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnCompound))
+            Ok = true;
+          break;
+        }
       case GROUP:
-       {
-         if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstGroup))
-           Ok = true;
-         break;
-       }
+        {
+          if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstGroup))
+            Ok = true;
+          break;
+        }
     }
   }
   return Ok;
index d966bfaa59a369483809f00278c320f50873415a..2c119975c8717d13a37f6229bae0df4b7cce626a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_TypeFilter.hxx
 //  Module : SMESH
 //
index 1b278b946e70a226869b4b8072c4ce196139c810..1030ffd65e2a2e103d727fe473613cbccecd6ba0 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # SMESH SMESHGUI : GUI for SMESH component
 # File   : Makefile.am
 # Author : Alexander BORODIN, Open CASCADE S.A.S.
@@ -71,6 +69,7 @@ salomeinclude_HEADERS = \
        SMESHGUI_RevolutionDlg.h \
        SMESHGUI_RotationDlg.h \
        SMESHGUI_TranslationDlg.h \
+       SMESHGUI_ScaleDlg.h \
        SMESHGUI_SymmetryDlg.h \
        SMESHGUI_SewingDlg.h \
        SMESHGUI_EditMeshDlg.h \
@@ -92,6 +91,10 @@ salomeinclude_HEADERS = \
        SMESHGUI_IdValidator.h \
        SMESHGUI_MeshInfosBox.h \
        SMESHGUI_Make2DFrom3DOp.h \
+       SMESHGUI_FindElemByPointDlg.h \
+       SMESHGUI_MeshOrderDlg.h \
+       SMESHGUI_MeshOrderOp.h \
+       SMESHGUI_FileValidator.h \
        SMESH_SMESHGUI.hxx
 
 # Libraries targets
@@ -130,6 +133,7 @@ dist_libSMESH_la_SOURCES = \
        SMESHGUI_RevolutionDlg.cxx \
        SMESHGUI_RotationDlg.cxx \
        SMESHGUI_TranslationDlg.cxx \
+       SMESHGUI_ScaleDlg.cxx \
        SMESHGUI_SymmetryDlg.cxx \
        SMESHGUI_SewingDlg.cxx \
        SMESHGUI_EditMeshDlg.cxx \
@@ -161,7 +165,11 @@ dist_libSMESH_la_SOURCES = \
        SMESHGUI_GroupOnShapeDlg.cxx \
        SMESHGUI_FileInfoDlg.cxx \
        SMESHGUI_MeshInfosBox.cxx \
-       SMESHGUI_Make2DFrom3DOp.cxx
+       SMESHGUI_Make2DFrom3DOp.cxx \
+       SMESHGUI_FindElemByPointDlg.cxx \
+       SMESHGUI_MeshOrderDlg.cxx \
+       SMESHGUI_MeshOrderOp.cxx \
+       SMESHGUI_FileValidator.cxx
 
 MOC_FILES = \
        SMESHGUI_moc.cxx \
@@ -195,6 +203,7 @@ MOC_FILES = \
        SMESHGUI_RevolutionDlg_moc.cxx \
        SMESHGUI_RotationDlg_moc.cxx \
        SMESHGUI_TranslationDlg_moc.cxx \
+       SMESHGUI_ScaleDlg_moc.cxx \
        SMESHGUI_SymmetryDlg_moc.cxx \
        SMESHGUI_SewingDlg_moc.cxx \
        SMESHGUI_EditMeshDlg_moc.cxx \
@@ -215,7 +224,10 @@ MOC_FILES = \
        SMESHGUI_GroupOnShapeDlg_moc.cxx \
        SMESHGUI_FileInfoDlg_moc.cxx \
        SMESHGUI_MeshInfosBox_moc.cxx \
-       SMESHGUI_Make2DFrom3DOp_moc.cxx
+       SMESHGUI_Make2DFrom3DOp_moc.cxx \
+       SMESHGUI_FindElemByPointDlg_moc.cxx \
+       SMESHGUI_MeshOrderDlg_moc.cxx \
+       SMESHGUI_MeshOrderOp_moc.cxx
 
 nodist_libSMESH_la_SOURCES= \
        $(MOC_FILES)
index 1b6d3fb834c36680bd284e99f455c46a5ca5c4b2..9064a3a1ab8aef218003ad3755cdf46b9ffbb773 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI.cxx
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
 // SMESH includes
-
+//
 #include "SMESHGUI.h"
-#include "SMESHGUI_NodesDlg.h"
-#include "SMESHGUI_TransparencyDlg.h"
-#include "SMESHGUI_ClippingDlg.h"
-#include "SMESHGUI_GroupDlg.h"
-#include "SMESHGUI_RemoveNodesDlg.h"
-#include "SMESHGUI_RemoveElementsDlg.h"
-#include "SMESHGUI_MeshInfosDlg.h"
-#include "SMESHGUI_StandardMeshInfosDlg.h"
-#include "SMESHGUI_WhatIsDlg.h"
-#include "SMESHGUI_Preferences_ColorDlg.h"
-#include "SMESHGUI_Preferences_ScalarBarDlg.h"
-#include "SMESHGUI_Hypotheses.h"
-#include "SMESHGUI_MoveNodesDlg.h"
 #include "SMESHGUI_AddMeshElementDlg.h"
 #include "SMESHGUI_AddQuadraticElementDlg.h"
+#include "SMESHGUI_BuildCompoundDlg.h"
+#include "SMESHGUI_ClippingDlg.h"
+#include "SMESHGUI_ComputeDlg.h"
+#include "SMESHGUI_ConvToQuadOp.h"
+#include "SMESHGUI_CreatePolyhedralVolumeDlg.h"
+#include "SMESHGUI_DeleteGroupDlg.h"
+#include "SMESHGUI_Displayer.h"
+#include "SMESHGUI_EditMeshDlg.h"
+#include "SMESHGUI_ExtrusionAlongPathDlg.h"
+#include "SMESHGUI_ExtrusionDlg.h"
+#include "SMESHGUI_FileInfoDlg.h"
+#include "SMESHGUI_FileValidator.h"
 #include "SMESHGUI_FilterDlg.h"
 #include "SMESHGUI_FilterLibraryDlg.h"
-#include "SMESHGUI_SingleEditDlg.h"
-#include "SMESHGUI_MultiEditDlg.h"
-#include "SMESHGUI_GroupOpDlg.h"
+#include "SMESHGUI_FindElemByPointDlg.h"
+#include "SMESHGUI_GroupDlg.h"
 #include "SMESHGUI_GroupOnShapeDlg.h"
-#include "SMESHGUI_DeleteGroupDlg.h"
-#include "SMESHGUI_SmoothingDlg.h"
+#include "SMESHGUI_GroupOpDlg.h"
+#include "SMESHGUI_Hypotheses.h"
+#include "SMESHGUI_Make2DFrom3DOp.h"
+#include "SMESHGUI_MakeNodeAtPointDlg.h"
+#include "SMESHGUI_MeshInfosDlg.h"
+#include "SMESHGUI_MeshOp.h"
+#include "SMESHGUI_MeshOrderOp.h"
+#include "SMESHGUI_MeshPatternDlg.h"
+#include "SMESHGUI_MoveNodesDlg.h"
+#include "SMESHGUI_MultiEditDlg.h"
+#include "SMESHGUI_NodesDlg.h"
+#include "SMESHGUI_Preferences_ColorDlg.h"
+#include "SMESHGUI_Preferences_ScalarBarDlg.h"
+#include "SMESHGUI_RemoveElementsDlg.h"
+#include "SMESHGUI_RemoveNodesDlg.h"
 #include "SMESHGUI_RenumberingDlg.h"
-#include "SMESHGUI_ExtrusionDlg.h"
-#include "SMESHGUI_ExtrusionAlongPathDlg.h"
 #include "SMESHGUI_RevolutionDlg.h"
-#include "SMESHGUI_TranslationDlg.h"
 #include "SMESHGUI_RotationDlg.h"
-#include "SMESHGUI_SymmetryDlg.h"
-#include "SMESHGUI_SewingDlg.h"
-#include "SMESHGUI_EditMeshDlg.h"
-#include "SMESHGUI_MeshPatternDlg.h"
 #include "SMESHGUI_Selection.h"
-#include "SMESHGUI_CreatePolyhedralVolumeDlg.h"
-#include "SMESHGUI_ConvToQuadOp.h"
-#include "SMESHGUI_MeshOp.h"
-#include "SMESHGUI_Displayer.h"
-#include "SMESHGUI_MakeNodeAtPointDlg.h"
-#include "SMESHGUI_BuildCompoundDlg.h"
-#include "SMESHGUI_ComputeDlg.h"
-#include "SMESHGUI_FileInfoDlg.h"
-#include "SMESHGUI_Make2DFrom3DOp.h"
+#include "SMESHGUI_SewingDlg.h"
+#include "SMESHGUI_SingleEditDlg.h"
+#include "SMESHGUI_SmoothingDlg.h"
+#include "SMESHGUI_StandardMeshInfosDlg.h"
+#include "SMESHGUI_SymmetryDlg.h"
+#include "SMESHGUI_TranslationDlg.h"
+#include "SMESHGUI_ScaleDlg.h"
+#include "SMESHGUI_TransparencyDlg.h"
+#include "SMESHGUI_WhatIsDlg.h"
 
 #include "SMESHGUI_Utils.h"
 #include "SMESHGUI_MeshUtils.h"
 
   void ExportMeshToFile(int theCommandID);
 
-  void SetDisplayMode(int theCommandID);
+  void SetDisplayMode(int theCommandID, SMESHGUI_StudyId2MarkerMap& theMarkerMap);
 
   void SetDisplayEntity(int theCommandID);
 
     if( aSel )
       aSel->selectedObjects( selected );
 
-    SMESH::SMESH_Mesh_var aMesh;
-    if(selected.Extent() == 1)
-      aMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(selected.First());
-    if ( aMesh->_is_nil() ) {
-      SUIT_MessageBox::warning( SMESHGUI::desktop(),
-                                QObject::tr( "SMESH_WRN_WARNING" ),
-                                QObject::tr( "SMESH_BAD_MESH_SELECTION" ));
+    // actually, the following condition can't be met (added for insurance)
+    if( selected.Extent() == 0 ||
+        selected.Extent() > 1 && theCommandID != 122 && theCommandID != 125 )
       return;
+
+    bool hasDuplicatedMeshNames = false;
+    QList< QPair< SMESH::SMESH_Mesh_var, QString > > aMeshList;
+    QList< QPair< SMESH::SMESH_Mesh_var, QString > >::iterator aMeshIter;
+    SALOME_ListIteratorOfListIO It( selected );
+    for( ; It.More(); It.Next() ) {
+      Handle(SALOME_InteractiveObject) anIObject = It.Value();
+      SMESH::SMESH_Mesh_var aMeshItem = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>( anIObject );
+      if ( aMeshItem->_is_nil() ) {
+        SUIT_MessageBox::warning( SMESHGUI::desktop(),
+                                  QObject::tr( "SMESH_WRN_WARNING" ),
+                                  QObject::tr( "SMESH_BAD_MESH_SELECTION" ));
+        return;
+      }
+
+      QString aMeshName = anIObject->getName();
+
+      // check for duplications
+      for( aMeshIter = aMeshList.begin(); aMeshIter != aMeshList.end(); aMeshIter++ ) {
+        if( aMeshName == (*aMeshIter).second ) {
+          hasDuplicatedMeshNames = true;
+          break;
+        }
+      }
+
+      aMeshList.append( QPair< SMESH::SMESH_Mesh_var, QString >( aMeshItem, aMeshName ) );
     }
 
-    Handle(SALOME_InteractiveObject) anIObject = selected.First();
+    if( hasDuplicatedMeshNames ) {
+      int aRet = SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                          QObject::tr("SMESH_WRN_WARNING"),
+                                          QObject::tr("SMESH_EXPORT_MED_DUPLICATED_MESH_NAMES"),
+                                          QObject::tr("SMESH_BUT_YES"),
+                                          QObject::tr("SMESH_BUT_NO"), 0, 1);
+      if (aRet != 0)
+        return;
+    }
+
+    aMeshIter = aMeshList.begin();
+    SMESH::SMESH_Mesh_var aMesh = (*aMeshIter).first;
+    QString aMeshName = (*aMeshIter).second;
+
+    QList<SALOMEDS::Color> aReservedColors;
+
     QString aFilter, aTitle = QObject::tr("Export mesh");
     QMap<QString, SMESH::MED_VERSION> aFilterMap;
     QMap<QString, int> aFilterMapSTL;
     case 125:
     case 122:
       {
-        if (aMesh->HasDuplicatedGroupNamesMED()) {
-          int aRet = SUIT_MessageBox::warning
-            (SMESHGUI::desktop(),
-             QObject::tr("SMESH_WRN_WARNING"),
-             QObject::tr("SMESH_EXPORT_MED_DUPLICATED_GRP").arg(anIObject->getName()),
-             SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::Yes);
-          if (aRet != SUIT_MessageBox::Yes)
-            return;
+        for( aMeshIter = aMeshList.begin(); aMeshIter != aMeshList.end(); aMeshIter++ ) {
+          SMESH::SMESH_Mesh_var aMeshItem = (*aMeshIter).first;
+          if (aMeshItem->HasDuplicatedGroupNamesMED()) {
+            int aRet = SUIT_MessageBox::warning
+              (SMESHGUI::desktop(),
+               QObject::tr("SMESH_WRN_WARNING"),
+               QObject::tr("SMESH_EXPORT_MED_DUPLICATED_GRP").arg((*aMeshIter).second),
+               QObject::tr("SMESH_BUT_YES"),
+               QObject::tr("SMESH_BUT_NO"), 0, 1);
+            if (aRet != 0)
+              return;
+          }
         }
         // PAL18696
         QString v21 (aMesh->GetVersionString(SMESH::MED_V2_1, 2));
           int aRet = SUIT_MessageBox::warning
             (SMESHGUI::desktop(),
              QObject::tr("SMESH_WRN_WARNING"),
-             QObject::tr("SMESH_EXPORT_UNV").arg(anIObject->getName()),
-             SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::Yes);
-          if (aRet != SUIT_MessageBox::Yes)
+             QObject::tr("SMESH_EXPORT_UNV").arg(aMeshName),
+             QObject::tr("SMESH_BUT_YES"),
+             QObject::tr("SMESH_BUT_NO"), 0, 1);
+          if (aRet != 0)
             return;
         }
         aFilter = QObject::tr("IDEAS files (*.unv)");
           SUIT_MessageBox::warning
             (SMESHGUI::desktop(),
              QObject::tr("SMESH_WRN_WARNING"),
-             QObject::tr("SMESH_EXPORT_STL1").arg(anIObject->getName()));
+             QObject::tr("SMESH_EXPORT_STL1").arg(aMeshName));
           return;
         }
         if (!(aMesh->NbElements() - aMesh->NbTriangles())) {
           int aRet = SUIT_MessageBox::warning
             (SMESHGUI::desktop(),
              QObject::tr("SMESH_WRN_WARNING"),
-             QObject::tr("SMESH_EXPORT_STL2").arg(anIObject->getName()),
-             SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::Yes);
-          if (aRet != SUIT_MessageBox::Yes)
+             QObject::tr("SMESH_EXPORT_STL2").arg(aMeshName),
+             QObject::tr("SMESH_BUT_YES"),
+             QObject::tr("SMESH_BUT_NO"), 0, 1);
+          if (aRet != 0)
             return;
         }
 
-        aFilterMapSTL.insert( QObject::tr("STL ASCII  (*.stl)"), 1 ); // 1 - ASCII mode
+        aFilterMapSTL.insert( QObject::tr("STL ASCII (*.stl)"), 1 ); // 1 - ASCII mode
         aFilterMapSTL.insert( QObject::tr("STL Binary (*.stl)"), 0 ); // 0 - Binary mode
       }
       break;
     SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
     if ( resMgr )
       toCreateGroups = resMgr->booleanValue( "SMESH", "auto_groups", false );
+    bool toOverwrite = true;
 
     QString anInitialPath = "";
     if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
 
     if ( theCommandID != 122 && theCommandID != 125 && theCommandID != 140 && theCommandID != 141) {
       if ( anInitialPath.isEmpty() ) anInitialPath = SUIT_FileDlg::getLastVisitedPath();
-      aFilename = SUIT_FileDlg::getFileName(SMESHGUI::desktop(), anInitialPath + QString("/") + anIObject->getName(),
+      aFilename = SUIT_FileDlg::getFileName(SMESHGUI::desktop(), anInitialPath + QString("/") + aMeshName,
                                             aFilter, aTitle, false);
     }
     else if(theCommandID == 140 || theCommandID == 141) { // Export to STL
 
       SUIT_FileDlg* fd = new SUIT_FileDlg( SMESHGUI::desktop(), false, true, true );
       fd->setWindowTitle( aTitle );
-      fd->setFilters( filters );
-      fd->selectFilter( QObject::tr("STL ASCII  (*.stl)") );
+      fd->setNameFilters( filters );
+      fd->selectNameFilter( QObject::tr("STL ASCII (*.stl)") );
       if ( !anInitialPath.isEmpty() )
         fd->setDirectory( anInitialPath );
-      fd->selectFile(anIObject->getName());
+      fd->selectFile(aMeshName);
       bool is_ok = false;
       while (!is_ok) {
         if ( fd->exec() )
           aFilename = fd->selectedFile();
-        aIsASCII_STL = (aFilterMapSTL[fd->selectedFilter()]) == 1 ? true: false;
+        aIsASCII_STL = (aFilterMapSTL[fd->selectedNameFilter()]) == 1 ? true: false;
         is_ok = true;
       }
       delete fd;
       SalomeApp_CheckFileDlg* fd = new SalomeApp_CheckFileDlg
         ( SMESHGUI::desktop(), false, QObject::tr("SMESH_AUTO_GROUPS"), true, true );
       fd->setWindowTitle( aTitle );
-      fd->setFilters( filters );
-      //fd->setSelectedFilter( QObject::tr("MED 2.2 (*.med)") );
-      fd->selectFilter(aDefaultFilter);
+      fd->setNameFilters( filters );
+      //fd->setSelectedNameFilter( QObject::tr("MED 2.2 (*.med)") );
+      fd->selectNameFilter(aDefaultFilter);
       fd->SetChecked(toCreateGroups);
       if ( !anInitialPath.isEmpty() )
         fd->setDirectory( anInitialPath );
-      fd->selectFile(anIObject->getName());
+      fd->selectFile(aMeshName);
+
+      SMESHGUI_FileValidator* fv = new SMESHGUI_FileValidator( fd );
+      fd->setValidator( fv );
+
       bool is_ok = false;
       while (!is_ok) {
         if ( fd->exec() )
           aFilename = fd->selectedFile();
-        aFormat = aFilterMap[fd->selectedFilter()];
+        else {
+          aFilename = QString::null;
+          break;
+        }
+        aFormat = aFilterMap[fd->selectedNameFilter()];
+        toOverwrite = fv->isOverwrite();
         is_ok = true;
-        if ( !aFilename.isEmpty()
-             && (aMesh->NbPolygons()>0 || aMesh->NbPolyhedrons()>0)
-             && aFormat==SMESH::MED_V2_1) {
-          int aRet = SUIT_MessageBox::warning(SMESHGUI::desktop(),
-                                              QObject::tr("SMESH_WRN_WARNING"),
-                                              QObject::tr("SMESH_EXPORT_MED_V2_1").arg(anIObject->getName()),
-                                              SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::Yes);
-          if (aRet != SUIT_MessageBox::Yes) {
-            is_ok = false;
+        if ( !aFilename.isEmpty() ) {
+          for( aMeshIter = aMeshList.begin(); aMeshIter != aMeshList.end(); aMeshIter++ ) {
+            SMESH::SMESH_Mesh_var aMeshItem = (*aMeshIter).first;
+            if( (aMeshItem->NbPolygons()>0 || aMeshItem->NbPolyhedrons()>0)
+                && aFormat==SMESH::MED_V2_1) {
+              int aRet = SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                                  QObject::tr("SMESH_WRN_WARNING"),
+                                                  QObject::tr("SMESH_EXPORT_MED_V2_1").arg((*aMeshIter).second),
+                                                  QObject::tr("SMESH_BUT_YES"),
+                                                  QObject::tr("SMESH_BUT_NO"), 0, 1);
+              if (aRet != 0) {
+                is_ok = false;
+                break;
+              }
+            }
+          }
+          if( !toOverwrite ) {
+            SMESH::MED_VERSION aVersion = SMESH::MED_V2_1;
+            bool isVersionOk = SMESHGUI::GetSMESHGen()->GetMEDVersion( aFilename.toLatin1().constData(), aVersion );
+            if( !isVersionOk || aVersion != aFormat ) {
+              int aRet = SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                                  QObject::tr("SMESH_WRN_WARNING"),
+                                                  QObject::tr("SMESH_EXPORT_MED_VERSION_COLLISION").arg(aFilename),
+                                                  QObject::tr("SMESH_BUT_YES"),
+                                                  QObject::tr("SMESH_BUT_NO"), 0, 1);
+              if (aRet == 0)
+                toOverwrite = true;
+              else
+                is_ok = false;
+            }
+
+            QStringList aMeshNamesCollisionList;
+            SMESH::string_array_var aMeshNames = SMESHGUI::GetSMESHGen()->GetMeshNames( aFilename.toLatin1().constData() );
+            for( int i = 0, n = aMeshNames->length(); i < n; i++ ) {
+              QString anExistingMeshName( aMeshNames[ i ] );
+              for( aMeshIter = aMeshList.begin(); aMeshIter != aMeshList.end(); aMeshIter++ ) {
+                QString anExportMeshName = (*aMeshIter).second;
+                if( anExportMeshName == anExistingMeshName ) {
+                  aMeshNamesCollisionList.append( anExportMeshName );
+                  break;
+                }
+              }
+            }
+
+            if( !aMeshNamesCollisionList.isEmpty() ) {
+              QString aMeshNamesCollisionString = aMeshNamesCollisionList.join( ", " );
+              int aRet = SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                                  QObject::tr("SMESH_WRN_WARNING"),
+                                                  QObject::tr("SMESH_EXPORT_MED_MESH_NAMES_COLLISION").arg(aMeshNamesCollisionString),
+                                                  QObject::tr("SMESH_BUT_YES"),
+                                                  QObject::tr("SMESH_BUT_NO"),
+                                                  QObject::tr("SMESH_BUT_CANCEL"), 0, 2);
+              if (aRet == 0)
+                toOverwrite = true;
+              else if (aRet == 2)
+                is_ok = false;
+            }
           }
         }
       }
     if ( !aFilename.isEmpty() ) {
       // Check whether the file already exists and delete it if yes
       QFile aFile( aFilename );
-      if ( aFile.exists() )
+      if ( aFile.exists() && toOverwrite )
         aFile.remove();
       SUIT_OverrideCursor wc;
 
         }
         switch ( theCommandID ) {
         case 125:
-        case 122:
-          aMesh->ExportToMED( aFilename.toLatin1().data(), toCreateGroups, aFormat );
+        case 122: {
+            int aMeshIndex = 0;
+            for( aMeshIter = aMeshList.begin(); aMeshIter != aMeshList.end(); aMeshIter++, aMeshIndex++ ) {
+              SMESH::SMESH_Mesh_var aMeshItem = (*aMeshIter).first;
+              if( !aMeshItem->_is_nil() )
+                aMeshItem->ExportToMEDX( aFilename.toLatin1().data(), toCreateGroups, aFormat, toOverwrite && aMeshIndex == 0 );
+            }
+          }
           break;
         case 124:
         case 121:
       aReservedColors.append( aColor );
 
       _PTR(SObject) aGroupSObject = SMESH::FindSObject(aGroupObject);
-      if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aGroupSObject->GetID().c_str()))
-      {
-        if( aGroupObject->GetType() == SMESH::NODE )
-          anActor->SetNodeColor( aColor.R, aColor.G, aColor.B );
-        else if( aGroupObject->GetType() == SMESH::EDGE )
-          anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B );
-        else
-          anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B );
+      if (aGroupSObject) {
+        if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aGroupSObject->GetID().c_str())) {
+          if( aGroupObject->GetType() == SMESH::NODE )
+            anActor->SetNodeColor( aColor.R, aColor.G, aColor.B );
+          else if( aGroupObject->GetType() == SMESH::EDGE )
+            anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B );
+          else if( aGroupObject->GetType() == SMESH::ELEM0D )
+            anActor->Set0DColor( aColor.R, aColor.G, aColor.B );
+          else
+            anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B );
+        }
       }
     }
 
     }
   }
 
-  void SetDisplayMode(int theCommandID){
+  void SetDisplayMode(int theCommandID, SMESHGUI_StudyId2MarkerMap& theMarkerMap){
     SALOME_ListIO selected;
     SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
     if( !app )
               c2 = int (nodecolor[2] * 255);
               QColor n(c0, c1, c2);
 
+              vtkFloatingPointType color0D[3];
+              anActor->Get0DColor(color0D[0], color0D[1], color0D[2]);
+              c0 = int (color0D[0] * 255);
+              c1 = int (color0D[1] * 255);
+              c2 = int (color0D[2] * 255);
+              QColor c0D(c0, c1, c2);
+
+              int size0D = (int)anActor->Get0DSize();
+              if(size0D == 0)
+                size0D = 1;
               int Edgewidth = (int)anActor->GetLineWidth();
               if(Edgewidth == 0)
                 Edgewidth = 1;
-              int intValue = int(anActor->GetNodeSize());
               vtkFloatingPointType Shrink = anActor->GetShrinkFactor();
 
+              vtkFloatingPointType faces_orientation_color[3];
+              anActor->GetFacesOrientationColor(faces_orientation_color);
+              c0 = int (faces_orientation_color[0] * 255);
+              c1 = int (faces_orientation_color[1] * 255);
+              c2 = int (faces_orientation_color[2] * 255);
+              QColor o(c0, c1, c2);
+
+              vtkFloatingPointType faces_orientation_scale = anActor->GetFacesOrientationScale();
+              bool faces_orientation_3dvectors = anActor->GetFacesOrientation3DVectors();
+
               SMESHGUI_Preferences_ColorDlg *aDlg =
                 new SMESHGUI_Preferences_ColorDlg( SMESHGUI::GetSMESHGUI() );
               aDlg->SetColor(1, c);
               aDlg->SetColor(2, e);
               aDlg->SetColor(3, n);
               aDlg->SetColor(4, b);
+              aDlg->SetColor(5, c0D);
+              aDlg->SetColor(6, o);
               aDlg->SetIntValue(1, Edgewidth);
-              aDlg->SetIntValue(2, intValue);
-              aDlg->SetIntValue(3, int(Shrink*100.));
+              aDlg->SetIntValue(2, int(Shrink*100.));
+              aDlg->SetIntValue(3, size0D);
+              aDlg->SetDoubleValue(1, faces_orientation_scale);
+              aDlg->SetBooleanValue(1, faces_orientation_3dvectors);
+
+              aDlg->setCustomMarkerMap( theMarkerMap[ aStudy->StudyId() ] );
+
+              VTK::MarkerType aMarkerTypeCurrent = anActor->GetMarkerType();
+              VTK::MarkerScale aMarkerScaleCurrent = anActor->GetMarkerScale();
+              int aMarkerTextureCurrent = anActor->GetMarkerTexture();
+              if( aMarkerTypeCurrent != VTK::MT_USER )
+                aDlg->setStandardMarker( aMarkerTypeCurrent, aMarkerScaleCurrent );
+              else
+                aDlg->setCustomMarker( aMarkerTextureCurrent );
+
               if(aDlg->exec()){
                 QColor color = aDlg->GetColor(1);
                 QColor edgecolor = aDlg->GetColor(2);
                 QColor nodecolor = aDlg->GetColor(3);
                 QColor backfacecolor = aDlg->GetColor(4);
+                QColor color0D = aDlg->GetColor(5);
+                QColor faces_orientation_color = aDlg->GetColor(6);
                 /* actor color and backface color */
                 anActor->SetSufaceColor(vtkFloatingPointType (color.red()) / 255.,
                                         vtkFloatingPointType (color.green()) / 255.,
                                       vtkFloatingPointType (edgecolor.blue()) / 255.);
 
                 /* Shrink factor and size edges */
-                anActor->SetShrinkFactor(aDlg->GetIntValue(3) / 100.);
+                anActor->SetShrinkFactor(aDlg->GetIntValue(2) / 100.);
                 anActor->SetLineWidth(aDlg->GetIntValue(1));
 
                 /* Nodes color and size */
                 anActor->SetNodeColor(vtkFloatingPointType (nodecolor.red()) / 255.,
                                       vtkFloatingPointType (nodecolor.green()) / 255.,
                                       vtkFloatingPointType (nodecolor.blue()) / 255.);
-                anActor->SetNodeSize(aDlg->GetIntValue(2));
+
+                /* 0D elements */
+                anActor->Set0DColor(vtkFloatingPointType (color0D.red()) / 255.,
+                                    vtkFloatingPointType (color0D.green()) / 255.,
+                                    vtkFloatingPointType (color0D.blue()) / 255.);
+                anActor->Set0DSize(aDlg->GetIntValue(3));
+
+                /* Faces orientation */
+                vtkFloatingPointType c[3] = {vtkFloatingPointType(faces_orientation_color.redF()),
+                                             vtkFloatingPointType(faces_orientation_color.greenF()),
+                                             vtkFloatingPointType(faces_orientation_color.blueF())};
+                anActor->SetFacesOrientationColor(c);
+                anActor->SetFacesOrientationScale(aDlg->GetDoubleValue(1));
+                anActor->SetFacesOrientation3DVectors(aDlg->GetBooleanValue(1));
+
+                /* Point marker */
+                theMarkerMap[ aStudy->StudyId() ] = aDlg->getCustomMarkerMap();
+
+                VTK::MarkerType aMarkerTypeNew = aDlg->getMarkerType();
+                VTK::MarkerScale aMarkerScaleNew = aDlg->getStandardMarkerScale();
+                int aMarkerTextureNew = aDlg->getCustomMarkerID();
+                if( aMarkerTypeNew != VTK::MT_USER )
+                  anActor->SetMarkerStd( aMarkerTypeNew, aMarkerScaleNew );
+                else {
+                  const VTK::MarkerMap& aMarkerMap = theMarkerMap[ aStudy->StudyId() ];
+                  VTK::MarkerMap::const_iterator anIter = aMarkerMap.find( aMarkerTextureNew );
+                  if( anIter != aMarkerMap.end() )
+                    anActor->SetMarkerTexture( aMarkerTextureNew, anIter->second.second );
+                }
 
                 SMESH::SMESH_GroupBase_var aGroupObject = SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IObject);
                 if( !aGroupObject->_is_nil() )
@@ -1464,13 +1643,13 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
   case 213: // Nodes
   case 212: // Nodes
   case 211: // Nodes
-    ::SetDisplayMode(theCommandID);
+    ::SetDisplayMode(theCommandID, myMarkerMap);
   break;
 
   //2D quadratic representation
   case 231:
   case 232:
-    ::SetDisplayMode(theCommandID);
+    ::SetDisplayMode(theCommandID, myMarkerMap);
   break;
   
   // Display Entity
@@ -1637,6 +1816,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
   case 701:                                     // COMPUTE MESH
   case 711:                                     // PRECOMPUTE MESH
   case 712:                                     // EVALUATE MESH
+  case 713:                                     // MESH ORDER
     {
       if (checkLock(aStudy)) break;
       startOperation( theCommandID );
@@ -1685,9 +1865,10 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         ( new SMESHGUI_UnionOfTwoTrianglesDlg( this ) )->show();
       break;
     }
-    case 409: // Change orientation
-    case 410: // Union of triangles
-    case 411: // Cutting of quadrangles
+  case 409: // Change orientation
+  case 410: // Union of triangles
+  case 411: // Cutting of quadrangles
+  case 419: // Splitting volumes into tetrahedra
     {
       if ( !vtkwnd )
       {
@@ -1705,6 +1886,8 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         aDlg = new SMESHGUI_ChangeOrientationDlg(this);
       else if ( theCommandID == 410 )
         aDlg = new SMESHGUI_UnionOfTrianglesDlg(this);
+      else if ( theCommandID == 419 )
+        aDlg = new SMESHGUI_CuttingIntoTetraDlg(this);
       else
         aDlg = new SMESHGUI_CuttingOfQuadsDlg(this);
 
@@ -2098,6 +2281,12 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       break;
     }
 
+  case 904:                                     // FIND ELEM
+    {
+      startOperation( theCommandID );
+      break;
+    }
+
   case 1100:                                    // EDIT HYPOTHESIS
     {
       if(checkLock(aStudy)) break;
@@ -2485,6 +2674,20 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     startOperation( 4067 );
     break;
 
+  case 4068: // SCALE
+    {
+      if(checkLock(aStudy)) break;
+      if ( vtkwnd ) {
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_ScaleDlg( this ) )->show();
+      }
+      else {
+        SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+      }
+      break;
+    }
+
   case 5105: // Library of selection filters
   {
     static QList<int> aTypes;
@@ -2726,6 +2929,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createSMESHAction(  710, "BUILD_COMPOUND",  "ICON_BUILD_COMPOUND" );
   createSMESHAction(  711, "PRECOMPUTE",      "ICON_PRECOMPUTE" );
   createSMESHAction(  712, "EVALUATE",        "ICON_COMPUTE" );
+  createSMESHAction(  713, "MESH_ORDER",      "ICON_COMPUTE" );
   createSMESHAction(  806, "CREATE_GEO_GROUP","ICON_CREATE_GEO_GROUP" );
   createSMESHAction(  801, "CREATE_GROUP",    "ICON_CREATE_GROUP" );
   createSMESHAction(  802, "CONSTRUCT_GROUP", "ICON_CONSTRUCT_GROUP" );
@@ -2741,6 +2945,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createSMESHAction(  900, "ADV_INFO",        "ICON_ADV_INFO" );
   createSMESHAction(  902, "STD_INFO",        "ICON_STD_INFO" );
   createSMESHAction(  903, "WHAT_IS",         "ICON_WHAT_IS" );
+  createSMESHAction(  904, "FIND_ELEM",       "ICON_FIND_ELEM" );
   createSMESHAction( 6001, "LENGTH",          "ICON_LENGTH",        0, true );
   createSMESHAction( 6002, "FREE_EDGE",       "ICON_FREE_EDGE",     0, true );
   createSMESHAction( 6021, "FREE_FACES",      "ICON_FREE_FACES",    0, true );
@@ -2777,6 +2982,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createSMESHAction( 4065, "MERGE",           "ICON_SMESH_MERGE_NODES" );
   createSMESHAction( 4066, "MERGE_ELEMENTS",  "ICON_DLG_MERGE_ELEMENTS" );
   createSMESHAction( 4067, "MESH_THROU_POINT","ICON_DLG_MESH_THROU_POINT" );
+  createSMESHAction( 4068, "SCALE",           "ICON_DLG_MESH_SCALE" );
   createSMESHAction(  406, "MOVE",            "ICON_DLG_MOVE_NODE" );
   createSMESHAction(  407, "INV",             "ICON_DLG_MESH_DIAGONAL" );
   createSMESHAction(  408, "UNION2",          "ICON_UNION2TRI" );
@@ -2790,6 +2996,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createSMESHAction(  416, "EXTRUSION_ALONG", "ICON_EXTRUSION_ALONG" );
   createSMESHAction(  417, "CONV_TO_QUAD",    "ICON_CONV_TO_QUAD" );
   createSMESHAction(  418, "2D_FROM_3D",      "ICON_2D_FROM_3D" );
+  createSMESHAction(  419, "SPLIT_TO_TETRA",  "ICON_SPLIT_TO_TETRA" );
   createSMESHAction(  200, "RESET" );
   createSMESHAction(  201, "SCALAR_BAR_PROP" );
   createSMESHAction(  211, "WIRE",           "ICON_WIRE", 0, true );
@@ -2874,6 +3081,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createMenu( 701, meshId, -1 );
   createMenu( 711, meshId, -1 );
   createMenu( 712, meshId, -1 );
+  createMenu( 713, meshId, -1 );
   createMenu( separator(), meshId, -1 );
   createMenu( 801, meshId, -1 );
   createMenu( 806, meshId, -1 );
@@ -2892,6 +3100,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createMenu( 900, meshId, -1 );
   createMenu( 902, meshId, -1 );
   createMenu( 903, meshId, -1 );
+  createMenu( 904, meshId, -1 );
   createMenu( separator(), meshId, -1 );
 
   createMenu( 6003, ctrlId, -1 );
@@ -2945,6 +3154,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createMenu( 4064, transfId, -1 );
   createMenu( 4065, transfId, -1 );
   createMenu( 4066, transfId, -1 );
+  createMenu( 4068, transfId, -1 );
 
   createMenu( 406, modifyId, -1 );
   createMenu( 4067,modifyId, -1 );
@@ -2953,6 +3163,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createMenu( 409, modifyId, -1 );
   createMenu( 410, modifyId, -1 );
   createMenu( 411, modifyId, -1 );
+  createMenu( 419, modifyId, -1 );
   createMenu( 412, modifyId, -1 );
   createMenu( 413, modifyId, -1 );
   createMenu( 416, modifyId, -1 );
@@ -2978,6 +3189,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createTool( 701, meshTb );
   createTool( 711, meshTb );
   createTool( 712, meshTb );
+  createTool( 713, meshTb );
   createTool( separator(), meshTb );
   createTool( 801, meshTb );
   createTool( 806, meshTb );
@@ -2988,6 +3200,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createTool( 900, meshTb );
   createTool( 902, meshTb );
   createTool( 903, meshTb );
+  createTool( 904, meshTb );
   createTool( separator(), meshTb );
 
   createTool( 6001, ctrlTb );
@@ -3041,6 +3254,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createTool( 4064, addRemTb );
   createTool( 4065, addRemTb );
   createTool( 4066, addRemTb );
+  createTool( 4068, addRemTb );
   createTool( separator(), addRemTb );
 
   createTool( 406, modifyTb );
@@ -3050,6 +3264,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createTool( 409, modifyTb );
   createTool( 410, modifyTb );
   createTool( 411, modifyTb );
+  createTool( 419, modifyTb );
   createTool( 412, modifyTb );
   createTool( 413, modifyTb );
   createTool( 416, modifyTb );
@@ -3108,11 +3323,13 @@ void SMESHGUI::initialize( CAM_Application* app )
   popupMgr()->insert( separator(), -1, 0 );
   createPopupItem( 701, OB, mesh, "&& isComputable" );     // COMPUTE
   createPopupItem( 711, OB, mesh, "&& isComputable && isPreComputable" ); // PRECOMPUTE
-  createPopupItem( 712, OB, mesh, "&& isComputable" );     // COMPUTE
+  createPopupItem( 712, OB, mesh, "&& isComputable" );     // EVALUATE
+  createPopupItem( 713, OB, mesh, "&& isComputable" );     // MESH ORDER
   createPopupItem( 214, OB, mesh_group );                  // UPDATE
   createPopupItem( 900, OB, mesh_group );                  // ADV_INFO
   createPopupItem( 902, OB, mesh );                        // STD_INFO
   createPopupItem( 903, OB, mesh_group );                  // WHAT_IS
+  createPopupItem( 904, OB, mesh_group );                  // FIND_ELEM
   popupMgr()->insert( separator(), -1, 0 );
   createPopupItem( 801, OB, mesh );                        // CREATE_GROUP
   createPopupItem( 806, OB, mesh );                        // CREATE_GEO_GROUP
@@ -3129,8 +3346,9 @@ void SMESHGUI::initialize( CAM_Application* app )
   popupMgr()->insert( separator(), -1, 0 );
 
   QString only_one_non_empty = QString( " && %1=1 && numberOfNodes>0" ).arg( dc );
+  QString multiple_non_empty = QString( " && %1>0 && numberOfNodes>0" ).arg( dc );
 
-  createPopupItem( 125, OB, mesh, only_one_non_empty );   // EXPORT_MED
+  createPopupItem( 125, OB, mesh, multiple_non_empty );   // EXPORT_MED
   createPopupItem( 126, OB, mesh, only_one_non_empty );   // EXPORT_UNV
   createPopupItem( 141, OB, mesh, only_one_non_empty );   // EXPORT_STL
   //createPopupItem( 33, OB, subMesh + " " + group );       // DELETE
@@ -3147,6 +3365,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createPopupItem( 900, View, mesh_group ); // ADV_INFO
   createPopupItem( 902, View, mesh );       // STD_INFO
   createPopupItem( 903, View, mesh_group ); // WHAT_IS
+  createPopupItem( 904, View, mesh_group ); // FIND_ELEM
   popupMgr()->insert( separator(), -1, 0 );
 
   createPopupItem( 1136, OB + " " + View, mesh, "&& (not isAutoColor)" ); // AUTO_COLOR
@@ -3405,6 +3624,13 @@ bool SMESHGUI::isSelectionCompatible()
   return isCompatible;
 }
 
+
+bool SMESHGUI::reusableOperation( const int id )
+{
+  // compute, evaluate and precompute are not reusable operations
+  return ( id == 701 || id == 711 || id == 712 ) ? false : SalomeApp_Module::reusableOperation( id );
+} 
+
 bool SMESHGUI::activateModule( SUIT_Study* study )
 {
   bool res = SalomeApp_Module::activateModule( study );
@@ -3608,17 +3834,64 @@ void SMESHGUI::createPreferences()
                              "SMESH", "nb_segments_per_edge" );
   setPreferenceProperty( nbSeg, "min", 1 );
   setPreferenceProperty( nbSeg, "max", 10000000 );
+  
+  // Quantities with individual precision settings
+  int precGroup = addPreference( tr( "SMESH_PREF_GROUP_PRECISION" ), genTab );
+  setPreferenceProperty( precGroup, "columns", 2 );
+  
+  const int nbQuantities = 6;
+  int precs[nbQuantities], ii = 0;
+  precs[ii++] = addPreference( tr( "SMESH_PREF_length_precision" ), precGroup,
+                            LightApp_Preferences::IntSpin, "SMESH", "length_precision" );  
+  precs[ii++] = addPreference( tr( "SMESH_PREF_angle_precision" ), precGroup,
+                            LightApp_Preferences::IntSpin, "SMESH", "angle_precision" );
+  precs[ii++] = addPreference( tr( "SMESH_PREF_len_tol_precision" ), precGroup,
+                            LightApp_Preferences::IntSpin, "SMESH", "len_tol_precision" );
+  precs[ii++] = addPreference( tr( "SMESH_PREF_parametric_precision" ), precGroup,
+                            LightApp_Preferences::IntSpin, "SMESH", "parametric_precision" );
+  precs[ii++] = addPreference( tr( "SMESH_PREF_area_precision" ), precGroup,
+                            LightApp_Preferences::IntSpin, "SMESH", "area_precision" );
+  precs[ii  ] = addPreference( tr( "SMESH_PREF_vol_precision" ), precGroup,
+                            LightApp_Preferences::IntSpin, "SMESH", "vol_precision" );  
+  
+  // Set property for precision value for spinboxes
+  for ( ii = 0; ii < nbQuantities; ii++ ){
+    setPreferenceProperty( precs[ii], "min", -10 );
+    setPreferenceProperty( precs[ii], "max", 10 );
+    setPreferenceProperty( precs[ii], "precision", 2 );
+  }   
 
   // Mesh tab ------------------------------------------------------------------------
   int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
   int nodeGroup = addPreference( tr( "PREF_GROUP_NODES" ), meshTab );
-  setPreferenceProperty( nodeGroup, "columns", 2 );
+  setPreferenceProperty( nodeGroup, "columns", 3 );
 
   addPreference( tr( "PREF_COLOR" ), nodeGroup, LightApp_Preferences::Color, "SMESH", "node_color" );
-  int nodeSz = addPreference( tr( "PREF_SIZE" ), nodeGroup, LightApp_Preferences::IntSpin, "SMESH", "node_size" );
 
-  setPreferenceProperty( nodeSz, "min", 1 );
-  setPreferenceProperty( nodeSz, "max", 5 );
+  int typeOfMarker = addPreference( tr( "PREF_TYPE_OF_MARKER" ), nodeGroup, LightApp_Preferences::Selector, "SMESH", "type_of_marker" );
+
+  SUIT_ResourceMgr* aResourceMgr = SMESH::GetResourceMgr(this);
+  QList<QVariant> aMarkerTypeIndicesList;
+  QList<QVariant> aMarkerTypeIconsList;
+  for ( int i = VTK::MT_POINT; i < VTK::MT_USER; i++ ) {
+    QString icoFile = QString( "ICON_VERTEX_MARKER_%1" ).arg( i );
+    QPixmap pixmap = aResourceMgr->loadPixmap( "VTKViewer", tr( qPrintable( icoFile ) ) );
+    aMarkerTypeIndicesList << i;
+    aMarkerTypeIconsList << pixmap;
+  }
+  setPreferenceProperty( typeOfMarker, "indexes", aMarkerTypeIndicesList );
+  setPreferenceProperty( typeOfMarker, "icons",   aMarkerTypeIconsList );
+
+  int markerScale = addPreference( tr( "PREF_MARKER_SCALE" ), nodeGroup, LightApp_Preferences::Selector, "SMESH", "marker_scale" );
+
+  QList<QVariant> aMarkerScaleIndicesList;
+  QStringList     aMarkerScaleValuesList;
+  for ( int i = VTK::MS_10; i <= VTK::MS_70; i++ ) {
+    aMarkerScaleIndicesList << i;
+    aMarkerScaleValuesList  << QString::number( (i-(int)VTK::MS_10)*0.5 + 1.0 );
+  }
+  setPreferenceProperty( markerScale, "strings", aMarkerScaleValuesList );
+  setPreferenceProperty( markerScale, "indexes", aMarkerScaleIndicesList );
 
   int elemGroup = addPreference( tr( "PREF_GROUP_ELEMENTS" ), meshTab );
   setPreferenceProperty( elemGroup, "columns", 2 );
@@ -3902,6 +4175,12 @@ LightApp_Operation* SMESHGUI::createOperation( const int id ) const
   // to do : create operation here
   switch( id )
   {
+    case 417: //convert to quadratic
+      op = new SMESHGUI_ConvToQuadOp();
+    break;
+    case 418: // create 2D mesh as boundary on 3D
+      op = new SMESHGUI_Make2DFrom3DOp();
+    break;
     case 701: // Compute mesh
       op = new SMESHGUI_ComputeOp();
     break;
@@ -3920,15 +4199,15 @@ LightApp_Operation* SMESHGUI::createOperation( const int id ) const
     case 712: // Evaluate mesh
       op = new SMESHGUI_EvaluateOp();
     break;
+    case 713: // Evaluate mesh
+      op = new SMESHGUI_MeshOrderOp();
+    break;
     case 806: // Create group on geom
       op = new SMESHGUI_GroupOnShapeOp();
       break;
-    case 417: //convert to quadratic
-      op = new SMESHGUI_ConvToQuadOp();
-    break;
-    case 418: // create 2D mesh as boundary on 3D
-      op = new SMESHGUI_Make2DFrom3DOp();
-    break;
+    case 904: // Find element
+      op = new SMESHGUI_FindElemByPointOp();
+      break;
     case 4067: // make mesh pass through point
       op = new SMESHGUI_MakeNodeAtPointOp();
       break;
@@ -4022,6 +4301,7 @@ SALOMEDS::Color SMESHGUI::getUniqueColor( const QList<SALOMEDS::Color>& theReser
 
 const char gSeparator = '_'; // character used to separate parameter names
 const char gDigitsSep = ':'; // character used to separate numeric parameter values (color = r:g:b)
+const char gPathSep   = '|'; // character used to separate paths
 
 /*!
  * \brief Store visual parameters
@@ -4047,6 +4327,39 @@ void SMESHGUI::storeVisualParameters (int savePoint)
                                                              savePoint);
   _PTR(IParameters) ip = ClientFactory::getIParameters(ap);
 
+  // store map of custom markers
+  const VTK::MarkerMap& aMarkerMap = myMarkerMap[ studyDS->StudyId() ];
+  if( !aMarkerMap.empty() )
+  {
+    VTK::MarkerMap::const_iterator anIter = aMarkerMap.begin();
+    for( ; anIter != aMarkerMap.end(); anIter++ )
+    {
+      int anId = anIter->first;
+      VTK::MarkerData aMarkerData = anIter->second;
+      std::string aMarkerFileName = aMarkerData.first;
+      VTK::MarkerTexture aMarkerTexture = aMarkerData.second;
+      if( aMarkerTexture.size() < 3 )
+        continue; // should contain at least width, height and the first value
+
+      QString aPropertyName( "texture" );
+      aPropertyName += gSeparator;
+      aPropertyName += QString::number( anId );
+
+      QString aPropertyValue = aMarkerFileName.c_str();
+      aPropertyValue += gPathSep;
+
+      VTK::MarkerTexture::const_iterator aTextureIter = aMarkerTexture.begin();
+      ushort aWidth = *aTextureIter++;
+      ushort aHeight = *aTextureIter++;
+      aPropertyValue += QString::number( aWidth ); aPropertyValue += gDigitsSep;
+      aPropertyValue += QString::number( aHeight ); aPropertyValue += gDigitsSep;
+      for( ; aTextureIter != aMarkerTexture.end(); aTextureIter++ )
+        aPropertyValue += QString::number( *aTextureIter );
+
+      ip->setProperty( aPropertyName.toStdString(), aPropertyValue.toStdString() );
+    }
+  }
+
   // viewers counters are used for storing view_numbers in IParameters
   int vtkViewers = 0;
 
@@ -4154,14 +4467,32 @@ void SMESHGUI::storeVisualParameters (int savePoint)
                   // Sizes of lines and points
                   QString sizeStr ("line");
                   sizeStr += gDigitsSep; sizeStr += QString::number((int)aSmeshActor->GetLineWidth());
-                  sizeStr += gDigitsSep; sizeStr += "node";
-                  sizeStr += gDigitsSep; sizeStr += QString::number((int)aSmeshActor->GetNodeSize());
                   sizeStr += gDigitsSep; sizeStr += "shrink";
                   sizeStr += gDigitsSep; sizeStr += QString::number(aSmeshActor->GetShrinkFactor());
 
                   param = vtkParam + "Sizes";
                   ip->setParameter(entry, param, sizeStr.toLatin1().data());
 
+                  // Point marker
+                  QString markerStr;
+
+                  VTK::MarkerType aMarkerType = aSmeshActor->GetMarkerType();
+                  if( aMarkerType == VTK::MT_USER ) {
+                    markerStr += "custom";
+                    markerStr += gDigitsSep;
+                    markerStr += QString::number( aSmeshActor->GetMarkerTexture() );
+                  }
+                  else {
+                    markerStr += "std";
+                    markerStr += gDigitsSep;
+                    markerStr += QString::number( (int)aMarkerType );
+                    markerStr += gDigitsSep;
+                    markerStr += QString::number( (int)aSmeshActor->GetMarkerScale() );
+                  }
+
+                  param = vtkParam + "PointMarker";
+                  ip->setParameter(entry, param, markerStr.toLatin1().data());
+
                   // Opacity
                   param = vtkParam + "Opacity";
                   ip->setParameter(entry, param,
@@ -4220,6 +4551,63 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
                                                              savePoint);
   _PTR(IParameters) ip = ClientFactory::getIParameters(ap);
 
+  // restore map of custom markers
+  VTK::MarkerMap& aMarkerMap = myMarkerMap[ studyDS->StudyId() ];
+
+  std::vector<std::string> properties = ip->getProperties();
+  for (std::vector<std::string>::iterator propIt = properties.begin(); propIt != properties.end(); ++propIt)
+  {
+    std::string property = *propIt;
+    QString aPropertyName( property.c_str() );
+    QString aPropertyValue( ip->getProperty( property ).c_str() );
+
+    QStringList aPropertyNameList = aPropertyName.split( gSeparator, QString::SkipEmptyParts );
+    if( aPropertyNameList.size() != 2 )
+      continue;
+
+    int anId = 0;
+    bool ok = false;
+    if( aPropertyNameList[0] == "texture" )
+      anId = aPropertyNameList[1].toInt( &ok );
+
+    if( !ok || anId < 1 )
+      continue;
+
+    QStringList aPropertyValueList = aPropertyValue.split( gPathSep, QString::SkipEmptyParts );
+    if( aPropertyValueList.size() != 2 )
+      continue;
+
+    std::string aMarkerFileName = aPropertyValueList[0].toStdString();
+    QString aMarkerTextureString = aPropertyValueList[1];
+    QStringList aMarkerTextureStringList = aMarkerTextureString.split( gDigitsSep, QString::SkipEmptyParts );
+    if( aMarkerTextureStringList.size() != 3 )
+      continue;
+
+    ok = false;
+    ushort aWidth = aMarkerTextureStringList[0].toUShort( &ok );
+    if( !ok )
+      continue;
+
+    ok = false;
+    ushort aHeight = aMarkerTextureStringList[1].toUShort( &ok );
+    if( !ok )
+      continue;
+
+    VTK::MarkerTexture aMarkerTexture;
+    aMarkerTexture.push_back( aWidth );
+    aMarkerTexture.push_back( aHeight );
+
+    QString aMarkerTextureData = aMarkerTextureStringList[2];
+    for( int i = 0, n = aMarkerTextureData.length(); i < n; i++ )
+    {
+      QChar aChar = aMarkerTextureData.at( i );
+      if( aChar.isDigit() )
+        aMarkerTexture.push_back( aChar.digitValue() );
+    }
+
+    aMarkerMap[ anId ] = VTK::MarkerData( aMarkerFileName, aMarkerTexture );
+  }
+
   std::vector<std::string> entries = ip->getEntries();
 
   for (std::vector<std::string>::iterator entIt = entries.begin(); entIt != entries.end(); ++entIt)
@@ -4366,18 +4754,49 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
             // Sizes of lines and points
             else if (paramNameStr == "Sizes") {
               QStringList sizes = val.split(gDigitsSep, QString::SkipEmptyParts);
-              if (sizes.count() == 6) {
+              if (sizes.count() == 4) {
+                if (sizes[0] != "line" || sizes[2] != "shrink") {
+                  MESSAGE("Invalid order of data in Sizes, must be: "
+                          "line:int:shrink:float");
+                }
+                else {
+                  aSmeshActor->SetLineWidth(sizes[1].toInt());
+                  aSmeshActor->SetShrinkFactor(sizes[3].toFloat());
+                }
+              }
+              else if (sizes.count() == 6) { // just to support old format
                 if (sizes[0] != "line" || sizes[2]  != "node" || sizes[4] != "shrink") {
                   MESSAGE("Invalid order of data in Sizes, must be: "
                           "line:int:node:int:shrink:float");
                 }
                 else {
                   aSmeshActor->SetLineWidth(sizes[1].toInt());
-                  aSmeshActor->SetNodeSize(sizes[3].toInt());
+                  //aSmeshActor->SetNodeSize(sizes[3].toInt()); // made obsolete
                   aSmeshActor->SetShrinkFactor(sizes[5].toFloat());
                 }
               }
             }
+            // Point marker
+            else if (paramNameStr == "PointMarker") {
+              QStringList data = val.split(gDigitsSep, QString::SkipEmptyParts);
+              if( data.count() >= 2 ) {
+                bool ok = false;
+                int aParam1 = data[1].toInt( &ok );
+                if( ok ) {
+                  if( data[0] == "std" && data.count() == 3 ) {
+                    int aParam2 = data[2].toInt( &ok );
+                    aSmeshActor->SetMarkerStd( (VTK::MarkerType)aParam1, (VTK::MarkerScale)aParam2 );
+                  }
+                  else if( data[0] == "custom" ) {
+                    VTK::MarkerMap::const_iterator markerIt = aMarkerMap.find( aParam1 );
+                    if( markerIt != aMarkerMap.end() ) {
+                      VTK::MarkerData aMarkerData = markerIt->second;
+                      aSmeshActor->SetMarkerTexture( aParam1, aMarkerData.second );
+                    }
+                  }
+                }
+              }
+            }
             // Opacity
             else if (paramNameStr == "Opacity") {
               aSmeshActor->SetOpacity(val.toFloat());
index f6960a481de9ab267d1e82ae6464e7fd9b63091b..503740c61039b9c4ff6b3639745d9654869c6466 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI.h
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
@@ -31,6 +32,7 @@
 
 // SALOME GUI includes
 #include <SalomeApp_Module.h>
+#include <VTKViewer_MarkerDef.h>
 #include <SALOME_InteractiveObject.hxx>
 
 // IDL includes
@@ -52,6 +54,8 @@ class LightApp_SelectionMgr;
 
 class SMESHGUI_FilterLibraryDlg;
 
+typedef std::map<int, VTK::MarkerMap> SMESHGUI_StudyId2MarkerMap;
+
 //=================================================================================
 // class    : SMESHGUI
 // purpose  :
@@ -150,6 +154,8 @@ protected:
 
   virtual bool                    isSelectionCompatible();
 
+  virtual bool                    reusableOperation( const int id ); 
+
 private:
   void                            OnEditDelete();
   int                             addVtkFontPref( const QString& label, 
@@ -164,6 +170,8 @@ private :
   LightApp_Displayer*             myDisplayer;
 
   SMESHGUI_FilterLibraryDlg*      myFilterLibraryDlg;
+
+  SMESHGUI_StudyId2MarkerMap      myMarkerMap;
 };
 
 #endif // SMESHGUI_H
index 33c410193b8e2af5db679aaa152ec13da2bed0ca..03ade25cb3965e7544d279adcf0a18e99f8d166b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_AddMeshElementDlg.cxx
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
-
 //  SMESH includes
+//
 #include "SMESHGUI_AddMeshElementDlg.h"
 
 #include "SMESHGUI.h"
 #include "SMESHGUI_Utils.h"
 #include "SMESHGUI_VTKUtils.h"
 #include "SMESHGUI_MeshUtils.h"
+#include "SMESHGUI_GroupUtils.h"
 #include "SMESHGUI_IdValidator.h"
 
 #include <SMESH_Actor.h>
@@ -64,6 +66,7 @@
 #include <vtkProperty.h>
 
 // Qt includes
+#include <QComboBox>
 #include <QGroupBox>
 #include <QLabel>
 #include <QLineEdit>
@@ -358,6 +361,20 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI* theModule,
   GroupC1Layout->addWidget(LineEditC1A1,     0, 2);
   if ( Reverse ) GroupC1Layout->addWidget(Reverse, 1, 0, 1, 3);
 
+  /***************************************************************/
+  GroupGroups = new QGroupBox( tr( "SMESH_ADD_TO_GROUP" ), this );
+  GroupGroups->setCheckable( true );
+  QHBoxLayout* GroupGroupsLayout = new QHBoxLayout(GroupGroups);
+  GroupGroupsLayout->setSpacing(SPACING);
+  GroupGroupsLayout->setMargin(MARGIN);
+
+  TextLabel_GroupName = new QLabel( tr( "SMESH_GROUP" ), GroupGroups );
+  ComboBox_GroupName = new QComboBox( GroupGroups );
+  ComboBox_GroupName->setEditable( true );
+
+  GroupGroupsLayout->addWidget( TextLabel_GroupName );
+  GroupGroupsLayout->addWidget( ComboBox_GroupName, 1 );
+
   /***************************************************************/
   GroupButtons = new QGroupBox(this);
   QHBoxLayout* GroupButtonsLayout = new QHBoxLayout(GroupButtons);
@@ -385,6 +402,7 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI* theModule,
   /***************************************************************/
   aTopLayout->addWidget(GroupConstructors);
   aTopLayout->addWidget(GroupC1);
+  aTopLayout->addWidget(GroupGroups);
   aTopLayout->addWidget(GroupButtons);
 
   Init(); /* Initialisations */
@@ -410,6 +428,10 @@ void SMESHGUI_AddMeshElementDlg::Init()
   myEditCurrentArgument = LineEditC1A1;
   mySMESHGUI->SetActiveDialogBox((QDialog*)this);
 
+  /* reset "Add to group" control */
+  GroupGroups->setChecked( false );
+  GroupGroups->setVisible( myElementType != SMDSAbs_0DElement );
+
   myNbOkNodes = 0;
   myActor = 0;
 
@@ -446,6 +468,9 @@ void SMESHGUI_AddMeshElementDlg::Init()
 //=================================================================================
 void SMESHGUI_AddMeshElementDlg::ClickOnApply()
 {
+  if( !isValid() )
+    return;
+
   if (myNbOkNodes && !mySMESHGUI->isActiveStudyLocked()) {
     myBusy = true;
     SMESH::long_array_var anArrayOfIndices = new SMESH::long_array;
@@ -458,22 +483,78 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
       else
         anArrayOfIndices[i] = aListId[ i ].toInt();
 
+    bool addToGroup = GroupGroups->isChecked();
+    QString aGroupName;
+
+    SMESH::SMESH_GroupBase_var aGroup;
+    int idx = 0;
+    if( addToGroup ) {
+      aGroupName = ComboBox_GroupName->currentText();
+      for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
+       QString aName = ComboBox_GroupName->itemText( i );
+       if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
+         idx = i;
+      }
+      if ( idx > 0 ) {
+       SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
+       if ( !aGeomGroup->_is_nil() ) {
+         int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
+                                              tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
+                                              tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
+         if ( res == 1 ) return;
+       }
+       aGroup = myGroups[idx-1];
+      }
+    }
+
+    long anElemId = -1;
     SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
     switch (myElementType) {
     case SMDSAbs_0DElement:
-      aMeshEditor->Add0DElement(anArrayOfIndices[0]); break;
+      anElemId = aMeshEditor->Add0DElement(anArrayOfIndices[0]); break;
     case SMDSAbs_Edge:
-      aMeshEditor->AddEdge(anArrayOfIndices.inout()); break;
+      anElemId = aMeshEditor->AddEdge(anArrayOfIndices.inout()); break;
     case SMDSAbs_Face: {
       if(myIsPoly)
-        aMeshEditor->AddPolygonalFace(anArrayOfIndices.inout());
+        anElemId = aMeshEditor->AddPolygonalFace(anArrayOfIndices.inout());
       else
-        aMeshEditor->AddFace(anArrayOfIndices.inout());
+        anElemId = aMeshEditor->AddFace(anArrayOfIndices.inout());
       break;
     }
     case SMDSAbs_Volume:
-      aMeshEditor->AddVolume(anArrayOfIndices.inout()); break;
-    default:;
+      anElemId = aMeshEditor->AddVolume(anArrayOfIndices.inout()); break;
+    default: break;
+    }
+
+    if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
+      SMESH::SMESH_Group_var aGroupUsed;
+      if ( aGroup->_is_nil() ) {
+       // create new group 
+       aGroupUsed = SMESH::AddGroup( myMesh, (SMESH::ElementType)myElementType, aGroupName );
+       if ( !aGroupUsed->_is_nil() ) {
+         myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
+         ComboBox_GroupName->addItem( aGroupName );
+       }
+      }
+      else {
+       SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
+       if ( !aGeomGroup->_is_nil() ) {
+         aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
+         if ( !aGroupUsed->_is_nil() && idx > 0 ) {
+           myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
+           SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
+         }
+       }
+       else
+         aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
+      }
+
+      if ( !aGroupUsed->_is_nil() ) {
+        SMESH::long_array_var anIdList = new SMESH::long_array;
+        anIdList->length( 1 );
+        anIdList[0] = anElemId;
+        aGroupUsed->Add( anIdList.inout() );
+      }
     }
 
     SALOME_ListIO aList; aList.Append( myActor->getIO() );
@@ -628,6 +709,8 @@ void SMESHGUI_AddMeshElementDlg::SelectionIntoArgument()
   mySimulation->SetVisibility(false);
   //  SMESH::SetPointRepresentation(true);
 
+  QString aCurrentEntry = myEntry;
+
   // get selected mesh
   SALOME_ListIO aList;
   mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
@@ -636,10 +719,29 @@ void SMESHGUI_AddMeshElementDlg::SelectionIntoArgument()
     return;
 
   Handle(SALOME_InteractiveObject) anIO = aList.First();
+  myEntry = anIO->getEntry();
   myMesh = SMESH::GetMeshByIO(anIO);
   if (myMesh->_is_nil())
     return;
 
+  // process groups
+  if ( !myMesh->_is_nil() && myEntry != aCurrentEntry ) {
+    myGroups.clear();
+    ComboBox_GroupName->clear();
+    ComboBox_GroupName->addItem( QString() );
+    SMESH::ListOfGroups aListOfGroups = *myMesh->GetGroups();
+    for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
+      SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
+      if ( !aGroup->_is_nil() && aGroup->GetType() == (SMESH::ElementType)myElementType ) {
+       QString aGroupName( aGroup->GetName() );
+       if ( !aGroupName.isEmpty() ) {
+         myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
+         ComboBox_GroupName->addItem( aGroupName );
+       }
+      }
+    }
+  }
+
   myActor = SMESH::FindActorByEntry(anIO->getEntry());
   if (!myActor)
     return;
@@ -812,3 +914,16 @@ void SMESHGUI_AddMeshElementDlg::keyPressEvent( QKeyEvent* e )
     ClickOnHelp();
   }
 }
+
+//=================================================================================
+// function : isValid
+// purpose  :
+//=================================================================================
+bool SMESHGUI_AddMeshElementDlg::isValid()
+{
+  if( GroupGroups->isChecked() && ComboBox_GroupName->currentText().isEmpty() ) {
+    SUIT_MessageBox::warning( this, tr( "SMESH_WRN_WARNING" ), tr( "GROUP_NAME_IS_EMPTY" ) );
+    return false;
+  }
+  return true;
+}
index ee10b312fb752d8cd77407fe0bf4789c50e31064..6c95a37cb363c865b23b39dc2f5b7c6cf4c51e7d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_AddMeshElementDlg.h
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
@@ -38,6 +39,7 @@
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SMESH_Mesh)
 
+class QComboBox;
 class QGroupBox;
 class QLabel;
 class QLineEdit;
@@ -74,6 +76,10 @@ private:
   void                        keyPressEvent( QKeyEvent* );
   void                        displaySimulation();
   
+  bool                        isValid();
+  
+  typedef QList<SMESH::SMESH_GroupBase_var> GrpList;
+  
   SMESHGUI*                   mySMESHGUI;              /* Current SMESHGUI object */
   LightApp_SelectionMgr*      mySelectionMgr;          /* User shape selection */
   int                         myNbOkNodes;             /* to check when arguments is defined */
@@ -89,9 +95,14 @@ private:
   SMESH::SMESH_Mesh_var       myMesh;
   SMESH_Actor*                myActor;
   SMESH::TElementSimulation*  mySimulation;
+  QString                     myEntry;
+  GrpList                     myGroups;
   
   QGroupBox*                  GroupConstructors;
   QRadioButton*               Constructor1;
+  QGroupBox*                  GroupGroups;
+  QLabel*                     TextLabel_GroupName;
+  QComboBox*                  ComboBox_GroupName;
   QGroupBox*                  GroupButtons;
   QPushButton*                buttonOk;
   QPushButton*                buttonCancel;
index 4a9fa18acb5efd73a78a38d9d403b79a94a6d581..601006b705de9b2b3cb4bde2ed6202eb8a8276a1 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_AddMeshElementDlg.cxx
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
@@ -30,6 +31,7 @@
 #include "SMESHGUI_Utils.h"
 #include "SMESHGUI_VTKUtils.h"
 #include "SMESHGUI_MeshUtils.h"
+#include "SMESHGUI_GroupUtils.h"
 #include "SMESHGUI_IdValidator.h"
 
 #include <SMESH_Actor.h>
@@ -69,6 +71,7 @@
 #include <vtkCellType.h>
 
 // Qt includes
+#include <QComboBox>
 #include <QGroupBox>
 #include <QLabel>
 #include <QLineEdit>
@@ -505,6 +508,20 @@ SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theM
   aGroupArgumentsLayout->addWidget(myTable,           1, 0, 1, 3); 
   aGroupArgumentsLayout->addWidget(myReverseCB,       2, 0, 1, 3);
   
+  /***************************************************************/
+  GroupGroups = new QGroupBox( tr( "SMESH_ADD_TO_GROUP" ), this );
+  GroupGroups->setCheckable( true );
+  QHBoxLayout* GroupGroupsLayout = new QHBoxLayout(GroupGroups);
+  GroupGroupsLayout->setSpacing(SPACING);
+  GroupGroupsLayout->setMargin(MARGIN);
+
+  TextLabel_GroupName = new QLabel( tr( "SMESH_GROUP" ), GroupGroups );
+  ComboBox_GroupName = new QComboBox( GroupGroups );
+  ComboBox_GroupName->setEditable( true );
+
+  GroupGroupsLayout->addWidget( TextLabel_GroupName );
+  GroupGroupsLayout->addWidget( ComboBox_GroupName, 1 );
+
   /***************************************************************/
   GroupButtons = new QGroupBox(this);
   QHBoxLayout* aGroupButtonsLayout = new QHBoxLayout(GroupButtons);
@@ -532,6 +549,7 @@ SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theM
   /***************************************************************/
   aDialogLayout->addWidget(GroupConstructors);
   aDialogLayout->addWidget(GroupArguments);
+  aDialogLayout->addWidget(GroupGroups);
   aDialogLayout->addWidget(GroupButtons);
 
   Init(); /* Initialisations */
@@ -555,6 +573,9 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
   myRadioButton1->setChecked(true);
   mySMESHGUI->SetActiveDialogBox((QDialog*)this);
   
+  /* reset "Add to group" control */
+  GroupGroups->setChecked( false );
+
   myActor = 0;
 
   int aNumRows;
@@ -661,6 +682,9 @@ void SMESHGUI_AddQuadraticElementDlg::Init()
 //=================================================================================
 void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
 {
+  if( !isValid() )
+    return;
+
   if ( mySMESHGUI->isActiveStudyLocked() || myBusy || !IsValid() )
     return;
 
@@ -696,20 +720,81 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
   for (int i = 0; i < aNumberOfIds; i++)
     anArrayOfIdeces[i] = anIds[ i ];
 
+  bool addToGroup = GroupGroups->isChecked();
+  QString aGroupName;
+  
+  SMESH::SMESH_GroupBase_var aGroup;
+  int idx = 0;
+  if( addToGroup ) {
+    aGroupName = ComboBox_GroupName->currentText();
+    for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
+      QString aName = ComboBox_GroupName->itemText( i );
+      if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
+       idx = i;
+    }
+    if ( idx > 0 ) {
+      SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
+      if ( !aGeomGroup->_is_nil() ) {
+       int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
+                                            tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
+                                            tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
+       if ( res == 1 ) return;
+      }
+      aGroup = myGroups[idx-1];
+    }
+  }
+
+  SMESH::ElementType anElementType;
+  long anElemId = -1;
   SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
   switch (myType) {
   case QUAD_EDGE:
-    aMeshEditor->AddEdge(anArrayOfIdeces.inout()); break;
+    anElementType = SMESH::EDGE;
+    anElemId = aMeshEditor->AddEdge(anArrayOfIdeces.inout()); break;
   case QUAD_TRIANGLE:
   case QUAD_QUADRANGLE:
-    aMeshEditor->AddFace(anArrayOfIdeces.inout()); break;
+    anElementType = SMESH::FACE;
+    anElemId = aMeshEditor->AddFace(anArrayOfIdeces.inout()); break;
   case QUAD_TETRAHEDRON:
   case QUAD_PYRAMID:
   case QUAD_PENTAHEDRON: 
   case QUAD_HEXAHEDRON:
-    aMeshEditor->AddVolume(anArrayOfIdeces.inout()); break;
+    anElementType = SMESH::VOLUME;
+    anElemId = aMeshEditor->AddVolume(anArrayOfIdeces.inout()); break;
+  default: break;
   }
     
+  if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
+    SMESH::SMESH_Group_var aGroupUsed;
+    if ( aGroup->_is_nil() ) {
+      // create new group 
+      aGroupUsed = SMESH::AddGroup( myMesh, anElementType, aGroupName );
+      if ( !aGroupUsed->_is_nil() ) {
+       myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
+       ComboBox_GroupName->addItem( aGroupName );
+      }
+    }
+    else {
+      SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
+      if ( !aGeomGroup->_is_nil() ) {
+       aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
+       if ( !aGroupUsed->_is_nil() && idx > 0 ) {
+         myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
+         SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
+       }
+      }
+      else
+       aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
+    }
+    
+    if ( !aGroupUsed->_is_nil() ) {
+      SMESH::long_array_var anIdList = new SMESH::long_array;
+      anIdList->length( 1 );
+      anIdList[0] = anElemId;
+      aGroupUsed->Add( anIdList.inout() );
+    }
+  }
+
   SALOME_ListIO aList; aList.Append( myActor->getIO() );
   mySelector->ClearIndex();
   mySelectionMgr->setSelectedObjects( aList, false );
@@ -827,6 +912,8 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
   if (myBusy) return;
   BusyLocker lock( myBusy );
   
+  QString aCurrentEntry = myEntry;
+
   if ( myIsEditCorners )
   {
     // clear
@@ -851,6 +938,7 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
     }
       
     Handle(SALOME_InteractiveObject) anIO = aList.First();
+    myEntry = anIO->getEntry();
     myMesh = SMESH::GetMeshByIO(anIO);
     if (myMesh->_is_nil()) {
       updateButtons();
@@ -860,6 +948,37 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
     myActor = SMESH::FindActorByEntry(anIO->getEntry());
   
   }
+
+  // process groups
+  if ( !myMesh->_is_nil() && myEntry != aCurrentEntry ) {
+    SMESH::ElementType anElementType;
+    switch ( myType ) {
+    case QUAD_EDGE:
+      anElementType = SMESH::EDGE; break;
+    case QUAD_TRIANGLE:
+    case QUAD_QUADRANGLE:
+      anElementType = SMESH::FACE; break;
+    case QUAD_TETRAHEDRON:
+    case QUAD_PYRAMID:
+    case QUAD_PENTAHEDRON: 
+    case QUAD_HEXAHEDRON:
+      anElementType = SMESH::VOLUME; break;
+    }
+    myGroups.clear();
+    ComboBox_GroupName->clear();
+    ComboBox_GroupName->addItem( QString() );
+    SMESH::ListOfGroups aListOfGroups = *myMesh->GetGroups();
+    for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
+      SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
+      if ( !aGroup->_is_nil() && aGroup->GetType() == anElementType ) {
+       QString aGroupName( aGroup->GetName() );
+       if ( !aGroupName.isEmpty() ) {
+         myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
+         ComboBox_GroupName->addItem( aGroupName );
+       }
+      }
+    }
+  }
   
   if (!myActor) {
     updateButtons();
@@ -1169,3 +1288,16 @@ void SMESHGUI_AddQuadraticElementDlg::updateButtons()
   buttonOk->setEnabled( valid );
   buttonApply->setEnabled( valid );
 }
+
+//=================================================================================
+// function : isValid
+// purpose  :
+//=================================================================================
+bool SMESHGUI_AddQuadraticElementDlg::isValid()
+{
+  if( GroupGroups->isChecked() && ComboBox_GroupName->currentText().isEmpty() ) {
+    SUIT_MessageBox::warning( this, tr( "SMESH_WRN_WARNING" ), tr( "GROUP_NAME_IS_EMPTY" ) );
+    return false;
+  }
+  return true;
+}
index a048a6760baaf5f62b84c464455b21d4aa1decf4..30b4d9f013740f3fe342a7bea821129fe99006c0 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_AddMeshElementDlg.h
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
@@ -36,7 +37,9 @@
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SMESH_Mesh)
 
+class QComboBox;
 class QGroupBox;
+class QLabel;
 class QLineEdit;
 class QPushButton;
 class QRadioButton;
@@ -68,6 +71,8 @@ public:
   ~SMESHGUI_AddQuadraticElementDlg();
   
 private:
+  typedef QList<SMESH::SMESH_GroupBase_var> GrpList;
+
   void                        Init();
   void                        closeEvent( QCloseEvent* );
   void                        hideEvent( QHideEvent* );    /* ESC key */
@@ -78,6 +83,8 @@ private:
   bool                        IsValid();
   void                        updateButtons();
 
+  bool                        isValid();
+  
   SMESHGUI*                   mySMESHGUI;       /* Current SMESHGUI object */
   LightApp_SelectionMgr*      mySelectionMgr;   /* User shape selection */
   int                         myNbCorners;      /* The required number of corners */
@@ -87,6 +94,8 @@ private:
   SMESH::SMESH_Mesh_var       myMesh;
   SMESH_Actor*                myActor;
   SMESH::TElementSimulation*  mySimulation;
+  QString                     myEntry;
+  GrpList                     myGroups;
   
   int                         myType;
   bool                        myIsEditCorners;
@@ -100,6 +109,10 @@ private:
   QTableWidget*               myTable;
   QCheckBox*                  myReverseCB;
   
+  QGroupBox*                  GroupGroups;
+  QLabel*                     TextLabel_GroupName;
+  QComboBox*                  ComboBox_GroupName;
+
   QGroupBox*                  GroupButtons;
   QPushButton*                buttonOk;
   QPushButton*                buttonCancel;
index 1e58867d020b787d620e2ecf65bac563ffbd279d..fe9e5317ed1b5ae3cc34626eb3c5a9a85d5be710 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_BuildCompoundDlg.cxx
 // Author : Alexander KOVALEV, Open CASCADE S.A.S.
@@ -137,7 +138,7 @@ SMESHGUI_BuildCompoundDlg::SMESHGUI_BuildCompoundDlg( SMESHGUI* theModule )
   TextLabelTol = new QLabel(tr("SMESH_TOLERANCE"), GroupArgs);
   TextLabelTol->setAlignment(Qt::AlignCenter);
   SpinBoxTol = new SMESHGUI_SpinBox(GroupArgs);
-  SpinBoxTol->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, 6);
+  SpinBoxTol->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, "len_tol_precision" );
 
   GroupArgsLayout->addWidget(TextLabelMeshes, 0, 0);
   GroupArgsLayout->addWidget(SelectButton,    0, 1);
index c1085739d8d5d6ff9cfa444e341714efd464ab7d..7d0970d6d023732d3019c510f57cfc9c4670fb91 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_BuildCompoundDlg.h
 // Author : Alexander KOVALEV, Open CASCADE S.A.S.
index be11acf6cd20a9c0955a1b37113c7d7c7656c18b..13bdc8eb44e3c04518864cba9480e5b489f2bd76 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_ClippingDlg.cxx
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
@@ -343,7 +344,7 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg( SMESHGUI* theModule ):
   SMESHGUI_ClippingDlgLayout->setMargin(MARGIN);
 
   // Controls for selecting, creating, deleting planes
-  QGroupBox* GroupPlanes = new QGroupBox(tr("Clipping planes"), this);
+  QGroupBox* GroupPlanes = new QGroupBox(tr("CLIP_PLANES"), this);
   QHBoxLayout* GroupPlanesLayout = new QHBoxLayout(GroupPlanes);
   GroupPlanesLayout->setSpacing(SPACING);
   GroupPlanesLayout->setMargin(MARGIN);
@@ -373,18 +374,18 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg( SMESHGUI* theModule ):
 
   SpinBoxDistance = new SMESHGUI_SpinBox(GroupParameters);
 
-  TextLabelRot1 = new QLabel(tr("Rotation around X (Y to Z):"), GroupParameters);
+  TextLabelRot1 = new QLabel(tr("ROTATION_AROUND_X_Y2Z"), GroupParameters);
 
   SpinBoxRot1 = new SMESHGUI_SpinBox(GroupParameters);
 
-  TextLabelRot2 = new QLabel(tr("Rotation around Y (X to Z):"), GroupParameters);
+  TextLabelRot2 = new QLabel(tr("ROTATION_AROUND_Y_X2Z"), GroupParameters);
 
   SpinBoxRot2 = new SMESHGUI_SpinBox(GroupParameters);
 
-  PreviewCheckBox = new QCheckBox(tr("Show preview"), GroupParameters);
+  PreviewCheckBox = new QCheckBox(tr("SHOW_PREVIEW"), GroupParameters);
   PreviewCheckBox->setChecked(true);
 
-  AutoApplyCheckBox = new QCheckBox(tr("Auto Apply"), GroupParameters);
+  AutoApplyCheckBox = new QCheckBox(tr("AUTO_APPLY"), GroupParameters);
   AutoApplyCheckBox->setChecked(false);
 
   GroupParametersLayout->addWidget(TextLabelOrientation, 0, 0);
@@ -426,13 +427,13 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg( SMESHGUI* theModule ):
   SMESHGUI_ClippingDlgLayout->addWidget(GroupButtons);
 
   // Initial state
-  SpinBoxDistance->RangeStepAndValidator(0.0, 1.0, 0.01, 3);
-  SpinBoxRot1->RangeStepAndValidator(-180.0, 180.0, 1, 3);
-  SpinBoxRot2->RangeStepAndValidator(-180.0, 180.0, 1, 3);
+  SpinBoxDistance->RangeStepAndValidator(0.0, 1.0, 0.01, "length_precision" );
+  SpinBoxRot1->RangeStepAndValidator(-180.0, 180.0, 1, "angle_precision" );
+  SpinBoxRot2->RangeStepAndValidator(-180.0, 180.0, 1, "angle_precision" );
 
-  ComboBoxOrientation->addItem(tr("|| X-Y"));
-  ComboBoxOrientation->addItem(tr("|| Y-Z"));
-  ComboBoxOrientation->addItem(tr("|| Z-X"));
+  ComboBoxOrientation->addItem(tr("ALONG_XY"));
+  ComboBoxOrientation->addItem(tr("ALONG_YZ"));
+  ComboBoxOrientation->addItem(tr("ALONG_ZX"));
 
   SpinBoxDistance->SetValue(0.5);
 
@@ -699,16 +700,16 @@ void SMESHGUI_ClippingDlg::onSelectOrientation (int theItem)
     return;
 
   if      (theItem == 0) {
-    TextLabelRot1->setText(tr("Rotation around X (Y to Z):"));
-    TextLabelRot2->setText(tr("Rotation around Y (X to Z):"));
+    TextLabelRot1->setText(tr("ROTATION_AROUND_X_Y2Z"));
+    TextLabelRot2->setText(tr("ROTATION_AROUND_Y_X2Z"));
   }
   else if (theItem == 1) {
-    TextLabelRot1->setText(tr("Rotation around Y (Z to X):"));
-    TextLabelRot2->setText(tr("Rotation around Z (Y to X):"));
+    TextLabelRot1->setText(tr("ROTATION_AROUND_Y_Z2X"));
+    TextLabelRot2->setText(tr("ROTATION_AROUND_Z_Y2X"));
   }
   else if (theItem == 2) {
-    TextLabelRot1->setText(tr("Rotation around Z (X to Y):"));
-    TextLabelRot2->setText(tr("Rotation around X (Z to Y):"));
+    TextLabelRot1->setText(tr("ROTATION_AROUND_Z_X2Y"));
+    TextLabelRot2->setText(tr("ROTATION_AROUND_X_Z2Y"));
   }
 
   if((QComboBox*)sender() == ComboBoxOrientation)
@@ -726,7 +727,7 @@ void SMESHGUI_ClippingDlg::Sinchronize()
 
   QString aName;
   for(int i = 1; i<=aNbPlanes; i++) {
-    aName = QString(tr("Plane# %1")).arg(i);
+    aName = QString(tr("PLANE_NUM")).arg(i);
     ComboBoxPlanes->addItem(aName);
   }
 
@@ -737,7 +738,7 @@ void SMESHGUI_ClippingDlg::Sinchronize()
   if (anIsControlsEnable) {
     onSelectPlane(aPos);
   } else {
-    ComboBoxPlanes->addItem(tr("No planes"));
+    ComboBoxPlanes->addItem(tr("NO_PLANES"));
     SpinBoxRot1->SetValue(0.0);
     SpinBoxRot2->SetValue(0.0);
     SpinBoxDistance->SetValue(0.5);
index ed92330f27031525500e2a878919f8441eb2c4b7..0c70ca9c212aaaea79dace5f175ed6bd2ae031c8 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_ClippingDlg.h
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
index 9ca09b1a3ed5f218a18b5b73f922796366d20045..f239903520f4fb79fa432b7d8c0dadc8abbbc474 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_ComputeDlg.cxx
 // Author : Edward AGAPOV, Open CASCADE S.A.S.
 // SMESH includes
@@ -32,6 +30,9 @@
 #include "SMESHGUI_MeshInfosBox.h"
 #include "SMESHGUI_HypothesesUtils.h"
 #include "SMESHGUI_MeshEditPreview.h"
+#include "SMESHGUI_MeshOrderOp.h"
+#include "SMESHGUI_MeshOrderDlg.h"
+
 #include "SMESH_ActorUtils.h"
 
 #include <SMDS_SetIterator.hxx>
@@ -616,6 +617,15 @@ SMESHGUI_BaseComputeOp::SMESHGUI_BaseComputeOp()
   myHelpFileName = "about_meshes_page.html"; // V4
 }
 
+SMESH::SMESH_Mesh_ptr SMESHGUI_BaseComputeOp::getMesh()
+{
+  LightApp_SelectionMgr* Sel = selectionMgr();
+  SALOME_ListIO selected; Sel->selectedObjects( selected );
+  Handle(SALOME_InteractiveObject) anIO = selected.First();
+  SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO(anIO);
+  return myMesh->_is_nil() ? aMesh._retn() : SMESH::SMESH_Mesh::_duplicate( myMesh );
+}
+
 //================================================================================
 /*!
  * \brief Start operation
@@ -818,7 +828,7 @@ void SMESHGUI_BaseComputeOp::showComputeResult( const bool theMemoryLack,
   {
     QTableWidget* tbl = aCompDlg->myTable;
     SMESH::long_array_var aRes = myMesh->GetMeshInfo();
-    aCompDlg->myFullInfo->SetMeshInfo( aRes );
+    aCompDlg->myBriefInfo->SetMeshInfo( aRes );
     aCompDlg->myBriefInfo->show();
     aCompDlg->myFullInfo->hide();
 
@@ -1172,6 +1182,23 @@ void SMESHGUI_ComputeOp::startOperation()
   computeMesh();
 }
 
+//================================================================================
+/*!
+ * \brief check the same operations on the same mesh
+ */
+//================================================================================
+
+bool SMESHGUI_BaseComputeOp::isValid(  SUIT_Operation* theOp  ) const
+{
+  SMESHGUI_BaseComputeOp* baseOp = dynamic_cast<SMESHGUI_BaseComputeOp*>( theOp );
+  bool ret = true;
+  if ( !myMesh->_is_nil() && baseOp ) {
+    SMESH::SMESH_Mesh_var aMesh = baseOp->getMesh();
+    if ( !aMesh->_is_nil() && aMesh->GetId() == myMesh->GetId() ) ret = false;
+  }
+  return ret;
+}
+
 //================================================================================
 /*!
  * \brief Gets dialog of this operation
@@ -1193,6 +1220,7 @@ LightApp_Dialog* SMESHGUI_ComputeOp::dlg() const
 SMESHGUI_PrecomputeOp::SMESHGUI_PrecomputeOp()
  : SMESHGUI_BaseComputeOp(),
  myDlg( 0 ),
+ myOrderMgr( 0 ),
  myActiveDlg( 0 ),
  myPreviewDisplayer( 0 )
 {
@@ -1209,6 +1237,8 @@ SMESHGUI_PrecomputeOp::~SMESHGUI_PrecomputeOp()
 {
   delete myDlg;
   myDlg = 0;
+  delete myOrderMgr;
+  myOrderMgr = 0;
   myActiveDlg = 0;
   if ( myPreviewDisplayer )
     delete myPreviewDisplayer;
@@ -1274,6 +1304,16 @@ void SMESHGUI_PrecomputeOp::startOperation()
   if (myMesh->_is_nil())
     return;
 
+  if (myDlg->getPreviewMode() == -1)
+  {
+    // nothing to preview
+    SUIT_MessageBox::warning(desktop(),
+                             tr("SMESH_WRN_WARNING"),
+                             tr("SMESH_WRN_NOTHING_PREVIEW"));
+    onCancel();
+    return;
+  }
+
   // disconnect slot from preview dialog to have Apply from results of compute operation only 
   disconnect( myDlg, SIGNAL( dlgOk() ), this, SLOT( onOk() ) );
   disconnect( myDlg, SIGNAL( dlgApply() ), this, SLOT( onApply() ) );
@@ -1338,6 +1378,15 @@ void SMESHGUI_PrecomputeOp::initDialog()
       modes.append( SMESH::DIM_1D );
   }
 
+  myOrderMgr = new SMESHGUI_MeshOrderMgr( myDlg->getMeshOrderBox() );
+  myOrderMgr->SetMesh( myMesh );
+  bool isOrder = myOrderMgr->GetMeshOrder(myPrevOrder);
+  myDlg->getMeshOrderBox()->setShown(isOrder);
+  if ( !isOrder ) {
+    delete myOrderMgr;
+    myOrderMgr = 0;
+  }
+
   myDlg->setPreviewModes( modes );
 }
 
@@ -1398,6 +1447,8 @@ void SMESHGUI_PrecomputeOp::getAssignedAlgos(_PTR(SObject) theMesh,
 void SMESHGUI_PrecomputeOp::onCompute()
 {
   myDlg->hide();
+  if (myOrderMgr && myOrderMgr->IsOrderChanged())
+    myOrderMgr->SetMeshOrder();
   myMapShapeId.clear();
   myActiveDlg = computeDlg();
   computeMesh();
@@ -1419,6 +1470,7 @@ void SMESHGUI_PrecomputeOp::onCancel()
     return;
   }
 
+  bool isRestoreOrder = false;
   if ( myActiveDlg == myDlg  && !myMesh->_is_nil() && myMapShapeId.count() )
   {
     // ask to remove already computed mesh elements
@@ -1430,8 +1482,24 @@ void SMESHGUI_PrecomputeOp::onCancel()
       QMap<int,int>::const_iterator it = myMapShapeId.constBegin();
       for ( ; it != myMapShapeId.constEnd(); ++it )
         myMesh->ClearSubMesh( *it );
+      isRestoreOrder = true;
     }
   }
+
+  // return previous mesh order
+  if (myOrderMgr && myOrderMgr->IsOrderChanged()) {
+    if (!isRestoreOrder)
+      isRestoreOrder = 
+        (SUIT_MessageBox::question( desktop(), tr( "SMESH_WARNING" ),
+                                    tr( "SMESH_REJECT_MESH_ORDER" ),
+                                    tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 ) == 0);
+    if (isRestoreOrder)
+      myOrderMgr->SetMeshOrder(myPrevOrder);
+  }
+
+  delete myOrderMgr;
+  myOrderMgr = 0;
+
   myMapShapeId.clear();
   SMESHGUI_BaseComputeOp::onCancel();
 }
@@ -1450,6 +1518,11 @@ void SMESHGUI_PrecomputeOp::onPreview()
   _PTR(SObject) aMeshSObj = SMESH::FindSObject(myMesh);
   if ( !aMeshSObj )
     return;
+
+  // set modified submesh priority if any
+  if (myOrderMgr && myOrderMgr->IsOrderChanged())
+    myOrderMgr->SetMeshOrder();
+
   // Compute preview of mesh, 
   // i.e. compute mesh till indicated dimension
   int dim = myDlg->getPreviewMode();
@@ -1554,7 +1627,8 @@ void SMESHGUI_PrecomputeOp::onPreview()
 //================================================================================
 
 SMESHGUI_PrecomputeDlg::SMESHGUI_PrecomputeDlg( QWidget* parent )
- : SMESHGUI_Dialog( parent, false, false, OK | Cancel | Help )
+ : SMESHGUI_Dialog( parent, false, false, OK | Cancel | Help ),
+   myOrderBox(0)
 {
   setWindowTitle( tr( "CAPTION" ) );
 
@@ -1563,6 +1637,9 @@ SMESHGUI_PrecomputeDlg::SMESHGUI_PrecomputeDlg( QWidget* parent )
 
   QVBoxLayout* layout = new QVBoxLayout( main );
 
+  myOrderBox = new SMESHGUI_MeshOrderBox( main );
+  layout->addWidget(myOrderBox);
+
   QFrame* frame = new QFrame( main );
   layout->setMargin(0); layout->setSpacing(0);
   layout->addWidget( frame );
@@ -1619,6 +1696,17 @@ int SMESHGUI_PrecomputeDlg::getPreviewMode() const
   return myPreviewMode->currentId();
 }
 
+//================================================================================
+/*!
+ * \brief Returns current preview mesh mode
+*/
+//================================================================================
+
+SMESHGUI_MeshOrderBox* SMESHGUI_PrecomputeDlg::getMeshOrderBox() const
+{
+  return myOrderBox;
+}
+
 
 //================================================================================
 /*!
index 858cb0b48f05bb50e5bf628c4683b95123a6add1..618db50c583b253c8b7ad91b4933001a5ae95a6d 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_ComputeDlg.h
 // Author : Edward AGAPOV, Open CASCADE S.A.S.
 //
@@ -36,6 +34,7 @@
 
 // Qt includes
 #include <QMap>
+#include <QList>
 #include <QPointer>
 #include <QGroupBox>
 
@@ -72,6 +71,8 @@ public:
   SMESHGUI_BaseComputeOp();
   virtual ~SMESHGUI_BaseComputeOp();
 
+  SMESH::SMESH_Mesh_ptr          getMesh();
+
 protected:
   virtual void                   startOperation();
   virtual void                   stopOperation();
@@ -91,6 +92,8 @@ protected:
                                                     SMESH::compute_error_array_var&,
                                                     const bool,
                                                     const QString&);
+
+  virtual bool                   isValid( SUIT_Operation* theOp ) const;
     
 protected slots:
   virtual bool                   onApply();
@@ -132,6 +135,8 @@ protected:
 protected slots:
 };
 
+class SMESHGUI_MeshOrderMgr;
+
 /*!
  * \brief Operation to preview and compute a mesh and show computation errors
  */
@@ -166,10 +171,16 @@ private slots:
   void                           onCompute();
 
 private:
+  //! private fields
   QMap< int, int >               myMapShapeId;
   QPointer<LightApp_Dialog>      myActiveDlg;
   QPointer<SMESHGUI_PrecomputeDlg> myDlg;
   SMESHGUI_MeshEditPreview*      myPreviewDisplayer;
+  //! fields for mesh order
+  typedef QList<int>             TListOfInt;
+  typedef QList<TListOfInt>      TListOfListOfInt;
+  TListOfListOfInt               myPrevOrder;
+  SMESHGUI_MeshOrderMgr*         myOrderMgr;
 };
 
 /*!
@@ -223,6 +234,8 @@ protected:
   friend class SMESHGUI_PrecomputeOp;
 };
 
+class SMESHGUI_MeshOrderBox;
+
 /*!
  * \brief Dialog to preview and compute a mesh and show computation errors
  */
@@ -237,11 +250,14 @@ public:
   
   void                         setPreviewModes( const QList<int>& );
   int                          getPreviewMode() const;
+  
+  SMESHGUI_MeshOrderBox*       getMeshOrderBox() const;
 
 signals:
   void                         preview();
 
 private:
+  SMESHGUI_MeshOrderBox*       myOrderBox;
   QPushButton*                 myPreviewBtn;
   QtxComboBox*                 myPreviewMode;
 };
index 5db422cddc058bef5bbf2fd7de800c2dbfbbbdbe..684a561b5ac40f3f09be2694343d851d8a25c5d2 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_ConvToQuadDlg.cxx
 // Author : Open CASCADE S.A.S.
index 53240eae6b9853be477824e09833b43d6ed8f60b..59099246d52844aded597c58834afcc98b870792 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_ConvToQuadDlg.h
 // Author : Open CASCADE S.A.S.
index 15a6d8ff80b15fe5860f6921cffdfdfd203f7373..f5ed5ea1516bee7e4c074550aa55c41a6c69b816 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_ConvToQuadOp.cxx
 // Author : Open CASCADE S.A.S.
index ad60ea5ea35ec826dbdeab9f3394deb43b8d6f3e..f4f13e72c94ad8a82117223946d8cb13e8f0647c 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_ConvToQuadOp.h
 // Author : Open CASCADE S.A.S.
index 5ee6ade482b4bf05fef0da14ef7c594ea18f171f..d82031e1d99bd06eb39e37e604faab89d8255935 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_CreatePatternDlg.cxx
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
 // SMESH includes
index 838b609d4f126969a0d5cfadec6bc15ea46d7d0d..da9594b946ba097783a7ff41c1f4d20ac798749f 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_CreatePatternDlg.h
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
 //
index c62b83711ee7a945af2c8762951cc29da944f8e2..1501f082519498b1091735a818df8e9c9e193126 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_CreatePolyhedralVolumeDlg.cxx
 // Author : Michael ZORIN, Open CASCADE S.A.S.
@@ -30,6 +31,7 @@
 #include "SMESHGUI_Utils.h"
 #include "SMESHGUI_VTKUtils.h"
 #include "SMESHGUI_MeshUtils.h"
+#include "SMESHGUI_GroupUtils.h"
 #include "SMESHGUI_IdValidator.h"
 
 #include <SMESH_Actor.h>
@@ -63,6 +65,7 @@
 // Qt includes
 #include <QApplication>
 #include <QButtonGroup>
+#include <QComboBox>
 #include <QGroupBox>
 #include <QLabel>
 #include <QLineEdit>
@@ -246,6 +249,20 @@ SMESHGUI_CreatePolyhedralVolumeDlg::SMESHGUI_CreatePolyhedralVolumeDlg( SMESHGUI
   GroupContentLayout->addWidget( RemoveButton,         3, 3 );
   GroupContentLayout->addWidget( Preview,              5, 0, 1, 4 );
 
+  /***************************************************************/
+  GroupGroups = new QGroupBox( tr( "SMESH_ADD_TO_GROUP" ), this );
+  GroupGroups->setCheckable( true );
+  QHBoxLayout* GroupGroupsLayout = new QHBoxLayout(GroupGroups);
+  GroupGroupsLayout->setSpacing(SPACING);
+  GroupGroupsLayout->setMargin(MARGIN);
+
+  TextLabel_GroupName = new QLabel( tr( "SMESH_GROUP" ), GroupGroups );
+  ComboBox_GroupName = new QComboBox( GroupGroups );
+  ComboBox_GroupName->setEditable( true );
+
+  GroupGroupsLayout->addWidget( TextLabel_GroupName );
+  GroupGroupsLayout->addWidget( ComboBox_GroupName, 1 );
+
   /***************************************************************/
   GroupButtons = new QGroupBox( this );
   QHBoxLayout* GroupButtonsLayout = new QHBoxLayout( GroupButtons );
@@ -273,6 +290,7 @@ SMESHGUI_CreatePolyhedralVolumeDlg::SMESHGUI_CreatePolyhedralVolumeDlg( SMESHGUI
   /***************************************************************/
   topLayout->addWidget( ConstructorsBox );
   topLayout->addWidget( GroupContent );
+  topLayout->addWidget( GroupGroups );
   topLayout->addWidget( GroupButtons );
   
   mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
@@ -306,6 +324,9 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::Init()
   myEditCurrentArgument = LineEditElements;
   mySMESHGUI->SetActiveDialogBox( (QDialog*)this );
 
+  /* reset "Add to group" control */
+  GroupGroups->setChecked( false );
+
   myNbOkElements = 0;
   myActor = 0;
 
@@ -420,10 +441,39 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnPreview(bool theToggled){
 //=================================================================================
 void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
 {
+  if( !isValid() )
+    return;
+
   if ( myNbOkElements>0 && !mySMESHGUI->isActiveStudyLocked())
     {
       if(checkEditLine(false) == -1) {return;}
       busy = true;
+      long anElemId = -1;
+
+      bool addToGroup = GroupGroups->isChecked();
+      QString aGroupName;
+      
+      SMESH::SMESH_GroupBase_var aGroup;
+      int idx = 0;
+      if( addToGroup ) {
+       aGroupName = ComboBox_GroupName->currentText();
+       for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
+         QString aName = ComboBox_GroupName->itemText( i );
+         if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
+           idx = i;
+       }
+       if ( idx > 0 ) {
+         SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
+         if ( !aGeomGroup->_is_nil() ) {
+           int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
+                                                tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
+                                                tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
+           if ( res == 1 ) return;
+         }
+         aGroup = myGroups[idx-1];
+       }
+      }
+
       if (GetConstructorId() == 0)
         {
           SMESH::long_array_var anIdsOfNodes = new SMESH::long_array;
@@ -453,7 +503,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
           try{
             SUIT_OverrideCursor aWaitCursor;
             SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
-            aMeshEditor->AddPolyhedralVolume(anIdsOfNodes, aQuantities);
+            anElemId = aMeshEditor->AddPolyhedralVolume(anIdsOfNodes, aQuantities);
           }catch(SALOME::SALOME_Exception& exc){
             INFOS("Follow exception was cought:\n\t"<<exc.details.text);
           }catch(std::exception& exc){
@@ -474,7 +524,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
           try{
             SUIT_OverrideCursor aWaitCursor;
             SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
-            aMeshEditor->AddPolyhedralVolumeByFaces(anIdsOfFaces);
+            anElemId = aMeshEditor->AddPolyhedralVolumeByFaces(anIdsOfFaces);
           }catch(SALOME::SALOME_Exception& exc){
             INFOS("Follow exception was cought:\n\t"<<exc.details.text);
           }catch(std::exception& exc){
@@ -483,7 +533,38 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
             INFOS("Unknown exception was cought !!!");
           }
         }
-      
+
+      if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
+       SMESH::SMESH_Group_var aGroupUsed;
+       if ( aGroup->_is_nil() ) {
+         // create new group 
+         aGroupUsed = SMESH::AddGroup( myMesh, SMESH::VOLUME, aGroupName );
+         if ( !aGroupUsed->_is_nil() ) {
+           myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
+           ComboBox_GroupName->addItem( aGroupName );
+         }
+       }
+       else {
+         SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
+         if ( !aGeomGroup->_is_nil() ) {
+           aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
+           if ( !aGroupUsed->_is_nil() && idx > 0 ) {
+             myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
+             SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
+           }
+         }
+         else
+           aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
+       }
+       
+        if ( !aGroupUsed->_is_nil() ) {
+          SMESH::long_array_var anIdList = new SMESH::long_array;
+          anIdList->length( 1 );
+          anIdList[0] = anElemId;
+          aGroupUsed->Add( anIdList.inout() );
+        }
+      }
+
       //SALOME_ListIO aList;
       //mySelectionMgr->setSelectedObjects( aList );
       SMESH::UpdateView();
@@ -663,6 +744,8 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::SelectionIntoArgument()
   
   mySimulation->SetVisibility(false);
   
+  QString aCurrentEntry = myEntry;
+
   // get selected mesh
   
   SALOME_ListIO selected;
@@ -672,10 +755,29 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::SelectionIntoArgument()
     return;
   }
   
+  myEntry = selected.First()->getEntry();
   myMesh = SMESH::GetMeshByIO( selected.First() );
   if ( myMesh->_is_nil() )
     return;
   
+  // process groups
+  if ( !myMesh->_is_nil() && myEntry != aCurrentEntry ) {
+    myGroups.clear();
+    ComboBox_GroupName->clear();
+    ComboBox_GroupName->addItem( QString() );
+    SMESH::ListOfGroups aListOfGroups = *myMesh->GetGroups();
+    for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
+      SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
+      if ( !aGroup->_is_nil() && aGroup->GetType() == SMESH::VOLUME ) {
+       QString aGroupName( aGroup->GetName() );
+       if ( !aGroupName.isEmpty() ) {
+         myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
+         ComboBox_GroupName->addItem( aGroupName );
+        }
+      }
+    }
+  }
+
   myActor = SMESH::FindActorByObject(myMesh);
   if ( !myActor )
     return;
@@ -1062,3 +1164,16 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::keyPressEvent( QKeyEvent* e )
     ClickOnHelp();
   }
 }
+
+//=================================================================================
+// function : isValid
+// purpose  :
+//=================================================================================
+bool SMESHGUI_CreatePolyhedralVolumeDlg::isValid()
+{
+  if( GroupGroups->isChecked() && ComboBox_GroupName->currentText().isEmpty() ) {
+    SUIT_MessageBox::warning( this, tr( "SMESH_WRN_WARNING" ), tr( "GROUP_NAME_IS_EMPTY" ) );
+    return false;
+  }
+  return true;
+}
index b46d0c35bd48f316994c4a9f2eb4cfd954c6ed1f..33415c5ac4c93d55eab059c721f47f0602411c57 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_CreatePolyhedralVolumeDlg.h
 // Author : Michael ZORIN, Open CASCADE S.A.S.
@@ -37,6 +38,7 @@
 #include CORBA_SERVER_HEADER(SMESH_Mesh)
 
 class QButtonGroup;
+class QComboBox;
 class QGroupBox;
 class QListWidget;
 class QLabel;
@@ -67,6 +69,8 @@ public:
   ~SMESHGUI_CreatePolyhedralVolumeDlg();
 
 private:
+  typedef QList<SMESH::SMESH_GroupBase_var> GrpList;
+
   void                     Init();
   void                     closeEvent( QCloseEvent* );
   void                     enterEvent( QEvent* );          /* mouse enter the QWidget */
@@ -75,6 +79,8 @@ private:
   int                      GetConstructorId();
   void                     displaySimulation();
     
+  bool                     isValid();
+  
   int                      checkEditLine( bool = true ); /*! Checking for indices, return 1 if all ok, esle -1*/
     
   SMESHGUI*                mySMESHGUI;                   /* Current SMESHGUI object */
@@ -88,12 +94,17 @@ private:
   SMESH::SMESH_Mesh_var    myMesh;
   SMESH_Actor*             myActor;
   SMESH::TPolySimulation*  mySimulation;
+  QString                  myEntry;
+  GrpList                  myGroups;
   
   QGroupBox*               ConstructorsBox;
   QButtonGroup*            GroupConstructors;
   QRadioButton*            RadioButton1;
   QRadioButton*            RadioButton2;
   QCheckBox*               Preview;
+  QGroupBox*               GroupGroups;
+  QLabel*                  TextLabel_GroupName;
+  QComboBox*               ComboBox_GroupName;
   QGroupBox*               GroupButtons;
   QPushButton*             buttonOk;
   QPushButton*             buttonCancel;
index 1922e70deab2a5cadf395655f4e18650979800ba..95906a3f98e873c609b644a19590fc4057133079 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_DeleteGroupDlg.cxx
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
 // SMESH includes
index c9d6bd029a4af65b1e541706e4310a454b83f745..e727658c80757ff45527e643aae902d6c3e7aae9 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_DeleteGroupDlg.h
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
 //
index 7542215217caaf2228eb2da467f12e945b8e4634..eb4d9b4a00f9455189dbc7ae41faf415015460a3 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_Dialog.cxx
 // Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
index eb60f800b4b295d51fe6605563268c4ae3923b4d..f3f74f03a7a6d3d01cabe845da5a0c2235c23bca 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_Dialog.h
 // Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
index 0b41a00d0a20c63f7e3e5fb18d7a2155adafe88a..0f355c606d2066e85b016dcef7fbf1752008f922 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : Displayer for SMESH module
 // File   : SMESHGUI_Displayer.cxx
 // Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
index 61288ee13f672e978939707844e4d70f82c684fc..311901dcd056d4276cafb86ade60fa9bb9dd2049 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : Displayer for SMESH module
 // File   : SMESHGUI_Displayer.h
 // Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
index 5c84c204b21e0656ad24293091323b7b2b13cb12..5405ec451a8753c244d31351b5d90df1b1217c3e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_EditMeshDlg.cxx
 // Author : Open CASCADE S.A.S.
 #include <vtkIntArray.h>
 #include <vtkProperty2D.h>
 #include <vtkPointData.h>
+#include <vtkConfigure.h>
+#if !defined(VTK_XVERSION)
+#define VTK_XVERSION (VTK_MAJOR_VERSION<<16)+(VTK_MINOR_VERSION<<8)+(VTK_BUILD_VERSION)
+#endif
 
 // Qt includes
 #include <QApplication>
@@ -145,7 +150,9 @@ namespace SMESH
     
       myPtsLabeledDataMapper = vtkLabeledDataMapper::New();
       myPtsLabeledDataMapper->SetInput(myPtsSelectVisiblePoints->GetOutput());
+#if (VTK_XVERSION < 0x050200)
       myPtsLabeledDataMapper->SetLabelFormat("%g");
+#endif
       myPtsLabeledDataMapper->SetLabelModeToLabelScalars();
     
       vtkTextProperty* aPtsTextProp = vtkTextProperty::New();
@@ -359,6 +366,24 @@ SMESHGUI_EditMeshDlg::SMESHGUI_EditMeshDlg (SMESHGUI* theModule,
   GroupMeshLayout->addWidget(SelectMeshButton);
   GroupMeshLayout->addWidget(LineEditMesh);
 
+  /***************************************************************/
+  // Controls for switch dialog behaviour
+
+  TypeBox = new QGroupBox( tr( "SMESH_MODE" ), this );
+  GroupType = new QButtonGroup( this );
+  QHBoxLayout* aTypeBoxLayout = new QHBoxLayout( TypeBox );
+  aTypeBoxLayout->setMargin( MARGIN );
+  aTypeBoxLayout->setSpacing( SPACING );
+
+  QRadioButton* rb1 = new QRadioButton( tr( "SMESH_AUTOMATIC" ), TypeBox );
+  QRadioButton* rb2 = new QRadioButton( tr( "SMESH_MANUAL" ),   TypeBox );
+  GroupType->addButton( rb1, 0 );
+  GroupType->addButton( rb2, 1 );
+  aTypeBoxLayout->addWidget( rb1 );
+  aTypeBoxLayout->addWidget( rb2 );
+
+  myTypeId = 0;
+
   /***************************************************************/
   // Controls for coincident elements detecting
   GroupCoincident = new QGroupBox(myAction == 1 ? 
@@ -366,41 +391,54 @@ SMESHGUI_EditMeshDlg::SMESHGUI_EditMeshDlg (SMESHGUI* theModule,
                                   tr("COINCIDENT_NODES"), 
                                   this);
 
-  QGridLayout* GroupCoincidentLayout = new QGridLayout(GroupCoincident);
-  GroupCoincidentLayout->setSpacing(SPACING);
-  GroupCoincidentLayout->setMargin(MARGIN);
+  QVBoxLayout* aCoincidentLayout = new QVBoxLayout(GroupCoincident);
+
+  GroupCoincident->setLayout(aCoincidentLayout);
+
+  QHBoxLayout* aSpinBoxLayout = new QHBoxLayout( GroupCoincident );
   
   if (myAction == 0) { // case merge nodes
     TextLabelTolerance = new QLabel(tr("SMESH_TOLERANCE"), GroupCoincident);
     SpinBoxTolerance = new SMESHGUI_SpinBox(GroupCoincident);
     SpinBoxTolerance->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
 
-    GroupCoincidentLayout->addWidget(TextLabelTolerance, 0, 0);
-    GroupCoincidentLayout->addWidget(SpinBoxTolerance,   0, 1);
+    aSpinBoxLayout->addWidget(TextLabelTolerance);
+    aSpinBoxLayout->addWidget(SpinBoxTolerance);
+    aCoincidentLayout->addLayout(aSpinBoxLayout);
   }
   else {
     TextLabelTolerance = 0;
     SpinBoxTolerance = 0;
   }
 
-  int row = GroupCoincidentLayout->rowCount();
+  GroupCoincidentWidget = new QWidget(GroupCoincident);
+  QGridLayout* GroupCoincidentLayout = new QGridLayout(GroupCoincidentWidget);
+  GroupCoincidentLayout->setSpacing(SPACING);
+  GroupCoincidentLayout->setMargin(MARGIN);
 
-  ListCoincident = new QListWidget(GroupCoincident);
+  ListCoincident = new QListWidget(GroupCoincidentWidget);
   ListCoincident->setSelectionMode(QListWidget::ExtendedSelection);
 
-  DetectButton      = new QPushButton(tr("DETECT"),           GroupCoincident);
-  AddGroupButton    = new QPushButton(tr("SMESH_BUT_ADD"),    GroupCoincident);
-  RemoveGroupButton = new QPushButton(tr("SMESH_BUT_REMOVE"), GroupCoincident);
+  DetectButton      = new QPushButton(tr("DETECT"),           GroupCoincidentWidget);
+  AddGroupButton    = new QPushButton(tr("SMESH_BUT_ADD"),    GroupCoincidentWidget);
+  RemoveGroupButton = new QPushButton(tr("SMESH_BUT_REMOVE"), GroupCoincidentWidget);
+
+  SelectAllCB = new QCheckBox(tr("SELECT_ALL"), GroupCoincidentWidget);
 
-  SelectAllCB = new QCheckBox(tr("SELECT_ALL"), GroupCoincident);
+  if (myAction == 0)
+    GroupCoincidentWidget->hide();
+  else
+    GroupCoincident->hide();
+
+  GroupCoincidentLayout->addWidget(ListCoincident,    0,   0, 4, 2);
+  GroupCoincidentLayout->addWidget(DetectButton,      0,   2);
+  GroupCoincidentLayout->addWidget(AddGroupButton,    2, 2);
+  GroupCoincidentLayout->addWidget(RemoveGroupButton, 3, 2);
+  GroupCoincidentLayout->addWidget(SelectAllCB,       4, 0, 1, 3);
+  GroupCoincidentLayout->setRowMinimumHeight(1, 10);
+  GroupCoincidentLayout->setRowStretch(1, 5);
 
-  GroupCoincidentLayout->addWidget(ListCoincident,    row,   0, 4, 2);
-  GroupCoincidentLayout->addWidget(DetectButton,      row,   2);
-  GroupCoincidentLayout->addWidget(AddGroupButton,    row+2, 2);
-  GroupCoincidentLayout->addWidget(RemoveGroupButton, row+3, 2);
-  GroupCoincidentLayout->addWidget(SelectAllCB,       row+4, 0, 1, 3);
-  GroupCoincidentLayout->setRowMinimumHeight(row+1, 10);
-  GroupCoincidentLayout->setRowStretch(row+1, 5);
+  aCoincidentLayout->addWidget(GroupCoincidentWidget);
 
   /***************************************************************/
   // Controls for editing the selected group
@@ -428,6 +466,8 @@ SMESHGUI_EditMeshDlg::SMESHGUI_EditMeshDlg (SMESHGUI* theModule,
   GroupEditLayout->addWidget(RemoveElemButton, 0, 2);
   GroupEditLayout->addWidget(SetFirstButton,   1, 1, 1, 2);
 
+  GroupEdit->hide();
+
   /***************************************************************/
   GroupButtons = new QGroupBox(this);
   QHBoxLayout* GroupButtonsLayout = new QHBoxLayout(GroupButtons);
@@ -455,10 +495,13 @@ SMESHGUI_EditMeshDlg::SMESHGUI_EditMeshDlg (SMESHGUI* theModule,
   /***************************************************************/
   DlgLayout->addWidget(GroupConstructors);
   DlgLayout->addWidget(GroupMesh);
+  DlgLayout->addWidget(TypeBox);
   DlgLayout->addWidget(GroupCoincident);
   DlgLayout->addWidget(GroupEdit);
   DlgLayout->addWidget(GroupButtons);
 
+  this->resize(10,10);
+
   Init(); // Initialisations
 }
 
@@ -478,12 +521,14 @@ SMESHGUI_EditMeshDlg::~SMESHGUI_EditMeshDlg()
 void SMESHGUI_EditMeshDlg::Init()
 {
   if (myAction == 0) {
-    SpinBoxTolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, 5);
+    SpinBoxTolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, "len_tol_precision");
     SpinBoxTolerance->SetValue(1e-05);
   }
 
   RadioButton->setChecked(true);
 
+  GroupType->button(0)->setChecked(true);
+
   myEditCurrentArgument = (QWidget*)LineEditMesh; 
 
   myActor = 0;
@@ -494,17 +539,6 @@ void SMESHGUI_EditMeshDlg::Init()
   mySMESHGUI->SetActiveDialogBox((QDialog*)this);
   myIsBusy = false;
   
-  // Costruction of the logical filter
-  SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
-  SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (GROUP);
-  
-  QList<SUIT_SelectionFilter*> aListOfFilters;
-  if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
-  if (aSmeshGroupFilter)    aListOfFilters.append(aSmeshGroupFilter);
-
-  myMeshOrSubMeshOrGroupFilter =
-    new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);
-  
   /* signals and slots connections */
   connect(buttonOk,     SIGNAL(clicked()), this, SLOT(ClickOnOk()));
   connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
@@ -521,20 +555,23 @@ void SMESHGUI_EditMeshDlg::Init()
   connect(AddElemButton, SIGNAL (clicked()), this, SLOT(onAddElement()));
   connect(RemoveElemButton, SIGNAL (clicked()), this, SLOT(onRemoveElement()));
   connect(SetFirstButton, SIGNAL( clicked() ), this, SLOT( onSetFirst() ) );
+  connect(GroupType, SIGNAL(buttonClicked(int)), this, SLOT(onTypeChanged(int)));
 
   connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
   /* to close dialog if study change */
   connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
 
-  SetFirstButton->setEnabled(false);
-  buttonOk->setEnabled(false);
-  buttonApply->setEnabled(false);
-
   // Init Mesh field from selection
   SelectionIntoArgument();
 
-  myHelpFileName = "merging_elements_page.html";
+  // Update Buttons
+  updateControls();
+  
+  if (myAction == 0)
+    myHelpFileName = "merging_nodes_page.html";
+  else
+    myHelpFileName = "merging_elements_page.html";
 }
 
 //=================================================================================
@@ -582,12 +619,27 @@ bool SMESHGUI_EditMeshDlg::ClickOnApply()
     return false;
 
   try {
+    if (myTypeId == 0)
+      onDetect();
+
     SUIT_OverrideCursor aWaitCursor;
     SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
 
     SMESH::long_array_var anIds = new SMESH::long_array;
     SMESH::array_of_long_array_var aGroupsOfElements = new SMESH::array_of_long_array;
 
+    if ( ListCoincident->count() == 0) {
+      if (myAction == 0)
+        SUIT_MessageBox::warning(this,
+                                 tr("SMESH_WARNING"),
+                                 tr("SMESH_NO_NODES_DETECTED"));
+      else
+        SUIT_MessageBox::warning(this,
+                                 tr("SMESH_WARNING"),
+                                 tr("SMESH_NO_ELEMENTS_DETECTED"));
+      return false;
+    }
+
     aGroupsOfElements->length(ListCoincident->count());
 
     int anArrayNum = 0;
@@ -606,12 +658,21 @@ bool SMESHGUI_EditMeshDlg::ClickOnApply()
     else
       aMeshEditor->MergeElements (aGroupsOfElements.inout());
 
+    if ( myTypeId == 0 ) {
+      if (myAction ==0)
+        SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INFORMATION"),
+                                     tr("SMESH_MERGED_NODES").arg(QString::number(ListCoincident->count()).toLatin1().data()));
+      else
+        SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INFORMATION"),
+                                     tr("SMESH_MERGED_ELEMENTS").arg(QString::number(ListCoincident->count()).toLatin1().data()));
+    }
+      
+
   } catch(...) {
   }
   
   SMESH::UpdateView();
-
-  onDetect();
+  
   return true;
 }
 
@@ -632,13 +693,17 @@ void SMESHGUI_EditMeshDlg::ClickOnOk()
 void SMESHGUI_EditMeshDlg::ClickOnCancel()
 {
   myIdPreview->SetPointsLabeled(false);
+  SMESH::SetPointRepresentation(false);
+  disconnect(mySelectionMgr, 0, this, 0);
+  disconnect(mySMESHGUI, 0, this, 0);
+  mySMESHGUI->ResetState();
+
   mySelectionMgr->clearFilters();
   //mySelectionMgr->clearSelected();
-  SMESH::SetPointRepresentation(false);
+
   if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
     aViewWindow->SetSelectionMode(ActorSelection);
-  disconnect(mySelectionMgr, 0, this, 0);
-  mySMESHGUI->ResetState();
+
   reject();
 }
 
@@ -696,7 +761,7 @@ void SMESHGUI_EditMeshDlg::updateControls()
 {
   if (ListEdit->count() == 0)
     SetFirstButton->setEnabled(false);
-  bool enable = !(myMesh->_is_nil()) && ListCoincident->count();
+  bool enable = !(myMesh->_is_nil()) && (ListCoincident->count() || (myTypeId == 0));
   buttonOk->setEnabled(enable);
   buttonApply->setEnabled(enable);
 }
@@ -856,7 +921,11 @@ void SMESHGUI_EditMeshDlg::onAddGroup()
     return;
 
   QString anIDs = "";
-  SMESH::GetNameOfSelectedNodes(mySelector, myActor->getIO(), anIDs);
+  int aNbElements = 0;
+  aNbElements = SMESH::GetNameOfSelectedNodes(mySelector, myActor->getIO(), anIDs);
+
+  if (aNbElements < 1)
+    return;
   
   ListCoincident->clearSelection();
   ListCoincident->addItem(anIDs);
@@ -991,7 +1060,8 @@ void SMESHGUI_EditMeshDlg::SetEditCurrentArgument()
     SMESH::SetPointRepresentation(false);
     if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
       aViewWindow->SetSelectionMode(ActorSelection);
-    mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
+    if (myTypeId == 1)
+      mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
   }
 
   myEditCurrentArgument->setFocus();
@@ -1014,41 +1084,50 @@ void SMESHGUI_EditMeshDlg::SelectionIntoArgument()
     myActor = 0;
     
     int nbSel = SMESH::GetNameOfSelectedIObjects(mySelectionMgr, aString);
-    if (nbSel != 1)
+    if (nbSel != 1) {
+      myIdPreview->SetPointsLabeled(false);
+      SMESH::SetPointRepresentation(false);
+      mySelectionMgr->clearFilters();
+      if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+        aViewWindow->SetSelectionMode(ActorSelection);
       return;
+    }
 
     SALOME_ListIO aList;
-    mySelectionMgr->selectedObjects(aList, SVTK_Viewer::Type());
+    mySelectionMgr->selectedObjects(aList);
     
     Handle(SALOME_InteractiveObject) IO = aList.First();
     myMesh = SMESH::GetMeshByIO(IO);
     
     if (myMesh->_is_nil())
       return;
+
+    LineEditMesh->setText(aString);
     
     myActor = SMESH::FindActorByEntry(IO->getEntry());
     if (!myActor)
       myActor = SMESH::FindActorByObject(myMesh);
-    if(!myActor)
-      return;
-    
-    mySubMeshOrGroup = SMESH::SMESH_IDSource::_nil();
     
-    if ((!SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO)->_is_nil() || //SUBMESH OR GROUP
-         !SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IO)->_is_nil()) &&
-        !SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(IO)->_is_nil())
-      mySubMeshOrGroup = SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(IO);
-     
-    LineEditMesh->setText(aString);
-
-    if (myAction == 0) {
-      SMESH::SetPointRepresentation(true);
-      if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-        aViewWindow->SetSelectionMode(NodeSelection);
+    if ( myActor && myTypeId ==1 ) {
+      mySubMeshOrGroup = SMESH::SMESH_IDSource::_nil();
+      mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
+      
+      if ((!SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO)->_is_nil() || //SUBMESH OR GROUP
+           !SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IO)->_is_nil()) &&
+          !SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(IO)->_is_nil())
+        mySubMeshOrGroup = SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(IO);
+      
+      if (myAction == 0) {
+        SMESH::SetPointRepresentation(true);
+        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+          aViewWindow->SetSelectionMode(NodeSelection);
+      }
+      else
+        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+          aViewWindow->SetSelectionMode(CellSelection);
     }
-    else
-      if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-        aViewWindow->SetSelectionMode(CellSelection);
+
+    updateControls();
   }
 }
 
@@ -1060,6 +1139,7 @@ void SMESHGUI_EditMeshDlg::DeactivateActiveDialog()
 {
   if (GroupConstructors->isEnabled()) {
     GroupConstructors->setEnabled(false);
+    TypeBox->setEnabled(false);
     GroupMesh->setEnabled(false);
     GroupCoincident->setEnabled(false);
     GroupEdit->setEnabled(false);
@@ -1081,6 +1161,7 @@ void SMESHGUI_EditMeshDlg::ActivateThisDialog()
   /* Emit a signal to deactivate the active dialog */
   mySMESHGUI->EmitSignalDeactivateDialog();
   GroupConstructors->setEnabled(true);
+  TypeBox->setEnabled(true);
   GroupMesh->setEnabled(true);
   GroupCoincident->setEnabled(true);
   GroupEdit->setEnabled(true);
@@ -1136,3 +1217,63 @@ void SMESHGUI_EditMeshDlg::keyPressEvent( QKeyEvent* e)
     ClickOnHelp();
   }
 }
+
+//=================================================================================
+// function : onTypeChanged()
+// purpose  : the type radio button management
+//=================================================================================
+void SMESHGUI_EditMeshDlg::onTypeChanged (int id)
+{
+  if (myTypeId == id)
+    return;
+
+  myTypeId = id;
+  switch (id) {
+  case 0:
+    myIdPreview->SetPointsLabeled(false);
+    SMESH::SetPointRepresentation(false);
+    if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+      aViewWindow->SetSelectionMode(ActorSelection);
+    mySelectionMgr->clearFilters();
+    if (myAction == 0)
+      GroupCoincidentWidget->hide();
+    else
+      GroupCoincident->hide();
+    GroupEdit->hide();
+    break;
+  case 1:
+    SMESH::UpdateView();
+
+    // Costruction of the logical filter
+    SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
+    SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (GROUP);
+    
+    QList<SUIT_SelectionFilter*> aListOfFilters;
+    if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
+    if (aSmeshGroupFilter)    aListOfFilters.append(aSmeshGroupFilter);
+    
+    myMeshOrSubMeshOrGroupFilter =
+      new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);
+
+    if (myAction == 0) {
+      GroupCoincidentWidget->show();
+      SMESH::SetPointRepresentation(true);
+      if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+        aViewWindow->SetSelectionMode(NodeSelection);
+    }
+    else {
+      GroupCoincident->show();
+      if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+        aViewWindow->SetSelectionMode(CellSelection);
+    }
+    GroupEdit->show();
+    break;
+  }
+  updateControls();
+
+  qApp->processEvents();
+  updateGeometry();
+  resize(10,10);
+
+  SelectionIntoArgument();
+}
index 14b3d9ff77c33e9fc22a69965b5160a952d4514e..4ff701452d1a98815ee4ce50cb3853abd6430226 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_EditMeshDlg.h
 // Author : Open CASCADE S.A.S.
@@ -49,6 +50,7 @@ class QPushButton;
 class QRadioButton;
 class QCheckBox;
 class QListWidget;
+class QButtonGroup;
 class SMESHGUI;
 class SMESHGUI_SpinBox;
 class SMESH_Actor;
@@ -102,6 +104,7 @@ private:
 
   int                       myAction;
   bool                      myIsBusy;
+  int                       myTypeId;
 
   // Widgets
   QGroupBox*                GroupConstructors;
@@ -119,6 +122,7 @@ private:
   QLineEdit*                LineEditMesh;
 
   QGroupBox*                GroupCoincident;
+  QWidget*                  GroupCoincidentWidget;
   QLabel*                   TextLabelTolerance;
   SMESHGUI_SpinBox*         SpinBoxTolerance;
   QPushButton*              DetectButton;
@@ -132,6 +136,9 @@ private:
   QPushButton*              AddElemButton;
   QPushButton*              RemoveElemButton;
   QPushButton*              SetFirstButton;
+
+  QGroupBox*                TypeBox;
+  QButtonGroup*             GroupType;
     
   QString                   myHelpFileName;
 
@@ -154,6 +161,7 @@ private:
   void                      SelectionIntoArgument();
   void                      DeactivateActiveDialog();
   void                      ActivateThisDialog();
+  void                      onTypeChanged(int);
 };
 
 #endif // SMESHGUI_EDITMESHDLG_H
index 2131b25e6c403ce886222b302a82541b1ecc1090..b2ca950174100f27903717933c8cef7c538b37d3 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_ExtrusionAlongPathDlg.cxx
 // Author : Vadim SANDLER, Open CASCADE S.A.S.
@@ -307,10 +308,10 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
 
   /***************************************************************/
   // Initialisations
-  XSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  YSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  ZSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  AngleSpin->RangeStepAndValidator(-180.0, 180.0, 5.0, 3);
+  XSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  YSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  ZSpin->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  AngleSpin->RangeStepAndValidator(-180.0, 180.0, 5.0, "angle_precision");
 
   mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
 
@@ -472,7 +473,7 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
   //if (myMesh->_is_nil() || MeshCheck->isChecked() && myIDSource->_is_nil() ||
   //    !myMeshActor || myPathMesh->_is_nil() || myPathShape->_is_nil())
   if ( myMesh->_is_nil() || MeshCheck->isChecked() && myIDSource->_is_nil() ||
-       !myMeshActor || myPath->_is_nil() )
+       /*!myMeshActor ||*/ myPath->_is_nil() )
     return false;
 
   if (!isValid())
@@ -484,7 +485,10 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
     // If "Select whole mesh, submesh or group" check box is off ->
     // use only elements of given type selected by user
 
-    SMDS_Mesh* aMesh = myMeshActor->GetObject()->GetMesh();
+    SMDS_Mesh* aMesh;
+    if ( myMeshActor )
+      aMesh = myMeshActor->GetObject()->GetMesh();
+
     if (aMesh) {
       QStringList aListElementsId = ElementsLineEdit->text().split(" ", QString::SkipEmptyParts);
       anElementsId = new SMESH::long_array;
@@ -664,7 +668,9 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
   }
 
   //mySelectionMgr->clearSelected();
-  SMESH::Update( myMeshActor->getIO(), myMeshActor->GetVisibility() );
+  if ( myMeshActor )
+    SMESH::Update( myMeshActor->getIO(), myMeshActor->GetVisibility() );
+    
   if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() )
     mySMESHGUI->updateObjBrowser(true); // new groups may appear
   //SMESH::UpdateView();
@@ -855,7 +861,7 @@ void SMESHGUI_ExtrusionAlongPathDlg::SelectionIntoArgument()
     }
     // find actor
     myMeshActor = SMESH::FindActorByObject(myMesh);
-    if (!myMeshActor)
+    if (!myMeshActor && !MeshCheck->isChecked())
       return;
 
     if (MeshCheck->isChecked()) {
@@ -988,7 +994,7 @@ void SMESHGUI_ExtrusionAlongPathDlg::SetEditCurrentArgument()
 void SMESHGUI_ExtrusionAlongPathDlg::SetEditCurrentArgument (QToolButton* button)
 {
   disconnect(mySelectionMgr, 0, this, 0);
-  mySelectionMgr->clearSelected();
+  //  mySelectionMgr->clearSelected();
   mySelectionMgr->clearFilters();
   SMESH::SetPickable();
 
index e93985ae1e92f584d129383d28fdec122ed73ef9..1049011cb1f1d67fe69fcd8244965496d75b76ef 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_ExtrusionAlongPathDlg.h
 // Author : Vadim SANDLER, Open CASCADE S.A.S.
index 7c32fc1e24b9b94fd64d8344609f63923d715dd4..89ebc7f55f0ab4371a59f45880fe9ca57da20e9a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_ExtrusionDlg.cxx
 // Author : Michael ZORIN, Open CASCADE S.A.S.
@@ -249,16 +250,16 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule)
   SMESHGUI_ExtrusionDlgLayout->addWidget(GroupButtons);
 
   /* Initialisations */
-  SpinBox_Vx->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, 3);
-  SpinBox_Vy->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, 3);
-  SpinBox_Vz->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, 3);
+  SpinBox_Vx->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, "length_precision");
+  SpinBox_Vy->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, "length_precision");
+  SpinBox_Vz->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.01, "length_precision");
 
-  SpinBox_Dx->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_Dy->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_Dz->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
+  SpinBox_Dx->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_Dy->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_Dz->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
   
   SpinBox_NbSteps->setRange(1, 999999);
-  SpinBox_VDist->RangeStepAndValidator(0, COORD_MAX, 10.0, 3);
+  SpinBox_VDist->RangeStepAndValidator(0, COORD_MAX, 10.0, "length_precision");
 
   RadioButton1->setChecked(true);
   RadioButton3->setChecked(true);
index 4425d29f78bdc5531d8430317c78df22620b3d29..543fe282745c8cf3a75a5c51e98a8f0482116bd5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_ExtrusionDlg.h
 // Author : Michael ZORIN, Open CASCADE S.A.S.
index b6f6f0e48505edad93513fb2ba27ccf3841921d9..e54cf71fa6e85fce073f7542ea19467d9db54207 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_FileInfoDlg.cxx
 // Author : Alexandre SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com)
index 0303acb61586158dee10b54f8d5af2c775fe64cc..c56845b5278ff50871573054b4c75acd805fd6e1 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_FileInfoDlg.h
 // Author : Alexandre SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com)
diff --git a/src/SMESHGUI/SMESHGUI_FileValidator.cxx b/src/SMESHGUI/SMESHGUI_FileValidator.cxx
new file mode 100755 (executable)
index 0000000..42f06d2
--- /dev/null
@@ -0,0 +1,74 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// SMESH SMESHGUI : GUI for SMESH component
+// File   : SMESHGUI_FileValidator.cxx
+// Author : Oleg UVAROV
+// SMESH includes
+//
+#include "SMESHGUI_FileValidator.h"
+
+// SALOME GUI includes
+#include <SUIT_MessageBox.h>
+#include <SUIT_Tools.h>
+
+// Qt includes
+#include <QFileInfo>
+
+//=======================================================================
+//function : SMESHGUI_FileValidator
+//purpose  : 
+//=======================================================================
+SMESHGUI_FileValidator::SMESHGUI_FileValidator( QWidget* parent )
+: SUIT_FileValidator( parent ),
+  myIsOverwrite( true )
+{
+}
+  
+//=======================================================================
+//function : canSave
+//purpose  : 
+//=======================================================================
+bool SMESHGUI_FileValidator::canSave( const QString& fileName, bool checkPermission ) 
+{
+  if ( QFile::exists( fileName ) ) {
+    if ( parent() ) {
+      int anAnswer = SUIT_MessageBox::question( parent(), QObject::tr( "SMESH_WRN_WARNING" ),
+                                                QObject::tr( "SMESH_FILE_EXISTS" ).arg( fileName ),
+                                                QObject::tr( "SMESH_BUT_OVERWRITE" ),
+                                                QObject::tr( "SMESH_BUT_ADD" ),
+                                                QObject::tr( "SMESH_BUT_CANCEL" ), 0, 2 );
+      if( anAnswer == 2 )
+        return false;
+      myIsOverwrite = anAnswer == 0;
+    }
+
+    // copied from SUIT_FileValidator
+    if ( checkPermission && !QFileInfo( fileName ).isWritable() ) {
+      if ( parent() ) 
+        SUIT_MessageBox::critical( parent(), QObject::tr( "SMESH_ERROR" ),
+                                   QObject::tr( "NO_PERMISSION" ).arg( fileName ) );
+      return false; 
+    }
+  }
+  else {
+    return SUIT_FileValidator::canSave( fileName, checkPermission );
+  }
+  return true;
+}
diff --git a/src/SMESHGUI/SMESHGUI_FileValidator.h b/src/SMESHGUI/SMESHGUI_FileValidator.h
new file mode 100755 (executable)
index 0000000..0aacb3f
--- /dev/null
@@ -0,0 +1,46 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// SMESH SMESHGUI : GUI for SMESH component
+// File   : SMESHGUI_FileValidator.h
+// Author : Oleg UVAROV
+//
+#ifndef SMESHGUI_FILEVALIDATOR_H
+#define SMESHGUI_FILEVALIDATOR_H
+
+// SMESH includes
+#include "SMESH_SMESHGUI.hxx"
+
+// SALOME GUI includes
+#include <SUIT_FileValidator.h>
+
+class SMESHGUI_EXPORT SMESHGUI_FileValidator : public SUIT_FileValidator
+{
+public:
+  SMESHGUI_FileValidator( QWidget* = 0 );
+  
+  virtual bool canSave( const QString&, bool = true );
+
+  bool         isOverwrite() const { return myIsOverwrite; }
+
+private:
+  bool         myIsOverwrite;
+};
+
+#endif // SMESHGUI_FILEVALIDATOR_H
index e6d12feec9ec3cfb1249e81792b2fc18777fb36c..a63b843d9a0aefe1a5f3df8831ce34a6e5570d27 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESHGUI_Filter : Filters for VTK viewer
 // File   : SMESHGUI_Filter.cxx
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
index 6da648be9e203aaaabca06ea32cea099ab267f0c..bfa8d3e5d6d0c3b10e19fc7dfc36bd069a925a1a 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESHGUI_Filter : Filters for VTK viewer
 // File   : SMESHGUI_Filter.h
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
index 4cc5d3fdce49a8a6d0a9ef7c216716acece5f3e1..711d9a220059d2e1d75a74a713843a18b7969a41 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_FilterDlg.cxx
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
index e38b5b6cdb6e9f5757488a17eea9ececad87fe62..f94a0ed3e32152f779d6f2e1effd110b2b80b9a2 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_FilterDlg.h
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
index 9eb27ab6b97ed69e97b6c352677aeeb9027c4975..579a7fe2864d5947b4e39056401c75a0288e5230 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_FilterLibraryDlg.cxx
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
index eb9fe6134ee04725748511083f99740750622d02..294a37df275210dd125158239fb76aa4f4c937c3 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_FilterLibraryDlg.h
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
index d7ce02e58724b04d8200da658f4e7e73a4de6df3..d6ac4c2bef8d2d0c6745db2beed8cc1d9031387a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_FilterUtils.cxx
 // Author : Open CASCADE S.A.S.
index aa4cfd0be48f8c12a98d8a892cb6003840e1f80e..90a0548a1c3b93cc2a76f6e1a15656a97e8e30b5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_FilterUtils.h
 // Author : Open CASCADE S.A.S.
diff --git a/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx b/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx
new file mode 100644 (file)
index 0000000..f629fba
--- /dev/null
@@ -0,0 +1,451 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// File   : SMESHGUI_FindElemByPointDlg.cxx
+// Author : Edward AGAPOV, Open CASCADE S.A.S.
+// SMESH includes
+//
+#include "SMESHGUI_FindElemByPointDlg.h"
+
+#include "SMESHGUI.h"
+#include "SMESHGUI_MeshUtils.h"
+#include "SMESHGUI_VTKUtils.h"
+#include "SMESHGUI_SpinBox.h"
+#include "SMESHGUI_MeshEditPreview.h"
+
+#include <SMESH_Actor.h>
+#include <SMESH_ActorUtils.h>
+#include <SMESH_TypeFilter.hxx>
+
+// SALOME GUI includes
+#include <LightApp_SelectionMgr.h>
+#include <QtxComboBox.h>
+#include <SALOME_ListIO.hxx>
+#include <SUIT_Desktop.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_OverrideCursor.h>
+#include <SUIT_ResourceMgr.h>
+#include <SVTK_ViewModel.h>
+#include <SVTK_ViewWindow.h>
+#include <SalomeApp_Tools.h>
+#include <SalomeApp_TypeFilter.h>
+
+// Qt includes
+#include <QAbstractButton>
+#include <QGridLayout>
+#include <QGroupBox>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QLineEdit>
+#include <QListWidget>
+#include <QPushButton>
+#include <QVBoxLayout>
+
+// VTK includes
+#include <vtkProperty.h>
+
+// IDL includes
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SMESH_MeshEditor)
+
+#define SPACING 6
+#define MARGIN  11
+
+//=======================================================================
+/*!
+ * \brief Dialog to find elements by a point coordinates
+ */
+//=======================================================================
+
+SMESHGUI_FindElemByPointDlg::SMESHGUI_FindElemByPointDlg()
+  : SMESHGUI_Dialog( 0, false, true, OK | Help )
+{
+  setWindowTitle(tr("CAPTION"));
+
+  QVBoxLayout* aDlgLay = new QVBoxLayout (mainFrame());
+  aDlgLay->setMargin(MARGIN);;
+  aDlgLay->setSpacing(SPACING);
+
+  QWidget* aMainFrame = createMainFrame  (mainFrame());
+
+  aDlgLay->addWidget(aMainFrame);
+  aDlgLay->setStretchFactor(aMainFrame, 1);
+}
+
+//=======================================================================
+// function : createMainFrame()
+// purpose  : Create frame containing dialog's input fields
+//=======================================================================
+QWidget* SMESHGUI_FindElemByPointDlg::createMainFrame (QWidget* theParent)
+{
+  QWidget* aFrame = new QWidget(theParent);
+
+  //mesh name
+
+  QGroupBox* aMeshGrp = new QGroupBox(tr("SMESH_MESH"), aFrame);
+  QHBoxLayout* aMeshGrpLayout = new QHBoxLayout(aMeshGrp);
+  aMeshGrpLayout->setMargin(MARGIN);
+  aMeshGrpLayout->setSpacing(SPACING);
+
+  myMeshName = new QLineEdit(aMeshGrp);
+  aMeshGrpLayout->addWidget(myMeshName);
+
+  // coordinates
+
+  QGroupBox* aCoordGrp = new QGroupBox(tr("SMESH_COORDINATES"), aFrame);
+  QHBoxLayout* aCoordGrpLayout = new QHBoxLayout(aCoordGrp);
+  aCoordGrpLayout->setMargin(MARGIN);
+  aCoordGrpLayout->setSpacing(SPACING);
+
+  QLabel* aXLabel = new QLabel(tr("SMESH_X"), aCoordGrp);
+  myX = new SMESHGUI_SpinBox(aCoordGrp);
+
+  QLabel* aYLabel = new QLabel(tr("SMESH_Y"), aCoordGrp);
+  myY = new SMESHGUI_SpinBox(aCoordGrp);
+
+  QLabel* aZLabel = new QLabel(tr("SMESH_Z"), aCoordGrp);
+  myZ = new SMESHGUI_SpinBox(aCoordGrp);
+
+  myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myX->SetValue(0);
+  myY->SetValue(0);
+  myZ->SetValue(0);
+
+  aCoordGrpLayout->addWidget(aXLabel);
+  aCoordGrpLayout->addWidget(myX);
+  aCoordGrpLayout->addWidget(aYLabel);
+  aCoordGrpLayout->addWidget(myY);
+  aCoordGrpLayout->addWidget(aZLabel);
+  aCoordGrpLayout->addWidget(myZ);
+
+  // Elements
+
+  QGroupBox* elementGrp = new QGroupBox(tr("Elements"), aFrame);
+  QGridLayout* elementGrpLayout = new QGridLayout(elementGrp);
+  elementGrpLayout->setSpacing(SPACING);
+  elementGrpLayout->setMargin(MARGIN);
+
+
+  myFindBtn = new QPushButton(elementGrp);
+  myFindBtn->setText(tr("Find"));
+  //myFindBtn->setCheckable(false);
+
+  myElemTypeCombo = new QtxComboBox(elementGrp);
+  myElemTypeCombo->addItem( tr( "MEN_ALL" ));    myElemTypeCombo->setId( 0, int( SMESH::ALL   ));
+  myElemTypeCombo->addItem( tr( "MEN_NODE" ));   myElemTypeCombo->setId( 1, int( SMESH::NODE  ));
+  myElemTypeCombo->addItem( tr( "MEN_EDGE" ));   myElemTypeCombo->setId( 2, int( SMESH::EDGE  ));
+  myElemTypeCombo->addItem( tr( "MEN_FACE" ));   myElemTypeCombo->setId( 3, int( SMESH::FACE  ));
+  myElemTypeCombo->addItem( tr("MEN_VOLUME_3D"));myElemTypeCombo->setId( 4, int( SMESH::VOLUME));
+  myElemTypeCombo->addItem( tr( "MEN_ELEM0D" )); myElemTypeCombo->setId( 5, int( SMESH::ELEM0D));
+
+  myFoundList = new QListWidget(elementGrp);
+
+  elementGrpLayout->addWidget( myFindBtn,       0, 0 );
+  elementGrpLayout->addWidget( myElemTypeCombo, 0, 1 );
+  elementGrpLayout->addWidget( myFoundList,     1, 0, 2, 2 );
+
+
+  QVBoxLayout* aLay = new QVBoxLayout(aFrame);
+  aLay->addWidget(aMeshGrp);
+  aLay->addWidget(aCoordGrp);
+  aLay->addWidget(elementGrp);
+
+  // OK instead of "Apply and Close"
+  if ( QAbstractButton* but = button(OK) )
+    but->setText( tr("SMESH_BUT_OK"));
+
+  return aFrame;
+}
+
+//================================================================================
+/*!
+ * \brief Constructor
+*/
+//================================================================================
+
+SMESHGUI_FindElemByPointOp::SMESHGUI_FindElemByPointOp()
+  :SMESHGUI_SelectionOp()
+{
+  mySimulation = 0;
+  myDlg = new SMESHGUI_FindElemByPointDlg;
+  myHelpFileName = "find_element_by_point_page.html";
+  myFilter = new SMESH_TypeFilter( MESH );
+
+  myPreview = new SMESH::MeshPreviewStruct();
+
+  myPreview->nodesXYZ.length(1);
+  myPreview->nodesXYZ[0].x = myDlg->myX->GetValue();
+  myPreview->nodesXYZ[0].y = myDlg->myY->GetValue();
+  myPreview->nodesXYZ[0].z = myDlg->myZ->GetValue();
+
+  myPreview->elementTypes.length(1);
+  myPreview->elementTypes[0].SMDS_ElementType = SMESH::NODE;
+  myPreview->elementTypes[0].isPoly = false;
+  myPreview->elementTypes[0].nbNodesInElement = 1;
+
+  myPreview->elementConnectivities.length(1);
+  myPreview->elementConnectivities[0] = 0;
+
+  // connect signals and slots
+  connect(myDlg->myFindBtn,      SIGNAL(clicked()),               this, SLOT(onFind()));
+  connect(myDlg->myX,            SIGNAL(valueChanged(double)),    this, SLOT(redisplayPreview()));
+  connect(myDlg->myY,            SIGNAL(valueChanged(double)),    this, SLOT(redisplayPreview()));
+  connect(myDlg->myZ,            SIGNAL(valueChanged(double)),    this, SLOT(redisplayPreview()));
+  connect(myDlg->myFoundList,    SIGNAL(itemSelectionChanged()),  this, SLOT(onElemSelected()));
+  connect(myDlg->myElemTypeCombo,SIGNAL(currentIndexChanged(int)),this, SLOT(onElemTypeChange(int)));
+}
+
+//=======================================================================
+// function : startOperation()
+// purpose  : Init dialog fields, connect signals and slots, show dialog
+//=======================================================================
+void SMESHGUI_FindElemByPointOp::startOperation()
+{
+  // init simulation with a current View
+  if ( mySimulation ) delete mySimulation;
+  mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( getSMESHGUI() ));
+  vtkProperty* aProp = vtkProperty::New();
+  aProp->SetRepresentationToWireframe();
+  aProp->SetColor(250, 0, 250);
+  aProp->SetPointSize(5);
+  aProp->SetLineWidth( SMESH::GetFloat("SMESH:element_width",1) + 1);
+  mySimulation->GetActor()->SetProperty(aProp);
+  aProp->Delete();
+
+  myDlg->myElemTypeCombo->setCurrentId( int(SMESH::ALL));
+
+  SMESHGUI_SelectionOp::startOperation();
+  myDlg->show();
+  redisplayPreview();
+
+  onSelectionDone(); // init myMesh
+}
+
+//================================================================================
+/*!
+ * \brief Stops operation
+ */
+//================================================================================
+
+void SMESHGUI_FindElemByPointOp::stopOperation()
+{
+  if ( mySimulation )
+  {
+    mySimulation->SetVisibility(false);
+    delete mySimulation;
+    mySimulation = 0;
+  }
+  selectionMgr()->removeFilter( myFilter );
+  SMESHGUI_SelectionOp::stopOperation();
+}
+
+//================================================================================
+/*!
+ * \brief hilight found selected elements
+ */
+//================================================================================
+
+void SMESHGUI_FindElemByPointOp::onElemSelected()
+{
+  if ( !myMeshIO.IsNull() )
+  {
+    Selection_Mode selMode =
+      myDlg->myElemTypeCombo->currentId() == int(SMESH::NODE) ? NodeSelection : CellSelection;
+    if ( selectionMode() != selMode )
+      setSelectionMode( selMode );
+
+    QList<QListWidgetItem *> ids = myDlg->myFoundList->selectedItems();
+    QList<QListWidgetItem*>::iterator id = ids.begin();
+    TColStd_MapOfInteger idMap;
+    for ( ; id != ids.end(); ++id )
+      idMap.Add( (*id)->text().toInt() );
+
+    addOrRemoveIndex( myMeshIO, idMap, false );
+
+    SALOME_ListIO aList;
+    aList.Append(myMeshIO);
+    selectionMgr()->setSelectedObjects(aList,false);
+  }
+}
+
+//================================================================================
+/*!
+ * \brief Set selection mode according to element type
+ */
+//================================================================================
+
+void SMESHGUI_FindElemByPointOp::onElemTypeChange(int index)
+{
+  Selection_Mode newMode = (index == 1) ? NodeSelection : CellSelection;
+  if ( selectionMode() != newMode )
+  {
+    selectionMgr()->clearFilters();
+    setSelectionMode( newMode );
+  }
+  myDlg->myFoundList->clear();
+}
+
+//================================================================================
+/*!
+ * \brief perform it's intention action: find elements
+ */
+//================================================================================
+
+void SMESHGUI_FindElemByPointOp::onFind()
+{
+  if ( myMesh->_is_nil() ) {
+    return;
+  }
+
+  try {
+    SUIT_OverrideCursor wc;
+
+    SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
+    if (aMeshEditor->_is_nil())
+      return;
+
+    SMESH::long_array_var foundIds =
+      aMeshEditor->FindElementsByPoint( myDlg->myX->GetValue(),
+                                        myDlg->myY->GetValue(),
+                                        myDlg->myZ->GetValue(),
+                                        SMESH::ElementType( myDlg->myElemTypeCombo->currentId() ));
+    myDlg->myFoundList->clear();
+    for ( int i = 0; i < foundIds->length(); ++i )
+      myDlg->myFoundList->addItem( QString::number( foundIds[i] ));
+
+    if ( foundIds->length() > 0 )
+      myDlg->myFoundList->setCurrentRow(0);
+  }
+  catch (const SALOME::SALOME_Exception& S_ex) {
+    SalomeApp_Tools::QtCatchCorbaException(S_ex);
+  }
+  catch (...) {
+  }
+}
+
+//================================================================================
+/*!
+ * \brief Method needed for internal cuisine
+ */
+//================================================================================
+
+bool SMESHGUI_FindElemByPointOp::onApply()
+{
+  return true;
+}
+
+//================================================================================
+/*!
+ * \brief SLOT called when selection changed
+ */
+//================================================================================
+
+void SMESHGUI_FindElemByPointOp::onSelectionDone()
+{
+  if ( !myDlg->isVisible() || !myDlg->isEnabled() )
+    return;
+
+  QString oldMeshEntry, newMeshEntry;
+  if ( !myMeshIO.IsNull() && myMeshIO->hasEntry() )
+    oldMeshEntry = myMeshIO->getEntry();
+
+  myDlg->myMeshName->setText("");
+  myMeshIO.Nullify();
+
+  try {
+    SALOME_ListIO aList;
+    selectionMgr()->selectedObjects(aList, SVTK_Viewer::Type());
+    if (aList.Extent() == 1 && aList.First()->hasEntry())
+    {
+      Handle(SALOME_InteractiveObject) anIO = aList.First();
+      _PTR(SObject) pObj = studyDS()->FindObjectID(anIO->getEntry());
+      myMesh = SMESH::GetMeshByIO( anIO );
+      if ( pObj && !myMesh->_is_nil() )
+      {
+        myMeshIO = anIO;
+        myDlg->myMeshName->setText( pObj->GetName().c_str() );
+        newMeshEntry = anIO->getEntry();
+      }
+    }
+  }
+  catch (...) {
+  }
+
+  if ( oldMeshEntry != newMeshEntry || newMeshEntry.isEmpty() )
+    myDlg->myFoundList->clear();
+
+  myDlg->myFindBtn->setEnabled( !myMeshIO.IsNull() );
+}
+
+//================================================================================
+/*!
+ * \brief show point by coordinates
+ */
+//================================================================================
+
+void SMESHGUI_FindElemByPointOp::redisplayPreview()
+{
+  myDlg->myFoundList->clear();
+
+  myPreview->nodesXYZ[0].x = myDlg->myX->GetValue();
+  myPreview->nodesXYZ[0].y = myDlg->myY->GetValue();
+  myPreview->nodesXYZ[0].z = myDlg->myZ->GetValue();
+
+  mySimulation->SetData(&myPreview.in());
+}
+
+//================================================================================
+/*!
+ * \brief install filter on meshes
+ */
+//================================================================================
+
+void SMESHGUI_FindElemByPointOp::activateSelection()
+{
+  selectionMgr()->clearFilters();
+  selectionMgr()->installFilter( myFilter );
+}
+
+//================================================================================
+/*!
+ * \brief Destructor
+*/
+//================================================================================
+
+SMESHGUI_FindElemByPointOp::~SMESHGUI_FindElemByPointOp()
+{
+  if ( myDlg )         { delete myDlg;        myDlg = 0; }
+  if ( mySimulation )  { delete mySimulation; mySimulation = 0; }
+  if ( myFilter )      { delete myFilter;     myFilter = 0; }
+}
+
+//================================================================================
+/*!
+ * \brief Gets dialog of this operation
+ * \retval LightApp_Dialog* - pointer to dialog of this operation
+ */
+//================================================================================
+
+LightApp_Dialog* SMESHGUI_FindElemByPointOp::dlg() const
+{
+  return myDlg;
+}
+
diff --git a/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.h b/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.h
new file mode 100644 (file)
index 0000000..72ecaeb
--- /dev/null
@@ -0,0 +1,111 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef SMESHGUI_FindElemByPointDLG_H
+#define SMESHGUI_FindElemByPointDLG_H
+
+// SMESH includes
+#include "SMESH_SMESHGUI.hxx"
+
+#include "SMESHGUI_Dialog.h"
+#include "SMESHGUI_SelectionOp.h"
+
+#include CORBA_SERVER_HEADER(SMESH_Mesh)
+
+class QLineEdit;
+class QPushButton;
+class QListWidget;
+class QtxComboBox;
+class SMESHGUI_SpinBox;
+class SMESHGUI_MeshEditPreview;
+class SMESHGUI_FindElemByPointDlg;
+
+/*!
+ * \brief Operation to find elements by a point coordinates
+ */
+class SMESHGUI_EXPORT SMESHGUI_FindElemByPointOp: public SMESHGUI_SelectionOp
+{
+  Q_OBJECT
+
+public:
+  SMESHGUI_FindElemByPointOp();
+  virtual ~SMESHGUI_FindElemByPointOp();
+
+  virtual LightApp_Dialog*       dlg() const;  
+
+protected:
+
+  virtual void                   startOperation();
+  virtual void                   stopOperation();
+
+  virtual void                   activateSelection();
+
+protected slots:
+
+  virtual void                   onFind();
+  virtual bool                   onApply();
+
+private slots:
+  void                           onSelectionDone();
+  void                           onElemSelected();
+  void                           onElemTypeChange(int);
+  void                           redisplayPreview();
+
+private:
+  SMESHGUI_FindElemByPointDlg*     myDlg;
+
+  SUIT_SelectionFilter*            myFilter;
+  SMESHGUI_MeshEditPreview*        mySimulation; // to show point coordinates
+  //SMESH_Actor*                   myMeshActor;  // to show found elements
+  SMESH::SMESH_Mesh_var            myMesh;
+  SMESH::MeshPreviewStruct_var     myPreview;
+  Handle(SALOME_InteractiveObject) myMeshIO;
+};
+
+/*!
+ * \brief Dialog to find elements by a point coordinates
+ */
+
+class SMESHGUI_EXPORT SMESHGUI_FindElemByPointDlg : public SMESHGUI_Dialog
+{
+  Q_OBJECT
+
+public:
+  SMESHGUI_FindElemByPointDlg();
+
+private:
+  QWidget*                      createMainFrame( QWidget* );
+
+  QLineEdit*                    myMeshName;
+  SMESHGUI_SpinBox*             myX;
+  SMESHGUI_SpinBox*             myY;
+  SMESHGUI_SpinBox*             myZ;
+  QtxComboBox*                  myElemTypeCombo;
+  QPushButton*                  myFindBtn;
+  QListWidget*                  myFoundList;
+
+  QString                       myHelpFileName;
+
+  friend class SMESHGUI_FindElemByPointOp;
+
+private slots:
+//void                          ButtonToggled( bool );
+};
+
+#endif // SMESHGUI_FindElemByPointDLG_H
index d3544b4d24cb56ad1c76013b89bc6ffeace2c925..d1a77e845df3b0b75552124727a34ea005d458cb 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_GEOMGenUtils.cxx
 // Author : Open CASCADE S.A.S.
index 8461a643236011d17233762a4096f9946c7b3eaf..8539f3a313309f867bc5acde1cc4f8e2f0a1d941 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_GEOMGenUtils.h
 // Author : Open CASCADE S.A.S.
index 32f66474c196d0369bf479ac7a36cfa464759201..351c4bc1f1fa9392ddc35313df81f36cf46ba311 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHGUI : GUI for SMESH component
 //  File   : SMESHGUI_GroupDlg.cxx
 //  Author : Natalia KOPNOVA, Open CASCADE S.A.S.
 //  SMESH includes
-
+//
 #include "SMESHGUI_GroupDlg.h"
 
 #include "SMESHGUI.h"
@@ -590,7 +591,8 @@ void SMESHGUI_GroupDlg::init (SMESH::SMESH_GroupBase_ptr theGroup,
     if (!aGroupShape->_is_nil())
     {
       _PTR(SObject) aGroupShapeSO = aStudy->FindObjectID(aGroupShape->GetStudyEntry());
-      aShapeName = aGroupShapeSO->GetName().c_str();
+      if ( aGroupShapeSO )
+        aShapeName = aGroupShapeSO->GetName().c_str();
     }
     myGeomGroupLine->setText( aShapeName );
     myNameChanged = true;
@@ -2236,14 +2238,20 @@ bool SMESHGUI_GroupDlg::SetAppropriateActor()
   } else {
     // try mesh actor
     SMESH_Actor* anActor = SMESH::FindActorByObject(myMesh);
-    if (anActor && anActor->hasIO())
-      {
-        isActor = true;
-        if (aViewWindow && !aViewWindow->isVisible(anActor->getIO()))
-          isActor = false;
-        else
-          myActorsList.append(anActor);
-      }
+    if (anActor && anActor->hasIO()) {
+      isActor = true;
+      if (aViewWindow && !aViewWindow->isVisible(anActor->getIO()))
+        isActor = false;
+      else
+        myActorsList.append(anActor);
+    }
+    
+    // try group actor
+    if (!isActor && !myGroup->_is_nil()) {
+      SMESH_Actor* anActor = SMESH::FindActorByObject(myGroup);
+      if (anActor && anActor->hasIO())
+        myActorsList.append(anActor);
+    }
     
     // try any visible actor of group or submesh of current mesh
     if (aViewWindow) {
@@ -2264,7 +2272,7 @@ bool SMESHGUI_GroupDlg::SetAppropriateActor()
             if (anActor && anActor->hasIO()) {
               Handle(SALOME_InteractiveObject) anIO = anActor->getIO();
               if (aViewWindow->isVisible(anIO)) {
-                if (anIO->hasEntry() && strncmp(anIO->getEntry(), meshEntry, len) == 0)
+                if (anIO->hasEntry() && strncmp(anIO->getEntry(), meshEntry, len) == 0 && !myActorsList.contains(anActor) )
                   myActorsList.append(anActor);
               }
             }
index 2a01d48af31035cc2b0307426d395a9209458265..31c93d812c2ba14ef6e70401da11fd772a2af942 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_GroupDlg.h
 // Author : Natalia KOPNOVA, Open CASCADE S.A.S.
index 1b4fb4adbc6fa996bad1ea4159e4813c47c1790f..f5b0037098d519bf3d476805d543bd5f046ab5f7 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHGUI : GUI for SMESH component
 // File      : SMESHGUI_GroupOnShapeDlg.cxx
 // Created   : Wed Sep 17 18:36:51 2008
@@ -178,7 +176,7 @@ SMESHGUI_GroupOnShapeOp::SMESHGUI_GroupOnShapeOp()
   : SMESHGUI_SelectionOp(ActorSelection),
     myDlg( 0 )
 {
-  myHelpFileName = "creating_groups_page.html";
+  myHelpFileName = "create_groups_from_geometry_page.html";
 }
 
 SMESHGUI_GroupOnShapeOp::~SMESHGUI_GroupOnShapeOp()
index 0009e5996678c5bf757979ad4a01a6cdc76f372b..44fed27490d89caf5a163c777f6c2acc05985e82 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESHGUI : GUI for SMESH component
 //  File   : SMESHGUI_GroupOnShapeDlg.h
 //  Author : Edard AGAPOV
index 13f5f4a9373c2664df31c17878a9d6aeb1ea824b..15d772347a251237b35faec1ce08e409752c1209 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_GroupOpDlg.cxx
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
index fda94dd0101a732c1c2ba1ca7d18b3f5b7e78285..c13c3286bd97e6fcf53db1f25abc89374f4f4700 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_GroupOpDlg.h
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
index 6b4079b198d0fb19d663324b9f9f1394023e0dbf..362892adc69ed5b163e3d75065b9916f26ea982d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_GroupUtils.cxx
 // Author : Open CASCADE S.A.S.
index 0482e78c935a9910172d265dbc46fc1eaf112bce..e1129659264cd1cf9ea3be5b0fff3ffd3229f9b2 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_GroupUtils.h
 // Author : Open CASCADE S.A.S.
index b0ced7bb6d5cae5f867e53b072ccaf0820bf061b..6f7237c9f198592560ae6c4d85eb3f393aee7d1a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_Hypotheses.cxx
 // Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
index 0891def1bc6a8f898d6b891f5970da7edf01419e..34b875fa3814b0e37c345d46928035b698228af9 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_Hypotheses.h
 // Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
index 65a59957905f515f1a70534d10ae0bec265cec4d..e8d9204f8a578548e6d0464679c4700df23a589a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_HypothesesUtils.cxx
 // Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
-
 // SMESH includes
+//
 #include "SMESHGUI_HypothesesUtils.h"
 
 #include "SMESHGUI.h"
index 56a80e43408aa09b21a14338e9557f8646fb1e61..54e36e04b7d6e5dbb80fe17f9ae4a05fadc16f41 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_HypothesesUtils.h
 // Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
-
+//
 #ifndef SMESHGUI_HYPOTHESESUTILS_H
 #define SMESHGUI_HYPOTHESESUTILS_H
 
index 0f1cb30efaa2d91d24028112a38ec599ed9e899f..0aa0237e8c93677f1e6985707bd418185ebbc6c1 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_IdValidator.h
 // Author : Edward AGAPOV, Open CASCADE S.A.S.
index 5c6f73c33f2ac0a30a820b290bd1b846e40fc4e5..fb404641f5b73e881516a6d219ed2bcb3c1056af 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2009  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_Make2DFrom3DOp.cxx
 // Author : Open CASCADE S.A.S.
 // SMESH includes
index adc0aa5e00d9b755727a6593cb6068261922ce33..f2ef2d9fd68b30160821b801c7bff7ab8ee0321f 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2009  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_Make2DFrom3D.h
 // Author : Open CASCADE S.A.S.
index ae769c301a1f3751f07da2e509974af69008eaa7..0792b596ce7a93624c356b2ba3a7469a9b4f987b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_MakeNodeAtPointDlg.cxx
 // Author : Edward AGAPOV, Open CASCADE S.A.S.
 // SMESH includes
@@ -147,9 +148,9 @@ QWidget* SMESHGUI_MakeNodeAtPointDlg::createMainFrame (QWidget* theParent)
   QLabel* aZLabel = new QLabel(tr("SMESH_Z"), aCoordGrp);
   myZ = new SMESHGUI_SpinBox(aCoordGrp);
 
-  myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
-  myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
-  myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
+  myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
 
   aCoordGrpLayout->addWidget(myCoordBtn);
   aCoordGrpLayout->addWidget(aXLabel);
index 6df8ba72239fa2b034386f192c8ca0f41c6e47ff..68408d990300b6c567e884d08ce113c078f0e363 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_MakeNodeAtPointDlg.h
 // Author : Edward AGAPOV, Open CASCADE S.A.S.
 //
index a3446f2997310181f4820abfd354d6b942d8e628..9a4eab9d1ac5601bc3784c139e60c93401d3425e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_MeshDlg.cxx
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
index cf6b775c40c2c3162bbed305d54844cb7627761e..c544cb3d03ed8232b736791a7dfd70cfa27aabe0 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_MeshDlg.h
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
index 8bed7191fe0d086a50eceffc8f83ee3b89a40371..8288d9662e95b766f5792fa343c3eb602340d7c5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_MeshEditPreview.cxx
 // Author : Open CASCADE S.A.S.
index 1b5fb3c9a74d198cef885c03dd4dddd6dac5832c..4e425d9817ee1a3563b148e17d3ca877fffcb069 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_MeshEditPreview.h
 // Author : Open CASCADE S.A.S.
index 7554a7959400562b7d2ffcb4d552c640008231ab..3ef8438918083112a8d5016c0686b31c7d7350a8 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_MeshInfosBox.cxx
 // Author : Edward AGAPOV, Open CASCADE S.A.S.
 // SMESH includes
index 394bd7893ba65106840f12b7c1d878bba2d1f1f0..d695b89d43e3f84d6fa0e6b695514bd34aa94637 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_MeshInfosBox.h
 // Author : Edward AGAPOV, Open CASCADE S.A.S.
 //
index fd6d42e5211b0de99039d1615683d28bfa93280e..01ba2225304e6ace80957f50719c4e0c224a1a4e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_MeshInfosDlg.cxx
 // Author : Nicolas BARBEROU
index 64e49822c1670c76deeafba910190e3944cbc10e..48abec62c5e5a6ed14b6bdc68f5a53c26058d05f 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_MeshInfosDlg.h
 // Author : Nicolas BARBEROU
index eaa3098aaf9222075ffac73c2d9909234ee377cb..1739b419c7dcab07e1efe08b281f8210985cec5f 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_MeshOp.cxx
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
-
 // SMESH includes
+//
 #include "SMESHGUI_MeshOp.h"
 
 #include "SMESHGUI.h"
@@ -945,12 +946,19 @@ SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType,
     }
   }
 
-  return SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(),
-                                                                aServerLib.toLatin1().data(),
-                                                                aMeshVar,
-                                                                aGeomVar,
-                                                                /*byMesh = */isSubMesh);
-
+  SMESH::SMESH_Hypothesis_var hyp =
+    SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(),
+                                                           aServerLib.toLatin1().data(),
+                                                           aMeshVar,
+                                                           aGeomVar,
+                                                           /*byMesh = */isSubMesh);
+  if ( hyp->_is_nil() && isSubMesh )
+    hyp = SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(),
+                                                                 aServerLib.toLatin1().data(),
+                                                                 aMeshVar,
+                                                                 aGeomVar,
+                                                                 /*byMesh = */false);
+  return hyp;
 }
 
 //================================================================================
index 93804eb0999beda06a03f3112a6eeb1f309cf219..1d111fdc9d557f844def2f137735bc661b27c3e7 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_MeshOp.h
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
diff --git a/src/SMESHGUI/SMESHGUI_MeshOrderDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshOrderDlg.cxx
new file mode 100644 (file)
index 0000000..83c4f07
--- /dev/null
@@ -0,0 +1,330 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// File   : SMESHGUI_MeshOrderDlg.cxx
+// Author : Pavel TELKOV, Open CASCADE S.A.S.
+// SMESH includes
+//
+#include "SMESHGUI_MeshOrderDlg.h"
+
+// Qt includes
+#include <Qt>
+#include <QFrame>
+#include <QLabel>
+#include <QBoxLayout>
+#include <QSpacerItem>
+#include <QToolButton>
+#include <QListWidget>
+#include <QListWidgetItem>
+
+#define SPACING 6
+#define MARGIN  11
+
+/*! 
+ * Enumeartion of list widget item types (mesh name or separator)
+ */
+enum MeshOrderItemType { MeshItem = QListWidgetItem::UserType, SeparatorItem };
+
+// =========================================================================================
+/*!
+ * \brief Constructor
+ */
+// =========================================================================================
+
+SMESHGUI_MeshOrderBox::SMESHGUI_MeshOrderBox(QWidget* theParent)
+: QGroupBox( theParent ), myIsChanged( false ), myUpBtn(0), myDownBtn(0)
+{
+  QHBoxLayout* hBoxLayout = new QHBoxLayout(this);
+  hBoxLayout->setMargin( MARGIN );
+  hBoxLayout->setSpacing( SPACING );
+  
+  myMeshNames = new QListWidget(this);
+  myMeshNames->setSelectionMode(QAbstractItemView::SingleSelection);
+  myMeshNames->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding ));
+  hBoxLayout->addWidget(myMeshNames);
+  
+  QGroupBox* btnGrp = new QGroupBox(this);
+  hBoxLayout->addWidget(btnGrp);
+
+  myUpBtn   = new QToolButton(btnGrp);
+  myDownBtn = new QToolButton(btnGrp);
+  myUpBtn->  setArrowType( Qt::UpArrow );
+  myDownBtn->setArrowType( Qt::DownArrow );
+  
+  QVBoxLayout* vBoxLayout = new QVBoxLayout(btnGrp);
+  vBoxLayout->addSpacerItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+  vBoxLayout->addWidget( myUpBtn );
+  vBoxLayout->addWidget( myDownBtn );
+  vBoxLayout->addSpacerItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+
+  connect( myUpBtn,   SIGNAL( clicked() ), this, SLOT( onMoveItem() ) );
+  connect( myDownBtn, SIGNAL( clicked() ), this, SLOT( onMoveItem() ) );
+  connect( myMeshNames, SIGNAL( itemSelectionChanged() ), this, SLOT( onSelectionChanged() ) );
+  
+  onSelectionChanged();
+}
+
+// =========================================================================================
+/*!
+ * \brief Destructor
+ */
+//=======================================================================
+
+SMESHGUI_MeshOrderBox::~SMESHGUI_MeshOrderBox()
+{
+}
+
+// =========================================================================================
+/*!
+ * \brief add separator item
+ */
+// =========================================================================================
+
+static void addSeparator( QListWidget* theList )
+{
+  QListWidgetItem* item = new QListWidgetItem( theList, SeparatorItem );
+  QFrame* hline = new QFrame( theList );
+  hline->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+  theList->addItem( item );
+  theList->setItemWidget( item, hline );
+}
+
+// =========================================================================================
+/*!
+ * \brief add sub-mesh item
+ */
+// =========================================================================================
+
+static void addMeshItem( QListWidget* theList,
+                         const QString& theName,
+                         const int      theId )
+{
+  QListWidgetItem* item = new QListWidgetItem( theName, theList, MeshItem );
+  item->setData( Qt::UserRole, theId );
+  theList->addItem( item );
+}
+
+// =========================================================================================
+/*!
+ * \brief Clear submesh names and indeces
+ */
+// =========================================================================================
+
+void SMESHGUI_MeshOrderBox::Clear()
+{
+  myMeshNames->clear();
+  myIsChanged = false;
+}
+
+// =========================================================================================
+/*!
+ * \brief Set submesh names and indeces
+ */
+// =========================================================================================
+
+void SMESHGUI_MeshOrderBox::SetMeshes(const ListListName& theMeshNames,
+                                      const ListListId&   theMeshIds)
+{
+  Clear();
+  ListListName::const_iterator nLIt = theMeshNames.constBegin();
+  ListListId::const_iterator idLIt  = theMeshIds.constBegin();
+  for ( ; nLIt != theMeshNames.constEnd(); ++nLIt, ++idLIt )
+  {
+    const QStringList& names = (*nLIt);
+    const QList<int>& ids = (*idLIt);
+    if ( myMeshNames->count() )
+      addSeparator( myMeshNames );
+    QStringList::const_iterator nameIt = names.constBegin();
+    QList<int>::const_iterator idIt = ids.constBegin();
+    for ( ; nameIt != names.constEnd(); ++nameIt, ++idIt )
+      addMeshItem( myMeshNames, *nameIt, *idIt );
+  }
+}
+
+// =========================================================================================
+/*!
+ * \brief cehck that item exists and not a separator
+ */
+// =========================================================================================
+
+static bool checkItem(QListWidgetItem* theItem)
+{
+  return theItem && (int)theItem->type() != (int)SeparatorItem;
+}
+
+// =========================================================================================
+/*!
+ * \brief Returns result (ordered by user) mesh names
+ */
+// =========================================================================================
+
+ListListId SMESHGUI_MeshOrderBox::GetMeshIds() const
+{
+  ListListId aLLIds;
+  aLLIds.append( QList<int>() );
+  for ( int i = 0, n = myMeshNames->count(); i < n; i++ )
+  {
+    QListWidgetItem* it = myMeshNames->item( i );
+    if (checkItem( it ))
+      aLLIds.last().append( it->data( Qt::UserRole ).toInt() );
+    else // separator before next list of mesh items
+      aLLIds.append( QList<int>() );
+  }
+  return aLLIds;
+}
+
+// =========================================================================================
+/*!
+ * \brief Returns result (ordered by user) mesh indeces
+ */
+// =========================================================================================
+
+ListListName SMESHGUI_MeshOrderBox::GetMeshNames() const
+{
+  ListListName aLLNames;
+  aLLNames.append( QStringList() );
+  for ( int i = 0, n = myMeshNames->count(); i < n; i++ )
+  {
+    QListWidgetItem* it = myMeshNames->item( i );
+    if (checkItem( it ))
+      aLLNames.last().append( it->text() );
+    else // separator before next list of mesh items
+      aLLNames.append( QStringList() );
+  }
+  return aLLNames;
+}
+
+// =========================================================================================
+/*!
+ * \brief update state of arrow buttons according to selection
+ */
+// =========================================================================================
+
+void SMESHGUI_MeshOrderBox::onSelectionChanged()
+{
+  bool isUp = false;
+  bool isDown = false;
+  QList<QListWidgetItem *> items = myMeshNames->selectedItems();
+  if ( !items.isEmpty() )
+  {
+    QListWidgetItem* selItem = (*(items.begin()));
+    if (checkItem(selItem))
+    {
+      const int rowId = myMeshNames->row( selItem );
+      isUp   = checkItem( myMeshNames->item( rowId - 1 ) );
+      isDown = checkItem( myMeshNames->item( rowId + 1 ) );
+    }
+  }
+  myUpBtn->  setEnabled( isUp );
+  myDownBtn->setEnabled( isDown );
+}
+
+// =========================================================================================
+/*!
+ * \brief move item according to clicked arrow button
+ */
+// =========================================================================================
+
+void SMESHGUI_MeshOrderBox::onMoveItem()
+{
+  moveItem( sender() == myUpBtn );
+}
+
+// =========================================================================================
+/*!
+ * \brief move mesh in order up or down
+ */
+// =========================================================================================
+
+void SMESHGUI_MeshOrderBox::moveItem(const bool theIsUp)
+{
+  // move selected list item up or down
+  QList<QListWidgetItem *> items = myMeshNames->selectedItems();
+  if ( items.isEmpty() )
+    return;
+  QListWidgetItem * selItem = (*(items.begin()));
+  if (!checkItem(selItem))
+    return;
+  int rowId = myMeshNames->row( selItem );
+  if ( rowId == -1 )
+    return;
+
+  // move item in list widget
+  myIsChanged = true;
+  myMeshNames->takeItem( rowId );
+  myMeshNames->insertItem(theIsUp ? rowId-1 : rowId+1, selItem );
+
+  // restore selection and current status
+  selItem->setSelected( true );
+  myMeshNames->setCurrentItem( selItem );
+}
+
+// =========================================================================================
+/*!
+ * \brief returns status is order changed by user
+ */
+// =========================================================================================
+
+bool SMESHGUI_MeshOrderBox:: IsOrderChanged() const
+{
+  return myIsChanged;
+}
+
+// =========================================================================================
+/*!
+ * \brief Constructor
+ */
+// =========================================================================================
+
+SMESHGUI_MeshOrderDlg::SMESHGUI_MeshOrderDlg(QWidget* theParent)
+: SMESHGUI_Dialog( theParent, false, false, OK | Cancel | Help )
+{
+  setWindowTitle( tr( "SMESH_MESHORDER_TITLE") );
+  QFrame* main = mainFrame();
+
+  QVBoxLayout* aDlgLay = new QVBoxLayout (main);
+  aDlgLay->setMargin( 0 );
+  aDlgLay->setSpacing( SPACING );
+
+  myBox = new SMESHGUI_MeshOrderBox( main );
+
+  aDlgLay->addWidget(myBox);
+  aDlgLay->setStretchFactor(main, 1);
+}
+
+// =========================================================================================
+/*!
+ * \brief Destructor
+ */
+// =========================================================================================
+
+SMESHGUI_MeshOrderDlg::~SMESHGUI_MeshOrderDlg()
+{
+}
+
+// =========================================================================================
+/*!
+ * \brief return Box widget to show mesh order
+ */
+// =========================================================================================
+
+SMESHGUI_MeshOrderBox* SMESHGUI_MeshOrderDlg::GetMeshOrderBox() const
+{
+  return myBox;
+}
diff --git a/src/SMESHGUI/SMESHGUI_MeshOrderDlg.h b/src/SMESHGUI/SMESHGUI_MeshOrderDlg.h
new file mode 100644 (file)
index 0000000..7279839
--- /dev/null
@@ -0,0 +1,112 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// File   : SMESHGUI_MeshOrderDlg.h
+// Author : Pavel TELKOV, Open CASCADE S.A.S.
+//
+#ifndef SMESHGUI_MeshOrderDlg_H
+#define SMESHGUI_MeshOrderDlg_H
+
+// SMESH includes
+#include "SMESH_SMESHGUI.hxx"
+#include "SMESHGUI_Dialog.h"
+
+// Qt includes
+#include <QGroupBox>
+
+// IDL includes
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SMESH_Mesh)
+
+class QToolButton;
+class QListWidget;
+
+typedef QList<QStringList> ListListName;
+typedef QList<int>         ListId;
+typedef QList<ListId>  ListListId;
+
+/*!
+ * \brief Reusable widget that shows and allows modify meshing order
+ */
+
+class SMESHGUI_EXPORT SMESHGUI_MeshOrderBox : public QGroupBox
+{
+  Q_OBJECT
+    
+ public:
+  /*! Public methods */
+  SMESHGUI_MeshOrderBox( QWidget* );
+  ~SMESHGUI_MeshOrderBox();
+
+  //! Clear mesh box
+  void         Clear();
+
+  //! Set mesh (submesh) names and indeces
+  void         SetMeshes(const ListListName& theMeshNames,
+                         const ListListId&   theMeshIds);
+
+  //! returns status is order changed by user
+  bool         IsOrderChanged() const;
+
+  //! Returns result (ordered by user) mesh names
+  ListListId   GetMeshIds() const;
+  //! Returns result (ordered by user) mesh indeces
+  ListListName GetMeshNames() const;
+ private slots:
+  /*! Private slots */
+  //! update state of arrow buttons according to selection
+  void         onSelectionChanged();
+  //! move item according to clicked arrow button
+  void         onMoveItem();
+
+ private:
+  /*! Privatemethods */
+  //! move mesh in order up or down
+  void         moveItem(const bool theIsUp);
+
+ private:
+  /*! Private fields */
+  bool         myIsChanged;
+  QToolButton* myUpBtn;
+  QToolButton* myDownBtn;
+  QListWidget* myMeshNames;
+};
+
+/*!
+ * \brief Dialog contains mesh order box for modification operation
+ */
+
+class SMESHGUI_EXPORT SMESHGUI_MeshOrderDlg : public SMESHGUI_Dialog
+{
+  Q_OBJECT
+    
+ public:
+  /*! Public methods */
+  SMESHGUI_MeshOrderDlg( QWidget* );
+  ~SMESHGUI_MeshOrderDlg();
+
+  SMESHGUI_MeshOrderBox* GetMeshOrderBox() const;
+
+ private:
+  /*! Private fields */
+  SMESHGUI_MeshOrderBox* myBox;
+};
+
+#endif // SMESHGUI_MeshOrderDlg_H
diff --git a/src/SMESHGUI/SMESHGUI_MeshOrderOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOrderOp.cxx
new file mode 100644 (file)
index 0000000..494d4ea
--- /dev/null
@@ -0,0 +1,322 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// File   : SMESHGUI_MeshOrderOp.cxx
+// Author : Pavel TELKOV, Open CASCADE S.A.S.
+//
+#include "SMESHGUI_MeshOrderOp.h"
+
+#include "SMESHGUI.h"
+#include "SMESHGUI_Utils.h"
+#include "SMESHGUI_MeshUtils.h"
+
+// SALOME GUI includes
+#include <LightApp_SelectionMgr.h>
+#include <SALOME_ListIO.hxx>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_OverrideCursor.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_Desktop.h>
+
+// SALOME KERNEL includes
+#include <SALOMEDS_SObject.hxx>
+#include <SALOMEDSClient_SObject.hxx>
+
+// STL includes
+#include <set>
+
+//================================================================================
+/*!
+ * \brief Constructor
+*/
+//================================================================================
+
+SMESHGUI_MeshOrderOp::SMESHGUI_MeshOrderOp()
+  : SMESHGUI_Operation(), myDlg(0), myMgr(0)
+{
+  myDlg = new SMESHGUI_MeshOrderDlg( desktop() );
+  
+  myHelpFileName = "constructing_meshes_page.html#mesh_order_anchor";
+}
+
+//================================================================================
+/*!
+ * \brief Destructor
+*/
+//================================================================================
+
+SMESHGUI_MeshOrderOp::~SMESHGUI_MeshOrderOp()
+{
+}
+
+//================================================================================
+/*!
+ * \brief Return operation dialog
+ */
+//================================================================================
+
+LightApp_Dialog* SMESHGUI_MeshOrderOp::dlg() const
+{
+  return myDlg;
+}
+
+//================================================================================
+/*!
+ * \brief perform it's intention action: compute 2D mesh on 3D
+ */
+//================================================================================
+
+void SMESHGUI_MeshOrderOp::startOperation()
+{
+  SMESHGUI_Operation::startOperation();
+  if (myMgr)
+    myDlg->show();
+}
+
+//================================================================================
+/*!
+ * \brief Init dialog and mesh order box
+ */
+//================================================================================
+
+void SMESHGUI_MeshOrderOp::initDialog()
+{
+  if (!myDlg )
+    return;
+  
+  SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_nil();
+  // check selection
+  LightApp_SelectionMgr *Sel = selectionMgr();
+  SALOME_ListIO selected; Sel->selectedObjects( selected );
+
+  if (selected.Extent() == 1)
+    aMesh = SMESH::GetMeshByIO(selected.First());
+  if (aMesh->_is_nil()) {
+    SUIT_MessageBox::warning(desktop(),
+                             tr("SMESH_WRN_WARNING"),
+                             tr("SMESH_WRN_NO_AVAILABLE_DATA"));
+    onCancel();
+    return;
+  }
+
+  myMgr = new SMESHGUI_MeshOrderMgr( myDlg->GetMeshOrderBox() );
+  myMgr->SetMesh( aMesh );
+  if ( !myMgr->GetMeshOrder() ) {
+    SUIT_MessageBox::information(desktop(),
+                             tr("SMESH_INFORMATION"),
+                             tr("SMESH_NO_CONCURENT_MESH"));
+    
+    onCancel();
+    return;
+  }
+}
+
+//================================================================================
+/*!
+ * \brief Apply changes
+ */
+//================================================================================
+
+bool SMESHGUI_MeshOrderOp::onApply()
+{
+  SUIT_OverrideCursor aWaitCursor;
+  bool res = myMgr ? myMgr->SetMeshOrder() : false;
+
+  delete myMgr;
+  myMgr = 0;
+
+  return res;
+}
+
+//================================================================================
+/*!
+ * \brief Apply changes
+ */
+//================================================================================
+
+void SMESHGUI_MeshOrderOp::onCancel()
+{
+  delete myMgr;
+  myMgr = 0;
+
+  abort();
+}
+
+//================================================================================
+/*!
+ * \brief Constructor
+*/
+//================================================================================
+
+SMESHGUI_MeshOrderMgr::SMESHGUI_MeshOrderMgr( SMESHGUI_MeshOrderBox* theBox )
+: myBox( theBox )
+{
+  myMesh = SMESH::SMESH_Mesh::_nil();
+}
+
+//================================================================================
+/*!
+ * \brief Destructor
+*/
+//================================================================================
+
+SMESHGUI_MeshOrderMgr::~SMESHGUI_MeshOrderMgr()
+{
+}
+
+//================================================================================
+/*!
+ * \brief Set root mesh object
+ */
+//================================================================================
+
+void SMESHGUI_MeshOrderMgr::SetMesh(SMESH::SMESH_Mesh_var& theMesh)
+{
+  myMesh = SMESH::SMESH_Mesh::_duplicate(theMesh);
+  _PTR(SObject) aMeshSObj = SMESH::FindSObject(theMesh);
+  if ( myBox && aMeshSObj )
+    myBox->setTitle( aMeshSObj->GetName().c_str() );
+}  
+
+//================================================================================
+/*!
+ * \brief Check for concurents between submesh objects
+ */
+//================================================================================
+
+bool SMESHGUI_MeshOrderMgr::GetMeshOrder()
+{
+  ListListId   idListList;
+  return GetMeshOrder(idListList);
+}
+
+//================================================================================
+/*!
+ * \brief Check for concurents between submesh objects
+ */
+//================================================================================
+
+bool SMESHGUI_MeshOrderMgr::GetMeshOrder(ListListId& theIdListList)
+{
+  if (!myBox || myMesh->_is_nil())
+    return false;
+  myBox->Clear();
+  SMESH::submesh_array_array_var meshOrder = myMesh->GetMeshOrder();
+  if ( !meshOrder.operator->() || !meshOrder->length() )
+    return false;
+  ListListName nameListList;
+  for ( int i = 0, n = meshOrder->length(); i < n; i++ )
+  {
+    QList<int> idList;
+    QStringList nameList;
+    const SMESH::submesh_array& aSMArray = meshOrder[i];
+    for ( int j = 0, jn = aSMArray.length(); j < jn; j++ )
+    {
+      const SMESH::SMESH_subMesh_var subMesh = aSMArray[j];
+      
+      _PTR(SObject) aSubMeshSObj = SMESH::FindSObject(subMesh);
+      if ( !aSubMeshSObj )
+        continue;
+
+      idList.append(subMesh->GetId() );
+      nameList.append( QString(aSubMeshSObj->GetName().c_str()) );
+    }
+    theIdListList.append(idList);
+    nameListList.append(nameList);
+  }
+  myBox->SetMeshes(nameListList, theIdListList);
+  return !theIdListList.isEmpty();
+}
+
+//================================================================================
+/*!
+ * \brief Returns status is order changed by user
+ */
+//================================================================================
+
+bool SMESHGUI_MeshOrderMgr::IsOrderChanged() const
+{
+  return myBox && myBox->IsOrderChanged();
+}
+
+//================================================================================
+/*!
+ * \brief Store submesh priority order
+ */
+//================================================================================
+
+bool SMESHGUI_MeshOrderMgr::SetMeshOrder()
+{
+  return myBox ? SetMeshOrder(myBox->GetMeshIds()) : false;
+}
+
+//================================================================================
+/*!
+ * \brief Store submesh priority order
+ */
+//================================================================================
+
+bool SMESHGUI_MeshOrderMgr::SetMeshOrder( const  ListListId& theListListIds )
+{
+  if (theListListIds.isEmpty() || myMesh->_is_nil())
+    return false;
+
+  _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+  _PTR(SObject) aMeshSObj = SMESH::FindSObject(myMesh);
+  if ( !aStudy || !aMeshSObj )
+    return false;
+
+  std::map<int, SMESH::SMESH_subMesh_var> mapOfSubMesh;
+  for (int i = SMESH::Tag_FirstSubMesh; i <= SMESH::Tag_LastSubMesh; i++) {
+    _PTR(SObject) aSubmeshRoot;
+    if ( !aMeshSObj->FindSubObject( i, aSubmeshRoot ) )
+      continue;
+    _PTR(ChildIterator) smIter = aStudy->NewChildIterator( aSubmeshRoot );
+    for ( ; smIter->More(); smIter->Next() ) {
+      _PTR(SObject) aSmObj = smIter->Value();
+      SMESH::SMESH_subMesh_var sm =
+        SMESH::SObjectToInterface<SMESH::SMESH_subMesh>( aSmObj );
+      mapOfSubMesh[ sm->GetId() ] = SMESH::SMESH_subMesh::_duplicate(sm);
+    }
+  }
+
+  // is it enought to set modifid attribute on root mesh objects only?
+  //  it is seems that modifaction flag will be set on child submeshes 
+  //  automatically  (see SMESH::ModifiedMesh for details)
+  SMESH::ModifiedMesh( aMeshSObj, false, false );
+
+  SMESH::submesh_array_array_var meshOrder = new SMESH::submesh_array_array();
+  meshOrder->length(theListListIds.count() );
+  ListListId::const_iterator it = theListListIds.constBegin();
+  for ( int i = 0; it != theListListIds.constEnd(); ++it ) {
+    const QList<int>& ids = *it;
+    SMESH::submesh_array_var subMeshList = new SMESH::submesh_array();
+    subMeshList->length( ids.count() );
+    QList<int>::const_iterator subIt = ids.constBegin();
+    for( int j = 0; subIt != ids.constEnd(); ++subIt )
+      if ( mapOfSubMesh.find( *subIt ) != mapOfSubMesh.end() )
+        subMeshList[ j++ ] = mapOfSubMesh[ *subIt ];
+
+    meshOrder[ i++ ] = subMeshList;
+  }
+  // update object browser
+  SMESHGUI::GetSMESHGUI()->updateObjBrowser( true, 0 );
+
+  return myMesh->SetMeshOrder(meshOrder);
+}
diff --git a/src/SMESHGUI/SMESHGUI_MeshOrderOp.h b/src/SMESHGUI/SMESHGUI_MeshOrderOp.h
new file mode 100644 (file)
index 0000000..81abc8c
--- /dev/null
@@ -0,0 +1,93 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// File   : SMESHGUI_MeshOrderOp.h
+// Author : Pavel TELKOV, Open CASCADE S.A.S.
+//
+#ifndef SMESHGUI_MeshOrderOp_H
+#define SMESHGUI_MeshOrderOp_H
+
+
+// SMESH includes
+#include "SMESH_SMESHGUI.hxx"
+
+#include "SMESHGUI_Operation.h"
+#include "SMESHGUI_MeshOrderDlg.h"
+
+// IDL includes
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SMESH_Gen)
+#include CORBA_SERVER_HEADER(SMESH_Mesh)
+
+/*!
+ * \brief Operator to check and modify mesh computation submesh priority (order)
+ */
+class SMESHGUI_EXPORT SMESHGUI_MeshOrderMgr
+{
+public:
+  SMESHGUI_MeshOrderMgr( SMESHGUI_MeshOrderBox* );
+  virtual ~SMESHGUI_MeshOrderMgr();
+  //! Set root mesh object
+  void                   SetMesh( SMESH::SMESH_Mesh_var& theMesh );
+  //! Check for concurents between submesh objects
+  bool                   GetMeshOrder();
+  //! Check for concurents between submesh objects
+  bool                   GetMeshOrder( ListListId& theIds );
+  //! Store submesh priority order
+  bool                   SetMeshOrder();
+  //! Store given submesh priority order
+  bool                   SetMeshOrder( const  ListListId& theIds );
+
+  //! Returns status is order changed by user
+  bool                   IsOrderChanged() const;
+
+private:
+  SMESH::SMESH_Mesh_var  myMesh;
+  SMESHGUI_MeshOrderBox* myBox;
+};
+
+/*!
+ * \brief Operator to check and modify mesh computation submesh priority (order)
+ */
+class SMESHGUI_EXPORT SMESHGUI_MeshOrderOp: public SMESHGUI_Operation
+{
+  Q_OBJECT
+
+public:
+  SMESHGUI_MeshOrderOp();
+  virtual ~SMESHGUI_MeshOrderOp();
+
+protected:
+  virtual LightApp_Dialog* dlg() const;
+
+  virtual void           startOperation();
+
+  //! sets the dialog widgets to state just after operation start
+  virtual void           initDialog();
+
+ protected slots:
+  virtual bool           onApply();
+  virtual void           onCancel();
+
+ private:
+  SMESHGUI_MeshOrderDlg* myDlg;
+  SMESHGUI_MeshOrderMgr* myMgr;
+};
+
+#endif // SMESHGUI_MeshOrderOp_H
index d80523066d8100e775a643ed78675e88baefd75c..f08d017d962f7ddf012873216011feccb03a7823 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_MeshPatternDlg.cxx
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
index e3e2d6870b910b1b30b68e3d8391d93d3f2b83a2..4caeee78e2e8921573ead2d5b59dc30cb847f4d6 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_MeshPatternDlg.h
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
 //
index df71815c2e28213ac94f9d69205bb3f594bb809b..0763be3ed52c27879096d76939e1e2eddde899af 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_MeshUtils.cxx
 // Author : Open CASCADE S.A.S.
index 0544d4306b0619c3be61735007258a371efee241..5edffe9f31512874dc84aeadffd24db5909f5656 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_MeshUtils.h
 // Author : Open CASCADE S.A.S.
index 6243255afc44a7b7a51c87d35e5b30785cae6869..f4c26bb9f985467371bd2de1a0b0704ceba4ea74 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_MoveNodesDlg.cxx
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
@@ -210,9 +211,9 @@ QWidget* SMESHGUI_MoveNodesDlg::createMainFrame (QWidget* theParent)
   aCoordGrpLayout->addWidget(myZ);
 
   //------------------------------------------------------------
-  myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, DBL_DIGITS_DISPLAY);
-  myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, DBL_DIGITS_DISPLAY);
-  myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, DBL_DIGITS_DISPLAY);
+  myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, "length_precision");
+  myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, "length_precision");
+  myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, "length_precision");
 
   //------------------------------------------------------------
   QVBoxLayout* aLay = new QVBoxLayout(aFrame);
index cfd43786fe5cf30f62b6bc9c2cec3e5b2c2f10a4..3a066e62eb368c9e0a0c2185f9de9f1c90a739e9 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_MoveNodesDlg.h
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
index 907f8a65b86b43439488e7d909061f8a03a20c72..98b047400a782cf2e4dce932b08004e5558aeba7 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_MultiEditDlg.cxx
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
 // SMESH includes
 #include <SMDS_Mesh.hxx>
 
 // SALOME GUI includes
-#include <SUIT_ResourceMgr.h>
 #include <SUIT_Desktop.h>
-#include <SUIT_Session.h>
 #include <SUIT_MessageBox.h>
+#include <SUIT_OverrideCursor.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
 
 #include <LightApp_SelectionMgr.h>
 #include <LightApp_Application.h>
 #include <SALOME_ListIO.hxx>
 #include <SALOME_ListIteratorOfListIO.hxx>
+#include <SalomeApp_Tools.h>
 
 #include <SVTK_Selector.h>
 #include <SVTK_ViewWindow.h>
@@ -301,7 +304,7 @@ QWidget* SMESHGUI_MultiEditDlg::createButtonFrame (QWidget* theParent)
 bool SMESHGUI_MultiEditDlg::isValid (const bool /*theMess*/)
 {
   return (!myMesh->_is_nil() &&
-          (myListBox->count() > 0 || (myToAllChk->isChecked() && myActor)));
+          (myListBox->count() > 0 || (myToAllChk->isChecked()/* && myActor*/)));
 }
 
 //=======================================================================
@@ -423,49 +426,51 @@ void SMESHGUI_MultiEditDlg::onOk()
 
 //=======================================================================
 // name    : SMESHGUI_MultiEditDlg::getIds
-// Purpose : Retrive identifiers from list box
+// Purpose : Retrive identifiers from list box or the whole object
 //=======================================================================
-SMESH::long_array_var SMESHGUI_MultiEditDlg::getIds()
+
+SMESH::long_array_var SMESHGUI_MultiEditDlg::getIds(SMESH::SMESH_IDSource_var& obj)
 {
   SMESH::long_array_var anIds = new SMESH::long_array;
 
   if (myToAllChk->isChecked())
   {
     myIds.Clear();
-    SMESH_Actor * anActor = SMESH::FindActorByObject(myMesh);
-    if (!anActor)
-      anActor = myActor;
-    if (anActor != 0)
-    {
-      // skl 07.02.2006
-      SMDS_Mesh* aMesh = myActor->GetObject()->GetMesh();
-      if( myFilterType == SMESH::TriaFilter || 
-          myFilterType == SMESH::QuadFilter ||
-          myFilterType == SMESH::FaceFilter ) {
-        SMDS_FaceIteratorPtr it = aMesh->facesIterator();
-        while(it->more()) {
-          const SMDS_MeshFace* f = it->next();
-          if(myFilterType == SMESH::FaceFilter) {
-            myIds.Add(f->GetID());
-          }
-          else if( myFilterType==SMESH::TriaFilter &&
-                   ( f->NbNodes()==3 || f->NbNodes()==6 ) ) {
-            myIds.Add(f->GetID());
-          }
-          else if( myFilterType==SMESH::QuadFilter &&
-                   ( f->NbNodes()==4 || f->NbNodes()==8 ) ) {
-            myIds.Add(f->GetID());
-          }
-        }
-      }
-      else if(myFilterType == SMESH::VolumeFilter) {
-        SMDS_VolumeIteratorPtr it = aMesh->volumesIterator();
-        while(it->more()) {
-          const SMDS_MeshVolume* f = it->next();
-          myIds.Add(f->GetID());
-        }
-      }
-      /* commented by skl 07.02.2006
+    obj = SMESH::SMESH_IDSource::_narrow( myMesh );
+//     SMESH_Actor * anActor = SMESH::FindActorByObject(myMesh);
+//     if (!anActor)
+//       anActor = myActor;
+//     if (anActor != 0)
+//     {
+//       // skl 07.02.2006
+//       SMDS_Mesh* aMesh = myActor->GetObject()->GetMesh();
+//       if( myFilterType == SMESH::TriaFilter || 
+//           myFilterType == SMESH::QuadFilter ||
+//           myFilterType == SMESH::FaceFilter ) {
+//         SMDS_FaceIteratorPtr it = aMesh->facesIterator();
+//         while(it->more()) {
+//           const SMDS_MeshFace* f = it->next();
+//           if(myFilterType == SMESH::FaceFilter) {
+//             myIds.Add(f->GetID());
+//           }
+//           else if( myFilterType==SMESH::TriaFilter &&
+//                    ( f->NbNodes()==3 || f->NbNodes()==6 ) ) {
+//             myIds.Add(f->GetID());
+//           }
+//           else if( myFilterType==SMESH::QuadFilter &&
+//                    ( f->NbNodes()==4 || f->NbNodes()==8 ) ) {
+//             myIds.Add(f->GetID());
+//           }
+//         }
+//       }
+//       else if(myFilterType == SMESH::VolumeFilter) {
+//         SMDS_VolumeIteratorPtr it = aMesh->volumesIterator();
+//         while(it->more()) {
+//           const SMDS_MeshVolume* f = it->next();
+//           myIds.Add(f->GetID());
+//         }
+//       }
+      /* commented by skl 07.02.2006 - to work with quadratic elements
       TVisualObjPtr aVisualObj = anActor->GetObject();
       vtkUnstructuredGrid* aGrid = aVisualObj->GetUnstructuredGrid();
       if (aGrid != 0) {
@@ -490,7 +495,7 @@ SMESH::long_array_var SMESHGUI_MultiEditDlg::getIds()
         }
       }
       */
-    }
+    //}
   }
 
   anIds->length(myIds.Extent());
@@ -1034,9 +1039,12 @@ bool SMESHGUI_MultiEditDlg::onApply()
 
   myBusy = true;
 
-  SMESH::long_array_var anIds = getIds();
+  SUIT_OverrideCursor aWaitCursor;
+
+  SMESH::SMESH_IDSource_var obj;
+  SMESH::long_array_var anIds = getIds(obj);
 
-  bool aResult = process(aMeshEditor, anIds.inout());
+  bool aResult = process(aMeshEditor, anIds.inout(), obj);
   if (aResult) {
     if (myActor) {
       SALOME_ListIO sel;
@@ -1124,9 +1132,13 @@ SMESHGUI_ChangeOrientationDlg::~SMESHGUI_ChangeOrientationDlg()
 }
 
 bool SMESHGUI_ChangeOrientationDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
-                                             const SMESH::long_array&    theIds)
+                                             const SMESH::long_array&    theIds,
+                                             SMESH::SMESH_IDSource_ptr   obj)
 {
-  return theEditor->Reorient(theIds);
+  if ( CORBA::is_nil( obj ))
+    return theEditor->Reorient(theIds);
+  else
+    return theEditor->ReorientObject( obj );
 }
 
 /*!
@@ -1152,7 +1164,7 @@ SMESHGUI_UnionOfTrianglesDlg
 
   QLabel* aLab = new QLabel (tr("MAXIMUM_ANGLE"), aMaxAngleGrp);
   myMaxAngleSpin = new SMESHGUI_SpinBox (aMaxAngleGrp);
-  myMaxAngleSpin->RangeStepAndValidator(0, 180.0, 1.0, 3);
+  myMaxAngleSpin->RangeStepAndValidator(0, 180.0, 1.0, "angle_precision");
   myMaxAngleSpin->SetValue(30.0);
 
   aMaxAngleGrpLayout->addWidget(aLab);
@@ -1190,11 +1202,16 @@ bool SMESHGUI_UnionOfTrianglesDlg::isValid (const bool theMess)
 }
 
 bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
-                                            const SMESH::long_array&    theIds)
+                                            const SMESH::long_array&    theIds,
+                                            SMESH::SMESH_IDSource_ptr   obj)
 {
   SMESH::NumericalFunctor_var aCriterion = getNumericalFunctor();
   double aMaxAngle = myMaxAngleSpin->GetValue() * PI / 180.0;
-  bool ok = theEditor->TriToQuad(theIds, aCriterion, aMaxAngle);
+  bool ok;
+  if ( CORBA::is_nil( obj ))
+    ok = theEditor->TriToQuad(theIds, aCriterion, aMaxAngle);
+  else
+    ok = theEditor->TriToQuadObject(obj, aCriterion, aMaxAngle);
   if( ok ) {
     QStringList aParameters;
     aParameters << myMaxAngleSpin->text();
@@ -1243,19 +1260,21 @@ void SMESHGUI_CuttingOfQuadsDlg::onClose()
 }
 
 bool SMESHGUI_CuttingOfQuadsDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
-                                          const SMESH::long_array&    theIds)
+                                          const SMESH::long_array&    theIds,
+                                          SMESH::SMESH_IDSource_ptr   obj)
 {
+  bool hasObj = (! CORBA::is_nil( obj ));
   switch (myGroupChoice->checkedId()) {
   case 0: // use diagonal 1-3
-    return theEditor->SplitQuad(theIds, true);
+    return hasObj ? theEditor->SplitQuadObject(obj, true) : theEditor->SplitQuad(theIds, true);
   case 1: // use diagonal 2-4
-    return theEditor->SplitQuad(theIds, false);
+    return hasObj ? theEditor->SplitQuadObject(obj, false) : theEditor->SplitQuad(theIds, false);
   default: // use numeric functor
     break;
   }
 
-  SMESH::NumericalFunctor_var aCriterion = getNumericalFunctor();
-  return theEditor->QuadToTri(theIds, aCriterion);
+  SMESH::NumericalFunctor_var aCrit = getNumericalFunctor();
+  return hasObj ? theEditor->QuadToTriObject(obj, aCrit) : theEditor->QuadToTri(theIds, aCrit);
 }
 
 void SMESHGUI_CuttingOfQuadsDlg::onCriterionRB()
@@ -1295,8 +1314,9 @@ void SMESHGUI_CuttingOfQuadsDlg::displayPreview()
     erasePreview();
 
   // get Ids of elements
-  SMESH::long_array_var anElemIds = getIds();
-  if (getIds()->length() == 0)
+  SMESH::SMESH_IDSource_var obj;
+  SMESH::long_array_var anElemIds = getIds(obj);
+  if (anElemIds->length() == 0 && obj->_is_nil() )
     return;
 
   SMDS_Mesh* aMesh = myActor->GetObject()->GetMesh();
@@ -1449,3 +1469,55 @@ void SMESHGUI_CuttingOfQuadsDlg::displayPreview()
   aCellTypesArray->Delete();
   aCellLocationsArray->Delete();
 }
+
+/*!
+ *  Class       : SMESHGUI_CuttingIntoTetraDlg
+ *  Description : Modification of orientation of faces
+ */
+
+SMESHGUI_CuttingIntoTetraDlg::SMESHGUI_CuttingIntoTetraDlg(SMESHGUI* theModule)
+  : SMESHGUI_MultiEditDlg(theModule, SMESH::VolumeFilter, false)
+{
+  setWindowTitle(tr("CAPTION"));
+  myHelpFileName = "split_to_tetra_page.html";
+  myEntityType = SMESH::VolumeFilter;
+
+  myToAllChk->setChecked( true ); //aplly to the whole mesh by default
+
+  bool hasHexa = true;//myMesh->_is_nil() ? false : myMesh->NbHexas();
+
+  if ( hasHexa )
+  {
+    myGroupChoice->button(2)->hide();
+    myGroupChoice->button(0)->setText( tr("SPLIT_HEX_TO_5_TETRA"));
+    myGroupChoice->button(1)->setText( tr("SPLIT_HEX_TO_6_TETRA"));
+
+    myCriterionGrp->setTitle( tr("SPLIT_METHOD"));
+    myCriterionGrp->show();
+    myComboBoxFunctor->hide();
+    myChoiceWidget->show();
+  }
+  setSelectionMode();
+  updateButtons();
+}
+
+SMESHGUI_CuttingIntoTetraDlg::~SMESHGUI_CuttingIntoTetraDlg()
+{
+}
+
+bool SMESHGUI_CuttingIntoTetraDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
+                                            const SMESH::long_array&    theIds,
+                                            SMESH::SMESH_IDSource_ptr   theObj)
+{
+  SMESH::SMESH_IDSource_var obj = theObj;
+  if ( CORBA::is_nil( obj ))
+    obj = theEditor->MakeIDSource( theIds );
+  try {
+    theEditor->SplitVolumesIntoTetra( obj, myGroupChoice->checkedId()+1 );
+  }
+  catch ( const SALOME::SALOME_Exception& S_ex ) {
+    SalomeApp_Tools::QtCatchCorbaException( S_ex );
+    return false;
+  }
+  return true;
+}
index f1499681442c854118c3833abfdd9caabe86c506..f0ef825c703c353e95551cf2d88f47768ac6bcd0 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_MultiEditDlg.h
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
 //
@@ -108,12 +109,13 @@ protected:
   QWidget*                  createButtonFrame( QWidget* );
   QWidget*                  createMainFrame( QWidget*, const bool );
   virtual bool              isValid( const bool );
-  SMESH::long_array_var     getIds();
+  SMESH::long_array_var     getIds(SMESH::SMESH_IDSource_var& obj);
   void                      updateButtons();
   void                      setSelectionMode();
   virtual bool              isIdValid( const int ) const;
   virtual bool              process( SMESH::SMESH_MeshEditor_ptr, 
-                                     const SMESH::long_array& ) = 0;
+                                     const SMESH::long_array& ,
+                                     SMESH::SMESH_IDSource_ptr obj) = 0;
   int                       entityType();
 
 protected:
@@ -174,7 +176,9 @@ public:
   virtual ~SMESHGUI_ChangeOrientationDlg();
 
 protected:
-  virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
+  virtual bool process( SMESH::SMESH_MeshEditor_ptr,
+                        const SMESH::long_array& ,
+                        SMESH::SMESH_IDSource_ptr obj);
 };
 
 /*!
@@ -191,7 +195,9 @@ public:
 
 protected:
   virtual bool      isValid( const bool );
-  virtual bool      process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
+  virtual bool      process( SMESH::SMESH_MeshEditor_ptr,
+                             const SMESH::long_array&,
+                             SMESH::SMESH_IDSource_ptr obj );
 
 private:
   SMESHGUI_SpinBox* myMaxAngleSpin;
@@ -210,7 +216,9 @@ public:
   virtual ~SMESHGUI_CuttingOfQuadsDlg();
 
 protected:
-  virtual bool  process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
+  virtual bool  process( SMESH::SMESH_MeshEditor_ptr,
+                         const SMESH::long_array& ,
+                         SMESH::SMESH_IDSource_ptr obj);
 
 protected slots:
   virtual void  onClose();
@@ -226,4 +234,22 @@ private:
   QCheckBox*    myPreviewChk;
 };
 
+/*!
+ * Class       : SMESHGUI_CuttingIntoTetraDlg
+ * Description : Split all volumes into tetrahedrons
+ */
+class  SMESHGUI_CuttingIntoTetraDlg : public SMESHGUI_MultiEditDlg
+{
+  Q_OBJECT
+
+public:
+  SMESHGUI_CuttingIntoTetraDlg( SMESHGUI* );
+  virtual ~SMESHGUI_CuttingIntoTetraDlg();
+
+protected:
+  virtual bool process( SMESH::SMESH_MeshEditor_ptr,
+                        const SMESH::long_array&,
+                        SMESH::SMESH_IDSource_ptr obj );
+};
+
 #endif // SMESHGUI_MULTIEDITDLG_H
index 76b75dbb9139c5a924b33baa70166ffe2724a853..d12100ca293ee4ca3fae5eb09301f784b73b7956 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_NodesDlg.cxx
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
@@ -31,6 +32,7 @@
 #include "SMESHGUI_Utils.h"
 #include "SMESHGUI_VTKUtils.h"
 #include "SMESHGUI_MeshUtils.h"
+#include "SMESHGUI_GroupUtils.h"
 
 #include <SMESH_Actor.h>
 #include <SMESH_ActorUtils.h>
@@ -49,6 +51,8 @@
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 
+#include <SalomeApp_Application.h>
+
 #include <SVTK_ViewWindow.h>
 #include <VTKViewer_Algorithm.h>
 #include <VTKViewer_CellLocationsArray.h>
@@ -70,6 +74,7 @@
 #include <vtkPoints.h>
 
 // Qt includes
+#include <QComboBox>
 #include <QGroupBox>
 #include <QLabel>
 #include <QPushButton>
 
 namespace SMESH
 {
-  void AddNode( SMESH::SMESH_Mesh_ptr theMesh, float x, float y, float z, const QStringList& theParameters )
+  long AddNode( SMESH::SMESH_Mesh_ptr theMesh, float x, float y, float z, const QStringList& theParameters )
   {
+    long aNodeId = -1;
     SUIT_OverrideCursor wc;
     try {
       _PTR(SObject) aSobj = SMESH::FindSObject( theMesh );
       SMESH::SMESH_MeshEditor_var aMeshEditor = theMesh->GetMeshEditor();
-      aMeshEditor->AddNode( x, y, z );
+      aNodeId = aMeshEditor->AddNode( x, y, z );
       theMesh->SetParameters( theParameters.join(":").toLatin1().constData() );
       _PTR(Study) aStudy = GetActiveStudyDocument();
       CORBA::Long anId = aStudy->StudyId();
@@ -111,6 +117,7 @@ namespace SMESH
     catch ( ... ) {
       INFOS( "Unknown exception was cought !!!" );
     }
+    return aNodeId;
   }
 
   class TNodeSimulation 
@@ -277,6 +284,21 @@ SMESHGUI_NodesDlg::SMESHGUI_NodesDlg( SMESHGUI* theModule ):
   GroupCoordinatesLayout->addWidget( TextLabel_Z );
   GroupCoordinatesLayout->addWidget( SpinBox_Z );
 
+
+  /***************************************************************/
+  GroupGroups = new QGroupBox( tr( "SMESH_ADD_TO_GROUP" ), this );
+  GroupGroups->setCheckable( true );
+  QHBoxLayout* GroupGroupsLayout = new QHBoxLayout(GroupGroups);
+  GroupGroupsLayout->setSpacing(SPACING);
+  GroupGroupsLayout->setMargin(MARGIN);
+
+  TextLabel_GroupName = new QLabel( tr( "SMESH_GROUP" ), GroupGroups );
+  ComboBox_GroupName = new QComboBox( GroupGroups );
+  ComboBox_GroupName->setEditable( true );
+
+  GroupGroupsLayout->addWidget( TextLabel_GroupName );
+  GroupGroupsLayout->addWidget( ComboBox_GroupName, 1 );
+
   /***************************************************************/
   GroupButtons = new QGroupBox( this );
   QHBoxLayout* GroupButtonsLayout = new QHBoxLayout( GroupButtons );
@@ -303,6 +325,7 @@ SMESHGUI_NodesDlg::SMESHGUI_NodesDlg( SMESHGUI* theModule ):
   /***************************************************************/
   SMESHGUI_NodesDlgLayout->addWidget( GroupConstructors );
   SMESHGUI_NodesDlgLayout->addWidget( GroupCoordinates );
+  SMESHGUI_NodesDlgLayout->addWidget( GroupGroups );
   SMESHGUI_NodesDlgLayout->addWidget( GroupButtons );
 
   myHelpFileName = "adding_nodes_and_elements_page.html#adding_nodes_anchor";
@@ -330,13 +353,16 @@ void SMESHGUI_NodesDlg::Init()
   double step = 25.0;
 
   /* min, max, step and decimals for spin boxes */
-  SpinBox_X->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY );
-  SpinBox_Y->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY );
-  SpinBox_Z->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY );
+  SpinBox_X->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, "length_precision" );
+  SpinBox_Y->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, "length_precision" );
+  SpinBox_Z->RangeStepAndValidator( COORD_MIN, COORD_MAX, step, "length_precision" );
   SpinBox_X->SetValue( 0.0 );
   SpinBox_Y->SetValue( 0.0 );
   SpinBox_Z->SetValue( 0.0 );
 
+  /* reset "Add to group" control */
+  GroupGroups->setChecked( false );
+
   mySMESHGUI->SetActiveDialogBox( this );
 
   /* signals and slots connections */
@@ -415,10 +441,67 @@ bool SMESHGUI_NodesDlg::ClickOnApply()
   aParameters << SpinBox_Y->text();
   aParameters << SpinBox_Z->text();
 
+  bool addToGroup = GroupGroups->isChecked();
+  QString aGroupName;
+
+  SMESH::SMESH_GroupBase_var aGroup;
+  int idx = 0;
+  if( addToGroup ) {
+    aGroupName = ComboBox_GroupName->currentText();
+    for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
+      QString aName = ComboBox_GroupName->itemText( i );
+      if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
+       idx = i;
+    }
+    if ( idx > 0 ) {
+      SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
+      if ( !aGeomGroup->_is_nil() ) {
+       int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
+                                            tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
+                                            tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
+       if ( res == 1 ) return false;
+      }
+      aGroup = myGroups[idx-1];
+    }
+  }
+      
   mySimulation->SetVisibility( false );
-  SMESH::AddNode( myMesh, x, y, z, aParameters );
+
+  long aNodeId = SMESH::AddNode( myMesh, x, y, z, aParameters );
+
   SMESH::SetPointRepresentation( true );
 
+  if ( aNodeId != -1 && addToGroup && !aGroupName.isEmpty() ) {
+    SMESH::SMESH_Group_var aGroupUsed;
+    if ( aGroup->_is_nil() ){
+      // create new group 
+      aGroupUsed = SMESH::AddGroup( myMesh, SMESH::NODE, aGroupName );
+      if ( !aGroupUsed->_is_nil() ) {
+       myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
+       ComboBox_GroupName->addItem( aGroupName );
+      }
+    }
+    else {
+      SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
+      if ( !aGeomGroup->_is_nil() ) {
+       aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
+       if ( !aGroupUsed->_is_nil() && idx > 0 ) {
+         myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
+         SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
+       }
+      }
+      else
+       aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
+    }
+
+    if ( !aGroupUsed->_is_nil() ) {
+      SMESH::long_array_var anIdList = new SMESH::long_array;
+      anIdList->length( 1 );
+      anIdList[0] = aNodeId;
+      aGroupUsed->Add( anIdList.inout() );
+    }
+  }
+
   // select myMesh
   SALOME_ListIO aList;
   mySelectionMgr->selectedObjects( aList );
@@ -500,10 +583,13 @@ void SMESHGUI_NodesDlg::SelectionIntoArgument()
   mySimulation->SetVisibility( false );
   SMESH::SetPointRepresentation( true );
 
+  QString aCurrentEntry = myEntry;
+
   const SALOME_ListIO& aList = mySelector->StoredIObjects();
   if ( aList.Extent() == 1 ) {
     Handle(SALOME_InteractiveObject) anIO = aList.First();
     if ( anIO->hasEntry() ) {
+      myEntry = anIO->getEntry();
       myMesh = SMESH::GetMeshByIO( anIO );
       if ( myMesh->_is_nil() ) return;
       QString aText;
@@ -523,6 +609,24 @@ void SMESHGUI_NodesDlg::SelectionIntoArgument()
                                  SpinBox_Z->GetValue() );
     }
   }
+
+  // process groups
+  if ( !myMesh->_is_nil() && myEntry != aCurrentEntry ) {
+    myGroups.clear();
+    ComboBox_GroupName->clear();
+    ComboBox_GroupName->addItem( QString() );
+    SMESH::ListOfGroups aListOfGroups = *myMesh->GetGroups();
+    for( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
+      SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
+      if ( !aGroup->_is_nil() && aGroup->GetType() == SMESH::NODE ) {
+       QString aGroupName( aGroup->GetName() );
+       if ( !aGroupName.isEmpty() ) {
+         myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
+         ComboBox_GroupName->addItem( aGroupName );
+        }
+      }
+    }
+  }
 }
 
 //=================================================================================
@@ -623,5 +727,10 @@ bool SMESHGUI_NodesDlg::isValid()
     SUIT_MessageBox::critical( this, tr( "SMESH_ERROR" ), str );
     return false;
   }
+
+  if( GroupGroups->isChecked() && ComboBox_GroupName->currentText().isEmpty() ) {
+    SUIT_MessageBox::warning( this, tr( "SMESH_WRN_WARNING" ), tr( "GROUP_NAME_IS_EMPTY" ) );
+    return false;
+  }
   return true;
 }
index 8fc28eacca9349099a15787cd6a460b3d6d09174..0c3c8274b1ad7785c18693f2a686983a675613df 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_NodesDlg.h
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
@@ -36,6 +37,7 @@
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SMESH_Mesh)
 
+class QComboBox;
 class QGroupBox;
 class QLabel;
 class QPushButton;
@@ -64,12 +66,16 @@ public:
   ~SMESHGUI_NodesDlg();
 
 private:
+  typedef QList<SMESH::SMESH_GroupBase_var> GrpList;
+  
   LightApp_SelectionMgr*  mySelectionMgr;
   SVTK_Selector*          mySelector;
   SMESHGUI*               mySMESHGUI;
   
   SMESH::SMESH_Mesh_var   myMesh;
   SMESH::TNodeSimulation* mySimulation;
+  QString                 myEntry;
+  GrpList                 myGroups;
 
   void                    Init();
   void                    enterEvent( QEvent* );
@@ -78,7 +84,7 @@ private:
   void                    keyPressEvent( QKeyEvent* );
   
   bool                    isValid();
-  
+
   QGroupBox*              GroupConstructors;
   QRadioButton*           Constructor1;
   QGroupBox*              GroupCoordinates;
@@ -90,6 +96,10 @@ private:
   QLabel*                 TextLabel_Y;
   QLabel*                 TextLabel_Z;
 
+  QGroupBox*              GroupGroups;
+  QLabel*                 TextLabel_GroupName;
+  QComboBox*              ComboBox_GroupName;
+
   QGroupBox*              GroupButtons;
   QPushButton*            buttonApply;
   QPushButton*            buttonOk;
index 863d4333af775bba0d34daa2f727751853746344..5ed8957ebd9372c9e38aa47a61a207d4c8ba8583 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMDS : implementaion of Salome mesh data structure
 // File   : SMESHGUI_Operation.cxx
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
index b3b119e7168f43438c2165c0f9e0a01921579916..3f5e4eec51fb46c3ad50e6cb16feb07dc26fe80b 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMDS : implementaion of Salome mesh data structure
 // File   : SMESHGUI_Operation.h
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
index d6ea44b2e62676b1c6815a5995d1b58fb0d787ff..3dd6570ddfe377e8087b30dc9a0e3097a4e4aca8 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_PatternUtils.cxx
 // Author : Open CASCADE S.A.S.
index cd5fd704024ee1fba4d88d62c666d760567c9d90..ad9e6b150d5a506da859b3b45efe47ca74303994 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_PatternUtils.h
 // Author : Open CASCADE S.A.S.
index 608a6e3a0efa3a7b325c7068ee195712fb66dfff..b0856c7ae81919c49fe3499ec8ac44086b1361f6 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_PatternWidget.cxx
 // Author : Michael ZORIN, Open CASCADE S.A.S.
index fb2547811eb54b16536f68993576d306933c85a7..c307a443c818b2637512f8fc870c43469b81b74a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_PatternWidget.h
 // Author : Michael ZORIN, Open CASCADE S.A.S.
index f8ed909ae6d49faf6ed288514874929219d87fca..85311c6b70492fef6f1ae5b7e6689c16260e7cde 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_Preferences_ColorDlg.cxx
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
 #include "SMESHGUI_Preferences_ColorDlg.h"
 
 #include "SMESHGUI.h"
+#include "SMESHGUI_SpinBox.h"
 #include "SMESHGUI_Utils.h"
 
 // SALOME GUI includes
 #include <SUIT_Desktop.h>
 #include <QtxColorButton.h>
-#include <QtxIntSpinBox.h>
+#include <VTKViewer_MarkerWidget.h>
+#include <SalomeApp_IntSpinBox.h>
 
 // Qt includes
 #include <QGroupBox>
@@ -41,7 +44,7 @@
 #include <QVBoxLayout>
 #include <QHBoxLayout>
 #include <QGridLayout>
-#include <QSpinBox>
+#include <QCheckBox>
 
 #define SPACING 6
 #define MARGIN  11
@@ -81,51 +84,94 @@ SMESHGUI_Preferences_ColorDlg::SMESHGUI_Preferences_ColorDlg( SMESHGUI* theModul
   QLabel* TextLabel_Outine = new QLabel( tr( "Outline" ), ButtonGroup1 );
   btnOutlineColor = new QtxColorButton( ButtonGroup1 );
 
+  QLabel* TextLabel_0DElements_Color = new QLabel( tr( "0D elements" ), ButtonGroup1 );
+  btn0DElementsColor = new QtxColorButton( ButtonGroup1 );
+
+  QLabel* TextLabel_0DElements_Size = new QLabel( tr( "Size of 0D elements" ), ButtonGroup1 );
+  SpinBox_0DElements_Size = new SalomeApp_IntSpinBox( ButtonGroup1 );
+  SpinBox_0DElements_Size->setAcceptNames( false ); // No Notebook variables allowed
+  SpinBox_0DElements_Size->setRange( 1, 10 );
+  SpinBox_0DElements_Size->setSingleStep( 1 );
+  SpinBox_0DElements_Size->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+  SpinBox_0DElements_Size->setButtonSymbols( QSpinBox::PlusMinus );
+
   QLabel* TextLabel_Width = new QLabel( tr( "Width" ), ButtonGroup1 );
-  SpinBox_Width = new QSpinBox( ButtonGroup1 );
+  SpinBox_Width = new SalomeApp_IntSpinBox( ButtonGroup1 );
+  SpinBox_Width->setAcceptNames( false ); // No Notebook variables allowed
   SpinBox_Width->setRange( 0, 5 );
   SpinBox_Width->setSingleStep( 1 );
   SpinBox_Width->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   SpinBox_Width->setButtonSymbols( QSpinBox::PlusMinus );
 
   QLabel* TextLabel_ShrinkCoeff = new QLabel( tr( "Shrink coef." ), ButtonGroup1 );
-  SpinBox_Shrink = new QtxIntSpinBox( ButtonGroup1 );
+  SpinBox_Shrink = new SalomeApp_IntSpinBox( ButtonGroup1 );
+  SpinBox_Shrink->setAcceptNames( false ); // No Notebook variables allowed
   SpinBox_Shrink->setRange( 20, 100 );
   SpinBox_Shrink->setSingleStep( 1 );
   SpinBox_Shrink->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   SpinBox_Shrink->setButtonSymbols( QSpinBox::PlusMinus );
 
-  ButtonGroup1Layout->addWidget( TextLabel_Fill,        0, 0 );
-  ButtonGroup1Layout->addWidget( btnFillColor,          0, 1 );
-  ButtonGroup1Layout->addWidget( TextLabel_BackFace,    0, 2 );
-  ButtonGroup1Layout->addWidget( btnBackFaceColor,      0, 3 );
-  ButtonGroup1Layout->addWidget( TextLabel_Outine,      1, 0 );
-  ButtonGroup1Layout->addWidget( btnOutlineColor,       1, 1 );
-  ButtonGroup1Layout->addWidget( TextLabel_Width,       1, 2 );
-  ButtonGroup1Layout->addWidget( SpinBox_Width,         1, 3 );
-  ButtonGroup1Layout->addWidget( TextLabel_ShrinkCoeff, 2, 0 );
-  ButtonGroup1Layout->addWidget( SpinBox_Shrink,        2, 1, 1, 3 );
+  ButtonGroup1Layout->addWidget( TextLabel_Fill,             0, 0 );
+  ButtonGroup1Layout->addWidget( btnFillColor,               0, 1 );
+  ButtonGroup1Layout->addWidget( TextLabel_BackFace,         0, 2 );
+  ButtonGroup1Layout->addWidget( btnBackFaceColor,           0, 3 );
+  ButtonGroup1Layout->addWidget( TextLabel_Outine,           1, 0 );
+  ButtonGroup1Layout->addWidget( btnOutlineColor,            1, 1 );
+  ButtonGroup1Layout->addWidget( TextLabel_0DElements_Color, 1, 2 );
+  ButtonGroup1Layout->addWidget( btn0DElementsColor,         1, 3 );
+  ButtonGroup1Layout->addWidget( TextLabel_0DElements_Size,  2, 0 );
+  ButtonGroup1Layout->addWidget( SpinBox_0DElements_Size,    2, 1 );
+  ButtonGroup1Layout->addWidget( TextLabel_Width,            3, 0 );
+  ButtonGroup1Layout->addWidget( SpinBox_Width,              3, 1 );
+  ButtonGroup1Layout->addWidget( TextLabel_ShrinkCoeff,      3, 2 );
+  ButtonGroup1Layout->addWidget( SpinBox_Shrink,             3, 3 );
 
   // -------------------------------
   QGroupBox* ButtonGroup2 = new QGroupBox( tr( "Nodes" ), this );
-  QHBoxLayout* ButtonGroup2Layout = new QHBoxLayout( ButtonGroup2 );
+  QGridLayout* ButtonGroup2Layout = new QGridLayout( ButtonGroup2 );
   ButtonGroup2Layout->setSpacing( SPACING );
   ButtonGroup2Layout->setMargin( MARGIN );
 
   QLabel* TextLabel_Nodes_Color = new QLabel( tr( "Color" ), ButtonGroup2 );
   btnNodeColor = new QtxColorButton( ButtonGroup2 );
 
-  QLabel* TextLabel_Nodes_Size = new QLabel( tr( "Size" ), ButtonGroup2 );
-  SpinBox_Nodes_Size = new QSpinBox( ButtonGroup2 );
-  SpinBox_Nodes_Size->setRange( 0, 5 );
-  SpinBox_Nodes_Size->setSingleStep( 1 );
-  SpinBox_Nodes_Size->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  SpinBox_Nodes_Size->setButtonSymbols( QSpinBox::PlusMinus );
+  QGroupBox* MarkerGroup = new QGroupBox( tr( "Marker" ), ButtonGroup2 );
+  QVBoxLayout* MarkerGroupLayout = new QVBoxLayout( MarkerGroup );
+  MarkerGroupLayout->setSpacing( 0 );
+  MarkerGroupLayout->setMargin( 0 );
+
+  MarkerWidget = new VTKViewer_MarkerWidget( MarkerGroup );
+
+  MarkerGroupLayout->addWidget( MarkerWidget );
+
+  ButtonGroup2Layout->addWidget( TextLabel_Nodes_Color, 0, 0 );
+  ButtonGroup2Layout->addWidget( btnNodeColor,          0, 1 );
+  ButtonGroup2Layout->addWidget( MarkerGroup,           1, 0, 1, 3 );
+  ButtonGroup2Layout->setColumnStretch( 2, 1 );
 
-  ButtonGroup2Layout->addWidget( TextLabel_Nodes_Color );
-  ButtonGroup2Layout->addWidget( btnNodeColor );
-  ButtonGroup2Layout->addWidget( TextLabel_Nodes_Size );
-  ButtonGroup2Layout->addWidget( SpinBox_Nodes_Size );
+  // -------------------------------
+  QGroupBox* ButtonGroup3 = new QGroupBox( tr( "Orientation of faces" ), this );
+  QGridLayout* ButtonGroup3Layout = new QGridLayout( ButtonGroup3 );
+  ButtonGroup3Layout->setSpacing( SPACING );
+  ButtonGroup3Layout->setMargin( MARGIN );
+
+  QLabel* TextLabel_Orientation_Color = new QLabel( tr( "Color" ), ButtonGroup3 );
+  btnOrientationColor = new QtxColorButton( ButtonGroup3 );
+
+  QLabel* TextLabel_Orientation_Scale = new QLabel( tr( "Scale" ), ButtonGroup3 );
+  SpinBox_Orientation_Scale = new SMESHGUI_SpinBox( ButtonGroup3 );
+  SpinBox_Orientation_Scale->setAcceptNames( false ); // No Notebook variables allowed
+  SpinBox_Orientation_Scale->RangeStepAndValidator( .05, .5, .05, "parametric_precision" );
+  SpinBox_Orientation_Scale->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+  SpinBox_Orientation_Scale->setButtonSymbols( QSpinBox::PlusMinus );
+
+  CheckBox_Orientation_3DVectors = new QCheckBox( tr( "3D vectors" ), ButtonGroup3 );
+
+  ButtonGroup3Layout->addWidget( TextLabel_Orientation_Color,    0, 0 );
+  ButtonGroup3Layout->addWidget( btnOrientationColor,            0, 1 );
+  ButtonGroup3Layout->addWidget( TextLabel_Orientation_Scale,    0, 2 );
+  ButtonGroup3Layout->addWidget( SpinBox_Orientation_Scale,      0, 3 );
+  ButtonGroup3Layout->addWidget( CheckBox_Orientation_3DVectors, 1, 0, 1, 4 );
 
   // -------------------------------
   QGroupBox* GroupButtons = new QGroupBox( this );
@@ -148,6 +194,7 @@ SMESHGUI_Preferences_ColorDlg::SMESHGUI_Preferences_ColorDlg( SMESHGUI* theModul
   // -------------------------------
   topLayout->addWidget( ButtonGroup1 );
   topLayout->addWidget( ButtonGroup2 );
+  topLayout->addWidget( ButtonGroup3 );
   topLayout->addWidget( GroupButtons );
 
   // -------------------------------
@@ -226,10 +273,12 @@ void SMESHGUI_Preferences_ColorDlg::ActivateThisDialog()
 void SMESHGUI_Preferences_ColorDlg::SetColor( int type, const QColor& color )
 {
   switch ( type ) {
-  case 1 : btnFillColor->setColor( color );     break; // fill
-  case 2 : btnOutlineColor->setColor( color );  break; // outline
-  case 3 : btnNodeColor->setColor( color );     break; // node
-  case 4 : btnBackFaceColor->setColor( color ); break; // back face
+  case 1 : btnFillColor->setColor( color );        break; // fill
+  case 2 : btnOutlineColor->setColor( color );     break; // outline
+  case 3 : btnNodeColor->setColor( color );        break; // node
+  case 4 : btnBackFaceColor->setColor( color );    break; // back face
+  case 5 : btn0DElementsColor->setColor( color );  break; // 0d elements
+  case 6 : btnOrientationColor->setColor( color ); break; // orientation of faces
   default: break;
   }
 }
@@ -242,10 +291,12 @@ QColor SMESHGUI_Preferences_ColorDlg::GetColor( int type )
 {
   QColor color;
   switch ( type ) {
-  case 1 : color = btnFillColor->color();     break; // fill
-  case 2 : color = btnOutlineColor->color();  break; // outline
-  case 3 : color = btnNodeColor->color();     break; // node
-  case 4 : color = btnBackFaceColor->color(); break; // back face
+  case 1 : color = btnFillColor->color();        break; // fill
+  case 2 : color = btnOutlineColor->color();     break; // outline
+  case 3 : color = btnNodeColor->color();        break; // node
+  case 4 : color = btnBackFaceColor->color();    break; // back face
+  case 5 : color = btn0DElementsColor->color();  break; // 0d elements
+  case 6 : color = btnOrientationColor->color(); break; // orientation of faces
   default: break;
   }
   return color;
@@ -258,9 +309,9 @@ QColor SMESHGUI_Preferences_ColorDlg::GetColor( int type )
 void SMESHGUI_Preferences_ColorDlg::SetIntValue( int type, int value )
 {
   switch ( type ) {
-  case 1 : SpinBox_Width->setValue( value );      break; // width
-  case 2 : SpinBox_Nodes_Size->setValue( value ); break; // nodes size = value; break;
-  case 3 : SpinBox_Shrink->setValue( value );     break; // shrink coeff
+  case 1 : SpinBox_Width->setValue( value );           break; // width
+  case 2 : SpinBox_Shrink->setValue( value );          break; // shrink coeff
+  case 3 : SpinBox_0DElements_Size->setValue( value ); break; // 0d elements
   default: break;
   }
 }
@@ -273,10 +324,126 @@ int SMESHGUI_Preferences_ColorDlg::GetIntValue( int type )
 {
   int res = 0;
   switch ( type ) {
-  case 1 : res = SpinBox_Width->value();      break; // width
-  case 2 : res = SpinBox_Nodes_Size->value(); break; // nodes size
-  case 3 : res = SpinBox_Shrink->value();     break; // shrink coeff
+  case 1 : res = SpinBox_Width->value();           break; // width
+  case 2 : res = SpinBox_Shrink->value();          break; // shrink coeff
+  case 3 : res = SpinBox_0DElements_Size->value(); break; // 0d elements
+  default: break;
+  }
+  return res;
+}
+
+//=================================================================================
+// function : SetDoubleValue()
+// purpose  :
+//=================================================================================
+void SMESHGUI_Preferences_ColorDlg::SetDoubleValue( int type, double value )
+{
+  switch ( type ) {
+  case 1 : SpinBox_Orientation_Scale->setValue( value ); break; // orientation scale
+  default: break;
+  }
+}
+
+//=================================================================================
+// function : GetDoubleValue()
+// purpose  :
+//=================================================================================
+double SMESHGUI_Preferences_ColorDlg::GetDoubleValue( int type )
+{
+  double res = 0;
+  switch ( type ) {
+  case 1 : res = SpinBox_Orientation_Scale->value(); break; // orientation scale
   default: break;
   }
   return res;
 }
+
+//=================================================================================
+// function : SetBooleanValue()
+// purpose  :
+//=================================================================================
+void SMESHGUI_Preferences_ColorDlg::SetBooleanValue( int type, bool value )
+{
+  switch ( type ) {
+  case 1 : CheckBox_Orientation_3DVectors->setChecked( value ); break; // 3D vectors
+  default: break;
+  }
+}
+
+//=================================================================================
+// function : GetBooleanValue()
+// purpose  :
+//=================================================================================
+bool SMESHGUI_Preferences_ColorDlg::GetBooleanValue( int type )
+{
+  bool res = false;
+  switch ( type ) {
+  case 1 : res = CheckBox_Orientation_3DVectors->isChecked(); break; // 3D vectors
+  default: break;
+  }
+  return res;
+}
+
+//=================================================================================
+// function : setCustomMarkerMap()
+// purpose  :
+//=================================================================================
+void SMESHGUI_Preferences_ColorDlg::setCustomMarkerMap( VTK::MarkerMap theMarkerMap )
+{
+  MarkerWidget->setCustomMarkerMap( theMarkerMap );
+}
+
+//=================================================================================
+// function : getCustomMarkerMap()
+// purpose  :
+//=================================================================================
+VTK::MarkerMap SMESHGUI_Preferences_ColorDlg::getCustomMarkerMap()
+{
+  return MarkerWidget->getCustomMarkerMap();
+}
+
+//=================================================================================
+// function : setStandardMarker()
+// purpose  :
+//=================================================================================
+void SMESHGUI_Preferences_ColorDlg::setStandardMarker( VTK::MarkerType theMarkerType,
+                                                       VTK::MarkerScale theMarkerScale )
+{
+  MarkerWidget->setStandardMarker( theMarkerType, theMarkerScale );
+}
+
+//=================================================================================
+// function : setCustomMarker()
+// purpose  :
+//=================================================================================
+void SMESHGUI_Preferences_ColorDlg::setCustomMarker( int theId )
+{
+  MarkerWidget->setCustomMarker( theId );
+}
+
+//=================================================================================
+// function : getMarkerType()
+// purpose  :
+//=================================================================================
+VTK::MarkerType SMESHGUI_Preferences_ColorDlg::getMarkerType() const
+{
+  return MarkerWidget->getMarkerType();
+}
+
+//=================================================================================
+// function : getStandardMarkerScale()
+// purpose  :
+//=================================================================================
+VTK::MarkerScale SMESHGUI_Preferences_ColorDlg::getStandardMarkerScale() const
+{
+  return MarkerWidget->getStandardMarkerScale();
+}
+
+//=================================================================================
+// function : getCustomMarkerID()
+// purpose  :
+//=================================================================================
+int SMESHGUI_Preferences_ColorDlg::getCustomMarkerID() const
+{
+  return MarkerWidget->getCustomMarkerID();
+}
index f3f43f94dd72255e392648fb1adcad3795f73b31..dc26a938483fb75f1b571e427bb3247430af798a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_Preferences_ColorDlg.h
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
 // SMESH includes
 #include "SMESH_SMESHGUI.hxx"
 
+// SALOME GUI includes
+#include <VTKViewer_MarkerDef.h>
+
 // Qt includes
 #include <QDialog>
 
-class QSpinBox;
+class QCheckBox;
 class SMESHGUI;
-class QtxIntSpinBox;
+class SMESHGUI_SpinBox;
+class SalomeApp_IntSpinBox;
 class QtxColorButton;
+class VTKViewer_MarkerWidget;
 
 class SMESHGUI_EXPORT SMESHGUI_Preferences_ColorDlg : public QDialog
 { 
@@ -49,6 +55,19 @@ public:
   QColor                GetColor( int );
   void                  SetIntValue( int, int );
   int                   GetIntValue( int );
+  void                  SetDoubleValue( int, double );
+  double                GetDoubleValue( int );
+  void                  SetBooleanValue( int, bool );
+  bool                  GetBooleanValue( int );
+
+  void                  setCustomMarkerMap( VTK::MarkerMap );
+  VTK::MarkerMap        getCustomMarkerMap();
+
+  void                  setStandardMarker( VTK::MarkerType, VTK::MarkerScale );
+  void                  setCustomMarker( int );
+  VTK::MarkerType       getMarkerType() const;
+  VTK::MarkerScale      getStandardMarkerScale() const;
+  int                   getCustomMarkerID() const;
 
 protected:
   void                  closeEvent( QCloseEvent* );
@@ -65,10 +84,15 @@ private:
   QtxColorButton*       btnFillColor;
   QtxColorButton*       btnBackFaceColor;
   QtxColorButton*       btnOutlineColor;
-  QSpinBox*             SpinBox_Width;
-  QtxIntSpinBox*        SpinBox_Shrink;
+  QtxColorButton*       btn0DElementsColor;
+  SalomeApp_IntSpinBox* SpinBox_0DElements_Size;
+  SalomeApp_IntSpinBox* SpinBox_Width;
+  SalomeApp_IntSpinBox* SpinBox_Shrink;
   QtxColorButton*       btnNodeColor;
-  QSpinBox*             SpinBox_Nodes_Size;
+  VTKViewer_MarkerWidget* MarkerWidget;
+  QtxColorButton*       btnOrientationColor;
+  SMESHGUI_SpinBox*     SpinBox_Orientation_Scale;
+  QCheckBox*            CheckBox_Orientation_3DVectors;
 };
 
 #endif // SMESHGUI_PREFERENCES_COLORDLG_H
index 175677f536e81e467a2852b50c968e9367987664..ec3a4d14f0fcd1ec219e17335c558e63a432918a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_Preferences_ScalarBarDlg.cxx
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
@@ -27,6 +28,7 @@
 #include "SMESHGUI_Preferences_ScalarBarDlg.h"
 
 #include "SMESHGUI.h"
+#include "SMESHGUI_SpinBox.h"
 #include "SMESHGUI_VTKUtils.h"
 #include "SMESHGUI_Utils.h"
 
@@ -41,8 +43,8 @@
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 #include <SALOME_ListIO.hxx>
+#include <SalomeApp_IntSpinBox.h>
 
-#include <QtxDoubleSpinBox.h>
 #include <QtxColorButton.h>
 
 // Qt includes
@@ -54,7 +56,6 @@
 #include <QLineEdit>
 #include <QPushButton>
 #include <QRadioButton>
-#include <QSpinBox>
 #include <QHBoxLayout>
 #include <QVBoxLayout>
 #include <QGridLayout>
@@ -199,13 +200,15 @@ SMESHGUI_Preferences_ScalarBarDlg::SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI*
   QHBoxLayout* myLabColorGrpLayout = new QHBoxLayout( myLabColorGrp );
   myLabColorGrpLayout->setSpacing( SPACING_SIZE ); myLabColorGrpLayout->setMargin( MARGIN_SIZE );
 
-  myColorsSpin = new QSpinBox( myLabColorGrp );
+  myColorsSpin = new SalomeApp_IntSpinBox( myLabColorGrp );
+  myColorsSpin->setAcceptNames( false ); // No Notebook variables allowed
   myColorsSpin->setRange( 2, 256 );
   myColorsSpin->setSingleStep( 1 );
   myColorsSpin->setMinimumWidth( MINIMUM_WIDTH );
   myColorsSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
-  myLabelsSpin = new QSpinBox( myLabColorGrp );
+  myLabelsSpin = new SalomeApp_IntSpinBox( myLabColorGrp );
+  myLabelsSpin->setAcceptNames( false ); // No Notebook variables allowed
   myLabelsSpin->setRange( 2, 65 );
   myLabelsSpin->setSingleStep( 1 );
   myLabelsSpin->setMinimumWidth( MINIMUM_WIDTH );
@@ -242,19 +245,27 @@ SMESHGUI_Preferences_ScalarBarDlg::SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI*
   QGridLayout* myOriginDimGrpLayout = new QGridLayout( myOriginDimGrp );
   myOriginDimGrpLayout->setSpacing( SPACING_SIZE ); myOriginDimGrpLayout->setMargin( MARGIN_SIZE );
 
-  myXSpin = new QtxDoubleSpinBox (0.0, 1.0, 0.1, myOriginDimGrp);
+  myXSpin = new SMESHGUI_SpinBox(myOriginDimGrp);
+  myXSpin->setAcceptNames( false );
+  myXSpin->RangeStepAndValidator( 0.0, 1.0, 0.1, "parametric_precision" );
   myXSpin->setMinimumWidth( MINIMUM_WIDTH );
   myXSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
-  myYSpin = new QtxDoubleSpinBox(0.0, 1.0, 0.1, myOriginDimGrp);
+  myYSpin = new SMESHGUI_SpinBox(myOriginDimGrp);
+  myYSpin->setAcceptNames( false );
+  myYSpin->RangeStepAndValidator( 0.0, 1.0, 0.1, "parametric_precision" );  
   myYSpin->setMinimumWidth( MINIMUM_WIDTH );
   myYSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
-  myWidthSpin = new QtxDoubleSpinBox(0.0, 1.0, 0.1, myOriginDimGrp);
+  myWidthSpin = new SMESHGUI_SpinBox(myOriginDimGrp);
+  myWidthSpin->setAcceptNames( false );
+  myWidthSpin->RangeStepAndValidator( 0.0, 1.0, 0.1, "parametric_precision" );    
   myWidthSpin->setMinimumWidth( MINIMUM_WIDTH );
   myWidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
-  myHeightSpin = new QtxDoubleSpinBox(0.0, 1.0, 0.1, myOriginDimGrp);
+  myHeightSpin = new SMESHGUI_SpinBox(myOriginDimGrp);
+  myHeightSpin->setAcceptNames( false );
+  myHeightSpin->RangeStepAndValidator( 0.0, 1.0, 0.1, "parametric_precision" );    
   myHeightSpin->setMinimumWidth( MINIMUM_WIDTH );
   myHeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
index cc41262020870dceaf32ddcbea92377521d6fe36..c71c43cda4d14dc0896306547a58948e8b48b372 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_Preferences_ScalarBarDlg.h
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
@@ -39,11 +40,11 @@ class QLineEdit;
 class QPushButton;
 class QToolButton;
 class QRadioButton;
-class QSpinBox;
 
 class SMESHGUI;
 class SMESH_Actor;
-class QtxDoubleSpinBox;
+class SMESHGUI_SpinBox;
+class SalomeApp_IntSpinBox;
 class QtxColorButton;
 class LightApp_SelectionMgr;
 
@@ -103,18 +104,18 @@ private:
   QCheckBox*               myLabelsShadowCheck;
   
   QGroupBox*               myLabColorGrp;
-  QSpinBox*                myColorsSpin;
-  QSpinBox*                myLabelsSpin;
+  SalomeApp_IntSpinBox*    myColorsSpin;
+  SalomeApp_IntSpinBox*    myLabelsSpin;
 
   QGroupBox*               myOrientationGrp;
   QRadioButton*            myVertRadioBtn;
   QRadioButton*            myHorizRadioBtn;
 
   QGroupBox*               myOriginDimGrp;
-  QtxDoubleSpinBox*        myXSpin;
-  QtxDoubleSpinBox*        myYSpin;
-  QtxDoubleSpinBox*        myWidthSpin;
-  QtxDoubleSpinBox*        myHeightSpin;
+  SMESHGUI_SpinBox*        myXSpin;
+  SMESHGUI_SpinBox*        myYSpin;
+  SMESHGUI_SpinBox*        myWidthSpin;
+  SMESHGUI_SpinBox*        myHeightSpin;
 
   QGroupBox*               myButtonGrp;
   QPushButton*             myOkBtn;
index 9af8862ef8c4981276ecfb3a5963704e223fabf2..c6ff898f3bc105aa08027bc579a1313804c29c55 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_RemoveElementsDlg.cxx
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
index 7138acfe5f92abed2fe5807ab2ff1b654806ede7..246c78a4746020c9c4121662bceb311d0e22878b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_RemoveElementsDlg.h
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
index e6687ff2946da6b141ed2397f0570859c243e900..fc6c78a30a846a8e898f4e5a681881b3368a900c 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_RemoveNodesDlg.cxx
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
index e26e963d3eab64f7031dd28054532da1d6427391..866757ef50f1e2b8129eca11ad14b85e524f9cfa 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_RemoveNodesDlg.h
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
index 5e575a67000587d335fa670d2d58f6e95575197a..5ebfe50623084aaebec5e1b164da40b157d28d90 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_RenumberingDlg.cxx
 // Author : Michael ZORIN, Open CASCADE S.A.S.
index 95c9d46882c30a68672a809e9e36c75fdd235c6a..d4560db005574373d17873b7c4d0f6baf7751e91 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_RenumberingDlg.h
 // Author : Michael ZORIN, Open CASCADE S.A.S.
index 484989dfd1e4e8c321906ebe5d04139281b39340..f6edc503fbbb4ad0f4b1171878485de2d49fdd41 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_RevolutionDlg.cxx
 // Author : Michael ZORIN, Open CASCADE S.A.S.
@@ -278,20 +279,20 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
   SMESHGUI_RevolutionDlgLayout->addWidget(GroupButtons);
 
   /* Initialisations */
-  SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
+  SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
 
   RadioButton3->setChecked(true);
 
-  SpinBox_Angle->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5.0, 3);
+  SpinBox_Angle->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5.0, "angle_precision");
 
   SpinBox_NbSteps->setRange(1, 999999);
 
-  SpinBox_Tolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, 6);
+  SpinBox_Tolerance->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, "len_tol_precision");
 
   RadioButton1->setChecked(true);
 
@@ -714,7 +715,7 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument()
   SMESH_Actor* anActor = SMESH::FindActorByObject(aMeshVar);
   if (!anActor)
     anActor = SMESH::FindActorByEntry(IO->getEntry());
-  if (!anActor)
+  if (!anActor && !CheckBoxMesh->isChecked())
     return;
 
   int aNbUnits = 0;
index 4d0c5169304e9b3b2bda2df6e85f9c063a219310..44eae2fd39bb4ba96d1f4208e898d5307784ee17 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_RevolutionDlg.h
 // Author : Michael ZORIN, Open CASCADE S.A.S.
index d9352dbc87e1403b4c868bcf5b827023aa70526d..f2855bb7a1c23ebd29209c85bbf747bd13096b4c 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_RotationDlg.cxx
 // Author : Michael ZORIN, Open CASCADE S.A.S.
@@ -254,14 +255,14 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule )
   SMESHGUI_RotationDlgLayout->addWidget(GroupButtons);
 
   /* Initialisations */
-  SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
+  SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
 
-  SpinBox_Angle->RangeStepAndValidator(-360.0, +360.0, 5.0, 3);
+  SpinBox_Angle->RangeStepAndValidator(-360.0, +360.0, 5.0, "angle_precision");
 
   myConstructorId = 0;
   RadioButton1->setChecked(true);
@@ -605,7 +606,7 @@ void SMESHGUI_RotationDlg::SelectionIntoArgument()
   myActor = SMESH::FindActorByObject(myMesh);
   if (!myActor)
     myActor = SMESH::FindActorByEntry(IO->getEntry());
-  if (!myActor)
+  if (!myActor && !CheckBoxMesh->isChecked())
     return;
 
   int aNbUnits = 0;
index bb743746f08a07ef485a5b9d5c9db1976bff2afa..ae74f7cda54b1726882b457c303c4a1e1b1d3f32 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_RotationDlg.h
 // Author : Michael ZORIN, Open CASCADE S.A.S.
diff --git a/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx b/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx
new file mode 100644 (file)
index 0000000..97976bf
--- /dev/null
@@ -0,0 +1,1059 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// SMESH SMESHGUI : GUI for SMESH component
+// File   : SMESHGUI_ScaleDlg.cxx
+// Author : Michael ZORIN, Open CASCADE S.A.S.
+// SMESH includes
+//
+#include "SMESHGUI_ScaleDlg.h"
+
+#include "SMESHGUI.h"
+#include "SMESHGUI_SpinBox.h"
+#include "SMESHGUI_Utils.h"
+#include "SMESHGUI_VTKUtils.h"
+#include "SMESHGUI_MeshUtils.h"
+#include "SMESHGUI_IdValidator.h"
+#include "SMESHGUI_FilterDlg.h"
+
+#include <SMESH_Actor.h>
+#include <SMESH_TypeFilter.hxx>
+#include <SMESH_LogicalFilter.hxx>
+#include <SMDS_Mesh.hxx>
+
+// SALOME GUI includes
+#include <SUIT_Desktop.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_OverrideCursor.h>
+
+#include <LightApp_Application.h>
+#include <LightApp_SelectionMgr.h>
+
+#include <SVTK_ViewModel.h>
+#include <SVTK_ViewWindow.h>
+#include <SALOME_ListIO.hxx>
+
+// SALOME KERNEL includes
+#include <SALOMEDSClient_SObject.hxx>
+
+// OCCT includes
+#include <TColStd_MapOfInteger.hxx>
+
+// Qt includes
+#include <QApplication>
+#include <QButtonGroup>
+#include <QGroupBox>
+#include <QLabel>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QRadioButton>
+#include <QCheckBox>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+#include <QGridLayout>
+#include <QSpinBox>
+#include <QKeyEvent>
+
+// IDL includes
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SMESH_Group)
+#include CORBA_SERVER_HEADER(SMESH_MeshEditor)
+
+enum { MOVE_ELEMS_BUTTON = 0, COPY_ELEMS_BUTTON, MAKE_MESH_BUTTON }; //!< action type
+
+/*!
+  \class BusyLocker
+  \brief Simple 'busy state' flag locker.
+  \internal
+*/
+
+class BusyLocker
+{
+public:
+  //! Constructor. Sets passed boolean flag to \c true.
+  BusyLocker( bool& busy ) : myBusy( busy ) { myBusy = true; }
+  //! Destructor. Clear external boolean flag passed as parameter to the constructor to \c false.
+  ~BusyLocker() { myBusy = false; }
+private:
+  bool& myBusy; //! External 'busy state' boolean flag
+};
+
+#define SPACING 6
+#define MARGIN  11
+
+//=================================================================================
+// class    : SMESHGUI_ScaleDlg()
+// purpose  :
+//=================================================================================
+SMESHGUI_ScaleDlg::SMESHGUI_ScaleDlg( SMESHGUI* theModule )
+  : QDialog( SMESH::GetDesktop( theModule ) ),
+    mySMESHGUI( theModule ),
+    mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
+    myFilterDlg(0),
+    mySelectedObject(SMESH::SMESH_IDSource::_nil())
+{
+  QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_MESH_SCALE")));
+  QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_SCALE_ALONG_AXES")));
+  QPixmap image2 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
+
+  setModal(false);
+  setAttribute(Qt::WA_DeleteOnClose, true);
+  setWindowTitle(tr("SMESH_SCALE_TITLE"));
+  setSizeGripEnabled(true);
+
+  QVBoxLayout* SMESHGUI_ScaleDlgLayout = new QVBoxLayout(this);
+  SMESHGUI_ScaleDlgLayout->setSpacing(SPACING);
+  SMESHGUI_ScaleDlgLayout->setMargin(MARGIN);
+
+  /***************************************************************/
+  ConstructorsBox = new QGroupBox(tr("SMESH_SCALE"), this);
+  GroupConstructors = new QButtonGroup(this);
+  QHBoxLayout* ConstructorsBoxLayout = new QHBoxLayout(ConstructorsBox);
+  ConstructorsBoxLayout->setSpacing(SPACING);
+  ConstructorsBoxLayout->setMargin(MARGIN);
+
+  RadioButton1= new QRadioButton(ConstructorsBox);
+  RadioButton1->setIcon(image0);
+  RadioButton2= new QRadioButton(ConstructorsBox);
+  RadioButton2->setIcon(image1);
+
+  ConstructorsBoxLayout->addWidget(RadioButton1);
+  ConstructorsBoxLayout->addWidget(RadioButton2);
+  GroupConstructors->addButton(RadioButton1, 0);
+  GroupConstructors->addButton(RadioButton2, 1);
+
+  /***************************************************************/
+  GroupArguments = new QGroupBox(tr("SMESH_ARGUMENTS"), this);
+  QGridLayout* GroupArgumentsLayout = new QGridLayout(GroupArguments);
+  GroupArgumentsLayout->setSpacing(SPACING);
+  GroupArgumentsLayout->setMargin(MARGIN);
+
+  myIdValidator = new SMESHGUI_IdValidator(this);
+
+  // Controls for elements selection
+  TextLabelElements = new QLabel(tr("SMESH_ID_ELEMENTS"), GroupArguments);
+  SelectElementsButton = new QPushButton(GroupArguments);
+  SelectElementsButton->setIcon(image2);
+  LineEditElements = new QLineEdit(GroupArguments);
+  LineEditElements->setValidator(myIdValidator);
+  myFilterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), GroupArguments );
+  connect(myFilterBtn,   SIGNAL(clicked()), this, SLOT(setFilters()));
+
+  // Control for the whole mesh selection
+  CheckBoxMesh = new QCheckBox(tr("SMESH_SELECT_WHOLE_MESH"), GroupArguments);
+
+  // Controls for vector and points selection
+  TextLabel1 = new QLabel(tr("SMESH_BASE_POINT"), GroupArguments);
+  SelectButton1 = new QPushButton(GroupArguments);
+  SelectButton1->setIcon(image2);
+
+  TextLabel1_1 = new QLabel(tr("SMESH_X"), GroupArguments);
+  SpinBox1_1 = new SMESHGUI_SpinBox(GroupArguments);
+  TextLabel1_2 = new QLabel(tr("SMESH_Y"), GroupArguments);
+  SpinBox1_2 = new SMESHGUI_SpinBox(GroupArguments);
+  TextLabel1_3 = new QLabel(tr("SMESH_Z"), GroupArguments);
+  SpinBox1_3 = new SMESHGUI_SpinBox(GroupArguments);
+
+  TextLabel2 = new QLabel(tr("SMESH_SCALE_FACTOR"), GroupArguments);
+  SpinBox_FX = new SMESHGUI_SpinBox(GroupArguments);
+
+  TextLabel3 = new QLabel(tr("SMESH_SCALE_FACTOR_Y"), GroupArguments);
+  SpinBox_FY = new SMESHGUI_SpinBox(GroupArguments);
+
+  TextLabel4 = new QLabel(tr("SMESH_SCALE_FACTOR_Z"), GroupArguments);
+  SpinBox_FZ = new SMESHGUI_SpinBox(GroupArguments);
+
+
+  // switch of action type
+  ActionBox = new QGroupBox(GroupArguments);
+  ActionGroup = new QButtonGroup(GroupArguments);
+  QVBoxLayout* ActionBoxLayout = new QVBoxLayout(ActionBox);
+  ActionBoxLayout->addSpacing(SPACING);
+  ActionBoxLayout->setMargin(MARGIN);
+
+  QRadioButton* aMoveElements = new QRadioButton(tr("SMESH_MOVE_ELEMENTS"), ActionBox);
+  QRadioButton* aCopyElements = new QRadioButton(tr("SMESH_COPY_ELEMENTS"), ActionBox);
+  QRadioButton* aCreateMesh   = new QRadioButton(tr("SMESH_CREATE_MESH"),   ActionBox);
+
+  ActionBoxLayout->addWidget(aMoveElements);
+  ActionBoxLayout->addWidget(aCopyElements);
+  ActionBoxLayout->addWidget(aCreateMesh);
+  ActionGroup->addButton(aMoveElements, MOVE_ELEMS_BUTTON);
+  ActionGroup->addButton(aCopyElements, COPY_ELEMS_BUTTON);
+  ActionGroup->addButton(aCreateMesh,   MAKE_MESH_BUTTON);
+
+  // CheckBox for groups generation
+  MakeGroupsCheck = new QCheckBox(tr("SMESH_MAKE_GROUPS"), GroupArguments);
+  MakeGroupsCheck->setChecked(false);
+
+  // Name of a mesh to create
+  LineEditNewMesh = new QLineEdit(GroupArguments);
+
+  // layout
+  GroupArgumentsLayout->addWidget(TextLabelElements,    0, 0);
+  GroupArgumentsLayout->addWidget(SelectElementsButton, 0, 1);
+  GroupArgumentsLayout->addWidget(LineEditElements,     0, 2, 1, 5);
+  GroupArgumentsLayout->addWidget(myFilterBtn,          0, 7);
+  GroupArgumentsLayout->addWidget(CheckBoxMesh,         1, 0, 1, 8);
+  GroupArgumentsLayout->addWidget(TextLabel1,           2, 0);
+  GroupArgumentsLayout->addWidget(SelectButton1,        2, 1);
+  GroupArgumentsLayout->addWidget(TextLabel1_1,         2, 2);
+  GroupArgumentsLayout->addWidget(SpinBox1_1,           2, 3);
+  GroupArgumentsLayout->addWidget(TextLabel1_2,         2, 4);
+  GroupArgumentsLayout->addWidget(SpinBox1_2,           2, 5);
+  GroupArgumentsLayout->addWidget(TextLabel1_3,         2, 6);
+  GroupArgumentsLayout->addWidget(SpinBox1_3,           2, 7);
+  GroupArgumentsLayout->addWidget(TextLabel2,           3, 0);
+  GroupArgumentsLayout->addWidget(SpinBox_FX,           3, 3);
+  GroupArgumentsLayout->addWidget(TextLabel3,           4, 0);
+  GroupArgumentsLayout->addWidget(SpinBox_FY,           4, 3);
+  GroupArgumentsLayout->addWidget(TextLabel4,           5, 0);
+  GroupArgumentsLayout->addWidget(SpinBox_FZ,           5, 3);
+  GroupArgumentsLayout->addWidget(ActionBox,            7, 0, 3, 4);
+  GroupArgumentsLayout->addWidget(MakeGroupsCheck,      7, 5, 1, 4);
+  GroupArgumentsLayout->addWidget(LineEditNewMesh,      8, 5, 1, 4);
+
+  /***************************************************************/
+  GroupButtons = new QGroupBox(this);
+  QHBoxLayout* GroupButtonsLayout = new QHBoxLayout(GroupButtons);
+  GroupButtonsLayout->setSpacing(SPACING);
+  GroupButtonsLayout->setMargin(MARGIN);
+
+  buttonOk = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), GroupButtons);
+  buttonOk->setAutoDefault(true);
+  buttonOk->setDefault(true);
+  buttonApply = new QPushButton(tr("SMESH_BUT_APPLY"), GroupButtons);
+  buttonApply->setAutoDefault(true);
+  buttonCancel = new QPushButton(tr("SMESH_BUT_CLOSE"), GroupButtons);
+  buttonCancel->setAutoDefault(true);
+  buttonHelp = new QPushButton(tr("SMESH_BUT_HELP"), GroupButtons);
+  buttonHelp->setAutoDefault(true);
+
+  GroupButtonsLayout->addWidget(buttonOk);
+  GroupButtonsLayout->addSpacing(10);
+  GroupButtonsLayout->addWidget(buttonApply);
+  GroupButtonsLayout->addSpacing(10);
+  GroupButtonsLayout->addStretch();
+  GroupButtonsLayout->addWidget(buttonCancel);
+  GroupButtonsLayout->addWidget(buttonHelp);
+
+  /***************************************************************/
+  SMESHGUI_ScaleDlgLayout->addWidget(ConstructorsBox);
+  SMESHGUI_ScaleDlgLayout->addWidget(GroupArguments);
+  SMESHGUI_ScaleDlgLayout->addWidget(GroupButtons);
+
+  /* Initialisations */
+  SpinBox1_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox1_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox1_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_FX->RangeStepAndValidator(1.e-6, 1.e+6, 1.0, "parametric_precision");
+  SpinBox_FX->SetStep(0.1);
+  SpinBox_FY->RangeStepAndValidator(1.e-6, 1.e+6, 1.0, "parametric_precision");
+  SpinBox_FY->SetStep(0.1);
+  SpinBox_FZ->RangeStepAndValidator(1.e-6, 1.e+6, 1.0, "parametric_precision");
+  SpinBox_FZ->SetStep(0.1);
+
+  RadioButton1->setChecked(true);
+
+  mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
+  mySMESHGUI->SetActiveDialogBox((QDialog*)this);
+
+  // Costruction of the logical filter
+  SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
+  SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (GROUP);
+
+  QList<SUIT_SelectionFilter*> aListOfFilters;
+  if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
+  if (aSmeshGroupFilter)    aListOfFilters.append(aSmeshGroupFilter);
+
+  myMeshOrSubMeshOrGroupFilter =
+    new SMESH_LogicalFilter(aListOfFilters, SMESH_LogicalFilter::LO_OR);
+
+  myHelpFileName = "scale_page.html";
+
+  Init();
+
+  /* signals and slots connections */
+  connect(buttonOk,     SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+  connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+  connect(buttonApply,  SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+  connect(buttonHelp,   SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
+  connect(GroupConstructors, SIGNAL(buttonClicked(int)), SLOT(ConstructorsClicked(int)));
+
+  connect(SelectElementsButton, SIGNAL (clicked()), this, SLOT(SetEditCurrentArgument()));
+  connect(SelectButton1,        SIGNAL (clicked()), this, SLOT(SetEditCurrentArgument()));
+
+  connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
+  connect(mySelectionMgr, SIGNAL(currentSelectionChanged()),   this, SLOT(SelectionIntoArgument()));
+  /* to close dialog if study change */
+  connect(mySMESHGUI,       SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+  connect(LineEditElements, SIGNAL(textChanged(const QString&)),    SLOT(onTextChange(const QString&)));
+  connect(CheckBoxMesh,     SIGNAL(toggled(bool)),                  SLOT(onSelectMesh(bool)));
+  connect(ActionGroup,      SIGNAL(buttonClicked(int)),             SLOT(onActionClicked(int)));
+
+  ConstructorsClicked(0);
+  SelectionIntoArgument();
+  onActionClicked(MOVE_ELEMS_BUTTON);
+}
+
+//=================================================================================
+// function : ~SMESHGUI_ScaleDlg()
+// purpose  : Destroys the object and frees any allocated resources
+//=================================================================================
+SMESHGUI_ScaleDlg::~SMESHGUI_ScaleDlg()
+{
+  if ( myFilterDlg ) {
+    myFilterDlg->setParent( 0 );
+    delete myFilterDlg;
+    myFilterDlg = 0;
+  }
+}
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void SMESHGUI_ScaleDlg::Init (bool ResetControls)
+{
+  myBusy = false;
+
+  myEditCurrentArgument = 0;
+  LineEditElements->clear();
+  myElementsId = "";
+  myNbOkElements = 0;
+
+  buttonOk->setEnabled(false);
+  buttonApply->setEnabled(false);
+
+  myActor = 0;
+  myMesh = SMESH::SMESH_Mesh::_nil();
+
+  if (ResetControls) {
+    SpinBox1_1->SetValue(0.0);
+    SpinBox1_2->SetValue(0.0);
+    SpinBox1_3->SetValue(0.0);
+    SpinBox_FX->SetValue(1.0);
+    SpinBox_FY->SetValue(1.0);
+    SpinBox_FZ->SetValue(1.0);
+
+    ActionGroup->button( MOVE_ELEMS_BUTTON )->setChecked(true);
+    CheckBoxMesh->setChecked(false);
+    onSelectMesh(false);
+  }
+}
+
+//=================================================================================
+// function : ConstructorsClicked()
+// purpose  : Radio button management
+//=================================================================================
+void SMESHGUI_ScaleDlg::ConstructorsClicked (int constructorId)
+{
+  disconnect(mySelectionMgr, 0, this, 0);
+
+  switch (constructorId) {
+  case 0:
+    {
+      TextLabel2->setText(tr("SMESH_SCALE_FACTOR"));
+      TextLabel3->hide();
+      TextLabel4->hide();
+      SpinBox_FY->hide();
+      SpinBox_FZ->hide();
+      break;
+    }
+  case 1:
+    {
+      TextLabel2->setText(tr("SMESH_SCALE_FACTOR_X"));
+      TextLabel3->show();
+      TextLabel4->show();
+      SpinBox_FY->show();
+      SpinBox_FZ->show();
+      break;
+    }
+  }
+
+  if (myEditCurrentArgument != (QWidget*)LineEditElements) {
+    SMESH::SetPointRepresentation(false);
+    if (!CheckBoxMesh->isChecked())
+      if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+        aViewWindow->SetSelectionMode( CellSelection );
+  }
+
+  myEditCurrentArgument = (QWidget*)LineEditElements;
+  LineEditElements->setFocus();
+
+  if (CheckBoxMesh->isChecked())
+    onSelectMesh(true);
+
+  connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+  QApplication::instance()->processEvents();
+  updateGeometry();
+  resize(100,100);
+}
+
+//=================================================================================
+// function : ClickOnApply()
+// purpose  :
+//=================================================================================
+bool SMESHGUI_ScaleDlg::ClickOnApply()
+{
+  if (mySMESHGUI->isActiveStudyLocked())
+    return false;
+
+  if( !isValid() )
+    return false;
+
+  if (myNbOkElements) {
+    QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
+
+    SMESH::long_array_var anElementsId = new SMESH::long_array;
+
+    anElementsId->length(aListElementsId.count());
+    for (int i = 0; i < aListElementsId.count(); i++)
+      anElementsId[i] = aListElementsId[i].toInt();
+
+    SMESH::PointStruct aPoint;
+    aPoint.x = SpinBox1_1->GetValue();
+    aPoint.y = SpinBox1_2->GetValue();
+    aPoint.z = SpinBox1_3->GetValue();
+    SMESH::double_array_var aScaleFact = new SMESH::double_array;
+    aScaleFact->length(3);
+    aScaleFact[0] = SpinBox_FX->GetValue();
+    if (GetConstructorId() == 0) {
+      aScaleFact[1] = SpinBox_FX->GetValue();
+      aScaleFact[2] = SpinBox_FX->GetValue();
+    }
+    else {
+      aScaleFact[1] = SpinBox_FY->GetValue();
+      aScaleFact[2] = SpinBox_FZ->GetValue();
+    }
+
+    QStringList aParameters;
+    aParameters << SpinBox1_1->text();
+    aParameters << SpinBox1_2->text();
+    aParameters << SpinBox1_3->text();
+    aParameters << SpinBox_FX->text();
+    if (GetConstructorId() == 1) {
+      aParameters << SpinBox_FX->text();
+      aParameters << SpinBox_FX->text();
+    }
+    else {
+      aParameters << SpinBox_FY->text();
+      aParameters << SpinBox_FZ->text();
+    }
+
+    int actionButton = ActionGroup->checkedId();
+    bool makeGroups = ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() );
+    try {
+      SUIT_OverrideCursor aWaitCursor;
+      SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
+      switch ( actionButton ) {
+      case MOVE_ELEMS_BUTTON:
+        if(CheckBoxMesh->isChecked()) {
+          aMeshEditor->Scale(mySelectedObject, aPoint, aScaleFact, false);
+        }
+        else {
+          SMESH::SMESH_IDSource_ptr anObj = aMeshEditor->MakeIDSource(anElementsId);
+          aMeshEditor->Scale(anObj, aPoint, aScaleFact, false);
+        }
+        if( !myMesh->_is_nil())
+          myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+        break;
+      case COPY_ELEMS_BUTTON:
+        if ( makeGroups ) {
+          SMESH::ListOfGroups_var groups; 
+          if(CheckBoxMesh->isChecked()) {
+            groups = aMeshEditor->ScaleMakeGroups(mySelectedObject, aPoint, aScaleFact);
+          }
+          else {
+            groups = aMeshEditor->ScaleMakeGroups(aMeshEditor->MakeIDSource(anElementsId),
+                                                  aPoint, aScaleFact);
+          }
+        }
+        else {
+          if(CheckBoxMesh->isChecked()) {
+            aMeshEditor->Scale(mySelectedObject, aPoint, aScaleFact, true);
+          }
+          else {
+            aMeshEditor->Scale(aMeshEditor->MakeIDSource(anElementsId),
+                               aPoint, aScaleFact, true);
+          }
+        }
+        if( !myMesh->_is_nil())
+          myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+        break;
+      case MAKE_MESH_BUTTON:
+        SMESH::SMESH_Mesh_var mesh; 
+        if(CheckBoxMesh->isChecked()) {
+          mesh = aMeshEditor->ScaleMakeMesh(mySelectedObject, aPoint, aScaleFact, makeGroups,
+                                            LineEditNewMesh->text().toLatin1().data());
+        }
+        else {
+          mesh = aMeshEditor->ScaleMakeMesh(aMeshEditor->MakeIDSource(anElementsId),
+                                            aPoint, aScaleFact, makeGroups,
+                                            LineEditNewMesh->text().toLatin1().data());
+        }
+        if( !mesh->_is_nil())
+          mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+      }
+    } catch (...) {
+    }
+    
+    SMESH::UpdateView();
+    if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
+         actionButton == MAKE_MESH_BUTTON )
+      mySMESHGUI->updateObjBrowser(true); // new groups may appear
+    Init(false);
+    ConstructorsClicked(GetConstructorId());
+    mySelectedObject = SMESH::SMESH_IDSource::_nil();
+    SelectionIntoArgument();
+  }
+  
+  return true;
+}
+
+//=================================================================================
+// function : ClickOnOk()
+// purpose  :
+//=================================================================================
+void SMESHGUI_ScaleDlg::ClickOnOk()
+{
+  if( ClickOnApply() )
+    ClickOnCancel();
+}
+
+//=================================================================================
+// function : ClickOnCancel()
+// purpose  :
+//=================================================================================
+void SMESHGUI_ScaleDlg::ClickOnCancel()
+{
+  disconnect(mySelectionMgr, 0, this, 0);
+  mySelectionMgr->clearFilters();
+  //mySelectionMgr->clearSelected();
+  if (SMESH::GetCurrentVtkView()) {
+    SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters
+    SMESH::SetPointRepresentation(false);
+  }
+  if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+    aViewWindow->SetSelectionMode( ActorSelection );
+  mySMESHGUI->ResetState();
+  reject();
+}
+
+//=================================================================================
+// function : ClickOnHelp()
+// purpose  :
+//=================================================================================
+void SMESHGUI_ScaleDlg::ClickOnHelp()
+{
+  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+  if (app) 
+    app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
+  else {
+    QString platform;
+#ifdef WIN32
+    platform = "winapplication";
+#else
+    platform = "application";
+#endif
+    SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", 
+                                                                 platform)).
+                             arg(myHelpFileName));
+  }
+}
+
+//=======================================================================
+// function : onTextChange()
+// purpose  :
+//=======================================================================
+void SMESHGUI_ScaleDlg::onTextChange (const QString& theNewText)
+{
+  QLineEdit* send = (QLineEdit*)sender();
+
+  if (myBusy) return;
+  BusyLocker lock( myBusy );
+
+  if (send == LineEditElements)
+    myNbOkElements = 0;
+
+  buttonOk->setEnabled(false);
+  buttonApply->setEnabled(false);
+
+  // hilight entered elements
+  SMDS_Mesh* aMesh = 0;
+  if (myActor)
+    aMesh = myActor->GetObject()->GetMesh();
+
+  if (aMesh) {
+    Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
+    
+    TColStd_MapOfInteger newIndices;
+
+    QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
+
+    if (send == LineEditElements) {
+      for (int i = 0; i < aListId.count(); i++) {
+        const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
+        if (e)
+          newIndices.Add(e->GetID());
+        myNbOkElements++;
+      }
+    }
+
+    mySelector->AddOrRemoveIndex( anIO, newIndices, false );
+    if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+      aViewWindow->highlight( anIO, true, true );
+    
+    myElementsId = theNewText;
+  }
+
+  if (myNbOkElements) {
+    buttonOk->setEnabled(true);
+    buttonApply->setEnabled(true);
+  }
+}
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose  : Called when selection as changed or other case
+//=================================================================================
+void SMESHGUI_ScaleDlg::SelectionIntoArgument()
+{
+  if (myBusy) return;
+  BusyLocker lock( myBusy );
+  // clear
+  myActor = 0;
+  QString aString = "";
+
+  if (myEditCurrentArgument == (QWidget*)LineEditElements) {
+    LineEditElements->setText(aString);
+    myNbOkElements = 0;
+    buttonOk->setEnabled(false);
+    buttonApply->setEnabled(false);
+  }
+
+  if (!GroupButtons->isEnabled()) // inactive
+    return;
+
+  // get selected mesh
+  SALOME_ListIO aList;
+  mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
+
+  int nbSel = aList.Extent();
+  if (nbSel != 1)
+    return;
+
+  Handle(SALOME_InteractiveObject) IO = aList.First();
+  myMesh = SMESH::GetMeshByIO(IO);
+  if (myMesh->_is_nil())
+    return;
+
+  myActor = SMESH::FindActorByObject(myMesh);
+  if (!myActor)
+    myActor = SMESH::FindActorByEntry(IO->getEntry());
+  if (!myActor && !CheckBoxMesh->isChecked())
+    return;
+
+  int aNbUnits = 0;
+
+  if (myEditCurrentArgument == (QWidget*)LineEditElements) {
+    myElementsId = "";
+
+    // MakeGroups is available if there are groups and "Copy"
+    if ( myMesh->NbGroups() == 0 ) {
+      MakeGroupsCheck->setChecked(false);
+      MakeGroupsCheck->setEnabled(false);
+    }
+    else if ( ActionGroup->checkedId() != MOVE_ELEMS_BUTTON ) {
+      MakeGroupsCheck->setEnabled(true);
+    }
+
+    if (CheckBoxMesh->isChecked()) {
+      SMESH::GetNameOfSelectedIObjects( mySelectionMgr, aString );
+
+      if (!SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(IO)->_is_nil()) { //MESH, SUBMESH, OR GROUP
+        mySelectedObject = SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(IO);
+      }
+      else
+        return;
+        // get IDs from mesh
+        /*
+        SMDS_Mesh* aSMDSMesh = myActor->GetObject()->GetMesh();
+        if (!aSMDSMesh)
+          return;
+
+        for (int i = aSMDSMesh->MinElementID(); i <= aSMDSMesh->MaxElementID(); i++) {
+          const SMDS_MeshElement * e = aSMDSMesh->FindElement(i);
+          if (e) {
+            myElementsId += QString(" %1").arg(i);
+            aNbUnits++;
+          }
+        }
+      } else if (!SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO)->_is_nil()) { //SUBMESH
+        // get submesh
+        SMESH::SMESH_subMesh_var aSubMesh = SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO);
+
+        // get IDs from submesh
+        SMESH::long_array_var anElementsIds = new SMESH::long_array;
+        anElementsIds = aSubMesh->GetElementsId();
+        for (int i = 0; i < anElementsIds->length(); i++) {
+          myElementsId += QString(" %1").arg(anElementsIds[i]);
+        }
+        aNbUnits = anElementsIds->length();
+      } else { // GROUP
+        // get smesh group
+        SMESH::SMESH_GroupBase_var aGroup =
+          SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IO);
+        if (aGroup->_is_nil())
+          return;
+
+        // get IDs from smesh group
+        SMESH::long_array_var anElementsIds = new SMESH::long_array;
+        anElementsIds = aGroup->GetListOfID();
+        for (int i = 0; i < anElementsIds->length(); i++) {
+          myElementsId += QString(" %1").arg(anElementsIds[i]);
+        }
+        aNbUnits = anElementsIds->length();
+      }
+        */
+    } else {
+      aNbUnits = SMESH::GetNameOfSelectedElements(mySelector, IO, aString);
+      myElementsId = aString;
+      if (aNbUnits < 1)
+        return;  
+    }
+
+    myNbOkElements = true;
+  } else {
+    aNbUnits = SMESH::GetNameOfSelectedNodes(mySelector, IO, aString);
+    if (aNbUnits != 1)
+      return;
+
+    SMDS_Mesh* aMesh =  myActor->GetObject()->GetMesh();
+    if (!aMesh)
+      return;
+
+    const SMDS_MeshNode * n = aMesh->FindNode(aString.toInt());
+    if (!n)
+      return;
+
+    double x = n->X();
+    double y = n->Y();
+    double z = n->Z();
+
+    if (myEditCurrentArgument == (QWidget*)SpinBox1_1) {
+      SpinBox1_1->SetValue(x);
+      SpinBox1_2->SetValue(y);
+      SpinBox1_3->SetValue(z);
+    }
+    else if (myEditCurrentArgument == (QWidget*)SpinBox_FX) {
+      SpinBox_FX->SetValue(x);
+      SpinBox_FY->SetValue(y);
+      SpinBox_FZ->SetValue(z);
+    }
+  }
+
+  if (myEditCurrentArgument == (QWidget*)LineEditElements) {
+    LineEditElements->setText(aString);
+    LineEditElements->repaint();
+    LineEditElements->setEnabled(false); // to fully update lineedit IPAL 19809
+    LineEditElements->setEnabled(true); 
+    setNewMeshName();
+  }
+
+  // OK
+  if (myNbOkElements) {
+    buttonOk->setEnabled(true);
+    buttonApply->setEnabled(true);
+  }
+}
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose  :
+//=================================================================================
+void SMESHGUI_ScaleDlg::SetEditCurrentArgument()
+{
+  QPushButton* send = (QPushButton*)sender();
+
+  disconnect(mySelectionMgr, 0, this, 0);
+  mySelectionMgr->clearSelected();
+  mySelectionMgr->clearFilters();
+
+  if (send == SelectElementsButton) {
+    myEditCurrentArgument = (QWidget*)LineEditElements;
+    SMESH::SetPointRepresentation(false);
+    if (CheckBoxMesh->isChecked()) {
+      if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+        aViewWindow->SetSelectionMode( ActorSelection );
+      mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
+    }
+    else {
+      if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+        aViewWindow->SetSelectionMode( CellSelection );
+    }
+  }
+  else if (send == SelectButton1) {
+    myEditCurrentArgument = (QWidget*)SpinBox1_1;
+    SMESH::SetPointRepresentation(true);
+    if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+      aViewWindow->SetSelectionMode( NodeSelection );
+  }
+
+  myEditCurrentArgument->setFocus();
+  connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+  SelectionIntoArgument();
+}
+
+//=================================================================================
+// function : DeactivateActiveDialog()
+// purpose  :
+//=================================================================================
+void SMESHGUI_ScaleDlg::DeactivateActiveDialog()
+{
+  if (ConstructorsBox->isEnabled()) {
+    ConstructorsBox->setEnabled(false);
+    GroupArguments->setEnabled(false);
+    GroupButtons->setEnabled(false);
+    mySMESHGUI->ResetState();
+    mySMESHGUI->SetActiveDialogBox(0);
+  }
+}
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose  :
+//=================================================================================
+void SMESHGUI_ScaleDlg::ActivateThisDialog()
+{
+  /* Emit a signal to deactivate the active dialog */
+  mySMESHGUI->EmitSignalDeactivateDialog();
+  ConstructorsBox->setEnabled(true);
+  GroupArguments->setEnabled(true);
+  GroupButtons->setEnabled(true);
+
+  mySMESHGUI->SetActiveDialogBox((QDialog*)this);
+
+  if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+    aViewWindow->SetSelectionMode( CellSelection );
+
+  SelectionIntoArgument();
+}
+
+//=================================================================================
+// function : enterEvent()
+// purpose  :
+//=================================================================================
+void SMESHGUI_ScaleDlg::enterEvent (QEvent*)
+{
+  if (!ConstructorsBox->isEnabled())
+    ActivateThisDialog();
+}
+
+//=================================================================================
+// function : closeEvent()
+// purpose  :
+//=================================================================================
+void SMESHGUI_ScaleDlg::closeEvent (QCloseEvent*)
+{
+  /* same than click on cancel button */
+  ClickOnCancel();
+}
+
+//=======================================================================
+//function : hideEvent
+//purpose  : caused by ESC key
+//=======================================================================
+void SMESHGUI_ScaleDlg::hideEvent (QHideEvent*)
+{
+  if (!isMinimized())
+    ClickOnCancel();
+}
+
+//=======================================================================
+//function : onSelectMesh
+//purpose  :
+//=======================================================================
+void SMESHGUI_ScaleDlg::onSelectMesh (bool toSelectMesh)
+{
+  if (toSelectMesh)
+    TextLabelElements->setText(tr("SMESH_NAME"));
+  else
+    TextLabelElements->setText(tr("SMESH_ID_ELEMENTS"));
+  myFilterBtn->setEnabled(!toSelectMesh);
+
+  if (myEditCurrentArgument != LineEditElements) {
+    LineEditElements->clear();
+    return;
+  }
+
+  mySelectionMgr->clearFilters();
+  SMESH::SetPointRepresentation(false);
+
+  if (toSelectMesh) {
+    if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+      aViewWindow->SetSelectionMode( ActorSelection );
+    mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
+    LineEditElements->setReadOnly(true);
+    LineEditElements->setValidator(0);
+  } else {
+    if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+      aViewWindow->SetSelectionMode( CellSelection );
+    LineEditElements->setReadOnly(false);
+    LineEditElements->setValidator(myIdValidator);
+    onTextChange(LineEditElements->text());
+  }
+
+  SelectionIntoArgument();
+}
+
+//=======================================================================
+//function : onActionClicked
+//purpose  : slot called when an action type changed
+//=======================================================================
+
+void SMESHGUI_ScaleDlg::onActionClicked(int button)
+{
+  switch ( button ) {
+  case MOVE_ELEMS_BUTTON:
+    MakeGroupsCheck->setEnabled(false);
+    LineEditNewMesh->setEnabled(false);
+    break;
+  case COPY_ELEMS_BUTTON:
+    LineEditNewMesh->setEnabled(false);
+    MakeGroupsCheck->setText( tr("SMESH_MAKE_GROUPS"));
+    if ( myMesh->_is_nil() || myMesh->NbGroups() > 0)
+      MakeGroupsCheck->setEnabled(true);
+    else
+      MakeGroupsCheck->setEnabled(false);
+    break;
+  case MAKE_MESH_BUTTON:
+    LineEditNewMesh->setEnabled(true);
+    MakeGroupsCheck->setText( tr("SMESH_COPY_GROUPS"));
+    if ( myMesh->_is_nil() || myMesh->NbGroups() > 0)
+      MakeGroupsCheck->setEnabled(true);
+    else
+      MakeGroupsCheck->setEnabled(false);
+    break;
+  }
+  setNewMeshName();
+}
+
+//=======================================================================
+//function : setNewMeshName
+//purpose  : update contents of LineEditNewMesh
+//=======================================================================
+
+void SMESHGUI_ScaleDlg::setNewMeshName()
+{
+  LineEditNewMesh->setText("");
+  if ( LineEditNewMesh->isEnabled() && !myMesh->_is_nil() ) {
+    QString name;
+    if ( CheckBoxMesh->isChecked() ) {
+      name = LineEditElements->text();
+    }
+    else {
+      _PTR(SObject) meshSO = SMESH::FindSObject( myMesh );
+      name = meshSO->GetName().c_str();
+    }
+    if ( !name.isEmpty() )
+      LineEditNewMesh->setText( SMESH::UniqueMeshName( name, "scaled"));
+  }
+}
+
+//=================================================================================
+// function : GetConstructorId()
+// purpose  :
+//=================================================================================
+int SMESHGUI_ScaleDlg::GetConstructorId()
+{
+  return GroupConstructors->checkedId();
+}
+
+//=================================================================================
+// function : keyPressEvent()
+// purpose  :
+//=================================================================================
+void SMESHGUI_ScaleDlg::keyPressEvent( QKeyEvent* e )
+{
+  QDialog::keyPressEvent( e );
+  if ( e->isAccepted() )
+    return;
+
+  if ( e->key() == Qt::Key_F1 ) {
+    e->accept();
+    ClickOnHelp();
+  }
+}
+
+//=================================================================================
+// function : setFilters()
+// purpose  : SLOT. Called when "Filter" button pressed.
+//=================================================================================
+void SMESHGUI_ScaleDlg::setFilters()
+{
+  if(myMesh->_is_nil()) {
+    SUIT_MessageBox::critical(this,
+                              tr("SMESH_ERROR"),
+                              tr("NO_MESH_SELECTED"));
+   return;
+  }
+  if ( !myFilterDlg )
+    myFilterDlg = new SMESHGUI_FilterDlg( mySMESHGUI, SMESH::ALL );
+
+  myFilterDlg->SetSelection();
+  myFilterDlg->SetMesh( myMesh );
+  myFilterDlg->SetSourceWg( LineEditElements );
+
+  myFilterDlg->show();
+}
+
+//=================================================================================
+// function : isValid
+// purpose  :
+//=================================================================================
+bool SMESHGUI_ScaleDlg::isValid()
+{
+  bool ok = true;
+  QString msg;
+
+  ok = SpinBox1_1->isValid( msg, true ) && ok;
+  ok = SpinBox1_2->isValid( msg, true ) && ok;
+  ok = SpinBox1_3->isValid( msg, true ) && ok;
+  ok = SpinBox_FX->isValid( msg, true ) && ok;
+  if (GetConstructorId() == 1) {
+    ok = SpinBox_FY->isValid( msg, true ) && ok;
+    ok = SpinBox_FZ->isValid( msg, true ) && ok;
+  }
+
+  if( !ok ) {
+    QString str( tr( "SMESH_INCORRECT_INPUT" ) );
+    if ( !msg.isEmpty() )
+      str += "\n" + msg;
+    SUIT_MessageBox::critical( this, tr( "SMESH_ERROR" ), str );
+    return false;
+  }
+  return true;
+}
diff --git a/src/SMESHGUI/SMESHGUI_ScaleDlg.h b/src/SMESHGUI/SMESHGUI_ScaleDlg.h
new file mode 100644 (file)
index 0000000..f7287d5
--- /dev/null
@@ -0,0 +1,147 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// SMESH SMESHGUI : GUI for SMESH component
+// File   : SMESHGUI_ScaleDlg.h
+// Author : Sergey Kuul, Open CASCADE S.A.S.
+//
+#ifndef SMESHGUI_SCALEDLG_H
+#define SMESHGUI_SCALEDLG_H
+
+// SMESH includes
+#include "SMESH_SMESHGUI.hxx"
+
+// Qt includes
+#include <QDialog>
+
+// IDL includes
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SMESH_Mesh)
+
+class QButtonGroup;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QRadioButton;
+class QCheckBox;
+class SMESHGUI;
+class SMESHGUI_IdValidator;
+class SMESHGUI_SpinBox;
+class SMESHGUI_FilterDlg;
+class SMESH_Actor;
+class SVTK_Selector;
+class LightApp_SelectionMgr;
+class SMESH_LogicalFilter;
+
+//=================================================================================
+// class    : SMESHGUI_ScaleDlg
+// purpose  :
+//=================================================================================
+class SMESHGUI_EXPORT SMESHGUI_ScaleDlg : public QDialog
+{ 
+  Q_OBJECT
+
+public:
+  SMESHGUI_ScaleDlg( SMESHGUI* );
+  ~SMESHGUI_ScaleDlg();
+
+private:
+  void                   Init( bool = true );
+  void                   closeEvent( QCloseEvent* );
+  void                   enterEvent( QEvent* );           /* mouse enter the QWidget */
+  void                   hideEvent( QHideEvent* );        /* ESC key */
+  void                   keyPressEvent( QKeyEvent* );
+  int                    GetConstructorId();
+  void                   setNewMeshName();
+
+  bool                   isValid();
+
+  SMESHGUI*              mySMESHGUI;              /* Current SMESHGUI object */
+  SMESHGUI_IdValidator*  myIdValidator;
+  LightApp_SelectionMgr* mySelectionMgr;          /* User shape selection */
+  QString                myElementsId;
+  int                    myNbOkElements;          /* to check when elements are defined */
+
+  SVTK_Selector*         mySelector;
+
+  QWidget*               myEditCurrentArgument;
+
+  bool                   myBusy;
+  SMESH::SMESH_Mesh_var  myMesh;
+  SMESH_Actor*           myActor;
+  SMESH_LogicalFilter*   myMeshOrSubMeshOrGroupFilter;
+
+  SMESH::SMESH_IDSource_var mySelectedObject;
+
+  QGroupBox*             ConstructorsBox;
+  QButtonGroup*          GroupConstructors;
+  QRadioButton*          RadioButton1;
+  QRadioButton*          RadioButton2;
+  QGroupBox*             GroupButtons;
+  QPushButton*           buttonOk;
+  QPushButton*           buttonCancel;
+  QPushButton*           buttonApply;
+  QPushButton*           buttonHelp;
+  QGroupBox*             GroupArguments;
+  QLabel*                TextLabelElements;
+  QPushButton*           SelectElementsButton;
+  QLineEdit*             LineEditElements;
+  QCheckBox*             CheckBoxMesh;
+  QLabel*                TextLabel1;
+  QPushButton*           SelectButton1;
+  QLabel*                TextLabel1_1;
+  SMESHGUI_SpinBox*      SpinBox1_1;
+  QLabel*                TextLabel1_2;
+  SMESHGUI_SpinBox*      SpinBox1_2;
+  QLabel*                TextLabel1_3;
+  SMESHGUI_SpinBox*      SpinBox1_3;
+  QLabel*                TextLabel2;
+  SMESHGUI_SpinBox*      SpinBox_FX;
+  QLabel*                TextLabel3;
+  SMESHGUI_SpinBox*      SpinBox_FY;
+  QLabel*                TextLabel4;
+  SMESHGUI_SpinBox*      SpinBox_FZ;
+  QGroupBox*             ActionBox;
+  QButtonGroup*          ActionGroup;
+  QCheckBox*             MakeGroupsCheck;
+  QLineEdit*             LineEditNewMesh;
+
+  QString                myHelpFileName;
+
+  QPushButton*           myFilterBtn;
+  SMESHGUI_FilterDlg*    myFilterDlg;
+   
+private slots:
+  void                   ConstructorsClicked( int );
+  void                   ClickOnOk();
+  void                   ClickOnCancel();
+  bool                   ClickOnApply();
+  void                   ClickOnHelp();
+  void                   SetEditCurrentArgument();
+  void                   SelectionIntoArgument();
+  void                   DeactivateActiveDialog();
+  void                   ActivateThisDialog();
+  void                   onTextChange( const QString& );
+  void                   onSelectMesh( bool );
+  void                   onActionClicked( int );
+  void                   setFilters();
+};
+
+#endif // SMESHGUI_SCALEDLG_H
index 8eb024b8d243f1608ef96bf7364b332ad3c84c69..887cdea084b5665689c2885312237483fc86ff87 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI_Selection
 // File   : SMESHGUI_Selection.cxx
 // Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
@@ -86,7 +87,7 @@ void SMESHGUI_Selection::init( const QString& client, LightApp_SelectionMgr* mgr
 //function : processOwner
 //purpose  : 
 //=======================================================================
-void SMESHGUI_Selection::processOwner( const LightApp_DataOwner* ow )
+bool SMESHGUI_Selection::processOwner( const LightApp_DataOwner* ow )
 {
   const LightApp_SVTKDataOwner* owner =
     dynamic_cast<const LightApp_SVTKDataOwner*> ( ow );
@@ -94,6 +95,7 @@ void SMESHGUI_Selection::processOwner( const LightApp_DataOwner* ow )
     myActors.append( dynamic_cast<SMESH_Actor*>( owner->GetActor() ) );
   else
     myActors.append( 0 );
+  return true;
 }
 
 //=======================================================================
index ce64db54a7411b1d591c5dd88cc93dfcdb2d39a5..2320041def32adb2f85a442f745ebffab518f7f0 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI_Selection
 // File   : SMESHGUI_Selection.h
 // Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
@@ -48,7 +49,7 @@ public:
 
   virtual void            init( const QString&, LightApp_SelectionMgr* );
   virtual QVariant        parameter( const int, const QString& ) const;
-  virtual void            processOwner( const LightApp_DataOwner* );
+  virtual bool            processOwner( const LightApp_DataOwner* );
 
   // got from object, not from actor
   virtual bool            isAutoColor( int ) const;
index 30ca05205881e756b12c18ef9002f431ccba67d6..fb303d329de77541704164ad14dec656fe45b499 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_SelectionOp.cxx
 // Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
 // SMESH includes
index 083df7390bc8383c7f7a704ba451ad22c271cb21..6e4790ad2a0f0df082784d750a9e187f559cc87d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_SelectionOp.h
 // Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
 //
index 2a94befb89c3015f622dd3fc5c5c6c2556d4df60..cd63b5e12c463f8a34435acc97abb6fd69a6269d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_SewingDlg.cxx
 // Author : Michael ZORIN, Open CASCADE S.A.S.
index d21d1b5738c9d58fe5f9c5f0cc06c7918194af65..215b3814c27424824a9e9e5694429c43788534cc 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_SewingDlg.h
 // Author : Michael ZORIN, Open CASCADE S.A.S.
index aeae0ef7382d0655e2a2d746daea30e06bdb311d..5860f89d7f49d558b5b920de7b99e6f78a9e8011 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_ShapeByMeshDlg.cxx
 // Author : Edward AGAPOV, Open CASCADE S.A.S.
 // SMESH includes
index 51f74b810b863f378d8fff01beb4c5c164571bea..35c33f5d4b2e9e4607b316888669e94621d9071d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_ShapeByMeshDlg.h
 // Author : Edward AGAPOV, Open CASCADE S.A.S.
 //
index a99a2ae960200e60900be898299e3690fa380797..bb73bcbd5218fbd716ecdcc840b206654c731be1 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_SingleEditDlg.cxx
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
 // SMESH includes
index df0192cb0564d28341a03f10ac469c690816cb8a..1b3f16e60af278d5d815e1f354e9b95ef100e5c3 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESHGUI_SingleEditDlg.h
 // Author : Sergey LITONIN, Open CASCADE S.A.S.
 //
index 1cab8d3f47eadf428db66ab14cf8efdbdde1370f..3b83752eb5c1527da99d5cd4aa3784380eb804ad 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_SmoothingDlg.cxx
 // Author : Michael ZORIN, Open CASCADE S.A.S.
@@ -229,7 +230,7 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
   
   SpinBox_IterationLimit->setRange(1, 999999);
   SpinBox_IterationLimit->setValue(20);
-  SpinBox_AspectRatio->RangeStepAndValidator(0.0, +999999.999, 0.1, 3);
+  SpinBox_AspectRatio->RangeStepAndValidator(0.0, +999999.999, 0.1, "parametric_precision");
   SpinBox_AspectRatio->SetValue(1.1);
 
   GroupArguments->show();
@@ -386,11 +387,13 @@ bool SMESHGUI_SmoothingDlg::ClickOnApply()
     }
 
     if (aResult) {
-      Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
+      if ( myActor ) {
+        Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
+        SALOME_ListIO aList;
+        aList.Append(anIO);
+        mySelectionMgr->setSelectedObjects(aList, false);
+      }
 
-      SALOME_ListIO aList;
-      aList.Append(anIO);
-      mySelectionMgr->setSelectedObjects(aList, false);
       SMESH::UpdateView();
       Init();
 
@@ -564,7 +567,7 @@ void SMESHGUI_SmoothingDlg::SelectionIntoArgument()
     return;
 
   myActor = SMESH::FindActorByObject(myMesh);
-  if (!myActor)
+  if (!myActor && !CheckBoxMesh->isChecked())
     return;
 
   int aNbUnits = 0;
index 6def01cae4af13137686135c2318087d51355085..a07ed55b244eaff46d46c6c2833f387229205a83 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_SmoothingDlg.h
 // Author : Michael ZORIN, Open CASCADE S.A.S.
index c617f5ec7cc182a1e2de911854c1e723a1c07ef5..d34f9f8d7855666f31adb56b4139ffc120eda82a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_SpinBox.cxx
 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
 //
 #include "SMESHGUI_SpinBox.h"
 
+#include <SUIT_Session.h>
+#include <SUIT_ResourceMgr.h>
+
 // Qt includes
-#include <QDoubleValidator>
 #include <QLineEdit>
+#include <QVariant>
 
 //=================================================================================
 // class    : SMESHGUI_SpinBox()
@@ -93,15 +97,6 @@ QLineEdit* SMESHGUI_SpinBox::editor() const
   return SalomeApp_DoubleSpinBox::lineEdit();
 } 
 
-//=================================================================================
-// function : validator()
-// purpose  : returns validator
-//=================================================================================
-QDoubleValidator* SMESHGUI_SpinBox::validator() const
-{
-  return (QDoubleValidator*)editor()->validator();
-}
-
 //=================================================================================
 // function : RangeStepAndValidator()
 // purpose  :
@@ -109,12 +104,22 @@ QDoubleValidator* SMESHGUI_SpinBox::validator() const
 void SMESHGUI_SpinBox::RangeStepAndValidator( double min,
                                               double max,
                                               double step,
-                                              unsigned short precision )
+                                              const char* quantity )
 {
-  setPrecision(precision*(-1)); // PAL8769. Minus is for using 'g' double->string conversion specifier,
-  //                               see QtxDoubleSpinBox::mapValueToText( double v )
-  setDecimals(32);
+  // Obtain precision from preferences
+  SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+  int precision = resMgr->integerValue( "SMESH", quantity, -3 );
+  
+  setPrecision(precision); // PAL8769. Minus is for using 'g' double->string conversion specifier,
+  //                          see QtxDoubleSpinBox::mapValueToText( double v )
+  //                          san: this can be achieved using preferences
+  setDecimals(qAbs(precision));
   setRange(min, max);
   setSingleStep( step );
   setDefaultValue( min );
+  
+  // Add a hint for the user saying how to tune precision
+  QString userPropName = QObject::tr( QString( "SMESH_PREF_%1" ).arg( quantity ).toLatin1().constData() );
+  setProperty( "validity_tune_hint", 
+               QVariant( QObject::tr( "SMESH_PRECISION_HINT" ).arg( userPropName ) ) );  
 }
index aa757ee632c5bd0313cbb8538c1bd9b32b890745..9c5dcabdcac157140db7b41ee5fcddc26674080a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_SpinBox.h
 // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
@@ -54,12 +55,11 @@ public:
   void       RangeStepAndValidator( double         = -1000000.0,
                                     double         = +1000000.0,
                                     double         = 100.0,
-                                    unsigned short = 3 );
+                                    const char*    = "length_precision" );
   void              SetValue( double );
   double            GetValue() const;
   QString           GetString() const;
   QLineEdit*        editor() const;
-  QDoubleValidator* validator() const;
 
 public slots:
   void              SetStep( double );
index d62b3a702438f2cc792f16608115d83f3dc484ca..caf0544665d98dae3d9ac4a9351339b016549dd5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_StandardMeshInfosDlg.cxx
 // Author : Michael ZORIN, Open CASCADE S.A.S.
index e6e34328a2728e40612ab32cdbdc1d2a48ce94a8..ac6bbe9f5b80ce45080d7ead1cd128cfeec8bd3b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_StandardMeshInfosDlg.h
 // Author : Michael ZORIN, Open CASCADE S.A.S.
index 5da44a6ae52bda7c6aa7df29ebe04302d4e5f454..6fec286e31d9dff88d54e00d0cd4f1ac2513b8d4 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_SymmetryDlg.cxx
 // Author : Michael ZORIN, Open CASCADE S.A.S.
@@ -261,12 +262,12 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule )
   SMESHGUI_SymmetryDlgLayout->addWidget(GroupButtons);
 
   /* Initialisations */
-  SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
-  SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, 3);
+  SpinBox_X->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_Y->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_Z->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
 
   RadioButton1->setChecked(true);
 
@@ -695,7 +696,7 @@ void SMESHGUI_SymmetryDlg::SelectionIntoArgument()
   myActor = SMESH::FindActorByObject(myMesh);
   if (!myActor)
     myActor = SMESH::FindActorByEntry(IO->getEntry());
-  if (!myActor)
+  if (!myActor && !CheckBoxMesh->isChecked())
     return;
 
   int aNbUnits = 0;
index 1d763eb2e9fd0428df3086d0872f7615addab0ae..0d16550743819ab8e2d0b6ab397fbb9d97a7cefa 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_SymmetryDlg.h
 // Author : Michael ZORIN, Open CASCADE S.A.S.
index 97d5ca5822b6108b98d2499b17880c2269a636cb..6b2e2398da7135f1d04a8fb24f08a5ebd13452be 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_TranslationDlg.cxx
 // Author : Michael ZORIN, Open CASCADE S.A.S.
@@ -266,12 +267,12 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule )
   SMESHGUI_TranslationDlgLayout->addWidget(GroupButtons);
 
   /* Initialisations */
-  SpinBox1_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
-  SpinBox1_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
-  SpinBox1_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
-  SpinBox2_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
-  SpinBox2_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
-  SpinBox2_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, DBL_DIGITS_DISPLAY);
+  SpinBox1_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox1_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox1_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox2_1->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox2_2->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  SpinBox2_3->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
 
   RadioButton1->setChecked(true);
 
@@ -676,8 +677,9 @@ void SMESHGUI_TranslationDlg::SelectionIntoArgument()
   myActor = SMESH::FindActorByObject(myMesh);
   if (!myActor)
     myActor = SMESH::FindActorByEntry(IO->getEntry());
-  if (!myActor)
-    return;
+
+  if (!myActor && !CheckBoxMesh->isChecked())
+      return;
 
   int aNbUnits = 0;
 
index cfd77378ad51e54886f4e1e98d4898dd1237f213..477bf900a093e9aae3f4b1c9d5e200f0ae2d52a9 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_TranslationDlg.h
 // Author : Michael ZORIN, Open CASCADE S.A.S.
index 28f5af456485effd84a86eaf81867d4c335e72b4..68a13a4fc06977ea7203631985d5eac1a0438ea8 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_TransparencyDlg.cxx
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
index 28595ed7e4846f63a3eb157efd8dd15c133b7182..82053550d45d8adc2fa09fdc7de71d0bc7dc2ebf 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_TransparencyDlg.h
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
index 7c6b279c4694850b2820b734fd1dfb176e21c900..6f921cd220b89ec61998a93c0776ca269c1b05a9 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_Utils.cxx
 // Author : Open CASCADE S.A.S.
@@ -189,7 +190,10 @@ namespace SMESH
       if (theSObject->FindAttribute(anAttr, "AttributeIOR")) {
         _PTR(AttributeIOR) anIOR = anAttr;
         CORBA::String_var aVal = anIOR->Value().c_str();
-        return app->orb()->string_to_object(aVal);
+        // string_to_object() DOC: If the input string is not valid ...
+        // a CORBA::SystemException is thrown.
+        if ( aVal && strlen( aVal ) > 0 )
+          return app->orb()->string_to_object(aVal);
       }
     }
     return CORBA::Object::_nil();
index 2604ca57fbcdefe7a11c7074b1c6d533d5d1e7e4..555d233824a07d03acc00f1934bdf7ac0fe4a9c6 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_Utils.h
 // Author : Open CASCADE S.A.S.
index 8e16d0898ba0332fcaa1b59ef385d33c7c5ecf88..ee44a116bf5de1edb630b6845dadd97a8b88a192 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_VTKUtils.cxx
 // Author : Open CASCADE S.A.S.
@@ -598,6 +599,8 @@ namespace SMESH
             anActor->SetNodeColor( aColor.R, aColor.G, aColor.B );
           else if( aGroup->GetType() == SMESH::EDGE )
             anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B );
+          else if( aGroup->GetType() == SMESH::ELEM0D )
+            anActor->Set0DColor( aColor.R, aColor.G, aColor.B );
           else
             anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B );
         }
@@ -848,10 +851,9 @@ namespace SMESH
         PW = mgr->integerValue( "SMESH", "highlight_width", 5 );
 
     // adjust highlight_width to the width of mesh entities
-    int aPointSize  = mgr->integerValue("SMESH", "node_size", 3);
     int aElem0DSize = mgr->integerValue("SMESH", "elem0d_size", 5);
     int aLineWidth  = mgr->integerValue("SMESH", "element_width", 1);
-    int maxSize = aPointSize;
+    int maxSize = aElem0DSize;
     if (aElem0DSize > maxSize) maxSize = aElem0DSize;
     if (aLineWidth > maxSize) maxSize = aLineWidth;
     if (PW < maxSize + 2) PW = maxSize + 2;
index 12c74459e6fcf3310b968576b7bd8309971b31d1..8a27f32e33d0f111c1af1c45d759106bcbb5ab09 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_VTKUtils.h
 // Author : Open CASCADE S.A.S.
index f2913e836a122c6428307a46f3dcdc4aa1e92dbc..5c78a9d13397d70b6e9039981e51a80ee56e3bcf 100755 (executable)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_WhatIsDlg.cxx
 // Author : Vladimir TURIN, Open CASCADE S.A.S.
index e308c53c16b4fb23fd217e3e7545354b0d5fdc07..e3b9a2cfc512b372f72c071cbda960f405a1d542 100755 (executable)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_WhatIsDlg.h
 // Author : Vladimir TURIN, Open CASCADE S.A.S.
index 16833ee66da96ed973f53da214d1370e81495473..5cc7ec3652992f7b6086e6212083950f8da2bf3c 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : reading of xml file with list of available hypotheses and algorithms
 // File   : SMESHGUI_XmlHandler.cxx
 // Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
index 3c38797e89082463a6e5d5ef06271fbf8424a78b..7ae71bcacf0c78a9e822acc9851332ef0c4d8907 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : reading of xml file with list of available hypotheses and algorithms
 // File   : SMESHGUI_XmlHandler.h
 // Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
index fb74c18284104862805d315508f60c434daf0578..75a54513e21fb3563a9eb4670017d5a39d38c2cb 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESH_SMESHGUI.hxx
 // Author : Alexander BORODIN, Open CASCADE S.A.S.
 //
index 8b455dfe0e7bebb9f8ad896a519dc0ac1607b098..22b3fd7e8d6efd7adaf059ca457f83ea7ab0ba3d 100644 (file)
@@ -1,6 +1,6 @@
 <!DOCTYPE TS>
 <!--
-  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+  Copyright (C) 2007-2010  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
             <source>ICON_FREE_FACES</source>
             <translation>mesh_free_faces.png</translation>
         </message>
+        <message>
+            <source>ICON_FIND_ELEM</source>
+            <translation>mesh_find_elem_by_point.png</translation>
+        </message>
         <message>
             <source>ICON_HYPO</source>
             <translation>mesh_hypo_length.png</translation>
             <source>ICON_SMESH_TRANSLATION_VECTOR</source>
             <translation>mesh_translation_vector.png</translation>
         </message>
+        <message>
+            <source>ICON_DLG_MESH_SCALE</source>
+            <translation>scale.png</translation>
+        </message>
+        <message>
+            <source>ICON_DLG_SCALE_ALONG_AXES</source>
+            <translation>scale_along_axes.png</translation>
+        </message>
         <message>
             <source>ICON_SMESH_TREE_ALGO</source>
             <translation>mesh_tree_algo.png</translation>
             <source>ICON_2D_FROM_3D</source>
             <translation>mesh_2d_from_3d.png</translation>
         </message>
+        <message>
+            <source>ICON_SPLIT_TO_TETRA</source>
+            <translation>split_into_tetra.png</translation>
+        </message>
     </context>
 </TS>
index 959a476347d69df7f7a7a772c0e9992022152454..18a50ace6a125687d9dd9f57b715b79700abed65 100644 (file)
@@ -1,6 +1,6 @@
 <!DOCTYPE TS>
 <!--
-  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+  Copyright (C) 2007-2010  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
             <source>MEN_2D_FROM_3D</source>
             <translation>Create 2D mesh from 3D</translation>
         </message>
+        <message>
+            <source>MEN_MESH_ORDER</source>
+            <translation>Change submesh priority</translation>
+        </message>
         <message>
             <source>MEN_CREATE_GROUP</source>
             <translation>Create Group</translation>
             <source>MEN_FILE</source>
             <translation>File</translation>
         </message>
+        <message>
+            <source>MEN_FIND_ELEM</source>
+            <translation>Find Element by Point</translation>
+        </message>
+        <message>
+            <source>TOP_FIND_ELEM</source>
+            <translation>Find Element by Point</translation>
+        </message>
         <message>
             <source>MEN_FREE_BORDER</source>
             <translation>Free Borders</translation>
             <source>MEN_MERGE_ELEMENTS</source>
             <translation>Merge Elements</translation>
         </message>
+
         <message>
             <source>MEN_MESH</source>
             <translation>Mesh</translation>
             <source>MEN_TRANS</source>
             <translation>Translation</translation>
         </message>
+        <message>
+            <source>MEN_SCALE</source>
+            <translation>Scale Transform</translation>
+        </message>
         <message>
             <source>MEN_TRANSF</source>
             <translation>Transformation</translation>
             <source>MEN_WIRE</source>
             <translation>Wireframe</translation>
         </message>
+        <message>
+            <source>MEN_SPLIT_TO_TETRA</source>
+            <translation>Split into Tetrahedra</translation>
+        </message>
+        <message>
+            <source>TOP_SPLIT_TO_TETRA</source>
+            <translation>Split into Tetrahedra</translation>
+        </message>
+        <message>
+            <source>STB_SPLIT_TO_TETRA</source>
+            <translation>Split into Tetrahedra</translation>
+        </message>
         <message>
             <source>MESHERS_FILE_CANT_OPEN</source>
             <translation>Can not open resource file</translation>
@@ -730,6 +759,16 @@ Please, select a mesh and try again</translation>
             <source>MULTI_BORDERS</source>
             <translation>Borders at Multi-Connections</translation>
         </message>
+        <message>
+            <source>GROUP_NAME_IS_EMPTY</source>
+            <translation>Name of group is not specified.
+Please enter a name of new group to be created or choose an existing one.</translation>
+        </message>
+        <message>
+            <source>MESH_STANDALONE_GRP_CHOSEN</source>
+            <translation>Group on geometry is chosen: %1.
+Do you want to convert it to the standalone group?</translation>
+        </message>
         <message>
             <source>NODE_ID</source>
             <translation>Node ID</translation>
@@ -794,7 +833,7 @@ Please enter correct values and try again</translation>
         <message>
             <source>SMESH_ADD_HYP_WRN</source>
             <translation>"%1" assigned but:
-</translation>
+        </translation>
         </message>
         <message>
             <source>SMESH_ADD_POLYGON</source>
@@ -852,6 +891,10 @@ Please enter correct values and try again</translation>
             <source>SMESH_ADD_TETRAS_TITLE</source>
             <translation>Add Tetrahedron</translation>
         </message>
+        <message>
+            <source>SMESH_ADD_TO_GROUP</source>
+            <translation>Add to group</translation>
+        </message>
         <message>
             <source>SMESH_ADD_TRIANGLE</source>
             <translation>Add Triangle</translation>
@@ -948,6 +991,10 @@ Please enter correct values and try again</translation>
             <source>SMESH_BUT_OK</source>
             <translation>&amp;Ok</translation>
         </message>
+        <message>
+            <source>SMESH_BUT_OVERWRITE</source>
+            <translation>Over&amp;write</translation>
+        </message>
         <message>
             <source>SMESH_BUT_APPLY_AND_CLOSE</source>
             <translation>A&amp;pply and Close</translation>
@@ -1154,6 +1201,12 @@ Probably, there is not enough space on disk.</translation>
 You can cancel exporting and rename them,
 otherwise some group names in the resulting MED file
 will not match ones in the study.
+Do you want to continue ?</translation>
+        </message>
+        <message>
+            <source>SMESH_EXPORT_MED_DUPLICATED_MESH_NAMES</source>
+            <translation>There are some meshes with the same names in the selection.
+The result file may be incorrect.
 Do you want to continue ?</translation>
         </message>
         <message>
@@ -1162,6 +1215,19 @@ Do you want to continue ?</translation>
 polygons and polyhedrons elements will be missed
 For correct export use MED 2.2
 Are you sure want to export to MED 2.1 ?</translation>
+        </message>
+        <message>
+            <source>SMESH_EXPORT_MED_VERSION_COLLISION</source>
+            <translation>MED version of the file "%1"
+is unknown or doesn't match the selected version.
+Overwrite the file?</translation>
+        </message>
+        <message>
+            <source>SMESH_EXPORT_MED_MESH_NAMES_COLLISION</source>
+            <translation>The selected file already contains
+meshes with the following names: %1
+The result file may be incorrect.
+Overwrite the file?</translation>
         </message>
         <message>
             <source>SMESH_EXPORT_STL1</source>
@@ -1200,6 +1266,12 @@ Are you sure want to export to MED 2.1 ?</translation>
             <source>SMESH_FEATUREEDGES</source>
             <translation>Feature Edges</translation>
         </message>
+        <message>
+            <source>SMESH_FILE_EXISTS</source>
+            <translation>The file "%1" already exists.
+Do you want to overwrite it or
+add the exported data to its contents?</translation>
+        </message>
         <message>
             <source>SMESH_FONT_ARIAL</source>
             <translation>Arial</translation>
@@ -1286,7 +1358,7 @@ Are you sure want to export to MED 2.1 ?</translation>
         </message>
         <message>
             <source>SMESH_HYP_12</source>
-            <translation>Geomerty mismatches algorithm's expectation</translation>
+            <translation>Geometry mismatches algorithm's expectation\nCheck algorithm documentation for supported geometry</translation>
         </message>
         <message>
             <source>SMESH_HYP_13</source>
@@ -1424,10 +1496,38 @@ Are you sure want to export to MED 2.1 ?</translation>
             <source>SMESH_MEN_SubMeshesOnVertex</source>
             <translation>SubMeshes On Vertex</translation>
         </message>
+       <message>
+            <source>SMESH_AUTOMATIC</source>
+            <translation>Automatic</translation>
+        </message>
+       <message>
+            <source>SMESH_MANUAL</source>
+            <translation>Manual</translation>
+        </message>
         <message>
             <source>SMESH_MERGE_ELEMENTS</source>
             <translation>Merge elements</translation>
         </message>
+       <message>
+            <source>SMESH_MODE</source>
+            <translation>Mode</translation>
+        </message>
+       <message>
+            <source>SMESH_MERGED_ELEMENTS</source>
+            <translation>%1 elements successfully merged.</translation>
+        </message>
+       <message>
+            <source>SMESH_MERGED_NODES</source>
+            <translation>%1 nodes successfully merged.</translation>
+        </message>
+       <message>
+            <source>SMESH_NO_ELEMENTS_DETECTED</source>
+            <translation>There are no elements to merge.</translation>
+        </message>
+       <message>
+            <source>SMESH_NO_NODES_DETECTED</source>
+            <translation>There are no nodes to merge.</translation>
+        </message>
         <message>
             <source>SMESH_MERGE_NODES</source>
             <translation>Merge nodes</translation>
@@ -1636,6 +1736,10 @@ Are you sure want to export to MED 2.1 ?</translation>
             <source>SMESH_POINT_2</source>
             <translation>Point 2</translation>
         </message>
+        <message>
+            <source>SMESH_BASE_POINT</source>
+            <translation>Base Point</translation>
+        </message>
         <message>
             <source>SMESH_POLYEDRE_CREATE_ERROR</source>
             <translation>Polyedron creation error</translation>
@@ -1837,6 +1941,30 @@ Are you sure want to export to MED 2.1 ?</translation>
             <source>SMESH_TRANSLATION</source>
             <translation>Translation</translation>
         </message>
+        <message>
+            <source>SMESH_SCALE_TITLE</source>
+            <translation>Scale Transform</translation>
+        </message>
+        <message>
+            <source>SMESH_SCALE</source>
+            <translation>Scale</translation>
+        </message>
+        <message>
+            <source>SMESH_SCALE_FACTOR</source>
+            <translation>Scale Factor :</translation>
+        </message>
+        <message>
+            <source>SMESH_SCALE_FACTOR_X</source>
+            <translation>Scale Factor X :</translation>
+        </message>
+        <message>
+            <source>SMESH_SCALE_FACTOR_Y</source>
+            <translation>Scale Factor Y :</translation>
+        </message>
+        <message>
+            <source>SMESH_SCALE_FACTOR_Z</source>
+            <translation>Scale Factor Z :</translation>
+        </message>
         <message>
             <source>SMESH_TRANSPARENCY_OPAQUE</source>
             <translation>---> Opaque</translation>
@@ -2059,6 +2187,10 @@ Consider saving your work before application crash</translation>
             <source>STB_2D_FROM_3D</source>
             <translation>Create 2D mesh from 3D</translation>
         </message>
+        <message>
+            <source>STB_MESH_ORDER</source>
+            <translation>Change submesh priority</translation>
+        </message>
         <message>
             <source>STB_CREATE_GROUP</source>
             <translation>Create Group</translation>
@@ -2409,6 +2541,10 @@ Consider saving your work before application crash</translation>
             <source>STB_TRANS</source>
             <translation>Translation</translation>
         </message>
+        <message>
+            <source>STB_SCALE</source>
+            <translation>Scale Transform</translation>
+        </message>
         <message>
             <source>STB_TRANSP</source>
             <translation>Transparency</translation>
@@ -2565,6 +2701,10 @@ Consider saving your work before application crash</translation>
             <source>TOP_2D_FROM_3D</source>
             <translation>Create 2D mesh from 3D</translation>
         </message>
+        <message>
+            <source>TOP_MESH_ORDER</source>
+            <translation>Change submesh priority</translation>
+        </message>
         <message>
             <source>TOP_CREATE_GROUP</source>
             <translation>Create Group</translation>
@@ -2915,6 +3055,10 @@ Consider saving your work before application crash</translation>
             <source>TOP_TRANS</source>
             <translation>Translation</translation>
         </message>
+        <message>
+            <source>TOP_SCALE</source>
+            <translation>Scale Transform</translation>
+        </message>
         <message>
             <source>TOP_TRANSP</source>
             <translation>Transparency</translation>
@@ -3023,6 +3167,40 @@ Consider saving your work before application crash</translation>
             <source>NO_MESH_SELECTED</source>
             <translation>No mesh selected</translation>
         </message>
+        <message>
+            <source>SMESH_PREF_def_precision</source>
+            <translation>Default precision</translation>
+        </message>
+        <message>
+            <source>SMESH_PREF_length_precision</source>
+            <translation>Length precision</translation>
+        </message>
+        <message>
+            <source>SMESH_PREF_angle_precision</source>
+            <translation>Angular precision</translation>
+        </message>
+        <message>
+            <source>SMESH_PREF_len_tol_precision</source>
+            <translation>Length tolerance precision</translation>
+        </message>
+        <message>
+            <source>SMESH_PREF_parametric_precision</source>
+            <translation>Parametric precision</translation>
+        </message>
+        <message>
+            <source>SMESH_PREF_area_precision</source>
+            <translation>Area precision</translation>
+        </message>
+        <message>
+            <source>SMESH_PREF_vol_precision</source>
+            <translation>Volume precision</translation>
+        </message>
+        <message>
+            <source>SMESH_PRECISION_HINT</source>
+            <translation>
+Input value precision can be adjusted using
+'%1' parameter in Mesh module preferences.</translation>
+        </message>
     </context>
     <context>
         <name>SMESHGUI</name>
@@ -3103,6 +3281,10 @@ Please, create VTK viewer and try again</translation>
             <source>PREF_NOTIFY_MODE</source>
             <translation>Show a computation result notification</translation>
         </message>
+        <message>
+            <source>SMESH_PREF_GROUP_PRECISION</source>
+            <translation>Input fields precision</translation>
+        </message>
         <message>
             <source>PREF_GROUP_ELEMENTS</source>
             <translation>Elements</translation>
@@ -3151,6 +3333,10 @@ Please, create VTK viewer and try again</translation>
             <source>PREF_LABELS_COLOR</source>
             <translation>Labels color</translation>
         </message>
+        <message>
+            <source>PREF_MARKER_SCALE</source>
+            <translation>Scale of marker</translation>
+        </message>
         <message>
             <source>PREF_NODES</source>
             <translation>Nodes</translation>
@@ -3183,10 +3369,6 @@ Please, create VTK viewer and try again</translation>
             <source>PREF_SHRINK_COEFF</source>
             <translation>Shrink coef.</translation>
         </message>
-        <message>
-            <source>PREF_SIZE</source>
-            <translation>Size</translation>
-        </message>
         <message>
             <source>PREF_TAB_GENERAL</source>
             <translation>General</translation>
@@ -3203,6 +3385,10 @@ Please, create VTK viewer and try again</translation>
             <source>PREF_TITLE_COLOR</source>
             <translation>Title color</translation>
         </message>
+        <message>
+            <source>PREF_TYPE_OF_MARKER</source>
+            <translation>Type of marker</translation>
+        </message>
         <message>
             <source>PREF_COLOR_0D</source>
             <translation>0D elements</translation>
@@ -3375,6 +3561,15 @@ Please, create VTK viewer and try again</translation>
  created during preview operation.
  Do you want to remove all this submeshes?</translation>
         </message>
+        <message>
+            <source>SMESH_WRN_NOTHING_PREVIEW</source>
+            <translation>No mesh preview is available</translation>
+        </message>
+        <message>
+            <source>SMESH_REJECT_MESH_ORDER</source>
+            <translation>The submesh priority changed during preview operation.
+Do you want to restore original submesh priority?</translation>
+        </message>
     </context>
     <context>
         <name>SMESHGUI_ConvToQuadDlg</name>
@@ -4264,6 +4459,37 @@ Please specify them and try again</translation>
             <translation>Mesh to modify not selected</translation>
         </message>
     </context>
+    <context>
+        <name>SMESHGUI_FindElemByPointDlg</name>
+        <message>
+            <source>CAPTION</source>
+            <translation>Find Element by Point</translation>
+        </message>
+        <message>
+            <source>CREATE_NEW_METHOD</source>
+            <translation>Create a node</translation>
+        </message>
+        <message>
+            <source>MESH_PASS_THROUGH_POINT</source>
+            <translation>Make a node at point</translation>
+        </message>
+        <message>
+            <source>METHOD</source>
+            <translation>Method</translation>
+        </message>
+        <message>
+            <source>MOVE_EXISTING_METHOD</source>
+            <translation>Move a node</translation>
+        </message>
+        <message>
+            <source>NODE_2MOVE</source>
+            <translation>Node to move</translation>
+        </message>
+        <message>
+            <source>NODE_2MOVE_ID</source>
+            <translation>ID</translation>
+        </message>
+    </context>
     <context>
         <name>SMESHGUI_MeshDlg</name>
         <message>
@@ -4592,6 +4818,25 @@ It is impossible to read point coordinates from file</translation>
             <translation>Use numeric functor</translation>
         </message>
     </context>
+    <context>
+        <name>SMESHGUI_CuttingIntoTetraDlg</name>
+        <message>
+            <source>CAPTION</source>
+            <translation>Splitting volumes into tetrahedra</translation>
+        </message>
+        <message>
+            <source>SPLIT_METHOD</source>
+            <translation>Split hexahedron</translation>
+        </message>
+        <message>
+            <source>SPLIT_HEX_TO_5_TETRA</source>
+            <translation>Into 5 tetrahedra</translation>
+        </message>
+        <message>
+            <source>SPLIT_HEX_TO_6_TETRA</source>
+            <translation>Into 6 tetrahedra</translation>
+        </message>
+    </context>
     <context>
         <name>SMESHGUI_PrecisionDlg</name>
         <message>
@@ -4712,6 +4957,7 @@ It is impossible to read point coordinates from file</translation>
             <source>MERGE_EQUAL_ELEMENTS</source>
             <translation>Merge equal elements</translation>
         </message>
+
         <message>
             <source>NODE1_TO_MERGE</source>
             <translation>Node 1 To Merge</translation>
@@ -4864,4 +5110,77 @@ It is impossible to read point coordinates from file</translation>
             <translation>Create Groups from Geometry</translation>
         </message>
     </context>
+    <context>
+        <name>SMESHGUI_MeshOrderDlg</name>
+        <message>
+            <source>SMESH_MESHORDER_TITLE</source>
+            <translation>Order of submesh in meshing process</translation>
+        </message>
+    </context>
+    <context>
+        <name>SMESHGUI_MeshOrderOp</name>
+        <message>
+            <source>SMESH_NO_CONCURENT_MESH</source>
+            <translation>No concurent submeshes detected</translation>
+        </message>
+    </context>
+    <context>
+        <name>SMESHGUI_ClippingDlg</name>
+       <message>
+            <source>CLIP_PLANES</source>
+            <translation>Clipping planes</translation>
+        </message>
+        <message>
+            <source>ROTATION_AROUND_X_Y2Z</source>
+            <translation>Rotation around X (Y to Z):</translation>
+        </message>
+        <message>
+            <source>ROTATION_AROUND_Y_X2Z</source>
+            <translation>Rotation around Y (X to Z):</translation>
+        </message>
+        <message>
+            <source>ROTATION_AROUND_Z_Y2X</source>
+            <translation>Rotation around Z (Y to X):</translation>
+        </message>
+        <message>
+            <source>ROTATION_AROUND_X_Z2Y</source>
+            <translation>Rotation around X (Z to Y):</translation>
+        </message>
+        <message>
+            <source>ROTATION_AROUND_Y_Z2X</source>
+            <translation>Rotation around Y (Z to X):</translation>
+        </message>
+        <message>
+            <source>ROTATION_AROUND_Z_X2Y</source>
+            <translation>Rotation around Z (X to Y):</translation>
+        </message>
+        <message>
+            <source>SHOW_PREVIEW</source>
+            <translation>Show preview</translation>
+        </message>
+        <message>
+            <source>AUTO_APPLY</source>
+            <translation>Auto Apply</translation>
+        </message>
+        <message>
+            <source>ALONG_XY</source>
+            <translation>|| X-Y</translation>
+        </message>
+        <message>
+            <source>ALONG_YZ</source>
+            <translation>|| Y-Z</translation>
+        </message>
+        <message>
+            <source>ALONG_ZX</source>
+            <translation>|| Z-X</translation>
+        </message>
+        <message>
+            <source>PLANE_NUM</source>
+            <translation>Plane# %1</translation>
+        </message>
+        <message>
+            <source>NO_PLANES</source>
+            <translation>No planes</translation>
+        </message>
+    </context>
 </TS>
index a2258d6b4af3791cb03f9e77c2e344af236a9da0..60cd3b31257e11d7679afe34d03a5d5334d322bd 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 #  File   : Makefile.in
 #  Author : Paul RASCLE, EDF
index be211311ac108077388c150f58cc3156f6e8e1bd..3b8072d49c057529acf966af2ee87f905bcf08b7 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I :
 //  File   : SMESH.hxx
 //  Author : Michael ZORIN
index 0c8d3bd601eeb152a3b0392b824c842e7a095574..1e146a1281728bd7815405de8d3e8520040cbc22 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 int main(int argc, char** argv)
 {
   return 1;
index cd8247ba95adc4b41c906b7345c7234e894afa05..233fbe8fd4b24091720c364826067bf8099a4f24 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_0D_Algo_i.cxx
 //  Author : Paul RASCLE, EDF
index 401feed17ffcf17b6fe5bf7038f66404e3e24cc0..d98c84f3e52bebc3d341915eb0ac3ca1a8721431 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_0D_Algo_i.hxx
 //  Module : SMESH
index e5da53f7955244af63809ac8ca5d69322ce1f346..393e5b7d052849c2990b87d5121b517da6a95c72 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_1D_Algo_i.cxx
 //  Author : Paul RASCLE, EDF
index 4ae7b0ea59b4065f283b1489e4b2dd3c22c91cd1..446d6db9a73a788f1b03876b61b3f670bb5761a1 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_1D_Algo_i.hxx
 //  Author : Paul RASCLE, EDF
index 7fcf5a86dd686f8faec6dd58fb54b6429772efcb..e859366e1c458ae49b5ab3af35294a6460a388a4 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_2D_Algo_i.cxx
 //  Author : Paul RASCLE, EDF
index 2579278fbe09ac76b316d3f6d37f41bbaa2f3da3..967db704233bed762717ae829c26bb827f58c895 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_2D_Algo_i.hxx
 //  Author : Paul RASCLE, EDF
index 8d3cacc1306773924d4e2b22511c5bc123337d07..640f511913866201ad847c5b973a403f2256a9d3 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,8 +19,8 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
-//
 // File      : SMESH_2smeshpy.cxx
 // Created   : Fri Nov 18 13:20:10 2005
 // Author    : Edward AGAPOV (eap)
@@ -261,6 +261,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
       Handle(_pySubMesh) subMesh = new _pySubMesh( aCommand );
       myObjects.insert( make_pair( subMeshID, subMesh ));
     }
+    
     id_mesh->second->Process( aCommand );
     return aCommand;
   }
@@ -845,7 +846,8 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
     }
   }
   // ----------------------------------------------------------------------
-  else if ( method == "ExportToMED" ) { // ExportToMED() --> ExportMED()
+  else if ( method == "ExportToMED" ||   // ExportToMED() --> ExportMED()
+            method == "ExportToMEDX" ) { // ExportToMEDX() --> ExportMED()
     theCommand->SetMethod( "ExportMED" );
   }
   // ----------------------------------------------------------------------
@@ -885,6 +887,34 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
     // remove hyp from myHypos
     myHypos.remove( hyp );
   }
+  // check for SubMesh order commands
+  else if ( theCommand->GetMethod() == "GetMeshOrder" ||
+            theCommand->GetMethod() == "SetMeshOrder" ) {
+    // In fact arguments and result values does not support complex containers
+    // such as list of list
+    // So, here we parse it manually
+    // GetMeshOrder
+    //for(int ind = 0, n = theCommand->GetNbResultValues();ind<n;ind++) {
+    //  Handle(_pySubMesh) subMesh = theGen->FindSubMesh( theCommand->GetResultValue(ind) );
+    // SetMeshOrder
+    //for(int ind = 0, n = theCommand->GetNbArgs();ind<n;ind++) {
+    //  Handle(_pySubMesh) subMesh = theGen->FindSubMesh( theCommand->GetArg(ind) );
+    const bool isArg = theCommand->GetMethod() == "SetMeshOrder";
+    const TCollection_AsciiString& cmdStr = theCommand->GetString();
+    int begPos = (/*isArg ? cmdStr.Search( "(" ) :*/ cmdStr.Search( "[" )) + 1;
+    int endPos = (isArg ? cmdStr.Search( ")" ) : cmdStr.Search( "=" )) - 1;
+    if ( begPos != -1 && begPos < endPos && endPos <= cmdStr.Length() ) {
+      TCollection_AsciiString aSubStr = cmdStr.SubString( begPos, endPos );
+      Standard_Integer index = 1;
+      TCollection_AsciiString anIDStr = aSubStr.Token("\t ,[]", index++);
+      while ( !anIDStr.IsEmpty() ) {
+        Handle(_pySubMesh) subMesh = theGen->FindSubMesh( anIDStr );
+        if ( !subMesh.IsNull() )
+          subMesh->Process( theCommand );
+        anIDStr = aSubStr.Token("\t ,[]", index++);
+      }
+    }
+  }
   // add accessor method if necessary
   else
   {
@@ -919,7 +949,7 @@ bool _pyMesh::NeedMeshAccess( const Handle(_pyCommand)& theCommand )
         "GetNodeInverseElements","GetShapeID","GetShapeIDForElem","GetElemNbNodes",
         "GetElemNode","IsMediumNode","IsMediumNodeOfAnyElem","ElemNbEdges","ElemNbFaces",
         "IsPoly","IsQuadratic","BaryCenter","GetHypothesisList", "SetAutoColor", "GetAutoColor",
-        "Clear", "ConvertToStandalone"
+        "Clear", "ConvertToStandalone", "GetMeshOrder", "SetMeshOrder"
         ,"" }; // <- mark of end
     sameMethods.Insert( names );
   }
@@ -1276,6 +1306,19 @@ Handle(_pyHypothesis) _pyHypothesis::NewHypothesis( const Handle(_pyCommand)& th
   else if ( hypType == "TrianglePreference" ) {
     hyp->SetConvMethodAndType( "TrianglePreference", "Quadrangle_2D");
   }     
+  // RadialQuadrangle_1D2D ----------
+  else if ( hypType == "RadialQuadrangle_1D2D" ) {
+    algo->SetConvMethodAndType( "Quadrangle" , hypType.ToCString());
+    algo->myArgs.Append( "algo=smesh.RADIAL_QUAD" );
+  }
+  else if ( hypType == "NumberOfLayers2D" ) {
+    hyp->SetConvMethodAndType( "NumberOfLayers", "RadialQuadrangle_1D2D");
+    hyp->AddArgMethod( "SetNumberOfLayers" );
+  }
+  else if ( hypType == "LayerDistribution2D" ) {
+    hyp = new _pyLayerDistributionHypo( theCreationCmd, "Get2DHypothesis" );
+    hyp->SetConvMethodAndType( "LayerDistribution", "RadialQuadrangle_1D2D");
+  }
   // BLSURF ----------
   else if ( hypType == "BLSURF" ) {
     algo->SetConvMethodAndType( "Triangle", hypType.ToCString());
@@ -1375,14 +1418,11 @@ Handle(_pyHypothesis) _pyHypothesis::NewHypothesis( const Handle(_pyCommand)& th
     hyp->AddArgMethod( "SetNumberOfLayers" );
   }
   else if ( hypType == "LayerDistribution" ) {
-    hyp = new _pyLayerDistributionHypo( theCreationCmd );
+    hyp = new _pyLayerDistributionHypo( theCreationCmd, "Get3DHypothesis" );
     hyp->SetConvMethodAndType( "LayerDistribution", "RadialPrism_3D");
   }
 
-  if ( algo->IsValid() ) {
-    return algo;
-  }
-  return hyp;
+  return algo->IsValid() ? algo : hyp;
 }
 
 //================================================================================
@@ -1615,46 +1655,10 @@ void _pyLayerDistributionHypo::Process( const Handle(_pyCommand)& theCommand)
     my1dHyp->ClearAllCommands();
   }
   my1dHyp = hyp1d;
-  if ( my1dHyp.IsNull() )
-    return; // something wrong :(
-
-  // make a new name for 1D hyp = "HypType" + "_Distribution"
-  if ( my1dHyp->GetCreationCmd()->GetMethod() == "CreateHypothesis" ) {
-    // not yet converted creation cmd
-    TCollection_AsciiString hypTypeQuoted = my1dHyp->GetCreationCmd()->GetArg(1);
-    TCollection_AsciiString hypType = hypTypeQuoted.SubString( 2, hypTypeQuoted.Length() - 1 );
-    newName = hypType + "_Distribution";
-    my1dHyp->GetCreationCmd()->SetResultValue( newName );
-  }
-  else {
-    // already converted creation cmd
-    newName = my1dHyp->GetCreationCmd()->GetResultValue();
-  }
 
-  // as creation of 1D hyp was written later then it's edition,
-  // we need to find all it's edition calls and process them
-  list< Handle(_pyCommand) >& cmds = theGen->GetCommands();
-  list< Handle(_pyCommand) >::iterator cmdIt = cmds.begin();
-  for ( ; cmdIt != cmds.end(); ++cmdIt ) {
-    const _pyID& objID = (*cmdIt)->GetObject();
-    if ( objID == hyp1dID ) {
-      my1dHyp->Process( *cmdIt );
-      my1dHyp->GetCreationCmd()->AddDependantCmd( *cmdIt );
-      ( *cmdIt )->SetObject( newName );
-    }
-  }
   if ( !myArgCommands.empty() )
     myArgCommands.front()->Clear();
-  theCommand->SetArg( 1, newName );
   myArgCommands.push_back( theCommand );
-  // copy hyp1d's creation method and args
-//   myCreationMethod = hyp1d->GetCreationMethod();
-//   myArgs           = hyp1d->GetArgs();
-//   // make them cleared at conversion
-//   myArgCommands = hyp1d->GetArgCommands();
-
-//   // to be cleared at convertion only
-//   myArgCommands.push_back( theCommand );
 }
 
 //================================================================================
@@ -1679,20 +1683,23 @@ bool _pyLayerDistributionHypo::Addition2Creation( const Handle(_pyCommand)& theA
 
   _pyID geom = theAdditionCmd->GetArg( 1 );
 
-  my1dHyp->SetMesh( theMesh );
-  if ( !my1dHyp->Addition2Creation( theAdditionCmd, theMesh ))
-    return false;
+  Handle(_pyHypothesis) algo = theGen->FindAlgo( geom, theMesh, this );
+  if ( !algo.IsNull() )
+  {
+    my1dHyp->SetMesh( theMesh );
+    my1dHyp->SetConvMethodAndType(my1dHyp->GetAlgoCreationMethod().ToCString(),
+                                  algo->GetAlgoType().ToCString());
+    if ( !my1dHyp->Addition2Creation( theAdditionCmd, theMesh ))
+      return false;
 
-  // clear "SetLayerDistribution()" cmd
-  myArgCommands.front()->Clear();
+    // clear "SetLayerDistribution()" cmd
+    myArgCommands.back()->Clear();
 
-  // Convert my creation => me = RadialPrismAlgo.Get3DHypothesis()
+    // Convert my creation => me = RadialPrismAlgo.Get3DHypothesis()
 
-  // find RadialPrism algo created on <geom> for theMesh
-  Handle(_pyHypothesis) algo = theGen->FindAlgo( geom, theMesh, this );
-  if ( !algo.IsNull() ) {
+    // find RadialPrism algo created on <geom> for theMesh
     GetCreationCmd()->SetObject( algo->GetID() );
-    GetCreationCmd()->SetMethod( "Get3DHypothesis" );
+    GetCreationCmd()->SetMethod( myAlgoMethod );
     GetCreationCmd()->RemoveArgs();
     theAdditionCmd->AddDependantCmd( GetCreationCmd() );
     myIsWrapped = true;
@@ -1708,8 +1715,38 @@ bool _pyLayerDistributionHypo::Addition2Creation( const Handle(_pyCommand)& theA
 
 void _pyLayerDistributionHypo::Flush()
 {
-  //my1dHyp.Nullify();
-  //_pyHypothesis::Flush();
+  // as creation of 1D hyp was written later then it's edition,
+  // we need to find all it's edition calls and process them
+  if ( !my1dHyp.IsNull() )
+  {
+    _pyID hyp1dID = my1dHyp->GetCreationCmd()->GetResultValue();
+
+    // make a new name for 1D hyp = "HypType" + "_Distribution"
+    _pyID newName;
+    if ( my1dHyp->IsWrapped() ) {
+      newName = my1dHyp->GetCreationCmd()->GetMethod();
+    }
+    else {
+      TCollection_AsciiString hypTypeQuoted = my1dHyp->GetCreationCmd()->GetArg(1);
+      newName = hypTypeQuoted.SubString( 2, hypTypeQuoted.Length() - 1 );
+    }
+    newName += "_Distribution";
+    my1dHyp->GetCreationCmd()->SetResultValue( newName );
+
+    list< Handle(_pyCommand) >& cmds = theGen->GetCommands();
+    list< Handle(_pyCommand) >::iterator cmdIt = cmds.begin();
+    for ( ; cmdIt != cmds.end(); ++cmdIt ) {
+      const _pyID& objID = (*cmdIt)->GetObject();
+      if ( objID == hyp1dID ) {
+        my1dHyp->Process( *cmdIt );
+        my1dHyp->GetCreationCmd()->AddDependantCmd( *cmdIt );
+        ( *cmdIt )->SetObject( newName );
+      }
+    }
+    // Set new hyp name to SetLayerDistribution() cmd
+    if ( !myArgCommands.empty() && !myArgCommands.back()->IsEmpty() )
+      myArgCommands.back()->SetArg( 1, newName );
+  }
 }
 
 //================================================================================
index 16926e54d1d53cd71e32f6e166d2e5e6049aaaa9..c5ad5122a62e38da1b16c994f3f8b0996680127d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File      : SMESH_smesh.hxx
 // Created   : Fri Nov 18 12:05:18 2005
 // Author    : Edward AGAPOV (eap)
@@ -113,7 +114,7 @@ public:
   int GetOrderNb() const { return myOrderNb; }
   void SetOrderNb( int theNb ) { myOrderNb = theNb; }
   int Length() { return myString.Length(); }
-  void Clear() { myString.Clear(); myBegPos.Clear(); }
+  void Clear() { myString.Clear(); myBegPos.Clear(); myArgs.Clear(); }
   bool IsEmpty() const { return myString.IsEmpty(); }
   TCollection_AsciiString GetIndentation();
   const TCollection_AsciiString & GetResultValue();
@@ -373,9 +374,10 @@ DEFINE_STANDARD_HANDLE (_pyComplexParamHypo, _pyHypothesis);
 class _pyLayerDistributionHypo: public _pyHypothesis
 {
   Handle(_pyHypothesis) my1dHyp;
+  TCollection_AsciiString myAlgoMethod;
 public:
-  _pyLayerDistributionHypo(const Handle(_pyCommand)& theCreationCmd):
-    _pyHypothesis(theCreationCmd) {}
+  _pyLayerDistributionHypo(const Handle(_pyCommand)& theCreationCmd, const char* algoMethod):
+    _pyHypothesis(theCreationCmd), myAlgoMethod((char*)algoMethod) {}
   void Process( const Handle(_pyCommand)& theCommand);
   void Flush();
   bool Addition2Creation( const Handle(_pyCommand)& theAdditionCmd,
index 8aa242ba6e11f4e8a8e88b475f49524f6eda769f..d72a20fb231f2f80e636335570df71af1dc9c3b7 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_3D_Algo_i.cxx
 //  Author : Paul RASCLE, EDF
index 4352e7296a555511c2a642b57091a327012bdaaf..384a07aa1f0af5a7b811c9028a00dd9ee8a9c431 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_3D_Algo_i.hxx
 //  Author : Paul RASCLE, EDF
index e567a15d62ab8ad0d70acda5ff7ea66764e27d15..32e580ff9b794b39e38b7777b96a39968ec0987a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_Algo_i.cxx
 //  Author : Paul RASCLE, EDF
index cfcfc53472c3e98ebc5e9049c58b428b30dd595f..d511c50f9a197d5ec5ad5f1aeaff5695b21905a5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_Algo_i.hxx
 //  Author : Paul RASCLE, EDF
index 5b012b59cfc4cf48b5500a28f2a5c52c416e0431..5be4f5de485e2773b1ace1ca89e82fdcbe9a4ef7 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File    : SMESH_Gen_i_DumpPython.cxx
 // Created : Thu Mar 24 17:17:59 2005
 // Author  : Julia DOROVSKIKH
@@ -208,6 +209,32 @@ namespace SMESH
     return *this;
   }
 
+  TPythonDump& 
+  TPythonDump::
+  operator<<(SMESH::SMESH_Hypothesis_ptr theArg)
+  {
+    SALOMEDS::Study_var aStudy = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy();
+    SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theArg);
+    if(aSObject->_is_nil() && !CORBA::is_nil(theArg))
+      myStream << "hyp_" << theArg->GetId();
+    else
+      *this << CORBA::Object_ptr( theArg );
+    return *this;
+  }
+
+  TPythonDump& 
+  TPythonDump::
+  operator<<(SMESH::SMESH_IDSource_ptr theArg)
+  {
+    SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
+    SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
+    SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theArg);
+    if(!aSObject->_is_nil() || CORBA::is_nil( theArg ))
+      return *this << aSObject;
+    SMESH::long_array_var anElementsId = theArg->GetIDs();
+    return *this << anElementsId;
+  }
+
   TPythonDump& 
   TPythonDump::
   operator<<(SMESH::FilterLibrary_i* theArg)
@@ -484,9 +511,7 @@ Engines::TMPFile* SMESH_Gen_i::DumpPython (CORBA::Object_ptr theStudy,
   TCollection_AsciiString aSavedTrace (oldValue);
 
   // Add trace of API methods calls and replace study entries by names
-  TCollection_AsciiString aScript =
-   "# -*- coding: iso-8859-1 -*-\n"
-    "### This file is generated by SALOME automatically by dump python functionality of SMESH component\n\n";
+  TCollection_AsciiString aScript;
   aScript += DumpPython_impl(aStudy, aMap, aMapNames,
                              isPublished, isValidScript, aSavedTrace);
 
index e9370beda67bfff3ad59bc3584d7d511d9edbb85..969ffb61387adfbe9d2b6a7ae0149770f5bf8651 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_Filter_i.cxx
 //  Author : Alexey Petrov, OCC
index 44cc246bf3a5112ce04ffd42d0a2fb696d5a20fb..057c7693b00d15b0e7013ab9ff993042a94ea4f9 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_Filter_i.hxx
 //  Author : Alexey Petrov, OCC
index b00a7e8a0ffd79326f88e24c8a121c599161f1a0..6db94260463a68a2e27b570c683d1a50940c5f9a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_Gen_i.cxx
 //  Author : Paul RASCLE, EDF
@@ -54,6 +55,7 @@
 
 #ifdef WNT
  #include <windows.h>
+ #include <process.h>
 #else
  #include <dlfcn.h>
 #endif
 #include "OpUtil.hxx"
 
 #include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
+#include CORBA_CLIENT_HEADER(SALOME_Session)
 
 #include "GEOM_Client.hxx"
 #include "Utils_ExceptHandlers.hxx"
 #include "memoire.h"
+#include "Basics_Utils.hxx"
 
 #include <map>
 
@@ -280,6 +284,28 @@ SMESH_Gen_i::SMESH_Gen_i( CORBA::ORB_ptr            orb,
 
   // set it in standalone mode only
   //OSD::SetSignal( true );
+
+  // 0020605: EDF 1190 SMESH: Display performance. 80 seconds for 52000 cells.
+  // find out mode (embedded or standalone) here else
+  // meshes created before calling SMESH_Client::GetSMESHGen(), which calls
+  // SMESH_Gen_i::SetEmbeddedMode(), have wrong IsEmbeddedMode flag
+  if ( SALOME_NamingService* ns = GetNS() )
+  {
+    CORBA::Object_var obj = ns->Resolve( "/Kernel/Session" );
+    SALOME::Session_var session = SALOME::Session::_narrow( obj ) ;
+    if ( !session->_is_nil() )
+    {
+      CORBA::String_var s_host = session->getHostname();
+      CORBA::Long        s_pid = session->getPID();
+      string my_host = Kernel_Utils::GetHostname();
+#ifdef WNT
+      long    my_pid = (long)_getpid();
+#else
+      long    my_pid = (long) getpid();
+#endif
+      SetEmbeddedMode( s_pid == my_pid && my_host == s_host.in() );
+    }
+  }
 }
 
 //=============================================================================
@@ -770,7 +796,7 @@ void SMESH_Gen_i::SetBoundaryBoxSegmentation( CORBA::Long theNbSegments )
 void SMESH_Gen_i::SetDefaultNbSegments(CORBA::Long theNbSegments)
   throw ( SALOME::SALOME_Exception )
 {
-  if ( theNbSegments )
+  if ( theNbSegments > 0 )
     myGen.SetDefaultNbSegments( int(theNbSegments) );
   else
     THROW_SALOME_CORBA_EXCEPTION( "non-positive number of segments", SALOME::BAD_PARAM );
@@ -1666,13 +1692,22 @@ SMESH::long_array* SMESH_Gen_i::Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
       MapShapeNbElemsItr anIt = aResMap.begin();
       for(; anIt!=aResMap.end(); anIt++) {
         const vector<int>& aVec = (*anIt).second;
-        for(i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++) {
-          nbels[i] += aVec[i];
+        for(i = SMESH::Entity_Node; i < aVec.size(); i++) {
+          int nbElem = aVec[i];
+          if ( nbElem < 0 ) // algo failed, check that it has reported a message
+          {
+            SMESH_subMesh* sm = anIt->first;
+            SMESH_ComputeErrorPtr& error = sm->GetComputeError();
+            const SMESH_Algo* algo = myGen.GetAlgo( myLocMesh, sm->GetSubShape());
+            if ( algo && !error.get() || error->IsOK() )
+              error.reset( new SMESH_ComputeError( COMPERR_ALGO_FAILED,"Failed to evaluate",algo));
+          }
+          else
+          {
+            nbels[i] += aVec[i];
+          }
         }
       }
-#ifdef _DEBUG_
-      cout<<endl;
-#endif
       return nbels._retn();
     }
   }
@@ -2173,6 +2208,49 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::mesh_array& theMeshesArray,
   return aNewMesh._retn();
 }
 
+//================================================================================
+/*!
+ *  SMESH_Gen_i::GetMEDVersion
+ *
+ *  Get MED version of the file by its name
+ */
+//================================================================================
+CORBA::Boolean SMESH_Gen_i::GetMEDVersion(const char* theFileName,
+                                          SMESH::MED_VERSION& theVersion)
+{
+  theVersion = SMESH::MED_V2_1;
+  MED::EVersion aVersion = MED::GetVersionId( theFileName );
+  switch( aVersion ) {
+    case MED::eV2_1     : theVersion = SMESH::MED_V2_1; return true;
+    case MED::eV2_2     : theVersion = SMESH::MED_V2_2; return true;
+    case MED::eVUnknown : return false;
+  }
+  return false;
+}
+
+//================================================================================
+/*!
+ *  SMESH_Gen_i::GetMeshNames
+ *
+ *  Get names of meshes defined in file with the specified name
+ */
+//================================================================================
+SMESH::string_array* SMESH_Gen_i::GetMeshNames(const char* theFileName)
+{
+  SMESH::string_array_var aResult = new SMESH::string_array();
+  MED::PWrapper aMed = MED::CrWrapper( theFileName );
+  MED::TErr anErr;
+  MED::TInt aNbMeshes = aMed->GetNbMeshes( &anErr );
+  if( anErr >= 0 ) {
+    aResult->length( aNbMeshes );
+    for( MED::TInt i = 0; i < aNbMeshes; i++ ) {
+      MED::PMeshInfo aMeshInfo = aMed->GetPMeshInfo( i+1 );
+      aResult[i] = CORBA::string_dup( aMeshInfo->GetName().c_str() );
+    }
+  }
+  return aResult._retn();
+}
+
 //=============================================================================
 /*!
  *  SMESH_Gen_i::Save
@@ -2726,6 +2804,40 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
             //if ( shapeRefFound )
             //myWriter.AddAllSubMeshes();
 
+            // store submesh order if any
+            const TListOfListOfInt& theOrderIds = myLocMesh.GetMeshOrder();
+            if ( theOrderIds.size() ) {
+              char order_list[ 30 ];
+              strcpy( order_list, "Mesh Order" );
+              // count number of submesh ids
+              int nbIDs = 0;
+              TListOfListOfInt::const_iterator idIt = theOrderIds.begin();
+              for ( ; idIt != theOrderIds.end(); idIt++ )
+                nbIDs += (*idIt).size();
+              // number of values = number of IDs +
+              //                    number of lists (for separators) - 1
+              int* smIDs = new int [ nbIDs + theOrderIds.size() - 1 ];
+              idIt = theOrderIds.begin();
+              for ( int i = 0; idIt != theOrderIds.end(); idIt++ ) {
+                const TListOfInt& idList = *idIt;
+                if (idIt != theOrderIds.begin()) // not first list
+                  smIDs[ i++ ] = -1/* *idList.size()*/; // separator between lists
+                // dump submesh ids from current list
+                TListOfInt::const_iterator id_smId = idList.begin();
+                for( ; id_smId != idList.end(); id_smId++ )
+                  smIDs[ i++ ] = *id_smId;
+              }
+              // write HDF group
+              aSize[ 0 ] = nbIDs + theOrderIds.size() - 1;
+
+              aDataset = new HDFdataset( order_list, aTopGroup, HDF_INT32, aSize, 1 );
+              aDataset->CreateOnDisk();
+              aDataset->WriteOnDisk( smIDs );
+              aDataset->CloseOnDisk();
+              //
+              delete[] smIDs;
+            }
+
             // groups root sub-branch
             SALOMEDS::SObject_var myGroupsBranch;
             for ( int i = GetNodeGroupsTag(); i <= GetVolumeGroupsTag(); i++ ) {
@@ -2910,7 +3022,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
                   aDataset->WriteOnDisk( smIDs );
                   aDataset->CloseOnDisk();
                   //
-                  delete smIDs;
+                  delete[] smIDs;
                 }
                 
                 // Store node positions on sub-shapes (SMDS_Position):
@@ -2940,6 +3052,8 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
                   if ( nbNodes == 0 ) continue;
                   
                   int aShapeID = (*itSubM).first;
+                  if ( aShapeID < 1 || aShapeID > mySMESHDSMesh->MaxShapeIndex() )
+                    continue;
                   int aShapeType = mySMESHDSMesh->IndexToShape( aShapeID ).ShapeType();
                   // write only SMDS_FacePosition and SMDS_EdgePosition
                   switch ( aShapeType ) {
@@ -3498,7 +3612,6 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
               }
             }
           }
-
         }
       }
     }
@@ -4121,6 +4234,24 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
           aGroup->CloseOnDisk();
         }
       }
+      // read submeh order if any
+      if( aTopGroup->ExistInternalObject( "Mesh Order" ) ) {
+        aDataset = new HDFdataset( "Mesh Order", aTopGroup );
+        aDataset->OpenOnDisk();
+        size = aDataset->GetSize();
+        int* smIDs = new int[ size ];
+        aDataset->ReadFromDisk( smIDs );
+        aDataset->CloseOnDisk();
+        TListOfListOfInt anOrderIds;
+        anOrderIds.push_back( TListOfInt() );
+        for ( int i = 0; i < size; i++ )
+          if ( smIDs[ i ] < 0 ) // is separator
+            anOrderIds.push_back( TListOfInt() );
+          else
+            anOrderIds.back().push_back(smIDs[ i ]);
+        
+        myNewMeshImpl->GetImpl().SetMeshOrder( anOrderIds );
+      }
     }
     // close mesh group
     if(aTopGroup)
index 13bca294ab715d73c53b84258e6d3a3733d1c9c6..89cf79ca77690e5fc39133f8387eebee1f3a491e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_Gen_i.hxx
 //  Author : Paul RASCLE, EDF
@@ -320,6 +321,13 @@ public:
                                               CORBA::Double            theMergeTolerance)
     throw ( SALOME::SALOME_Exception );
 
+  // Get MED version of the file by its name
+  CORBA::Boolean GetMEDVersion(const char* theFileName,
+                               SMESH::MED_VERSION& theVersion);
+
+  // Get names of meshes defined in file with the specified name
+  SMESH::string_array* GetMeshNames(const char* theFileName);
+
   // ****************************************************
   // Interface inherited methods (from SALOMEDS::Driver)
   // ****************************************************
index 2b216fe268d77330f4480a45880151cf4f2ecf69..d5161e29f5679ce077dde9b7509b2e6369c8746c 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 // File      : SMESH_Gen_i_1.cxx
 // Created   : Thu Oct 21 17:24:06 2004
index 7502c5409c8901569c350080a2564b4945071e11..c69024ed215ce4f5d93118049be515259ff5fa35 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
 //  File   : SMESH_Group_i.cxx
 //  Author : Sergey ANIKIN, OCC
@@ -165,11 +166,12 @@ SMESH::ElementType SMESH_GroupBase_i::GetType()
     SMDSAbs_ElementType aSMDSType = aGroupDS->GetType();
     SMESH::ElementType aType;
     switch (aSMDSType) {
-    case SMDSAbs_Node:   aType = SMESH::NODE; break;
-    case SMDSAbs_Edge:   aType = SMESH::EDGE; break;
-    case SMDSAbs_Face:   aType = SMESH::FACE; break;
-    case SMDSAbs_Volume: aType = SMESH::VOLUME; break;
-    default:             aType = SMESH::ALL; break;
+    case SMDSAbs_Node:      aType = SMESH::NODE;   break;
+    case SMDSAbs_Edge:      aType = SMESH::EDGE;   break;
+    case SMDSAbs_Face:      aType = SMESH::FACE;   break;
+    case SMDSAbs_Volume:    aType = SMESH::VOLUME; break;
+    case SMDSAbs_0DElement: aType = SMESH::ELEM0D; break;
+    default:                aType = SMESH::ALL;    break;
     }
     return aType;
   }
index 93f8354b9ed36c782eeaf449753ab0f2198f6dbb..30ea828c0000e4a81cced48c26f45ce5d9bbe554 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
 //  File   : SMESH_Group_i.hxx
 //  Author : Sergey ANIKIN, OCC
index b677e647b13c6dca7222d71f0206c2be16008342..19d436ff6128affb3e8641e2f6ed80c48a56353b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_Hypothesis_i.cxx
 //  Author : Paul RASCLE, EDF
index 13bd7742fd3b07ecdc9faf4447c8a89bc9053762..24c01d46a8c241951db83dd0685bd290c9feeada 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_Hypothesis_i.hxx
 //  Author : Paul RASCLE, EDF
index 393e49c42cf66308e2f1a9d69eabfb72bbc02934..66d26cc0d548d47258c284788e75d4cf80cd3a27 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_MEDFamily_i.cxx
 //  Module : SMESH
index e6af380679c25da3f919f6bce29eac62124b5a01..06a13600d9d2a2cd8e54f2ec3c6bb761c4f1f892 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_MEDFamily_i.hxx
 //  Module : SMESH
index f73bf1102c35ef9004f1da5ea9813f1c315261b6..b1b093770f8655c4dc95e7f2c125315f279cda88 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_MEDMesh_i.cxx
 //  Module : SMESH
index 72b31032e81f37d8c13b9c98ac7024395f546be9..68fcc96c391422562477af53567d67651156af30 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_MEDMesh_i.hxx
 //  Module : SMESH
index 4b1e66ddf0fb8444b67a6493dbe461de1ee65088..c1a8fe548dda69a95b0912e889d68fe58abbc3ab 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_MEDSupport_i.cxx
 //  Module : SMESH
index 56c36a881466bebb9707bb31191f539d2deb8fbe..b30528dad85821094cd127730688eec05133aa33 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 // File : SMESH_MEDSupport_i.hxx
 // Module : SMESH
index a5bc407996e752c40239464e4d0b021e76be5ae6..0ccfca68126d25db5e547c019622c436ad27f163 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_MeshEditor_i.cxx
 //  Author : Nicolas REJNERI
 //  Module : SMESH
-
+//
 #include "SMESH_MeshEditor_i.hxx"
 
 #include "SMDS_Mesh0DElement.hxx"
@@ -271,6 +272,27 @@ void SMESH_MeshEditor_i::initData(bool deleteSearchers)
   }
 }
 
+//=======================================================================
+//function : MakeIDSource
+//purpose  : Wrap a sequence of ids in a SMESH_IDSource
+//=======================================================================
+
+struct _IDSource : public POA_SMESH::SMESH_IDSource
+{
+  SMESH::long_array _ids;
+  SMESH::long_array* GetIDs()      { return new SMESH::long_array( _ids ); }
+  SMESH::long_array* GetMeshInfo() { return 0; }
+};
+
+SMESH::SMESH_IDSource_ptr SMESH_MeshEditor_i::MakeIDSource(const SMESH::long_array& ids)
+{
+  _IDSource* anIDSource = new _IDSource;
+  anIDSource->_ids = ids;
+  SMESH::SMESH_IDSource_var anIDSourceVar = anIDSource->_this();
+  
+  return anIDSourceVar._retn();
+}
+
 //=============================================================================
 /*!
  *
@@ -290,9 +312,6 @@ SMESH_MeshEditor_i::RemoveElements(const SMESH::long_array & IDsOfElements)
 
   // Update Python script
   TPythonDump() << "isDone = " << this << ".RemoveElements( " << IDsOfElements << " )";
-#ifdef _DEBUG_
-  TPythonDump() << "print 'RemoveElements: ', isDone";
-#endif
   // Remove Elements
   return anEditor.Remove( IdList, false );
 }
@@ -314,9 +333,6 @@ CORBA::Boolean SMESH_MeshEditor_i::RemoveNodes(const SMESH::long_array & IDsOfNo
 
   // Update Python script
   TPythonDump() << "isDone = " << this << ".RemoveNodes( " << IDsOfNodes << " )";
-#ifdef _DEBUG_
-  TPythonDump() << "print 'RemoveNodes: ', isDone";
-#endif
 
   return anEditor.Remove( IdList, true );
 }
@@ -468,14 +484,8 @@ CORBA::Long SMESH_MeshEditor_i::AddPolygonalFace (const SMESH::long_array & IDsO
 
   // Update Python script
   TPythonDump() <<"faceID = "<<this<<".AddPolygonalFace( "<<IDsOfNodes<<" )";
-#ifdef _DEBUG_
-  TPythonDump() << "print 'AddPolygonalFace: ', faceID";
-#endif
 
-  if(elem)
-    return elem->GetID();
-
-  return 0;
+  return elem ? elem->GetID() : 0;
 }
 
 //=============================================================================
@@ -517,9 +527,6 @@ CORBA::Long SMESH_MeshEditor_i::AddVolume(const SMESH::long_array & IDsOfNodes)
 
   // Update Python script
   TPythonDump() << "volID = " << this << ".AddVolume( " << IDsOfNodes << " )";
-#ifdef _DEBUG_
-  TPythonDump() << "print 'AddVolume: ', volID";
-#endif
 
   if(elem)
     return elem->GetID();
@@ -552,14 +559,8 @@ CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::long_array & I
   // Update Python script
   TPythonDump() << "volID = " << this << ".AddPolyhedralVolume( "
                 << IDsOfNodes << ", " << Quantities << " )";
-#ifdef _DEBUG_
-  TPythonDump() << "print 'AddPolyhedralVolume: ', volID";
-#endif
-
-  if(elem)
-    return elem->GetID();
 
-  return 0;
+  return elem ? elem->GetID() : 0;
 }
 
 //=============================================================================
@@ -590,14 +591,8 @@ CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces (const SMESH::long_ar
   // Update Python script
   TPythonDump() << "volID = " << this << ".AddPolyhedralVolumeByFaces( "
                 << IdsOfFaces << " )";
-#ifdef _DEBUG_
-  TPythonDump() << "print 'AddPolyhedralVolume: ', volID";
-#endif
-
-  if(elem)
-    return elem->GetID();
 
-  return 0;
+  return elem ? elem->GetID() : 0;
 }
 
 //=============================================================================
@@ -932,9 +927,6 @@ CORBA::Boolean SMESH_MeshEditor_i::TriToQuad (const SMESH::long_array &   IDsOfE
   // Update Python script
   TPythonDump() << "isDone = " << this << ".TriToQuad( "
                 << IDsOfElements << ", " << aNumericalFunctor << ", " << MaxAngle << " )";
-#ifdef _DEBUG_
-  TPythonDump() << "print 'TriToQuad: ', isDone";
-#endif
 
   ::SMESH_MeshEditor anEditor( myMesh );
 
@@ -963,9 +955,6 @@ CORBA::Boolean SMESH_MeshEditor_i::TriToQuadObject (SMESH::SMESH_IDSource_ptr
   // Clear python line(s), created by TriToQuad()
   SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
   aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#ifdef _DEBUG_
-  aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#endif
 
   SMESH::NumericalFunctor_i* aNumericalFunctor =
     SMESH::DownCast<SMESH::NumericalFunctor_i*>( Criterion );
@@ -973,9 +962,6 @@ CORBA::Boolean SMESH_MeshEditor_i::TriToQuadObject (SMESH::SMESH_IDSource_ptr
   // Update Python script
   TPythonDump() << "isDone = " << this << ".TriToQuadObject("
                 << theObject << ", " << aNumericalFunctor << ", " << MaxAngle << " )";
-#ifdef _DEBUG_
-  TPythonDump() << "print 'TriToQuadObject: ', isDone";
-#endif
 
   return isDone;
 }
@@ -1006,9 +992,6 @@ CORBA::Boolean SMESH_MeshEditor_i::QuadToTri (const SMESH::long_array &   IDsOfE
 
   // Update Python script
   TPythonDump() << "isDone = " << this << ".QuadToTri( " << IDsOfElements << ", " << aNumericalFunctor << " )";
-#ifdef _DEBUG_
-  TPythonDump() << "print 'QuadToTri: ', isDone";
-#endif
 
   ::SMESH_MeshEditor anEditor( myMesh );
   CORBA::Boolean stat = anEditor.QuadToTri( faces, aCrit );
@@ -1035,18 +1018,12 @@ CORBA::Boolean SMESH_MeshEditor_i::QuadToTriObject (SMESH::SMESH_IDSource_ptr
   // Clear python line(s), created by QuadToTri()
   SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
   aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#ifdef _DEBUG_
-  aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#endif
 
   SMESH::NumericalFunctor_i* aNumericalFunctor =
     SMESH::DownCast<SMESH::NumericalFunctor_i*>( Criterion );
 
   // Update Python script
   TPythonDump() << "isDone = " << this << ".QuadToTriObject( " << theObject << ", " << aNumericalFunctor << " )";
-#ifdef _DEBUG_
-  TPythonDump() << "print 'QuadToTriObject: ', isDone";
-#endif
 
   return isDone;
 }
@@ -1069,9 +1046,6 @@ CORBA::Boolean SMESH_MeshEditor_i::SplitQuad (const SMESH::long_array & IDsOfEle
   // Update Python script
   TPythonDump() << "isDone = " << this << ".SplitQuad( "
                 << IDsOfElements << ", " << Diag13 << " )";
-#ifdef _DEBUG_
-  TPythonDump() << "print 'SplitQuad: ', isDone";
-#endif
 
   ::SMESH_MeshEditor anEditor( myMesh );
   CORBA::Boolean stat = anEditor.QuadToTri( faces, Diag13 );
@@ -1098,16 +1072,10 @@ CORBA::Boolean SMESH_MeshEditor_i::SplitQuadObject (SMESH::SMESH_IDSource_ptr th
   // Clear python line(s), created by SplitQuad()
   SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
   aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#ifdef _DEBUG_
-  aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#endif
 
   // Update Python script
   TPythonDump() << "isDone = " << this << ".SplitQuadObject( "
                 << theObject << ", " << Diag13 << " )";
-#ifdef _DEBUG_
-  TPythonDump() << "print 'SplitQuadObject: ', isDone";
-#endif
 
   return isDone;
 }
@@ -1138,6 +1106,28 @@ CORBA::Long SMESH_MeshEditor_i::BestSplit (CORBA::Long                 IDOfQuad,
   return -1;
 }
 
+//================================================================================
+/*!
+ * \brief Split volumic elements into tetrahedrons
+ */
+//================================================================================
+
+void SMESH_MeshEditor_i::SplitVolumesIntoTetra (SMESH::SMESH_IDSource_ptr elems,
+                                                CORBA::Short              methodFlags)
+  throw (SALOME::SALOME_Exception)
+{
+  Unexpect aCatch(SALOME_SalomeException);
+
+  SMESH::long_array_var anElementsId = elems->GetIDs();
+  TIDSortedElemSet elemSet;
+  arrayToSet( anElementsId, GetMeshDS(), elemSet, SMDSAbs_Volume );
+  
+  ::SMESH_MeshEditor anEditor (myMesh);
+  anEditor.SplitVolumesIntoTetra( elemSet, int( methodFlags ));
+
+  TPythonDump() << this << ".SplitVolumesIntoTetra( "
+                << elems << ", " << methodFlags << " )";
+}
 
 //=======================================================================
 //function : Smooth
@@ -1253,9 +1243,6 @@ SMESH_MeshEditor_i::smooth(const SMESH::long_array &              IDsOfElements,
                 << "SMESH.SMESH_MeshEditor."
                 << ( Method == SMESH::SMESH_MeshEditor::CENTROIDAL_SMOOTH ?
                      "CENTROIDAL_SMOOTH )" : "LAPLACIAN_SMOOTH )");
-#ifdef _DEBUG_
-  TPythonDump() << "print 'Smooth: ', isDone";
-#endif
 
   return true;
 }
@@ -1284,9 +1271,6 @@ SMESH_MeshEditor_i::smoothObject(SMESH::SMESH_IDSource_ptr              theObjec
   // Clear python line(s), created by Smooth()
   SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
   aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#ifdef _DEBUG_
-  aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
-#endif
 
   // Update Python script
   TPythonDump() << "isDone = " << this << "."
@@ -1296,9 +1280,6 @@ SMESH_MeshEditor_i::smoothObject(SMESH::SMESH_IDSource_ptr              theObjec
                 << "SMESH.SMESH_MeshEditor."
                 << ( Method == SMESH::SMESH_MeshEditor::CENTROIDAL_SMOOTH ?
                      "CENTROIDAL_SMOOTH )" : "LAPLACIAN_SMOOTH )");
-#ifdef _DEBUG_
-  TPythonDump() << "print 'SmoothObject: ', isDone";
-#endif
 
   return isDone;
 }
@@ -3346,6 +3327,140 @@ SMESH_MeshEditor_i::RotateObjectMakeMesh(SMESH::SMESH_IDSource_ptr theObject,
   return mesh._retn();
 }
 
+
+//=======================================================================
+//function : scale
+//purpose  : 
+//=======================================================================
+
+SMESH::ListOfGroups*
+SMESH_MeshEditor_i::scale(const SMESH::long_array &  theIDsOfElements,
+                          const SMESH::PointStruct&  thePoint,
+                          const SMESH::double_array& theScaleFact,
+                          CORBA::Boolean             theCopy,
+                          const bool                 theMakeGroups,
+                          ::SMESH_Mesh*              theTargetMesh)
+{
+  initData();
+
+  TIDSortedElemSet elements;
+  arrayToSet(theIDsOfElements, GetMeshDS(), elements);
+
+  gp_Pnt aPnt( thePoint.x, thePoint.y, thePoint.z );
+  list<double> aScaleFact;
+  for (int i = 0; i < theScaleFact.length(); i++) {
+    aScaleFact.push_back( theScaleFact[i] );
+  }
+
+  ::SMESH_MeshEditor anEditor( myMesh );
+  ::SMESH_MeshEditor::PGroupIDs groupIds =
+      anEditor.Scale (elements, aPnt, aScaleFact, theCopy,
+                      theMakeGroups, theTargetMesh);
+
+  if(theCopy)
+    storeResult(anEditor);
+
+  return theMakeGroups ? getGroups(groupIds.get()) : 0;
+}
+
+
+//=======================================================================
+//function : Scale
+//purpose  :
+//=======================================================================
+
+void SMESH_MeshEditor_i::Scale(SMESH::SMESH_IDSource_ptr  theObject,
+                               const SMESH::PointStruct&  thePoint,
+                               const SMESH::double_array& theScaleFact,
+                               CORBA::Boolean             theCopy)
+{
+  if ( !myPreviewMode ) {
+    TPythonDump() << this << ".Scale( "
+                  << theObject << ", "
+                  << "SMESH.PointStruct( "  << thePoint.x << ", "
+                  << thePoint.y << ", " << thePoint.z << " ) ,"
+                  << theScaleFact << ", "
+                  << theCopy << " )";
+  }
+  SMESH::long_array_var anElementsId = theObject->GetIDs();
+  scale(anElementsId, thePoint, theScaleFact, theCopy, false);
+}
+
+
+//=======================================================================
+//function : ScaleMakeGroups
+//purpose  : 
+//=======================================================================
+
+SMESH::ListOfGroups*
+SMESH_MeshEditor_i::ScaleMakeGroups(SMESH::SMESH_IDSource_ptr  theObject,
+                                    const SMESH::PointStruct&  thePoint,
+                                    const SMESH::double_array& theScaleFact)
+{
+  SMESH::long_array_var anElementsId = theObject->GetIDs();
+  SMESH::ListOfGroups * aGroups = 
+    scale(anElementsId, thePoint, theScaleFact, true, true);
+
+  if ( !myPreviewMode ) {
+
+    TPythonDump aPythonDump;
+    DumpGroupsList(aPythonDump,aGroups);
+    aPythonDump << this << ".Scale("
+                << theObject << ","
+                << "SMESH.PointStruct(" <<thePoint.x << ","
+                << thePoint.y << "," << thePoint.z << "),"
+                << theScaleFact << ",True,True)";
+  }
+  return aGroups;
+}
+
+
+//=======================================================================
+//function : ScaleMakeMesh
+//purpose  : 
+//=======================================================================
+
+SMESH::SMESH_Mesh_ptr
+SMESH_MeshEditor_i::ScaleMakeMesh(SMESH::SMESH_IDSource_ptr  theObject,
+                                  const SMESH::PointStruct&  thePoint,
+                                  const SMESH::double_array& theScaleFact,
+                                  CORBA::Boolean             theCopyGroups,
+                                  const char*                theMeshName)
+{
+  SMESH_Mesh_i* mesh_i;
+  SMESH::SMESH_Mesh_var mesh;
+  { // open new scope to dump "MakeMesh" command
+    // and then "GetGroups" using SMESH_Mesh::GetGroups()
+
+    TPythonDump pydump; // to prevent dump at mesh creation
+    mesh = makeMesh( theMeshName );
+    mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
+
+    if ( mesh_i ) {
+      SMESH::long_array_var anElementsId = theObject->GetIDs();
+      scale(anElementsId, thePoint, theScaleFact,
+            false, theCopyGroups, & mesh_i->GetImpl());
+      mesh_i->CreateGroupServants();
+    }
+    if ( !myPreviewMode ) {
+      pydump << mesh << " = " << this << ".ScaleMakeMesh( "
+             << theObject << ", "
+             << "SMESH.PointStruct( "  << thePoint.x << ", "
+             << thePoint.y << ", " << thePoint.z << " ) ,"
+             << theScaleFact << ", "
+             << theCopyGroups << ", '"
+             << theMeshName << "' )";
+    }
+  }
+
+  //dump "GetGroups"
+  if(!myPreviewMode && mesh_i)
+    mesh_i->GetGroups();
+
+  return mesh._retn();
+}
+
+
 //=======================================================================
 //function : FindCoincidentNodes
 //purpose  :
@@ -3731,6 +3846,24 @@ SMESH::long_array* SMESH_MeshEditor_i::FindElementsByPoint(CORBA::Double      x,
   return res._retn();
 }
 
+//=======================================================================
+//function : GetPointState
+//purpose  : Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
+//           TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
+//=======================================================================
+
+CORBA::Short SMESH_MeshEditor_i::GetPointState(CORBA::Double x,
+                                               CORBA::Double y,
+                                               CORBA::Double z)
+{
+  theSearchersDeleter.Set( myMesh );
+  if ( !theElementSearcher ) {
+    ::SMESH_MeshEditor anEditor( myMesh );
+    theElementSearcher = anEditor.GetElementSearcher();
+  }
+  return CORBA::Short( theElementSearcher->GetPointState( gp_Pnt( x,y,z )));
+}
+
 //=======================================================================
 //function : convError
 //purpose  :
@@ -4017,9 +4150,6 @@ CORBA::Boolean SMESH_MeshEditor_i::ChangeElemNodes(CORBA::Long ide,
   }
   TPythonDump() << "isDone = " << this << ".ChangeElemNodes( "
                 << ide << ", " << newIDs << " )";
-#ifdef _DEBUG_
-  TPythonDump() << "print 'ChangeElemNodes: ', isDone";
-#endif
 
   return GetMeshDS()->ChangeElementNodes( elem, & aNodes[0], nbn1+1 );
 }
@@ -4573,7 +4703,7 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroups(
   storeResult( aMeshEditor) ;
 
   // Update Python script
-  TPythonDump() << "isDone = " << this << ".DoubleNodeGroups( " << &theElems << ", "
+  TPythonDump() << "isDone = " << this << ".DoubleNodeElemGroups( " << &theElems << ", "
     << &theNodesNot << ", " << &theAffectedElems << " )";
   return aResult;
 }
index 5c4dd85ca809f8618684659336e155dbdcc88c11..046573b17fd210f36dc418d0722502e78fe18f5f 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_MeshEditor_i.hxx
 //  Author : Nicolas REJNERI
@@ -41,12 +42,18 @@ class SMESH_Mesh_i;
 
 class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
 {
- public:
+public:
   SMESH_MeshEditor_i(SMESH_Mesh_i * theMesh, bool isPreview);
 
   virtual ~ SMESH_MeshEditor_i();
 
   // --- CORBA
+
+  /*!
+   * \brief Wrap a sequence of ids in a SMESH_IDSource
+   */
+  SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::long_array& IDsOfElements);
+
   CORBA::Boolean RemoveElements(const SMESH::long_array & IDsOfElements);
   CORBA::Boolean RemoveNodes(const SMESH::long_array & IDsOfNodes);
 
@@ -131,6 +138,8 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
                                   CORBA::Boolean              Diag13);
   CORBA::Long    BestSplit       (CORBA::Long                 IDOfQuad,
                                   SMESH::NumericalFunctor_ptr Criterion);
+  void SplitVolumesIntoTetra     (SMESH::SMESH_IDSource_ptr elems,
+                                  CORBA::Short methodFlags) throw (SALOME::SALOME_Exception);
 
   CORBA::Boolean Smooth(const SMESH::long_array &              IDsOfElements,
                         const SMESH::long_array &              IDsOfFixedNodes,
@@ -420,6 +429,21 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
                                              CORBA::Boolean            CopyGroups,
                                              const char*               MeshName);
 
+  void Scale(SMESH::SMESH_IDSource_ptr  theObject,
+             const SMESH::PointStruct&  thePoint,
+             const SMESH::double_array& theScaleFact,
+             CORBA::Boolean             theCopy);
+
+  SMESH::ListOfGroups* ScaleMakeGroups(SMESH::SMESH_IDSource_ptr  theObject,
+                                       const SMESH::PointStruct&  thePoint,
+                                       const SMESH::double_array& theScaleFact);
+
+  SMESH::SMESH_Mesh_ptr ScaleMakeMesh(SMESH::SMESH_IDSource_ptr Object,
+                                      const SMESH::PointStruct& Point,
+                                      const SMESH::double_array& theScaleFact,
+                                      CORBA::Boolean            CopyGroups,
+                                      const char*               MeshName);
+
   void FindCoincidentNodes (CORBA::Double                  Tolerance,
                             SMESH::array_of_long_array_out GroupsOfNodes);
   void FindCoincidentNodesOnPart(SMESH::SMESH_IDSource_ptr      Object,
@@ -442,7 +466,6 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
                                 CORBA::Double z);
   /*!
    * Return elements of given type where the given point is IN or ON.
-   *
    * 'ALL' type means elements of any type excluding nodes
    */
   SMESH::long_array* FindElementsByPoint(CORBA::Double      x,
@@ -450,6 +473,11 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
                                          CORBA::Double      z,
                                          SMESH::ElementType type);
 
+  /*!
+   * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
+   * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
+   */
+  CORBA::Short GetPointState(CORBA::Double x, CORBA::Double y, CORBA::Double z);
 
   SMESH::SMESH_MeshEditor::Sew_Error
   SewFreeBorders(CORBA::Long FirstNodeID1,
@@ -696,6 +724,13 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
                               const bool                MakeGroups,
                               ::SMESH_Mesh*             TargetMesh=0);
 
+  SMESH::ListOfGroups* scale(const SMESH::long_array &  theIDsOfElements,
+                             const SMESH::PointStruct&  thePoint,
+                             const SMESH::double_array& theScaleFact,
+                             CORBA::Boolean             theCopy,
+                             const bool                 theMakeGroups,
+                             ::SMESH_Mesh*              theTargetMesh=0);
+
   SMESH::SMESH_Mesh_ptr makeMesh(const char* theMeshName);
 
   void DumpGroupsList(SMESH::TPythonDump & theDumpPython, 
index 3f5ccd71888174f824960b8d402d82f42f2159c5..9f0101a9a8ab69b6e8882e03373117bfb826aa74 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_Mesh_i.cxx
 //  Author : Paul RASCLE, EDF
 #include <TopExp.hxx>
 #include <TopExp_Explorer.hxx>
 #include <TopoDS_Compound.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_MapIteratorOfMapOfShape.hxx>
 
 // STL Includes
+#include <algorithm>
 #include <string>
 #include <iostream>
 #include <sstream>
@@ -312,7 +316,7 @@ SMESH_Mesh_i::ImportMEDFile( const char* theFileName, const char* theMeshName )
 
 char* SMESH_Mesh_i::GetVersionString(SMESH::MED_VERSION version, CORBA::Short nbDigits)
 {
-  std::string ver = DriverMED_W_SMESHDS_Mesh::GetVersionString(MED::EVersion(version),
+  string ver = DriverMED_W_SMESHDS_Mesh::GetVersionString(MED::EVersion(version),
                                                                nbDigits);
   return CORBA::string_dup( ver.c_str() );
 }
@@ -1861,7 +1865,6 @@ void SMESH_Mesh_i::CheckGeomGroupModif()
 //=============================================================================
 /*!
  * \brief Create standalone group instead if group on geometry
- * 
  */
 //=============================================================================
 
@@ -1918,8 +1921,8 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::ConvertToStandalone( SMESH::SMESH_GroupOnGe
   _mapGroups[anId] = SMESH::SMESH_GroupBase::_duplicate( aGroup );
 
   // register CORBA object for persistence
-  //int nextId = _gen_i->RegisterObject( aGroup );
-  //if(MYDEBUG) MESSAGE( "Add group to map with id = "<< nextId);
+  /*int nextId =*/ _gen_i->RegisterObject( aGroup );
+
   builder->SetIOR( aGroupSO, _gen_i->GetORB()->object_to_string( aGroup ) );
 
   return aGroup._retn();
@@ -2264,7 +2267,7 @@ CORBA::Boolean SMESH_Mesh_i::HasDuplicatedGroupNamesMED()
   return _impl->HasDuplicatedGroupNamesMED();
 }
 
-void SMESH_Mesh_i::PrepareForWriting (const char* file)
+void SMESH_Mesh_i::PrepareForWriting (const char* file, bool overwrite)
 {
   TCollection_AsciiString aFullName ((char*)file);
   OSD_Path aPath (aFullName);
@@ -2273,8 +2276,10 @@ void SMESH_Mesh_i::PrepareForWriting (const char* file)
     // existing filesystem node
     if (aFile.KindOfFile() == OSD_FILE) {
       if (aFile.IsWriteable()) {
-        aFile.Reset();
-        aFile.Remove();
+        if (overwrite) {
+          aFile.Reset();
+          aFile.Remove();
+        }
         if (aFile.Failed()) {
           TCollection_AsciiString msg ("File ");
           msg += aFullName + " cannot be replaced.";
@@ -2305,15 +2310,16 @@ void SMESH_Mesh_i::PrepareForWriting (const char* file)
   }
 }
 
-void SMESH_Mesh_i::ExportToMED (const char* file,
-                                CORBA::Boolean auto_groups,
-                                SMESH::MED_VERSION theVersion)
+void SMESH_Mesh_i::ExportToMEDX (const char* file,
+                                 CORBA::Boolean auto_groups,
+                                 SMESH::MED_VERSION theVersion,
+                                 CORBA::Boolean overwrite)
   throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
 
   // Perform Export
-  PrepareForWriting(file);
+  PrepareForWriting(file, overwrite);
   const char* aMeshName = "Mesh";
   SALOMEDS::Study_ptr aStudy = _gen_i->GetCurrentStudy();
   if ( !aStudy->_is_nil() ) {
@@ -2345,17 +2351,25 @@ void SMESH_Mesh_i::ExportToMED (const char* file,
   // check names of groups
   checkGroupNames();
 
-  TPythonDump() << _this() << ".ExportToMED( '"
-                << file << "', " << auto_groups << ", " << theVersion << " )";
+  TPythonDump() << _this() << ".ExportToMEDX( '"
+                << file << "', " << auto_groups << ", " << theVersion << ", " << overwrite << " )";
 
   _impl->ExportMED( file, aMeshName, auto_groups, theVersion );
 }
 
+void SMESH_Mesh_i::ExportToMED (const char* file,
+                                CORBA::Boolean auto_groups,
+                                SMESH::MED_VERSION theVersion)
+  throw(SALOME::SALOME_Exception)
+{
+  ExportToMEDX(file,auto_groups,theVersion,true);
+}
+
 void SMESH_Mesh_i::ExportMED (const char* file,
                               CORBA::Boolean auto_groups)
   throw(SALOME::SALOME_Exception)
 {
-  ExportToMED(file,auto_groups,SMESH::MED_V2_1);
+  ExportToMEDX(file,auto_groups,SMESH::MED_V2_1,true);
 }
 
 void SMESH_Mesh_i::ExportDAT (const char *file)
@@ -2612,7 +2626,7 @@ CORBA::Long SMESH_Mesh_i::NbSubMesh()throw(SALOME::SALOME_Exception)
 //=============================================================================
 char* SMESH_Mesh_i::Dump()
 {
-  std::ostringstream os;
+  ostringstream os;
   _impl->Dump( os );
   return CORBA::string_dup( os.str().c_str() );
 }
@@ -2745,6 +2759,21 @@ SMESH::ElementType SMESH_Mesh_i::GetElementType( const CORBA::Long id, const boo
   return ( SMESH::ElementType )_impl->GetElementType( id, iselem );
 }
 
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+
+SMESH::EntityType SMESH_Mesh_i::GetElementGeomType( const CORBA::Long id )
+  throw (SALOME::SALOME_Exception)
+{
+  const SMDS_MeshElement* e = _impl->GetMeshDS()->FindElement(id);
+  if ( !e )
+    THROW_SALOME_CORBA_EXCEPTION( "invalid element id", SALOME::BAD_PARAM );
+
+  return ( SMESH::EntityType ) e->GetEntityType();
+}
 
 //=============================================================================
 /*!
@@ -3170,6 +3199,57 @@ CORBA::Long SMESH_Mesh_i::ElemNbFaces(const CORBA::Long id)
   return elem->NbFaces();
 }
 
+//=======================================================================
+//function : GetElemFaceNodes
+//purpose  : Returns nodes of given face (counted from zero) for given element.
+//=======================================================================
+
+SMESH::long_array* SMESH_Mesh_i::GetElemFaceNodes(CORBA::Long  elemId,
+                                                  CORBA::Short faceIndex)
+{
+  SMESH::long_array_var aResult = new SMESH::long_array();
+  if ( SMESHDS_Mesh* aSMESHDS_Mesh = _impl->GetMeshDS() )
+  {
+    if ( const SMDS_MeshElement* elem = aSMESHDS_Mesh->FindElement(elemId) )
+    {
+      SMDS_VolumeTool vtool( elem );
+      if ( faceIndex < vtool.NbFaces() )
+      {
+        aResult->length( vtool.NbFaceNodes( faceIndex ));
+        const SMDS_MeshNode** nn = vtool.GetFaceNodes( faceIndex );
+        for ( int i = 0; i < aResult->length(); ++i )
+          aResult[ i ] = nn[ i ]->GetID();
+      }
+    }
+  }
+  return aResult._retn();
+}
+
+//=======================================================================
+//function : FindElementByNodes
+//purpose  : Returns an element based on all given nodes.
+//=======================================================================
+
+CORBA::Long SMESH_Mesh_i::FindElementByNodes(const SMESH::long_array& nodes)
+{
+  CORBA::Long elemID(0);
+  if ( SMESHDS_Mesh* mesh = _impl->GetMeshDS() )
+  {
+    vector< const SMDS_MeshNode * > nn( nodes.length() );
+    for ( int i = 0; i < nodes.length(); ++i )
+      if ( !( nn[i] = mesh->FindNode( nodes[i] )))
+        return elemID;
+
+    const SMDS_MeshElement* elem = mesh->FindElement( nn );
+    if ( !elem && ( _impl->NbEdges( ORDER_QUADRATIC ) ||
+                    _impl->NbFaces( ORDER_QUADRATIC ) ||
+                    _impl->NbVolumes( ORDER_QUADRATIC )))
+      elem = mesh->FindElement( nn, SMDSAbs_All, /*noMedium=*/true );
+
+    if ( elem ) elemID = CORBA::Long( elem->GetID() );
+  }
+  return elemID;
+}
 
 //=============================================================================
 /*!
@@ -3461,3 +3541,441 @@ void SMESH_Mesh_i::CollectMeshInfo(const SMDS_ElemIteratorPtr theItr,
   while (theItr->more())
     theInfo[ theItr->next()->GetEntityType() ]++;
 }
+
+//=============================================================================
+/*!
+ * \brief mapping of mesh dimension into shape type
+ */
+//=============================================================================
+static TopAbs_ShapeEnum shapeTypeByDim(const int theDim)
+{
+  TopAbs_ShapeEnum aType = TopAbs_SOLID;
+  switch ( theDim ) {
+  case 0: aType = TopAbs_VERTEX; break;
+  case 1: aType = TopAbs_EDGE; break;
+  case 2: aType = TopAbs_FACE; break;
+  case 3:
+  default:aType = TopAbs_SOLID; break;
+  }
+  return aType;
+}
+
+//=============================================================================
+/*!
+ * \brief Internal structure used to find concurent submeshes
+ *
+ * It represents a pair < submesh, concurent dimension >, where
+ * 'concurrent dimension' is dimension of shape where the submesh can concurent
+ *  with another submesh. In other words, it is dimension of a hypothesis assigned
+ *  to submesh.
+ */
+//=============================================================================
+
+class SMESH_DimHyp
+{
+ public:
+  //! fileds
+  int _dim;    //!< a dimension the algo can build (concurrent dimension)
+  int _ownDim; //!< dimension of shape of _subMesh (>=_dim)
+  TopTools_MapOfShape _shapeMap;
+  SMESH_subMesh*      _subMesh;
+  list<const SMESHDS_Hypothesis*> _hypothesises; //!< algo is first, then its parameters
+
+  //! Constructors
+  SMESH_DimHyp(const SMESH_subMesh*  theSubMesh,
+               const int             theDim,
+               const TopoDS_Shape&   theShape)
+  {
+    _subMesh = (SMESH_subMesh*)theSubMesh;
+    SetShape( theDim, theShape );
+  }
+
+  //! set shape
+  void SetShape(const int theDim,
+                const TopoDS_Shape& theShape)
+  {
+    _dim = theDim;
+    _ownDim = (int)SMESH_Gen::GetShapeDim(theShape);
+    if (_dim >= _ownDim)
+      _shapeMap.Add( theShape );
+    else {
+      TopExp_Explorer anExp( theShape, shapeTypeByDim(theDim) );
+      for( ; anExp.More(); anExp.Next() )
+        _shapeMap.Add( anExp.Current() );
+    }
+  }
+
+  //! Check sharing of sub shapes
+  static bool isShareSubShapes(const TopTools_MapOfShape& theToCheck,
+                               const TopTools_MapOfShape& theToFind,
+                               const TopAbs_ShapeEnum     theType)
+  {
+    bool isShared = false;
+    TopTools_MapIteratorOfMapOfShape anItr( theToCheck );
+    for (; !isShared && anItr.More(); anItr.Next() ) {
+      const TopoDS_Shape aSubSh = anItr.Key();
+      // check for case when concurrent dimensions are same
+      isShared = theToFind.Contains( aSubSh );
+      // check for subshape with concurrent dimension
+      TopExp_Explorer anExp( aSubSh, theType );
+      for ( ; !isShared && anExp.More(); anExp.Next() )
+        isShared = theToFind.Contains( anExp.Current() );
+    }
+    return isShared;
+  }
+  
+  //! check algorithms
+  static bool checkAlgo(const SMESHDS_Hypothesis* theA1,
+                        const SMESHDS_Hypothesis* theA2)
+  {
+    if ( theA1->GetType() == SMESHDS_Hypothesis::PARAM_ALGO ||
+         theA2->GetType() == SMESHDS_Hypothesis::PARAM_ALGO )
+      return false; // one of the hypothesis is not algorithm
+    // check algorithm names (should be equal)
+    return strcmp( theA1->GetName(), theA2->GetName() ) == 0;
+  }
+
+  
+  //! Check if subshape hypotheses are concurrent
+  bool IsConcurrent(const SMESH_DimHyp* theOther) const
+  {
+    if ( _subMesh == theOther->_subMesh )
+      return false; // same subshape - should not be
+
+    // if ( <own dim of either of submeshes> == <concurrent dim> &&
+    //      any of the two submeshes is not on COMPOUND shape )
+    //  -> no concurrency
+    bool meIsCompound = (_subMesh->GetSubMeshDS() && _subMesh->GetSubMeshDS()->IsComplexSubmesh());
+    bool otherIsCompound = (theOther->_subMesh->GetSubMeshDS() && theOther->_subMesh->GetSubMeshDS()->IsComplexSubmesh());
+    if ( (_ownDim == _dim  || theOther->_ownDim == _dim ) && (!meIsCompound || !otherIsCompound))
+      return false;
+
+//     bool checkSubShape = ( _dim >= theOther->_dim )
+//       ? isShareSubShapes( _shapeMap, theOther->_shapeMap, shapeTypeByDim(theOther->_dim) )
+//       : isShareSubShapes( theOther->_shapeMap, _shapeMap, shapeTypeByDim(_dim) ) ;
+    bool checkSubShape = isShareSubShapes( _shapeMap, theOther->_shapeMap, shapeTypeByDim(_dim));
+    if ( !checkSubShape )
+        return false;
+
+    // check algorithms to be same
+    if (!checkAlgo( _hypothesises.front(), theOther->_hypothesises.front() ))
+      return true; // different algorithms
+    
+    // check hypothesises for concurrence (skip first as algorithm)
+    int nbSame = 0;
+    // pointers should be same, becase it is referenes from mesh hypothesis partition
+    list <const SMESHDS_Hypothesis*>::const_iterator hypIt = _hypothesises.begin();
+    list <const SMESHDS_Hypothesis*>::const_iterator otheEndIt = theOther->_hypothesises.end();
+    for ( hypIt++ /*skip first as algo*/; hypIt != _hypothesises.end(); hypIt++ )
+      if ( find( theOther->_hypothesises.begin(), otheEndIt, *hypIt ) != otheEndIt )
+        nbSame++;
+    // the submeshes are concurrent if their algorithms has different parameters
+    return nbSame != theOther->_hypothesises.size() - 1;
+  }
+  
+}; // end of SMESH_DimHyp
+
+typedef list<SMESH_DimHyp*> TDimHypList;
+
+static void addDimHypInstance(const int               theDim, 
+                              const TopoDS_Shape&     theShape,
+                              const SMESH_Algo*       theAlgo,
+                              const SMESH_subMesh*    theSubMesh,
+                              const list <const SMESHDS_Hypothesis*>& theHypList,
+                              TDimHypList*            theDimHypListArr )
+{
+  TDimHypList& listOfdimHyp = theDimHypListArr[theDim];
+  if ( listOfdimHyp.empty() || listOfdimHyp.back()->_subMesh != theSubMesh ) {
+    SMESH_DimHyp* dimHyp = new SMESH_DimHyp( theSubMesh, theDim, theShape );
+    listOfdimHyp.push_back( dimHyp );
+  }
+  
+  SMESH_DimHyp* dimHyp = listOfdimHyp.back();
+  dimHyp->_hypothesises.push_front(theAlgo);
+  list <const SMESHDS_Hypothesis*>::const_iterator hypIt = theHypList.begin();
+  for( ; hypIt != theHypList.end(); hypIt++ )
+    dimHyp->_hypothesises.push_back( *hypIt );
+}
+
+static void findConcurrents(const SMESH_DimHyp* theDimHyp,
+                            const TDimHypList&  theListOfDimHyp,
+                            TListOfInt&         theListOfConcurr )
+{
+  TDimHypList::const_reverse_iterator rIt = theListOfDimHyp.rbegin();
+  for ( ; rIt != theListOfDimHyp.rend(); rIt++ ) {
+    const SMESH_DimHyp* curDimHyp = *rIt;
+    if ( curDimHyp == theDimHyp )
+      break; // meet own dimHyp pointer in same dimension
+    else if ( theDimHyp->IsConcurrent( curDimHyp ) )
+      if ( find( theListOfConcurr.begin(),
+                 theListOfConcurr.end(),
+                 curDimHyp->_subMesh->GetId() ) == theListOfConcurr.end() )
+        theListOfConcurr.push_back( curDimHyp->_subMesh->GetId() );
+  }
+}
+
+static void unionLists(TListOfInt&       theListOfId,
+                       TListOfListOfInt& theListOfListOfId,
+                       const int         theIndx )
+{
+  TListOfListOfInt::iterator it = theListOfListOfId.begin();
+  for ( int i = 0; it != theListOfListOfId.end(); it++, i++ ) {
+    if ( i < theIndx )
+      continue; //skip already treated lists
+    // check if other list has any same submesh object
+    TListOfInt& otherListOfId = *it;
+    if ( find_first_of( theListOfId.begin(), theListOfId.end(),
+                        otherListOfId.begin(), otherListOfId.end() ) == theListOfId.end() )
+      continue;
+         
+    // union two lists (from source into target)
+    TListOfInt::iterator it2 = otherListOfId.begin();
+    for ( ; it2 != otherListOfId.end(); it2++ ) {
+      if ( find( theListOfId.begin(), theListOfId.end(), (*it2) ) == theListOfId.end() )
+        theListOfId.push_back(*it2);
+    }
+    // clear source list
+    otherListOfId.clear();
+  }
+}
+
+//! free memory allocated for dimension-hypothesis objects
+static void removeDimHyps( TDimHypList* theArrOfList )
+{
+  for (int i = 0; i < 4; i++ ) {
+    TDimHypList& listOfdimHyp = theArrOfList[i];
+    TDimHypList::const_iterator it = listOfdimHyp.begin();
+    for ( ; it != listOfdimHyp.end(); it++ )
+      delete (*it);
+  }
+}
+
+//=============================================================================
+/*!
+ * \brief Return submesh objects list in meshing order
+ */
+//=============================================================================
+
+SMESH::submesh_array_array* SMESH_Mesh_i::GetMeshOrder()
+{
+  SMESH::submesh_array_array_var aResult = new SMESH::submesh_array_array();
+
+  SMESHDS_Mesh* aMeshDS = _impl->GetMeshDS();
+  if ( !aMeshDS )
+    return aResult._retn();
+  
+  ::SMESH_Mesh& mesh = GetImpl();
+  TListOfListOfInt anOrder = mesh.GetMeshOrder(); // is there already defined order?
+  if ( !anOrder.size() ) {
+
+    // collect submeshes detecting concurrent algorithms and hypothesises
+    TDimHypList dimHypListArr[4]; // dimHyp list for each shape dimension
+    
+    map<int, ::SMESH_subMesh*>::iterator i_sm = _mapSubMesh.begin();
+    for ( ; i_sm != _mapSubMesh.end(); i_sm++ ) {
+      ::SMESH_subMesh* sm = (*i_sm).second;
+      // shape of submesh
+      const TopoDS_Shape& aSubMeshShape = sm->GetSubShape();
+      
+      // list of assigned hypothesises
+      const list <const SMESHDS_Hypothesis*>& hypList = mesh.GetHypothesisList(aSubMeshShape);
+      // Find out dimensions where the submesh can be concurrent.
+      // We define the dimensions by algo of each of hypotheses in hypList
+      list <const SMESHDS_Hypothesis*>::const_iterator hypIt = hypList.begin();
+      for( ; hypIt != hypList.end(); hypIt++ ) {
+        SMESH_Algo* anAlgo = 0;
+        const SMESH_Hypothesis* hyp = dynamic_cast<const SMESH_Hypothesis*>(*hypIt);
+        if ( hyp->GetType() != SMESHDS_Hypothesis::PARAM_ALGO )
+          // hyp it-self is algo
+          anAlgo = (SMESH_Algo*)dynamic_cast<const SMESH_Algo*>(hyp);
+        else {
+          // try to find algorithm with help of subshapes
+          TopExp_Explorer anExp( aSubMeshShape, shapeTypeByDim(hyp->GetDim()) );
+          for ( ; !anAlgo && anExp.More(); anExp.Next() )
+            anAlgo = mesh.GetGen()->GetAlgo( mesh, anExp.Current() );
+        }
+        if (!anAlgo)
+          continue; // no assigned algorithm to current submesh
+
+        int dim = anAlgo->GetDim(); // top concurrent dimension (see comment to SMESH_DimHyp)
+        // the submesh can concurrent at <dim> (or lower dims if !anAlgo->NeedDescretBoundary())
+
+        // create instance of dimension-hypothesis for found concurrent dimension(s) and algorithm
+        for ( int j = anAlgo->NeedDescretBoundary() ? dim : 1, jn = dim; j <= jn; j++ )
+          addDimHypInstance( j, aSubMeshShape, anAlgo, sm, hypList, dimHypListArr );
+      }
+    } // end iterations on submesh
+    
+    // iterate on created dimension-hypotheses and check for concurrents
+    for ( int i = 0; i < 4; i++ ) {
+      const list<SMESH_DimHyp*>& listOfDimHyp = dimHypListArr[i];
+      // check for concurrents in own and other dimensions (step-by-step)
+      TDimHypList::const_iterator dhIt = listOfDimHyp.begin();
+      for ( ; dhIt != listOfDimHyp.end(); dhIt++ ) {
+        const SMESH_DimHyp* dimHyp = *dhIt;
+        TListOfInt listOfConcurr;
+        // looking for concurrents and collect into own list
+        for ( int j = i; j < 4; j++ )
+          findConcurrents( dimHyp, dimHypListArr[j], listOfConcurr );
+        // check if any concurrents found
+        if ( listOfConcurr.size() > 0 ) {
+          // add own submesh to list of concurrent
+          listOfConcurr.push_front( dimHyp->_subMesh->GetId() );
+          anOrder.push_back( listOfConcurr );
+        }
+      }
+    }
+    
+    removeDimHyps(dimHypListArr);
+    
+    // now, minimise the number of concurrent groups
+    // Here we assume that lists of submhes can has same submesh
+    // in case of multi-dimension algorithms, as result
+    //  list with common submesh have to be union into one list
+    int listIndx = 0;
+    TListOfListOfInt::iterator listIt = anOrder.begin();
+    for(; listIt != anOrder.end(); listIt++, listIndx++ )
+      unionLists( *listIt,  anOrder, listIndx + 1 );
+  }
+  // convert submesh ids into interface instances
+  //  and dump command into python
+  convertMeshOrder( anOrder, aResult, true );
+
+  return aResult._retn();
+}
+
+//=============================================================================
+/*!
+ * \brief find common submeshes with given submesh
+ * \param theSubMeshList list of already collected submesh to check
+ * \param theSubMesh given submesh to intersect with other
+ * \param theCommonSubMeshes collected common submeshes
+ */
+//=============================================================================
+
+static void findCommonSubMesh
+ (list<const SMESH_subMesh*>& theSubMeshList,
+  const SMESH_subMesh*             theSubMesh,
+  set<const SMESH_subMesh*>&  theCommon )
+{
+  if ( !theSubMesh )
+    return;
+  list<const SMESH_subMesh*>::const_iterator it = theSubMeshList.begin();
+  for ( ; it != theSubMeshList.end(); it++ )
+    theSubMesh->FindIntersection( *it, theCommon );
+  theSubMeshList.push_back( theSubMesh );
+  //theCommon.insert( theSubMesh );
+}
+
+//=============================================================================
+/*!
+ * \brief Set submesh object order
+ * \param theSubMeshArray submesh array order
+ */
+//=============================================================================
+
+::CORBA::Boolean SMESH_Mesh_i::SetMeshOrder(const SMESH::submesh_array_array& theSubMeshArray)
+{
+  bool res = false;
+  ::SMESH_Mesh& mesh = GetImpl();
+
+  TPythonDump aPythonDump; // prevent dump of called methods
+  aPythonDump << "isDone = " << _this() << ".SetMeshOrder( [ ";
+
+  TListOfListOfInt subMeshOrder;
+  for ( int i = 0, n = theSubMeshArray.length(); i < n; i++ )
+  {
+    const SMESH::submesh_array& aSMArray = theSubMeshArray[i];
+    TListOfInt subMeshIds;
+    aPythonDump << "[ ";
+    // Collect subMeshes which should be clear
+    //  do it list-by-list, because modification of submesh order
+    //  take effect between concurrent submeshes only
+    set<const SMESH_subMesh*> subMeshToClear;
+    list<const SMESH_subMesh*> subMeshList;
+    for ( int j = 0, jn = aSMArray.length(); j < jn; j++ )
+    {
+      const SMESH::SMESH_subMesh_var subMesh = SMESH::SMESH_subMesh::_duplicate(aSMArray[j]);
+      if ( j > 0 )
+        aPythonDump << ", ";
+      aPythonDump << subMesh;
+      subMeshIds.push_back( subMesh->GetId() );
+      // detect common parts of submeshes
+      if ( _mapSubMesh.find(subMesh->GetId()) != _mapSubMesh.end() )
+        findCommonSubMesh( subMeshList, _mapSubMesh[ subMesh->GetId() ], subMeshToClear );
+    }
+    aPythonDump << " ]";
+    subMeshOrder.push_back( subMeshIds );
+
+    // clear collected submeshes
+    set<const SMESH_subMesh*>::iterator clrIt = subMeshToClear.begin();
+    for ( ; clrIt != subMeshToClear.end(); clrIt++ ) {
+      SMESH_subMesh* sm = (SMESH_subMesh*)*clrIt;
+        if ( sm )
+          sm->ComputeStateEngine( SMESH_subMesh::CLEAN );
+        // ClearSubMesh( *clrIt );
+      }
+  }
+  aPythonDump << " ])";
+
+  mesh.SetMeshOrder( subMeshOrder );
+  res = true;
+  
+  return res;
+}
+
+//=============================================================================
+/*!
+ * \brief Convert submesh ids into submesh interfaces
+ */
+//=============================================================================
+
+void SMESH_Mesh_i::convertMeshOrder
+(const TListOfListOfInt& theIdsOrder,
+ SMESH::submesh_array_array& theResOrder,
+ const bool theIsDump)
+{
+  int nbSet = theIdsOrder.size();
+  TPythonDump aPythonDump; // prevent dump of called methods
+  if ( theIsDump )
+    aPythonDump << "[ ";
+  theResOrder.length(nbSet);
+  TListOfListOfInt::const_iterator it = theIdsOrder.begin();
+  int listIndx = 0;
+  for( ; it != theIdsOrder.end(); it++ ) {
+    // translate submesh identificators into submesh objects
+    //  takeing into account real number of concurrent lists
+    const TListOfInt& aSubOrder = (*it);
+    if (!aSubOrder.size())
+      continue;
+    if ( theIsDump )
+      aPythonDump << "[ ";
+    // convert shape indeces into interfaces
+    SMESH::submesh_array_var aResSubSet = new SMESH::submesh_array();
+    aResSubSet->length(aSubOrder.size());
+    TListOfInt::const_iterator subIt = aSubOrder.begin();
+    for( int j = 0; subIt != aSubOrder.end(); subIt++ ) {
+      if ( _mapSubMeshIor.find(*subIt) == _mapSubMeshIor.end() )
+        continue;
+      SMESH::SMESH_subMesh_var subMesh =
+        SMESH::SMESH_subMesh::_duplicate( _mapSubMeshIor[*subIt] );
+      if ( theIsDump ) {
+        if ( j > 0 )
+          aPythonDump << ", ";
+        aPythonDump << subMesh;
+      }
+      aResSubSet[ j++ ] = subMesh;
+    }
+    if ( theIsDump )
+      aPythonDump << " ]";
+    theResOrder[ listIndx++ ] = aResSubSet;
+  }
+  // correct number of lists
+  theResOrder.length( listIndx );
+
+  if ( theIsDump ) {
+    // finilise python dump
+    aPythonDump << " ]";
+    aPythonDump << " = " << _this() << ".GetMeshOrder()";
+  }
+}
index e8598de3479d7af7f5d348a14cae49db0ca7e3fe..bed9819daa1b7717a37d1c15a23d46015c9daa9a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_Mesh_i.hxx
 //  Author : Paul RASCLE, EDF
@@ -58,7 +59,7 @@ class SMESH_I_EXPORT SMESH_Mesh_i:
 public:
   SMESH_Mesh_i( PortableServer::POA_ptr thePOA,
                 SMESH_Gen_i*            myGen_i,
-              CORBA::Long             studyId );
+                CORBA::Long             studyId );
 
   virtual ~SMESH_Mesh_i();
 
@@ -206,6 +207,8 @@ public:
    */
   char* GetVersionString(SMESH::MED_VERSION version, CORBA::Short nbDigits);
 
+  void ExportToMEDX( const char* file, CORBA::Boolean auto_groups, SMESH::MED_VERSION theVersion, CORBA::Boolean overwrite )
+    throw (SALOME::SALOME_Exception);
   void ExportToMED( const char* file, CORBA::Boolean auto_groups, SMESH::MED_VERSION theVersion )
     throw (SALOME::SALOME_Exception);
   void ExportMED( const char* file, CORBA::Boolean auto_groups )
@@ -305,6 +308,9 @@ public:
   SMESH::ElementType GetElementType( CORBA::Long id, bool iselem )
     throw (SALOME::SALOME_Exception);
   
+  SMESH::EntityType GetElementGeomType( CORBA::Long id )
+    throw (SALOME::SALOME_Exception);
+  
   /*!
    * Returns ID of elements for given submesh
    */
@@ -338,7 +344,7 @@ public:
   static SMESH::Hypothesis_Status
   ConvertHypothesisStatus (SMESH_Hypothesis::Hypothesis_Status theStatus);
 
-  static void PrepareForWriting (const char* file);
+  static void PrepareForWriting (const char* file, bool overwrite = true);
 
   //int importMEDFile( const char* theFileName, const char* theMeshName );
 
@@ -450,7 +456,16 @@ public:
    * Returns number of faces for given element
    */
   CORBA::Long ElemNbFaces(CORBA::Long id);
-  
+  /*!
+   * Returns nodes of given face (counted from zero) for given element.
+   */
+  SMESH::long_array* GetElemFaceNodes(CORBA::Long elemId, CORBA::Short faceIndex);
+
+  /*!
+   * Returns an element based on all given nodes.
+   */
+  CORBA::Long FindElementByNodes(const SMESH::long_array& nodes);
+
   /*!
    * Returns true if given element is polygon
    */
@@ -500,6 +515,16 @@ public:
   static void CollectMeshInfo(const SMDS_ElemIteratorPtr theItr,
                               SMESH::long_array&         theInfo);
                           
+
+  /*!
+   * \brief Return submesh objects list in meshing order
+   */
+  virtual SMESH::submesh_array_array* GetMeshOrder();
+  /*!
+   * \brief Set submesh object order
+   */
+  virtual ::CORBA::Boolean SetMeshOrder(const SMESH::submesh_array_array& theSubMeshArray);
+
   
   std::map<int, SMESH_subMesh_i*> _mapSubMesh_i; //NRI
   std::map<int, ::SMESH_subMesh*> _mapSubMesh;   //NRI
@@ -510,6 +535,13 @@ private:
    */
   void checkGroupNames();
 
+  /*!
+   * Convert submesh ids into submesh interfaces
+   */
+  void convertMeshOrder(const TListOfListOfInt&     theIdsOrder,
+                        SMESH::submesh_array_array& theSubMeshOrder,
+                        const bool                  theIsDump);
+
 private:
 
   static int myIdGenerator;
index 2345a4279fb460853ceb569feb942d8c834bb4fb..df42dd4f95a7d10fd7f1477243766cf3e9acccbc 100644 (file)
@@ -1,25 +1,25 @@
-// Copyright (C) 2008  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
 //
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
+//  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
+//  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
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File      : SMESH_NoteBook.cxx
 // Author    : Roman NIKOLAEV
-
+//
 #include "SMESH_2smeshpy.hxx"
 #include "SMESH_NoteBook.hxx"
 #include "SMESH_Gen_i.hxx"
@@ -41,14 +41,14 @@ static int MYDEBUG = 0;
 using namespace std;
 
 
-void SetVariable(Handle(_pyCommand) theCommand,const ObjectStates* theStates, int position, int theArgNb);
+void SetVariable(Handle(_pyCommand) theCommand,const SMESH_ObjectStates* theStates, int position, int theArgNb);
 
 //================================================================================
 /*!
  * \brief Constructor
  */
 //================================================================================
-ObjectStates::ObjectStates(TCollection_AsciiString theType)
+SMESH_ObjectStates::SMESH_ObjectStates(TCollection_AsciiString theType)
 {
   _type = theType;
   _dumpstate = 0;
@@ -59,7 +59,7 @@ ObjectStates::ObjectStates(TCollection_AsciiString theType)
  * \brief Destructor
  */
 //================================================================================
-ObjectStates::~ObjectStates()
+SMESH_ObjectStates::~SMESH_ObjectStates()
 {
 }
 
@@ -69,7 +69,7 @@ ObjectStates::~ObjectStates()
  * \param theState - Object state (vector of notebook variable)
  */
 //================================================================================
-void ObjectStates::AddState(const TState &theState)
+void SMESH_ObjectStates::AddState(const TState &theState)
 {
   _states.push_back(theState);
 }
@@ -80,7 +80,7 @@ void ObjectStates::AddState(const TState &theState)
  * \\retval state - Object state (vector of notebook variable)
  */
 //================================================================================
-TState ObjectStates::GetCurrectState() const
+TState SMESH_ObjectStates::GetCurrectState() const
 {
   if(_states.size() > _dumpstate)
     return _states[_dumpstate];
@@ -94,7 +94,7 @@ TState ObjectStates::GetCurrectState() const
  *
  */
 //================================================================================
-TAllStates ObjectStates::GetAllStates() const
+TAllStates SMESH_ObjectStates::GetAllStates() const
 {
   return _states;
 }
@@ -104,7 +104,7 @@ TAllStates ObjectStates::GetAllStates() const
  *
  */
 //================================================================================
-void ObjectStates::IncrementState()
+void SMESH_ObjectStates::IncrementState()
 {
   _dumpstate++;
 }
@@ -114,7 +114,7 @@ void ObjectStates::IncrementState()
  *
  */
 //================================================================================
-TCollection_AsciiString ObjectStates::GetObjectType() const{
+TCollection_AsciiString SMESH_ObjectStates::GetObjectType() const{
   return _type;
 }
 
@@ -125,7 +125,7 @@ TCollection_AsciiString ObjectStates::GetObjectType() const{
  */
 //================================================================================
 LayerDistributionStates::LayerDistributionStates():
-  ObjectStates("LayerDistribution")
+  SMESH_ObjectStates("LayerDistribution")
 {
 }
 //================================================================================
@@ -252,7 +252,7 @@ void SMESH_NoteBook::ReplaceVariables()
     if(it != _objectMap.end()) {
       if(MYDEBUG)
         cout << "Found object : " << (*it).first << endl;
-      ObjectStates *aStates = (*it).second;
+      SMESH_ObjectStates *aStates = (*it).second;
       // Case for LocalLength hypothesis
       if(aStates->GetObjectType().IsEqual("LocalLength") && aStates->GetCurrectState().size() >= 2) {
         if(aMethod.IsEqual("SetLength")) {
@@ -674,12 +674,12 @@ void SMESH_NoteBook::InitObjectMap()
       }
       if(MYDEBUG)
         cout<<"The object Type : "<<anObjType<<endl;
-      ObjectStates *aState = NULL;
+      SMESH_ObjectStates *aState = NULL;
       if(anObjType == "LayerDistribution") {
         aState = new LayerDistributionStates();
       }
       else
-        aState = new  ObjectStates(anObjType);
+        aState = new  SMESH_ObjectStates(anObjType);
       
       for(int i = 0; i < aSections->length(); i++) {
         TState aVars;
@@ -697,7 +697,7 @@ void SMESH_NoteBook::InitObjectMap()
         }
         aState->AddState(aVars);
       }
-      _objectMap.insert(pair<TCollection_AsciiString,ObjectStates*>(TCollection_AsciiString(aSObject->GetID()),aState));
+      _objectMap.insert(pair<TCollection_AsciiString,SMESH_ObjectStates*>(TCollection_AsciiString(aSObject->GetID()),aState));
     }
   }
 }
@@ -850,10 +850,10 @@ bool SMESH_NoteBook::GetReal(const TCollection_AsciiString& theVarName, double&
 
 
 /*!
- *  Set variable of the ObjectStates from position to the _pyCommand
+ *  Set variable of the SMESH_ObjectStates from position to the _pyCommand
  *  method as nbArg argument
  */
-void SetVariable(Handle(_pyCommand) theCommand, const ObjectStates* theStates, int position, int theArgNb)
+void SetVariable(Handle(_pyCommand) theCommand, const SMESH_ObjectStates* theStates, int position, int theArgNb)
 {
   if(theStates->GetCurrectState().size() > position)
     if(!theStates->GetCurrectState().at(position).IsEmpty())
index dfeb3b50a23123e704fce386104e7b1b8b6bf0c0..94e348ecda8f21ac9452630106e7d480001586a4 100644 (file)
@@ -1,26 +1,25 @@
-// Copyright (C) 2008  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
 //
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
+//  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
+//  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
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File      : SMESH_NoteBook.hxx
 // Author    : Roman NIKOLAEV ()
-
-
+//
 #ifndef SMESH_NoteBook_HeaderFile
 #define SMESH_NoteBook_HeaderFile
 
@@ -36,12 +35,12 @@ typedef std::vector<TCollection_AsciiString>  TState;
 typedef std::vector<TState>                   TAllStates;
 typedef TCollection_AsciiString _pyID;
 
-class ObjectStates{
+class SMESH_ObjectStates{
   
 public:
   
-  ObjectStates(TCollection_AsciiString theType);
-  virtual ~ObjectStates();
+  SMESH_ObjectStates(TCollection_AsciiString theType);
+  virtual ~SMESH_ObjectStates();
 
   void AddState(const TState &theState);
 
@@ -58,7 +57,7 @@ private:
   int                                       _dumpstate;
 };
 
-class LayerDistributionStates : public ObjectStates
+class LayerDistributionStates : public SMESH_ObjectStates
 {
 public:
   typedef std::map<TCollection_AsciiString,TCollection_AsciiString> TDistributionMap;
@@ -81,7 +80,7 @@ private:
 class SMESH_NoteBook
 {
 public:
-  typedef std::map<TCollection_AsciiString,ObjectStates*> TVariablesMap;
+  typedef std::map<TCollection_AsciiString,SMESH_ObjectStates*> TVariablesMap;
   typedef std::map<TCollection_AsciiString,TCollection_AsciiString> TMeshEditorMap;
   SMESH_NoteBook();
   ~SMESH_NoteBook();
index f3f1fcfbc2c4d7294ad93305c64ea988fadd841a..3d725b8fb6e47dcaf126d53c2573399668827e38 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 // File      : SMESH_Pattern_i.cxx
 // Created   : Fri Aug 20 16:15:49 2004
index 8526ef9ad405d4e5b61043b1af675ea70605ad79..5d5003ab8de92fe5c648e8916f41f28393454e64 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 // File      : SMESH_Pattern_i.hxx
 // Created   : Fri Aug 20 16:03:15 2004
index 10d6dd85c8a65d112d21a9e23ac08ab8ebdb40f9..afcd15ddb6cb7baf0db12b34898c9d5f12841d7b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _SMESH_PYTHONDUMP_HXX_
 #define _SMESH_PYTHONDUMP_HXX_
 
@@ -117,6 +118,12 @@ namespace SMESH
     TPythonDump& 
     operator<<(const SMESH::double_array& theArg);
 
+    TPythonDump& 
+    operator<<(SMESH::SMESH_Hypothesis_ptr theArg);
+
+    TPythonDump& 
+    operator<<(SMESH::SMESH_IDSource_ptr theArg);
+
     TPythonDump& 
     operator<<(SALOMEDS::SObject_ptr theArg);
 
index 2720de2c73b981c3a92316c5291d137b8358dab2..301f1a972c9554ec4786f4983da0019798ca3b1e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_subMesh_i.cxx
 //  Author : Paul RASCLE, EDF
index 5a6eb8bd8ed34c63014ae8a4ff90858762bf85f0..bd53171aeac521e991f200ab5ca5159e683160c9 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : SMESH_subMesh_i.hxx
 //  Author : Paul RASCLE, EDF
index 5b820f22f30795abffc6095c63b0f5795ff1ec68..48a4836885dc1f173c85b7a43923ee87abdd4865 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 #  File   : smeshpy.py
 #  Module : SMESH
index 7b6ef9fe4f8c416a4aeca70ee4ebe176a109bb95..5a616b918e67bdc4a8b8610c68ed3156cf1e19d7 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : Makefile.in
 #  Author : Nicolas REJNERI, Paul RASCLE
 #  Modified by : Alexander BORODIN (OCN) - autotools usage
index 523429d2bb29020c24975a83d8eb2d0f71e319db..db62e40ce9bbeeaf6aac97903c5cce0fb3e32dd3 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 import salome
 import geompy
 import smesh
@@ -54,7 +55,7 @@ Id_face1 = geompy.addToStudy(face1,"Face1")
 
 
 #-----------------------------SMESH-------------------------------------------
-
+smesh.SetCurrentStudy(salome.myStudy)
 
 # -- Init mesh --
 plane_mesh = salome.IDToObject( Id_face1)
index 35bd54cda299820577daf6364117a23922372b1d..bdf8ba02e5eff4d289e79511f4343dc573b224e8 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File        : SMESH_testExtrusion2D.py
 #  Module      : SMESH
 #  Description : Create meshes to test extrusion of mesh elements along path
@@ -52,6 +53,7 @@ id_ellipse2 = geompy.addToStudy(ellipse2, "Ellips 2")
 
 
 #---------------------------------SMESH
+smesh.SetCurrentStudy(salome.myStudy)
 
 # create the path mesh
 mesh1 = smesh.Mesh(ellipse1, "Path Mesh")
index bc4e115f035d5c9aa41d07c751870b60b226dd00..156a86dc9bebb86c63aae364e2b0030d32d83fe9 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File        : SMESH_testExtrusion3D.py
 #  Module      : SMESH
 #  Description : Create meshes to test extrusion of mesh elements along path
@@ -50,6 +51,7 @@ idcircle = geompy.addToStudy(circle, "Circle")
 idface   = geompy.addToStudy(face,   "Circular face")
 
 
+smesh.SetCurrentStudy(salome.myStudy)
 
 # init a Mesh with the circular face
 mesh1 = smesh.Mesh(face, "Mesh on circular face")
index a480d029f261ad09da17a8781f6c896771755877..2e5ae0bfcc87af61b7df5203424d471a50b0f73d 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,8 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
+import salome
 import smesh
 import math
 
@@ -51,7 +53,8 @@ def GetNewNodes(mesh,Elems,OldNodes):
         pass
     return newnodes
             
-    
+smesh.SetCurrentStudy(salome.myStudy)
+
 # create empty mesh
 mesh = smesh.Mesh()
 
index 0ba648118dfc84489a79bd64e026741c1a70c16a..02047a1cf648158016f833022995e13d43b4eed8 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 from SMESH_test1 import *
 
 ## Old style
index e82abfa409e4d1b0d198e0206993a0110c7481b7..2ed6eb0e8fe0e2c79f214cca4c45af761908008b 100644 (file)
@@ -1,8 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -20,6 +17,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : SMESH_BuildCompound.py
 #  Author : Alexander KOVALEV
 #  Module : SMESH
@@ -29,6 +27,7 @@
 # ! as some sequences of symbols from this example are used during
 # ! documentation generation to identify certain places of this file
 #
+import salome
 import geompy
 import smesh
 
@@ -61,6 +60,8 @@ geompy.addToStudy(Box_sup, "Box_sup")
 geompy.addToStudyInFather(Box_sup, Fsup2, "Fsup")
 geompy.addToStudyInFather(Box_sup, Finf2, "Finf")
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 ## create a bottom mesh
 Mesh_inf = smesh.Mesh(Box_inf, "Mesh_inf")
 algo1D_1=Mesh_inf.Segment()
index e4763c0b05ff338874bbdd8c796f53a7a7db5012..a91a7c29e3d20d2aaa74a974dc9ffbba50cdd90e 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : SMESH_GroupFromGeom.py
 #  Module : SMESH
 #
index 85dbd4056c7360b7633963ee4d6af35112b4ba04..d7643bfdfbe146cc531c4aaab9d8c546af964eff 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #==============================================================================
 #  Info.
 #  Bug (from script, bug)   : SMESH_GroupFromGeom.py, PAL6945
index 816dede851bb7945cf47fe7dec125bffc936c9db..e0cbb6404ca0a6eec48c0c7b08a96e105e1722ba 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
+import salome
 import smesh
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 def BuildGroupLyingOn(theMesh, theElemType, theName, theShape):
     aFilterMgr = smesh.smesh.CreateFilterManager()
     aFilter = aFilterMgr.CreateFilter()
index 11428f8c5d0d5e8a6c296e18d782e99155762801..801e554f15e0acdf535f9501bb95a1ca3fc05c83 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #####################################################################
 #Created                :17/02/2005
 #Auhtor                 :MASLOV Eugeny, KOVALTCHUK Alexey 
@@ -97,6 +98,8 @@ Cut_1_ID = geompy.addToStudy(Cut_1, "Cut_1")
 
 #Mesh creation
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # -- Init --
 shape_mesh = salome.IDToObject( Cut_1_ID )
 
index e3af5d2d1fbd5d70ffc99c3f0541d909d20112fb..1fef52a731751c8a60fffcaeb2ffa351c6439f48 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # Tetrahedrization of the geometry generated by the Python script GEOM_Partition1.py
 # Hypothesis and algorithms for the mesh generation are global
 # -- Rayon de la bariere
@@ -119,6 +120,7 @@ status = geompy.CheckShape(alveole)
 print " check status ", status
 
 # ---- launch SMESH
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the alveole
 shape_mesh = salome.IDToObject( idalveole )
index 3b1ca2e79b8a6f9c851d7ed6fa6c694237c3f9cc..63d7464181cedd807c206ffa37aea6cc1fe6e05f 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  GEOM GEOM_SWIG : binding of C++ omplementaion with Python
 #  File   : GEOM_Sphere.py
 #  Author : Damien COQUERET, Open CASCADE
@@ -103,6 +104,7 @@ Id_Result      = addToStudy(Result, "Result")
 
 #-----------------------------------------------------------------------
 #Meshing
+smesh.SetCurrentStudy(salome.myStudy)
 my_hexa = smesh.Mesh(Result, "Sphere_Mesh")
 algo = my_hexa.Segment()
 algo.NumberOfSegments(NbSeg)
index d3e744d5fa7d16e7b583e6bebd038b031a291d41..ddbc7d5e746c27622eea0d2e4d0cae80b48287f1 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH SMESH_SWIG : binding of C++ implementaion with Python
 #  File   : SMESH_blocks.py
 #  Author : Julia DOROVSKIKH
@@ -36,6 +37,7 @@ import GEOM_Spanner
 isBlocksTest = 0 # False
 isMeshTest   = 1 # True
 
+smesh.SetCurrentStudy(salome.myStudy)
 
 GEOM_Spanner.MakeSpanner(geompy, math, isBlocksTest, isMeshTest, smesh)
 
index 8a1b39cacc6f50009785eee6dcc898806d438e84..c8df0179d8ef466205cc4e0763fdedd931faa527 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #==============================================================================
 #  Info.
 #  Bug (from script, bug)   : box.py, PAL5223
@@ -47,6 +48,7 @@ box    = geompy.MakeBox(0.,0.,0.,1.,1.,1.)
 boxId  = geompy.addToStudy(box,"box")
 
 # ---- SMESH
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh
 
index 79cf3b536b56121d39b727420c0b77954db5b65d..365d64d94288a82e46d77a5112735d38cf107a56 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # Tetrahedrization of the geometry union of 2 boxes having a face in common
 # Hypothesis and algorithms for the mesh generation are global
 #
@@ -73,6 +74,7 @@ print "number of Edges  in shell : ", len(subEdgeList)
 
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the shell
 
index fd1b3ef62e52524de61cab9683b1d6f9607d37cc..19eb230da5900c50739f3fead8fbb050cc9de35d 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # Tetrahedrization of the geometry union of 3 boxes aligned where the middle
 # one has a race in common with the two others.
 # Hypothesis and algorithms for the mesh generation are global
@@ -84,7 +85,7 @@ print "number of Edges  in shell : ", len(subEdgeList)
 
 
 ### ---------------------------- SMESH --------------------------------------
-
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the shell
 
index 279ae11ab57f44fc3d4b5d2239f084a3e7e1a6b6..42bc5533618305bac6284b4b2b189b9f7891da01 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # Tetrahedrization of a simple box. Hypothesis and algorithms for
 # the mesh generation are global
 #
@@ -45,6 +46,7 @@ print "number of Edges  in box : ", len(subEdgeList)
 
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the boxe
 
index 41e561329c34c185b947054811acb294a9e1b631..43c1b5874d4917ff8a7a58eb0925031d6a43c08a 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : SMESH_control.py
 #  Author : Sergey LITONIN
 #  Module : SMESH
index f5f6d65e50323ae91c3226609b64668b9f22568d..232f4efa9a3433b1bae4f8b58af7d1644749797a 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #==============================================================================
 #  Info.
 #  Bug (from script, bug)   : SMESH_demo_hexa2_upd.py, PAL6781
@@ -124,6 +125,7 @@ for i in range(8):
     idEdgeZ.append(geompy.addToStudyInFather(vol,edgeZ[i],"EdgeZ"+str(i+1)))
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the volume
 
index bb406f035f8097bb26e264404c2fae31bfc057ef..ee6ae836a43e19f12bcaf9f9da38b585aad577c7 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : SMESH_fix_volute.py
 #  Author : Paul RASCLE, EDF
 #  Module : SMESH
index 6a73b38b8161acc44a69a1fe7fffbbfa942654a0..e67021c5db14330a63378ec56dd78461516bbdc1 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # Hexahedrization of the geometry generated by the Python script
 # SMESH_fixation.py
 # Hypothesis and algorithms for the mesh generation are global
@@ -45,6 +46,7 @@ status = geompy.CheckShape(compshell)
 print " check status ", status
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the compshell
 shape_mesh = salome.IDToObject( idcomp  )
index 16295a5e5c8ef51f963797586e897da5d5e522a2..789c90ebc1dc1cfb310791525e1dc76a5391267f 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # Tetrahedrization of the geometry generated by the Python script
 # SMESH_fixation.py
 # The new Netgen algorithm is used that discretizes baoundaries itself
@@ -45,6 +46,7 @@ status = geompy.CheckShape(compshell)
 print " check status ", status
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 print "-------------------------- create Mesh, algorithm, hypothesis"
 
index 483cd666dd60474f4cd8a1447a98beb01d04da16..fa63ce0cbe6a9a1be427c24a0714f7bd7d9a5d27 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # Tetrahedrization of the geometry generated by the Python script
 # SMESH_fixation.py
 # Hypothesis and algorithms for the mesh generation are global
@@ -45,6 +46,7 @@ status = geompy.CheckShape(compshell)
 print " check status ", status
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the compshell
 
index 534bed16cca0105d2722da8bc056d1e682c90665..7ab3583b587f52b9a3a3ac06946c83cd7ae1f48e 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # Triangulation of the skin of the geometry from a Brep representing a plane
 # Hypothesis and algorithms for the mesh generation are global
 #
@@ -55,6 +56,7 @@ print "number of Edges  in flight : ", len(subEdgeList)
 
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the shell
 shape_mesh = salome.IDToObject( idShape )
index 4c5fc646da63f7aff9abb41d19edac0ce36caa96..cc864aab86fc88080e2efdfa2868b51486891028 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 import salome
 import geompy
 import smesh
@@ -41,6 +42,7 @@ idbox = geompy.addToStudy( aBox, "box" )
 aBox  = salome.IDToObject( idbox )
 
 # Create mesh
+smesh.SetCurrentStudy(salome.myStudy)
 
 mesh = smesh.Mesh(aBox, "Mesh_freebord")
 
index 4345b08b8f2d009275f3e29bf71dfe6746fb2434..6c1abaa26fbb1bb8e1a03405d2d3ecbf7803bd09 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #==============================================================================
 #  Info.
 #  Bug (from script, bug)   : hexaedre_modified.py, PAL6194, PAL7153
@@ -95,6 +96,7 @@ salome.sg.updateObjBrowser(1)
 # -----------------------------------------------------------------------------
 
 print "-------------------------- mesh"
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- init a Mesh with the geom shape
 shape_mesh = blob
index 46032383c3e42f518f304cc6ef9e1cf9a7c1629a..6b84327cc05fca7c767353882a93d4d9bcf07c3f 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : SMESH_withHole.py
 #  Author : Lucien PIGNOLONI
 #  Module : SMESH
@@ -120,6 +121,7 @@ name      = geompy.SubShapeName( sub_face4, mechanic )
 Id_SubFace4 = geompy.addToStudyInFather( mechanic, sub_face4, name )
 
 # ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # -- Init --
 shape_mesh = salome.IDToObject( Id_mechanic )
index 9ff0027040430d23ac0922d6e872d402ec0a34b2..94c0719ffb13b6cd4dad3511c34d1e8e3e9b0d78 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : SMESH_withHole.py
 #  Author : Lucien PIGNOLONI
 #  Module : SMESH
@@ -118,6 +119,7 @@ name      = geompy.SubShapeName( sub_face4, mechanic )
 Id_SubFace4 = geompy.addToStudyInFather( mechanic, sub_face4, name )
 
 # ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 # -- Init --
 shape_mesh = salome.IDToObject( Id_mechanic )
index 038e64e0b655c818e85d4f6eef542eed9679dbc9..21f787040a8e57ebf047195a539e94fb48eab925 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # Quadrangulation of the geometry generated by the Python script
 # SMESH_mechanic.py
 # The new Netgen algorithm is used that discretizes baoundaries itself
@@ -104,6 +105,7 @@ print "number of Faces in mechanic : ",len(subFaceList)
 print "number of Edges in mechanic : ",len(subEdgeList)
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 print "-------------------------- create Mesh, algorithm, hypothesis"
 
index 1307067df0221544f50b94b2ccbdbfc0d1b39fa5..c72428bff0fcf573d88c5350160bb3a22266ea3b 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : SMESH_withHole.py
 #  Author : Lucien PIGNOLONI
 #  Module : SMESH
@@ -104,6 +105,7 @@ print "number of Faces in mechanic : ",len(subFaceList)
 print "number of Edges in mechanic : ",len(subEdgeList)
 
 ### ---------------------------- SMESH --------------------------------------
+smesh.SetCurrentStudy(salome.myStudy)
 
 shape_mesh = salome.IDToObject( Id_mechanic  )
 
index 92005898dcc50b012e6d119c4ee66de69c5ef389..06dd5706c34f70cf3f293d1d292ce5bab2622d79 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : SMESH_reg.py
 #  Module : SMESH
 #
@@ -58,7 +59,7 @@ salome.sg.updateObjBrowser(1);
 # ---- launch SMESH
 smeshgui = salome.ImportComponentGUI("SMESH")
 smeshgui.Init(salome.myStudyId)
-
+smesh.SetCurrentStudy(salome.myStudy)
 
 # ---- Creating meshes
 
index 594832b32dbd3630a55aadc3f3f059b1cb794efe..9db144125edb38ebe8086f5d9a7a88df8ad52e7a 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 """
 
 """
index da4eda8435792be5748c968878892caaed30a8d6..a80121aa4ea2f056b131c378b6bb1f4369ad35c8 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 #  File   : SMESH_test.py
 #  Module : SMESH
@@ -56,6 +57,7 @@ ide = geompy.addToStudyInFather(face, edge, name)
 
 # ---- SMESH
 
+smesh.SetCurrentStudy(salome.myStudy)
 box = salome.IDToObject(idb)
 mesh = smesh.Mesh(box, "Meshbox")
 
@@ -124,11 +126,17 @@ for a in log:
     elif comType == 2:
         for i in range(a.number):
             ind = a.indexes[ii]
+           print ind
             ii = ii+1
+           print ii
             i1 = a.indexes[ii]
             ii = ii+1
             i2 = a.indexes[ii]
+           print i2
             ii = ii+1
+           print "ii", ii
             i3 = a.indexes[ii]
+           print i3
+            #ii = ii+1
             ii = ii+1
             print "AddTriangle %i - %i %i %i" % (ind, i1, i2, i3)
index 407d25ead854922ef79cabc84f9b24fb8316b58d..3a0f73c23701bd1060cb264cc2ca7cd0b2aa5fdf 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : SMESH_test0.py
 #  Module : SMESH
 #
index cd68018d2fb63d04b2a6cf0de3dc20108ee7c21a..e5f964768abe440e5f562ba7509daa1c7daeaa37 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : SMESH_test1.py
 #  Module : SMESH
 #
@@ -27,7 +28,6 @@ import salome
 import geompy
 import smesh
 
-
 # ---- define a box
 
 box = geompy.MakeBox(0., 0., 0., 100., 200., 300.)
@@ -60,6 +60,8 @@ idedge = geompy.addToStudyInFather(face, edge, name)
 
 # ---- SMESH
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # ---- Init a Mesh with the box
 
 mesh = smesh.Mesh(box, "Meshbox")
index c87694894c9eb8201feada5aa7f79daf9412ef56..cedeabc9221187d8719d5b4c522364d4225fdc41 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : SMESH_test1.py
 #  Module : SMESH
 #
@@ -60,6 +61,8 @@ idedge = geompy.addToStudyInFather(face, edge, name)
 
 # ---- SMESH
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # ---- Init a Mesh with the box
 
 mesh = smesh.Mesh(box, "Meshbox")
index 01c91297383fd357ddc452fd14bc2583d6c009b8..cc3d1a2e8f8230631cd947bdb23f7d40b557a922 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : SMESH_test2.py
 #  Module : SMESH
 #
index a2c771b80fffc0c7104509d81a2873fee93b7359..1a02159ed2b92e71b84681fcf16f0d4465b64ef6 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : SMESH_test3.py
 #  Module : SMESH
 #import salome
index 18183393469b6fc3d05d8a3475cd95c2bd740632..f5357c5e7ad24639cc87699ede07695e8394e985 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 import salome
 import geompy
 import smesh
@@ -40,6 +41,7 @@ face = salome.IDToObject(idface)
 
 # ---- SMESH
 
+smesh.SetCurrentStudy(salome.myStudy)
 mesh = smesh.Mesh(box, "Meshbox")
 
 # Set 1D algorithm/hypotheses to mesh
index 616f0e39ded82148ccc667e474743da7eff00deb..844c9151196bad788eee9a1f1c9401ec09205506 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : SMESH_test5.py
 #  Module : SMESH
 #
@@ -30,6 +31,8 @@ import CORBA
 import os
 import os.path
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 def SetSObjName(theSObj,theName) :
     ok, anAttr = theSObj.FindAttribute("AttributeName")
     if ok:
index 0e768a4d1849e9883b539e51d379ce6ea46fce8b..a4bc7ecf50c829556c6591c8f4d75d0c29fc95eb 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 import os
 import re
 
index eb2c4e1fe4b2a9069d1e856943eee49d52638941..2b3e64bc421f964208fe820ed5b34dbd4e775776 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : batchmode_smesh.py
 #  Author : Oksana TCHEBANOVA
 #  Module : SMESH
@@ -33,6 +34,7 @@ import SMESH
 modulecatalog = naming_service.Resolve("/Kernel/ModulCatalog")
 
 smesh = lcc.FindOrLoadComponent("FactoryServer", "SMESH")
+smesh.SetCurrentStudy(myStudy)
 myStudyBuilder = myStudy.NewBuilder()
 
 if myStudyBuilder is None:
index 0ef515b9cf336bfbb2803c93e8a487be474f09e5..0977fa2021a29a86f0bba213785422ce3bf0c070 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # ==================================
 # Load all examples
 # -----------------
index 34bb6e39d575338774e82cd4fb08e9ce8a468f58..888a70642ec06cafebd4537b9ebcfc8f222deea5 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -287,6 +288,8 @@ piece_id = addToStudy(piece, "ex01_cube2build")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create hexahedrical mesh on piece
 # ---------------------------------
 
index 885d8722a7c5631216adeefcbcebf845aeea872e..3890e97d416d612e551f3b83b5638656480d0b7f 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -98,6 +99,8 @@ piece_id = addToStudy(piece, "ex02_cube2primitive")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create hexahedrical mesh on piece
 # ---------------------------------
 
index d620a641157772221a57e63df6e3ebcf7777294c..6ca0bd7a3f408cab0ee04665da665e24a41cb060 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -85,6 +86,8 @@ piece_id = addToStudy(piece, "ex03_cube2partition")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create hexahedrical mesh on piece
 # ---------------------------------
 
index 02f6f2c87ef5ab972060130838c686ee4a8b428d..ae3ca45f5bbccb87d8be861c7ce4c6df170f2b11 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -66,6 +67,8 @@ piece_id = addToStudy(piece, "ex04_cube5tetraHexa")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index 31793da2e4624562b02d769e84b50ea7040e2b28..4b3c77581d8e2d6ed97e1283657dbb27a58d4816 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -124,6 +125,8 @@ piece_id = addToStudy(piece, "ex05_hole1build")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index acdc7f5e9925d37b34c2e2de4711167db8599a16..3c50545900e24c6fc0c796d8d3b1f227d4af9749 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -118,6 +119,8 @@ piece_id = addToStudy(piece, "ex06_hole1boolean")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index 4ca5c481db38baecb5723a2def372813e21981fa..6ef4f6c3d44106e182890e50fc1b74b376a752e7 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -82,6 +83,8 @@ piece_id = addToStudy(piece, "ex07_hole1partition")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index cb417562eee9f62a24428454c4e4cee694e38e05..3e6e01b999f0e782e40e2bfb81379c7f1d3465b4 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -115,6 +116,8 @@ piece_id = addToStudy(piece, "ex08_hole2build")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index 4fd9c6db21644888051ff2f68ef80410ff7ff5cc..be1c47d3d084caa90c005174715ab81bd21e428c 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -118,6 +119,8 @@ piece_id = addToStudy(piece, "ex09_grid4build")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index f9a8c399b4d77eeb70eaa55d00444fb0c13aba12..3c0d92706c22e056cb3b0ca14e7fc9aa52d453c0 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -80,6 +81,8 @@ piece_id = addToStudy(piece, "ex10_grid4geometry")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index 1ed38c03b3d3f122b9f67d3ab0d2fe557952715f..6b2407af9673b36a36b123049aaa586a575e04eb 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -101,6 +102,8 @@ piece_id = addToStudy(piece, "ex11_grid3partition")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index 3499a3e0bba07f47fa429b886b360bba4dca6e82..d4ecdc1d34e86a18617f41231b028fe5b0a1ff57 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -116,6 +117,8 @@ piece_id = addToStudy(piece, "ex12_grid17partition")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index 609f48052624f0f3fe03305f3c491bb5e87793e1..c1108065734c10399e5f3212218f32ac4a1d5507 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # ==================================
 #
 from geompy import *
@@ -214,6 +215,8 @@ piece_id = addToStudy(piece, "ex13_hole1partial")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a mesh
 # -------------
 
index 1c89971fce38dda2a87df88b3de05938d7a10a46..7f1b1592f41599dcee5d421b3d86580317fcb40b 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -99,6 +100,8 @@ piece_id = addToStudy(piece, "ex14_cyl1holed")
 # Maillage
 # ========
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Creer un maillage hexahedrique
 # ------------------------------
 
index 72a0a4b92594e33d95f52c9482e3ce719826e012..8231b04905fb6113943fd74d2adaedc261c67743 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -168,7 +169,7 @@ cpd = cpd + r_element
 # Compound
 # --------
 
-piece = RemoveExtraEdges(MakeCompound(cpd), 0)
+piece = RemoveExtraEdges(MakeCompound(cpd), True)
 
 # Ajouter la piece dans l'etude
 # -----------------------------
@@ -178,6 +179,8 @@ piece_id = addToStudy(piece, "ex15_cyl2geometry")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index 4a3adf337077e044acd5b5d10c867914c44580dc..b46d1124182d45db432117283d5fb661c90b72e7 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -108,6 +109,8 @@ piece_id = addToStudy(piece, "ex16_cyl2complementary")
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index c94136b20e309192a0b8717918bf7968908488fd..911fdce174ee2d6e1608865d6d3a3adac75bfcf8 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -81,6 +82,8 @@ piece_id = addToStudy(piece, "ex17_dome1")
 # Maillage
 # ========
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Maillage hexahedrique
 # ---------------------
 
index fc78722d7096d00943b9b2ab9f1608c32d4ed862..6a614064d61d3990ae33de802669fc175ba567df 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 #
 from geompy import *
@@ -118,6 +119,8 @@ piece_id = addToStudy(piece, "ex18_dome2")
 # Maillage
 # ========
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Maillage hexahedrique
 # ---------------------
 
index 53b6e2ae64e2b663fe9a4e183250ac186d5e4ebe..043a2e3128e465fc6663df3e9b6d5098b420d689 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # ==================================
 #
 from geompy import *
@@ -168,6 +169,8 @@ UnionList(groupe, groupe_sphere)
 # Meshing
 # =======
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Create a hexahedral mesh
 # ------------------------
 
index b7a511d4d113c73d94e9b8ea2b158c80653d9ee1..3bb7272f3b93ecab914fbbbdb6690c8fbd209534 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # ==================================
 #
 from geompy import *
@@ -93,6 +94,8 @@ UnionIDs(group, faces)
 # Create a mesh
 # =============
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 # Define a mesh on a geometry
 # ---------------------------
 
index 2e7b52d821c0cddd52ecd42b626d40de57f9e5e1..6dd999cf5409882ba272c9a3b91fe06c58451a3c 100644 (file)
@@ -1,8 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # ==================================
 #
 import math
 
 import geompy
 import smesh
-
+import salome
 geo = geompy
 
 # Parameters
@@ -98,6 +96,8 @@ geo.DifferenceList(group_1, [group_1_box])
 # Mesh the blocks with hexahedral
 # -------------------------------
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 def discretize(x, y, z,  n, s=blocks):
     p = geo.MakeVertex(x, y, z)
     e = geo.GetEdgeNearPoint(s, p)
index 2f378a1b180466444549e0ca269ad9102936e762..ad6425781f4b1b73ce83174877db72b365028b3c 100644 (file)
@@ -1,8 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -20,6 +17,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # =======================================
 # Procedure that take a triangulation and split all triangles in 4 others triangles
 #
index f1a857d9a1cb620394450554ac7bdbb66510fa79..4dfff9ffe15e67b237604d2d5a751ff440515e9c 100755 (executable)
@@ -1,4 +1,22 @@
 #  -*- coding: iso-8859-1 -*-
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 import sys
 import salome
@@ -16,7 +34,7 @@ global Face_1
 Face_1 = geompy.MakeFaceHW(100, 100, 1)
 geompy.addToStudy( Face_1, "Face_1" )
 
-#smesh.smesh.SetCurrentStudy(aStudyId)
+smesh.SetCurrentStudy(salome.myStudy)
 import StdMeshers
 pattern = smesh.GetPattern()
 Mesh_1 = smesh.Mesh(Face_1)
index 61a0350225bdeaf088d53e8ed66c8c071e3ed309..5972e7f2dc37027ed0969de0fa2aaca38be707b1 100644 (file)
@@ -1,7 +1,25 @@
 #  -*- coding: iso-8859-1 -*-
-# CEA/LGLS 2008, Christian Van Wambeke (CEA/LGLS), Francis KLOSS (OCC)
-# ====================================================================
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
+# ====================================================================
+#
 import os
 
 import geompy
@@ -28,6 +46,8 @@ geompy.addToStudy(cylinder, "Cylinder")
 # Define a mesh on a geometry
 # ---------------------------
 
+smesh.SetCurrentStudy(salome.myStudy)
+
 m = smesh.Mesh(cylinder)
 
 # 2D mesh with BLSURF
index 7f4600d3ff3e1bf52ebb33c4f878dcc1cd7e1657..56d74c6ce0ec7b150c1f7e68e2a58ff3052f9474 100755 (executable)
@@ -1,4 +1,22 @@
 #  -*- coding: iso-8859-1 -*-
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 import sys
 import salome
@@ -18,7 +36,7 @@ global Box_1
 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
 geompy.addToStudy( Box_1, "Box_1" )
 
-#smesh.smesh.SetCurrentStudy(theStudy)
+smesh.SetCurrentStudy(salome.myStudy)
 import StdMeshers
 Mesh_1 = smesh.Mesh(Box_1)
 Regular_1D = Mesh_1.Segment()
index 217439fa5940383888860fdf85f2106590428be4..a3188f96e8b54c9dc693cd06fd91fa236da5a74c 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#  Copyright (C) 2007-2010  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
@@ -20,6 +20,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : smesh.py
 #  Author : Francis KLOSS, OCC
 #  Module : SMESH
index 4789415c96b2ac875e48a97c99d1d6f60d907771..4cde48b12cdb848136938135f8bb726f787d1a62 100644 (file)
@@ -1,8 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -20,6 +17,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  File   : smesh.py
 #  Author : Francis KLOSS, OCC
 #  Module : SMESH
@@ -99,6 +97,7 @@ from   SMESH import *
 import StdMeshers
 
 import SALOME
+import SALOMEDS
 
 # import NETGENPlugin module if possible
 noNETGENPlugin = 0
@@ -162,6 +161,8 @@ Hexa    = 8
 Hexotic = 9
 BLSURF  = 10
 GHS3DPRL = 11
+QUADRANGLE = 0
+RADIAL_QUAD = 1
 
 # MirrorType enumeration
 POINT = SMESH_MeshEditor.POINT
@@ -194,6 +195,10 @@ DefaultSize, DefaultGeom, Custom = 0,0,1
 
 PrecisionConfusion = 1e-07
 
+# TopAbs_State enumeration
+[TopAbs_IN, TopAbs_OUT, TopAbs_ON, TopAbs_UNKNOWN] = range(4)
+
+
 ## Converts an angle from degrees to radians
 def DegreesToRadians(AngleInDegrees):
     from math import pi
@@ -391,13 +396,33 @@ NO_NAME = "NoName"
 
 ## Gets object name
 def GetName(obj):
-    ior  = salome.orb.object_to_string(obj)
-    sobj = salome.myStudy.FindObjectIOR(ior)
-    if sobj is None:
-        return NO_NAME
-    else:
-        attr = sobj.FindAttribute("AttributeName")[1]
-        return attr.Value()
+    if obj:
+        # object not null
+        if isinstance(obj, SALOMEDS._objref_SObject):
+            # study object
+            return obj.GetName()
+        ior  = salome.orb.object_to_string(obj)
+        if ior:
+            # CORBA object
+            studies = salome.myStudyManager.GetOpenStudies()
+            for sname in studies:
+                s = salome.myStudyManager.GetStudyByName(sname)
+                if not s: continue
+                sobj = s.FindObjectIOR(ior)
+                if not sobj: continue
+                return sobj.GetName()
+            if hasattr(obj, "GetName"):
+                # unknown CORBA object, having GetName() method
+                return obj.GetName()
+            else:
+                # unknown CORBA object, no GetName() method
+                return NO_NAME
+            pass
+        if hasattr(obj, "GetName"):
+            # unknown non-CORBA object, having GetName() method
+            return obj.GetName()
+        pass
+    raise RuntimeError, "Null or invalid object"
 
 ## Prints error message if a hypothesis was not assigned.
 def TreatHypoStatus(status, hypName, geomName, isAlgo):
@@ -432,10 +457,12 @@ def TreatHypoStatus(status, hypName, geomName, isAlgo):
         return
     hypName = '"' + hypName + '"'
     geomName= '"' + geomName+ '"'
-    if status < HYP_UNKNOWN_FATAL:
+    if status < HYP_UNKNOWN_FATAL and not geomName =='""':
         print hypName, "was assigned to",    geomName,"but", reason
-    else:
+    elif not geomName == '""':
         print hypName, "was not assigned to",geomName,":", reason
+    else:
+        print hypName, "was not assigned:", reason
         pass
 
 ## Check meshing plugin availability
@@ -1031,17 +1058,20 @@ class Mesh:
         if (isinstance(algo, geompyDC.GEOM._objref_GEOM_Object)):
             geom = algo
             algo = MEFISTO
-
         return Mesh_Triangle(self, algo, geom)
 
     ## Creates a quadrangle 2D algorithm for faces.
     #  If the optional \a geom parameter is not set, this algorithm is global.
     #  \n Otherwise, this algorithm defines a submesh based on \a geom subshape.
     #  @param geom If defined, the subshape to be meshed (GEOM_Object)
+    #  @param algo values are: smesh.QUADRANGLE || smesh.RADIAL_QUAD
     #  @return an instance of Mesh_Quadrangle algorithm
     #  @ingroup l3_algos_basic
-    def Quadrangle(self, geom=0):
-        return Mesh_Quadrangle(self,  geom)
+    def Quadrangle(self, geom=0, algo=QUADRANGLE):
+        if algo==RADIAL_QUAD:
+            return Mesh_RadialQuadrangle1D2D(self,geom)
+        else:
+            return Mesh_Quadrangle(self, geom)
 
     ## Creates a tetrahedron 3D algorithm for solids.
     #  The parameter \a algo permits to choose the algorithm: NETGEN or GHS3D
@@ -1153,8 +1183,62 @@ class Mesh:
             print "Mesh computation failed, exception caught:"
             traceback.print_exc()
         if True:#not ok:
-            errors = self.smeshpyD.GetAlgoState( self.mesh, geom )
             allReasons = ""
+
+            # Treat compute errors
+            computeErrors = self.smeshpyD.GetComputeErrors( self.mesh, geom )
+            for err in computeErrors:
+                shapeText = ""
+                if self.mesh.HasShapeToMesh():
+                    try:
+                        mainIOR  = salome.orb.object_to_string(geom)
+                        for sname in salome.myStudyManager.GetOpenStudies():
+                            s = salome.myStudyManager.GetStudyByName(sname)
+                            if not s: continue
+                            mainSO = s.FindObjectIOR(mainIOR)
+                            if not mainSO: continue
+                            subIt = s.NewChildIterator(mainSO)
+                            while subIt.More():
+                                subSO = subIt.Value()
+                                subIt.Next()
+                                obj = subSO.GetObject()
+                                if not obj: continue
+                                go = obj._narrow( geompyDC.GEOM._objref_GEOM_Object )
+                                if not go: continue
+                                ids = go.GetSubShapeIndices()
+                                if len(ids) == 1 and ids[0] == err.subShapeID:
+                                    shapeText = ' on "%s"' % subSO.GetName()
+                                    break
+                        if not shapeText:
+                            shape = self.geompyD.GetSubShape( geom, [err.subShapeID])
+                            if shape:
+                                shapeText = " on %s #%s" % (shape.GetShapeType(), err.subShapeID)
+                            else:
+                                shapeText = " on subshape #%s" % (err.subShapeID)
+                    except:
+                        shapeText = " on subshape #%s" % (err.subShapeID)
+                errText = ""
+                stdErrors = ["OK",                 #COMPERR_OK            
+                             "Invalid input mesh", #COMPERR_BAD_INPUT_MESH
+                             "std::exception",     #COMPERR_STD_EXCEPTION 
+                             "OCC exception",      #COMPERR_OCC_EXCEPTION 
+                             "SALOME exception",   #COMPERR_SLM_EXCEPTION 
+                             "Unknown exception",  #COMPERR_EXCEPTION     
+                             "Memory allocation problem", #COMPERR_MEMORY_PB     
+                             "Algorithm failed",   #COMPERR_ALGO_FAILED   
+                             "Unexpected geometry"]#COMPERR_BAD_SHAPE
+                if err.code > 0:
+                    if err.code < len(stdErrors): errText = stdErrors[err.code]
+                else:
+                    errText = "code %s" % -err.code
+                if errText: errText += ". "
+                errText += err.comment
+                if allReasons != "":allReasons += "\n"
+                allReasons += '"%s" failed%s. Error: %s' %(err.algoName, shapeText, errText)
+                pass
+
+            # Treat hyp errors
+            errors = self.smeshpyD.GetAlgoState( self.mesh, geom )
             for err in errors:
                 if err.isGlobalAlgo:
                     glob = "global"
@@ -1180,9 +1264,7 @@ class Mesh:
                     reason = "For unknown reason."+\
                              " Revise Mesh.Compute() implementation in smeshDC.py!"
                     pass
-                if allReasons != "":
-                    allReasons += "\n"
-                    pass
+                if allReasons != "":allReasons += "\n"
                 allReasons += reason
                 pass
             if allReasons != "":
@@ -1201,6 +1283,18 @@ class Mesh:
             pass
         return ok
 
+    ## Return submesh objects list in meshing order
+    #  @return list of list of submesh objects
+    #  @ingroup l2_construct
+    def GetMeshOrder(self):
+        return self.mesh.GetMeshOrder()
+
+    ## Return submesh objects list in meshing order
+    #  @return list of list of submesh objects
+    #  @ingroup l2_construct
+    def SetMeshOrder(self, submeshes):
+        return self.mesh.SetMeshOrder(submeshes)
+
     ## Removes all nodes and elements
     #  @ingroup l2_construct
     def Clear(self):
@@ -1271,7 +1365,11 @@ class Mesh:
             pass
         status = self.mesh.AddHypothesis(geom, hyp)
         isAlgo = hyp._narrow( SMESH_Algo )
-        TreatHypoStatus( status, GetName( hyp ), GetName( geom ), isAlgo )
+        hyp_name = GetName( hyp )
+        geom_name = ""
+        if geom:
+            geom_name = GetName( geom )
+        TreatHypoStatus( status, hyp_name, geom_name, isAlgo )
         return status
 
     ## Unassigns a hypothesis
@@ -1876,6 +1974,12 @@ class Mesh:
     def GetElementType(self, id, iselem):
         return self.mesh.GetElementType(id, iselem)
 
+    ## Returns the geometric type of mesh element
+    #  @return the value from SMESH::EntityType enumeration
+    #  @ingroup l1_meshinfo
+    def GetElementGeomType(self, id):
+        return self.mesh.GetElementGeomType(id)
+
     ## Returns the list of submesh elements IDs
     #  @param Shape a geom object(subshape) IOR
     #         Shape must be the subshape of a ShapeToMesh()
@@ -1999,6 +2103,16 @@ class Mesh:
     def ElemNbFaces(self, id):
         return self.mesh.ElemNbFaces(id)
 
+    ## Returns nodes of given face (counted from zero) for given volumic element.
+    #  @ingroup l1_meshinfo
+    def GetElemFaceNodes(self,elemId, faceIndex):
+        return self.mesh.GetElemFaceNodes(elemId, faceIndex)
+
+    ## Returns an element based on all given nodes.
+    #  @ingroup l1_meshinfo
+    def FindElementByNodes(self,nodes):
+        return self.mesh.FindElementByNodes(nodes)
+
     ## Returns true if the given element is a polygon
     #  @ingroup l1_meshinfo
     def IsPoly(self, id):
@@ -2241,6 +2355,11 @@ class Mesh:
     def FindElementsByPoint(self, x, y, z, elementType = SMESH.ALL):
         return self.editor.FindElementsByPoint(x, y, z, elementType)
         
+    # Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
+    # TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
+     
+    def GetPointState(self, x, y, z):
+        return self.editor.GetPointState(x, y, z)
 
     ## Finds the node closest to a point and moves it to a point location
     #  @param x  the X coordinate of a point
@@ -2373,6 +2492,17 @@ class Mesh:
     def BestSplit (self, IDOfQuad, theCriterion):
         return self.editor.BestSplit(IDOfQuad, self.smeshpyD.GetFunctor(theCriterion))
 
+    ## Splits volumic elements into tetrahedrons
+    #  @param elemIDs either list of elements or mesh or group or submesh
+    #  @param method  flags passing splitting method:
+    #         1 - split the hexahedron into 5 tetrahedrons
+    #         2 - split the hexahedron into 6 tetrahedrons
+    #  @ingroup l2_modif_cutquadr
+    def SplitVolumesIntoTetra(self, elemIDs, method=1 ):
+        if isinstance( elemIDs, Mesh ):
+            elemIDs = elemIDs.GetMesh()
+        self.editor.SplitVolumesIntoTetra(elemIDs, method)
+
     ## Splits quadrangle faces near triangular facets of volumes
     #
     #  @ingroup l1_auxiliary
@@ -3227,6 +3357,51 @@ class Mesh:
         mesh.SetParameters(Parameters)
         return Mesh( self.smeshpyD, self.geompyD, mesh )
 
+
+
+    ## Scales the object
+    #  @param theObject - the object to translate (mesh, submesh, or group)
+    #  @param thePoint - base point for scale
+    #  @param theScaleFact - scale factors for axises
+    #  @param Copy - allows copying the translated elements
+    #  @param MakeGroups - forces the generation of new groups from existing
+    #                      ones (if Copy)
+    #  @return list of created groups (SMESH_GroupBase) if MakeGroups=True,
+    #          empty list otherwise
+    def Scale(self, theObject, thePoint, theScaleFact, Copy, MakeGroups=False):
+        if ( isinstance( theObject, Mesh )):
+            theObject = theObject.GetMesh()
+        if ( isinstance( theObject, list )):
+            theObject = self.editor.MakeIDSource(theObject)
+
+        thePoint, Parameters = ParsePointStruct(thePoint)
+        self.mesh.SetParameters(Parameters)
+
+        if Copy and MakeGroups:
+            return self.editor.ScaleMakeGroups(theObject, thePoint, theScaleFact)
+        self.editor.Scale(theObject, thePoint, theScaleFact, Copy)
+        return []
+
+    ## Creates a new mesh from the translated object
+    #  @param theObject - the object to translate (mesh, submesh, or group)
+    #  @param thePoint - base point for scale
+    #  @param theScaleFact - scale factors for axises
+    #  @param MakeGroups - forces the generation of new groups from existing ones
+    #  @param NewMeshName - the name of the newly created mesh
+    #  @return instance of Mesh class
+    def ScaleMakeMesh(self, theObject, thePoint, theScaleFact, MakeGroups=False, NewMeshName=""):
+        if (isinstance(theObject, Mesh)):
+            theObject = theObject.GetMesh()
+        if ( isinstance( theObject, list )):
+            theObject = self.editor.MakeIDSource(theObject)
+
+        mesh = self.editor.ScaleMakeMesh(theObject, thePoint, theScaleFact,
+                                         MakeGroups, NewMeshName)
+        #mesh.SetParameters(Parameters)
+        return Mesh( self.smeshpyD, self.geompyD, mesh )
+
+
+
     ## Rotates the elements
     #  @param IDsOfElements list of elements ids
     #  @param Axis the axis of rotation (AxisStruct or geom line)
@@ -3451,7 +3626,7 @@ class Mesh:
         
     ## Creates a hole in a mesh by doubling the nodes of some particular elements
     #  This method provided for convenience works as DoubleNodes() described above.
-    #  @param theNodes identifiers of node to be doubled
+    #  @param theNodeId identifiers of node to be doubled
     #  @param theModifiedElems identifiers of elements to be updated
     #  @return TRUE if operation has been completed successfully, FALSE otherwise
     #  @ingroup l2_modif_edit
@@ -3518,7 +3693,7 @@ class Mesh:
     #         The replicated nodes should be associated to affected elements.
     #  @ingroup l2_modif_edit
     def DoubleNodeElemGroupInRegion(self, theElems, theNodesNot, theShape):
-        return self.editor.DoubleNodeElemGroup(theElems, theNodesNot, theShape)
+        return self.editor.DoubleNodeElemGroupInRegion(theElems, theNodesNot, theShape)
         
     ## Creates a hole in a mesh by doubling the nodes of some particular elements
     #  This method provided for convenience works as DoubleNodes() described above.
@@ -3685,19 +3860,23 @@ class Mesh_Algorithm:
             raise RuntimeError, "Attemp to create " + algo + " algoritm on None shape"
         self.mesh = mesh
         piece = mesh.geom
+        name = ""
         if not geom:
             self.geom = piece
         else:
             self.geom = geom
-            name = GetName(geom)
-            if name==NO_NAME:
+            try:
+                name = GetName(geom)
+                pass
+            except:
                 name = mesh.geompyD.SubShapeName(geom, piece)
                 mesh.geompyD.addToStudyInFather(piece, geom, name)
+                pass
             self.subm = mesh.mesh.GetSubMesh(geom, algo.GetName())
 
         self.algo = algo
         status = mesh.mesh.AddHypothesis(self.geom, self.algo)
-        TreatHypoStatus( status, algo.GetName(), GetName(self.geom), True )
+        TreatHypoStatus( status, algo.GetName(), name, True )
 
     def CompareHyp (self, hyp, args):
         print "CompareHyp is not implemented for ", self.__class__.__name__, ":", hyp.GetName()
@@ -3902,10 +4081,13 @@ class Mesh_Segment(Mesh_Algorithm):
     def FixedPoints1D(self, points, nbSegs=[1], reversedEdges=[], UseExisting=0):
         if not isinstance(reversedEdges,list): #old version script, before adding reversedEdges
             reversedEdges, UseExisting = [], reversedEdges
+        if reversedEdges and isinstance( reversedEdges[0], geompyDC.GEOM._objref_GEOM_Object ):
+            for i in range( len( reversedEdges )):
+                reversedEdges[i] = self.mesh.geompyD.GetSubShapeID(self.mesh.geom, reversedEdges[i] )
         entry = self.MainShapeEntry()
         hyp = self.Hypothesis("FixedPoints1D", [points, nbSegs, reversedEdges, entry],
                               UseExisting=UseExisting,
-                              CompareMethod=self.CompareArithmetic1D)
+                              CompareMethod=self.CompareFixedPoints1D)
         hyp.SetPoints(points)
         hyp.SetNbSegments(nbSegs)
         hyp.SetReversedEdges(reversedEdges)
@@ -4014,11 +4196,14 @@ class Mesh_Segment(Mesh_Algorithm):
         ### 0D algorithm
         if self.geom is None:
             raise RuntimeError, "Attemp to create SegmentAroundVertex_0D algoritm on None shape"
-        name = GetName(self.geom)
-        if name == NO_NAME:
+        try:
+            name = GetName(self.geom)
+            pass
+        except:
             piece = self.mesh.geom
             name = self.mesh.geompyD.SubShapeName(self.geom, piece)
             self.mesh.geompyD.addToStudyInFather(piece, self.geom, name)
+            pass
         algo = self.FindAlgorithm("SegmentAroundVertex_0D", self.mesh.smeshpyD)
         if algo is None:
             algo = self.mesh.smeshpyD.CreateHypothesis("SegmentAroundVertex_0D", "libStdMeshersEngine.so")
@@ -4415,6 +4600,25 @@ class Mesh_Quadrangle(Mesh_Algorithm):
                               CompareMethod=self.CompareEqualHyp)
         return hyp
 
+    ## Defines "QuadrangleParams" hypothesis
+    #  @param vertex: vertex of a trilateral geometrical face, around which triangles
+    #                 will be created while other elements will be quadrangles.
+    #                 Vertex can be either a GEOM_Object or a vertex ID within the
+    #                 shape to mesh
+    #  @param UseExisting: if ==true - searches for the existing hypothesis created with
+    #                   the same parameters, else (default) - creates a new one
+    #
+    #  @ingroup l3_hypos_additi
+    def TriangleVertex(self, vertex, UseExisting=0):
+        vertexID = vertex
+        if isinstance( vertexID, geompyDC.GEOM._objref_GEOM_Object ):
+            vertexID = self.mesh.geompyD.GetSubShapeID( self.mesh.geom, vertex )
+        hyp = self.Hypothesis("QuadrangleParams", [vertexID], UseExisting = UseExisting,
+                              CompareMethod=lambda hyp,args: hyp.GetTriaVertex()==args[0])
+        hyp.SetTriaVertex( vertexID )
+        return hyp
+
+
 # Public class: Mesh_Tetrahedron
 # ------------------------------
 
@@ -4912,6 +5116,7 @@ class Mesh_RadialPrism3D(Mesh_Algorithm):
             self.mesh.GetMesh().RemoveHypothesis( self.geom, self.nbLayers )
             self.mesh.GetMesh().AddHypothesis( self.geom, self.distribHyp )
         study = self.mesh.smeshpyD.GetCurrentStudy() # prevents publishing own 1D hypothesis
+        self.mesh.smeshpyD.SetCurrentStudy( None )
         hyp = self.mesh.smeshpyD.CreateHypothesis(hypType, so)
         self.mesh.smeshpyD.SetCurrentStudy( study ) # enables publishing
         self.distribHyp.SetLayerDistribution( hyp )
@@ -4998,7 +5203,7 @@ class Mesh_RadialQuadrangle1D2D(Mesh_Algorithm):
         Mesh_Algorithm.__init__(self)
         self.Create(mesh, geom, "RadialQuadrangle_1D2D")
 
-        self.distribHyp = self.Hypothesis("LayerDistribution2D", UseExisting=0)
+        self.distribHyp = None #self.Hypothesis("LayerDistribution2D", UseExisting=0)
         self.nbLayers = None
 
     ## Return 2D hypothesis holding the 1D one
@@ -5009,21 +5214,26 @@ class Mesh_RadialQuadrangle1D2D(Mesh_Algorithm):
     #  hypothesis. Returns the created hypothesis
     def OwnHypothesis(self, hypType, args=[], so="libStdMeshersEngine.so"):
         #print "OwnHypothesis",hypType
-        if not self.nbLayers is None:
+        if self.nbLayers:
             self.mesh.GetMesh().RemoveHypothesis( self.geom, self.nbLayers )
+        if self.distribHyp is None:
+            self.distribHyp = self.Hypothesis("LayerDistribution2D", UseExisting=0)
+        else:
             self.mesh.GetMesh().AddHypothesis( self.geom, self.distribHyp )
         study = self.mesh.smeshpyD.GetCurrentStudy() # prevents publishing own 1D hypothesis
+        self.mesh.smeshpyD.SetCurrentStudy( None )
         hyp = self.mesh.smeshpyD.CreateHypothesis(hypType, so)
         self.mesh.smeshpyD.SetCurrentStudy( study ) # enables publishing
         self.distribHyp.SetLayerDistribution( hyp )
         return hyp
 
-    ## Defines "NumberOfLayers2D" hypothesis, specifying the number of layers
+    ## Defines "NumberOfLayers" hypothesis, specifying the number of layers
     #  @param n number of layers
     #  @param UseExisting if ==true - searches for the existing hypothesis created with
     #                     the same parameters, else (default) - creates a new one
-    def NumberOfLayers2D(self, n, UseExisting=0):
-        self.mesh.GetMesh().RemoveHypothesis( self.geom, self.distribHyp )
+    def NumberOfLayers(self, n, UseExisting=0):
+        if self.distribHyp:
+            self.mesh.GetMesh().RemoveHypothesis( self.geom, self.distribHyp )
         self.nbLayers = self.Hypothesis("NumberOfLayers2D", [n], UseExisting=UseExisting,
                                         CompareMethod=self.CompareNumberOfLayers)
         self.nbLayers.SetNumberOfLayers( n )
index 5370d7f3eec3e31c2b8dcd0f13722740e46c5aa3..fc6d37ea13970c9d07a20cb82fb3c9adc3f8499c 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # SMESH SMESHGUI : GUI for SMESH component
 # File   : Makefile.am
 # Author : Alexander BORODIN, Open CASCADE S.A.S.
index 4766864a27e0fffd3c71fac78915af192519b1e7..05e44fb94d47bb55a0ecb69d7e6a723006e3db6d 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESH : GUI for SMESH component
 // File   : libSMESH_Swig.cxx
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
@@ -71,10 +69,10 @@ namespace
   inline
   SALOMEDS::SObject_var
   GetDomainRoot(const SALOMEDS::SComponent_var& theSComponentMesh,
-               const SALOMEDS::StudyBuilder_var& theStudyBuilder,
-               CORBA::Long theDomainRootTag,
-               const QString& theName,
-               const QString& thePixmap)
+                const SALOMEDS::StudyBuilder_var& theStudyBuilder,
+                CORBA::Long theDomainRootTag,
+                const QString& theName,
+                const QString& thePixmap)
   {
     SALOMEDS::SObject_var aDomainRoot;
     if (!theSComponentMesh->FindSubObject(theDomainRootTag,aDomainRoot)) {
@@ -98,13 +96,13 @@ namespace
   inline
   SALOMEDS::SObject_var
   GetHypothesisRoot(const SALOMEDS::SComponent_var& theSComponentMesh,
-                   const SALOMEDS::StudyBuilder_var& theStudyBuilder)
+                    const SALOMEDS::StudyBuilder_var& theStudyBuilder)
   {
     return GetDomainRoot(theSComponentMesh,
-                        theStudyBuilder,
-                        SMESH::Tag_HypothesisRoot,
-                        QObject::tr("SMESH_MEN_HYPOTHESIS"),
-                        "ICON_SMESH_TREE_HYPO");
+                         theStudyBuilder,
+                         SMESH::Tag_HypothesisRoot,
+                         QObject::tr("SMESH_MEN_HYPOTHESIS"),
+                         "ICON_SMESH_TREE_HYPO");
   }
 
 
@@ -112,13 +110,13 @@ namespace
   inline
   SALOMEDS::SObject_var
   GetAlgorithmsRoot(const SALOMEDS::SComponent_var& theSComponentMesh,
-                   const SALOMEDS::StudyBuilder_var& theStudyBuilder)
+                    const SALOMEDS::StudyBuilder_var& theStudyBuilder)
   {
     return GetDomainRoot(theSComponentMesh,
-                        theStudyBuilder,
-                        SMESH::Tag_AlgorithmsRoot,
-                        QObject::tr("SMESH_MEN_ALGORITHMS"),
-                        "ICON_SMESH_TREE_ALGO");
+                         theStudyBuilder,
+                         SMESH::Tag_AlgorithmsRoot,
+                         QObject::tr("SMESH_MEN_ALGORITHMS"),
+                         "ICON_SMESH_TREE_ALGO");
   }
 
 
@@ -126,17 +124,17 @@ namespace
   inline
   SALOMEDS::SObject_var
   AddToDomain(const std::string& theIOR,
-             const SALOMEDS::SComponent_var& theSComponentMesh,
-             const SALOMEDS::StudyBuilder_var& theStudyBuilder,
-             CORBA::Long theDomainRootTag,
-             const QString& theDomainName,
-             const QString& theDomainPixmap)
+              const SALOMEDS::SComponent_var& theSComponentMesh,
+              const SALOMEDS::StudyBuilder_var& theStudyBuilder,
+              CORBA::Long theDomainRootTag,
+              const QString& theDomainName,
+              const QString& theDomainPixmap)
   {
     SALOMEDS::SObject_var aDomain = GetDomainRoot(theSComponentMesh,
-                                                 theStudyBuilder,
-                                                 SMESH::Tag_AlgorithmsRoot,
-                                                 theDomainName,
-                                                 theDomainPixmap);
+                                                  theStudyBuilder,
+                                                  SMESH::Tag_AlgorithmsRoot,
+                                                  theDomainName,
+                                                  theDomainPixmap);
     // Add New Hypothesis
     SALOMEDS::SObject_var aSObject = theStudyBuilder->NewObject(aDomain);
     SALOMEDS::GenericAttribute_var anAttr = theStudyBuilder->FindOrCreateAttribute(aSObject,"AttributePixMap");
@@ -157,42 +155,42 @@ namespace
   //---------------------------------------------------------------
   SALOMEDS::SObject_var
   AddHypothesis(const std::string& theIOR,
-               const SALOMEDS::SComponent_var& theSComponentMesh,
-               const SALOMEDS::StudyBuilder_var& theStudyBuilder)
+                const SALOMEDS::SComponent_var& theSComponentMesh,
+                const SALOMEDS::StudyBuilder_var& theStudyBuilder)
   {
     return AddToDomain(theIOR,
-                      theSComponentMesh,
-                      theStudyBuilder,
-                      SMESH::Tag_HypothesisRoot,
-                      QObject::tr("SMESH_MEN_HYPOTHESIS"),
-                      "ICON_SMESH_TREE_HYPO");
+                       theSComponentMesh,
+                       theStudyBuilder,
+                       SMESH::Tag_HypothesisRoot,
+                       QObject::tr("SMESH_MEN_HYPOTHESIS"),
+                       "ICON_SMESH_TREE_HYPO");
   }
 
 
   //---------------------------------------------------------------
   SALOMEDS::SObject_var
   AddAlgorithms(const std::string& theIOR,
-               const SALOMEDS::SComponent_var& theSComponentMesh,
-               const SALOMEDS::StudyBuilder_var& theStudyBuilder)
+                const SALOMEDS::SComponent_var& theSComponentMesh,
+                const SALOMEDS::StudyBuilder_var& theStudyBuilder)
   {
     return AddToDomain(theIOR,
-                      theSComponentMesh,
-                      theStudyBuilder,
-                      SMESH::Tag_AlgorithmsRoot,
-                      QObject::tr("SMESH_MEN_ALGORITHMS"),
-                      "ICON_SMESH_TREE_ALGO");
+                       theSComponentMesh,
+                       theStudyBuilder,
+                       SMESH::Tag_AlgorithmsRoot,
+                       QObject::tr("SMESH_MEN_ALGORITHMS"),
+                       "ICON_SMESH_TREE_ALGO");
   }
 
 
   //---------------------------------------------------------------
   void
   SetDomain(const char* theMeshOrSubMeshEntry,
-           const char* theDomainEntry,
-           const SALOMEDS::Study_var& theStudy,
-           const SALOMEDS::StudyBuilder_var& theStudyBuilder,
-           long theRefOnAppliedDomainTag,
-           const QString& theAppliedDomainMEN,
-           const QString& theAppliedDomainICON)
+            const char* theDomainEntry,
+            const SALOMEDS::Study_var& theStudy,
+            const SALOMEDS::StudyBuilder_var& theStudyBuilder,
+            long theRefOnAppliedDomainTag,
+            const QString& theAppliedDomainMEN,
+            const QString& theAppliedDomainICON)
   {
     SALOMEDS::SObject_var aMeshOrSubMeshSO = theStudy->FindObjectID(theMeshOrSubMeshEntry);
     SALOMEDS::SObject_var aHypothesisSO = theStudy->FindObjectID(theDomainEntry);
@@ -201,17 +199,17 @@ namespace
       //Find or Create Applied Hypothesis root
       SALOMEDS::SObject_var anAppliedDomainSO;
       if(!aMeshOrSubMeshSO->FindSubObject(theRefOnAppliedDomainTag,anAppliedDomainSO)){
-       anAppliedDomainSO = theStudyBuilder->NewObjectToTag(aMeshOrSubMeshSO,theRefOnAppliedDomainTag);
-       SALOMEDS::GenericAttribute_var anAttr =
-         theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributeName");
-       SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
-       aName->SetValue(theAppliedDomainMEN.toLatin1().data());
-       anAttr = theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributeSelectable");
-       SALOMEDS::AttributeSelectable_var aSelAttr = SALOMEDS::AttributeSelectable::_narrow(anAttr);
-       aSelAttr->SetSelectable(false);
-       anAttr = theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributePixMap");
-       SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
-       aPixmap->SetPixMap(theAppliedDomainICON.toLatin1().data());
+        anAppliedDomainSO = theStudyBuilder->NewObjectToTag(aMeshOrSubMeshSO,theRefOnAppliedDomainTag);
+        SALOMEDS::GenericAttribute_var anAttr =
+          theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributeName");
+        SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
+        aName->SetValue(theAppliedDomainMEN.toLatin1().data());
+        anAttr = theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributeSelectable");
+        SALOMEDS::AttributeSelectable_var aSelAttr = SALOMEDS::AttributeSelectable::_narrow(anAttr);
+        aSelAttr->SetSelectable(false);
+        anAttr = theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributePixMap");
+        SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
+        aPixmap->SetPixMap(theAppliedDomainICON.toLatin1().data());
       }
       SALOMEDS::SObject_var aSObject = theStudyBuilder->NewObject(anAppliedDomainSO);
       theStudyBuilder->Addreference(aSObject,aHypothesisSO);
@@ -222,34 +220,34 @@ namespace
   //---------------------------------------------------------------
   void
   SetHypothesis(const char* theMeshOrSubMeshEntry,
-               const char* theDomainEntry,
-               const SALOMEDS::Study_var& theStudy,
-               const SALOMEDS::StudyBuilder_var& theStudyBuilder)
+                const char* theDomainEntry,
+                const SALOMEDS::Study_var& theStudy,
+                const SALOMEDS::StudyBuilder_var& theStudyBuilder)
   {
     SetDomain(theMeshOrSubMeshEntry,
-             theDomainEntry,
-             theStudy,
-             theStudyBuilder,
-             SMESH::Tag_RefOnAppliedHypothesis,
-             QObject::tr("SMESH_MEN_APPLIED_HYPOTHESIS"),
-             "ICON_SMESH_TREE_HYPO");
+              theDomainEntry,
+              theStudy,
+              theStudyBuilder,
+              SMESH::Tag_RefOnAppliedHypothesis,
+              QObject::tr("SMESH_MEN_APPLIED_HYPOTHESIS"),
+              "ICON_SMESH_TREE_HYPO");
   }
 
 
   //---------------------------------------------------------------
   void
   SetAlgorithms(const char* theMeshOrSubMeshEntry,
-               const char* theDomainEntry,
-               const SALOMEDS::Study_var& theStudy,
-               const SALOMEDS::StudyBuilder_var& theStudyBuilder)
+                const char* theDomainEntry,
+                const SALOMEDS::Study_var& theStudy,
+                const SALOMEDS::StudyBuilder_var& theStudyBuilder)
   {
     SetDomain(theMeshOrSubMeshEntry,
-             theDomainEntry,
-             theStudy,
-             theStudyBuilder,
-             SMESH::Tag_RefOnAppliedAlgorithms,
-             QObject::tr("SMESH_MEN_APPLIED_ALGORIHTMS"),
-             "ICON_SMESH_TREE_ALGO");
+              theDomainEntry,
+              theStudy,
+              theStudyBuilder,
+              SMESH::Tag_RefOnAppliedAlgorithms,
+              QObject::tr("SMESH_MEN_APPLIED_ALGORIHTMS"),
+              "ICON_SMESH_TREE_ALGO");
   }
 }
 
@@ -271,11 +269,11 @@ SMESH_Swig::SMESH_Swig()
     Execute()
     {
       try {
-       ORB_INIT &anORBInit = *SINGLETON_<ORB_INIT>::Instance();
-       ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
-       myORB = anORBInit( 0, 0 );
+        ORB_INIT &anORBInit = *SINGLETON_<ORB_INIT>::Instance();
+        ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
+        myORB = anORBInit( 0, 0 );
       } catch (...) {
-       INFOS("internal error : orb not found");
+        INFOS("internal error : orb not found");
       }
     }
   };
@@ -301,9 +299,9 @@ SMESH_Swig::Init(int theStudyID)
     SALOMEDS::SComponent_var& mySComponentMesh;
   public:
     TEvent(int theStudyID,
-          SALOMEDS::Study_var& theStudy,
-          SALOMEDS::StudyBuilder_var& theStudyBuilder,
-          SALOMEDS::SComponent_var& theSComponentMesh):
+           SALOMEDS::Study_var& theStudy,
+           SALOMEDS::StudyBuilder_var& theStudyBuilder,
+           SALOMEDS::SComponent_var& theSComponentMesh):
       myStudyID(theStudyID),
       myStudy(theStudy),
       myStudyBuilder(theStudyBuilder),
@@ -334,28 +332,28 @@ SMESH_Swig::Init(int theStudyID)
 
       SALOMEDS::SComponent_var aSComponent = myStudy->FindComponent("SMESH");
       if(aSComponent->_is_nil()){
-       bool aLocked = myStudy->GetProperties()->IsLocked();
-       if (aLocked)
-         myStudy->GetProperties()->SetLocked(false);
-       
-       aSComponent = myStudyBuilder->NewComponent("SMESH");
-       anAttr = myStudyBuilder->FindOrCreateAttribute(aSComponent,"AttributeName");
-       aName = SALOMEDS::AttributeName::_narrow(anAttr);
-
-       SMESHGUI* aSMESHGUI = SMESHGUI::GetSMESHGUI(); //SRN: BugID IPAL9186, load a SMESH gui if it hasn't been loaded
-       if (!aSMESHGUI){
-         CAM_Module* aModule = anApp->module("Mesh");
-         if(!aModule)
-             aModule = anApp->loadModule("Mesh");
-         aSMESHGUI = dynamic_cast<SMESHGUI*>(aModule);
-       } //SRN: BugID IPAL9186: end of a fix
-       aName->SetValue(aSMESHGUI->moduleName().toLatin1().data());
-       anAttr = myStudyBuilder->FindOrCreateAttribute(aSComponent,"AttributePixMap");
-       aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
-       aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" );
-       myStudyBuilder->DefineComponentInstance(aSComponent,aSMESHGen);
-       if (aLocked)
-         myStudy->GetProperties()->SetLocked(true);
+        bool aLocked = myStudy->GetProperties()->IsLocked();
+        if (aLocked)
+          myStudy->GetProperties()->SetLocked(false);
+        
+        aSComponent = myStudyBuilder->NewComponent("SMESH");
+        anAttr = myStudyBuilder->FindOrCreateAttribute(aSComponent,"AttributeName");
+        aName = SALOMEDS::AttributeName::_narrow(anAttr);
+
+        SMESHGUI* aSMESHGUI = SMESHGUI::GetSMESHGUI(); //SRN: BugID IPAL9186, load a SMESH gui if it hasn't been loaded
+        if (!aSMESHGUI){
+          CAM_Module* aModule = anApp->module("Mesh");
+          if(!aModule)
+              aModule = anApp->loadModule("Mesh");
+          aSMESHGUI = dynamic_cast<SMESHGUI*>(aModule);
+        } //SRN: BugID IPAL9186: end of a fix
+        aName->SetValue(aSMESHGUI->moduleName().toLatin1().data());
+        anAttr = myStudyBuilder->FindOrCreateAttribute(aSComponent,"AttributePixMap");
+        aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
+        aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" );
+        myStudyBuilder->DefineComponentInstance(aSComponent,aSMESHGen);
+        if (aLocked)
+          myStudy->GetProperties()->SetLocked(true);
       }
 
       mySComponentMesh = SALOMEDS::SComponent::_narrow(aSComponent);
@@ -367,9 +365,9 @@ SMESH_Swig::Init(int theStudyID)
   MESSAGE("Init");
 
   ProcessVoidEvent(new TEvent(theStudyID,
-                             myStudy,
-                             myStudyBuilder,
-                             mySComponentMesh));
+                              myStudy,
+                              myStudyBuilder,
+                              mySComponentMesh));
 }
 
 
@@ -414,8 +412,8 @@ const char* SMESH_Swig::AddNewHypothesis(const char* theIOR)
   MESSAGE("AddNewHypothesis");
 
   SALOMEDS::SObject_var aSObject = ::AddHypothesis(theIOR,
-                                                  mySComponentMesh,
-                                                  myStudyBuilder);
+                                                   mySComponentMesh,
+                                                   myStudyBuilder);
   CORBA::String_var anEntry = aSObject->GetID();
   return anEntry._retn();
 }
@@ -427,8 +425,8 @@ const char* SMESH_Swig::AddNewAlgorithms(const char* theIOR)
   MESSAGE("AddNewAlgorithms");
 
   SALOMEDS::SObject_var aSObject = ::AddAlgorithms(theIOR,
-                                                  mySComponentMesh,
-                                                  myStudyBuilder);
+                                                   mySComponentMesh,
+                                                   myStudyBuilder);
   CORBA::String_var anEntry = aSObject->GetID();
   return anEntry._retn();
 }
@@ -453,9 +451,9 @@ void SMESH_Swig::SetHypothesis(const char* theMeshOrSubMeshEntry,
                                const char* theDomainEntry)
 {
   ::SetHypothesis(theMeshOrSubMeshEntry,
-                 theDomainEntry,
-                 myStudy,
-                 myStudyBuilder);
+                  theDomainEntry,
+                  myStudy,
+                  myStudyBuilder);
 }
 
 
@@ -464,9 +462,9 @@ void SMESH_Swig::SetAlgorithms(const char* theMeshOrSubMeshEntry,
                                const char* theDomainEntry)
 {
   ::SetAlgorithms(theMeshOrSubMeshEntry,
-                 theDomainEntry,
-                 myStudy,
-                 myStudyBuilder);
+                  theDomainEntry,
+                  myStudy,
+                  myStudyBuilder);
 }
 
 
@@ -599,7 +597,7 @@ void SMESH_Swig::SetName(const char* theEntry,
 //================================================================================
 
 void SMESH_Swig::SetMeshIcon(const char* theMeshEntry,
-                            const bool theIsComputed,
+                             const bool theIsComputed,
                              const bool isEmpty)
 {
   class TEvent: public SALOME_Event
@@ -609,8 +607,8 @@ void SMESH_Swig::SetMeshIcon(const char* theMeshEntry,
     bool myIsComputed, myIsEmpty;
   public:
     TEvent(const SALOMEDS::Study_var& theStudy,
-          const std::string& theMeshEntry,
-          const bool theIsComputed,
+           const std::string& theMeshEntry,
+           const bool theIsComputed,
            const bool isEmpty):
       myStudy(theStudy),
       myMeshEntry(theMeshEntry),
@@ -624,13 +622,13 @@ void SMESH_Swig::SetMeshIcon(const char* theMeshEntry,
     {
       SALOMEDS::SObject_var aMeshSO = myStudy->FindObjectID(myMeshEntry.c_str());
       if(!aMeshSO->_is_nil())
-       if(_PTR(SObject) aMesh = ClientFactory::SObject(aMeshSO))
-         SMESH::ModifiedMesh(aMesh,myIsComputed,myIsEmpty);
+        if(_PTR(SObject) aMesh = ClientFactory::SObject(aMeshSO))
+          SMESH::ModifiedMesh(aMesh,myIsComputed,myIsEmpty);
     }
   };
 
   ProcessVoidEvent(new TEvent(myStudy,
-                             theMeshEntry,
-                             theIsComputed,
+                              theMeshEntry,
+                              theIsComputed,
                               isEmpty));
 }
index bf60f35ff815ab8e7210c0af32f6c4eecef58525..7e7f1c60015cf19a8bce8897fd90f09733bcd7e5 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESH : GUI for SMESH component
 // File   : libSMESH_Swig.h
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
index a865a8e95da0a084f014e27c0c0952e7a8db5ae0..bd795139cf9a2b1d2778f0a71bd0b6d3f7133d2a 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : libSMESH_Swig.i
 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
index 1b51b3afbd461eda98db9458ec6cd094bbc51c96..ca9794c84e081a228011c33c1f0ba5d87f5ee2d5 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH StdMeshers : implementaion of SMESH idl descriptions
 #  File   : Makefile.in
 #  Author : Julia DOROVSKIKH
@@ -73,7 +71,8 @@ salomeinclude_HEADERS = \
        StdMeshers_CompositeHexa_3D.hxx \
        StdMeshers_MaxLength.hxx \
        StdMeshers_QuadrangleParams.hxx \
-       StdMeshers_RadialQuadrangle_1D2D.hxx
+       StdMeshers_RadialQuadrangle_1D2D.hxx \
+       StdMeshers_HexaFromSkin_3D.hxx
 
 # Libraries targets
 
@@ -123,7 +122,8 @@ dist_libStdMeshers_la_SOURCES = \
        StdMeshers_CompositeHexa_3D.cxx \
        StdMeshers_MaxLength.cxx \
        StdMeshers_QuadrangleParams.cxx \
-       StdMeshers_RadialQuadrangle_1D2D.cxx
+       StdMeshers_RadialQuadrangle_1D2D.cxx \
+       StdMeshers_HexaFromSkin_3D.cxx
 
 
 # additionnal information to compil and link file
index aeee7480d0b896f9cdb6e2dff999a566c4f51987..d65e082fbd37c5b7d9d74e8ba3d131905bf9f848 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_StdMeshers.hxx
 //  Author : Alexander BORODIN
 //  Module : SMESH
index a24909a0cf37b34438aef5da709871c2dcfc8491..9752bc6c4c2a1c4036ba8d77acd3b19cf6c63bb6 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Arithmetic1D.cxx
 //  Author : Damien COQUERET, OCC
index e3f3c37a8f1018a97cb736fef0980f366df1d2de..c65e17b67714855c98b3517f59bd039bf8f14df5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Arithmetic1D.hxx
 //  Author : Damien COQUERET, OCC
index 95710c94eb9768299be9e522472eea143f38140e..e7bd4e9939a13737ae78ee6a36ed0072a9f93ccf 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_AutomaticLength.cxx
 //  Author : Edward AGAPOV, OCC
index 627003aa608b4ffba44250961c4ce7eef8576567..0bf8aa25ccbf04d2d2a98b8ac2bfa1d9d3ecf8ee 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_AutomaticLength.hxx
 //  Author : Edward AGAPOV, OCC
 //  Module : SMESH
-
+//
 #ifndef _SMESH_AutomaticLength_HXX_
 #define _SMESH_AutomaticLength_HXX_
 
index 38bbdeaf32d77c9c4f9ae00f3efa4ffcc4ae8698..d55c175135fe8ec0ca34496be75d9ccdc143a3bd 100644 (file)
@@ -1,29 +1,28 @@
-//  SMESH SMESH : implementaion of SMESH idl descriptions
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
+//  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : StdMeshers_CompositeHexa_3D.cxx
 // Module    : SMESH
 // Created   : Tue Nov 25 11:04:59 2008
 // Author    : Edward AGAPOV (eap)
-
+//
 #include "StdMeshers_CompositeHexa_3D.hxx"
 
 #include "SMDS_Mesh.hxx"
index 8fd14ba06747e5a206c1ee14fec1d2005ff53c7b..01b373d862458d18e81d0044c4348bcd338d2a68 100644 (file)
@@ -1,29 +1,26 @@
-//  SMESH SMESH : implementaion of SMESH idl descriptions
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  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.
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
 //
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
+//  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_CompositeBlock_3D.hxx
 //  Module : SMESH
-
+//
 #ifndef _SMESH_CompositeSegment_1D_HXX_
 #define _SMESH_CompositeSegment_1D_HXX_
 
@@ -48,7 +45,7 @@ public:
   //virtual ~StdMeshers_CompositeHexa_3D();
 
   virtual bool Compute(SMESH_Mesh&         aMesh,
-                      const TopoDS_Shape& aShape);
+                       const TopoDS_Shape& aShape);
 
   virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
                         MapShapeNbElems& aResMap);
index eee3ef0129ad367f4d04ada26b2458d713e0fb04..17161d9ef503dce7b6cff25aaa2f0ae3c137848a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Regular_1D.cxx
 //           Moved here from SMESH_Regular_1D.cxx
@@ -73,15 +74,16 @@ namespace {
    */
   //================================================================================
 
-  TopoDS_Edge nextC1Edge(const TopoDS_Edge&  edge,
-                         SMESH_Mesh &        aMesh,
-                         const bool          forward)
+  TopoDS_Edge nextC1Edge(TopoDS_Edge  edge,
+                         SMESH_Mesh & aMesh,
+                         const bool   forward)
   {
+    if (edge.Orientation() > TopAbs_REVERSED) // INTERNAL
+      edge.Orientation( TopAbs_FORWARD );
     TopoDS_Edge eNext;
     TopTools_MapOfShape edgeCounter;
     edgeCounter.Add( edge );
-    TopoDS_Vertex v;
-    v = forward ? TopExp::LastVertex( edge,1 ) : TopExp::FirstVertex( edge,1 );
+    TopoDS_Vertex v = forward ? TopExp::LastVertex(edge,true) : TopExp::FirstVertex(edge,true);
     TopTools_ListIteratorOfListOfShape ancestIt = aMesh.GetAncestors( v );
     for ( ; ancestIt.More(); ancestIt.Next() )
     {
@@ -92,11 +94,11 @@ namespace {
     if ( edgeCounter.Extent() < 3 && !eNext.IsNull() ) {
       if ( SMESH_Algo::IsContinuous( edge, eNext )) {
         // care of orientation
-        bool reverse;
-        if ( forward )
-          reverse = ( !v.IsSame( TopExp::FirstVertex( eNext, true )));
-        else
-          reverse = ( !v.IsSame( TopExp::LastVertex( eNext, true )));
+        if (eNext.Orientation() > TopAbs_REVERSED) // INTERNAL
+          eNext.Orientation( TopAbs_FORWARD );
+        TopoDS_Vertex vn =
+          forward ? TopExp::FirstVertex(eNext,true) : TopExp::LastVertex(eNext,true);
+        bool reverse = (!v.IsSame(vn));
         if ( reverse )
           eNext.Reverse();
         return eNext;
@@ -297,14 +299,17 @@ StdMeshers_CompositeSegment_1D::GetFaceSide(SMESH_Mesh&        aMesh,
                                             const bool         ignoreMeshed)
 {
   list< TopoDS_Edge > edges;
-  edges.push_back( anEdge );
+  if ( anEdge.Orientation() <= TopAbs_REVERSED )
+    edges.push_back( anEdge );
+  else
+    edges.push_back( TopoDS::Edge( anEdge.Oriented( TopAbs_FORWARD ))); // PAL21718
 
   list <const SMESHDS_Hypothesis *> hypList;
   SMESH_Algo* theAlgo = aMesh.GetGen()->GetAlgo( aMesh, anEdge );
   if ( theAlgo ) hypList = theAlgo->GetUsedHypothesis(aMesh, anEdge, false);
   for ( int forward = 0; forward < 2; ++forward )
   {
-    TopoDS_Edge eNext = nextC1Edge( anEdge, aMesh, forward );
+    TopoDS_Edge eNext = nextC1Edge( edges.back(), aMesh, forward );
     while ( !eNext.IsNull() ) {
       if ( ignoreMeshed ) {
         // eNext must not have computed mesh
index 1ec16033536ceada8969f039607090a21d497321..7f003f4ae787118f12f976fb1e461992d1f5a651 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_CompositeSegment_1D.hxx
 //  Module : SMESH
@@ -43,7 +44,7 @@ public:
   virtual ~StdMeshers_CompositeSegment_1D();
 
   virtual bool Compute(SMESH_Mesh&         aMesh,
-                      const TopoDS_Shape& aShape);
+                       const TopoDS_Shape& aShape);
   /*!
    * \brief Sets event listener to submeshes if necessary
     * \param subMesh - submesh where algo is set
index 42ad9219a50bcf938bc4f67114b088df717d6f5f..7a8650601dc8dd0a9744193b3c69cccb6fd27378 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers_Deflection1D : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Deflection1D.cxx
 //  Module : SMESH
index a3cf19b70607c0e55fae27e9f82a3f3fb4f8f8b8..8a92b037ccbdb52ca7ebeeaa03a445fea3fc1653 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Deflection1D.hxx
 //  Module : SMESH
 //
-
 #ifndef _StdMeshers_Deflection1D_HXX_
 #define _StdMeshers_Deflection1D_HXX_
 
index f2e591f342928e4b2cb4d414d94a0a1f88956e8c..974c7ffa762d926a58f8bdfcf59e9d26e272c6fc 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers : implementaion of point distribution algorithm
 //  File   : StdMeshers_Distribution.cxx
 //  Author : Alexandre SOLOVYOV
@@ -303,21 +304,21 @@ double dihotomySolve( Function& f, const double val, const double _start, const
 }
 
 bool buildDistribution( const TCollection_AsciiString& f, const int conv, const double start, const double end,
-                       const int nbSeg, vector<double>& data, const double eps )
+                        const int nbSeg, vector<double>& data, const double eps )
 {
   FunctionExpr F( f.ToCString(), conv );
   return buildDistribution( F, start, end, nbSeg, data, eps );
 }
 
 bool buildDistribution( const std::vector<double>& f, const int conv, const double start, const double end,
-                       const int nbSeg, vector<double>& data, const double eps )
+                        const int nbSeg, vector<double>& data, const double eps )
 {
   FunctionTable F( f, conv );
   return buildDistribution( F, start, end, nbSeg, data, eps );
 }
 
 bool buildDistribution( const Function& func, const double start, const double end, const int nbSeg,
-                       vector<double>& data, const double eps )
+                        vector<double>& data, const double eps )
 {
   if( nbSeg<=0 )
     return false;
index 373305b6320cadd3677c00ef1c5b998efe960ef4..2f5214a2bcf3bc1479f6b872daa826b4d2b7c440 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers : implementaion of point distribution algorithm
 //  File   : StdMeshers_Distribution.hxx
 //  Author : Alexandre SOLOVYOV
@@ -102,16 +103,16 @@ private:
 
 STDMESHERS_EXPORT
 bool buildDistribution( const Function& f,
-                       const double start, const double end,
-                       const int nbSeg,
-                       std::vector<double>& data,
-                       const double eps );
+                        const double start, const double end,
+                        const int nbSeg,
+                        std::vector<double>& data,
+                        const double eps );
 
 STDMESHERS_EXPORT
 bool buildDistribution( const TCollection_AsciiString& f, const int conv, const double start, const double end,
-                       const int nbSeg, std::vector<double>& data, const double eps );
+                        const int nbSeg, std::vector<double>& data, const double eps );
 STDMESHERS_EXPORT
 bool buildDistribution( const std::vector<double>& f, const int conv, const double start, const double end,
-                       const int nbSeg, std::vector<double>& data, const double eps );
+                        const int nbSeg, std::vector<double>& data, const double eps );
 
 #endif
index f34def73472a6283aace8030e2c18b82822804ea..3a8d365307af69000cccf64ee8f0a31e14cdd7f8 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : StdMeshers_FaceSide.hxx
 // Created   : Wed Jan 31 18:41:25 2007
@@ -31,7 +32,7 @@
 #include "SMDS_MeshNode.hxx"
 #include "SMESHDS_Mesh.hxx"
 #include "SMESHDS_SubMesh.hxx"
-//#include "SMESH_Algo.hxx"
+#include "SMESH_Algo.hxx"
 #include "SMESH_Mesh.hxx"
 #include "SMESH_MesherHelper.hxx"
 #include "SMESH_ComputeError.hxx"
 #include <BRep_Tool.hxx>
 #include <TopExp.hxx>
 #include <TopExp_Explorer.hxx>
+#include <TopoDS.hxx>
 #include <TopoDS_Face.hxx>
 #include <TopoDS_Vertex.hxx>
 #include <TopoDS_Wire.hxx>
 
+#include <GCPnts_AbscissaPoint.hxx>
+#include <Geom2dAdaptor_Curve.hxx>
+
 #include <map>
 
 #include "utilities.h"
@@ -87,9 +92,12 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
   int nbEdges = theEdges.size();
   myEdge.resize( nbEdges );
   myC2d.resize( nbEdges );
+  myC3dAdaptor.resize( nbEdges );
   myFirst.resize( nbEdges );
   myLast.resize( nbEdges );
   myNormPar.resize( nbEdges );
+  myEdgeLength.resize( nbEdges );
+  myIsUniform.resize( nbEdges, true );
   myLength = 0;
   myNbPonits = myNbSegments = 0;
   myMesh = theMesh;
@@ -99,16 +107,16 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
   if ( nbEdges == 0 ) return;
 
   SMESHDS_Mesh* meshDS = theMesh->GetMeshDS();
-  vector<double> len( nbEdges );
 
   int nbDegen = 0;
   list<TopoDS_Edge>::iterator edge = theEdges.begin();
+  TopoDS_Iterator vExp;
   for ( int index = 0; edge != theEdges.end(); ++index, ++edge )
   {
     int i = theIsForward ? index : nbEdges - index - 1;
-    len[i] = SMESH_Algo::EdgeLength( *edge );
-    if ( len[i] < DBL_MIN ) nbDegen++;
-    myLength += len[i];
+    myEdgeLength[i] = SMESH_Algo::EdgeLength( *edge );
+    if ( myEdgeLength[i] < DBL_MIN ) nbDegen++;
+    myLength += myEdgeLength[i];
     myEdge[i] = *edge;
     if ( !theIsForward ) myEdge[i].Reverse();
 
@@ -129,16 +137,41 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
       myNbPonits += nbN;
       myNbSegments += sm->NbElements();
     }
-    if ( SMESH_Algo::VertexNode( TopExp::FirstVertex( *edge, 1), meshDS ))
+    // TopExp::FirstVertex() and TopExp::LastVertex() return NULL from INTERNAL edge
+    vExp.Initialize( *edge );
+    if ( vExp.Value().Orientation() == TopAbs_REVERSED ) vExp.Next();
+    if ( SMESH_Algo::VertexNode( TopoDS::Vertex( vExp.Value()), meshDS ))
       myNbPonits += 1; // for the first end
     else
       myMissingVertexNodes = true;
-  }
-  if ( SMESH_Algo::VertexNode( TopExp::LastVertex( theEdges.back(), 1), meshDS ))
-    myNbPonits++; // for the last end
-  else
-    myMissingVertexNodes = true;
 
+    // check if edge has non-uniform parametrization (issue 0020705)
+    if ( !myC2d[i].IsNull() && myEdgeLength[i] > DBL_MIN)
+    {
+      Geom2dAdaptor_Curve A2dC( myC2d[i] );
+      double p2 = myFirst[i]+(myLast[i]-myFirst[i])/2., p4 = myFirst[i]+(myLast[i]-myFirst[i])/4.;
+      double d2 = GCPnts_AbscissaPoint::Length( A2dC, myFirst[i], p2 );
+      double d4 = GCPnts_AbscissaPoint::Length( A2dC, myFirst[i], p4 );
+      //cout<<"len = "<<len<<"  d2 = "<<d2<<"  fabs(2*d2/len-1.0) = "<<fabs(2*d2/len-1.0)<<endl;
+      myIsUniform[i] = !( fabs(2*d2/myEdgeLength[i]-1.0) > 0.01 || fabs(2*d4/d2-1.0) > 0.01 );
+      if ( !myIsUniform[i] )
+      {
+        double fp,lp;
+        TopLoc_Location L;
+        Handle(Geom_Curve) C3d = BRep_Tool::Curve(myEdge[i],L,fp,lp);
+        myC3dAdaptor[i].Load( C3d, fp,lp );
+      }
+    }
+  }
+  vExp.Initialize( theEdges.back() );
+  if ( vExp.Value().Orientation() != TopAbs_REVERSED ) vExp.Next();
+  if ( vExp.More() )
+  {
+    if ( SMESH_Algo::VertexNode( TopoDS::Vertex( vExp.Value()), meshDS ))
+      myNbPonits++; // for the last end
+    else
+      myMissingVertexNodes = true;
+  }
   if ( nbEdges > 1 && myLength > DBL_MIN ) {
     const double degenNormLen = 1.e-5;
     double totLength = myLength;
@@ -146,9 +179,9 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
       totLength += myLength * degenNormLen * nbDegen;
     double prevNormPar = 0;
     for ( int i = 0; i < nbEdges; ++i ) {
-      if ( len[ i ] < DBL_MIN )
-        len[ i ] = myLength * degenNormLen;
-      myNormPar[ i ] = prevNormPar + len[i]/totLength;
+      if ( myEdgeLength[ i ] < DBL_MIN )
+        myEdgeLength[ i ] = myLength * degenNormLen;
+      myNormPar[ i ] = prevNormPar + myEdgeLength[i]/totLength;
       prevNormPar = myNormPar[ i ];
     }
   }
@@ -199,16 +232,21 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXConst,
     if ( NbEdges() == 0 ) return myPoints;
 
     SMESHDS_Mesh* meshDS = myMesh->GetMeshDS();
+    SMESH_MesherHelper helper(*myMesh);
+    bool paramOK;
 
     // sort nodes of all edges putting them into a map
 
     map< double, const SMDS_MeshNode*> u2node;
     //int nbOnDegen = 0;
-    for ( int i = 0; i < myEdge.size(); ++i ) {
-      // put 1st vertex node
-      TopoDS_Vertex VFirst, VLast;
-      TopExp::Vertices( myEdge[i], VFirst, VLast, true);
-      const SMDS_MeshNode* node = SMESH_Algo::VertexNode( VFirst, meshDS );
+    for ( int i = 0; i < myEdge.size(); ++i )
+    {
+      // Put 1st vertex node of a current edge
+      TopoDS_Vertex VV[2]; // TopExp::FirstVertex() returns NULL for INTERNAL edge
+      for ( TopoDS_Iterator vIt(myEdge[i]); vIt.More(); vIt.Next() )
+        VV[ VV[0].IsNull() ? 0 : 1 ] = TopoDS::Vertex(vIt.Value());
+      if ( VV[0].Orientation() == TopAbs_REVERSED ) std::swap ( VV[0], VV[1] );
+      const SMDS_MeshNode* node = SMESH_Algo::VertexNode( VV[0], meshDS );
       double prevNormPar = ( i == 0 ? 0 : myNormPar[ i-1 ]); // normalized param
       if ( node ) { // internal nodes may be missing
         u2node.insert( make_pair( prevNormPar, node ));
@@ -218,40 +256,55 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXConst,
         return myPoints;
       }
 
-      // put 2nd vertex node for a last edge
+      // Put internal nodes
+      SMESHDS_SubMesh* sm = meshDS->MeshElements( myEdge[i] );
+      if ( !sm ) continue;
+      vector< pair< double, const SMDS_MeshNode*> > u2nodeVec;
+      u2nodeVec.reserve( sm->NbNodes() );
+      SMDS_NodeIteratorPtr nItr = sm->GetNodes();
+      double paramSize = myLast[i] - myFirst[i];
+      double r = myNormPar[i] - prevNormPar;
+      if ( !myIsUniform[i] )
+        while ( nItr->more() )
+        {
+          const SMDS_MeshNode* node = nItr->next();
+          if ( myIgnoreMediumNodes && SMESH_MeshEditor::IsMedium( node, SMDSAbs_Edge ))
+            continue;
+          double u = helper.GetNodeU( myEdge[i], node, 0, &paramOK );
+          double aLenU = GCPnts_AbscissaPoint::Length
+            ( const_cast<GeomAdaptor_Curve&>( myC3dAdaptor[i]), myFirst[i], u );
+          if ( myEdgeLength[i] < aLenU ) // nonregression test "3D_mesh_NETGEN/G6"
+          {
+            u2nodeVec.clear();
+            break;
+          }
+          double normPar = prevNormPar + r*aLenU/myEdgeLength[i];
+          u2nodeVec.push_back( make_pair( normPar, node ));
+        }
+      nItr = sm->GetNodes();
+      if ( u2nodeVec.empty() )
+        while ( nItr->more() )
+        {
+          const SMDS_MeshNode* node = nItr->next();
+          if ( myIgnoreMediumNodes && SMESH_MeshEditor::IsMedium( node, SMDSAbs_Edge ))
+            continue;
+          double u = helper.GetNodeU( myEdge[i], node, 0, &paramOK );
+
+          // paramSize is signed so orientation is taken into account
+          double normPar = prevNormPar + r * ( u - myFirst[i] ) / paramSize;
+          u2nodeVec.push_back( make_pair( normPar, node ));
+        }
+      u2node.insert( u2nodeVec.begin(), u2nodeVec.end() );
+
+      // Put 2nd vertex node for a last edge
       if ( i+1 == myEdge.size() ) {
-        node = SMESH_Algo::VertexNode( VLast, meshDS );
+        node = SMESH_Algo::VertexNode( VV[1], meshDS );
         if ( !node ) {
           MESSAGE(" NO NODE on VERTEX" );
           return myPoints;
         }
         u2node.insert( make_pair( 1., node ));
       }
-
-      // put internal nodes
-      SMESHDS_SubMesh* sm = meshDS->MeshElements( myEdge[i] );
-      if ( !sm ) continue;
-      SMDS_NodeIteratorPtr nItr = sm->GetNodes();
-      double paramSize = myLast[i] - myFirst[i], r = myNormPar[i] - prevNormPar;
-      while ( nItr->more() ) {
-        const SMDS_MeshNode* node = nItr->next();
-        if ( myIgnoreMediumNodes && SMESH_MeshEditor::IsMedium( node, SMDSAbs_Edge ))
-          continue;
-        const SMDS_EdgePosition* epos =
-          static_cast<const SMDS_EdgePosition*>(node->GetPosition());
-        double u = epos->GetUParameter();
-        // paramSize is signed so orientation is taken into account
-        double normPar = prevNormPar + r * ( u - myFirst[i] ) / paramSize;
-#ifdef _DEBUG_
-        if ( normPar > 1 || normPar < 0) {
-          dump("DEBUG");
-          MESSAGE ( "WRONG normPar: "<<normPar<< " prevNormPar="<<prevNormPar
-                    << " u="<<u << " myFirst[i]="<<myFirst[i]<< " myLast[i]="<<myLast[i]
-                    << " paramSize="<<paramSize );
-        }
-#endif
-        u2node.insert( make_pair( normPar, node ));
-      }
     }
     if ( u2node.size() != myNbPonits ) {
       MESSAGE("Wrong node parameters on edges, u2node.size():"
@@ -392,9 +445,12 @@ void StdMeshers_FaceSide::Reverse()
   if ( nbEdges > 1 ) {
     reverse( myEdge );
     reverse( myC2d );
+    reverse( myC3dAdaptor );
     reverse( myFirst );
     reverse( myLast );
     reverse( myNormPar );
+    reverse( myEdgeLength );
+    reverse( myIsUniform );
   }
   myNormPar[nbEdges-1]=1.;
   myPoints.clear();
@@ -483,6 +539,7 @@ BRepAdaptor_CompCurve* StdMeshers_FaceSide::GetCurve3d() const
   return new BRepAdaptor_CompCurve( aWire );
 }
 
+
 //================================================================================
 /*!
  * \brief Return 2D point by normalized parameter
@@ -497,9 +554,22 @@ gp_Pnt2d StdMeshers_FaceSide::Value2d(double U) const
     int i = EdgeIndex( U );
     double prevU = i ? myNormPar[ i-1 ] : 0;
     double r = ( U - prevU )/ ( myNormPar[ i ] - prevU );
-    return myC2d[ i ]->Value( myFirst[i] * ( 1 - r ) + myLast[i] * r );
+
+    double par = myFirst[i] * ( 1 - r ) + myLast[i] * r;
+    
+    // check parametrization of curve
+    if( !myIsUniform[i] )
+    {
+      double aLen3dU = r * myEdgeLength[i] * ( myFirst[i]>myLast[i] ? -1. : 1.);
+      GCPnts_AbscissaPoint AbPnt
+        ( const_cast<GeomAdaptor_Curve&>( myC3dAdaptor[i]), aLen3dU, myFirst[i] );
+      if( AbPnt.IsDone() ) {
+        par = AbPnt.Parameter();
+      }
+    }
+    return myC2d[ i ]->Value(par);
+
   }
-  //return gp_Pnt2d( 1e+100, 1e+100 );
   return myDefaultPnt2d;
 }
 
@@ -527,20 +597,28 @@ TSideVector StdMeshers_FaceSide::GetFaceWires(const TopoDS_Face& theFace,
   for ( int iW = 0; iW < nbWires; ++iW )
   {
     std::advance( to, *nbE++ );
+    if ( *nbE == 0 ) // Issue 0020676
+    {
+      --nbWires;
+      --iW;
+      wires.resize( nbWires );
+      continue;
+    }
     list< TopoDS_Edge > wireEdges( from, to );
     // assure that there is a node on the first vertex
     // as StdMeshers_FaceSide::GetUVPtStruct() requires
-    while ( !SMESH_Algo::VertexNode( TopExp::FirstVertex( wireEdges.front(), true),
-                                     theMesh.GetMeshDS()))
-    {
-      wireEdges.splice(wireEdges.end(), wireEdges,
-                       wireEdges.begin(), ++wireEdges.begin());
-      if ( from->IsSame( wireEdges.front() )) {
-        theError = TError
-          ( new SMESH_ComputeError(COMPERR_BAD_INPUT_MESH,"No nodes on vertices"));
-        return TSideVector(0);
+    if ( wireEdges.front().Orientation() != TopAbs_INTERNAL ) // Issue 0020676
+      while ( !SMESH_Algo::VertexNode( TopExp::FirstVertex( wireEdges.front(), true),
+                                       theMesh.GetMeshDS()))
+      {
+        wireEdges.splice(wireEdges.end(), wireEdges,
+                         wireEdges.begin(), ++wireEdges.begin());
+        if ( from->IsSame( wireEdges.front() )) {
+          theError = TError
+            ( new SMESH_ComputeError(COMPERR_BAD_INPUT_MESH,"No nodes on vertices"));
+          return TSideVector(0);
+        }
       }
-    }
     const bool isForward = true;
     StdMeshers_FaceSide* wire = new StdMeshers_FaceSide( theFace, wireEdges, &theMesh,
                                                          isForward, theIgnoreMediumNodes);
@@ -550,3 +628,42 @@ TSideVector StdMeshers_FaceSide::GetFaceWires(const TopoDS_Face& theFace,
   return wires;
 }
 
+//================================================================================
+/*!
+ * \brief Return 1st vertex of the i-the edge
+ */
+//================================================================================
+
+TopoDS_Vertex StdMeshers_FaceSide::FirstVertex(int i) const
+{
+  TopoDS_Vertex v;
+  if ( i < NbEdges() )
+  {
+    v = myEdge[i].Orientation() <= TopAbs_REVERSED ? // FORWARD || REVERSED
+        TopExp::FirstVertex( myEdge[i], 1 )        :
+        TopoDS::Vertex( TopoDS_Iterator( myEdge[i] ).Value() );
+  }
+  return v;
+}
+
+//================================================================================
+/*!
+ * \brief Return last vertex of the i-the edge
+ */
+//================================================================================
+
+TopoDS_Vertex StdMeshers_FaceSide::LastVertex(int i) const
+{
+  TopoDS_Vertex v;
+  if ( i < NbEdges() )
+  {
+    const TopoDS_Edge& edge = i<0 ? myEdge[ NbEdges() + i ] : myEdge[i];
+    if ( edge.Orientation() <= TopAbs_REVERSED ) // FORWARD || REVERSED
+      v = TopExp::LastVertex( edge, 1 );
+    else
+      for ( TopoDS_Iterator vIt( edge ); vIt.More(); vIt.Next() )
+        v = TopoDS::Vertex( vIt.Value() );
+  }
+  return v;
+}
+
index 8382a8fbd1cba8f8f4ae665e156c65fbe27c3590..69d3f87a89e35ac57e015a3810194839fe099d66 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : StdMeshers_FaceSide.hxx
 // Created   : Wed Jan 31 18:41:25 2007
 #ifndef StdMeshers_FaceSide_HeaderFile
 #define StdMeshers_FaceSide_HeaderFile
 
-#include <gp_Pnt2d.hxx>
+#include <Geom2d_Curve.hxx>
+#include <GeomAdaptor_Curve.hxx>
 #include <TopoDS_Edge.hxx>
 #include <TopoDS_Vertex.hxx>
-#include <Geom2d_Curve.hxx>
-#include <TopExp.hxx>
+#include <gp_Pnt2d.hxx>
 
 #include "SMESH_StdMeshers.hxx"
-#include "SMESH_Algo.hxx"
 
 #include <vector>
 #include <list>
@@ -47,7 +47,7 @@ class Adaptor2d_Curve2d;
 class Adaptor3d_Curve;
 class BRepAdaptor_CompCurve;
 class TopoDS_Face;
-class SMESH_ComputeError;
+struct SMESH_ComputeError;
 
 typedef struct uvPtStruct
 {
@@ -124,7 +124,7 @@ public:
    */
   SMESH_Mesh* GetMesh() const { return myMesh; }
   /*!
-   * \brief Return true if there vertices without nodes
+   * \brief Return true if there are vertices without nodes
    */
   bool MissVertexNode() const { return myMissingVertexNodes; }
   /*!
@@ -170,11 +170,11 @@ public:
   /*!
    * \brief Return 1st vertex of the i-the edge (count starts from zero)
    */
-  inline TopoDS_Vertex FirstVertex(int i=0) const;
+  TopoDS_Vertex FirstVertex(int i=0) const;
   /*!
    * \brief Return last vertex of the i-the edge (count starts from zero)
    */
-  inline TopoDS_Vertex LastVertex(int i=-1) const;
+  TopoDS_Vertex LastVertex(int i=-1) const;
   /*!
    * \brief Return first normalized parameter of the i-the edge (count starts from zero)
    */
@@ -198,11 +198,16 @@ public:
   
 
 protected:
+
+  // DON't FORGET tO update Reverse() when adding one more vector!
   std::vector<uvPtStruct>           myPoints, myFalsePoints;
   std::vector<TopoDS_Edge>          myEdge;
   std::vector<Handle(Geom2d_Curve)> myC2d;
+  std::vector<GeomAdaptor_Curve>    myC3dAdaptor;
   std::vector<double>               myFirst, myLast;
   std::vector<double>               myNormPar;
+  std::vector<double>               myEdgeLength;
+  std::vector<double>               myIsUniform;
   double                            myLength;
   int                               myNbPonits, myNbSegments;
   SMESH_Mesh*                       myMesh;
@@ -243,28 +248,6 @@ inline double StdMeshers_FaceSide::Parameter(double U, TopoDS_Edge & edge) const
   return myFirst[i] * ( 1 - r ) + myLast[i] * r;
 }
 
-//================================================================================
-/*!
- * \brief Return 1st vertex of the i-the edge
- */
-//================================================================================
-
-inline TopoDS_Vertex StdMeshers_FaceSide::FirstVertex(int i) const
-{
-  return i < myEdge.size() ? TopExp::FirstVertex( myEdge[i], 1 ) : TopoDS_Vertex();
-}
-
-//================================================================================
-/*!
- * \brief Return last vertex of the i-the edge
- */
-//================================================================================
-
-inline TopoDS_Vertex StdMeshers_FaceSide::LastVertex(int i) const
-{
-  return i<0 ? TopExp::LastVertex( myEdge.back(), 1) : i<myEdge.size() ? TopExp::LastVertex( myEdge[i], 1 ) : TopoDS_Vertex();
-}
-
 //================================================================================
 /*!
  * \brief Return first normalized parameter of the i-the edge
index cd163c09b14f50e72e3b2160395b15043d06a4fd..2d5586c0d8266be50440c0b0328eb47f868532a5 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_FixedPoints1D.cxx
 //  Author : Damien COQUERET, OCC
@@ -123,13 +121,13 @@ ostream & StdMeshers_FixedPoints1D::SaveTo(ostream & save)
   }
 
   listSize = _nbsegs.size();
-  save << listSize;
+  save << " " << listSize;
   if ( listSize > 0 ) {
     for ( int i = 0; i < listSize; i++) save << " " << _nbsegs[i];
   }
 
   listSize = _edgeIDs.size();
-  save << listSize;
+  save << " " << listSize;
   if ( listSize > 0 ) {
     for ( int i = 0; i < listSize; i++)
       save << " " << _edgeIDs[i];
@@ -154,6 +152,7 @@ istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load)
 
   isOK = (load >> intVal);
   if (isOK && intVal > 0) {
+    _params.clear();
     _params.reserve( intVal );
     for (int i = 0; i < _params.capacity() && isOK; i++) {
       isOK = (load >> dblVal);
@@ -163,6 +162,7 @@ istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load)
 
   isOK = (load >> intVal);
   if (isOK && intVal > 0) {
+    _nbsegs.clear();
     _nbsegs.reserve( intVal );
     for (int i = 0; i < _nbsegs.capacity() && isOK; i++) {
       isOK = (load >> intVal);
@@ -172,6 +172,7 @@ istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load)
 
   isOK = (load >> intVal);
   if (isOK && intVal > 0) {
+    _edgeIDs.clear();
     _edgeIDs.reserve( intVal );
     for (int i = 0; i < _edgeIDs.capacity() && isOK; i++) {
       isOK = (load >> intVal);
index b5126e1c3ac56f3fd98b5443c204810c7110bdec..4d203e31dd190fcb7f1fea503085d7c35d7d933b 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_FixedPoints1D.hxx
 //  Author : Damien COQUERET, OCC
diff --git a/src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx b/src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx
new file mode 100644 (file)
index 0000000..28b628c
--- /dev/null
@@ -0,0 +1,1071 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// File      : StdMeshers_HexaFromSkin_3D.cxx
+// Created   : Wed Jan 27 12:28:07 2010
+// Author    : Edward AGAPOV (eap)
+//
+#include "StdMeshers_HexaFromSkin_3D.hxx"
+
+#include "SMDS_VolumeOfNodes.hxx"
+#include "SMDS_VolumeTool.hxx"
+#include "SMESH_Block.hxx"
+#include "SMESH_MesherHelper.hxx"
+
+#include <gp_Ax2.hxx>
+
+//#include "utilities.h"
+
+// Define error message
+#ifdef _DEBUG_
+#define BAD_MESH_ERR \
+  error(SMESH_Comment("Can't detect block-wise structure of the input 2D mesh.\n" \
+                      __FILE__ ":" )<<__LINE__)
+#else
+#define BAD_MESH_ERR \
+  error(SMESH_Comment("Can't detect block-wise structure of the input 2D mesh"))
+#endif
+
+// Debug output
+#define _DUMP_(msg) //cout << msg << endl
+
+
+
+namespace
+{
+  enum EBoxSides //!< sides of the block
+    {
+      B_BOTTOM=0, B_RIGHT, B_TOP, B_LEFT, B_FRONT, B_BACK, B_UNDEFINED
+    };
+  const char* SBoxSides[] = //!< names of block sides
+    {
+      "BOTTOM", "RIGHT", "TOP", "LEFT", "FRONT", "BACK", "UNDEFINED"
+    };
+  enum EQuadEdge //!< edges of quadrangle side
+    {
+      Q_BOTTOM, Q_RIGHT, Q_TOP, Q_LEFT, Q_UNDEFINED
+    };
+
+
+  //================================================================================
+  /*!
+   * \brief return logical coordinates (i.e. min or max) of ends of edge
+   */
+  //================================================================================
+
+  bool getEdgeEnds(EQuadEdge edge, bool& xMax1, bool& yMax1, bool& xMax2, bool& yMax2 )
+  {
+    xMax1=0, yMax1=0, xMax2=1, yMax2=1;
+    switch( edge )
+    {
+    case Q_BOTTOM: yMax2 = 0; break;
+    case Q_RIGHT:  xMax1 = 1; break;
+    case Q_TOP:    yMax1 = 1; break;
+    case Q_LEFT:   xMax2 = 0; break;
+    default:
+      return false;
+    }
+    return true;
+  }
+
+  //================================================================================
+  /*!
+   * \brief return true if a node is at block corner
+   */
+  //================================================================================
+
+  bool isCornerNode( const SMDS_MeshNode* n )
+  {
+    return n && n->NbInverseElements( SMDSAbs_Face ) % 2;
+  }
+
+  //================================================================================
+  /*!
+   * \brief check element type
+   */
+  //================================================================================
+
+  bool isQuadrangle(const SMDS_MeshElement* e)
+  {
+    return ( e && e->NbNodes() == ( e->IsQuadratic() ? 8 : 4 ));
+  }
+
+  //================================================================================
+  /*!
+   * \brief return opposite node of a quadrangle face
+   */
+  //================================================================================
+
+  const SMDS_MeshNode* oppositeNode(const SMDS_MeshElement* quad, int iNode)
+  {
+    return quad->GetNode( (iNode+2) % 4 );
+  }
+
+  //================================================================================
+  /*!
+   * \brief Convertor of a pair of integers to a sole index
+   */
+  struct _Indexer
+  {
+    int _xSize, _ySize;
+    _Indexer( int xSize=0, int ySize=0 ): _xSize(xSize), _ySize(ySize) {}
+    int size() const { return _xSize * _ySize; }
+    int operator()(int x, int y) const { return y * _xSize + x; }
+  };
+  //================================================================================
+  /*!
+   * \brief Oriented convertor of a pair of integers to a sole index 
+   */
+  class _OrientedIndexer : public _Indexer
+  {
+  public:
+    enum OriFlags //!< types of block side orientation
+      {
+        REV_X = 1, REV_Y = 2, SWAP_XY = 4, MAX_ORI = REV_X|REV_Y|SWAP_XY
+      };
+    _OrientedIndexer( const _Indexer& indexer, const int oriFlags ):
+      _Indexer( indexer._xSize, indexer._ySize ),
+      _xSize (indexer._xSize), _ySize(indexer._ySize),
+      _xRevFun((oriFlags & REV_X) ? & reverse : & lazy),
+      _yRevFun((oriFlags & REV_Y) ? & reverse : & lazy),
+      _swapFun((oriFlags & SWAP_XY ) ? & swap : & lazy)
+    {
+      (*_swapFun)( _xSize, _ySize );
+    }
+    //!< Return index by XY
+    int operator()(int x, int y) const
+    {
+      (*_xRevFun)( x, const_cast<int&>( _xSize ));
+      (*_yRevFun)( y, const_cast<int&>( _ySize ));
+      (*_swapFun)( x, y );
+      return _Indexer::operator()(x,y);
+    }
+    //!< Return index for a corner
+    int corner(bool xMax, bool yMax) const
+    {
+      int x = xMax, y = yMax, size = 2;
+      (*_xRevFun)( x, size );
+      (*_yRevFun)( y, size );
+      (*_swapFun)( x, y );
+      return _Indexer::operator()(x ? _Indexer::_xSize-1 : 0 , y ? _Indexer::_ySize-1 : 0);
+    }
+    int xSize() const { return _xSize; }
+    int ySize() const { return _ySize; }
+  private:
+    _Indexer _indexer;
+    int _xSize, _ySize;
+
+    typedef void (*TFun)(int& x, int& y);
+    TFun _xRevFun, _yRevFun, _swapFun;
+    
+    static void lazy(int&, int&) {}
+    static void reverse(int& x, int& size) { x = size - x - 1; }
+    static void swap(int& x, int& y) { std::swap(x,y); }
+  };
+  //================================================================================
+  /*!
+   * \brief Structure corresponding to the meshed side of block
+   */
+  struct _BlockSide
+  {
+    vector<const SMDS_MeshNode*> _grid;
+    _Indexer                     _index;
+    int                          _nbBlocksExpected;
+    int                          _nbBlocksFound;
+
+#ifdef _DEBUG_
+#define _grid_access_(args) _grid.at( args )
+#else
+#define _grid_access_(args) _grid[ args ]
+#endif
+    //!< Return node at XY
+    const SMDS_MeshNode* getNode(int x, int y) const { return _grid_access_( _index( x, y )); }
+    //!< Set node at XY
+    void setNode(int x, int y, const SMDS_MeshNode* n) { _grid_access_( _index( x, y )) = n; }
+    //!< Return an edge
+    SMESH_OrientedLink getEdge(EQuadEdge edge) const
+    {
+      bool x1, y1, x2, y2; getEdgeEnds( edge, x1, y1, x2, y2 );
+      return SMESH_OrientedLink( getCornerNode ( x1, y1 ), getCornerNode( x2, y2 ));
+    }
+    //!< Return a corner node
+    const SMDS_MeshNode* getCornerNode(bool isXMax, bool isYMax) const
+    {
+      return getNode( isXMax ? _index._xSize-1 : 0 , isYMax ? _index._ySize-1 : 0 );
+    }
+    const SMDS_MeshElement* getCornerFace(const SMDS_MeshNode* cornerNode) const;
+    //!< True if all blocks this side belongs to have beem found
+    bool isBound() const { return _nbBlocksExpected <= _nbBlocksFound; }
+    //!< Return coordinates of node at XY
+    gp_XYZ getXYZ(int x, int y) const { return SMESH_MeshEditor::TNodeXYZ( getNode( x, y )); }
+    //!< Return gravity center of the four corners and the middle node
+    gp_XYZ getGC() const
+    {
+      gp_XYZ xyz =
+        getXYZ( 0, 0 ) +
+        getXYZ( _index._xSize-1, 0 ) +
+        getXYZ( 0, _index._ySize-1 ) +
+        getXYZ( _index._xSize-1, _index._ySize-1 ) +
+        getXYZ( _index._xSize/2, _index._ySize/2 );
+      return xyz / 5;
+    }
+    //!< Return number of mesh faces
+    int getNbFaces() const { return (_index._xSize-1) * (_index._ySize-1); }
+  };
+  //================================================================================
+  /*!
+   * \brief _BlockSide with changed orientation
+   */
+  struct _OrientedBlockSide
+  {
+    _BlockSide*       _side;
+    _OrientedIndexer  _index;
+
+    _OrientedBlockSide( _BlockSide* side=0, const int oriFlags=0 ):
+      _side(side), _index(side ? side->_index : _Indexer(), oriFlags ) {}
+    //!< return coordinates by XY
+    gp_XYZ xyz(int x, int y) const
+    {
+      return SMESH_MeshEditor::TNodeXYZ( _side->_grid_access_( _index( x, y )) );
+    }
+    //!< safely return a node by XY
+    const SMDS_MeshNode* node(int x, int y) const
+    {
+      int i = _index( x, y );
+      return ( i < 0 || i >= _side->_grid.size()) ? 0 : _side->_grid[i];
+    }
+    //!< Return an edge
+    SMESH_OrientedLink edge(EQuadEdge edge) const
+    {
+      bool x1, y1, x2, y2; getEdgeEnds( edge, x1, y1, x2, y2 );
+      return SMESH_OrientedLink( cornerNode ( x1, y1 ), cornerNode( x2, y2 ));
+    }
+    //!< Return a corner node
+    const SMDS_MeshNode* cornerNode(bool isXMax, bool isYMax) const
+    {
+      return _side->_grid_access_( _index.corner( isXMax, isYMax ));
+    }
+    //!< return its size in nodes
+    int getHoriSize() const { return _index.xSize(); }
+    int getVertSize() const  { return _index.ySize(); }
+    //!< True if _side has been initialized
+    operator bool() const { return _side; }
+    //! Direct access to _side
+    const _BlockSide* operator->() const { return _side; }
+    _BlockSide* operator->() { return _side; }
+  };
+  //================================================================================
+  /*!
+   * \brief Meshed skin of block
+   */
+  struct _Block
+  {
+    _OrientedBlockSide _side[6]; // 6 sides of a sub-block
+
+    const _OrientedBlockSide& getSide(int i) const { return _side[i]; }
+    bool hasSide( const _OrientedBlockSide& s) const
+    {
+      if ( s ) for (int i=0;i<6;++i) if ( _side[i] && _side[i]._side == s._side ) return true;
+      return false;
+    }
+  };
+  //================================================================================
+  /*!
+   * \brief Skin mesh possibly containing several meshed blocks
+   */
+  class _Skin
+  {
+  public:
+
+    int findBlocks(SMESH_Mesh& mesh);
+    //!< return i-th block
+    const _Block& getBlock(int i) const { return _blocks[i]; }
+    //!< return error description
+    const SMESH_Comment& error() const { return _error; }
+
+  private:
+    bool fillSide( _BlockSide& side, const SMDS_MeshElement* cornerQuad);
+    bool fillRowsUntilCorner(const SMDS_MeshElement* quad,
+                             const SMDS_MeshNode*    n1,
+                             const SMDS_MeshNode*    n2,
+                             vector<const SMDS_MeshNode*>& verRow1,
+                             vector<const SMDS_MeshNode*>& verRow2,
+                             bool alongN1N2 );
+    _OrientedBlockSide findBlockSide( EBoxSides startBlockSide,
+                                      EQuadEdge sharedSideEdge1,
+                                      EQuadEdge sharedSideEdge2);
+    //!< update own data and data of the side bound to block
+    void setSideBoundToBlock( _BlockSide& side )
+    {
+      side._nbBlocksFound++;
+      if ( side.isBound() )
+      {
+        for ( int e = 0; e < int(Q_UNDEFINED); ++e )
+          _edge2sides[ side.getEdge( (EQuadEdge) e ) ].erase( &side );
+      }
+    }
+    //!< store reason of error
+    int error(const SMESH_Comment& reason) { _error = reason; return 0; }
+
+    SMESH_Comment      _error;
+
+    list< _BlockSide > _allSides;
+    vector< _Block >   _blocks;
+
+    //map< const SMDS_MeshNode*, set< _BlockSide* > > _corner2sides;
+    map< SMESH_OrientedLink, set< _BlockSide* > > _edge2sides;
+  };
+
+  //================================================================================
+  /*!
+   * \brief Find and return number of submeshes corresponding to blocks
+   */
+  //================================================================================
+
+  int _Skin::findBlocks(SMESH_Mesh& mesh)
+  {
+    SMESHDS_Mesh* meshDS = mesh.GetMeshDS();
+
+    // Find a node at any block corner
+
+    SMDS_NodeIteratorPtr nIt = meshDS->nodesIterator(/*idInceasingOrder=*/true);
+    if ( !nIt->more() ) return error("Empty mesh");
+
+    const SMDS_MeshNode* nCorner = 0;
+    while ( nIt->more() )
+    {
+      nCorner = nIt->next();
+      if ( isCornerNode( nCorner ))
+        break;
+      else
+        nCorner = 0;
+    }
+    if ( !nCorner )
+      return BAD_MESH_ERR;
+
+    // --------------------------------------------------------------------
+    // Find all block sides starting from mesh faces sharing the corner node
+    // --------------------------------------------------------------------
+
+    int nbFacesOnSides = 0;
+    TIDSortedElemSet cornerFaces; // corner faces of found _BlockSide's
+    list< const SMDS_MeshNode* > corners( 1, nCorner );
+    list< const SMDS_MeshNode* >::iterator corner = corners.begin();
+    while ( corner != corners.end() )
+    {
+      SMDS_ElemIteratorPtr faceIt = (*corner)->GetInverseElementIterator( SMDSAbs_Face );
+      while ( faceIt->more() )
+      {
+        const SMDS_MeshElement* face = faceIt->next();
+        if ( !cornerFaces.insert( face ).second )
+          continue; // already loaded block side
+
+        if ( !isQuadrangle( face ))
+          return error("Non-quadrangle elements in the input mesh");
+
+        if ( _allSides.empty() || !_allSides.back()._grid.empty() )
+          _allSides.push_back( _BlockSide() );
+
+        _BlockSide& side = _allSides.back();
+        if ( !fillSide( side, face ) )
+        {
+          if ( !_error.empty() )
+            return false;
+        }
+        else
+        {
+          for ( int isXMax = 0; isXMax < 2; ++isXMax )
+            for ( int isYMax = 0; isYMax < 2; ++isYMax )
+            {
+              const SMDS_MeshNode* nCorner = side.getCornerNode(isXMax,isYMax );
+              if ( !isCornerNode( nCorner ))
+                return BAD_MESH_ERR;
+              //_corner2sides[ nCorner ].insert( &side );
+              corners.push_back( nCorner );
+              cornerFaces.insert( side.getCornerFace( nCorner ));
+            }
+          for ( int e = 0; e < int(Q_UNDEFINED); ++e )
+            _edge2sides[ side.getEdge( (EQuadEdge) e ) ].insert( &side );
+
+          nbFacesOnSides += side.getNbFaces();
+        }
+      }
+      ++corner;
+
+      // find block sides of other domains if any
+      if ( corner == corners.end() && nbFacesOnSides < mesh.NbQuadrangles() )
+      {
+        while ( nIt->more() )
+        {
+          nCorner = nIt->next();
+          if ( isCornerNode( nCorner ))
+            corner = corners.insert( corner, nCorner );
+        }
+        nbFacesOnSides = mesh.NbQuadrangles();
+      }
+    }
+    
+    if ( _allSides.empty() )
+      return BAD_MESH_ERR;
+    if ( _allSides.back()._grid.empty() )
+      _allSides.pop_back();
+
+    // ---------------------------
+    // Organize sides into blocks
+    // ---------------------------
+
+    // analyse sharing of sides by blocks
+    int nbBlockSides = 0; // nb of block sides taking into account their sharing
+    list < _BlockSide >::iterator sideIt = _allSides.begin();
+    for ( ; sideIt != _allSides.end(); ++sideIt )
+    {
+      _BlockSide& side = *sideIt;
+      bool isSharedSide = true;
+      for ( int e = 0; e < int(Q_UNDEFINED) && isSharedSide; ++e )
+        isSharedSide = _edge2sides[ side.getEdge( (EQuadEdge) e ) ].size() > 2;
+      side._nbBlocksFound = 0;
+      side._nbBlocksExpected = isSharedSide ? 2 : 1;
+      nbBlockSides += side._nbBlocksExpected;
+    }
+
+    // find sides of each block
+    int nbBlocks = 0;
+    while ( nbBlockSides >= 6 )
+    {
+      // get any side not bound to all blocks it belongs to
+      sideIt = _allSides.begin();
+      while ( sideIt != _allSides.end() && sideIt->isBound())
+        ++sideIt;
+
+      // start searching for block sides from the got side
+      bool ok = true;
+      if ( _blocks.empty() || _blocks.back()._side[B_FRONT] )
+        _blocks.resize( _blocks.size() + 1 );
+
+      _Block& block = _blocks.back();
+      block._side[B_FRONT] = &(*sideIt);
+      setSideBoundToBlock( *sideIt );
+      nbBlockSides--;
+      
+      // edges of neighbour sides of B_FRONT corresponding to front's edges
+      EQuadEdge edgeOfFront[4] = { Q_BOTTOM, Q_RIGHT, Q_TOP, Q_LEFT };
+      EQuadEdge edgeToFind [4] = { Q_BOTTOM, Q_LEFT, Q_BOTTOM, Q_LEFT };
+      for ( int i = Q_BOTTOM; ok && i <= Q_LEFT; ++i )
+        ok = ( block._side[i] = findBlockSide( B_FRONT, edgeOfFront[i], edgeToFind[i]));
+      if ( ok )
+        ok = ( block._side[B_BACK] = findBlockSide( B_TOP, Q_TOP, Q_TOP ));
+
+      if ( ok )
+      {
+        // check if just found block is same as one of previously found
+        bool isSame = false;
+        for ( int i = 1; i < _blocks.size() && !isSame; ++i )
+        {
+          _Block& prevBlock = _blocks[i-1];
+          isSame = true;
+          for ( int j = 0; j < 6 && isSame; ++j )
+            isSame = prevBlock.hasSide( block._side[ j ]);
+        }
+        ok = !isSame;
+      }
+
+      // count the found sides
+      _DUMP_(endl);
+      for (int i = 0; i < B_UNDEFINED; ++i )
+      {
+        _DUMP_("** Block side "<< SBoxSides[i] <<" "<< block._side[ i ]._side);
+        if ( block._side[ i ] )
+        {
+          if ( ok && i != B_FRONT)
+          {
+            setSideBoundToBlock( *block._side[ i ]._side );
+            nbBlockSides--;
+          }
+          _DUMP_("Corner 0,0 "<< block._side[ i ].cornerNode(0,0));
+          _DUMP_("Corner 1,0 "<< block._side[ i ].cornerNode(1,0));    
+          _DUMP_("Corner 1,1 "<< block._side[ i ].cornerNode(1,1));
+          _DUMP_("Corner 0,1 "<< block._side[ i ].cornerNode(0,1));
+        }
+        else
+        {
+          _DUMP_("Not found"<<endl);
+        }
+      }
+      if ( !ok )
+        block._side[0] = block._side[1] = block._side[2] =
+          block._side[3] = block._side[4] = block._side[5] = 0;
+      else
+        nbBlocks++;
+    }
+    if ( nbBlocks == 0 && _error.empty() )
+      return BAD_MESH_ERR;
+
+    return nbBlocks;
+  }
+
+  //================================================================================
+  /*!
+   * \brief Fill block side data starting from its corner quadrangle
+   */
+  //================================================================================
+
+  bool _Skin::fillSide( _BlockSide& side, const SMDS_MeshElement* cornerQuad)
+  {
+    // Find out size of block side mesured in nodes and by the way find two rows
+    // of nodes in two directions.
+
+    int x, y, nbX, nbY;
+    const SMDS_MeshElement* firstQuad = cornerQuad;
+    {
+      // get corner node of cornerQuad
+      const SMDS_MeshNode* nCorner = 0;
+      for ( int i = 0; i < 4 && !nCorner; ++i )
+        if ( isCornerNode( firstQuad->GetNode(i)))
+          nCorner = firstQuad->GetNode(i);
+      if ( !nCorner ) return false;
+
+      // get a node on block edge
+      int iCorner = firstQuad->GetNodeIndex( nCorner );
+      const SMDS_MeshNode* nOnEdge = firstQuad->GetNode( (iCorner+1) % 4);
+
+      // find out size of block side
+      vector<const SMDS_MeshNode*> horRow1, horRow2, verRow1, verRow2;
+      if ( !fillRowsUntilCorner( firstQuad, nCorner, nOnEdge, horRow1, horRow2, true ) ||
+           !fillRowsUntilCorner( firstQuad, nCorner, nOnEdge, verRow1, verRow2, false ))
+        return false;
+      nbX = horRow1.size(), nbY = verRow1.size();
+
+      // store found nodes
+      side._index._xSize = horRow1.size();
+      side._index._ySize = verRow1.size();
+      side._grid.resize( side._index.size(), NULL );
+
+      for ( x = 0; x < horRow1.size(); ++x )
+      {
+        side.setNode( x, 0, horRow1[x] );
+        side.setNode( x, 1, horRow2[x] );
+      }
+      for ( y = 0; y < verRow1.size(); ++y )
+      {
+        side.setNode( 0, y, verRow1[y] );
+        side.setNode( 1, y, verRow2[y] );
+      }
+    }
+    // Find the rest nodes
+
+    y = 1; // y of the row to fill
+    TIDSortedElemSet emptySet, avoidSet;
+    while ( ++y < nbY )
+    {
+      // get next firstQuad in the next row of quadrangles
+      //
+      //          n2up
+      //     o---o               <- y row
+      //     |   |
+      //     o---o  o  o  o  o   <- found nodes
+      //n1down    n2down       
+      //
+      int i1down, i2down, i2up;
+      const SMDS_MeshNode* n1down = side.getNode( 0, y-1 );
+      const SMDS_MeshNode* n2down = side.getNode( 1, y-1 );
+      avoidSet.clear(); avoidSet.insert( firstQuad );
+      firstQuad = SMESH_MeshEditor::FindFaceInSet( n1down, n2down, emptySet, avoidSet,
+                                                   &i1down, &i2down);
+      if ( !isQuadrangle( firstQuad ))
+        return BAD_MESH_ERR;
+
+      const SMDS_MeshNode* n2up = oppositeNode( firstQuad, i1down );
+      avoidSet.clear(); avoidSet.insert( firstQuad );
+
+      // find the rest nodes in the y-th row by faces in the row
+
+      x = 1; 
+      while ( ++x < nbX )
+      {
+        const SMDS_MeshElement* quad = SMESH_MeshEditor::FindFaceInSet( n2up, n2down, emptySet,
+                                                                        avoidSet, &i2up, &i2down);
+        if ( !isQuadrangle( quad ))
+          return BAD_MESH_ERR;
+
+        n2up   = oppositeNode( quad, i2down );
+        n2down = oppositeNode( quad, i2up );
+        avoidSet.clear(); avoidSet.insert( quad );
+
+        side.setNode( x, y, n2up );
+      }
+    }
+
+    return true;
+  }
+
+  //================================================================================
+  /*!
+   * \brief Try to find a block side adjacent to the given side by given edge
+   */
+  //================================================================================
+
+  _OrientedBlockSide _Skin::findBlockSide( EBoxSides startBlockSide,
+                                           EQuadEdge sharedSideEdge1,
+                                           EQuadEdge sharedSideEdge2)
+  {
+    _Block& block = _blocks.back();
+    _OrientedBlockSide& side1 = block._side[ startBlockSide ];
+
+    // get corner nodes of the given block edge
+    SMESH_OrientedLink edge = side1.edge( sharedSideEdge1 );
+    const SMDS_MeshNode* n1 = edge.node1();
+    const SMDS_MeshNode* n2 = edge.node2();
+    if ( edge._reversed ) swap( n1, n2 );
+
+    // find all sides sharing both nodes n1 and n2
+    set< _BlockSide* > sidesOnEdge = _edge2sides[ edge ]; // copy a set
+
+    // exclude loaded sides of block from sidesOnEdge
+    int nbLoadedSides = 0;
+    for (int i = 0; i < B_UNDEFINED; ++i )
+    {
+      if ( block._side[ i ] )
+      {
+        nbLoadedSides++;
+        sidesOnEdge.erase( block._side[ i ]._side );
+      }
+    }
+    int nbSidesOnEdge = sidesOnEdge.size();
+    _DUMP_("nbSidesOnEdge "<< nbSidesOnEdge << " " << n1->GetID() << "-" << n2->GetID() );
+    if ( nbSidesOnEdge == 0 )
+      return 0;
+
+    _BlockSide* foundSide = 0;
+    if ( nbSidesOnEdge == 1 /*|| nbSidesOnEdge == 2 && nbLoadedSides == 1 */)
+    {
+      foundSide = *sidesOnEdge.begin();
+    }
+    else
+    {
+      // Select one of found sides most close to startBlockSide
+
+      // gravity center of already loaded block sides
+      gp_XYZ gc(0,0,0);
+      for (int i = 0; i < B_UNDEFINED; ++i )
+        if ( block._side[ i ] )
+          gc += block._side[ i ]._side->getGC();
+      gc /= nbLoadedSides;
+
+      gp_XYZ p1 ( n1->X(),n1->Y(),n1->Z()),  p2 (n2->X(),n2->Y(),n2->Z());
+      gp_Vec p1p2( p1, p2 );
+
+      const SMDS_MeshElement* face1 = side1->getCornerFace( n1 );
+      gp_XYZ p1Op = SMESH_MeshEditor::TNodeXYZ( oppositeNode( face1, face1->GetNodeIndex(n1)));
+      gp_Vec side1Dir( p1, p1Op );
+      gp_Ax2 pln( p1, p1p2, side1Dir ); // plane with normal p1p2 and X dir side1Dir
+      _DUMP_("  Select adjacent for "<< side1._side << " - side dir ("
+             << side1Dir.X() << ", " << side1Dir.Y() << ", " << side1Dir.Z() << ")" );
+      
+      map < double , _BlockSide* > angleOfSide;
+      set< _BlockSide* >::iterator sideIt = sidesOnEdge.begin();
+      for (; sideIt != sidesOnEdge.end(); ++sideIt )
+      {
+        _BlockSide* sideI = *sideIt;
+        const SMDS_MeshElement* faceI = sideI->getCornerFace( n1 );
+        gp_XYZ p1Op = SMESH_MeshEditor::TNodeXYZ( oppositeNode( faceI, faceI->GetNodeIndex(n1)));
+        gp_Vec sideIDir( p1, p1Op );
+        // compute angle of (sideIDir projection to pln) and (X dir of pln)
+        gp_Vec2d sideIDirProj( sideIDir * pln.XDirection(), sideIDir * pln.YDirection());
+        double angle = sideIDirProj.Angle( gp::DX2d() );
+        if ( angle < 0 ) angle += 2 * PI;
+        angleOfSide.insert( make_pair( angle, sideI ));
+        _DUMP_("  "<< sideI << " - side dir ("
+               << sideIDir.X() << ", " << sideIDir.Y() << ", " << sideIDir.Z() << ")"
+               << " angle " << angle);
+      }
+      gp_Vec gcDir( p1, gc );
+      gp_Vec2d gcDirProj( gcDir * pln.XDirection(), gcDir * pln.YDirection());
+      double gcAngle = gcDirProj.Angle( gp::DX2d() );
+      foundSide = gcAngle < 0 ? angleOfSide.rbegin()->second : angleOfSide.begin()->second;
+      _DUMP_("  selected "<< foundSide );
+    }
+
+    // Orient the found side correctly
+
+    // corners of found side corresponding to nodes n1 and n2
+    bool xMax1, yMax1, xMax2, yMax2;
+    if ( !getEdgeEnds( sharedSideEdge2, xMax1, yMax1, xMax2, yMax2 ))
+      return error(SMESH_Comment("Internal error at ")<<__FILE__<<":"<<__LINE__),
+        _OrientedBlockSide(0);
+
+    for ( int ori = 0; ori < _OrientedIndexer::MAX_ORI+1; ++ori )
+    {
+      _OrientedBlockSide orientedSide( foundSide, ori );
+      const SMDS_MeshNode* n12 = orientedSide.cornerNode( xMax1, yMax1);
+      const SMDS_MeshNode* n22 = orientedSide.cornerNode( xMax2, yMax2);
+      if ( n1 == n12 && n2 == n22 )
+        return orientedSide;
+    }
+    error(SMESH_Comment("Failed to orient a block side found by edge ")<<sharedSideEdge1
+          << " of side " << startBlockSide
+          << " of block " << _blocks.size());
+    return 0;
+  }
+
+  //================================================================================
+  /*!
+   * \brief: Fill rows (which are actually columns,if !alongN1N2) of nodes starting
+   * from the given quadrangle until another block corner encounters.
+   *  n1 and n2 are at bottom of quad, n1 is at block corner.
+   */
+  //================================================================================
+
+  bool _Skin::fillRowsUntilCorner(const SMDS_MeshElement*       quad,
+                                  const SMDS_MeshNode*          n1,
+                                  const SMDS_MeshNode*          n2,
+                                  vector<const SMDS_MeshNode*>& row1,
+                                  vector<const SMDS_MeshNode*>& row2,
+                                  const bool                    alongN1N2 )
+  {
+    const SMDS_MeshNode* corner1 = n1;
+
+    // Store nodes of quad in the rows and find new n1 and n2 to get
+    // the next face so that new n2 is on block edge
+    int i1 = quad->GetNodeIndex( n1 );
+    int i2 = quad->GetNodeIndex( n2 );
+    row1.clear(); row2.clear();
+    row1.push_back( n1 );
+    if ( alongN1N2 )
+    {
+      row1.push_back( n2 );
+      row2.push_back( oppositeNode( quad, i2 ));
+      row2.push_back( n1 = oppositeNode( quad, i1 ));
+    }
+    else
+    {
+      row2.push_back( n2 );
+      row1.push_back( n2 = oppositeNode( quad, i2 ));
+      row2.push_back( n1 = oppositeNode( quad, i1 ));
+    }
+
+    // Find the rest nodes
+    TIDSortedElemSet emptySet, avoidSet;
+    while ( !isCornerNode( n2 ))
+    {
+      avoidSet.clear(); avoidSet.insert( quad );
+      quad = SMESH_MeshEditor::FindFaceInSet( n1, n2, emptySet, avoidSet, &i1, &i2 );
+      if ( !isQuadrangle( quad ))
+        return BAD_MESH_ERR;
+
+      row1.push_back( n2 = oppositeNode( quad, i1 ));
+      row2.push_back( n1 = oppositeNode( quad, i2 ));
+    }
+    return n1 != corner1;
+  }
+
+  //================================================================================
+  /*!
+   * \brief Return a corner face by a corner node
+   */
+  //================================================================================
+
+  const SMDS_MeshElement* _BlockSide::getCornerFace(const SMDS_MeshNode* cornerNode) const
+  {
+    int x, y, isXMax, isYMax, found = 0;
+    for ( isXMax = 0; isXMax < 2; ++isXMax )
+    {
+      for ( isYMax = 0; isYMax < 2; ++isYMax )
+      {
+        x = isXMax ? _index._xSize-1 : 0;
+        y = isYMax ? _index._ySize-1 : 0;
+        found = ( getNode(x,y) == cornerNode );
+        if ( found ) break;
+      }
+      if ( found ) break;
+    }
+    if ( !found ) return 0;
+    int dx = isXMax ? -1 : +1;
+    int dy = isYMax ? -1 : +1;
+    const SMDS_MeshNode* n1 = getNode(x,y);
+    const SMDS_MeshNode* n2 = getNode(x+dx,y);
+    const SMDS_MeshNode* n3 = getNode(x,y+dy);
+    const SMDS_MeshNode* n4 = getNode(x+dx,y+dy);
+    return SMDS_Mesh::FindFace(n1, n2, n3, n4 );
+  }
+
+}
+
+//=======================================================================
+//function : StdMeshers_HexaFromSkin_3D
+//purpose  : 
+//=======================================================================
+
+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");
+}
+
+//================================================================================
+/*!
+ * \brief Main method, which generates hexaheda
+ */
+//================================================================================
+
+bool StdMeshers_HexaFromSkin_3D::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper)
+{
+  _Skin skin;
+  int nbBlocks = skin.findBlocks(aMesh);
+  if ( nbBlocks == 0 )
+    return error( skin.error());
+
+  vector< vector< const SMDS_MeshNode* > > columns;
+  int x, xSize, y, ySize, z, zSize;
+  _Indexer colIndex;
+
+  for ( int i = 0; i < nbBlocks; ++i )
+  {
+    const _Block& block = skin.getBlock( i );
+
+    // ------------------------------------------
+    // Fill columns of nodes with existing nodes
+    // ------------------------------------------
+
+    xSize = block.getSide(B_BOTTOM).getHoriSize();
+    ySize = block.getSide(B_BOTTOM).getVertSize();
+    zSize = block.getSide(B_FRONT ).getVertSize();
+    int X = xSize - 1, Y = ySize - 1, Z = zSize - 1;
+    colIndex = _Indexer( xSize, ySize );
+    columns.resize( colIndex.size() );
+
+    // fill node columns by front and back box sides
+    for ( x = 0; x < xSize; ++x ) {
+      vector< const SMDS_MeshNode* >& column0 = columns[ colIndex( x, 0 )];
+      vector< const SMDS_MeshNode* >& column1 = columns[ colIndex( x, Y )];
+      column0.resize( zSize );
+      column1.resize( zSize );
+      for ( z = 0; z < zSize; ++z ) {
+        column0[ z ] = block.getSide(B_FRONT).node( x, z );
+        column1[ z ] = block.getSide(B_BACK) .node( x, z );
+      }
+    }
+    // fill node columns by left and right box sides
+    for ( y = 1; y < ySize-1; ++y ) {
+      vector< const SMDS_MeshNode* >& column0 = columns[ colIndex( 0, y )];
+      vector< const SMDS_MeshNode* >& column1 = columns[ colIndex( X, y )];
+      column0.resize( zSize );
+      column1.resize( zSize );
+      for ( z = 0; z < zSize; ++z ) {
+        column0[ z ] = block.getSide(B_LEFT) .node( y, z );
+        column1[ z ] = block.getSide(B_RIGHT).node( y, z );
+      }
+    }
+    // get nodes from top and bottom box sides
+    for ( x = 1; x < xSize-1; ++x ) {
+      for ( y = 1; y < ySize-1; ++y ) {
+        vector< const SMDS_MeshNode* >& column = columns[ colIndex( x, y )];
+        column.resize( zSize );
+        column.front() = block.getSide(B_BOTTOM).node( x, y );
+        column.back()  = block.getSide(B_TOP)   .node( x, y );
+      }
+    }
+
+    // ----------------------------
+    // Add internal nodes of a box
+    // ----------------------------
+    // projection points of internal nodes on box subshapes by which
+    // coordinates of internal nodes are computed
+    vector<gp_XYZ> pointOnShape( SMESH_Block::ID_Shell );
+
+    // projections on vertices are constant
+    pointOnShape[ SMESH_Block::ID_V000 ] = block.getSide(B_BOTTOM).xyz( 0, 0 );
+    pointOnShape[ SMESH_Block::ID_V100 ] = block.getSide(B_BOTTOM).xyz( X, 0 );
+    pointOnShape[ SMESH_Block::ID_V010 ] = block.getSide(B_BOTTOM).xyz( 0, Y );
+    pointOnShape[ SMESH_Block::ID_V110 ] = block.getSide(B_BOTTOM).xyz( X, Y );
+    pointOnShape[ SMESH_Block::ID_V001 ] = block.getSide(B_TOP).xyz( 0, 0 );
+    pointOnShape[ SMESH_Block::ID_V101 ] = block.getSide(B_TOP).xyz( X, 0 );
+    pointOnShape[ SMESH_Block::ID_V011 ] = block.getSide(B_TOP).xyz( 0, Y );
+    pointOnShape[ SMESH_Block::ID_V111 ] = block.getSide(B_TOP).xyz( X, Y );
+
+    for ( x = 1; x < xSize-1; ++x )
+    {
+      gp_XYZ params; // normalized parameters of internal node within a unit box
+      params.SetCoord( 1, x / double(X) );
+      for ( y = 1; y < ySize-1; ++y )
+      {
+        params.SetCoord( 2, y / double(Y) );
+        // column to fill during z loop
+        vector< const SMDS_MeshNode* >& column = columns[ colIndex( x, y )];
+        // projections on horizontal edges
+        pointOnShape[ SMESH_Block::ID_Ex00 ] = block.getSide(B_BOTTOM).xyz( x, 0 );
+        pointOnShape[ SMESH_Block::ID_Ex10 ] = block.getSide(B_BOTTOM).xyz( x, Y );
+        pointOnShape[ SMESH_Block::ID_E0y0 ] = block.getSide(B_BOTTOM).xyz( 0, y );
+        pointOnShape[ SMESH_Block::ID_E1y0 ] = block.getSide(B_BOTTOM).xyz( X, y );
+        pointOnShape[ SMESH_Block::ID_Ex01 ] = block.getSide(B_TOP).xyz( x, 0 );
+        pointOnShape[ SMESH_Block::ID_Ex11 ] = block.getSide(B_TOP).xyz( x, Y );
+        pointOnShape[ SMESH_Block::ID_E0y1 ] = block.getSide(B_TOP).xyz( 0, y );
+        pointOnShape[ SMESH_Block::ID_E1y1 ] = block.getSide(B_TOP).xyz( X, y );
+        // projections on horizontal sides
+        pointOnShape[ SMESH_Block::ID_Fxy0 ] = block.getSide(B_BOTTOM).xyz( x, y );
+        pointOnShape[ SMESH_Block::ID_Fxy1 ] = block.getSide(B_TOP)   .xyz( x, y );
+        for ( z = 1; z < zSize-1; ++z ) // z loop
+        {
+          params.SetCoord( 3, z / double(Z) );
+          // projections on vertical edges
+          pointOnShape[ SMESH_Block::ID_E00z ] = block.getSide(B_FRONT).xyz( 0, z );    
+          pointOnShape[ SMESH_Block::ID_E10z ] = block.getSide(B_FRONT).xyz( X, z );    
+          pointOnShape[ SMESH_Block::ID_E01z ] = block.getSide(B_BACK).xyz( 0, z );    
+          pointOnShape[ SMESH_Block::ID_E11z ] = block.getSide(B_BACK).xyz( X, z );
+          // projections on vertical sides
+          pointOnShape[ SMESH_Block::ID_Fx0z ] = block.getSide(B_FRONT).xyz( x, z );    
+          pointOnShape[ SMESH_Block::ID_Fx1z ] = block.getSide(B_BACK) .xyz( x, z );    
+          pointOnShape[ SMESH_Block::ID_F0yz ] = block.getSide(B_LEFT) .xyz( y, z );    
+          pointOnShape[ SMESH_Block::ID_F1yz ] = block.getSide(B_RIGHT).xyz( y, z );
+
+          // compute internal node coordinates
+          gp_XYZ coords;
+          SMESH_Block::ShellPoint( params, pointOnShape, coords );
+          column[ z ] = aHelper->AddNode( coords.X(), coords.Y(), coords.Z() );
+
+#ifdef DEB_GRID
+          // debug
+          //cout << "----------------------------------------------------------------------"<<endl;
+          //for ( int id = SMESH_Block::ID_V000; id < SMESH_Block::ID_Shell; ++id)
+          //{
+          //  gp_XYZ p = pointOnShape[ id ];
+          //  SMESH_Block::DumpShapeID( id,cout)<<" ( "<<p.X()<<", "<<p.Y()<<", "<<p.Z()<<" )"<<endl;
+          //}
+          //cout << "Params: ( "<< params.X()<<", "<<params.Y()<<", "<<params.Z()<<" )"<<endl;
+          //cout << "coords: ( "<< coords.X()<<", "<<coords.Y()<<", "<<coords.Z()<<" )"<<endl;
+#endif
+        }
+      }
+    }
+    // ----------------
+    // Add hexahedrons
+    // ----------------
+
+    // find out orientation
+    const SMDS_MeshNode* n000 = block.getSide(B_BOTTOM).cornerNode( 0, 0 );
+    const SMDS_MeshNode* n100 = block.getSide(B_BOTTOM).cornerNode( 1, 0 );
+    const SMDS_MeshNode* n010 = block.getSide(B_BOTTOM).cornerNode( 0, 1 );
+    const SMDS_MeshNode* n110 = block.getSide(B_BOTTOM).cornerNode( 1, 1 );
+    const SMDS_MeshNode* n001 = block.getSide(B_TOP).cornerNode( 0, 0 );
+    const SMDS_MeshNode* n101 = block.getSide(B_TOP).cornerNode( 1, 0 );
+    const SMDS_MeshNode* n011 = block.getSide(B_TOP).cornerNode( 0, 1 );
+    const SMDS_MeshNode* n111 = block.getSide(B_TOP).cornerNode( 1, 1 );
+    SMDS_VolumeOfNodes probeVolume (n000,n010,n110,n100,
+                                    n001,n011,n111,n101);
+    bool isForw = SMDS_VolumeTool( &probeVolume ).IsForward();
+
+    // add elements
+    for ( x = 0; x < xSize-1; ++x ) {
+      for ( y = 0; y < ySize-1; ++y ) {
+        vector< const SMDS_MeshNode* >& col00 = columns[ colIndex( x, y )];
+        vector< const SMDS_MeshNode* >& col10 = columns[ colIndex( x+1, y )];
+        vector< const SMDS_MeshNode* >& col01 = columns[ colIndex( x, y+1 )];
+        vector< const SMDS_MeshNode* >& col11 = columns[ colIndex( x+1, y+1 )];
+        // bottom face normal of a hexa mush point outside the volume
+        if ( isForw )
+          for ( z = 0; z < zSize-1; ++z )
+            aHelper->AddVolume(col00[z],   col01[z],   col11[z],   col10[z],
+                               col00[z+1], col01[z+1], col11[z+1], col10[z+1]);
+        else
+          for ( z = 0; z < zSize-1; ++z )
+            aHelper->AddVolume(col00[z],   col10[z],   col11[z],   col01[z],
+                               col00[z+1], col10[z+1], col11[z+1], col01[z+1]);
+      }
+    }
+  } // loop on blocks
+
+  return true;
+}
+
+//================================================================================
+/*!
+ * \brief Evaluate nb of hexa
+ */
+//================================================================================
+
+bool StdMeshers_HexaFromSkin_3D::Evaluate(SMESH_Mesh &         aMesh,
+                                          const TopoDS_Shape & aShape,
+                                          MapShapeNbElems&     aResMap)
+{
+  _Skin skin;
+  int nbBlocks = skin.findBlocks(aMesh);
+  if ( nbBlocks == 0 )
+    return error( skin.error());
+
+  bool secondOrder = aMesh.NbFaces( ORDER_QUADRATIC );
+
+  int entity = secondOrder ? SMDSEntity_Quad_Hexa : SMDSEntity_Hexa;
+  vector<int>& nbByType = aResMap[ aMesh.GetSubMesh( aShape )];
+  if ( entity >= nbByType.size() )
+    nbByType.resize( SMDSEntity_Last, 0 );
+
+  for ( int i = 0; i < nbBlocks; ++i )
+  {
+    const _Block& block = skin.getBlock( i );
+
+    int nbX = block.getSide(B_BOTTOM).getHoriSize();
+    int nbY = block.getSide(B_BOTTOM).getVertSize();
+    int nbZ = block.getSide(B_FRONT ).getVertSize();
+
+    int nbHexa  = (nbX-1) * (nbY-1) * (nbZ-1);
+    int nbNodes = (nbX-2) * (nbY-2) * (nbZ-2);
+    if ( secondOrder )
+      nbNodes +=
+        (nbX-2) * (nbY-2) * (nbZ-1) +
+        (nbX-2) * (nbY-1) * (nbZ-2) +
+        (nbX-1) * (nbY-2) * (nbZ-2);
+
+
+    nbByType[ entity ] += nbHexa;
+    nbByType[ SMDSEntity_Node ] += nbNodes;
+  }
+
+  return true;
+}
+
+//================================================================================
+/*!
+ * \brief Abstract method must be defined but does nothing
+ */
+//================================================================================
+
+bool StdMeshers_HexaFromSkin_3D::CheckHypothesis(SMESH_Mesh&, const TopoDS_Shape&,
+                                                 Hypothesis_Status& aStatus)
+{
+  aStatus = SMESH_Hypothesis::HYP_OK;
+  return true;
+}
+
+//================================================================================
+/*!
+ * \brief Abstract method must be defined but just reports an error as this
+ *  algo is not intended to work with shapes
+ */
+//================================================================================
+
+bool StdMeshers_HexaFromSkin_3D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
+{
+  return error("Algorithm can't work with geometrical shapes");
+}
+
diff --git a/src/StdMeshers/StdMeshers_HexaFromSkin_3D.hxx b/src/StdMeshers/StdMeshers_HexaFromSkin_3D.hxx
new file mode 100644 (file)
index 0000000..a2d811f
--- /dev/null
@@ -0,0 +1,54 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// File      : StdMeshers_HexaFromSkin_3D.hxx
+// Created   : Wed Jan 27 12:23:21 2010
+// Author    : Edward AGAPOV (eap)
+//
+#ifndef __StdMeshers_HexaFromSkin_3D_HXX__
+#define __StdMeshers_HexaFromSkin_3D_HXX__
+
+#include "SMESH_StdMeshers.hxx"
+#include "SMESH_3D_Algo.hxx"
+
+/*!
+ * \brief Alorithm generating hexahedral mesh from 2D skin of block
+ */
+
+class STDMESHERS_EXPORT StdMeshers_HexaFromSkin_3D : public SMESH_3D_Algo
+{
+public:
+  StdMeshers_HexaFromSkin_3D(int hypId, int studyId, SMESH_Gen* gen);
+  virtual ~StdMeshers_HexaFromSkin_3D();
+
+  virtual bool Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper);
+
+  virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
+                               const TopoDS_Shape& aShape,
+                               Hypothesis_Status& aStatus);
+
+  virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape);
+
+  virtual bool Evaluate(SMESH_Mesh &         aMesh,
+                        const TopoDS_Shape & aShape,
+                        MapShapeNbElems&     aResMap);
+  
+};
+
+#endif
index 7e1c49a357259265b155ea5f0b39fd0c15571251..4701c050d0d13472d68147104fdd1ebad40ab0d6 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Hexa_3D.cxx
 //           Moved here from SMESH_Hexa_3D.cxx
 //  Module : SMESH
 //
 #include "StdMeshers_Hexa_3D.hxx"
+
 #include "StdMeshers_CompositeHexa_3D.hxx"
 #include "StdMeshers_FaceSide.hxx"
+#include "StdMeshers_HexaFromSkin_3D.hxx"
 #include "StdMeshers_Penta_3D.hxx"
 #include "StdMeshers_Prism_3D.hxx"
 #include "StdMeshers_Quadrangle_2D.hxx"
@@ -78,6 +81,7 @@ StdMeshers_Hexa_3D::StdMeshers_Hexa_3D(int hypId, int studyId, SMESH_Gen * gen)
   MESSAGE("StdMeshers_Hexa_3D::StdMeshers_Hexa_3D");
   _name = "Hexa_3D";
   _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);       // 1 bit /shape type
+  _requireShape = false;
 }
 
 //=============================================================================
@@ -865,10 +869,27 @@ bool StdMeshers_Hexa_3D::Evaluate(SMESH_Mesh & aMesh,
   return true;
 }
 
+//================================================================================
+/*!
+ * \brief Computes hexahedral mesh from 2D mesh of block
+ */
+//================================================================================
+
+bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper)
+{
+  static StdMeshers_HexaFromSkin_3D * algo = 0;
+  if ( !algo ) {
+    SMESH_Gen* gen = aMesh.GetGen();
+    algo = new StdMeshers_HexaFromSkin_3D( gen->GetANewId(), 0, gen );
+  }
+  algo->InitComputeError();
+  algo->Compute( aMesh, aHelper );
+  return error( algo->GetComputeError());
+}
 
 //=============================================================================
 /*!
- *  
+ *
  */
 //=============================================================================
 
index d34d812dd81e48335a17ce18b0e7f7f21bc6e8cc..f4608a79a247571c5790674ffbb2ec6c40f44f91 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Hexa_3D.hxx
 //           Moved here from SMESH_Hexa_3D.hxx
@@ -73,9 +74,9 @@ public:
                                const TopoDS_Shape& aShape,
                                SMESH_Hypothesis::Hypothesis_Status& aStatus);
 
-  virtual bool Compute(SMESH_Mesh& aMesh,
-                      const TopoDS_Shape& aShape)
-    /*throw (SALOME_Exception)*/;
+  virtual bool Compute(SMESH_Mesh& aMesh,  const TopoDS_Shape& aShape);
+
+  virtual bool Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper);
 
   virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
                         MapShapeNbElems& aResMap);
@@ -87,32 +88,32 @@ public:
 protected:
   TopoDS_Edge
   EdgeNotInFace(SMESH_Mesh& aMesh,
-               const TopoDS_Shape& aShape,
-               const TopoDS_Face& aFace,
-               const TopoDS_Vertex& aVertex,
-               const TopTools_IndexedDataMapOfShapeListOfShape& MS);
+                const TopoDS_Shape& aShape,
+                const TopoDS_Face& aFace,
+                const TopoDS_Vertex& aVertex,
+                const TopTools_IndexedDataMapOfShapeListOfShape& MS);
 
   int GetFaceIndex(SMESH_Mesh& aMesh,
-                  const TopoDS_Shape& aShape,
-                  const std::vector<SMESH_subMesh*>& meshFaces,
-                  const TopoDS_Vertex& V0,
-                  const TopoDS_Vertex& V1,
-                  const TopoDS_Vertex& V2,
-                  const TopoDS_Vertex& V3);
+                   const TopoDS_Shape& aShape,
+                   const std::vector<SMESH_subMesh*>& meshFaces,
+                   const TopoDS_Vertex& V0,
+                   const TopoDS_Vertex& V1,
+                   const TopoDS_Vertex& V2,
+                   const TopoDS_Vertex& V3);
 
   void GetConv2DCoefs(const faceQuadStruct& quad,
-                     const TopoDS_Shape& aShape,
-                     const TopoDS_Vertex& V0,
-                     const TopoDS_Vertex& V1,
-                     const TopoDS_Vertex& V2,
-                     const TopoDS_Vertex& V3,
-                     Conv2DStruct& conv);
+                      const TopoDS_Shape& aShape,
+                      const TopoDS_Vertex& V0,
+                      const TopoDS_Vertex& V1,
+                      const TopoDS_Vertex& V2,
+                      const TopoDS_Vertex& V3,
+                      Conv2DStruct& conv);
 
   void GetPoint(Pt3 p,
-               int i, int j, int k,
-               int nbx, int nby, int nbz,
-               Point3DStruct *np,
-               const SMESHDS_Mesh* meshDS);
+                int i, int j, int k,
+                int nbx, int nby, int nbz,
+                Point3DStruct *np,
+                const SMESHDS_Mesh* meshDS);
 
   bool ClearAndReturn(FaceQuadStruct* theQuads[6], const bool res);
 };
index 8e5987e6b5059ffddeba6ab4a37ed894fec24c38..56cbf7492f992ae99a100eb703a43f63d72cabe2 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_LayerDistribution.cxx
 //  Author : Edward AGAPOV
index aca054d4fb93e93e769ecfa1688808361a75638a..0f780cd22601d8e3b8f8ac3d159162fb2679fbcd 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_LayerDistribution.hxx
 //  Author : Edward AGAPOV
index 23d039bee4c0fec81f5cef8b7d1f343de96e4436..279466dcc81c2911feb60bfc801269b19b9e3cb6 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_LayerDistribution2D.cxx
 //  Author : Edward AGAPOV
index d06b6ead2cbdfeb75b543efe29316da396b6f4c0..267003ab02dfc24164b26ccee01ac33e1308461f 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_LayerDistribution2D.hxx
 //  Author : Edward AGAPOV
index cad6e91869e790a5a637f6ef3a63b4e47ee50745..9a8395f3043cd15d602b4736cdb6f79aa0ed98b5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_LengthFromEdges.cxx
 //           Moved here from SMESH_LengthFromEdges.cxx
index cb52638e573025c5182055e7f7a330635dd4964d..b0dd703b187ee10a12df7fcef96008b1f5ea4832 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_LengthFromEdges.hxx
 //           Moved here from SMESH_LengthFromEdges.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
 //
-
 #ifndef _SMESH_LENGTHFROMEDGES_HXX_
 #define _SMESH_LENGTHFROMEDGES_HXX_
 
index d52d2de5416e14fd3b3bd8c44b9c89c3f25e6b71..2c8646bd60501ce8916038d837ea1490d64e9a71 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_LocalLength.cxx
 //           Moved here from SMESH_LocalLength.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
 //
-
 #include "StdMeshers_LocalLength.hxx"
 
 #include "SMESH_Mesh.hxx"
index 1c8d72b2784a93aa020165f741487f3e2f6fdd89..3dabbbaef9b489e3f504f384bce175eb5d92af5b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_LocalLength.hxx
 //           Moved here from SMESH_LocalLength.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
 //
-
 #ifndef _SMESH_LOCALLENGTH_HXX_
 #define _SMESH_LOCALLENGTH_HXX_
 
index f4ef0198d114575598259d6a3759533eec7cac06..e8516d311122b8206c0d1c8ef56f9bc63b0f5938 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_MEFISTO_2D.cxx
 //           Moved here from SMESH_MEFISTO_2D.cxx
@@ -296,8 +297,8 @@ bool StdMeshers_MEFISTO_2D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh
 //=============================================================================
 
 bool StdMeshers_MEFISTO_2D::Evaluate(SMESH_Mesh & aMesh,
-                                    const TopoDS_Shape & aShape,
-                                    MapShapeNbElems& aResMap)
+                                     const TopoDS_Shape & aShape,
+                                     MapShapeNbElems& aResMap)
 {
   MESSAGE("StdMeshers_MEFISTO_2D::Evaluate");
 
@@ -604,8 +605,31 @@ bool StdMeshers_MEFISTO_2D::LoadPoints(TWireVector &                 wires,
       // set UV
       uvslf[m].x = uvPt->u * scalex;
       uvslf[m].y = uvPt->v * scaley;
-      if ( uvPt->node->GetPosition()->GetTypeOfPosition() == SMDS_TOP_VERTEX )
+      switch ( uvPt->node->GetPosition()->GetTypeOfPosition())
+      {
+      case SMDS_TOP_VERTEX:
         mOnVertex.push_back( m );
+        break;
+      case SMDS_TOP_EDGE:
+        // In order to detect degenerated faces easily, we replace
+        // nodes on a degenerated edge by node on the vertex of that edge
+        if ( myTool->IsDegenShape( uvPt->node->GetPosition()->GetShapeId() ))
+        {
+          int edgeID = uvPt->node->GetPosition()->GetShapeId();
+          SMESH_subMesh* edgeSM = myTool->GetMesh()->GetSubMeshContaining( edgeID );
+          SMESH_subMeshIteratorPtr smIt = edgeSM->getDependsOnIterator( /*includeSelf=*/0,
+                                                                        /*complexShapeFirst=*/0);
+          if ( smIt->more() )
+          {
+            SMESH_subMesh* vertexSM = smIt->next();
+            SMDS_NodeIteratorPtr nIt = vertexSM->GetSubMeshDS()->GetNodes();
+            if ( nIt->more() )
+              mefistoToDS[m] = nIt->next();
+          }
+        }
+        break;
+      default:;
+      }
       m++;
     }
 
@@ -632,6 +656,9 @@ bool StdMeshers_MEFISTO_2D::LoadPoints(TWireVector &                 wires,
       fixOverlappedLinkUV (uvslf[ mB ], uvslf[ m ], uvslf[ mA ]);
     }
   }
+//   cout << "MEFISTO INPUT************" << endl;
+//   for ( int i =0; i < m; ++i )
+//     cout << i << ": \t" << uvslf[i].x << ", " << uvslf[i].y << " Node " << mefistoToDS[i]->GetID()<< endl;
 
   return true;
 }
@@ -778,13 +805,17 @@ void StdMeshers_MEFISTO_2D::StoreResult(Z nbst, R2 * uvst, Z nbt, Z * nust,
     const SMDS_MeshNode * n2 = mefistoToDS[ nust[m++] - 1 ];
     const SMDS_MeshNode * n3 = mefistoToDS[ nust[m++] - 1 ];
 
-    SMDS_MeshElement * elt;
-    if (triangleIsWellOriented)
-      elt = myTool->AddFace(n1, n2, n3);
-    else
-      elt = myTool->AddFace(n1, n3, n2);
-
-    meshDS->SetMeshElementOnShape(elt, faceID);
+    // avoid creating degenetrated faces
+    bool isDegen = ( myTool->HasDegeneratedEdges() && ( n1 == n2 || n1 == n3 || n2 == n3 ));
+    if ( !isDegen )
+    {
+      SMDS_MeshElement * elt;
+      if (triangleIsWellOriented)
+        elt = myTool->AddFace(n1, n2, n3);
+      else
+        elt = myTool->AddFace(n1, n3, n2);
+      meshDS->SetMeshElementOnShape(elt, faceID);
+    }
     m++;
   }
 
index 73075dc0749aa2da5b4f9626f25296bdde6bb186..36f9162621e7f835cd34f398ffef9bcce6c43a53 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_MEFISTO_2D.hxx
 //           Moved here from SMESH_MEFISTO_2D.hxx
@@ -55,7 +56,7 @@ public:
                                SMESH_Hypothesis::Hypothesis_Status& aStatus);
 
   virtual bool Compute(SMESH_Mesh& aMesh,
-                      const TopoDS_Shape& aShape);
+                       const TopoDS_Shape& aShape);
 
   virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
                         MapShapeNbElems& aResMap);
@@ -64,19 +65,19 @@ public:
   typedef std::vector< StdMeshers_FaceSidePtr > TWireVector;
 
   bool LoadPoints(TWireVector &                       wires,
-                 R2*                                 uvslf, 
-                 std::vector< const SMDS_MeshNode*>& mefistoToDS,
+                  R2*                                 uvslf, 
+                  std::vector< const SMDS_MeshNode*>& mefistoToDS,
                   double scalex, double               scaley);
 
   void ComputeScaleOnFace(SMESH_Mesh& aMesh,
-                         const TopoDS_Face& aFace,
-                         double& scalex,
-                         double& scaley);
+                          const TopoDS_Face& aFace,
+                          double& scalex,
+                          double& scaley);
 
   void StoreResult (Z nbst, R2* uvst, Z nbt, Z* nust, 
-                   std::vector< const SMDS_MeshNode*>& mefistoToDS,
+                    std::vector< const SMDS_MeshNode*>& mefistoToDS,
                     double scalex, double scaley);
-                                         
+                                          
 protected:
   double                            _edgeLength;
   double                            _maxElementArea;
index 1dce3de1f501a18cddbd1c68f5db25a9e18a7192..75df5eefd32f6424ab4a72ff320ff64e8ca626b0 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_MaxElementArea.cxx
 //           Moved here from SMESH_MaxElementArea.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
 //
-
 #include "StdMeshers_MaxElementArea.hxx"
 
 #include "SMESH_ControlsDef.hxx"
index 09506736393c557bff7387efc14c6823a7d25c15..f1783ee53af0d8cd4d3efb92f42f3428a5e5e409 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_MaxElementArea.hxx
 //           Moved here from SMESH_MaxElementArea.hxx
index 79be9d6bc96d8cc276fa3c2819e93ed681a8d0d6..b76924f04633c58ebeca6e21a922f2a5c6ff817b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_MaxElementVolume.cxx
 //           Moved here from SMESH_MaxElementVolume.cxx
index 6395fd419e30149eaabb88a0436199d3a9b1b07e..a290332abc5606d619904f8a894853b926924396 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_MaxElementVolume.hxx
 //           Moved here from SMESH_MaxElementVolume.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
-
+//
 #ifndef _SMESH_MAXELEMENTVOLUME_HXX_
 #define _SMESH_MAXELEMENTVOLUME_HXX_
 
index 918fe6c78c09e05b12acfdd653bab80028994a06..8d14ce19204d53c1ff8ce5756baeb21053955f75 100644 (file)
@@ -1,27 +1,26 @@
-//  SMESH SMESH : implementaion of SMESH idl descriptions
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
+//  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_MaxLength.cxx
 //  Module : SMESH
-
+//
 #include "StdMeshers_MaxLength.hxx"
 
 #include "SMESH_Mesh.hxx"
index 23d94a9f286f2ad1828adaa93b5bdf1539d6f13e..b05b42cad9f479f4c581c5c287aa433a8e184438 100644 (file)
@@ -1,27 +1,26 @@
-//  SMESH SMESH : implementaion of SMESH idl descriptions
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 
+//  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_MaxLength.hxx
 //  Module : SMESH
-
+//
 #ifndef _SMESH_MaxLength_HXX_
 #define _SMESH_MaxLength_HXX_
 
index 66c58f13cc7915cbc59d91fa7b8ee15d7f1977bf..0d69fbb6d0a96ca0b2977d4cb716731b8ae1a7e2 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_NotConformAllowed.cxx
 //  Author : Paul RASCLE, EDF
index ddcfcb445d4b463046638a26a49e955539fba651..e573039c19760e0f58756b6ef82586c5bcb7d49b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_NotConformAllowed.hxx
 //  Author : Paul RASCLE, EDF
index 8abb02c632a3dd5549b9c3cef9a4c1106341337a..5aa1b9c435a07720037f40432bf774a07c5c9a7e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_NumberOfLayers.cxx
 //  Author : Edward AGAPOV
index ebaae84a918cca3d7c56b64fa4b63de249743064..98f5a4a1468d7fab7af730f67fff7ae81c8dad70 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_NumberOfLayers.hxx
 //  Author : Edward AGAPOV
index af2f04dabfcffe6546da6f40e8d07c5d51f19980..da3ee6ccb3a7bc284ec675094ce188da853a8358 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_NumberOfLayers2D.cxx
 //  Author : Edward AGAPOV
 //  Module : SMESH
 //
-
 #include "StdMeshers_NumberOfLayers2D.hxx"
 
 #include "utilities.h"
index 42690f0e5d2be04370bfd2cd6309e9c4b4a374db..fef7cfb608fcf6b9eb69784b554c93b5d8bc77b1 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_NumberOfLayers2D.hxx
 //  Author : Edward AGAPOV
index ce4876ee3b779cda81f06acdee94178b5c84b5b3..2a9fd2c1a3aa37d44cfb2f9c62bb809249dea0d3 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_NumberOfSegments.cxx
 //           Moved here from SMESH_NumberOfSegments.cxx
index 985d192b22bb853c05b3765f590e29b38bb0e8cd..1ca99dfe81f557822f4b9f994a006b9197995bdb 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_NumberOfSegments.hxx
 //           Moved here from SMESH_NumberOfSegments.hxx
index a12a3f0880ade3ade835e202b4a912cac40ae8b5..7e21e3113c86731e3200aa7fe858f47e60f89f48 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers_Penta_3D implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Penta_3D.cxx
 //  Module : SMESH
index 882c3b4f3441204f52f7cc147a1f30348e603aa9..0ef1037bffb90a8c50a14005bc1045f27ae15dd7 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Penta_3D.hxx
 //  Module : SMESH
@@ -58,26 +59,26 @@ public:
   void Load (const TopoDS_Shell& theShell);
   
   void Load (const TopoDS_Shell& theShell,
-            const TopoDS_Vertex& theV000,
-            const TopoDS_Vertex& theV001);
+             const TopoDS_Vertex& theV000,
+             const TopoDS_Vertex& theV001);
   
   void ComputeParameters(const gp_Pnt& thePnt, 
-                        gp_XYZ& theXYZ);
+                         gp_XYZ& theXYZ);
   
   void ComputeParameters(const gp_Pnt& thePnt,
-                        const TopoDS_Shape& theShape,
-                        gp_XYZ& theXYZ);
+                         const TopoDS_Shape& theShape,
+                         gp_XYZ& theXYZ);
   
   void ComputeParameters(const double& theU,
-                        const TopoDS_Shape& theShape,
-                        gp_XYZ& theXYZ);
+                         const TopoDS_Shape& theShape,
+                         gp_XYZ& theXYZ);
   
   void Point(const gp_XYZ& theParams, 
-            gp_Pnt& thePnt);
+             gp_Pnt& thePnt);
   
   void Point(const gp_XYZ& theParams,
-            const TopoDS_Shape& theShape, 
-            gp_Pnt& thePnt);
+             const TopoDS_Shape& theShape, 
+             gp_Pnt& thePnt);
   
   int ShapeID(const TopoDS_Shape& theShape); 
   
@@ -206,7 +207,7 @@ class STDMESHERS_EXPORT StdMeshers_Penta_3D {
     // 0-the node on theBaseEdge.
 
     bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
-                 MapShapeNbElems& aResMap);
+                  MapShapeNbElems& aResMap);
 
 
   protected: // methods
@@ -223,17 +224,17 @@ class STDMESHERS_EXPORT StdMeshers_Penta_3D {
                            std::vector<const SMDS_MeshNode*>*& aCol2);
 
     void ShapeSupportID(const bool theIsUpperLayer,
-                       const SMESH_Block::TShapeID theBNSSID,
-                       SMESH_Block::TShapeID& theSSID);
+                        const SMESH_Block::TShapeID theBNSSID,
+                        SMESH_Block::TShapeID& theSSID);
 
     void FindNodeOnShape(const TopoDS_Shape& aS,
-                        const gp_XYZ& aParams,
+                         const gp_XYZ& aParams,
                          const int z,
-                        StdMeshers_TNode& aTN);
+                         StdMeshers_TNode& aTN);
 
     void CreateNode(const bool theIsUpperLayer,
-                   const gp_XYZ& aParams,
-                   StdMeshers_TNode& aTN);
+                    const gp_XYZ& aParams,
+                    StdMeshers_TNode& aTN);
 
     void ClearMeshOnFxy1();
 
index 009b0a7f4dd6ed4a8a3a56699cbface57b01c86c..c7bf42004ed9a15dc3a9b87437b0875b257ffa7e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : StdMeshers_Prism_3D.cxx
 // Module    : SMESH
 #include "utilities.h"
 
 #include <BRep_Tool.hxx>
+#include <Bnd_B3d.hxx>
 #include <Geom2dAdaptor_Curve.hxx>
 #include <Geom2d_Line.hxx>
+#include <Geom_Curve.hxx>
 #include <TopExp.hxx>
 #include <TopExp_Explorer.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_SequenceOfShape.hxx>
 #include <TopTools_MapOfShape.hxx>
+#include <TopTools_SequenceOfShape.hxx>
 #include <TopoDS.hxx>
+#include <gp_Ax2.hxx>
+#include <gp_Ax3.hxx>
 
 using namespace std;
 
@@ -151,6 +156,152 @@ namespace {
     }
     params.push_back( parLast ); // 1.
   }
+
+  //================================================================================
+  /*!
+   * \brief Return coordinate system for z-th layer of nodes
+   */
+  //================================================================================
+
+  gp_Ax2 getLayerCoordSys(const int                           z,
+                          const vector< const TNodeColumn* >& columns,
+                          int&                                xColumn)
+  {
+    // gravity center of a layer
+    gp_XYZ O(0,0,0);
+    int vertexCol = -1;
+    for ( int i = 0; i < columns.size(); ++i )
+    {
+      O += gpXYZ( (*columns[ i ])[ z ]);
+      if ( vertexCol < 0 &&
+           columns[ i ]->front()->GetPosition()->GetTypeOfPosition() == SMDS_TOP_VERTEX )
+        vertexCol = i;
+    }
+    O /= columns.size();
+
+    // Z axis
+    gp_Vec Z(0,0,0);
+    int iPrev = columns.size()-1;
+    for ( int i = 0; i < columns.size(); ++i )
+    {
+      gp_Vec v1( O, gpXYZ( (*columns[ iPrev ])[ z ]));
+      gp_Vec v2( O, gpXYZ( (*columns[ i ]    )[ z ]));
+      Z += v1 ^ v2;
+      iPrev = i;
+    }
+
+    if ( vertexCol >= 0 )
+    {
+      O = gpXYZ( (*columns[ vertexCol ])[ z ]);
+    }
+    if ( xColumn < 0 || xColumn >= columns.size() )
+    {
+      // select a column for X dir
+      double maxDist = 0;
+      for ( int i = 0; i < columns.size(); ++i )
+      {
+        double dist = ( O - gpXYZ((*columns[ i ])[ z ])).SquareModulus();
+        if ( dist > maxDist )
+        {
+          xColumn = i;
+          maxDist = dist;
+        }
+      }
+    }
+
+    // X axis
+    gp_Vec X( O, gpXYZ( (*columns[ xColumn ])[ z ]));
+
+    return gp_Ax2( O, Z, X);
+  }
+
+  //================================================================================
+  /*!
+   * \brief Removes submeshes meshed with regular grid from given list
+   *  \retval int - nb of removed submeshes
+   */
+  //================================================================================
+
+  int removeQuasiQuads(list< SMESH_subMesh* >& notQuadSubMesh)
+  {
+    int oldNbSM = notQuadSubMesh.size();
+    SMESHDS_Mesh* mesh = notQuadSubMesh.front()->GetFather()->GetMeshDS();
+    list< SMESH_subMesh* >::iterator smIt = notQuadSubMesh.begin();
+#define __NEXT_SM { ++smIt; continue; }
+    while ( smIt != notQuadSubMesh.end() )
+    {
+      SMESH_subMesh* faceSm = *smIt;
+      SMESHDS_SubMesh* faceSmDS = faceSm->GetSubMeshDS();
+      int nbQuads = faceSmDS->NbElements();
+      if ( nbQuads == 0 ) __NEXT_SM;
+
+      // get oredered edges
+      list< TopoDS_Edge > orderedEdges;
+      list< int >         nbEdgesInWires;
+      TopoDS_Vertex       V000;
+      int nbWires = SMESH_Block::GetOrderedEdges( TopoDS::Face( faceSm->GetSubShape() ),
+                                                  V000, orderedEdges, nbEdgesInWires );
+      if ( nbWires != 1 || nbEdgesInWires.front() <= 4 )
+        __NEXT_SM;
+
+      // get nb of segements on edges
+      list<int> nbSegOnEdge;
+      list< TopoDS_Edge >::iterator edge = orderedEdges.begin();
+      for ( ; edge != orderedEdges.end(); ++edge )
+      {
+        if ( SMESHDS_SubMesh* edgeSmDS = mesh->MeshElements( *edge ))
+          nbSegOnEdge.push_back( edgeSmDS->NbElements() );
+        else
+          nbSegOnEdge.push_back(0);
+      }
+
+      // unite nbSegOnEdge of continues edges
+      int nbEdges = nbEdgesInWires.front();
+      list<int>::iterator nbSegIt = nbSegOnEdge.begin();
+      for ( edge = orderedEdges.begin(); edge != orderedEdges.end(); )
+      {
+        const TopoDS_Edge& e1 = *edge++;
+        const TopoDS_Edge& e2 = ( edge == orderedEdges.end() ? orderedEdges.front() : *edge );
+        if ( SMESH_Algo::IsContinuous( e1, e2 ))
+        {
+          // common vertex of continues edges must be shared by two 2D mesh elems of geom face
+          TopoDS_Vertex vCommon = TopExp::LastVertex( e1, true );
+          const SMDS_MeshNode* vNode = SMESH_Algo::VertexNode( vCommon, mesh );
+          int nbF = 0;
+          if ( vNode )
+          {
+            SMDS_ElemIteratorPtr fIt = vNode->GetInverseElementIterator(SMDSAbs_Face);
+            while ( fIt->more() )
+              nbF += faceSmDS->Contains( fIt->next() );
+          }
+          list<int>::iterator nbSegIt1 = nbSegIt++;
+          if ( !vNode || nbF == 2 ) // !vNode - two edges can be meshed as one
+          {
+            // unite
+            if ( nbSegIt == nbSegOnEdge.end() ) nbSegIt = nbSegOnEdge.begin();
+            *nbSegIt += *nbSegIt1;
+            nbSegOnEdge.erase( nbSegIt1 );
+            --nbEdges;
+          }
+        }
+        else
+        {
+          ++nbSegIt;
+        }
+      }
+      vector<int> nbSegVec( nbSegOnEdge.begin(), nbSegOnEdge.end());
+      if ( nbSegVec.size() == 4 &&
+           nbSegVec[0] == nbSegVec[2] &&
+           nbSegVec[1] == nbSegVec[3] &&
+           nbSegVec[0] * nbSegVec[1] == nbQuads
+           )
+        smIt = notQuadSubMesh.erase( smIt );
+      else
+        __NEXT_SM;
+    }
+
+    return oldNbSM - notQuadSubMesh.size();
+  }
 }
 
 //=======================================================================
@@ -162,7 +313,7 @@ StdMeshers_Prism_3D::StdMeshers_Prism_3D(int hypId, int studyId, SMESH_Gen* gen)
   :SMESH_3D_Algo(hypId, studyId, gen)
 {
   _name = "Prism_3D";
-  _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);      // 1 bit per shape type
+  _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);       // 1 bit per shape type
   myProjectTriangles = false;
 }
 
@@ -257,75 +408,115 @@ bool StdMeshers_Prism_3D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theSh
   // Projections on the top and bottom faces are taken from nodes existing
   // on these faces; find correspondence between bottom and top nodes
   myBotToColumnMap.clear();
-  if ( !assocOrProjBottom2Top() ) // it also fill myBotToColumnMap
+  if ( !assocOrProjBottom2Top() ) // it also fills myBotToColumnMap
     return false;
 
 
   // Create nodes inside the block
 
-  // loop on nodes inside the bottom face
-  TNode2ColumnMap::iterator bot_column = myBotToColumnMap.begin();
-  for ( ; bot_column != myBotToColumnMap.end(); ++bot_column )
+  // try to use transformation (issue 0020680)
+  vector<gp_Trsf> trsf;
+  if ( myBlock.GetLayersTransformation(trsf))
   {
-    const TNode& tBotNode = bot_column->first; // bottom TNode
-    if ( tBotNode.GetPositionType() != SMDS_TOP_FACE )
-      continue; // node is not inside face 
-
-    // column nodes; middle part of the column are zero pointers
-    TNodeColumn& column = bot_column->second;
-
-    // bottom node parameters and coords
-    myShapeXYZ[ ID_BOT_FACE ] = tBotNode.GetCoords();
-    gp_XYZ botParams          = tBotNode.GetParams();
-
-    // compute top node parameters
-    myShapeXYZ[ ID_TOP_FACE ] = gpXYZ( column.back() );
-    gp_XYZ topParams = botParams;
-    topParams.SetZ( 1 );
-    if ( column.size() > 2 ) {
-      gp_Pnt topCoords = myShapeXYZ[ ID_TOP_FACE ];
-      if ( !myBlock.ComputeParameters( topCoords, topParams, ID_TOP_FACE, topParams ))
-        return error(TCom("Can't compute normalized parameters ")
-                     << "for node " << column.back()->GetID()
-                     << " on the face #"<< column.back()->GetPosition()->GetShapeId() );
-    }
+    // loop on nodes inside the bottom face
+    TNode2ColumnMap::iterator bot_column = myBotToColumnMap.begin();
+    for ( ; bot_column != myBotToColumnMap.end(); ++bot_column )
+    {
+      const TNode& tBotNode = bot_column->first; // bottom TNode
+      if ( tBotNode.GetPositionType() != SMDS_TOP_FACE )
+        continue; // node is not inside face 
+
+      // column nodes; middle part of the column are zero pointers
+      TNodeColumn& column = bot_column->second;
+      TNodeColumn::iterator columnNodes = column.begin();
+      for ( int z = 0; columnNodes != column.end(); ++columnNodes, ++z)
+      {
+        const SMDS_MeshNode* & node = *columnNodes;
+        if ( node ) continue; // skip bottom or top node
 
-    // vertical loop
-    TNodeColumn::iterator columnNodes = column.begin();
-    for ( int z = 0; columnNodes != column.end(); ++columnNodes, ++z)
+        gp_XYZ coords = tBotNode.GetCoords();
+        trsf[z-1].Transforms( coords );
+        node = meshDS->AddNode( coords.X(), coords.Y(), coords.Z() );
+        meshDS->SetNodeInVolume( node, volumeID );
+      }
+    } // loop on bottom nodes
+  }
+  else // use block approach
+  {
+    // loop on nodes inside the bottom face
+    TNode prevBNode;
+    TNode2ColumnMap::iterator bot_column = myBotToColumnMap.begin();
+    for ( ; bot_column != myBotToColumnMap.end(); ++bot_column )
     {
-      const SMDS_MeshNode* & node = *columnNodes;
-      if ( node ) continue; // skip bottom or top node
-
-      // params of a node to create
-      double rz = (double) z / (double) ( column.size() - 1 );
-      gp_XYZ params = botParams * ( 1 - rz ) + topParams * rz;
-
-      // set coords on all faces and nodes
-      const int nbSideFaces = 4;
-      int sideFaceIDs[nbSideFaces] = { SMESH_Block::ID_Fx0z,
-                                       SMESH_Block::ID_Fx1z,
-                                       SMESH_Block::ID_F0yz,
-                                       SMESH_Block::ID_F1yz };
-      for ( int iF = 0; iF < nbSideFaces; ++iF )
-        if ( !setFaceAndEdgesXYZ( sideFaceIDs[ iF ], params, z ))
-          return false;
-
-      // compute coords for a new node
-      gp_XYZ coords;
-      if ( !SMESH_Block::ShellPoint( params, myShapeXYZ, coords ))
-        return error("Can't compute coordinates by normalized parameters");
-
-      SHOWYXZ("TOPFacePoint ",myShapeXYZ[ ID_TOP_FACE]);
-      SHOWYXZ("BOT Node "<< tBotNode.myNode->GetID(),gpXYZ(tBotNode.myNode));
-      SHOWYXZ("ShellPoint ",coords);
-
-      // create a node
-      node = meshDS->AddNode( coords.X(), coords.Y(), coords.Z() );
-      meshDS->SetNodeInVolume( node, volumeID );
-    }
-  } // loop on bottom nodes
+      const TNode& tBotNode = bot_column->first; // bottom TNode
+      if ( tBotNode.GetPositionType() != SMDS_TOP_FACE )
+        continue; // node is not inside face 
 
+      // column nodes; middle part of the column are zero pointers
+      TNodeColumn& column = bot_column->second;
+
+      // compute bottom node parameters
+      gp_XYZ paramHint(-1,-1,-1);
+      if ( prevBNode.IsNeighbor( tBotNode ))
+        paramHint = prevBNode.GetParams();
+      if ( !myBlock.ComputeParameters( tBotNode.GetCoords(), tBotNode.ChangeParams(),
+                                       ID_BOT_FACE, paramHint ))
+        return error(TCom("Can't compute normalized parameters for node ")
+                     << tBotNode.myNode->GetID() << " on the face #"
+                     << myBlock.SubMesh( ID_BOT_FACE )->GetId() );
+      prevBNode = tBotNode;
+
+      myShapeXYZ[ ID_BOT_FACE ] = tBotNode.GetCoords();
+      gp_XYZ botParams          = tBotNode.GetParams();
+
+      // compute top node parameters
+      myShapeXYZ[ ID_TOP_FACE ] = gpXYZ( column.back() );
+      gp_XYZ topParams = botParams;
+      topParams.SetZ( 1 );
+      if ( column.size() > 2 ) {
+        gp_Pnt topCoords = myShapeXYZ[ ID_TOP_FACE ];
+        if ( !myBlock.ComputeParameters( topCoords, topParams, ID_TOP_FACE, topParams ))
+          return error(TCom("Can't compute normalized parameters ")
+                       << "for node " << column.back()->GetID()
+                       << " on the face #"<< column.back()->GetPosition()->GetShapeId() );
+      }
+
+      // vertical loop
+      TNodeColumn::iterator columnNodes = column.begin();
+      for ( int z = 0; columnNodes != column.end(); ++columnNodes, ++z)
+      {
+        const SMDS_MeshNode* & node = *columnNodes;
+        if ( node ) continue; // skip bottom or top node
+
+        // params of a node to create
+        double rz = (double) z / (double) ( column.size() - 1 );
+        gp_XYZ params = botParams * ( 1 - rz ) + topParams * rz;
+
+        // set coords on all faces and nodes
+        const int nbSideFaces = 4;
+        int sideFaceIDs[nbSideFaces] = { SMESH_Block::ID_Fx0z,
+                                         SMESH_Block::ID_Fx1z,
+                                         SMESH_Block::ID_F0yz,
+                                         SMESH_Block::ID_F1yz };
+        for ( int iF = 0; iF < nbSideFaces; ++iF )
+          if ( !setFaceAndEdgesXYZ( sideFaceIDs[ iF ], params, z ))
+            return false;
+
+        // compute coords for a new node
+        gp_XYZ coords;
+        if ( !SMESH_Block::ShellPoint( params, myShapeXYZ, coords ))
+          return error("Can't compute coordinates by normalized parameters");
+
+        SHOWYXZ("TOPFacePoint ",myShapeXYZ[ ID_TOP_FACE]);
+        SHOWYXZ("BOT Node "<< tBotNode.myNode->GetID(),gpXYZ(tBotNode.myNode));
+        SHOWYXZ("ShellPoint ",coords);
+
+        // create a node
+        node = meshDS->AddNode( coords.X(), coords.Y(), coords.Z() );
+        meshDS->SetNodeInVolume( node, volumeID );
+      }
+    } // loop on bottom nodes
+  }
 
   // Create volumes
 
@@ -349,7 +540,7 @@ bool StdMeshers_Prism_3D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theSh
     {
       const SMDS_MeshNode* n = face->GetNode( i );
       if ( n->GetPosition()->GetTypeOfPosition() == SMDS_TOP_FACE ) {
-        bot_column = myBotToColumnMap.find( n );
+        TNode2ColumnMap::iterator bot_column = myBotToColumnMap.find( n );
         if ( bot_column == myBotToColumnMap.end() )
           return error(TCom("No nodes found above node ") << n->GetID() );
         columns[ i ] = & bot_column->second;
@@ -375,8 +566,8 @@ bool StdMeshers_Prism_3D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theSh
 //=======================================================================
 
 bool StdMeshers_Prism_3D::Evaluate(SMESH_Mesh& theMesh,
-                                  const TopoDS_Shape& theShape,
-                                  MapShapeNbElems& aResMap)
+                                   const TopoDS_Shape& theShape,
+                                   MapShapeNbElems& aResMap)
 {
   // find face contains only triangles
   vector < SMESH_subMesh * >meshFaces;
@@ -436,8 +627,8 @@ bool StdMeshers_Prism_3D::Evaluate(SMESH_Mesh& theMesh,
     bool IsOpposite = true;
     for(TopExp_Explorer exp(aFaces.Value(i), TopAbs_EDGE); exp.More(); exp.Next()) {
       if( Edges1.Contains(exp.Current()) ) {
-       IsOpposite = false;
-       break;
+        IsOpposite = false;
+        break;
       }
     }
     if(IsOpposite) {
@@ -652,7 +843,7 @@ bool StdMeshers_Prism_3D::assocOrProjBottom2Top()
   // Fill myBotToColumnMap
 
   int zSize = myBlock.VerticalSize();
-  TNode prevTNode;
+  //TNode prevTNode;
   TNodeNodeMap::iterator bN_tN = n2nMap.begin();
   for ( ; bN_tN != n2nMap.end(); ++bN_tN )
   {
@@ -660,19 +851,8 @@ bool StdMeshers_Prism_3D::assocOrProjBottom2Top()
     const SMDS_MeshNode* topNode = bN_tN->second;
     if ( botNode->GetPosition()->GetTypeOfPosition() != SMDS_TOP_FACE )
       continue; // wall columns are contained in myBlock
-    // compute bottom node params
-    TNode bN( botNode );
-    if ( zSize > 2 ) {
-      gp_XYZ paramHint(-1,-1,-1);
-      if ( prevTNode.IsNeighbor( bN ))
-        paramHint = prevTNode.GetParams();
-      if ( !myBlock.ComputeParameters( bN.GetCoords(), bN.ChangeParams(),
-                                       ID_BOT_FACE, paramHint ))
-        return error(TCom("Can't compute normalized parameters for node ")
-                     << botNode->GetID() << " on the face #"<< botSM->GetId() );
-      prevTNode = bN;
-    }
     // create node column
+    TNode bN( botNode );
     TNode2ColumnMap::iterator bN_col = 
       myBotToColumnMap.insert( make_pair ( bN, TNodeColumn() )).first;
     TNodeColumn & column = bN_col->second;
@@ -813,10 +993,10 @@ bool StdMeshers_Prism_3D::setFaceAndEdgesXYZ( const int faceID, const gp_XYZ& pa
   SMESH_Block::GetFaceEdgesIDs( faceID, edgeVec );
 
   myBlock.EdgePoint( edgeVec[ BASE ], params, myShapeXYZ[ edgeVec[ BASE ]]);
-  myBlock.EdgePoint( edgeVec[ TOP ], params, myShapeXYZ[ edgeVec[ TOP ]]);
+  myBlock.EdgePoint( edgeVec[ TOP  ], params, myShapeXYZ[ edgeVec[ TOP ]]);
 
   SHOWYXZ("\nparams ", params);
-  SHOWYXZ("TOP is "<<edgeVec[ TOP], myShapeXYZ[ edgeVec[ TOP]]);
+  SHOWYXZ("TOP is " <<edgeVec[ TOP ], myShapeXYZ[ edgeVec[ TOP]]);
   SHOWYXZ("BASE is "<<edgeVec[ BASE], myShapeXYZ[ edgeVec[ BASE]]);
 
   if ( faceID == SMESH_Block::ID_Fx0z || faceID == SMESH_Block::ID_Fx1z )
@@ -975,7 +1155,7 @@ bool StdMeshers_PrismAsBlock::Init(SMESH_MesherHelper* helper,
   }
 
   // ----------------------------------------------------------------------
-  // Analyse faces mesh and topology: choose the bottom submesh.
+  // Analyse mesh and topology of faces: choose the bottom submesh.
   // If there are not quadrangle geom faces, they are top and bottom ones.
   // Not quadrangle geom faces must be only on top and bottom.
   // ----------------------------------------------------------------------
@@ -988,14 +1168,24 @@ bool StdMeshers_PrismAsBlock::Init(SMESH_MesherHelper* helper,
   bool hasNotQuad = ( nbNotQuad || nbNotQuadMeshed );
 
   // detect bad cases
-  if ( nbNotQuad > 0 && nbNotQuad != 2 )
-    return error(COMPERR_BAD_SHAPE,
-                 TCom("More than 2 not quadrilateral faces: ")
-                 <<nbNotQuad);
   if ( nbNotQuadMeshed > 2 )
+  {
     return error(COMPERR_BAD_INPUT_MESH,
                  TCom("More than 2 faces with not quadrangle elements: ")
                  <<nbNotQuadMeshed);
+  }
+  int nbQuasiQuads = 0;
+  if ( nbNotQuad > 0 && nbNotQuad != 2 )
+  {
+    // Issue 0020843 - one of side faces is quasi-quadrilateral.
+    // Remove from notQuadGeomSubMesh faces meshed with regular grid
+    nbQuasiQuads = removeQuasiQuads( notQuadGeomSubMesh );
+    nbNotQuad -= nbQuasiQuads;
+    if ( nbNotQuad > 0 && nbNotQuad != 2 )
+      return error(COMPERR_BAD_SHAPE,
+                   TCom("More than 2 not quadrilateral faces: ")
+                   <<nbNotQuad);
+  }
 
   // get found submeshes
   if ( hasNotQuad )
@@ -1353,6 +1543,7 @@ bool StdMeshers_PrismAsBlock::Init(SMESH_MesherHelper* helper,
         break;
       }
     }
+    //sideFace->dumpNodes( 4 ); // debug
   }
   // horizontal faces geometry
   {
@@ -1432,6 +1623,87 @@ const TNodeColumn* StdMeshers_PrismAsBlock::GetNodeColumn(const SMDS_MeshNode* n
   return 0;
 }
 
+//=======================================================================
+//function : GetLayersTransformation
+//purpose  : Return transformations to get coordinates of nodes of each layer
+//           by nodes of the bottom. Layer is a set of nodes at a certain step
+//           from bottom to top.
+//=======================================================================
+
+bool StdMeshers_PrismAsBlock::GetLayersTransformation(vector<gp_Trsf> & trsf) const
+{
+  const int zSize = VerticalSize();
+  if ( zSize < 3 ) return true;
+  trsf.resize( zSize - 2 );
+
+  // Select some node columns by which we will define coordinate system of layers
+
+  vector< const TNodeColumn* > columns;
+  {
+    const TopoDS_Shape& baseFace = Shape(ID_BOT_FACE);
+    list< TopoDS_Edge > orderedEdges;
+    list< int >         nbEdgesInWires;
+    GetOrderedEdges( TopoDS::Face( baseFace ), TopoDS_Vertex(), orderedEdges, nbEdgesInWires );
+    bool isReverse;
+    list< TopoDS_Edge >::iterator edgeIt = orderedEdges.begin();
+    for ( int iE = 0; iE < nbEdgesInWires.front(); ++iE, ++edgeIt )
+    {
+      const TParam2ColumnMap& u2colMap =
+        GetParam2ColumnMap( myHelper->GetMeshDS()->ShapeToIndex( *edgeIt ), isReverse );
+      isReverse = ( edgeIt->Orientation() == TopAbs_REVERSED );
+      double f = u2colMap.begin()->first, l = u2colMap.rbegin()->first;
+      if ( isReverse ) swap ( f, l );
+      const int nbCol = 5;
+      for ( int i = 0; i < nbCol; ++i )
+      {
+        double u = f + i/double(nbCol) * ( l - f );
+        const TNodeColumn* col = & getColumn( & u2colMap, u )->second;
+        if ( columns.empty() || col != columns.back() )
+          columns.push_back( col );
+      }
+    }
+  }
+
+  // Find tolerance to check transformations
+
+  double tol2;
+  {
+    Bnd_B3d bndBox;
+    for ( int i = 0; i < columns.size(); ++i )
+      bndBox.Add( gpXYZ( columns[i]->front() ));
+    tol2 = bndBox.SquareExtent() * 4 * 1e-4;
+  }
+
+  // Compute transformations
+
+  int xCol = -1;
+  gp_Trsf fromCsZ, toCs0;
+  gp_Ax3 cs0 = getLayerCoordSys(0, columns, xCol );
+  //double dist0 = cs0.Location().Distance( gpXYZ( (*columns[0])[0]));
+  toCs0.SetTransformation( cs0 );
+  for ( int z = 1; z < zSize-1; ++z )
+  {
+    gp_Ax3 csZ = getLayerCoordSys(z, columns, xCol );
+    //double distZ = csZ.Location().Distance( gpXYZ( (*columns[0])[z]));
+    fromCsZ.SetTransformation( csZ );
+    fromCsZ.Invert();
+    gp_Trsf& t = trsf[ z-1 ];
+    t = fromCsZ * toCs0;
+    //t.SetScaleFactor( distZ/dist0 ); - it does not work properly, wrong base point
+
+    // check a transformation
+    for ( int i = 0; i < columns.size(); ++i )
+    {
+      gp_Pnt p0 = gpXYZ( (*columns[i])[0] );
+      gp_Pnt pz = gpXYZ( (*columns[i])[z] );
+      t.Transforms( p0.ChangeCoord() );
+      if ( p0.SquareDistance( pz ) > tol2 )
+        return false;
+    }
+  }
+  return true;
+}
+
 //================================================================================
 /*!
  * \brief Check curve orientation of a bootom edge
@@ -1467,14 +1739,14 @@ bool StdMeshers_PrismAsBlock::IsForwardEdge(SMESHDS_Mesh*           meshDS,
 }
 
 //================================================================================
-  /*!
  * \brief Find wall faces by bottom edges
   * \param mesh - the mesh
   * \param mainShape - the prism
   * \param bottomFace - the bottom face
   * \param bottomEdges - edges bounding the bottom face
   * \param wallFaces - faces list to fill in
  */
+/*!
+ * \brief Find wall faces by bottom edges
+ * \param mesh - the mesh
+ * \param mainShape - the prism
+ * \param bottomFace - the bottom face
+ * \param bottomEdges - edges bounding the bottom face
+ * \param wallFaces - faces list to fill in
+ */
 //================================================================================
 
 bool StdMeshers_PrismAsBlock::GetWallFaces( SMESH_Mesh*                     mesh,
@@ -1727,8 +1999,6 @@ double StdMeshers_PrismAsBlock::TSideFace::GetColumns(const double      U,
     r = 0.5;
   }
   else {
-//     if ( !myIsForward )
-//       std::swap( col1, col2 );
     double uf = col1->first;
     double ul = col2->first;
     r = ( u - uf ) / ( ul - uf );
@@ -1748,8 +2018,8 @@ double StdMeshers_PrismAsBlock::TSideFace::GetColumns(const double      U,
 gp_Pnt StdMeshers_PrismAsBlock::TSideFace::Value(const Standard_Real U,
                                                  const Standard_Real V) const
 {
-  double u;
   if ( !myComponents.empty() ) {
+    double u;
     TSideFace * comp = GetComponent(U,u);
     return comp->Value( u, V );
   }
@@ -1761,7 +2031,41 @@ gp_Pnt StdMeshers_PrismAsBlock::TSideFace::Value(const Standard_Real U,
   const SMDS_MeshNode* n2 = 0;
   const SMDS_MeshNode* n3 = 0;
   const SMDS_MeshNode* n4 = 0;
-  gp_XYZ pnt;
+
+  // BEGIN issue 0020680: EDF 1252 SMESH: Bad cell created by Radial prism in center of torus
+  // Workaround for a wrongly located point returned by mySurface.Value() for
+  // UV located near boundary of BSpline surface.
+  // To bypass the problem, we take point from 3D curve of edge.
+  // It solves pb of the bloc_fiss_new.py
+  const double tol = 1e-3;
+  if ( V < tol || V+tol >= 1. )
+  {
+    n1 = V < tol ? u_col1->second.front() : u_col1->second.back();
+    n3 = V < tol ? u_col2->second.front() : u_col2->second.back();
+    TopoDS_Edge edge;
+    if ( V < tol )
+    {
+      edge = myBaseEdge;
+    }
+    else
+    {
+      TopoDS_Shape s = myHelper->GetSubShapeByNode( n1, myHelper->GetMeshDS() );
+      if ( s.ShapeType() != TopAbs_EDGE )
+        s = myHelper->GetSubShapeByNode( n3, myHelper->GetMeshDS() );
+      if ( s.ShapeType() == TopAbs_EDGE )
+        edge = TopoDS::Edge( s );
+    }
+    if ( !edge.IsNull() )
+    {
+      double u1 = myHelper->GetNodeU( edge, n1 );
+      double u3 = myHelper->GetNodeU( edge, n3 );
+      double u = u1 * ( 1 - hR ) + u3 * hR;
+      TopLoc_Location loc; double f,l;
+      Handle(Geom_Curve) curve = BRep_Tool::Curve( edge,loc,f,l );
+      return curve->Value( u ).Transformed( loc );
+    }
+  }
+  // END issue 0020680: EDF 1252 SMESH: Bad cell created by Radial prism in center of torus
 
   vR = getRAndNodes( & u_col1->second, V, n1, n2 );
   vR = getRAndNodes( & u_col2->second, V, n3, n4 );
@@ -1775,8 +2079,9 @@ gp_Pnt StdMeshers_PrismAsBlock::TSideFace::Value(const Standard_Real U,
   gp_XY uv34 = uv3 * ( 1 - vR ) + uv4 * vR;
 
   gp_XY uv = uv12 * ( 1 - hR ) + uv34 * hR;
-  
-  return mySurface.Value( uv.X(), uv.Y() );
+
+  gp_Pnt p = mySurface.Value( uv.X(), uv.Y() );
+  return p;
 }
 
 
@@ -1954,6 +2259,28 @@ int StdMeshers_PrismAsBlock::TSideFace::InsertSubShapes(TBlockShapes& shapeMap)
   return nbInserted;
 }
 
+//================================================================================
+/*!
+ * \brief Dump ids of nodes of sides
+ */
+//================================================================================
+
+void StdMeshers_PrismAsBlock::TSideFace::dumpNodes(int nbNodes) const
+{
+#ifdef _DEBUG_
+  cout << endl << "NODES OF FACE "; SMESH_Block::DumpShapeID( myID, cout ) << endl;
+  THorizontalEdgeAdaptor* hSize0 = (THorizontalEdgeAdaptor*) HorizCurve(0);
+  cout << "Horiz side 0: "; hSize0->dumpNodes(nbNodes); cout << endl;
+  THorizontalEdgeAdaptor* hSize1 = (THorizontalEdgeAdaptor*) HorizCurve(1);
+  cout << "Horiz side 1: "; hSize1->dumpNodes(nbNodes); cout << endl;
+  TVerticalEdgeAdaptor* vSide0 = (TVerticalEdgeAdaptor*) VertiCurve(0);
+  cout << "Verti side 0: "; vSide0->dumpNodes(nbNodes); cout << endl;
+  TVerticalEdgeAdaptor* vSide1 = (TVerticalEdgeAdaptor*) VertiCurve(1);
+  cout << "Verti side 1: "; vSide1->dumpNodes(nbNodes); cout << endl;
+  delete hSize0; delete hSize1; delete vSide0; delete vSide1;
+#endif
+}
+
 //================================================================================
 /*!
  * \brief Creates TVerticalEdgeAdaptor 
@@ -1984,6 +2311,22 @@ gp_Pnt StdMeshers_PrismAsBlock::TVerticalEdgeAdaptor::Value(const Standard_Real
   return gpXYZ(n1) * ( 1 - r ) + gpXYZ(n2) * r;
 }
 
+//================================================================================
+/*!
+ * \brief Dump ids of nodes
+ */
+//================================================================================
+
+void StdMeshers_PrismAsBlock::TVerticalEdgeAdaptor::dumpNodes(int nbNodes) const
+{
+#ifdef _DEBUG_
+  for ( int i = 0; i < nbNodes && i < myNodeColumn->size(); ++i )
+    cout << (*myNodeColumn)[i]->GetID() << " ";
+  if ( nbNodes < myNodeColumn->size() )
+    cout << myNodeColumn->back()->GetID();
+#endif
+}
+
 //================================================================================
 /*!
  * \brief Return coordinates for the given normalized parameter
@@ -1997,6 +2340,50 @@ gp_Pnt StdMeshers_PrismAsBlock::THorizontalEdgeAdaptor::Value(const Standard_Rea
   return mySide->TSideFace::Value( U, myV );
 }
 
+//================================================================================
+/*!
+ * \brief Dump ids of <nbNodes> first nodes and the last one
+ */
+//================================================================================
+
+void StdMeshers_PrismAsBlock::THorizontalEdgeAdaptor::dumpNodes(int nbNodes) const
+{
+#ifdef _DEBUG_
+  // Not bedugged code. Last node is sometimes incorrect
+  const TSideFace* side = mySide;
+  double u = 0;
+  if ( mySide->IsComplex() )
+    side = mySide->GetComponent(0,u);
+
+  TParam2ColumnIt col, col2;
+  TParam2ColumnMap* u2cols = side->GetColumns();
+  side->GetColumns( u , col, col2 );
+  
+  int j, i = myV ? mySide->ColumnHeight()-1 : 0;
+
+  const SMDS_MeshNode* n = 0;
+  const SMDS_MeshNode* lastN
+    = side->IsForward() ? u2cols->rbegin()->second[ i ] : u2cols->begin()->second[ i ];
+  for ( j = 0; j < nbNodes && n != lastN; ++j )
+  {
+    n = col->second[ i ];
+    cout << n->GetID() << " ";
+    if ( side->IsForward() )
+      ++col;
+    else
+      --col;
+  }
+
+  // last node
+  u = 1;
+  if ( mySide->IsComplex() )
+    side = mySide->GetComponent(1,u);
+
+  side->GetColumns( u , col, col2 );
+  if ( n != col->second[ i ] )
+    cout << col->second[ i ]->GetID();
+#endif
+}
 //================================================================================
 /*!
  * \brief Return UV on pcurve for the given normalized parameter
index d258bb43288e3e406a0d328aa82b4ae33e159689..d7278e813a5dc2ec590ba555f30e80d4b5f5e043 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Prism_3D.hxx
 //  Module : SMESH
@@ -46,6 +47,7 @@
 #include <BRepAdaptor_Surface.hxx>
 #include <TopTools_IndexedMapOfOrientedShape.hxx>
 #include <gp_XYZ.hxx>
+#include <gp_Trsf.hxx>
 
 
 class SMESHDS_SubMesh;
@@ -58,7 +60,7 @@ typedef std::vector<const SMDS_MeshNode* > TNodeColumn;
 
 // map of bottom nodes to the column of nodes above them
 // (the column includes the bottom nodes)
-typedef std::map< TNode, TNodeColumn > TNode2ColumnMap;
+typedef std::map< TNode, TNodeColumn >  TNode2ColumnMap;
 typedef std::map< double, TNodeColumn > TParam2ColumnMap;
 typedef std::map< double, TNodeColumn >::const_iterator TParam2ColumnIt;
 
@@ -73,11 +75,11 @@ typedef TopTools_IndexedMapOfOrientedShape TBlockShapes;
 struct TNode
 {
   const SMDS_MeshNode* myNode;
-  gp_XYZ               myParams;
+  mutable gp_XYZ       myParams;
 
   gp_XYZ GetCoords() const { return gp_XYZ( myNode->X(), myNode->Y(), myNode->Z() ); }
   gp_XYZ GetParams() const { return myParams; }
-  gp_XYZ& ChangeParams() { return myParams; }
+  gp_XYZ& ChangeParams() const { return myParams; }
   bool HasParams() const { return myParams.X() >= 0.0; }
   SMDS_TypeOfPosition GetPositionType() const
   { return myNode ? myNode->GetPosition()->GetTypeOfPosition() : SMDS_TOP_UNSPEC; }
@@ -144,13 +146,20 @@ public:
     * \retval const TParam2ColumnMap& - map
    */
   const TParam2ColumnMap& GetParam2ColumnMap(const int baseEdgeID,
-                                             bool &    isReverse)
+                                             bool &    isReverse) const
   {
-    std::pair< TParam2ColumnMap*, bool > col_frw =
-      myShapeIndex2ColumnMap[ baseEdgeID ];
+    std::pair< TParam2ColumnMap*, bool > col_frw =
+      myShapeIndex2ColumnMap.find( baseEdgeID )->second;
     isReverse = !col_frw.second;
     return * col_frw.first;
   }
+
+  /*!
+   * \brief Return transformations to get coordinates of nodes of each internal layer
+   *        by nodes of the bottom. Layer is a set of nodes at a certain step
+   *        from bottom to top.
+   */
+  bool GetLayersTransformation(std::vector<gp_Trsf> & trsf) const;
   
   /*!
    * \brief Return pointer to mesh
@@ -284,6 +293,8 @@ private:
     int InsertSubShapes( TBlockShapes& shapeMap ) const;
     // redefine Adaptor methods
     gp_Pnt Value(const Standard_Real U,const Standard_Real V) const;
+    // debug
+    void dumpNodes(int nbNodes) const;
   };
 
   // --------------------------------------------------------------------
@@ -299,6 +310,8 @@ private:
     gp_Pnt Value(const Standard_Real U) const;
     Standard_Real FirstParameter() const { return 0; }
     Standard_Real LastParameter() const { return 1; }
+    // debug
+    void dumpNodes(int nbNodes) const;
   };
 
   // --------------------------------------------------------------------
@@ -316,6 +329,8 @@ private:
     gp_Pnt Value(const Standard_Real U) const;
     Standard_Real FirstParameter() const { return 0; }
     Standard_Real LastParameter() const { return 1; }
+    // debug
+    void dumpNodes(int nbNodes) const;
   };
 
   // --------------------------------------------------------------------
@@ -337,20 +352,19 @@ private:
     Standard_Real FirstParameter() const { return 0; }
     Standard_Real LastParameter() const { return 1; }
   };
-  // --------------------------------------------------------------------
 
-  bool myNotQuadOnTop;
-  SMESH_MesherHelper* myHelper;
-  TBlockShapes myShapeIDMap;
+  bool                  myNotQuadOnTop;
+  SMESH_MesherHelper*   myHelper;
+  TBlockShapes          myShapeIDMap;
+  SMESH_ComputeErrorPtr myError;
 
   // container of 4 side faces
-  TSideFace*                 mySide; 
+  TSideFace*            mySide; 
   // node columns for each base edge
-  std::vector< TParam2ColumnMap > myParam2ColumnMaps;
+  std::vector< TParam2ColumnMap >                       myParam2ColumnMaps;
   // to find a column for a node by edge SMESHDS Index
   std::map< int, std::pair< TParam2ColumnMap*, bool > > myShapeIndex2ColumnMap;
 
-  SMESH_ComputeErrorPtr myError;
   /*!
    * \brief store error and comment and then return ( error == COMPERR_OK )
    */
@@ -358,7 +372,6 @@ private:
     myError = SMESH_ComputeError::New(error,comment);
     return myError->IsOK();
   }
-  //std::vector< SMESH_subMesh* >           mySubMeshesVec; // submesh by in-block id
 };
 
 // =============================================
@@ -432,7 +445,7 @@ private:
   StdMeshers_PrismAsBlock myBlock;
   SMESH_MesherHelper*     myHelper;
 
-  std::vector<gp_XYZ>     myShapeXYZ; // point on each sub-shape
+  std::vector<gp_XYZ>     myShapeXYZ; // point on each sub-shape of the block
 
   // map of bottom nodes to the column of nodes above them
   // (the column includes the bottom node)
index 9be958436288af8d943da96f3a0d3f91027fe748..2fe95fa5780cb60af8959cfebffd72c7f6bf6f76 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_ProjectionSource1D.cxx
 //  Author : Edward AGAPOV
index 301dedf304b1bf947e84a67f4716b7d1460626bd..0f0549a8de1299cfa5f4d847180389fe8e1af535 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_ProjectionSource1D.hxx
 //  Author : Edward AGAPOV
index be0d809eb9773caeac5aabaee98d1f54cb38f24d..068346f524944590fdecb98bc69e996f52d4fade 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_ProjectionSource2D.cxx
 //  Author : Edward AGAPOV
 //  Module : SMESH
-
+//
 #include "StdMeshers_ProjectionSource2D.hxx"
 
 #include "SMESH_Mesh.hxx"
index a23d4c4948639db476b6ceab675ca7f18c047f12..5f973bcaad73f9ccea619e941412a55bc7142ff5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_ProjectionSource2D.hxx
 //  Author : Edward AGAPOV
 //  Module : SMESH
-
+//
 #ifndef _SMESH_ProjectionSource2D_HXX_
 #define _SMESH_ProjectionSource2D_HXX_
 
index 4a8aa1086725c5fb3420541cfcab7f349c866188..c7b404d143f7e1d450b95919e345adce69d04aac 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_ProjectionSource3D.cxx
 //  Author : Edward AGAPOV
 //  Module : SMESH
-
+//
 #include "StdMeshers_ProjectionSource3D.hxx"
 
 #include "utilities.h"
index fd6848aec658b5552db101f12c7135448a075488..ce37bac821ed19469b93cf462a0ac6e9b11ecb2a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_ProjectionSource3D.hxx
 //  Author : Edward AGAPOV
 //  Module : SMESH
-
+//
 #ifndef _SMESH_ProjectionSource3D_HXX_
 #define _SMESH_ProjectionSource3D_HXX_
 
index a964b99c9177c3088272860037139b0c5291f149..c2dcb0c292fa7118f7152de3abef505b20830d4b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
 // File      : StdMeshers_ProjectionUtils.cxx
 // Created   : Fri Oct 27 10:24:28 2006
@@ -1283,44 +1284,6 @@ bool StdMeshers_ProjectionUtils::InsertAssociation( const TopoDS_Shape& theShape
   return false;
 }
 
-//=======================================================================
-//function : IsSubShape
-//purpose  : 
-//=======================================================================
-
-bool StdMeshers_ProjectionUtils::IsSubShape( const TopoDS_Shape& shape,
-                                             SMESH_Mesh*         aMesh )
-{
-  if ( shape.IsNull() || !aMesh )
-    return false;
-  return
-    aMesh->GetMeshDS()->ShapeToIndex( shape ) ||
-    // PAL16202
-    shape.ShapeType() == TopAbs_COMPOUND && aMesh->GetMeshDS()->IsGroupOfSubShapes( shape );
-}
-
-//=======================================================================
-//function : IsSubShape
-//purpose  : 
-//=======================================================================
-
-bool StdMeshers_ProjectionUtils::IsSubShape( const TopoDS_Shape& shape,
-                                             const TopoDS_Shape& mainShape )
-{
-  if ( !shape.IsNull() && !mainShape.IsNull() )
-  {
-    for ( TopExp_Explorer exp( mainShape, shape.ShapeType());
-          exp.More();
-          exp.Next() )
-      if ( shape.IsSame( exp.Current() ))
-        return true;
-  }
-  SCRUTE((shape.IsNull()));
-  SCRUTE((mainShape.IsNull()));
-  return false;
-}
-
-
 //=======================================================================
 /*!
  * \brief Finds an edge by its vertices in a main shape of the mesh
@@ -1536,7 +1499,7 @@ FindMatchingNodesOnFaces( const TopoDS_Face&     face1,
     if ( !assocMap.IsBound( e2 ))
       RETURN_BAD_RESULT("Association not found for edge " << meshDS2->ShapeToIndex( e2 ));
     TopoDS_Edge e1 = TopoDS::Edge( assocMap( e2 ));
-    if ( !IsSubShape( e1, face1 ))
+    if ( !helper1.IsSubShape( e1, face1 ))
       RETURN_BAD_RESULT("Wrong association, edge " << meshDS1->ShapeToIndex( e1 ) <<
                         " isn't a subshape of face " << meshDS1->ShapeToIndex( face1 ));
     // check that there are nodes on edges
index dab5755037e3cd14d742969c68e54f1ca82b5e5d..6a657e55d6ba481e0e5e234db783c9047df3fcda 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : idl implementation based on 'SMESH' unit's calsses
 // File      : StdMeshers_ProjectionUtils.hxx
 // Created   : Thu Oct 26 15:37:24 2006
@@ -111,10 +112,6 @@ class StdMeshers_ProjectionUtils
                                  TShapeShapeMap &    theAssociationMap,
                                  const bool          theBidirectional=true);
 
-  static bool IsSubShape( const TopoDS_Shape& shape, SMESH_Mesh* aMesh );
-
-  static bool IsSubShape( const TopoDS_Shape& shape, const TopoDS_Shape& mainShape );
-
   /*!
    * \brief Finds an edge by its vertices in a main shape of the mesh
    */
index df55fc26702ece5cf7f92d76447cd680e5e25340..1a2b67fcdf89e145d924140970ca16d890d62f31 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : StdMeshers_Projection_1D.cxx
 // Module    : SMESH
@@ -67,7 +68,7 @@ StdMeshers_Projection_1D::StdMeshers_Projection_1D(int hypId, int studyId, SMESH
   :SMESH_1D_Algo(hypId, studyId, gen)
 {
   _name = "Projection_1D";
-  _shapeType = (1 << TopAbs_EDGE);     // 1 bit per shape type
+  _shapeType = (1 << TopAbs_EDGE);      // 1 bit per shape type
 
   _compatibleHypothesis.push_back("ProjectionSource1D");
   _sourceHypo = 0;
@@ -128,25 +129,25 @@ bool StdMeshers_Projection_1D::CheckHypothesis(SMESH_Mesh&
     if ( _sourceHypo->HasVertexAssociation() )
     {
       // source and target vertices
-      if ( !TAssocTool::IsSubShape( _sourceHypo->GetSourceVertex(), srcMesh ) ||
-           !TAssocTool::IsSubShape( _sourceHypo->GetTargetVertex(), tgtMesh ) ||
-           !TAssocTool::IsSubShape( _sourceHypo->GetSourceVertex(),
-                                    _sourceHypo->GetSourceEdge() ))
+      if ( !SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceVertex(), srcMesh ) ||
+           !SMESH_MesherHelper::IsSubShape( _sourceHypo->GetTargetVertex(), tgtMesh ) ||
+           !SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceVertex(),
+                                            _sourceHypo->GetSourceEdge() ))
       {
         aStatus = HYP_BAD_PARAMETER;
-        SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetSourceVertex(), srcMesh )));
-        SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetTargetVertex(), tgtMesh )));
-        SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetSourceVertex(),
-                                        _sourceHypo->GetSourceEdge() )));
+        SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceVertex(), srcMesh )));
+        SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetTargetVertex(), tgtMesh )));
+        SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceVertex(),
+                                                _sourceHypo->GetSourceEdge() )));
       }
       // PAL16202
-      else 
+      else
       {
-        bool isSub = TAssocTool::IsSubShape( _sourceHypo->GetTargetVertex(), aShape );
+        bool isSub = SMESH_MesherHelper::IsSubShape( _sourceHypo->GetTargetVertex(), aShape );
         if ( !_sourceHypo->IsCompoundSource() ) {
           if ( !isSub ) {
             aStatus = HYP_BAD_PARAMETER;
-            SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetTargetVertex(), aShape)));
+            SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetTargetVertex(), aShape)));
           }
         }
         else if ( isSub ) {
@@ -159,7 +160,7 @@ bool StdMeshers_Projection_1D::CheckHypothesis(SMESH_Mesh&
           {
             const TopoDS_Shape& ancestor = ancestIt.Value();
             if ( ancestor.ShapeType() == TopAbs_EDGE &&
-                 TAssocTool::IsSubShape( ancestor, _sourceHypo->GetSourceEdge() ))
+                 SMESH_MesherHelper::IsSubShape( ancestor, _sourceHypo->GetSourceEdge() ))
             {
               if ( sharingEdge.IsNull() || ancestor.IsSame( sharingEdge ))
                 sharingEdge = ancestor;
@@ -175,11 +176,11 @@ bool StdMeshers_Projection_1D::CheckHypothesis(SMESH_Mesh&
       }
     }
     // check source edge
-    if ( !TAssocTool::IsSubShape( _sourceHypo->GetSourceEdge(), srcMesh ) ||
+    if ( !SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceEdge(), srcMesh ) ||
          ( srcMesh == tgtMesh && aShape == _sourceHypo->GetSourceEdge() ))
     {
       aStatus = HYP_BAD_PARAMETER;
-      SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetSourceEdge(), srcMesh )));
+      SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceEdge(), srcMesh )));
       SCRUTE((srcMesh == tgtMesh));
       SCRUTE(( aShape == _sourceHypo->GetSourceEdge() ));
     }
@@ -379,8 +380,8 @@ bool StdMeshers_Projection_1D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
 //=======================================================================
 
 bool StdMeshers_Projection_1D::Evaluate(SMESH_Mesh& theMesh,
-                                       const TopoDS_Shape& theShape,
-                                       MapShapeNbElems& aResMap)
+                                        const TopoDS_Shape& theShape,
+                                        MapShapeNbElems& aResMap)
 {
   if ( !_sourceHypo )
     return false;
@@ -390,7 +391,7 @@ bool StdMeshers_Projection_1D::Evaluate(SMESH_Mesh& theMesh,
   if ( !srcMesh )
     srcMesh = tgtMesh;
 
-  SMESHDS_Mesh * meshDS = theMesh.GetMeshDS();
+  //SMESHDS_Mesh * meshDS = theMesh.GetMeshDS();
 
   // ---------------------------
   // Make subshapes association
@@ -433,8 +434,8 @@ bool StdMeshers_Projection_1D::Evaluate(SMESH_Mesh& theMesh,
   // Find out nodes distribution on the source edge
   // -----------------------------------------------
 
-  double srcLength = EdgeLength( srcEdge );
-  double tgtLength = EdgeLength( tgtEdge );
+  //double srcLength = EdgeLength( srcEdge );
+  //double tgtLength = EdgeLength( tgtEdge );
   
   vector< double > params; // sorted parameters of nodes on the source edge
   if ( !SMESH_Algo::GetNodeParamOnEdge( srcMesh->GetMeshDS(), srcEdge, params ))
index be003ed7b6db9d4c33f088800c072fa5f0cd72b6..e188bf227945f68bf872cc18cca200cc87a5e6bb 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Projection_1D.hxx
 //  Module : SMESH
index 63b843d32971aba0d31736e917c69dfcbacc01e5..7af5ee189cca910a433347895c9d17c32428f266 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : StdMeshers_Projection_2D.cxx
 // Module    : SMESH
@@ -50,6 +51,8 @@
 #include <TopExp_Explorer.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <TopoDS.hxx>
+#include <gp_Ax2.hxx>
+#include <gp_Ax3.hxx>
 
 
 using namespace std;
@@ -67,7 +70,7 @@ StdMeshers_Projection_2D::StdMeshers_Projection_2D(int hypId, int studyId, SMESH
   :SMESH_2D_Algo(hypId, studyId, gen)
 {
   _name = "Projection_2D";
-  _shapeType = (1 << TopAbs_FACE);     // 1 bit per shape type
+  _shapeType = (1 << TopAbs_FACE);      // 1 bit per shape type
 
   _compatibleHypothesis.push_back("ProjectionSource2D");
   _sourceHypo = 0;
@@ -130,40 +133,40 @@ bool StdMeshers_Projection_2D::CheckHypothesis(SMESH_Mesh&
       TopoDS_Shape edge = TAssocTool::GetEdgeByVertices
         ( srcMesh, _sourceHypo->GetSourceVertex(1), _sourceHypo->GetSourceVertex(2) );
       if ( edge.IsNull() ||
-           !TAssocTool::IsSubShape( edge, srcMesh ) ||
-           !TAssocTool::IsSubShape( edge, _sourceHypo->GetSourceFace() ))
+           !SMESH_MesherHelper::IsSubShape( edge, srcMesh ) ||
+           !SMESH_MesherHelper::IsSubShape( edge, _sourceHypo->GetSourceFace() ))
       {
         theStatus = HYP_BAD_PARAMETER;
         SCRUTE((edge.IsNull()));
-        SCRUTE((TAssocTool::IsSubShape( edge, srcMesh )));
-        SCRUTE((TAssocTool::IsSubShape( edge, _sourceHypo->GetSourceFace() )));
+        SCRUTE((SMESH_MesherHelper::IsSubShape( edge, srcMesh )));
+        SCRUTE((SMESH_MesherHelper::IsSubShape( edge, _sourceHypo->GetSourceFace() )));
       }
       else
       {
         // target vertices
         edge = TAssocTool::GetEdgeByVertices
           ( tgtMesh, _sourceHypo->GetTargetVertex(1), _sourceHypo->GetTargetVertex(2) );
-        if ( edge.IsNull() || !TAssocTool::IsSubShape( edge, tgtMesh ))
+        if ( edge.IsNull() || !SMESH_MesherHelper::IsSubShape( edge, tgtMesh ))
         {
           theStatus = HYP_BAD_PARAMETER;
           SCRUTE((edge.IsNull()));
-          SCRUTE((TAssocTool::IsSubShape( edge, tgtMesh )));
+          SCRUTE((SMESH_MesherHelper::IsSubShape( edge, tgtMesh )));
         }
         // PAL16203
         else if ( !_sourceHypo->IsCompoundSource() &&
-                  !TAssocTool::IsSubShape( edge, theShape ))
+                  !SMESH_MesherHelper::IsSubShape( edge, theShape ))
         {
           theStatus = HYP_BAD_PARAMETER;
-          SCRUTE((TAssocTool::IsSubShape( edge, theShape )));
+          SCRUTE((SMESH_MesherHelper::IsSubShape( edge, theShape )));
         }
       }
     }
     // check a source face
-    if ( !TAssocTool::IsSubShape( _sourceHypo->GetSourceFace(), srcMesh ) ||
+    if ( !SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceFace(), srcMesh ) ||
          ( srcMesh == tgtMesh && theShape == _sourceHypo->GetSourceFace() ))
     {
       theStatus = HYP_BAD_PARAMETER;
-      SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetSourceFace(), srcMesh )));
+      SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceFace(), srcMesh )));
       SCRUTE((srcMesh == tgtMesh));
       SCRUTE(( theShape == _sourceHypo->GetSourceFace() ));
     }
@@ -177,12 +180,11 @@ bool StdMeshers_Projection_2D::CheckHypothesis(SMESH_Mesh&
 
 namespace {
 
-
   //================================================================================
   /*!
    * \brief define if a node is new or old
-    * \param node - node to check
-    * \retval bool - true if the node existed before Compute() is called
+   * \param node - node to check
+   * \retval bool - true if the node existed before Compute() is called
    */
   //================================================================================
 
@@ -356,7 +358,8 @@ namespace {
 
   //================================================================================
   /*!
-   * \brief Preform projection in case if tgtFace.IsPartner( srcFace )
+   * \brief Preform projection in case if tgtFace.IsPartner( srcFace ) and in case
+   * if projection by transformation is possible
    *  \param tgtFace - target face
    *  \param srcFace - source face
    *  \param tgtMesh - target mesh
@@ -371,8 +374,96 @@ namespace {
                       SMESH_Mesh *                      srcMesh,
                       const TAssocTool::TShapeShapeMap& shape2ShapeMap)
   {
-    if ( !tgtFace.IsPartner( srcFace ))
-      return false;
+    const double tol = 1e-6;
+
+    gp_Trsf trsf; // transformation to get location of target nodes from source ones
+    if ( tgtFace.IsPartner( srcFace ))
+    {
+      gp_Trsf srcTrsf = srcFace.Location();
+      gp_Trsf tgtTrsf = tgtFace.Location();
+      trsf = srcTrsf.Inverted() * tgtTrsf;
+    }
+    else
+    {
+      // Try to find the transformation
+
+      // make any local coord systems of src and tgt faces
+      vector<gp_Pnt> srcPP, tgtPP; // 3 points on face boundaries to make axes of CS
+      SMESH_subMesh * srcSM = srcMesh->GetSubMesh( srcFace );
+      SMESH_subMeshIteratorPtr smIt = srcSM->getDependsOnIterator(/*includeSelf=*/false,false);
+      srcSM = smIt->next(); // sm of a vertex
+      while ( smIt->more() && srcPP.size() < 3 )
+      {
+        srcSM = smIt->next();
+        SMESHDS_SubMesh* srcSmds = srcSM->GetSubMeshDS();
+        if ( !srcSmds ) continue;
+        SMDS_NodeIteratorPtr nIt = srcSmds->GetNodes();
+        while ( nIt->more() )
+        {
+          SMESH_MeshEditor::TNodeXYZ p ( nIt->next());
+          bool pOK = false;
+          switch ( srcPP.size() )
+          {
+          case 0: pOK = true; break;
+
+          case 1: pOK = ( srcPP[0].SquareDistance( p ) > tol ); break;
+            
+          case 2:
+            {
+              gp_Vec p0p1( srcPP[0], srcPP[1] ), p0p( srcPP[0], p );
+              pOK = !p0p1.IsParallel( p0p, tol );
+              break;
+            }
+          }
+          if ( !pOK )
+            continue;
+
+          // find corresponding point on target shape
+          pOK = false;
+          gp_Pnt tgtP;
+          const TopoDS_Shape& tgtShape = shape2ShapeMap( srcSM->GetSubShape() );
+          if ( tgtShape.ShapeType() == TopAbs_VERTEX )
+          {
+            tgtP = BRep_Tool::Pnt( TopoDS::Vertex( tgtShape ));
+            pOK = true;
+            //cout << "V - nS " << p._node->GetID() << " - nT " << SMESH_Algo::VertexNode(TopoDS::Vertex( tgtShape),tgtMesh->GetMeshDS())->GetID() << endl;
+          }
+          else if ( tgtPP.size() > 0 )
+          {
+            if ( SMESHDS_SubMesh* tgtSmds = tgtMesh->GetMeshDS()->MeshElements( tgtShape ))
+            {
+              double srcDist = srcPP[0].Distance( p );
+              double eTol = BRep_Tool::Tolerance( TopoDS::Edge( tgtShape ));
+              SMDS_NodeIteratorPtr nItT = tgtSmds->GetNodes();
+              while ( nItT->more() && !pOK )
+              {
+                const SMDS_MeshNode* n = nItT->next();
+                tgtP = SMESH_MeshEditor::TNodeXYZ( n );
+                pOK = ( fabs( srcDist - tgtPP[0].Distance( tgtP )) < 2*eTol );
+                //cout << "E - nS " << p._node->GetID() << " - nT " << n->GetID()<< " OK - " << pOK<< " " << fabs( srcDist - tgtPP[0].Distance( tgtP ))<< " tol " << eTol<< endl;
+              }
+            }
+          }
+          if ( !pOK )
+            continue;
+
+          srcPP.push_back( p );
+          tgtPP.push_back( tgtP );
+        }
+      }
+      if ( srcPP.size() != 3 )
+        return false;
+
+      // make transformation
+      gp_Trsf fromTgtCS, toSrcCS; // from/to global CS
+      gp_Ax2 srcCS( srcPP[0], gp_Vec( srcPP[0], srcPP[1] ), gp_Vec( srcPP[0], srcPP[2]));
+      gp_Ax2 tgtCS( tgtPP[0], gp_Vec( tgtPP[0], tgtPP[1] ), gp_Vec( tgtPP[0], tgtPP[2]));
+      toSrcCS  .SetTransformation( gp_Ax3( srcCS ));
+      fromTgtCS.SetTransformation( gp_Ax3( tgtCS ));
+      fromTgtCS.Invert();
+
+      trsf = fromTgtCS * toSrcCS;
+    }
 
     // Fill map of src to tgt nodes with nodes on edges
 
@@ -382,8 +473,6 @@ namespace {
     for ( TopExp_Explorer srcEdge( srcFace, TopAbs_EDGE); srcEdge.More(); srcEdge.Next() )
     {
       const TopoDS_Shape& tgtEdge = shape2ShapeMap( srcEdge.Current() );
-      if ( !tgtEdge.IsPartner( srcEdge.Current() ))
-        return false;
 
       map< double, const SMDS_MeshNode* > srcNodes, tgtNodes;
       if ( !SMESH_Algo::GetSortedNodesOnEdge( srcMesh->GetMeshDS(),
@@ -399,6 +488,30 @@ namespace {
            srcNodes.size() != tgtNodes.size())
         return false;
 
+      if ( !tgtEdge.IsPartner( srcEdge.Current() ))
+      {
+        // check that transormation is OK by three nodes
+        gp_Pnt p0S = SMESH_MeshEditor::TNodeXYZ( (srcNodes.begin())  ->second);
+        gp_Pnt p1S = SMESH_MeshEditor::TNodeXYZ( (srcNodes.rbegin()) ->second);
+        gp_Pnt p2S = SMESH_MeshEditor::TNodeXYZ( (++srcNodes.begin())->second);
+
+        gp_Pnt p0T = SMESH_MeshEditor::TNodeXYZ( (tgtNodes.begin())  ->second);
+        gp_Pnt p1T = SMESH_MeshEditor::TNodeXYZ( (tgtNodes.rbegin()) ->second);
+        gp_Pnt p2T = SMESH_MeshEditor::TNodeXYZ( (++tgtNodes.begin())->second);
+
+        // transform source points, they must coinside with target ones
+        if ( p0T.SquareDistance( p0S.Transformed( trsf )) > tol ||
+             p1T.SquareDistance( p1S.Transformed( trsf )) > tol ||
+             p2T.SquareDistance( p2S.Transformed( trsf )) > tol )
+        {
+          //cout << "KO trsf, 3 dist: "
+          //<< p0T.SquareDistance( p0S.Transformed( trsf ))<< ", "
+          //<< p1T.SquareDistance( p1S.Transformed( trsf ))<< ", "
+          //<< p2T.SquareDistance( p2S.Transformed( trsf ))<< ", "<<endl;
+          return false;
+        }
+      }
+
       map< double, const SMDS_MeshNode* >::iterator u_tn = tgtNodes.begin();
       map< double, const SMDS_MeshNode* >::iterator u_sn = srcNodes.begin();
       for ( ; u_tn != tgtNodes.end(); ++u_tn, ++u_sn)
@@ -407,11 +520,6 @@ namespace {
 
     // Make new faces
 
-    // transformation to get location of target nodes from source ones
-    gp_Trsf srcTrsf = srcFace.Location();
-    gp_Trsf tgtTrsf = tgtFace.Location();
-    gp_Trsf trsf = srcTrsf.Inverted() * tgtTrsf;
-
     // prepare the helper adding quadratic elements if necessary
     SMESH_MesherHelper helper( *tgtMesh );
     helper.IsQuadraticSubMesh( tgtFace );
@@ -545,9 +653,9 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
     RETURN_BAD_RESULT("Not associated vertices, srcV1 " << srcV1.TShape().operator->() );
   TopoDS_Vertex tgtV1 = TopoDS::Vertex( shape2ShapeMap( srcV1 ));
 
-  if ( !TAssocTool::IsSubShape( srcV1, srcFace ))
+  if ( !SMESH_MesherHelper::IsSubShape( srcV1, srcFace ))
     RETURN_BAD_RESULT("Wrong srcV1 " << srcV1.TShape().operator->());
-  if ( !TAssocTool::IsSubShape( tgtV1, tgtFace ))
+  if ( !SMESH_MesherHelper::IsSubShape( tgtV1, tgtFace ))
     RETURN_BAD_RESULT("Wrong tgtV1 " << tgtV1.TShape().operator->());
 
   // try to find out orientation by order of edges
@@ -748,8 +856,8 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
 //=======================================================================
 
 bool StdMeshers_Projection_2D::Evaluate(SMESH_Mesh& theMesh,
-                                       const TopoDS_Shape& theShape,
-                                       MapShapeNbElems& aResMap)
+                                        const TopoDS_Shape& theShape,
+                                        MapShapeNbElems& aResMap)
 {
   if ( !_sourceHypo )
     return false;
index 26506e81a7f513b3d5703b1bf596418e138f7998..01eb80b9dbc6f5fffcdf36271bd68edb94560f25 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Projection_2D.hxx
 //  Module : SMESH
index d8939feadf14986318733aff833ab9e3297622be..e30980e32d1989c6d7143a6e26f1b33d0193f182 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : StdMeshers_Projection_3D.cxx
 // Module    : SMESH
@@ -141,12 +142,12 @@ bool StdMeshers_Projection_3D::CheckHypothesis(SMESH_Mesh&
       TopoDS_Shape edge = TAssocTool::GetEdgeByVertices
         ( srcMesh, _sourceHypo->GetSourceVertex(1), _sourceHypo->GetSourceVertex(2) );
       if ( edge.IsNull() ||
-           !TAssocTool::IsSubShape( edge, srcMesh ) ||
-           !TAssocTool::IsSubShape( edge, _sourceHypo->GetSource3DShape() ))
+           !SMESH_MesherHelper::IsSubShape( edge, srcMesh ) ||
+           !SMESH_MesherHelper::IsSubShape( edge, _sourceHypo->GetSource3DShape() ))
       {
         SCRUTE((edge.IsNull()));
-        SCRUTE((TAssocTool::IsSubShape( edge, srcMesh )));
-        SCRUTE((TAssocTool::IsSubShape( edge, _sourceHypo->GetSource3DShape() )));
+        SCRUTE((SMESH_MesherHelper::IsSubShape( edge, srcMesh )));
+        SCRUTE((SMESH_MesherHelper::IsSubShape( edge, _sourceHypo->GetSource3DShape() )));
         aStatus = SMESH_Hypothesis::HYP_BAD_PARAMETER;
       }
       else
@@ -155,21 +156,21 @@ bool StdMeshers_Projection_3D::CheckHypothesis(SMESH_Mesh&
         edge = TAssocTool::GetEdgeByVertices
           ( tgtMesh, _sourceHypo->GetTargetVertex(1), _sourceHypo->GetTargetVertex(2) );
         if ( edge.IsNull() ||
-             !TAssocTool::IsSubShape( edge, tgtMesh ) ||
-             !TAssocTool::IsSubShape( edge, aShape ))
+             !SMESH_MesherHelper::IsSubShape( edge, tgtMesh ) ||
+             !SMESH_MesherHelper::IsSubShape( edge, aShape ))
         {
           SCRUTE((edge.IsNull()));
-          SCRUTE((TAssocTool::IsSubShape( edge, tgtMesh )));
-          SCRUTE((TAssocTool::IsSubShape( edge, aShape )));
+          SCRUTE((SMESH_MesherHelper::IsSubShape( edge, tgtMesh )));
+          SCRUTE((SMESH_MesherHelper::IsSubShape( edge, aShape )));
           aStatus = SMESH_Hypothesis::HYP_BAD_PARAMETER;
         }
       }
     }
     // check a source shape
-    if ( !TAssocTool::IsSubShape( _sourceHypo->GetSource3DShape(), srcMesh ) ||
+    if ( !SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSource3DShape(), srcMesh ) ||
          ( srcMesh == tgtMesh && aShape == _sourceHypo->GetSource3DShape()))
     {
-      SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetSource3DShape(), srcMesh)));
+      SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSource3DShape(), srcMesh)));
       SCRUTE((srcMesh == tgtMesh));
       SCRUTE((aShape == _sourceHypo->GetSource3DShape()));
       aStatus = SMESH_Hypothesis::HYP_BAD_PARAMETER;
@@ -266,8 +267,8 @@ bool StdMeshers_Projection_3D::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aS
       return error("Association of subshapes failed" );
     srcV000 = TopoDS::Vertex( shape2ShapeMap( tgtV000 ));
     srcV100 = TopoDS::Vertex( shape2ShapeMap( tgtV100 ));
-    if ( !TAssocTool::IsSubShape( srcV000, srcShell ) ||
-         !TAssocTool::IsSubShape( srcV100, srcShell ))
+    if ( !SMESH_MesherHelper::IsSubShape( srcV000, srcShell ) ||
+         !SMESH_MesherHelper::IsSubShape( srcV100, srcShell ))
       return error("Incorrect association of subshapes" );
   }
 
index 8f95545091bb015b60fa4c94b7eb311c77e67771..68aed37808ff7ac59a2dbd8ebe52ebbf8790fb61 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Projection_3D.hxx
 //  Module : SMESH
index c6b9b015fb50193491cfb8dd7525e74b8cfe26f4..8b88ce99aef3eb996847f48c10b46bc41896652f 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Propagation.cxx
 //  Module : SMESH
-
+//
 #include "StdMeshers_Propagation.hxx"
 
 #include "utilities.h"
index b02f9aebe03b39961ca1069c0296e63e113d53fe..c2689d27c8170818d16061fafa16135f9f63a230 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Propagation.hxx
 //  Module : SMESH
-
+//
 #ifndef _SMESH_PROPAGATION_HXX_
 #define _SMESH_PROPAGATION_HXX_
 
index fcd7afd081df6825a1769e631088f3d287d447a3..1ca7e5b1283995c4f9f1002312b5f00df910c0f8 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : StdMeshers_QuadToTriaAdaptor.cxx
 // Module    : SMESH
 //
 #include "StdMeshers_QuadToTriaAdaptor.hxx"
 
-#include <SMDS_FaceOfNodes.hxx>
 #include <SMESH_Algo.hxx>
 #include <SMESH_MesherHelper.hxx>
 
 #include <IntAna_IntConicQuad.hxx>
 #include <IntAna_Quadric.hxx>
-#include <TColStd_SequenceOfInteger.hxx>
+#include <TColgp_HArray1OfPnt.hxx>
+#include <TColgp_HArray1OfVec.hxx>
 #include <TColgp_HSequenceOfPnt.hxx>
 #include <TopExp_Explorer.hxx>
 #include <TopoDS.hxx>
 #include <gp_Lin.hxx>
 #include <gp_Pln.hxx>
 
-#include <NCollection_Array1.hxx>
-typedef NCollection_Array1<TColStd_SequenceOfInteger> StdMeshers_Array1OfSequenceOfInteger;
-
+#include <numeric>
 
-//=======================================================================
-//function : StdMeshers_QuadToTriaAdaptor
-//purpose  : 
-//=======================================================================
+using namespace std;
 
-StdMeshers_QuadToTriaAdaptor::StdMeshers_QuadToTriaAdaptor()
-{
-}
+enum EQuadNature { NOT_QUAD, QUAD, DEGEN_QUAD };
 
+  // sdt-like iterator used to get coordinates of nodes of mesh element
+typedef SMDS_StdIterator< SMESH_MeshEditor::TNodeXYZ, SMDS_ElemIteratorPtr > TXyzIterator;
 
 //================================================================================
 /*!
@@ -63,26 +56,26 @@ StdMeshers_QuadToTriaAdaptor::StdMeshers_QuadToTriaAdaptor()
 StdMeshers_QuadToTriaAdaptor::~StdMeshers_QuadToTriaAdaptor()
 {
   // delete temporary faces
-  map< const SMDS_MeshElement*, list<const SMDS_FaceOfNodes*> >::iterator
-    f_f = myResMap.begin(), ffEnd = myResMap.end();
+  TQuad2Trias::iterator f_f = myResMap.begin(), ffEnd = myResMap.end();
   for ( ; f_f != ffEnd; ++f_f )
   {
-    list<const SMDS_FaceOfNodes*>& fList = f_f->second;
-    list<const SMDS_FaceOfNodes*>::iterator f = fList.begin(), fEnd = fList.end();
+    TTriaList& fList = f_f->second;
+    TTriaList::iterator f = fList.begin(), fEnd = fList.end();
     for ( ; f != fEnd; ++f )
       delete *f;
   }
   myResMap.clear();
 
-//   TF2PyramMap::iterator itp = myMapFPyram.begin();
-//   for(; itp!=myMapFPyram.end(); itp++)
+//   TF2PyramMap::iterator itp = myPyram2Trias.begin();
+//   for(; itp!=myPyram2Trias.end(); itp++)
 //     cout << itp->second << endl;
 }
 
 
 //=======================================================================
 //function : FindBestPoint
-//purpose  : Auxilare for Compute()
+//purpose  : Return a point P laying on the line (PC,V) so that triangle
+//           (P, P1, P2) to be equilateral as much as possible
 //           V - normal to (P1,P2,PC)
 //=======================================================================
 static gp_Pnt FindBestPoint(const gp_Pnt& P1, const gp_Pnt& P2,
@@ -94,11 +87,10 @@ static gp_Pnt FindBestPoint(const gp_Pnt& P1, const gp_Pnt& P2,
   if( a < (b+c)/2 )
     return PC;
   else {
-    // find shift along V in order to a became equal to (b+c)/2
+    // find shift along V in order a to became equal to (b+c)/2
     double shift = sqrt( a*a + (b*b-c*c)*(b*b-c*c)/16/a/a - (b*b+c*c)/2 );
     gp_Dir aDir(V);
-    gp_Pnt Pbest( PC.X() + aDir.X()*shift,  PC.Y() + aDir.Y()*shift,
-                  PC.Z() + aDir.Z()*shift );
+    gp_Pnt Pbest = PC.XYZ() + aDir.XYZ() * shift;
     return Pbest;
   }
 }
@@ -183,6 +175,7 @@ static bool HasIntersection3(const gp_Pnt& P, const gp_Pnt& PC, gp_Pnt& Pint,
 //function : HasIntersection
 //purpose  : Auxilare for CheckIntersection()
 //=======================================================================
+
 static bool HasIntersection(const gp_Pnt& P, const gp_Pnt& PC, gp_Pnt& Pint,
                             Handle(TColgp_HSequenceOfPnt)& aContour)
 {
@@ -262,78 +255,53 @@ bool StdMeshers_QuadToTriaAdaptor::CheckIntersection
 
 
 //=======================================================================
-//function : CompareTrias
+//function : EqualTriangles
 //purpose  : Auxilare for Compute()
 //=======================================================================
-static bool CompareTrias(const SMDS_MeshElement* F1,const SMDS_MeshElement* F2)
+static bool EqualTriangles(const SMDS_MeshElement* F1,const SMDS_MeshElement* F2)
 {
   return
     ( F1->GetNode(1)==F2->GetNode(2) && F1->GetNode(2)==F2->GetNode(1) ) ||
     ( F1->GetNode(1)==F2->GetNode(1) && F1->GetNode(2)==F2->GetNode(2) );
 }
 
+//================================================================================
+/*!
+ * \brief Prepare data for the given face
+ *  \param PN - coordinates of face nodes
+ *  \param VN - cross products of vectors (PC-PN(i)) ^ (PC-PN(i+1))
+ *  \param FNodes - face nodes
+ *  \param PC - gravity center of nodes
+ *  \param VNorm - face normal (sum of VN)
+ *  \param volumes - two volumes sharing the given face, the first is in VNorm direction
+ *  \retval int - 0 if given face is not quad,
+ *                1 if given face is quad,
+ *                2 if given face is degenerate quad (two nodes are coincided)
+ */
+//================================================================================
 
-//=======================================================================
-//function : IsDegenarate
-//purpose  : Auxilare for Preparation()
-//=======================================================================
-// static int IsDegenarate(const Handle(TColgp_HArray1OfPnt)& PN)
-// {
-//   int i = 1;
-//   for(; i<4; i++) {
-//     int j = i+1;
-//     for(; j<=4; j++) {
-//       if( PN->Value(i).Distance(PN->Value(j)) < 1.e-6 )
-//         return j;
-//     }
-//   }
-//   return 0;
-// }
-
-
-//=======================================================================
-//function : Preparation
-//purpose  : Auxilare for Compute()
-//         : Return 0 if given face is not quad,
-//                  1 if given face is quad,
-//                  2 if given face is degenerate quad (two nodes are coincided)
-//=======================================================================
-int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement* face,
-                                              Handle(TColgp_HArray1OfPnt)& PN,
-                                              Handle(TColgp_HArray1OfVec)& VN,
-                                              std::vector<const SMDS_MeshNode*>& FNodes,
-                                              gp_Pnt& PC, gp_Vec& VNorm)
+int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement*       face,
+                                              Handle(TColgp_HArray1OfPnt)&  PN,
+                                              Handle(TColgp_HArray1OfVec)&  VN,
+                                              vector<const SMDS_MeshNode*>& FNodes,
+                                              gp_Pnt&                       PC,
+                                              gp_Vec&                       VNorm,
+                                              const SMDS_MeshElement**      volumes)
 {
-  int i = 0;
-  double xc=0., yc=0., zc=0.;
-  SMDS_ElemIteratorPtr nodeIt = face->nodesIterator();
-  if( !face->IsQuadratic() ) {
+  if( face->NbNodes() != ( face->IsQuadratic() ? 8 : 4 ))
     if( face->NbNodes() != 4 )
-      return 0;
-    while ( nodeIt->more() ) {
-      i++;
-      const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
-      FNodes[i-1] = node;
-      PN->SetValue( i, gp_Pnt(node->X(), node->Y(), node->Z()) );
-      xc += node->X();
-      yc += node->Y();
-      zc += node->Z();
-    }
-  }
-  else {
-    if( face->NbNodes() != 8)
-      return 0;
-    while ( nodeIt->more() ) {
-      i++;
-      const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
-      FNodes[i-1] = node;
-      PN->SetValue( i, gp_Pnt(node->X(), node->Y(), node->Z()) );
-      xc += node->X();
-      yc += node->Y();
-      zc += node->Z();
-      if(i==4) break;
-    }
+      return NOT_QUAD;
+
+  int i = 0;
+  gp_XYZ xyzC(0., 0., 0.);
+  for ( i = 0; i < 4; ++i )
+  {
+    gp_XYZ p = SMESH_MeshEditor::TNodeXYZ( FNodes[i] = face->GetNode(i) );
+    PN->SetValue( i+1, p );
+    xyzC += p;
   }
+  PC = xyzC/4;
+  //cout<<"  PC("<<PC.X()<<","<<PC.Y()<<","<<PC.Z()<<")"<<endl;
 
   int nbp = 4;
 
@@ -354,7 +322,7 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement* face,
     hasdeg = true;
     gp_Pnt Pdeg = PN->Value(i);
 
-    std::list< const SMDS_MeshNode* >::iterator itdg = myDegNodes.begin();
+    list< const SMDS_MeshNode* >::iterator itdg = myDegNodes.begin();
     const SMDS_MeshNode* DegNode = 0;
     for(; itdg!=myDegNodes.end(); itdg++) {
       const SMDS_MeshNode* N = (*itdg);
@@ -377,24 +345,15 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement* face,
       FNodes[i-1] = FNodes[i];
     }
     nbp = 3;
-    //PC = gp_Pnt( PN->Value(1).X() + PN.Value
   }
 
-  PC = gp_Pnt(xc/4., yc/4., zc/4.);
-  //cout<<"  PC("<<PC.X()<<","<<PC.Y()<<","<<PC.Z()<<")"<<endl;
-
-  //PN->SetValue(5,PN->Value(1));
   PN->SetValue(nbp+1,PN->Value(1));
-  //FNodes[4] = FNodes[0];
   FNodes[nbp] = FNodes[0];
   // find normal direction
-  //gp_Vec V1(PC,PN->Value(4));
   gp_Vec V1(PC,PN->Value(nbp));
   gp_Vec V2(PC,PN->Value(1));
   VNorm = V1.Crossed(V2);
-  //VN->SetValue(4,VNorm);
   VN->SetValue(nbp,VNorm);
-  //for(i=1; i<4; i++) {
   for(i=1; i<nbp; i++) {
     V1 = gp_Vec(PC,PN->Value(i));
     V2 = gp_Vec(PC,PN->Value(i+1));
@@ -402,9 +361,37 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement* face,
     VN->SetValue(i,Vtmp);
     VNorm += Vtmp;
   }
+
+  // find volumes sharing the face
+  if ( volumes )
+  {
+    volumes[0] = volumes[1] = 0;
+    SMDS_ElemIteratorPtr vIt = FNodes[0]->GetInverseElementIterator( SMDSAbs_Volume );
+    while ( vIt->more() )
+    {
+      const SMDS_MeshElement* vol = vIt->next();
+      bool volSharesAllNodes = true;
+      for ( int i = 1; i < face->NbNodes() && volSharesAllNodes; ++i )
+        volSharesAllNodes = ( vol->GetNodeIndex( FNodes[i] ) >= 0 );
+      if ( volSharesAllNodes )
+        volumes[ volumes[0] ? 1 : 0 ] = vol;
+      // we could additionally check that vol has all FNodes in its one face using SMDS_VolumeTool
+    }
+    // define volume position relating to the face normal
+    if ( volumes[0] )
+    {
+      // get volume gc
+      SMDS_ElemIteratorPtr nodeIt = volumes[0]->nodesIterator();
+      gp_XYZ volGC(0,0,0);
+      volGC = accumulate( TXyzIterator(nodeIt), TXyzIterator(), volGC ) / volumes[0]->NbNodes();
+
+      if ( VNorm * gp_Vec( PC, volGC ) < 0 )
+        swap( volumes[0], volumes[1] );
+    }
+  }
+
   //cout<<"  VNorm("<<VNorm.X()<<","<<VNorm.Y()<<","<<VNorm.Z()<<")"<<endl;
-  if(hasdeg) return 2;
-  return 1;
+  return hasdeg ? DEGEN_QUAD : QUAD;
 }
 
 
@@ -416,7 +403,7 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement* face,
 bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape)
 {
   myResMap.clear();
-  myMapFPyram.clear();
+  myPyram2Trias.clear();
 
   SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
   SMESH_MesherHelper helper(aMesh);
@@ -436,7 +423,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape
         // preparation step using face info
         Handle(TColgp_HArray1OfPnt) PN = new TColgp_HArray1OfPnt(1,5);
         Handle(TColgp_HArray1OfVec) VN = new TColgp_HArray1OfVec(1,4);
-        std::vector<const SMDS_MeshNode*> FNodes(5);
+        vector<const SMDS_MeshNode*> FNodes(5);
         gp_Pnt PC;
         gp_Vec VNorm;
         int stat =  Preparation(face, PN, VN, FNodes, PC, VNorm);
@@ -446,13 +433,12 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape
         if(stat==2) {
           // degenerate face
           // add triangles to result map
-          std::list<const SMDS_FaceOfNodes*> aList;
           SMDS_FaceOfNodes* NewFace;
           if(!isRev)
             NewFace = new SMDS_FaceOfNodes( FNodes[0], FNodes[1], FNodes[2] );
           else
             NewFace = new SMDS_FaceOfNodes( FNodes[0], FNodes[2], FNodes[1] );
-          aList.push_back(NewFace);
+          TTriaList aList( 1, NewFace );
           myResMap.insert(make_pair(face,aList));
           continue;
         }
@@ -504,18 +490,18 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape
         }
         // create node for PCbest
         SMDS_MeshNode* NewNode = helper.AddNode( PCbest.X(), PCbest.Y(), PCbest.Z() );
+
         // add triangles to result map
-        std::list<const SMDS_FaceOfNodes*> aList;
-        for(i=0; i<4; i++) {
-          SMDS_FaceOfNodes* NewFace = new SMDS_FaceOfNodes( NewNode, FNodes[i], FNodes[i+1] );
-          aList.push_back(NewFace);
-        }
-        myResMap.insert(make_pair(face,aList));
+        TTriaList& triaList = myResMap.insert( make_pair( face, TTriaList() ))->second;
+        for(i=0; i<4; i++)
+          triaList.push_back( new SMDS_FaceOfNodes( NewNode, FNodes[i], FNodes[i+1] ));
+
         // create pyramid
+        if ( isRev ) swap( FNodes[1], FNodes[3]);
         SMDS_MeshVolume* aPyram =
           helper.AddVolume( FNodes[0], FNodes[1], FNodes[2], FNodes[3], NewNode );
-        myMapFPyram.insert(make_pair(face,aPyram));
-      } // end loop on elements on a face
+        myPyram2Trias.insert(make_pair(aPyram, & triaList));
+      } // end loop on elements on a face submesh
     }
   } // end for(TopExp_Explorer exp(aShape,TopAbs_FACE);exp.More();exp.Next()) {
 
@@ -531,7 +517,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape
 bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh)
 {
   myResMap.clear();
-  myMapFPyram.clear();
+  myPyram2Trias.clear();
   SMESH_MesherHelper helper(aMesh);
   helper.IsQuadraticSubMesh(aMesh.GetShapeToMesh());
   helper.SetElementsOnShape( true );
@@ -548,26 +534,29 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh)
     const SMDS_MeshElement* face = *itFace;
     if ( !face ) continue;
     //cout<<endl<<"================= face->GetID() = "<<face->GetID()<<endl;
-    // preparation step using face info
+    // retrieve needed information about a face
     Handle(TColgp_HArray1OfPnt) PN = new TColgp_HArray1OfPnt(1,5);
     Handle(TColgp_HArray1OfVec) VN = new TColgp_HArray1OfVec(1,4);
-    std::vector<const SMDS_MeshNode*> FNodes(5);
+    vector<const SMDS_MeshNode*> FNodes(5);
     gp_Pnt PC;
     gp_Vec VNorm;
-
-    int stat =  Preparation(face, PN, VN, FNodes, PC, VNorm);
-    if(stat==0)
+    const SMDS_MeshElement* volumes[2];
+    int what = Preparation(face, PN, VN, FNodes, PC, VNorm, volumes);
+    if ( what == NOT_QUAD )
       continue;
+    if ( volumes[0] && volumes[1] )
+      continue; // face is shared by two volumes - no space for a pyramid
 
-    if(stat==2) {
+    if ( what == DEGEN_QUAD )
+    {
       // degenerate face
       // add triangles to result map
-      std::list<const SMDS_FaceOfNodes*> aList;
+      TTriaList aList;
       SMDS_FaceOfNodes* NewFace;
       // check orientation
 
-      double tmp = PN->Value(1).Distance(PN->Value(2)) +
-        PN->Value(2).Distance(PN->Value(3));
+      double tmp = PN->Value(1).Distance(PN->Value(2)) + PN->Value(2).Distance(PN->Value(3));
+      // far points in VNorm direction
       gp_Pnt Ptmp1 = PC.XYZ() + VNorm.XYZ() * tmp * 1.e6;
       gp_Pnt Ptmp2 = PC.XYZ() - VNorm.XYZ() * tmp * 1.e6;
       // check intersection for Ptmp1 and Ptmp2
@@ -581,24 +570,10 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh)
         const SMDS_MeshElement* F = *itF;
         if(F==face) continue;
         Handle(TColgp_HSequenceOfPnt) aContour = new TColgp_HSequenceOfPnt;
-        SMDS_ElemIteratorPtr nodeIt = F->nodesIterator();
-        if( !F->IsQuadratic() ) {
-          while ( nodeIt->more() ) {
-            const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
-            aContour->Append(gp_Pnt(node->X(), node->Y(), node->Z()));
-          }
-        }
-        else {
-          int nn = 0;
-          while ( nodeIt->more() ) {
-            nn++;
-            const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
-            aContour->Append(gp_Pnt(node->X(), node->Y(), node->Z()));
-            if(nn==face->NbNodes()/2) break;
-          }
-        }
+        for ( int i = 0; i < 4; ++i )
+          aContour->Append( SMESH_MeshEditor::TNodeXYZ( F->GetNode(i) ));
         gp_Pnt PPP;
-        if( HasIntersection(Ptmp1, PC, PPP, aContour) ) {
+        if( !volumes[0] && HasIntersection(Ptmp1, PC, PPP, aContour) ) {
           IsOK1 = true;
           double tmp = PC.Distance(PPP);
           if(tmp<dist1) {
@@ -606,7 +581,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh)
             dist1 = tmp;
           }
         }
-        if( HasIntersection(Ptmp2, PC, PPP, aContour) ) {
+        if( !volumes[1] && HasIntersection(Ptmp2, PC, PPP, aContour) ) {
           IsOK2 = true;
           double tmp = PC.Distance(PPP);
           if(tmp<dist2) {
@@ -624,8 +599,8 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh)
         IsRev = true;
       }
       else { // IsOK1 && IsOK2
-        double tmp1 = PC.Distance(Pres1)/3.;
-        double tmp2 = PC.Distance(Pres2)/3.;
+        double tmp1 = PC.Distance(Pres1);
+        double tmp2 = PC.Distance(Pres2);
         if(tmp1<tmp2) {
           // using existed direction
         }
@@ -642,138 +617,95 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh)
       myResMap.insert(make_pair(face,aList));
       continue;
     }
-    
-    double xc = 0., yc = 0., zc = 0.;
+
+    // Find pyramid peak
+
+    gp_XYZ PCbest(0., 0., 0.); // pyramid peak
     int i = 1;
     for(; i<=4; i++) {
       gp_Pnt Pbest = FindBestPoint(PN->Value(i), PN->Value(i+1), PC, VN->Value(i));
-      xc += Pbest.X();
-      yc += Pbest.Y();
-      zc += Pbest.Z();
+      PCbest += Pbest.XYZ();
     }
-    gp_Pnt PCbest(xc/4., yc/4., zc/4.);
-    double height = PCbest.Distance(PC);
+    PCbest /= 4;
+
+    double height = PC.Distance(PCbest); // pyramid height to precise
     if(height<1.e-6) {
       // create new PCbest using a bit shift along VNorm
       PCbest = PC.XYZ() + VNorm.XYZ() * 0.001;
-      height = PCbest.Distance(PC);
+      height = PC.Distance(PCbest);
     }
     //cout<<"  PCbest("<<PCbest.X()<<","<<PCbest.Y()<<","<<PCbest.Z()<<")"<<endl;
 
-    gp_Vec V1(PC,PCbest);
-    double tmp = PN->Value(1).Distance(PN->Value(3)) +
-      PN->Value(2).Distance(PN->Value(4));
-    gp_Dir tmpDir(V1);
-    gp_Pnt Ptmp1 = PC.XYZ() + tmpDir.XYZ() * tmp * 1.e6;
-    gp_Pnt Ptmp2 = PC.XYZ() - tmpDir.XYZ() * tmp * 1.e6;
-    // check intersection for Ptmp1 and Ptmp2
-    bool IsRev = false;
-    bool IsOK1 = false;
-    bool IsOK2 = false;
-    double dist1 = RealLast();
-    double dist2 = RealLast();
-    gp_Pnt Pres1,Pres2;
-    for (TIDSortedElemSet::iterator itF = sortedFaces.begin(); itF != fEnd; ++itF ) {
+    // Restrict pyramid height by intersection with other faces
+    gp_Vec tmpDir(PC,PCbest); tmpDir.Normalize();
+    double tmp = PN->Value(1).Distance(PN->Value(3)) + PN->Value(2).Distance(PN->Value(4));
+    // far points: in (PC, PCbest) direction and vice-versa
+    gp_Pnt farPnt[2] = { PC.XYZ() + tmpDir.XYZ() * tmp * 1.e6,
+                         PC.XYZ() - tmpDir.XYZ() * tmp * 1.e6 };
+    // check intersection for farPnt1 and farPnt2
+    bool   intersected[2] = { false, false };
+    double dist       [2] = { RealLast(), RealLast() };
+    gp_Pnt intPnt[2];
+    for (TIDSortedElemSet::iterator itF = sortedFaces.begin(); itF != fEnd; ++itF )
+    {
       const SMDS_MeshElement* F = *itF;
       if(F==face) continue;
       Handle(TColgp_HSequenceOfPnt) aContour = new TColgp_HSequenceOfPnt;
-      SMDS_ElemIteratorPtr nodeIt = F->nodesIterator();
-      if( !F->IsQuadratic() ) {
-        while ( nodeIt->more() ) {
-          const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
-          aContour->Append(gp_Pnt(node->X(), node->Y(), node->Z()));
-        }
-      }
-      else {
-        int nn = 0;
-        while ( nodeIt->more() ) {
-          nn++;
-          const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
-          aContour->Append(gp_Pnt(node->X(), node->Y(), node->Z()));
-          if(nn==face->NbNodes()/2) break;
-        }
-      }
-      gp_Pnt PPP;
-      if( HasIntersection(Ptmp1, PC, PPP, aContour) ) {
-        IsOK1 = true;
-        double tmp = PC.Distance(PPP);
-        if(tmp<dist1) {
-          Pres1 = PPP;
-          dist1 = tmp;
-        }
-      }
-      if( HasIntersection(Ptmp2, PC, PPP, aContour) ) {
-        IsOK2 = true;
-        double tmp = PC.Distance(PPP);
-        if(tmp<dist2) {
-          Pres2 = PPP;
-          dist2 = tmp;
+      int nbN = F->NbNodes() / ( F->IsQuadratic() ? 2 : 1 );
+      for ( i = 0; i < nbN; ++i )
+        aContour->Append( SMESH_MeshEditor::TNodeXYZ( F->GetNode(i) ));
+      gp_Pnt intP;
+      for ( int isRev = 0; isRev < 2; ++isRev )
+      {
+        if( !volumes[isRev] && HasIntersection(farPnt[isRev], PC, intP, aContour) ) {
+          intersected[isRev] = true;
+          double d = PC.Distance( intP );
+          if( d < dist[isRev] )
+          {
+            intPnt[isRev] = intP;
+            dist  [isRev] = d;
+          }
         }
       }
     }
 
-    if( IsOK1 && !IsOK2 ) {
-      // using existed direction
-      double tmp = PC.Distance(Pres1)/3.;
-      if( height > tmp ) {
-        height = tmp;
-        PCbest = PC.XYZ() + tmpDir.XYZ() * height;
-      }
-    }
-    else if( !IsOK1 && IsOK2 ) {
-      // using opposite direction
-      IsRev = true;
-      double tmp = PC.Distance(Pres2)/3.;
-      if( height > tmp ) height = tmp;
-      PCbest = PC.XYZ() - tmpDir.XYZ() * height;
-    }
-    else { // IsOK1 && IsOK2
-      double tmp1 = PC.Distance(Pres1)/3.;
-      double tmp2 = PC.Distance(Pres2)/3.;
-      if(tmp1<tmp2) {
-        // using existed direction
-        if( height > tmp1 ) {
-          height = tmp1;
-          PCbest = PC.XYZ() + tmpDir.XYZ() * height;
-        }
-      }
-      else {
-        // using opposite direction
-        IsRev = true;
-        if( height > tmp2 ) height = tmp2;
-        PCbest = PC.XYZ() - tmpDir.XYZ() * height;
-      }
-    }
+    // Create one or two pyramids
 
-    // create node for PCbest
-    SMDS_MeshNode* NewNode = helper.AddNode( PCbest.X(), PCbest.Y(), PCbest.Z() );
-    // add triangles to result map
-    std::list<const SMDS_FaceOfNodes*> aList;
-    for(i=0; i<4; i++) {
-      SMDS_FaceOfNodes* NewFace;
-      if(IsRev)
-        NewFace = new SMDS_FaceOfNodes( NewNode, FNodes[i], FNodes[i+1] );
+    for ( int isRev = 0; isRev < 2; ++isRev )
+    {
+      if( !intersected[isRev] ) continue;
+      double pyramidH = Min( height, PC.Distance(intPnt[isRev])/3.);
+      PCbest = PC.XYZ() + tmpDir.XYZ() * (isRev ? -pyramidH : pyramidH);
+
+      // create node for PCbest
+      SMDS_MeshNode* NewNode = helper.AddNode( PCbest.X(), PCbest.Y(), PCbest.Z() );
+
+      // add triangles to result map
+      TTriaList& aList = myResMap.insert( make_pair( face, TTriaList()))->second;
+      for(i=0; i<4; i++) {
+        SMDS_FaceOfNodes* NewFace;
+        if(isRev)
+          NewFace = new SMDS_FaceOfNodes( NewNode, FNodes[i], FNodes[i+1] );
+        else
+          NewFace = new SMDS_FaceOfNodes( NewNode, FNodes[i+1], FNodes[i] );
+        aList.push_back(NewFace);
+      }
+      // create a pyramid
+      SMDS_MeshVolume* aPyram;
+      if(isRev)
+        aPyram = helper.AddVolume( FNodes[0], FNodes[1], FNodes[2], FNodes[3], NewNode );
       else
-        NewFace = new SMDS_FaceOfNodes( NewNode, FNodes[i+1], FNodes[i] );
-      aList.push_back(NewFace);
+        aPyram = helper.AddVolume( FNodes[0], FNodes[3], FNodes[2], FNodes[1], NewNode );
+      myPyram2Trias.insert(make_pair(aPyram, & aList));
     }
-    myResMap.insert(make_pair(face,aList));
-    // create pyramid
-    SMDS_MeshVolume* aPyram;
-    if(IsRev)
-     aPyram = helper.AddVolume( FNodes[0], FNodes[1], FNodes[2], FNodes[3], NewNode );
-    else
-     aPyram = helper.AddVolume( FNodes[0], FNodes[3], FNodes[2], FNodes[1], NewNode );
-    myMapFPyram.insert(make_pair(face,aPyram));
-  } // end loop on elements on a face
+  } // end loop on all faces
 
   return Compute2ndPart(aMesh);
 }
 
-
 //=======================================================================
 //function : Compute2ndPart
-//purpose  : 
+//purpose  : Update created pyramids and faces to avoid their intersection
 //=======================================================================
 
 bool StdMeshers_QuadToTriaAdaptor::Compute2ndPart(SMESH_Mesh& aMesh)
@@ -781,254 +713,180 @@ bool StdMeshers_QuadToTriaAdaptor::Compute2ndPart(SMESH_Mesh& aMesh)
   SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
 
   // check intersections between created pyramids
-  int NbPyram = myMapFPyram.size();
-  //cout<<"NbPyram = "<<NbPyram<<endl;
-  if(NbPyram==0)
+
+  if(myPyram2Trias.empty())
     return true;
 
-  vector< const SMDS_MeshElement* > Pyrams(NbPyram);
-  vector< const SMDS_MeshElement* > Faces(NbPyram);
-  TF2PyramMap::iterator itp = myMapFPyram.begin();
-  int i = 0;
-  for(; itp!=myMapFPyram.end(); itp++, i++) {
-    Faces[i] = (*itp).first;
-    Pyrams[i] = (*itp).second;
-  }
-  StdMeshers_Array1OfSequenceOfInteger MergesInfo(0,NbPyram-1);
-  for(i=0; i<NbPyram; i++) {
-    TColStd_SequenceOfInteger aMerges;
-    aMerges.Append(i);
-    MergesInfo.SetValue(i,aMerges);
-  }
-  for(i=0; i<NbPyram-1; i++) {
-    const SMDS_MeshElement* Prm1 = Pyrams[i];
-    SMDS_ElemIteratorPtr nIt = Prm1->nodesIterator();
-    std::vector<gp_Pnt>            Ps1( Prm1->NbNodes() );
-    vector< const SMDS_MeshNode* > Ns1( Prm1->NbNodes() );
-    int k = 0;
-    for ( ; k < Ns1.size(); ++k ) {
-      const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nIt->next() );
-      Ns1[k] = node;
-      Ps1[k] = gp_Pnt(node->X(), node->Y(), node->Z());
-    }
+  int k = 0;
+
+  // for each pyramid store list of merged pyramids with their faces
+  typedef map< const SMDS_MeshElement*, list< TPyram2Trias::iterator > > TPyram2Merged;
+  TPyram2Merged MergesInfo;
+
+  // iterate on all pyramids
+  TPyram2Trias::iterator itPi = myPyram2Trias.begin(), itPEnd = myPyram2Trias.end();
+  for ( ; itPi != itPEnd; ++itPi )
+  {
+    const SMDS_MeshElement* PrmI = itPi->first;
+    TPyram2Merged::iterator pMergesI = MergesInfo.find( PrmI );
+
+    TXyzIterator xyzIt( PrmI->nodesIterator() );
+    vector<gp_Pnt> PsI( xyzIt, TXyzIterator() );
+
+    // compare PrmI with all the rest pyramids
     bool NeedMove = false;
-    for(int j=i+1; j<NbPyram; j++) {
-      //cout<<"  i="<<i<<" j="<<j<<endl;
-      const TColStd_SequenceOfInteger& aMergesI = MergesInfo.Value(i);
-      int nbI = aMergesI.Length();
-      const TColStd_SequenceOfInteger& aMergesJ = MergesInfo.Value(j);
-      int nbJ = aMergesJ.Length();
+    TPyram2Trias::iterator itPj = itPi;
+    for ( ++itPj; itPj != itPEnd; ++itPj )
+    {
+      const SMDS_MeshElement* PrmJ = itPj->first;
+      TPyram2Merged::iterator pMergesJ = MergesInfo.find( PrmJ );
+
       // check if two pyramids already merged
-      bool NeedCont = false;
-      for( k = 2; k<=nbI; k++) {
-        if(aMergesI.Value(k)==j) {
-          NeedCont = true;
-          break;
-        }
-      }
-      if(NeedCont) continue; // already merged
-
-      const SMDS_MeshElement* Prm2 = Pyrams[j];
-      nIt = Prm2->nodesIterator();
-      vector<gp_Pnt>               Ps2( Prm2->NbNodes() );
-      vector<const SMDS_MeshNode*> Ns2( Prm2->NbNodes() );
-      for ( k = 0; k < Ns2.size(); ++k ) {
-        const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nIt->next() );
-        Ns2[k] = node;
-        Ps2[k] = gp_Pnt(node->X(), node->Y(), node->Z());
-      }
+      if ( pMergesJ != MergesInfo.end() &&
+           find(pMergesJ->second.begin(),pMergesJ->second.end(), itPi )!=pMergesJ->second.end())
+        continue; // already merged
+
+      xyzIt = TXyzIterator( PrmJ->nodesIterator() );
+      vector<gp_Pnt> PsJ( xyzIt, TXyzIterator() );
 
       bool hasInt = false;
       gp_Pnt Pint;
-      for(k=0; k<4; k++) {
-        gp_Vec Vtmp(Ps1[k],Ps1[4]);
-        gp_Pnt Pshift = Ps1[k].XYZ() + Vtmp.XYZ() * 0.01;
-        int m=0;
-        for(; m<3; m++) {
-          if( HasIntersection3( Pshift, Ps1[4], Pint, Ps2[m], Ps2[m+1], Ps2[4]) ) {
-            hasInt = true;
-            break;
-          }
-        }
-        if( HasIntersection3( Pshift, Ps1[4], Pint, Ps2[3], Ps2[0], Ps2[4]) ) {
-          hasInt = true;
-        }
-        if(hasInt) break;
+      for(k=0; k<4 && !hasInt; k++) {
+        gp_Vec Vtmp(PsI[k],PsI[4]);
+        gp_Pnt Pshift = PsI[k].XYZ() + Vtmp.XYZ() * 0.01;
+        hasInt = 
+          ( HasIntersection3( Pshift, PsI[4], Pint, PsJ[0], PsJ[1], PsJ[4]) ||
+            HasIntersection3( Pshift, PsI[4], Pint, PsJ[1], PsJ[2], PsJ[4]) ||
+            HasIntersection3( Pshift, PsI[4], Pint, PsJ[2], PsJ[3], PsJ[4]) ||
+            HasIntersection3( Pshift, PsI[4], Pint, PsJ[3], PsJ[0], PsJ[4]) );
       }
-      if(!hasInt) {
-        for(k=0; k<4; k++) {
-          gp_Vec Vtmp(Ps2[k],Ps2[4]);
-          gp_Pnt Pshift = Ps2[k].XYZ() + Vtmp.XYZ() * 0.01;
-          int m=0;
-          for(; m<3; m++) {
-            if( HasIntersection3( Pshift, Ps2[4], Pint, Ps1[m], Ps1[m+1], Ps1[4]) ) {
-              hasInt = true;
-              break;
-            }
-          }
-          if( HasIntersection3( Pshift, Ps2[4], Pint, Ps1[3], Ps1[0], Ps1[4]) ) {
-            hasInt = true;
-          }
-          if(hasInt) break;
-        }
+      for(k=0; k<4 && !hasInt; k++) {
+        gp_Vec Vtmp(PsJ[k],PsJ[4]);
+        gp_Pnt Pshift = PsJ[k].XYZ() + Vtmp.XYZ() * 0.01;
+        hasInt = 
+          ( HasIntersection3( Pshift, PsJ[4], Pint, PsI[0], PsI[1], PsI[4]) ||
+            HasIntersection3( Pshift, PsJ[4], Pint, PsI[1], PsI[2], PsI[4]) ||
+            HasIntersection3( Pshift, PsJ[4], Pint, PsI[2], PsI[3], PsI[4]) ||
+            HasIntersection3( Pshift, PsJ[4], Pint, PsI[3], PsI[0], PsI[4]) );
       }
-
       if(hasInt) {
-        //cout<<"    has intersec for i="<<i<<" j="<<j<<endl;
-        // check if MeshFaces have 2 common node
+        // count common nodes of base faces of two pyramids
         int nbc = 0;
-        for(k=0; k<4; k++) {
-          for(int m=0; m<4; m++) {
-            if( Ns1[k]==Ns2[m] ) nbc++;
-          }
-        }
+        for(k=0; k<4; k++)
+          nbc += int ( PrmI->GetNodeIndex( PrmJ->GetNode(k) ) >= 0 );
         //cout<<"      nbc = "<<nbc<<endl;
-        if(nbc>0) {
-          // create common node
-          SMDS_MeshNode* CommonNode = const_cast<SMDS_MeshNode*>(Ns1[4]);
-          CommonNode->setXYZ( ( nbI*Ps1[4].X() + nbJ*Ps2[4].X() ) / (nbI+nbJ),
-                              ( nbI*Ps1[4].Y() + nbJ*Ps2[4].Y() ) / (nbI+nbJ),
-                              ( nbI*Ps1[4].Z() + nbJ*Ps2[4].Z() ) / (nbI+nbJ) );
-          NeedMove = true;
-          //cout<<"       CommonNode: "<<CommonNode;
-          const SMDS_MeshNode* Nrem = Ns2[4];
-          Ns2[4] = CommonNode;
-          meshDS->ChangeElementNodes(Prm2, &Ns2[0], Ns2.size());
-          // update pyramids for J
-          for(k=2; k<=nbJ; k++) {
-            const SMDS_MeshElement* tmpPrm = Pyrams[aMergesJ.Value(k)];
-            SMDS_ElemIteratorPtr tmpIt = tmpPrm->nodesIterator();
-            vector< const SMDS_MeshNode* > Ns( tmpPrm->NbNodes() );
-            for ( int m = 0; m < Ns.size(); ++m )
-              Ns[m] = static_cast<const SMDS_MeshNode*>( tmpIt->next() );
-            Ns[4] = CommonNode;
-            meshDS->ChangeElementNodes(tmpPrm, &Ns[0], Ns.size());
-          }
 
-          // update MergesInfo
-          for(k=1; k<=nbI; k++) {
-            int num = aMergesI.Value(k);
-            TColStd_SequenceOfInteger& aSeq = MergesInfo.ChangeValue(num);
-            for(int m=1; m<=nbJ; m++)
-              aSeq.Append(aMergesJ.Value(m));
+        if ( nbc == 4 )
+          continue; // pyrams have a common base face
+
+        if(nbc>0)
+        {
+          // Merge the two pyramids and others already merged with them
+
+          // initialize merge info of pyramids
+          if ( pMergesI == MergesInfo.end() ) // first merge of PrmI
+          {
+            pMergesI = MergesInfo.insert( make_pair( PrmI, list<TPyram2Trias::iterator >())).first;
+            pMergesI->second.push_back( itPi );
           }
-          for(k=1; k<=nbJ; k++) {
-            int num = aMergesJ.Value(k);
-            TColStd_SequenceOfInteger& aSeq = MergesInfo.ChangeValue(num);
-            for(int m=1; m<=nbI; m++)
-              aSeq.Append(aMergesI.Value(m));
+          if ( pMergesJ == MergesInfo.end() ) // first merge of PrmJ
+          {
+            pMergesJ = MergesInfo.insert( make_pair( PrmJ, list<TPyram2Trias::iterator >())).first;
+            pMergesJ->second.push_back( itPj );
           }
+          int nbI = pMergesI->second.size(), nbJ = pMergesJ->second.size();
 
-          // update triangles for aMergesJ
-          for(k=1; k<=nbJ; k++) {
-            list< list< const SMDS_MeshNode* > > aFNodes;
-            list< const SMDS_MeshElement* > aFFaces;
-            int num = aMergesJ.Value(k);
-            map< const SMDS_MeshElement*,
-              list<const SMDS_FaceOfNodes*> >::iterator itrm = myResMap.find(Faces[num]);
-            list<const SMDS_FaceOfNodes*>& trias = itrm->second;
-            list<const SMDS_FaceOfNodes*>::iterator itt = trias.begin();
-            for(; itt!=trias.end(); itt++) {
-              SMDS_ElemIteratorPtr nodeIt = (*itt)->nodesIterator();
-              const SMDS_MeshNode* NF[3];
-              int nn = 0;
-              while ( nodeIt->more() )
-                NF[nn++] = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
-              NF[0] = CommonNode;
-              SMDS_FaceOfNodes* Ftria = const_cast< SMDS_FaceOfNodes*>( (*itt) );
-              Ftria->ChangeNodes(NF, 3);
+          // an apex node to make common to all merged pyramids
+          SMDS_MeshNode* CommonNode = const_cast<SMDS_MeshNode*>(PrmI->GetNode(4));
+          CommonNode->setXYZ( ( nbI*PsI[4].X() + nbJ*PsJ[4].X() ) / (nbI+nbJ),
+                              ( nbI*PsI[4].Y() + nbJ*PsJ[4].Y() ) / (nbI+nbJ),
+                              ( nbI*PsI[4].Z() + nbJ*PsJ[4].Z() ) / (nbI+nbJ) );
+          NeedMove = true;
+          const SMDS_MeshNode* Nrem = PrmJ->GetNode(4); // node to remove
+
+          list< TPyram2Trias::iterator >& aMergesI = pMergesI->second;
+          list< TPyram2Trias::iterator >& aMergesJ = pMergesJ->second;
+
+            // find and remove coincided faces of merged pyramids
+          list< TPyram2Trias::iterator >::iterator itPttI, itPttJ;
+          TTriaList::iterator trI, trJ;
+          for ( itPttI = aMergesI.begin(); itPttI != aMergesI.end(); ++itPttI )
+          {
+            TTriaList* triaListI = (*itPttI)->second;
+            for ( trI = triaListI->begin(); trI != triaListI->end(); )
+            {
+              const SMDS_FaceOfNodes* FI = *trI;
+
+              for ( itPttJ = aMergesJ.begin(); itPttJ != aMergesJ.end() && FI; ++itPttJ )
+              {
+                TTriaList* triaListJ = (*itPttJ)->second;
+                for ( trJ = triaListJ->begin(); trJ != triaListJ->end();  )
+                {
+                  const SMDS_FaceOfNodes* FJ = *trJ;
+
+                  if( EqualTriangles(FI,FJ) )
+                  {
+                    delete FI;
+                    delete FJ;
+                    FI = FJ = 0;
+                    trI = triaListI->erase( trI );
+                    trJ = triaListJ->erase( trJ ); 
+                    break; // only one triangle of a pyramid can coincide with another pyramid
+                  }
+                  ++trJ;
+                }
+              }
+              if ( FI ) ++trI; // increament if triangle not deleted
             }
           }
 
-          // check and remove coincided faces
-          //TColStd_SequenceOfInteger IdRemovedTrias;
-          int i1 = 1;
-          for(; i1<=nbI; i1++) {
-            int numI = aMergesI.Value(i1);
-            map< const SMDS_MeshElement*,
-              list<const SMDS_FaceOfNodes*> >::iterator itrmI = myResMap.find(Faces[numI]);
-            list<const SMDS_FaceOfNodes*>& triasI = (*itrmI).second;
-            list<const SMDS_FaceOfNodes*>::iterator ittI = triasI.begin();
-            int nbfI = triasI.size();
-            vector<const SMDS_FaceOfNodes*> FsI(nbfI);
-            k = 0;
-            for(; ittI!=triasI.end(); ittI++) {
-              FsI[k]  = (*ittI);
-              k++;
+          // set the common apex node to pyramids and triangles merged with J
+          for ( itPttJ = aMergesJ.begin(); itPttJ != aMergesJ.end(); ++itPttJ )
+          {
+            const SMDS_MeshElement* Prm = (*itPttJ)->first;
+            TTriaList*         triaList = (*itPttJ)->second;
+
+            vector< const SMDS_MeshNode* > nodes( Prm->begin_nodes(), Prm->end_nodes() );
+            nodes[4] = CommonNode;
+            meshDS->ChangeElementNodes( Prm, &nodes[0], nodes.size());
+
+            for ( TTriaList::iterator trIt = triaList->begin(); trIt != triaList->end(); ++trIt )
+            {
+              SMDS_FaceOfNodes* Ftria = const_cast< SMDS_FaceOfNodes*>( *trIt );
+              const SMDS_MeshNode* NF[3] = { CommonNode, Ftria->GetNode(1), Ftria->GetNode(2)};
+              Ftria->ChangeNodes(NF, 3);
             }
-            int i2 = 0;
-            for(; i2<nbfI; i2++) {
-              const SMDS_FaceOfNodes* FI = FsI[i2];
-              if(FI==0) continue;
-              int j1 = 1;
-              for(; j1<=nbJ; j1++) {
-                int numJ = aMergesJ.Value(j1);
-                map< const SMDS_MeshElement*,
-                  list<const SMDS_FaceOfNodes*> >::iterator itrmJ = myResMap.find(Faces[numJ]);
-                list<const SMDS_FaceOfNodes*>& triasJ = (*itrmJ).second;
-                list<const SMDS_FaceOfNodes*>::iterator ittJ = triasJ.begin();
-                int nbfJ = triasJ.size();
-                vector<const SMDS_FaceOfNodes*> FsJ(nbfJ);
-                k = 0;
-                for(; ittJ!=triasJ.end(); ittJ++) {
-                  FsJ[k]  = (*ittJ);
-                  k++;
-                }
-                int j2 = 0;
-                for(; j2<nbfJ; j2++) {
-                  const SMDS_FaceOfNodes* FJ = FsJ[j2];
-                  // compare triangles
-                  if( CompareTrias(FI,FJ) ) {
-                    //IdRemovedTrias.Append( FI->GetID() );
-                    //IdRemovedTrias.Append( FJ->GetID() );
-                    FsI[i2] = 0;
-                    FsJ[j2] = 0;
-                    list<const SMDS_FaceOfNodes*> new_triasI;
-                    for(k=0; k<nbfI; k++) {
-                      if( FsI[k]==0 ) continue;
-                      new_triasI.push_back( FsI[k] );
-                    }
-                    (*itrmI).second = new_triasI;
-                    triasI = new_triasI;
-                    list<const SMDS_FaceOfNodes*> new_triasJ;
-                    for(k=0; k<nbfJ; k++) {
-                      if( FsJ[k]==0 ) continue;
-                      new_triasJ.push_back( FsJ[k] );
-                    }
-                    (*itrmJ).second = new_triasJ;
-                    triasJ = new_triasJ;
-                    // remove faces
-                    delete FI;
-                    delete FJ;
-                    // close for j2 and j1
-                    j1 = nbJ;
-                    break;
-                  }
-                } // j2
-              } // j1
-            } // i2
-          } // i1
+          }
+
+          // join MergesInfo of merged pyramids
+          for ( k = 0, itPttI = aMergesI.begin(); k < nbI; ++itPttI, ++k )
+          {
+            const SMDS_MeshElement* PrmI = (*itPttI)->first;
+            list< TPyram2Trias::iterator >& merges = MergesInfo[ PrmI ];
+            merges.insert( merges.end(), aMergesJ.begin(), aMergesJ.end() );
+          }
+          for ( k = 0, itPttJ = aMergesJ.begin(); k < nbJ; ++itPttJ, ++k )
+          {
+            const SMDS_MeshElement* PrmJ = (*itPttJ)->first;
+            list< TPyram2Trias::iterator >& merges = MergesInfo[ PrmJ ];
+            merges.insert( merges.end(), aMergesI.begin(), aMergesI.end() );
+          }
+
           // removing node
           meshDS->RemoveNode(Nrem);
         }
         else { // nbc==0
-          //cout<<"decrease height of pyramids"<<endl;
+
           // decrease height of pyramids
-          double xc1 = 0., yc1 = 0., zc1 = 0.;
-          double xc2 = 0., yc2 = 0., zc2 = 0.;
+          gp_XYZ PC1(0,0,0), PC2(0,0,0);
           for(k=0; k<4; k++) {
-            xc1 += Ps1[k].X();
-            yc1 += Ps1[k].Y();
-            zc1 += Ps1[k].Z();
-            xc2 += Ps2[k].X();
-            yc2 += Ps2[k].Y();
-            zc2 += Ps2[k].Z();
+            PC1 += PsI[k].XYZ();
+            PC2 += PsJ[k].XYZ();
           }
-          gp_Pnt PC1(xc1/4.,yc1/4.,zc1/4.);
-          gp_Pnt PC2(xc2/4.,yc2/4.,zc2/4.);
-          gp_Vec VN1(PC1,Ps1[4]);
+          PC1 /= 4; PC2 /= 4; 
+          gp_Vec VN1(PC1,PsI[4]);
           gp_Vec VI1(PC1,Pint);
-          gp_Vec VN2(PC2,Ps2[4]);
+          gp_Vec VN2(PC2,PsJ[4]);
           gp_Vec VI2(PC2,Pint);
           double ang1 = fabs(VN1.Angle(VI1));
           double ang2 = fabs(VN2.Angle(VI2));
@@ -1048,61 +906,49 @@ bool StdMeshers_QuadToTriaAdaptor::Compute2ndPart(SMESH_Mesh& aMesh)
           if(ang2<PI/3)
             coef2 -= cos(ang1)*0.25;
 
-          SMDS_MeshNode* aNode1 = const_cast<SMDS_MeshNode*>(Ns1[4]);
           VN1.Scale(coef1);
-          aNode1->setXYZ( PC1.X()+VN1.X(), PC1.Y()+VN1.Y(), PC1.Z()+VN1.Z() );
-          SMDS_MeshNode* aNode2 = const_cast<SMDS_MeshNode*>(Ns2[4]);
           VN2.Scale(coef2);
+          SMDS_MeshNode* aNode1 = const_cast<SMDS_MeshNode*>(PrmI->GetNode(4));
+          aNode1->setXYZ( PC1.X()+VN1.X(), PC1.Y()+VN1.Y(), PC1.Z()+VN1.Z() );
+          SMDS_MeshNode* aNode2 = const_cast<SMDS_MeshNode*>(PrmJ->GetNode(4));
           aNode2->setXYZ( PC2.X()+VN2.X(), PC2.Y()+VN2.Y(), PC2.Z()+VN2.Z() );
           NeedMove = true;
         }
       } // end if(hasInt)
-      else {
-        //cout<<"    no intersec for i="<<i<<" j="<<j<<endl;
-      }
-
     }
-    if( NeedMove && !meshDS->IsEmbeddedMode() ) {
-      meshDS->MoveNode( Ns1[4], Ns1[4]->X(), Ns1[4]->Y(), Ns1[4]->Z() );
+    if( NeedMove && !meshDS->IsEmbeddedMode() )
+    {
+      const SMDS_MeshNode* apex = PrmI->GetNode( 4 );
+      meshDS->MoveNode( apex, apex->X(), apex->Y(), apex->Z() );
     }
   }
 
+  // rebind triangles of pyramids sharing the same base quadrangle to the first
+  // entrance of the base quadrangle
+  TQuad2Trias::iterator q2t = myResMap.begin(), q2tPrev = q2t;
+  for ( ++q2t; q2t != myResMap.end(); ++q2t, ++q2tPrev )
+  {
+    if ( q2t->first == q2tPrev->first )
+      q2tPrev->second.splice( q2tPrev->second.end(), q2t->second );
+  }
+
+  myPyram2Trias.clear(); // no more needed
+  myDegNodes.clear();
+
   return true;
 }
 
-
 //================================================================================
 /*!
  * \brief Return list of created triangles for given face
  */
 //================================================================================
-const list<const SMDS_FaceOfNodes*>* StdMeshers_QuadToTriaAdaptor::GetTriangles
-                                                   (const SMDS_MeshElement* aFace)
+
+const list<const SMDS_FaceOfNodes* >* StdMeshers_QuadToTriaAdaptor::GetTriangles (const SMDS_MeshElement* aQuad)
 {
-  map< const SMDS_MeshElement*,
-    list<const SMDS_FaceOfNodes*> >::iterator it = myResMap.find(aFace);
+  TQuad2Trias::iterator it = myResMap.find(aQuad);
   if( it != myResMap.end() ) {
     return & it->second;
   }
   return 0;
 }
-
-
-//================================================================================
-/*!
- * \brief Remove all create auxilary faces
- */
-//================================================================================
-//void StdMeshers_QuadToTriaAdaptor::RemoveFaces(SMESH_Mesh& aMesh)
-//{
-//  SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
-//  map< const SMDS_MeshElement*,
-//    list<const SMDS_MeshElement*> >::iterator it = myResMap.begin();
-//  for(; it != myResMap.end(); it++ ) {
-//    list<const SMDS_MeshElement*> aFaces = (*it).second;
-//    list<const SMDS_MeshElement*>::iterator itf = aFaces.begin();
-//    for(; itf!=aFaces.end(); itf++ ) {
-//      meshDS->RemoveElement( (*itf) );
-//    }
-//  }
-//}
index 89d747cbe00365a7e60ae89323accab7f6364c6d..79017c20d2420ae19524c08c52b6cd3592b3b28f 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_QuadToTriaAdaptor.hxx
 //  Module : SMESH
 #ifndef _SMESH_QuadToTriaAdaptor_HXX_
 #define _SMESH_QuadToTriaAdaptor_HXX_
 
-#include <SMESH_Mesh.hxx>
 #include "SMESH_StdMeshers.hxx"
-#include <SMDS_FaceOfNodes.hxx>
-#include <TColgp_HArray1OfPnt.hxx>
-#include <TColgp_HArray1OfVec.hxx>
+#include "SMDS_FaceOfNodes.hxx"
+
+class SMESH_Mesh;
+class SMDS_MeshElement;
+class SMDS_MeshNode;
+class Handle(TColgp_HArray1OfPnt);
+class Handle(TColgp_HArray1OfVec);
+class TopoDS_Shape;
+class gp_Pnt;
+class gp_Vec;
+
 
 #include <map>
 #include <list>
@@ -40,8 +45,6 @@ class STDMESHERS_EXPORT StdMeshers_QuadToTriaAdaptor
 {
 public:
 
-  StdMeshers_QuadToTriaAdaptor();
-
   ~StdMeshers_QuadToTriaAdaptor();
 
   bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape);
@@ -58,7 +61,8 @@ protected:
                   Handle(TColgp_HArray1OfPnt)& PN,
                   Handle(TColgp_HArray1OfVec)& VN,
                   std::vector<const SMDS_MeshNode*>& FNodes,
-                  gp_Pnt& PC, gp_Vec& VNorm);
+                  gp_Pnt& PC, gp_Vec& VNorm,
+                  const SMDS_MeshElement** volumes=0);
 
   bool CheckIntersection(const gp_Pnt& P, const gp_Pnt& PC,
                          gp_Pnt& Pint, SMESH_Mesh& aMesh,
@@ -67,10 +71,13 @@ protected:
 
   bool Compute2ndPart(SMESH_Mesh& aMesh);
 
-  typedef std::map< const SMDS_MeshElement*, const SMDS_MeshElement*, TIDCompare > TF2PyramMap;
+  typedef std::list<const SMDS_FaceOfNodes* >                        TTriaList;
+  typedef std::multimap<const SMDS_MeshElement*, TTriaList >         TQuad2Trias;
+  typedef std::map<const SMDS_MeshElement*, TTriaList *, TIDCompare> TPyram2Trias;
+
+  TQuad2Trias  myResMap;
+  TPyram2Trias myPyram2Trias;
 
-  std::map< const SMDS_MeshElement*, std::list<const SMDS_FaceOfNodes*> > myResMap;
-  TF2PyramMap myMapFPyram;
   std::list< const SMDS_MeshNode* > myDegNodes;
 
 };
index ad3fee841930d39fd272cfb01a26be4846f2e0ba..07cd7f6490082547f043684465691a301a93f193 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_QuadrangleParams.cxx
 //  Author : Sergey KUUL, OCC
@@ -48,7 +46,7 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_QuadrangleParams::StdMeshers_QuadrangleParams(int hypId, int studyId,
-                                                        SMESH_Gen * gen)
+                                                         SMESH_Gen * gen)
   :SMESH_Hypothesis(hypId, studyId, gen)
 {
   _name = "QuadrangleParams";
@@ -142,7 +140,7 @@ istream & operator >>(istream & load, StdMeshers_QuadrangleParams & hyp)
 //================================================================================
 
 bool StdMeshers_QuadrangleParams::SetParametersByMesh(const SMESH_Mesh* theMesh,
-                                                     const TopoDS_Shape& theShape)
+                                                      const TopoDS_Shape& theShape)
 {
   if ( !theMesh || theShape.IsNull() )
     return false;
@@ -158,7 +156,7 @@ bool StdMeshers_QuadrangleParams::SetParametersByMesh(const SMESH_Mesh* theMesh,
 //================================================================================
 
 bool StdMeshers_QuadrangleParams::SetParametersByDefaults(const TDefaults&  dflts,
-                                                         const SMESH_Mesh* /*mesh*/)
+                                                          const SMESH_Mesh* /*mesh*/)
 {
   return true;
 }
index ab1c56fabf32803b92be651073b590f067e920a0..da37f075558f96e9b9112996f9fcf0f4d6c63e06 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_QuadrangleParams.hxx
 //  Author : Sergey KUUL, OCC
@@ -52,9 +50,9 @@ public:
   virtual std::ostream & SaveTo(std::ostream & save);
   virtual std::istream & LoadFrom(std::istream & load);
   friend std::ostream& operator << (std::ostream & save,
-                                   StdMeshers_QuadrangleParams & hyp);
+                                    StdMeshers_QuadrangleParams & hyp);
   friend std::istream& operator >> (std::istream & load,
-                                   StdMeshers_QuadrangleParams & hyp);
+                                    StdMeshers_QuadrangleParams & hyp);
 
   /*!
    * \brief Initialize start and end length by the mesh built on the geometry
@@ -63,14 +61,14 @@ public:
     * \retval bool - true if parameter values have been successfully defined
    */
   virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh,
-                                  const TopoDS_Shape& theShape);
+                                   const TopoDS_Shape& theShape);
 
   /*!
    * \brief Initialize my parameter values by default parameters.
    *  \retval bool - true if parameter values have been successfully defined
    */
   virtual bool SetParametersByDefaults(const TDefaults& dflts,
-                                      const SMESH_Mesh* theMesh=0);
+                                       const SMESH_Mesh* theMesh=0);
 
 protected:
   int         _triaVertexID;
index cf3986e38a0070ece022db2a77fbec41a2d4de2b..81a2601a410607ca4425ae8ed6a18e8d8f860961 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers_QuadranglePreference : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_QuadranglePreference.cxx
 //  Module : SMESH
-
+//
 #include "StdMeshers_QuadranglePreference.hxx"
 #include "utilities.h"
 
index ec641d15a81e97c7307a2ed258f3af7486aaea15..24dcb7e5e962102b281765a98fef5d16503bc1e5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_QuadranglePreference.hxx
 //  Module : SMESH
-
+//
 #ifndef _StdMeshers_QuadranglePreference_HXX_
 #define _StdMeshers_QuadranglePreference_HXX_
 
index 5019156769d9747f0372e96d151feaf9c78e7b4c..5e2031c23bb0f37baca3f2bb72ce04404dd342d4 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Quadrangle_2D.cxx
 //           Moved here from SMESH_Quadrangle_2D.cxx
@@ -43,7 +44,6 @@
 #include "SMDS_EdgePosition.hxx"
 #include "SMDS_FacePosition.hxx"
 
-#include <BRepTools_WireExplorer.hxx>
 #include <BRep_Tool.hxx>
 #include <Geom_Surface.hxx>
 #include <NCollection_DefineArray2.hxx>
@@ -51,7 +51,9 @@
 #include <TColStd_SequenceOfReal.hxx>
 #include <TColgp_SequenceOfXY.hxx>
 #include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
 #include <TopoDS.hxx>
 
 #include "utilities.h"
@@ -773,14 +775,21 @@ FaceQuadStruct* StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &         aMes
 
   int nbSides = 0;
   list< TopoDS_Edge >::iterator edgeIt = edges.begin();
-  if ( nbEdgesInWire.front() == 3 ) { // exactly 3 edges
-    if(myTriaVertexID>0) {
-      SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
+  if ( nbEdgesInWire.front() == 3 ) // exactly 3 edges
+  {
+    SMESH_Comment comment;
+    SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
+    if ( myTriaVertexID == -1)
+    {
+      comment << "No Base vertex parameter provided for a trilateral geometrical face";
+    }
+    else
+    {
       TopoDS_Vertex V = TopoDS::Vertex(meshDS->IndexToShape(myTriaVertexID));
-      if(!V.IsNull()) {
+      if ( !V.IsNull() ) {
         TopoDS_Edge E1,E2,E3;
         for(; edgeIt != edges.end(); ++edgeIt) {
-          TopoDS_Edge E =  TopoDS::Edge(*edgeIt);
+          TopoDS_Edge E =  *edgeIt;
           TopoDS_Vertex VF, VL;
           TopExp::Vertices(E, VF, VL, true);
           if( VF.IsSame(V) )
@@ -790,22 +799,29 @@ FaceQuadStruct* StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &         aMes
           else
             E2 = E;
         }
-        quad->side.reserve(4);
-        quad->side.push_back( new StdMeshers_FaceSide(F, E1, &aMesh, true, ignoreMediumNodes));
-        quad->side.push_back( new StdMeshers_FaceSide(F, E2, &aMesh, true, ignoreMediumNodes));
-        quad->side.push_back( new StdMeshers_FaceSide(F, E3, &aMesh, false, ignoreMediumNodes));
-        std::vector<UVPtStruct> UVPSleft = quad->side[0]->GetUVPtStruct(true,0);
-        std::vector<UVPtStruct> UVPStop = quad->side[1]->GetUVPtStruct(false,1);
-        std::vector<UVPtStruct> UVPSright = quad->side[2]->GetUVPtStruct(true,1);
-        const SMDS_MeshNode* aNode = UVPSleft[0].node;
-        gp_Pnt2d aPnt2d( UVPSleft[0].u, UVPSleft[0].v );
-        StdMeshers_FaceSide* VertFS =
-          new StdMeshers_FaceSide(aNode, aPnt2d, quad->side[1]);
-        quad->side.push_back(VertFS);
-        return quad;
+        if ( !E1.IsNull() && !E2.IsNull() && !E3.IsNull() )
+        {
+          quad->side.push_back( new StdMeshers_FaceSide(F, E1, &aMesh, true, ignoreMediumNodes));
+          quad->side.push_back( new StdMeshers_FaceSide(F, E2, &aMesh, true, ignoreMediumNodes));
+          quad->side.push_back( new StdMeshers_FaceSide(F, E3, &aMesh, false,ignoreMediumNodes));
+          const vector<UVPtStruct>& UVPSleft  = quad->side[0]->GetUVPtStruct(true,0);
+          /*  vector<UVPtStruct>& UVPStop   = */quad->side[1]->GetUVPtStruct(false,1);
+          /*  vector<UVPtStruct>& UVPSright = */quad->side[2]->GetUVPtStruct(true,1);
+          const SMDS_MeshNode* aNode = UVPSleft[0].node;
+          gp_Pnt2d aPnt2d( UVPSleft[0].u, UVPSleft[0].v );
+          quad->side.push_back( new StdMeshers_FaceSide(aNode, aPnt2d, quad->side[1]));
+          return quad;
+        }
       }
+      comment << "Invalid Base vertex parameter: " << myTriaVertexID << " is not among [";
+      TopTools_MapOfShape vMap;
+      for ( TopExp_Explorer v( aShape, TopAbs_VERTEX ); v.More(); v.Next())
+        if ( vMap.Add( v.Current() ))
+          comment << meshDS->ShapeToIndex( v.Current() ) << ( vMap.Extent()==3 ? "]" : ", ");
     }
-    return 0;
+    error( comment );
+    delete quad;
+    return quad = 0;
   }
   else if ( nbEdgesInWire.front() == 4 ) { // exactly 4 edges
     for ( ; edgeIt != edges.end(); ++edgeIt, nbSides++ )
index 25083af3209aaac942148aaea84dcdbe57b94db0..74c64f6f087e2aa3c09de93c4f2f93103e013f78 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Quadrangle_2D.hxx
 //           Moved here from SMESH_Quadrangle_2D.hxx
@@ -63,13 +64,13 @@ public:
                                SMESH_Hypothesis::Hypothesis_Status& aStatus);
 
   virtual bool Compute(SMESH_Mesh& aMesh,
-                      const TopoDS_Shape& aShape);
+                       const TopoDS_Shape& aShape);
 
   virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
                         MapShapeNbElems& aResMap);
 
   FaceQuadStruct* CheckAnd2Dcompute(SMESH_Mesh& aMesh,
-                                   const TopoDS_Shape& aShape,
+                                    const TopoDS_Shape& aShape,
                                     const bool CreateQuadratic);
 
 protected:
@@ -78,14 +79,14 @@ protected:
                                const TopoDS_Shape& aShape);
 
   bool CheckNbEdgesForEvaluate(SMESH_Mesh& aMesh,
-                              const TopoDS_Shape & aShape,
-                              MapShapeNbElems& aResMap,
-                              std::vector<int>& aNbNodes,
+                               const TopoDS_Shape & aShape,
+                               MapShapeNbElems& aResMap,
+                               std::vector<int>& aNbNodes,
                                bool& IsQuadratic);
 
   bool SetNormalizedGrid(SMESH_Mesh& aMesh,
-                        const TopoDS_Shape& aShape,
-                        FaceQuadStruct*& quad);
+                         const TopoDS_Shape& aShape,
+                         FaceQuadStruct*& quad);
   
   void SplitQuad(SMESHDS_Mesh *theMeshDS,
                  const int theFaceID,
@@ -102,22 +103,22 @@ protected:
                        FaceQuadStruct* quad);
 
   bool EvaluateQuadPref(SMESH_Mesh& aMesh,
-                       const TopoDS_Shape& aShape,
-                       std::vector<int>& aNbNodes,
-                       MapShapeNbElems& aResMap,
+                        const TopoDS_Shape& aShape,
+                        std::vector<int>& aNbNodes,
+                        MapShapeNbElems& aResMap,
                         bool IsQuadratic);
 
   UVPtStruct* LoadEdgePoints2(SMESH_Mesh& aMesh,
-                             const TopoDS_Face& F, const TopoDS_Edge& E,
+                              const TopoDS_Face& F, const TopoDS_Edge& E,
                               bool IsReverse);
 
   UVPtStruct* LoadEdgePoints(SMESH_Mesh& aMesh,
-                            const TopoDS_Face& F, const TopoDS_Edge& E,
-                            double first, double last);
+                             const TopoDS_Face& F, const TopoDS_Edge& E,
+                             double first, double last);
 
   UVPtStruct* MakeEdgePoints(SMESH_Mesh& aMesh,
-                            const TopoDS_Face& F, const TopoDS_Edge& E,
-                            double first, double last, int nb_segm);
+                             const TopoDS_Face& F, const TopoDS_Edge& E,
+                             double first, double last, int nb_segm);
 
   // true if QuadranglePreference hypothesis is assigned that forces
   // construction of quadrangles if the number of nodes on opposite edges
index 4764356f25d99ba7fb22d9cf97f876d0369f4912..de6fe86529d3e79db619cd2280fadce08f177905 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers_QuadraticMesh : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_QuadraticMesh.cxx
 //  Module : SMESH
-
+//
 #include "StdMeshers_QuadraticMesh.hxx"
 #include "utilities.h"
 
index 9972469c0a3f08bb18eee894ae329f141f8991e3..ec43466b4e1eabe870fa324bd4c0ec8858c27a51 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_QuadraticMesh.hxx
 //  Module : SMESH
-
+//
 #ifndef _StdMeshers_QuadraticMesh_HXX_
 #define _StdMeshers_QuadraticMesh_HXX_
 
index fb6cc94e1a973bcd768a5edf3d9bff2747384873..c08c6b31ed216d5b43b975f456669c508c333183 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : StdMeshers_RadialPrism_3D.cxx
 // Module    : SMESH
@@ -71,7 +72,7 @@ StdMeshers_RadialPrism_3D::StdMeshers_RadialPrism_3D(int hypId, int studyId, SME
   :SMESH_3D_Algo(hypId, studyId, gen)
 {
   _name = "RadialPrism_3D";
-  _shapeType = (1 << TopAbs_SOLID);    // 1 bit per shape type
+  _shapeType = (1 << TopAbs_SOLID);     // 1 bit per shape type
 
   _compatibleHypothesis.push_back("LayerDistribution");
   _compatibleHypothesis.push_back("NumberOfLayers");
@@ -396,8 +397,8 @@ bool StdMeshers_RadialPrism_3D::computeLayerPositions(const gp_Pnt& pIn,
 //=======================================================================
 
 bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
-                                        const TopoDS_Shape& aShape,
-                                        MapShapeNbElems& aResMap)
+                                         const TopoDS_Shape& aShape,
+                                         MapShapeNbElems& aResMap)
 {
   // get 2 shells
   TopoDS_Solid solid = TopoDS::Solid( aShape );
index 21d8f8362fdcc4c1ae6249d9a20f6d5c4b566c6c..1d0b593756b76246a32020dc1f1a5863fd40dce8 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_RadialPrism_3D.hxx
 //  Module : SMESH
index 8d21195dbcebf9f0e134f2647215287fa16d7089..d03470fb341870b223f48e6922217376695d5753 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : StdMeshers_RadialQuadrangle_1D2D.cxx
 // Module    : SMESH
 //
 #include "StdMeshers_RadialQuadrangle_1D2D.hxx"
 
-//#include "StdMeshers_ProjectionUtils.hxx"
 #include "StdMeshers_NumberOfLayers.hxx"
 #include "StdMeshers_LayerDistribution.hxx"
-//#include "StdMeshers_Prism_3D.hxx"
 #include "StdMeshers_Regular_1D.hxx"
+#include "StdMeshers_NumberOfSegments.hxx"
 
 #include "SMDS_MeshNode.hxx"
 #include "SMESHDS_SubMesh.hxx"
 #include "SMESH_Gen.hxx"
+#include "SMESH_HypoFilter.hxx"
 #include "SMESH_Mesh.hxx"
 #include "SMESH_MesherHelper.hxx"
 #include "SMESH_subMesh.hxx"
@@ -53,6 +51,7 @@
 #include <TColgp_SequenceOfPnt.hxx>
 #include <TColgp_SequenceOfPnt2d.hxx>
 #include <TopExp_Explorer.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <TopoDS.hxx>
 
 
@@ -61,8 +60,6 @@ using namespace std;
 #define RETURN_BAD_RESULT(msg) { MESSAGE(")-: Error: " << msg); return false; }
 #define gpXYZ(n) gp_XYZ(n->X(),n->Y(),n->Z())
 
-//typedef StdMeshers_ProjectionUtils TAssocTool;
-
 
 //=======================================================================
 //function : StdMeshers_RadialQuadrangle_1D2D
@@ -82,6 +79,7 @@ StdMeshers_RadialQuadrangle_1D2D::StdMeshers_RadialQuadrangle_1D2D(int hypId,
   myNbLayerHypo = 0;
   myDistributionHypo = 0;
   _requireDescretBoundary = false;
+  _supportSubmeshes = true;
 }
 
 
@@ -113,8 +111,8 @@ bool StdMeshers_RadialQuadrangle_1D2D::CheckHypothesis
 
   const list <const SMESHDS_Hypothesis * >&hyps = GetUsedHypothesis(aMesh, aShape);
   if ( hyps.size() == 0 ) {
-    aStatus = SMESH_Hypothesis::HYP_MISSING;
-    return false;  // can't work with no hypothesis
+    aStatus = SMESH_Hypothesis::HYP_OK;
+    return true;  // can work with no hypothesis
   }
 
   if ( hyps.size() > 1 ) {
@@ -146,27 +144,42 @@ namespace
   /*!
    * \brief Listener used to mark edges meshed by StdMeshers_RadialQuadrangle_1D2D
    */
-  class TLinEdgeMarker : public SMESH_subMeshEventListener
+  class TEdgeMarker : public SMESH_subMeshEventListener
   {
-    TLinEdgeMarker(): SMESH_subMeshEventListener(/*isDeletable=*/false) {}
+    TEdgeMarker(): SMESH_subMeshEventListener(/*isDeletable=*/false) {}
   public:
+    //!<  Return static listener
     static SMESH_subMeshEventListener* getListener()
     {
-      static TLinEdgeMarker theEdgeMarker;
+      static TEdgeMarker theEdgeMarker;
       return &theEdgeMarker;
     }
+    //! Clear face sumbesh if something happens on edges
+    void ProcessEvent(const int          event,
+                      const int          eventType,
+                      SMESH_subMesh*     edgeSubMesh,
+                      EventListenerData* data,
+                      const SMESH_Hypothesis*  /*hyp*/)
+    {
+      if ( data && !data->mySubMeshes.empty() && eventType == SMESH_subMesh::ALGO_EVENT)
+      {
+        ASSERT( data->mySubMeshes.front() != edgeSubMesh );
+        SMESH_subMesh* faceSubMesh = data->mySubMeshes.front();
+        faceSubMesh->ComputeStateEngine( SMESH_subMesh::CLEAN );
+      }
+    }
   };
-  
+
   // ------------------------------------------------------------------------------
   /*!
    * \brief Mark an edge as computed by StdMeshers_RadialQuadrangle_1D2D
    */
-  void markLinEdgeAsComputedByMe(const TopoDS_Edge& edge, SMESH_subMesh* faceSubMesh)
+  void markEdgeAsComputedByMe(const TopoDS_Edge& edge, SMESH_subMesh* faceSubMesh)
   {
     if ( SMESH_subMesh* edgeSM = faceSubMesh->GetFather()->GetSubMeshContaining( edge ))
     {
-      if ( !edgeSM->GetEventListenerData( TLinEdgeMarker::getListener() ))
-        faceSubMesh->SetEventListener( TLinEdgeMarker::getListener(),
+      if ( !edgeSM->GetEventListenerData( TEdgeMarker::getListener() ))
+        faceSubMesh->SetEventListener( TEdgeMarker::getListener(),
                                        SMESH_subMeshEventListenerData::MakeData(faceSubMesh),
                                        edgeSM);
     }
@@ -176,38 +189,30 @@ namespace
    * \brief Return true if a radial edge was meshed with StdMeshers_RadialQuadrangle_1D2D with
    * the same radial distribution
    */
-  bool isEdgeCompitaballyMeshed(const TopoDS_Edge& edge, SMESH_subMesh* faceSubMesh)
-  {
-    if ( SMESH_subMesh* edgeSM = faceSubMesh->GetFather()->GetSubMeshContaining( edge ))
-    {
-      if ( SMESH_subMeshEventListenerData* otherFaceData =
-           edgeSM->GetEventListenerData( TLinEdgeMarker::getListener() ))
-      {
-        // compare hypothesis aplied to two disk faces sharing radial edges
-        SMESH_Mesh& mesh = *faceSubMesh->GetFather();
-        SMESH_Algo* radialQuadAlgo = mesh.GetGen()->GetAlgo(mesh, faceSubMesh->GetSubShape() );
-        SMESH_subMesh* otherFaceSubMesh = otherFaceData->mySubMeshes.front();
-        const list <const SMESHDS_Hypothesis *> & hyps1 =
-          radialQuadAlgo->GetUsedHypothesis( mesh, faceSubMesh->GetSubShape());
-        const list <const SMESHDS_Hypothesis *> & hyps2 =
-          radialQuadAlgo->GetUsedHypothesis( mesh, otherFaceSubMesh->GetSubShape());
-        if( hyps1.empty() && hyps2.empty() )
-          return true; // defaul hyps
-        if ( hyps1.size() != hyps2.size() ||
-             strcmp( hyps1.front()->GetName(), hyps2.front()->GetName() ))
-          return false;
-        ostringstream hypDump1, hypDump2;
-        list <const SMESHDS_Hypothesis*>::const_iterator hyp1 = hyps1.begin();
-        for ( ; hyp1 != hyps1.end(); ++hyp1 )
-          const_cast<SMESHDS_Hypothesis*>(*hyp1)->SaveTo( hypDump1 );
-        list <const SMESHDS_Hypothesis*>::const_iterator hyp2 = hyps2.begin();
-        for ( ; hyp2 != hyps2.end(); ++hyp2 )
-          const_cast<SMESHDS_Hypothesis*>(*hyp2)->SaveTo( hypDump2 );
-        return hypDump1.str() == hypDump2.str();
-      }
-    }
-    return false;
-  }
+//   bool isEdgeCompatiballyMeshed(const TopoDS_Edge& edge, SMESH_subMesh* faceSubMesh)
+//   {
+//     if ( SMESH_subMesh* edgeSM = faceSubMesh->GetFather()->GetSubMeshContaining( edge ))
+//     {
+//       if ( SMESH_subMeshEventListenerData* otherFaceData =
+//            edgeSM->GetEventListenerData( TEdgeMarker::getListener() ))
+//       {
+//         // compare hypothesis aplied to two disk faces sharing radial edges
+//         SMESH_Mesh& mesh = *faceSubMesh->GetFather();
+//         SMESH_Algo* radialQuadAlgo = mesh.GetGen()->GetAlgo(mesh, faceSubMesh->GetSubShape() );
+//         SMESH_subMesh* otherFaceSubMesh = otherFaceData->mySubMeshes.front();
+//         list <const SMESHDS_Hypothesis *> hyps1 =
+//           radialQuadAlgo->GetUsedHypothesis( mesh, faceSubMesh->GetSubShape());
+//         list <const SMESHDS_Hypothesis *> hyps2 =
+//           radialQuadAlgo->GetUsedHypothesis( mesh, otherFaceSubMesh->GetSubShape());
+//         if( hyps1.empty() && hyps2.empty() )
+//           return true; // defaul hyps
+//         if ( hyps1.size() != hyps2.size() )
+//           return false;
+//         return *hyps1.front() == *hyps2.front();
+//       }
+//     }
+//     return false;
+//   }
 
   //================================================================================
   /*!
@@ -273,6 +278,123 @@ namespace
     }
     return nbe;
   }
+
+//================================================================================
+//================================================================================
+/*!
+ * \brief Class computing layers distribution using data of
+ *        StdMeshers_LayerDistribution hypothesis
+ */
+//================================================================================
+//================================================================================
+
+class TNodeDistributor: public StdMeshers_Regular_1D
+{
+  list <const SMESHDS_Hypothesis *> myUsedHyps;
+public:
+  // -----------------------------------------------------------------------------
+  static TNodeDistributor* GetDistributor(SMESH_Mesh& aMesh)
+  {
+    const int myID = -1000;
+    map < int, SMESH_1D_Algo * > & algoMap = aMesh.GetGen()->_map1D_Algo;
+    map < int, SMESH_1D_Algo * >::iterator id_algo = algoMap.find( myID );
+    if ( id_algo == algoMap.end() )
+      return new TNodeDistributor( myID, 0, aMesh.GetGen() );
+    return static_cast< TNodeDistributor* >( id_algo->second );
+  }
+  // -----------------------------------------------------------------------------
+  //! Computes distribution of nodes on a straight line ending at pIn and pOut
+  bool Compute( vector< double > &      positions,
+                gp_Pnt                  pIn,
+                gp_Pnt                  pOut,
+                SMESH_Mesh&             aMesh,
+                const SMESH_Hypothesis* hyp1d)
+  {
+    if ( !hyp1d ) return error( "Invalid LayerDistribution hypothesis");
+
+    double len = pIn.Distance( pOut );
+    if ( len <= DBL_MIN ) return error("Too close points of inner and outer shells");
+
+    myUsedHyps.clear();
+    myUsedHyps.push_back( hyp1d );
+
+    TopoDS_Edge edge = BRepBuilderAPI_MakeEdge( pIn, pOut );
+    SMESH_Hypothesis::Hypothesis_Status aStatus;
+    if ( !StdMeshers_Regular_1D::CheckHypothesis( aMesh, edge, aStatus ))
+      return error( "StdMeshers_Regular_1D::CheckHypothesis() failed "
+                    "with LayerDistribution hypothesis");
+
+    BRepAdaptor_Curve C3D(edge);
+    double f = C3D.FirstParameter(), l = C3D.LastParameter();
+    list< double > params;
+    if ( !StdMeshers_Regular_1D::computeInternalParameters( aMesh, C3D, len, f, l, params, false ))
+      return error("StdMeshers_Regular_1D failed to compute layers distribution");
+
+    positions.clear();
+    positions.reserve( params.size() );
+    for (list<double>::iterator itU = params.begin(); itU != params.end(); itU++)
+      positions.push_back( *itU / len );
+    return true;
+  }
+  // -----------------------------------------------------------------------------
+  //! Make mesh on an adge using assigned 1d hyp or defaut nb of segments
+  bool ComputeCircularEdge(SMESH_Mesh&         aMesh,
+                           const TopoDS_Edge& anEdge)
+  {
+    _gen->Compute( aMesh, anEdge);
+    SMESH_subMesh *sm = aMesh.GetSubMesh(anEdge);
+    if ( sm->GetComputeState() != SMESH_subMesh::COMPUTE_OK)
+    {
+      // find any 1d hyp assigned (there can be a hyp w/o algo)
+      myUsedHyps = SMESH_Algo::GetUsedHypothesis(aMesh, anEdge, /*ignoreAux=*/true);
+      Hypothesis_Status aStatus;
+      if ( !StdMeshers_Regular_1D::CheckHypothesis( aMesh, anEdge, aStatus ))
+      {
+        // no valid 1d hyp assigned, use default nb of segments
+        _hypType                    = NB_SEGMENTS;
+        _ivalue[ DISTR_TYPE_IND ]   = StdMeshers_NumberOfSegments::DT_Regular;
+        _ivalue[ NB_SEGMENTS_IND  ] = _gen->GetDefaultNbSegments();
+      }
+      return StdMeshers_Regular_1D::Compute( aMesh, anEdge );
+    }
+    return true;
+  }
+  // -----------------------------------------------------------------------------
+  //! Make mesh on an adge using assigned 1d hyp or defaut nb of segments
+  bool EvaluateCircularEdge(SMESH_Mesh&        aMesh,
+                            const TopoDS_Edge& anEdge,
+                            MapShapeNbElems&   aResMap)
+  {
+    _gen->Evaluate( aMesh, anEdge, aResMap );
+    if ( aResMap.count( aMesh.GetSubMesh( anEdge )))
+      return true;
+
+    // find any 1d hyp assigned
+    myUsedHyps = SMESH_Algo::GetUsedHypothesis(aMesh, anEdge, /*ignoreAux=*/true);
+    Hypothesis_Status aStatus;
+    if ( !StdMeshers_Regular_1D::CheckHypothesis( aMesh, anEdge, aStatus ))
+    {
+      // no valid 1d hyp assigned, use default nb of segments
+      _hypType                    = NB_SEGMENTS;
+      _ivalue[ DISTR_TYPE_IND ]   = StdMeshers_NumberOfSegments::DT_Regular;
+      _ivalue[ NB_SEGMENTS_IND  ] = _gen->GetDefaultNbSegments();
+    }
+    return StdMeshers_Regular_1D::Evaluate( aMesh, anEdge, aResMap );
+  }
+protected:
+  // -----------------------------------------------------------------------------
+  TNodeDistributor( int hypId, int studyId, SMESH_Gen* gen)
+    : StdMeshers_Regular_1D( hypId, studyId, gen)
+  {
+  }
+  // -----------------------------------------------------------------------------
+  virtual const list <const SMESHDS_Hypothesis *> &
+    GetUsedHypothesis(SMESH_Mesh &, const TopoDS_Shape &, const bool)
+  {
+    return myUsedHyps;
+  }
+  // -----------------------------------------------------------------------------
+};
 }
 
 //=======================================================================
@@ -280,7 +402,7 @@ namespace
  * \brief Allow algo to do something after persistent restoration
  * \param subMesh - restored submesh
  *
- * call markLinEdgeAsComputedByMe()
+ * call markEdgeAsComputedByMe()
  */
 //=======================================================================
 
@@ -290,8 +412,9 @@ void StdMeshers_RadialQuadrangle_1D2D::SubmeshRestored(SMESH_subMesh* faceSubMes
   {
     TopoDS_Edge CircEdge, LinEdge1, LinEdge2;
     analyseFace( faceSubMesh->GetSubShape(), CircEdge, LinEdge1, LinEdge2 );
-    if ( !LinEdge1.IsNull() ) markLinEdgeAsComputedByMe( LinEdge1, faceSubMesh );
-    if ( !LinEdge2.IsNull() ) markLinEdgeAsComputedByMe( LinEdge2, faceSubMesh );
+    if ( !CircEdge.IsNull() ) markEdgeAsComputedByMe( CircEdge, faceSubMesh );
+    if ( !LinEdge1.IsNull() ) markEdgeAsComputedByMe( LinEdge1, faceSubMesh );
+    if ( !LinEdge2.IsNull() ) markEdgeAsComputedByMe( LinEdge2, faceSubMesh );
   }
 }
 
@@ -311,14 +434,15 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
   // to delete helper at exit from Compute()
   auto_ptr<SMESH_MesherHelper> helperDeleter( myHelper );
 
-  myLayerPositions.clear();
+  TNodeDistributor* algo1d = TNodeDistributor::GetDistributor(aMesh);
 
   TopoDS_Edge CircEdge, LinEdge1, LinEdge2;
   int nbe = analyseFace( aShape, CircEdge, LinEdge1, LinEdge2 );
-  if( nbe>3 || nbe < 1 || CircEdge.IsNull() )
-    return error(COMPERR_BAD_SHAPE);
+  Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast( getCurve( CircEdge ));
+  if( nbe>3 || nbe < 1 || aCirc.IsNull() )
+    return error("The face must be a full circle or a part of circle (i.e. the number of edges is less or equal to 3 and one of them is a circle curve)");
   
-  gp_Pnt P0,P1;
+  gp_Pnt P0, P1;
   // points for rotation
   TColgp_SequenceOfPnt Points;
   // angles for rotation
@@ -335,15 +459,14 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
   TopoDS_Face F = TopoDS::Face(aShape);
   Handle(Geom_Surface) S = BRep_Tool::Surface(F);
 
+
   if(nbe==1)
   {
-    Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast( getCurve( CircEdge ));
-
-    bool ok = _gen->Compute( aMesh, CircEdge );
-    if( !ok ) return false;
+    if (!algo1d->ComputeCircularEdge( aMesh, CircEdge ))
+      return error( algo1d->GetComputeError() );
     map< double, const SMDS_MeshNode* > theNodes;
-    ok = GetSortedNodesOnEdge(aMesh.GetMeshDS(),CircEdge,true,theNodes);
-    if( !ok ) return false;
+    if ( !GetSortedNodesOnEdge(aMesh.GetMeshDS(),CircEdge,true,theNodes))
+      return error("Circular edge is incorrectly meshed");
 
     CNodes.clear();
     map< double, const SMDS_MeshNode* >::iterator itn = theNodes.begin();
@@ -363,8 +486,8 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
     P1 = gp_Pnt( NF->X(), NF->Y(), NF->Z() );
     P0 = aCirc->Location();
 
-    myLayerPositions.clear();
-    computeLayerPositions(P0,P1);
+    if ( !computeLayerPositions(P0,P1))
+      return false;
 
     exp.Init( CircEdge, TopAbs_VERTEX );
     TopoDS_Vertex V1 = TopoDS::Vertex( exp.Current() );
@@ -413,22 +536,16 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
       // other curve not line
       return error(COMPERR_BAD_SHAPE);
     }
-    bool linEdgeComputed = false;
-    if( SMESH_subMesh* sm1 = aMesh.GetSubMesh(LinEdge1) ) {
-      if( !sm1->IsEmpty() )
-        if( isEdgeCompitaballyMeshed( LinEdge1, aMesh.GetSubMesh(F) ))
-          linEdgeComputed = true;
-        else
-          return error("Invalid set of hypotheses");
-    }
 
-    bool ok = _gen->Compute( aMesh, CircEdge );
-    if( !ok ) return false;
+    if ( !algo1d->ComputeCircularEdge( aMesh, CircEdge ))
+      return error( algo1d->GetComputeError() );
     map< double, const SMDS_MeshNode* > theNodes;
-    GetSortedNodesOnEdge(aMesh.GetMeshDS(),CircEdge,true,theNodes);
+    if ( !GetSortedNodesOnEdge(aMesh.GetMeshDS(),CircEdge,true,theNodes) )
+      return error("Circular edge is incorrectly meshed");
 
-    CNodes.clear();
     map< double, const SMDS_MeshNode* >::iterator itn = theNodes.begin();
+    CNodes.clear();
+    CNodes.push_back( itn->second );
     double fang = (*itn).first;
     itn++;
     for(; itn != theNodes.end(); itn++ ) {
@@ -440,13 +557,13 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
     }
     const SMDS_MeshNode* NF = theNodes.begin()->second;
     const SMDS_MeshNode* NL = theNodes.rbegin()->second;
-    CNodes.push_back( NF );
     P1 = gp_Pnt( NF->X(), NF->Y(), NF->Z() );
     gp_Pnt P2( NL->X(), NL->Y(), NL->Z() );
     P0 = aCirc->Location();
 
-    myLayerPositions.clear();
-    computeLayerPositions(P0,P1);
+    bool linEdgeComputed;
+    if ( !computeLayerPositions(P0,P1,LinEdge1,&linEdgeComputed))
+      return false;
 
     if ( linEdgeComputed )
     {
@@ -537,7 +654,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
         SMDS_MeshEdge* ME = myHelper->AddEdge( tmpNodes[i-1], tmpNodes[i] );
         if(ME) meshDS->SetMeshElementOnShape(ME, edgeID);
       }
-      markLinEdgeAsComputedByMe( LinEdge1, aMesh.GetSubMesh( F ));
+      markEdgeAsComputedByMe( LinEdge1, aMesh.GetSubMesh( F ));
     }
   }
   else // nbe==3 or ( nbe==2 && linEdge is INTERNAL )
@@ -549,33 +666,16 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
     // segments of line
     double fp, lp;
     Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast( getCurve( CircEdge ));
-    Handle(Geom_Line) aLine1 = Handle(Geom_Line)::DownCast( getCurve( LinEdge1 ));
-    Handle(Geom_Line) aLine2 = Handle(Geom_Line)::DownCast( getCurve( LinEdge2 ));
-    if( aLine1.IsNull() || aLine2.IsNull() ) {
-      // other curve not line
+    Handle(Geom_Line)  aLine1 = Handle(Geom_Line)::DownCast( getCurve( LinEdge1 ));
+    Handle(Geom_Line)  aLine2 = Handle(Geom_Line)::DownCast( getCurve( LinEdge2 ));
+    if( aCirc.IsNull() || aLine1.IsNull() || aLine2.IsNull() )
       return error(COMPERR_BAD_SHAPE);
-    }
-
-    bool linEdge1Computed = false;
-    if ( SMESH_subMesh* sm1 = aMesh.GetSubMesh(LinEdge1))
-      if( !sm1->IsEmpty() )
-        if( isEdgeCompitaballyMeshed( LinEdge1, aMesh.GetSubMesh(F) ))
-          linEdge1Computed = true;
-        else
-          return error("Invalid set of hypotheses");
-
-    bool linEdge2Computed = false;
-    if ( SMESH_subMesh* sm2 = aMesh.GetSubMesh(LinEdge2))
-      if( !sm2->IsEmpty() )
-        if( isEdgeCompitaballyMeshed( LinEdge2, aMesh.GetSubMesh(F)  ))
-          linEdge2Computed = true;
-        else
-          return error("Invalid set of hypotheses");
 
-    bool ok = _gen->Compute( aMesh, CircEdge );
-    if( !ok ) return false;
+    if ( !algo1d->ComputeCircularEdge( aMesh, CircEdge ))
+      return error( algo1d->GetComputeError() );
     map< double, const SMDS_MeshNode* > theNodes;
-    GetSortedNodesOnEdge(aMesh.GetMeshDS(),CircEdge,true,theNodes);
+    if ( !GetSortedNodesOnEdge(aMesh.GetMeshDS(),CircEdge,true,theNodes))
+      return error("Circular edge is incorrectly meshed");
 
     const SMDS_MeshNode* NF = theNodes.begin()->second;
     const SMDS_MeshNode* NL = theNodes.rbegin()->second;
@@ -595,12 +695,19 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
     gp_Pnt P2( NL->X(), NL->Y(), NL->Z() );
     P0 = aCirc->Location();
 
-    myLayerPositions.clear();
-    computeLayerPositions(P0,P1);
+    bool linEdge1Computed, linEdge2Computed;
+    if ( !computeLayerPositions(P0,P1,LinEdge1,&linEdge1Computed))
+      return false;
 
     Nodes1.resize( myLayerPositions.size()+1 );
     Nodes2.resize( myLayerPositions.size()+1 );
 
+    // check that both linear edges have same hypotheses
+    if ( !computeLayerPositions(P0,P1,LinEdge2, &linEdge2Computed))
+         return false;
+    if ( Nodes1.size() != myLayerPositions.size()+1 )
+      return error("Different hypotheses apply to radial edges");
+
     exp.Init( LinEdge1, TopAbs_VERTEX );
     TopoDS_Vertex V1 = TopoDS::Vertex( exp.Current() );
     exp.Next();
@@ -701,7 +808,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
       if (nbe==2 && LinEdge1.Orientation() == TopAbs_INTERNAL )
         Nodes2 = Nodes1;
     }
-    markLinEdgeAsComputedByMe( LinEdge1, aMesh.GetSubMesh( F ));
+    markEdgeAsComputedByMe( LinEdge1, aMesh.GetSubMesh( F ));
 
     // LinEdge2
     if ( linEdge2Computed )
@@ -765,8 +872,9 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
         if(ME) meshDS->SetMeshElementOnShape(ME, edgeID);
       }
     }
-    markLinEdgeAsComputedByMe( LinEdge2, aMesh.GetSubMesh( F ));
+    markEdgeAsComputedByMe( LinEdge2, aMesh.GetSubMesh( F ));
   }
+  markEdgeAsComputedByMe( CircEdge, aMesh.GetSubMesh( F ));
 
   // orientation
   bool IsForward = ( CircEdge.Orientation()==TopAbs_FORWARD );
@@ -850,106 +958,103 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh&         aMesh,
   return true;
 }
 
-
-//================================================================================
 //================================================================================
 /*!
- * \brief Class computing layers distribution using data of
*        StdMeshers_LayerDistribution hypothesis
+ * \brief Compute positions of nodes on the radial edge
 * \retval bool - is a success
  */
 //================================================================================
-//================================================================================
 
-class TNodeDistributor: public StdMeshers_Regular_1D
+bool StdMeshers_RadialQuadrangle_1D2D::computeLayerPositions(const gp_Pnt&      p1,
+                                                             const gp_Pnt&      p2,
+                                                             const TopoDS_Edge& linEdge,
+                                                             bool*              linEdgeComputed)
 {
-  list <const SMESHDS_Hypothesis *> myUsedHyps;
-public:
-  // -----------------------------------------------------------------------------
-  static TNodeDistributor* GetDistributor(SMESH_Mesh& aMesh)
-  {
-    const int myID = -1000;
-    map < int, SMESH_1D_Algo * > & algoMap = aMesh.GetGen()->_map1D_Algo;
-    map < int, SMESH_1D_Algo * >::iterator id_algo = algoMap.find( myID );
-    if ( id_algo == algoMap.end() )
-      return new TNodeDistributor( myID, 0, aMesh.GetGen() );
-    return static_cast< TNodeDistributor* >( id_algo->second );
-  }
-  // -----------------------------------------------------------------------------
-  bool Compute( vector< double > &                  positions,
-                gp_Pnt                              pIn,
-                gp_Pnt                              pOut,
-                SMESH_Mesh&                         aMesh,
-                const StdMeshers_LayerDistribution* hyp)
-  {
-    double len = pIn.Distance( pOut );
-    if ( len <= DBL_MIN ) return error("Too close points of inner and outer shells");
+  // First, try to compute positions of layers
 
-    if ( !hyp || !hyp->GetLayerDistribution() )
-      return error( "Invalid LayerDistribution hypothesis");
-    myUsedHyps.clear();
-    myUsedHyps.push_back( hyp->GetLayerDistribution() );
+  myLayerPositions.clear();
 
-    TopoDS_Edge edge = BRepBuilderAPI_MakeEdge( pIn, pOut );
-    SMESH_Hypothesis::Hypothesis_Status aStatus;
-    if ( !StdMeshers_Regular_1D::CheckHypothesis( aMesh, edge, aStatus ))
-      return error( "StdMeshers_Regular_1D::CheckHypothesis() failed "
-                    "with LayerDistribution hypothesis");
+  SMESH_Mesh * mesh = myHelper->GetMesh();
 
-    BRepAdaptor_Curve C3D(edge);
-    double f = C3D.FirstParameter(), l = C3D.LastParameter();
-    list< double > params;
-    if ( !StdMeshers_Regular_1D::computeInternalParameters( aMesh, C3D, len, f, l, params, false ))
-      return error("StdMeshers_Regular_1D failed to compute layers distribution");
+  const SMESH_Hypothesis* hyp1D = myDistributionHypo ? myDistributionHypo->GetLayerDistribution() : 0;
+  int                  nbLayers = myNbLayerHypo ? myNbLayerHypo->GetNumberOfLayers() : 0;
 
-    positions.clear();
-    positions.reserve( params.size() );
-    for (list<double>::iterator itU = params.begin(); itU != params.end(); itU++)
-      positions.push_back( *itU / len );
-    return true;
+  if ( !hyp1D && !nbLayers )
+  {
+    // No own algo hypotheses assigned, so first try to find any 1D hypothesis.
+    // We need some edge
+    TopoDS_Shape edge = linEdge;
+    if ( edge.IsNull() && !myHelper->GetSubShape().IsNull())
+      for ( TopExp_Explorer e(myHelper->GetSubShape(), TopAbs_EDGE); e.More(); e.Next())
+        edge = e.Current();
+    if ( !edge.IsNull() )
+    {
+      // find a hyp usable by TNodeDistributor
+      SMESH_HypoFilter hypKind;
+      TNodeDistributor::GetDistributor(*mesh)->InitCompatibleHypoFilter(hypKind,/*ignoreAux=*/1);
+      hyp1D = mesh->GetHypothesis( edge, hypKind, /*fromAncestors=*/true);
+    }
   }
-protected:
-  // -----------------------------------------------------------------------------
-  TNodeDistributor( int hypId, int studyId, SMESH_Gen* gen)
-    : StdMeshers_Regular_1D( hypId, studyId, gen)
+  if ( hyp1D ) // try to compute with hyp1D
   {
+    if ( !TNodeDistributor::GetDistributor(*mesh)->Compute( myLayerPositions,p1,p2,*mesh,hyp1D ))
+      if ( myDistributionHypo ) { // bad hyp assigned 
+        return error( TNodeDistributor::GetDistributor(*mesh)->GetComputeError() );
+      }
+      else {
+        // bad hyp found, its Ok, lets try with default nb of segnents
+      }
   }
-  // -----------------------------------------------------------------------------
-  virtual const list <const SMESHDS_Hypothesis *> &
-    GetUsedHypothesis(SMESH_Mesh &, const TopoDS_Shape &, const bool)
+  
+  if ( myLayerPositions.empty() ) // try to use nb of layers
   {
-    return myUsedHyps;
+    if ( !nbLayers )
+      nbLayers = _gen->GetDefaultNbSegments();
+
+    if ( nbLayers )
+    {
+      myLayerPositions.resize( nbLayers - 1 );
+      for ( int z = 1; z < nbLayers; ++z )
+        myLayerPositions[ z - 1 ] = double( z )/ double( nbLayers );
+    }
   }
-  // -----------------------------------------------------------------------------
-};
 
-//================================================================================
-/*!
- * \brief Compute positions of nodes between the internal and the external surfaces
-  * \retval bool - is a success
- */
-//================================================================================
+  // Second, check presence of a mesh built by other algo on linEdge
+  // and mesh conformity to my hypothesis
 
-bool StdMeshers_RadialQuadrangle_1D2D::computeLayerPositions(const gp_Pnt& pIn,
-                                                             const gp_Pnt& pOut)
-{
-  if ( myNbLayerHypo )
+  bool meshComputed = (!linEdge.IsNull() && !mesh->GetSubMesh(linEdge)->IsEmpty() );
+  if ( linEdgeComputed ) *linEdgeComputed = meshComputed;
+
+  if ( meshComputed )
   {
-    int nbSegments = myNbLayerHypo->GetNumberOfLayers();
-    myLayerPositions.resize( nbSegments - 1 );
-    for ( int z = 1; z < nbSegments; ++z )
-      myLayerPositions[ z - 1 ] = double( z )/ double( nbSegments );
-    return true;
-  }
-  if ( myDistributionHypo ) {
-    SMESH_Mesh * mesh = myHelper->GetMesh();
-    if ( !TNodeDistributor::GetDistributor(*mesh)->Compute( myLayerPositions, pIn, pOut,
-                                                            *mesh, myDistributionHypo ))
+    vector< double > nodeParams;
+    GetNodeParamOnEdge( mesh->GetMeshDS(), linEdge, nodeParams );
+
+    if ( myLayerPositions.empty() )
     {
-      error( TNodeDistributor::GetDistributor(*mesh)->GetComputeError() );
-      return false;
+      myLayerPositions.resize( nodeParams.size() - 2 );
+    }
+    else if ( myDistributionHypo || myNbLayerHypo )
+    {
+      // linEdge is computed by other algo. Check if there is a meshed face
+      // using nodes on linEdge
+      bool nodesAreUsed = false;
+      TopTools_ListIteratorOfListOfShape ancestIt = mesh->GetAncestors( linEdge );
+      for ( ; ancestIt.More() && !nodesAreUsed; ancestIt.Next() )
+        if ( ancestIt.Value().ShapeType() == TopAbs_FACE )
+          nodesAreUsed = (!mesh->GetSubMesh( ancestIt.Value() )->IsEmpty());
+      if ( !nodesAreUsed ) {
+        // rebuild them
+        mesh->GetSubMesh( linEdge )->ComputeStateEngine( SMESH_subMesh::CLEAN );
+        if ( linEdgeComputed ) *linEdgeComputed = false;
+      }
+      else if ( myLayerPositions.size() != nodeParams.size()-2 ) {
+        return error("Radial edge is meshed by other algorithm");
+      }
     }
   }
-  RETURN_BAD_RESULT("Bad hypothesis");
+
+  return !myLayerPositions.empty();
 }
 
 
@@ -965,113 +1070,82 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
   if( aShape.ShapeType() != TopAbs_FACE ) {
     return false;
   }
-  SMESH_subMesh * smf = aMesh.GetSubMesh(aShape);
-  MapShapeNbElemsItr anIt = aResMap.find(smf);
-  if( anIt != aResMap.end() ) {
+  SMESH_subMesh * sm = aMesh.GetSubMesh(aShape);
+  if( aResMap.count(sm) )
     return false;
-  }
 
-  myLayerPositions.clear();
-  gp_Pnt P0(0,0,0);
-  gp_Pnt P1(100,0,0);
-  computeLayerPositions(P0,P1);
-
-  TopoDS_Edge E1,E2,E3;
-  Handle(Geom_Curve) C1,C2,C3;
-  double f1,l1,f2,l2,f3,l3;
-  int nbe = 0;
-  TopExp_Explorer exp;
-  for ( exp.Init( aShape, TopAbs_EDGE ); exp.More(); exp.Next() ) {
-    nbe++;
-    TopoDS_Edge E = TopoDS::Edge( exp.Current() );
-    if(nbe==1) {
-      E1 = E;
-      C1 = BRep_Tool::Curve(E,f1,l1);
-    }
-    else if(nbe==2) {
-      E2 = E;
-      C2 = BRep_Tool::Curve(E,f2,l2);
-    }
-    else if(nbe==3) {
-      E3 = E;
-      C3 = BRep_Tool::Curve(E,f3,l3);
-    }
-  }
+  vector<int>& aResVec =
+    aResMap.insert( make_pair(sm, vector<int>(SMDSEntity_Last,0))).first->second;
+
+  myHelper = new SMESH_MesherHelper( aMesh );
+  myHelper->SetSubShape( aShape );
+  auto_ptr<SMESH_MesherHelper> helperDeleter( myHelper );
+
+  TNodeDistributor* algo1d = TNodeDistributor::GetDistributor(aMesh);
 
   TopoDS_Edge CircEdge, LinEdge1, LinEdge2;
+  int nbe = analyseFace( aShape, CircEdge, LinEdge1, LinEdge2 );
+  if( nbe>3 || nbe < 1 || CircEdge.IsNull() )
+    return false;
+
+  Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast( getCurve( CircEdge ));
+  if( aCirc.IsNull() )
+    return error(COMPERR_BAD_SHAPE);
+
+  gp_Pnt P0 = aCirc->Location();
+  gp_Pnt P1 = aCirc->Value(0.);
+  computeLayerPositions( P0, P1, LinEdge1 );
+
   int nb0d=0, nb2d_tria=0, nb2d_quad=0;
-  bool isQuadratic = false;
-  if(nbe==1) {
+  bool isQuadratic = false, ok = true;
+  if(nbe==1)
+  {
     // C1 must be a circle
-    Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast(C1);
-    if( !aCirc.IsNull() ) {
-      bool ok = _gen->Evaluate( aMesh, CircEdge, aResMap );
-      if(ok) {
-        SMESH_subMesh * sm = aMesh.GetSubMesh(CircEdge);
-        MapShapeNbElemsItr anIt = aResMap.find(sm);
-        vector<int> aVec = (*anIt).second;
-        isQuadratic = aVec[SMDSEntity_Quad_Edge]>aVec[SMDSEntity_Edge];
-        if(isQuadratic) {
-          // main nodes
-          nb0d = (aVec[SMDSEntity_Node]+1) * myLayerPositions.size();
-          // radial medium nodes
-          nb0d += (aVec[SMDSEntity_Node]+1) * (myLayerPositions.size()+1);
-          // other medium nodes
-          nb0d += (aVec[SMDSEntity_Node]+1) * myLayerPositions.size();
-        }
-        else {
-          nb0d = (aVec[SMDSEntity_Node]+1) * myLayerPositions.size();
-        }
-        nb2d_tria = aVec[SMDSEntity_Node] + 1;
-        nb2d_quad = nb0d;
+    ok = algo1d->EvaluateCircularEdge( aMesh, CircEdge, aResMap );
+    if(ok) {
+      const vector<int>& aVec = aResMap[aMesh.GetSubMesh(CircEdge)];
+      isQuadratic = aVec[SMDSEntity_Quad_Edge]>aVec[SMDSEntity_Edge];
+      if(isQuadratic) {
+        // main nodes
+        nb0d = (aVec[SMDSEntity_Node]+1) * myLayerPositions.size();
+        // radial medium nodes
+        nb0d += (aVec[SMDSEntity_Node]+1) * (myLayerPositions.size()+1);
+        // other medium nodes
+        nb0d += (aVec[SMDSEntity_Node]+1) * myLayerPositions.size();
       }
+      else {
+        nb0d = (aVec[SMDSEntity_Node]+1) * myLayerPositions.size();
+      }
+      nb2d_tria = aVec[SMDSEntity_Node] + 1;
+      nb2d_quad = nb0d;
     }
   }
-  else if(nbe==2) {
+  else if(nbe==2 && LinEdge1.Orientation() != TopAbs_INTERNAL)
+  {
     // one curve must be a half of circle and other curve must be
     // a segment of line
-    Handle(Geom_TrimmedCurve) tc = Handle(Geom_TrimmedCurve)::DownCast(C1);
-    while( !tc.IsNull() ) {
-      C1 = tc->BasisCurve();
-      tc = Handle(Geom_TrimmedCurve)::DownCast(C1);
-    }
-    tc = Handle(Geom_TrimmedCurve)::DownCast(C2);
-    while( !tc.IsNull() ) {
-      C2 = tc->BasisCurve();
-      tc = Handle(Geom_TrimmedCurve)::DownCast(C2);
-    }
-    Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast(C1);
-    Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast(C2);
-    CircEdge = E1;
-    LinEdge1 = E2;
-    double fp = f1;
-    double lp = l1;
-    if( aCirc.IsNull() ) {
-      aCirc = Handle(Geom_Circle)::DownCast(C2);
-      CircEdge = E2;
-      LinEdge1 = E1;
-      fp = f2;
-      lp = l2;
-      aLine = Handle(Geom_Line)::DownCast(C3);
-    }
-    bool ok = !aCirc.IsNull() && !aLine.IsNull();
+    double fp, lp;
+    Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast( getCurve( CircEdge, &fp, &lp ));
     if( fabs(fabs(lp-fp)-PI) > Precision::Confusion() ) {
       // not half of circle
-      ok = false;
+      return error(COMPERR_BAD_SHAPE);
+    }
+    Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast( getCurve( LinEdge1 ));
+    if( aLine.IsNull() ) {
+      // other curve not line
+      return error(COMPERR_BAD_SHAPE);
     }
-    SMESH_subMesh* sm1 = aMesh.GetSubMesh(LinEdge1);
-    MapShapeNbElemsItr anIt = aResMap.find(sm1);
-    if( anIt!=aResMap.end() ) {
-      ok = false;
+    ok = !aResMap.count( aMesh.GetSubMesh(LinEdge1) );
+    if ( !ok ) {
+      const vector<int>& aVec = aResMap[ aMesh.GetSubMesh(LinEdge1) ];
+      ok = ( aVec[SMDSEntity_Node] == myLayerPositions.size() );
     }
     if(ok) {
-      ok = _gen->Evaluate( aMesh, CircEdge, aResMap );
+      ok = algo1d->EvaluateCircularEdge( aMesh, CircEdge, aResMap );
     }
     if(ok) {
-      SMESH_subMesh * sm = aMesh.GetSubMesh(CircEdge);
-      MapShapeNbElemsItr anIt = aResMap.find(sm);
-      vector<int> aVec = (*anIt).second;
-      isQuadratic = aVec[SMDSEntity_Quad_Edge]>aVec[SMDSEntity_Edge];
+      const vector<int>& aVec = aResMap[ aMesh.GetSubMesh(CircEdge) ];
+      isQuadratic = aVec[SMDSEntity_Quad_Edge] > aVec[SMDSEntity_Edge];
       if(isQuadratic) {
         // main nodes
         nb0d = aVec[SMDSEntity_Node] * myLayerPositions.size();
@@ -1086,8 +1160,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
       nb2d_tria = aVec[SMDSEntity_Node] + 1;
       nb2d_quad = nb2d_tria * myLayerPositions.size();
       // add evaluation for edges
-      vector<int> aResVec(SMDSEntity_Last);
-      for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
+      vector<int> aResVec(SMDSEntity_Last,0);
       if(isQuadratic) {
         aResVec[SMDSEntity_Node] = 4*myLayerPositions.size() + 3;
         aResVec[SMDSEntity_Quad_Edge] = 2*myLayerPositions.size() + 2;
@@ -1096,74 +1169,49 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
         aResVec[SMDSEntity_Node] = 2*myLayerPositions.size() + 1;
         aResVec[SMDSEntity_Edge] = 2*myLayerPositions.size() + 2;
       }
-      sm = aMesh.GetSubMesh(LinEdge1);
-      aResMap.insert(make_pair(sm,aResVec));
+      aResMap[ aMesh.GetSubMesh(LinEdge1) ] = aResVec;
     }
   }
-  else { // nbe==3
+  else  // nbe==3 or ( nbe==2 && linEdge is INTERNAL )
+  {
+    if (nbe==2 && LinEdge1.Orientation() == TopAbs_INTERNAL )
+      LinEdge2 = LinEdge1;
+
     // one curve must be a part of circle and other curves must be
     // segments of line
-    Handle(Geom_TrimmedCurve) tc = Handle(Geom_TrimmedCurve)::DownCast(C1);
-    while( !tc.IsNull() ) {
-      C1 = tc->BasisCurve();
-      tc = Handle(Geom_TrimmedCurve)::DownCast(C1);
-    }
-    tc = Handle(Geom_TrimmedCurve)::DownCast(C2);
-    while( !tc.IsNull() ) {
-      C2 = tc->BasisCurve();
-      tc = Handle(Geom_TrimmedCurve)::DownCast(C2);
-    }
-    tc = Handle(Geom_TrimmedCurve)::DownCast(C3);
-    while( !tc.IsNull() ) {
-      C3 = tc->BasisCurve();
-      tc = Handle(Geom_TrimmedCurve)::DownCast(C3);
+    Handle(Geom_Line)  aLine1 = Handle(Geom_Line)::DownCast( getCurve( LinEdge1 ));
+    Handle(Geom_Line)  aLine2 = Handle(Geom_Line)::DownCast( getCurve( LinEdge2 ));
+    if( aLine1.IsNull() || aLine2.IsNull() ) {
+      // other curve not line
+      return error(COMPERR_BAD_SHAPE);
     }
-    Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast(C1);
-    Handle(Geom_Line) aLine1 = Handle(Geom_Line)::DownCast(C2);
-    Handle(Geom_Line) aLine2 = Handle(Geom_Line)::DownCast(C3);
-    CircEdge = E1;
-    LinEdge1 = E2;
-    LinEdge2 = E3;
-    double fp = f1;
-    double lp = l1;
-    if( aCirc.IsNull() ) {
-      aCirc = Handle(Geom_Circle)::DownCast(C2);
-      CircEdge = E2;
-      LinEdge1 = E3;
-      LinEdge2 = E1;
-      fp = f2;
-      lp = l2;
-      aLine1 = Handle(Geom_Line)::DownCast(C3);
-      aLine2 = Handle(Geom_Line)::DownCast(C1);
-      if( aCirc.IsNull() ) {
-        aCirc = Handle(Geom_Circle)::DownCast(C3);
-        CircEdge = E3;
-        LinEdge1 = E1;
-        LinEdge2 = E2;
-        fp = f3;
-        lp = l3;
-        aLine1 = Handle(Geom_Line)::DownCast(C1);
-        aLine2 = Handle(Geom_Line)::DownCast(C2);
+    int nbLayers = myLayerPositions.size();
+    computeLayerPositions( P0, P1, LinEdge2 );
+    if ( nbLayers != myLayerPositions.size() )
+      return error("Different hypotheses apply to radial edges");
+      
+    bool ok = !aResMap.count( aMesh.GetSubMesh(LinEdge1));
+    if ( !ok ) {
+      if ( myDistributionHypo || myNbLayerHypo )
+        ok = true; // override other 1d hyps
+      else {
+        const vector<int>& aVec = aResMap[ aMesh.GetSubMesh(LinEdge1) ];
+        ok = ( aVec[SMDSEntity_Node] == myLayerPositions.size() );
       }
     }
-    bool ok = !aCirc.IsNull() && !aLine1.IsNull() && !aLine1.IsNull();
-    SMESH_subMesh* sm = aMesh.GetSubMesh(LinEdge1);
-    MapShapeNbElemsItr anIt = aResMap.find(sm);
-    if( anIt!=aResMap.end() ) {
-      ok = false;
-    }
-    sm = aMesh.GetSubMesh(LinEdge2);
-    anIt = aResMap.find(sm);
-    if( anIt!=aResMap.end() ) {
-      ok = false;
+    if( ok && aResMap.count( aMesh.GetSubMesh(LinEdge2) )) {
+      if ( myDistributionHypo || myNbLayerHypo )
+        ok = true; // override other 1d hyps
+      else {
+        const vector<int>& aVec = aResMap[ aMesh.GetSubMesh(LinEdge2) ];
+        ok = ( aVec[SMDSEntity_Node] == myLayerPositions.size() );
+      }
     }
     if(ok) {
-      ok = _gen->Evaluate( aMesh, CircEdge, aResMap );
+      ok = algo1d->EvaluateCircularEdge( aMesh, CircEdge, aResMap );
     }
     if(ok) {
-      SMESH_subMesh * sm = aMesh.GetSubMesh(CircEdge);
-      MapShapeNbElemsItr anIt = aResMap.find(sm);
-      vector<int> aVec = (*anIt).second;
+      const vector<int>& aVec = aResMap[ aMesh.GetSubMesh(CircEdge) ];
       isQuadratic = aVec[SMDSEntity_Quad_Edge]>aVec[SMDSEntity_Edge];
       if(isQuadratic) {
         // main nodes
@@ -1179,8 +1227,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
       nb2d_tria = aVec[SMDSEntity_Node] + 1;
       nb2d_quad = nb2d_tria * myLayerPositions.size();
       // add evaluation for edges
-      vector<int> aResVec(SMDSEntity_Last);
-      for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
+      vector<int> aResVec(SMDSEntity_Last, 0);
       if(isQuadratic) {
         aResVec[SMDSEntity_Node] = 2*myLayerPositions.size() + 1;
         aResVec[SMDSEntity_Quad_Edge] = myLayerPositions.size() + 1;
@@ -1190,17 +1237,12 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
         aResVec[SMDSEntity_Edge] = myLayerPositions.size() + 1;
       }
       sm = aMesh.GetSubMesh(LinEdge1);
-      aResMap.insert(make_pair(sm,aResVec));
+      aResMap[sm] = aResVec;
       sm = aMesh.GetSubMesh(LinEdge2);
-      aResMap.insert(make_pair(sm,aResVec));
+      aResMap[sm] = aResVec;
     }
   }
 
-  vector<int> aResVec(SMDSEntity_Last);
-  for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
-  SMESH_subMesh * sm = aMesh.GetSubMesh(aShape);
-
-  //cout<<"nb0d = "<<nb0d<<"   nb2d_tria = "<<nb2d_tria<<"   nb2d_quad = "<<nb2d_quad<<endl;
   if(nb0d>0) {
     aResVec[0] = nb0d;
     if(isQuadratic) {
@@ -1211,12 +1253,11 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
       aResVec[SMDSEntity_Triangle] = nb2d_tria;
       aResVec[SMDSEntity_Quadrangle] = nb2d_quad;
     }
-    aResMap.insert(make_pair(sm,aResVec));
     return true;
   }
 
   // invalid case
-  aResMap.insert(make_pair(sm,aResVec));
+  sm = aMesh.GetSubMesh(aShape);
   SMESH_ComputeErrorPtr& smError = sm->GetComputeError();
   smError.reset( new SMESH_ComputeError(COMPERR_ALGO_FAILED,
                                         "Submesh can not be evaluated",this));
index 10a1203651e6e5fc318177d0513cc0520587df73..3764c746b39981e77112d8d9caa67f21cc5f455f 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_RadialQuadrangle_1D2D.hxx
 //  Module : SMESH
 #include "SMESH_StdMeshers.hxx"
 
 #include "SMESH_2D_Algo.hxx"
-//#include "SMDS_MeshNode.hxx"
 
-//#include <vector>
-//#include <map>
+#include <TopoDS_Edge.hxx>
+
+#include <vector>
 
 class StdMeshers_NumberOfLayers;
 class StdMeshers_LayerDistribution;
@@ -63,8 +61,10 @@ public:
   
 protected:
 
-  bool computeLayerPositions(const gp_Pnt& pIn,
-                             const gp_Pnt& pOut);
+  bool computeLayerPositions(const gp_Pnt&      p1,
+                             const gp_Pnt&      p2,
+                             const TopoDS_Edge& linEdge=TopoDS_Edge(),
+                             bool*              linEdgeComputed = 0);
 
 
   const StdMeshers_NumberOfLayers*    myNbLayerHypo;
index c3e86a98d8607b1622cb8cf38d71790c07e38aa5..391bd38c3c11df989aa6073ca8e7585582870acd 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Regular_1D.cxx
 //           Moved here from SMESH_Regular_1D.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
-
+//
 #include "StdMeshers_Regular_1D.hxx"
 #include "StdMeshers_Distribution.hxx"
 
@@ -325,6 +326,8 @@ static bool computeParamByFunc(Adaptor3d_Curve& C3d, double first, double last,
       return false;
     prevU = U;
   }
+  if ( theReverse )
+    theParams.reverse();
   return true;
 }
 
@@ -804,38 +807,83 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh &     theMesh,
       }
       if(!IsExist) Params.InsertBefore(j,aPnts[i]);
     }
-    double pf, pl, par2, par1, psize;
-    if (theReverse) {
-      pf = l;
-      pl = f;
+    double par2, par1, lp;
+    par1 = f;
+    lp = l;
+    double sign = 1.0;
+    if(theReverse) {
+      par1 = l;
+      lp = f;
+      sign = -1.0;
     }
-    else {
-      pf = f;
-      pl = l;
-    }
-    psize = pl - pf;
-    par1 = pf;
-    //cout<<"aPnts.size() = "<<aPnts.size()<<"  Params.Length() = "
-    //    <<Params.Length()<<"   nbsegs.size() = "<<nbsegs.size()<<endl;
+    double eltSize, segmentSize = 0.;
+    double currAbscissa = 0;
     for(i=0; i<Params.Length(); i++) {
-      par2 = pf + Params.Value(i+1)*psize;
       int nbseg = ( i > nbsegs.size()-1 ) ? nbsegs[0] : nbsegs[i];
-      double dp = (par2-par1)/nbseg;
-      int j = 1;
-      for(; j<=nbseg; j++) {
-        double param = par1 + dp*j;
-        theParams.push_back( param );
+      segmentSize = Params.Value(i+1)*theLength - currAbscissa;
+      currAbscissa += segmentSize;
+      GCPnts_AbscissaPoint APnt(theC3d, sign*segmentSize, par1);
+      if( !APnt.IsDone() )
+        return error( "GCPnts_AbscissaPoint failed");
+      par2 = APnt.Parameter();
+      eltSize = segmentSize/nbseg;
+      GCPnts_UniformAbscissa Discret(theC3d, eltSize, par1, par2);
+      if(theReverse)
+        Discret.Initialize(theC3d, eltSize, par2, par1);
+      else
+        Discret.Initialize(theC3d, eltSize, par1, par2);
+      if ( !Discret.IsDone() )
+        return error( "GCPnts_UniformAbscissa failed");
+      int NbPoints = Discret.NbPoints();
+      list<double> tmpParams;
+      for(int i=2; i<NbPoints; i++) {
+        double param = Discret.Parameter(i);
+        tmpParams.push_back( param );
+      }
+      if (theReverse) {
+        compensateError( eltSize, eltSize, par2, par1, segmentSize, theC3d, tmpParams );
+        tmpParams.reverse();
+      }
+      else {
+        compensateError( eltSize, eltSize, par1, par2, segmentSize, theC3d, tmpParams );
+      }
+      list<double>::iterator itP = tmpParams.begin();
+      for(; itP != tmpParams.end(); itP++) {
+        theParams.push_back( *(itP) );
       }
+      theParams.push_back( par2 );
+
       par1 = par2;
     }
     // add for last
     int nbseg = ( nbsegs.size() > Params.Length() ) ? nbsegs[Params.Length()] : nbsegs[0];
-    double dp = (pl-par1)/nbseg;
-    int j = 1;
-    for(; j<nbseg; j++) {
-      double param = par1 + dp*j;
-      theParams.push_back( param );
+    segmentSize = theLength - currAbscissa;
+    eltSize = segmentSize/nbseg;
+    GCPnts_UniformAbscissa Discret;
+    if(theReverse)
+      Discret.Initialize(theC3d, eltSize, par1, lp);
+    else
+      Discret.Initialize(theC3d, eltSize, lp, par1);
+    if ( !Discret.IsDone() )
+      return error( "GCPnts_UniformAbscissa failed");
+    int NbPoints = Discret.NbPoints();
+    list<double> tmpParams;
+    for(int i=2; i<NbPoints; i++) {
+      double param = Discret.Parameter(i);
+      tmpParams.push_back( param );
     }
+    if (theReverse) {
+      compensateError( eltSize, eltSize, lp, par1, segmentSize, theC3d, tmpParams );
+      tmpParams.reverse();
+    }
+    else {
+      compensateError( eltSize, eltSize, par1, lp, segmentSize, theC3d, tmpParams );
+    }
+    list<double>::iterator itP = tmpParams.begin();
+    for(; itP != tmpParams.end(); itP++) {
+      theParams.push_back( *(itP) );
+    }
+
     if (theReverse) {
       theParams.reverse(); // NPAL18025
     }
@@ -1048,8 +1096,7 @@ bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh & theMesh,
   ASSERT(!VFirst.IsNull());
   ASSERT(!VLast.IsNull());
 
-  std::vector<int> aVec(SMDSEntity_Last);
-  for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aVec[i] = 0;
+  std::vector<int> aVec(SMDSEntity_Last,0);
 
   if (!Curve.IsNull()) {
     list< double > params;
index 86a573c54994de41f3d2ccdcebf733ac4f33ed64..c0217343b7d7b279e931e462e2187363781e1d62 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_Regular_1D.hxx
 //           Moved here from SMESH_Regular_1D.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
-
+//
 #ifndef _SMESH_REGULAR_1D_HXX_
 #define _SMESH_REGULAR_1D_HXX_
 
@@ -49,7 +50,7 @@ public:
                                SMESH_Hypothesis::Hypothesis_Status& aStatus);
 
   virtual bool Compute(SMESH_Mesh& aMesh,
-                      const TopoDS_Shape& aShape);
+                       const TopoDS_Shape& aShape);
 
   virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
                         MapShapeNbElems& aResMap);
index 20490932030186d40c1de548f7b6e636636cfd62..d2bb42baa158ed85f497675664f53537cb2d9a81 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : StdMeshers_SegmentAroundVertex_0D.cxx
 // Module    : SMESH
@@ -38,7 +39,7 @@ StdMeshers_SegmentAroundVertex_0D::StdMeshers_SegmentAroundVertex_0D
 {
   _name = "SegmentAroundVertex_0D";
   // it is assigned to vertices but influence a state of EDGE submeshes 
-  _shapeType = (1 << TopAbs_VERTEX);   // 1 bit per shape type
+  _shapeType = (1 << TopAbs_VERTEX);    // 1 bit per shape type
 
   _compatibleHypothesis.push_back("SegmentLengthAroundVertex");
 }
@@ -100,8 +101,8 @@ bool StdMeshers_SegmentAroundVertex_0D::Compute(SMESH_Mesh&, const TopoDS_Shape&
 //=======================================================================
 
 bool StdMeshers_SegmentAroundVertex_0D::Evaluate(SMESH_Mesh&,
-                                                const TopoDS_Shape&,
-                                                MapShapeNbElems&)
+                                                 const TopoDS_Shape&,
+                                                 MapShapeNbElems&)
 {
   // This algorithm exists in order just to enable assignation of
   // StdMeshers_SegmentLengthAroundVertex hypothesis
index a2f1bd579b5f994752c9a94218a27207a2d35fa5..72371496d674c1e9888152d9c1d5747e5612c804 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_SegmentAroundVertex_0D.hxx
 //  Module : SMESH
index 599690c6a27ba33f2b91b928a8a28e361246ea21..70898baca1dd513fb323cc7b5b4adf8fdd1f1385 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_SegmentLengthAroundVertex.cxx
 //  Module : SMESH
-
+//
 #include "StdMeshers_SegmentLengthAroundVertex.hxx"
 
 #include "SMESH_Mesh.hxx"
index c7c54bbf688a07d36b9fec0d88ac5a0229cdb093..48e366b6696f80e78253f7af547205aa465e768d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_SegmentLengthAroundVertex.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
-
+//
 #ifndef _SMESH_SegmentLengthAroundVertex_HXX_
 #define _SMESH_SegmentLengthAroundVertex_HXX_
 
index 46e9a7cc3ea4ae1b57be703c731e71554fb39d5c..e4043dd7d4539d0da1c3b125bd3d5ca130beb7f6 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers_StartEndLength : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_StartEndLength.cxx
 //  Module : SMESH
-
+//
 #include "StdMeshers_StartEndLength.hxx"
 
 #include "SMESH_Algo.hxx"
index 35ae4e0c45c05551955b3f19a1c2092767c7a9e9..feb477a5377e1a08ca3efd56ca214cf9737e4e53 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_StartEndLength.hxx
 //  Module : SMESH
-
+//
 #ifndef _STDMESHERS_STARTENDLENGTH_HXX_
 #define _STDMESHERS_STARTENDLENGTH_HXX_
 
index 331cd0d1cea9edea5820cd05217d9bd6aa0caf7e..dac3ca289c26778f4e6502e6de3d4adfcffc322c 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers_TrianglePreference 
 //  File   : StdMeshers_TrianglePreference.cxx
 //  Module : SMESH
-
+//
 #include "StdMeshers_TrianglePreference.hxx"
 #include "utilities.h"
 
index 34ec364a16000a973203e8d9d9dbab426ce98d86..c4fb0d7c338a0aec390c56c9493d0e8989c08f2b 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_TrianglePreference.hxx
 //  Module : SMESH
-
+//
 #ifndef _StdMeshers_TrianglePreference_HXX_
 #define _StdMeshers_TrianglePreference_HXX_
 
index 3638498e138808b16cceb5a002bc3109a876e8df..7a35a1b979a7cc69f3c545221089ad34fb4e37d4 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : StdMeshers_UseExisting_1D2D.cxx
 // Module    : SMESH
@@ -72,8 +70,8 @@ bool StdMeshers_UseExisting_1D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
 //=======================================================================
 
 bool StdMeshers_UseExisting_1D::Evaluate(SMESH_Mesh&,
-                                        const TopoDS_Shape&,
-                                        MapShapeNbElems&)
+                                         const TopoDS_Shape&,
+                                         MapShapeNbElems&)
 {
   // This algorithm exists to allow mesh generation by mesh
   // edition functions in TUI mode
@@ -126,8 +124,8 @@ bool StdMeshers_UseExisting_2D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
 //=======================================================================
 
 bool StdMeshers_UseExisting_2D::Evaluate(SMESH_Mesh&,
-                                        const TopoDS_Shape&,
-                                        MapShapeNbElems&)
+                                         const TopoDS_Shape&,
+                                         MapShapeNbElems&)
 {
   // This algorithm exists to allow mesh generation by mesh edition
   // functions in TUI mode
index 961fb4ba9605e22a2e6fc10f7cbe7ee8983dabec..220cac8421863cce278f2c735f63ba6da648f8c5 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_UseExisting_1D2D.hxx
 //  Module : SMESH
index e8a1947716c6efc147f04e5d2beb131a059f083b..7e76cbe6741cf9b77259365aecefbcb3e6627c54 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH StdMeshersGUI : GUI for StdMeshers plugin
 #  File   : Makefile.in
 #  Author : Julia DOROVSKIKH
@@ -96,7 +94,8 @@ libStdMeshersGUI_la_LDFLAGS  = \
        ../SMESHGUI/libSMESH.la \
        ../OBJECT/libSMESHObject.la \
        $(GUI_LDFLAGS) -lSalomeApp \
-       $(CAS_LDPATH) -lTKernel -lTKBO -lTKAdvTools
+       $(CAS_LDPATH) -lTKernel -lTKBO -lTKAdvTools \
+       $(QWT_LIBS)
 
 # resources files
 nodist_salomeres_DATA= \
index 78982bec9e81fd3dfe41bcf2898696a753b85cd8..5bd4940b78104928167bf60ebeaa8da78893d8f5 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : SMESH_StdMeshersGUI.hxx
 // Author : Alexander BORODIN, Open CASCADE S.A.S.
 //
index f3e400e82fcf223b2b55cd2772fa1997ccf1ddeb..eb744f72acae70a644ecb2f375c2766cb269c257 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI.cxx
 // Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
 // SMESH includes
index e26ffd7e18bbd40e2c5e753c0a0e47734e69bf88..b3b101afb23997cb9de410761ec028a2092e4bd7 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_DistrPreview.cxx
 // Author : Open CASCADE S.A.S.
 // SMESH includes
@@ -222,13 +223,13 @@ void StdMeshersGUI_DistrPreview::update()
     {
       SMESH::double_array* arr = 0;
       if( isTableFunc() )
-       arr = h->BuildDistributionTab( myTableFunc, myNbSeg, ( int )myConv );
+        arr = h->BuildDistributionTab( myTableFunc, myNbSeg, ( int )myConv );
       else
-       arr = h->BuildDistributionExpr( myFunction.toLatin1().data(), myNbSeg, ( int )myConv );
+        arr = h->BuildDistributionExpr( myFunction.toLatin1().data(), myNbSeg, ( int )myConv );
       if( arr )
       {
-       distr = *arr;
-       delete arr;
+        distr = *arr;
+        delete arr;
       }
     }
   }
@@ -337,7 +338,7 @@ bool isCorrectArg( const Handle( Expr_GeneralExpression )& expr )
     if( !name.IsNull() )
     {
       if( name->GetName()!="t" )
-       res = false;
+        res = false;
     }
     else
       res = isCorrectArg( sub );
@@ -421,15 +422,15 @@ bool StdMeshersGUI_DistrPreview::convert( double& v ) const
 #ifdef NO_CAS_CATCH
         OCC_CATCH_SIGNALS;
 #endif
-       // in StdMeshers_NumberOfSegments.cc
-       // const double PRECISION = 1e-7;
-       //
-       if(v < -7) v = -7.0;
-       v = pow( 10.0, v );
+        // in StdMeshers_NumberOfSegments.cc
+        // const double PRECISION = 1e-7;
+        //
+        if(v < -7) v = -7.0;
+        v = pow( 10.0, v );
       } catch(Standard_Failure) {
-       Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-       v = 0.0;
-       ok = false;
+        Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+        v = 0.0;
+        ok = false;
       }
     }
     break;
index 87a9eb86e217ebc66b667f01a27b0041092974c5..76af1d743dd76dc7f8b7fe9e70a06ed9c9bb04ab 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_DistrPreview.h
 // Author : Open CASCADE S.A.S.
 //
index cc718ed66e768476f1256dad751ce6d8fe4cecfc..7963dbe360e31e3768951ab435157d127942ec31 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_DistrTable.cxx
 // Author : Open CASCADE S.A.S.
 // SMESH includes
 //
 #include "StdMeshersGUI_DistrTable.h"
 
+#include <SMESHGUI_SpinBox.h>
+
 // Qt incldues
 #include <QItemDelegate>
 #include <QTableWidget>
-#include <QDoubleSpinBox>
 #include <QPushButton>
 #include <QVBoxLayout>
 #include <QHBoxLayout>
@@ -84,14 +86,14 @@ public:
   ~SpinBoxDelegate();
 
   QWidget* createEditor( QWidget*,
-                        const QStyleOptionViewItem&,
-                        const QModelIndex& ) const;
+                         const QStyleOptionViewItem&,
+                         const QModelIndex& ) const;
   void     setEditorData( QWidget*, const QModelIndex&) const;
   void     setModelData( QWidget*, QAbstractItemModel*, 
-                        const QModelIndex& ) const;
+                         const QModelIndex& ) const;
   void     updateEditorGeometry( QWidget*,
-                                const QStyleOptionViewItem&, 
-                                const QModelIndex& ) const;
+                                 const QStyleOptionViewItem&, 
+                                 const QModelIndex& ) const;
 
 private:
   StdMeshersGUI_DistrTableFrame::Table* myTable;
@@ -109,7 +111,7 @@ private:
   struct EditorData
   { 
     int r, c;
-    QDoubleSpinBox* sb;
+    SMESHGUI_SpinBox* sb;
     EditorData() { reset(); }
     void reset() { r = -1; c = -1; sb = 0; }
   };
@@ -138,7 +140,7 @@ public:
   void          addRow();
   void          deleteRow();
 
-  void          setEditor( int, int, QDoubleSpinBox* );
+  void          setEditor( int, int, SMESHGUI_SpinBox* );
 
 protected:
   void          closeEditor( QWidget*, QAbstractItemDelegate::EndEditHint );
@@ -173,21 +175,25 @@ StdMeshersGUI_DistrTableFrame::SpinBoxDelegate::
 QWidget* 
 StdMeshersGUI_DistrTableFrame::SpinBoxDelegate::
 createEditor( QWidget* parent,
-             const QStyleOptionViewItem& /*option*/,
-             const QModelIndex& index ) const
+              const QStyleOptionViewItem& /*option*/,
+              const QModelIndex& index ) const
 {
-  QDoubleSpinBox* sb = new QDoubleSpinBox( parent );
+  SMESHGUI_SpinBox* sb = new SMESHGUI_SpinBox( parent );
+  
+  sb->setAcceptNames(false); // No Notebook variables allowed
+  double aMin = index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ? 
+                  myTable->argMinimum( index.row() ) : 
+                  myTable->funcMinimum( index.row() );
+  double aMax = index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ? 
+                  myTable->argMaximum( index.row() ) : 
+                  myTable->funcMaximum( index.row() );
+  double aStep = index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ? 
+                     myTable->argStep( index.row() ) : 
+                     myTable->funcStep( index.row() );
+  sb->RangeStepAndValidator( aMin, aMax, aStep, "parametric_precision" );
   sb->setFrame(false);
-  sb->setMinimum( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ? 
-                 myTable->argMinimum( index.row() ) : 
-                 myTable->funcMinimum( index.row() ) );
-  sb->setMaximum( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ? 
-                 myTable->argMaximum( index.row() ) : 
-                 myTable->funcMaximum( index.row() ) );
-  sb->setSingleStep( index.column() == StdMeshersGUI_DistrTableFrame::ArgColumn ? 
-                    myTable->argStep( index.row() ) : 
-                    myTable->funcStep( index.row() ) );
-  myTable->setEditor( index.row(), index.column(), sb );
+
+  myTable->setEditor( index.row(), index.column(), sb );  
   return sb;
 }
 
@@ -196,7 +202,7 @@ StdMeshersGUI_DistrTableFrame::SpinBoxDelegate::
 setEditorData( QWidget* editor, const QModelIndex& index ) const
 {
   QString value = index.model()->data(index, Qt::DisplayRole).toString();
-  QDoubleSpinBox* sb = static_cast<QDoubleSpinBox*>(editor);
+  SMESHGUI_SpinBox* sb = static_cast<SMESHGUI_SpinBox*>(editor);
 
   bool bOk = false;
   double v = value.toDouble( &bOk );
@@ -208,17 +214,17 @@ setEditorData( QWidget* editor, const QModelIndex& index ) const
 void
 StdMeshersGUI_DistrTableFrame::SpinBoxDelegate::
 setModelData( QWidget* editor, QAbstractItemModel* model, 
-             const QModelIndex& index ) const
+              const QModelIndex& index ) const
 {
-  QDoubleSpinBox* sb = static_cast<QDoubleSpinBox*>(editor);
+  SMESHGUI_SpinBox* sb = static_cast<SMESHGUI_SpinBox*>(editor);
   model->setData( index, QString::number( sb->value() ), Qt::DisplayRole );
 }
 
 void 
 StdMeshersGUI_DistrTableFrame::SpinBoxDelegate::
 updateEditorGeometry( QWidget* editor,
-                     const QStyleOptionViewItem& option, 
-                     const QModelIndex& /*index*/ ) const
+                      const QStyleOptionViewItem& option, 
+                      const QModelIndex& /*index*/ ) const
 {
   editor->setGeometry( option.rect );
 }
@@ -247,7 +253,7 @@ Table( QWidget* parent, int rows )
 
 void
 StdMeshersGUI_DistrTableFrame::Table::
-setEditor( int r, int c, QDoubleSpinBox* sb )
+setEditor( int r, int c, SMESHGUI_SpinBox* sb )
 {
   myEditorData.r  = r;
   myEditorData.c  = c;
@@ -530,9 +536,9 @@ StdMeshersGUI_DistrTableFrame( QWidget* parent )
   connect( myButtons[ InsertRowBtn ], SIGNAL( clicked() ), this, SLOT( onInsert() ) );
   connect( myButtons[ RemoveRowBtn ], SIGNAL( clicked() ), this, SLOT( onRemove() ) );
   connect( myTable, SIGNAL( currentCellChanged( int, int, int, int ) ),
-          this,    SIGNAL( currentChanged( int, int ) ) );
+           this,    SIGNAL( currentChanged( int, int ) ) );
   connect( myTable, SIGNAL( cellChanged( int, int ) ),
-          this,    SIGNAL( valueChanged( int, int ) ) );
+           this,    SIGNAL( valueChanged( int, int ) ) );
 }
 
 StdMeshersGUI_DistrTableFrame::
index 11a4ab33332b25dfdf94b09fa2ad65078fc8ee7b..af68869b9ec05d7abd78ecb5696c2c9d30a49153 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_DistrTable.h
 // Author : Open CASCADE S.A.S.
 //
index c5c228bc74bc7f7e733c2e4eb2c024128d35ca0e..8b503af3d975fcbc51f2a51d93a1075366429831 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_FixedPointsParamWdg.cxx
 // Author : Open CASCADE S.A.S.
 // SMESH includes
 //
 #include "StdMeshersGUI_FixedPointsParamWdg.h"
 
-#include <QtxIntSpinBox.h>
-#include <QtxDoubleSpinBox.h>
+#include <SMESHGUI_SpinBox.h>
+
+#include <SalomeApp_IntSpinBox.h>
 
 // Qt includes
 #include <QPushButton>
@@ -76,12 +75,13 @@ StdMeshersGUI_FixedPointsParamWdg::LineDelegate::LineDelegate( QTreeWidget* pare
 }
 
 QWidget* StdMeshersGUI_FixedPointsParamWdg::LineDelegate::createEditor( QWidget* parent,
-                                                                       const QStyleOptionViewItem& option,
-                                                                       const QModelIndex& index ) const
+                                                                        const QStyleOptionViewItem& option,
+                                                                        const QModelIndex& index ) const
 {
   QWidget* w = 0;
   if ( (index.column() == 1 ) ) {
-    QtxIntSpinBox* sb = new QtxIntSpinBox( parent );
+    SalomeApp_IntSpinBox* sb = new SalomeApp_IntSpinBox( parent );
+    sb->setAcceptNames( false ); // No Notebook variables allowed
     sb->setFrame( false );
     sb->setRange( 1, 999);
     w = sb;
@@ -91,11 +91,11 @@ QWidget* StdMeshersGUI_FixedPointsParamWdg::LineDelegate::createEditor( QWidget*
 }
 
 void StdMeshersGUI_FixedPointsParamWdg::LineDelegate::setModelData( QWidget* editor, 
-                                                                   QAbstractItemModel* model, 
-                                                                   const QModelIndex& index ) const
+                                                                    QAbstractItemModel* model, 
+                                                                    const QModelIndex& index ) const
 {
-  model->setData( index, qobject_cast<QtxIntSpinBox*>( editor )->value(), Qt::EditRole );
-  model->setData( index, qobject_cast<QtxIntSpinBox*>( editor )->value(), Qt::UserRole );
+  model->setData( index, qobject_cast<SalomeApp_IntSpinBox*>( editor )->value(), Qt::EditRole );
+  model->setData( index, qobject_cast<SalomeApp_IntSpinBox*>( editor )->value(), Qt::UserRole );
 }
 
 //================================================================================
@@ -114,7 +114,7 @@ StdMeshersGUI_FixedPointsParamWdg
   
   myListWidget   = new QListWidget( this );
   myTreeWidget   = new QTreeWidget( this );
-  mySpinBox      = new QtxDoubleSpinBox( this );
+  mySpinBox      = new SMESHGUI_SpinBox( this );
   myAddButton    = new QPushButton( tr( "SMESH_BUT_ADD" ),    this );
   myRemoveButton = new QPushButton( tr( "SMESH_BUT_REMOVE" ), this );      
   mySameValues   = new QCheckBox( tr("SMESH_SAME_NB_SEGMENTS"), this);
@@ -141,10 +141,8 @@ StdMeshersGUI_FixedPointsParamWdg
   myListWidget->setMinimumWidth( 80 );
   myTreeWidget->setMinimumWidth( 200 );
 
-  mySpinBox->setRange( 0, 1 );
-  mySpinBox->setSingleStep( 0.1 );
-  mySpinBox->setDecimals( 4 );
-  mySpinBox->setPrecision( 4 );
+  mySpinBox->setAcceptNames( false ); // No Notebook variables allowed
+  mySpinBox->RangeStepAndValidator( 0., 1., .1, "parametric_precision" );
   myListWidget->setMinimumWidth( 70 );
 
   connect( myAddButton,    SIGNAL( clicked() ),              SLOT( onAdd() ) );
@@ -205,7 +203,7 @@ void StdMeshersGUI_FixedPointsParamWdg::onAdd()
 {
   addPoint( mySpinBox->value() );
 }
-        
+         
 //=================================================================================
 // function : onRemove()
 // purpose  : Called when Remove Button Clicked
@@ -264,7 +262,7 @@ void StdMeshersGUI_FixedPointsParamWdg::addPoint( double v)
       double lv = point( i );
       if ( EQUAL_DBL(lv, v) ) { toInsert = false; break; }
       else if ( GT_DBL(lv, v) ) {
-       idx = i; break;
+        idx = i; break;
       }
     }
     if ( toInsert ) {
@@ -292,7 +290,7 @@ void StdMeshersGUI_FixedPointsParamWdg::removePoints()
     delete myTreeWidget->topLevelItem( idx );
     delete item;
     myTreeWidget->topLevelItem( idx )->setText( 0, treeItemText( idx == 0 ? 0 : point( idx-1 ),
-                                                                idx > myListWidget->count()-1 ? 1 : point( idx ) ) );
+                                                                 idx > myListWidget->count()-1 ? 1 : point( idx ) ) );
   }
   onCheckBoxChanged();
   updateState();
index 273781d34aa85661e7d816d8a290a32bc372fd3e..0e421fe4406b5e0d0e8e24022ca3d9886f75edea 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_FixedPointsParamWdg.h
 // Author : Open CASCADE S.A.S. (dmv)
 //
@@ -34,7 +32,7 @@
 #include <QStringList>
 
 class SMESHGUI;
-class QtxDoubleSpinBox;
+class SMESHGUI_SpinBox;
 class QPushButton;
 class QLineEdit;
 class QCheckBox;
@@ -84,7 +82,7 @@ private:
 private:
   QListWidget*                   myListWidget;
   QTreeWidget*                   myTreeWidget;
-  QtxDoubleSpinBox*              mySpinBox;
+  SMESHGUI_SpinBox*              mySpinBox;
   QPushButton*                   myAddButton;
   QPushButton*                   myRemoveButton;
   QCheckBox*                     mySameValues;
index 5d187b6d08d82a876942ccf739bb3fda3c5da76b..b1ef69a5e1ead610688523732472de58967620a6 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_LayerDistributionParamWdg.cxx
 // Author : Open CASCADE S.A.S.
 // SMESH includes
@@ -50,7 +51,7 @@
 
 StdMeshersGUI_LayerDistributionParamWdg
 ::StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr hyp,
-                                         const QString& theName,
+                                          const QString& theName,
                                           QDialog* dlg): 
   QWidget(), myName(theName), myDlg( dlg )
 {
index b47b122b1a8fd3348506daa9c9233a37fc315402..c7e62c88a4211eb4d8d2aba62102e946efa5f36c 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_LayerDistributionParamWdg.h
 // Author : Open CASCADE S.A.S.
 //
@@ -51,7 +52,7 @@ class STDMESHERSGUI_EXPORT StdMeshersGUI_LayerDistributionParamWdg : public QWid
 
 public:
   StdMeshersGUI_LayerDistributionParamWdg(SMESH::SMESH_Hypothesis_ptr,
-                                         const QString&,
+                                          const QString&,
                                           QDialog*);
   ~StdMeshersGUI_LayerDistributionParamWdg();
 
index 2ee5473af34992aee5ac4cc34109832b0a7490d9..9fce3fe98541f13ac13c4fbfd1a1e2e4ff64a001 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_NbSegmentsCreator.cxx
 // Author : Open CASCADE S.A.S.
 // SMESH includes
@@ -149,7 +150,7 @@ QFrame* StdMeshersGUI_NbSegmentsCreator::buildFrame()
   // 3)  scale
   myGroupLayout->addWidget( myLScale = new QLabel( tr( "SMESH_NB_SEGMENTS_SCALE_PARAM" ), GroupC1 ), row, 0 );
   myScale = new SMESHGUI_SpinBox( GroupC1 );
-  myScale->RangeStepAndValidator( 1E-5, 1E+5, 0.1, 6 );
+  myScale->RangeStepAndValidator( 1E-5, 1E+5, 0.1, "parametric_precision" );
   myGroupLayout->addWidget( myScale, row, 1 );
   row++;
 
index 6053e8d3432c19994cf7990bb9881b4f355e6d0d..f50b1943335a0f686fa876794b07cfe8d43524e6 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_NbSegmentsCreator.h
 // Author : Open CASCADE S.A.S.
 //
index 37a3ce7eedde8a1706a4ceb00c44cb352aa508f8..06f2431eca8ce45ea55b924d1833517269a5b29b 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_ObjectReferenceParamWdg.cxx
 // Author : Open CASCADE S.A.S.
 // SMESH includes
index 62e5096af2c7795bd899266db1d04a175191ee27..c5fabc25e741af1fa2efac0114a97ac90e2c3f98 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_ObjectReferenceParamWdg.h
 // Author : Open CASCADE S.A.S.
 //
index 0d72900dcb875cbf6ecfc46cd1fd23039d8a8d01..8fd24f3510ec063b15f3fff65dcbc086f212bed2 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_StdHypothesisCreator.cxx
 // Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
 // SMESH includes
@@ -999,13 +1000,15 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
       anEntry = h->GetObjectEntry();
     aDirectionWidget->SetGeomShapeEntry( anEntry );
     aDirectionWidget->SetMainShapeEntry( aMainEntry );
-    SMESH::long_array_var aVec = new SMESH::long_array;
-    int vertID = h->GetTriaVertex();
-    if(vertID>0) {
-      aVec->length(1);
-      aVec[0] = vertID;
+    if ( !isCreation() ) {
+      SMESH::long_array_var aVec = new SMESH::long_array;
+      int vertID = h->GetTriaVertex();
+      if(vertID>0) {
+        aVec->length(1);
+        aVec[0] = vertID;
+        aDirectionWidget->SetListOfIDs( aVec );
+      }
     }
-    aDirectionWidget->SetListOfIDs( aVec );
     aDirectionWidget->showPreview( true );
     customWidgets()->append ( aDirectionWidget );
   }
@@ -1028,38 +1031,38 @@ void StdMeshersGUI_StdHypothesisCreator::attuneStdWidget (QWidget* w, const int)
   if( hypType()=="LocalLength" &&  sb )
   {
     if (sb->objectName() == tr("SMESH_LOCAL_LENGTH_PARAM"))
-      sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+      sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
     else if (sb->objectName() == tr("SMESH_LOCAL_LENGTH_PRECISION"))
-      sb->RangeStepAndValidator( 0.0, 1.0, 0.05, 7 );
+      sb->RangeStepAndValidator( 0.0, 1.0, 0.05, "len_tol_precision" );
   }
   else if( hypType()=="Arithmetic1D" && sb )
   {
-    sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+    sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "parametric_precision" );
   }
   else if( hypType()=="MaxLength" && sb )
   {
-    sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+    sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
     sb->setEnabled( !widget< QCheckBox >( 1 )->isChecked() );
   }
   else if( hypType()=="MaxElementArea" && sb )
   {
-    sb->RangeStepAndValidator( VALUE_SMALL_2, VALUE_MAX_2, 1.0, 6 );
+    sb->RangeStepAndValidator( VALUE_SMALL_2, VALUE_MAX_2, 1.0, "area_precision" );
   }
   else if( hypType()=="MaxElementVolume" && sb )
   {
-    sb->RangeStepAndValidator( VALUE_SMALL_3, VALUE_MAX_3, 1.0, 6 );
+    sb->RangeStepAndValidator( VALUE_SMALL_3, VALUE_MAX_3, 1.0, "vol_precision" );
   }
   else if( hypType()=="StartEndLength" && sb )
   {
-    sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+    sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
   }
   else if( hypType()=="Deflection1D" && sb )
   {
-    sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+    sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "parametric_precision" );
   }
   else if ( sb ) // default validator for possible ancestors
   {
-    sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, 6 );
+    sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
   }
 }
 
index 0973c5c03325e349cf6036f3f56acb353ca21d9b..1f693be44f39532727d9756430a3c0deae24a902 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_StdHypothesisCreator.h
 // Author : Alexander SOLOVYOV, Open CASCADE S.A.S.
 //
index 65b99514eb16932813be6ffc1e6a08a158ae94ab..4bc2b7549dbcf411263af80a6b69815b14d6e86f 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_SubShapeSelectorWdg.cxx
 // Author : Open CASCADE S.A.S. (dmv)
 // SMESH includes
 //
-
 #include "StdMeshersGUI_SubShapeSelectorWdg.h"
 
 // SMESH Includes
@@ -83,7 +80,7 @@ StdMeshersGUI_SubShapeSelectorWdg
 ::StdMeshersGUI_SubShapeSelectorWdg( QWidget * parent ): 
   QWidget( parent ),
   myPreviewActor( 0 ),
-  myMaxSize( 0 )
+  myMaxSize( -1 )
 {
   QPixmap image0( SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap( "SMESH", tr( "ICON_SELECT" ) ) );
 
@@ -146,6 +143,9 @@ void StdMeshersGUI_SubShapeSelectorWdg::init()
   myListOfIDs.clear();
   mySelectedIDs.clear();
 
+  myAddButton->setEnabled( false );
+  myRemoveButton->setEnabled( false );
+
   mySMESHGUI     = SMESHGUI::GetSMESHGUI();
   mySelectionMgr = SMESH::GetSelectionMgr( mySMESHGUI );
   mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
@@ -199,63 +199,76 @@ void StdMeshersGUI_SubShapeSelectorWdg::SelectionIntoArgument()
   mySelectionMgr->selectedObjects( aList );
   int nbSel = aList.Extent();
 
-  if (nbSel < 1)
-    return;
-
-  SALOME_ListIteratorOfListIO anIt (aList);
+  if (nbSel > 0) {
+    SALOME_ListIteratorOfListIO anIt (aList);
     
-  for ( ; anIt.More(); anIt.Next()) { // Loop on selected objects
-    Handle(SALOME_InteractiveObject) IO = anIt.Value();
-
-    GEOM::GEOM_Object_var aGeomObj = GetGeomObjectByEntry( IO->getEntry() );  
-    if ( !CORBA::is_nil( aGeomObj ) ) { // Selected Object From Study
-      GEOM::GEOM_Object_ptr aGeomFatherObj = aGeomObj->GetMainShape();
-      QString aFatherEntry = "";
-      QString aMainFatherEntry = "";
-      TopoDS_Shape shape;
-      if ( !CORBA::is_nil( aGeomFatherObj ) ) {
-       // Get Main Shape
-       GEOM::GEOM_Object_var aGeomMain = GetGeomObjectByEntry( myEntry );
-       if ( !CORBA::is_nil( aGeomMain ) && aGeomMain->GetType() == 37 ) {  // Main Shape is a Group
-         GEOM::GEOM_Object_ptr aMainFatherObj = aGeomMain->GetMainShape();
-         if ( !CORBA::is_nil( aMainFatherObj ) )
-           aMainFatherEntry = aMainFatherObj->GetStudyEntry();
-       }
-       aFatherEntry = aGeomFatherObj->GetStudyEntry();
-      }
+    for ( ; anIt.More(); anIt.Next()) { // Loop on selected objects
+      Handle(SALOME_InteractiveObject) IO = anIt.Value();
       
-      if ( aFatherEntry != "" && ( aFatherEntry == myEntry || aFatherEntry == aMainFatherEntry ) ) {
-       if ( aGeomObj->GetType() == 37 /*GEOM_GROUP*/ ) { // Selected Group that belongs the main object
-         GEOMBase::GetShape(aGeomObj, shape); 
-         if ( !shape.IsNull() ) {
-           TopExp_Explorer exp( shape, mySubShType );
-           for ( ; exp.More(); exp.Next() ) {
-             int index = myPreviewActor->GetIndexByShape( exp.Current() );
-             if ( index ) {
-               mySelectedIDs.append( index );
-               myPreviewActor->HighlightID( index );
-             }
-           }
-         }
-       } else if ( aGeomObj->GetType() == 28 /*GEOM_SUBSHAPE*/  ) {
-         GEOMBase::GetShape(aGeomObj, shape); 
-         if ( !shape.IsNull() && shape.ShapeType() == mySubShType ) {
-           int index = myPreviewActor->GetIndexByShape( shape );
-           if ( index ) {
-             mySelectedIDs.append( index );
-             myPreviewActor->HighlightID( index );
-           }
-         }
-       }
+      GEOM::GEOM_Object_var aGeomObj = GetGeomObjectByEntry( IO->getEntry() );  
+      if ( !CORBA::is_nil( aGeomObj ) ) { // Selected Object From Study
+        GEOM::GEOM_Object_ptr aGeomFatherObj = aGeomObj->GetMainShape();
+        QString aFatherEntry = "";
+        QString aMainFatherEntry = "";
+        TopoDS_Shape shape;
+        if ( !CORBA::is_nil( aGeomFatherObj ) ) {
+          // Get Main Shape
+          GEOM::GEOM_Object_var aGeomMain = GetGeomObjectByEntry( myEntry );
+          if ( !CORBA::is_nil( aGeomMain ) && aGeomMain->GetType() == 37 ) {  // Main Shape is a Group
+            GEOM::GEOM_Object_ptr aMainFatherObj = aGeomMain->GetMainShape();
+            if ( !CORBA::is_nil( aMainFatherObj ) )
+              aMainFatherEntry = aMainFatherObj->GetStudyEntry();
+          }
+          aFatherEntry = aGeomFatherObj->GetStudyEntry();
+        }
+        
+        if ( aFatherEntry != "" && ( aFatherEntry == myEntry || aFatherEntry == aMainFatherEntry ) ) {
+          if ( aGeomObj->GetType() == 37 /*GEOM_GROUP*/ ) { // Selected Group that belongs the main object
+            GEOMBase::GetShape(aGeomObj, shape); 
+            if ( !shape.IsNull() ) {
+              TopExp_Explorer exp( shape, mySubShType );
+              for ( ; exp.More(); exp.Next() ) {
+                int index = myPreviewActor->GetIndexByShape( exp.Current() );
+                if ( index ) {
+                  mySelectedIDs.append( index );
+                  myPreviewActor->HighlightID( index );
+                }
+              }
+            }
+          } else if ( aGeomObj->GetType() == 28 /*GEOM_SUBSHAPE*/  ) {
+            GEOMBase::GetShape(aGeomObj, shape); 
+            if ( !shape.IsNull() && shape.ShapeType() == mySubShType ) {
+              int index = myPreviewActor->GetIndexByShape( shape );
+              if ( index ) {
+                mySelectedIDs.append( index );
+                myPreviewActor->HighlightID( index );
+              }
+            }
+          }
+        }
+      } else { // Selected Actor from Actor Collection
+        QString anEntry = IO->getEntry();
+        QString str = "_";
+        int index = anEntry.lastIndexOf( str );
+        anEntry.remove(0, index+1);
+        int ind = anEntry.toInt();
+        if ( ind )
+          mySelectedIDs.append( ind );
       }
-    } else { // Selected Actor from Actor Collection
-      QString anEntry = IO->getEntry();
-      QString str = "_";
-      int index = anEntry.lastIndexOf( str );
-      anEntry.remove(0, index+1);
-      int ind = anEntry.toInt();
-      if ( ind )
-       mySelectedIDs.append( ind );
+    }
+  }
+  // update add button
+  myAddButton->setEnabled( myListWidget->count() < myMaxSize && mySelectedIDs.size() > 0 && ( mySelectedIDs.size() <= myMaxSize || myMaxSize == -1 ) );
+
+  //Connect Selected Ids in viewer and dialog's Ids list
+  myListWidget->clearSelection();
+  if ( mySelectedIDs.size() > 0 ) {
+    for (int i = 0; i < mySelectedIDs.size(); i++) {
+      QString anID = QString(" %1").arg( mySelectedIDs.at(i) );
+      QList<QListWidgetItem*> anItems = myListWidget->findItems ( anID, Qt::MatchExactly );
+      QListWidgetItem* item;
+      foreach(item, anItems)
+        item->setSelected(true);
     }
   }
 }
@@ -270,7 +283,7 @@ void StdMeshersGUI_SubShapeSelectorWdg::onAdd()
     return;
 
   myListWidget->blockSignals( true );
-  for (int i = 0; i < mySelectedIDs.size() && (myMaxSize 1 || myListOfIDs.size() < myMaxSize); i++) {
+  for (int i = 0; i < mySelectedIDs.size() && (myMaxSize == -1 || myListOfIDs.size() < myMaxSize); i++) {
     if ( myListOfIDs.indexOf( mySelectedIDs.at(i) ) == -1 ) {
       QString anID = QString(" %1").arg( mySelectedIDs.at(i) );
 
@@ -282,9 +295,9 @@ void StdMeshersGUI_SubShapeSelectorWdg::onAdd()
   }
   onListSelectionChanged();
   myListWidget->blockSignals( false );
-  myAddButton->setEnabled( myListOfIDs.size() < myMaxSize );
+  myAddButton->setEnabled( myMaxSize == -1 || myListOfIDs.size() < myMaxSize );
 }
-        
+         
 //=================================================================================
 // function : onRemove()
 // purpose  : Called when Remove Button Clicked
@@ -327,6 +340,9 @@ void StdMeshersGUI_SubShapeSelectorWdg::onListSelectionChanged()
   QListWidgetItem* anItem;
   foreach(anItem, selItems)
     myPreviewActor->HighlightID( anItem->text().toInt() );
+
+  // update remove button
+  myRemoveButton->setEnabled( selItems.size() > 0 );
 }
 
 //=================================================================================
@@ -355,8 +371,7 @@ void StdMeshersGUI_SubShapeSelectorWdg::updateState()
     state = true;
   
   myListWidget->setEnabled( state );
-  myAddButton->setEnabled( state );
-  myRemoveButton->setEnabled( state );
+  myAddButton->setEnabled( mySelectedIDs.size() > 0 );
   
   if (state) {
     myPreviewActor = new SMESH_PreviewActorsCollection();
@@ -421,7 +436,7 @@ SMESH::long_array_var StdMeshersGUI_SubShapeSelectorWdg::GetListOfIDs()
   anArray->length( size );
   if ( size ) {
     for (int i = 0; i < size; i++) {
-       anArray[i] = myListOfIDs.at(i);
+        anArray[i] = myListOfIDs.at(i);
     }
   }
   return anArray;
index 49e49e82a4950ab672cbb4f42454c098cb4adb5e..b29840bdff7f71a2e416812f3e2bb6851ab1403d 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File   : StdMeshersGUI_SubShapeSelectorWdg.h
 // Author : Open CASCADE S.A.S. (dmv)
 //
index 7438aa85e39e92a6b67324a1febdcd35a00b9e0a..fa4ca57672c8de4829386534e92af38637411b57 100644 (file)
@@ -1,6 +1,6 @@
 <!DOCTYPE TS>
 <!--
-  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+  Copyright (C) 2007-2010  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
index 0a8ca42f4bf603edd02965203d5b8042e5af340f..574646e0132d2d5d35dfd59fda5032b77a11f7cc 100644 (file)
@@ -1,6 +1,6 @@
 <!DOCTYPE TS>
 <!--
-  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+  Copyright (C) 2007-2010  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
index b91367abf809c5ddd56a81d48bdce67aedf51269..1bc680fd82f3dcac93619020f7a251d3ec501518 100644 (file)
@@ -1,7 +1,4 @@
-#  Copyright (C) 2007-2008  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
+#  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 #  This library is free software; you can redistribute it and/or
 #  modify it under the terms of the GNU Lesser General Public
 #
 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 #  SMESH StdMeshers_I : idl implementation based on 'StdMeshersPlugin' unit's classes
 #  File   : Makefile.in
 #  Author : Julia DOROVSKIKH
 #  Modified by : Alexander BORODIN (OCN) - autotools usage
 #  Module : SMESH
-
+#
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 # header files 
index 7a4eb769b90ad37293004183cc0816b1caa1fe48..8e986fb61f10202058fb9aada2686b302a565e45 100755 (executable)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SMESH_StdMeshers_I.hxx
 //  Author : Alexander BORODIN
 //  Module : SMESH
index 9afb8748aa2c2702205e1467147d04dd23dd0e38..0f10e665031f17163668b89b79828732e1226990 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Arithmetic1D_i.cxx
 //  Author : Damien COQUERET, OCC
@@ -46,15 +47,15 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i( PortableServer::POA_ptr thePOA,
-                                                   int                     theStudyId,
-                                                   ::SMESH_Gen*            theGenImpl )
+                                                    int                     theStudyId,
+                                                    ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   MESSAGE( "StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i" );
   myBaseImpl = new ::StdMeshers_Arithmetic1D( theGenImpl->GetANewId(),
-                                            theStudyId,
-                                            theGenImpl );
+                                             theStudyId,
+                                             theGenImpl );
 }
 
 //=============================================================================
@@ -79,7 +80,7 @@ StdMeshers_Arithmetic1D_i::~StdMeshers_Arithmetic1D_i()
 //=============================================================================
 
 void StdMeshers_Arithmetic1D_i::SetLength(CORBA::Double theLength,
-                                         CORBA::Boolean theIsStart )
+                                          CORBA::Boolean theIsStart )
      throw ( SALOME::SALOME_Exception )
 {
   MESSAGE( "StdMeshers_StartEndLength_i::SetLength" );
@@ -89,7 +90,7 @@ void StdMeshers_Arithmetic1D_i::SetLength(CORBA::Double theLength,
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 
   // Update Python script
@@ -157,7 +158,7 @@ void StdMeshers_Arithmetic1D_i::SetReversedEdges( const SMESH::long_array& theId
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 
   // Update Python script
index 641e567798c6505a877169c4bef3df4206b12a7b..5c1bdcb40edba175fcf1bf512fa9338a03e0081d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Arithmetic1D_i.hxx
 //  Author : Damien COQUERET, OCC
index 2085f1f5269fe9c71b90d149d82c03be7a4f7db6..f16ecd8f2b84686090e14d52ecd383c87879a1a7 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_AutomaticLength_i.cxx
 //  Author : Edward AGAPOV
@@ -87,7 +88,7 @@ void StdMeshers_AutomaticLength_i::SetFineness( CORBA::Double theFineness )
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
   // Update Python script
   SMESH::TPythonDump() << _this() << ".SetFineness( " << theFineness << " )";
index 7bb85cf4575cd98e053ec04526dfe719f7c6243f..4473d439003636aeee0136e23305deccf1721677 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_AutomaticLength_i.hxx
 //  Author : Edward AGAPOV
index c9d1d76930697399c917632e20d2bc2f696d1e96..6c3c55ab94ed4fbee7891e9931269fa88269b8a5 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_CompositeSegment_1D_i.cxx
 //  Module : SMESH
index d8ffd9b9f95e0ed3d9493cd84e0d560dc2243f78..866da852c94c90fc5ffd23aff45bce79cd0fc9c9 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_CompositeSegment_1D_i.hxx
 //  Module : SMESH
index 2386c6aa7c981ad1e624e0583026259d988796ef..3c0859e23cabe3aded7083b820bdc18afd81dc69 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Deflection1D_i.cxx
 //           Moved here from SMESH_LocalLength_i.cxx
@@ -47,15 +48,15 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Deflection1D_i::StdMeshers_Deflection1D_i( PortableServer::POA_ptr thePOA,
-                                         int                     theStudyId,
-                                         ::SMESH_Gen*            theGenImpl )
+                                          int                     theStudyId,
+                                          ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   MESSAGE( "StdMeshers_Deflection1D_i::StdMeshers_Deflection1D_i" );
   myBaseImpl = new ::StdMeshers_Deflection1D( theGenImpl->GetANewId(),
-                                       theStudyId,
-                                       theGenImpl );
+                                        theStudyId,
+                                        theGenImpl );
 }
 
 //=============================================================================
@@ -89,7 +90,7 @@ void StdMeshers_Deflection1D_i::SetDeflection( CORBA::Double theValue )
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 
   // Update Python script
index 8fd89d4cd3dce15f31eecfe2f2ca00ccaf5b9bfe..c93966e410843ffd2d2770c781171b3eda7f0aec 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Deflection1D_i.hxx
 //           Moved here from SMESH_LocalLength_i.hxx
index e4ff4ac79f2f11cde22c0ba123b5e70c42c2d028..639eee0f1a4235895b77f54018a22db3ae424045 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_FixedPoints1D_i.cxx
 //  Author : Damien COQUERET, OCC
index 22bfd0b341462b4a5ac193c5b78f84c2d1bdac87..7296629486f23434e9e4b535fc254610cd7d7fc5 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_FixedPoints1D_i.hxx
 //  Author : Damien COQUERET, OCC
index cac9b45e2f9fd7b6a0bf4bbf4e91ef125075ed30..ebedc07b71ed88b34de3ac683213ae7f907da4f1 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Hexa_3D_i.cxx
 //           Moved here from SMESH_Hexa_3D_i.cxx
@@ -43,8 +44,8 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
-                                 int                     theStudyId,
-                                 ::SMESH_Gen*            theGenImpl )
+                                  int                     theStudyId,
+                                  ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
        SMESH_Algo_i( thePOA ),
@@ -52,8 +53,8 @@ StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
 {
   MESSAGE( "StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i" );
   myBaseImpl = new ::StdMeshers_Hexa_3D( theGenImpl->GetANewId(),
-                                   theStudyId,
-                                   theGenImpl );
+                                    theStudyId,
+                                    theGenImpl );
 }
 
 //=============================================================================
index 9c07aed6f7888980fafe51612bc247b513bffb96..a89154c37c0e9d60d63939f976439cb55602a9de 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Hexa_3D_i.hxx
 //           Moved here from SMESH_Hexa_3D_i.hxx
@@ -50,7 +51,7 @@ public:
   // Constructor
   StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
                    int                     theStudyId,
-                  ::SMESH_Gen*            theGenImpl );
+                   ::SMESH_Gen*            theGenImpl );
 
   // Destructor
   virtual ~StdMeshers_Hexa_3D_i();
index 7ad41bb93e1edeed0cc1a37650cf736b5ae0eed3..ecfd49788aff8307312fe178196c5dab1d20eb05 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_LayerDistribution2D_i.cxx
 //  Author : Edward AGAPOV
index d9e413d21be81fefa458f68326c24e3830bd1ddc..7910ad29978780951b534c23780cf8c55169299d 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_LayerDistribution2D_i.hxx
 //  Author : Edward AGAPOV
index 53707613c5bdeacf2986f64d5a8fd783ced70c0b..9a218fe9bcfebb3cbe07acc6db06578d25e82098 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_LayerDistribution_i.cxx
 //  Author : Edward AGAPOV
index f08a9d7efa5e869653508ea502379dcb468a9421..0e2db16798e59db3ec4a84055bdaa1c075a70c91 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_LayerDistribution_i.hxx
 //  Author : Edward AGAPOV
index 0d78830d6ec6e82d589d9c739880dc1efe20db40..00fb31c1a573df2ba5fbe2c52ca19f8e634f176d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_LengthFromEdges_i.cxx
 //           Moved here from SMESH_LengthFromEdges_i.cxx
@@ -43,15 +44,15 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_LengthFromEdges_i::StdMeshers_LengthFromEdges_i( PortableServer::POA_ptr thePOA,
-                                                 int                     theStudyId,
-                                                 ::SMESH_Gen*            theGenImpl )
+                                                  int                     theStudyId,
+                                                  ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   MESSAGE( "StdMeshers_LengthFromEdges_i::StdMeshers_LengthFromEdges_i" );
   myBaseImpl = new ::StdMeshers_LengthFromEdges( theGenImpl->GetANewId(),
-                                           theStudyId,
-                                           theGenImpl );
+                                            theStudyId,
+                                            theGenImpl );
 }
 
 //=============================================================================
@@ -85,7 +86,7 @@ void StdMeshers_LengthFromEdges_i::SetMode( CORBA::Long theMode )
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 }
 
index 77ebc48adbb5097c10d4c1446101a83564c2dda3..75fe7e36f360a0bb326d48e9a90fe1c16535afa2 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_LengthFromEdges_i.hxx
 //           Moved here from SMESH_LengthFromEdges_i.hxx
index fdc8c1c2755ebaf07becb73ba3fb4bcdbf98fbbe..f729ce2f1911c4181f287792d91e52c05a09eded 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_LocalLength_i.cxx
 //           Moved here from SMESH_LocalLength_i.cxx
@@ -88,7 +89,7 @@ void StdMeshers_LocalLength_i::SetLength( CORBA::Double theLength )
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 
   // Update Python script
@@ -112,7 +113,7 @@ void StdMeshers_LocalLength_i::SetPrecision( CORBA::Double thePrecision )
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 
   // Update Python script
index e31b08ece54eaa9ad81ccba5f7a0381e63a1dac3..e9da6e160e92cc9ee6e4822bd928ba099da95544 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_LocalLength_i.hxx
 //           Moved here from SMESH_LocalLength_i.hxx
index 4731e8888d64f6be713d564fec9009ea71661be7..fb2b004d0802950549b019aa34d45f94cea31c1a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_MEFISTO_2D_i.cxx
 //           Moved here from SMESH_MEFISTO_2D_i.cxx
@@ -43,8 +44,8 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_MEFISTO_2D_i::StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA,
-                                       int                     theStudyId,
-                                       ::SMESH_Gen*            theGenImpl )
+                                        int                     theStudyId,
+                                        ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
        SMESH_Algo_i( thePOA ),
@@ -52,8 +53,8 @@ StdMeshers_MEFISTO_2D_i::StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA
 {
   MESSAGE( "StdMeshers_MEFISTO_2D_i::StdMeshers_MEFISTO_2D_i" );
   myBaseImpl = new ::StdMeshers_MEFISTO_2D( theGenImpl->GetANewId(),
-                                      theStudyId,
-                                      theGenImpl );
+                                       theStudyId,
+                                       theGenImpl );
 }
 
 //=============================================================================
index f368c76c5ffb210ddc523a94d4c20439e9a5b53e..b9deab903ad2060e65ff710b490d855947f3aebc 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_MEFISTO_2D_i.hxx
 //           Moved here from SMESH_MEFISTO_2D_i.hxx
@@ -50,7 +51,7 @@ public:
   // Constructor
   StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA,
                       int                     theStudyId,
-                     ::SMESH_Gen*            theGenImpl );
+                      ::SMESH_Gen*            theGenImpl );
 
   // Destructor
   virtual ~StdMeshers_MEFISTO_2D_i();
index 8a81691353054fa03476dad2b32732d3f753229b..7b252cdb7acae0eccc0715323ecdd722026bb815 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_MaxElementArea_i.cxx
 //           Moved here from SMESH_MaxElementArea_i.cxx
@@ -47,15 +48,15 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i( PortableServer::POA_ptr thePOA,
-                                               int                     theStudyId,
-                                               ::SMESH_Gen*            theGenImpl )
+                                                int                     theStudyId,
+                                                ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ) 
 {
   MESSAGE( "StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i" );
   myBaseImpl = new ::StdMeshers_MaxElementArea( theGenImpl->GetANewId(),
-                                          theStudyId,
-                                          theGenImpl );
+                                           theStudyId,
+                                           theGenImpl );
 }
 
 //=============================================================================
@@ -89,7 +90,7 @@ void StdMeshers_MaxElementArea_i::SetMaxElementArea( CORBA::Double theArea )
   }
   catch (SALOME_Exception& S_ex) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 
   // Update Python script
index 199c4bb4b2428939f4c82b75ce90ca4e0aca40a9..2eab1968c87c39f9e0b99eb56e92e26e00d1a127 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_MaxElementArea_i.hxx
 //           Moved here from SMESH_MaxElementArea_i.hxx
@@ -48,7 +49,7 @@ public:
   // Constructor
   StdMeshers_MaxElementArea_i( PortableServer::POA_ptr thePOA,
                           int                     theStudyId,
-                         ::SMESH_Gen*            theGenImpl );
+                          ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_MaxElementArea_i();
 
index 7ee1eefdca44f39ce868e76c61800ee06410b13c..52d7644f3ede5e9bfd0a474407fee1a31ee48717 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_MaxElementVolume_i.cxx
 //           Moved here from SMESH_MaxElementVolume_i.cxx
@@ -47,15 +48,15 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_MaxElementVolume_i::StdMeshers_MaxElementVolume_i( PortableServer::POA_ptr thePOA,
-                                                   int                     theStudyId,
-                                                   ::SMESH_Gen*            theGenImpl )
+                                                    int                     theStudyId,
+                                                    ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   MESSAGE( "StdMeshers_MaxElementVolume_i::StdMeshers_MaxElementVolume_i" );
   myBaseImpl = new ::StdMeshers_MaxElementVolume( theGenImpl->GetANewId(),
-                                            theStudyId,
-                                            theGenImpl );
+                                             theStudyId,
+                                             theGenImpl );
 }
 
 //=============================================================================
@@ -89,7 +90,7 @@ void StdMeshers_MaxElementVolume_i::SetMaxElementVolume( CORBA::Double theVolume
   }
   catch (SALOME_Exception& S_ex) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 
   // Update Python script
index a01df54448f3413b39c5d47e065f9078a7da1f42..fe5cda90b9d141306403309ea0f0613995a1d9bc 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_MaxElementVolume_i.hxx
 //           Moved here from SMESH_MaxElementVolume_i.hxx
index bbed6c448ac82f49f3542fccfaa426c7e0c494a5..b53b170a5d9520f65482f5b57ec3d721f967ea7d 100644 (file)
@@ -1,27 +1,26 @@
-//  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
+//  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_MaxLength_i.cxx
 //  Module : SMESH
-
+//
 #include "StdMeshers_MaxLength_i.hxx"
 #include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
@@ -81,7 +80,7 @@ void StdMeshers_MaxLength_i::SetLength( CORBA::Double theLength )
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 
   // Update Python script
@@ -102,7 +101,7 @@ void StdMeshers_MaxLength_i::SetUsePreestimatedLength( CORBA::Boolean toUse )
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 
   // this is an internal kitchen call - no Python dump
@@ -123,7 +122,7 @@ void StdMeshers_MaxLength_i::SetPreestimatedLength( CORBA::Double theLength )
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
   // this is an internal kitchen call - no Python dump
   // Update Python script
index 715da7a239b368586733d0faa8dd061399c6c13c..fb3980903bc742427e93cc28d0b4c2612c6601ba 100644 (file)
@@ -1,27 +1,26 @@
-//  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
+//  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_MaxLength_i.hxx
 //  Module : SMESH
-
+//
 #ifndef _SMESH_MaxLength_I_HXX_
 #define _SMESH_MaxLength_I_HXX_
 
index 59f13b891b2742827ab627ccc0dd0568cb69b9fb..2e5c0a96e731206bbb3774b76709cdea9fe58ea6 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers_I : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_NotConformAllowed_i.cxx
 //  Author : Paul RASCLE, EDF
index be9f764c26bfffb7114e5df2301ae0f252640250..e7731a85e7eb559ebcb93638789d2f61c1bdc638 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers_I : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_NotConformAllowed_i.hxx
 //  Author : Paul RASCLE, EDF
index 2dabe905da9ab498c6622220c8acfe7248e19eee..5ab400ae446cdfedb1ee2bcad22b0dcbdad70db0 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_NumberOfLayers2D_i.cxx
 //  Author : Edward AGAPOV
index 898f9dd68300225701fc57c6d3f971432edeb10f..d11eec21211b7d16bf1fb77ff1fcbef4a07b35b0 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_NumberOfLayers2D_i.hxx
 //  Author : Edward AGAPOV
index 9779cfbdb0ac7bf80afca6c8d74587f3af4634e8..b2c64f5ee572f193c12639a68839483c3e39c3e1 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_NumberOfLayers_i.cxx
 //  Author : Edward AGAPOV
index 3d926b03b066d19673c137a5d96cc3c9c1edf95a..400f8dd3e9117908e79ecb4a47b7c784bc3daee0 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_NumberOfLayers_i.hxx
 //  Author : Edward AGAPOV
index 55a269f9b1beb87f340dc3135bbfec41192ed6d2..4265dec14468572fca4de7316f3e5af5b6e636ce 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_NumberOfSegments_i.cxx
 //           Moved here from SMESH_NumberOfSegments_i.cxx
@@ -46,15 +47,15 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_NumberOfSegments_i::StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA,
-                                                   int                     theStudyId,
-                                                   ::SMESH_Gen*            theGenImpl )
+                                                    int                     theStudyId,
+                                                    ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   MESSAGE( "StdMeshers_NumberOfSegments_i::StdMeshers_NumberOfSegments_i" );
   myBaseImpl = new ::StdMeshers_NumberOfSegments( theGenImpl->GetANewId(),
-                                            theStudyId,
-                                            theGenImpl );
+                                             theStudyId,
+                                             theGenImpl );
 }
 
 //=============================================================================
@@ -78,8 +79,8 @@ StdMeshers_NumberOfSegments_i::~StdMeshers_NumberOfSegments_i()
  */
 //=============================================================================
 SMESH::double_array* StdMeshers_NumberOfSegments_i::BuildDistributionExpr( const char* func, 
-                                                                          CORBA::Long nbSeg, 
-                                                                          CORBA::Long conv )
+                                                                           CORBA::Long nbSeg, 
+                                                                           CORBA::Long conv )
   throw ( SALOME::SALOME_Exception )
 {
   ASSERT( myBaseImpl );
@@ -99,8 +100,8 @@ SMESH::double_array* StdMeshers_NumberOfSegments_i::BuildDistributionExpr( const
 }
 
 SMESH::double_array* StdMeshers_NumberOfSegments_i::BuildDistributionTab( const SMESH::double_array& func,
-                                                                         CORBA::Long nbSeg, 
-                                                                         CORBA::Long conv )
+                                                                          CORBA::Long nbSeg, 
+                                                                          CORBA::Long conv )
   throw ( SALOME::SALOME_Exception )
 {
   ASSERT( myBaseImpl );
@@ -141,7 +142,7 @@ void StdMeshers_NumberOfSegments_i::SetNumberOfSegments( CORBA::Long theSegments
   }
   catch (SALOME_Exception& S_ex) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 
   // Update Python script
@@ -183,7 +184,7 @@ void StdMeshers_NumberOfSegments_i::SetReversedEdges( const SMESH::long_array& t
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 
   // Update Python script
@@ -274,7 +275,7 @@ void StdMeshers_NumberOfSegments_i::SetDistrType(CORBA::Long typ)
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 }
 
@@ -308,7 +309,7 @@ void StdMeshers_NumberOfSegments_i::SetScaleFactor( CORBA::Double theScaleFactor
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 }
 
@@ -330,7 +331,7 @@ CORBA::Double StdMeshers_NumberOfSegments_i::GetScaleFactor()
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
   return scale;
 }
@@ -354,7 +355,7 @@ void StdMeshers_NumberOfSegments_i::SetTableFunction(const SMESH::double_array&
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 }
 
@@ -373,7 +374,7 @@ SMESH::double_array* StdMeshers_NumberOfSegments_i::GetTableFunction()
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
   SMESH::double_array_var aRes = new SMESH::double_array();
   aRes->length(tbl->size());
@@ -398,7 +399,7 @@ void StdMeshers_NumberOfSegments_i::SetExpressionFunction(const char* expr)
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 }
 
@@ -417,7 +418,7 @@ char* StdMeshers_NumberOfSegments_i::GetExpressionFunction()
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
   return CORBA::string_dup(expr);
 }
@@ -438,7 +439,7 @@ void StdMeshers_NumberOfSegments_i::SetConversionMode(CORBA::Long conv )
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 }
 
@@ -457,7 +458,7 @@ CORBA::Long StdMeshers_NumberOfSegments_i::ConversionMode()
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
   return conv;
 }
index 30b9d08b7d8c606a1f5daf8d5765abd240517c73..7491855c7d12c3d1a417906297069e31c4d2b355 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_NumberOfSegments_i.hxx
 //           Moved here from SMESH_NumberOfSegments_i.hxx
@@ -49,7 +50,7 @@ public:
   // Constructor
   StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA,
                             int                     theStudyId,
-                           ::SMESH_Gen*            theGenImpl );
+                            ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_NumberOfSegments_i();
 
index 53330557b72f55d0af148e60b5e69a4b2c0aa637..45e1950e9abb14199ff46fc5da0f59ec956fd7ce 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : StdMeshers_ObjRefUlils.cxx
 // Created   : Wed Oct 18 15:38:22 2006
index 4556810cfe75cd43982a5149db512e0a775dd61d..da361a56b31f72a02ca712e708efb3157243889a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH : implementaion of SMESH idl descriptions
 // File      : StdMeshers_ObjRefUlils.hxx
 // Created   : Wed Oct 18 15:15:27 2006
index f6e2a3f70189b98a9f7fd3ad17c66376374d6609..866bed25cb9d5a0ae675883b5590e7a1afb6c512 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Prism_3D_i.cxx
 //           Moved here from SMESH_Prism_3D_i.cxx
@@ -41,8 +42,8 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Prism_3D_i::StdMeshers_Prism_3D_i( PortableServer::POA_ptr thePOA,
-                                 int                     theStudyId,
-                                 ::SMESH_Gen*            theGenImpl )
+                                  int                     theStudyId,
+                                  ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
        SMESH_Algo_i( thePOA ),
@@ -75,8 +76,8 @@ StdMeshers_Prism_3D_i::~StdMeshers_Prism_3D_i()
 //=============================================================================
 
 StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i( PortableServer::POA_ptr thePOA,
-                                 int                     theStudyId,
-                                 ::SMESH_Gen*            theGenImpl )
+                                  int                     theStudyId,
+                                  ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
        SMESH_Algo_i( thePOA ),
@@ -84,8 +85,8 @@ StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i( PortableServer::POA_pt
 {
   MESSAGE( "StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i" );
   myBaseImpl = new ::StdMeshers_RadialPrism_3D( theGenImpl->GetANewId(),
-                                   theStudyId,
-                                   theGenImpl );
+                                    theStudyId,
+                                    theGenImpl );
 }
 //-----------------------------------------------------------------------------
 
index fc09a08db0a115f915eb1b40624e2115ce03324e..a4f9d3c97fbe3954299fb22ff256c3a9406c3850 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Prism_3D_i.hxx
 //           Moved here from SMESH_Prism_3D_i.hxx
index 62d7d7af7503fee9276ee86019a8011033486c14..c68a8fe8292419cbc4f162195cd5d04cd7cf9ed7 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_ProjectionSource1D_i.cxx
 //  Author : Edward AGAPOV
index f73d75762aa7bbf2bd50b66249a50cc722cfb6bf..d416a578744845a4e16601b6d96b4c547ab1b6ab 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_ProjectionSource1D_i.hxx
 //  Author : Edward AGAPOV
index 6186a7b04639312e809c330f18bfa99a60a9bd60..50bc5c3198b0673e2d2fd5de3364668eb0dd1b40 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_ProjectionSource2D_i.cxx
 //  Author : Edward AGAPOV
index 4aa63c7a5901817eeef6478b68be9a4903c1327e..281ea979b34c033548dd9d33a04d2247d3671255 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_ProjectionSource2D_i.hxx
 //  Author : Edward AGAPOV
index 5ee44b3fc4e1077c6ba22d91ce5678f50c960d30..d12e967b6b58061be62b9e0cc6ec2b95c0154155 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes
 //  File   : StdMeshers_ProjectionSource3D_i.cxx
 //  Author : Edward AGAPOV
index d8eff8b7f8ce6d2caaff375d80f8b2b0a489c252..644bcb37a42a4bbd33b60d8f0695489e01d408a7 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_ProjectionSource3D_i.hxx
 //  Author : Edward AGAPOV
index 185bdd6ad0240e87160d8943769db260606a1b6b..9487f148fddfe2ea7dec1e959aee8cca07cd530d 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Projection_3D_i.cxx
 //           Moved here from SMESH_Projection_3D_i.cxx
@@ -53,8 +54,8 @@ StdMeshers_Projection_3D_i::StdMeshers_Projection_3D_i( PortableServer::POA_ptr
 {
   MESSAGE( "StdMeshers_Projection_3D_i::StdMeshers_Projection_3D_i" );
   myBaseImpl = new ::StdMeshers_Projection_3D( theGenImpl->GetANewId(),
-                                   theStudyId,
-                                   theGenImpl );
+                                    theStudyId,
+                                    theGenImpl );
 }
 //-----------------------------------------------------------------------------
 
@@ -87,8 +88,8 @@ StdMeshers_Projection_2D_i::StdMeshers_Projection_2D_i( PortableServer::POA_ptr
 {
   MESSAGE( "StdMeshers_Projection_2D_i::StdMeshers_Projection_2D_i" );
   myBaseImpl = new ::StdMeshers_Projection_2D( theGenImpl->GetANewId(),
-                                   theStudyId,
-                                   theGenImpl );
+                                    theStudyId,
+                                    theGenImpl );
 }
 //-----------------------------------------------------------------------------
 
@@ -121,8 +122,8 @@ StdMeshers_Projection_1D_i::StdMeshers_Projection_1D_i( PortableServer::POA_ptr
 {
   MESSAGE( "StdMeshers_Projection_1D_i::StdMeshers_Projection_1D_i" );
   myBaseImpl = new ::StdMeshers_Projection_1D( theGenImpl->GetANewId(),
-                                   theStudyId,
-                                   theGenImpl );
+                                    theStudyId,
+                                    theGenImpl );
 }
 //-----------------------------------------------------------------------------
 
index 7fdba6588fcff1fca1e08490765abf924e8a3b66..953d5cf56cc92e68b44f21d71a447a3313a1ffd1 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Hexa_3D_i.hxx
 //           Moved here from SMESH_Hexa_3D_i.hxx
index 707e41600cc1a5664bcdc65a97787979330843aa..12dd81b9ee6aea62fedccc10037307e51981d667 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Propagation_i.cxx
 //  Module : SMESH
index 77f8631758f64bcbe69d8e30a07759f2521d866d..6a0a300ae8ea320b0ede538caae8be456e435430 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Propagation_i.hxx
 //  Module : SMESH
index 9113359b680673c93525b4a975b71fcce0ec1e3c..612ccc9eefd0166ce97dd84fc856e42f7a738c15 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_QuadrangleParams_i.cxx
 //  Author : Sergey KUUL, OCC
@@ -47,15 +45,15 @@ using namespace std;
 
 StdMeshers_QuadrangleParams_i::StdMeshers_QuadrangleParams_i
                                           (PortableServer::POA_ptr thePOA,
-                                          int                     theStudyId,
-                                          ::SMESH_Gen*            theGenImpl )
+                                           int                     theStudyId,
+                                           ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA )
 {
   MESSAGE( "StdMeshers_QuadrangleParams_i::StdMeshers_QuadrangleParams_i" );
   myBaseImpl = new ::StdMeshers_QuadrangleParams(theGenImpl->GetANewId(),
-                                                theStudyId,
-                                                theGenImpl);
+                                                 theStudyId,
+                                                 theGenImpl);
 }
 
 //=============================================================================
@@ -88,12 +86,12 @@ void StdMeshers_QuadrangleParams_i::SetTriaVertex(CORBA::Long vertID)
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 
   // Update Python script
-  /*  SMESH::TPythonDump() << _this() << ".SetEdgesToReverse( "
-      << theList << " )";*/
+  SMESH::TPythonDump() << _this() << ".SetTriaVertex( "
+      << vertID << " )";
 }
 
 //=============================================================================
index ed2977f19e403de2cea139970885394216fa8f6a..fa695107deb513945fe01eac85f2733dc63d32b8 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_QuadrangleParams_i.hxx
 //  Author : Sergey KUUL, OCC
@@ -46,8 +44,8 @@ class STDMESHERS_I_EXPORT StdMeshers_QuadrangleParams_i:
 public:
   // Constructor
   StdMeshers_QuadrangleParams_i( PortableServer::POA_ptr thePOA,
-                                int                     theStudyId,
-                                ::SMESH_Gen*            theGenImpl );
+                                 int                     theStudyId,
+                                 ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_QuadrangleParams_i();
 
index c199fcebd492d175a1d81e79d59c5761eed88a17..d6b06e577785e0e4bc837dad02d63a8e05d90290 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_QuadranglePreference_i.cxx
 //           Moved here from SMESH_LocalLength_i.cxx
index fc63462a951d4e99f98cad90fe1dcead218b4777..7137873612f687fa32fc7501688660e5b970ffca 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_QuadranglePreference_i.hxx
 //           Moved here from SMESH_LocalLength_i.hxx
index 7b0ce1e63a99c666b15306447ac080bd07358dd6..e1e14559797b9bf631b9d50bd0965555ced19c72 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Quadrangle_2D_i.cxx
 //           Moved here from SMESH_Quadrangle_2D_i.cxx
@@ -43,8 +44,8 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr thePOA,
-                                             int                     theStudyId,
-                                             ::SMESH_Gen*            theGenImpl )
+                                              int                     theStudyId,
+                                              ::SMESH_Gen*            theGenImpl )
      : SALOME::GenericObj_i( thePOA ), 
        SMESH_Hypothesis_i( thePOA ), 
        SMESH_Algo_i( thePOA ),
@@ -52,8 +53,8 @@ StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr
 {
   MESSAGE( "StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i" );
   myBaseImpl = new ::StdMeshers_Quadrangle_2D( theGenImpl->GetANewId(),
-                                         theStudyId,
-                                         theGenImpl );
+                                          theStudyId,
+                                          theGenImpl );
 }
 
 //=============================================================================
index abe6ce46abf5a33d7ec0915f636b9122e8ea5f8e..d0771ff60662bc8ec9ca6d48e293d083d57f2a92 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Quadrangle_2D_i.hxx
 //           Moved here from SMESH_Quadrangle_2D_i.hxx
@@ -50,7 +51,7 @@ public:
   // Constructor
   StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr thePOA,
                          int                     theStudyId,
-                        ::SMESH_Gen*            theGenImpl );
+                         ::SMESH_Gen*            theGenImpl );
 
   // Destructor
   virtual ~StdMeshers_Quadrangle_2D_i();
index 46052eb94af26be2c82a67f69a130cb8f0617238..0e52cbe11467fd43d03c748d6301e526b75c96f0 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_QuadraticMesh_i.cxx
 //           Moved here from SMESH_LocalLength_i.cxx
index ecd7baaa349ee5e5a26721abbc55cc01869cae64..b32f2359700e09f77d0aaf14979b4a9dd7628c1c 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_QuadraticMesh_i.hxx
 //           Moved here from SMESH_LocalLength_i.hxx
index d588453dcdfdc9f1f45d497bb8b0450cdf79a0d2..090e00ee9172a5a090af9fce374ba59186dfb264 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_RadialQuadrangle_1D2D_i.cxx
 //  Author : Paul RASCLE, EDF
index 41f3cd8650468dce5407bcf8b7f363bf4958018d..85a6e3ae05f0b69f6d4ac8bebf982bb5ab944d64 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_RadialQuadrangle_1D2D_i.hxx
 //  Author : Paul RASCLE, EDF
index 1ac655bda80f6d1662f49f8ae98d73626d8e7e7e..2b75cdc8a769e52f9e785ce52864e53a50e1524a 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Regular_1D_i.cxx
 //           Moved here from SMESH_Regular_1D_i.cxx
index 2c3e89ba12516ac8f8c8c523b09a65eef94a380e..bfc463de51da897fcacd0496e3889778e588b944 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Regular_1D_i.hxx
 //           Moved here from SMESH_Regular_1D_i.hxx
@@ -48,7 +49,7 @@ public:
   // Constructor
   StdMeshers_Regular_1D_i( PortableServer::POA_ptr thePOA,
                       int                     theStudyId,
-                     ::SMESH_Gen*            theGenImpl );
+                      ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~StdMeshers_Regular_1D_i();
  
index fb81f9e9f00533856a45a0db2b0a43f985e9381f..2ddefea814c56575e62c7cf4f3af81f91d06cb11 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Projection_3D_i.cxx
 //           Moved here from SMESH_Projection_3D_i.cxx
index 526bfca8fcb33ed021ebb525eaa34ab46609f2ea..75c714e2878948cc07e523567fa3e94e67f38eb8 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_SegmentAroundVertex_0D.hxx
 //  Module : SMESH
index 9ee69e626fef2e48f9469869152beae14384b062..3bb2f92e33aaefee517fa372fb3531bdc2567a7e 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_SegmentLengthAroundVertex_i.cxx
 //  Module : SMESH
index 2add0396a7dd1a7e6f4ca7cfe6601acce33c49d6..5623321f09fc60c7ccd3beb984e63c6c0eb34f00 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_SegmentLengthAroundVertex_i.hxx
 //  Module : SMESH
index 628f4acff3cc2ba06e57270505a0de4dc8423888..5c164c05dc924682b43989eb8f1df699d1c5e484 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_StartEndLength_i.cxx
 //           Moved here from SMESH_LocalLength_i.cxx
@@ -90,7 +91,7 @@ void StdMeshers_StartEndLength_i::SetLength(CORBA::Double theLength,
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 
   // Update Python script
@@ -158,7 +159,7 @@ void StdMeshers_StartEndLength_i::SetReversedEdges( const SMESH::long_array& the
   }
   catch ( SALOME_Exception& S_ex ) {
     THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                 SALOME::BAD_PARAM );
+                                  SALOME::BAD_PARAM );
   }
 
   // Update Python script
index 89ec616964e63e659a415f25dd1a124103db3f96..da3dc9297174d3278f0dc3df028c4f6a732a4758 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_StartEndLength_i.hxx
 //           Moved here from SMESH_LocalLength_i.hxx
index 330216d898c518924feffd3e23bbd4f36d612e24..62606418eb9407d63d34201bc04637493adde75f 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : StdMeshers_TrianglePreference_i.cxx
 //  Author : 
 //  Module : SMESH
index ce4826305ec8c92d26165f8671e74d769eafe876..941021954e3163076a25285c4c3be14da50915fe 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : StdMeshers_TrianglePreference_i.hxx
 //  Author : 
 //  Module : SMESH
index 63814d21806b9c89c5baaa7cff1b35330afcebd9..ced040a7b6d47e4cda1483ac5e7856a4e72c872f 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Projection_3D_i.cxx
 //           Moved here from SMESH_Projection_3D_i.cxx
index 32035e3c1bfe403b64c2130b23453af8079cc499..ee5829c934ac81015174e539177dceb6cbcde469 100644 (file)
@@ -1,7 +1,4 @@
-//  Copyright (C) 2007-2008  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
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  This library is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU Lesser General Public
@@ -19,6 +16,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_UseExisting_1D2D.hxx
 //  Module : SMESH
index 952bc8a8d259aa5902954f55d3e8f848faa54162..f50fae594d4c96aa2f8fe37fd0530a5e448dc22c 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SMESH StdMeshers : implementaion of SMESH idl descriptions
 //  File   : StdMeshers_i.cxx
 //  Author : Julia DOROVSKIKH
 //  Module : SMESH
-
+//
 #include "SMESH_StdMeshers_I.hxx"
 
 #include "SMESH_Gen_i.hxx"