Salome HOME
Merge branch V7_3_1_BR
authorvsr <vsr@opencascade.com>
Thu, 3 Apr 2014 11:25:50 +0000 (15:25 +0400)
committervsr <vsr@opencascade.com>
Thu, 3 Apr 2014 11:36:10 +0000 (15:36 +0400)
1134 files changed:
CMakeLists.txt
SMESH_version.h.in
SalomeSMESHConfig.cmake.in
adm_local/CMakeLists.txt
adm_local/cmake_files/CMakeLists.txt
adm_local/cmake_files/FindCGNS.cmake
adm_local/cmake_files/FindSMESH.cmake
adm_local/cmake_files/FindSalomeCGNS.cmake
adm_local/cmake_files/FindSalomeSMESH.cmake
adm_local/cmake_files/FindSalomeTBB.cmake
adm_local/cmake_files/FindSalomef2c.cmake
adm_local/cmake_files/FindTBB.cmake
adm_local/cmake_files/Findf2c.cmake
adm_local/unix/CMakeLists.txt
adm_local/unix/config_files/CMakeLists.txt
adm_local/unix/config_files/check_Platform.m4
adm_local/unix/config_files/check_SMESH.m4
adm_local/unix/config_files/check_cgal.m4
adm_local/unix/config_files/check_cgns.m4
adm_local/unix/config_files/check_f77.m4
adm_local/unix/config_files/check_padder.m4
adm_local/unix/config_files/check_qwt.m4
bin/CMakeLists.txt
bin/smesh_setenv.py
doc/CMakeLists.txt
doc/docutils/CMakeLists.txt [deleted file]
doc/docutils/conf.py.in [deleted file]
doc/docutils/docapi.rst [deleted file]
doc/docutils/index.rst [deleted file]
doc/docutils/overview.rst [deleted file]
doc/salome/CMakeLists.txt
doc/salome/examples/CMakeLists.txt
doc/salome/examples/cartesian_algo.py
doc/salome/examples/defining_hypotheses_ex01.py
doc/salome/examples/defining_hypotheses_ex08.py
doc/salome/examples/defining_hypotheses_ex16.py
doc/salome/examples/testme.py
doc/salome/examples/use_existing_faces.py
doc/salome/gui/CMakeLists.txt
doc/salome/gui/SMESH/CMakeLists.txt
doc/salome/gui/SMESH/collect_mesh_methods.py
doc/salome/gui/SMESH/doxyfile.in
doc/salome/gui/SMESH/doxyfile_py.in
doc/salome/gui/SMESH/images/a-geometric1d.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/cartesian3D_hyp.png
doc/salome/gui/SMESH/images/cartesian_implement_edge.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/colors_size.png
doc/salome/gui/SMESH/images/createmesh-inv.png [changed mode: 0755->0644]
doc/salome/gui/SMESH/images/duplicate01.png
doc/salome/gui/SMESH/images/duplicate02.png
doc/salome/gui/SMESH/images/duplicate03.png
doc/salome/gui/SMESH/images/duplicate04.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/hypo_quad_params_dialog.png
doc/salome/gui/SMESH/images/hypo_quad_params_dialog_enf.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/hypo_quad_params_dialog_vert.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/hypo_quad_params_enfnodes_algo.png [new file with mode: 0755]
doc/salome/gui/SMESH/images/meshtopass.png [deleted file]
doc/salome/gui/SMESH/images/meshtopass1.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/meshtopass2.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/pref22.png
doc/salome/gui/SMESH/images/split_into_prisms.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/split_into_tetra.png
doc/salome/gui/SMESH/images/viscous_layers_hyp.png
doc/salome/gui/SMESH/input/1d_meshing_hypo.doc
doc/salome/gui/SMESH/input/2d_meshing_hypo.doc
doc/salome/gui/SMESH/input/about_hypo.doc
doc/salome/gui/SMESH/input/about_meshes.doc
doc/salome/gui/SMESH/input/additional_hypo.doc
doc/salome/gui/SMESH/input/basic_meshing_algos.doc
doc/salome/gui/SMESH/input/cartesian_algo.doc
doc/salome/gui/SMESH/input/colors_size.doc
doc/salome/gui/SMESH/input/constructing_meshes.doc
doc/salome/gui/SMESH/input/double_nodes_page.doc
doc/salome/gui/SMESH/input/index.doc
doc/salome/gui/SMESH/input/mesh_preferences.doc
doc/salome/gui/SMESH/input/mesh_through_point.doc
doc/salome/gui/SMESH/input/modifying_meshes.doc
doc/salome/gui/SMESH/input/smeshpy_interface.doc
doc/salome/gui/SMESH/input/split_to_tetra.doc
doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc
doc/salome/gui/SMESH/input/tui_use_existing_faces.doc
doc/salome/gui/SMESH/input/use_existing_algos.doc
doc/salome/gui/SMESH/static/footer.html
doc/salome/tui/CMakeLists.txt
doc/salome/tui/doxyfile.in
doc/salome/tui/static/footer.html
idl/CMakeLists.txt
idl/SMESH_BasicHypothesis.idl
idl/SMESH_Filter.idl
idl/SMESH_Gen.idl
idl/SMESH_Group.idl
idl/SMESH_Hypothesis.idl
idl/SMESH_Measurements.idl
idl/SMESH_Mesh.idl
idl/SMESH_MeshEditor.idl
idl/SMESH_Pattern.idl
resources/CMakeLists.txt
resources/SMESHCatalog.xml.in
resources/SalomeApp.xml.in
resources/StdMeshers.xml.in
resources/mesh_duplicate_group_boundary.png [new file with mode: 0644]
resources/mesh_move_without_node.png [new file with mode: 0644]
src/CMakeLists.txt
src/Controls/CMakeLists.txt
src/Controls/SMESH_Controls.cxx
src/Controls/SMESH_ControlsDef.hxx
src/Driver/CMakeLists.txt
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/DriverCGNS/CMakeLists.txt
src/DriverCGNS/DriverCGNS_Read.cxx
src/DriverCGNS/DriverCGNS_Read.hxx
src/DriverCGNS/DriverCGNS_Write.cxx
src/DriverCGNS/DriverCGNS_Write.hxx
src/DriverCGNS/SMESH_DriverCGNS.hxx
src/DriverDAT/CMakeLists.txt
src/DriverDAT/DriverDAT_R_SMDS_Mesh.cxx
src/DriverDAT/DriverDAT_R_SMDS_Mesh.h
src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx
src/DriverDAT/DriverDAT_W_SMDS_Mesh.h
src/DriverDAT/SMESH_DriverDAT.hxx
src/DriverGMF/CMakeLists.txt
src/DriverGMF/DriverGMF.cxx
src/DriverGMF/DriverGMF.hxx
src/DriverGMF/DriverGMF_Read.cxx
src/DriverGMF/DriverGMF_Read.hxx
src/DriverGMF/DriverGMF_Write.cxx
src/DriverGMF/DriverGMF_Write.hxx
src/DriverGMF/SMESH_DriverGMF.hxx
src/DriverMED/CMakeLists.txt
src/DriverMED/DriverMED.hxx
src/DriverMED/DriverMED_Family.cxx
src/DriverMED/DriverMED_Family.h
src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx
src/DriverMED/DriverMED_R_SMESHDS_Mesh.h
src/DriverMED/DriverMED_W_Field.cxx [new file with mode: 0644]
src/DriverMED/DriverMED_W_Field.h [new file with mode: 0644]
src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx
src/DriverMED/DriverMED_W_SMESHDS_Mesh.h
src/DriverMED/SMESH_DriverMED.hxx
src/DriverSTL/CMakeLists.txt
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/SMESH_DriverSTL.hxx
src/DriverUNV/CMakeLists.txt
src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx
src/DriverUNV/DriverUNV_R_SMDS_Mesh.h
src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx
src/DriverUNV/DriverUNV_W_SMDS_Mesh.h
src/DriverUNV/SMESH_DriverUNV.hxx
src/DriverUNV/UNV164_Structure.cxx
src/DriverUNV/UNV164_Structure.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/UNV2420_Structure.cxx
src/DriverUNV/UNV2420_Structure.hxx
src/DriverUNV/UNV_Utilities.cxx
src/DriverUNV/UNV_Utilities.hxx
src/MEDWrapper/Base/CMakeLists.txt
src/MEDWrapper/Base/MED_Algorithm.cxx
src/MEDWrapper/Base/MED_Algorithm.hxx
src/MEDWrapper/Base/MED_Common.hxx
src/MEDWrapper/Base/MED_CoordUtils.cxx
src/MEDWrapper/Base/MED_CoordUtils.hxx
src/MEDWrapper/Base/MED_GaussDef.cxx
src/MEDWrapper/Base/MED_GaussDef.hxx
src/MEDWrapper/Base/MED_GaussUtils.cxx
src/MEDWrapper/Base/MED_GaussUtils.hxx
src/MEDWrapper/Base/MED_SharedPtr.hxx
src/MEDWrapper/Base/MED_SliceArray.hxx
src/MEDWrapper/Base/MED_Structures.cxx
src/MEDWrapper/Base/MED_Structures.hxx
src/MEDWrapper/Base/MED_TStructures.hxx
src/MEDWrapper/Base/MED_TWrapper.hxx
src/MEDWrapper/Base/MED_Utilities.cxx
src/MEDWrapper/Base/MED_Utilities.hxx
src/MEDWrapper/Base/MED_Vector.hxx
src/MEDWrapper/Base/MED_Wrapper.cxx
src/MEDWrapper/Base/MED_Wrapper.hxx
src/MEDWrapper/Base/MED_WrapperBase.hxx
src/MEDWrapper/CMakeLists.txt
src/MEDWrapper/Factory/CMakeLists.txt
src/MEDWrapper/Factory/MED_Factory.cxx
src/MEDWrapper/Factory/MED_Factory.hxx
src/MEDWrapper/Factory/MED_Test.cxx
src/MEDWrapper/Factory/MED_WrapperFactory.hxx
src/MEDWrapper/Factory/mprint_version.cxx
src/MEDWrapper/V2_2/CMakeLists.txt
src/MEDWrapper/V2_2/MED_V2_2_Wrapper.cxx
src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx
src/MEFISTO2/CMakeLists.txt
src/MEFISTO2/Rn.h
src/MEFISTO2/aptrte.cxx
src/MEFISTO2/aptrte.h
src/MEFISTO2/areteideale.f
src/MEFISTO2/trte.f
src/OBJECT/CMakeLists.txt
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_CellLabelActor.cxx
src/OBJECT/SMESH_CellLabelActor.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_NodeLabelActor.cxx
src/OBJECT/SMESH_NodeLabelActor.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/OBJECT/SMESH_SVTKActor.cxx
src/OBJECT/SMESH_SVTKActor.h
src/OBJECT/SMESH_ScalarBarActor.cxx
src/OBJECT/SMESH_ScalarBarActor.h
src/PluginUtils/CMakeLists.txt
src/PluginUtils/GeomSelectionTools.cxx
src/PluginUtils/GeomSelectionTools.h
src/SMDS/CMakeLists.txt
src/SMDS/ObjectPool.hxx
src/SMDS/SMDSAbs_ElementType.hxx
src/SMDS/SMDS_BallElement.cxx
src/SMDS/SMDS_BallElement.hxx
src/SMDS/SMDS_Downward.cxx
src/SMDS/SMDS_Downward.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_IteratorOnIterators.hxx
src/SMDS/SMDS_LinearEdge.cxx
src/SMDS/SMDS_LinearEdge.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_MeshCell.cxx
src/SMDS/SMDS_MeshCell.hxx
src/SMDS/SMDS_MeshEdge.cxx
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_MeshNodeIDFactory.cxx
src/SMDS/SMDS_MeshNodeIDFactory.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
src/SMDS/SMDS_TypeOfPosition.hxx
src/SMDS/SMDS_UnstructuredGrid.cxx
src/SMDS/SMDS_UnstructuredGrid.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/SMDS_VtkCellIterator.cxx
src/SMDS/SMDS_VtkCellIterator.hxx
src/SMDS/SMDS_VtkEdge.cxx
src/SMDS/SMDS_VtkEdge.hxx
src/SMDS/SMDS_VtkFace.cxx
src/SMDS/SMDS_VtkFace.hxx
src/SMDS/SMDS_VtkVolume.cxx
src/SMDS/SMDS_VtkVolume.hxx
src/SMDS/SMESH_SMDS.hxx
src/SMDS/chrono.cxx
src/SMDS/chrono.hxx
src/SMESH/CMakeLists.txt
src/SMESH/SMESH_Algo.cxx
src/SMESH/SMESH_Algo.hxx
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_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_Pattern.cxx
src/SMESH/SMESH_Pattern.hxx
src/SMESH/SMESH_ProxyMesh.cxx
src/SMESH/SMESH_ProxyMesh.hxx
src/SMESH/SMESH_SMESH.hxx
src/SMESH/SMESH_subMesh.cxx
src/SMESH/SMESH_subMesh.hxx
src/SMESH/SMESH_subMeshEventListener.hxx
src/SMESH/memoire.h
src/SMESHClient/CMakeLists.txt
src/SMESHClient/SMESHClientBin.cxx
src/SMESHClient/SMESH_Client.cxx
src/SMESHClient/SMESH_Client.hxx
src/SMESHDS/CMakeLists.txt
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_GroupOnFilter.cxx
src/SMESHDS/SMESHDS_GroupOnFilter.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_Controls.hxx
src/SMESHDS/SMESH_SMESHDS.hxx
src/SMESHFiltersSelection/CMakeLists.txt
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/CMakeLists.txt
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI.h
src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx
src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.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_CopyMeshDlg.cxx
src/SMESHGUI/SMESHGUI_CopyMeshDlg.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_DuplicateNodesDlg.cxx
src/SMESHGUI/SMESHGUI_DuplicateNodesDlg.h
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h
src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionDlg.h
src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx [new file with mode: 0644]
src/SMESHGUI/SMESHGUI_FieldSelectorWdg.h [new file with mode: 0644]
src/SMESHGUI/SMESHGUI_FileInfoDlg.cxx
src/SMESHGUI/SMESHGUI_FileInfoDlg.h
src/SMESHGUI/SMESHGUI_FileValidator.cxx
src/SMESHGUI/SMESHGUI_FileValidator.h
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
src/SMESHGUI/SMESHGUI_FindElemByPointDlg.h
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_Measurements.cxx
src/SMESHGUI/SMESHGUI_Measurements.h
src/SMESHGUI/SMESHGUI_MergeDlg.cxx
src/SMESHGUI/SMESHGUI_MergeDlg.h
src/SMESHGUI/SMESHGUI_MeshDlg.cxx
src/SMESHGUI/SMESHGUI_MeshDlg.h
src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx
src/SMESHGUI/SMESHGUI_MeshEditPreview.h
src/SMESHGUI/SMESHGUI_MeshInfo.cxx
src/SMESHGUI/SMESHGUI_MeshInfo.h
src/SMESHGUI/SMESHGUI_MeshInfosBox.cxx
src/SMESHGUI/SMESHGUI_MeshInfosBox.h
src/SMESHGUI/SMESHGUI_MeshOp.cxx
src/SMESHGUI/SMESHGUI_MeshOp.h
src/SMESHGUI/SMESHGUI_MeshOrderDlg.cxx
src/SMESHGUI/SMESHGUI_MeshOrderDlg.h
src/SMESHGUI/SMESHGUI_MeshOrderOp.cxx
src/SMESHGUI/SMESHGUI_MeshOrderOp.h
src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx
src/SMESHGUI/SMESHGUI_MeshPatternDlg.h
src/SMESHGUI/SMESHGUI_MeshUtils.cxx
src/SMESHGUI/SMESHGUI_MeshUtils.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_ScalarBarDlg.cxx
src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.h
src/SMESHGUI/SMESHGUI_PreviewDlg.cxx
src/SMESHGUI/SMESHGUI_PreviewDlg.h
src/SMESHGUI/SMESHGUI_PropertiesDlg.cxx
src/SMESHGUI/SMESHGUI_PropertiesDlg.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_ReorientFacesDlg.cxx
src/SMESHGUI/SMESHGUI_ReorientFacesDlg.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
src/SMESHGUI/SMESHGUI_ScaleDlg.h
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_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_XmlHandler.cxx
src/SMESHGUI/SMESHGUI_XmlHandler.h
src/SMESHGUI/SMESH_SMESHGUI.hxx
src/SMESHGUI/SMESH_images.ts
src/SMESHGUI/SMESH_msg_en.ts
src/SMESHGUI/SMESH_msg_fr.ts
src/SMESHGUI/SMESH_msg_ja.ts
src/SMESHUtils/CMakeLists.txt
src/SMESHUtils/SMESH_Block.cxx
src/SMESHUtils/SMESH_Block.hxx
src/SMESHUtils/SMESH_Comment.hxx
src/SMESHUtils/SMESH_ComputeError.hxx
src/SMESHUtils/SMESH_File.cxx
src/SMESHUtils/SMESH_File.hxx
src/SMESHUtils/SMESH_MeshAlgos.cxx
src/SMESHUtils/SMESH_MeshAlgos.hxx
src/SMESHUtils/SMESH_Octree.cxx
src/SMESHUtils/SMESH_Octree.hxx
src/SMESHUtils/SMESH_OctreeNode.cxx
src/SMESHUtils/SMESH_OctreeNode.hxx
src/SMESHUtils/SMESH_Quadtree.cxx
src/SMESHUtils/SMESH_Quadtree.hxx
src/SMESHUtils/SMESH_Tree.hxx
src/SMESHUtils/SMESH_TryCatch.cxx
src/SMESHUtils/SMESH_TryCatch.hxx
src/SMESHUtils/SMESH_TypeDefs.hxx
src/SMESHUtils/SMESH_Utils.hxx
src/SMESH_I/CMakeLists.txt
src/SMESH_I/SMESH.hxx
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_Measurements_i.cxx
src/SMESH_I/SMESH_Measurements_i.hxx
src/SMESH_I/SMESH_MeshEditor_i.cxx
src/SMESH_I/SMESH_MeshEditor_i.hxx
src/SMESH_I/SMESH_MeshPartDS.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_PreMeshInfo.cxx
src/SMESH_I/SMESH_PreMeshInfo.hxx
src/SMESH_I/SMESH_PythonDump.hxx
src/SMESH_I/SMESH_subMesh_i.cxx
src/SMESH_I/SMESH_subMesh_i.hxx
src/SMESH_PY/CMakeLists.txt
src/SMESH_PY/__init__.py
src/SMESH_PY/smeshstudytools.py
src/SMESH_SWIG/CMakeLists.txt
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/StdMeshersBuilder.py
src/SMESH_SWIG/__init__.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/smeshBuilder.py
src/SMESH_SWIG/smesh_algorithm.py
src/SMESH_SWIG_WITHIHM/CMakeLists.txt
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h
src/SMESH_SWIG_WITHIHM/libSMESH_Swig.i
src/StdMeshers/CMakeLists.txt
src/StdMeshers/SMESH_StdMeshers.hxx
src/StdMeshers/StdMeshers_Adaptive1D.cxx
src/StdMeshers/StdMeshers_Adaptive1D.hxx
src/StdMeshers/StdMeshers_Arithmetic1D.cxx
src/StdMeshers/StdMeshers_Arithmetic1D.hxx
src/StdMeshers/StdMeshers_AutomaticLength.cxx
src/StdMeshers/StdMeshers_AutomaticLength.hxx
src/StdMeshers/StdMeshers_CartesianParameters3D.cxx
src/StdMeshers/StdMeshers_CartesianParameters3D.hxx
src/StdMeshers/StdMeshers_Cartesian_3D.cxx
src/StdMeshers/StdMeshers_Cartesian_3D.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_Geometric1D.cxx [new file with mode: 0644]
src/StdMeshers/StdMeshers_Geometric1D.hxx [new file with mode: 0644]
src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx
src/StdMeshers/StdMeshers_HexaFromSkin_3D.hxx
src/StdMeshers/StdMeshers_Hexa_3D.cxx
src/StdMeshers/StdMeshers_Hexa_3D.hxx
src/StdMeshers/StdMeshers_ImportSource.cxx
src/StdMeshers/StdMeshers_ImportSource.hxx
src/StdMeshers/StdMeshers_Import_1D.cxx
src/StdMeshers/StdMeshers_Import_1D.hxx
src/StdMeshers/StdMeshers_Import_1D2D.cxx
src/StdMeshers/StdMeshers_Import_1D2D.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_1D2D.cxx
src/StdMeshers/StdMeshers_Projection_1D2D.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_Reversible1D.cxx [new file with mode: 0644]
src/StdMeshers/StdMeshers_Reversible1D.hxx [new file with mode: 0644]
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_UseExisting_1D2D.cxx
src/StdMeshers/StdMeshers_UseExisting_1D2D.hxx
src/StdMeshers/StdMeshers_ViscousLayers.cxx
src/StdMeshers/StdMeshers_ViscousLayers.hxx
src/StdMeshers/StdMeshers_ViscousLayers2D.cxx
src/StdMeshers/StdMeshers_ViscousLayers2D.hxx
src/StdMeshersGUI/CMakeLists.txt
src/StdMeshersGUI/SMESH_StdMeshersGUI.hxx
src/StdMeshersGUI/StdMeshersGUI.cxx
src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.cxx
src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.h
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_QuadrangleParamWdg.cxx
src/StdMeshersGUI/StdMeshersGUI_QuadrangleParamWdg.h
src/StdMeshersGUI/StdMeshersGUI_RadioButtonsGrpWdg.cxx
src/StdMeshersGUI/StdMeshersGUI_RadioButtonsGrpWdg.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/StdMeshersGUI/StdMeshers_msg_fr.ts
src/StdMeshers_I/CMakeLists.txt
src/StdMeshers_I/SMESH_StdMeshers_I.hxx
src/StdMeshers_I/StdMeshers_Adaptive1D_i.cxx
src/StdMeshers_I/StdMeshers_Adaptive1D_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_CartesianParameters3D_i.cxx
src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.hxx
src/StdMeshers_I/StdMeshers_Cartesian_3D_i.cxx
src/StdMeshers_I/StdMeshers_Cartesian_3D_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_Geometric1D_i.cxx [new file with mode: 0644]
src/StdMeshers_I/StdMeshers_Geometric1D_i.hxx [new file with mode: 0644]
src/StdMeshers_I/StdMeshers_Hexa_3D_i.cxx
src/StdMeshers_I/StdMeshers_Hexa_3D_i.hxx
src/StdMeshers_I/StdMeshers_ImportSource1D_i.cxx
src/StdMeshers_I/StdMeshers_ImportSource1D_i.hxx
src/StdMeshers_I/StdMeshers_ImportSource2D_i.cxx
src/StdMeshers_I/StdMeshers_ImportSource2D_i.hxx
src/StdMeshers_I/StdMeshers_Import_1D2D_i.cxx
src/StdMeshers_I/StdMeshers_Import_1D2D_i.hxx
src/StdMeshers_I/StdMeshers_Import_1D_i.cxx
src/StdMeshers_I/StdMeshers_Import_1D_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_Reversible1D_i.cxx [new file with mode: 0644]
src/StdMeshers_I/StdMeshers_Reversible1D_i.hxx [new file with mode: 0644]
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_UseExisting_1D2D_i.cxx
src/StdMeshers_I/StdMeshers_UseExisting_1D2D_i.hxx
src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.cxx
src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.hxx
src/StdMeshers_I/StdMeshers_ViscousLayers_i.cxx
src/StdMeshers_I/StdMeshers_ViscousLayers_i.hxx
src/StdMeshers_I/StdMeshers_i.cxx
src/Tools/CMakeLists.txt
src/Tools/MGCleanerPlug/CMakeLists.txt
src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py
src/Tools/MGCleanerPlug/MGCleanerMonViewText.py
src/Tools/MGCleanerPlug/MGCleanerplug_plugin.py
src/Tools/MGCleanerPlug/doc/CMakeLists.txt
src/Tools/MGCleanerPlug/doc/conf.py.in
src/Tools/MacMesh/CMakeLists.txt [new file with mode: 0644]
src/Tools/MacMesh/Doc/MacMesh.v.10avr.pdf [new file with mode: 0755]
src/Tools/MacMesh/Doc/index.html.in [new file with mode: 0644]
src/Tools/MacMesh/Doc/snap.jpg [new file with mode: 0644]
src/Tools/MacMesh/Example/PressureValve.py.in [new file with mode: 0755]
src/Tools/MacMesh/MacMesh/Alarms.py [new file with mode: 0644]
src/Tools/MacMesh/MacMesh/CentralUnrefine.py [new file with mode: 0644]
src/Tools/MacMesh/MacMesh/CompositeBox.py [new file with mode: 0644]
src/Tools/MacMesh/MacMesh/CompositeBoxF.py [new file with mode: 0644]
src/Tools/MacMesh/MacMesh/Config.py [new file with mode: 0644]
src/Tools/MacMesh/MacMesh/CutnGroup.py [new file with mode: 0644]
src/Tools/MacMesh/MacMesh/Cylinder.py [new file with mode: 0644]
src/Tools/MacMesh/MacMesh/GenFunctions.py [new file with mode: 0644]
src/Tools/MacMesh/MacMesh/MacObject.py [new file with mode: 0644]
src/Tools/MacMesh/MacMesh/PublishGroups.py [new file with mode: 0644]
src/Tools/MacMesh/MacMesh/SharpAngle.py [new file with mode: 0644]
src/Tools/MeshCut/AUTHORS
src/Tools/MeshCut/CMakeLists.txt
src/Tools/MeshCut/MeshCut_Carre.cxx
src/Tools/MeshCut/MeshCut_Carre.hxx
src/Tools/MeshCut/MeshCut_Cas.cxx
src/Tools/MeshCut/MeshCut_Cas.hxx
src/Tools/MeshCut/MeshCut_Cube.cxx
src/Tools/MeshCut/MeshCut_Cube.hxx
src/Tools/MeshCut/MeshCut_DC.cxx
src/Tools/MeshCut/MeshCut_Fonctions.cxx
src/Tools/MeshCut/MeshCut_Fonctions.hxx
src/Tools/MeshCut/MeshCut_Globals.hxx
src/Tools/MeshCut/MeshCut_Maillage.cxx
src/Tools/MeshCut/MeshCut_Maillage.hxx
src/Tools/MeshCut/MeshCut_Utils.cxx
src/Tools/MeshCut/MeshCut_Utils.hxx
src/Tools/MeshCut/meshcut_plugin.py
src/Tools/Verima/Base/CMakeLists.txt
src/Tools/Verima/Base/__init__.py
src/Tools/Verima/CMakeLists.txt
src/Tools/Verima/CreeDocuments/CMakeLists.txt
src/Tools/Verima/CreeDocuments/__init__.py
src/Tools/Verima/CreeDocuments/templatesHtml/CMakeLists.txt
src/Tools/Verima/Doc/CMakeLists.txt
src/Tools/Verima/Doc/conf.py
src/Tools/Verima/Doc/conf.py.in
src/Tools/Verima/Doc/makefile
src/Tools/Verima/Gui/CMakeLists.txt
src/Tools/Verima/Gui/__init__.py
src/Tools/Verima/Scripts/CMakeLists.txt
src/Tools/Verima/Scripts/a.py
src/Tools/Verima/Scripts/excavation.py
src/Tools/Verima/Scripts/excavation_6.6.py
src/Tools/Verima/Scripts/excavation_7.2.0.py
src/Tools/Verima/Stats/CMakeLists.txt
src/Tools/Verima/Stats/__init__.py
src/Tools/Verima/__init__.py
src/Tools/YamsPlug/CMakeLists.txt
src/Tools/YamsPlug/doc/CMakeLists.txt
src/Tools/YamsPlug/doc/conf.py.in
src/Tools/YamsPlug/monViewText.py
src/Tools/YamsPlug/monYamsPlugDialog.py
src/Tools/YamsPlug/yamsplug_plugin.py
src/Tools/ZCracksPlug/CMakeLists.txt [new file with mode: 0644]
src/Tools/ZCracksPlug/zcracks_plugin.py [new file with mode: 0644]
src/Tools/blocFissure/CMakeLists.txt [new file with mode: 0644]
src/Tools/blocFissure/CasTests/CMakeLists.txt [new file with mode: 0644]
src/Tools/blocFissure/CasTests/__init__.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/cubeAngle.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/cubeAngle2.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/cylindre.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/cylindre_2.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/disquePerce.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/ellipse_1.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/ellipse_2.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/eprouvetteCourbe.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/eprouvetteDroite.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/execution_Cas.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/faceGauche.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/faceGauche_2.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/fissureCoude_1.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/fissureCoude_10.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/fissureCoude_2.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/fissureCoude_3.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/fissureCoude_4.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/fissureCoude_5.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/fissureCoude_6.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/fissureCoude_7.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/fissureCoude_8.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/fissureCoude_9.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/fissure_Coude.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/fissure_Coude_4.py [new file with mode: 0644]
src/Tools/blocFissure/CasTests/vis_1.py [new file with mode: 0644]
src/Tools/blocFissure/README [new file with mode: 0644]
src/Tools/blocFissure/__init__.py [new file with mode: 0644]
src/Tools/blocFissure/casStandard.py [new file with mode: 0644]
src/Tools/blocFissure/exemple.py [new file with mode: 0644]
src/Tools/blocFissure/exemple2.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/CMakeLists.txt [new file with mode: 0644]
src/Tools/blocFissure/gmu/__init__.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/blocDefaut.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/checkDecoupePartition.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/commonSubShapes.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/creeZoneDefautFilling.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/creeZoneDefautGeom.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/creeZoneDefautMaillage.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/distance2.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/eliminateDoubles.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/ellipsoideDefaut.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/enleveDefaut.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/extractionOrientee.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/extractionOrienteeMulti.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/facesCirculaires.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/facesFissure.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/facesToreInBloc.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/facesVolumesToriques.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/findWireEndVertices.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/findWireIntermediateVertices.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/fissureCoude.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/fissureGenerique.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/genereElemsFissureElliptique.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/genereMeshCalculZoneDefaut.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/geomsmesh.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/getCentreFondFiss.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/getStatsMaillageFissure.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/getSubshapeIds.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/initEtude.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/initLog.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/insereFissureElliptique.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/insereFissureGenerale.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/insereFissureLongue.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/meshBlocPart.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/orderEdgesFromWire.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/partitionBlocDefaut.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/partitionVolumeSain.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/peauInterne.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/produitMixte.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/projettePointSurCourbe.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/prolongeVertices.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/prolongeWire.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/propagateTore.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/putName.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/quadranglesToShape.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/regroupeSainEtDefaut.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/rotTrans.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/shapeSurFissure.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/shapesSurFissure.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/sortEdges.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/sortFaces.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/sortGeneratrices.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/sortSolids.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/substractSubShapes.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/testgmu.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/toreFissure.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/triedreBase.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/whichSide.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/whichSideMulti.py [new file with mode: 0644]
src/Tools/blocFissure/gmu/whichSideVertex.py [new file with mode: 0644]
src/Tools/blocFissure/ihm/CMakeLists.txt [new file with mode: 0644]
src/Tools/blocFissure/ihm/__init__.py [new file with mode: 0644]
src/Tools/blocFissure/ihm/dialogFissureCoude.dic [new file with mode: 0644]
src/Tools/blocFissure/ihm/fissureCoude.ui [new file with mode: 0644]
src/Tools/blocFissure/ihm/fissureCoude_ihm.py [new file with mode: 0644]
src/Tools/blocFissure/ihm/fissureCoude_plugin.py [new file with mode: 0644]
src/Tools/blocFissure/ihm/fissureGenerale.ui [new file with mode: 0644]
src/Tools/blocFissure/materielCasTests/CMakeLists.txt [new file with mode: 0644]
src/Tools/blocFissure/materielCasTests/__init__.py [new file with mode: 0644]
src/Tools/blocFissure/materielCasTests/cubeAngle.py [new file with mode: 0644]
src/Tools/blocFissure/materielCasTests/decoupeCylindre.py [new file with mode: 0644]
src/Tools/blocFissure/materielCasTests/disque_perce.py [new file with mode: 0644]
src/Tools/blocFissure/materielCasTests/ellipse.py [new file with mode: 0644]
src/Tools/blocFissure/materielCasTests/ellipse_disque.py [new file with mode: 0644]
src/Tools/blocFissure/materielCasTests/ellipse_probleme.py [new file with mode: 0644]
src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py [new file with mode: 0644]
src/Tools/blocFissure/materielCasTests/eprouvetteDroite.py [new file with mode: 0644]
src/Tools/blocFissure/materielCasTests/fissureGauche.py [new file with mode: 0644]
src/Tools/blocFissure/materielCasTests/fissureGauche2.py [new file with mode: 0644]
src/Tools/blocFissure/materielCasTests/genereMateriel.py [new file with mode: 0644]
src/Tools/blocFissure/materielCasTests/vis.py [new file with mode: 0644]
src/Tools/padder/CMakeLists.txt
src/Tools/padder/doc/CMakeLists.txt
src/Tools/padder/doc/doxyfile.in
src/Tools/padder/meshjob/CMakeLists.txt
src/Tools/padder/meshjob/idl/CMakeLists.txt
src/Tools/padder/meshjob/idl/MESHJOB.idl
src/Tools/padder/meshjob/idl/SPADDERPluginTest.idl
src/Tools/padder/meshjob/impl/CMakeLists.txt
src/Tools/padder/meshjob/impl/MeshJobManager_i.cxx
src/Tools/padder/meshjob/impl/MeshJobManager_i.hxx
src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.cxx
src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.hxx
src/Tools/padder/meshjob/impl/testhelper.hxx
src/Tools/padder/resources/CMakeLists.txt
src/Tools/padder/resources/testdata/buildparticules.py
src/Tools/padder/spadderpy/CMakeLists.txt
src/Tools/padder/spadderpy/__init__.py
src/Tools/padder/spadderpy/configreader.py
src/Tools/padder/spadderpy/gui/CMakeLists.txt
src/Tools/padder/spadderpy/gui/__init__.py
src/Tools/padder/spadderpy/gui/inputdata.py
src/Tools/padder/spadderpy/gui/inputdialog.py
src/Tools/padder/spadderpy/gui/plugindialog.py
src/Tools/padder/spadderpy/plugin/CMakeLists.txt
src/Tools/padder/spadderpy/plugin/envPlugins.sh.in
src/Tools/padder/spadderpy/plugin/spadderPlugin.py
src/Tools/padder/unittests/CMakeLists.txt
src/Tools/padder/unittests/__init__.py
src/Tools/padder/unittests/autotest.sh.in
src/Tools/padder/unittests/usecase_meshJobManager.py
src/Tools/padder/unittests/usecase_spadderPluginTester.py
src/Tools/smesh_plugins.py

index 97b780d46bdb3582277aa5d51a3559e964f20707..4dd5f2eb1d3e738d44affa3307d3f2f5d98b2168 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -32,7 +32,7 @@ SET(${PROJECT_NAME_UC}_MINOR_VERSION 3)
 SET(${PROJECT_NAME_UC}_PATCH_VERSION 1)
 SET(${PROJECT_NAME_UC}_VERSION
   ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
-SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
+SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
 
 # Find KERNEL
 # ===========
@@ -41,14 +41,11 @@ IF(EXISTS ${KERNEL_ROOT_DIR})
   LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files")
   INCLUDE(SalomeMacros)
   FIND_PACKAGE(SalomeKERNEL REQUIRED)
+  KERNEL_WITH_CORBA() #check whether KERNEL builded with CORBA
 ELSE(EXISTS ${KERNEL_ROOT_DIR})
   MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR")
 ENDIF(EXISTS ${KERNEL_ROOT_DIR})
 
-IF(SALOME_LIGHT_ONLY)
-  MESSAGE(FATAL_ERROR "SMESH module can't be built in Light mode (without CORBA)")
-ENDIF()
-
 # Platform setup
 # ==============
 INCLUDE(SalomeSetupPlatform)   # From KERNEL
@@ -125,7 +122,7 @@ IF(SALOME_BUILD_GUI)
   IF(EXISTS ${GUI_ROOT_DIR})
     LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
     FIND_PACKAGE(SalomeGUI)
-    
+    FULL_GUI(TRUE) #check whether GUI builded in full mode and with CORBA
     ##
     ## Prerequisites From GUI:
     ##
index 738d0841a64ce7104c0649e4fb790cd46d383f8e..ddf1bff09bf1680f690e5341c03c2e2dd61123cd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d82a2ee2a0f26cfc91705bfa35f223c88d6e66d1..204cb88162a051b1673d7112f1d9748c78d7bbd8 100644 (file)
@@ -5,28 +5,27 @@
 #
 
 ###############################################################
-#  Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&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) 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 free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# 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
-###############################################################
 
 ### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
 @PACKAGE_INIT@
index 84d97c22e5014fa450423e11fb3931dd15cccf26..bedde74e07b3952b1f6c5378ce3ee85bfbfcca7d 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 602688c3580d605b09b0e02fdd6ac34115ffdbc8..3ccd4f39dff0f6c9f8a569897f7d59a080fb7921 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 34a0aa96c709bec4dada89f10c5662323b5a6f19..84471e6312fb68196f219695e376c8ec5a001f8f 100644 (file)
@@ -5,7 +5,7 @@
 #
 
 #########################################################################
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -13,7 +13,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index e764afe5b6512618d5d037f3ae67bdbe140f36ed..aeb4ee6e09de46104f0881e39fb8f350bd11a5b7 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index b43dd0cf57f3627a8c10c440c9f4cb9b192724da..1f5ced5b4c550a96e3a1a89736883f4dc284d9ff 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index ac29b1a92d61232102b776fe0f2754b12206102d..c433652b2a5737b047819cf01fe10847140161ff 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,7 +16,6 @@
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-#
 
 IF(NOT SalomeSMESH_FIND_QUIETLY)
   MESSAGE(STATUS "Looking for Salome SMESH ...")
index ae7ab0643e826c01e0131ee67c50a7134f407a58..c7486e9a1b1c4e35ec77e4c2a92594d6f097ebbd 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index dcaf893667e1654d09a17178ff282cf9eee6feed..1de9cd94c48b484dc6270eda5bdabfd09a0c6ec5 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index d5cff334fcfaccce4bbbbd52e1b101050a63c328..2fa30c576d71309010c0bd4ebfc158aab3fa6b4e 100644 (file)
@@ -5,7 +5,7 @@
 #
 
 #########################################################################
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -13,7 +13,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index e6cc8e1ccf9d34ba0cd98b970a00ac6646a7d397..896f1e34981de3712392270cb540edb62539a80a 100755 (executable)
@@ -6,7 +6,7 @@
 #
 
 #########################################################################
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -14,7 +14,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2f895ae4bc65192d67fe49837c7fbdaa8b7fd4a5..eb508c1f49f2df961ef7e6fbc2a80dae66c28a35 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 811a3abb2ca2d7b7c90467135f4aa48264396a43..a734dfab33cb322d1c172a16a4fcf1a2f10bc2f6 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 21c2baca91988a3c9db30f5b3aa9af80d37c6604..16344da790476665de7c07b6b5a153613fb07849 100755 (executable)
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014  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
@@ -6,7 +6,7 @@ dnl
 dnl This library is free software; you can redistribute it and/or
 dnl modify it under the terms of the GNU Lesser General Public
 dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
 dnl
 dnl This library is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
index 387759198ec4d0dd3aba4d00bbe9970168351133..7e9d4eefa647b511712afb15f2d7312e0da24c90 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014  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
@@ -6,7 +6,7 @@ dnl
 dnl This library is free software; you can redistribute it and/or
 dnl modify it under the terms of the GNU Lesser General Public
 dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
 dnl
 dnl This library is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
index c987b5e3841125e1eb6bec7f6d7c2934e10ba320..ca787993ff563a0750d1edbb210ddec8ccb328ee 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014  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
@@ -6,7 +6,7 @@ dnl
 dnl This library is free software; you can redistribute it and/or
 dnl modify it under the terms of the GNU Lesser General Public
 dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
 dnl
 dnl This library is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
index 008301d7e75ba34db9fa1707a56bca783772683b..4f27dc6bd330f31d91c260d2402537f699066eb7 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014  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
@@ -6,7 +6,7 @@ dnl
 dnl This library is free software; you can redistribute it and/or
 dnl modify it under the terms of the GNU Lesser General Public
 dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
 dnl
 dnl This library is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
index 74fdfa501bfb8ed7b52976800ec58d7e8cb6f25d..99f34c0fab8b85515da3ef57123a8070e228533f 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014  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
@@ -6,7 +6,7 @@ dnl
 dnl This library is free software; you can redistribute it and/or
 dnl modify it under the terms of the GNU Lesser General Public
 dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
 dnl
 dnl This library is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2adb6407b9c9cd72a45fb7a516a8ddb1b2d0f3fb..ca8ace8bad388db97f7d4ae3e17ffbd27d986c54 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014  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
@@ -6,7 +6,7 @@ dnl
 dnl This library is free software; you can redistribute it and/or
 dnl modify it under the terms of the GNU Lesser General Public
 dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
 dnl
 dnl This library is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1d9ea498ffad05956966a2c5a90abfb352d2a6c0..8990bffad4a5418c5f480c5adb58c41b88cf284e 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014  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
@@ -6,7 +6,7 @@ dnl
 dnl This library is free software; you can redistribute it and/or
 dnl modify it under the terms of the GNU Lesser General Public
 dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
 dnl
 dnl This library is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
index dc1914013709bbff09f701d2b28cc83d3b785d04..4af8a501ec515a79382ca7ce08572f359277a3ea 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9311968b024baa17d3c118238917beac3d5a6d1d..b58c8e4125783d4f50d86750433ab1ef3e92704a 100644 (file)
@@ -1,11 +1,11 @@
 #!/usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 645a52301d64e5f01bb147aadc64d29f82a99e8e..27aa5730ad3c0f920b3fb11eb6bd16cb656cb8ea 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -21,4 +21,3 @@
 #
 
 ADD_SUBDIRECTORY(salome)
-ADD_SUBDIRECTORY(docutils)
diff --git a/doc/docutils/CMakeLists.txt b/doc/docutils/CMakeLists.txt
deleted file mode 100755 (executable)
index a34d26b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2012-2013  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
-#
-
-SALOME_CONFIGURE_FILE(conf.py.in conf.py)
-
-SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees -D latex_paper_size=a4 ${CMAKE_CURRENT_SOURCE_DIR} docutils)
-
-# This macro mainly prepares the environment in which sphinx should run:
-# this sets the PYTHONPATH and LD_LIBRARY_PATH to include OMNIORB, DOCUTILS, SETUPTOOLS, etc ...
-SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}")            
-
-ADD_CUSTOM_TARGET(html_docs COMMAND ${_cmd})
-
-INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target html_docs)")
-INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/docutils DESTINATION ${SALOME_INSTALL_DOC}/tui/SMESH)
-INSTALL(FILES ${PROJECT_SOURCE_DIR}/doc/salome/tui/images/head.png ${PROJECT_SOURCE_DIR}/doc/salome/tui/images/smeshscreen.png 
-        DESTINATION ${SALOME_INSTALL_DOC}/tui/SMESH)
-
-SET(make_clean_files docutils doctrees)
-SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${make_clean_files}")        
diff --git a/doc/docutils/conf.py.in b/doc/docutils/conf.py.in
deleted file mode 100644 (file)
index 6f92993..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-# -*- coding: iso-8859-1 -*-
-#
-# yacs documentation build configuration file, created by
-# sphinx-quickstart on Fri Aug 29 09:57:25 2008.
-#
-# This file is execfile()d with the current directory set to its containing dir.
-#
-# The contents of this file are pickled, so don't put values in the namespace
-# that aren't pickleable (module imports are okay, they're removed automatically).
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import sys, os
-
-# If your extensions are in another directory, add it here. If the directory
-# is relative to the documentation root, use os.path.abspath to make it
-# absolute, like shown here.
-#sys.path.append(os.path.abspath('.'))
-
-# General configuration
-# ---------------------
-
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc']
-
-# Uncomment the following line to build the links with Python documentation
-# (you might need to set http_proxy environment variable for this to work)
-#extensions += ['sphinx.ext.intersphinx']
-
-# Intersphinx mapping to add links to modules and objects in the Python
-# standard library documentation
-intersphinx_mapping = {'http://docs.python.org': None}
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-source_encoding = 'utf-8'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = 'SMESH python packages'
-copyright = '2010 EDF R&D'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = '@SALOMESMESH_VERSION@'
-# The full version, including alpha/beta/rc tags.
-release = '@SALOMESMESH_VERSION@'
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-language = 'en'
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of documents that shouldn't be included in the build.
-#unused_docs = []
-
-# List of directories, relative to source directory, that shouldn't be searched
-# for source files.
-exclude_trees = ['.build','ref','images','CVS','.svn']
-
-# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-
-# Options for HTML output
-# -----------------------
-
-# The theme to use for HTML and HTML Help pages.  Major themes that come with
-# Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'default'
-#html_theme = 'nature'
-#html_theme = 'agogo'
-#html_theme = 'sphinxdoc'
-#html_theme = 'omadoc'
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = ['themes']
-
-# The name for this set of Sphinx documents.  If None, it defaults to
-# "<project> v<release> documentation".
-#html_title = None
-
-# A shorter title for the navigation bar.  Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-#html_static_path = ['_static']
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-html_use_modindex = False
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, the reST sources are included in the HTML build as _sources/<name>.
-html_copy_source = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it.  The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = ''
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'smeshpydoc'
-
-
-# Options for LaTeX output
-# ------------------------
-
-# The paper size ('letter' or 'a4').
-latex_paper_size = 'a4'
-
-# The font size ('10pt', '11pt' or '12pt').
-latex_font_size = '10pt'
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, document class [howto/manual]).
-latex_documents = [
-  ('index', 'smeshpy.tex', 'Documentation of the SMESH python packages', 'EDF R\&D', 'manual')
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-latex_logo = '@CMAKE_CURRENT_SOURCE_DIR@/../salome/tui/images/head.png'
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = True
-
-# Additional stuff for the LaTeX preamble.
-#latex_preamble = ''
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-latex_use_modindex = False
diff --git a/doc/docutils/docapi.rst b/doc/docutils/docapi.rst
deleted file mode 100644 (file)
index b39c124..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- Documentation of the programming interface (API)
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-This section describes the python packages and modules of the
-``salome.smesh`` python package. The main part is generated from the
-code documentation included in source python files.
-
-:mod:`salome.smesh` -- Package containing the SMESH python utilities
-====================================================================
-
-:mod:`smeshstudytools` -- Tools to access SMESH objects in the study
---------------------------------------------------------------------
-
-.. automodule:: salome.smesh.smeshstudytools
-   :members:
diff --git a/doc/docutils/index.rst b/doc/docutils/index.rst
deleted file mode 100644 (file)
index 4863e82..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- Documentation of the SMESH python package
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-.. toctree::
-   :maxdepth: 3
-
-   overview.rst
-   docapi.rst
diff --git a/doc/docutils/overview.rst b/doc/docutils/overview.rst
deleted file mode 100644 (file)
index ce82cc8..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-General presentation of the SMESH python package
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-The SMESH python package contains (today) helper functions to
-manipulate mesh elements and interact with these elements.
-
-Note that these functions either encapsulate the python programming
-interface of SMESH core (the CORBA or SWIG interface for example) or
-extend existing utilities as the ``smesh.py`` module.
-
-The functions are distributed in the python package
-``salome.smesh``.
-
-The specification of the programming interface of this package is
-detailled in the part :doc:`Documentation of the programming interface
-(API)</docapi>` of this documentation.
-
-.. note::
-   The main package ``salome`` contains other sub-packages that are
-   distributed with the other SALOME modules. For example, the KERNEL
-   module provides the python package ``salome.kernel`` and GEOM the
-   package ``salome.geom``.
index ea8a2e2041ca19bf257cde513459fd79ab0ec1e4..197a24a4f8ae7029626bd058e14cd55749fb4cc6 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index aefec539df4b85ab936168459817e9efb148314d..227764998bb0c1281ab364df15d4bbc745604b8b 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index dc0dc23cf585c29e8b665ecc7e4088d4d6c8fa1f..e5651cb670a2a96a2e9c8492e8220d647ddd0582 100644 (file)
@@ -50,3 +50,40 @@ print "nb hexahedra",mesh.NbHexas()
 print "nb tetrahedra",mesh.NbTetras()
 print "nb polyhedra",mesh.NbPolyhedrons()
 print
+
+# Example of customization of dirtections of the grid axes
+
+# make a box with non-orthogonal edges
+xDir = geompy.MakeVectorDXDYDZ( 1.0, 0.1, 0.0, "xDir" )
+yDir = geompy.MakeVectorDXDYDZ(-0.1, 1.0, 0.0, "yDir"  )
+zDir = geompy.MakeVectorDXDYDZ( 0.2, 0.3, 1.0, "zDir"  )
+face = geompy.MakePrismVecH( xDir, yDir, 1.0 )
+box  = geompy.MakePrismVecH( face, zDir, 1.0, theName="box" )
+
+spc = "0.1" # spacing
+
+# default axes
+mesh = smesh.Mesh( box, "custom axes")
+algo = mesh.BodyFitted()
+algo.SetGrid( spc, spc, spc, 10000 )
+mesh.Compute()
+print "Default axes"
+print "   nb hex:",mesh.NbHexas()
+
+# set axes using edges of the box
+algo.SetAxesDirs( xDir, [-0.1,1,0], zDir )
+mesh.Compute()
+print "Manual axes"
+print "   nb hex:",mesh.NbHexas()
+
+# set optimal orthogonal axes
+algo.SetOptimalAxesDirs( isOrthogonal=True )
+mesh.Compute()
+print "Optimal orthogonal axes"
+print "   nb hex:",mesh.NbHexas()
+
+# set optimal non-orthogonal axes
+algo.SetOptimalAxesDirs( isOrthogonal=False )
+mesh.Compute()
+print "Optimal non-orthogonal axes"
+print "   nb hex:",mesh.NbHexas()
index 4bb75c56b3b45a5e8b3fd802f8a22bf0317bae16..1d5d281c8f798665d75b01154bb9912d3a0eadfe 100644 (file)
@@ -1,12 +1,11 @@
-# Arithmetic 1D
+# Arithmetic 1D and Geometric Progression
 
 import salome
 salome.salome_init()
-import GEOM
+
 from salome.geom import geomBuilder
 geompy = geomBuilder.New(salome.myStudy)
 
-import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 smesh =  smeshBuilder.New(salome.myStudy)
 
@@ -21,12 +20,20 @@ hexa = smesh.Mesh(box, "Box : hexahedrical mesh")
 algo1D = hexa.Segment()
 
 # optionally reverse node distribution on certain edges
-allEdges = geompy.SubShapeAllSortedIDs( box, geompy.ShapeType["EDGE"])
+allEdges = geompy.SubShapeAllSorted( box, geompy.ShapeType["EDGE"])
 reversedEdges = [ allEdges[0], allEdges[4] ]
 
 # define "Arithmetic1D" hypothesis to cut all edges in several segments with increasing arithmetic length 
 algo1D.Arithmetic1D(1, 4, reversedEdges)
 
+# define "Geometric Progression" hypothesis on one edge to cut this edge in segments with length increasing by 20% starting from 1
+gpAlgo = hexa.Segment( allEdges[1] )
+gpAlgo.GeometricProgression( 1, 1.2 )
+
+# propagate distribution of nodes computed using "Geometric Progression" to parallel edges
+gpAlgo.PropagationOfDistribution() 
+
+
 # create a quadrangle 2D algorithm for faces
 hexa.Quadrangle()
 
index 34fcbc37789f885feaa07b77de169fbcf349c28b..3c877f3dae45e8a6edf4e58273178c8c17725508 100644 (file)
@@ -11,7 +11,8 @@ from salome.smesh import smeshBuilder
 smesh =  smeshBuilder.New(salome.myStudy)
 
 # create a box
-box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
+base = geompy.MakeSketcher("Sketcher:F 0 0:TT 10 0:TT 20 10:TT 0 10:WF", theName="F")
+box  = geompy.MakePrismDXDYDZ( base, 0,0,10 )
 geompy.addToStudy(box, "Box")
 
 # get one edge of the box to put local hypothesis on
@@ -20,7 +21,7 @@ EdgeX = geompy.GetEdgeNearPoint(box, p5)
 geompy.addToStudyInFather(box, EdgeX, "Edge [0,0,0 - 10,0,0]")
 
 # create a hexahedral mesh on the box
-hexa = smesh.Mesh(box, "Box : hexahedrical mesh")
+hexa = smesh.Mesh(box, "Propagation of hypothesis")
 
 # set global algorithms and hypotheses
 algo1D = hexa.Segment()
@@ -28,15 +29,37 @@ hexa.Quadrangle()
 hexa.Hexahedron()
 algo1D.NumberOfSegments(4)
 
-# create a sub-mesh with local 1D hypothesis and propagation
+# create a sub-mesh with local 1D hypothesis and "Propagation of 1D Hypothesis"
 algo_local = hexa.Segment(EdgeX)
 
 # define "Arithmetic1D" hypothesis to cut an edge in several segments with increasing length
 algo_local.Arithmetic1D(1, 4)
 
-# define "Propagation" hypothesis that propagates all other 1D hypotheses
-# from all edges on the opposite side of a face in case of quadrangular faces
+# define "Propagation" hypothesis that propagates "Arithmetic1D" hypothesis
+# from 'EdgeX' on opposite sides of all quadilateral faces
 algo_local.Propagation()
 
-# compute the mesh
+# compute the mesh which contains prisms
 hexa.Compute()
+
+
+# create another mesh on the box
+mesh = smesh.Mesh(box, "Propagation of distribution of nodes")
+
+# set global algorithms and hypotheses
+algo1D = mesh.Segment()
+mesh.Quadrangle()
+mesh.Hexahedron()
+algo1D.NumberOfSegments(4)
+
+# create a sub-mesh with local 1D hypothesis and "Propagation of Node Distribution"
+algo_local = mesh.Segment(EdgeX)
+algo_local.Arithmetic1D(1, 4)
+
+# define "Propagation Of Distribution" hypothesis that propagates
+# distribution of nodes generated by "Arithmetic1D" hypothesis
+# from 'EdgeX' on opposite sides of all quadilateral faces
+algo_local.PropagationOfDistribution()
+
+# compute the mesh which contains hexahedra only
+mesh.Compute()
index 9125787b25f3e57c737548db551165dcd8a5cb49..ce11e3e400821e463ca833a689a03736e202757f 100644 (file)
@@ -1,4 +1,4 @@
-# "Use Existing Elements" example
+# "Import 2D Elements from Another Mesh" example
 
 import salome
 salome.salome_init()
index 83aaeb11f5237d7487cd6435830ee54c9f412c46..7fca21f061903ba35b94aadaaa9e42bcc12e9c80 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 631316444d67214004047bdede95a6c717a22312..c4b95fdafd945440e9733368422c9f6c32f90760 100644 (file)
@@ -1,4 +1,4 @@
-# Use existing faces algorithm
+# Usage of "Use Faces to be Created Manually" algorithm
 
 
 import salome
@@ -109,8 +109,8 @@ mesh.Compute()
 
 # compute 2D mesh
 mesh.Quadrangle()
-mesh.UseExistingFaces(f1) # UseExistingFaces() allows using my2DMeshing()
-mesh.UseExistingFaces(f2)
+mesh.UseExistingFaces(f1) # UseExistingFaces() allows using my2DMeshing();
+mesh.UseExistingFaces(f2) # assign UseExistingFaces() BEFORE calling my2DMeshing()!
 my2DMeshing( f1 )
 my2DMeshing( f2 )
 assert mesh.Compute()
index ae150c8a0893ad2de43cd321471f4391c3cbd13d..3347fdcc5f9c9ac182b3ace1a37c7fe63e6c77a0 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7d8157bee4e6ff630410ab0bcdf9c6bf3e49e5fb..380fb6bbd595d33fc494a16b6ab9d9e09c0faa81 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -30,7 +30,7 @@ SET(kernel_file "${KERNEL_ROOT_DIR}/bin/salome/prepare_generating_doc.py")
 
 SALOME_ACCUMULATE_ENVIRONMENT(SMESH_MeshersList NOCHECK ${DOC_SMESH_MeshersList})
 
-SET(_cmd_options ${smesh_file} -d -o tmp/smeshBuilder.py StdMeshers)
+SET(_cmd_options ${smesh_file} -d -o tmp1/smeshBuilder.py StdMeshers)
 SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${PYTHON_EXECUTABLE}" "${_cmd_options}")            
 
 ADD_CUSTOM_TARGET(usr_docs ${CMAKE_COMMAND} -E make_directory tmp1
@@ -38,6 +38,7 @@ ADD_CUSTOM_TARGET(usr_docs ${CMAKE_COMMAND} -E make_directory tmp1
   COMMAND ${PYTHON_EXECUTABLE} ${kernel_file} -o tmp2/smeshBuilder.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smeshBuilder.py
   COMMAND ${PYTHON_EXECUTABLE} ${kernel_file} -o tmp2/smesh_algorithm.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smesh_algorithm.py
   COMMAND ${PYTHON_EXECUTABLE} ${kernel_file} -o tmp2/StdMeshersBuilder.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/StdMeshersBuilder.py
+  COMMAND ${PYTHON_EXECUTABLE} ${kernel_file} -o tmp2/smeshstudytools.py ${CMAKE_SOURCE_DIR}/src/SMESH_PY/smeshstudytools.py
   COMMAND ${_cmd}
   COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py
   COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
index 72fdb038234424ac6197d2df999a080b3c2670e9..6e2b7a4813de48ed600369c7a3efd6b71b5008a3 100755 (executable)
@@ -1,11 +1,11 @@
 #!/usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5bbf12d851fbbfe7e4877c9e4620df734818e0a8..e3b5ae87f5113938167e7874c120f961de884331 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 49a9c51fb15e5d2a57eab895e71080ac4310e306..da7bdc731fbffc015fe20e69194cdad570172b9b 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -102,6 +102,7 @@ EXAMPLE_RECURSIVE      = NO
 INPUT             = tmp2/smeshBuilder.py \
                     tmp2/smesh_algorithm.py \
                     tmp2/StdMeshersBuilder.py \
+                    tmp2/smeshstudytools.py \
                     tmp1/smeshBuilder.py
 FILE_PATTERNS     = 
 IMAGE_PATH        = @CMAKE_CURRENT_SOURCE_DIR@/images
diff --git a/doc/salome/gui/SMESH/images/a-geometric1d.png b/doc/salome/gui/SMESH/images/a-geometric1d.png
new file mode 100644 (file)
index 0000000..a60be94
Binary files /dev/null and b/doc/salome/gui/SMESH/images/a-geometric1d.png differ
index b8373ed6ddbafd52276f5e5ba8c2b7cd0c7da88a..c9a605fea0ca0cec4e0d8ba14290e00db423cac9 100644 (file)
Binary files a/doc/salome/gui/SMESH/images/cartesian3D_hyp.png and b/doc/salome/gui/SMESH/images/cartesian3D_hyp.png differ
diff --git a/doc/salome/gui/SMESH/images/cartesian_implement_edge.png b/doc/salome/gui/SMESH/images/cartesian_implement_edge.png
new file mode 100644 (file)
index 0000000..59ac9ba
Binary files /dev/null and b/doc/salome/gui/SMESH/images/cartesian_implement_edge.png differ
index 213652e79922998e425c972ce5a860a7d4f36edd..0b1d3e566458a69b8788f585e26f586549ed5fe2 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/colors_size.png and b/doc/salome/gui/SMESH/images/colors_size.png differ
old mode 100755 (executable)
new mode 100644 (file)
index c7f7c31..2180d41
Binary files a/doc/salome/gui/SMESH/images/createmesh-inv.png and b/doc/salome/gui/SMESH/images/createmesh-inv.png differ
index 02938fa41019a144ee84a1c6cf1a3b6b59691360..f7acf902545a20eed3ce03fd5f5d6e7a04206dff 100644 (file)
Binary files a/doc/salome/gui/SMESH/images/duplicate01.png and b/doc/salome/gui/SMESH/images/duplicate01.png differ
index 9653a3ea08806a2adc752317825b8e5da455c3f9..4bca6447695291b0f9c8d8b4b99ab36ece5680f0 100644 (file)
Binary files a/doc/salome/gui/SMESH/images/duplicate02.png and b/doc/salome/gui/SMESH/images/duplicate02.png differ
index 72b2a7a80aea842007b8b8495e48d56d41f25acb..00c8c871f0b8e85527aa139f727d63a3435412bd 100644 (file)
Binary files a/doc/salome/gui/SMESH/images/duplicate03.png and b/doc/salome/gui/SMESH/images/duplicate03.png differ
diff --git a/doc/salome/gui/SMESH/images/duplicate04.png b/doc/salome/gui/SMESH/images/duplicate04.png
new file mode 100644 (file)
index 0000000..70cb4ad
Binary files /dev/null and b/doc/salome/gui/SMESH/images/duplicate04.png differ
index 3cd442a8d4317a1b4defb0151b3ff6ded3b00dcb..62dc9f41534af164fa62659434f387e5369566fb 100644 (file)
Binary files a/doc/salome/gui/SMESH/images/hypo_quad_params_dialog.png and b/doc/salome/gui/SMESH/images/hypo_quad_params_dialog.png differ
diff --git a/doc/salome/gui/SMESH/images/hypo_quad_params_dialog_enf.png b/doc/salome/gui/SMESH/images/hypo_quad_params_dialog_enf.png
new file mode 100644 (file)
index 0000000..a3e7cfa
Binary files /dev/null and b/doc/salome/gui/SMESH/images/hypo_quad_params_dialog_enf.png differ
diff --git a/doc/salome/gui/SMESH/images/hypo_quad_params_dialog_vert.png b/doc/salome/gui/SMESH/images/hypo_quad_params_dialog_vert.png
new file mode 100644 (file)
index 0000000..5c75853
Binary files /dev/null and b/doc/salome/gui/SMESH/images/hypo_quad_params_dialog_vert.png differ
diff --git a/doc/salome/gui/SMESH/images/hypo_quad_params_enfnodes_algo.png b/doc/salome/gui/SMESH/images/hypo_quad_params_enfnodes_algo.png
new file mode 100755 (executable)
index 0000000..adddf84
Binary files /dev/null and b/doc/salome/gui/SMESH/images/hypo_quad_params_enfnodes_algo.png differ
diff --git a/doc/salome/gui/SMESH/images/meshtopass.png b/doc/salome/gui/SMESH/images/meshtopass.png
deleted file mode 100755 (executable)
index ebddaf4..0000000
Binary files a/doc/salome/gui/SMESH/images/meshtopass.png and /dev/null differ
diff --git a/doc/salome/gui/SMESH/images/meshtopass1.png b/doc/salome/gui/SMESH/images/meshtopass1.png
new file mode 100644 (file)
index 0000000..8ea8af7
Binary files /dev/null and b/doc/salome/gui/SMESH/images/meshtopass1.png differ
diff --git a/doc/salome/gui/SMESH/images/meshtopass2.png b/doc/salome/gui/SMESH/images/meshtopass2.png
new file mode 100644 (file)
index 0000000..b0bd28a
Binary files /dev/null and b/doc/salome/gui/SMESH/images/meshtopass2.png differ
index f6a7b597853685476c7a4fbbd2394f69a0c9915d..d557d2515bb949022c9ba8a152c94ee3b262ccd7 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/pref22.png and b/doc/salome/gui/SMESH/images/pref22.png differ
diff --git a/doc/salome/gui/SMESH/images/split_into_prisms.png b/doc/salome/gui/SMESH/images/split_into_prisms.png
new file mode 100644 (file)
index 0000000..6b9f77a
Binary files /dev/null and b/doc/salome/gui/SMESH/images/split_into_prisms.png differ
index fce071e7df37c5914ca74ee34026bbf1fa79c973..a54f4452972e6e84792a95d1535879a537d08475 100644 (file)
Binary files a/doc/salome/gui/SMESH/images/split_into_tetra.png and b/doc/salome/gui/SMESH/images/split_into_tetra.png differ
index 9c99303174b63c523c1b60e0786734da882b99af..717819138f562b963c2216308af12346e1f883cd 100644 (file)
Binary files a/doc/salome/gui/SMESH/images/viscous_layers_hyp.png and b/doc/salome/gui/SMESH/images/viscous_layers_hyp.png differ
index 470fe0c4dcd70cb7fa1f0af3b7a45e1873046436..b992bc8e2e2d53ed1299e360af991aa6798b3e0a 100644 (file)
@@ -6,6 +6,7 @@
 <ul>
 <li>\ref adaptive_1d_anchor "Adaptive"</li>
 <li>\ref arithmetic_1d_anchor "Arithmetic 1D"</li>
+<li>\ref geometric_1d_anchor "Geometric Progression"</li>
 <li>\ref average_length_anchor "Local Length"</li>
 <li>\ref max_length_anchor "Max Size"</li>
 <li>\ref deflection_1d_anchor "Deflection 1D"</li>
@@ -55,7 +56,30 @@ picking them in the 3D viewer or by selecting the edges or groups of edges in th
 \image html b-ithmetic1d.png "Arithmetic 1D hypothesis - the size of mesh elements gradually increases"
 
 <b>See Also</b> a sample TUI Script of a 
-\ref tui_1d_arithmetic "Defining Arithmetic 1D hypothesis" operation.  
+\ref tui_1d_arithmetic "Defining Arithmetic 1D and Geometric Progression hypothesis" operation.  
+
+<br>
+\anchor geometric_1d_anchor
+<h2>Geometric Progression hypothesis</h2>
+
+<b>Geometric Progression</b> hypothesis allows to split edges into
+segments with a length that changes in geometric progression (Lk =
+Lk-1 * d) beginning from a given starting length and with a given
+common ratio.
+
+The direction of the splitting is defined by the orientation of the
+underlying geometrical edge. <b>"Reverse Edges"</b> list box allows to
+specify the edges for which the splitting should be made in the
+direction opposing to their orientation. This list box is enabled only
+if the geometry object is selected for the meshing. In this case the
+user can select edges to be reversed either directly picking them in
+the 3D viewer or by selecting the edges or groups of edges in the
+Object Browser. 
+
+\image html a-geometric1d.png
+
+<b>See Also</b> a sample TUI Script of a 
+\ref tui_1d_arithmetic "Defining Arithmetic 1D and Geometric Progression hypothesis" operation.  
 
 <br>
 \anchor deflection_1d_anchor
index 38efc810cf3624f94b4f49be8819119d7d5a93c9..e019c8b87ff3c96bc64f282dc329f8b3395aab1b 100644 (file)
@@ -38,32 +38,12 @@ of a given face.
 
 \image html hypo_quad_params_dialog.png "Quadrangle parameters creation/edition dialog"
 
-<b>Quadrangle parameters</b> is a hypothesis for Quadrangle (Mapping).
+<b>Quadrangle parameters</b> is a hypothesis for Quadrangle (Mapping) algorithm.
 
-<b>Base vertex</b> parameter allows using Quadrangle (Mapping)
-algorithm for meshing of trilateral faces. In this case it is
-necessary to select the vertex, which will be used as the fourth edge
-(degenerated).
-
-\image html hypo_quad_params_1.png "A face built from 3 edges"
-
-\image html hypo_quad_params_res.png "The resulting mesh"
-
-This parameter can be also used to mesh a segment of a circular face.
-Please, consider that there is a limitation on the selection of the
-vertex for the faces built with the angle > 180 degrees (see the picture).
-
-\image html hypo_quad_params_2.png "3/4 of a circular face"
-
-In this case, selection of a wrong vertex for the <b>Base vertex</b>
-parameter will generate a wrong mesh. The picture below
-shows the good (left) and the bad (right) results of meshing.
-
-\image html hypo_quad_params_res_2.png "The resulting meshes"
-
-<b>Type</b> parameter is used on faces with a different number of
-segments on opposite sides to define the algorithm of transition
-between them. The following types are available:
+<b>Transition</b> tab is used to define the algorithm of transition
+between opposite sides of faces with a different number of
+segments on opposite sides. The following types of transition
+algorithms are available:
 
 - <b>Standard</b> is the default case, when both triangles and quadrangles
   are possible in the transition area along the finer meshed sides.
@@ -92,7 +72,65 @@ between them. The following types are available:
   to Nmin segments is log<sub>3</sub>( Nmax / Nmin ). The number of
   face rows is equal to the number of segments on each of equally
   discretized sides.
-  \image html reduce_three_to_one.png "The fastest transition pattern: 3 to 1"
+
+\image html reduce_three_to_one.png "The fastest transition pattern: 3 to 1"
+
+<b>Base vertex</b> tab allows using Quadrangle (Mapping)
+algorithm for meshing of trilateral faces. In this case it is
+necessary to select the vertex, which will be used as the fourth edge
+(degenerated).
+
+\image html hypo_quad_params_dialog_vert.png "Base Vertex tab of Quadrangle parameters creation/edition dialog"
+
+\image html hypo_quad_params_1.png "A face built from 3 edges"
+
+\image html hypo_quad_params_res.png "The resulting mesh"
+
+This parameter can be also used to mesh a segment of a circular face.
+Please, consider that there is a limitation on the selection of the
+vertex for the faces built with the angle > 180 degrees (see the picture).
+
+\image html hypo_quad_params_2.png "3/4 of a circular face"
+
+In this case, selection of a wrong vertex for the <b>Base vertex</b>
+parameter will generate a wrong mesh. The picture below
+shows the good (left) and the bad (right) results of meshing.
+
+\image html hypo_quad_params_res_2.png "The resulting meshes"
+
+\image html hypo_quad_params_dialog_enf.png "Enforced nodes tab of Quadrangle parameters creation/edition dialog"
+
+<b>Enforced nodes</b> tab allows for defining points where the
+algorithm should create nodes. There are two ways to define positions
+of the enforced nodes.
+<ul>
+  <li>\b Vertices group allows to set up shapes whose vertices will
+    define positions of the enforced nodes. Only vertices successfully
+    projected to the meshed face and located close enough to the
+    meshed face will be used to create the enforced nodes.</li>
+  <li> \b Points group allows to explicitly define coordinates of
+    points used to create the enforced nodes. Only points successfully
+    projected to the meshed face and located close enough to the
+    meshed face will be used to create the enforced nodes.</li>
+</ul>
+Algorithm of creation of the enforced nodes is following.
+
+\image html hypo_quad_params_enfnodes_algo.png "Steps of the algorithm of creation of the enforced nodes"
+<ol>
+  <li> Left image: Positions of nodes are computed without taking into
+  account the enforced vertex (yellow point).</li> 
+  <li> Middle image: A node closest to the enforced vertex is
+    detected. Extreme nodes of the row and column of the detected node
+    are used to create virtual edges (yellow lines) ending at the
+    enforced vertex. </li>
+  <li> Right image: The meshed face is thus divided by the virtual
+    edges into four quadrilateral sub-domains each of which is meshed
+    as usually: the nodes of the row and column of detected node are
+    moved to the virtual edges and the quadrilateral elements are
+    constructed. 
+</ol>
+If there are several enforced vertices, the algorithm is applied
+recursively to the formed sub-domains.
 
 <b>See Also</b> a sample TUI Script of a 
 \ref tui_quadrangle_parameters "Quadrangle Parameters" hypothesis.
index 09768cc7cb2a6fc6c8ae86258edb61a869f02d6e..65d5c7ad0b24550bdb198ab9d10499364296cd4f 100644 (file)
@@ -20,6 +20,7 @@ In \b MESH there are the following Basic Hypotheses:
 <li>\ref max_length_anchor "Max Size"</li>
 <li>\ref adaptive_1d_anchor "Adaptive"</li>
 <li>\ref arithmetic_1d_anchor "Arithmetic 1D"</li>
+<li>\ref geometric_1d_anchor "Geometric 1D"</li>
 <li>\ref start_and_end_length_anchor "Start and end length"</li>
 <li>\ref deflection_1d_anchor "Deflection 1D"</li>
 <li>\ref automatic_length_anchor "Automatic Length"</li>
@@ -41,6 +42,7 @@ There also exist
 with other hypotheses:
 <ul>
 <li>\ref propagation_anchor "Propagation of 1D Hypothesis on opposite edges"</li>
+<li>\ref propagofdistribution_anchor "Propagation of Node Distribution on Opposite Edges"</li>
 <li>\ref viscous_layers_anchor "Viscous layers"</li>
 <li>\ref quadratic_mesh_anchor "Quadratic mesh"</li>
 <li>\ref non_conform_allowed_anchor "Non conform mesh allowed"</li>
index 97d14a3ec8892b9b1983fbdb31d5183c4572bab8..565b3a48b3e74624078789ece37f361289816248 100644 (file)
@@ -5,15 +5,12 @@
 \n \b MESH represents a discretization of a geometrical CAD model into
 a set of entities with a simple topology. 
 
-Meshes are stored in DAT, MED, UNV, STL, CGNS, GMF and SAUVE formats and can be
-\subpage importing_exporting_meshes_page "imported from and exported to"
- the file in these formats.
-
 It is possible to \subpage constructing_meshes_page "construct meshes" 
 on the basis of geometrical shapes produced in the GEOM module.
 It is also possible to 
 \subpage constructing_submeshes_page "construct mesh on a part of the geometrical object", 
-for example, a face, with different meshing parameters than the whole mesh.
+for example, a face, with different meshing parameters or using
+another meshing algorithm than the whole mesh.
 
 Several created meshes can be \subpage building_compounds_page "combined into another mesh".
 
@@ -26,6 +23,10 @@ depending on the changed parameters will be re-computed.
 Meshes can be edited using the MESH functions destined for 
 \ref modifying_meshes_page "modification" of generated meshes.
 
+Meshes are stored in DAT, MED, UNV, STL, CGNS, GMF and SAUVE formats and can be
+\subpage importing_exporting_meshes_page "imported from and exported to"
+ the file in these formats.
+
 The \b topology of a mesh is described by the relationships between its
 entities including:
 
index 938c7870e213fc7bea88e806c18154c993dcabf7..adccc49aadb51367b2a0bf94d3e4e0c797045cd1 100644 (file)
@@ -38,6 +38,19 @@ has been locally defined on the opposite edge.
 <br><b>See Also</b> a sample TUI Script of a 
 \ref tui_propagation "Propagation hypothesis" operation
 
+\anchor propagofdistribution_anchor
+<h2>Propagation of Node Distribution on Opposite Edges</h2>
+
+<b>Propagation of Node Distribution on Opposite Edges</b> allows to propagate
+distribution of nodes onto an opposite edge. If a local hypothesis and
+propagation are defined on an edge of a quadrangular face, the
+opposite edge will have the same number of nodes and the same
+relations between segment lengths, unless another hypothesis
+has been locally defined on the opposite edge.
+<br><b>See Also</b> a sample TUI Script of a 
+\ref tui_propagation "Propagation hypothesis" operation
+
 \anchor quadrangle_preference_anchor
 <h2>Quadrangle Preference</h2>
 
@@ -68,29 +81,29 @@ computations.
 <li><b>Number of layers</b> - defines the number of element layers.</li>
 <li><b>Stretch factor</b> - defines the growth factor of element height
   from the mesh boundary inwards.</li>
-<li><b>Specified Edges are</b> - defines how the shapes specified by
+<li><b>Specified Faces/Edges are</b> - defines how the shapes specified by
   the next parameter are used.
-<li><b>Faces without layers</b> and <b>Edges with/without layers</b> - 
-  in the 3D case it defines geometrical faces on which element layers
-  should not be constructed; in the 2D case it defines geometrical edges
-  on which element layers either should be or should not be
-  constructed, depending on the value of the previous parameter
-  (<b>Specified Edges are</b>). 
+<li><b> Faces/Edges with/without layers</b> - 
+  defines geometrical faces or edges on which element layers
+  either should be or should not be constructed, depending on the
+  value of the previous parameter (<b>Specified Faces/Edges are</b>). 
+  Faces (or edges) can be selected either in the Object Browser or in
+  the VTK Viewer.
   \note A mesh shown in the 3D Viewer can prevent selection of faces
   and edges, just hide the mesh to avoid this. To avoid a long wait when a
   geometry with many faces (or edges) is displayed, the number of faces
   (edges) shown at a time is limited by the value of "Sub-shapes
   preview chunk size" preference (in Preferences/Mesh/General tab).<br>
 
-  Whatever shapes are specified by this
-  parameter, the element layers are not constructed on geometrical
-  faces shared by several solids in 3D case and edges shared by
-  several faces in 2D case. In other words the element layers can be
-  constructed on boundary faces and edges, and are not constructed on
-  internal faces and edges. There is an exception to this rule in 2D
-  case: if "Viscous Layers 2D" hypothesis is assigned to a sub-mesh,
-  the element layers can be constructed on boundary edges of the shape
-  of this sub-mesh.
+  If faces/edges without layers are specified, the element layers are
+  not constructed on geometrical faces shared by several solids in 3D
+  case and edges shared by several faces in 2D case. In other words,
+  in this mode the element layers can be constructed on boundary faces
+  and edges only, and are not constructed on internal faces and
+  edges. There is an exception to this rule: if a hypothesis is
+  assigned to a sub-mesh, the element layers can be constructed on
+  boundary faces/edges of the shape of this sub-mesh, at same time
+  possibly being internal faces/edges within the whole model.
   \image html viscous_layers_on_submesh.png 2D viscous layers constructed on boundary edges of a sub-mesh on a disk face.
 
 </li>
@@ -101,5 +114,4 @@ computations.
 <br><b>See also</b> a sample TUI script of a \ref tui_viscous_layers
 "Viscous layers construction".
 
-
 */
index 142ca62f4f44a5d16e01a98b05ffa11005bed810..e76863e8a09151d8d6b84af28841d74c901e4bce 100644 (file)
@@ -59,8 +59,8 @@ There is also a number of more specific algorithms:
 <li>\subpage prism_3d_algo_page "for meshing prismatic shapes"</li>
 <li>\subpage radial_quadrangle_1D2D_algo_page "for meshing special 2d faces (circles and part of circles)"</li>
 </ul>
-\ref use_existing_anchor "Use existing edges" and 
-\ref use_existing_anchor "Use existing faces" algorithms can be
+\ref use_existing_anchor "Use Edges to be Created Manually" and 
+\ref use_existing_anchor "Use Faces to be Created Manually" algorithms can be
 used to create a 1D or a 2D mesh in a python script.
 
 \ref constructing_meshes_page "Constructing meshes" page describes in
index 3240150c77f9e90999780667fd9e03fda5c5e771..7bf8306905efcb201d6b21cfa1bfce3af26ea6e6 100644 (file)
@@ -31,7 +31,7 @@ nodes are inside and some outside. </li>
 To apply this algorithm when you define your mesh, select <b>Body
   Fitting</b> in the list of 3D algorithms and click <em> "Add
   Hypothesis" </em> button and <em>"Body Fitting Parameters"</em>" menu
-  item. Dialog of <b>Body Fitting Parameters
+item. Dialog of <b>Body Fitting Parameters
   hypothesis</b> will appear.
 
 <br>
@@ -42,34 +42,64 @@ To apply this algorithm when you define your mesh, select <b>Body
 
 This dialog allows to define
 <ul>
-<li>\b Name of the algorithm </li>
-<li> Minimal size of a cell truncated by the geometry boundary. If the
-  size of a truncated grid cell is \b Threshold times less than a
-  initial cell size, then a mesh element is not created. </li>
-<li> Cartesian structured grid. Each grid axis is defined
-  individually. <b> Definition mode </b> chooses a way of grid
-  definition: <ul> 
-  <li> You can specify the \b Coordinates of grid nodes. \b Insert button
-    inserts a node at distance \b Step (negative or positive) from a
-    selected node. \b Delete button removes a selected node. Double
-    click on a coordinate in the list enables its edition. A grid
-    defined by \b Coordinates should enclose the geometry, else the
-    algorithm will fail. </li>
-  <li> You can define the \b Spacing of a grid as an algebraic formula 
-    <em>f(t)</em> where \a t is a position along a grid axis
-    normalized at [0.0,1.0]. The whole range of geometry can be
-    divided into sub-ranges with their own spacing formulas to apply;
+  <li>\b Name of the algorithm. </li>
+  <li> Minimal size of a cell truncated by the geometry boundary. If the
+    size of a truncated grid cell is \b Threshold times less than a
+    initial cell size, then a mesh element is not created. </li>
+  <li> <b> Implement Edges </b> check-box activates incorporation of
+  geometrical edges in the mesh.
+\image html cartesian_implement_edge.png "'Implement Edges' switched off (left) and on (right)"
+  <li> Cartesian structured grid. Location of nodes along each grid axis
+    is defined individually. <b> Definition mode </b> chooses a way of
+    grid definition:
+    <ul>
+      <li> You can specify the \b Coordinates of grid nodes. \b Insert button
+        inserts a node at distance \b Step (negative or positive) from a
+        selected node. \b Delete button removes a selected node. Double
+        click on a coordinate in the list enables its edition. 
+        \b Note that node coordinates are measured along directions of
+        axes that can differ from the directions of the Global Coordinate
+        System.</li>
+      <li> You can define the \b Spacing of a grid as an algebraic formula
+        <em>f(t)</em> where \a t is a position along a grid axis
+        normalized at [0.0,1.0]. The whole range of geometry can be
+        divided into sub-ranges with their own spacing formulas to apply;
     \a t varies between 0.0 and 1.0 within each sub-range. \b Insert button
-    divides a selected range into two ones. \b Delete button adds the
-    selected sub-range to the previous one. Double click on a range in
-    the list enables edition of its right boundary. Double click on a
-    function in the list enables its edition. 
-  </li> </ul>
-</li>
+        divides a selected range into two ones. \b Delete button adds the
+        selected sub-range to the previous one. Double click on a range in
+        the list enables edition of its right boundary. Double click on a
+        function in the list enables its edition.
+    </li> </ul>
+  </li>
+  <li> Coordinates of a <b> Fixed Point</b>. They allow to exactly
+    locate a grid node in a direction defined by spacing. If all the three
+    directions are defined by spacing, then there will be a mesh node at
+    the <b> Fixed Point</b>. If two directions are defined by spacing,
+    then there will be at least a link between mesh nodes passing through
+    the <b> Fixed Point</b>. If only one direction is defined by spacing,
+    then there will be at least an element facet passing through
+    the <b> Fixed Point</b>. If no directions are defined by spacing,
+    <b> Fixed Point</b> is disabled.</li>
+  <li> <b> Directions of Axes</b>. You can set up almost any
+    directions of grid axes that can help in generation of as many as
+    possible hexahedral elements.
+    <ul>
+      <li><b> Orthogonal Axes </b> check-box, if activated, keeps the
+        axes orthogonal during their modification. </li>
+      <li> Selection buttons enable snapping corresponding axes to
+        direction of a geometrical edge selected in the Object
+        Browser. Edge direction is defined by coordinates of its end
+        points.</li>
+      <li><b> Optimal Axes</b> button runs an algorithm that tries to
+        set the axes so that a number of generated hexahedra to be
+        maximal.</li>
+      <li><b> Reset </b> button returns the axes in a default position
+      parallel to the axes of the Global Coordinate System.</li> 
+  </ul></li>
 </ul>
 
 <br>
-<b>See Also</b> a sample TUI Script of a 
-\ref tui_cartesian_algo "Usage of Body Fitting algorithm".  
+<b>See Also</b> a sample TUI Script of a
+\ref tui_cartesian_algo "Usage of Body Fitting algorithm".
 
 */
index e777e84a186fc4ba9871df3e9d1d241d568acf65..c8be2278ee5db1d39ecf44fb1d3c9e7b07a7b919 100644 (file)
@@ -41,6 +41,7 @@ shown.
 - \b Balls:
   - \b Color - color of discrete ball elements.
   - \b Size - size of discrete ball elements.
+  - \b Scale - scale factor of discrete ball elements.
 - <b>Orientation vectors</b>:
   - \b Color - color of orientation vectors.
   - \b Scale - size of orientation vectors.
index 0671f89093adc823b03f6249561bcbb44413b72b..b6c687bb03c2cbdc26499d3cd550426cfb36f705 100644 (file)
@@ -33,14 +33,15 @@ written in Python.
     <br>
   </li>
   <li>Apply \subpage basic_meshing_algos_page "meshing algorithms" and
-    \subpage about_hypo_page "hypotheses" which will be used at computation of
+    \subpage about_hypo_page "hypotheses" which will be used to compute
     this mesh.
 
     "Create mesh" dialog box contains several tab pages titled \b 3D,
     \b 2D, \b 1D and \b 0D. The title of each page reflects the
     dimension of the CAD model (geometry) the algorithms listed on
-    this page affect. For example, \b 3D page lists the algorithms
-    that affect 3D geometrical objects (solids).
+    this page affect and the maximal dimension of elements the algorithms
+    generate. For example, \b 3D page lists the algorithms that affect
+    3D geometrical objects (solids).
 
     \note
     - Some page(s) can be disabled if the source geometrical
@@ -86,9 +87,24 @@ written in Python.
     <em>"Edit Hypothesis" button</em>
     </center>
 
-    Most standard 2D and 3D algorithms can work without hypotheses
-    using some default parameters. The use of additional hypotheses
-    is optional (i.e. you may leave "None" in this box).
+    Most 2D and 3D algorithms can work without hypotheses using some
+    default meshing parameters. Some algorithms does not require any
+    hypothesis. After selection of an algorithm "Hypothesis" field of
+    the dialog can contain:
+    <ul>
+      <li> <em>\<Default\></em> if the algorithm can work using default
+      parameters.</li>
+      <li> <em>\<None\></em> if the algorithm requires a hypothesis defining
+      its parameters.</li>
+      <li> Nothing if the algorithm has no parameters to tune.</li>
+    </ul>
+    After selection of an algorithm "Add. Hypothesis" field of
+    the dialog can contain:
+    <ul>
+      <li> <em>\<None\></em> if the algorithm can be additionally tuned
+      using an additional hypothesis.</li>
+      <li> Nothing if the algorithm has no additional parameters to tune.</li>
+    </ul>
 
     Proceed in the same way with 2D and 1D Algorithms and Hypotheses that
     will be used to mesh faces and edges of your geometry. (Note
@@ -331,26 +347,29 @@ By default, the information box is always shown after mesh computation operation
 <br><br>
 
 \anchor use_existing_anchor
-<h2>"Use existing edges" and "Use existing faces" algorithms</h2>
+<h2>"Use Edges to be Created Manually" and "Use Faces to be Created Manually" algorithms</h2>
 
 It is possible to create a 1D or a 2D mesh in a python script
 (using <em>AddNode, AddEdge</em> and <em>AddFace</em> commands) and
 then use such sub-meshes in the construction of a 2D or a 3D mesh. For
-this, there exist two algorithms: <b>Use existing edges</b> and <b>Use
-  existing faces</b>.
-For example, you want to use standard algorithms to generate 1D and 3D
+this, there exist two algorithms: <b>Use Edges to be Created
+Manually</b> and <b>Use Faces to be Created Manually</b>.
+Imagine, you want to use standard algorithms to generate 1D and 3D
 meshes and to create 2D mesh by your python code. Then you
 <ol>
   <li> create a mesh object, assign a 1D algorithm,</li>
   <li> invoke \b Compute command, which computes a 1D mesh,</li>
-  <li> assign <b>Use existing faces</b> and a 3D algorithm,</li>
+  <li> assign <b>Use Faces to be Created Manually</b> and a 3D algorithm,</li>
   <li> run your python code, which creates a 2D mesh,</li>
   <li> invoke \b Compute command, which computes a 3D mesh.</li>
 </ol>
+\warning <b>Use Edges to be Created Manually</b> and <b>Use Faces to
+be Created Manually</b> algorithms should be assigned _before_
+mesh generation by the Python code.
 
 Consider trying a sample script demonstrating the usage of 
-\ref tui_use_existing_faces "Use existing faces" algorithm for
-construction of a 2D mesh using Python commands.
+\ref tui_use_existing_faces "Use Faces to be Created Manually"
+algorithm for construction of a 2D mesh using Python commands.
 
 \image html use_existing_face_sample_mesh.png
 <em> Mesh computed by \ref tui_use_existing_faces "the sample script"
index 817a7e40aebba37684a37aa4fe3e38a15badc0da..c86f0bdc13d3144cb6493ead4434d4c0378fb7b6 100644 (file)
@@ -4,7 +4,7 @@
 
 \n This operation allows duplicating mesh nodes or/and elements, which can be useful to emulate a crack in the model.
 
-Duplication consists in creation of mesh element "equal" to existing ones.
+Duplication consists in creation of mesh elements "equal" to existing ones.
 
 <em>To duplicate nodes or/and elements:</em>
 <ol>
@@ -14,7 +14,7 @@ Duplication consists in creation of mesh element "equal" to existing ones.
 <br>
 \image html duplicate_nodes.png "Duplicate Nodes or/and Elements button"
 </li>
-<li>Check in the dialog box one of three radio buttons corresponding to
+<li>Check in the dialog box one of four radio buttons corresponding to
   the type of duplication operation you would like to perform.</li>
 <li>Fill the other fields available in the dialog box (depending on
   the chosen operation mode).</li>
@@ -22,11 +22,12 @@ Duplication consists in creation of mesh element "equal" to existing ones.
   operation of duplication.</li> 
 </ol>
 
-\n "Duplicate Nodes or/and Elements" dialog has three working modes:
+\n "Duplicate Nodes or/and Elements" dialog has four working modes:
 <ul>
 <li>\ref mode_without_elem_anchor "Duplicate nodes only"</li>
 <li>\ref mode_with_elem_anchor "Duplicate nodes and border elements"</li>
 <li>\ref mode_elem_only_anchor "Duplicate elements only"</li>
+<li>\ref mode_group_boundary_anchor "Duplicate nodes on group boundaries"</li>
 </ul>
 
 <br>
@@ -103,12 +104,11 @@ located at the "crack" (if any) are cloned automatically.
 <h2>Duplicate elements only</h2>
 
 This mode duplicates the given elements, i.e. creates new elements with the same nodes as the given elements.
-
 <br>
 
-
 \image html duplicate03.png
 
+Parameters to be defined in this mode:
 <ul>
 <li><b>Group of elements to duplicate</b> (<em>mandatory</em>): these
   elements will be duplicated.</li> 
@@ -118,6 +118,38 @@ This mode duplicates the given elements, i.e. creates new elements with the same
   "DoubleElements".</li>
 </ul>
 
+<br>
+\anchor mode_group_boundary_anchor
+<h2>Duplicate nodes on group boundaries</h2>
+
+This mode duplicates nodes located on boundaries between given groups of
+volumes. If required, flat elements are created on the duplicated
+nodes: a triangular facet shared by two volumes of two groups generates
+a flat prism, a quadrangular facet generates a flat hexahedron.
+<br>
+The created flat volumes are stored in groups. These groups are named
+according to the position of the group in the list of groups: group
+"j_n_p" is a group of flat elements that are built between the group \#n
+and the group \#p in the group list. All the flat elements are gathered
+into the group named "joints3D". The flat element of the multiple
+junctions between the simple junction are stored in a group named
+"jointsMultiples".
+
+<br>
+
+\image html duplicate04.png
+
+Parameters to be defined in this mode:
+<ul>
+<li><b>Groups of volumes</b> (<em>mandatory</em>): list of volume
+  groups. These groups should be disjoint, i.e. should not share volumes.</li>
+<li><b>Create joint elements</b> : if checked - the flat elements are created.</li>
+<li><b>On all boundaries</b> : if checked - then the volumes not
+  included into the <b>Groups of volumes</b> are considered as another given
+  group. And thus nodes on boundary between <b>Groups of volumes</b> and the
+  rest mesh are also duplicated.</li>
+</ul>
+
 <br><b>See Also</b> a sample TUI Script of a
  \ref tui_duplicate_nodes "Duplicate nodes or/and elements" operation.
 
index 9182f97be4d2907adcb9046d3dc3f6117172c60e..a4c2a66ab0326a76cb608e6c4211b89b3df262f0 100644 (file)
@@ -6,9 +6,9 @@
 
 \n \b MESH module of SALOME is destined for:
 <ul>
-<li>\ref importing_exporting_meshes_page "import and export of meshes in various formats";</li>
 <li>\subpage about_meshes_page "meshing geometrical models"
 previously created or imported by the Geometry component; </li>
+<li>\ref importing_exporting_meshes_page "import and export of meshes in various formats";</li>
 <li>\subpage viewing_meshes_overview_page "viewing created meshes" in
 the VTK viewer;</li>
 <li>\subpage grouping_elements_page "creating groups of mesh elements";</li>
@@ -30,8 +30,6 @@ Also, there is a possibility to \subpage arranging_study_objects_page "re-arrang
 Almost all mesh module functionalities are accessible via
 \subpage smeshpy_interface_page "Mesh module Python interface".
 
-Other functions are available in <a class="el" target="_new" href="../../tui/SMESH/docutils/index.html">salome.smesh python package</a>.
-
 \image html image7.jpg "Example of MESH module usage for engineering tasks"
 
 */
index 02574d07dde82aec065a16e08fb006bdb5b1ac2e..e0374fd4c41e9ffba551484034ba199c5e86ea28 100644 (file)
@@ -159,6 +159,8 @@ later sessions with this module.
   - <b>Size of 0D elements</b> - specifies default size of 0D elements.
   - <b>Size of ball elements</b> - specifies default size of discrete
     elements (balls).
+  - <b>Scale factor of ball elements</b> - specifies default scale factor of discrete
+    elements (balls).
   - <b>Line width</b> - allows to define the width of 1D elements (edges).
   - <b>Outline width</b> - allows to define the width of borders of
     2D and 3D elements (shown in the Shading mode).
index 5f4166b38a9f269525f46e6df8686ebc015303f6..958a662eb42fe535b4c354db587e69a49c9c1d89 100644 (file)
@@ -14,17 +14,18 @@ click <em>"Move Node"</em> button in the toolbar.
 \image html image67.png
 <center><em>"Move Node" button</em></center>
 
-The following dialog box shall appear:
+One of the following dialogs will appear:
 
-\image html meshtopass.png
+\image html meshtopass1.png "manual method of selecting node"
+\image html meshtopass2.png "automatic method of selecting node"
 
 </li>
+<li>Specify the way of selection of the node: manually (first radio button) or automatically (second radio button).</li>
+<li>If the manual method selected, select the necessary node (X, Y, Z fields show the original coordinates of the node to move) or set the ID node.</li>
 <li>Enter the coordinates of the destination point.</li>
-<li>Check in <b>Find closest to destination</b> option or
-select the necessary node manually (X, Y, Z, dX, dY, dZ fields show the original coordinates and displacement of the node to move).
-\b Preview check-box shows the operation results.</li>
-<li> <b>Update Destination</b> button is activated when <b>Find closest to destination</b> option is unchecked. Click <b>Update Destination</b> button to update the coordinates of the destination point.</li>
-<li>Click the \b Apply or <b>Apply and Close</b> button.</li>
+<li>Click <b>Update Destination</b> button to update the coordinates of the destination point.</li>
+<li>Activate \b Preview checkbox to show the result of move in the viewer</li>
+<li>Click the \b Apply or <b>Apply and Close</b> button to confirm the operation.</li>
 </ol>
 
 \image html moving_nodes1.png "The initial mesh"
index b7b7e2e646050fdd1ab262c3b5f9be5701237586..d32e56a488901ca2d6b81088814edc2fdc9c5f59 100644 (file)
@@ -39,7 +39,7 @@ with consequent transformation of all adjacent elements and edges.</li>
  of the selected elements.</li>
 <li>\subpage reorient_faces_page "Reorient faces by vector".</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 split_to_tetra_page "Split" volumic elements into tetrahedra or prisms.</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 c690fb7efd8e5eb4a8e28a6a46877f627734233c..df7e15967f55bcc6c0c1af93dff509fd40d880c3 100644 (file)
@@ -15,9 +15,24 @@ in the \ref smeshBuilder and \ref StdMeshersBuilder Python packages.
 \n You may have to modify your scripts generated with SALOME 6 or older versions.
 \n Please see \ref smesh_migration_page
 
+The SMESH python package contains helper functions to manipulate mesh elements and 
+interact with these elements.
+
+Note that these functions either encapsulate the python programming interface of SMESH core 
+(the CORBA or SWIG interface for example) or extend existing utilities as the smesh.py module.
+
+The functions are distributed in the python package \b salome.smesh.
+
+\note
+The main package \b salome contains other sub-packages that are distributed with the other 
+SALOME modules. For example, the KERNEL module provides the python package \b salome.kernel 
+and GEOM the package \b salome.geom.
+
 Class \ref smeshBuilder.smeshBuilder "smeshBuilder" provides an interface to create and handle
 meshes. It can be used to create an empty mesh or to import mesh from the data file.
 
+Class \ref smeshstudytools.SMeshStudyTools "SMeshStudyTools" provides several methods to manipulate mesh objects in Salome study. 
+
 As soon as mesh is created, it is possible to manage it via its own
 methods, described in class \ref smeshBuilder.Mesh "Mesh" documentation.
 
index 325c30c116209cfc4187a1ab5f5aa7c4d0e60e7f..eb7fe0f26805f7dbf3c42157519ef0e091066cd0 100644 (file)
@@ -1,53 +1,86 @@
 /*!
 
-\page split_to_tetra_page Splitting volumes into tetrahedra
+\page split_to_tetra_page Splitting volumes
 
-\n This operation allows to split volumic elements into tetrahedra. 
-2D mesh is modified accordingly.
+\n This operation allows to split either any volumic elements into
+tetrahedra or hexahedra into prisms. 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.
+<li>Display a mesh, a sub-mesh or a group in the 3D viewer.</li>
+<li>In the \b Modification menu select the <b>Split Volumes</b> item or
+click <em>"Split Volumes"</em> button in the toolbar.
 
 \image html split_into_tetra_icon.png
-<center><em>"Split into Tetrahedra" button</em></center>
+<center><em>"Split Volumes" button</em></center>
 
 The following dialog box will appear:
 
 \image html split_into_tetra.png
 
-\par
+<br>
+<b>Target element type</b> group of radio-buttons allows to select
+a type of operation. If \b Tetrahedron button is checked, then the
+operation will split volumes of any type into tetrahedra.
+If \b Prism button is checked, then the operation will split hexahedra
+into prisms, and the dialog will look as follows:
+
+\image html split_into_prisms.png
+
 <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 the
-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>The main list contains list of volumes to split. 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 the
+  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>
+  volumes of the currently selected mesh.</li>
 </ul>
 
 <ul>
-<li>\b Split hexahedron
+<li><b> Split hexahedron </b> group allows to specify a method of
+  splitting hexahedra.
 
 <ul>
-<li><b>Into 5 tetrahedra</b>, <b>Into 6 tetrahedra</b> and <b>Into 24 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 the 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><b>Into N tetrahedra/prisms</b> allows to specify the number of
+  tetrahedra or prisms 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 the 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> 
+<li> <b> Facet to split </b> group allows to specify a side (facet) of a
+  hexahedron to split into triangles when splitting into prisms.
+  The facet to split is defined by specifying a point and a direction
+  close to normal of the facet. The operation finds a hexahedron most
+  close to the specified point and splits a facet whose normal is most
+  close to the specified direction. Then the splitting is propagated
+  from that hexahedron to all adjacent hexahedra.
+  <ul> 
+    <li> <b> Hexa location </b> allows to specify a <em> start
+        point </em> by which a first split hexahedron is found. <em>
+        Selection button</em> switches to selection of the element whose
+      barycenter will be used the start point and whose direction will be
+      used as a normal to facet to split into triangles. To return to
+      selection of volumes to split it is necessary to switch this button
+      off. </li>
+    <li> <b> Facet normal </b> allows to specify a direction of the
+    normal to hexahedron facet to split into triangles.</li>
+  </ul>
+<li><b> All domains </b> - if it is off the operation stops as all
+  hehexedra adjacent to the start hexahedron are split into
+  prisms. Else the operation tries to continue splitting starting from
+  another hexahedron closest to the <b> Hexa location</b>. </li>
 </li>
+</ul>
 
-<li><b>Select from</b> a set of fields allows to choose a submesh or an
-existing group whose elements will be automatically added to the
-list.</li>
+<li><b>Select from</b> a set of fields allows to choose a sub-mesh or an
+  existing group whose elements will be added to the list as you ckick
+  \b Add button.</li>
 </ul>
 
 <li>Click the \b Apply or <b>Apply and Close</b> button to confirm the operation.</li>
index 333017d774aa8ca4d5a5bb9e834869528805f98e..c19afd1b98dee3f3f11100c943b517b7a426bca8 100644 (file)
@@ -9,6 +9,7 @@ This page provides example codes of \ref tui_defining_meshing_algos
   <ul>
     <li>\ref tui_1d_adaptive "Adaptive 1D" hypothesis</li>
     <li>\ref tui_1d_arithmetic "Arithmetic 1D" hypothesis</li>
+    <li>\ref tui_1d_arithmetic "Geometric Progression" hypothesis</li>
     <li>\ref tui_deflection_1d "Deflection 1D and Number of Segments" hypotheses</li>
     <li>\ref tui_start_and_end_length "Start and End Length" hypotheses</li>
     <li>\ref tui_average_length "Local Length"</li>
@@ -36,7 +37,7 @@ This page provides example codes of \ref tui_defining_meshing_algos
     <li> \ref tui_quadrangle_parameters "Quadrangle Parameters" hypothesis </li>
   </ul>
 </li>
-<li>\ref tui_import "Use Existing Elements" algorithm</li>
+<li>\ref tui_import "Import 1D-2D Elements from Another Mesh" algorithm</li>
 </ul>
 <br>
 
@@ -44,7 +45,7 @@ This page provides example codes of \ref tui_defining_meshing_algos
 
 <br>
 \anchor tui_1d_arithmetic
-<h3>Arithmetic 1D</h3>
+<h3>Arithmetic 1D and Geometric Progression</h3>
 \tui_script{defining_hypotheses_ex01.py}
 
 <br>
@@ -123,7 +124,7 @@ This page provides example codes of \ref tui_defining_meshing_algos
 \tui_script{defining_hypotheses_ex15.py}
 
 \anchor tui_import
-<h2>"Use Existing Elements" example </h2>
+<h2>"Import 1D-2D Elements from Another Mesh" example </h2>
 \tui_script{defining_hypotheses_ex16.py}
 
 \anchor tui_viscous_layers
index ddc56cb839bb9b44b5ca437d7e49a018d62160f0..03928c38baf3687d640e8517f63198cb6557c7fc 100644 (file)
@@ -1,9 +1,9 @@
 /*!
 
-\page tui_use_existing_faces Use existing faces algorithm
+\page tui_use_existing_faces Usage of "Use Faces to be Created Manually" algorithm
 
-This sample demonstrates how to use <b>Use existing faces</b> algorithm,
-which is actulally just a stub allowing to use your own 2D algoritm
+This sample demonstrates how to use <b>Use Faces to be Created Manually</b> algorithm,
+which is actually just a stub allowing to use your own 2D algorithm
 implemented in Python.
 
 \tui_script{use_existing_faces.py}
index 79f718510e70672fa986f90020e90c46a73381ff..55eb854dd7f14a374dd8c62c02fa1bed8e9571e5 100644 (file)
@@ -1,8 +1,9 @@
 /*!
 
-\page import_algos_page Use Existing Elements Algorithms
+\page import_algos_page "Import Elements from Another Mesh" Algorithms
 
-\n <em>Use Existing Elements </em>algorithms allow to define the mesh of a geometrical
+\n <em>Import nD Elements from Another Mesh </em>algorithms allow to
+define the mesh of a geometrical 
 object by importing suitably located mesh elements from another
 mesh. The mesh elements to import from the other mesh should be contained in
 groups. If several groups are used to mesh the same geometry, validity of
@@ -17,13 +18,14 @@ part, by storing meshes of parts in files and then fusing them
 together using these algorithms.
 <br>
 
-<b>Use Existing 1D Elements</b> algorithm allows to define the mesh of
-a geometrical edge (or group of edges)
+<b>Import 1D Elements from Another Mesh</b> algorithm allows to define
+the mesh of a geometrical edge (or group of edges)
 by importing mesh edges contained in a group (or groups) from another mesh.
-\n To apply this algorithm select the edge to be meshed (indicated in
+<br> 
+To apply this algorithm select the edge to be meshed (indicated in
 the field \b Geometry of <b>Create mesh</b> dialog box),
-<b>Use existing 1D elements</b> in the list of 1D algorithms and click the
-<em>"Add Hypothesis"</em> button.
+<b>Import 1D Elements from Another Mesh</b> in the list of 1D
+algorithms and click the <em>"Add Hypothesis"</em> button.
 The following dialog box will appear:
 
 \image html hyp_source_edges.png
@@ -38,16 +40,16 @@ mesh. In this case <b>To copy groups</b> checkbox allows to create
 the same groups as in the imported source mesh.</li>
 </ul>
 
-<b>Use Existing 2D Elements</b> algorithm allows to define the mesh of
-a geometrical face (or group of faces)
+<b>Import 1D-2D Elements from Another Mesh</b> algorithm allows to define
+the mesh of a geometrical face (or group of faces) 
 by importing mesh faces contained in a group (or groups) from another
 (or this) mesh. 1D elements on the boundary of the geometrical face
 (if not yet present) are also created by the algorithm in conformity 
-with the created 2D elements.
-\n To apply this algorithm select the geometrical face to be meshed (indicated in
+with the created 2D elements.<br>
+To apply this algorithm select the geometrical face to be meshed (indicated in
 the field \b Geometry of <b>Create mesh</b> dialog box),
-<b>Use existing 2D elements</b> in the list of 2D algorithms and click the
-<em>"Add Hypothesis"</em> button.
+<b>Import 1D-2D Elements from Another Mesh</b> in the list of 2D
+algorithms and click the <em>"Add Hypothesis"</em> button.
 The following dialog box will appear:
 
 \image html hyp_source_faces.png
@@ -63,7 +65,7 @@ the same groups as in the imported source mesh.</li>
 </ul>
 
 <br><b>See Also</b> a sample TUI Script of a 
-\ref tui_import "Use Existing Elements Algorithms".
+\ref tui_import "Import 2D Elements from Another Mesh".
 
 */
 
index 4137de2f068777389e6899908aac7683ac507255..2972fc5e3a6d2ce43375a6f49b6313de67ab8dcc 100755 (executable)
@@ -4,7 +4,7 @@
   <ul>
     $navpath
     <li class="footer">
-      Copyright &copy; 2007-2013  CEA/DEN, EDF R&amp;D, OPEN CASCADE<br>
+      Copyright &copy; 2007-2014  CEA/DEN, EDF R&amp;D, OPEN CASCADE<br>
       Copyright &copy; 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&amp;D, LEG, PRINCIPIA R&amp;D, BUREAU VERITAS<br>
     </li>
   </ul>
index dd0a694786764d7b00a596ad1137d4139119a9ee..065c8b8430fe81530b7837de6bb6426345daccca 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7379feaf1a6461dab14b00f2e43423be46a84f91..41f8b4513eca011487e5d739dc07ac98b3d4d2ff 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4137de2f068777389e6899908aac7683ac507255..2972fc5e3a6d2ce43375a6f49b6313de67ab8dcc 100755 (executable)
@@ -4,7 +4,7 @@
   <ul>
     $navpath
     <li class="footer">
-      Copyright &copy; 2007-2013  CEA/DEN, EDF R&amp;D, OPEN CASCADE<br>
+      Copyright &copy; 2007-2014  CEA/DEN, EDF R&amp;D, OPEN CASCADE<br>
       Copyright &copy; 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&amp;D, LEG, PRINCIPIA R&amp;D, BUREAU VERITAS<br>
     </li>
   </ul>
index 8d2cdac64a15a9417a5adf6af7f46d77f94487d7..f938e0444c40b28d1f5a5f1ea30773a77a4e0cae 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 798475b30318eb0a013fc77ebdabaccfd1c90f38..72d1b1a2d2817cd9e7cd4bc128332ffe3a182ff2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -127,10 +127,36 @@ module StdMeshers
     double GetFineness();
   };
 
+  /*!
+   * Common inteface of 1D hypotheses that can be reversed
+   */
+  interface Reversible1D
+  {
+    /*!
+     * Set list of edges to reverse
+     */
+    void SetReversedEdges( in SMESH::long_array list );
+    
+    /*!
+     * Returns list of edges to reverse
+     */
+    SMESH::long_array GetReversedEdges();
+    
+    /*!
+     * Set entry of the main object
+     */
+    void SetObjectEntry( in string entry );
+    
+    /*!
+     * Get the entry of the main object
+     */
+    string GetObjectEntry();
+  };
+
   /*!
    * StdMeshers_NumberOfSegments: interface of "Nb. Segments" hypothesis
    */
-  interface StdMeshers_NumberOfSegments : SMESH::SMESH_Hypothesis
+  interface StdMeshers_NumberOfSegments : SMESH::SMESH_Hypothesis, Reversible1D
   {
     /*!
      * Builds and returns point distribution according to passed density function
@@ -209,32 +235,12 @@ module StdMeshers
      */
     long ConversionMode()
       raises (SALOME::SALOME_Exception);
-
-    /*!
-     * Set list of edges to reverse
-     */
-    void SetReversedEdges( in SMESH::long_array list );
-    
-    /*!
-     * Returns list of edges to reverse
-     */
-    SMESH::long_array GetReversedEdges();
-    
-    /*!
-     * Set entry of the main object
-     */
-    void SetObjectEntry( in string entry );
-    
-    /*!
-     * Get the entry of the main object
-     */
-    string GetObjectEntry();
   };
 
   /*!
    * StdMeshers_Arithmetic1D: interface of "Arithmetic 1D" hypothesis
    */
-  interface StdMeshers_Arithmetic1D : SMESH::SMESH_Hypothesis
+  interface StdMeshers_Arithmetic1D : SMESH::SMESH_Hypothesis, Reversible1D
   {
     /*!
      * Sets <start segment length> or <end segment length> parameter value
@@ -260,26 +266,36 @@ module StdMeshers
      * Returns <start segment length> or <end segment length> parameter value
      */
     double GetLength(in boolean isStartLength);
-    
+
+  };
+
+  /*!
+   * StdMeshers_Arithmetic1D: interface of "Geometric 1D" hypothesis
+   */
+  interface StdMeshers_Geometric1D : SMESH::SMESH_Hypothesis, Reversible1D
+  {
     /*!
-     * Set list of edges to reverse
+     * Sets length of the first segment
      */
-    void SetReversedEdges( in SMESH::long_array list );
-    
+    void SetStartLength(in double length) 
+      raises (SALOME::SALOME_Exception);
+
     /*!
-     * Returns list of edges to reverse
+     * Sets value of Common Ratio
      */
-    SMESH::long_array GetReversedEdges();
-    
+    void SetCommonRatio(in double factor)
+      raises (SALOME::SALOME_Exception);
+
     /*!
-     * Set entry of the main object
+     * Returns length of the first segment
      */
-    void SetObjectEntry( in string entry );
-    
+    double GetStartLength();
+
     /*!
-     * Get the entry of the main object
+     * Returns value of Common Ratio
      */
-    string GetObjectEntry();
+    double GetCommonRatio();
+
   };
 
   /*!
@@ -319,7 +335,7 @@ module StdMeshers
   /*!
    * StdMeshers_StartEndLength: interface of "Start and End Length" hypothesis
    */
-  interface StdMeshers_StartEndLength : SMESH::SMESH_Hypothesis
+  interface StdMeshers_StartEndLength : SMESH::SMESH_Hypothesis, Reversible1D
   {
     /*!
      * Sets <start segment length> or <end segment length> parameter value
@@ -346,25 +362,6 @@ module StdMeshers
      */
     double GetLength(in boolean isStartLength);
 
-    /*!
-     * Set list of edges to reverse
-     */
-    void SetReversedEdges( in SMESH::long_array list );
-    
-    /*!
-     * Returns list of edges to reverse
-     */
-    SMESH::long_array GetReversedEdges();
-    
-    /*!
-     * Set entry of the main object
-     */
-    void SetObjectEntry( in string entry );
-    
-    /*!
-     * Get the entry of the main object
-     */
-    string GetObjectEntry();
   };
 
 
@@ -388,7 +385,7 @@ module StdMeshers
   /*!
    * StdMeshers_FixedPoints1D: interface of "Fixed points 1D" hypothesis
    */
-  interface StdMeshers_FixedPoints1D : SMESH::SMESH_Hypothesis
+  interface StdMeshers_FixedPoints1D : SMESH::SMESH_Hypothesis, Reversible1D
   {
     /*!
      * Sets some points on edge using parameter on curve from 0 to 1
@@ -410,26 +407,7 @@ module StdMeshers
      * Returns list of numbers of segments
      */
     SMESH::long_array GetNbSegments();
-    
-    /*!
-     * Set list of edges to reverse
-     */
-    void SetReversedEdges( in SMESH::long_array list );
-    
-    /*!
-     * Returns list of edges to reverse
-     */
-    SMESH::long_array GetReversedEdges();
-    
-    /*!
-     * Set entry of the main object
-     */
-    void SetObjectEntry( in string entry );
-    
-    /*!
-     * Get the entry of the main object
-     */
-    string GetObjectEntry();
+
   };
 
   /*!
@@ -483,7 +461,8 @@ module StdMeshers
   };
 
   /*!
-   * StdMeshers_Propagation: interface of "Propagation" hypothesis.
+   * StdMeshers_Propagation: interface of "Propagation of 1D Hyp. on
+   * Opposite Edges" hypothesis.
    * Presence of this hypothesis on any edge propagates any other 1D
    * hypothesis from this edge on all edges, opposite to it.
    * It concerns only edges of quadrangle faces.
@@ -492,6 +471,17 @@ module StdMeshers
   {
   };
 
+  /*!
+   * StdMeshers_Propagation: interface of "Propagation of Node
+   * Distribution on Opposite Edges" hypothesis.
+   * Presence of this hypothesis on any edge propagates distribution of nodes
+   * from this edge on all edges, opposite to it.
+   * It concerns only edges of quadrangle faces.
+   */
+  interface StdMeshers_PropagOfDistribution : SMESH::SMESH_Hypothesis
+  {
+  };
+
   /*!
    * StdMeshers_QuadranglePreference: interface of "QuadranglePreference" hypothesis.
    * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
@@ -807,6 +797,22 @@ module StdMeshers
      * Get the type of quadrangulation
      */
     QuadType GetQuadType();
+
+    /*!
+     * Set positions of enforced nodes
+     */
+    void SetEnforcedNodes(in GEOM::ListOfGO vertices, in SMESH::nodes_array points)
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+     * Returns positions of enforced nodes
+     */
+    void GetEnforcedNodes(out GEOM::ListOfGO vertices, out SMESH::nodes_array points);
+
+    /*!
+     * Returns entries of shapes defining enforced nodes
+     */
+    SMESH::string_array GetEnfVertices();
   };
 
   /*!
@@ -865,6 +871,14 @@ module StdMeshers
     void SetIgnoreFaces(in SMESH::long_array faceIDs) raises (SALOME::SALOME_Exception);
     SMESH::long_array GetIgnoreFaces();
 
+    /*!
+     * Set faces either to exclude from treatment or to make the Viscous Layers on.
+     */
+    void SetFaces(in SMESH::long_array faceIDs,
+                  in boolean           toIgnore) raises (SALOME::SALOME_Exception);
+    SMESH::long_array GetFaces();
+    boolean           GetIsToIgnoreFaces();
+
     /*!
      * Set total thickness of layers of prisms
      */
@@ -928,15 +942,16 @@ module StdMeshers
   /*!
    * interface of "Body fitting Parameters" hypothesis.
    * This hypothesis specifies 
-   * - Definition of the Cartesian grid
    * - Size threshold
+   * - Definition of the Cartesian grid
+   * - Direction of grid axes
    */
   interface StdMeshers_CartesianParameters3D : SMESH::SMESH_Hypothesis
   {
     /*!
      * Set size threshold. A polyhedral cell got by cutting an initial
      * hexahedron by geometry boundary is considered small and is removed if
-     * it's size is \athreshold times less than the size of the initial hexahedron. 
+     * it's size is \a threshold times less than the size of the initial hexahedron. 
      * threshold must be > 1.0
      */
     void SetSizeThreshold(in double threshold) raises (SALOME::SALOME_Exception);
@@ -951,8 +966,8 @@ module StdMeshers
     /*!
      * Set coordinates of nodes along an axis (countered from zero)
      */
-    void SetGrid(in SMESH::double_array coords,
-                 in short               axis) raises (SALOME::SALOME_Exception);
+    void SetGrid(in SMESH::double_array  coords,
+                 in short                axis) raises (SALOME::SALOME_Exception);
     SMESH::double_array GetGrid(in short axis) raises (SALOME::SALOME_Exception);
 
     /*!
@@ -971,6 +986,39 @@ module StdMeshers
     void GetGridSpacing(out SMESH::string_array spaceFunctions,
                         out SMESH::double_array internalPoints,
                         in short                axis) raises (SALOME::SALOME_Exception);
+    /*!
+     * Set custom direction of axes
+     */
+    void SetAxesDirs(in SMESH::DirStruct x,
+                     in SMESH::DirStruct y,
+                     in SMESH::DirStruct z ) raises (SALOME::SALOME_Exception);
+    void GetAxesDirs(out SMESH::DirStruct x,
+                     out SMESH::DirStruct y,
+                     out SMESH::DirStruct z );
+    /*!
+     * Set/unset a fixed point, at which a node will be created provided that grid
+     * is defined by spacing in all directions
+     */
+    void SetFixedPoint(in SMESH::PointStruct p, in boolean toUnset);
+    boolean GetFixedPoint(out SMESH::PointStruct p);
+
+    /*!
+     * Enables implementation of geometrical edges into the mesh. If this feature
+     * is disabled, sharp edges of the shape are lost ("smoothed") in the mesh if
+     * they don't coincide with the grid lines
+     */
+    void SetToAddEdges(in boolean toAdd);
+    boolean GetToAddEdges();
+
+    /*!
+     * Returns axes at which a number of generated hexahedra is maximal
+     */
+    void ComputeOptimalAxesDirs(in GEOM::GEOM_Object shape,
+                                in boolean           isOrthogonal,
+                                out SMESH::DirStruct x,
+                                out SMESH::DirStruct y,
+                                out SMESH::DirStruct z ) 
+      raises (SALOME::SALOME_Exception);
 
     /*!
      * \brief Computes node coordinates by spacing functions
@@ -978,13 +1026,15 @@ module StdMeshers
      *  \param x1 - upper coordinate
      *  \param spaceFuns - space functions
      *  \param points - internal points
-     *  \param coords - the computed coordinates
+     *  \param axisName - e.g. "X"
+     *  \return the computed coordinates
      */
     SMESH::double_array ComputeCoordinates(in double              x0,
                                            in double              x1,
                                            in SMESH::string_array spaceFuns,
                                            in SMESH::double_array points,
-                                           in string              axisName ) raises (SALOME::SALOME_Exception);
+                                           in string              axisName ) 
+      raises (SALOME::SALOME_Exception);
   };
 
   /*!
index 4522b220532aee5b440ec7d677f1767cce99771b..5da26e1d18754b24d54e588bb776ab74b3b6f02f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 813364ba0005df173b6288e3ce1d6af9f9874612..052423ae1acc143206847c8987ea59c3e2adbd0a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -417,6 +417,13 @@ module SMESH
     void Move( in sobject_list what, 
               in SALOMEDS::SObject where, 
               in long row );
+    /*!
+     * Return true if algorithm can be applied
+     */
+    boolean IsApplicable( in string             theAlgoType,
+                          in string             theLibName,
+                          in GEOM::GEOM_Object  theShapeObject,
+                          in boolean            toCheckAll );
   };
 
 };
index b648e75f3282ce85c0cbacba6cedc8fde7e44c8a..399d701d9a40f61736ef49729932fabfd2c5b810 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 55848758c756c82918aeca456e20a4f343e1b2fe..65f944111e65e7e27146035c3357b9af859cc59d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 43e5bf2bcfbc4a66a515c566d33eb5c41bfa4b4d..0315022f292f85cd8b9aca475ec1e0ccd7e1aad3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index fb85b15af69d8137c4083069867938990e1ab2d7..059170dcb2864ac2ee8f23daa6bdeaa358755b77 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -613,39 +613,47 @@ module SMESH
      * - auto_groups : boolean parameter for creating/not creating
      *                 the groups Group_On_All_Nodes, Group_On_All_Faces, ... ;
      *                 the typical use is auto_groups=false.
-     * - version : define the version of format of MED file, that will be created
+     * - version : defines the version of format of MED file, that will be created
      * - overwrite : boolean parameter for overwriting/not overwriting the file, if it exists
-     * - autoDimension: if @c True (default), a space dimension of a MED mesh can be either
+     * - autoDimension : if @c true, a space dimension of a MED mesh can be either
      *         - 1D if all mesh nodes lie on OX coordinate axis, or
      *         - 2D if all mesh nodes lie on XOY coordinate plane, or
      *         - 3D in the rest cases.
-     *
-     *         If @a autoDimension is @c False, the space dimension is always 3.
+     *         If @a autoDimension is @c false, the space dimension is always 3.
      */
     void ExportToMEDX( in string      file, 
                        in boolean     auto_groups, 
                        in MED_VERSION version, 
                        in boolean     overwrite,
-                       in boolean     autoDimension ) raises (SALOME::SALOME_Exception);
+                       in boolean     autoDimension) raises (SALOME::SALOME_Exception);
 
     /*!
-     * Export a part of Mesh into a MED file
+     * Export a [part of] Mesh into a MED file
      * @params
      * - meshPart : a part of mesh to store
      * - file : name of the MED file
      * - version : define the version of format of MED file, that will be created
      * - overwrite : boolean parameter for overwriting/not overwriting the file, if it exists
-     * - autoDimension: if @c True, a space dimension for export is defined by mesh 
+     * - autoDimension : if @c True, a space dimension for export is defined by mesh 
      *                 configuration; for example a planar mesh lying on XOY plane
      *                 will be exported as a mesh in 2D space. 
      *                 If @a autoDimension == @c False, the space dimension is 3.
-     */
-    void ExportPartToMED( in SMESH_IDSource meshPart, 
-                          in string         file, 
-                          in boolean        auto_groups,
-                          in MED_VERSION    version,
-                          in boolean        overwrite,
-                          in boolean        autoDimension ) raises (SALOME::SALOME_Exception);
+     * - fields : list of GEOM fields defined on the shape to mesh.
+     * - geomAssocFields : each character of this string means a need to export a 
+     *         corresponding field; correspondence between fields and characters is following:
+     *         - 'v' stands for _vertices_ field;
+     *         - 'e' stands for _edges_ field;
+     *         - 'f' stands for _faces_ field;
+     *         - 's' stands for _solids_ field.
+     */
+    void ExportPartToMED( in SMESH_IDSource     meshPart,
+                          in string             file,
+                          in boolean            auto_groups,
+                          in MED_VERSION        version,
+                          in boolean            overwrite,
+                          in boolean            autoDimension,
+                          in GEOM::ListOfFields fields,
+                          in string             geomAssocFields ) raises (SALOME::SALOME_Exception);
 
     /*!
      * Export Mesh to a MED Format file
@@ -810,6 +818,9 @@ module SMESH
     EntityType GetElementGeomType( in long id )
       raises (SALOME::SALOME_Exception);
 
+    GeometryType GetElementShape( in long id )
+      raises (SALOME::SALOME_Exception);
+
     long_array GetSubMeshElementsId(in long ShapeID)
       raises (SALOME::SALOME_Exception);
 
@@ -824,6 +835,11 @@ module SMESH
      * Methods to set meshing order of submeshes
      */
 
+    /*!
+     * \brief Return \c true if a meshing order not yet set for a concurrent sub-mesh
+     */
+    boolean IsUnorderedSubMesh(in long submeshID);
+
     /*!
      * \brief Return submesh objects list in meshing order
      */
@@ -925,6 +941,11 @@ module SMESH
      */
     long_array GetElemFaceNodes(in long elemId, in short faceIndex);
 
+    /*!
+     * Returns three components of normal of given mesh face (or an empty array in KO case)
+     */
+    double_array GetFaceNormal(in long faceId, in boolean normalized);
+
     /*!
      * Returns an element based on all given nodes.
      */
index 43d7eac35bb09a0aded02422a33f99a6c76ede1a..397efff4484f7a82b0ed83409978a0639fb31e3e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -323,6 +323,27 @@ module SMESH
     void SplitVolumesIntoTetra(in SMESH_IDSource elems, in short methodFlags)
       raises (SALOME::SALOME_Exception);
 
+    /*!
+     * \brief Split hexahedra into triangular prisms
+     *  \param elems - elements to split
+     *  \param startHexPoint - a point used to find a hexahedron for which \a facetToSplitNormal
+     *         gives a normal vector defining facets to split into triangles.
+     *  \param facetToSplitNormal - normal used to find a facet of hexahedron
+     *         to split into triangles.
+     *  \param methodFlags - flags passing splitting method:
+     *         1 - split the hexahedron into 2 prisms
+     *         2 - split the hexahedron into 4 prisms
+     *  \param allDomains - if \c False, only hexahedra adjacent to one closest
+     *         to \a facetToSplitNormal location are split, else \a facetToSplitNormal
+     *         is used to find the facet to split in all domains present in \a elems.
+     */
+    void SplitHexahedraIntoPrisms(in SMESH_IDSource     elems, 
+                                  in SMESH::PointStruct startHexPoint,
+                                  in SMESH::DirStruct   facetToSplitNormal,
+                                  in short              methodFlags,
+                                  in boolean            allDomains)
+      raises (SALOME::SALOME_Exception);
+
 
     enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
 
@@ -1254,10 +1275,13 @@ module SMESH
      * Triangles are transformed in prisms, and quadrangles in hexahedrons.
      * \param theDomains - list of groups of volumes
      * \param createJointElems - if TRUE, create the elements
+     * \param onAllBoundaries - if TRUE, the nodes and elements are also created on
+     *        the boundary between \a theDomains and the rest mesh
      * \return TRUE if operation has been completed successfully, FALSE otherwise
      */
     boolean DoubleNodesOnGroupBoundaries( in ListOfGroups theDomains,
-                                          in boolean createJointElems ) 
+                                          in boolean      createJointElems,
+                                          in boolean      onAllBoundaries) 
       raises (SALOME::SALOME_Exception);
 
     /*!
index 0d90e8ae58143f4c17c55076193574a10541ac5b..3a5e7900a346ffe9eb904ed5f053112e85dc2a5c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 99825bb766e637dfc95cb3021e11a8ee8752d1a4..f55e54a70b6170f73d2f2ed1ccd5f345c77b6c7f 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -67,6 +67,7 @@ SET(SMESH_RESOURCES_FILES
   mesh_line_n.png
   mesh_line.png
   mesh_move_node.png
+  mesh_move_without_node.png
   mesh_octahedron.png
   mesh_orientation.png
   mesh.png
@@ -197,6 +198,7 @@ SET(SMESH_RESOURCES_FILES
   mesh_duplicate_nodes.png
   mesh_duplicate_nodes_with_elem.png
   mesh_duplicate_elem_only.png
+  mesh_duplicate_group_boundary.png
   mesh_bounding_box.png
   mesh_hypo_viscous_layers.png
   mesh_tree_hypo_viscous_layers.png
index cabb43fb922f6632168226a2e8769f76a39559fb..cf89dd5c2d80e9c1a843851ab5c122e847e341c3 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='us-ascii' ?>
 <!--
-  Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+  Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 
   Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
   CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -8,7 +8,7 @@
   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.
+  version 2.1 of the License, or (at your option) any later version.
 
   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3547396003fd3f298c27f3b8d2abbc729e9a07cc..8658334a9426c03964f594e36dcd49a77cb47ab0 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-  Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+  Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 
   Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
   CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
   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.
+  version 2.1 of the License, or (at your option) any later version.
 
   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -45,6 +45,7 @@
     <parameter name="marker_scale"                 value="9"  />
     <parameter name="elem0d_size"                  value="5" />
     <parameter name="ball_elem_size"               value="10" />
+    <parameter name="ball_elem_scale"              value="1" />
     <parameter name="element_width"                value="1" />
     <parameter name="outline_width"                value="1" />
     <parameter name="shrink_coeff"                 value="75"/>
     <parameter name="User's Guide"      value="%SMESH_ROOT_DIR%/share/doc/salome/gui/SMESH/index.html"/>
     <parameter name="Plug-ins/MGSurfOpt plugin User's Guide" value="%SMESH_ROOT_DIR%/share/doc/salome/gui/SMESH/yams/index.html"/>
     <parameter name="Plug-ins/MGCleaner plugin User's Guide" value="%SMESH_ROOT_DIR%/share/doc/salome/gui/SMESH/MGCleaner/index.html"/>
+    <parameter name="Plug-ins/MacMesh plugin" value="%SMESH_ROOT_DIR%/share/doc/salome/gui/SMESH/MacMesh/index.html"/>
     <parameter name="Developer's Guide" value="%SMESH_ROOT_DIR%/share/doc/salome/tui/SMESH/index.html"/>
   </section>
   <section name="resources">
   </section>
 
  <section name="windows_geometry">
-  <parameter value="#00 #00 #00 #FF #00 #00 #00 #00 #FD #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #02 #44 #FC #02 #00 #00 #00 #01 #FC #00 #00 #00 #7B #00 #00 #02 #44 #00 #00 #00 #97 #01 #00 #00 #14 #FA #00 #00 #00 #01 #02 #00 #00 #00 #02 #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #82 #00 #FF #FF #FF #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #53 #00 #FF #FF #FF #00 #00 #00 #03 #00 #00 #05 #40 #00 #00 #00 #53 #FC #01 #00 #00 #00 #01 #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #00 #00 #00 #05 #40 #00 #00 #00 #46 #00 #FF #FF #FF #00 #00 #04 #38 #00 #00 #02 #44 #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #08 #00 #00 #00 #08 #FC #00 #00 #00 #05 #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #CE #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #02 #00 #00 #00 #07 #00 #00 #00 #2A #00 #4E #00 #6F #00 #64 #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #02 #01 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #2A #00 #45 #00 #64 #00 #67 #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #02 #4D #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #2A #00 #46 #00 #61 #00 #63 #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #02 #F6 #00 #00 #02 #4A #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #18 #00 #4D #00 #65 #00 #73 #00 #68 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #26 #00 #41 #00 #64 #00 #64 #00 #20 #00 #45 #00 #6C #00 #65 #00 #6D #00 #65 #00 #6E #00 #74 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #01 #2B #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #3C #00 #41 #00 #64 #00 #64 #00 #20 #00 #4E #00 #6F #00 #6E #00 #20 #00 #4C #00 #69 #00 #6E #00 #65 #00 #61 #00 #72 #00 #20 #00 #45 #00 #6C #00 #65 #00 #6D #00 #65 #00 #6E #00 #74 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #02 #EB #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1A #00 #47 #00 #72 #00 #6F #00 #75 #00 #70 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #04 #2F #00 #00 #01 #3E #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #02 #00 #00 #00 #01 #00 #00 #00 #2E #00 #56 #00 #6F #00 #6C #00 #75 #00 #6D #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #00 #02 #00 #00 #00 #07 #00 #00 #00 #1C #00 #52 #00 #65 #00 #6D #00 #6F #00 #76 #00 #65 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #2C #00 #54 #00 #72 #00 #61 #00 #6E #00 #73 #00 #66 #00 #6F #00 #72 #00 #6D #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #8A #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #28 #00 #4D #00 #6F #00 #64 #00 #69 #00 #66 #00 #69 #00 #63 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #01 #90 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #26 #00 #49 #00 #6E #00 #66 #00 #6F #00 #72 #00 #6D #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #03 #6F #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #26 #00 #52 #00 #65 #00 #6E #00 #75 #00 #6D #00 #62 #00 #65 #00 #72 #00 #69 #00 #6E #00 #67 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #03 #BB #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #28 #00 #4D #00 #65 #00 #61 #00 #73 #00 #75 #00 #72 #00 #65 #00 #6D #00 #65 #00 #6E #00 #74 #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #04 #07 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #28 #00 #44 #00 #69 #00 #73 #00 #70 #00 #6C #00 #61 #00 #79 #00 #20 #00 #4D #00 #6F #00 #64 #00 #65 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #04 #34 #00 #00 #01 #0C #00 #00 #00 #00 #00 #00 #00 #00" name="SMESH"/>
+  <parameter value="#00 #00 #00 #FF #00 #00 #00 #00 #FD #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #02 #44 #FC #02 #00 #00 #00 #01 #FC #00 #00 #00 #7B #00 #00 #02 #44 #00 #00 #00 #97 #01 #00 #00 #14 #FA #00 #00 #00 #00 #01 #00 #00 #00 #02 #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #46 #00 #FF #FF #FF #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #00 #C0 #00 #FF #FF #FF #00 #00 #00 #03 #00 #00 #05 #40 #00 #00 #00 #53 #FC #01 #00 #00 #00 #01 #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #00 #00 #00 #05 #40 #00 #00 #00 #46 #00 #FF #FF #FF #00 #00 #04 #38 #00 #00 #02 #44 #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #08 #00 #00 #00 #08 #FC #00 #00 #00 #05 #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #CE #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #02 #00 #00 #00 #07 #00 #00 #00 #2A #00 #4E #00 #6F #00 #64 #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #02 #01 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #2A #00 #45 #00 #64 #00 #67 #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #02 #4D #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #2A #00 #46 #00 #61 #00 #63 #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #02 #F6 #00 #00 #02 #4A #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #18 #00 #4D #00 #65 #00 #73 #00 #68 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #26 #00 #41 #00 #64 #00 #64 #00 #20 #00 #45 #00 #6C #00 #65 #00 #6D #00 #65 #00 #6E #00 #74 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #01 #2B #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #3C #00 #41 #00 #64 #00 #64 #00 #20 #00 #4E #00 #6F #00 #6E #00 #20 #00 #4C #00 #69 #00 #6E #00 #65 #00 #61 #00 #72 #00 #20 #00 #45 #00 #6C #00 #65 #00 #6D #00 #65 #00 #6E #00 #74 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #02 #EB #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1A #00 #47 #00 #72 #00 #6F #00 #75 #00 #70 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #04 #2F #00 #00 #01 #3E #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #02 #00 #00 #00 #01 #00 #00 #00 #2E #00 #56 #00 #6F #00 #6C #00 #75 #00 #6D #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #00 #02 #00 #00 #00 #07 #00 #00 #00 #1C #00 #52 #00 #65 #00 #6D #00 #6F #00 #76 #00 #65 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #2C #00 #54 #00 #72 #00 #61 #00 #6E #00 #73 #00 #66 #00 #6F #00 #72 #00 #6D #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #8A #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #28 #00 #4D #00 #6F #00 #64 #00 #69 #00 #66 #00 #69 #00 #63 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #01 #90 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #26 #00 #49 #00 #6E #00 #66 #00 #6F #00 #72 #00 #6D #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #03 #6F #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #26 #00 #52 #00 #65 #00 #6E #00 #75 #00 #6D #00 #62 #00 #65 #00 #72 #00 #69 #00 #6E #00 #67 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #03 #BB #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #28 #00 #4D #00 #65 #00 #61 #00 #73 #00 #75 #00 #72 #00 #65 #00 #6D #00 #65 #00 #6E #00 #74 #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #04 #07 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #28 #00 #44 #00 #69 #00 #73 #00 #70 #00 #6C #00 #61 #00 #79 #00 #20 #00 #4D #00 #6F #00 #64 #00 #65 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #04 #34 #00 #00 #01 #0C #00 #00 #00 #00 #00 #00 #00 #00" name="SMESH"/>
  </section>
  <section name="windows_visibility">
-  <parameter value="#00 #00 #00 #00 #13 #00 #00 #00 #26 #00 #41 #00 #64 #00 #64 #00 #20 #00 #45 #00 #6C #00 #65 #00 #6D #00 #65 #00 #6E #00 #74 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #3C #00 #41 #00 #64 #00 #64 #00 #20 #00 #4E #00 #6F #00 #6E #00 #20 #00 #4C #00 #69 #00 #6E #00 #65 #00 #61 #00 #72 #00 #20 #00 #45 #00 #6C #00 #65 #00 #6D #00 #65 #00 #6E #00 #74 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #28 #00 #44 #00 #69 #00 #73 #00 #70 #00 #6C #00 #61 #00 #79 #00 #20 #00 #4D #00 #6F #00 #64 #00 #65 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #2A #00 #45 #00 #64 #00 #67 #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #00 #2A #00 #46 #00 #61 #00 #63 #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #00 #1A #00 #47 #00 #72 #00 #6F #00 #75 #00 #70 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #26 #00 #49 #00 #6E #00 #66 #00 #6F #00 #72 #00 #6D #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #28 #00 #4D #00 #65 #00 #61 #00 #73 #00 #75 #00 #72 #00 #65 #00 #6D #00 #65 #00 #6E #00 #74 #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #18 #00 #4D #00 #65 #00 #73 #00 #68 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #28 #00 #4D #00 #6F #00 #64 #00 #69 #00 #66 #00 #69 #00 #63 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #2A #00 #4E #00 #6F #00 #64 #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #00 #28 #00 #52 #00 #65 #00 #63 #00 #6F #00 #72 #00 #64 #00 #69 #00 #6E #00 #67 #00 #20 #00 #4F #00 #70 #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #73 #01 #00 #00 #00 #1C #00 #52 #00 #65 #00 #6D #00 #6F #00 #76 #00 #65 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #26 #00 #52 #00 #65 #00 #6E #00 #75 #00 #6D #00 #62 #00 #65 #00 #72 #00 #69 #00 #6E #00 #67 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #2C #00 #54 #00 #72 #00 #61 #00 #6E #00 #73 #00 #66 #00 #6F #00 #72 #00 #6D #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #1E #00 #56 #00 #69 #00 #65 #00 #77 #00 #20 #00 #4F #00 #70 #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #73 #01 #00 #00 #00 #2E #00 #56 #00 #6F #00 #6C #00 #75 #00 #6D #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #01 #00 #00 #00 #03 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01" name="SMESH"/>
+  <parameter value="#00 #00 #00 #00 #15 #FF #FF #FF #FF #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #02 #44 #FC #02 #00 #00 #00 #01 #FC #00 #00 #00 #7B #00 #00 #02 #44 #00 #00 #00 #97 #01 #00 #00 #14 #FA #00 #00 #00 #00 #01 #00 #00 #00 #02 #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #46 #00 #FF #FF #FF #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #00 #C0 #00 #FF #FF #FF #00 #00 #00 #03 #00 #00 #05 #40 #00 #00 #00 #53 #FC #01 #00 #00 #00 #01 #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #00 #00 #00 #05 #40 #00 #00 #00 #46 #00 #FF #FF #FF #00 #00 #04 #38 #00 #00 #02 #44 #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #08 #00 #00 #00 #08 #FC #00 #00 #00 #05 #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #CE #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #02 #00 #00 #00 #07 #00 #00 #00 #2A #00 #4E #00 #6F #00 #64 #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #02 #01 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #2A #00 #45 #00 #64 #00 #67 #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #02 #4D #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #2A #00 #46 #00 #61 #00 #63 #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #02 #F6 #00 #00 #02 #4A #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #18 #00 #4D #00 #65 #00 #73 #00 #68 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #00 #00 #26 #00 #41 #00 #64 #00 #64 #00 #20 #00 #45 #00 #6C #00 #65 #00 #6D #00 #65 #00 #6E #00 #74 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #3C #00 #41 #00 #64 #00 #64 #00 #20 #00 #4E #00 #6F #00 #6E #00 #20 #00 #4C #00 #69 #00 #6E #00 #65 #00 #61 #00 #72 #00 #20 #00 #45 #00 #6C #00 #65 #00 #6D #00 #65 #00 #6E #00 #74 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #28 #00 #44 #00 #69 #00 #73 #00 #70 #00 #6C #00 #61 #00 #79 #00 #20 #00 #4D #00 #6F #00 #64 #00 #65 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #2A #00 #45 #00 #64 #00 #67 #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #00 #2A #00 #46 #00 #61 #00 #63 #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #00 #1A #00 #47 #00 #72 #00 #6F #00 #75 #00 #70 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #26 #00 #49 #00 #6E #00 #66 #00 #6F #00 #72 #00 #6D #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #28 #00 #4D #00 #65 #00 #61 #00 #73 #00 #75 #00 #72 #00 #65 #00 #6D #00 #65 #00 #6E #00 #74 #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #18 #00 #4D #00 #65 #00 #73 #00 #68 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #28 #00 #4D #00 #6F #00 #64 #00 #69 #00 #66 #00 #69 #00 #63 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #2A #00 #4E #00 #6F #00 #64 #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #00 #00 #00 #28 #00 #52 #00 #65 #00 #63 #00 #6F #00 #72 #00 #64 #00 #69 #00 #6E #00 #67 #00 #20 #00 #4F #00 #70 #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #73 #01 #00 #00 #00 #1C #00 #52 #00 #65 #00 #6D #00 #6F #00 #76 #00 #65 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #26 #00 #52 #00 #65 #00 #6E #00 #75 #00 #6D #00 #62 #00 #65 #00 #72 #00 #69 #00 #6E #00 #67 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #2C #00 #54 #00 #72 #00 #61 #00 #6E #00 #73 #00 #66 #00 #6F #00 #72 #00 #6D #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #01 #00 #00 #00 #1E #00 #56 #00 #69 #00 #65 #00 #77 #00 #20 #00 #4F #00 #70 #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #73 #01 #00 #00 #00 #2E #00 #56 #00 #6F #00 #6C #00 #75 #00 #6D #00 #65 #00 #20 #00 #43 #00 #6F #00 #6E #00 #74 #00 #72 #00 #6F #00 #6C #00 #73 #00 #20 #00 #54 #00 #6F #00 #6F #00 #6C #00 #62 #00 #61 #00 #72 #00 #01 #00 #00 #00 #03 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01" name="SMESH"/>
  </section>
 </document>
index d80b4e7d997f9004e31774b651f44cd1cbff54a9..239ff2cb4919b3e4cdce58a31602899989bb665e 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='us-ascii'?>
 <!DOCTYPE meshers PUBLIC "" "desktop.dtd">
 <!--
-  Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+  Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 
   Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
   CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -9,7 +9,7 @@
   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.
+  version 2.1 of the License, or (at your option) any later version.
 
   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
                 icon-id  ="mesh_hypo_length.png"
                 dim      ="1"/>
 
+    <hypothesis type     ="GeometricProgression"
+                label-id ="Geometric Progression"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="1"/>
+
     <hypothesis type     ="FixedPoints1D"
                 label-id ="Fixed Points 1D"
                 icon-id  ="mesh_hypo_length.png"
                 label-id ="Propagation of 1D Hyp. on Opposite Edges"
                 icon-id  ="mesh_hypo_length.png"
                 dim      ="1"
+                context  ="LOCAL"
+                auxiliary="true"/>
+
+    <hypothesis type     ="PropagOfDistribution"
+                label-id ="Propagation of Node Distribution on Opposite Edges"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="1"
+                context  ="LOCAL"
                 auxiliary="true"/>
 
     <hypothesis type     ="AutomaticLength"
                 label-id ="Quadratic Mesh"
                 icon-id  ="mesh_algo_quad.png"
                 dim      ="1"
+                context  ="GLOBAL"
                 auxiliary="true"/>                
 
     <hypothesis type     ="MaxElementArea"
                 label-id ="Not Conform Mesh Allowed"
                 icon-id  ="mesh_hypo_length.png"
                 dim      ="1,2,3"
+                context  ="GLOBAL"
                 auxiliary="true"/>                
 
     <hypothesis type     ="MaxElementVolume"
     <hypothesis type     ="CartesianParameters3D"
                 label-id ="Body Fitting Parameters"
                 icon-id  ="mesh_hypo_length.png"
+                context  ="GLOBAL"
                 dim      ="3"/>
 
   </hypotheses>
               icon-id  ="mesh_algo_regular.png"
                hypos    ="SegmentLengthAroundVertex"
                output   ="VERTEX"
+               need-hyp ="true"
                dim      ="0"/>
 
     <algorithm type     ="Regular_1D"
               label-id ="Wire Discretisation"
               icon-id  ="mesh_algo_regular.png"
-               hypos    ="Adaptive1D,LocalLength,MaxLength,Arithmetic1D,StartEndLength,NumberOfSegments,Deflection1D,AutomaticLength,FixedPoints1D"
-               opt-hypos="Propagation,QuadraticMesh"
+               hypos    ="Adaptive1D,LocalLength,MaxLength,Arithmetic1D,GeometricProgression,StartEndLength,NumberOfSegments,Deflection1D,AutomaticLength,FixedPoints1D"
+               opt-hypos="Propagation,PropagOfDistribution,QuadraticMesh"
                input    ="VERTEX"
                output   ="EDGE"
+               need-hyp ="true"
                dim      ="1">
       <python-wrap>
         <algo>Regular_1D=Segment()</algo>
         <hypo>LocalLength=LocalLength(SetLength(1),,SetPrecision(1))</hypo>
         <hypo>MaxLength=MaxSize(SetLength(1))</hypo>
         <hypo>Arithmetic1D=Arithmetic1D(SetStartLength(),SetEndLength(),SetReversedEdges())</hypo>
+        <hypo>GeometricProgression=GeometricProgression(SetStartLength(),SetCommonRatio(),SetReversedEdges())</hypo>
         <hypo>StartEndLength=StartEndLength(SetStartLength(),SetEndLength(),SetReversedEdges())</hypo>
         <hypo>Deflection1D=Deflection1D(SetDeflection())</hypo>
         <hypo>Adaptive1D=Adaptive(SetMinSize(),SetMaxSize(),SetDeflection())</hypo>
         <hypo>AutomaticLength=AutomaticLength(SetFineness())</hypo>
         <hypo>FixedPoints1D=FixedPoints1D(SetPoints(),SetNbSegments(),SetReversedEdges())</hypo>
         <hypo>Propagation=Propagation()</hypo>
+        <hypo>PropagOfDistribution=PropagationOfDistribution()</hypo>
         <hypo>QuadraticMesh=QuadraticMesh()</hypo>
       </python-wrap>
     </algorithm>
     <algorithm type     ="CompositeSegment_1D"
               label-id ="Composite Side Discretisation"
               icon-id  ="mesh_algo_regular.png"
-               hypos    ="Adaptive1D,LocalLength,MaxLength,Arithmetic1D,StartEndLength,NumberOfSegments,Deflection1D,AutomaticLength,FixedPoints1D"
-               opt-hypos="Propagation,QuadraticMesh"
+               hypos    ="Adaptive1D,LocalLength,MaxLength,Arithmetic1D,GeometricProgression,StartEndLength,NumberOfSegments,Deflection1D,AutomaticLength,FixedPoints1D"
+               opt-hypos="Propagation,PropagOfDistribution,QuadraticMesh"
                input    ="VERTEX"
                output   ="EDGE"
+               need-hyp ="true"
                dim      ="1">
       <python-wrap>
         <algo>CompositeSegment_1D=Segment(algo=smeshBuilder.COMPOSITE)</algo>
         <hypo>LocalLength=LocalLength(SetLength(), ,SetPrecision())</hypo>
         <hypo>MaxLength=MaxSize(SetLength())</hypo>
         <hypo>Arithmetic1D=Arithmetic1D(SetStartLength(),SetEndLength(),SetReversedEdges())</hypo>
+        <hypo>GeometricProgression=GeometricProgression(SetStartLength(),SetCommonRatio(),SetReversedEdges())</hypo>
         <hypo>StartEndLength=StartEndLength(SetStartLength(),SetEndLength(),SetReversedEdges())</hypo>
         <hypo>Deflection1D=Deflection1D(SetDeflection())</hypo>
         <hypo>Adaptive1D=Adaptive(SetMinSize(),SetMaxSize(),SetDeflection())</hypo>
         <hypo>AutomaticLength=AutomaticLength(SetFineness())</hypo>
         <hypo>FixedPoints1D=FixedPoints1D(SetPoints(),SetNbSegments(),SetReversedEdges())</hypo>
         <hypo>Propagation=Propagation()</hypo>
+        <hypo>PropagOfDistribution=PropagationOfDistribution()</hypo>
         <hypo>QuadraticMesh=QuadraticMesh()</hypo>
       </python-wrap>
     </algorithm>
                dim      ="2">
       <python-wrap>
         <algo>Quadrangle_2D=Quadrangle(algo=smeshBuilder.QUADRANGLE)</algo>
-        <hypo>QuadrangleParams=QuadrangleParameters(SetQuadType(),SetTriaVertex())</hypo>
+        <hypo>QuadrangleParams=QuadrangleParameters(SetQuadType(),SetTriaVertex(),SetEnforcedNodes(1),SetEnforcedNodes(2))</hypo>
         <hypo>ViscousLayers2D=ViscousLayers2D(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreEdges())</hypo>
       </python-wrap>
     </algorithm>
                label-id ="Hexahedron (i,j,k)"
                icon-id  ="mesh_algo_hexa.png"
                input    ="QUAD"
+               output   ="HEXA,PENTA"
               need-geom="false"
                opt-hypos="ViscousLayers"
                dim      ="3">
                icon-id ="mesh_algo_regular.png"
                hypos   ="ProjectionSource1D"
                output  ="EDGE"
+               need-hyp="true"
                dim     ="1">
       <python-wrap>
         <algo>Projection_1D=Projection1D()</algo>
                input   ="EDGE"
                hypos   ="ProjectionSource2D"
                output  ="QUAD,TRIA"
+               need-hyp="true"
                dim     ="2">
       <python-wrap>
         <algo>Projection_2D=Projection2D()</algo>
                icon-id ="mesh_algo_quad.png"
                hypos   ="ProjectionSource2D"
                output  ="QUAD,TRIA"
+               need-hyp="true"
                dim     ="2">
       <python-wrap>
         <algo>Projection_1D2D=Projection1D2D()</algo>
                icon-id ="mesh_algo_hexa.png"
                hypos   ="ProjectionSource3D"
                input   ="QUAD,TRIA"
+               need-hyp="true"
                dim     ="3">
       <python-wrap>
         <algo>Projection_3D=Projection3D()</algo>
     </algorithm>
 
     <algorithm type    ="Import_1D"
-               label-id="Use Existing 1D Elements"
+               label-id="Import 1D Elements from Another Mesh"
                icon-id ="mesh_algo_regular.png"
                hypos   ="ImportSource1D"
                output  ="EDGE"
+               need-hyp="true"
                dim     ="1">
       <python-wrap>
         <algo>Import_1D=UseExisting1DElements()</algo>
     </algorithm>
 
     <algorithm type             ="Import_1D2D"
-               label-id         ="Use Existing 2D Elements"
+               label-id         ="Import 1D-2D Elements from Another Mesh"
                icon-id          ="mesh_algo_quad.png"
                hypos            ="ImportSource2D"
                output           ="QUAD,TRIA"
                support-submeshes="false"
+               need-hyp         ="true"
                dim              ="2">
       <python-wrap>
         <algo>Import_1D2D=UseExisting2DElements()</algo>
                label-id="3D Extrusion"
                icon-id ="mesh_algo_hexa.png"
                input   ="QUAD,TRIA"
+               output  ="HEXA,PENTA,OCTA,POLYHEDRON"
                dim     ="3">
       <python-wrap>
         <algo>Prism_3D=Prism()</algo>
                icon-id ="mesh_algo_hexa.png"
                hypos   ="NumberOfLayers, LayerDistribution"
                input   ="QUAD,TRIA"
+               output  ="HEXA,PENTA,OCTA,POLYHEDRON"
+               need-hyp="true"
                dim     ="3">
       <python-wrap>
         <algo>RadialPrism_3D=Prism('RadialPrism_3D')</algo>
     </algorithm>
 
     <algorithm type    ="UseExisting_1D"
-               label-id="Use Existing Edges"
+               label-id="Use Edges to be Created Manually"
                icon-id ="mesh_algo_regular.png"
                input   ="VERTEX"
                output  ="EDGE"
     </algorithm>
 
     <algorithm type    ="UseExisting_2D"
-               label-id="Use Existing Faces"
+               label-id="Use Faces to be Created Manually"
                icon-id ="mesh_algo_quad.png"
                input   ="EDGE"
                output  ="QUAD,TRIA"
                icon-id ="mesh_algo_quad.png"
                hypos   ="NumberOfLayers2D, LayerDistribution2D"
                input   ="EDGE"
-               output  ="QUAD,TRIA"
+               output  ="QUAD"
                dim     ="2">
       <python-wrap>
         <algo>RadialQuadrangle_1D2D=Quadrangle(algo=smeshBuilder.RADIAL_QUAD)</algo>
                icon-id          ="mesh_algo_hexa.png"
                hypos            ="CartesianParameters3D"
                support-submeshes="false"
+               output           ="HEXA"
+               need-hyp         ="true"
+               context          ="GLOBAL"
                dim              ="3">
       <python-wrap>
         <algo>Cartesian_3D=BodyFitted()</algo>
diff --git a/resources/mesh_duplicate_group_boundary.png b/resources/mesh_duplicate_group_boundary.png
new file mode 100644 (file)
index 0000000..0de9a34
Binary files /dev/null and b/resources/mesh_duplicate_group_boundary.png differ
diff --git a/resources/mesh_move_without_node.png b/resources/mesh_move_without_node.png
new file mode 100644 (file)
index 0000000..4f4b0d0
Binary files /dev/null and b/resources/mesh_move_without_node.png differ
index 35277f271e5c5074aab7b98d906dd3f34ade3322..257de2054d160fb9b4b140c6e6fbe95106b20276 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index e73f5133156d9d3e811e22ea7b7824756c11dc3d..c415bbb0af668b747b0b57a0061283e2c4043260 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index e7e61b1132ced57e492509ed67d9371d752296b8..213dc236d5beed682e224ea6ca6de1dc96a3c50f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8c93e518d897153b6cfd6b6b7210a84a1b35ec45..36b86c9de5bfc21a731a2b0bf0ec241859676d8c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index feebd7edea6c07eebda8a0ffc6d54adbab335de9..b69a98952928b8bd6967d886c35550d217eb1897 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8ed72929a415d788c98ee12a984366a0b242aff0..5f11f4ce69e1ca837b1775026d9c5c8e33bd20a3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 6953f6dd590f735e1e2d55f9259997ba0b158264..9c11777074d80530702f879963be403e4229f60d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 05acfa63121c4c6bfe8c3560c405b45c8eef9d96..c98d796c0b99f1bebb628a2b098b6e7fe3cd43cd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 72f3503e1589e4dd5fa5378dfde3fe2318465cbf..53a495de817a7669c67a72fac54299d708565ede 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 93dfd091cf235962fea10b23577423efea9c3da1..bef32a825027864fde72c8502eef92f0e1df70dc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b79fb05bc1db147c57400f9fa9a9d111497d896b..40fa34ac4a5a46921ebe1116c47433181884a2de 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 902b5c7e774e49effcf9dc28fadf362df24f92e0..4000199df2578aee61b9f78f10d0c46c2d7a5a37 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 6e5a2892595fd4e0348a854761190fe1381b6636..24da12ab9b510757f8c7bc332012b033e5967a67 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 192fab606267581f91a8cfbf54d8ac3d04350820..e74eb65844dd5653aac4ee56d33540de35951289 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 492c1eb62a75ca2162673a512d8f5e9c22ed8cf2..b47f9bbb7447b2474493fe7434ddc3d50252c6b2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 98180fa3fc8c44bea14a0f13f4f4c4423f72fe56..3d1962872aaa785b8e805d56a00237aedb4ea9da 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 12cea95ac76564595ee1907c8c95f273f6c15569..1afa5423954d2fe1978d9b1e3dca416480e8dd1f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1b75e98a6a75fc08602ecabc5a53b7217a44ae5f..9457285522217ecebeed065c7ecdf76d4cae2195 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9d6b580c000afac47f9cbabd899a5033b8441842..59381dfd7d5766080523ec42edb92074400e13e2 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9d3d12747c4a7e6baab99ecea6dc1cba22c51ea4..cf87186d8a3b4f221190f7d62506446b443f3b62 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2699d12abbc20568d5d48a9bbf6dc21af104cc4b..cf85859910db8b9789d616bb26b61d2154de8de3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ccef96882136fa89ce767b94384372383b9b0839..4b877073bf73532bab8c8a6d9d0a2defadd3b0f1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ae1632dca8b45d2594294b2c9e52b87aa7f9171e..400daa548c30b9d97c3a350ed6303aac1dd5ae9a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3ace5253e067b65291b0f0b47619df16085542aa..39f9acd666e2f350773f9e779455a0f89b463bb4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ad334ddb11cbf109404690c275ace2d686159d8c..b22e5078d666b193cd73eb3bbb726384a71f6866 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c5a3bc7a71df7efb33f7d6e4864d0b7f626c9ab4..3c1bf7ada92ec1f52a85111ee4dbf3c7bd1e2ffa 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8e70afe829c31579c61b08319f71663ae696232d..0337dd255eed8092518439cb546a0997712b181e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 33d6192494aa19e2d5983cda8242517cfee940f6..8393e14e250efd1c1a116aacd52fde6db2e04ac0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7439b37a6cc55c5a6c531ab2666b28a3dd1c3f60..6fdeaab0f2a54018a5196c7eee5a48d6f3a86508 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index bc4ce70d7134b312e5210a63f5a70b22c57a0e1c..5064840ef32bf1908057146950d6ff326a902bab 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 178e0b52b5eb3033cf3fb6139058ebcf3cf83a27..ddf3b7600a12690b86a217d8c9fd631cffb39b65 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 83d86a83b92e4c84d2e385ee9ce2ef64cb386def..2b844d352765a280cc67be1417f556bb2753cef1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 55c30340656fcf14fb34a28dc20f6e899cc90e50..0fb168ad52880917ec078a38e640769392346634 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index fcbc3a082bd71995e0e69f709d3089ee2df595cb..28d1b8a022f2ea05fbb21e82b2acf96ad3f8f7c9 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -67,6 +67,7 @@ SET(MeshDriverMED_HEADERS
   DriverMED_R_SMESHDS_Mesh.h
   DriverMED_W_SMESHDS_Mesh.h
   DriverMED_Family.h
+  DriverMED_W_Field.h
   SMESH_DriverMED.hxx
 )
 
@@ -77,6 +78,7 @@ SET(MeshDriverMED_SOURCES
   DriverMED_R_SMESHDS_Mesh.cxx
   DriverMED_W_SMESHDS_Mesh.cxx
   DriverMED_Family.cxx
+  DriverMED_W_Field.cxx
 )
 
 # --- rules ---
index c2bee4b5fffc31d0994089561437fd4446653fd0..299b610837ef0c0a1c4bc66fdf7ac26f505a079a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 // Declarations needed for usage of DriverMED
 
+#include "SMDSAbs_ElementType.hxx"
+#include "SMESH_DriverMED.hxx"
+
 #include <boost/shared_ptr.hpp>
 
 class DriverMED_Family;
 typedef boost::shared_ptr<DriverMED_Family> DriverMED_FamilyPtr;
+
+namespace DriverMED
+{
+  // Implemetation is in DriverMED_W_Field.cxx
+
+  /*
+   * Returns MED element geom type (MED::EGeometrieElement) by SMDS type
+   */
+  MESHDRIVERMED_EXPORT int GetMedGeoType( SMDSAbs_EntityType smdsType );
+  
+  /*
+   * Returns SMDS element geom type by MED type (MED::EGeometrieElement)
+   */
+  MESHDRIVERMED_EXPORT SMDSAbs_EntityType GetSMDSType( int medType );
+}
index 55a857f61b0dfef14fb9ad5665735e40a26eab7f..42f2f6aa3b148427484d0d853b562ecfd1a9bb41 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c64c17f7c402e4ea82dba33fbe04b2ee8570f60c..d774603da613dca1459906d952e24fd31b467135 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b4ca1a08fb6a2458c4e475bb17b92d7f8efb0bad..4a11f8c997e25e3395a3dbecf1cc7e6eb678a808 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 71d38ef78db0c4abb4e14acbf5f38db99f746941..6b33445861bedefa167e04865ff3187e69f2be12 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/DriverMED/DriverMED_W_Field.cxx b/src/DriverMED/DriverMED_W_Field.cxx
new file mode 100644 (file)
index 0000000..9389275
--- /dev/null
@@ -0,0 +1,428 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// File      : DriverMED_W_Field.cxx
+// Created   : Thu Feb 27 17:45:00 2014
+// Author    : eap
+
+#include "DriverMED_W_Field.h"
+
+#include "DriverMED.hxx"
+#include "DriverMED_W_SMESHDS_Mesh.h"
+#include "MED_Factory.hxx"
+#include "MED_Utilities.hxx"
+#include "MED_Wrapper.hxx"
+#include "SMDS_IteratorOnIterators.hxx"
+#include "SMDS_MeshElement.hxx"
+#include "SMDS_PolyhedralVolumeOfNodes.hxx"
+#include "SMDS_SetIterator.hxx"
+#include "SMESHDS_Mesh.hxx"
+
+//================================================================================
+/*!
+ * \brief Constructor
+ */
+//================================================================================
+
+DriverMED_W_Field::DriverMED_W_Field():
+  //_medFileID( -1 ),
+  _elemType( SMDSAbs_All ),
+  _dt( -1 ),
+  _it( -1 )
+{
+}
+
+//================================================================================
+/*!
+ * \brief Sets basic data
+ *  \param [in] mesh - supporting mesh
+ *  \param [in] fieldName - name of a field
+ *  \param [in] type - type of supporting elements
+ *  \param [in] nbComps - number of components
+ *  \param [in] isIntData - type of data: double or integer
+ */
+//================================================================================
+
+bool DriverMED_W_Field::Set(SMESHDS_Mesh *      mesh,
+                            const std::string & fieldName,
+                            SMDSAbs_ElementType type,
+                            const int           nbComps,
+                            const bool          isIntData)
+{
+  _fieldName = fieldName;
+  _compNames.resize( nbComps, "" );
+
+  if ( type == SMDSAbs_All )
+  {
+    if ( mesh->NbVolumes() > 0 )
+      type = SMDSAbs_Volume;
+    else if ( mesh->NbFaces() > 0 )
+      type = SMDSAbs_Face;
+    else if ( mesh->NbEdges() > 0 )
+      type = SMDSAbs_Edge;
+    else
+      type = SMDSAbs_Node;
+  }
+  if ( myMesh != mesh )
+  {
+    _nbElemsByGeom.clear();
+    for ( int iG = 0; iG < SMDSEntity_Last; ++iG )
+      _elemsByGeom[iG].clear();
+    SetMesh( mesh );
+  }
+
+  // find out "MED order" of elements - sort elements by geom type
+  int nbElems;
+  if ( _nbElemsByGeom.empty() || _elemType != type )
+  {
+    _elemType = type;
+    _nbElemsByGeom.resize( 1, make_pair( SMDSEntity_Last, 0 ));
+
+    // count nb of elems of each geometry
+    for ( int iG = 0; iG < SMDSEntity_Last; ++iG )
+    {
+      SMDSAbs_EntityType  geom = (SMDSAbs_EntityType) iG;
+      SMDSAbs_ElementType t = SMDS_MeshCell::toSmdsType( geom );
+      if ( t != _elemType ) continue;
+
+      nbElems = mesh->GetMeshInfo().NbElements( geom );
+      if ( nbElems < 1 ) continue;
+
+      _nbElemsByGeom.push_back( make_pair( geom, nbElems + _nbElemsByGeom.back().second ));
+    }
+    // add nodes of missing 0D elements on VERTEXes
+    if ( _addODOnVertices && _elemType == SMDSAbs_0DElement )
+    {
+      std::vector< const SMDS_MeshElement* >& nodes = _elemsByGeom[SMDSEntity_Node];
+      if ( nodes.empty() )
+        DriverMED_W_SMESHDS_Mesh::getNodesOfMissing0DOnVert( myMesh, nodes );
+      if ( !nodes.empty() )
+      {
+        if ( _nbElemsByGeom.size() == 1 )
+          _nbElemsByGeom.push_back( make_pair( SMDSEntity_0D, 0));
+        _nbElemsByGeom.push_back( make_pair( SMDSEntity_Node,
+                                             nodes.size() + _nbElemsByGeom.back().second ));
+      }
+    }
+
+    // sort elements by their geometry
+    int iGeoType, nbGeomTypes = _nbElemsByGeom.size() - 1;
+    if ( nbGeomTypes > 1 )
+    {
+      for ( size_t iG = 1; iG < _nbElemsByGeom.size(); ++iG )
+      {
+        iGeoType = _nbElemsByGeom[iG].first;
+        nbElems  = _nbElemsByGeom[iG].second - _nbElemsByGeom[iG-1].second;
+        _elemsByGeom[ iGeoType ].reserve( nbElems );
+      }
+      iGeoType = _nbElemsByGeom[1].first; // for missing 0D
+      if ( _elemsByGeom[ iGeoType ].empty() )
+      {
+        nbElems = mesh->GetMeshInfo().NbElements( _elemType );
+        SMDS_ElemIteratorPtr eIt = mesh->elementsIterator( _elemType );
+        for ( int iE = 0; iE < nbElems && eIt->more(); ++iE )
+        {
+          const SMDS_MeshElement* e = eIt->next();
+          _elemsByGeom[ e->GetEntityType() ].push_back( e );
+        }
+      }
+    }
+  }
+  _intValues.clear();
+  _dblValues.clear();
+
+  // allocate memory for values
+  nbElems = _nbElemsByGeom.empty() ? 0 : _nbElemsByGeom.back().second;
+  if ( isIntData )
+    _intValues.reserve( nbElems * nbComps );
+  else
+    _dblValues.reserve( nbElems * nbComps );
+
+  return nbElems * nbComps;
+}
+
+//================================================================================
+/*!
+ * \brief Set a name of a component countered from zero
+ */
+//================================================================================
+
+void DriverMED_W_Field::SetCompName(const int iComp, const char* name)
+{
+  if ( _compNames.size() <= iComp )
+    _compNames.resize( iComp + 1 );
+  _compNames[ iComp ] = name;
+}
+
+//================================================================================
+/*!
+ * \brief Sets numdt and numit field features. Call this fun before AddValue()!
+ */
+//================================================================================
+
+void DriverMED_W_Field::SetDtIt(const int dt, const int it)
+{
+  _dt = dt;
+  _it = it;
+  _intValues.clear();
+  _dblValues.clear();
+}
+
+//================================================================================
+/*!
+ * \brief Adds a float field value 
+ */
+//================================================================================
+
+void DriverMED_W_Field::AddValue( double val )
+{
+  _dblValues.push_back( val );
+}
+
+//================================================================================
+/*!
+ * \brief Adds an integer field value 
+ */
+//================================================================================
+
+void DriverMED_W_Field::AddValue( int    val )
+{
+  _intValues.push_back( val );
+}
+
+//================================================================================
+/*!
+ * Returns elements in the order they are written in MED file
+ */
+//================================================================================
+
+SMDS_ElemIteratorPtr DriverMED_W_Field::GetOrderedElems()
+{
+  if ( _nbElemsByGeom.size() < 2 )
+    return SMDS_ElemIteratorPtr();
+
+  if ( _nbElemsByGeom.size() == 2 )
+    // sole geom type of elements
+    return myMesh->elementsIterator( _elemType );
+
+  std::vector< SMDS_ElemIteratorPtr > iterVec( _nbElemsByGeom.size()-1 );
+  for ( size_t iG = 1; iG < _nbElemsByGeom.size(); ++iG )
+  {
+    int iGeoType = _nbElemsByGeom[ iG ].first;
+    iterVec[ iG-1 ] = SMDS_ElemIteratorPtr
+      ( new SMDS_ElementVectorIterator( _elemsByGeom[ iGeoType ].begin(),
+                                        _elemsByGeom[ iGeoType ].end() ));
+  }
+  typedef SMDS_IteratorOnIterators
+    < const SMDS_MeshElement *, std::vector< SMDS_ElemIteratorPtr > > TItIterator;
+  return SMDS_ElemIteratorPtr( new TItIterator( iterVec ));
+}
+
+//================================================================================
+/*!
+ * Writes a field to the file
+ */
+//================================================================================
+
+Driver_Mesh::Status DriverMED_W_Field::Perform()
+{
+  if ( myFile.empty() )
+    return addMessage("File name not set", /*isFatal=*/true ); // 'fatal' means 'bug'
+  if ( myMeshId < 0 && myMeshName.empty() )
+    return addMessage("Mesh in file not specified", /*isFatal=*/true );
+  if ( _nbElemsByGeom.size() < 2 )
+    return addMessage("No values to write", /*isFatal=*/false );
+  if ( !myMesh )
+    return addMessage("Supporting mesh not set", /*isFatal=*/true );
+
+  MED::PWrapper medFile = MED::CrWrapper( myFile, MED::eV2_2 );
+  MED::PMeshInfo meshInfo;
+  if ( myMeshId > 0 )
+  {
+    meshInfo = medFile->GetPMeshInfo( myMeshId );
+  }
+  else
+  {
+    // look for a mesh by name
+    int aNbMeshes = medFile->GetNbMeshes();
+    for ( int iMesh = aNbMeshes; iMesh > 0 && myMeshId < 1; --iMesh )
+    {
+      meshInfo = medFile->GetPMeshInfo( iMesh );
+      if ( !meshInfo || meshInfo->GetName() != myMeshName )
+        meshInfo.reset();
+      else
+        myMeshId = iMesh;
+    }
+  }
+  if (( !meshInfo ) ||
+      ( !myMeshName.empty() && meshInfo->GetName() != myMeshName ))
+  {
+    myMeshId = -1;
+    return addMessage("Specified mesh not found in the file", /*isFatal=*/true );
+  }
+
+  // create a field
+  MED::ETypeChamp  dataType = _dblValues.empty() ? MED::eINT : MED::eFLOAT64;
+  MED::PFieldInfo fieldInfo = medFile->CrFieldInfo( meshInfo,
+                                                    _compNames.size(),
+                                                    dataType );
+  fieldInfo->SetName( _fieldName );
+  for ( size_t iC = 0; iC < _compNames.size(); ++iC )
+  {
+    fieldInfo->SetCompName( iC, _compNames[ iC ]);
+    fieldInfo->SetUnitName( iC, "");
+  }
+  if ( _compNames.size() > 1 )
+  {
+    for ( size_t i = 0; i < fieldInfo->myCompNames.size()-1; ++i )
+      if ( !fieldInfo->myCompNames[i] )
+        fieldInfo->myCompNames[i] = ' ';
+  }
+  medFile->SetFieldInfo( fieldInfo );
+
+  // specific treatment of added 0D elements
+  if ( _nbElemsByGeom.size()   == 3 &&
+       _nbElemsByGeom[1].first == SMDSEntity_0D )
+  {
+    _nbElemsByGeom[1].second += _nbElemsByGeom[2].second;
+    _nbElemsByGeom.resize( 2 );
+  }
+
+  // create a time stamp
+  MED::TGeom2Size type2nb;
+  for ( size_t iG = 1; iG < _nbElemsByGeom.size(); ++iG )
+  {
+    SMDSAbs_EntityType    smdsType = _nbElemsByGeom[iG].first;
+    MED::EGeometrieElement medType = (MED::EGeometrieElement) DriverMED::GetMedGeoType( smdsType );
+    int                    nbElems = _nbElemsByGeom[iG].second - _nbElemsByGeom[iG-1].second;
+    type2nb.insert( make_pair( medType, nbElems ));
+  }
+
+  MED::EEntiteMaillage       entity = ( _elemType == SMDSAbs_Node ? MED::eNOEUD : MED::eMAILLE );
+  MED::PTimeStampInfo timeStampInfo = medFile->CrTimeStampInfo( fieldInfo, entity, type2nb );
+  timeStampInfo->myNumDt  = _dt;
+  timeStampInfo->myNumOrd = _it;
+
+  MED::PTimeStampValueBase  timeStampVal = medFile->CrTimeStampValue( timeStampInfo, dataType );
+  MED::PFloatTimeStampValue timeStampFltVal = timeStampVal;
+  MED::PIntTimeStampValue   timeStampIntVal = timeStampVal;
+
+  // set values
+  int iVal = 0, i, nbE;
+  MED::TFloat* ptrDbl = 0;
+  MED::TInt*   ptrInt = 0;
+  for ( size_t iG = 1; iG < _nbElemsByGeom.size(); ++iG )
+  {
+    SMDSAbs_EntityType    smdsType = _nbElemsByGeom[iG].first;
+    MED::EGeometrieElement medType = (MED::EGeometrieElement) DriverMED::GetMedGeoType( smdsType );
+    int nbElems = ( _nbElemsByGeom[iG].second - _nbElemsByGeom[iG-1].second ) * _compNames.size();
+    if ( dataType == MED::eFLOAT64 )
+    {
+      ptrDbl = timeStampFltVal->GetMeshValue( medType ).GetPointer();
+      for ( int i = 0; i < nbElems; ++i, ++iVal )
+        ptrDbl[ i ] = _dblValues[ iVal ];
+    }
+    else
+    {
+      ptrInt = timeStampIntVal->GetMeshValue( medType ).GetPointer();
+      for ( int i = 0; i < nbElems; ++i, ++iVal )
+        ptrInt[ i ] = _intValues[ iVal ];
+    }
+  }
+
+  // write
+  medFile->SetTimeStampValue( timeStampVal );
+
+  _dblValues.clear();
+  _intValues.clear();
+}
+
+namespace DriverMED // Implemetation of fuctions declared in DriverMED.hxx
+{
+  //================================================================================
+  /*!
+   * Returns a vector containing MED::EGeometrieElement for each SMDSAbs_EntityType
+   */
+  //================================================================================
+
+  const std::vector< MED::EGeometrieElement >& getMedTypesVec()
+  {
+    static std::vector< MED::EGeometrieElement > theVec;
+    if ( theVec.empty() )
+    {
+      theVec.resize( SMDSEntity_Last, MED::eAllGeoType );
+      theVec[ SMDSEntity_Node               ] = MED::eNONE    ;
+      theVec[ SMDSEntity_0D                 ] = MED::ePOINT1  ;
+      theVec[ SMDSEntity_Edge               ] = MED::eSEG2    ;
+      theVec[ SMDSEntity_Quad_Edge          ] = MED::eSEG3    ;
+      theVec[ SMDSEntity_Triangle           ] = MED::eTRIA3   ;
+      theVec[ SMDSEntity_Quad_Triangle      ] = MED::eTRIA6   ;
+      theVec[ SMDSEntity_BiQuad_Triangle    ] = MED::eTRIA7   ;
+      theVec[ SMDSEntity_Quadrangle         ] = MED::eQUAD4   ;
+      theVec[ SMDSEntity_Quad_Quadrangle    ] = MED::eQUAD8   ;
+      theVec[ SMDSEntity_BiQuad_Quadrangle  ] = MED::eQUAD9   ;
+      theVec[ SMDSEntity_Polygon            ] = MED::ePOLYGONE;
+      //theVec[ SMDSEntity_Quad_Polygon       ] = MED::ePOLYGONE; // !!
+      theVec[ SMDSEntity_Tetra              ] = MED::eTETRA4  ;
+      theVec[ SMDSEntity_Quad_Tetra         ] = MED::eTETRA10 ;
+      theVec[ SMDSEntity_Pyramid            ] = MED::ePYRA5   ;
+      theVec[ SMDSEntity_Quad_Pyramid       ] = MED::ePYRA13  ;
+      theVec[ SMDSEntity_Hexa               ] = MED::eHEXA8   ;
+      theVec[ SMDSEntity_Quad_Hexa          ] = MED::eHEXA20  ;
+      theVec[ SMDSEntity_TriQuad_Hexa       ] = MED::eHEXA27  ;
+      theVec[ SMDSEntity_Penta              ] = MED::ePENTA6  ;
+      theVec[ SMDSEntity_Quad_Penta         ] = MED::ePENTA15 ;
+      theVec[ SMDSEntity_Hexagonal_Prism    ] = MED::eOCTA12  ;
+      theVec[ SMDSEntity_Polyhedra          ] = MED::ePOLYEDRE;
+      //theVec[ SMDSEntity_Quad_Polyhedra     ] = MED::ePOLYEDRE; // !!
+      theVec[ SMDSEntity_Ball               ] = MED::eBALL    ;
+    }
+    return theVec;
+  }
+
+  //================================================================================
+  /*!
+   * Returns MED element geom type (MED::EGeometrieElement) by SMDS type
+   */
+  //================================================================================
+
+  int GetMedGeoType( SMDSAbs_EntityType smdsType )
+  {
+    return getMedTypesVec()[ smdsType ];
+  }
+
+  //================================================================================
+  /*!
+   * Returns SMDS element geom type by MED type (MED::EGeometrieElement)
+   */
+  //================================================================================
+
+  SMDSAbs_EntityType GetSMDSType( int medType )
+  {
+    const std::vector< MED::EGeometrieElement >& theVec = getMedTypesVec();
+
+    std::vector< MED::EGeometrieElement >::const_iterator i =
+      std::find( theVec.begin(), theVec.end(), medType );
+
+    return SMDSAbs_EntityType( std::distance( theVec.begin(), i ));
+  }
+}
diff --git a/src/DriverMED/DriverMED_W_Field.h b/src/DriverMED/DriverMED_W_Field.h
new file mode 100644 (file)
index 0000000..0749123
--- /dev/null
@@ -0,0 +1,83 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//  SMESH DriverMED : driver to write a field to 'med' file
+//  Module : SMESH
+//
+#ifndef _INCLUDE_DriverMED_W_Field
+#define _INCLUDE_DriverMED_W_Field
+
+#include "SMESH_DriverMED.hxx"
+
+#include "Driver_SMESHDS_Mesh.h"
+#include "SMDSAbs_ElementType.hxx"
+#include "SMDS_ElemIterator.hxx"
+
+#include <string>
+#include <vector>
+
+class MESHDRIVERMED_EXPORT DriverMED_W_Field: public Driver_SMESHDS_Mesh
+{
+ public:
+
+  DriverMED_W_Field();
+
+  void AddODOnVertices(bool toAdd) { _addODOnVertices = toAdd; }
+
+  bool Set(SMESHDS_Mesh *      mesh,
+           const std::string & fieldName,
+           SMDSAbs_ElementType type,
+           const int           nbComps,
+           const bool          isIntData);
+
+  void SetCompName(const int iComp, const char* name);
+
+  void SetDtIt(const int dt, const int it);
+
+  void AddValue( double val );
+  void AddValue( int    val );
+
+  /*
+   * Returns elements in the order they are written in MED file. Result can be NULL!
+   */
+  SMDS_ElemIteratorPtr GetOrderedElems();
+
+  /*
+   * Add one field to the file
+   */
+  virtual Status Perform();
+
+ private:
+
+  std::string                _fieldName;
+  SMDSAbs_ElementType        _elemType;
+  std::vector< std::string > _compNames;
+  std::vector< double >      _dblValues;
+  std::vector< int >         _intValues;
+  int                        _dt, _it;
+  bool                       _addODOnVertices;
+
+  std::vector< const SMDS_MeshElement* >              _elemsByGeom[SMDSEntity_Last];
+  std::vector< std::pair< SMDSAbs_EntityType, int > > _nbElemsByGeom;
+};
+
+#endif
index aa89eea404c9a50914a106380de14ce2ef040a54..47fa68b5d35e9bb2f258ce007489ef72eb4bf1ad 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #include "DriverMED_Family.h"
 #include "MED_Factory.hxx"
 #include "MED_Utilities.hxx"
+#include "SMDS_IteratorOnIterators.hxx"
 #include "SMDS_MeshElement.hxx"
 #include "SMDS_MeshNode.hxx"
 #include "SMDS_PolyhedralVolumeOfNodes.hxx"
+#include "SMDS_SetIterator.hxx"
 #include "SMESHDS_Mesh.hxx"
 
 #include <utilities.h>
@@ -421,7 +423,6 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
     if (myDoGroupOfBalls && nbBalls) myBallsDefaultFamilyId = REST_BALL_FAMILY;
 
     MESSAGE("Perform - aFamilyInfo");
-    //cout << " DriverMED_Family::MakeFamilies() " << endl;
     list<DriverMED_FamilyPtr> aFamilies;
     if (myAllSubMeshes) {
       aFamilies = DriverMED_Family::MakeFamilies
@@ -442,7 +443,6 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
          myDoGroupOf0DElems && nb0DElements,
          myDoGroupOfBalls   && nbBalls);
     }
-    //cout << " myMed->SetFamilyInfo() " << endl;
     list<DriverMED_FamilyPtr>::iterator aFamsIter;
     for (aFamsIter = aFamilies.begin(); aFamsIter != aFamilies.end(); aFamsIter++)
     {
@@ -463,7 +463,6 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
     const EConnectivite theConnMode    = eNOD;
 
     TInt aNbNodes = myMesh->NbNodes();
-    //cout << " myMed->CrNodeInfo() aNbNodes = " << aNbNodes << endl;
     PNodeInfo aNodeInfo = myMed->CrNodeInfo(aMeshInfo, aNbNodes,
                                             theMode, theSystem, theIsElemNum, theIsElemNames);
 
@@ -483,7 +482,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
       int aNodeID = aCoordHelperPtr->GetID();
       aNodeInfo->SetElemNum( iNode, aNodeID );
 #ifdef _EDF_NODE_IDS_
-      aNodeIdMap[aNodeID] = iNode+1;
+      aNodeIdMap.insert( aNodeIdMap.end(), make_pair( aNodeID, iNode+1 ));
 #endif
       // family number
       const SMDS_MeshNode* aNode = aCoordHelperPtr->GetNode();
@@ -514,6 +513,22 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
     bool polyTypesSupported = myMed->CrPolygoneInfo(aMeshInfo,eMAILLE,ePOLYGONE,0,0);
     TInt nbPolygonNodes = 0, nbPolyhedronNodes = 0, nbPolyhedronFaces = 0;
 
+    // nodes on VERTEXes where 0D elements are absent
+    std::vector<const SMDS_MeshElement*> nodesOf0D;
+    std::vector< SMDS_ElemIteratorPtr > iterVec;
+    SMDS_ElemIteratorPtr iterVecIter;
+    if ( myAddODOnVertices && getNodesOfMissing0DOnVert( myMesh, nodesOf0D ))
+    {
+      iterVec.resize(2);
+      iterVec[0] = myMesh->elementsIterator( SMDSAbs_0DElement );
+      iterVec[1] = SMDS_ElemIteratorPtr
+        ( new SMDS_ElementVectorIterator( nodesOf0D.begin(), nodesOf0D.end() ));
+
+      typedef SMDS_IteratorOnIterators
+        < const SMDS_MeshElement *, std::vector< SMDS_ElemIteratorPtr > > TItIterator;
+      iterVecIter = SMDS_ElemIteratorPtr( new TItIterator( iterVec ));
+    }
+
     // collect info on all geom types
 
     list< TElemTypeData > aTElemTypeDatas;
@@ -524,7 +539,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
 #endif
     aTElemTypeDatas.push_back(TElemTypeData(anEntity,
                                             ePOINT1,
-                                            nbElemInfo.Nb0DElements(),
+                                            nbElemInfo.Nb0DElements() + nodesOf0D.size(),
                                             SMDSAbs_0DElement));
 #ifdef _ELEMENTS_BY_DIM_
     anEntity = eSTRUCT_ELEMENT;
@@ -873,6 +888,8 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
 
         TInt aNbNodes = MED::GetNbNodes(aElemTypeData->_geomType);
         elemIterator = myMesh->elementsIterator( aElemTypeData->_smdsType );
+        if ( aElemTypeData->_smdsType == SMDSAbs_0DElement && ! nodesOf0D.empty() )
+          elemIterator = iterVecIter;
         while ( elemIterator->more() )
         {
           const SMDS_MeshElement* anElem = elemIterator->next();
@@ -921,3 +938,31 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
   mySubMeshes.clear();
   return aResult;
 }
+
+//================================================================================
+/*!
+ * \brief Returns nodes on VERTEXes where 0D elements are absent
+ */
+//================================================================================
+
+bool DriverMED_W_SMESHDS_Mesh::
+getNodesOfMissing0DOnVert(SMESHDS_Mesh*                         meshDS,
+                          std::vector<const SMDS_MeshElement*>& nodes)
+{
+  nodes.clear();
+  for ( int i = 1; i <= meshDS->MaxShapeIndex(); ++i )
+  {
+    if ( meshDS->IndexToShape( i ).ShapeType() != TopAbs_VERTEX )
+      continue;
+    if ( SMESHDS_SubMesh* sm = meshDS->MeshElements(i) ) {
+      SMDS_NodeIteratorPtr nIt= sm->GetNodes();
+      while (nIt->more())
+      {
+        const SMDS_MeshNode* n = nIt->next();
+        if ( n->NbInverseElements( SMDSAbs_0DElement ) == 0 )
+          nodes.push_back( n );
+      }
+    }
+  }
+  return !nodes.empty();
+}
index 30d1f475fe006667a83d8fdf73621b1cd6648581..d817c3f276ad14a6da1c0b42fa80facf4a0c9fdb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -35,6 +35,7 @@
 #include <string>
 #include <list>
 #include <map>
+#include <vector>
 
 class SMESHDS_Mesh;
 class SMESHDS_GroupBase;
@@ -49,10 +50,9 @@ class MESHDRIVERMED_EXPORT DriverMED_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh
   virtual void SetFile(const std::string& theFileName);
   void SetFile(const std::string& theFileName, MED::EVersion theId);
   void SetAutoDimension(bool toFindOutDimension) { myAutoDimension = toFindOutDimension; }
+
   static std::string GetVersionString(const MED::EVersion theVersion, int theNbDigits=2);
 
-  /*! sets file name; only for usage with Add(), not Write()
-   */
   void AddGroupOfNodes();
   void AddGroupOfEdges();
   void AddGroupOfFaces();
@@ -65,6 +65,10 @@ class MESHDRIVERMED_EXPORT DriverMED_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh
   void AddGroup(SMESHDS_GroupBase * theGroup);
   void AddAllSubMeshes();
   void AddSubMesh(SMESHDS_SubMesh* theSubMesh, int theID);
+  void AddODOnVertices(bool toAdd) { myAddODOnVertices = toAdd; }
+
+  static bool getNodesOfMissing0DOnVert(SMESHDS_Mesh*                         mesh,
+                                        std::vector<const SMDS_MeshElement*>& nodes);
 
   /*! add one mesh
    */
@@ -83,6 +87,7 @@ class MESHDRIVERMED_EXPORT DriverMED_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh
   bool myDoGroupOf0DElems;
   bool myDoGroupOfBalls;
   bool myAutoDimension;
+  bool myAddODOnVertices;
 };
 
 #endif
index 776e01a76ae0ad12533fabbfa194fcf3cb5e61e2..c2d1efc300bb38ec349c95887975ee0ad24d623b 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 25ff3c7c8ef23deb3338d9b4ee78c953276ea0e2..fa0a8139d86b8434572339ef019ea2892c7257f8 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -45,6 +45,7 @@ SET(_link_LIBRARIES
   ${KERNEL_SALOMEBasics}
   MeshDriver
   SMDS
+  SMESHUtils
 )
 
 SET(_link_LIBRARIES_bin
index 1a38479b68a8142e742431e29794d88b54df3885..a250b428a9fe6099d4b1fee525b6dc354d6c690b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-#include <stdio.h>
-#include <gp_Pnt.hxx>
-#include <Basics_Utils.hxx>
-
-//=======================================================================
-//function : HashCode
-//purpose  : 
-//=======================================================================
-inline Standard_Integer HashCode
-  (const gp_Pnt& point,  Standard_Integer Upper)
-{
-  union 
-    {
-    Standard_Real R[3];
-    Standard_Integer I[6];
-    } U;
+#include "DriverSTL_R_SMDS_Mesh.h"
 
-  point.Coord(U.R[0],U.R[1],U.R[2]);  
+#include <Basics_Utils.hxx>
 
-  return ::HashCode(U.I[0]/23+U.I[1]/19+U.I[2]/17+U.I[3]/13+U.I[4]/11+U.I[5]/7,Upper);
-}
-static Standard_Real tab1[3];
-static Standard_Real tab2[3];
-//=======================================================================
-//function : IsEqual
-//purpose  : 
-//=======================================================================
-inline Standard_Boolean IsEqual
-  (const gp_Pnt& point1, const gp_Pnt& point2)
-{
-  point1.Coord(tab1[0],tab1[1],tab1[2]);  
-  point2.Coord(tab2[0],tab2[1],tab2[2]);  
-  return (memcmp(tab1,tab2,sizeof(tab1)) == 0);
-}
-#include "DriverSTL_R_SMDS_Mesh.h"
+#include <gp_Pnt.hxx>
+#include <NCollection_DataMap.hxx>
+#include <Standard_NoMoreObject.hxx>
 
 #include "SMDS_Mesh.hxx"
 #include "SMDS_MeshElement.hxx"
 #include "SMDS_MeshNode.hxx"
+#include "SMESH_File.hxx"
 
-#include <OSD_Path.hxx>
-#include <OSD_File.hxx>
-#include <OSD_FromWhere.hxx>
-#include <OSD_Protection.hxx>
-#include <OSD_SingleProtection.hxx>
-#include <Standard_NoMoreObject.hxx>
-
-#include "utilities.h"
-
-static const int HEADER_SIZE           =  84;
-static const int SIZEOF_STL_FACET      =  50;
-//static const int STL_MIN_FILE_SIZE     = 284;
-static const int ASCII_LINES_PER_FACET =   7;
-
+namespace
+{
+  struct Hasher
+  {
+    //=======================================================================
+    //function : HashCode
+    //purpose  :
+    //=======================================================================
+    inline static Standard_Integer HashCode
+    (const gp_Pnt& point,  Standard_Integer Upper)
+    {
+      union
+      {
+        Standard_Real    R[3];
+        Standard_Integer I[6];
+      } U;
 
-//typedef NCollection_BaseCollection<SMDS_MeshNodePtr> DriverSTL_ColOfNodePtr;
+      point.Coord( U.R[0], U.R[1], U.R[2] );
 
+      return ::HashCode(U.I[0]/23+U.I[1]/19+U.I[2]/17+U.I[3]/13+U.I[4]/11+U.I[5]/7,Upper);
+    }
+    //=======================================================================
+    //function : IsEqual
+    //purpose  :
+    //=======================================================================
+    inline static Standard_Boolean IsEqual
+    (const gp_Pnt& point1, const gp_Pnt& point2)
+    {
+      static Standard_Real tab1[3], tab2[3];
+      point1.Coord(tab1[0],tab1[1],tab1[2]);
+      point2.Coord(tab2[0],tab2[1],tab2[2]);
+      return (memcmp(tab1,tab2,sizeof(tab1)) == 0);
+    }
+  };
+  typedef NCollection_DataMap<gp_Pnt,SMDS_MeshNode*,Hasher> TDataMapOfPntNodePtr;
+
+  const int HEADER_SIZE           = 84;
+  const int SIZEOF_STL_FACET      = 50;
+  const int ASCII_LINES_PER_FACET = 7;
+  const int SIZE_OF_FLOAT         = 4;
+  // const int STL_MIN_FILE_SIZE     = 284;
+}
 
-#include <NCollection_DataMap.hxx>
-typedef NCollection_DataMap<gp_Pnt,SMDS_MeshNode*> DriverSTL_DataMapOfPntNodePtr;
 //=======================================================================
 //function : DriverSTL_R_SMDS_Mesh
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 DriverSTL_R_SMDS_Mesh::DriverSTL_R_SMDS_Mesh()
@@ -110,42 +106,29 @@ Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::Perform()
 
   Status aResult = DRS_OK;
 
-  TCollection_AsciiString aFileName( (char *)myFile.c_str() );
-  if ( aFileName.IsEmpty() ) {
+  if ( myFile.empty() ) {
     fprintf(stderr, ">> ERREOR : invalid file name \n");
     return DRS_FAIL;
   }
 
-  filebuf fic;
-  Standard_IStream is(&fic);
-  if (!fic.open(aFileName.ToCString(),ios::in)) {
-    fprintf(stderr, ">> ERROR : cannot open file %s \n", aFileName.ToCString());
+  SMESH_File file( myFile, /*open=*/false );
+  if ( !file.open() ) {
+    fprintf(stderr, ">> ERROR : cannot open file %s \n", myFile.c_str());
     return DRS_FAIL;
   }
 
-
-  OSD_Path aPath( aFileName );
-  OSD_File file = OSD_File( aPath );
-  file.Open(OSD_ReadOnly,OSD_Protection(OSD_RWD,OSD_RWD,OSD_RWD,OSD_RWD));
-  unsigned char str[128];
-  Standard_Integer lread,i;
-  Standard_Address ach;
-  ach = (Standard_Address)str;
   // we skip the header which is in Ascii for both modes
-  file.Read(ach,HEADER_SIZE,lread);
+  const char* data = file;
+  data += HEADER_SIZE;
 
-  // we read 128 characters to detect if we have a non-ascii char
-  file.Read(ach,sizeof(str),lread);
-  
+  // we check 128 characters to detect if we have a non-ascii char
   myIsAscii = Standard_True;
-  for (i = 0; i < lread; ++i) {
-    if (str[i] > '~') {
+  for (int i = 0; i < 128; ++i, ++data) {
+    if ( !isascii( *data ) && data < file.end() ) {
       myIsAscii = Standard_False;
       break;
     }
   }
-      
-  file.Close();
 
   if ( !myMesh ) {
     fprintf(stderr, ">> ERREOR : cannot create mesh \n");
@@ -153,37 +136,34 @@ Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::Perform()
   }
 
   if ( myIsAscii )
-    aResult = readAscii();
+    aResult = readAscii( file );
   else
-    aResult = readBinary();
+    aResult = readBinary( file );
 
   return aResult;
 }
 
 // static methods
 
-static Standard_Real readFloat(OSD_File& theFile)
+static Standard_Real readFloat(SMESH_File& theFile)
 {
   union {
-    Standard_Boolean i; 
+    Standard_Boolean i;
     Standard_ShortReal f;
-  }u;
+  } u;
 
-  char c[4];
-  Standard_Address adr;
-  adr = (Standard_Address)c;
-  Standard_Integer lread;
-  theFile.Read(adr,4,lread);
+  const char* c = theFile;
   u.i  =  c[0] & 0xFF;
   u.i |= (c[1] & 0xFF) << 0x08;
   u.i |= (c[2] & 0xFF) << 0x10;
   u.i |= (c[3] & 0xFF) << 0x18;
+  theFile += SIZE_OF_FLOAT;
 
   return u.f;
 }
 
 static SMDS_MeshNode* addNode(const gp_Pnt& P,
-                              DriverSTL_DataMapOfPntNodePtr& uniqnodes,
+                              TDataMapOfPntNodePtr& uniqnodes,
                               SMDS_Mesh* theMesh)
 {
   SMDS_MeshNode* node = 0;
@@ -198,7 +178,7 @@ static SMDS_MeshNode* addNode(const gp_Pnt& P,
 }                                
 
 static SMDS_MeshNode* readNode(FILE* file,
-                               DriverSTL_DataMapOfPntNodePtr& uniqnodes,
+                               TDataMapOfPntNodePtr& uniqnodes,
                                SMDS_Mesh* theMesh)
 {
   Standard_ShortReal coord[3];
@@ -209,17 +189,16 @@ static SMDS_MeshNode* readNode(FILE* file,
   return addNode( P, uniqnodes, theMesh );
 }
 
-static SMDS_MeshNode* readNode(OSD_File& theFile,
-                               DriverSTL_DataMapOfPntNodePtr& uniqnodes,
+static SMDS_MeshNode* readNode(SMESH_File& theFile,
+                               TDataMapOfPntNodePtr& uniqnodes,
                                SMDS_Mesh* theMesh)
 {
-  Standard_ShortReal coord[3];
-  coord[0] = readFloat(theFile);
-  coord[1] = readFloat(theFile);
-  coord[2] = readFloat(theFile);
+  gp_Pnt coord;
+  coord.SetX( readFloat(theFile));
+  coord.SetY( readFloat(theFile));
+  coord.SetZ( readFloat(theFile));
 
-  gp_Pnt P(coord[0],coord[1],coord[2]);
-  return addNode( P, uniqnodes, theMesh );
+  return addNode( coord, uniqnodes, theMesh );
 }
 
 //=======================================================================
@@ -227,35 +206,30 @@ static SMDS_MeshNode* readNode(OSD_File& theFile,
 //purpose  : 
 //=======================================================================
 
-Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::readAscii() const
+Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::readAscii(SMESH_File& theFile) const
 {
   Status aResult = DRS_OK;
-  long ipos;
-  Standard_Integer nbLines = 0;
 
-  // Open the file 
-  TCollection_AsciiString aFileName( (char *)myFile.c_str() );
-  FILE* file = fopen(aFileName.ToCString(),"r");
-  fseek(file,0L,SEEK_END);
   // get the file size
-  long filesize = ftell(file);
-  fclose(file);
-  file = fopen(aFileName.ToCString(),"r");
-  
+  long filesize = theFile.size();
+  theFile.close();
+
+  // Open the file 
+  FILE* file = fopen( myFile.c_str(),"r");
+
   // count the number of lines
-  for (ipos = 0; ipos < filesize; ++ipos) {
+  Standard_Integer nbLines = 0;
+  for (long ipos = 0; ipos < filesize; ++ipos) {
     if (getc(file) == '\n')
       nbLines++;
   }
 
   // go back to the beginning of the file
-//  fclose(file);
-//  file = fopen(aFileName.ToCString(),"r");
   rewind(file);
   
   Standard_Integer nbTri = (nbLines / ASCII_LINES_PER_FACET);
 
-  DriverSTL_DataMapOfPntNodePtr uniqnodes;
+  TDataMapOfPntNodePtr uniqnodes;
   // skip header
   while (getc(file) != '\n');
 
@@ -293,23 +267,14 @@ Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::readAscii() const
 //purpose  : 
 //=======================================================================
 
-Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::readBinary() const
+Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::readBinary(SMESH_File& file) const
 {
   Status aResult = DRS_OK;
 
-  char buftest[5];
-  Standard_Address adr;
-  adr = (Standard_Address)buftest;
-
-  TCollection_AsciiString aFileName( (char *)myFile.c_str() );
-  OSD_File aFile = OSD_File(OSD_Path( aFileName ));
-  aFile.Open(OSD_ReadOnly,OSD_Protection(OSD_RWD,OSD_RWD,OSD_RWD,OSD_RWD));
-
   // the size of the file (minus the header size)
   // must be a multiple of SIZEOF_STL_FACET
 
-  // compute file size
-  Standard_Integer filesize = aFile.Size();
+  long filesize = file.size();
 
   if ( (filesize - HEADER_SIZE) % SIZEOF_STL_FACET !=0 
       // Commented to allow reading small files (ex: 1 face)
@@ -322,29 +287,25 @@ Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::readBinary() const
   Standard_Integer nbTri = ((filesize - HEADER_SIZE) / SIZEOF_STL_FACET);
 
   // skip the header
-  aFile.Seek(HEADER_SIZE,OSD_FromBeginning);
+  file += HEADER_SIZE;
 
-  DriverSTL_DataMapOfPntNodePtr uniqnodes;
-  Standard_Integer lread;
+  TDataMapOfPntNodePtr uniqnodes;
   
   for (Standard_Integer iTri = 0; iTri < nbTri; ++iTri) {
 
     // ignore normals
-    readFloat(aFile);
-    readFloat(aFile);
-    readFloat(aFile);
+    file += 3 * SIZE_OF_FLOAT;
 
     // read vertices
-    SMDS_MeshNode* node1 = readNode( aFile, uniqnodes, myMesh );
-    SMDS_MeshNode* node2 = readNode( aFile, uniqnodes, myMesh );
-    SMDS_MeshNode* node3 = readNode( aFile, uniqnodes, myMesh );
+    SMDS_MeshNode* node1 = readNode( file, uniqnodes, myMesh );
+    SMDS_MeshNode* node2 = readNode( file, uniqnodes, myMesh );
+    SMDS_MeshNode* node3 = readNode( file, uniqnodes, myMesh );
 
     if (myIsCreateFaces)
       myMesh->AddFace(node1,node2,node3);
 
     // skip extra bytes
-    aFile.Read(adr,2,lread);
+    file += 2;
   }
-  aFile.Close();
   return aResult;
 }
index 3924e648098a7a9a8bc1c6b9d1c5ec71b3a3e062..75df49c52d5dbdfbfd59cdd86753f7fc31332d41 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -27,7 +27,7 @@
 
 #include "Driver_SMDS_Mesh.h"
 
-#include <Standard_TypeDef.hxx>
+class SMESH_File;
 
 class MESHDRIVERSTL_EXPORT DriverSTL_R_SMDS_Mesh: public Driver_SMDS_Mesh
 {
@@ -38,8 +38,8 @@ class MESHDRIVERSTL_EXPORT DriverSTL_R_SMDS_Mesh: public Driver_SMDS_Mesh
   
  private:
   // PRIVATE METHODS
-  Status           readAscii() const;
-  Status           readBinary() const;
+  Status           readAscii (SMESH_File& file) const;
+  Status           readBinary(SMESH_File& file) const;
   
  private:
   // PRIVATE FIELDS
index ef66f22927371705f8bfb49c870466f5fed5544a..2ac7ca5daee2945c5b70ba03bcc1544f87f37c4e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-#include <stdio.h>
-#include <limits>
-
 #include "DriverSTL_W_SMDS_Mesh.h"
 
+#ifdef WIN32
+#define NOMINMAX
+#endif
+
+#include <Basics_Utils.hxx>
+
 #include "SMDS_FaceOfNodes.hxx"
 #include "SMDS_IteratorOnIterators.hxx"
 #include "SMDS_Mesh.hxx"
 #include "SMDS_MeshNode.hxx"
 #include "SMDS_SetIterator.hxx"
 #include "SMDS_VolumeTool.hxx"
+#include "SMESH_File.hxx"
 #include "SMESH_TypeDefs.hxx"
 
-#include <OSD_File.hxx>
-#include <OSD_Path.hxx>
-#include <OSD_Protection.hxx>
-#include <TCollection_AsciiString.hxx>
-#include <gp_XYZ.hxx>
-#include <Basics_Utils.hxx>
+//#include "utilities.h"
+
+#include <limits>
 
-#include "utilities.h"
 
 // definition des constantes 
 static const int LABEL_SIZE = 80;
@@ -147,7 +147,7 @@ SMDS_ElemIteratorPtr DriverSTL_W_SMDS_Mesh::getFaces() const
 
 // static methods
 
-static void writeInteger( const Standard_Integer& theVal, OSD_File& ofile )
+static void writeInteger( const Standard_Integer& theVal, SMESH_File& ofile )
 {
   union {
     Standard_Integer i;
@@ -162,16 +162,15 @@ static void writeInteger( const Standard_Integer& theVal, OSD_File& ofile )
   entier |= (u.c[2] & 0xFF) << 0x10;
   entier |= (u.c[3] & 0xFF) << 0x18;
 
-  ofile.Write((char *)&entier,sizeof(u.c));
+  ofile.write( entier );
 }
 
-static void writeFloat  ( const Standard_ShortReal& theVal,
-                         OSD_File& ofile)
+static void writeFloat( const Standard_ShortReal& theVal, SMESH_File& ofile)
 {
   union {
     Standard_ShortReal f;
     char c[4]; 
-  }u;
+  } u;
 
   u.f = theVal;
 
@@ -182,7 +181,7 @@ static void writeFloat  ( const Standard_ShortReal& theVal,
   entier |= (u.c[2] & 0xFF) << 0x10;
   entier |= (u.c[3] & 0xFF) << 0x18;
 
-  ofile.Write((char *)&entier,sizeof(u.c));
+  ofile.write( entier );
 }
 
 static gp_XYZ getNormale( const SMDS_MeshNode* n1,
@@ -287,19 +286,18 @@ static int getTriangles( const SMDS_MeshElement* face,
 Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeAscii() const
 {
   Status aResult = DRS_OK;
-  TCollection_AsciiString aFileName( (char *)myFile.c_str() );
-  if ( aFileName.IsEmpty() ) {
+  if ( myFile.empty() ) {
     fprintf(stderr, ">> ERREOR : invalid file name \n");
     return DRS_FAIL;
   }
 
-  OSD_File aFile = OSD_File(OSD_Path(aFileName));
-  aFile.Build(OSD_WriteOnly,OSD_Protection());
+  SMESH_File aFile( myFile, /*openForReading=*/false );
+  aFile.openForWriting();
 
-  char sval[16];
-  TCollection_AsciiString buf = TCollection_AsciiString ("solid\n");
-  aFile.Write (buf,buf.Length());buf.Clear();
+  std::string buf("solid\n");
+  aFile.writeRaw( buf.c_str(), buf.size() );
 
+  char sval[128];
   const SMDS_MeshNode* triaNodes[2048];
 
   SMDS_ElemIteratorPtr itFaces = getFaces();
@@ -313,45 +311,25 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeAscii() const
       gp_XYZ normale = getNormale( triaNodes[iN],
                                    triaNodes[iN+1],
                                    triaNodes[iN+2] );
+      sprintf (sval,
+               " facet normal % 12e % 12e % 12e\n"
+               "   outer loop\n" ,
+               normale.X(), normale.Y(), normale.Z());
+      aFile.writeRaw ( sval, 70 );
 
-      buf += " facet normal "; 
-      sprintf (sval,"% 12e",normale.X());
-      buf += sval;
-      buf += " "; 
-      sprintf (sval,"% 12e",normale.Y());
-      buf += sval;
-      buf += " "; 
-      sprintf (sval,"% 12e",normale.Z());
-      buf += sval;
-      buf += '\n';
-      aFile.Write (buf,buf.Length());buf.Clear();
-      buf += "   outer loop\n"; 
-      aFile.Write (buf,buf.Length());buf.Clear();
-      
-      for ( int jN = 0; jN < 3; ++jN, ++iN ) {
-        const SMDS_MeshNode* node = triaNodes[iN];
-        buf += "     vertex "; 
-        sprintf (sval,"% 12e",node->X());
-        buf += sval;
-        buf += " "; 
-        sprintf (sval,"% 12e",node->Y());
-        buf += sval;
-        buf += " "; 
-        sprintf (sval,"% 12e",node->Z());
-        buf += sval;
-        buf += '\n';
-        aFile.Write (buf,buf.Length());buf.Clear();
+      for ( int jN = 0; jN < 3; ++jN, ++iN )
+      {
+        SMESH_TNodeXYZ node = triaNodes[iN];
+        sprintf (sval,
+                 "     vertex % 12e % 12e % 12e\n",
+                 node.X(), node.Y(), node.Z() );
+        aFile.writeRaw ( sval, 54 );
       }
-      buf += "   endloop\n"; 
-      aFile.Write (buf,buf.Length());buf.Clear();
-      buf += " endfacet\n"; 
-      aFile.Write (buf,buf.Length());buf.Clear();
+      aFile.writeRaw ("   endloop\n"
+                      " endfacet\n", 21 );
     } 
   }
-  buf += "endsolid\n";
-  aFile.Write (buf,buf.Length());buf.Clear();
-  
-  aFile.Close ();
+  aFile.writeRaw ("endsolid\n" , 9 );
 
   return aResult;
 }
@@ -366,14 +344,14 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeAscii() const
 Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeBinary() const
 {
   Status aResult = DRS_OK;
-  TCollection_AsciiString aFileName( (char *)myFile.c_str() );
-  if ( aFileName.IsEmpty() ) {
+
+  if ( myFile.empty() ) {
     fprintf(stderr, ">> ERREOR : invalid filename \n");
     return DRS_FAIL;
   }
 
-  OSD_File aFile = OSD_File(OSD_Path(aFileName));
-  aFile.Build(OSD_WriteOnly,OSD_Protection());
+  SMESH_File aFile( myFile );
+  aFile.openForWriting();
 
   // we first count the number of triangles
   int nbTri = myVolumeTrias.size();
@@ -384,12 +362,11 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeBinary() const
       nbTri += getNbTriangles( aFace );
     }
   }
-  // char sval[80]; -- avoid writing not initialized memory
-  TCollection_AsciiString sval(LABEL_SIZE-1,' ');
-  aFile.Write((Standard_Address)sval.ToCString(),LABEL_SIZE);
+  std::string sval( LABEL_SIZE, ' ' );
+  aFile.write( sval.c_str(), LABEL_SIZE );
 
   // write number of triangles
-  writeInteger(nbTri,aFile);  
+  writeInteger( nbTri, aFile );  
 
   // Loop writing nodes
 
@@ -419,10 +396,9 @@ Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::writeBinary() const
         writeFloat(node->Y(),aFile);
         writeFloat(node->Z(),aFile);
       }
-      aFile.Write (&dum,2);
-    } 
+      aFile.writeRaw ( &dum, 2 );
+    }
   }
-  aFile.Close ();
 
   return aResult;
 }
index aa4b00b0bc78d780e95c0fad57b969e4ef94ff3e..4d03b3fed66af5c55b21568d1c11fed63e765d3d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5bc2ff4c86d86dc02bba2d448745db15ba5dd19d..13385f7015fa2961b150362351fb63644cb062b6 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index da1a4a89602a51fd2ebe0c415ee2d97c962d21a5..794c9f56ef397a412e04a9d9d561aa5e48023969 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index d1c9845956b6a9b7d717c1c8b470ca1b46f1b3cc..317b2182afc376fd0fa3af57c0620ff598e9f845 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index eef8215b70ab20bf3ece0b3a6216b3acd1db336d..de22ba86fe9e3dd6cb64073292f52d2ae85d0ea8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b981927bc59b16b9918775cd04c0956378155274..13ca2e262682e268d87af41e14851c22106debed 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e075d9cd07c1871afa741f22ced6371b44202cb1..858f667feafde0f7af39b86195713be30a2c5e65 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ed7639fb8ad4ea92bdaaf120f53da00b658550aa..801fdb9f4ee9f9233851496adb24590c156ce017 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a4cd6c6249f5ed62732344e2633bec5a2c1ee62e..47e44554f9a2ba4442ef99f7cab726ba01cf610c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 97ebe9516c4fc8507fe8665ee02dce55c27407b1..38a617f71ec2c8318d24c8c8540df9d13f4fad27 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index cb5099f7e420bfdfada18657f39b5ea46fd97d22..24ee333f72b92eddced40abad4b3b2a7378213de 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 77ad55918ba64f6c523456e4a0000d1439fe86f6..c6b4736ffddd31c6174d93bec359cbe5a0e0b809 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4962134ec55bc50d786aa94c8f3f2e9572e3d468..f4df5bac28a736c0a429909ed609dee48ece8f51 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a7363c89073d6e535ab4b85e45c7e0fdec8ee9ae..87659e6680f6c672fda60b50da58acdcd7b1ec08 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index dc02e38b1f99253fa29d4bcec1e8482dd34b605f..527614f131dfe31485c7e739fa52a64ed717b9c6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index bb9dcf7bef6e862a23083ee2abe885d90c2b44cb..f5ece4a2d8714590e17d18f3f39fbd78c231cfbb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index bf3c927f08e158bbc88931914ea52109eb5ac9f1..459b0e6a09cd76f54ced6f8de948fdab78b40242 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d447b69a63d63cbfce896942f7064d1865fccc31..60b198941c89d21be263917181de4380290c81cd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 96b79c5bd1af4ff96cd30999784a0f5f34825789..9a1c6267dc54fd87e1fc1dd6a522c7c0628ef060 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1db6d2bb9c68e866fc3a52a51947a1ceb4f734e4..af5643d0331e15bac00b40a3e8e50a7133d136cb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d8daa39e412b3ad32c49a0fd97597a41c6089374..38cdc56c896a58b33a1644b2e0ecee7225a406dd 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index afe4ab7defcc4b3e1ae96eb975db3e5630f126ca..62795f8787c3cd1f2dae28834b5f6138b2b0ca2b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,6 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//
 #include "MED_Algorithm.hxx"
 #include "MED_Wrapper.hxx"
 
index ee7ac378016716cb19d4719ff5ffc55ee8eaf846..c752feaf9fb249d1d7df47df3939e41d91c95329 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,6 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//
 #ifndef MED_Algorithm_HeaderFile
 #define MED_Algorithm_HeaderFile
 
index 4715f6c85ae96dc873602cab22cf7948052c7733..0c118238582224947e71b14be0711072144857c0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -59,7 +59,7 @@ namespace MED{
 
   typedef enum {eFULL_INTERLACE, eNO_INTERLACE} EModeSwitch;
 
-  typedef enum {eFLOAT64=6, eINT=26} ETypeChamp;
+  typedef enum {eFLOAT64=6, eINT=24, eLONG=26 } ETypeChamp;
 
   typedef enum {eNON_STRUCTURE, eSTRUCTURE} EMaillage;
 
index 21f9162b0e544fd9815b7cce64fa9f2bf2bc9f42..f28175b60e1fc7185bb796521abea77c68350199 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,6 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//
 #include "MED_CoordUtils.hxx"
 #include "MED_Utilities.hxx"
  
index 17b09d76176477d4bf497f1043ebfee72970c246..5a091ce03d2f80d9ea7e567b377b8b04bbad2413 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,6 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//
 #ifndef MED_CoordUtils_HeaderFile
 #define MED_CoordUtils_HeaderFile
 
index f89042e5825c4c91e423328f3f840332fc4119d8..db27e4e22d7d9119702389b22e97996fd7de46b4 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ae12c9ae1cc876768bfaed3a667d439a50d55058..817690c12db0a9226e4e189b92eff11a6a01f820 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9ae82dfb373f09fffd3548ad05b633bf41078afa..6381e15436d6a7452d820a5306dd76efaed5c9ac 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,6 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//
 #include "MED_GaussUtils.hxx"
 #include "MED_Utilities.hxx"
  
index ffea1a826c40291703526feed1d070b4ea2fbe1d..b97383ddc54c0e4a99c23e9a04aa4afcb964ad62 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,6 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//
 #ifndef MED_GaussUtils_HeaderFile
 #define MED_GaussUtils_HeaderFile
 
index d0f4746c6eb475e94e5dae7b28cd9fb5dc98432e..0c52a2062a0843557867e42439426221bb8c95ef 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,6 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//
 #ifndef MED_SharedPtr_HeaderFile
 #define MED_SharedPtr_HeaderFile
 
@@ -49,7 +48,7 @@ namespace MED
     //! Construct the class by any specialisation of the class
     template<class Y>
     SharedPtr(SharedPtr<Y> const & r):
-      boost::shared_ptr<T>(r,boost::detail::dynamic_cast_tag())
+      boost::shared_ptr<T>(boost::dynamic_pointer_cast<T,Y>(r))
     {}
 
     //! Copy-constructor
@@ -57,7 +56,7 @@ namespace MED
     SharedPtr& 
     operator=(SharedPtr<Y> const & r)
     {
-      boost::shared_ptr<T>(r,boost::detail::dynamic_cast_tag()).swap(*this);
+      SharedPtr<T>(r).swap(*this);
       return *this;
     }
 
index c41951c75dd0778f312d7ebe2eab3f50681c0919..b8d0e853a8cbaaf7a3e37f4635b692fef8af594a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,6 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//
 #ifndef MED_SliceArray_HeaderFile
 #define MED_SliceArray_HeaderFile
 
index e9059ad931b5a13a2e7f80a5329902a46cc33600..a138b340397c04e5e0d6fcb8dfed10948b0ab4b3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index bcd361a6772804810ae377e96243f3664feafbe1..5a2cdb0564a350bc8038e81b9664c48cbb244c76 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index dfbca909a887d09514871e55add717773fa1716f..0f00d598a7acd241f58f02a1d460ad63dcb801f4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,6 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//
 #ifndef MED_TStructures_HeaderFile
 #define MED_TStructures_HeaderFile
 
index 4acda13b484beba3f1a8943bcf4e23270baa3a1e..af3e56fc6210e6b96385dacb1a9a9e27a6bca6ca 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 49cd74aac8276f0bb2cc9d28257783a3ce3e94e8..917c61a53c5ebeec3514b4754906ea16a57fba8a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,6 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//
 #include "MED_Utilities.hxx"
 #include "MED_Common.hxx"
 
index 39e7cf87f7e087d12446549b6301c9a6a9e6db7f..dc438956057ed6d1cd735f46f9d0e2917bd9c6e3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,6 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//
 #ifndef MED_Utilities_HeaderFile
 #define MED_Utilities_HeaderFile
 
index 94e894fa9c9da4a0fb1d913e50f41477784b0272..e0b6abb3a6c5caa421f086d5c9880670d282eac2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,6 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//
 #ifndef MED_Vector_HeaderFile
 #define MED_Vector_HeaderFile
 
index d04c28423251a7940edd98dde9659b3b1bad2cb3..92fef242ba1c3141b5f1c96318cc8e78002aa54d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 027c9a545d8d1b77a05b9542606b233f05b1193e..d64d2b853c430dbdf323f6bc5efa97b4ee41af90 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1002,14 +1002,14 @@ namespace MED
 
     template<class Y>
     SharedPtr(SharedPtr<Y> const & r):
-      boost::shared_ptr<TWrapper>(r,boost::detail::dynamic_cast_tag())
+      boost::shared_ptr<TWrapper>(boost::dynamic_pointer_cast<TWrapper,Y>(r))
     {}
 
     template<class Y>
     SharedPtr& 
     operator=(SharedPtr<Y> const & r)
     {
-      boost::shared_ptr<TWrapper>(r,boost::detail::dynamic_cast_tag()).swap(*this);
+      SharedPtr<TWrapper>(r).swap(*this);
       return *this;
     }
 
index 128e4e89b2dfba72a931848c6a312d40ff38eba3..2b0d7d451268b3e10327e3009f5210941d38c973 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 90ed5a20a7d0e09ee75d05ae1ec00077ecef2b40..1320cea8cb9abeaf9890bf7032fb047431058a19 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 69aa1eb575260b216aefeba0f415f7a6d2864a5f..9661c6e4fcd9d56393c523b7f7d6b623fab6c65a 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7232ee08d82aedd27318a1bf25d3df2a6d68a4eb..06ebdd00fe22e0cd5c385c2cec8a79cf25ce5a14 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,6 +18,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #include "MED_Factory.hxx"
 #include "MED_Utilities.hxx"
index 469d52eaa8b82e3d45243c613b7c7c8f4172e835..f83ab21b91261662f2c75f4b99dc8508e68636b0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,6 +18,7 @@
 // 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 MED_Factory_HeaderFile
 #define MED_Factory_HeaderFile
index 721d330f7dd0f1a88811aeafedd9d1a6a16982f0..ecfa5dad3bdbce0e5956daa2946d41a2436a7ace 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4578603e65dda55c4b076c1a5bd711b52d6f5c5d..5f5414156888648c258f65686b9e7250168f6cea 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index fe77ea58a47ad344b088abb8f15e1723f495c63a..cbfc090f9429d354eb9cb762ba54c9a7d491fc8f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 43118dcff980c27feab0c008d21d76ef2e8c2782..5594d6aaedb0c790b20f051ce84719eddeeef406 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index a7dc74a855f334ad6289c79c4110e9348a130b0b..1b097b9b19c4a5967ebcc762c0fff55e2bcd284f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9d5a74ca70ebeb54a83155df48d895e940d351f5..2eb860dd07a75ef622162af3bb778c42564d28d4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,6 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//
 #ifndef MED_V2_2_Wrapper_HeaderFile
 #define MED_V2_2_Wrapper_HeaderFile
 
index 459bf250228b55ba54ca69d23585a4903bae9c43..5841fbcda5c9cc46204dde9a4fa2cf6f03e60119 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 22582f71310a34d74f41f1fba99a0531c25c4263..5950ca88f7978d4a083d04e550ec44d8d99d06ad 100755 (executable)
@@ -1,11 +1,11 @@
 //  MEFISTO :  library to compute 2D triangulation from segmented boundaries
 //
-// Copyright (C) 2006-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 366124e61414bab20e3d3c0b7ee4435243b01b88..8be578cfc4ad4a1f8b218e84163e00ab058b86b1 100755 (executable)
@@ -1,12 +1,12 @@
 //  MEFISTO2: a library to compute 2D triangulation from segmented boundaries
 //
 //
-// Copyright (C) 2006-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 980adb94613fd78d2b6d0199bcfb6536252fa58a..6c4ad1dbdc82135b899579612a025ff169a48d72 100755 (executable)
@@ -1,11 +1,11 @@
 //  SMESH MEFISTO2 : algorithm for meshing
 //
-// Copyright (C) 2006-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 29394e4efa25ba63c2349d3bc94c4702a6636943..0aef3446ef3455d98250375d32d29c385e87bd78 100755 (executable)
@@ -1,11 +1,11 @@
 c  MEFISTO : library to compute 2D triangulation from segmented boundaries
 c
-c Copyright (C) 2006-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+c Copyright (C) 2006-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 c
 c This library is free software; you can redistribute it and/or
 c modify it under the terms of the GNU Lesser General Public
 c License as published by the Free Software Foundation; either
-c version 2.1 of the License.
+c version 2.1 of the License, or (at your option) any later version.
 c
 c This library is distributed in the hope that it will be useful,
 c but WITHOUT ANY WARRANTY; without even the implied warranty of
index 259f5964f6bc4c18086024e38fe07404ac7888ae..d0e401f4665824e73eb8384384d97bc3f77b486a 100755 (executable)
@@ -1,11 +1,11 @@
 c  MEFISTO2: a library to compute 2D triangulation from segmented boundaries
 c
-c Copyright (C) 2006-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+c Copyright (C) 2006-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 c
 c This library is free software; you can redistribute it and/or
 c modify it under the terms of the GNU Lesser General Public
 c License as published by the Free Software Foundation; either
-c version 2.1 of the License.
+c version 2.1 of the License, or (at your option) any later version.
 c
 c This library is distributed in the hope that it will be useful,
 c but WITHOUT ANY WARRANTY; without even the implied warranty of
index 64350a8fda0e1df491a8265b186d3bdf6dba0644..4d92e790991e0d743ba6208f270746c20e30f7de 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4ef6a5ceb4ead5fc32e73dbd93bea66a6a0aff19..20582c7b15e86b08b563136643caef13ca732414 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -143,10 +143,11 @@ SMESH_ActorDef::SMESH_ActorDef()
   if ( mgr && mgr->booleanValue( "SMESH", "use_precision", false ) )
     myControlsPrecision = mgr->integerValue( "SMESH", "controls_precision", -1);
 
-  double aElem0DSize   = SMESH::GetFloat("SMESH:elem0d_size",5);
-  double aBallElemSize = SMESH::GetFloat("SMESH:ball_elem_size",10);
-  double aLineWidth    = SMESH::GetFloat("SMESH:element_width",1);
-  double aOutlineWidth = SMESH::GetFloat("SMESH:outline_width",1);
+  double aElem0DSize    = SMESH::GetFloat("SMESH:elem0d_size",5);
+  double aBallElemSize  = SMESH::GetFloat("SMESH:ball_elem_size",10);
+  double aBallElemScale = SMESH::GetFloat("SMESH:ball_elem_scale",1.0);
+  double aLineWidth     = SMESH::GetFloat("SMESH:element_width",1);
+  double aOutlineWidth  = SMESH::GetFloat("SMESH:outline_width",1);
 
   SMESH::LabelFont aFamilyNd = SMESH::FntTimes;
   bool aBoldNd    = true;
@@ -566,6 +567,7 @@ SMESH_ActorDef::SMESH_ActorDef()
 #endif
 
   SetBallSize(aBallElemSize);
+  SetBallScale(aBallElemScale);
   Set0DSize(aElem0DSize);
 }
 
@@ -1313,7 +1315,7 @@ void SMESH_ActorDef::SetShrinkFactor(double theValue){
   Modified();
 }
 
-void SMESH_ActorDef::SetShrink(){
+void SMESH_ActorDef::SetShrink() {
   if(!myIsShrinkable) return;
 
   myBaseActor->SetShrink();
@@ -2106,6 +2108,16 @@ double SMESH_ActorDef::GetBallSize(){
   return myBallProp->GetPointSize();
 }
 
+double SMESH_ActorDef::GetBallScale()
+{
+  return myBallActor->GetBallScale();
+}
+
+void SMESH_ActorDef::SetBallScale( double theVal )
+{
+  myBallActor->SetBallScale( theVal );
+}
+
 int SMESH_ActorDef::GetObjDimension( const int theObjId )
 {
   return myVisualObj->GetElemDimension( theObjId );
@@ -2207,7 +2219,10 @@ SMESH_ActorDef::SetOpenGLClippingPlane()
   my3DExtActor->SetPlaneCollection( myPlaneCollection );
   my3DExtActor->SetUnstructuredGrid(myVisualObj->GetUnstructuredGrid());
 
-  Modified();
+  if(IsShrunk())
+    SetShrink();
+  else  
+    Modified();
 }
 
 void
index b64ba3147bc59792414e2db22434b491958b4306..2688e99a60358ebf295a48a9f14df8d985a0d851 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -101,6 +101,9 @@ class SMESHOBJECT_EXPORT SMESH_Actor: public SALOME_Actor
   virtual void SetBallSize(double size) = 0;
   virtual double GetBallSize() = 0;
 
+  virtual void SetBallScale(double size) = 0;
+  virtual double GetBallScale() = 0;
+
   enum EReperesent { ePoint, eEdge, eSurface};
   
   enum EEntityMode { e0DElements = 0x01, eEdges = 0x02, eFaces = 0x04, eVolumes = 0x08, eBallElem = 0x10, eAllEntity = 0x1f};
index c5c9f412dd9578a9e8c8d9d2bdd830313576c305..add4fb6bee5d1a9706d5c14541710ae304c52863 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -144,6 +144,9 @@ class SMESH_ActorDef : public SMESH_Actor
   virtual void SetBallSize(double size);
   virtual double GetBallSize();
 
+  virtual void SetBallScale(double size);
+  virtual double GetBallScale();
+
   virtual int GetNodeObjId(int theVtkID);
   virtual double* GetNodeCoord(int theObjID);
 
index 79c1d7e31ff72a12b735a3ed4cb0494b4343f525..f5477356eeb8bc3397f79fe598fe04379e4fbbe3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3f6c04818ace5ebb600751e5c0dcb0df4b747bf8..946f27e4f9ea1f3519a199b7ea4c5ace4b1ebf45 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 71add3460aaa713dd2619b841c11dfc94eb5e2b9..0d7d428d6f6d276f96a5b4ab64acc4d82c3b1721 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ed7686b07c05e6e49ed553edb26bed9ad53a0ea4..414abc8465cd7a166c7143404f431e80568240f5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 02eefc529731a14d306fb607f83c91587c6a3307..dd7c3480b7968332244c586e04e135ef0fd9a6a2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -142,7 +142,6 @@ SMESH_DeviceActor
   if(MYDEBUG) MESSAGE("~SMESH_DeviceActor - "<<this);
 
   myMapper->Delete();
-  myPlaneCollection->Delete();
 
   myProperty->Delete();
 
@@ -960,6 +959,16 @@ void SMESH_DeviceActor::SetBallEnabled( bool theBallEnabled ) {
   myMapper->SetBallEnabled( theBallEnabled );
 }
 
+/*!
+ * Set point marker scale factor
+ * \param theBallScale double value which specifies a scale factor of ball element
+ */
+void SMESH_DeviceActor::SetBallScale( double theBallScale )
+{
+  myMapper->SetBallScale( theBallScale );
+  myMapper->Modified();
+}
+
 /*!
  * Set standard point marker
  * \param theMarkerType type of the marker
@@ -1006,6 +1015,15 @@ int SMESH_DeviceActor::GetMarkerTexture()
   return myMapper->GetMarkerTexture();
 }
 
+/*!
+ * Get scale factor of ball element
+ * \return scale factor of ball element
+ */
+double SMESH_DeviceActor::GetBallScale()
+{
+  return myMapper->GetBallScale();
+}
+
 void SMESH_DeviceActor::SetCoincident3DAllowed(bool theFlag) {
   myGeomFilter->SetAppendCoincident3D(theFlag);
 }
index e2931d88f0841d53fc1f3e1fbb86643ba6f0a7e1..ce8f74362c1a17957474d13229c0760476324b0d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -148,11 +148,13 @@ class SMESHOBJECT_EXPORT SMESH_DeviceActor: public vtkLODActor{
 
   void SetMarkerEnabled( bool );
   void SetBallEnabled( bool );
+  void SetBallScale( double );
   void SetMarkerStd( VTK::MarkerType, VTK::MarkerScale );
   void SetMarkerTexture( int, VTK::MarkerTexture );
   VTK::MarkerType GetMarkerType();
   VTK::MarkerScale GetMarkerScale();
   int GetMarkerTexture();
+  double GetBallScale();
 
  protected:
   void Init(TVisualObjPtr theVisualObj, vtkImplicitBoolean* theImplicitBoolean);
@@ -161,7 +163,8 @@ class SMESHOBJECT_EXPORT SMESH_DeviceActor: public vtkLODActor{
   VTKViewer_PolyDataMapper *myMapper;
   TVisualObjPtr myVisualObj;
 
-  vtkPlaneCollection* myPlaneCollection;
+  vtkSmartPointer<vtkPlaneCollection> myPlaneCollection;
+  
   vtkProperty *myProperty;
   EReperesent myRepresentation;
 
index 002ab02f3c6726820bb27ac190bebfab16c2c974..709ce985319ebb9c4eb0150c1632e5ce186418ba 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 094b1bd0727340f7081b2982cde9bf321c0f6cca..fda9595d18bdae2e60fd50a22f66874a71a8ced6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1d0cecf8d332cab9da2f12b70c88bc75b369fc09..ce85f22fc7fef9a28f31454851288bff9442195e 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f316df3025cb36fd29e4cc5ebe01a3ef21c1db33..2832ace693377d27b920e3f817c042e86e1bc65e 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 003b551a2a368ad2edf7af4c9d02ffdce2bccc0f..604db28ee83298d5dac0ef6602ce8c66125600bb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ba8c480f4bf03fc8089a2e9e029bea403ac92ef0..2c11348bbeee7ed3a2aa9c8b9d60762ad9dd1b67 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 94cf59d5fed22152a22ca40ad3e87d85dde2f79c..71711f81aaae0caf663eb07aea1fbeff8899e998 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a73e32bc8af278676548b25fbfe6f9595c2f5851..9d4804d992c63438cc82f641a9110cfedc04f88a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 116ee532da441a5f9c136056c75618380582b348..5fe4212d7ced742edbd34c07c0a93b54dba474f5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1acf90fd6a65e4a8acf4eea72b2f468814abb2c0..397aeebb967a4c4a15619fdfd86f1d2cbbc1eb31 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8c233d86c9de593e94a2547b4db40ab208dd86fc..8fcd55449d74531d897fd89e231581106908e8cf 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ca1d4ba5767a2e93ed2c32e3e400f66a79a10f9b..073714d296a965f2d1ac9cdfe31d8501f28463dc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e727181dbd4d905ec9e2c1c63ebde517c7d95dba..0a555a15a63a5c395359c7c0221f4b61cfcb9ea8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a18c7cb58063f1972ee2d96aa6aace0142ab2284..6ece6aa5376fc0e8db67fad08599d804c1fd5593 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9c840e5e8cede70dbfb2a7ac751202345ded88ac..771b369c14e8b65b151e0e39f99a37270608198f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b3a88e7ad96625cb6585affaec35670f87fad7c7..11550d46b4cc9a913c6cb52adfb4ebfb081c44fc 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 13a0befdcb6b58810fac866e65af168d922f595d..d57f2a210b0ce44e35bc5a584e1818cca156cc13 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d153a73adb5dbe94afd8bb4216eaca10f2ac9141..31c34360660ffa0a1c2da9b50b0b861afea5fac9 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 275c078960aa360453f07ebaca3abc4e81b7e9b2..2187eeea9931bc858dd7febb6216d1b54dba4d01 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index e664c260c5283a6d94ed89e4eb107bb5ca742f42..7af2283c61a3e34f2132258905a46946e45c1316 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3d49857599677292124b570ea528544ca3fa5e2c..f80b41e9f54f7316213f70e227232bce43a718fb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -74,8 +74,7 @@ enum SMDSAbs_ElementOrder {
 };
 
 /*!
- * Enumeration of entity type uses in mesh info array,
- *  and should be synchronised with enum in SMDS  
+ * Enumeration of entity type used in mesh info array
  */
 enum SMDSAbs_EntityType {
   SMDSEntity_Node,
index 52569229b0b913e2865e1d9f1c6b9c3579b61a42..e3b4c3a94f7b6964a1f6400ac8fc2f2d833b663b 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 06c9e08c47b30935663241e28658f995ca77d688..400b9ceeab7ebcca9e9bad2cbda861aad33d1286 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 629dca26a4f27c13f2306f0f14aafe918c0546c7..b36078f422e81430c47f14cc282de50b9446b7bb 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e36386c4ea7602bf57b2755c7183c4647c455b82..1d3b91a905c3c6a4780b4ae28646abf443140cdc 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 94eb9bbcbb0626be9d12360e8741c7954b14eb81..d6bdb7abbcd8ff5459f0bd4d5b8ffc55c105af15 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 284d3668fb137ffedeb6e4c5a3cd08fd2179e913..59929c8cb9dcb233575e376a8752aec455a5afd0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 58d8fe3f4d950971b928928ac353e06b30b6f026..a28d44f61999e452cd8f25d6d30616aa34661019 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 81f44bbed180906d9d36c19a19cf1a024f7f2e09..bf11dd6dad27e38929a21afb9ce733169d99b7b1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f5ace4bb2134ffe33872ca0799e197cf3701690e..16ce76acea9deb79be4575b4c8f68275dfef45c2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8d9af7ba67930b5512d80dde18e761264e0267eb..127fc04b4b7c5c19bc96dddd9e47a4d5598b7097 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 953652ba30e62102564332be3f3672aadac9207e..c43507506c78f8b9d73ac94b9ad4ddae1598f451 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 52157a55bee8871759a577dba820c4ca17ae8542..97374cf4265a3518209cc5e6d486c0f3d2753896 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e25ff89f5df01e8ab263597fcb0f6ec31cc7e457..84cdd1033c190db883d7397c0c29c71678cea03e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9d1fa1289fd1c514c10797e0e84bc6ad094131be..65182de41e3096ea8160583a01230c34bdcde8f4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9367c3b44b0602cbe55d3dee6551a3c4032fc448..166e5c36041bff6e1f8d31108817f6150a49b7d5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1d69505d5bc9e536bff0ecb44d93d9797a705c2e..cd0f969ec3f12b7b102dbe477e67f9166d352252 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ffd6b5310771d8ac995d3772cf6e1e2287e00fa7..4ffc644819634a836f947755c511be2a712ccaa4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b172560d05537bb19b1a85122cad1045f9c7d9b9..8c924b77e4bd84dc3df1f4381a1fc35f58e1c5c8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b9778ac21ab5e4c2a6c14c68d9040433b11cfda5..3c9b2f040ced5c299a999d3db45c6bab7c196677 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 61d0f134fca6085c6e3edb7d91224de6d80d680f..f0e80af310389bb50902e85c594ce591d84fc8bb 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index da6ecd8a30806db6660e9c689a800b0f95157053..63c658638dcbb901b5d589dd36ab3b4e4ef3f3ab 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -2944,6 +2944,11 @@ SMDS_ElemIteratorPtr SMDS_Mesh::elementGeomIterator(SMDSAbs_GeometryType type) c
 
 SMDS_ElemIteratorPtr SMDS_Mesh::elementEntityIterator(SMDSAbs_EntityType type) const
 {
+  if ( type == SMDSEntity_Node )
+  {
+    typedef ElemVecIterator<const SMDS_MeshElement*, SMDS_MeshNode*> TIterator;
+    return SMDS_ElemIteratorPtr( new TIterator(myNodes));
+  }
   // naturally always sorted by ID
   typedef ElemVecIterator
     < const SMDS_MeshElement*, SMDS_MeshCell*, SMDS_MeshElement::EntityFilter > TIterator;
index 3c0d0ca0dde1255b4aad4f0c14d26cc89ecf26f5..e447d059b471077d6ede8edd7904664cf81ea5d5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 966ce9122a1af22ac5b53d8e2edee499c63a5d0d..6f1c7f83f41e2cd9ec4f4fd16c3bd8bb2a41d924 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -38,7 +38,6 @@ using namespace std;
 //=======================================================================
 SMDS_Mesh0DElement::SMDS_Mesh0DElement (const SMDS_MeshNode * node)
 {
-  MESSAGE("SMDS_Mesh0DElement " << GetID());
   myNode = node;
 }
 
index 2f7898e318ab21c56b866f827a1b6864416188a9..58c26a7ed1ad708dde257a0c567afe349a6359ac 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 04e843490b443886011d2d462a9668a66253fed5..fe15abccad5c57ecdb80f1833c8c6944274aad7a 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 0c160fda3a40e927ca150c48e43f63da5e2a385b..aeae71851cfcb374036884723534c88a994dbcdb 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 37a23197c432da72a0a78a4a801205c80c483baa..c1fa7dacce76044c78755d27ad3268f768781c8c 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3ef92b4debb62113709002c32a6fd72bee1f1e82..2f742a729a938f8c30cb5d87e031b1b57731b6d9 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 708f5c1a8845e2ac32ea5e750182da6c0a9c282c..c78c3bbf591a8f6386fd3d0690b8854cbf78306c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7b1d33dbe419068a739219f862ba2fca17fb3a5c..dc53eaf225841b30d4988b7a33a4e415c52086f6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 92c74259cdc8078742c2e4f4a6daac84084134d5..602fc4620dd300ee557e6a049ef56402f691e3d7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5bb8a1cb354e495cfcbcf66e713fe8cc33d82a51..723f1fd010c07ac9c6fc99bda85562721aa5944c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 50176bf23d2ac85256f1e00c6709fb8943b05363..50513ee368a00e2204c76cda7a388fe183fde7e6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4c8fc4589adb9ade8c3a7072eb763feddb1e8ebb..e276f6cae9aeaa3b42c82966eef6b7e89a720081 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 18f1ae6d17eaf0e7bf7fe5d764ab9a9c775ed66c..ecbf4bed561f5a0357a7d98bed39d2b1c3388898 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e9a0e4cea38711d160848dd60df9d12dd73ce3ea..010a6373e2eb3a841a4137d5a8baa3cb16878caa 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1b8b17ae551dab0420cfc3cf1d1c3b6ad48f5dd1..a32602602eeb37b35cdaee53055f9e70356b206b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 32cda5859b6e483ad69b8f7cba76df312d1dfcd3..34cef85352103a93f31d1c61b3329ce4cd84e94b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 66e96c169a41022501abe2547cb96038c7421640..94a27f7a823ad639a7fe8d69fc3a3375e85f7aee 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 01a11840625771ba30dfa7db289590e15bddf3d7..00d663b1a3a72fd2390192badf634a899bb1c3e6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 07a228b2923959956bd35256bc397489ae09a4bf..d3bf53264c15889bf720ef16b5411b3174824463 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9d79c83ba05252cc0ed2512807c85af3fe5f1b36..7de1ea56ee1fe71fedc10302947c8de6824934f8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 04138868da3945c6f4fb2fccc89faaac26d891f3..5d9693301d0105c62274969d32cc02cfa3f55e2d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f555161b15cbac7bbc5cb08a0e1866e3f0e7e070..de3388a03c1ca538cb0ca726b6a368ac707e0703 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index fc71d69024f5b512cc4b7cb5c7a01fc2b1d70f9b..f9fbaa6f7b241f2d87e6803bba07044157663486 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b262a7730ce515555c66a1d7b933e34e70d2bee6..c20bd9b914d29fc0f8799b4f2d5cbd1ce611e811 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f36cd22749e9013c702eea7a6e73b6e4bb35f2b1..28628079fac61700cad9c587b1ba908cabf8ca5d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 70195271bb2dd9dd772cb4ad8a1f3d23d07bf838..396b709a306623445eca39c0627708a85dab262f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 65121adcdbe78e75c2c933f00a82fa295238bfd4..0bfbaa965a198b6621dc9d95b53a78bf4efc7d0f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -42,6 +42,7 @@ class SMDS_EXPORT SMDS_PolygonalFaceOfNodes:public SMDS_MeshFace
 
   virtual SMDSAbs_ElementType GetType() const;
   virtual SMDSAbs_EntityType  GetEntityType() const { return SMDSEntity_Polygon; }
+  virtual SMDSAbs_GeometryType GetGeomType()  const { return SMDSGeom_POLYGON; }
   virtual bool IsPoly() const { return true; };
 
   bool ChangeNodes (std::vector<const SMDS_MeshNode *> nodes);
index 380af849940da2191d0d2622ea7c3d56f45a74c7..2c497944abe64d26a2231b2c55ee470e4f41e90e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b947e8fefd95a7f263e1e1203d2d1d37d9e148b7..76482e8e605d3f4a744af1b0ee625c9088d0f94d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7167a3801a92d9c1b552bf6731ad94f08dc7beea..3457fd4a9904e94a3dbec5fdc241958fd10243d7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a91b55923d025df8b971eced4969a2d477c01ec9..59adccb4546decf30f586cad3b553fe26394a33f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b0f60c13e1b86f2bb8b17e849992d4e3b65521b0..1d30931e5d5df080b40d326493997983fc5420ef 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index cdabd8f34f72dfe556f6c45e7aa6462393089b38..e55bce6a594aba5e59deb5c33f633a05e55714b0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index de4dbb47427c479675657e4ad0c61dae0a0ddbe2..01c73f57f53032720f8f3f1b178e8971c8e08d37 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e56a3ab992756304e2509e11b33455b35c069dd0..2e9f43c3b0e1445bdd5325a0c8ca625624f42579 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 90134e0d38f63224ecb34366714a7fd53c5351f0..af4389af100b18a8c5732134e4a0c0503b81fb15 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3aac1ae365dc2d8989244af50e6ed5fae00a2d44..9b39579ff79448462373cb2c78e906310e1adc75 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 450b7e15eb8a5578759ad459f5a417e8deae5c4a..70a8a15ff934dd036e8c3cda4fccc5a6092f3840 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 634f4896d7267f5b75de6a45cc538d07003c9dd7..f627b14e04c92f42e47135248b478ddffe2ed585 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 596eb84e4833428dce0f0002e43da82f09c5a073..d04a469872476d6bc57db823274fc405f03bd4f8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1bc506c6ff20380c69fde4b8b2cac127d3170498..2eedb2e7b9df0d996543c5b71b7832c2193de008 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f23a3a007e9545e7a3915eb5c6134b23ee82b42c..f500276d36c92529a4234b0405b2ae6618b15354 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 99d39e4f08bda5a155263da05df9f94f24be8ddf..9d878c655810629fc6535305c1db79730fe19fdf 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 36d3125d6155e668f9b4d6601f5857bf3e936dd1..5063adc21762b29c35f778e92a2fbfe6b3351880 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b2f8e8f5b54d3f5bcfed23e1aaeb64d672ea7cb1..a68f90ea66754ef0b45d440ebc2c6dcc5ee71936 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ca9bca8c7dbc0408c5aa6a18ad807392560e94b8..ef9c51e0418c53f2beaa4022b97f8b4ea5c42b00 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ef1daa3d966ccb2c44d5f2db06b0c95e1eb0285e..83d6f022a64709d6540b64c23b41c0ecadffc825 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b1d9bcef8feddbcb0ffe24da817c226f998aa2f2..7b4047180f35f494451291c7d12ed9e4ad4adeff 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 62bd0ffe0ee466f4f8ff8cdeba641420874c00fe..5aa40e5b0738488eaf47b3949498aa466fa38c79 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index de8c16bc6139f7246805e695d6e8a30e4e104938..80ece59324d9809a1e31a5c22094c63c186752a0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 56e7a31321a8652fa5cab03984cda43ae9ecdb69..0162914e7647d763de5b6bf64ba0e0517f1e6cdc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -132,8 +132,6 @@ static int Penta_nbN [] = { 3, 3, 4, 4, 4 };
 //        /  |       /  |
 //     N4+----------+N7 |
 //       |   |      |   |           HEXAHEDRON
-//       |   |      |   |
-//       |   |      |   |
 //       | N1+------|---+N2
 //       |  /       |  /
 //       | /        | /
@@ -155,6 +153,7 @@ static int Hexa_RE [6][5] = { // REVERSED -> EXTERNAL
   { 3, 7, 6, 2, 3 }, 
   { 0, 4, 7, 3, 0 }};
 static int Hexa_nbN [] = { 4, 4, 4, 4, 4, 4 };
+static int Hexa_oppF[] = { 1, 0, 4, 5, 2, 3 }; // oppopsite facet indices
 
 /*   
 //      N8 +------+ N9
@@ -279,7 +278,7 @@ static int QuadPyram_nbN [] = { 8, 6, 6, 6, 6 };
 */
 static int QuadPenta_F [5][9] = {  // FORWARD
   { 0, 6, 1, 7, 2, 8, 0, 0, 0 },
-  { 3,11, 5, 10,4, 9, 3, 3, 3 },
+  { 3, 11,5, 10,4, 9, 3, 3, 3 },
   { 0, 12,3, 9, 4, 13,1, 6, 0 },
   { 1, 13,4, 10,5, 14,2, 7, 1 },
   { 0, 8, 2, 14,5, 11,3, 12,0 }}; 
@@ -1147,12 +1146,7 @@ int SMDS_VolumeTool::GetOppFaceIndex( int faceIndex ) const
       break;
     case 20:
     case 27:
-      if ( faceIndex <= 1 ) // top or bottom
-        ind = 1 - faceIndex;
-      else {
-        const int nbSideFaces = myAllFacesNbNodes[0] / 2;
-        ind = ( faceIndex - nbHoriFaces + nbSideFaces/2 ) % nbSideFaces + nbHoriFaces;
-      }
+      ind = GetOppFaceIndexOfHex( faceIndex );
       break;
     default:;
     }
@@ -1160,6 +1154,16 @@ int SMDS_VolumeTool::GetOppFaceIndex( int faceIndex ) const
   return ind;
 }
 
+//=======================================================================
+//function : GetOppFaceIndexOfHex
+//purpose  : Return index of the opposite face of the hexahedron
+//=======================================================================
+
+int SMDS_VolumeTool::GetOppFaceIndexOfHex( int faceIndex )
+{
+  return Hexa_oppF[ faceIndex ];
+}
+
 //=======================================================================
 //function : IsLinked
 //purpose  : return true if theNode1 is linked with theNode2
@@ -1660,16 +1664,38 @@ bool SMDS_VolumeTool::IsFreeFaceAdv( int faceIndex, const SMDS_MeshElement** oth
 //purpose  : Return index of a face formed by theFaceNodes
 //=======================================================================
 
-int SMDS_VolumeTool::GetFaceIndex( const set<const SMDS_MeshNode*>& theFaceNodes ) const
+int SMDS_VolumeTool::GetFaceIndex( const set<const SMDS_MeshNode*>& theFaceNodes,
+                                   const int                        theFaceIndexHint ) const
 {
+  if ( theFaceIndexHint >= 0 )
+  {
+    int nbNodes = NbFaceNodes( theFaceIndexHint );
+    if ( nbNodes == (int) theFaceNodes.size() )
+    {
+      const SMDS_MeshNode** nodes = GetFaceNodes( theFaceIndexHint );
+      while ( nbNodes )
+        if ( theFaceNodes.count( nodes[ nbNodes-1 ]))
+          --nbNodes;
+        else
+          break;
+      if ( nbNodes == 0 )
+        return theFaceIndexHint;
+    }
+  }
   for ( int iFace = 0; iFace < myNbFaces; iFace++ )
   {
-    const int nbNodes = NbFaceNodes( iFace );
+    if ( iFace == theFaceIndexHint )
+      continue;
+    int nbNodes = NbFaceNodes( iFace );
     if ( nbNodes == (int) theFaceNodes.size() )
     {
       const SMDS_MeshNode** nodes = GetFaceNodes( iFace );
-      set<const SMDS_MeshNode*> nodeSet( nodes, nodes + nbNodes);
-      if ( theFaceNodes == nodeSet )
+      while ( nbNodes )
+        if ( theFaceNodes.count( nodes[ nbNodes-1 ]))
+          --nbNodes;
+        else
+          break;
+      if ( nbNodes == 0 )
         return iFace;
     }
   }
index bde071fde8cd07a9f40f0d2bb3c37b29825e22b4..69e20860a8996e69681ac49295e1f7dec751d99d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -201,7 +201,8 @@ class SMDS_EXPORT SMDS_VolumeTool
   int GetCenterNodeIndex( int faceIndex ) const;
   // Return index of the node located at face center of a quadratic element like HEX27
 
-  int GetFaceIndex( const std::set<const SMDS_MeshNode*>& theFaceNodes ) const;
+  int GetFaceIndex( const std::set<const SMDS_MeshNode*>& theFaceNodes,
+                    const int                             theFaceIndexHint=-1) const;
   // Return index of a face formed by theFaceNodes.
   // Return -1 if a face not found
 
@@ -238,6 +239,9 @@ class SMDS_EXPORT SMDS_VolumeTool
   static int NbCornerNodes(VolumeType type);
   // Useful to know nb of corner nodes of a quadratic volume
 
+  static int GetOppFaceIndexOfHex( int faceIndex );
+  // Return index of the opposite face of the hexahedron
+
 private:
 
   bool setFace( int faceIndex ) const;
index 26229a4cf885c8cd23cdaee7af08cbc0c0b9c55c..ce511047bf8fc355f08317a9cecc667da386e055 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c9994853cf78edfeb9126490bf54306be0ea80ed..1581785d4e64297a4688b862ed97447cde0f8aa2 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 0bf0330863600b62a4b76afe24dc26481b50b62c..f205cff6da962a6c9f6cec3be66b2403849ed6a7 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3ac9ba0e468af44e08faadfaadd18f75945688f4..8dc2f2af607d3c51d098687d9c3efd02f73f0eab 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3d5e82fee2ebf71788e16dc1d2d088ec9cc140ec..c0bf69cc766d0cde482af656c7624f613cd507ba 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f62b86c0067619ae06d817bd6140d8f7d3151426..e2f136f67bd8f920ab09349ebc39e269ae12e952 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7acdbf37c110daff9dae1c5bdc6632384225e5b2..e78e8d24b4641ce92f16b3f0cf8c67825c2c0d53 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -557,7 +557,6 @@ bool SMDS_VtkVolume::IsMediumNode(const SMDS_MeshNode* node) const
 int SMDS_VtkVolume::NbCornerNodes() const
 {
   vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
-  int            nbN = grid->GetCell(myVtkID)->GetNumberOfPoints();
   vtkIdType aVtkType = grid->GetCellType(myVtkID);
   switch (aVtkType)
   {
@@ -568,7 +567,7 @@ int SMDS_VtkVolume::NbCornerNodes() const
   case VTK_TRIQUADRATIC_HEXAHEDRON: return 8;
   default:;
   }
-  return nbN;
+  return NbNodes();
 }
 
 SMDSAbs_EntityType SMDS_VtkVolume::GetEntityType() const
index 827f17fd75c552c85352fed5a5d1205285e67d64..1378aa3660e2131b8b3b25ee0ee1dcdf80776798 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 57d9780f4a404e1febcb23754cc353aae2daa291..5f5afd1fd8fd02e963a648decb75cb97fbcfa445 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c67c23bfbd80cdd3c7eb0a70a341fe8a683c8e1c..0fae4a48d26862d8c95c4b36812fbc36370630de 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c7b1f683794c774ecb6c43de2013330d251bf311..ec417b0c8d0bec7271fd69ebf08d4273bbe3486d 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2cbbe7267b60cba9173be928aa2b4d022c1f1e1f..17e8d7b9cac767d0c5656190cfaa3c5fa6e945ae 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 19a1e4b0916dee1a2e9fb8b251008e6287959381..8f071e7838dca925a575c8739e0986300fc63547 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -410,7 +410,7 @@ bool SMESH_Algo::GetSortedNodesOnEdge(const SMESHDS_Mesh*                   theM
     return false;
 
   SMESHDS_SubMesh * eSubMesh = theMesh->MeshElements( theEdge );
-  if ( !eSubMesh || !eSubMesh->GetElements()->more() )
+  if ( !eSubMesh || ( eSubMesh->NbElements()==0 && eSubMesh->NbNodes() == 0))
     return false; // edge is not meshed
 
   int nbNodes = 0;
index f2c166605d16832265d219106bd37b96c2a90793..8aeaf7bb67636f791f51f7a2ac0ab62f5aef2aeb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c5addaf0ed7c80e89d7eede2cad378b559ecd4c9..c8ba34bc33dc1d07aa213dab65459e05aeb88408 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 53610552bc34a49ee06d4282b7f4cd50b0bfa2d8..5462eacab103d169f65f131890a996a258b58df7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 36f42b93ee7a1bd1cda3489a15800652fdcca251..95507248676b4a675428d3907a6d0e566d8fc383 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index fcb7f52c66a4dc93b31bc83a8ed00504366988f4..78564230e3c060aa867468bc4584e652dea5b09f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ceb7c6fb29f9f440f9518ad6f2bf7d9efb9afa91..e19fd11a6b4da5a8c443b373c48fb664947b697c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 13cb407538eba707a7bd3087802ba971f0b84458..6ac97e62ddb355f0c7ea2148c27955ba3cfcce6c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index bf1f73ae0616c21067ee1d8a45a7879b3f4ba160..f6bfaf7a6a32a3dd843e8a091d04ac865118872f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index bcc180370df5eb458ce1b6021694427399d128ca..215f11471d577b845b736de8359c9f450b2e4e60 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4c1383356d4adc41e1f8e0f56bd34e251d8fa287..b3cf4dfda3677f04b029546ba3874aa1095e5d98 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #include "SMESH_TryCatch.hxx" // include after OCCT headers!
 
 #include "Utils_ExceptHandlers.hxx"
-
+#ifndef WIN32
 #include <boost/thread/thread.hpp>
 #include <boost/bind.hpp>
+#else 
+#include <pthread.h> 
+#endif
 
 using namespace std;
 
@@ -139,16 +142,28 @@ SMESH_Mesh::SMESH_Mesh():
 
 namespace
 {
+#ifndef WIN32
   void deleteMeshDS(SMESHDS_Mesh* meshDS)
   {
     //cout << "deleteMeshDS( " << meshDS << endl;
     delete meshDS;
   }
+#else
+  static void* deleteMeshDS(void* meshDS)
+  {
+    //cout << "deleteMeshDS( " << meshDS << endl;
+    SMESHDS_Mesh* m = (SMESHDS_Mesh*)meshDS;
+    if(m) {
+      delete m;
+    }
+    return 0;
+  }
+#endif
 }
 
 //=============================================================================
 /*!
- * 
+ *
  */
 //=============================================================================
 
@@ -191,9 +206,15 @@ SMESH_Mesh::~SMESH_Mesh()
     _myDocument->RemoveMesh( _id );
   _myDocument = 0;
 
-  if ( _myMeshDS )
+  if ( _myMeshDS ) {
     // delete _myMeshDS, in a thread in order not to block closing a study with large meshes
+#ifndef WIN32
     boost::thread aThread(boost::bind( & deleteMeshDS, _myMeshDS ));
+#else
+    pthread_t thread;
+    int result=pthread_create(&thread, NULL, deleteMeshDS, (void*)_myMeshDS);
+#endif
+  }
 }
 
 //================================================================================
@@ -1247,6 +1268,19 @@ bool SMESH_Mesh::HasDuplicatedGroupNamesMED()
 //================================================================================
 /*!
  * \brief Export the mesh to a med file
+ *  \param [in] file - name of the MED file
+ *  \param [in] theMeshName - name of this mesh
+ *  \param [in] theAutoGroups - boolean parameter for creating/not creating
+ *              the groups Group_On_All_Nodes, Group_On_All_Faces, ... ;
+ *              the typical use is auto_groups=false.
+ *  \param [in] theVersion - defines the version of format of MED file, that will be created
+ *  \param [in] meshPart - mesh data to export
+ *  \param [in] theAutoDimension - if \c true, a space dimension of a MED mesh can be either
+     *         - 1D if all mesh nodes lie on OX coordinate axis, or
+     *         - 2D if all mesh nodes lie on XOY coordinate plane, or
+     *         - 3D in the rest cases.
+     *         If \a theAutoDimension is \c false, the space dimension is always 3.
+ *  \return int - mesh index in the file
  */
 //================================================================================
 
@@ -1255,7 +1289,8 @@ void SMESH_Mesh::ExportMED(const char *        file,
                            bool                theAutoGroups,
                            int                 theVersion,
                            const SMESHDS_Mesh* meshPart,
-                           bool                theAutoDimension)
+                           bool                theAutoDimension,
+                           bool                theAddODOnVertices)
   throw(SALOME_Exception)
 {
   SMESH_TRY;
@@ -1264,6 +1299,7 @@ void SMESH_Mesh::ExportMED(const char *        file,
   myWriter.SetFile         ( file, MED::EVersion(theVersion) );
   myWriter.SetMesh         ( meshPart ? (SMESHDS_Mesh*) meshPart : _myMeshDS   );
   myWriter.SetAutoDimension( theAutoDimension );
+  myWriter.AddODOnVertices ( theAddODOnVertices );
   if ( !theMeshName ) 
     myWriter.SetMeshId     ( _id         );
   else {
index c34802c1d9b41ae54f66c36982b68e70d7dbb51e..19818878e248be311e0806510d47e17caba43ccd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -236,7 +236,8 @@ public:
                  bool                theAutoGroups = true, 
                  int                 theVersion = 0,
                  const SMESHDS_Mesh* theMeshPart = 0,
-                 bool                theAutoDimension = false)
+                 bool                theAutoDimension = false,
+                 bool                theAddODOnVertices = false)
     throw(SALOME_Exception);
 
   void ExportDAT(const char *        file,
index 842b177507e10c3f190e4a1d626a26ca6c4a1bff..931caa43414d2a0aea00e1bffb4e2a288bf62963 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1603,44 +1603,110 @@ namespace
   const int* thePentaTo3[6] = { thePentaTo3_1, thePentaTo3_2, thePentaTo3_3,
                                 thePentaTo3_4, thePentaTo3_5, thePentaTo3_6 };
 
+  // Methods of splitting hexahedron into prisms
+
+  const int theHexTo4Prisms_BT[6*4+1] = // bottom-top
+    {
+      0, 1, 8, 4, 5, 9,    1, 2, 8, 5, 6, 9,    2, 3, 8, 6, 7, 9,   3, 0, 8, 7, 4, 9,    -1
+    };
+  const int theHexTo4Prisms_LR[6*4+1] = // left-right
+    {
+      1, 0, 8, 2, 3, 9,    0, 4, 8, 3, 7, 9,    4, 5, 8, 7, 6, 9,   5, 1, 8, 6, 2, 9,    -1
+    };
+  const int theHexTo4Prisms_FB[6*4+1] = // front-back
+    {
+      0, 3, 8, 1, 2, 9,    3, 7, 8, 2, 6, 9,    7, 4, 8, 6, 5, 9,   4, 0, 8, 5, 1, 9,    -1
+    };
+
+  const int theHexTo2Prisms_BT_1[6*2+1] =
+    {
+      0, 1, 3, 4, 5, 7,    1, 2, 3, 5, 6, 7,   -1
+    };
+  const int theHexTo2Prisms_BT_2[6*2+1] =
+    {
+      0, 1, 2, 4, 5, 6,    0, 2, 3, 4, 6, 7,   -1
+    };
+  const int* theHexTo2Prisms_BT[2] = { theHexTo2Prisms_BT_1, theHexTo2Prisms_BT_2 };
+
+  const int theHexTo2Prisms_LR_1[6*2+1] =
+    {
+      1, 0, 4, 2, 3, 7,    1, 4, 5, 2, 7, 6,   -1
+    };
+  const int theHexTo2Prisms_LR_2[6*2+1] =
+    {
+      1, 0, 4, 2, 3, 7,    1, 4, 5, 2, 7, 6,   -1
+    };
+  const int* theHexTo2Prisms_LR[2] = { theHexTo2Prisms_LR_1, theHexTo2Prisms_LR_2 };
+
+  const int theHexTo2Prisms_FB_1[6*2+1] =
+    {
+      0, 3, 4, 1, 2, 5,    3, 7, 4, 2, 6, 5,   -1
+    };
+  const int theHexTo2Prisms_FB_2[6*2+1] =
+    {
+      0, 3, 7, 1, 2, 7,    0, 7, 4, 1, 6, 5,   -1
+    };
+  const int* theHexTo2Prisms_FB[2] = { theHexTo2Prisms_FB_1, theHexTo2Prisms_FB_2 };
+
+
   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;
+    bool hasAdjacentVol( const SMDS_MeshElement*    elem,
+                         const SMDSAbs_GeometryType geom = SMDSGeom_TETRA) const;
   };
   struct TSplitMethod
   {
-    int        _nbTetra;
+    int        _nbSplits;
+    int        _nbCorners;
     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
     map<int, const SMDS_MeshNode*> _faceBaryNode; //!< map face index to node at BC of face
 
     TSplitMethod( int nbTet=0, const int* conn=0, bool addNode=false)
-      : _nbTetra(nbTet), _connectivity(conn), _baryNode(addNode), _ownConn(false) {}
+      : _nbSplits(nbTet), _nbCorners(4), _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;
+      if ( _nbCorners == 4 )
+      {
+        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;
+      }
+      else // prism, _nbCorners == 6
+      {
+        const int* prismConn = _connectivity;
+        for ( ; prismConn[0] >= 0; prismConn += 6 )
+        {
+          if (( facet.contains( prismConn[0] ) &&
+                facet.contains( prismConn[1] ) &&
+                facet.contains( prismConn[2] ))
+              ||
+              ( facet.contains( prismConn[3] ) &&
+                facet.contains( prismConn[4] ) &&
+                facet.contains( prismConn[5] )))
+            return true;
+        }
+      }
       return false;
     }
   };
 
   //=======================================================================
   /*!
-   * \brief return TSplitMethod for the given element
+   * \brief return TSplitMethod for the given element to split into tetrahedra
    */
   //=======================================================================
 
-  TSplitMethod getSplitMethod( SMDS_VolumeTool& vol, const int theMethodFlags)
+  TSplitMethod getTetraSplitMethod( SMDS_VolumeTool& vol, const int theMethodFlags)
   {
     const int iQ = vol.Element()->IsQuadratic() ? 2 : 1;
 
@@ -1665,8 +1731,8 @@ namespace
       {
         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 );
+        if      ( t012.hasAdjacentVol( vol.Element() )) triaSplits.push_back( t012 );
+        else if ( t123.hasAdjacentVol( vol.Element() )) triaSplits.push_back( t123 );
       }
       else
       {
@@ -1679,7 +1745,7 @@ namespace
           TTriangleFacet t023( nInd[ iQ * ( iCom             )],
                                nInd[ iQ * ( (iCom+2)%nbNodes )],
                                nInd[ iQ * ( (iCom+3)%nbNodes )]);
-          if ( t012.hasAdjacentTetra( vol.Element() ) && t023.hasAdjacentTetra( vol.Element() ))
+          if ( t012.hasAdjacentVol( vol.Element() ) && t023.hasAdjacentVol( vol.Element() ))
           {
             triaSplits.push_back( t012 );
             triaSplits.push_back( t023 );
@@ -1719,12 +1785,12 @@ namespace
       default:
         nbVariants = 0;
       }
-      for ( int variant = 0; variant < nbVariants && method._nbTetra == 0; ++variant )
+      for ( int variant = 0; variant < nbVariants && method._nbSplits == 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 )
+        if ( hasAdjacentSplits && method._nbSplits > 0 )
         {
           bool facetCreated = true;
           for ( int iF = 0; facetCreated && iF < triaSplitsByFace.size(); ++iF )
@@ -1738,7 +1804,7 @@ namespace
         }
       }
     }
-    if ( method._nbTetra < 1 )
+    if ( method._nbSplits < 1 )
     {
       // No standard method is applicable, use a generic solution:
       // each facet of a volume is split into triangles and
@@ -1832,7 +1898,7 @@ namespace
             connectivity[ connSize++ ] = baryCenInd;
           }
         }
-        method._nbTetra += nbTet;
+        method._nbSplits += nbTet;
 
       } // loop on volume faces
 
@@ -1842,13 +1908,132 @@ namespace
 
     return method;
   }
+  //=======================================================================
+  /*!
+   * \brief return TSplitMethod to split haxhedron into prisms
+   */
+  //=======================================================================
+
+  TSplitMethod getPrismSplitMethod( SMDS_VolumeTool& vol,
+                                    const int        methodFlags,
+                                    const int        facetToSplit)
+  {
+    // order of facets in HEX according to SMDS_VolumeTool::Hexa_F :
+    // B, T, L, B, R, F
+    const int iF = ( facetToSplit < 2 ) ? 0 : 1 + ( facetToSplit-2 ) % 2; // [0,1,2]
+
+    if ( methodFlags == SMESH_MeshEditor::HEXA_TO_4_PRISMS )
+    {
+      static TSplitMethod to4methods[4]; // order BT, LR, FB
+      if ( to4methods[iF]._nbSplits == 0 )
+      {
+        switch ( iF ) {
+        case 0:
+          to4methods[iF]._connectivity = theHexTo4Prisms_BT;
+          to4methods[iF]._faceBaryNode[ 0 ] = 0;
+          to4methods[iF]._faceBaryNode[ 1 ] = 0;
+          break;
+        case 1:
+          to4methods[iF]._connectivity = theHexTo4Prisms_LR;
+          to4methods[iF]._faceBaryNode[ 2 ] = 0;
+          to4methods[iF]._faceBaryNode[ 4 ] = 0;
+          break;
+        case 2:
+          to4methods[iF]._connectivity = theHexTo4Prisms_FB;
+          to4methods[iF]._faceBaryNode[ 3 ] = 0;
+          to4methods[iF]._faceBaryNode[ 5 ] = 0;
+          break;
+        default: return to4methods[3];
+        }
+        to4methods[iF]._nbSplits  = 4;
+        to4methods[iF]._nbCorners = 6;
+      }
+      return to4methods[iF];
+    }
+    // else if ( methodFlags == HEXA_TO_2_PRISMS )
+
+    TSplitMethod method;
+
+    const int iQ = vol.Element()->IsQuadratic() ? 2 : 1;
+
+    const int nbVariants = 2, nbSplits = 2;
+    const int** connVariants = 0;
+    switch ( iF ) {
+    case 0: connVariants = theHexTo2Prisms_BT; break;
+    case 1: connVariants = theHexTo2Prisms_LR; break;
+    case 2: connVariants = theHexTo2Prisms_FB; break;
+    default: return method;
+    }
+
+    // look for prisms adjacent via facetToSplit and an opposite one
+    for ( int is2nd = 0; is2nd < 2; ++is2nd )
+    {
+      int iFacet = is2nd ? vol.GetOppFaceIndexOfHex( facetToSplit ) : facetToSplit;
+      int nbNodes = vol.NbFaceNodes( iFacet ) / iQ;
+      if ( nbNodes != 4 ) return method;
+
+      const int* nInd = vol.GetFaceNodesIndices( iFacet );
+      TTriangleFacet t012( nInd[0*iQ], nInd[1*iQ], nInd[2*iQ] );
+      TTriangleFacet t123( nInd[1*iQ], nInd[2*iQ], nInd[3*iQ] );
+      TTriangleFacet* t;
+      if      ( t012.hasAdjacentVol( vol.Element(), SMDSGeom_PENTA ))
+        t = &t012;
+      else if ( t123.hasAdjacentVol( vol.Element(), SMDSGeom_PENTA ))
+        t = &t123;
+      else
+        continue;
+
+      // there are adjacent prism
+      for ( int variant = 0; variant < nbVariants; ++variant )
+      {
+        // check method compliancy with adjacent prisms,
+        // the found prism facets must be among facets of prisms described by current method
+        method._nbSplits     = nbSplits;
+        method._nbCorners    = 6;
+        method._connectivity = connVariants[ variant ];
+        if ( method.hasFacet( *t ))
+          return method;
+      }
+    }
+
+    // No adjacent prisms. Select a variant with a best aspect ratio.
+
+    double badness[2] = { 0, 0 };
+    static SMESH::Controls::NumericalFunctorPtr aspectRatio( new SMESH::Controls::AspectRatio);
+    const SMDS_MeshNode** nodes = vol.GetNodes();
+    for ( int variant = 0; variant < nbVariants; ++variant )
+      for ( int is2nd = 0; is2nd < 2; ++is2nd )
+      {
+        int iFacet = is2nd ? vol.GetOppFaceIndexOfHex( facetToSplit ) : facetToSplit;
+        const int*             nInd = vol.GetFaceNodesIndices( iFacet );
+
+        method._connectivity = connVariants[ variant ];
+        TTriangleFacet t012( nInd[0*iQ], nInd[1*iQ], nInd[2*iQ] );
+        TTriangleFacet t123( nInd[1*iQ], nInd[2*iQ], nInd[3*iQ] );
+        TTriangleFacet* t = ( method.hasFacet( t012 )) ? & t012 : & t123;
+
+        SMDS_FaceOfNodes tria ( nodes[ t->_n1 ],
+                                nodes[ t->_n2 ],
+                                nodes[ t->_n3 ] );
+        badness[ variant ] += getBadRate( &tria, aspectRatio );
+      }
+    const int iBetter = ( badness[1] < badness[0] && badness[0]-badness[1] > 0.1 * badness[0] );
+
+    method._nbSplits     = nbSplits;
+    method._nbCorners    = 6;
+    method._connectivity = connVariants[ iBetter ];
+
+    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
+  bool TTriangleFacet::hasAdjacentVol( const SMDS_MeshElement*    elem,
+                                       const SMDSAbs_GeometryType geom ) const
   {
     // find the tetrahedron including the three nodes of facet
     const SMDS_MeshNode* n1 = elem->GetNode(_n1);
@@ -1858,16 +2043,16 @@ namespace
     while ( volIt1->more() )
     {
       const SMDS_MeshElement* v = volIt1->next();
-      SMDSAbs_EntityType type = v->GetEntityType();
-      if ( type != SMDSEntity_Tetra && type != SMDSEntity_Quad_Tetra )
+      if ( v->GetGeomType() != geom )
         continue;
-      if ( type == SMDSEntity_Quad_Tetra && v->GetNodeIndex( n1 ) > 3 )
+      const int lastCornerInd = v->NbCornerNodes() - 1;
+      if ( v->IsQuadratic() && v->GetNodeIndex( n1 ) > lastCornerInd )
         continue; // medium node not allowed
       const int ind2 = v->GetNodeIndex( n2 );
-      if ( ind2 < 0 || 3 < ind2 )
+      if ( ind2 < 0 || lastCornerInd < ind2 )
         continue;
       const int ind3 = v->GetNodeIndex( n3 );
-      if ( ind3 < 0 || 3 < ind3 )
+      if ( ind3 < 0 || lastCornerInd < ind3 )
         continue;
       return true;
     }
@@ -1900,19 +2085,23 @@ namespace
 } // namespace
 
 //=======================================================================
-//function : SplitVolumesIntoTetra
-//purpose  : Split volume elements into tetrahedra.
+//function : SplitVolumes
+//purpose  : Split volume elements into tetrahedra or prisms.
+//           If facet ID < 0, element is split into tetrahedra,
+//           else a hexahedron is split into prisms so that the given facet is
+//           split into triangles
 //=======================================================================
 
-void SMESH_MeshEditor::SplitVolumesIntoTetra (const TIDSortedElemSet & theElems,
-                                              const int                theMethodFlags)
+void SMESH_MeshEditor::SplitVolumes (const TFacetOfElem & theElems,
+                                     const int            theMethodFlags)
 {
   // std-like iterator on coordinates of nodes of mesh element
   typedef SMDS_StdIterator< SMESH_TNodeXYZ, SMDS_ElemIteratorPtr > NXyzIterator;
   NXyzIterator xyzEnd;
 
   SMDS_VolumeTool    volTool;
-  SMESH_MesherHelper helper( *GetMesh());
+  SMESH_MesherHelper helper( *GetMesh()), fHelper(*GetMesh());
+  fHelper.ToFixNodeParameters( true );
 
   SMESHDS_SubMesh* subMesh = 0;//GetMeshDS()->MeshElements(1);
   SMESHDS_SubMesh* fSubMesh = 0;//subMesh;
@@ -1923,29 +2112,33 @@ void SMESH_MeshEditor::SplitVolumesIntoTetra (const TIDSortedElemSet & theElems,
   map< TVolumeFaceKey, const SMDS_MeshNode* > volFace2BaryNode;
   double bc[3];
 
-  TIDSortedElemSet::const_iterator elem = theElems.begin();
-  for ( ; elem != theElems.end(); ++elem )
+  TFacetOfElem::const_iterator elem2facet = theElems.begin();
+  for ( ; elem2facet != theElems.end(); ++elem2facet )
   {
-    if ( (*elem)->GetType() != SMDSAbs_Volume )
+    const SMDS_MeshElement* elem = elem2facet->first;
+    const int       facetToSplit = elem2facet->second;
+    if ( elem->GetType() != SMDSAbs_Volume )
       continue;
-    SMDSAbs_EntityType geomType = (*elem)->GetEntityType();
+    const SMDSAbs_EntityType geomType = elem->GetEntityType();
     if ( geomType == SMDSEntity_Tetra || geomType == SMDSEntity_Quad_Tetra )
       continue;
 
-    if ( !volTool.Set( *elem, /*ignoreCentralNodes=*/false )) continue; // strange...
+    if ( !volTool.Set( elem, /*ignoreCentralNodes=*/false )) continue; // strange...
 
-    TSplitMethod splitMethod = getSplitMethod( volTool, theMethodFlags );
-    if ( splitMethod._nbTetra < 1 ) continue;
+    TSplitMethod splitMethod = ( facetToSplit < 0  ?
+                                 getTetraSplitMethod( volTool, theMethodFlags ) :
+                                 getPrismSplitMethod( volTool, theMethodFlags, facetToSplit ));
+    if ( splitMethod._nbSplits < 1 ) continue;
 
     // find submesh to add new tetras to
-    if ( !subMesh || !subMesh->Contains( *elem ))
+    if ( !subMesh || !subMesh->Contains( elem ))
     {
-      int shapeID = FindShape( *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() )
+    if ( elem->IsQuadratic() )
     {
       iQ = 2;
       // add quadratic links to the helper
@@ -1963,7 +2156,8 @@ void SMESH_MeshEditor::SplitVolumesIntoTetra (const TIDSortedElemSet & theElems,
       iQ = 1;
       helper.SetIsQuadratic( false );
     }
-    vector<const SMDS_MeshNode*> nodes( (*elem)->begin_nodes(), (*elem)->end_nodes() );
+    vector<const SMDS_MeshNode*> nodes( volTool.GetNodes(),
+                                        volTool.GetNodes() + elem->NbNodes() );
     helper.SetElementsOnShape( true );
     if ( splitMethod._baryNode )
     {
@@ -1991,16 +2185,25 @@ void SMESH_MeshEditor::SplitVolumesIntoTetra (const TIDSortedElemSet & theElems,
       }
     }
 
-    // make tetras
-    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] ]));
+    // make new volumes
+    vector<const SMDS_MeshElement* > splitVols( splitMethod._nbSplits ); // splits of a volume
+    const int* volConn = splitMethod._connectivity;
+    if ( splitMethod._nbCorners == 4 ) // tetra
+      for ( int i = 0; i < splitMethod._nbSplits; ++i, volConn += splitMethod._nbCorners )
+        newElems.Append( splitVols[ i ] = helper.AddVolume( nodes[ volConn[0] ],
+                                                            nodes[ volConn[1] ],
+                                                            nodes[ volConn[2] ],
+                                                            nodes[ volConn[3] ]));
+    else // prisms
+      for ( int i = 0; i < splitMethod._nbSplits; ++i, volConn += splitMethod._nbCorners )
+        newElems.Append( splitVols[ i ] = helper.AddVolume( nodes[ volConn[0] ],
+                                                            nodes[ volConn[1] ],
+                                                            nodes[ volConn[2] ],
+                                                            nodes[ volConn[3] ],
+                                                            nodes[ volConn[4] ],
+                                                            nodes[ volConn[5] ]));
 
-    ReplaceElemInGroups( *elem, tetras, GetMeshDS() );
+    ReplaceElemInGroups( elem, splitVols, GetMeshDS() );
 
     // Split faces on sides of the split volume
 
@@ -2029,17 +2232,37 @@ void SMESH_MeshEditor::SplitVolumesIntoTetra (const TIDSortedElemSet & theElems,
         map<int, const SMDS_MeshNode*>::iterator iF_n = splitMethod._faceBaryNode.find(iF);
         if ( iF_n != splitMethod._faceBaryNode.end() )
         {
+          const SMDS_MeshNode *baryNode = iF_n->second;
           for ( int iN = 0; iN < nbNodes*iQ; iN += iQ )
           {
             const SMDS_MeshNode* n1 = fNodes[iN];
             const SMDS_MeshNode *n2 = fNodes[(iN+iQ)%(nbNodes*iQ)];
-            const SMDS_MeshNode *n3 = iF_n->second;
+            const SMDS_MeshNode *n3 = baryNode;
             if ( !volTool.IsFaceExternal( iF ))
               swap( n2, n3 );
             triangles.push_back( helper.AddFace( n1,n2,n3 ));
-
-            if ( fSubMesh && n3->getshapeId() < 1 )
-              fSubMesh->AddNode( n3 );
+          }
+          if ( fSubMesh ) // update position of the bary node on geometry
+          {
+            if ( subMesh )
+              subMesh->RemoveNode( baryNode, false );
+            GetMeshDS()->SetNodeOnFace( baryNode, fSubMesh->GetID() );
+            const TopoDS_Shape& s = GetMeshDS()->IndexToShape( fSubMesh->GetID() );
+            if ( !s.IsNull() && s.ShapeType() == TopAbs_FACE )
+            {
+              fHelper.SetSubShape( s );
+              gp_XY uv( 1e100, 1e100 );
+              double distXYZ[4];
+              if ( !fHelper.CheckNodeUV( TopoDS::Face( s ), baryNode,
+                                        uv, /*tol=*/1e-7, /*force=*/true, distXYZ ) &&
+                   uv.X() < 1e100 )
+              {
+                // node is too far from the surface
+                GetMeshDS()->MoveNode( baryNode, distXYZ[1], distXYZ[2], distXYZ[3] );
+                const_cast<SMDS_MeshNode*>( baryNode )->SetPosition
+                  ( SMDS_PositionPtr( new SMDS_FacePosition( uv.X(), uv.Y() )));
+              }
+            }
           }
         }
         else
@@ -2069,6 +2292,8 @@ void SMESH_MeshEditor::SplitVolumesIntoTetra (const TIDSortedElemSet & theElems,
             }
           }
           list< TTriangleFacet >::iterator facet = facets.begin();
+          if ( facet == facets.end() )
+            break;
           for ( ; facet != facets.end(); ++facet )
           {
             if ( !volTool.IsFaceExternal( iF ))
@@ -2087,11 +2312,11 @@ void SMESH_MeshEditor::SplitVolumesIntoTetra (const TIDSortedElemSet & theElems,
         }
         ReplaceElemInGroups( face, triangles, GetMeshDS() );
         GetMeshDS()->RemoveFreeElement( face, fSubMesh, /*fromGroups=*/false );
-      }
 
+      } // while a face based on facet nodes exists
     } // loop on volume faces to split them into triangles
 
-    GetMeshDS()->RemoveFreeElement( *elem, subMesh, /*fromGroups=*/false );
+    GetMeshDS()->RemoveFreeElement( elem, subMesh, /*fromGroups=*/false );
 
     if ( geomType == SMDSEntity_TriQuad_Hexa )
     {
@@ -2106,6 +2331,198 @@ void SMESH_MeshEditor::SplitVolumesIntoTetra (const TIDSortedElemSet & theElems,
   myLastCreatedElems = newElems;
 }
 
+//=======================================================================
+//function : GetHexaFacetsToSplit
+//purpose  : For hexahedra that will be split into prisms, finds facets to
+//           split into triangles. Only hexahedra adjacent to the one closest
+//           to theFacetNormal.Location() are returned.
+//param [in,out] theHexas - the hexahedra
+//param [in]     theFacetNormal - facet normal
+//param [out]    theFacets - the hexahedra and found facet IDs
+//=======================================================================
+
+void SMESH_MeshEditor::GetHexaFacetsToSplit( TIDSortedElemSet& theHexas,
+                                             const gp_Ax1&     theFacetNormal,
+                                             TFacetOfElem &    theFacets)
+{
+  #define THIS_METHOD "SMESH_MeshEditor::GetHexaFacetsToSplit(): "
+
+  // Find a hexa closest to the location of theFacetNormal
+
+  const SMDS_MeshElement* startHex;
+  {
+    // get SMDS_ElemIteratorPtr on theHexas
+    typedef const SMDS_MeshElement*                                      TValue;
+    typedef TIDSortedElemSet::iterator                                   TSetIterator;
+    typedef SMDS::SimpleAccessor<TValue,TSetIterator>                    TAccesor;
+    typedef SMDS_MeshElement::GeomFilter                                 TFilter;
+    typedef SMDS_SetIterator < TValue, TSetIterator, TAccesor, TFilter > TElemSetIter;
+    SMDS_ElemIteratorPtr elemIt = SMDS_ElemIteratorPtr
+      ( new TElemSetIter( theHexas.begin(),
+                          theHexas.end(),
+                          SMDS_MeshElement::GeomFilter( SMDSGeom_HEXA )));
+
+    SMESH_ElementSearcher* searcher =
+      SMESH_MeshAlgos::GetElementSearcher( *myMesh->GetMeshDS(), elemIt );
+
+    startHex = searcher->FindClosestTo( theFacetNormal.Location(), SMDSAbs_Volume );
+
+    delete searcher;
+
+    if ( !startHex )
+      throw SALOME_Exception( THIS_METHOD "startHex not found");
+  }
+
+  // Select a facet of startHex by theFacetNormal
+
+  SMDS_VolumeTool vTool( startHex );
+  double norm[3], dot, maxDot = 0;
+  int facetID = -1;
+  for ( int iF = 0; iF < vTool.NbFaces(); ++iF )
+    if ( vTool.GetFaceNormal( iF, norm[0], norm[1], norm[2] ))
+    {
+      dot = Abs( theFacetNormal.Direction().Dot( gp_Dir( norm[0], norm[1], norm[2] )));
+      if ( dot > maxDot )
+      {
+        facetID = iF;
+        maxDot = dot;
+      }
+    }
+  if ( facetID < 0 )
+    throw SALOME_Exception( THIS_METHOD "facet of startHex not found");
+
+  // Fill theFacets starting from facetID of startHex
+
+  // facets used for seach of volumes adjacent to already treated ones
+  typedef pair< TFacetOfElem::iterator, int > TElemFacets;
+  typedef map< TVolumeFaceKey, TElemFacets  > TFacetMap;
+  TFacetMap facetsToCheck;
+
+  set<const SMDS_MeshNode*> facetNodes;
+  const SMDS_MeshElement*   curHex;
+
+  const bool allHex = ( theHexas.size() == myMesh->NbHexas() );
+
+  while ( startHex )
+  {
+    // move in two directions from startHex via facetID
+    for ( int is2nd = 0; is2nd < 2; ++is2nd )
+    {
+      curHex       = startHex;
+      int curFacet = facetID;
+      if ( is2nd ) // do not treat startHex twice
+      {
+        vTool.Set( curHex );
+        if ( vTool.IsFreeFace( curFacet, &curHex ))
+        {
+          curHex = 0;
+        }
+        else
+        {
+          vTool.GetFaceNodes( curFacet, facetNodes );
+          vTool.Set( curHex );
+          curFacet = vTool.GetFaceIndex( facetNodes );
+        }
+      }
+      while ( curHex )
+      {
+        // store a facet to split
+        if ( curHex->GetGeomType() != SMDSGeom_HEXA )
+        {
+          theFacets.insert( make_pair( curHex, -1 ));
+          break;
+        }
+        if ( !allHex && !theHexas.count( curHex ))
+          break;
+
+        pair< TFacetOfElem::iterator, bool > facetIt2isNew =
+          theFacets.insert( make_pair( curHex, curFacet ));
+        if ( !facetIt2isNew.second )
+          break;
+
+        // remember not-to-split facets in facetsToCheck
+        int oppFacet = vTool.GetOppFaceIndexOfHex( curFacet );
+        for ( int iF = 0; iF < vTool.NbFaces(); ++iF )
+        {
+          if ( iF == curFacet && iF == oppFacet )
+            continue;
+          TVolumeFaceKey facetKey ( vTool, iF );
+          TElemFacets    elemFacet( facetIt2isNew.first, iF );
+          pair< TFacetMap::iterator, bool > it2isnew =
+            facetsToCheck.insert( make_pair( facetKey, elemFacet ));
+          if ( !it2isnew.second )
+            facetsToCheck.erase( it2isnew.first ); // adjacent hex already checked
+        }
+        // pass to a volume adjacent via oppFacet
+        if ( vTool.IsFreeFace( oppFacet, &curHex ))
+        {
+          curHex = 0;
+        }
+        else
+        {
+          // get a new curFacet
+          vTool.GetFaceNodes( oppFacet, facetNodes );
+          vTool.Set( curHex );
+          curFacet = vTool.GetFaceIndex( facetNodes, /*hint=*/curFacet );
+        }
+      }
+    } // move in two directions from startHex via facetID
+
+    // Find a new startHex by facetsToCheck
+
+    startHex = 0;
+    facetID  = -1;
+    TFacetMap::iterator fIt = facetsToCheck.begin();
+    while ( !startHex && fIt != facetsToCheck.end() )
+    {
+      const TElemFacets&  elemFacets = fIt->second;
+      const SMDS_MeshElement*    hex = elemFacets.first->first;
+      int                 splitFacet = elemFacets.first->second;
+      int               lateralFacet = elemFacets.second;
+      facetsToCheck.erase( fIt );
+      fIt = facetsToCheck.begin();
+
+      vTool.Set( hex );
+      if ( vTool.IsFreeFace( lateralFacet, &curHex ) || 
+           curHex->GetGeomType() != SMDSGeom_HEXA )
+        continue;
+      if ( !allHex && !theHexas.count( curHex ))
+        continue;
+
+      startHex = curHex;
+
+      // find a facet of startHex to split 
+
+      set<const SMDS_MeshNode*> lateralNodes;
+      vTool.GetFaceNodes( lateralFacet, lateralNodes );
+      vTool.GetFaceNodes( splitFacet,   facetNodes );
+      int oppLateralFacet = vTool.GetOppFaceIndexOfHex( lateralFacet );
+      vTool.Set( startHex );
+      lateralFacet = vTool.GetFaceIndex( lateralNodes, oppLateralFacet );
+
+      // look for a facet of startHex having common nodes with facetNodes
+      // but not lateralFacet
+      for ( int iF = 0; iF < vTool.NbFaces(); ++iF )
+      {
+        if ( iF == lateralFacet )
+          continue;
+        int nbCommonNodes = 0;
+        const SMDS_MeshNode** nn = vTool.GetFaceNodes( iF );
+        for ( int iN = 0, nbN = vTool.NbFaceNodes( iF ); iN < nbN; ++iN )
+          nbCommonNodes += facetNodes.count( nn[ iN ]);
+
+        if ( nbCommonNodes >= 2 )
+        {
+          facetID = iF;
+          break;
+        }
+      }
+      if ( facetID < 0 )
+        throw SALOME_Exception( THIS_METHOD "facet of a new startHex not found");
+    }
+  } //   while ( startHex )
+}
+
 //=======================================================================
 //function : AddToSameGroups
 //purpose  : add elemToAdd to the groups the elemInGroups belongs to
@@ -10146,7 +10563,12 @@ double SMESH_MeshEditor::OrientedAngle(const gp_Pnt& p0, const gp_Pnt& p1, const
   gp_Vec v2(p0, g2);
   gp_Vec n1 = vref.Crossed(v1);
   gp_Vec n2 = vref.Crossed(v2);
-  return n2.AngleWithRef(n1, vref);
+  try {
+    return n2.AngleWithRef(n1, vref);
+  }
+  catch ( Standard_Failure ) {
+  }
+  return Max( v1.Magnitude(), v2.Magnitude() );
 }
 
 /*!
@@ -10159,13 +10581,16 @@ double SMESH_MeshEditor::OrientedAngle(const gp_Pnt& p0, const gp_Pnt& p1, const
  * If there is no shared faces between the group #n and the group #p in the list, the group j_n_p is not created.
  * All the flat elements are gathered into the group named "joints3D" (or "joints2D" in 2D situation).
  * The flat element of the multiple junctions between the simple junction are stored in a group named "jointsMultiples".
- * @param theElems - list of groups of volumes, where a group of volume is a set of
- * SMDS_MeshElements sorted by Id.
- * @param createJointElems - if TRUE, create the elements
- * @return TRUE if operation has been completed successfully, FALSE otherwise
+ * \param theElems - list of groups of volumes, where a group of volume is a set of
+ *        SMDS_MeshElements sorted by Id.
+ * \param createJointElems - if TRUE, create the elements
+ * \param onAllBoundaries - if TRUE, the nodes and elements are also created on
+ *        the boundary between \a theDomains and the rest mesh
+ * \return TRUE if operation has been completed successfully, FALSE otherwise
  */
 bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSortedElemSet>& theElems,
-                                                     bool createJointElems)
+                                                     bool                                 createJointElems,
+                                                     bool                                 onAllBoundaries)
 {
   MESSAGE("----------------------------------------------");
   MESSAGE("SMESH_MeshEditor::doubleNodesOnGroupBoundaries");
@@ -10194,15 +10619,20 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
 
   MESSAGE(".. Number of domains :"<<theElems.size());
 
+  TIDSortedElemSet theRestDomElems;
+  const int iRestDom  = -1;
+  const int idom0     = onAllBoundaries ? iRestDom : 0;
+  const int nbDomains = theElems.size();
+
   // Check if the domains do not share an element
-  for (int idom = 0; idom < theElems.size()-1; idom++)
+  for (int idom = 0; idom < nbDomains-1; idom++)
     {
 //       MESSAGE("... Check of domain #" << idom);
       const TIDSortedElemSet& domain = theElems[idom];
       TIDSortedElemSet::const_iterator elemItr = domain.begin();
       for (; elemItr != domain.end(); ++elemItr)
         {
-          SMDS_MeshElement* anElem = (SMDS_MeshElement*) *elemItr;
+          const SMDS_MeshElement* anElem = *elemItr;
           int idombisdeb = idom + 1 ;
           for (int idombis = idombisdeb; idombis < theElems.size(); idombis++) // check if the element belongs to a domain further in the list
           {
@@ -10218,7 +10648,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
         }
     }
 
-  for (int idom = 0; idom < theElems.size(); idom++)
+  for (int idom = 0; idom < nbDomains; idom++)
     {
 
       // --- build a map (face to duplicate --> volume to modify)
@@ -10231,7 +10661,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
       TIDSortedElemSet::const_iterator elemItr = domain.begin();
       for (; elemItr != domain.end(); ++elemItr)
         {
-          SMDS_MeshElement* anElem = (SMDS_MeshElement*) *elemItr;
+          const SMDS_MeshElement* anElem = *elemItr;
           if (!anElem)
             continue;
           int vtkId = anElem->getVtkId();
@@ -10244,26 +10674,30 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
             {
               int smdsId = meshDS->fromVtkToSmds(neighborsVtkIds[n]);
               const SMDS_MeshElement* elem = meshDS->FindElement(smdsId);
-              if (! domain.count(elem)) // neighbor is in another domain : face is shared
+              if (elem && ! domain.count(elem)) // neighbor is in another domain : face is shared
                 {
                   bool ok = false ;
-                  for (int idombis = 0; idombis < theElems.size(); idombis++) // check if the neighbor belongs to another domain of the list
+                  for (int idombis = 0; idombis < theElems.size() && !ok; idombis++) // check if the neighbor belongs to another domain of the list
                   {
                     // MESSAGE("Domain " << idombis);
                     const TIDSortedElemSet& domainbis = theElems[idombis];
                     if ( domainbis.count(elem)) ok = true ; // neighbor is in a correct domain : face is kept
                   }
-                  if ( ok ) // the characteristics of the face is stored
+                  if ( ok || onAllBoundaries ) // the characteristics of the face is stored
                   {
                     DownIdType face(downIds[n], downTypes[n]);
-                    if (!faceDomains.count(face))
-                      faceDomains[face] = emptyMap; // create an empty entry for face
                     if (!faceDomains[face].count(idom))
                       {
                         faceDomains[face][idom] = vtkId; // volume associated to face in this domain
                         celldom[vtkId] = idom;
                         //MESSAGE("       cell with a border " << vtkId << " domain " << idom);
                       }
+                    if ( !ok )
+                    {
+                      theRestDomElems.insert( elem );
+                      faceDomains[face][iRestDom] = neighborsVtkIds[n];
+                      celldom[neighborsVtkIds[n]] = iRestDom;
+                    }
                   }
                 }
             }
@@ -10277,14 +10711,14 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
   //     explore the nodes of the face and see if they belong to a cell in the domain,
   //     which has only a node or an edge on the border (not a shared face)
 
-  for (int idomain = 0; idomain < theElems.size(); idomain++)
+  for (int idomain = idom0; idomain < nbDomains; idomain++)
     {
       //MESSAGE("Domain " << idomain);
-      const TIDSortedElemSet& domain = theElems[idomain];
+      const TIDSortedElemSet& domain = (idomain == iRestDom) ? theRestDomElems : theElems[idomain];
       itface = faceDomains.begin();
       for (; itface != faceDomains.end(); ++itface)
         {
-          std::map<int, int> domvol = itface->second;
+          const std::map<int, int>& domvol = itface->second;
           if (!domvol.count(idomain))
             continue;
           DownIdType face = itface->first;
@@ -10313,8 +10747,6 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
                                 //no cells created after BuildDownWardConnectivity
                     }
                   DownIdType aCell(downId, vtkType);
-                  if (!cellDomains.count(aCell))
-                    cellDomains[aCell] = emptyMap; // create an empty entry for cell
                   cellDomains[aCell][idomain] = vtkId;
                   celldom[vtkId] = idomain;
                   //MESSAGE("       cell " << vtkId << " domain " << idomain);
@@ -10336,12 +10768,12 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
   std::map<int, std::vector<int> > mutipleNodesToFace; // nodes multi domains with domain order to transform in Face (junction between 3 or more 2D domains)
 
   MESSAGE(".. Duplication of the nodes");
-  for (int idomain = 0; idomain < theElems.size(); idomain++)
+  for (int idomain = idom0; idomain < nbDomains; idomain++)
     {
       itface = faceDomains.begin();
       for (; itface != faceDomains.end(); ++itface)
         {
-          std::map<int, int> domvol = itface->second;
+          const std::map<int, int>& domvol = itface->second;
           if (!domvol.count(idomain))
             continue;
           DownIdType face = itface->first;
@@ -10353,15 +10785,12 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
           for (; itn != oldNodes.end(); ++itn)
             {
               int oldId = *itn;
-              //MESSAGE("-+-+-a node " << oldId);
-              if (!nodeDomains.count(oldId))
-                nodeDomains[oldId] = emptyMap; // create an empty entry for node
               if (nodeDomains[oldId].empty())
                 {
                   nodeDomains[oldId][idomain] = oldId; // keep the old node in the first domain
                   //MESSAGE("-+-+-b     oldNode " << oldId << " domain " << idomain);
                 }
-              std::map<int, int>::iterator itdom = domvol.begin();
+              std::map<int, int>::const_iterator itdom = domvol.begin();
               for (; itdom != domvol.end(); ++itdom)
                 {
                   int idom = itdom->first;
@@ -10399,7 +10828,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
     }
 
   MESSAGE(".. Creation of elements");
-  for (int idomain = 0; idomain < theElems.size(); idomain++)
+  for (int idomain = idom0; idomain < nbDomains; idomain++)
     {
       itface = faceDomains.begin();
       for (; itface != faceDomains.end(); ++itface)
@@ -10468,11 +10897,12 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
                               for (int id=0; id < doms.size(); id++)
                                 {
                                   int idom = doms[id];
+                                  const TIDSortedElemSet& domain = (idom == iRestDom) ? theRestDomElems : theElems[idom];
                                   for (int ivol=0; ivol<nbvol; ivol++)
                                     {
                                       int smdsId = meshDS->fromVtkToSmds(vtkVolIds[ivol]);
                                       SMDS_MeshElement* elem = (SMDS_MeshElement*)meshDS->FindElement(smdsId);
-                                      if (theElems[idom].count(elem))
+                                      if (domain.count(elem))
                                         {
                                           SMDS_VtkVolume* svol = dynamic_cast<SMDS_VtkVolume*>(elem);
                                           domvol[idom] = svol;
@@ -10653,7 +11083,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
   feDom.clear();
 
   MESSAGE(".. Modification of elements");
-  for (int idomain = 0; idomain < theElems.size(); idomain++)
+  for (int idomain = idom0; idomain < nbDomains; idomain++)
     {
       std::map<int, std::map<int, int> >::const_iterator itnod = nodeDomains.begin();
       for (; itnod != nodeDomains.end(); ++itnod)
index 870660a8aa4adbef75f0deafbe441e65d9344e3d..865a395c96c2884f1d246553eaa53dc08d451d9d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -169,11 +169,32 @@ public:
                  SMESH::Controls::NumericalFunctorPtr theCriterion);
 
 
-  enum SplitVolumToTetraFlags { HEXA_TO_5 = 1, HEXA_TO_6 = 2, HEXA_TO_24 = 3 };//!<arg of SplitVolumesIntoTetra()
+  typedef std::map < const SMDS_MeshElement*, int, TIDCompare > TFacetOfElem;
+
+    //!<2nd arg of SplitVolumes()
+  enum SplitVolumToTetraFlags { HEXA_TO_5 = 1, // split into tetrahedra
+                                HEXA_TO_6,
+                                HEXA_TO_24,
+                                HEXA_TO_2_PRISMS, // split into prisms
+                                HEXA_TO_4_PRISMS };
+  /*!
+   * \brief Split volumic elements into tetrahedra or prisms.
+   *        If facet ID < 0, element is split into tetrahedra,
+   *        else a hexahedron is split into prisms so that the given facet is
+   *        split into triangles
+   */
+  void SplitVolumes (const TFacetOfElem & theElems, const int theMethodFlags);
+
   /*!
-   * \brief Split volumic elements into tetrahedra.
+   * \brief For hexahedra that will be split into prisms, finds facets to
+   *        split into triangles 
+   *  \param [in,out] theHexas - the hexahedra
+   *  \param [in]     theFacetNormal - facet normal
+   *  \param [out]    theFacets - the hexahedra and found facet IDs
    */
-  void SplitVolumesIntoTetra (const TIDSortedElemSet & theElems, const int theMethodFlags);
+  void GetHexaFacetsToSplit( TIDSortedElemSet& theHexas,
+                             const gp_Ax1&     theFacetNormal,
+                             TFacetOfElem &    theFacets);
 
 
   enum SmoothMethod { LAPLACIAN = 0, CENTROIDAL };
@@ -532,7 +553,8 @@ public:
   double OrientedAngle(const gp_Pnt& p0, const gp_Pnt& p1, const gp_Pnt& g1, const gp_Pnt& g2);
 
   bool DoubleNodesOnGroupBoundaries( const std::vector<TIDSortedElemSet>& theElems,
-                                     bool createJointElems);
+                                     bool                                 createJointElems,
+                                     bool                                 onAllBoundaries);
 
   bool CreateFlatElementsOnFacesGroups( const std::vector<TIDSortedElemSet>& theElems );
 
index b7d8759e9dc2b56710b655bbf2f07288cd6f0142..6dda8f79b7aa0ac0fa817156a90de1fab38cee00 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -245,8 +245,8 @@ void SMESH_MesherHelper::SetSubShape(const TopoDS_Shape& aSh)
     TopLoc_Location loc;
     Handle(Geom_Surface) surface = BRep_Tool::Surface( face, loc );
 
-    if ( surface->IsUPeriodic() || surface->IsVPeriodic() ||
-         surface->IsUClosed()   || surface->IsVClosed() )
+    // if ( surface->IsUPeriodic() || surface->IsVPeriodic() ||
+    //      surface->IsUClosed()   || surface->IsVClosed() )
     {
       //while ( surface->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface )))
       //surface = Handle(Geom_RectangularTrimmedSurface)::DownCast( surface )->BasisSurface();
@@ -478,7 +478,10 @@ bool SMESH_MesherHelper::toCheckPosOnShape(int shapeID ) const
 
 void SMESH_MesherHelper::setPosOnShapeValidity(int shapeID, bool ok ) const
 {
-  ((SMESH_MesherHelper*)this)->myNodePosShapesValidity.insert( make_pair( shapeID, ok));
+  std::map< int,bool >::iterator sh_ok = 
+    ((SMESH_MesherHelper*)this)->myNodePosShapesValidity.insert( make_pair( shapeID, ok)).first;
+  if ( !ok )
+    sh_ok->second = ok;
 }
 
 //=======================================================================
@@ -661,9 +664,10 @@ bool SMESH_MesherHelper::CheckNodeUV(const TopoDS_Face&   F,
                                      const bool           force,
                                      double               distXYZ[4]) const
 {
-  int shapeID = n->getshapeId();
+  int  shapeID = n->getshapeId();
   bool infinit = ( Precision::IsInfinite( uv.X() ) || Precision::IsInfinite( uv.Y() ));
-  if ( force || toCheckPosOnShape( shapeID ) || infinit )
+  bool zero    = ( uv.X() == 0. && uv.Y() == 0. );
+  if ( force || toCheckPosOnShape( shapeID ) || infinit || zero )
   {
     // check that uv is correct
     TopLoc_Location loc;
@@ -896,9 +900,10 @@ bool SMESH_MesherHelper::CheckNodeU(const TopoDS_Edge&   E,
                                     const bool           force,
                                     double               distXYZ[4]) const
 {
-  int shapeID = n->getshapeId();
+  int  shapeID = n->getshapeId();
   bool infinit = Precision::IsInfinite( u );
-  if ( force || toCheckPosOnShape( shapeID ) || infinit )
+  bool zero    = ( u == 0. );
+  if ( force || toCheckPosOnShape( shapeID ) || infinit || zero )
   {
     TopLoc_Location loc; double f,l;
     Handle(Geom_Curve) curve = BRep_Tool::Curve( E,loc,f,l );
@@ -1423,8 +1428,15 @@ const SMDS_MeshNode* SMESH_MesherHelper::GetMediumNode(const SMDS_MeshNode* n1,
       return getMediumNodeOnComposedWire(n1,n2,force3d);
     }
     E = TopoDS::Edge(meshDS->IndexToShape( edgeID = pos.first ));
-    u[0] = GetNodeU(E,n1,n2, force3d ? 0 : &uvOK[0]);
-    u[1] = GetNodeU(E,n2,n1, force3d ? 0 : &uvOK[1]);
+    try {
+      u[0] = GetNodeU(E,n1,n2, force3d ? 0 : &uvOK[0]);
+      u[1] = GetNodeU(E,n2,n1, force3d ? 0 : &uvOK[1]);
+    }
+    catch ( Standard_Failure& f )
+    {
+      // issue 22502 / a node is on VERTEX not belonging to E
+      return getMediumNodeOnComposedWire(n1,n2,force3d);
+    }
   }
 
   if ( !force3d & uvOK[0] && uvOK[1] )
@@ -2920,7 +2932,7 @@ namespace { // Structures used by FixQuadraticElements()
 //=======================================================================
 
 #define __DMP__(txt) \
-  //cout << txt
+  // cout << txt
 #define MSG(txt) __DMP__(txt<<endl)
 #define MSGBEG(txt) __DMP__(txt)
 
@@ -3328,27 +3340,11 @@ namespace { // Structures used by FixQuadraticElements()
 
   gp_Vec QFace::LinkNorm(const int i, SMESH_MesherHelper* /*uvHelper*/) const
   {
-    gp_Vec norm, vecOut;
-//     if ( uvHelper ) {
-//       TopoDS_Face face = TopoDS::Face( uvHelper->GetSubShape());
-//       const SMDS_MeshNode* inFaceNode = uvHelper->GetNodeUVneedInFaceNode() ? GetNodeInFace() : 0;
-//       gp_XY uv1 = uvHelper->GetNodeUV( face, _sides[i]->node1(), inFaceNode );
-//       gp_XY uv2 = uvHelper->GetNodeUV( face, _sides[i]->node2(), inFaceNode );
-//       norm.SetCoord( uv1.Y() - uv2.Y(), uv2.X() - uv1.X(), 0 );
-
-//       const QLink* otherLink = _sides[(i + 1) % _sides.size()];
-//       const SMDS_MeshNode* otherNode =
-//         otherLink->node1() == _sides[i]->node1() ? otherLink->node2() : otherLink->node1();
-//       gp_XY pIn = uvHelper->GetNodeUV( face, otherNode, inFaceNode );
-//       vecOut.SetCoord( uv1.X() - pIn.X(), uv1.Y() - pIn.Y(), 0 );
-//     }
-//     else {
-      norm = _normal ^ gp_Vec( XYZ(_sides[i]->node1()), XYZ(_sides[i]->node2()));
-      gp_XYZ pIn = ( XYZ( _sides[0]->node1() ) +
-                     XYZ( _sides[0]->node2() ) +
-                     XYZ( _sides[1]->node1() )) / 3.;
-      vecOut.SetXYZ( _sides[i]->MiddlePnt() - pIn );
-      //}
+    gp_Vec   norm = _normal ^ gp_Vec( XYZ(_sides[i]->node1()), XYZ(_sides[i]->node2()));
+    gp_XYZ    pIn = ( _sides[ (i+1)%3 ]->MiddlePnt() +
+                      _sides[ (i+2)%3 ]->MiddlePnt() ) / 2.;
+    gp_Vec vecOut = ( _sides[i]->MiddlePnt() - pIn );
+
     if ( norm * vecOut < 0 )
       norm.Reverse();
     double mag2 = norm.SquareMagnitude();
@@ -3402,10 +3398,26 @@ 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 );
+
+    const QFace *f1 = 0, *f2 = 0;  // adjacent faces
+    bool isBndLink1 = true, isBndLink2 = true;
+    if ( link1 != theLinks.end() && link2 != theLinks.end() )
+    {
+      f1 = link1->NextFace( this );
+      f2 = link2->NextFace( this );
+
+      isBndLink1 = ( theLink->MediumPos() > (*link1)->MediumPos() );
+      isBndLink2 = ( theLink->MediumPos() > (*link2)->MediumPos() );
+      if ( theStep == theFirstStep ) // (issue 22541) quad-dominant mesh
+      {
+        if ( !isBndLink1 && !f1 )
+          f1 = (*link1)->GetContinuesFace( this ); // get a quadrangle face
+        if ( !isBndLink2 && !f2 )
+          f2 = (*link2)->GetContinuesFace( this );
+      }
+    }
+    else if ( _sides.size() < 4 )
+      return thePrevLen;      
 
     // propagate to adjacent faces till limit step or boundary
     double len1 = thePrevLen + (theLink->MiddlePnt() - _sides[iL1]->MiddlePnt()).Modulus();
@@ -3414,7 +3426,7 @@ namespace { // Structures used by FixQuadraticElements()
     gp_Vec linkDir2(0,0,0);
     try {
       OCC_CATCH_SIGNALS;
-      if ( f1 && theLink->MediumPos() <= (*link1)->MediumPos() )
+      if ( f1 && !isBndLink1 )
         len1 = f1->MoveByBoundary
           ( *link1, theRefVec, theLinks, theFaceHelper, len1, theStep-1, &linkDir1, theSign);
       else
@@ -3425,7 +3437,7 @@ namespace { // Structures used by FixQuadraticElements()
     }
     try {
       OCC_CATCH_SIGNALS;
-      if ( f2 && theLink->MediumPos() <= (*link2)->MediumPos() )
+      if ( f2 && !isBndLink2 )
         len2 = f2->MoveByBoundary
           ( *link2, theRefVec, theLinks, theFaceHelper, len2, theStep-1, &linkDir2, theSign);
       else
@@ -3448,7 +3460,7 @@ namespace { // Structures used by FixQuadraticElements()
 
       MSG(string(theStep,'.')<<" Move "<< theLink->_mediumNode->GetID()<<
           " by " << refProj * ( 1 - r ) << " following " <<
-          (choose1 ? *link1->_qlink : *link2->_qlink));
+          (choose1 ? *link1->_qlink : *link2->_qlink)); // warning: link1 can be invalid
 
       if ( theLinkNorm ) *theLinkNorm = linkNorm;
     }
index bfe44f75ac1c2fb33b95e3cfdce5955215dfe295..d67e335b59ede60c1d8fc021f23671476645945d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 63e6f365fec9b754dcd2b74514a75e0a0ccd3688..9dc255a252ac8657cf96b851189860b7b3083cb5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -2641,10 +2641,10 @@ bool SMESH_Pattern::Apply (const SMDS_MeshFace* theFace,
 
   list< const SMDS_MeshNode* > nodes;
   list< const SMDS_MeshNode* >::iterator n = nodes.end();
-  SMDS_ElemIteratorPtr noIt = theFace->nodesIterator();
+  SMDS_NodeIteratorPtr noIt = theFace->nodeIterator();
   int iSub = 0;
   while ( noIt->more() && iSub < nbFaceNodes ) {
-    const SMDS_MeshNode* node = smdsNode( noIt->next() );
+    const SMDS_MeshNode* node = noIt->next();
     nodes.push_back( node );
     if ( iSub++ == theNodeIndexOnKeyPoint1 )
       n = --nodes.end();
@@ -2661,7 +2661,7 @@ bool SMESH_Pattern::Apply (const SMDS_MeshFace* theFace,
   list< gp_XYZ > xyzList;
   myOrderedNodes.resize( nbFaceNodes );
   for ( iSub = 0, n = nodes.begin(); n != nodes.end(); ++n ) {
-    xyzList.push_back( gp_XYZ( (*n)->X(), (*n)->Y(), (*n)->Z() ));
+    xyzList.push_back( SMESH_TNodeXYZ( *n ));
     myOrderedNodes[ iSub++] = *n;
   }
 
@@ -2963,11 +2963,6 @@ bool SMESH_Pattern::Apply (SMESH_Mesh*                     theMesh,
   myXYZ.resize( myPoints.size() * theFaces.size(), undefinedXYZ() );
   myElements.reserve( theFaces.size() );
 
-  // to find point index
-  map< TPoint*, int > pointIndex;
-  for ( int i = 0; i < myPoints.size(); i++ )
-    pointIndex.insert( make_pair( & myPoints[ i ], i ));
-
   int ind1 = 0; // lowest point index for a face
 
   // meshed geometry
@@ -3019,7 +3014,7 @@ bool SMESH_Pattern::Apply (SMESH_Mesh*                     theMesh,
     {
       list< TPoint* > & linkPoints = getShapePoints( eID++ );
       const SMDS_MeshNode* n1 = myOrderedNodes[ i ];
-      const SMDS_MeshNode* n2 = myOrderedNodes[ i + 1 == nbNodes ? 0 : i + 1 ];
+      const SMDS_MeshNode* n2 = myOrderedNodes[( i+1 ) % nbNodes ];
       // make a link and a node set
       TNodeSet linkSet, node1Set;
       linkSet.insert( n1 );
@@ -3028,7 +3023,7 @@ bool SMESH_Pattern::Apply (SMESH_Mesh*                     theMesh,
       list< TPoint* >::iterator p = linkPoints.begin();
       {
         // map the first link point to n1
-        int nId = pointIndex[ *p ] + ind1;
+        int nId = ( *p - &myPoints[0] ) + ind1;
         myXYZIdToNodeMap[ nId ] = n1;
         list< list< int > >& groups = myIdsOnBoundary[ node1Set ];
         groups.push_back(list< int > ());
@@ -3040,7 +3035,7 @@ bool SMESH_Pattern::Apply (SMESH_Mesh*                     theMesh,
       list< int >& indList = groups.back();
       // add points to the map excluding the end points
       for ( p++; *p != linkPoints.back(); p++ )
-        indList.push_back( pointIndex[ *p ] + ind1 );
+        indList.push_back( ( *p - &myPoints[0] ) + ind1 );
     }
     ind1 += myPoints.size();
   }
@@ -3443,7 +3438,7 @@ void SMESH_Pattern::mergePoints (const bool uniteGroups)
       Bnd_Box box;
       TNodeSet::const_iterator n = nodes.begin();
       for ( ; n != nodes.end(); ++n )
-        box.Add( gp_Pnt( (*n)->X(), (*n)->Y(), (*n)->Z() ));
+        box.Add( gp_Pnt( SMESH_TNodeXYZ( *n )));
       double x, y, z, X, Y, Z;
       box.Get( x, y, z, X, Y, Z );
       gp_Pnt p( x, y, z ), P( X, Y, Z );
@@ -3454,7 +3449,7 @@ void SMESH_Pattern::mergePoints (const bool uniteGroups)
     bool unite = ( uniteGroups && nodes.size() == 2 );
     map< double, int > distIndMap;
     const SMDS_MeshNode* node = *nodes.begin();
-    gp_Pnt P( node->X(), node->Y(), node->Z() );
+    gp_Pnt P = SMESH_TNodeXYZ( node );
 
     // compare points, replace indices
 
@@ -3928,32 +3923,142 @@ bool SMESH_Pattern::MakeMesh(SMESH_Mesh* theMesh,
                                              myXYZ[ i ].Y(),
                                              myXYZ[ i ].Z());
     }
-  }
+    if ( theMesh->HasShapeToMesh() )
+    {
+      // set nodes on EDGEs (IMP 22368)
+      SMESH_MesherHelper helper( *theMesh );
+      helper.ToFixNodeParameters( true );
+      map< TNodeSet, list< list< int > > >::iterator idListIt = myIdsOnBoundary.begin();
+      for ( ; idListIt != myIdsOnBoundary.end(); idListIt++ )
+      {
+        list<list< int > >& groups = idListIt->second;
+        const TNodeSet&      nodes = idListIt->first;
+        if ( nodes.size() != 2 )
+          continue; // not a link
+        const SMDS_MeshNode* n1 = *nodes.begin();
+        const SMDS_MeshNode* n2 = *nodes.rbegin();
+        TopoDS_Shape S1 = helper.GetSubShapeByNode( n1, aMeshDS );
+        TopoDS_Shape S2 = helper.GetSubShapeByNode( n2, aMeshDS );
+        if ( S1.IsNull() || S1.ShapeType() < TopAbs_EDGE ||
+             S2.IsNull() || S2.ShapeType() < TopAbs_EDGE )
+          continue;
+        TopoDS_Shape S;
+        if ( S1.ShapeType() == TopAbs_EDGE )
+        {
+          if ( S1 == S2 || helper.IsSubShape( S2, S1 ))
+            S = S1;
+        }
+        else if ( S2.ShapeType() == TopAbs_EDGE )
+        {
+          if ( helper.IsSubShape( S1, S2 ))
+            S = S2;
+        }
+        else
+        {
+          S = helper.GetCommonAncestor( S1, S2, *theMesh, TopAbs_EDGE );
+        } 
+        if ( S.IsNull() )
+          continue;
+        const TopoDS_Edge & E = TopoDS::Edge( S );
+        helper.SetSubShape( E );
+        list<list< int > >::iterator g = groups.begin();
+        for ( ; g != groups.end(); ++g )
+        {
+          list< int >& ids = *g;
+          list< int >::iterator id = ids.begin();
+          for ( ; id != ids.end(); ++id )
+            if ( nodesVector[ *id ] && nodesVector[ *id ]->getshapeId() < 1 )
+            {
+              double u = 1e100;
+              aMeshDS->SetNodeOnEdge( nodesVector[ *id ], E, u );
+              helper.CheckNodeU( E, nodesVector[ *id ], u, 1e-7, true );
+            }
+        }
+      }
+    }
+  }  // if ( onMeshElements )
+
   else
   {
     nodesVector.resize( myPoints.size(), 0 );
 
-    // to find point index
-    map< TPoint*, int > pointIndex;
-    for ( int i = 0; i < myPoints.size(); i++ )
-      pointIndex.insert( make_pair( & myPoints[ i ], i ));
+    // find existing nodes on EDGEs and VERTEXes (IMP 22368)
+    map< int, list< TPoint* > >::iterator idPointIt = myShapeIDToPointsMap.begin();
+    if ( !myShapeIDMap.IsEmpty() && aMeshDS->NbNodes() > 0 )
+
+      for ( ; idPointIt != myShapeIDToPointsMap.end(); idPointIt++ )
+      {
+        const TopoDS_Shape&    S = myShapeIDMap( idPointIt->first );
+        list< TPoint* > & points = idPointIt->second;
+        if ( points.empty() )
+          continue;
+
+        switch ( S.ShapeType() )
+        {
+        case TopAbs_VERTEX:
+        {
+          int pIndex = points.back() - &myPoints[0];
+          if ( !nodesVector[ pIndex ] )
+            nodesVector[ pIndex ] = SMESH_Algo::VertexNode( TopoDS::Vertex( S ), aMeshDS );
+          break;
+        }
+        case TopAbs_EDGE:
+        {
+          const TopoDS_Edge& edge = TopoDS::Edge( S );
+          map< double, const SMDS_MeshNode* > paramsOfNodes;
+          if ( !SMESH_Algo::GetSortedNodesOnEdge( aMeshDS, edge,
+                                                  /*ignoreMediumNodes=*/false,
+                                                  paramsOfNodes )
+               || paramsOfNodes.size() < 3 )
+            break;
+          // points on VERTEXes are included with wrong myU
+          list< TPoint* >::reverse_iterator pItR = ++points.rbegin();
+          list< TPoint* >::iterator         pItF = ++points.begin();
+          const bool isForward = ( (*pItF)->myU < (*pItR)->myU );
+          map< double, const SMDS_MeshNode* >::iterator u2n    = ++paramsOfNodes.begin();
+          map< double, const SMDS_MeshNode* >::iterator u2nEnd = --paramsOfNodes.end();
+          TPoint* p;
+          while ( u2n != u2nEnd && pItF != points.end() )
+          {
+            const double         u = u2n->first;
+            const SMDS_MeshNode* n = u2n->second;
+            const double       tol = ( (++u2n)->first - u ) / 20;
+            do
+            {
+              p = ( isForward ? *pItF : *pItR );
+              if ( Abs( u - p->myU ) < tol )
+              {
+                int pIndex = p - &myPoints[0];
+                if ( !nodesVector [ pIndex ] )
+                  nodesVector [ pIndex ] = n;
+                ++pItF;
+                ++pItR;
+                break;
+              }
+            }
+            while ( p->myU < u && ( ++pItF, ++pItR != points.rend() ));
+          }
+          break;
+        }
+        default:;
+        }
+      } // end of "find existing nodes on EDGEs and VERTEXes"
 
     // loop on sub-shapes of myShape: create nodes
-    map< int, list< TPoint* > >::iterator idPointIt = myShapeIDToPointsMap.begin();
+    idPointIt = myShapeIDToPointsMap.begin();
     for ( ; idPointIt != myShapeIDToPointsMap.end(); idPointIt++ )
     {
       TopoDS_Shape S;
-      //SMESHDS_SubMesh * subMeshDS = 0;
       if ( !myShapeIDMap.IsEmpty() ) {
         S = myShapeIDMap( idPointIt->first );
-        //subMeshDS = aMeshDS->MeshElements( S );
       }
       list< TPoint* > & points = idPointIt->second;
       list< TPoint* >::iterator pIt = points.begin();
       for ( ; pIt != points.end(); pIt++ )
       {
         TPoint* point = *pIt;
-        int pIndex = pointIndex[ point ];
+        //int pIndex = pointIndex[ point ];
+        int pIndex = point - &myPoints[0];
         if ( nodesVector [ pIndex ] )
           continue;
         SMDS_MeshNode* node = aMeshDS->AddNode (point->myXYZ.X(),
@@ -4148,8 +4253,9 @@ void SMESH_Pattern::createElements(SMESH_Mesh*                            theMes
         SMDS_ElemIteratorPtr noIt = elem->nodesIterator();
         while ( noIt->more() ) {
           SMDS_MeshNode* node = const_cast<SMDS_MeshNode*>(smdsNode( noIt->next() ));
-          if (!node->getshapeId() &&
-              shellNodes.find( node ) == shellNodes.end() ) {
+          if ( node->getshapeId() < 1 &&
+               shellNodes.find( node ) == shellNodes.end() )
+          {
             if ( S.ShapeType() == TopAbs_FACE )
               aMeshDS->SetNodeOnFace( node, shapeID,
                                       Precision::Infinite(),// <- it's a sign that UV is not set
index b2606e46382521a200fbd38ebd850be139725953..cbe6774933a86e0689cfa559b5f77fc7ecb7c21a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -356,7 +356,7 @@ private:
   // all functions assure that shapes are indexed so that first go
   // ordered vertices, then ordered edge, then faces and maybe a shell
   TopTools_IndexedMapOfOrientedShape   myShapeIDMap;
-  std::map< int, std::list< TPoint* > >     myShapeIDToPointsMap;
+  std::map< int, std::list< TPoint*> > myShapeIDToPointsMap;
 
   // for the 2d case:
   // nb of key-points in each of pattern boundaries
index 8649c7d3a6438dbb9e5466bdbe17ca2cf45b863a..fd4f470b1484e3b1eb405df741420b9490d06d91 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a367ef3693a7d32d6e1fde56dd2542c439bf9fe0..f0d86579e10c4c8e69c865555bbc8d8a3aa6560c 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 106eeb30e700cbe1a8b83a3eab6ffe0190e46ad0..257f960801d2aa873ae58807c0d337fe6c67933c 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index df1c1b70cc14929a2712e29fcd806bf009c80844..0b9269fed84d62ef9e4fa8fcaec5780725ba78e8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 63ff08d3f8a6077e6902d15d7f1d54446741fe3c..f38d6367a53d925f21715f565c88e8010c9651a4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 66e324f8059572e840939f693e380b00afd9de2e..bccc5d073b129c7971cf15ad56db8683aad72a24 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 0500bf928fdb66444644107ab21cfd10d02835a6..dc34dc2b5f5584a2e5749984550a215ae7c4418c 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e103f174ce55f791342e7b7e90f892d78cf0de30..24642b4f405e25ce551eb871e5a5f2bc18a99517 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7f6b90f3232bfb27b2b76b1b4f297d392bbc82b6..25674a35298ccc732348ba295d1f3f903d59d934 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 48c963d977c227d8e12764579ee8a312f83d7e25..d25d800d7e57cc5e669358e470d020371bdb4004 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a8434f4214bb00357af7196e1f1a95b4770e2eca..975885369f67b248c9d7ad95da063ad7a6385074 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4359252ffb1ea909af522e2632d837ffa538bd57..f5fb89fbe01208633349a398c5b428c15726b481 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index b6077f90041155c8f076f666f32298fc8fe36356..b3f05171f49d96e6975391416640651be7aad17e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 71340f0b66e05b683747b51524adc1ab056aaaee..7b5349b10c80e513db2ba2003977ad177acc7774 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1bceb33da180424a7dc42bf04a3d7b174a2032fd..e737f5f02c0905e7533df01b42ee3d3bb9d0b6ab 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5b8165cf1d1411b231a876af8a9ea5619497c5d0..21bb5a1e53a3dc5879e28e594a47ea78a212825c 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 /*
  * This method needed for instance NCollection_DataMap with TopoDS_Shape as key
  */
-
-inline Standard_Boolean IsEqual(const TopoDS_Shape& S1,
-                                const TopoDS_Shape& S2)
+struct SMESHDS_Hasher
 {
-  return S1.IsSame(S2);
-}
-
+  static inline Standard_Boolean IsEqual(const TopoDS_Shape& S1,
+                                         const TopoDS_Shape& S2)
+  {
+    return S1.IsSame(S2);
+  }
+  static inline Standard_Integer HashCode(const TopoDS_Shape& S,
+                                          const Standard_Integer Upper)
+  {
+    return ::HashCode( S, Upper);
+  }
+};
 
 
-#endif 
+#endif
index cad399b74e2a023ac64efd1970ff7642092178bc..93fbc5ec0768e919dacffe3f66cfccc2faba5c50 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index fb576984bb534adc7ba843106af1a8ce12c8fb17..86f68cddca8f1f4fcefc30edd71641bef5f1db39 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 21a2ebbe236969fe7be43c32f7f0d23617d17ee0..ce85efa339ff3c89dac055c4b8d4f42824a0b45c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9836e7a07af12102dd8ac43279c4e5e952915b4e..c6998c99e856aebe1097d59d37f3bce32e240e6f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 08dd7e5f6597e18bdf8aeb6d4d427c1b87b98370..d1b0d6ecdf94e904038c545cf04e8b8d02e7fa2c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3c6040b6eb24abb7b3c1f8ee14ad68d33e813498..c00887858eef27098c7efda73cb8bcac012cdd09 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8cdd65fc8f7963424484b7ec62fda73dd37f2ab9..e26bfa7e00157901fb64ad81be003aba4dd2b460 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7dfa3e517f7aac8bf2eaee4ddc12f89a383d337a..b45e600ec1ccc60c29fa23a1fbe4413d267617fc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7127171f345d55563d854fec2cad04979b1269c4..78fd1440ecc67d4151f85bb60e58458f09ab220a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 6c05c7c05e021a6da92ccb30b434d59b6afa6d5b..b29b1a5864866ab8eedcbc201ddd6e62e5c326d4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index fb2ea91cf211ea27872f9f8a9deaae29a2c58bb9..a5851a204dabd96da12107c3a2570305363e8942 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e23f29b92480fd1ee9a44f674c2e1c1a73973f1c..ea01d617a6279b978558ad16bdfcb65db5b9e709 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3e52032790648a5c845ec08f8e0466894d2cbe8a..089e9feecf52d3d2efe338179d855ae3a2eb1aa2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 360b8ef6b8742814104c3ee7c16b4a2af2258ca4..8b8fc0a55b0ef5f9d4f93240732a14c802ed22a4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -50,18 +50,22 @@ class SMDS_MeshVolume   ;
 class SMDS_Mesh0DElement;
 class SMDS_BallElement;
 
-#include <NCollection_DataMap.hxx>
 #include <map>
+
 /*
  * Using of native hash_map isn't portable and don't work on WIN32 platform.
  * So this functionality implement on new NCollection_DataMap technology
  */
+#include <NCollection_DataMap.hxx>
 #include "SMESHDS_DataMapOfShape.hxx"
+typedef std::list<const SMESHDS_Hypothesis*>                          THypList;
+typedef NCollection_DataMap< TopoDS_Shape, THypList, SMESHDS_Hasher > ShapeToHypothesis;
 
 class SMESHDS_GroupBase;
 class DownIdType;
 
-class SMESHDS_EXPORT SMESHDS_Mesh:public SMDS_Mesh{
+class SMESHDS_EXPORT SMESHDS_Mesh : public SMDS_Mesh
+{
 public:
   SMESHDS_Mesh(int theMeshID, bool theIsEmbeddedMode);
   bool IsEmbeddedMode();
@@ -569,8 +573,11 @@ public:
   bool HasHypothesis(const TopoDS_Shape & S);
   const std::list<const SMESHDS_Hypothesis*>& GetHypothesis(const TopoDS_Shape & S) const;
   bool IsUsedHypothesis(const SMESHDS_Hypothesis * H) const;
+  const ShapeToHypothesis & GetHypotheses() const { return myShapeToHypothesis; }
+
   SMESHDS_Script * GetScript();
   void ClearScript();
+
   int ShapeToIndex(const TopoDS_Shape & aShape) const;
   const TopoDS_Shape& IndexToShape(int ShapeIndex) const;
   int MaxShapeIndex() const { return myIndexToShape.Extent(); }
@@ -603,15 +610,6 @@ private:
     it->second->AddNode( aNode ); // add aNode to submesh
   }
   
-  /*int HashCode( const TopoDS_Shape& S, const Standard_Integer theUpper ) const
-  {
-      return S.HashCode(2147483647);
-  }*/ 
-
-  typedef std::list<const SMESHDS_Hypothesis*> THypList;
-
-  typedef NCollection_DataMap< TopoDS_Shape, THypList > ShapeToHypothesis;
-
   ShapeToHypothesis          myShapeToHypothesis;
 
   int                        myMeshID, myPersistentID;
index d715a20b40f4d6f3f2b896bc82e2538466e451db..1c7c383981ece40cf9c5f6726b97b432aab5b9aa 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f7c2a9b1826ac7925ca93fd29d9e69b771187479..ca71dd5d82b4502fcd4e319fb380edf69a0d52a7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7bf00c99df9dd93befb7378de714547d353bed19..915ab0cdcb2278bb7ae32e840e9c6d3dd1ee62f5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7b389182ca0dfb1fe9cec18f6696b10164e37714..2f28f0e9084df158d647ed93f23401f2bd9c9339 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index bd7871ac7c6de506aa1c246b938919153183ba29..4feb3959ea4193152d07ac4c42f72c96d4606b41 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index af1f4210d51d8601e5c357bb6aaffebcc7bfbf78..193992f33fad59181b55bda8838af7400fbe3034 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7a9b9566b2ca905b6cef759e1ecdd343360e6990..9d9b8d831475fe98212d32bffe51d86b78c3c8b6 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index e16d20a17049d505aa1504b5fef2356cd4386edc..61cadf00cae80dc2cdbb045b3ef2232afae0aa50 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ddaaeb9432e17d5624ceffeaa7901d07269549db..773fc3d7627cfd4a83c016e6dd224541ae9951eb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 0e66f83d4804f85a5189855b7476aa8c42bbd9c7..9cbe280aedc73e220a27c46a0c2d8bbaafb6a7c8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a1cd52702d07615329d994c7f63edbb409c5fdfd..a0e15e074920b96726cefdf9bb8eae1dabb0abff 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 0625c55bc932c44cc72704e6b1aa59e411b2ce74..aaaafce7d0ea8ad66a15c4d535df8bf5456c1156 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7ce2a045940bdbd678a0d7894bac7b97fefcef1d..9b1394da7707557d4c95b800c73ecd80ff551c5a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 31f288cadd3b3a3078a83e8896c076cdcf0a6049..e48d3d81bf72b96a28d9f9d1a7a813565e0b8adf 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a3673cf3f672dee9fb102664afc9306455dfea5e..39f74475706b955df8a2a1b79cf69f97313339bf 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -141,6 +141,7 @@ SET(_moc_HEADERS
   SMESHGUI_ReorientFacesDlg.h
   SMESHGUI_PropertiesDlg.h
   SMESHGUI_Add0DElemsOnAllNodesDlg.h
+  SMESHGUI_FieldSelectorWdg.h
 )
 
 # header files / no moc processing
@@ -246,6 +247,7 @@ SET(_other_SOURCES
   SMESHGUI_Filter.cxx
   SMESHGUI_MeshEditPreview.cxx
   SMESHGUI_FileValidator.cxx
+  SMESHGUI_FieldSelectorWdg.cxx
 )
 
 # sources / to compile
index 6fb58cea1ddc998627ad5579751107b9cb734c47..336363ecbc9e3f52393352a1d2f9df01d8c32f21 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -44,6 +44,7 @@
 #include "SMESHGUI_DuplicateNodesDlg.h"
 #include "SMESHGUI_ExtrusionAlongPathDlg.h"
 #include "SMESHGUI_ExtrusionDlg.h"
+#include "SMESHGUI_FieldSelectorWdg.h"
 #include "SMESHGUI_FileInfoDlg.h"
 #include "SMESHGUI_FileValidator.h"
 #include "SMESHGUI_FilterDlg.h"
 // of auto-color picking up
 #define SIMPLE_AUTOCOLOR
 
-//namespace{
+namespace
+{
   // Declarations
   //=============================================================
   void ImportMeshesFromFile(SMESH::SMESH_Gen_ptr theComponentMesh,
 
   void Control( int theCommandID );
 
-
   // Definitions
-  //=============================================================
+  //================================================================================
+  /*!
+   * \brief Reads meshes from file
+   */
+  //================================================================================
+
   void ImportMeshesFromFile( SMESH::SMESH_Gen_ptr theComponentMesh,
                              int theCommandID )
   {
     if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
       anInitialPath = QDir::currentPath();
 
+    QList< QPair< GEOM::ListOfFields_var, QString > > aFieldList;
+
     // Get a file name to write in and additional otions
     if ( isUNV || isDAT || isGMF ) // Export w/o options
     {
       QStringList checkBoxes;
       checkBoxes << QObject::tr("SMESH_AUTO_GROUPS") << QObject::tr("SMESH_AUTO_DIM");
 
+      SMESHGUI_FieldSelectorWdg* fieldSelWdg = new SMESHGUI_FieldSelectorWdg();
+      QList< QWidget* > wdgList;
+      if ( fieldSelWdg->GetAllFeilds( aMeshList, aFieldList ))
+        wdgList.append( fieldSelWdg );
+
       SalomeApp_CheckFileDlg* fd =
-        new SalomeApp_CheckFileDlg ( SMESHGUI::desktop(), false, checkBoxes, true, true );
+        new SalomeApp_CheckFileDlg ( SMESHGUI::desktop(), false, checkBoxes, true, true, wdgList );
       fd->setWindowTitle( aTitle );
       fd->setNameFilters( filters );
       fd->selectNameFilter( aDefaultFilter );
       }
       toCreateGroups = fd->IsChecked(0);
       toFindOutDim   = fd->IsChecked(1);
+      fieldSelWdg->GetSelectedFeilds();
+      if ( !fieldSelWdg->parent() )
+        delete fieldSelWdg;
       delete fd;
     }
     else
           {
             SMESH::SMESH_IDSource_var aMeshOrGroup = (*aMeshIter).first;
             SMESH::SMESH_Mesh_var        aMeshItem = aMeshOrGroup->GetMesh();
-            if ( aMeshOrGroup->_is_equivalent( aMeshItem ))
+            const GEOM::ListOfFields&       fields = aFieldList[ aMeshIndex ].first.in();
+            const QString&            geoAssFields = aFieldList[ aMeshIndex ].second;
+            const bool                   hasFields = ( fields.length() || !geoAssFields.isEmpty() );
+            if ( !hasFields && aMeshOrGroup->_is_equivalent( aMeshItem ))
               aMeshItem->ExportToMEDX( aFilename.toUtf8().data(), toCreateGroups,
                                        aFormat, toOverwrite && aMeshIndex == 0, toFindOutDim );
             else
               aMeshItem->ExportPartToMED( aMeshOrGroup, aFilename.toUtf8().data(), toCreateGroups,
-                                          aFormat, toOverwrite && aMeshIndex == 0, toFindOutDim );
+                                          aFormat, toOverwrite && aMeshIndex == 0, toFindOutDim,
+                                          fields, geoAssFields.toLatin1().data() );
           }
         }
         else if ( isSAUV )
         int deltaF = 0, deltaV = 0;
         int elem0dSize   = 1;
         int ballSize     = 1;
+        double ballScale = 1.0;
         int edgeWidth    = 1;
         int outlineWidth = 1;
         double shrinkCoef = 0.0;
             anActor->GetBallColor( color[0], color[1], color[2] );
             ballColor.setRgbF( color[0], color[1], color[2] );
             ballSize = qMax( (int)anActor->GetBallSize(), 1 ); // minimum allowed size is 1
+            ballScale = qMax( (double)anActor->GetBallScale(), 1e-2 ); // minimum allowed scale is 1e-2
             // outlines: color
             anActor->GetOutlineColor( color[0], color[1], color[2] );
             outlineColor.setRgbF( color[0], color[1], color[2] );
         // balls: color, size
         dlg.setBallColor( ballColor );
         dlg.setBallSize( ballSize );
+        dlg.setBallScale( ballScale );
         // orientation: color, scale, 3d flag
         dlg.setOrientationColor( orientationColor );
         dlg.setOrientationSize( int( orientationScale * 100. ) );
           elem0dSize       = dlg.elem0dSize();
           ballColor        = dlg.ballColor();
           ballSize         = dlg.ballSize();
+          ballScale        = dlg.ballScale();
           orientationColor = dlg.orientationColor();
           orientationScale = dlg.orientationSize() / 100.;
           orientation3d    = dlg.orientation3d();
             // balls: color, size
             anActor->SetBallColor( ballColor.redF(), ballColor.greenF(), ballColor.blueF() );
             anActor->SetBallSize( ballSize );
+            anActor->SetBallScale( ballScale );
             // orientation: color, scale, 3d flag
             anActor->SetFacesOrientationColor( orientationColor.redF(), orientationColor.greenF(), orientationColor.blueF() );
             anActor->SetFacesOrientationScale( orientationScale );
     QString RefType = CheckTypeObject(selected.First());
     SALOME_ListIteratorOfListIO It(selected);
     for ( ; It.More(); It.Next())
-      {
-        Handle(SALOME_InteractiveObject) IObject = It.Value();
-        QString Type = CheckTypeObject(IObject);
-        if (Type.compare(RefType) != 0)
-          return "Heterogeneous Selection";
-      }
+    {
+      Handle(SALOME_InteractiveObject) IObject = It.Value();
+      QString Type = CheckTypeObject(IObject);
+      if (Type.compare(RefType) != 0)
+        return "Heterogeneous Selection";
+    }
 
     return RefType;
   }
 
+} //namespace
 
-  void SMESHGUI::OnEditDelete()
-  {
-    // VSR 17/11/04: check if all objects selected belong to SMESH component --> start
-    LightApp_SelectionMgr* aSel = SMESHGUI::selectionMgr();
-    SALOME_ListIO selected; aSel->selectedObjects( selected, QString::null, false );
+void SMESHGUI::OnEditDelete()
+{
+  // VSR 17/11/04: check if all objects selected belong to SMESH component --> start
+  LightApp_SelectionMgr* aSel = SMESHGUI::selectionMgr();
+  SALOME_ListIO selected; aSel->selectedObjects( selected, QString::null, false );
 
-    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
-    _PTR(StudyBuilder) aStudyBuilder = aStudy->NewBuilder();
-    _PTR(GenericAttribute) anAttr;
-    _PTR(AttributeIOR) anIOR;
-
-    int objectCount = 0;
-    QString aNameList;
-    QString aParentComponent = QString::null;
-    Handle(SALOME_InteractiveObject) anIO;
-    for( SALOME_ListIteratorOfListIO anIt( selected ); anIt.More(); anIt.Next() )
-    {
-      anIO = anIt.Value();
-      QString cur = anIO->getComponentDataType();
-      _PTR(SObject) aSO = aStudy->FindObjectID(anIO->getEntry());
-      if (aSO) {
-        // check if object is reference
-        _PTR(SObject) aRefSObj;
-        aNameList.append("\n    - ");
-        if ( aSO->ReferencedObject( aRefSObj ) ) {
-          QString aRefName = QString::fromStdString ( aRefSObj->GetName() );
-          aNameList.append( aRefName );
-          cur = QString::fromStdString ( aRefSObj->GetFatherComponent()->ComponentDataType() );
-        }
-        else
-          aNameList.append(anIO->getName());
-        objectCount++;
-      }
+  _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+  _PTR(StudyBuilder) aStudyBuilder = aStudy->NewBuilder();
+  _PTR(GenericAttribute) anAttr;
+  _PTR(AttributeIOR) anIOR;
 
-      if( aParentComponent.isNull() )
-        aParentComponent = cur;
-      else if( !aParentComponent.isEmpty() && aParentComponent!=cur )
-        aParentComponent = "";
+  int objectCount = 0;
+  QString aNameList;
+  QString aParentComponent = QString::null;
+  Handle(SALOME_InteractiveObject) anIO;
+  for( SALOME_ListIteratorOfListIO anIt( selected ); anIt.More(); anIt.Next() )
+  {
+    anIO = anIt.Value();
+    QString cur = anIO->getComponentDataType();
+    _PTR(SObject) aSO = aStudy->FindObjectID(anIO->getEntry());
+    if (aSO) {
+      // check if object is reference
+      _PTR(SObject) aRefSObj;
+      aNameList.append("\n    - ");
+      if ( aSO->ReferencedObject( aRefSObj ) ) {
+        QString aRefName = QString::fromStdString ( aRefSObj->GetName() );
+        aNameList.append( aRefName );
+        cur = QString::fromStdString ( aRefSObj->GetFatherComponent()->ComponentDataType() );
+      }
+      else
+        aNameList.append(anIO->getName());
+      objectCount++;
     }
 
-    if ( objectCount == 0 )
-      return; // No Valid Objects Selected
+    if( aParentComponent.isNull() )
+      aParentComponent = cur;
+    else if( !aParentComponent.isEmpty() && aParentComponent!=cur )
+      aParentComponent = "";
+  }
 
-    if ( aParentComponent != SMESHGUI::GetSMESHGUI()->name() )  {
-      SUIT_MessageBox::warning( SMESHGUI::desktop(),
-                                QObject::tr("ERR_ERROR"),
-                                QObject::tr("NON_SMESH_OBJECTS_SELECTED").arg( SMESHGUI::GetSMESHGUI()->moduleName() ) );
-      return;
-    }
-    // VSR 17/11/04: check if all objects selected belong to SMESH component <-- finish
-    if (SUIT_MessageBox::warning
-        (SMESHGUI::desktop(),
-         QObject::tr("SMESH_WRN_WARNING"),
-         QObject::tr("SMESH_REALLY_DELETE").arg( objectCount ).arg( aNameList ),
-         SUIT_MessageBox::Yes | SUIT_MessageBox::No,
-         SUIT_MessageBox::Yes) != SUIT_MessageBox::Yes)
-      return;
+  if ( objectCount == 0 )
+    return; // No Valid Objects Selected
 
-    SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
+  if ( aParentComponent != SMESHGUI::GetSMESHGUI()->name() )  {
+    SUIT_MessageBox::warning( SMESHGUI::desktop(),
+                              QObject::tr("ERR_ERROR"),
+                              QObject::tr("NON_SMESH_OBJECTS_SELECTED").arg( SMESHGUI::GetSMESHGUI()->moduleName() ) );
+    return;
+  }
+  // VSR 17/11/04: check if all objects selected belong to SMESH component <-- finish
+  if (SUIT_MessageBox::warning
+      (SMESHGUI::desktop(),
+       QObject::tr("SMESH_WRN_WARNING"),
+       QObject::tr("SMESH_REALLY_DELETE").arg( objectCount ).arg( aNameList ),
+       SUIT_MessageBox::Yes | SUIT_MessageBox::No,
+       SUIT_MessageBox::Yes) != SUIT_MessageBox::Yes)
+    return;
 
-    // Put the whole hierarchy of sub-objects of the selected SO's into a list and
-    // then treat them all starting from the deepest objects (at list back)
-    std::list< _PTR(SObject) > listSO;
-    SALOME_ListIteratorOfListIO It(selected);
-    for( ; It.More(); It.Next()) // loop on selected IO's
-    {
-      Handle(SALOME_InteractiveObject) IObject = It.Value();
-      if(IObject->hasEntry()) {
-        _PTR(SObject) aSO = aStudy->FindObjectID(IObject->getEntry());
-
-        // disable removal of "SMESH" component object
-        if(aSO->FindAttribute(anAttr, "AttributeIOR")){
-          anIOR = anAttr;
-          if ( engineIOR() == anIOR->Value().c_str() )
-            continue;
-        }
-        //Check the referenced object
-        _PTR(SObject) aRefSObject;
-        if ( aSO && aSO->ReferencedObject( aRefSObject ) )
-          aSO = aRefSObject; // Delete main Object instead of reference
-
-        listSO.push_back( aSO );
-        std::list< _PTR(SObject) >::iterator itSO = --listSO.end();
-        for ( ; itSO != listSO.end(); ++itSO ) {
-          _PTR(ChildIterator) it = aStudy->NewChildIterator( *itSO );
-          for (it->InitEx(false); it->More(); it->Next())
-            listSO.push_back( it->Value() );
-        }
+  SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
+
+  // Put the whole hierarchy of sub-objects of the selected SO's into a list and
+  // then treat them all starting from the deepest objects (at list back)
+  std::list< _PTR(SObject) > listSO;
+  SALOME_ListIteratorOfListIO It(selected);
+  for( ; It.More(); It.Next()) // loop on selected IO's
+  {
+    Handle(SALOME_InteractiveObject) IObject = It.Value();
+    if(IObject->hasEntry()) {
+      _PTR(SObject) aSO = aStudy->FindObjectID(IObject->getEntry());
+
+      // disable removal of "SMESH" component object
+      if(aSO->FindAttribute(anAttr, "AttributeIOR")){
+        anIOR = anAttr;
+        if ( engineIOR() == anIOR->Value().c_str() )
+          continue;
+      }
+      //Check the referenced object
+      _PTR(SObject) aRefSObject;
+      if ( aSO && aSO->ReferencedObject( aRefSObject ) )
+        aSO = aRefSObject; // Delete main Object instead of reference
+
+      listSO.push_back( aSO );
+      std::list< _PTR(SObject) >::iterator itSO = --listSO.end();
+      for ( ; itSO != listSO.end(); ++itSO ) {
+        _PTR(ChildIterator) it = aStudy->NewChildIterator( *itSO );
+        for (it->InitEx(false); it->More(); it->Next())
+          listSO.push_back( it->Value() );
       }
     }
-    // Check if none of objects to delete is referred from outside
-    std::list< _PTR(SObject) >::reverse_iterator ritSO;
-    for ( ritSO = listSO.rbegin(); ritSO != listSO.rend(); ++ritSO )
-    {
-      _PTR(SObject) SO = *ritSO;
-      if ( !SO ) continue;
-      std::vector<_PTR(SObject)> aReferences = aStudy->FindDependances( *ritSO  );
-      for (size_t i = 0; i < aReferences.size(); i++) {
-        _PTR(SComponent) aComponent = aReferences[i]->GetFatherComponent();
-        std::string type = aComponent->ComponentDataType();
-        if ( type != "SMESH" )
-        {
-          SUIT_MessageBox::warning( anApp->desktop(),
-                                    QObject::tr("WRN_WARNING"),
-                                    QObject::tr("DEP_OBJECT") );
-          return; // outside SMESH, there is an object depending on a SMESH object 
-        }
+  }
+  // Check if none of objects to delete is referred from outside
+  std::list< _PTR(SObject) >::reverse_iterator ritSO;
+  for ( ritSO = listSO.rbegin(); ritSO != listSO.rend(); ++ritSO )
+  {
+    _PTR(SObject) SO = *ritSO;
+    if ( !SO ) continue;
+    std::vector<_PTR(SObject)> aReferences = aStudy->FindDependances( *ritSO  );
+    for (size_t i = 0; i < aReferences.size(); i++) {
+      _PTR(SComponent) aComponent = aReferences[i]->GetFatherComponent();
+      std::string type = aComponent->ComponentDataType();
+      if ( type != "SMESH" )
+      {
+        SUIT_MessageBox::warning( anApp->desktop(),
+                                  QObject::tr("WRN_WARNING"),
+                                  QObject::tr("DEP_OBJECT") );
+        return; // outside SMESH, there is an object depending on a SMESH object
       }
     }
+  }
 
-    // Call mesh->Clear() to prevent loading mesh from file caused by hypotheses removal
-    for( It.Initialize( selected ); It.More(); It.Next()) // loop on selected IO's
-    {
-      Handle(SALOME_InteractiveObject) IObject = It.Value();
-      SMESH::SMESH_Mesh_var mesh = SMESH::IObjectToInterface< SMESH::SMESH_Mesh >( IObject );
-      if ( !mesh->_is_nil() )
-        mesh->Clear();
-    }
+  // Call mesh->Clear() to prevent loading mesh from file caused by hypotheses removal
+  for( It.Initialize( selected ); It.More(); It.Next()) // loop on selected IO's
+  {
+    Handle(SALOME_InteractiveObject) IObject = It.Value();
+    SMESH::SMESH_Mesh_var mesh = SMESH::IObjectToInterface< SMESH::SMESH_Mesh >( IObject );
+    if ( !mesh->_is_nil() )
+      mesh->Clear();
+  }
 
-    // Treat SO's in the list starting from the back
-    aStudyBuilder->NewCommand();  // There is a transaction
-    for ( ritSO = listSO.rbegin(); ritSO != listSO.rend(); ++ritSO )
-    {
-      _PTR(SObject) SO = *ritSO;
-      if ( !SO ) continue;
-      std::string anEntry = SO->GetID();
+  // Treat SO's in the list starting from the back
+  aStudyBuilder->NewCommand();  // There is a transaction
+  for ( ritSO = listSO.rbegin(); ritSO != listSO.rend(); ++ritSO )
+  {
+    _PTR(SObject) SO = *ritSO;
+    if ( !SO ) continue;
+    std::string anEntry = SO->GetID();
 
-      /** Erase graphical object and remove all its data **/
-      if(SO->FindAttribute(anAttr, "AttributeIOR")) {
-        SMESH::RemoveVisualObjectWithActors( anEntry.c_str(), true);
-      }
-      /** Remove an object from data structures **/
-      SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( SMESH::SObjectToObject( SO ));
-      SMESH::SMESH_subMesh_var   aSubMesh = SMESH::SMESH_subMesh::_narrow( SMESH::SObjectToObject( SO ));
-      if ( !aGroup->_is_nil() ) {                          // DELETE GROUP
-        SMESH::SMESH_Mesh_var aMesh = aGroup->GetMesh();
-        aMesh->RemoveGroup( aGroup );
-      }
-      else if ( !aSubMesh->_is_nil() ) {                   // DELETE SUBMESH
-        SMESH::SMESH_Mesh_var aMesh = aSubMesh->GetFather();
-        aMesh->RemoveSubMesh( aSubMesh );
+    /** Erase graphical object and remove all its data **/
+    if(SO->FindAttribute(anAttr, "AttributeIOR")) {
+      SMESH::RemoveVisualObjectWithActors( anEntry.c_str(), true);
+    }
+    /** Remove an object from data structures **/
+    SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( SMESH::SObjectToObject( SO ));
+    SMESH::SMESH_subMesh_var   aSubMesh = SMESH::SMESH_subMesh::_narrow( SMESH::SObjectToObject( SO ));
+    if ( !aGroup->_is_nil() ) {                          // DELETE GROUP
+      SMESH::SMESH_Mesh_var aMesh = aGroup->GetMesh();
+      aMesh->RemoveGroup( aGroup );
+    }
+    else if ( !aSubMesh->_is_nil() ) {                   // DELETE SUBMESH
+      SMESH::SMESH_Mesh_var aMesh = aSubMesh->GetFather();
+      aMesh->RemoveSubMesh( aSubMesh );
 
-        _PTR(SObject) aMeshSO = SMESH::FindSObject(aMesh);
-        if (aMeshSO)
-          SMESH::ModifiedMesh(aMeshSO, false, aMesh->NbNodes()==0);
+      _PTR(SObject) aMeshSO = SMESH::FindSObject(aMesh);
+      if (aMeshSO)
+        SMESH::ModifiedMesh(aMeshSO, false, aMesh->NbNodes()==0);
+    }
+    else {
+      Handle(SALOME_InteractiveObject) IObject = new SALOME_InteractiveObject
+        ( anEntry.c_str(), engineIOR().toLatin1().data(), SO->GetName().c_str() );
+      QString objType = CheckTypeObject(IObject);
+      if ( objType == "Hypothesis" || objType == "Algorithm" ) {// DELETE HYPOTHESIS
+        SMESH::RemoveHypothesisOrAlgorithmOnMesh(IObject);
+        aStudyBuilder->RemoveObjectWithChildren( SO );
       }
-      else {
-        Handle(SALOME_InteractiveObject) IObject = new SALOME_InteractiveObject
-          ( anEntry.c_str(), engineIOR().toLatin1().data(), SO->GetName().c_str() );
-        QString objType = CheckTypeObject(IObject);
-        if ( objType == "Hypothesis" || objType == "Algorithm" ) {// DELETE HYPOTHESIS
-          SMESH::RemoveHypothesisOrAlgorithmOnMesh(IObject);
-          aStudyBuilder->RemoveObjectWithChildren( SO );
-        }
-        else {// default action: remove SObject from the study
-              // san - it's no use opening a transaction here until UNDO/REDO is provided in SMESH
-              //SUIT_Operation *op = new SALOMEGUI_ImportOperation(myActiveStudy);
-              //op->start();
-          aStudyBuilder->RemoveObjectWithChildren( SO );
-          //op->finish();
-        }
+      else {// default action: remove SObject from the study
+        // san - it's no use opening a transaction here until UNDO/REDO is provided in SMESH
+        //SUIT_Operation *op = new SALOMEGUI_ImportOperation(myActiveStudy);
+        //op->start();
+        aStudyBuilder->RemoveObjectWithChildren( SO );
+        //op->finish();
       }
-    } /* listSO back loop */
+    }
+  } /* listSO back loop */
 
-    aStudyBuilder->CommitCommand();
+  aStudyBuilder->CommitCommand();
 
-    /* Clear any previous selection */
-    SALOME_ListIO l1;
-    aSel->setSelectedObjects( l1 );
+  /* Clear any previous selection */
+  SALOME_ListIO l1;
+  aSel->setSelectedObjects( l1 );
 
-    SMESHGUI::GetSMESHGUI()->updateObjBrowser();
-  }
-//} namespace
+  SMESHGUI::GetSMESHGUI()->updateObjBrowser();
+}
 
 extern "C" {
   SMESHGUI_EXPORT CAM_Module* createModule()
@@ -2668,7 +2693,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       else if ( theCommandID == 410 )
         aDlg = new SMESHGUI_UnionOfTrianglesDlg(this);
       else if ( theCommandID == 419 )
-        aDlg = new SMESHGUI_CuttingIntoTetraDlg(this);
+        aDlg = new SMESHGUI_SplitVolumesDlg(this);
       else
         aDlg = new SMESHGUI_CuttingOfQuadsDlg(this);
 
@@ -5016,6 +5041,8 @@ void SMESHGUI::createPreferences()
                              LightApp_Preferences::IntSpin, "SMESH", "elem0d_size");
   int ballSize = addPreference(tr("PREF_BALL_SIZE"), elemGroup,
                              LightApp_Preferences::IntSpin, "SMESH", "ball_elem_size");
+  double ballScale = addPreference(tr("PREF_BALL_SCALE"), elemGroup,
+                             LightApp_Preferences::DblSpin, "SMESH", "ball_elem_scale");
   int elemW  = addPreference(tr("PREF_WIDTH"), elemGroup,
                              LightApp_Preferences::IntSpin, "SMESH", "element_width");
   int outW  = addPreference(tr("PREF_OUTLINE_WIDTH"), elemGroup,
@@ -5029,6 +5056,10 @@ void SMESHGUI::createPreferences()
   setPreferenceProperty( ballSize, "min", 1 );
   setPreferenceProperty( ballSize, "max", 10 );
 
+  setPreferenceProperty( ballScale, "min", 1e-2 );
+  setPreferenceProperty( ballScale, "max", 1e7 );
+  setPreferenceProperty( ballScale, "step", 0.5 );
+
   setPreferenceProperty( elemW, "min", 1 );
   setPreferenceProperty( elemW, "max", 5 );
 
@@ -5701,6 +5732,7 @@ void SMESHGUI::storeVisualParameters (int savePoint)
                   sizeStr << QString::number((int)aSmeshActor->Get0DSize());
                   sizeStr << "ball";
                   sizeStr << QString::number((int)aSmeshActor->GetBallSize());
+                  sizeStr << QString::number((double)aSmeshActor->GetBallScale());
                   sizeStr << "shrink";
                   sizeStr << QString::number(aSmeshActor->GetShrinkFactor());
                   sizeStr << "orientation";
@@ -6285,6 +6317,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
               int outlineWidth = -1;
               int elem0dSize = -1;
               int ballSize = -1;
+              double ballScale = -1.0;
               double shrinkSize = -1;
               double orientationSize = -1;
               bool orientation3d = false;
@@ -6312,11 +6345,16 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
                   i++;
                 }
                 else if ( type == "ball" ) {
-                  // ball size is given as single integer value
-                  if ( i+1 >= sizes.count() ) break;                    // format error
-                  int v = sizes[i+1].toInt( &bOk ); if ( !bOk ) break;  // format error
-                  ballSize = v;
-                  i++;
+                  // balls are specified by two values: size:scale, where
+                  // - size - is a integer value specifying size
+                  // - scale - is a double value specifying scale factor
+                  if ( i+1 >= sizes.count() ) break;                       // format error
+                  int v1 = sizes[i+1].toInt( &bOk ); if ( !bOk ) break;    // format error
+                  if ( i+2 >= sizes.count() ) break;                       // format error
+                  double v2 = sizes[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  ballSize = v1;
+                  ballScale = v2;
+                  i += 2;
                 }
                 else if ( type == "shrink" ) {
                   // shrink factor is given as single floating point value
@@ -6352,6 +6390,9 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
               // ball size
               if ( ballSize > 0 )
                 aSmeshActor->SetBallSize( ballSize );
+              // ball scale
+              if ( ballScale > 0.0 )
+                aSmeshActor->SetBallScale( ballScale );
               // shrink factor
               if ( shrinkSize > 0 )
                 aSmeshActor->SetShrinkFactor( shrinkSize );
index 74978853cc99abbb48e31b3ce25b321604daf26b..5ae600d3ace5830dcc4698a2683aaea851d48316 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 10dbf474ef741f9a199bf35b2de6e2b77e298b26..9cbad861c453b08361e8a96bc38836bd8742ff6c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8bf9ca1db66ee63ba5184417edde945eeca78e71..d887c14515047eb14bb5fae3881d402a6be655bc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 87c9b0ba785aa9bebc9a9b641a4087a13880bcf3..79588047cb0abfb36b46746cfd9387503fc559e0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -230,7 +230,7 @@ namespace SMESH
       for (int i = 0, iEnd = theIds.size(); i < iEnd; i++){
         anIds->InsertId(0,theIds[i]);
         vtkIdType anId = myBallPolyData->InsertNextCell(VTK_POLY_VERTEX,anIds);
-        double d = theDiameter;
+        double d = theDiameter * theActor->GetBallScale();
         aScalars->SetTuple(anId,&d);
         anIds->Reset();
       }
index aa4bd8e20cfedee0bbc758516da4e3af7c3bb078..af99005e2e41d816486518f92fc80c5fb435b2ac 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9294690246b5d93a8cdee2933ef85e22ef5dfdf5..31a6214dc95fe7eb5bb8430e22af1aff7d0068a5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -947,7 +947,7 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
 
     // get selected mesh
     SALOME_ListIO aList;
-    mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
+    mySelectionMgr->selectedObjects(aList);
 
     if (aList.Extent() != 1)
     {
index fa5bb51ce14d3f8d5a89def62a19177aacef390a..bc336e668722d1f6e07a1efedb054c4447eca7fb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a1cf8baafa8a2f54a8971c0946b072b20235c033..f25ed72cc0e5dd1e3eac755cccc95607fed77b13 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3236114b4b17b1889107088a4a5b4d38106ed622..a4fd91a49e55bb148bd166a41060b69b98849f2d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 83608766368bcfe78c4e762ecba9e5790d2ea586..5df21bca00fcd09f657a66f75d6294807f6406f8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -32,6 +32,9 @@
 #include "SMESHGUI_VTKUtils.h"
 #include "SMESHGUI_SpinBox.h"
 
+#include <QtxDoubleSpinSlider.h>
+#include <QtxIntSpinSlider.h>
+
 #include <SMESH_Actor.h>
 #include <SMESH_ActorUtils.h>
 
@@ -463,69 +466,38 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg( SMESHGUI* theModule, SVTK_ViewWindow
   CBRelativeOrientation->addItem( tr("ALONG_ZX") );
   GroupParametersLayout->addWidget( CBRelativeOrientation, 0, 1 );
 
-  TLValueDistance = new QLabel( GroupParameters );
-  TLValueDistance->setObjectName( "TLValueDistance" );
-  TLValueDistance->setAlignment( Qt::AlignCenter );
-  TLValueDistance->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  QFont fnt = TLValueDistance->font(); fnt.setBold( true ); TLValueDistance->setFont( fnt );
-  GroupParametersLayout->addWidget( TLValueDistance, 1, 1 );
-
   TextLabelDistance = new QLabel( tr("SMESH_DISTANCE"), GroupParameters );
   TextLabelDistance->setObjectName( "TextLabelDistance" );
-  GroupParametersLayout->addWidget( TextLabelDistance, 2, 0 );
-
-  SliderDistance = new QSlider( Qt::Horizontal, GroupParameters );
-  SliderDistance->setObjectName( "SliderDistance" );
-  SliderDistance->setMinimumSize( 300, 0 );
-  SliderDistance->setMinimum( 0 );
-  SliderDistance->setMaximum( 100 );
-  SliderDistance->setSingleStep( 1 );
-  SliderDistance->setPageStep( 10 );
-  SliderDistance->setTracking( false );
-  GroupParametersLayout->addWidget( SliderDistance, 2, 1 );
-
-  TLValueRotation1 = new QLabel( GroupParameters );
-  TLValueRotation1->setObjectName( "TLValueRotation1" );
-  TLValueRotation1->setAlignment( Qt::AlignCenter );
-  TLValueRotation1->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  TLValueRotation1->setFont( fnt );
-  GroupParametersLayout->addWidget( TLValueRotation1, 3, 1 );
+  GroupParametersLayout->addWidget( TextLabelDistance, 1, 0 );
+
+  SpinSliderDistance = new QtxDoubleSpinSlider( 0., 1., 0.01, GroupParameters );
+  SpinSliderDistance->setObjectName( "SpinSliderDistance" );
+  SpinSliderDistance->setPrecision( precision );
+  QFont fnt = SpinSliderDistance->font(); fnt.setBold( true ); SpinSliderDistance->setFont( fnt );
+  GroupParametersLayout->addWidget( SpinSliderDistance, 1, 1 );
+  
+  QString aUnitRot = "\xB0";
 
   TextLabelRotation1 = new QLabel( tr("ROTATION_AROUND_X_Y2Z"), GroupParameters );
   TextLabelRotation1->setObjectName( "TextLabelRotation1" );
-  GroupParametersLayout->addWidget( TextLabelRotation1, 4, 0 );
-
-  SliderRotation1 = new QSlider( Qt::Horizontal, GroupParameters );
-  SliderRotation1->setObjectName( "SliderRotation1" );
-  SliderRotation1->setMinimumSize( 300, 0 );
-  SliderRotation1->setMinimum( -180 );
-  SliderRotation1->setMaximum( 180 );
-  SliderRotation1->setSingleStep( 1 );
-  SliderRotation1->setPageStep( 10 );
-  SliderRotation1->setTracking(false);
-  GroupParametersLayout->addWidget( SliderRotation1, 4, 1 );
-
-  TLValueRotation2 = new QLabel( GroupParameters );
-  TLValueRotation2->setObjectName( "TLValueRotation2" );
-  TLValueRotation2->setAlignment( Qt::AlignCenter );
-  TLValueRotation2->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  TLValueRotation2->setFont( fnt );
-  GroupParametersLayout->addWidget( TLValueRotation2, 5, 1 );
+  GroupParametersLayout->addWidget( TextLabelRotation1, 2, 0 );
+
+  SpinSliderRotation1 = new QtxIntSpinSlider( -180, 180, 1, GroupParameters );
+  SpinSliderRotation1->setObjectName( "SpinSliderRotation1" );
+  SpinSliderRotation1->setUnit( aUnitRot );
+  SpinSliderRotation1->setFont( fnt );
+  GroupParametersLayout->addWidget( SpinSliderRotation1, 2, 1 );
 
   TextLabelRotation2 = new QLabel(tr("ROTATION_AROUND_Y_X2Z"), GroupParameters);
   TextLabelRotation2->setObjectName( "TextLabelRotation2" );
   TextLabelRotation2->setObjectName( "TextLabelRotation2" );
-  GroupParametersLayout->addWidget( TextLabelRotation2, 6, 0 );
-
-  SliderRotation2 = new QSlider( Qt::Horizontal, GroupParameters );
-  SliderRotation2->setObjectName( "SliderRotation2" );
-  SliderRotation2->setMinimumSize( 300, 0 );
-  SliderRotation2->setMinimum( -180 );
-  SliderRotation2->setMaximum( 180 );
-  SliderRotation2->setSingleStep( 1 );
-  SliderRotation2->setPageStep( 10 );
-  SliderRotation2->setTracking(false);
-  GroupParametersLayout->addWidget( SliderRotation2, 6, 1 );
+  GroupParametersLayout->addWidget( TextLabelRotation2, 3, 0 );
+
+  SpinSliderRotation2 = new QtxIntSpinSlider( -180, 180, 1, GroupParameters );
+  SpinSliderRotation2->setObjectName( "SpinSliderRotation2" );
+  SpinSliderRotation2->setUnit( aUnitRot );
+  SpinSliderRotation2->setFont( fnt );
+  GroupParametersLayout->addWidget( SpinSliderRotation2, 3, 1 );
 
   /***************************************************************/
   QWidget* CheckBoxWidget = new QWidget( this );
@@ -598,12 +570,9 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg( SMESHGUI* theModule, SVTK_ViewWindow
   connect( CBAbsoluteOrientation, SIGNAL ( activated ( int ) ), this, SLOT( onSelectAbsoluteOrientation( int ) ) ) ;
 
   connect( CBRelativeOrientation, SIGNAL( activated( int ) ), this, SLOT( onSelectRelativeOrientation( int ) ) );
-  connect( SliderDistance,   SIGNAL( sliderMoved( int ) ),  this, SLOT( SliderDistanceHasMoved( int ) ) );
-  connect( SliderDistance,   SIGNAL( valueChanged( int ) ),  this, SLOT( SliderDistanceHasMoved( int ) ) );
-  connect( SliderRotation1,   SIGNAL( sliderMoved( int ) ),  this, SLOT( SliderRotation1HasMoved( int ) ) );
-  connect( SliderRotation1,   SIGNAL( valueChanged( int ) ),  this, SLOT( SliderRotation1HasMoved( int ) ) );
-  connect( SliderRotation2,   SIGNAL( sliderMoved( int ) ),  this, SLOT( SliderRotation2HasMoved( int ) ) );
-  connect( SliderRotation2,   SIGNAL( valueChanged( int ) ),  this, SLOT( SliderRotation2HasMoved( int ) ) );
+  connect( SpinSliderDistance, SIGNAL( valueChanged( double ) ),  this, SLOT( SetCurrentPlaneParam() ) );
+  connect( SpinSliderRotation1, SIGNAL( valueChanged( int ) ), this, SLOT( SetCurrentPlaneParam() ) );
+  connect( SpinSliderRotation2, SIGNAL( valueChanged( int ) ), this, SLOT( SetCurrentPlaneParam() ) );
 
   connect( PreviewCheckBox, SIGNAL( toggled( bool ) ), this, SLOT( OnPreviewToggle( bool ) ) );
   connect( AutoApplyCheckBox, SIGNAL( toggled( bool ) ), this, SLOT( onAutoApply( bool ) ) );
@@ -652,7 +621,7 @@ SMESHGUI_ClippingDlg::~SMESHGUI_ClippingDlg()
 */
 double SMESHGUI_ClippingDlg::getDistance() const
 {
-  return TLValueDistance->text().toDouble();
+  return SpinSliderDistance->value();
 }
 
 /*!
@@ -660,7 +629,7 @@ double SMESHGUI_ClippingDlg::getDistance() const
 */
 void SMESHGUI_ClippingDlg::setDistance( const double theDistance )
 {
-  SliderDistance->setValue( theDistance*100 );
+  SpinSliderDistance->setValue( theDistance );
 }
 
 /*!
@@ -668,7 +637,7 @@ void SMESHGUI_ClippingDlg::setDistance( const double theDistance )
 */
 double SMESHGUI_ClippingDlg::getRotation1() const
 {
-  return TLValueRotation1->text().remove("\xB0").toInt();
+  return SpinSliderRotation1->value();
 }
 
 /*!
@@ -676,7 +645,7 @@ double SMESHGUI_ClippingDlg::getRotation1() const
 */
 double SMESHGUI_ClippingDlg::getRotation2() const
 {
-  return TLValueRotation2->text().remove("\xB0").toInt();
+  return SpinSliderRotation2->value();
 }
 
 /*!
@@ -684,8 +653,8 @@ double SMESHGUI_ClippingDlg::getRotation2() const
 */
 void SMESHGUI_ClippingDlg::setRotation (const double theRot1, const double theRot2)
 {
-  SliderRotation1->setValue( theRot1 );
-  SliderRotation2->setValue( theRot2 );
+  SpinSliderRotation1->setValue( int(floor(theRot1)) );
+  SpinSliderRotation2->setValue( int(floor(theRot2)) );
 }
 
 /*!
@@ -762,22 +731,22 @@ void rotationToNormal ( double theRotation[2],
   switch ( theOrientation ) {
   case 0:
   case 1:
-       theDir[0][1] = anU[0];
-       theDir[0][2] = aV[0];
-       theDir[1][0] = anU[1];
-       theDir[1][2] = aV[1];
+    theDir[0][1] = anU[0];
+    theDir[0][2] = aV[0];
+    theDir[1][0] = anU[1];
+    theDir[1][2] = aV[1];
     break;
   case 2:
-       theDir[0][2] = anU[0];
-       theDir[0][0] = aV[0];
-       theDir[1][1] = anU[1];
-       theDir[1][0] = aV[1];
+    theDir[0][2] = anU[0];
+    theDir[0][0] = aV[0];
+    theDir[1][1] = anU[1];
+    theDir[1][0] = aV[1];
     break;
   case 3:
-       theDir[0][0] = anU[0];
-       theDir[0][1] = aV[0];
-       theDir[1][2] = anU[1];
-       theDir[1][1] = aV[1];
+    theDir[0][0] = anU[0];
+    theDir[0][1] = aV[0];
+    theDir[1][2] = anU[1];
+    theDir[1][1] = aV[1];
     break;
   }
 
@@ -799,12 +768,12 @@ bool SMESHGUI_ClippingDlg::AddPlane ( SMESH::TActorList       theActorList,
 
   int anOrientation;
   if ( thePlane->PlaneMode == SMESH::Absolute )
-   anOrientation = thePlane->myAbsoluteOrientation;
+    anOrientation = thePlane->myAbsoluteOrientation;
   else if ( thePlane->PlaneMode == SMESH::Relative )
-   anOrientation = thePlane->myRelativeOrientation + 1;
+    anOrientation = thePlane->myRelativeOrientation + 1;
 
   if ( anOrientation == 0 ) {
-       // compute a direction for plane in absolute mode
+    // compute a direction for plane in absolute mode
     double znam = sqrt( thePlane->Dx*thePlane->Dx + thePlane->Dy*thePlane->Dy + thePlane->Dz*thePlane->Dz );
     double aRotation = acos( thePlane->Dy/znam )/aCoeff;
     if ( thePlane->Dy >= 0.0 && thePlane->Dz >= 0.0 )      thePlane->myAngle[0] = 90.0 + aRotation;
@@ -905,10 +874,10 @@ bool SMESHGUI_ClippingDlg::AddPlane ( SMESH::TActorList       theActorList,
   for ( ; anIter != theActorList.end(); anIter++ )
     if( vtkActor* aVTKActor = *anIter )
       if( SMESH_Actor* anActor = SMESH_Actor::SafeDownCast( aVTKActor ) ) {
-       if( thePlane->IsOpenGLClipping )
+        if( thePlane->IsOpenGLClipping )
           anActor->AddOpenGLClippingPlane( thePlane->InvertPlane() );
-       else
-               anActor->AddClippingPlane( thePlane );
+        else
+          anActor->AddClippingPlane( thePlane );
       }
 
   return true;
@@ -1008,13 +977,10 @@ void SMESHGUI_ClippingDlg::initParam()
 
   CBAbsoluteOrientation->setCurrentIndex(0);
 
-  TLValueDistance->setText( "0.5" );
-  TLValueRotation1->setText( "0\xB0" );
-  TLValueRotation2->setText( "0\xB0" );
+  SpinSliderDistance->setValue( 0.5 );
+  SpinSliderRotation1->setValue( 0 );
+  SpinSliderRotation2->setValue( 0 );
   CBRelativeOrientation->setCurrentIndex( 0 );
-  SliderDistance->setValue( 50 );
-  SliderRotation1->setValue( 0 );
-  SliderRotation2->setValue( 0 );
 }
 
 /*!
@@ -1066,9 +1032,9 @@ void SMESHGUI_ClippingDlg::synchronize()
   }
   else if ( CurrentMode == SMESH::Relative ) {
     CBRelativeOrientation->setEnabled( anIsControlsEnable );
-    SliderDistance->setEnabled( anIsControlsEnable );
-    SliderRotation1->setEnabled( anIsControlsEnable );
-    SliderRotation2->setEnabled( anIsControlsEnable );
+    SpinSliderDistance->setEnabled( anIsControlsEnable );
+    SpinSliderRotation1->setEnabled( anIsControlsEnable );
+    SpinSliderRotation2->setEnabled( anIsControlsEnable );
   }
 }
 
@@ -1167,9 +1133,13 @@ void SMESHGUI_ClippingDlg::updateActorItem( QListWidgetItem* theItem,
         else if( theItem->checkState() == Qt::Unchecked && anIsPushed )
           anActorList.remove( anActor );
 
-        SMESH::ComputeBounds( anActorList, myBounds );
-        myPreviewWidget->PlaceWidget( myBounds[0], myBounds[1], myBounds[2],
-                                                 myBounds[3], myBounds[4], myBounds[5] );
+        if( SMESH::ComputeBounds( anActorList, myBounds ) ) {
+          myPreviewWidget->On();
+          myPreviewWidget->PlaceWidget( myBounds[0], myBounds[1], myBounds[2],
+                                        myBounds[3], myBounds[4], myBounds[5] );
+        }
+        else
+          myPreviewWidget->Off();
       }
     }
   }
@@ -1278,9 +1248,14 @@ void SMESHGUI_ClippingDlg::ClickOnNew()
 
     bool anIsBlocked = ActorList->blockSignals( true );
 
-    SMESH::ComputeBounds( anActorList, myBounds );
-    myPreviewWidget->PlaceWidget( myBounds[0],myBounds[1],myBounds[2],
-                                  myBounds[3],myBounds[4],myBounds[5] );
+    if( SMESH::ComputeBounds( anActorList, myBounds ) ) {
+      myPreviewWidget->On();
+      myPreviewWidget->PlaceWidget( myBounds[0], myBounds[1], myBounds[2],
+                                    myBounds[3], myBounds[4], myBounds[5] );
+    }
+    else
+      myPreviewWidget->Off();
+
     synchronize();
     SetCurrentPlaneParam();
 
@@ -1365,9 +1340,15 @@ void SMESHGUI_ClippingDlg::onSelectPlane ( int theIndex )
     }
   }
   myIsSelectPlane = false;
-  SMESH::ComputeBounds( aPlaneData.ActorList, myBounds );
-  myPreviewWidget->PlaceWidget( myBounds[0], myBounds[1], myBounds[2],
-                                         myBounds[3], myBounds[4], myBounds[5] );
+
+  if( SMESH::ComputeBounds( aPlaneData.ActorList, myBounds ) ) {
+    myPreviewWidget->On();
+    myPreviewWidget->PlaceWidget( myBounds[0], myBounds[1], myBounds[2],
+                                  myBounds[3], myBounds[4], myBounds[5] );
+  }
+  else
+    myPreviewWidget->Off();
+
   SetCurrentPlaneParam();
 
   // Actors
@@ -1454,9 +1435,9 @@ void SMESHGUI_ClippingDlg::SetCurrentPlaneParam()
   double aRot[2] = { getRotation1(), getRotation2() };
   int anOrient;
   if ( aPlane->PlaneMode == SMESH::Absolute )
-       anOrient = CBAbsoluteOrientation->currentIndex();
+    anOrient = CBAbsoluteOrientation->currentIndex();
   else if ( aPlane->PlaneMode == SMESH::Relative )
-       anOrient = CBRelativeOrientation->currentIndex() + 1;
+    anOrient = CBRelativeOrientation->currentIndex() + 1;
 
   if ( aPlane->PlaneMode == SMESH::Relative ) {
     aPlane->myAngle[0] = aRot[0];
@@ -1466,7 +1447,7 @@ void SMESHGUI_ClippingDlg::SetCurrentPlaneParam()
   }
 
   if ( anOrient == 0 ) {
-       // compute a direction for plane in absolute mode
+    // compute a direction for plane in absolute mode
     double znam = sqrt( aPlane->Dx*aPlane->Dx + aPlane->Dy*aPlane->Dy + aPlane->Dz*aPlane->Dz );
     double aRotation = acos( aPlane->Dy/znam )/aCoeff;
     if ( aPlane->Dy >= 0.0 && aPlane->Dz >= 0.0 )     aRot[0] = 90.0 + aRotation;
@@ -1508,7 +1489,7 @@ void SMESHGUI_ClippingDlg::SetCurrentPlaneParam()
     anOrigin[1] = aPlane->Y;
     anOrigin[2] = aPlane->Z;
   }
-  
+
   if( anIsOk ) {
     aPlane->SetNormal( aNormal );
     aPlane->SetOrigin( anOrigin );
@@ -1614,7 +1595,7 @@ void SMESHGUI_ClippingDlg::setBoundsForPreviewWidget()
     if( anOrigin[2] < aBounds[4] ) {
       myBounds[4] = anOrigin[2]; isBoundsChanged = true; }
     if( anOrigin[2] > aBounds[5] ) {
-       myBounds[5] = anOrigin[2]; isBoundsChanged = true; }
+        myBounds[5] = anOrigin[2]; isBoundsChanged = true; }
   }
 
   if( isBoundsChanged )
@@ -1698,10 +1679,8 @@ void SMESHGUI_ClippingDlg::absolutePlaneToRelative ( double theOrigin[3], double
   else if( aDirection[0] < 0 && aDirection[1] < 0 && aDirection[2] < 0 && aRot[0] > 0 ) {
     aRot[0] = aRotation1 + 270.0; aRot[1] = aRotation2 + 90.0; }
 
-  SliderRotation1HasMoved( qRound( aRot[0] ) );
-  SliderRotation1->setValue( qRound( aRot[0] ) );
-  SliderRotation2HasMoved( qRound( aRot[1] ) );
-  SliderRotation2->setValue( qRound( aRot[1] ) );
+  SpinSliderRotation1->setValue( qRound( aRot[0] ) );
+  SpinSliderRotation2->setValue( qRound( aRot[1] ) );
 
   int aCurPlaneIndex = ComboBoxPlanes->currentIndex();
   const SMESH::TPlaneData& aPlaneData = myPlanes[ aCurPlaneIndex ];
@@ -1717,8 +1696,7 @@ void SMESHGUI_ClippingDlg::absolutePlaneToRelative ( double theOrigin[3], double
   else if( aDist < 0.0 )
     aDist = 0.0;
 
-  SliderDistanceHasMoved( qRound( aDist*100 ) );
-  SliderDistance->setValue( qRound( aDist*100 ) );
+  SpinSliderDistance->setValue( qRound( aDist*100 ) );
   return;
 }
 
@@ -1803,10 +1781,10 @@ void SMESHGUI_ClippingDlg::ClickOnApply()
       for( ; anIter3 != anActorList.end(); anIter3++ )
         if( vtkActor* aVTKActor = *anIter3 )
           if( SMESH_Actor* anActor = SMESH_Actor::SafeDownCast( aVTKActor ) ) {
-               if( anOrientedPlane->IsOpenGLClipping )
+            if( anOrientedPlane->IsOpenGLClipping )
               anActor->AddOpenGLClippingPlane( anOrientedPlane->InvertPlane() );
-               else
-                       anActor->AddClippingPlane( anOrientedPlane );
+            else
+              anActor->AddClippingPlane( anOrientedPlane );
           }
 
       SMESH::ClippingPlaneInfo aClippingPlaneInfo;
@@ -1816,11 +1794,9 @@ void SMESHGUI_ClippingDlg::ClickOnApply()
       aClippingPlaneInfoList.push_back( aClippingPlaneInfo );
     }
 
-    SMESH_Actor* anSMESHActor;
     anAllActors->InitTraversal();
     while( vtkActor* aVTKActor = anAllActors->GetNextActor() )
       if( SMESH_Actor* anActor = SMESH_Actor::SafeDownCast( aVTKActor ) ) {
-       anSMESHActor = anActor;
         anActor->SetOpenGLClippingPlane();
       }
 
@@ -1851,34 +1827,6 @@ void SMESHGUI_ClippingDlg::ClickOnHelp()
   }
 }
 
-/*!
-  SLOT: Called when value of slider distance change
-*/
-void SMESHGUI_ClippingDlg::SliderDistanceHasMoved( int value )
-{
-  double new_value = value/100.;
-  TLValueDistance->setText( QString("%1").arg( new_value ) );
-  SetCurrentPlaneParam();
-}
-
-/*!
-  SLOT: Called when value of slider rotation1 change
-*/
-void SMESHGUI_ClippingDlg::SliderRotation1HasMoved( int value )
-{
-  TLValueRotation1->setText( QString("%1\xB0").arg( value ) );
-  SetCurrentPlaneParam();
-}
-
-/*!
-  SLOT: Called when value of slider rotation2 change
-*/
-void SMESHGUI_ClippingDlg::SliderRotation2HasMoved( int value )
-{
-  TLValueRotation2->setText( QString("%1\xB0").arg( value ) );
-  SetCurrentPlaneParam();
-}
-
 void SMESHGUI_ClippingDlg::onSelectAbsoluteOrientation( int mode )
 {
   bool isUserMode = (mode==0);
index b66c6f149fd7f02c1605617b06b509bbb9ecf93e..bab2458ed20826fac0629768a3c923f4bf2b7cdf 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -60,6 +60,8 @@ class SALOME_Actor;
 class SMESHGUI;
 class SMESH_Actor;
 class QtxDoubleSpinBox;
+class QtxDoubleSpinSlider;
+class QtxIntSpinSlider;
 class vtkActor;
 class vtkDataSetMapper;
 class vtkPlaneSource;
@@ -224,12 +226,9 @@ private:
   QLabel*                 TextLabelDistance;
   QLabel*                 TextLabelRotation1;
   QLabel*                 TextLabelRotation2;
-  QLabel*                 TLValueDistance;
-  QLabel*                 TLValueRotation1;
-  QLabel*                 TLValueRotation2;
-  QSlider*                SliderDistance;
-  QSlider*                SliderRotation1;
-  QSlider*                SliderRotation2;
+  QtxDoubleSpinSlider*    SpinSliderDistance;
+  QtxIntSpinSlider*       SpinSliderRotation1;
+  QtxIntSpinSlider*       SpinSliderRotation2;
   QComboBox*              CBRelativeOrientation;
 
   QCheckBox*              PreviewCheckBox;
@@ -266,9 +265,6 @@ public slots:
   void ClickOnApply();
   void ClickOnHelp();
 
-  void SliderDistanceHasMoved(int);
-  void SliderRotation1HasMoved(int);
-  void SliderRotation2HasMoved(int);
   void onSelectAbsoluteOrientation( int );
   void onSelectRelativeOrientation( int );
   void onReset();
index e99cf69b592378bf87049289742b059f487b82cf..c0524289ce5ca025b9b1322b736a623b2ee63809 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -382,7 +382,11 @@ namespace SMESH
         if ( !geom->_is_nil() ) {
           GEOM::ListOfLong_var list = geom->GetSubShapeIndices();
           if ( list->length() == 1 && list[0] == subShapeID )
-            subSO = it->Value();
+          {
+            GEOM::GEOM_Object_var mainGO = geom->GetMainShape();
+            if ( aMainShape->IsSame( mainGO ))
+              subSO = it->Value();
+          }
         }
       }
     }
@@ -439,8 +443,10 @@ namespace SMESH
   QString shapeText(int subShapeID, GEOM::GEOM_Object_var aMainShape )
   {
     QString text;
-    if ( _PTR(SObject) aSO = getSubShapeSO( subShapeID, aMainShape ))
-      text = aSO->GetName().c_str();
+    if ( _PTR(SObject) aSO = getSubShapeSO( subShapeID, aMainShape )) {
+      text  = aSO->GetName().c_str();
+      text += QString(" (%1)").arg( aSO->GetID().c_str() );
+    }
     else {
       text = QString("#%1").arg( subShapeID );
       GEOM::GEOM_Object_wrap shape = getSubShape( subShapeID, aMainShape );
@@ -613,8 +619,8 @@ QFrame* SMESHGUI_ComputeDlg::createMainFrame (QWidget* theParent, bool ForEval)
 
   // add all widgets to aFrame
   QVBoxLayout* aLay = new QVBoxLayout(aFrame);
-  aLay->setMargin( 0 );
-  aLay->setSpacing( 0 );
+  aLay->setMargin( MARGIN );
+  aLay->setSpacing( SPACING );
   aLay->addWidget( aPixGrp );
   aLay->addWidget( nameBox );
   aLay->addWidget( myBriefInfo );
@@ -748,10 +754,12 @@ SMESHGUI_ComputeDlg_QThreadQDialog::SMESHGUI_ComputeDlg_QThreadQDialog(QWidget
 
   QLabel * nbNodesName = new QLabel(tr("SMESH_MESHINFO_NODES"), this );
   QLabel * nbElemsName = new QLabel(tr("SMESH_MESHINFO_ELEMENTS"), this );
-  QLabel * freeRAMName = new QLabel(tr("SMESH_FREERAM"), this );
   nbNodesLabel = new QLabel("0", this );
   nbElemsLabel = new QLabel("0", this );
+#ifndef WIN32
+  QLabel * freeRAMName = new QLabel(tr("SMESH_FREERAM"), this );
   freeRAMLabel = new QLabel("", this );
+#endif
   progressBar  = new QProgressBar(this);
   progressBar->setMinimum( 0 );
   progressBar->setMaximum( 1000 );
@@ -1189,7 +1197,8 @@ void SMESHGUI_BaseComputeOp::onPublishShape()
             if ( so->_is_nil() ) {
               CORBA::String_var name  = so->GetName();
               CORBA::String_var entry = so->GetID();
-              table()->item( r, COL_SHAPE     )->setText( name.in() );
+              QString       shapeText = QString("%1 (%2)").arg( name.in() ).arg( entry.in() );
+              table()->item( r, COL_SHAPE     )->setText( shapeText );
               table()->item( r, COL_PUBLISHED )->setText( entry.in() );
             }
             break;
@@ -1202,7 +1211,8 @@ void SMESHGUI_BaseComputeOp::onPublishShape()
       if ( !so->_is_nil() ) {
         CORBA::String_var name  = so->GetName();
         CORBA::String_var entry = so->GetID();
-        table()->item( row, COL_SHAPE     )->setText( name.in() );
+        QString       shapeText = QString("%1 (%2)").arg( name.in() ).arg( entry.in() );
+        table()->item( row, COL_SHAPE     )->setText( shapeText );
         table()->item( row, COL_PUBLISHED )->setText( entry.in() );
       }
     }
index d67709d3757c5e568067eb99b6038258ab95d94a..ad1bd8f985245931be0bfccaa75a2c516498083a 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index cc6fec761f04bc96660ec7493e7a2fbd2d4cb02d..59855bb494c0266f13a2df482356ba0ef5180d95 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 458eb4806b2f39b9d98e686758bd1167f31d187b..d3b461fe598be27c4e83ff0b3afefd78a0af4a3d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 33e1aaf078e01388236138f6436385dff420a9c2..70b7493cbcbe65f005424027f3a96c6157f0da58 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f18c5810a9c59b6eeb761a3a26ffc0885f864da9..023789c6675f95423c6183a4585e05b9d3b061c9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 0e1f921cceaa87d0bf89feba2907a8aea78f7e8c..39665f3a5aa1c179d129e3047a31673e8e6faec2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -477,7 +477,7 @@ void SMESHGUI_CopyMeshDlg::SelectionIntoArgument()
 
   // get selected mesh
   SALOME_ListIO aList;
-  mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
+  mySelectionMgr->selectedObjects(aList);
   int nbSel = aList.Extent();
   if (nbSel != 1)
     return;
index 7622662da99cde5e1397ef1896f7512593c772da..a81a37669c1887a931600c5ae084fd616a62b699 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9f2daa28dcf12f6f4ea1bf6e37ab7bf5efa79e73..34771755d5ca05bc1724e060442c09f4ea933f83 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c4acc0e3969166e54a466f3372517a8e480e5fc8..515c230d10df5517cfcc0969a077d9eb2ec1d5ca 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8b52bb3f98ee64a6cd81fd94b2f4848232963247..73fac9a8451add34f314b5100eb126f264774504 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 57469283d845af6e7c7f77547bd4c27343dddd28..4f6de47b981acb7ebf9f628558a66d61d2ea8920 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e619b81f00342af9668113e747363317dc66b545..5d0a1ee7d79e20292be6efda627b9077ffad4fe4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9c69f9427d472103ff68db399686f00ef86d135a..e9f3f2ade945e0df3254450c9d5a35804cf9210c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 23525fe698bd67f1cb683f366d3a31aa730a212a..a5fcf31c59cc9a4a266bb14e3e5f13fd5ef9f47a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -46,9 +46,10 @@ SMESHGUI_Dialog::SMESHGUI_Dialog( QWidget* parent, const bool modal,
 : LightApp_Dialog( parent == 0 ? desktop() : parent, "", modal, allowResize, flags )
 {
   int pr = prefix( "SMESH" );
-  typeName( pr + SMESH::MESH ) = tr( "DLG_MESH" );
+  typeName( pr + SMESH::MESH       ) = tr( "DLG_MESH" );
   typeName( pr + SMESH::HYPOTHESIS ) = tr( "DLG_HYPO" );
-  typeName( pr + SMESH::ALGORITHM ) = tr( "DLG_ALGO" );
+  typeName( pr + SMESH::ALGORITHM  ) = tr( "DLG_ALGO" );
+  typeName( prefix( "GEOM" )       ) = tr( "DLG_GEOM" );
   setButtonText(1, tr("SMESH_BUT_APPLY_AND_CLOSE")); //rename OK to Apply and Close
   if ( flags & Close )
     setButtonPosition( Right, Close );
index 5d250a16bd3a1fe830df9c97698a76e6591171fe..582af42437beecf71f9d2aa94cb93c94da959d1f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 58a34d61be10b0fc9a8ab7a1fbac382e069b3a34..4c672d2b54415b750a73191ef21c5c4201c7aeb8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c0b10b05f6ce688f5afd34209792ee6ceaeded39..446bedce14cea7acc36349f2662e4c75fa8cc8df 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 24d4a37cb16e4fa32eb41159554f965daf968455..368aa77ca6624905b542afd43c2ca2571e31d680 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -110,6 +110,7 @@ SMESHGUI_DuplicateNodesDlg::SMESHGUI_DuplicateNodesDlg( SMESHGUI* theModule )
   QPixmap iconWithoutElem (aResMgr->loadPixmap("SMESH", tr("ICON_SMESH_DUPLICATE_NODES")));
   QPixmap iconWithElem (aResMgr->loadPixmap("SMESH", tr("ICON_SMESH_DUPLICATE_NODES_WITH_ELEM")));
   QPixmap iconElemOnly (aResMgr->loadPixmap("SMESH", tr("ICON_SMESH_DUPLICATE_ELEM_ONLY")));
+  QPixmap iconGrpBoundary (aResMgr->loadPixmap("SMESH", tr("ICON_SMESH_DUPLICATE_GROUP_BOUNDARY")));
   QPixmap iconSelect (aResMgr->loadPixmap("SMESH", tr("ICON_SELECT")));
 
   // Main layout
@@ -130,13 +131,17 @@ SMESHGUI_DuplicateNodesDlg::SMESHGUI_DuplicateNodesDlg( SMESHGUI* theModule )
   aRadioButton2->setIcon(iconWithElem);
   QRadioButton* aRadioButton3 = new QRadioButton(aConstructorsBox);
   aRadioButton3->setIcon(iconElemOnly);
+  QRadioButton* aRadioButton4 = new QRadioButton(aConstructorsBox);
+  aRadioButton4->setIcon(iconGrpBoundary);
   
   aConstructorsBoxLayout->addWidget(aRadioButton1);
   aConstructorsBoxLayout->addWidget(aRadioButton2);
   aConstructorsBoxLayout->addWidget(aRadioButton3);
+  aConstructorsBoxLayout->addWidget(aRadioButton4);
   myGroupConstructors->addButton(aRadioButton1, 0);
   myGroupConstructors->addButton(aRadioButton2, 1);
   myGroupConstructors->addButton(aRadioButton3, 2);
+  myGroupConstructors->addButton(aRadioButton4, 3);
 
   // Arguments
   myGroupArguments = new QGroupBox(this);
@@ -162,8 +167,8 @@ SMESHGUI_DuplicateNodesDlg::SMESHGUI_DuplicateNodesDlg( SMESHGUI* theModule )
   myLineEdit3 = new QLineEdit(myGroupArguments);
   myLineEdit3->setReadOnly(true);
 
-  myCheckBoxNewElemGroup = new QCheckBox(tr("CONSTRUCT_NEW_GROUP_ELEMENTS"), myGroupArguments);
-  myCheckBoxNewNodeGroup = new QCheckBox(tr("CONSTRUCT_NEW_GROUP_NODES"), myGroupArguments);
+  myCheckBox1 = new QCheckBox(tr("CONSTRUCT_NEW_GROUP_ELEMENTS"), myGroupArguments);
+  myCheckBox2 = new QCheckBox(tr("CONSTRUCT_NEW_GROUP_NODES"), myGroupArguments);
 
   aGroupArgumentsLayout->addWidget(myTextLabel1,    0, 0);
   aGroupArgumentsLayout->addWidget(mySelectButton1, 0, 1);
@@ -174,8 +179,8 @@ SMESHGUI_DuplicateNodesDlg::SMESHGUI_DuplicateNodesDlg( SMESHGUI* theModule )
   aGroupArgumentsLayout->addWidget(myTextLabel3,    2, 0);
   aGroupArgumentsLayout->addWidget(mySelectButton3, 2, 1);
   aGroupArgumentsLayout->addWidget(myLineEdit3,     2, 2);
-  aGroupArgumentsLayout->addWidget(myCheckBoxNewElemGroup, 3, 0);
-  aGroupArgumentsLayout->addWidget(myCheckBoxNewNodeGroup, 4, 0);
+  aGroupArgumentsLayout->addWidget(myCheckBox1, 3, 0);
+  aGroupArgumentsLayout->addWidget(myCheckBox2, 4, 0);
   aGroupArgumentsLayout->setRowStretch(5, 1);
   
   // Buttons
@@ -207,8 +212,8 @@ SMESHGUI_DuplicateNodesDlg::SMESHGUI_DuplicateNodesDlg( SMESHGUI* theModule )
   aMainLayout->addWidget(myGroupArguments);
   aMainLayout->addWidget(aGroupButtons);
   
-  myCheckBoxNewElemGroup->setChecked(true);
-  myCheckBoxNewNodeGroup->setChecked(true);
+  myCheckBox1->setChecked(true);
+  myCheckBox2->setChecked(true);
 
   // Initialize the dialog
   Init();
@@ -223,6 +228,8 @@ SMESHGUI_DuplicateNodesDlg::SMESHGUI_DuplicateNodesDlg( SMESHGUI* theModule )
   connect(mySelectButton2, SIGNAL (clicked()), this, SLOT(onEditCurrentArgument()));
   connect(mySelectButton3, SIGNAL (clicked()), this, SLOT(onEditCurrentArgument()));
 
+  connect(myCheckBox2,    SIGNAL(stateChanged(int)), SLOT(updateButtons()));
+
   connect(myButtonOk,     SIGNAL(clicked()), this, SLOT(onOk()));
   connect(myButtonClose,  SIGNAL(clicked()), this, SLOT(reject()));
   connect(myButtonApply,  SIGNAL(clicked()), this, SLOT(onApply()));
@@ -298,8 +305,9 @@ void SMESHGUI_DuplicateNodesDlg::onConstructorsClicked (int constructorId)
       myTextLabel1->setText(tr("GROUP_NODES_TO_DUPLICATE"));
       myTextLabel2->setText(tr("GROUP_NODES_TO_REPLACE"));
 
-      myCheckBoxNewElemGroup->hide();
-      myCheckBoxNewNodeGroup->show();
+      myCheckBox1->hide();
+      myCheckBox2->show();
+      myCheckBox2->setText( tr("CONSTRUCT_NEW_GROUP_NODES"));
       
       // Hide the third field
       myTextLabel2->show();
@@ -319,8 +327,10 @@ void SMESHGUI_DuplicateNodesDlg::onConstructorsClicked (int constructorId)
       myTextLabel2->setText(tr("GROUP_NODES_NOT_DUPLICATE"));
       myTextLabel3->setText(tr("GROUP_ELEMS_TO_REPLACE"));
       
-      myCheckBoxNewElemGroup->show();
-      myCheckBoxNewNodeGroup->show();
+      myCheckBox1->show();
+      myCheckBox2->show();
+      myCheckBox1->setText( tr("CONSTRUCT_NEW_GROUP_ELEMENTS"));
+      myCheckBox2->setText( tr("CONSTRUCT_NEW_GROUP_NODES"));
 
       // Show the third field
       myTextLabel2->show();
@@ -338,8 +348,30 @@ void SMESHGUI_DuplicateNodesDlg::onConstructorsClicked (int constructorId)
       myGroupArguments->setTitle(tr("DUPLICATION_ONLY_ELEMS"));
       myTextLabel1->setText(tr("GROUP_ELEMS_TO_DUPLICATE"));
       
-      myCheckBoxNewElemGroup->show();
-      myCheckBoxNewNodeGroup->hide();
+      myCheckBox1->show();
+      myCheckBox1->setText( tr("CONSTRUCT_NEW_GROUP_ELEMENTS"));
+      myCheckBox2->hide();
+
+      // Hide the second and the third field
+      myTextLabel2->hide();
+      mySelectButton2->hide();
+      myLineEdit2->hide();
+      myTextLabel3->hide();
+      mySelectButton3->hide();
+      myLineEdit3->hide();
+
+      break;
+    }
+  case 3:
+    {
+      // Set text to the group of arguments and to all the labels
+      myGroupArguments->setTitle(tr("DUPLICATION_GROUP_BOUNDARY"));
+      myTextLabel1->setText(tr("GROUP_VOLUME_GROUPS"));
+      
+      myCheckBox1->show();
+      myCheckBox2->show();
+      myCheckBox1->setText( tr("CREATE_JOINT_ELEMENTS"));
+      myCheckBox2->setText( tr("ON_ALL_BOUNDARIES"));
 
       // Hide the second and the third field
       myTextLabel2->hide();
@@ -352,7 +384,9 @@ void SMESHGUI_DuplicateNodesDlg::onConstructorsClicked (int constructorId)
       break;
     }
   }
-  
+  myGroupArguments->hide();
+  myGroupArguments->show();
+  this->resize(this->sizeHint().width(), this->minimumSizeHint().height());
   // Process selection
   onSelectionChanged();
 }
@@ -367,8 +401,8 @@ bool SMESHGUI_DuplicateNodesDlg::onApply()
 
   BusyLocker lock( myBusy );
  
-  bool toCreateElemGroup = myCheckBoxNewElemGroup->isChecked();
-  bool toCreateNodeGroup = myCheckBoxNewNodeGroup->isChecked();
+  bool toCreateElemGroup = myCheckBox1->isChecked();
+  bool toCreateNodeGroup = myCheckBox2->isChecked();
   int operationMode      = myGroupConstructors->checkedId();
   
   // Apply changes
@@ -451,14 +485,28 @@ bool SMESHGUI_DuplicateNodesDlg::onApply()
       }
       break;
     }
+    case 3:
+    {
+      bool createJointElems = myCheckBox1->isChecked();
+      bool onAllBoundaries  = myCheckBox2->isChecked();
+
+      SMESH::ListOfGroups_var g1 = new SMESH::ListOfGroups();
+      g1->length( myGroups1.count() );
+      for ( int i = 0; i < myGroups1.count(); i++ )
+        g1[i] = myGroups1[i];
+
+      result = aMeshEditor->DoubleNodesOnGroupBoundaries( g1.in(), createJointElems, onAllBoundaries );
+
+      break;
     }
+    } // switch( operationMode )
   }
   catch (const SALOME::SALOME_Exception& S_ex) {
     SalomeApp_Tools::QtCatchCorbaException(S_ex);
   }
   catch ( const std::exception& exc ) {
     INFOS( "Follow exception was cought:\n\t" << exc.what() );
-  } 
+  }
   catch (...) {
     INFOS( "Unknown exception was cought !!!" );
   }
@@ -553,6 +601,9 @@ void SMESHGUI_DuplicateNodesDlg::onSelectionChanged()
       case 2:
         ok = ( aGroupType != SMESH::NODE );
         break;
+      case 3:
+        ok = ( aGroupType == SMESH::VOLUME );
+        break;
       }
     }
     if ( ok ) aGroups << aGroup;
@@ -575,8 +626,15 @@ void SMESHGUI_DuplicateNodesDlg::onSelectionChanged()
     else if ( myCurrentLineEdit == myLineEdit3 ) myGroups3.clear();
     myCurrentLineEdit->clear();
   }
-
   // Enable/disable "Apply and Close" and "Apply" buttons
+  updateButtons();
+}
+
+/*!
+ * \brief Enable/disable "Apply and Close" and "Apply" buttons
+ */
+void SMESHGUI_DuplicateNodesDlg::updateButtons()
+{
   bool isDataValid = isValid();
   myButtonOk->setEnabled( isDataValid );
   myButtonApply->setEnabled( isDataValid );
@@ -610,12 +668,15 @@ void SMESHGUI_DuplicateNodesDlg::onEditCurrentArgument()
 */
 bool SMESHGUI_DuplicateNodesDlg::isValid()
 {
-  return myGroupConstructors->checkedId() == 1 ?
-    ( !myGroups1.isEmpty() && !myGroups3.isEmpty()  ) :
-    ( !myGroups1.isEmpty() );
+  switch( myGroupConstructors->checkedId() )
+  {
+  case 1:  return ( !myGroups1.isEmpty() && !myGroups3.isEmpty()  );
+  case 3:  return ( myGroups1.count() > ( myCheckBox2->isChecked() ? 0 : 1 ));
+  default: return !myGroups1.isEmpty();
+  }
+  return false;
 }
 
-
 /*!
   \brief SLOT called when dialog shoud be deativated.
 */
index 1a7d9da94ae1315ea8d20bfd3ae925c45f84c4ec..5bf5247d292f9e606bbe6e4a60a2944321b5a6ae 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -83,6 +83,8 @@ private slots:
 
   void                    onDeactivate();
 
+  void                    updateButtons();
+
 private:
   QLineEdit*              myCurrentLineEdit;
   
@@ -98,8 +100,8 @@ private:
   QLineEdit*              myLineEdit1;
   QLineEdit*              myLineEdit2;
   QLineEdit*              myLineEdit3;
-  QCheckBox*              myCheckBoxNewElemGroup;
-  QCheckBox*              myCheckBoxNewNodeGroup;
+  QCheckBox*              myCheckBox1;
+  QCheckBox*              myCheckBox2;
 
   QPushButton*            myButtonOk;
   QPushButton*            myButtonApply;
index 9e18fdab67e0780a7471fd6f6b2bcc28111935e3..8c2d0ef51f2fecd701ea4d4d802207f4bd03afcc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 01907a798ba71cac3cecfbd9e1f6e345b9b46a92..bedc111efa03cdcd1b1373ea4ce2e6f7a0d3ac63 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c9145b2ad6ecea9126f1211578e33ccec94b3857..5dba32360f703511d8bb65eb19559ffd724f2acf 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -487,6 +487,9 @@ void SMESHGUI_ExtrusionDlg::ConstructorsClicked (int constructorId)
   if (CheckBoxMesh->isChecked())
     onSelectMesh(true);
 
+  myEditCurrentArgument->hide();
+  myEditCurrentArgument->show();
+
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
 }
 
@@ -823,7 +826,7 @@ void SMESHGUI_ExtrusionDlg::SelectionIntoArgument()
   }
   // get selected mesh
   SALOME_ListIO aList;
-  mySelectionMgr->selectedObjects(aList, SVTK_Viewer::Type());
+  mySelectionMgr->selectedObjects(aList);
   int nbSel = SMESH::GetNameOfSelectedIObjects(mySelectionMgr, aString);
   if (nbSel != 1)
     return;
index 22b693b281e62af777d00052096ba66009fecf8f..c3acc56d0c3f57e3c2e3cefef9befe2aadeed81b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx b/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx
new file mode 100644 (file)
index 0000000..d178095
--- /dev/null
@@ -0,0 +1,250 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "SMESHGUI_FieldSelectorWdg.h"
+
+#include "SMESHGUI_Utils.h"
+#include "SMESHGUI_GEOMGenUtils.h"
+
+#include <SALOMEDSClient_Study.hxx>
+#include <GEOM_wrap.hxx>
+
+#include <QGroupBox>
+#include <QTreeWidget>
+#include <QTreeWidgetItem>
+#include <QTreeWidgetItemIterator>
+#include <QVBoxLayout>
+#include <QLabel>
+#include "SMESHGUI.h"
+
+namespace
+{
+  QTreeWidgetItem* createItem( QTreeWidget*     tree,
+                               const QString&   text,
+                               const int        index,
+                               QTreeWidgetItem* parentItem=0)
+  {
+    QTreeWidgetItem* item;
+    if ( parentItem )
+      item = new QTreeWidgetItem( parentItem );
+    else
+      item = new QTreeWidgetItem( tree );
+    item->setText( 0, text );
+    item->setData( 0, Qt::UserRole, index );
+    item->setFlags( item->flags() | Qt::ItemIsUserCheckable | Qt::ItemIsEditable );
+    item->setCheckState( 0, Qt::Unchecked );
+    item->setExpanded( true );
+    if ( index < 0 )
+    {
+      QFont f = item->font( 0 );
+      f.setItalic( true );
+      item->setFont( 0, f );
+    }
+    return item;
+  }
+}
+
+//--------------------------------------------------------------------------------
+/*!
+ * \brief Constructor of SMESHGUI_FieldSelectorWdg
+ */
+SMESHGUI_FieldSelectorWdg::SMESHGUI_FieldSelectorWdg( QWidget* p )
+  :QGroupBox( tr("FIELDS_TO_EXPORT"), p )
+{
+  setCheckable( true );
+  myTree = new QTreeWidget( this );
+  myTree->setHeaderHidden( true );
+  
+  QVBoxLayout* lay = new QVBoxLayout( this );
+  lay->addWidget( myTree );
+
+  connect( myTree, SIGNAL( itemChanged(QTreeWidgetItem*, int)),
+           this,   SLOT  ( onItemCheck(QTreeWidgetItem*, int)));
+}
+
+//--------------------------------------------------------------------------------
+/*!
+ * \brief Retrieves all fields defined on geometry of given meshes
+ */
+bool SMESHGUI_FieldSelectorWdg::
+GetAllFeilds(const QList< QPair< SMESH::SMESH_IDSource_var, QString > >& meshes,
+             QList< QPair< GEOM::ListOfFields_var, QString > >&          fields)
+{
+  myFields = & fields;
+  myTree->clear();
+  
+  _PTR(Study) study = SMESH::GetActiveStudyDocument();
+  GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
+  GEOM::GEOM_IFieldOperations_wrap fieldOp = geomGen->GetIFieldOperations( study->StudyId() );
+
+  for ( int iM = 0; iM < meshes.count(); ++iM )
+  {
+    GEOM::ListOfFields_var fields;
+    QString                geoAss;
+
+    SMESH::SMESH_Mesh_var mesh = meshes[iM].first->GetMesh();
+    if ( !mesh->_is_nil() && mesh->HasShapeToMesh() )
+    {
+      SMESH::array_of_ElementType_var elemTypes = meshes[iM].first->GetTypes();
+      if ( &elemTypes.in() && elemTypes->length() > 0 )
+      {
+        QTreeWidgetItem* meshItem = createItem( myTree, meshes[iM].second, iM );
+
+        GEOM::GEOM_Object_var shape = mesh->GetShapeToMesh();
+        fields = fieldOp->GetFields( shape );
+        for ( size_t iF = 0; iF < fields->length(); ++iF )
+        {
+          GEOM::field_data_type dataType = fields[ iF ]->GetDataType();
+          if ( dataType == GEOM::FDT_String )
+            continue;
+          GEOM::ListOfLong_var stepIDs = fields[ iF ]->GetSteps();
+          if ( stepIDs->length() < 1 )
+            continue;
+          GEOM::string_array_var comps = fields[ iF ]->GetComponents();
+          if ( comps->length() < 1 )
+            continue;
+          CORBA::Short dim = fields[iF]->GetDimension();
+          if ( dim < 0 )
+            continue; // "whole shape" field ignored
+
+          CORBA::String_var name = fields[iF]->GetName();
+          createItem( myTree, name.in(), iF, meshItem );
+        }
+        QString geoAss;
+        for ( size_t i = 0; i < elemTypes->length(); ++i )
+        {
+          QString name;
+          switch ( elemTypes[i] ) {
+          case SMESH::NODE:   name = "_vertices_"; break;
+          case SMESH::EDGE:   name = "_edges_"   ; break;
+          case SMESH::FACE:   name = "_faces_"   ; break;
+          case SMESH::VOLUME: name = "_solids_"  ; break;
+          default: continue;
+          }
+          geoAss += name[1];
+          createItem( myTree, name, -1, meshItem );
+        }
+        if ( !geoAss.isEmpty() && !geoAss.count('v') )
+        {
+          createItem( myTree, "_vertices_", -1, meshItem );
+        }
+      }
+    } // if ( mesh->HasShapeToMesh() )
+
+    if ( ! &fields.in() )
+      fields = new GEOM::ListOfFields();
+
+    myFields->push_back( qMakePair( fields, QString() ));
+
+  } // loop on meshes
+
+  setChecked( false );
+
+  return myTree->topLevelItemCount();
+}
+
+//--------------------------------------------------------------------------------
+/*!
+ * \brief Filter off not selected fields from myFields
+ */
+bool SMESHGUI_FieldSelectorWdg::GetSelectedFeilds()
+{
+  int nbSelected = 0;
+  if ( myTree->isEnabled() )
+    for ( size_t i = 0; i < myTree->topLevelItemCount(); ++i )
+    {
+      QTreeWidgetItem* meshItem = myTree->topLevelItem( i );
+      int iM = meshItem->data( 0, Qt::UserRole ).toInt();
+
+      GEOM::ListOfFields& fields = (*myFields)[ iM ].first.inout();
+      QString&            geoAss = (*myFields)[ iM ].second;
+
+      int nbF = 0;
+      QTreeWidgetItemIterator it ( meshItem, QTreeWidgetItemIterator::Checked );
+      if ( *it == meshItem ) ++it;
+      for ( ; *it ; ++it, ++nbSelected )
+      {
+        if ( !(*it)->parent() )
+          break; // next mesh item
+
+        int iF = (*it)->data( 0, Qt::UserRole ).toInt();
+        if ( iF < 0 )
+        {
+          geoAss += (*it)->text(0)[1];
+        }
+        else
+        {
+          if ( nbF != iF )
+            fields[ nbF ] = fields[ iF ];
+          ++nbF;
+        }
+      }
+      fields.length( nbF );
+    }
+  else
+  {
+    for ( size_t iF = 0; iF < myFields->count(); ++iF )
+    {
+      GEOM::ListOfFields& fields = (*myFields)[ iF ].first.inout();
+      fields.length( 0 );
+    }
+  }
+  return nbSelected;
+}
+
+//--------------------------------------------------------------------------------
+/*!
+ * \brief SLOT called when a tree item is checked
+ */
+void SMESHGUI_FieldSelectorWdg::onItemCheck(QTreeWidgetItem * item, int column)
+{
+  myTree->blockSignals( true );
+  if ( !item->parent() ) // mesh item
+  {
+    Qt::CheckState st = item->checkState(0);
+    QTreeWidgetItemIterator it( item );
+    for ( ++it; *it ; ++it )
+      if ( !(*it)->parent() )
+        break; // next mesh item
+      else
+        (*it)->setCheckState( 0, st );
+  }
+  else // field item
+  {
+    // update CheckState of a parent mesh item
+    QTreeWidgetItem* meshItem = item->parent();
+    Qt::CheckState st = item->checkState(0);
+    QTreeWidgetItemIterator it( meshItem );
+    for ( ++it; *it ; ++it )
+      if ( !(*it)->parent() )
+      {
+        break; // next mesh item
+      }
+      else if ( (*it)->checkState(0) != st )
+      {
+        st = Qt::PartiallyChecked;
+        break;
+      }
+    meshItem->setCheckState( 0, st );
+  }
+  myTree->blockSignals( false );
+}
diff --git a/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.h b/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.h
new file mode 100644 (file)
index 0000000..feaa834
--- /dev/null
@@ -0,0 +1,61 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef STDMESHERSGUI_FieldSelectorWdg_H
+#define STDMESHERSGUI_FieldSelectorWdg_H
+
+#include "SMESH_SMESHGUI.hxx"
+
+#include <SALOMEconfig.h>
+#include CORBA_CLIENT_HEADER(SMESH_Mesh)
+#include CORBA_CLIENT_HEADER(GEOM_Gen)
+
+#include <QGroupBox>
+
+class QTreeWidget;
+class QTreeWidgetItem;
+
+/*!
+ * \brief Widget listing all fields available for export to MED file
+ */
+class SMESHGUI_EXPORT SMESHGUI_FieldSelectorWdg : public QGroupBox
+{
+  Q_OBJECT
+
+ public:
+  SMESHGUI_FieldSelectorWdg( QWidget* = 0 );
+
+  bool GetAllFeilds(const QList< QPair< SMESH::SMESH_IDSource_var, QString > >& meshes,
+                    QList< QPair< GEOM::ListOfFields_var,          QString > >& fields);
+
+  bool GetSelectedFeilds();
+
+ private slots:
+  
+  void onItemCheck(QTreeWidgetItem * item, int column);
+
+ private:
+
+  QList< QPair< GEOM::ListOfFields_var, QString > > * myFields;
+  QTreeWidget*                                        myTree;
+};
+
+#endif // STDMESHERSGUI_FieldSelectorWdg_H
index 498a72dad9aff3aedf291bb0f69ae41f6040ee50..587b43042e827f5bb7cc7cd1119959f77abf5ca7 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2cab5a95bbc5f08737bedf0b320eba4ecbce0bfd..afbf6e9c1ff0bc217ccd77955464cfcaf88ec39a 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f52be45dd52ee19dbee12c7d9da7e66e31317bf5..7e7eeed5072697dfb89a216e13d131a433b05c27 100755 (executable)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 98d2cfafad0b098a7d0865bc47691439402fc018..ad76aae449582c29e08a9b8d7eb54a931fc4e7cf 100755 (executable)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 95e02173e8edea037f28fc4711fef1cb87bb7dfa..a6daed8fc8d89f0186cb4767e585adb6e7c49af4 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -51,6 +51,9 @@ IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_FacesFilter, SMESHGUI_Filter)
 IMPLEMENT_STANDARD_HANDLE(SMESHGUI_VolumesFilter, SMESHGUI_Filter)
 IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_VolumesFilter, SMESHGUI_Filter)
 
+IMPLEMENT_STANDARD_HANDLE(SMESHGUI_VolumeShapeFilter, SMESHGUI_Filter)
+IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_VolumeShapeFilter, SMESHGUI_Filter)
+
 /*
   Class       : SMESHGUI_PredicateFilter
   Description : Selection filter for VTK viewer. This class aggregate object
@@ -492,3 +495,86 @@ bool SMESHGUI_VolumesFilter::IsNodeFilter() const
 {
   return false;
 }
+
+
+/*
+  Class       : SMESHGUI_VolumeShapeFilter
+  Description : Verify whether selected cell is a volume of a certain shape
+*/
+
+
+//=======================================================================
+// name    : SMESHGUI_VolumeShapeFilter::SMESHGUI_VolumeShapeFilter
+// Purpose : Constructor
+//=======================================================================
+SMESHGUI_VolumeShapeFilter::SMESHGUI_VolumeShapeFilter(const SMDSAbs_GeometryType shape)
+  : SMESHGUI_Filter(), myGeometryType( shape )
+{
+}
+
+//=======================================================================
+// name    : SMESHGUI_VolumeShapeFilter::IsValid
+// Purpose : Verify whether selected cell is a volume of a certain shape
+//=======================================================================
+bool SMESHGUI_VolumeShapeFilter::IsValid( const int theCellId ) const
+{
+  if ( myActor == 0 || theCellId < 1 )
+    return false;
+
+  SMESH_Actor* anActor = dynamic_cast< SMESH_Actor* >( myActor );
+  if ( !anActor || anActor->GetObject() == 0 )
+    return false;
+
+  SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
+  const SMDS_MeshElement* anElem = aMesh->FindElement( anActor->GetElemObjId( theCellId ) );
+
+  return anElem && anElem->GetGeomType() == myGeometryType;
+}
+
+//=======================================================================
+// name    : SMESHGUI_VolumeShapeFilter::IsValid
+// Purpose : Verify whether selected cell is volume
+//=======================================================================
+bool SMESHGUI_VolumeShapeFilter::IsObjValid( const int theObjId ) const
+{
+  if ( myActor == 0 )
+    return false;
+
+  SMESH_Actor* anActor = dynamic_cast< SMESH_Actor* >( myActor );
+  if ( !anActor || anActor->GetObject() == 0 )
+    return false;
+
+  SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh();
+  const SMDS_MeshElement* anElem = aMesh->FindElement( theObjId );
+
+  return anElem && anElem->GetGeomType() == myGeometryType;
+}
+
+//=======================================================================
+// name    : SMESHGUI_VolumeShapeFilter::GetId
+// Purpose : Get ID of the filter. Must return value from SMESHGUI_FilterType
+//           enumeration. All filters must have different ids
+//=======================================================================
+int SMESHGUI_VolumeShapeFilter::GetId() const
+{
+  return GetId( myGeometryType );
+}
+
+//=======================================================================
+//function : GetId
+//purpose  : Compose filter ID basing on 
+//=======================================================================
+
+int SMESHGUI_VolumeShapeFilter::GetId( SMDSAbs_GeometryType shape )
+{
+  return SMESH::FirstGeometryTypeFilter + shape;
+}
+
+//=======================================================================
+// name    : SMESHGUI_VolumeShapeFilter::IsNodeFilter
+// Purpose : Returns true if filter is intended for nodes
+//=======================================================================
+bool SMESHGUI_VolumeShapeFilter::IsNodeFilter() const
+{
+  return false;
+}
index 26c5feffd1fed0a0b64b2b7a3b7016e7bc3c9fb6..ab68a6b1b7421c3d0e80e994431e192a787dae7b 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -29,6 +29,7 @@
 
 // SMESH includes
 #include "SMESH_SMESHGUI.hxx"
+#include "SMDSAbs_ElementType.hxx"
 
 // SALOME GUI includes
 #include <VTKViewer_Filter.h>
@@ -42,15 +43,17 @@ class SALOME_Actor;
 namespace SMESH
 {
   enum SMESHGUI_FilterType {
-    UnknownFilter      = -1,
-    NodeFilter         =  0,
-    EdgeFilter         =  1,
-    FaceFilter         =  2,
-    VolumeFilter       =  3,
-    AllElementsFilter  =  4,
-    QuadFilter         =  5,
-    TriaFilter         =  6,
-    LastFilter
+    UnknownFilter           = -1,
+    NodeFilter              =  0,
+    EdgeFilter              =  1,
+    FaceFilter              =  2,
+    VolumeFilter            =  3,
+    AllElementsFilter       =  4,
+    QuadFilter              =  5,
+    TriaFilter              =  6,
+    FirstGeometryTypeFilter,
+    FirstEntityTypeFilter   = FirstGeometryTypeFilter + SMDSGeom_NONE,
+    LastFilter              = FirstEntityTypeFilter   + SMDSEntity_Last
   };
 };
 
@@ -181,10 +184,34 @@ public:
   Standard_EXPORT virtual bool IsValid( const int ) const;
   Standard_EXPORT virtual bool IsObjValid( const int ) const;
   Standard_EXPORT virtual int  GetId() const;
-  Standard_EXPORT virtual bool IsNodeFilter() const;  
+  Standard_EXPORT virtual bool IsNodeFilter() const;
 
 public:
   DEFINE_STANDARD_RTTI(SMESHGUI_VolumesFilter)
 };
 
+/*
+  Class       : SMESHGUI_VolumeShapeFilter
+  Description : Verify whether selected cell is a volume of a certain shape
+*/
+
+DEFINE_STANDARD_HANDLE(SMESHGUI_VolumeShapeFilter, SMESHGUI_Filter)
+
+class SMESHGUI_VolumeShapeFilter : public SMESHGUI_Filter
+{
+  SMDSAbs_GeometryType myGeometryType;
+public:
+  Standard_EXPORT SMESHGUI_VolumeShapeFilter(const SMDSAbs_GeometryType shape);
+
+  Standard_EXPORT virtual bool IsValid( const int ) const;
+  Standard_EXPORT virtual bool IsObjValid( const int ) const;
+  Standard_EXPORT virtual int  GetId() const;
+  Standard_EXPORT virtual bool IsNodeFilter() const;
+
+  Standard_EXPORT static int GetId( SMDSAbs_GeometryType geom );
+
+public:
+  DEFINE_STANDARD_RTTI(SMESHGUI_VolumeShapeFilter)
+};
+
 #endif // SMESHGUI_FILTER_H
index 3ffd0419bf4d0c124edf92abc76d61980ead5c5e..4211d08bffaa52994ee96cba3463069744b36e4c 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1149,7 +1149,7 @@ bool SMESHGUI_FilterTable::IsValid (const bool theMess, const int theEntityType)
       if (aTable->text(i, 2).isEmpty())
         errMsg = tr( "ERROR" );
     }
-    else
+    else // check correctness of a numeric value
     {
       bool aRes = false;
       bool isSignalsBlocked = aTable->signalsBlocked();
@@ -1159,10 +1159,6 @@ bool SMESHGUI_FilterTable::IsValid (const bool theMess, const int theEntityType)
 
       if (!aRes && aTable->isEditable(i, 2))
         errMsg = tr( "ERROR" );
-      else if (aType == SMESH::EDGE &&
-               GetCriterionType(i, aType) == SMESH::FT_MultiConnection &&
-               aThreshold == 1)
-        errMsg = tr( "MULTIEDGES_ERROR" );
     }
 
     if (!errMsg.isEmpty()) {
@@ -1814,7 +1810,7 @@ void SMESHGUI_FilterTable::onCriterionChanged (const int row, const int col, con
   case SMESH::FT_EqualVolumes: break;
 
   case SMESH::FT_MultiConnection:
-  case SMESH::FT_MultiConnection2D: anIsIntCriterion = true; break;
+  case SMESH::FT_MultiConnection2D: anIsIntCriterion = true; nbCompareSigns = 3; break;
 
   case SMESH::FT_Length:
   case SMESH::FT_Length2D: anIsDoubleCriterion = true; break;
index 157869821dccf3c50c15ab7de6a009bff1746cbb..e00941329b5a1479e7e3f28bea65bb8a66f49f29 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f29839e8758368e6c9f9362651fc1e3f0fcbab76..d360c4a6f2e1a073003a6d39dde6522c86a60f70 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7a095f2a7c7e11c0e4a5c02a844fb121232e9890..12158bef8a66e7c7919ccb974ad2bbf3a7399886 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 52dcf46a1c584b30803e9c27a416769d8aa5bd86..c0b4acb233b5228d576280ecbf861a9ca5d2156a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c8ef11544afe1e29e27f4f6c6991418463c9b209..86bd1d72d1d80894c6227854d5500ee5d764a29c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index fa84ad3bf15816890d607fba948e8e403023623d..12dad3e0fcc1d0f99f1bbbf8005aaa222b4dc73d 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 162c4ebd1791888f0d8e11be837f720ea2c3970a..568ae629559129134a70c0221cca6d5d8d3fda10 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f38d186472d4433e3aa3ca26a56d072e6be4a1f0..48821ddad6915656a1df753b279cb336822e06ff 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ceed1c930ae3e28ccd9475fc50a620ddbf6522f2..3e7760916667a777ae69c210e896afd2020c5d3d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 832ac1c8d4bb31f0ec965a847601068307101f88..54a1a5c700770693bcfc528ca14a3b566080f644 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 06f8cef7fe88030d29d00bfe55c0fe96f2923ac9..8deca497685f11ad8575ebee2d00ff75cd9c3b1e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 51e725840d2afcd931e150f9f1716356f83fce5a..06887d6c02397075738b0a49757a849c37c149a9 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c09a26d9edd725e9f7c41f9cc3536836f76e43c7..2fa69da68cf099c2fd1231c0e231f921bcf21eb2 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a61be035aea4e9c0c3d127479f2131a1e27fc25d..33a4720eae91d96750b9cd35387ec164bc4723a5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f70aadb5d5179517ba9f0587936b7c30c5b782f5..db086cd79e45926ab53e307d65541f5c251b94bb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b71aa8673140120e696c08dfc7f767d81decbf3c..2584d2b4f9929c30365d769045be7c894d55c2d4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 996c0f3f9642eb1c2e0b76d1f38a33cc3076774a..e9910d05843bfa16c7f432c06129b80f7be07719 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index fa9add8e0b6a73cffd1ccfe5c1feb9e8bccb49ec..af1377aba7ebc70904b2d6e9fea9948d170433a9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -551,6 +551,8 @@ QString SMESHGUI_GenericHypothesisCreator::helpPage() const
     aHelpFileName = "a1d_meshing_hypo_page.html#max_length_anchor";
   else if ( aHypType == "Arithmetic1D")
     aHelpFileName = "a1d_meshing_hypo_page.html#arithmetic_1d_anchor";
+  else if ( aHypType == "GeometricProgression")
+    aHelpFileName = "a1d_meshing_hypo_page.html#geometric_1d_anchor";
   else if ( aHypType == "FixedPoints1D")
     aHelpFileName = "a1d_meshing_hypo_page.html#fixed_points_1d_anchor";
   else if ( aHypType == "MaxElementArea")
@@ -709,9 +711,10 @@ HypothesisData::HypothesisData( const QString& theTypeName,
                                 const QString& theClientLibName,
                                 const QString& theLabel,
                                 const QString& theIconId,
+                                const QString& theContext,
                                 const QList<int>& theDim,
-                                const bool theIsAux,
-                                const QStringList& theNeededHypos,
+                                const bool theIsAuxOrNeedHyp,
+                                const QStringList& theBasicHypos,
                                 const QStringList& theOptionalHypos,
                                 const QStringList& theInputTypes,
                                 const QStringList& theOutputTypes,
@@ -723,9 +726,10 @@ HypothesisData::HypothesisData( const QString& theTypeName,
     ClientLibName( theClientLibName ),
     Label( theLabel ),
     IconId( theIconId ),
+    Context( theContext ),
     Dim( theDim ),
-    IsAux( theIsAux ),
-    NeededHypos( theNeededHypos ),
+    IsAuxOrNeedHyp( theIsAuxOrNeedHyp ),
+    BasicHypos( theBasicHypos ),
     OptionalHypos( theOptionalHypos ),
     InputTypes( theInputTypes ),
     OutputTypes( theOutputTypes ),
index 83da609d3cdcc04b7206f1dee4add797f8f1183b..fcadee8ddaf1942e4d7bdc0b31c393cc0e5c007e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -173,7 +173,7 @@ class HypothesisData
 public:
   HypothesisData( const QString&, const QString&, const QString&,
                   const QString&, const QString&, const QString&,
-                  const QList<int>&, const bool,
+                  const QString&, const QList<int>&, const bool,
                   const QStringList&, const QStringList&,
                   const QStringList&, const QStringList&,
                   const bool=true, const bool supportSub=false );
@@ -184,13 +184,15 @@ public:
   QString ClientLibName;   //!< client library name
   QString Label;           //!< label
   QString IconId;          //!< icon identifier
+  QString Context;         //!< ["GLOBAL","LOCAL","ANY"(default)]
   QList<int> Dim;          //!< list of supported dimensions (see SMESH::Dimension enumeration)
-  bool IsAux;              //!< TRUE if given hypothesis is auxiliary one, FALSE otherwise
+  bool IsAuxOrNeedHyp;     //!< TRUE if given hypothesis is auxiliary one, FALSE otherwise
+  //!<                          TRUE if given algorithm can't work w/o hypotheses
   bool IsNeedGeometry;     //!< TRUE if the algorithm works with shapes only, FALSE otherwise
   bool IsSupportSubmeshes; //!< TRUE if the algo building all-dim elems supports submeshes
 
   // for algorithm only: dependencies algo <-> algo and algo -> hypos
-  QStringList NeededHypos;  //!< list of obligatory hypotheses
+  QStringList BasicHypos;   //!< list of basic hypotheses
   QStringList OptionalHypos;//!< list of optional hypotheses
   QStringList InputTypes;   //!< list of element types required as a prerequisite
   QStringList OutputTypes;  //!< list of types of generated elements
index 2d45966ed0e57c053497f9b1af845a4817ba8d18..878163738503d7c11750c49d8a28003c3fb89311 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -84,7 +84,7 @@ namespace SMESH
   typedef IMap<QString,HypothesisData*> THypothesisDataMap;
   THypothesisDataMap myHypothesesMap;
   THypothesisDataMap myAlgorithmsMap;
-  
+
   // BUG 0020378
   //typedef QMap<QString,SMESHGUI_GenericHypothesisCreator*> THypCreatorMap;
   //THypCreatorMap myHypCreatorMap;
@@ -220,16 +220,16 @@ namespace SMESH
           if (ok) {
 
             THypothesisDataMap::ConstIterator it1 = aXmlHandler->myHypothesesMap.begin();
-            
+
             for( ;it1 != aXmlHandler->myHypothesesMap.end(); it1++)
               myHypothesesMap.insert( it1.key(), it1.value() );
-            
+
             it1 = aXmlHandler->myAlgorithmsMap.begin();
             for( ;it1 != aXmlHandler->myAlgorithmsMap.end(); it1++)
               myAlgorithmsMap.insert( it1.key(), it1.value() );
-            
+
             QList<HypothesesSet*>::iterator it;
-            for ( it = aXmlHandler->myListOfHypothesesSets.begin(); 
+            for ( it = aXmlHandler->myListOfHypothesesSets.begin();
                   it != aXmlHandler->myListOfHypothesesSets.end();
                   ++it )
             {
@@ -266,30 +266,31 @@ namespace SMESH
   }
 
 
-  QStringList GetAvailableHypotheses( const bool isAlgo, 
-                                      const int theDim,                          
+  QStringList GetAvailableHypotheses( const bool isAlgo,
+                                      const int  theDim,
                                       const bool isAux,
-                                      const bool isNeedGeometry)
+                                      const bool isNeedGeometry,
+                                      const bool isSubMesh)
   {
     QStringList aHypList;
 
     // Init list of available hypotheses, if needed
     InitAvailableHypotheses();
     bool checkGeometry = ( !isNeedGeometry && isAlgo );
+    const char* context = isSubMesh ? "LOCAL" : "GLOBAL";
     // fill list of hypotheses/algorithms
     THypothesisDataMap& pMap = isAlgo ? myAlgorithmsMap : myHypothesesMap;
     THypothesisDataMap::ConstIterator anIter;
-    for ( anIter = pMap.begin(); anIter != pMap.end(); anIter++ ) {
+    for ( anIter = pMap.begin(); anIter != pMap.end(); anIter++ )
+    {
       HypothesisData* aData = anIter.value();
-      if(!aData || aData->Label.isEmpty()) continue;
-      if ( ( theDim < 0 || aData->Dim.contains( theDim ) ) && aData->IsAux == isAux) {
-        if (checkGeometry) {
-          if (aData->IsNeedGeometry == isNeedGeometry)
-            aHypList.append(anIter.key());
-        }
-        else {
-          aHypList.append(anIter.key());
-        }
+      if (( aData && !aData->Label.isEmpty() ) &&
+          ( theDim < 0              || aData->Dim.contains( theDim )) &&
+          ( isAlgo                  || aData->IsAuxOrNeedHyp == isAux ) &&
+          ( aData->Context == "ANY" || aData->Context == context ) &&
+          ( !checkGeometry          || aData->IsNeedGeometry == isNeedGeometry ))
+      {
+        aHypList.append(anIter.key());
       }
     }
     return aHypList;
@@ -302,15 +303,13 @@ namespace SMESH
 
     // Init list of available hypotheses, if needed
     InitAvailableHypotheses();
-
     QList<HypothesesSet*>::iterator hypoSet;
-    for ( hypoSet  = myListOfHypothesesSets.begin(); 
-          hypoSet != myListOfHypothesesSets.end();
-          ++hypoSet ) {
+    for ( hypoSet  = myListOfHypothesesSets.begin();
+        hypoSet != myListOfHypothesesSets.end();
+        ++hypoSet ) {
       HypothesesSet* aSet = *hypoSet;
-      if ( aSet &&
-           ( aSet->count( true ) || aSet->count( false )) &&
-           aSet->maxDim() <= maxDim)
+      if ( aSet && ( aSet->count( true ) || aSet->count( false )) &&
+          aSet->maxDim() <= maxDim)
       {
         aSetNameList.append( mangledHypoSetName( aSet ));
       }
@@ -322,7 +321,7 @@ namespace SMESH
     QStringList reversedNames;
     for ( int i = 0; i < aSetNameList.count(); ++i )
       reversedNames.prepend( aSetNameList[i] );
-    
+
     return reversedNames;
   }
 
@@ -330,7 +329,7 @@ namespace SMESH
   {
     QString name = demangledHypoSetName( theSetName );
     QList<HypothesesSet*>::iterator hypoSet;
-    for ( hypoSet  = myListOfHypothesesSets.begin(); 
+    for ( hypoSet  = myListOfHypothesesSets.begin();
           hypoSet != myListOfHypothesesSets.end();
           ++hypoSet ) {
       HypothesesSet* aSet = *hypoSet;
@@ -363,7 +362,7 @@ namespace SMESH
     isAuxiliary = false;
     if ( !algoData )
       return false;
-    if ( algoData->NeededHypos.contains( hypType ))
+    if ( algoData->BasicHypos.contains( hypType ))
       return true;
     if ( algoData->OptionalHypos.contains( hypType)) {
       isAuxiliary = true;
@@ -407,7 +406,7 @@ namespace SMESH
 
       // 2. Get names of plugin libraries
       HypothesisData* aHypData = GetHypothesisData(aHypType);
-      if (!aHypData) 
+      if (!aHypData)
         return aCreator;
 
       QString aClientLibName = aHypData->ClientLibName;
@@ -424,7 +423,7 @@ namespace SMESH
 #ifdef WIN32
             const char* anError = "Can't load client meshers plugin library";
 #else
-            const char* anError = dlerror();      
+            const char* anError = dlerror();
 #endif
             INFOS(anError); // always display this kind of error !
           }
@@ -454,7 +453,7 @@ namespace SMESH
 
               //rnv : This dynamic property of the QObject stores the name of the plugin.
               //      It is used to obtain plugin root dir environment variable
-              //      in the SMESHGUI_HypothesisDlg class. Plugin root dir environment 
+              //      in the SMESHGUI_HypothesisDlg class. Plugin root dir environment
               //      variable is used to display documentation.
               aCreator->setProperty(PLUGIN_NAME,aHypData->PluginName);
             }
@@ -474,7 +473,7 @@ namespace SMESH
                                                const QString& aHypName,
                                                const bool isAlgo)
   {
-    if(MYDEBUG) MESSAGE("Create " << aHypType.toLatin1().data() << 
+    if(MYDEBUG) MESSAGE("Create " << aHypType.toLatin1().data() <<
                         " with name " << aHypName.toLatin1().data());
     HypothesisData* aHypData = GetHypothesisData(aHypType);
     QString aServLib = aHypData->ServerLibName;
@@ -498,6 +497,17 @@ namespace SMESH
 
     return SMESH::SMESH_Hypothesis::_nil();
   }
+  bool IsApplicable(const QString&        aHypType,
+                    GEOM::GEOM_Object_ptr theGeomObject,
+                    const bool            toCheckAll)
+  {
+    HypothesisData* aHypData = GetHypothesisData(aHypType);
+    QString aServLib = aHypData->ServerLibName;
+    return SMESHGUI::GetSMESHGen()->IsApplicable( aHypType.toLatin1().data(),
+                                                  aServLib.toLatin1().data(),
+                                                  theGeomObject,
+                                                  toCheckAll);
+  }
 
 
   bool AddHypothesisOnMesh (SMESH::SMESH_Mesh_ptr aMesh, SMESH::SMESH_Hypothesis_ptr aHyp)
@@ -627,7 +637,7 @@ namespace SMESH
         if (!aSubMesh->_is_nil())
           aMesh = aSubMesh->GetFather();
 
-        if (!aMesh->_is_nil()) {    
+        if (!aMesh->_is_nil()) {
           if (aMesh->HasShapeToMesh() && !aShapeObject->_is_nil()) {
             res = aMesh->RemoveHypothesis(aShapeObject, anHyp);
             if (res < SMESH::HYP_UNKNOWN_FATAL) {
@@ -635,14 +645,14 @@ namespace SMESH
               if (meshSO)
                 SMESH::ModifiedMesh(meshSO, false, aMesh->NbNodes()==0);
             }
-            
+
           }
           else if(!aMesh->HasShapeToMesh()){
             res = aMesh->RemoveHypothesis(aShapeObject, anHyp);
             if (res < SMESH::HYP_UNKNOWN_FATAL) {
               _PTR(SObject) meshSO = SMESH::FindSObject(aMesh);
               if (meshSO)
-                SMESH::ModifiedMesh(meshSO, false, aMesh->NbNodes()==0);              
+                SMESH::ModifiedMesh(meshSO, false, aMesh->NbNodes()==0);
             }
           }
           if (res > SMESH::HYP_OK) {
@@ -704,7 +714,7 @@ namespace SMESH
       QString msg;
       if ( !hasAlgo )
         msg = QObject::tr( "STATE_ALGO_MISSING" );
-      else 
+      else
         switch( error.state ) {
           CASE2MESSAGE( HYP_MISSING );
           CASE2MESSAGE( HYP_NOTCONFORM );
index a2c12f5950f83be89e43e13801bd9dccd7ffcdc3..2841b7a7f6c412f04d76bb3e91d7e194cdf1ca07 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -69,9 +69,10 @@ namespace SMESH
   QStringList GetAvailableHypotheses( const bool, 
                                       const int = -1, 
                                       const bool = false,
-                                      const bool = true);
+                                      const bool = true,
+                                      const bool = false);
   SMESHGUI_EXPORT
-  QStringList GetHypothesesSets( int maxDim );
+  QStringList GetHypothesesSets( int );
 
   SMESHGUI_EXPORT
   HypothesesSet* GetHypothesesSet( const QString& );
@@ -95,6 +96,10 @@ namespace SMESH
   SMESH::SMESH_Hypothesis_ptr CreateHypothesis( const QString&,
                                                 const QString&,
                                                 const bool = false );
+  SMESHGUI_EXPORT
+  bool IsApplicable( const QString&,
+                     GEOM::GEOM_Object_ptr,
+                     const bool = false );
 
   SMESHGUI_EXPORT
   bool AddHypothesisOnMesh( SMESH::SMESH_Mesh_ptr, SMESH::SMESH_Hypothesis_ptr );
index caca7f14bf64ff89b5bde8b00bd83f26ad04e468..4c535901b68e1449f70e6d05c49ed4feda5aae0b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3ae4ac699ad9a69a44484d872b0ed820e957af5a..74ea3dc4b5c6993164309b81b6c37c61f448e1b5 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index fe2307893053b030cefa5aa8905ccf230c6acb8f..79867d7912ab0bfbe532d13bdeabb8b05f98d7d8 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d86fd4b541aa21fa4bb82d3b78a2adaa2c98fe55..970500e69d7f60d60c8abd5e20da97d695ab7b48 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -61,6 +61,7 @@
 #include <gp_Pnt.hxx>
 
 // Qt includes
+#include <QApplication>
 #include <QGroupBox>
 #include <QGridLayout>
 #include <QHBoxLayout>
@@ -95,12 +96,11 @@ SMESHGUI_MakeNodeAtPointDlg::SMESHGUI_MakeNodeAtPointDlg()
   QVBoxLayout* aDlgLay = new QVBoxLayout (mainFrame());
   aDlgLay->setMargin(0);
   aDlgLay->setSpacing(SPACING);
+  myMainFrame = createMainFrame(mainFrame());
 
-  QWidget* aMainFrame = createMainFrame  (mainFrame());
+  aDlgLay->addWidget(myMainFrame);
 
-  aDlgLay->addWidget(aMainFrame);
-
-  aDlgLay->setStretchFactor(aMainFrame, 1);
+  aDlgLay->setStretchFactor(myMainFrame, 1);
 }
 
 //=======================================================================
@@ -112,62 +112,33 @@ QWidget* SMESHGUI_MakeNodeAtPointDlg::createMainFrame (QWidget* theParent)
   QWidget* aFrame = new QWidget(theParent);
 
   SUIT_ResourceMgr* rm = SMESH::GetResourceMgr( SMESHGUI::GetSMESHGUI() );
-  QPixmap iconMoveNode (rm->loadPixmap("SMESH", tr("ICON_DLG_MOVE_NODE")));
-  QPixmap iconSelect   (rm->loadPixmap("SMESH", tr("ICON_SELECT")));
+  QPixmap iconMoveNode        (rm->loadPixmap("SMESH", tr("ICON_DLG_MOVE_NODE")));
+  QPixmap iconMoveWithoutNode (rm->loadPixmap("SMESH", tr("ICON_DLG_MOVE_WITHOUT_NODE")));
+  QPixmap iconSelect          (rm->loadPixmap("SMESH", tr("ICON_SELECT")));
 
   // constructor
-
-  QGroupBox* aPixGrp = new QGroupBox(tr("MOVE_NODE"), aFrame);
-  QButtonGroup* aBtnGrp = new QButtonGroup(this);
+  QGroupBox* aPixGrp = new QGroupBox(tr("MOVE_NODE"), this);
+  aPixGrp->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+  myButtonGroup = new QButtonGroup(this);
   QHBoxLayout* aPixGrpLayout = new QHBoxLayout(aPixGrp);
   aPixGrpLayout->setMargin(MARGIN);
   aPixGrpLayout->setSpacing(SPACING);
 
-  QRadioButton* aRBut = new QRadioButton(aPixGrp);
-  aRBut->setIcon(iconMoveNode);
-  aRBut->setChecked(true);
-  aPixGrpLayout->addWidget(aRBut);
-  aBtnGrp->addButton(aRBut, 0);
-
-  // coordinates
-
-  QGroupBox* aCoordGrp = new QGroupBox(tr("DESTINATION"), aFrame);
-  QHBoxLayout* aCoordGrpLayout = new QHBoxLayout(aCoordGrp);
-  aCoordGrpLayout->setMargin(MARGIN);
-  aCoordGrpLayout->setSpacing(SPACING);
-
-  myCoordBtn = new QPushButton(aCoordGrp);
-  myCoordBtn->setIcon(iconSelect);
-  myCoordBtn->setCheckable(true);
-
-  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);
+  myRButNodeToMove = new QRadioButton(aPixGrp);
+  myRButMoveWithoutNode = new QRadioButton(aPixGrp);
+  myRButNodeToMove->setIcon(iconMoveNode);
+  myRButMoveWithoutNode->setIcon(iconMoveWithoutNode);
+  myRButNodeToMove->setChecked(true);
 
-  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");
+  aPixGrpLayout->addWidget(myRButNodeToMove);
+  aPixGrpLayout->addWidget(myRButMoveWithoutNode);
+  myButtonGroup->addButton(myRButNodeToMove, 0);
+  myButtonGroup->addButton(myRButMoveWithoutNode, 1);
 
-  aCoordGrpLayout->addWidget(myCoordBtn);
-  aCoordGrpLayout->addWidget(aXLabel);
-  aCoordGrpLayout->addWidget(myX);
-  aCoordGrpLayout->addWidget(aYLabel);
-  aCoordGrpLayout->addWidget(myY);
-  aCoordGrpLayout->addWidget(aZLabel);
-  aCoordGrpLayout->addWidget(myZ);
-  aCoordGrpLayout->setStretchFactor(myX, 1);
-  aCoordGrpLayout->setStretchFactor(myY, 1);
-  aCoordGrpLayout->setStretchFactor(myZ, 1);
-
-  // node ID
+  // Node to move
 
   myNodeToMoveGrp = new QGroupBox(tr("NODE_2MOVE"), aFrame);
-
+  myNodeToMoveGrp->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   QLabel* idLabel = new QLabel(tr("NODE_2MOVE_ID"), myNodeToMoveGrp);
   myIdBtn = new QPushButton(myNodeToMoveGrp);
   myIdBtn->setIcon(iconSelect);
@@ -195,27 +166,9 @@ QWidget* SMESHGUI_MakeNodeAtPointDlg::createMainFrame (QWidget* theParent)
   myCurrentZ->setButtonSymbols(QAbstractSpinBox::NoButtons);
   myCurrentZ->setReadOnly(true);
 
-  QLabel* aDXLabel = new QLabel(tr("SMESH_DX"), aCoordWidget);
-  myDX = new SMESHGUI_SpinBox(aCoordWidget);
-  myDX->setButtonSymbols(QAbstractSpinBox::NoButtons);
-  myDX->setReadOnly(true);
-
-  QLabel* aDYLabel = new QLabel(tr("SMESH_DY"), aCoordWidget);
-  myDY = new SMESHGUI_SpinBox(aCoordWidget);
-  myDY->setButtonSymbols(QAbstractSpinBox::NoButtons);
-  myDY->setReadOnly(true);
-
-  QLabel* aDZLabel = new QLabel(tr("SMESH_DZ"), aCoordWidget);
-  myDZ = new SMESHGUI_SpinBox(aCoordWidget);
-  myDZ->setButtonSymbols(QAbstractSpinBox::NoButtons);
-  myDZ->setReadOnly(true);
-
   myCurrentX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
   myCurrentY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
   myCurrentZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
-  myDX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
-  myDY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
-  myDZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
 
   QGridLayout* aCoordLayout = new QGridLayout(aCoordWidget);
   aCoordLayout->setMargin(0);
@@ -226,19 +179,10 @@ QWidget* SMESHGUI_MakeNodeAtPointDlg::createMainFrame (QWidget* theParent)
   aCoordLayout->addWidget(myCurrentY,     0, 3);
   aCoordLayout->addWidget(aCurrentZLabel, 0, 4);
   aCoordLayout->addWidget(myCurrentZ,     0, 5);
-  aCoordLayout->addWidget(aDXLabel,       1, 0);
-  aCoordLayout->addWidget(myDX,           1, 1);
-  aCoordLayout->addWidget(aDYLabel,       1, 2);
-  aCoordLayout->addWidget(myDY,           1, 3);
-  aCoordLayout->addWidget(aDZLabel,       1, 4);
-  aCoordLayout->addWidget(myDZ,           1, 5);
   aCoordLayout->setColumnStretch(1, 1);
   aCoordLayout->setColumnStretch(3, 1);
   aCoordLayout->setColumnStretch(5, 1);
 
-  myAutoSearchChkBox = new QCheckBox( tr("AUTO_SEARCH"), myNodeToMoveGrp);
-  myPreviewChkBox = new QCheckBox( tr("PREVIEW"), myNodeToMoveGrp);
-
   QGridLayout* myNodeToMoveGrpLayout = new QGridLayout(myNodeToMoveGrp);
   myNodeToMoveGrpLayout->setSpacing(SPACING);
   myNodeToMoveGrpLayout->setMargin(MARGIN);
@@ -248,20 +192,79 @@ QWidget* SMESHGUI_MakeNodeAtPointDlg::createMainFrame (QWidget* theParent)
   myNodeToMoveGrpLayout->addWidget( myId,    0, 2 );
   myNodeToMoveGrpLayout->addWidget( myUpdateBtn, 0, 3 );
   myNodeToMoveGrpLayout->addWidget( aCoordWidget,       1, 0, 1, 4 );
-  myNodeToMoveGrpLayout->addWidget( myAutoSearchChkBox, 2, 0, 1, 4 );
-  myNodeToMoveGrpLayout->addWidget( myPreviewChkBox,    3, 0, 1, 4 );
+
+  // Destination
+
+  myDestinationGrp = new QGroupBox(tr("DESTINATION"), aFrame);
+  myDestinationGrp->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+
+  myDestBtn = new QPushButton(myDestinationGrp);
+  myDestBtn->setIcon(iconSelect);
+  myDestBtn->setCheckable(true);
+
+  QLabel* aDestinationXLabel = new QLabel(tr("SMESH_X"), myDestinationGrp);
+  myDestinationX = new SMESHGUI_SpinBox(myDestinationGrp);
+
+  QLabel* aDestinationYLabel = new QLabel(tr("SMESH_Y"), myDestinationGrp);
+  myDestinationY = new SMESHGUI_SpinBox(myDestinationGrp);
+
+  QLabel* aDestinationZLabel = new QLabel(tr("SMESH_Z"), myDestinationGrp);
+  myDestinationZ = new SMESHGUI_SpinBox(myDestinationGrp);
+
+  myDestDXLabel = new QLabel(tr("SMESH_DX"), myDestinationGrp);
+  myDestDX = new SMESHGUI_SpinBox(myDestinationGrp);
+  myDestDX->setReadOnly(true);
+
+  myDestDYLabel = new QLabel(tr("SMESH_DY"), myDestinationGrp);
+  myDestDY = new SMESHGUI_SpinBox(myDestinationGrp);
+  myDestDY->setReadOnly(true);
+
+  myDestDZLabel = new QLabel(tr("SMESH_DZ"), myDestinationGrp);
+  myDestDZ = new SMESHGUI_SpinBox(myDestinationGrp);
+  myDestDZ->setReadOnly(true);
+
+  myDestinationX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myDestinationY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myDestinationZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myDestDX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myDestDY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+  myDestDZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 10.0, "length_precision");
+
+  QGridLayout* aDestLayout = new QGridLayout(myDestinationGrp);
+  aDestLayout->setMargin(MARGIN);
+  aDestLayout->setSpacing(SPACING);
+  aDestLayout->addWidget(myDestBtn, 0, 0);
+  aDestLayout->addWidget(aDestinationXLabel, 0, 1);
+  aDestLayout->addWidget(myDestinationX,     0, 2);
+  aDestLayout->addWidget(aDestinationYLabel, 0, 3);
+  aDestLayout->addWidget(myDestinationY,     0, 4);
+  aDestLayout->addWidget(aDestinationZLabel, 0, 5);
+  aDestLayout->addWidget(myDestinationZ,     0, 6);
+  aDestLayout->addWidget(myDestDXLabel,      1, 1);
+  aDestLayout->addWidget(myDestDX,           1, 2);
+  aDestLayout->addWidget(myDestDYLabel,      1, 3);
+  aDestLayout->addWidget(myDestDY,           1, 4);
+  aDestLayout->addWidget(myDestDZLabel,      1, 5);
+  aDestLayout->addWidget(myDestDZ,           1, 6);
+  aDestLayout->setColumnStretch(2, 1);
+  aDestLayout->setColumnStretch(4, 1);
+  aDestLayout->setColumnStretch(6, 1);
+
+  // Preview
+
+  myPreviewChkBox = new QCheckBox( tr("PREVIEW"), aFrame);
 
   QVBoxLayout* aLay = new QVBoxLayout(aFrame);
   aLay->addWidget(aPixGrp);
-  aLay->addWidget(aCoordGrp);
   aLay->addWidget(myNodeToMoveGrp);
+  aLay->addWidget(myDestinationGrp);
+  aLay->addWidget(myPreviewChkBox);
 
-  connect(myCoordBtn,         SIGNAL (toggled(bool)), this, SLOT(ButtonToggled(bool)));
+  connect(myDestBtn,          SIGNAL (toggled(bool)), this, SLOT(ButtonToggled(bool)));
   connect(myIdBtn,            SIGNAL (toggled(bool)), this, SLOT(ButtonToggled(bool)));
-  connect(myAutoSearchChkBox, SIGNAL (toggled(bool)), this, SLOT(ButtonToggled(bool)));
+  connect(myButtonGroup,      SIGNAL (buttonClicked(int)),  SLOT(ConstructorsClicked(int)));
 
   myIdBtn->setChecked(true);
-  myAutoSearchChkBox->setChecked(true);
 
   return aFrame;
 }
@@ -277,38 +280,61 @@ void SMESHGUI_MakeNodeAtPointDlg::ButtonToggled (bool on)
 {
   const QObject* aSender = sender();
   if ( on ) {
-    if ( aSender == myCoordBtn ) // button to set coord by node selection
+    if ( aSender == myDestBtn ) // button to set coord by node selection
     {
       if ( myIdBtn->isEnabled() )
         myIdBtn->setChecked( !on );
     }
     else if ( aSender == myIdBtn ) // button to select a node to move
     {
-      myCoordBtn->setChecked( !on );
+      myDestBtn->setChecked( !on );
     }
   }      
-  if ( aSender == myAutoSearchChkBox ) // automatic node search
-  {
-    if ( on ) {
+}
+//================================================================================
+/*!
+ * \brief SLOT called when clicked radio button
+  * \param int - number of the button
+ */
+//================================================================================
+void SMESHGUI_MakeNodeAtPointDlg::ConstructorsClicked (int constructorId)
+{
+  switch (constructorId) {
+  case 0:
+    {
+      myDestDXLabel->show();
+      myDestDYLabel->show();
+      myDestDZLabel->show();
+      myDestDX->show();
+      myDestDY->show();
+      myDestDZ->show();
       myCurrentX->SetValue(0);
       myCurrentY->SetValue(0);
       myCurrentZ->SetValue(0);
-      myDX->SetValue(0);
-      myDY->SetValue(0);
-      myDZ->SetValue(0);
-      myId->setText("");
-      myId->setReadOnly ( true );
-      myIdBtn->setChecked( false );
-      myIdBtn->setEnabled( false );
-      myCoordBtn->setChecked( true );
-      myUpdateBtn->setEnabled( false );
+      if (!myNodeToMoveGrp->isVisible()) myNodeToMoveGrp->show();
+      break;
     }
-    else {
-      myId->setReadOnly ( false );
-      myIdBtn->setEnabled( true );
-      myUpdateBtn->setEnabled( true );
+  case 1:
+    {
+      myId->setText("");
+      myCurrentX->SetValue(0);
+      myCurrentY->SetValue(0);
+      myCurrentZ->SetValue(0);
+      myDestDXLabel->hide();
+      myDestDYLabel->hide();
+      myDestDZLabel->hide();
+      myDestDX->hide();
+      myDestDY->hide();
+      myDestDZ->hide();
+      if (myNodeToMoveGrp->isVisible()) {myNodeToMoveGrp->hide();}
+      break;
     }
   }
+  QApplication::instance()->processEvents();
+  myMainFrame->hide();
+  myMainFrame->show();
+  updateGeometry();
+  resize(minimumSizeHint());
 }
 
 //================================================================================
@@ -326,14 +352,17 @@ SMESHGUI_MakeNodeAtPointOp::SMESHGUI_MakeNodeAtPointOp()
 
   myNoPreview = false;
   myUpdateDestination = false;
+  myDestCoordChanged = true;
 
   // connect signals and slots
-  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->myDestinationX, SIGNAL (valueChanged(double)), this, SLOT(redisplayPreview()));
+  connect(myDlg->myDestinationY, SIGNAL (valueChanged(double)), this, SLOT(redisplayPreview()));
+  connect(myDlg->myDestinationZ, SIGNAL (valueChanged(double)), this, SLOT(redisplayPreview()));
+  connect(myDlg->myDestDX, SIGNAL (valueChanged(double)), this, SLOT(onDestCoordChanged()));
+  connect(myDlg->myDestDY, SIGNAL (valueChanged(double)), this, SLOT(onDestCoordChanged()));
+  connect(myDlg->myDestDZ, SIGNAL (valueChanged(double)), this, SLOT(onDestCoordChanged()));
   connect(myDlg->myId,SIGNAL (textChanged(const QString&)),SLOT(redisplayPreview()));
   connect(myDlg->myPreviewChkBox,   SIGNAL (toggled(bool)),SLOT(redisplayPreview()));
-  connect(myDlg->myAutoSearchChkBox,SIGNAL (toggled(bool)),SLOT(redisplayPreview()));
 
   // IPAL22913: TC6.5.0: selected in "Move node" dialog box node is not highlighted
   // note: this slot seems to be lost together with removed obsolete SMESHGUI_MoveNodesDlg class
@@ -348,6 +377,13 @@ void SMESHGUI_MakeNodeAtPointOp::onUpdateDestination()
   myUpdateDestination = false;
 }
 
+void SMESHGUI_MakeNodeAtPointOp::onDestCoordChanged()
+{
+  myDestCoordChanged = false;
+  redisplayPreview();
+  myDestCoordChanged = true;
+}
+
 //=======================================================================
 // function : startOperation()
 // purpose  : Init dialog fields, connect signals and slots, show dialog
@@ -380,17 +416,23 @@ void SMESHGUI_MakeNodeAtPointOp::startOperation()
   // IPAL19360
   SMESHGUI_SelectionOp::startOperation(); // this method should be called only after filter creation
   //activateSelection(); // set filters   // called inside of previous statement
-
-  myDlg->myX->SetValue(0);
-  myDlg->myY->SetValue(0);
-  myDlg->myZ->SetValue(0);
+  myDlg->myId->setText("");
+  myDlg->myDestinationX->SetValue(0);
+  myDlg->myDestinationY->SetValue(0);
+  myDlg->myDestinationZ->SetValue(0);
+  myDlg->myDestDX->SetValue(0);
+  myDlg->myDestDY->SetValue(0);
+  myDlg->myDestDZ->SetValue(0);
   myDlg->myCurrentX->SetValue(0);
   myDlg->myCurrentY->SetValue(0);
   myDlg->myCurrentZ->SetValue(0);
-  myDlg->myDX->SetValue(0);
-  myDlg->myDY->SetValue(0);
-  myDlg->myDZ->SetValue(0);
-  myDlg->myId->setText("");
+  myDlg->myDestDX->setReadOnly(true);
+  myDlg->myDestDY->setReadOnly(true);
+  myDlg->myDestDZ->setReadOnly(true);
+  myDlg->myRButNodeToMove->setChecked(true);
+
+  myDlg->ConstructorsClicked(GetConstructorId());
+
   myDlg->show();
 
   onSelectionDone(); // init myMeshActor
@@ -403,6 +445,15 @@ void SMESHGUI_MakeNodeAtPointOp::startOperation()
   }
 }
 
+//=================================================================================
+// function : GetConstructorId()
+// purpose  :
+//=================================================================================
+int SMESHGUI_MakeNodeAtPointOp::GetConstructorId()
+{
+  return myDlg->myButtonGroup->checkedId();
+}
+
 //================================================================================
 /*!
  * \brief Stops operation
@@ -450,9 +501,9 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply()
   }
 
   QStringList aParameters;
-  aParameters << myDlg->myX->text();
-  aParameters << myDlg->myY->text();
-  aParameters << myDlg->myZ->text();
+  aParameters << myDlg->myDestinationX->text();
+  aParameters << myDlg->myDestinationY->text();
+  aParameters << myDlg->myDestinationZ->text();
 
   try {
     SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO(myMeshActor->getIO());
@@ -470,24 +521,23 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply()
     bool ok;
     int anId = myDlg->myId->text().toInt( &ok );
     if( !ok || anId < 1 )
-      anId = aMeshEditor->FindNodeClosestTo(myDlg->myX->GetValue(),
-                                            myDlg->myY->GetValue(),
-                                            myDlg->myZ->GetValue());
+      anId = aMeshEditor->FindNodeClosestTo(myDlg->myDestinationX->GetValue(),
+                                            myDlg->myDestinationY->GetValue(),
+                                            myDlg->myDestinationZ->GetValue());
 
     int aResult = aMeshEditor->MoveNode(anId,
-                                        myDlg->myX->GetValue(),
-                                        myDlg->myY->GetValue(),
-                                        myDlg->myZ->GetValue() );
+                                        myDlg->myDestinationX->GetValue(),
+                                        myDlg->myDestinationY->GetValue(),
+                                        myDlg->myDestinationZ->GetValue() );
 
     if (aResult)
     {
       myDlg->myCurrentX->SetValue(0);
       myDlg->myCurrentY->SetValue(0);
       myDlg->myCurrentZ->SetValue(0);
-      myDlg->myDX->SetValue(0);
-      myDlg->myDY->SetValue(0);
-      myDlg->myDZ->SetValue(0);
-      myDlg->myId->setText("");
+      myDlg->myDestDX->SetValue(0);
+      myDlg->myDestDY->SetValue(0);
+      myDlg->myDestDZ->SetValue(0);
 
       SALOME_ListIO aList;
       selectionMgr()->setSelectedObjects(aList,false);
@@ -515,8 +565,7 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply()
 bool SMESHGUI_MakeNodeAtPointOp::isValid( QString& msg )
 {
   bool ok = true;
-  if ( myMeshActor &&
-       !myDlg->myAutoSearchChkBox->isChecked() )
+  if ( myMeshActor && myDlg->myRButNodeToMove->isChecked() )
   {
     ok = false;
     int id = myDlg->myId->text().toInt();
@@ -527,9 +576,9 @@ bool SMESHGUI_MakeNodeAtPointOp::isValid( QString& msg )
       msg += tr("INVALID_ID") + "\n";
   }
 
-  ok = myDlg->myX->isValid( msg, !myNoPreview ) && ok;
-  ok = myDlg->myY->isValid( msg, !myNoPreview ) && ok;
-  ok = myDlg->myZ->isValid( msg, !myNoPreview ) && ok;
+  ok = myDlg->myDestinationX->isValid( msg, !myNoPreview ) && ok;
+  ok = myDlg->myDestinationY->isValid( msg, !myNoPreview ) && ok;
+  ok = myDlg->myDestinationZ->isValid( msg, !myNoPreview ) && ok;
 
   return ok;
 }
@@ -553,7 +602,7 @@ void SMESHGUI_MakeNodeAtPointOp::onSelectionDone()
     SMESH_Actor* aMeshActor = SMESH::FindActorByEntry(anIO->getEntry());
 
     if (!aMeshActor) { // coord by geom
-      if ( myDlg->myCoordBtn->isChecked() ) {
+      if ( myDlg->myDestBtn->isChecked() ) {
         GEOM::GEOM_Object_var geom = SMESH::IObjectToInterface<GEOM::GEOM_Object>(anIO);
         if ( !geom->_is_nil() ) {
           TopoDS_Vertex aShape;
@@ -561,9 +610,9 @@ void SMESHGUI_MakeNodeAtPointOp::onSelectionDone()
                aShape.ShapeType() == TopAbs_VERTEX ) {
             gp_Pnt P = BRep_Tool::Pnt(aShape);
             myNoPreview = true;
-            myDlg->myX->SetValue(P.X());
-            myDlg->myY->SetValue(P.Y());
-            myDlg->myZ->SetValue(P.Z());
+            myDlg->myDestinationX->SetValue(P.X());
+            myDlg->myDestinationY->SetValue(P.Y());
+            myDlg->myDestinationZ->SetValue(P.Z());
             myNoPreview = false;
             redisplayPreview();
           }
@@ -581,10 +630,10 @@ void SMESHGUI_MakeNodeAtPointOp::onSelectionDone()
       if (SMDS_Mesh* aMesh = aMeshActor->GetObject()->GetMesh()) {
         if (const SMDS_MeshNode* aNode = aMesh->FindNode(aString.toInt())) {
           myNoPreview = true;
-          if ( myDlg->myCoordBtn->isChecked() ) { // set coord
-            myDlg->myX->SetValue(aNode->X());
-            myDlg->myY->SetValue(aNode->Y());
-            myDlg->myZ->SetValue(aNode->Z());
+          if ( myDlg->myDestBtn->isChecked() ) { // set coord
+            myDlg->myDestinationX->SetValue(aNode->X());
+            myDlg->myDestinationY->SetValue(aNode->Y());
+            myDlg->myDestinationZ->SetValue(aNode->Z());
             myNoPreview = false;
             redisplayPreview();
           }
@@ -599,15 +648,18 @@ void SMESHGUI_MakeNodeAtPointOp::onSelectionDone()
             double x = aCurrentNode->X();
             double y = aCurrentNode->Y();
             double z = aCurrentNode->Z();
-            double dx = myDlg->myX->GetValue() - x;
-            double dy = myDlg->myY->GetValue() - y;
-            double dz = myDlg->myZ->GetValue() - z;
+            double dx = myDlg->myDestinationX->GetValue() - x;
+            double dy = myDlg->myDestinationY->GetValue() - y;
+            double dz = myDlg->myDestinationZ->GetValue() - z;
             myDlg->myCurrentX->SetValue(x);
             myDlg->myCurrentY->SetValue(y);
             myDlg->myCurrentZ->SetValue(z);
-            myDlg->myDX->SetValue(dx);
-            myDlg->myDY->SetValue(dy);
-            myDlg->myDZ->SetValue(dz);
+            myDlg->myDestDX->SetValue(dx);
+            myDlg->myDestDY->SetValue(dy);
+            myDlg->myDestDZ->SetValue(dz);
+            myDlg->myDestDX->setReadOnly(false);
+            myDlg->myDestDY->setReadOnly(false);
+            myDlg->myDestDZ->setReadOnly(false);
           }
         }
       }
@@ -633,20 +685,10 @@ void SMESHGUI_MakeNodeAtPointOp::redisplayPreview()
   bool moveShown = false;
   if ( myMeshActor)
   {
-    const bool autoSearch = myDlg->myAutoSearchChkBox->isChecked();
-    const bool preview    = myDlg->myPreviewChkBox->isChecked();
-    if ( autoSearch )
-    {
-      myDlg->myCurrentX->SetValue(0);
-      myDlg->myCurrentY->SetValue(0);
-      myDlg->myCurrentZ->SetValue(0);
-      myDlg->myDX->SetValue(0);
-      myDlg->myDY->SetValue(0);
-      myDlg->myDZ->SetValue(0);
-      myDlg->myId->setText("");
-    }
+    const bool isPreview = myDlg->myPreviewChkBox->isChecked();
+    const bool isMoveNode = myDlg->myRButMoveWithoutNode->isChecked();
     QString msg;
-    if ( autoSearch || isValid( msg ) )
+    if ( isValid( msg ) )
     {
       try {
         SMESH::SMESH_Mesh_var aMesh = SMESH::GetMeshByIO(myMeshActor->getIO());
@@ -656,53 +698,68 @@ void SMESHGUI_MakeNodeAtPointOp::redisplayPreview()
           {
             SUIT_OverrideCursor aWaitCursor;
 
-            int anId = 0;
-            if ( autoSearch )
-              anId = aPreviewer->FindNodeClosestTo(myDlg->myX->GetValue(),
-                                                   myDlg->myY->GetValue(),
-                                                   myDlg->myZ->GetValue());
-            else
-              anId = myDlg->myId->text().toInt();
+            int anId = myDlg->myId->text().toInt();
 
-            // find id and/or just compute preview
-            aPreviewer->MoveNode(anId,
-                                 myDlg->myX->GetValue(),
-                                 myDlg->myY->GetValue(),
-                                 myDlg->myZ->GetValue());
-            if ( autoSearch ) { // set found id
-              QString idTxt("%1");
-              if ( anId > 0 )
-                idTxt = idTxt.arg( anId );
-              else
-                idTxt = "";
-              myDlg->myId->setText( idTxt );
-            }
-
-            SMESH::double_array* aXYZ = aMesh->GetNodeXYZ( anId );
-            if( aXYZ && aXYZ->length() >= 3 )
+            SMESH::double_array_var aXYZ = aMesh->GetNodeXYZ( anId );
+            if( &aXYZ.in() && aXYZ->length() >= 3 )
             {
-              double x = aXYZ->operator[](0);
-              double y = aXYZ->operator[](1);
-              double z = aXYZ->operator[](2);
+              double x = aXYZ[0];
+              double y = aXYZ[1];
+              double z = aXYZ[2];
+              double dx = 0;
+              double dy = 0;
+              double dz = 0;
 
               if ( myUpdateDestination ) {
-                myDlg->myX->SetValue(x);
-                myDlg->myY->SetValue(y);
-                myDlg->myZ->SetValue(z);
+                myDlg->myDestinationX->SetValue(x);
+                myDlg->myDestinationY->SetValue(y);
+                myDlg->myDestinationZ->SetValue(z);
+              }
+              if ( myDestCoordChanged ) {
+                dx = myDlg->myDestinationX->GetValue() - myDlg->myCurrentX->GetValue();
+                dy = myDlg->myDestinationY->GetValue() - myDlg->myCurrentY->GetValue();
+                dz = myDlg->myDestinationZ->GetValue() - myDlg->myCurrentZ->GetValue();
+                myDlg->myDestDX->SetValue(dx);
+                myDlg->myDestDY->SetValue(dy);
+                myDlg->myDestDZ->SetValue(dz);
+              }
+              else {
+                dx = myDlg->myDestDX->GetValue() + myDlg->myCurrentX->GetValue();;
+                dy = myDlg->myDestDY->GetValue() + myDlg->myCurrentY->GetValue();;
+                dz = myDlg->myDestDZ->GetValue() + myDlg->myCurrentZ->GetValue();;
+                myDlg->myDestinationX->SetValue(dx);
+                myDlg->myDestinationY->SetValue(dy);
+                myDlg->myDestinationZ->SetValue(dz);
               }
-
-              double dx = myDlg->myX->GetValue() - x;
-              double dy = myDlg->myY->GetValue() - y;
-              double dz = myDlg->myZ->GetValue() - z;
               myDlg->myCurrentX->SetValue(x);
               myDlg->myCurrentY->SetValue(y);
               myDlg->myCurrentZ->SetValue(z);
-              myDlg->myDX->SetValue(dx);
-              myDlg->myDY->SetValue(dy);
-              myDlg->myDZ->SetValue(dz);
+              myDlg->myDestDX->setReadOnly(false);
+              myDlg->myDestDY->setReadOnly(false);
+              myDlg->myDestDZ->setReadOnly(false);
             }
+            else {
+              myDlg->myCurrentX->SetValue(0);
+              myDlg->myCurrentY->SetValue(0);
+              myDlg->myCurrentZ->SetValue(0);
+              myDlg->myDestDX->SetValue(0);
+              myDlg->myDestDY->SetValue(0);
+              myDlg->myDestDZ->SetValue(0);
+              myDlg->myDestDX->setReadOnly(true);
+              myDlg->myDestDY->setReadOnly(true);
+              myDlg->myDestDZ->setReadOnly(true);
+            }
+            if ( isPreview && isMoveNode && anId == 0 )
+              anId = aPreviewer->FindNodeClosestTo(myDlg->myDestinationX->GetValue(),
+                                                   myDlg->myDestinationY->GetValue(),
+                                                   myDlg->myDestinationZ->GetValue());
+            // find id and/or just compute preview
+            aPreviewer->MoveNode(anId,
+                                 myDlg->myDestinationX->GetValue(),
+                                 myDlg->myDestinationY->GetValue(),
+                                 myDlg->myDestinationZ->GetValue());
 
-            if ( preview ) { // fill preview data
+            if ( isPreview ) { // fill preview data
               aMeshPreviewStruct = aPreviewer->GetPreviewData();
               moveShown = ( anId > 0 );
             }
@@ -718,9 +775,9 @@ void SMESHGUI_MakeNodeAtPointOp::redisplayPreview()
     aMeshPreviewStruct = new SMESH::MeshPreviewStruct();
 
     aMeshPreviewStruct->nodesXYZ.length(1);
-    aMeshPreviewStruct->nodesXYZ[0].x = myDlg->myX->GetValue();
-    aMeshPreviewStruct->nodesXYZ[0].y = myDlg->myY->GetValue();
-    aMeshPreviewStruct->nodesXYZ[0].z = myDlg->myZ->GetValue();
+    aMeshPreviewStruct->nodesXYZ[0].x = myDlg->myDestinationX->GetValue();
+    aMeshPreviewStruct->nodesXYZ[0].y = myDlg->myDestinationY->GetValue();
+    aMeshPreviewStruct->nodesXYZ[0].z = myDlg->myDestinationZ->GetValue();
 
     aMeshPreviewStruct->elementTypes.length(1);
     aMeshPreviewStruct->elementTypes[0].SMDS_ElementType = SMESH::NODE;
@@ -737,7 +794,7 @@ void SMESHGUI_MakeNodeAtPointOp::redisplayPreview()
     mySimulation->SetData(aMeshPreviewStruct._retn());
   }
   else
-{
+  {
     mySimulation->SetVisibility(false);
   }
 
index 4ab5194e1829186add827080482aa20fb8c2cee8..24be56a428fabd94d59e307bd488096a05851df8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #include "SMESHGUI_Dialog.h"
 #include "SMESHGUI_SelectionOp.h"
 
+class QButtonGroup;
+class QCheckBox;
 class QGroupBox;
 class QLineEdit;
 class QPushButton;
-class QCheckBox;
+class QRadioButton;
 class SMESHGUI_SpinBox;
 class SMESHGUI_MeshEditPreview;
 class SMESHGUI_MakeNodeAtPointDlg;
@@ -70,8 +72,11 @@ private slots:
   void                           redisplayPreview();
   void                           onTextChange( const QString& );
   void                           onUpdateDestination();
+  void                           onDestCoordChanged();
 
 private:
+  int                           GetConstructorId();
+
   SMESHGUI_MakeNodeAtPointDlg*  myDlg;
 
   SUIT_SelectionFilter*         myFilter;
@@ -80,6 +85,7 @@ private:
   SMESH_Actor*                  myMeshActor;
   bool                          myNoPreview;
   bool                          myUpdateDestination;
+  bool                          myDestCoordChanged;
 };
 
 /*!
@@ -96,21 +102,29 @@ public:
 private:
   QWidget*                      createMainFrame( QWidget* );
 
-  QPushButton*                  myCoordBtn;
+  QWidget*                      myMainFrame;
+
+  QButtonGroup*                 myButtonGroup;
+  QRadioButton*                 myRButNodeToMove;
+  QRadioButton*                 myRButMoveWithoutNode;
+  QPushButton*                  myDestBtn;
   QPushButton*                  myUpdateBtn;
-  SMESHGUI_SpinBox*             myX;
-  SMESHGUI_SpinBox*             myY;
-  SMESHGUI_SpinBox*             myZ;
+  QGroupBox*                    myDestinationGrp;
   QGroupBox*                    myNodeToMoveGrp;
   QPushButton*                  myIdBtn;
   QLineEdit*                    myId;
   SMESHGUI_SpinBox*             myCurrentX;
   SMESHGUI_SpinBox*             myCurrentY;
   SMESHGUI_SpinBox*             myCurrentZ;
-  SMESHGUI_SpinBox*             myDX;
-  SMESHGUI_SpinBox*             myDY;
-  SMESHGUI_SpinBox*             myDZ;
-  QCheckBox*                    myAutoSearchChkBox;
+  SMESHGUI_SpinBox*             myDestinationX;
+  SMESHGUI_SpinBox*             myDestinationY;
+  SMESHGUI_SpinBox*             myDestinationZ;
+  QLabel*                       myDestDXLabel;
+  QLabel*                       myDestDYLabel;
+  QLabel*                       myDestDZLabel;
+  SMESHGUI_SpinBox*             myDestDX;
+  SMESHGUI_SpinBox*             myDestDY;
+  SMESHGUI_SpinBox*             myDestDZ;
   QCheckBox*                    myPreviewChkBox;
 
   QString                       myHelpFileName;
@@ -119,6 +133,7 @@ private:
 
 private slots:
   void                          ButtonToggled( bool );
+  void                          ConstructorsClicked( int );
 };
 
 #endif // SMESHGUI_MAKENODEATPOINTDLG_H
index 8cbf403640db511eb99eed6e368f1024b4afa339..e00937aff8a58015ab84f83d1597541fb177a03c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 65e3539cde8cf404a7673828ff4dc240c62c0fc1..964f7418dbf740d99044507b027dddfff0c605d9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 24b96938dd71ef3c4559d7d6e145179087153ea9..f5b7754c2cd8eea6646319e83c28e600709e102b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index de4fa51e6818210937157134c7450b9a6c370042..fed3a1865c3557d6f1ec50ea4e5e0c7f2f8e0b10 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4b030bbc0025a2e8904db42b24f56794fc2273f6..6826732050f8621914adbfc85900e1eff8278548 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -149,16 +149,20 @@ void SMESHGUI_MeshTab::setAvailableHyps( const int theId, const QStringList& the
   myAvailableHyps[ theId ] = theHyps;
 
   bool enable = ! theHyps.isEmpty();
-  if ( theId == Algo )
+  if ( theId == Algo ) // fill list of algos
   {
     myHyp[ Algo ]->clear();
-    myHyp[ Algo ]->addItem( tr( "NONE" ) );
-    myHyp[ Algo ]->addItems( theHyps );
-    myHyp[ Algo ]->setCurrentIndex( 0 );
+    if ( enable )
+    {
+      myHyp[ Algo ]->addItem( tr( "NONE" ) );
+      myHyp[ Algo ]->addItems( theHyps );
+      myHyp[ Algo ]->setCurrentIndex( 0 );
+    }
   }
-  else {
+  else // enable buttons
+  {
     myCreateHyp[ theId ]->setEnabled( enable );
-    myEditHyp[ theId ]->setEnabled( false );
+    myEditHyp  [ theId ]->setEnabled( false );
   }
   myHyp[ theId ]->setEnabled( enable );
 }
@@ -166,21 +170,30 @@ void SMESHGUI_MeshTab::setAvailableHyps( const int theId, const QStringList& the
 //================================================================================
 /*!
  * \brief Sets existing hypothesis
-  * \param theId - identifier of hypothesis (main or additional, see HypType enumeration)
-  * \param theHyps - list of available hypothesis names
- * 
+ * \param theId - identifier of hypothesis (main or additional, see HypType enumeration)
+ * \param theHyps - list of available hypothesis names
+ * \param theDefaultAvlbl - \c true means that the algorithm can with w/o hypothesis
+ *                          with some default parameters
+ *
  * Sets existing main or additional hypothesis for this tab
  */
 //================================================================================
-void SMESHGUI_MeshTab::setExistingHyps( const int theId, const QStringList& theHyps )
+void SMESHGUI_MeshTab::setExistingHyps( const int          theId,
+                                        const QStringList& theHyps,
+                                        bool               theDefaultAvlbl)
 {
   if ( theId != Algo )
   {
+    bool enable = ! myAvailableHyps[ theId ].isEmpty();
     myHyp[ theId ]->clear();
-    myHyp[ theId ]->addItem( tr( "NONE" ) );
-    myHyp[ theId ]->addItems( theHyps );
-    myHyp[ theId ]->setCurrentIndex( 0 );
-    myHyp[ theId ]->setEnabled( !theHyps.isEmpty() );
+    if ( enable )
+    {
+      QString none = tr( theDefaultAvlbl ? "DEFAULT" : ( theId == AddHyp ) ? "NONE" : "NONE" );
+      myHyp[ theId ]->addItem( none );
+      myHyp[ theId ]->addItems( theHyps );
+      myHyp[ theId ]->setCurrentIndex( 0 );
+    }
+    myHyp    [ theId ]->setEnabled( enable );
     myEditHyp[ theId ]->setEnabled( false );
   }
 }
@@ -188,9 +201,9 @@ void SMESHGUI_MeshTab::setExistingHyps( const int theId, const QStringList& theH
 //================================================================================
 /*!
  * \brief Adds hypothesis in combo box of available ones
 * \param theId - identifier of hypothesis (main or additional, see HypType enumeration)
 * \param theHyp - name of hypothesis to be added
- * 
+ * \param theId - identifier of hypothesis (main or additional, see HypType enumeration)
+ * \param theHyp - name of hypothesis to be added
+ *
  * Adds hypothesis in combo box of available ones. This method is called by operation
  * after creation of new hypothesis.
  */
@@ -364,6 +377,9 @@ SMESHGUI_MeshDlg::SMESHGUI_MeshDlg( const bool theToCreate, const bool theIsMesh
   // geometry
   createObject( tr( "GEOMETRY" ), mainFrame(), Geom );
   myGeomPopup = 0;
+  // mesh type
+  QLabel* anMeshTypeLbl = new QLabel( tr( "MESH_TYPE" ), this );
+  myMeshType = new QComboBox( this );
   
   // Create tab widget
   
@@ -398,10 +414,16 @@ SMESHGUI_MeshDlg::SMESHGUI_MeshDlg( const bool theToCreate, const bool theIsMesh
   aLay->addWidget( objectWg( Geom, Label ),   2, 0 );
   aLay->addWidget( objectWg( Geom, Btn ),     2, 1 );
   aLay->addWidget( objectWg( Geom, Control ), 2, 2 );
-  aLay->addWidget( myTabWg,                   4, 0, 1, 3 );
-  aLay->addWidget( myHypoSetButton,           5, 0, 1, 3 );
+  aLay->addWidget( anMeshTypeLbl,             3, 0 );
+  aLay->addWidget( myMeshType,                3, 2 );
+  aLay->addWidget( myTabWg,                   5, 0, 1, 3 );
+  aLay->addWidget( myHypoSetButton,           6, 0, 1, 3 );
   aLay->setRowMinimumHeight( 3, 20 );
 
+  myMeshType->clear();
+
+  // Connect signals and slots
+  connect( myMeshType, SIGNAL( activated( int ) ), SLOT( onChangedMeshType( int ) ) );
   // Disable controls if necessary
   setObjectShown( Mesh, false );
   if ( theToCreate )
@@ -615,3 +637,43 @@ int SMESHGUI_MeshDlg::getActiveObject()
       return i;
   return -1;
 }
+//================================================================================
+/*!
+ * \brief Sets available types of mesh
+ * \param theTypeMesh - list of available types of mesh
+ */
+//================================================================================
+void SMESHGUI_MeshDlg::setAvailableMeshType( const QStringList& theTypeMesh )
+{
+  myMeshType->clear();
+  myMeshType->addItems(theTypeMesh);
+}
+//================================================================================
+/*!
+ * \brief Emits selectMeshType( const int, const int ) signal
+ *
+ * SLOT is called when a combo box "mesh type" is selected.
+ */
+//================================================================================
+void SMESHGUI_MeshDlg::onChangedMeshType( const int isIndex )
+{
+  emit selectMeshType( Dim3D - myTabWg->currentIndex(), isIndex );
+}
+//================================================================================
+/*!
+ * \brief Get current index types of mesh
+ */
+//================================================================================
+int SMESHGUI_MeshDlg::currentMeshType( )
+{
+  return myMeshType->currentIndex( );
+}
+//================================================================================
+/*!
+ * \brief Set current index types of mesh
+ */
+//================================================================================
+void SMESHGUI_MeshDlg::setCurrentMeshType( const int theIndex )
+{
+  myMeshType->setCurrentIndex( theIndex );
+}
index 6ba8e6cb94c0f5cc34998266c1d6ccb283021264..2d0cdde7459bae9bf21f6e3759b457712977f4cb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -74,21 +74,27 @@ public:
   void                         enableTab(const int);
   bool                         isTabEnabled(const int) const;
   int                          getActiveObject();
+  void                         setAvailableMeshType(const QStringList& );
+  int                          currentMeshType();
+  void                         setCurrentMeshType( const int );
 
 signals:
   void                         hypoSet( const QString& );
   void                         geomSelectionByMesh( bool );
+  void                         selectMeshType( const int, const int );
 
 private slots:  
   void                         onHypoSetPopup( QAction* );
   void                         onGeomPopup( QAction* );
   void                         onGeomSelectionButton( bool );
+  void                         onChangedMeshType( const int );
 
 private:
   QMap<int, SMESHGUI_MeshTab*> myTabs;
   QTabWidget*                  myTabWg;
   QToolButton*                 myHypoSetButton;
   QMenu*                       myGeomPopup;
+  QComboBox*                   myMeshType;
 };
 
 /*!
@@ -114,7 +120,7 @@ public:
   virtual ~SMESHGUI_MeshTab();
   
   void                         setAvailableHyps( const int, const QStringList& );
-  void                         setExistingHyps( const int, const QStringList& );
+  void                         setExistingHyps( const int, const QStringList&, bool=false);
   void                         addHyp( const int, const QString& );
   void                         renameHyp( const int, const int, const QString& );
   void                         setCurrentHyp( const int, const int );
index 439abbb57c86c3f93b0d948c7cabe6c76f689e09..ef9ac22ad31e41cc782d610860acdbb2ec97c600 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #include "SMESHGUI_MeshEditPreview.h"
 
 #include "SMESHGUI_VTKUtils.h"
-
-#include <SMESH_Actor.h>
-#include <SMESH_ActorUtils.h>
+#include "SMESH_Actor.h"
+#include "SMESH_ActorUtils.h"
 
 // SALOME GUI includes
-#include <VTKViewer_CellLocationsArray.h>
+#include <SVTK_Renderer.h>
 #include <SVTK_ViewWindow.h>
+#include <VTKViewer_CellLocationsArray.h>
 
 // VTK includes
-#include <vtkPoints.h>
-#include <vtkIdList.h>
 #include <vtkCellArray.h>
-#include <vtkUnsignedCharArray.h>
-#include <vtkUnstructuredGrid.h>
-#include <vtkUnstructuredGridWriter.h>
+#include <vtkCoordinate.h>
 #include <vtkDataSetMapper.h>
+#include <vtkIdList.h>
+#include <vtkPoints.h>
 #include <vtkProperty.h>
+#include <vtkRenderer.h>
+#include <vtkTextActor.h>
+#include <vtkTextMapper.h>
+#include <vtkUnsignedCharArray.h>
+#include <vtkUnstructuredGrid.h>
 
 // Qt includes
 #include <QColor>
@@ -53,6 +56,8 @@
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
 
+#include <gp_Ax3.hxx>
+
 //================================================================================
 /*!
  * \brief Constructor
@@ -86,7 +91,6 @@ SMESHGUI_MeshEditPreview::SMESHGUI_MeshEditPreview(SVTK_ViewWindow* theViewWindo
   aMapper->Delete();
 
   myViewWindow->AddActor(myPreviewActor);
-
 }
 
 //================================================================================
@@ -99,9 +103,15 @@ SMESHGUI_MeshEditPreview::~SMESHGUI_MeshEditPreview()
 {
   myGrid->Delete();
 
+  for ( size_t iA = 0; iA < myLabelActors.size(); ++iA )
+    if ( myLabelActors[iA] )
+    {
+      myPreviewActor->GetRenderer()->RemoveActor( myLabelActors[iA] );
+      myLabelActors[iA]->Delete();
+    }
+
   myViewWindow->RemoveActor(myPreviewActor);
   myPreviewActor->Delete();
-
 }
 
 //================================================================================
@@ -224,6 +234,128 @@ void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct* previewD
   SetVisibility(true);
 }
 
+//================================================================================
+/*!
+ * \brief Set shape of an arrow of a unit length and nb of arrows
+ */
+//================================================================================
+
+void SMESHGUI_MeshEditPreview::SetArrowShapeAndNb( int         nbArrows,
+                                                   double      headLength,
+                                                   double      headRadius,
+                                                   double      start,
+                                                   const char* labels)
+{
+  const int theNbPoints = 10; // in one arrow
+  myUnitArrowPnts.reserve( theNbPoints );
+  myUnitArrowPnts.clear();
+
+  // unit arrow || OZ
+
+  for ( int i = 0; i < theNbPoints - 2; ++i )
+  {
+    double angle = i * 2 * M_PI / ( theNbPoints - 2 );
+    myUnitArrowPnts.push_back( gp_Pnt( headRadius * Cos( angle ),
+                                       headRadius * Sin( angle ),
+                                       1. - headLength ));
+  }
+  myUnitArrowPnts.push_back( gp_Pnt( 0, 0, start ));
+  myUnitArrowPnts.push_back( gp_Pnt( 0, 0, 1 ));
+
+
+  // nodes of all arrows
+
+  vtkPoints* aPoints = vtkPoints::New();
+  aPoints->SetNumberOfPoints( theNbPoints * nbArrows );
+  for ( int iP = 0, iA = 0; iA < nbArrows; ++iA )
+    for ( int i = 0; i < theNbPoints; ++i, ++iP )
+      aPoints->SetPoint( iP,
+                         myUnitArrowPnts[i].X(),
+                         myUnitArrowPnts[i].Y(),
+                         myUnitArrowPnts[i].Z()  );
+  myGrid->SetPoints(aPoints);
+  aPoints->Delete();
+
+  // connectivity of all arrows
+
+  const int theNbCells = ( theNbPoints - 1 ); // in one arrow
+  myGrid->Allocate( theNbCells  * nbArrows );
+  for ( int nP = 0, iA = 0; iA < nbArrows; ++iA, nP += theNbPoints )
+  {
+    vtkIdType conn[3] = { theNbPoints - 1 + nP, // arrow end
+                          theNbPoints - 3 + nP, // point on a circle
+                          nP };                 // point on a circle
+    for ( int i = 0; i < theNbCells-1; ++i )
+    {
+      myGrid->InsertNextCell( VTK_TRIANGLE, 3, conn );
+      conn[1] = conn[2];
+      conn[2] = conn[2] + 1;
+    }
+    conn[1] = theNbPoints - 2 + nP;
+    myGrid->InsertNextCell( VTK_LINE, 2, conn );
+  }
+
+  myLabelActors.resize( nbArrows, ( vtkTextActor*) NULL );
+  char label[] = "X";
+  if ( labels )
+    for ( int iP = 0, iA = 0; iA < nbArrows; ++iA )
+    {
+      label[0] = labels[iA];
+      vtkTextMapper* text = vtkTextMapper::New();
+      text->SetInput( label );
+      vtkCoordinate* coord = vtkCoordinate::New();
+
+      myLabelActors[iA] = vtkTextActor::New();
+      //myLabelActors[iA]->SetMapper( text );
+      myLabelActors[iA]->SetInput( label );
+      myLabelActors[iA]->SetTextScaleModeToNone();
+      myLabelActors[iA]->PickableOff();
+      myLabelActors[iA]->GetPositionCoordinate()->SetReferenceCoordinate( coord );
+
+      text->Delete();
+      coord->Delete();
+
+      myPreviewActor->GetRenderer()->AddActor(myLabelActors[iA]);
+    }
+}
+
+//================================================================================
+/*!
+ * \brief Set data to show moved/rotated/scaled arrows
+ *  \param [in] axes - location and direction of the arrows
+ *  \param [in] length - length of arrows
+ */
+//================================================================================
+
+void SMESHGUI_MeshEditPreview::SetArrows( const gp_Ax1* axes,
+                                          double        length )
+{
+  vtkPoints* aPoints = myGrid->GetPoints();
+
+  for ( int iP = 0, iA = 0; iA < myLabelActors.size(); ++iA )
+  {
+    gp_Trsf trsf;
+    trsf.SetTransformation( gp_Ax3( axes[iA].Location(), axes[iA].Direction() ), gp::XOY() );
+
+    for ( size_t i = 0; i < myUnitArrowPnts.size(); ++i, ++iP )
+    {
+      gp_Pnt p = myUnitArrowPnts[i].Scaled( gp::Origin(), length );
+      p.Transform( trsf );
+      aPoints->SetPoint( iP, p.X(), p.Y(), p.Z() );
+    }
+    if ( myLabelActors[iA] )
+      if ( vtkCoordinate* aCoord =
+           myLabelActors[iA]->GetPositionCoordinate()->GetReferenceCoordinate() )
+      {
+        double p[3];
+        aPoints->GetPoint( iP-1, p );
+        aCoord->SetValue( p );
+      }
+  }
+
+  myGrid->Modified();
+}
+
 //================================================================================
 /*!
  * \brief Set visibility
@@ -233,6 +365,9 @@ void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct* previewD
 void SMESHGUI_MeshEditPreview::SetVisibility (bool theVisibility)
 {
   myPreviewActor->SetVisibility(theVisibility);
+  for ( size_t iA = 0; iA < myLabelActors.size(); ++iA )
+    if ( myLabelActors[iA] )
+      myLabelActors[iA]->SetVisibility(theVisibility);
   SMESH::RepaintCurrentView();
 }
 
@@ -252,7 +387,19 @@ void SMESHGUI_MeshEditPreview::SetColor(double R, double G, double B)
  * \brief Get preview actor
  */
 //================================================================================
+
 SALOME_Actor* SMESHGUI_MeshEditPreview::GetActor() const
 { 
   return myPreviewActor;
 }
+
+//================================================================================
+/*!
+ * \brief Returns the priewed vtkUnstructuredGrid
+ */
+//================================================================================
+
+vtkUnstructuredGrid* SMESHGUI_MeshEditPreview::GetGrid() const
+{
+  return myGrid;
+}
index bd94152eaad4a5718347b19b00ce574c284c08c2..7eaff287ad4e8ae18445fee88ebf1f3fce7742c6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #ifndef SMESHGUI_MESHEDITPREVIEW_H
 #define SMESHGUI_MESHEDITPREVIEW_H
 
-// SMESH includes
 #include "SMESH_SMESHGUI.hxx"
+#include <vector>
+#include <gp_Ax1.hxx>
+#include <gp_Pnt.hxx>
 
+class SALOME_Actor;
 class SVTK_ViewWindow;
+class vtkTextActor;
 class vtkUnstructuredGrid;
-class SALOME_Actor;
 
 namespace SMESH
 {
@@ -49,14 +52,28 @@ class SMESHGUI_EXPORT SMESHGUI_MeshEditPreview
   vtkUnstructuredGrid* myGrid;
   SALOME_Actor*        myPreviewActor;
 
+  std::vector<gp_Pnt>        myUnitArrowPnts;
+  std::vector<vtkTextActor*> myLabelActors;
+
 public:
   SMESHGUI_MeshEditPreview( SVTK_ViewWindow* );
   ~SMESHGUI_MeshEditPreview();
 
   void                 SetData( const SMESH::MeshPreviewStruct* );
+
   void                 SetVisibility( bool );
   void                 SetColor( double, double, double );
+
+  void                 SetArrowShapeAndNb( int         nbArrows,
+                                           double      headLength,
+                                           double      headRadius,
+                                           double      start=0.,
+                                           const char* labels=0);
+  void                 SetArrows( const gp_Ax1* axes,
+                                  double        length);
+
   SALOME_Actor*        GetActor() const;
+  vtkUnstructuredGrid* GetGrid() const;
 };
 
 #endif // SMESHGUI_MESHEDITPREVIEW_H
index e17221fffca5b8c1a70e89dd51bc2d9ba3ff4ac3..2dca23bbacc452bd8c4466bf80eecfe6629d2b91 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -29,6 +29,7 @@
 #include "SMDS_EdgePosition.hxx"
 #include "SMDS_FacePosition.hxx"
 #include "SMDS_Mesh.hxx"
+#include "SMDS_VolumeTool.hxx"
 #include "SMESHDS_Mesh.hxx"
 #include "SMESHGUI.h"
 #include "SMESHGUI_FilterUtils.h"
@@ -246,20 +247,22 @@ SMESHGUI_MeshInfo::SMESHGUI_MeshInfo( QWidget* parent )
 
   // elements
   QWidget* aElemLine   = createLine();
-  QLabel*  aElemLab    = new QLabel( tr( "ELEMENTS_LAB" ),  this );
-  QLabel*  aElemTotal  = new QLabel( tr( "TOTAL_LAB" ),     this );
-  QLabel*  aElemLin    = new QLabel( tr( "LINEAR_LAB" ),    this );
-  QLabel*  aElemQuad   = new QLabel( tr( "QUADRATIC_LAB" ), this );
+  QLabel*  aElemLab    = new QLabel( tr( "ELEMENTS_LAB" ),     this );
+  QLabel*  aElemTotal  = new QLabel( tr( "TOTAL_LAB" ),        this );
+  QLabel*  aElemLin    = new QLabel( tr( "LINEAR_LAB" ),       this );
+  QLabel*  aElemQuad   = new QLabel( tr( "QUADRATIC_LAB" ),    this );
+  QLabel*  aElemBiQuad = new QLabel( tr( "BI_QUADRATIC_LAB" ), this );
   myWidgets[ index++ ] << aElemLine;
-  myWidgets[ index++ ] << aElemLab << aElemTotal << aElemLin << aElemQuad;
+  myWidgets[ index++ ] << aElemLab << aElemTotal << aElemLin << aElemQuad << aElemBiQuad;
 
   // ... Number elements
   QWidget* aNbLine     = createLine(); 
   QLabel*  aNbTotal    = createField();
   QLabel*  aNbLin      = createField();
   QLabel*  aNbQuad     = createField();
+  QLabel*  aNbBiQuad   = createField();
   myWidgets[ index++ ] << aNbLine;
-  myWidgets[ index++ ] << new QLabel( "", this ) << aNbTotal << aNbLin << aNbQuad;
+  myWidgets[ index++ ] << new QLabel( "", this ) << aNbTotal << aNbLin << aNbQuad << aNbBiQuad;
 
   // ... 0D elements
   QWidget* a0DLine     = createLine();
@@ -285,57 +288,62 @@ SMESHGUI_MeshInfo::SMESHGUI_MeshInfo( QWidget* parent )
   myWidgets[ index++ ] << a1DLab << a1DTotal << a1DLin << a1DQuad;
 
   // ... 2D elements
-  QWidget* a2DLine     = createLine();
-  QLabel*  a2DLab      = new QLabel( tr( "2D_LAB" ), this );
-  QLabel*  a2DTotal    = createField();
-  QLabel*  a2DLin      = createField();
-  QLabel*  a2DQuad     = createField();
-  QLabel*  a2DTriLab   = new QLabel( tr( "TRIANGLES_LAB" ), this );
-  QLabel*  a2DTriTotal = createField();
-  QLabel*  a2DTriLin   = createField();
-  QLabel*  a2DTriQuad  = createField();
-  QLabel*  a2DQuaLab   = new QLabel( tr( "QUADRANGLES_LAB" ), this );
-  QLabel*  a2DQuaTotal = createField();
-  QLabel*  a2DQuaLin   = createField();
-  QLabel*  a2DQuaQuad  = createField();
-  QLabel*  a2DPolLab   = new QLabel( tr( "POLYGONS_LAB" ), this );
-  QLabel*  a2DPolTotal = createField();
+  QWidget* a2DLine      = createLine();
+  QLabel*  a2DLab       = new QLabel( tr( "2D_LAB" ), this );
+  QLabel*  a2DTotal     = createField();
+  QLabel*  a2DLin       = createField();
+  QLabel*  a2DQuad      = createField();
+  QLabel*  a2DBiQuad    = createField();
+  QLabel*  a2DTriLab    = new QLabel( tr( "TRIANGLES_LAB" ), this );
+  QLabel*  a2DTriTotal  = createField();
+  QLabel*  a2DTriLin    = createField();
+  QLabel*  a2DTriQuad   = createField();
+  QLabel*  a2DTriBiQuad = createField();
+  QLabel*  a2DQuaLab    = new QLabel( tr( "QUADRANGLES_LAB" ), this );
+  QLabel*  a2DQuaTotal  = createField();
+  QLabel*  a2DQuaLin    = createField();
+  QLabel*  a2DQuaQuad   = createField();
+  QLabel*  a2DQuaBiQuad = createField();
+  QLabel*  a2DPolLab    = new QLabel( tr( "POLYGONS_LAB" ), this );
+  QLabel*  a2DPolTotal  = createField();
   myWidgets[ index++ ] << a2DLine;
-  myWidgets[ index++ ] << a2DLab    << a2DTotal    << a2DLin    << a2DQuad;
-  myWidgets[ index++ ] << a2DTriLab << a2DTriTotal << a2DTriLin << a2DTriQuad;
-  myWidgets[ index++ ] << a2DQuaLab << a2DQuaTotal << a2DQuaLin << a2DQuaQuad;
+  myWidgets[ index++ ] << a2DLab    << a2DTotal    << a2DLin    << a2DQuad    << a2DBiQuad;
+  myWidgets[ index++ ] << a2DTriLab << a2DTriTotal << a2DTriLin << a2DTriQuad << a2DTriBiQuad;
+  myWidgets[ index++ ] << a2DQuaLab << a2DQuaTotal << a2DQuaLin << a2DQuaQuad << a2DQuaBiQuad;
   myWidgets[ index++ ] << a2DPolLab << a2DPolTotal;
 
   // ... 3D elements
-  QWidget* a3DLine     = createLine();
-  QLabel*  a3DLab      = new QLabel( tr( "3D_LAB" ), this );
-  QLabel*  a3DTotal    = createField();
-  QLabel*  a3DLin      = createField();
-  QLabel*  a3DQuad     = createField();
-  QLabel*  a3DTetLab   = new QLabel( tr( "TETRAHEDRONS_LAB" ), this );
-  QLabel*  a3DTetTotal = createField();
-  QLabel*  a3DTetLin   = createField();
-  QLabel*  a3DTetQuad  = createField();
-  QLabel*  a3DHexLab   = new QLabel( tr( "HEXAHEDONRS_LAB" ), this );
-  QLabel*  a3DHexTotal = createField();
-  QLabel*  a3DHexLin   = createField();
-  QLabel*  a3DHexQuad  = createField();
-  QLabel*  a3DPyrLab   = new QLabel( tr( "PYRAMIDS_LAB" ), this );
-  QLabel*  a3DPyrTotal = createField();
-  QLabel*  a3DPyrLin   = createField();
-  QLabel*  a3DPyrQuad  = createField();
-  QLabel*  a3DPriLab   = new QLabel( tr( "PRISMS_LAB" ), this );
-  QLabel*  a3DPriTotal = createField();
-  QLabel*  a3DPriLin   = createField();
-  QLabel*  a3DPriQuad  = createField();
+  QWidget* a3DLine      = createLine();
+  QLabel*  a3DLab       = new QLabel( tr( "3D_LAB" ), this );
+  QLabel*  a3DTotal     = createField();
+  QLabel*  a3DLin       = createField();
+  QLabel*  a3DQuad      = createField();
+  QLabel*  a3DBiQuad    = createField();
+  QLabel*  a3DTetLab    = new QLabel( tr( "TETRAHEDRONS_LAB" ), this );
+  QLabel*  a3DTetTotal  = createField();
+  QLabel*  a3DTetLin    = createField();
+  QLabel*  a3DTetQuad   = createField();
+  QLabel*  a3DHexLab    = new QLabel( tr( "HEXAHEDONRS_LAB" ), this );
+  QLabel*  a3DHexTotal  = createField();
+  QLabel*  a3DHexLin    = createField();
+  QLabel*  a3DHexQuad   = createField();
+  QLabel*  a3DHexBiQuad = createField();
+  QLabel*  a3DPyrLab    = new QLabel( tr( "PYRAMIDS_LAB" ), this );
+  QLabel*  a3DPyrTotal  = createField();
+  QLabel*  a3DPyrLin    = createField();
+  QLabel*  a3DPyrQuad   = createField();
+  QLabel*  a3DPriLab    = new QLabel( tr( "PRISMS_LAB" ), this );
+  QLabel*  a3DPriTotal  = createField();
+  QLabel*  a3DPriLin    = createField();
+  QLabel*  a3DPriQuad   = createField();
   QLabel*  a3DHexPriLab   = new QLabel( tr( "HEX_PRISMS_LAB" ), this );
   QLabel*  a3DHexPriTotal = createField();
-  QLabel*  a3DPolLab   = new QLabel( tr( "POLYHEDRONS_LAB" ), this );
-  QLabel*  a3DPolTotal = createField();
+  QLabel*  a3DPolLab    = new QLabel( tr( "POLYHEDRONS_LAB" ), this );
+  QLabel*  a3DPolTotal  = createField();
   myWidgets[ index++ ] << a3DLine;
-  myWidgets[ index++ ] << a3DLab    << a3DTotal    << a3DLin    << a3DQuad;
+  myWidgets[ index++ ] << a3DLab    << a3DTotal    << a3DLin    << a3DQuad    << a3DBiQuad;
   myWidgets[ index++ ] << a3DTetLab << a3DTetTotal << a3DTetLin << a3DTetQuad;
-  myWidgets[ index++ ] << a3DHexLab << a3DHexTotal << a3DHexLin << a3DHexQuad;
+  myWidgets[ index++ ] << a3DHexLab << a3DHexTotal << a3DHexLin << a3DHexQuad << a3DHexBiQuad;
   myWidgets[ index++ ] << a3DPyrLab << a3DPyrTotal << a3DPyrLin << a3DPyrQuad;
   myWidgets[ index++ ] << a3DPriLab << a3DPriTotal << a3DPriLin << a3DPriQuad;
   myWidgets[ index++ ] << a3DHexPriLab << a3DHexPriTotal;
@@ -345,92 +353,101 @@ SMESHGUI_MeshInfo::SMESHGUI_MeshInfo( QWidget* parent )
   myLoadBtn->setAutoDefault( true );
   connect( myLoadBtn, SIGNAL( clicked() ), this, SLOT( loadMesh() ) );
   
-  setFontAttributes( aNameLab,   Bold );
-  setFontAttributes( aObjLab,    Bold );
-  setFontAttributes( aNodesLab,  Bold );
-  setFontAttributes( aElemLab,   Bold );
-  setFontAttributes( aElemTotal, Italic );
-  setFontAttributes( aElemLin,   Italic );
-  setFontAttributes( aElemQuad,  Italic );
-  setFontAttributes( a0DLab,     Bold );
-  setFontAttributes( aBallLab,     Bold );
-  setFontAttributes( a1DLab,     Bold );
-  setFontAttributes( a2DLab,     Bold );
-  setFontAttributes( a3DLab,     Bold );
+  setFontAttributes( aNameLab,    Bold );
+  setFontAttributes( aObjLab,     Bold );
+  setFontAttributes( aNodesLab,   Bold );
+  setFontAttributes( aElemLab,    Bold );
+  setFontAttributes( aElemTotal,  Italic );
+  setFontAttributes( aElemLin,    Italic );
+  setFontAttributes( aElemQuad,   Italic );
+  setFontAttributes( aElemBiQuad, Italic );
+  setFontAttributes( a0DLab,      Bold );
+  setFontAttributes( aBallLab,    Bold );
+  setFontAttributes( a1DLab,      Bold );
+  setFontAttributes( a2DLab,      Bold );
+  setFontAttributes( a3DLab,      Bold );
 
   l->addWidget( aNameLab,     0, 0 );
-  l->addWidget( aName,        0, 1, 1, 3 );
+  l->addWidget( aName,        0, 1, 1, 4 );
   l->addWidget( aObjLab,      1, 0 );
-  l->addWidget( aObj,         1, 1, 1, 3 );
-  l->addWidget( aNodesLine,   2, 0, 1, 4 );
+  l->addWidget( aObj,         1, 1, 1, 4 );
+  l->addWidget( aNodesLine,   2, 0, 1, 5 );
   l->addWidget( aNodesLab,    3, 0 );
   l->addWidget( aNodes,       3, 1 );
-  l->addWidget( aElemLine,    4, 0, 1, 4 );
+  l->addWidget( aElemLine,    4, 0, 1, 5 );
   l->addWidget( aElemLab,     5, 0 );
   l->addWidget( aElemTotal,   5, 1 );
   l->addWidget( aElemLin,     5, 2 );
   l->addWidget( aElemQuad,    5, 3 );
-  l->addWidget( aNbLine,      6, 1, 1, 3 );
+  l->addWidget( aElemBiQuad,  5, 4 );
+  l->addWidget( aNbLine,      6, 1, 1, 4 );
   l->addWidget( aNbTotal,     7, 1 );
   l->addWidget( aNbLin,       7, 2 );
   l->addWidget( aNbQuad,      7, 3 );
-  l->addWidget( a0DLine,      8, 1, 1, 3 );
+  l->addWidget( aNbBiQuad,    7, 4 );
+  l->addWidget( a0DLine,      8, 1, 1, 4 );
   l->addWidget( a0DLab,       9, 0 );
   l->addWidget( a0DTotal,     9, 1 );
-  l->addWidget( aBallLine,    10, 1, 1, 3 );
+  l->addWidget( aBallLine,    10, 1, 1, 4 );
   l->addWidget( aBallLab,     11, 0 );
   l->addWidget( aBallTotal,   11, 1 );
-  l->addWidget( a1DLine,      12, 1, 1, 3 );
+  l->addWidget( a1DLine,      12, 1, 1, 4 );
   l->addWidget( a1DLab,       13, 0 );
   l->addWidget( a1DTotal,     13, 1 );
   l->addWidget( a1DLin,       13, 2 );
   l->addWidget( a1DQuad,      13, 3 );
-  l->addWidget( a2DLine,     14, 1, 1, 3 );
-  l->addWidget( a2DLab,      15, 0 );
-  l->addWidget( a2DTotal,    15, 1 );
-  l->addWidget( a2DLin,      15, 2 );
-  l->addWidget( a2DQuad,     15, 3 );
-  l->addWidget( a2DTriLab,   16, 0 );
-  l->addWidget( a2DTriTotal, 16, 1 );
-  l->addWidget( a2DTriLin,   16, 2 );
-  l->addWidget( a2DTriQuad,  16, 3 );
-  l->addWidget( a2DQuaLab,   17, 0 );
-  l->addWidget( a2DQuaTotal, 17, 1 );
-  l->addWidget( a2DQuaLin,   17, 2 );
-  l->addWidget( a2DQuaQuad,  17, 3 );
-  l->addWidget( a2DPolLab,   18, 0 );
-  l->addWidget( a2DPolTotal, 18, 1 );
-  l->addWidget( a3DLine,     19, 1, 1, 3 );
-  l->addWidget( a3DLab,      20, 0 );
-  l->addWidget( a3DTotal,    20, 1 );
-  l->addWidget( a3DLin,      20, 2 );
-  l->addWidget( a3DQuad,     20, 3 );
-  l->addWidget( a3DTetLab,   21, 0 );
-  l->addWidget( a3DTetTotal, 21, 1 );
-  l->addWidget( a3DTetLin,   21, 2 );
-  l->addWidget( a3DTetQuad,  21, 3 );
-  l->addWidget( a3DHexLab,   22, 0 );
-  l->addWidget( a3DHexTotal, 22, 1 );
-  l->addWidget( a3DHexLin,   22, 2 );
-  l->addWidget( a3DHexQuad,  22, 3 );
-  l->addWidget( a3DPyrLab,   23, 0 );
-  l->addWidget( a3DPyrTotal, 23, 1 );
-  l->addWidget( a3DPyrLin,   23, 2 );
-  l->addWidget( a3DPyrQuad,  23, 3 );
-  l->addWidget( a3DPriLab,   24, 0 );
-  l->addWidget( a3DPriTotal, 24, 1 );
-  l->addWidget( a3DPriLin,   24, 2 );
-  l->addWidget( a3DPriQuad,  24, 3 );
+  l->addWidget( a2DLine,      14, 1, 1, 4 );
+  l->addWidget( a2DLab,       15, 0 );
+  l->addWidget( a2DTotal,     15, 1 );
+  l->addWidget( a2DLin,       15, 2 );
+  l->addWidget( a2DQuad,      15, 3 );
+  l->addWidget( a2DBiQuad,    15, 4 );
+  l->addWidget( a2DTriLab,    16, 0 );
+  l->addWidget( a2DTriTotal,  16, 1 );
+  l->addWidget( a2DTriLin,    16, 2 );
+  l->addWidget( a2DTriQuad,   16, 3 );
+  l->addWidget( a2DTriBiQuad, 16, 4 );
+  l->addWidget( a2DQuaLab,    17, 0 );
+  l->addWidget( a2DQuaTotal,  17, 1 );
+  l->addWidget( a2DQuaLin,    17, 2 );
+  l->addWidget( a2DQuaQuad,   17, 3 );
+  l->addWidget( a2DQuaBiQuad, 17, 4 );
+  l->addWidget( a2DPolLab,    18, 0 );
+  l->addWidget( a2DPolTotal,  18, 1 );
+  l->addWidget( a3DLine,      19, 1, 1, 4 );
+  l->addWidget( a3DLab,       20, 0 );
+  l->addWidget( a3DTotal,     20, 1 );
+  l->addWidget( a3DLin,       20, 2 );
+  l->addWidget( a3DQuad,      20, 3 );
+  l->addWidget( a3DBiQuad,    20, 4 );
+  l->addWidget( a3DTetLab,    21, 0 );
+  l->addWidget( a3DTetTotal,  21, 1 );
+  l->addWidget( a3DTetLin,    21, 2 );
+  l->addWidget( a3DTetQuad,   21, 3 );
+  l->addWidget( a3DHexLab,    22, 0 );
+  l->addWidget( a3DHexTotal,  22, 1 );
+  l->addWidget( a3DHexLin,    22, 2 );
+  l->addWidget( a3DHexQuad,   22, 3 );
+  l->addWidget( a3DHexBiQuad, 22, 4 );
+  l->addWidget( a3DPyrLab,    23, 0 );
+  l->addWidget( a3DPyrTotal,  23, 1 );
+  l->addWidget( a3DPyrLin,    23, 2 );
+  l->addWidget( a3DPyrQuad,   23, 3 );
+  l->addWidget( a3DPriLab,    24, 0 );
+  l->addWidget( a3DPriTotal,  24, 1 );
+  l->addWidget( a3DPriLin,    24, 2 );
+  l->addWidget( a3DPriQuad,   24, 3 );
   l->addWidget( a3DHexPriLab,   25, 0 );
   l->addWidget( a3DHexPriTotal, 25, 1 );
-  l->addWidget( a3DPolLab,   26, 0 );
-  l->addWidget( a3DPolTotal, 26, 1 ); 
-  l->addWidget( myLoadBtn,   28, 1, 1, 3 );
+  l->addWidget( a3DPolLab,    26, 0 );
+  l->addWidget( a3DPolTotal,  26, 1 );
+  l->addWidget( myLoadBtn,    28, 1, 1, 4 );
 
   l->setColumnStretch( 0, 0 );
   l->setColumnStretch( 1, 5 );
   l->setColumnStretch( 2, 5 );
   l->setColumnStretch( 3, 5 );
+  l->setColumnStretch( 4, 5 );
   l->setRowStretch( 27, 5 );
 
   clear();
@@ -484,49 +501,59 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
     myWidgets[i1D][iTotal]    ->setProperty( "text", QString::number( nbEdges ) );
     myWidgets[i1D][iLinear]   ->setProperty( "text", QString::number( info[SMDSEntity_Edge] ) );
     myWidgets[i1D][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Edge] ) );
-    long nbTriangles   = info[SMDSEntity_Triangle]   + info[SMDSEntity_Quad_Triangle]   + info[SMDSEntity_BiQuad_Triangle];
-    long nbQuadrangles = info[SMDSEntity_Quadrangle] + info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle];
-    long nb2DLinear    = info[SMDSEntity_Triangle] + info[SMDSEntity_Quadrangle] + info[SMDSEntity_Polygon];
-    long nb2DQuadratic = info[SMDSEntity_Quad_Triangle] + info[SMDSEntity_BiQuad_Triangle] + info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle];
-    myWidgets[i2D][iTotal]               ->setProperty( "text", QString::number( nb2DLinear + nb2DQuadratic ));
-    myWidgets[i2D][iLinear]              ->setProperty( "text", QString::number( nb2DLinear ) );
-    myWidgets[i2D][iQuadratic]           ->setProperty( "text", QString::number( nb2DQuadratic ) );
-    myWidgets[i2DTriangles][iTotal]      ->setProperty( "text", QString::number( nbTriangles ) );
-    myWidgets[i2DTriangles][iLinear]     ->setProperty( "text", QString::number( info[SMDSEntity_Triangle] ) );
-    myWidgets[i2DTriangles][iQuadratic]  ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Triangle] + info[SMDSEntity_BiQuad_Triangle]) );
-    myWidgets[i2DQuadrangles][iTotal]    ->setProperty( "text", QString::number( nbQuadrangles ) );
-    myWidgets[i2DQuadrangles][iLinear]   ->setProperty( "text", QString::number( info[SMDSEntity_Quadrangle] ) );
-    myWidgets[i2DQuadrangles][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle] ));
-    myWidgets[i2DPolygons][iTotal]       ->setProperty( "text", QString::number( info[SMDSEntity_Polygon] ) );
-    long nbTetrahedrons = info[SMDSEntity_Tetra]   + info[SMDSEntity_Quad_Tetra];
-    long nbHexahedrons  = info[SMDSEntity_Hexa]    + info[SMDSEntity_Quad_Hexa] + info[SMDSEntity_TriQuad_Hexa];
-    long nbPyramids     = info[SMDSEntity_Pyramid] + info[SMDSEntity_Quad_Pyramid];
-    long nbPrisms       = info[SMDSEntity_Penta]   + info[SMDSEntity_Quad_Penta];
-    long nb3DLinear     = info[SMDSEntity_Tetra] + info[SMDSEntity_Hexa] + info[SMDSEntity_Pyramid] + info[SMDSEntity_Penta] + info[SMDSEntity_Polyhedra] + info[SMDSEntity_Hexagonal_Prism];
-    long nb3DQuadratic  = info[SMDSEntity_Quad_Tetra] + info[SMDSEntity_Quad_Hexa] + info[SMDSEntity_TriQuad_Hexa] + info[SMDSEntity_Quad_Pyramid] + info[SMDSEntity_Quad_Penta];
-    myWidgets[i3D][iTotal]                ->setProperty( "text", QString::number( nb3DLinear + nb3DQuadratic ) );
-    myWidgets[i3D][iLinear]               ->setProperty( "text", QString::number( nb3DLinear ) );
-    myWidgets[i3D][iQuadratic]            ->setProperty( "text", QString::number( nb3DQuadratic ) );
-    myWidgets[i3DTetrahedrons][iTotal]    ->setProperty( "text", QString::number( nbTetrahedrons ) );
-    myWidgets[i3DTetrahedrons][iLinear]   ->setProperty( "text", QString::number( info[SMDSEntity_Tetra] ) );
-    myWidgets[i3DTetrahedrons][iQuadratic]->setProperty( "text", QString::number( info[SMDSEntity_Quad_Tetra] ) );
-    myWidgets[i3DHexahedrons][iTotal]     ->setProperty( "text", QString::number( nbHexahedrons ) );
-    myWidgets[i3DHexahedrons][iLinear]    ->setProperty( "text", QString::number( info[SMDSEntity_Hexa] ) );
-    myWidgets[i3DHexahedrons][iQuadratic] ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Hexa] + info[SMDSEntity_TriQuad_Hexa] ) );
-    myWidgets[i3DPyramids][iTotal]        ->setProperty( "text", QString::number( nbPyramids ) );
-    myWidgets[i3DPyramids][iLinear]       ->setProperty( "text", QString::number( info[SMDSEntity_Pyramid] ) );
-    myWidgets[i3DPyramids][iQuadratic]    ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Pyramid] ) );
-    myWidgets[i3DPrisms][iTotal]          ->setProperty( "text", QString::number( nbPrisms ) );
-    myWidgets[i3DPrisms][iLinear]         ->setProperty( "text", QString::number( info[SMDSEntity_Penta] ) );
-    myWidgets[i3DPrisms][iQuadratic]      ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Penta] ) );
-    myWidgets[i3DHexaPrisms][iTotal]      ->setProperty( "text", QString::number( info[SMDSEntity_Hexagonal_Prism] ) );
-    myWidgets[i3DPolyhedrons][iTotal]     ->setProperty( "text", QString::number( info[SMDSEntity_Polyhedra] ) );
-    long nbElemTotal     = info[SMDSEntity_0D] + info[SMDSEntity_Ball] + nbEdges + nb2DLinear + nb2DQuadratic + nb3DLinear + nb3DQuadratic;
-    long nbElemLinerial  = info[SMDSEntity_Edge] + nb2DLinear + nb3DLinear;
-    long nbElemQuadratic = info[SMDSEntity_Quad_Edge] + nb2DQuadratic + nb3DQuadratic;
-    myWidgets[iNb][iTotal]    ->setProperty( "text", QString::number( nbElemTotal ) );
-    myWidgets[iNb][iLinear]   ->setProperty( "text", QString::number( nbElemLinerial ) );
-    myWidgets[iNb][iQuadratic]->setProperty( "text", QString::number( nbElemQuadratic ) );
+    long nbTriangles     = info[SMDSEntity_Triangle]   + info[SMDSEntity_Quad_Triangle]   + info[SMDSEntity_BiQuad_Triangle];
+    long nbQuadrangles   = info[SMDSEntity_Quadrangle] + info[SMDSEntity_Quad_Quadrangle] + info[SMDSEntity_BiQuad_Quadrangle];
+    long nb2DLinear      = info[SMDSEntity_Triangle]        + info[SMDSEntity_Quadrangle] + info[SMDSEntity_Polygon];
+    long nb2DQuadratic   = info[SMDSEntity_Quad_Triangle]   + info[SMDSEntity_Quad_Quadrangle];
+    long nb2DBiQuadratic = info[SMDSEntity_BiQuad_Triangle] + info[SMDSEntity_BiQuad_Quadrangle];
+
+    myWidgets[i2D][iTotal]                  ->setProperty( "text", QString::number( nb2DLinear + nb2DQuadratic ));
+    myWidgets[i2D][iLinear]                 ->setProperty( "text", QString::number( nb2DLinear ) );
+    myWidgets[i2D][iQuadratic]              ->setProperty( "text", QString::number( nb2DQuadratic ) );
+    myWidgets[i2D][iBiQuadratic]            ->setProperty( "text", QString::number( nb2DBiQuadratic ) );
+    myWidgets[i2DTriangles][iTotal]         ->setProperty( "text", QString::number( nbTriangles ) );
+    myWidgets[i2DTriangles][iLinear]        ->setProperty( "text", QString::number( info[SMDSEntity_Triangle] ) );
+    myWidgets[i2DTriangles][iQuadratic]     ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Triangle] ) );
+    myWidgets[i2DTriangles][iBiQuadratic]   ->setProperty( "text", QString::number( info[SMDSEntity_BiQuad_Triangle] ) );
+    myWidgets[i2DQuadrangles][iTotal]       ->setProperty( "text", QString::number( nbQuadrangles ) );
+    myWidgets[i2DQuadrangles][iLinear]      ->setProperty( "text", QString::number( info[SMDSEntity_Quadrangle] ) );
+    myWidgets[i2DQuadrangles][iQuadratic]   ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Quadrangle] ) );
+    myWidgets[i2DQuadrangles][iBiQuadratic] ->setProperty( "text", QString::number( info[SMDSEntity_BiQuad_Quadrangle] ) );
+    myWidgets[i2DPolygons][iTotal]          ->setProperty( "text", QString::number( info[SMDSEntity_Polygon] ) );
+    long nbTetrahedrons  = info[SMDSEntity_Tetra]   + info[SMDSEntity_Quad_Tetra];
+    long nbHexahedrons   = info[SMDSEntity_Hexa]    + info[SMDSEntity_Quad_Hexa] + info[SMDSEntity_TriQuad_Hexa];
+    long nbPyramids      = info[SMDSEntity_Pyramid] + info[SMDSEntity_Quad_Pyramid];
+    long nbPrisms        = info[SMDSEntity_Penta]   + info[SMDSEntity_Quad_Penta];
+    long nb3DLinear      = info[SMDSEntity_Tetra]      + info[SMDSEntity_Hexa] + info[SMDSEntity_Pyramid] + info[SMDSEntity_Penta] + info[SMDSEntity_Polyhedra] + info[SMDSEntity_Hexagonal_Prism];
+    long nb3DQuadratic   = info[SMDSEntity_Quad_Tetra] + info[SMDSEntity_Quad_Hexa] + info[SMDSEntity_Quad_Pyramid] + info[SMDSEntity_Quad_Penta];
+    long nb3DBiQuadratic = info[SMDSEntity_TriQuad_Hexa];
+    myWidgets[i3D][iTotal]                  ->setProperty( "text", QString::number( nb3DLinear + nb3DQuadratic ) );
+    myWidgets[i3D][iLinear]                 ->setProperty( "text", QString::number( nb3DLinear ) );
+    myWidgets[i3D][iQuadratic]              ->setProperty( "text", QString::number( nb3DQuadratic ) );
+    myWidgets[i3D][iBiQuadratic]            ->setProperty( "text", QString::number( nb3DBiQuadratic ) );
+    myWidgets[i3DTetrahedrons][iTotal]      ->setProperty( "text", QString::number( nbTetrahedrons ) );
+    myWidgets[i3DTetrahedrons][iLinear]     ->setProperty( "text", QString::number( info[SMDSEntity_Tetra] ) );
+    myWidgets[i3DTetrahedrons][iQuadratic]  ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Tetra] ) );
+    myWidgets[i3DHexahedrons][iTotal]       ->setProperty( "text", QString::number( nbHexahedrons ) );
+    myWidgets[i3DHexahedrons][iLinear]      ->setProperty( "text", QString::number( info[SMDSEntity_Hexa] ) );
+    myWidgets[i3DHexahedrons][iQuadratic]   ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Hexa] ) );
+    myWidgets[i3DHexahedrons][iBiQuadratic] ->setProperty( "text", QString::number( info[SMDSEntity_TriQuad_Hexa] ) );
+    myWidgets[i3DPyramids][iTotal]          ->setProperty( "text", QString::number( nbPyramids ) );
+    myWidgets[i3DPyramids][iLinear]         ->setProperty( "text", QString::number( info[SMDSEntity_Pyramid] ) );
+    myWidgets[i3DPyramids][iQuadratic]      ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Pyramid] ) );
+    myWidgets[i3DPrisms][iTotal]            ->setProperty( "text", QString::number( nbPrisms ) );
+    myWidgets[i3DPrisms][iLinear]           ->setProperty( "text", QString::number( info[SMDSEntity_Penta] ) );
+    myWidgets[i3DPrisms][iQuadratic]        ->setProperty( "text", QString::number( info[SMDSEntity_Quad_Penta] ) );
+    myWidgets[i3DHexaPrisms][iTotal]        ->setProperty( "text", QString::number( info[SMDSEntity_Hexagonal_Prism] ) );
+    myWidgets[i3DPolyhedrons][iTotal]       ->setProperty( "text", QString::number( info[SMDSEntity_Polyhedra] ) );
+    long nbElemTotal       = info[SMDSEntity_0D] + info[SMDSEntity_Ball] + nbEdges + nb2DLinear + nb2DQuadratic + nb2DBiQuadratic + nb3DLinear + nb3DQuadratic + nb3DBiQuadratic;
+    long nbElemLinerial    = info[SMDSEntity_Edge] + nb2DLinear + nb3DLinear;
+    long nbElemQuadratic   = info[SMDSEntity_Quad_Edge] + nb2DQuadratic + nb3DQuadratic;
+    long nbElemBiQuadratic = nb2DBiQuadratic + nb3DBiQuadratic;
+    myWidgets[iNb][iTotal]      ->setProperty( "text", QString::number( nbElemTotal ) );
+    myWidgets[iNb][iLinear]     ->setProperty( "text", QString::number( nbElemLinerial ) );
+    myWidgets[iNb][iQuadratic]  ->setProperty( "text", QString::number( nbElemQuadratic ) );
+    myWidgets[iNb][iBiQuadratic]->setProperty( "text", QString::number( nbElemBiQuadratic ) );
     // before full loading from study file, type of elements in a sub-mesh can't be defined
     // in some cases
     bool infoOK = obj->IsMeshInfoCorrect();
@@ -541,82 +568,94 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
         hasAnyInfo = info[i];
       if ( hasAnyInfo ) // believe it is a sub-mesh
       {
-        if ( nb2DLinear + nb2DQuadratic > 0 )
+        if ( nb2DLinear + nb2DQuadratic + nb2DBiQuadratic > 0 )
         {
-          myWidgets[i2D][iLinear]              ->setProperty( "text", "?" );
-          myWidgets[i2D][iQuadratic]           ->setProperty( "text", "?" );
-          myWidgets[i2DTriangles][iTotal]      ->setProperty( "text", "?" );
-          myWidgets[i2DTriangles][iLinear]     ->setProperty( "text", "?" );
-          myWidgets[i2DTriangles][iQuadratic]  ->setProperty( "text", "?" );
-          myWidgets[i2DQuadrangles][iTotal]    ->setProperty( "text", "?" );
-          myWidgets[i2DQuadrangles][iLinear]   ->setProperty( "text", "?" );
-          myWidgets[i2DQuadrangles][iQuadratic]->setProperty( "text", "?" );
-          myWidgets[i2DPolygons][iTotal]       ->setProperty( "text", "?" );
-          myWidgets[iNb][iTotal]               ->setProperty( "text", "?" );
-          myWidgets[iNb][iLinear]              ->setProperty( "text", "?" );
-          myWidgets[iNb][iQuadratic]           ->setProperty( "text", "?" );
+          myWidgets[i2D][iLinear]                 ->setProperty( "text", "?" );
+          myWidgets[i2D][iQuadratic]              ->setProperty( "text", "?" );
+          myWidgets[i2D][iBiQuadratic]            ->setProperty( "text", "?" );
+          myWidgets[i2DTriangles][iTotal]         ->setProperty( "text", "?" );
+          myWidgets[i2DTriangles][iLinear]        ->setProperty( "text", "?" );
+          myWidgets[i2DTriangles][iQuadratic]     ->setProperty( "text", "?" );
+          myWidgets[i2DTriangles][iBiQuadratic]   ->setProperty( "text", "?" );
+          myWidgets[i2DQuadrangles][iTotal]       ->setProperty( "text", "?" );
+          myWidgets[i2DQuadrangles][iLinear]      ->setProperty( "text", "?" );
+          myWidgets[i2DQuadrangles][iQuadratic]   ->setProperty( "text", "?" );
+          myWidgets[i2DQuadrangles][iBiQuadratic] ->setProperty( "text", "?" );
+          myWidgets[i2DPolygons][iTotal]          ->setProperty( "text", "?" );
+          myWidgets[iNb][iTotal]                  ->setProperty( "text", "?" );
+          myWidgets[iNb][iLinear]                 ->setProperty( "text", "?" );
+          myWidgets[iNb][iQuadratic]              ->setProperty( "text", "?" );
+          myWidgets[iNb][iBiQuadratic]            ->setProperty( "text", "?" );
         }
-        else if ( nb3DLinear + nb3DQuadratic > 0 )
+        else if ( nb3DLinear + nb3DQuadratic + nb3DBiQuadratic > 0 )
         {
-          myWidgets[i3D][iLinear]               ->setProperty( "text", "?" );
-          myWidgets[i3D][iQuadratic]            ->setProperty( "text", "?" );
-          myWidgets[i3DTetrahedrons][iTotal]    ->setProperty( "text", "?" );
-          myWidgets[i3DTetrahedrons][iLinear]   ->setProperty( "text", "?" );
-          myWidgets[i3DTetrahedrons][iQuadratic]->setProperty( "text", "?" );
-          myWidgets[i3DHexahedrons][iTotal]     ->setProperty( "text", "?" );
-          myWidgets[i3DHexahedrons][iLinear]    ->setProperty( "text", "?" );
-          myWidgets[i3DHexahedrons][iQuadratic] ->setProperty( "text", "?" );
-          myWidgets[i3DPyramids][iTotal]        ->setProperty( "text", "?" );
-          myWidgets[i3DPyramids][iLinear]       ->setProperty( "text", "?" );
-          myWidgets[i3DPyramids][iQuadratic]    ->setProperty( "text", "?" );
-          myWidgets[i3DPrisms][iTotal]          ->setProperty( "text", "?" );
-          myWidgets[i3DPrisms][iLinear]         ->setProperty( "text", "?" );
-          myWidgets[i3DPrisms][iQuadratic]      ->setProperty( "text", "?" );
-          myWidgets[i3DHexaPrisms][iTotal]      ->setProperty( "text", "?" );
-          myWidgets[i3DPolyhedrons][iTotal]     ->setProperty( "text", "?" );
-          myWidgets[iNb][iTotal]                ->setProperty( "text", "?" );
-          myWidgets[iNb][iLinear]               ->setProperty( "text", "?" );
-          myWidgets[iNb][iQuadratic]            ->setProperty( "text", "?" );
+          myWidgets[i3D][iLinear]                 ->setProperty( "text", "?" );
+          myWidgets[i3D][iQuadratic]              ->setProperty( "text", "?" );
+          myWidgets[i3D][iBiQuadratic]            ->setProperty( "text", "?" );
+          myWidgets[i3DTetrahedrons][iTotal]      ->setProperty( "text", "?" );
+          myWidgets[i3DTetrahedrons][iLinear]     ->setProperty( "text", "?" );
+          myWidgets[i3DTetrahedrons][iQuadratic]  ->setProperty( "text", "?" );
+          myWidgets[i3DHexahedrons][iTotal]       ->setProperty( "text", "?" );
+          myWidgets[i3DHexahedrons][iLinear]      ->setProperty( "text", "?" );
+          myWidgets[i3DHexahedrons][iQuadratic]   ->setProperty( "text", "?" );
+          myWidgets[i3DHexahedrons][iBiQuadratic] ->setProperty( "text", "?" );
+          myWidgets[i3DPyramids][iTotal]          ->setProperty( "text", "?" );
+          myWidgets[i3DPyramids][iLinear]         ->setProperty( "text", "?" );
+          myWidgets[i3DPyramids][iQuadratic]      ->setProperty( "text", "?" );
+          myWidgets[i3DPrisms][iTotal]            ->setProperty( "text", "?" );
+          myWidgets[i3DPrisms][iLinear]           ->setProperty( "text", "?" );
+          myWidgets[i3DPrisms][iQuadratic]        ->setProperty( "text", "?" );
+          myWidgets[i3DHexaPrisms][iTotal]        ->setProperty( "text", "?" );
+          myWidgets[i3DPolyhedrons][iTotal]       ->setProperty( "text", "?" );
+          myWidgets[iNb][iTotal]                  ->setProperty( "text", "?" );
+          myWidgets[iNb][iLinear]                 ->setProperty( "text", "?" );
+          myWidgets[iNb][iQuadratic]              ->setProperty( "text", "?" );
+          myWidgets[iNb][iBiQuadratic]            ->setProperty( "text", "?" );
         }
       }
       else
       {
-        myWidgets[iNodes][iTotal]             ->setProperty( "text", "?" );
-        myWidgets[i0D][iTotal]                ->setProperty( "text", "?" );
-        myWidgets[iBalls][iTotal]             ->setProperty( "text", "?" );
-        myWidgets[i1D][iTotal]                ->setProperty( "text", "?" );
-        myWidgets[i1D][iLinear]               ->setProperty( "text", "?" );
-        myWidgets[i1D][iQuadratic]            ->setProperty( "text", "?" );
-        myWidgets[i2D][iTotal]                ->setProperty( "text", "?" );
-        myWidgets[i2D][iLinear]               ->setProperty( "text", "?" );
-        myWidgets[i2D][iQuadratic]            ->setProperty( "text", "?" );
-        myWidgets[i2DTriangles][iTotal]       ->setProperty( "text", "?" );
-        myWidgets[i2DTriangles][iLinear]      ->setProperty( "text", "?" );
-        myWidgets[i2DTriangles][iQuadratic]   ->setProperty( "text", "?" );
-        myWidgets[i2DQuadrangles][iTotal]     ->setProperty( "text", "?" );
-        myWidgets[i2DQuadrangles][iLinear]    ->setProperty( "text", "?" );
-        myWidgets[i2DQuadrangles][iQuadratic] ->setProperty( "text", "?" );
-        myWidgets[i2DPolygons][iTotal]        ->setProperty( "text", "?" );
-        myWidgets[i3D][iTotal]                ->setProperty( "text", "?" );
-        myWidgets[i3D][iLinear]               ->setProperty( "text", "?" );
-        myWidgets[i3D][iQuadratic]            ->setProperty( "text", "?" );
-        myWidgets[i3DTetrahedrons][iTotal]    ->setProperty( "text", "?" );
-        myWidgets[i3DTetrahedrons][iLinear]   ->setProperty( "text", "?" );
-        myWidgets[i3DTetrahedrons][iQuadratic]->setProperty( "text", "?" );
-        myWidgets[i3DHexahedrons][iTotal]     ->setProperty( "text", "?" );
-        myWidgets[i3DHexahedrons][iLinear]    ->setProperty( "text", "?" );
-        myWidgets[i3DHexahedrons][iQuadratic] ->setProperty( "text", "?" );
-        myWidgets[i3DPyramids][iTotal]        ->setProperty( "text", "?" );
-        myWidgets[i3DPyramids][iLinear]       ->setProperty( "text", "?" );
-        myWidgets[i3DPyramids][iQuadratic]    ->setProperty( "text", "?" );
-        myWidgets[i3DPrisms][iTotal]          ->setProperty( "text", "?" );
-        myWidgets[i3DPrisms][iLinear]         ->setProperty( "text", "?" );
-        myWidgets[i3DPrisms][iQuadratic]      ->setProperty( "text", "?" );
-        myWidgets[i3DHexaPrisms][iTotal]      ->setProperty( "text", "?" );
-        myWidgets[i3DPolyhedrons][iTotal]     ->setProperty( "text", "?" );
-        myWidgets[iNb][iTotal]                ->setProperty( "text", "?" );
-        myWidgets[iNb][iLinear]               ->setProperty( "text", "?" );
-        myWidgets[iNb][iQuadratic]            ->setProperty( "text", "?" );
+        myWidgets[iNodes][iTotal]               ->setProperty( "text", "?" );
+        myWidgets[i0D][iTotal]                  ->setProperty( "text", "?" );
+        myWidgets[iBalls][iTotal]               ->setProperty( "text", "?" );
+        myWidgets[i1D][iTotal]                  ->setProperty( "text", "?" );
+        myWidgets[i1D][iLinear]                 ->setProperty( "text", "?" );
+        myWidgets[i1D][iQuadratic]              ->setProperty( "text", "?" );
+        myWidgets[i2D][iTotal]                  ->setProperty( "text", "?" );
+        myWidgets[i2D][iLinear]                 ->setProperty( "text", "?" );
+        myWidgets[i2D][iQuadratic]              ->setProperty( "text", "?" );
+        myWidgets[i2D][iBiQuadratic]            ->setProperty( "text", "?" );
+        myWidgets[i2DTriangles][iTotal]         ->setProperty( "text", "?" );
+        myWidgets[i2DTriangles][iLinear]        ->setProperty( "text", "?" );
+        myWidgets[i2DTriangles][iQuadratic]     ->setProperty( "text", "?" );
+        myWidgets[i2DTriangles][iBiQuadratic]   ->setProperty( "text", "?" );
+        myWidgets[i2DQuadrangles][iTotal]       ->setProperty( "text", "?" );
+        myWidgets[i2DQuadrangles][iLinear]      ->setProperty( "text", "?" );
+        myWidgets[i2DQuadrangles][iQuadratic]   ->setProperty( "text", "?" );
+        myWidgets[i2DQuadrangles][iBiQuadratic] ->setProperty( "text", "?" );
+        myWidgets[i2DPolygons][iTotal]          ->setProperty( "text", "?" );
+        myWidgets[i3D][iTotal]                  ->setProperty( "text", "?" );
+        myWidgets[i3D][iLinear]                 ->setProperty( "text", "?" );
+        myWidgets[i3D][iQuadratic]              ->setProperty( "text", "?" );
+        myWidgets[i3DTetrahedrons][iTotal]      ->setProperty( "text", "?" );
+        myWidgets[i3DTetrahedrons][iLinear]     ->setProperty( "text", "?" );
+        myWidgets[i3DTetrahedrons][iQuadratic]  ->setProperty( "text", "?" );
+        myWidgets[i3DHexahedrons][iTotal]       ->setProperty( "text", "?" );
+        myWidgets[i3DHexahedrons][iLinear]      ->setProperty( "text", "?" );
+        myWidgets[i3DHexahedrons][iQuadratic]   ->setProperty( "text", "?" );
+        myWidgets[i3DHexahedrons][iBiQuadratic] ->setProperty( "text", "?" );
+        myWidgets[i3DPyramids][iTotal]          ->setProperty( "text", "?" );
+        myWidgets[i3DPyramids][iLinear]         ->setProperty( "text", "?" );
+        myWidgets[i3DPyramids][iQuadratic]      ->setProperty( "text", "?" );
+        myWidgets[i3DPrisms][iTotal]            ->setProperty( "text", "?" );
+        myWidgets[i3DPrisms][iLinear]           ->setProperty( "text", "?" );
+        myWidgets[i3DPrisms][iQuadratic]        ->setProperty( "text", "?" );
+        myWidgets[i3DHexaPrisms][iTotal]        ->setProperty( "text", "?" );
+        myWidgets[i3DPolyhedrons][iTotal]       ->setProperty( "text", "?" );
+        myWidgets[iNb][iTotal]                  ->setProperty( "text", "?" );
+        myWidgets[iNb][iLinear]                 ->setProperty( "text", "?" );
+        myWidgets[iNb][iQuadratic]              ->setProperty( "text", "?" );
+        myWidgets[iNb][iBiQuadratic]            ->setProperty( "text", "?" );
       }
     }
   }
@@ -651,44 +690,50 @@ void SMESHGUI_MeshInfo::loadMesh()
 */
 void SMESHGUI_MeshInfo::clear()
 {
-  myWidgets[iName][iSingle]             ->setProperty( "text", QString() );
-  myWidgets[iObject][iSingle]           ->setProperty( "text", QString() );
-  myWidgets[iNodes][iTotal]             ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i0D][iTotal]                ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[iBalls][iTotal]             ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i1D][iTotal]                ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i1D][iLinear]               ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i1D][iQuadratic]            ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2D][iTotal]                ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2D][iLinear]               ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2D][iQuadratic]            ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DTriangles][iTotal]       ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DTriangles][iLinear]      ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DTriangles][iQuadratic]   ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DQuadrangles][iTotal]     ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DQuadrangles][iLinear]    ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DQuadrangles][iQuadratic] ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i2DPolygons][iTotal]        ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3D][iTotal]                ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3D][iLinear]               ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3D][iQuadratic]            ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DTetrahedrons][iTotal]    ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DTetrahedrons][iLinear]   ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DTetrahedrons][iQuadratic]->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DHexahedrons][iTotal]     ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DHexahedrons][iLinear]    ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DHexahedrons][iQuadratic] ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DPyramids][iTotal]        ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DPyramids][iLinear]       ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DPyramids][iQuadratic]    ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DPrisms][iTotal]          ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DPrisms][iLinear]         ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DPrisms][iQuadratic]      ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DHexaPrisms][iTotal]      ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[i3DPolyhedrons][iTotal]     ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[iNb][iTotal]                ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[iNb][iLinear]               ->setProperty( "text", QString::number( 0 ) );
-  myWidgets[iNb][iQuadratic]            ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[iName][iSingle]               ->setProperty( "text", QString() );
+  myWidgets[iObject][iSingle]             ->setProperty( "text", QString() );
+  myWidgets[iNodes][iTotal]               ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i0D][iTotal]                  ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[iBalls][iTotal]               ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i1D][iTotal]                  ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i1D][iLinear]                 ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i1D][iQuadratic]              ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i2D][iTotal]                  ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i2D][iLinear]                 ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i2D][iQuadratic]              ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i2D][iBiQuadratic]            ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i2DTriangles][iTotal]         ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i2DTriangles][iLinear]        ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i2DTriangles][iQuadratic]     ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i2DTriangles][iBiQuadratic]   ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i2DQuadrangles][iTotal]       ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i2DQuadrangles][iLinear]      ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i2DQuadrangles][iQuadratic]   ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i2DQuadrangles][iBiQuadratic] ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i2DPolygons][iTotal]          ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3D][iTotal]                  ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3D][iLinear]                 ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3D][iQuadratic]              ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3D][iBiQuadratic]            ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3DTetrahedrons][iTotal]      ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3DTetrahedrons][iLinear]     ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3DTetrahedrons][iQuadratic]  ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3DHexahedrons][iTotal]       ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3DHexahedrons][iLinear]      ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3DHexahedrons][iQuadratic]   ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3DHexahedrons][iBiQuadratic] ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3DPyramids][iTotal]          ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3DPyramids][iLinear]         ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3DPyramids][iQuadratic]      ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3DPrisms][iTotal]            ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3DPrisms][iLinear]           ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3DPrisms][iQuadratic]        ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3DHexaPrisms][iTotal]        ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[i3DPolyhedrons][iTotal]       ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[iNb][iTotal]                  ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[iNb][iLinear]                 ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[iNb][iQuadratic]              ->setProperty( "text", QString::number( 0 ) );
+  myWidgets[iNb][iBiQuadratic]            ->setProperty( "text", QString::number( 0 ) );
 }
 
 /*!
@@ -763,6 +808,7 @@ void SMESHGUI_MeshInfo::saveInfo( QTextStream &out )
   out << QString( SPACING_INFO,   ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[iNb][iTotal]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO,   ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[iNb][iLinear]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO,   ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[iNb][iQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO,   ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[iNb][iBiQuadratic]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO,   ' ' ) << tr( "0D_LAB" )           << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i0D][iTotal]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO,   ' ' ) << tr( "BALL_LAB" )         << "\n";
@@ -775,20 +821,24 @@ void SMESHGUI_MeshInfo::saveInfo( QTextStream &out )
   out << QString( SPACING_INFO*2, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i2D][iTotal]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i2D][iLinear]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i2D][iQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*2, ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[i2D][iBiQuadratic]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "TRIANGLES_LAB" )    << "\n";
   out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i2DTriangles][iTotal]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i2DTriangles][iLinear]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i2DTriangles][iQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[i2DTriangles][iBiQuadratic]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "QUADRANGLES_LAB" )  << "\n";
   out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i2DQuadrangles][iTotal]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i2DQuadrangles][iLinear]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i2DQuadrangles][iQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[i2DQuadrangles][iBiQuadratic]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "POLYGONS_LAB" )     << "\n";
   out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i2DPolygons][iTotal]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO,   ' ' ) << tr( "3D_LAB" )           << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3D][iTotal]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i3D][iLinear]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i3D][iQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*2, ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[i3D][iBiQuadratic]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "TETRAHEDRONS_LAB" ) << "\n";
   out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3DTetrahedrons][iTotal]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i3DTetrahedrons][iLinear]->property( "text" ) ).toString() << "\n";
@@ -797,6 +847,7 @@ void SMESHGUI_MeshInfo::saveInfo( QTextStream &out )
   out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3DHexahedrons][iTotal]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i3DHexahedrons][iLinear]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*3, ' ' ) << tr( "QUADRATIC_LAB" )    << ": " << ( myWidgets[i3DHexahedrons][iQuadratic]->property( "text" ) ).toString() << "\n";
+  out << QString( SPACING_INFO*3, ' ' ) << tr( "BI_QUADRATIC_LAB" ) << ": " << ( myWidgets[i3DHexahedrons][iBiQuadratic]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*2, ' ' ) << tr( "PYRAMIDS_LAB" )     << "\n";
   out << QString( SPACING_INFO*3, ' ' ) << tr( "TOTAL_LAB" )        << ": " << ( myWidgets[i3DPyramids][iTotal]->property( "text" ) ).toString() << "\n";
   out << QString( SPACING_INFO*3, ' ' ) << tr( "LINEAR_LAB" )       << ": " << ( myWidgets[i3DPyramids][iLinear]->property( "text" ) ).toString() << "\n";
@@ -1788,66 +1839,34 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
         // connectivity
         QTreeWidgetItem* conItem = createItem( elemItem, Bold );
         conItem->setText( 0, SMESHGUI_ElemInfo::tr( "CONNECTIVITY" ) );
-        SMDS_ElemIteratorPtr nodeIt = e->nodesIterator();
-        for ( int idx = 1; nodeIt->more(); idx++ ) {
-          const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
-          // node number and ID
-          QTreeWidgetItem* nodeItem = createItem( conItem, Bold );
-          nodeItem->setText( 0, QString( "%1 %2 / %3" ).arg( SMESHGUI_ElemInfo::tr( "NODE" ) ).arg( idx ).arg( e->NbNodes() ) );
-          nodeItem->setText( 1, QString( "#%1" ).arg( node->GetID() ) );
-          nodeItem->setData( 1, TypeRole, ElemConnectivity );
-          nodeItem->setData( 1, IdRole, node->GetID() );
-          nodeItem->setExpanded( false );
-          // node coordinates
-          QTreeWidgetItem* coordItem = createItem( nodeItem );
-          coordItem->setText( 0, SMESHGUI_ElemInfo::tr( "COORDINATES" ) );
-          QTreeWidgetItem* xItem = createItem( coordItem );
-          xItem->setText( 0, "X" );
-          xItem->setText( 1, QString::number( node->X(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
-          QTreeWidgetItem* yItem = createItem( coordItem );
-          yItem->setText( 0, "Y" );
-          yItem->setText( 1, QString::number( node->Y(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
-          QTreeWidgetItem* zItem = createItem( coordItem );
-          zItem->setText( 0, "Z" );
-          zItem->setText( 1, QString::number( node->Z(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
-          // node connectivity
-          QTreeWidgetItem* nconItem = createItem( nodeItem );
-          nconItem->setText( 0, SMESHGUI_ElemInfo::tr( "CONNECTIVITY" ) );
-          Connectivity connectivity = nodeConnectivity( node );
-          if ( !connectivity.isEmpty() ) {
-            QString con = formatConnectivity( connectivity, SMDSAbs_0DElement );
-            if ( !con.isEmpty() ) {
-              QTreeWidgetItem* i = createItem( nconItem );
-              i->setText( 0, SMESHGUI_ElemInfo::tr( "0D_ELEMENTS" ) );
-              i->setText( 1, con );
-            }
-            con = formatConnectivity( connectivity, SMDSAbs_Edge );
-            if ( !con.isEmpty() ) {
-              QTreeWidgetItem* i = createItem( nconItem );
-              i->setText( 0, SMESHGUI_ElemInfo::tr( "EDGES" ) );
-              i->setText( 1, con );
-              i->setData( 1, TypeRole, NodeConnectivity );
-            }
-            con = formatConnectivity( connectivity, SMDSAbs_Ball );
-            if ( !con.isEmpty() ) {
-              QTreeWidgetItem* i = createItem( nconItem );
-              i->setText( 0, SMESHGUI_ElemInfo::tr( "BALL_ELEMENTS" ) );
-              i->setText( 1, con );
-              i->setData( 1, TypeRole, NodeConnectivity );
-            }
-            con = formatConnectivity( connectivity, SMDSAbs_Face );
-            if ( !con.isEmpty() ) {
-              QTreeWidgetItem* i = createItem( nconItem );
-              i->setText( 0, SMESHGUI_ElemInfo::tr( "FACES" ) );
-              i->setText( 1, con );
-              i->setData( 1, TypeRole, NodeConnectivity );
-            }
-            con = formatConnectivity( connectivity, SMDSAbs_Volume );
-            if ( !con.isEmpty() ) {
-              QTreeWidgetItem* i = createItem( nconItem );
-              i->setText( 0, SMESHGUI_ElemInfo::tr( "VOLUMES" ) );
-              i->setText( 1, con );
-              i->setData( 1, TypeRole, NodeConnectivity );
+
+
+        if( e->GetGeomType() != SMDSGeom_POLYHEDRA ) {
+          SMDS_ElemIteratorPtr nodeIt = e->nodesIterator();
+          for ( int idx = 1; nodeIt->more(); idx++ ) {
+            const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
+            nodeInfo( node, idx, e->NbNodes(), conItem );
+          }
+        }
+        else {
+          const SMDS_VtkVolume* aVtkVolume = dynamic_cast<const SMDS_VtkVolume*>(e);
+          SMDS_ElemIteratorPtr nodeIt = aVtkVolume->uniqueNodesIterator();
+          QList<const SMDS_MeshElement*> uniqueNodes;
+          while ( nodeIt->more() )
+            uniqueNodes.append( nodeIt->next() );
+
+          SMDS_VolumeTool vtool( e );
+          const int nbFaces = vtool.NbFaces();
+          for( int face_id = 0; face_id < nbFaces; face_id++ ) {
+            QTreeWidgetItem* faceItem = createItem( conItem, Bold );
+            faceItem->setText( 0, QString( "%1 %2 / %3" ).arg( SMESHGUI_ElemInfo::tr( "FACE" ) ).arg( face_id + 1 ).arg( nbFaces ) );
+            faceItem->setExpanded( true );
+
+            const SMDS_MeshNode** aNodeIds = vtool.GetFaceNodes( face_id );
+            const int nbNodes = vtool.NbFaceNodes( face_id );
+            for( int node_id = 0; node_id < nbNodes; node_id++ ) {
+              const SMDS_MeshNode* node = aNodeIds[node_id];
+              nodeInfo( node, uniqueNodes.indexOf(node) + 1, aVtkVolume->NbUniqueNodes(), faceItem );
             }
           }
         }
@@ -2027,6 +2046,77 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
   }
 }
 
+/*!
+  \brief Show node information
+  \param node mesh node for showing
+  \param index index of current node
+  \param nbNodes number of unique nodes in element
+  \param parentItem parent item of tree
+*/
+void SMESHGUI_TreeElemInfo::nodeInfo( const SMDS_MeshNode* node, int index,
+                                      int nbNodes, QTreeWidgetItem* parentItem )
+{
+  int precision   = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 );
+  // node number and ID
+  QTreeWidgetItem* nodeItem = createItem( parentItem, Bold );
+  nodeItem->setText( 0, QString( "%1 %2 / %3" ).arg( SMESHGUI_ElemInfo::tr( "NODE" ) ).arg( index ).arg( nbNodes ) );
+  nodeItem->setText( 1, QString( "#%1" ).arg( node->GetID() ) );
+  nodeItem->setData( 1, TypeRole, ElemConnectivity );
+  nodeItem->setData( 1, IdRole, node->GetID() );
+  nodeItem->setExpanded( false );
+  // node coordinates
+  QTreeWidgetItem* coordItem = createItem( nodeItem );
+  coordItem->setText( 0, SMESHGUI_ElemInfo::tr( "COORDINATES" ) );
+  QTreeWidgetItem* xItem = createItem( coordItem );
+  xItem->setText( 0, "X" );
+  xItem->setText( 1, QString::number( node->X(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+  QTreeWidgetItem* yItem = createItem( coordItem );
+  yItem->setText( 0, "Y" );
+  yItem->setText( 1, QString::number( node->Y(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+  QTreeWidgetItem* zItem = createItem( coordItem );
+  zItem->setText( 0, "Z" );
+  zItem->setText( 1, QString::number( node->Z(), precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
+  // node connectivity
+  QTreeWidgetItem* nconItem = createItem( nodeItem );
+  nconItem->setText( 0, SMESHGUI_ElemInfo::tr( "CONNECTIVITY" ) );
+  Connectivity connectivity = nodeConnectivity( node );
+  if ( !connectivity.isEmpty() ) {
+    QString con = formatConnectivity( connectivity, SMDSAbs_0DElement );
+    if ( !con.isEmpty() ) {
+      QTreeWidgetItem* i = createItem( nconItem );
+      i->setText( 0, SMESHGUI_ElemInfo::tr( "0D_ELEMENTS" ) );
+      i->setText( 1, con );
+    }
+    con = formatConnectivity( connectivity, SMDSAbs_Edge );
+    if ( !con.isEmpty() ) {
+      QTreeWidgetItem* i = createItem( nconItem );
+      i->setText( 0, SMESHGUI_ElemInfo::tr( "EDGES" ) );
+      i->setText( 1, con );
+      i->setData( 1, TypeRole, NodeConnectivity );
+    }
+    con = formatConnectivity( connectivity, SMDSAbs_Ball );
+    if ( !con.isEmpty() ) {
+      QTreeWidgetItem* i = createItem( nconItem );
+      i->setText( 0, SMESHGUI_ElemInfo::tr( "BALL_ELEMENTS" ) );
+      i->setText( 1, con );
+      i->setData( 1, TypeRole, NodeConnectivity );
+    }
+    con = formatConnectivity( connectivity, SMDSAbs_Face );
+    if ( !con.isEmpty() ) {
+      QTreeWidgetItem* i = createItem( nconItem );
+      i->setText( 0, SMESHGUI_ElemInfo::tr( "FACES" ) );
+      i->setText( 1, con );
+      i->setData( 1, TypeRole, NodeConnectivity );
+    }
+    con = formatConnectivity( connectivity, SMDSAbs_Volume );
+    if ( !con.isEmpty() ) {
+      QTreeWidgetItem* i = createItem( nconItem );
+      i->setText( 0, SMESHGUI_ElemInfo::tr( "VOLUMES" ) );
+      i->setText( 1, con );
+      i->setData( 1, TypeRole, NodeConnectivity );
+    }
+  }
+}
 /*!
   \brief Internal clean-up (reset widget)
 */
index bc8c406834fe98678d1d3c8c9c099ca4ef09d2ae..54ee1aca5191d91d0e2e8bbd161d55940c04f9a9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -108,7 +108,8 @@ class SMESHGUI_EXPORT SMESHGUI_MeshInfo : public QFrame
     iSingle = 1,
     iTotal  = iSingle,
     iLinear,
-    iQuadratic
+    iQuadratic,
+    iBiQuadratic
   };
 
   typedef QList<QWidget*> wlist;
@@ -225,6 +226,7 @@ public:
 protected:
   void             contextMenuEvent( QContextMenuEvent* e );
   void             information( const QList<long>& );
+  void             nodeInfo( const SMDS_MeshNode*, int, int, QTreeWidgetItem* );
   void             clearInternal();
 
 private slots:
index 30db6e8ceb23d3d4ffa4eeb21f06fbd2e725635f..59900714e0e1032b34a505f89e98239253467205 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -63,15 +63,15 @@ SMESHGUI_MeshInfosBox::SMESHGUI_MeshInfosBox(const bool full, QWidget* theParent
   my0DElem(0),
   myBall(0),
   myNbEdge(0), myNbLinEdge(0), myNbQuadEdge(0),
-  myNbTrai(0), myNbLinTrai(0), myNbQuadTrai(0),
-  myNbQuad(0), myNbLinQuad(0), myNbQuadQuad(0),
-  myNbFace(0), myNbLinFace(0), myNbQuadFace(0),
+  myNbTrai(0), myNbLinTrai(0), myNbQuadTrai(0), myNbBiQuadTrai(0),
+  myNbQuad(0), myNbLinQuad(0), myNbQuadQuad(0), myNbBiQuadQuad(0),
+  myNbFace(0), myNbLinFace(0), myNbQuadFace(0), myNbBiQuadFace(0),
   myNbPolyg(0),
-  myNbHexa(0), myNbLinHexa(0), myNbQuadHexa(0),
+  myNbHexa(0), myNbLinHexa(0), myNbQuadHexa(0), myNbBiQuadHexa(0),
   myNbTetra(0),myNbLinTetra(0),myNbQuadTetra(0),
   myNbPyra(0), myNbLinPyra(0), myNbQuadPyra(0),
   myNbPrism(0),myNbLinPrism(0), myNbQuadPrism(0),
-  myNbVolum(0), myNbLinVolum(0), myNbQuadVolum(0),
+  myNbVolum(0), myNbLinVolum(0), myNbQuadVolum(0), myNbBiQuadVolum(0),
   myNbHexaPrism(0),
   myNbPolyh(0)
 {
@@ -101,6 +101,10 @@ SMESHGUI_MeshInfosBox::SMESHGUI_MeshInfosBox(const bool full, QWidget* theParent
   lab = new QLabel(tr("SMESH_MESHINFO_ORDER2"), this );
   lab->setMinimumWidth(100); lab->setFont( italic );
   l->addWidget( lab, row, 3 );
+  // --
+  lab = new QLabel(tr("SMESH_MESHINFO_ORDER3"), this );
+  lab->setMinimumWidth(100); lab->setFont( italic );
+  l->addWidget( lab, row, 4 );
 
   if ( myFull )
   {
@@ -163,44 +167,53 @@ SMESHGUI_MeshInfosBox::SMESHGUI_MeshInfosBox(const bool full, QWidget* theParent
     // --
     lab = new QLabel(COLONIZE(tr("SMESH_MESHINFO_FACES")), this);
     lab->setFont( bold );
-    l->addWidget( lab,           row, 0 );
+    l->addWidget( lab,            row, 0 );
     // --
-    myNbFace     = new QLabel( this );
-    l->addWidget( myNbFace,      row, 1 );
+    myNbFace       = new QLabel( this );
+    l->addWidget( myNbFace,       row, 1 );
     // --
-    myNbLinFace  = new QLabel( this );
-    l->addWidget( myNbLinFace,   row, 2 );
+    myNbLinFace    = new QLabel( this );
+    l->addWidget( myNbLinFace,    row,  2 );
     // --
-    myNbQuadFace = new QLabel( this );
-    l->addWidget( myNbQuadFace,  row, 3 );
+    myNbQuadFace   = new QLabel( this );
+    l->addWidget( myNbQuadFace,   row, 3 );
+    // --
+    myNbBiQuadFace = new QLabel( this );
+    l->addWidget( myNbBiQuadFace, row, 4 );
     // --
     row++;                       // increment row count
     // ... triangles
     lab = new QLabel(COLONIZE(tr("SMESH_MESHINFO_TRIANGLES")), this );
-    l->addWidget( lab,           row, 0 );
+    l->addWidget( lab,            row, 0 );
+    // --
+    myNbTrai       = new QLabel( this );
+    l->addWidget( myNbTrai,       row, 1 );
     // --
-    myNbTrai     = new QLabel( this );
-    l->addWidget( myNbTrai,      row, 1 );
+    myNbLinTrai    = new QLabel( this );
+    l->addWidget( myNbLinTrai,    row, 2 );
     // --
-    myNbLinTrai  = new QLabel( this );
-    l->addWidget( myNbLinTrai,   row, 2 );
+    myNbQuadTrai   = new QLabel( this );
+    l->addWidget( myNbQuadTrai,   row, 3 );
     // --
-    myNbQuadTrai = new QLabel( this );
-    l->addWidget( myNbQuadTrai,  row, 3 );
+    myNbBiQuadTrai = new QLabel( this );
+    l->addWidget( myNbBiQuadTrai, row, 4 );
     // --
     row++;                       // increment row count
     // ... quadrangles
     lab = new QLabel(COLONIZE(tr("SMESH_MESHINFO_QUADRANGLES")), this );
-    l->addWidget( lab,           row, 0 );
+    l->addWidget( lab,            row, 0 );
+    // --
+    myNbQuad       = new QLabel( this );
+    l->addWidget( myNbQuad,       row, 1 );
     // --
-    myNbQuad     = new QLabel( this );
-    l->addWidget( myNbQuad,      row, 1 );
+    myNbLinQuad    = new QLabel( this );
+    l->addWidget( myNbLinQuad,    row, 2 );
     // --
-    myNbLinQuad  = new QLabel( this );
-    l->addWidget( myNbLinQuad,   row, 2 );
+    myNbQuadQuad   = new QLabel( this );
+    l->addWidget( myNbQuadQuad,   row, 3 );
     // --
-    myNbQuadQuad = new QLabel( this );
-    l->addWidget( myNbQuadQuad,  row, 3 );
+    myNbBiQuadQuad = new QLabel( this );
+    l->addWidget( myNbBiQuadQuad, row, 4 );
     // --
     row++;                       // increment row count
     // ... poligones
@@ -216,16 +229,19 @@ SMESHGUI_MeshInfosBox::SMESHGUI_MeshInfosBox(const bool full, QWidget* theParent
     // --
     lab = new QLabel(COLONIZE(tr("SMESH_MESHINFO_VOLUMES")), this);
     lab->setFont( bold );
-    l->addWidget( lab,           row, 0 );
+    l->addWidget( lab,             row, 0 );
     // --
-    myNbVolum     = new QLabel( this );
-    l->addWidget( myNbVolum,     row, 1 );
+    myNbVolum       = new QLabel( this );
+    l->addWidget( myNbVolum,       row, 1 );
     // --
-    myNbLinVolum  = new QLabel( this );
-    l->addWidget( myNbLinVolum,  row, 2 );
+    myNbLinVolum    = new QLabel( this );
+    l->addWidget( myNbLinVolum,    row, 2 );
     // --
-    myNbQuadVolum = new QLabel( this );
-    l->addWidget( myNbQuadVolum, row, 3 );
+    myNbQuadVolum   = new QLabel( this );
+    l->addWidget( myNbQuadVolum,   row, 3 );
+    // --
+    myNbBiQuadVolum = new QLabel( this );
+    l->addWidget( myNbBiQuadVolum, row, 4 );
     // --
     row++;                       // increment row count
     // ... tetras
@@ -244,16 +260,19 @@ SMESHGUI_MeshInfosBox::SMESHGUI_MeshInfosBox(const bool full, QWidget* theParent
     row++;                       // increment row count
     // ... hexas
     lab = new QLabel(COLONIZE(tr("SMESH_MESHINFO_HEXAS")), this );
-    l->addWidget( lab,           row, 0 );
+    l->addWidget( lab,            row, 0 );
+    // --
+    myNbHexa       = new QLabel( this );
+    l->addWidget( myNbHexa,       row, 1 );
     // --
-    myNbHexa      = new QLabel( this );
-    l->addWidget( myNbHexa,      row, 1 );
+    myNbLinHexa    = new QLabel( this );
+    l->addWidget( myNbLinHexa,    row, 2 );
     // --
-    myNbLinHexa   = new QLabel( this );
-    l->addWidget( myNbLinHexa,   row, 2 );
+    myNbQuadHexa   = new QLabel( this );
+    l->addWidget( myNbQuadHexa,   row, 3 );
     // --
-    myNbQuadHexa  = new QLabel( this );
-    l->addWidget( myNbQuadHexa,  row, 3 );
+    myNbBiQuadHexa = new QLabel( this );
+    l->addWidget( myNbBiQuadHexa, row, 4 );
     // --
     row++;                       // increment row count
     // ... pyras
@@ -349,31 +368,37 @@ SMESHGUI_MeshInfosBox::SMESHGUI_MeshInfosBox(const bool full, QWidget* theParent
     row = l->rowCount();         // retrieve current row count
     // --
     lab = new QLabel(COLONIZE(tr("SMESH_MESHINFO_FACES")), this);
-    l->addWidget( lab,           row, 0 );
+    l->addWidget( lab,            row, 0 );
+    // --
+    myNbFace       = new QLabel( this );
+    l->addWidget( myNbFace,       row, 1 );
     // --
-    myNbFace      = new QLabel( this );
-    l->addWidget( myNbFace,      row, 1 );
+    myNbLinFace    = new QLabel( this );
+    l->addWidget( myNbLinFace,    row, 2 );
     // --
-    myNbLinFace   = new QLabel( this );
-    l->addWidget( myNbLinFace,   row, 2 );
+    myNbQuadFace   = new QLabel( this );
+    l->addWidget( myNbQuadFace,   row, 3 );
     // --
-    myNbQuadFace  = new QLabel( this );
-    l->addWidget( myNbQuadFace,  row, 3 );
+    myNbBiQuadFace = new QLabel( this );
+    l->addWidget( myNbBiQuadFace, row, 4 );
 
     // volumes
     row = l->rowCount();         // retrieve current row count
     // --
     lab = new QLabel(COLONIZE(tr("SMESH_MESHINFO_VOLUMES")), this);
-    l->addWidget( lab,           row, 0 );
+    l->addWidget( lab,             row, 0 );
     // --
-    myNbVolum     = new QLabel( this );
-    l->addWidget( myNbVolum,     row, 1 );
+    myNbVolum       = new QLabel( this );
+    l->addWidget( myNbVolum,       row, 1 );
     // --
-    myNbLinVolum  = new QLabel( this );
-    l->addWidget( myNbLinVolum,  row, 2 );
+    myNbLinVolum    = new QLabel( this );
+    l->addWidget( myNbLinVolum,    row, 2 );
     // --
-    myNbQuadVolum = new QLabel( this );
-    l->addWidget( myNbQuadVolum, row, 3 );
+    myNbQuadVolum   = new QLabel( this );
+    l->addWidget( myNbQuadVolum,   row, 3 );
+    // --
+    myNbBiQuadVolum = new QLabel( this );
+    l->addWidget( myNbBiQuadVolum, row, 4 );
   }
 }
 
@@ -386,89 +411,90 @@ SMESHGUI_MeshInfosBox::SMESHGUI_MeshInfosBox(const bool full, QWidget* theParent
 void SMESHGUI_MeshInfosBox::SetMeshInfo(const SMESH::long_array& theInfo)
 {
   // nodes
-  myNbNode     ->setText( QString("%1").arg( theInfo[SMDSEntity_Node] ));
+  myNbNode       ->setText( QString("%1").arg( theInfo[SMDSEntity_Node] ));
 
   //0D elements
-  my0DElem     ->setText( QString("%1").arg( theInfo[SMDSEntity_0D] ));
+  my0DElem       ->setText( QString("%1").arg( theInfo[SMDSEntity_0D] ));
 
   //balls
-  myBall       ->setText( QString("%1").arg( theInfo[SMDSEntity_Ball] ));
+  myBall         ->setText( QString("%1").arg( theInfo[SMDSEntity_Ball] ));
 
   // edges
-  myNbEdge     ->setText( QString("%1").arg( theInfo[SMDSEntity_Edge] +
-                                             theInfo[SMDSEntity_Quad_Edge] ));
-  myNbLinEdge  ->setText( QString("%1").arg( theInfo[SMDSEntity_Edge] ));
-  myNbQuadEdge ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Edge] ));
+  myNbEdge       ->setText( QString("%1").arg( theInfo[SMDSEntity_Edge] +
+                                               theInfo[SMDSEntity_Quad_Edge] ));
+  myNbLinEdge    ->setText( QString("%1").arg( theInfo[SMDSEntity_Edge] ));
+  myNbQuadEdge   ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Edge] ));
 
   // faces
-  myNbFace     ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] +
-                                             theInfo[SMDSEntity_Quad_Triangle] +
-                                             theInfo[SMDSEntity_BiQuad_Triangle] +
-                                             theInfo[SMDSEntity_Quadrangle] +
-                                             theInfo[SMDSEntity_Quad_Quadrangle] +
-                                             theInfo[SMDSEntity_BiQuad_Quadrangle] +
-                                             theInfo[SMDSEntity_Polygon] ));
-  myNbLinFace  ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] +
-                                             theInfo[SMDSEntity_Quadrangle] +
-                                             theInfo[SMDSEntity_Polygon] ));
-  myNbQuadFace ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Triangle] +
-                                             theInfo[SMDSEntity_Quad_Quadrangle] +
-                                             theInfo[SMDSEntity_BiQuad_Quadrangle] ));
+  myNbFace       ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] +
+                                               theInfo[SMDSEntity_Quad_Triangle] +
+                                               theInfo[SMDSEntity_BiQuad_Triangle] +
+                                               theInfo[SMDSEntity_Quadrangle] +
+                                               theInfo[SMDSEntity_Quad_Quadrangle] +
+                                               theInfo[SMDSEntity_BiQuad_Quadrangle] +
+                                               theInfo[SMDSEntity_Polygon] ));
+  myNbLinFace    ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] +
+                                               theInfo[SMDSEntity_Quadrangle] +
+                                               theInfo[SMDSEntity_Polygon] ));
+  myNbQuadFace   ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Triangle] +
+                                               theInfo[SMDSEntity_Quad_Quadrangle] ));
+  myNbBiQuadFace ->setText( QString("%1").arg( theInfo[SMDSEntity_BiQuad_Triangle] +
+                                               theInfo[SMDSEntity_BiQuad_Quadrangle] ));
 
   // volumes
-  myNbVolum    ->setText( QString("%1").arg( theInfo[SMDSEntity_Tetra] +
-                                             theInfo[SMDSEntity_Quad_Tetra] +
-                                             theInfo[SMDSEntity_Pyramid] +
-                                             theInfo[SMDSEntity_Quad_Pyramid] +
-                                             theInfo[SMDSEntity_Hexa] +
-                                             theInfo[SMDSEntity_Quad_Hexa] +
-                                             theInfo[SMDSEntity_TriQuad_Hexa] +
-                                             theInfo[SMDSEntity_Penta] +
-                                             theInfo[SMDSEntity_Quad_Penta] +
-                                             theInfo[SMDSEntity_Hexagonal_Prism] +
-                                             theInfo[SMDSEntity_Polyhedra] ));
-  myNbLinVolum ->setText( QString("%1").arg( theInfo[SMDSEntity_Tetra] +
-                                             theInfo[SMDSEntity_Pyramid] +
-                                             theInfo[SMDSEntity_Hexa] +
-                                             theInfo[SMDSEntity_Penta] +
-                                             theInfo[SMDSEntity_Polyhedra] ));
-  myNbQuadVolum->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Tetra] +
-                                             theInfo[SMDSEntity_Quad_Pyramid] +
-                                             theInfo[SMDSEntity_Quad_Hexa] +
-                                             theInfo[SMDSEntity_TriQuad_Hexa] +
-                                             theInfo[SMDSEntity_Quad_Penta] ));
+  myNbVolum      ->setText( QString("%1").arg( theInfo[SMDSEntity_Tetra] +
+                                               theInfo[SMDSEntity_Quad_Tetra] +
+                                               theInfo[SMDSEntity_Pyramid] +
+                                               theInfo[SMDSEntity_Quad_Pyramid] +
+                                               theInfo[SMDSEntity_Hexa] +
+                                               theInfo[SMDSEntity_Quad_Hexa] +
+                                               theInfo[SMDSEntity_TriQuad_Hexa] +
+                                               theInfo[SMDSEntity_Penta] +
+                                               theInfo[SMDSEntity_Quad_Penta] +
+                                               theInfo[SMDSEntity_Hexagonal_Prism] +
+                                               theInfo[SMDSEntity_Polyhedra] ));
+  myNbLinVolum   ->setText( QString("%1").arg( theInfo[SMDSEntity_Tetra] +
+                                               theInfo[SMDSEntity_Pyramid] +
+                                               theInfo[SMDSEntity_Hexa] +
+                                               theInfo[SMDSEntity_Penta] +
+                                               theInfo[SMDSEntity_Polyhedra] ));
+  myNbQuadVolum  ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Tetra] +
+                                               theInfo[SMDSEntity_Quad_Pyramid] +
+                                               theInfo[SMDSEntity_Quad_Hexa] +
+                                               theInfo[SMDSEntity_Quad_Penta] ));
+  myNbBiQuadVolum->setText( QString("%1").arg( theInfo[SMDSEntity_TriQuad_Hexa] ));
 
   if ( myFull )
   {
     // triangles
-    myNbTrai     ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] +
-                                               theInfo[SMDSEntity_Quad_Triangle] +
-                                               theInfo[SMDSEntity_BiQuad_Triangle] ));
-    myNbLinTrai  ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] ));
-    myNbQuadTrai ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Triangle] +
-                                               theInfo[SMDSEntity_BiQuad_Triangle] ));
+    myNbTrai       ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] +
+                                                 theInfo[SMDSEntity_Quad_Triangle] +
+                                                 theInfo[SMDSEntity_BiQuad_Triangle] ));
+    myNbLinTrai    ->setText( QString("%1").arg( theInfo[SMDSEntity_Triangle] ));
+    myNbQuadTrai   ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Triangle] ));
+    myNbBiQuadTrai ->setText( QString("%1").arg( theInfo[SMDSEntity_BiQuad_Triangle] ));
     // quadrangles
-    myNbQuad     ->setText( QString("%1").arg( theInfo[SMDSEntity_Quadrangle] +
-                                               theInfo[SMDSEntity_Quad_Quadrangle] +
-                                               theInfo[SMDSEntity_BiQuad_Quadrangle] ));
-    myNbLinQuad  ->setText( QString("%1").arg( theInfo[SMDSEntity_Quadrangle] ));
-    myNbQuadQuad ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Quadrangle] +
-                                               theInfo[SMDSEntity_BiQuad_Quadrangle]));
+    myNbQuad       ->setText( QString("%1").arg( theInfo[SMDSEntity_Quadrangle] +
+                                                 theInfo[SMDSEntity_Quad_Quadrangle] +
+                                                 theInfo[SMDSEntity_BiQuad_Quadrangle] ));
+    myNbLinQuad    ->setText( QString("%1").arg( theInfo[SMDSEntity_Quadrangle] ));
+    myNbQuadQuad   ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Quadrangle] ));
+    myNbBiQuadQuad ->setText( QString("%1").arg( theInfo[SMDSEntity_BiQuad_Quadrangle]));
     // poligones
-    myNbPolyg    ->setText( QString("%1").arg( theInfo[SMDSEntity_Polygon] ));
+    myNbPolyg      ->setText( QString("%1").arg( theInfo[SMDSEntity_Polygon] ));
 
     // tetras
-    myNbTetra    ->setText( QString("%1").arg( theInfo[SMDSEntity_Tetra] +
-                                               theInfo[SMDSEntity_Quad_Tetra] ));
-    myNbLinTetra ->setText( QString("%1").arg( theInfo[SMDSEntity_Tetra] ));
-    myNbQuadTetra->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Tetra] ));
+    myNbTetra      ->setText( QString("%1").arg( theInfo[SMDSEntity_Tetra] +
+                                                 theInfo[SMDSEntity_Quad_Tetra] ));
+    myNbLinTetra   ->setText( QString("%1").arg( theInfo[SMDSEntity_Tetra] ));
+    myNbQuadTetra  ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Tetra] ));
     // hexas
-    myNbHexa     ->setText( QString("%1").arg( theInfo[SMDSEntity_Hexa] +
-                                               theInfo[SMDSEntity_TriQuad_Hexa],
-                                               theInfo[SMDSEntity_Quad_Hexa] ));
-    myNbLinHexa  ->setText( QString("%1").arg( theInfo[SMDSEntity_Hexa] ));
-    myNbQuadHexa ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Hexa] +
-                                               theInfo[SMDSEntity_TriQuad_Hexa] ));
+    myNbHexa       ->setText( QString("%1").arg( theInfo[SMDSEntity_Hexa] +
+                                                 theInfo[SMDSEntity_TriQuad_Hexa] +
+                                                 theInfo[SMDSEntity_Quad_Hexa] ));
+    myNbLinHexa    ->setText( QString("%1").arg( theInfo[SMDSEntity_Hexa] ));
+    myNbQuadHexa   ->setText( QString("%1").arg( theInfo[SMDSEntity_Quad_Hexa] ));
+    myNbBiQuadHexa ->setText( QString("%1").arg( theInfo[SMDSEntity_TriQuad_Hexa] ));
     // pyras
     myNbPyra     ->setText( QString("%1").arg( theInfo[SMDSEntity_Pyramid] +
                                                theInfo[SMDSEntity_Quad_Pyramid] ));
index 46758eb0f57045ef8bb635bbb82f2552939f64c8..92e752976b4518c77313e0f39b1656d3e07edcda 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -59,16 +59,20 @@ private:
   QLabel* myNbTrai;
   QLabel* myNbLinTrai;
   QLabel* myNbQuadTrai;
+  QLabel* myNbBiQuadTrai;
   QLabel* myNbQuad;
   QLabel* myNbLinQuad;
   QLabel* myNbQuadQuad;
+  QLabel* myNbBiQuadQuad;
   QLabel* myNbFace;
   QLabel* myNbLinFace;
   QLabel* myNbQuadFace;
+  QLabel* myNbBiQuadFace;
   QLabel* myNbPolyg;
   QLabel* myNbHexa;
   QLabel* myNbLinHexa;
   QLabel* myNbQuadHexa;
+  QLabel* myNbBiQuadHexa;
   QLabel* myNbTetra;
   QLabel* myNbLinTetra;
   QLabel* myNbQuadTetra;
@@ -81,6 +85,7 @@ private:
   QLabel* myNbVolum;
   QLabel* myNbLinVolum;
   QLabel* myNbQuadVolum;
+  QLabel* myNbBiQuadVolum;
   QLabel* myNbHexaPrism;
   QLabel* myNbPolyh;
 };
index 62a5c4b74c2118780fbf3076eb71e228ac25a159..c2ec7fcec558eb882f7902497cc97574ab451751 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -41,6 +41,7 @@
 #include <GEOMBase.h>
 #include <GeometryGUI.h>
 #include <GEOM_wrap.hxx>
+#include <GEOMImpl_Types.hxx>
 
 // SALOME GUI includes
 #include <SalomeApp_Tools.h>
@@ -63,6 +64,7 @@
 // Qt includes
 #include <QStringList>
 #include <QLineEdit>
+#include <QApplication>
 
 // OCCT includes
 #include <TopoDS.hxx>
@@ -95,6 +97,7 @@ SMESHGUI_MeshOp::SMESHGUI_MeshOp( const bool theToCreate, const bool theIsMesh )
   if ( GeometryGUI::GetGeomGen()->_is_nil() )// check that GEOM_Gen exists
     GeometryGUI::InitGeomGen();
   myIsOnGeometry = true;
+  myMaxShapeDim = -1;
 }
 
 //================================================================================
@@ -211,14 +214,16 @@ void SMESHGUI_MeshOp::startOperation()
     }
     connect( myDlg, SIGNAL( hypoSet( const QString& )), SLOT( onHypoSet( const QString& )));
     connect( myDlg, SIGNAL( geomSelectionByMesh( bool )), SLOT( onGeomSelectionByMesh( bool )));
-
-    if ( myToCreate )
+    connect( myDlg, SIGNAL( selectMeshType( const int, const int ) ), SLOT( onAlgoSetByMeshType( const int, const int)));
+    if ( myToCreate ) {
       if ( myIsMesh ) myHelpFileName = "constructing_meshes_page.html";
-      else myHelpFileName = "constructing_submeshes_page.html";
-    else myHelpFileName = "editing_meshes_page.html";
+      else            myHelpFileName = "constructing_submeshes_page.html";
+    }
+    else {
+      myHelpFileName = "editing_meshes_page.html";
+    }
   }
   SMESHGUI_SelectionOp::startOperation();
-
   // iterate through dimensions and get available algoritms, set them to the dialog
   _PTR(SComponent) aFather = SMESH::GetActiveStudyDocument()->FindComponent( "SMESH" );
   for ( int i = SMESH::DIM_0D; i <= SMESH::DIM_3D; i++ )
@@ -245,11 +250,17 @@ void SMESHGUI_MeshOp::startOperation()
     myDlg->activateObject( SMESHGUI_MeshDlg::Obj );
 
   myDlg->setCurrentTab( SMESH::DIM_3D );
+
+  QStringList TypeMeshList;
+  createMeshTypeList( TypeMeshList );
+  setAvailableMeshType( TypeMeshList );
+
   myDlg->show();
   myDlg->setGeomPopupEnabled(false);
   selectionDone();
 
   myIgnoreAlgoSelection = false;
+  myHasConcurrentSubBefore = false;
 
   myObjectToSelect.clear();
 }
@@ -582,21 +593,23 @@ void SMESHGUI_MeshOp::selectionDone()
         onAlgoSelected(-1, i);
       }
       myDlg->setMaxHypoDim( shapeDim );
+      myMaxShapeDim = shapeDim;
       myDlg->setHypoSets( SMESH::GetHypothesesSets( shapeDim ));
 
       if (!myToCreate) // edition: read hypotheses
       {
         if (pObj != 0)
         {
-          SMESH::SMESH_subMesh_var aVar =
+          SMESH::SMESH_subMesh_var submeshVar =
             SMESH::SMESH_subMesh::_narrow( _CAST( SObject,pObj )->GetObject() );
-          myDlg->setObjectShown( SMESHGUI_MeshDlg::Mesh, !aVar->_is_nil() );
+          myDlg->setObjectShown( SMESHGUI_MeshDlg::Mesh, !submeshVar->_is_nil() );
           myDlg->setObjectShown( SMESHGUI_MeshDlg::Geom, true );
           myDlg->objectWg( SMESHGUI_MeshDlg::Mesh, SMESHGUI_MeshDlg::Btn )->hide();
           myDlg->objectWg( SMESHGUI_MeshDlg::Geom, SMESHGUI_MeshDlg::Btn )->hide();
           myDlg->updateGeometry();
           myDlg->adjustSize();
           readMesh();
+          myIsMesh = submeshVar->_is_nil();
         }
         else
           myDlg->reset();
@@ -669,12 +682,20 @@ void SMESHGUI_MeshOp::selectionDone()
       for (int i = SMESH::DIM_0D;i < SMESH::DIM_3D; ++i) {
         myDlg->disableTab(i);
       }
-      //Hide labels and fields (Mesh ang Geometry)
+      myMaxShapeDim = -1;
+      //Hide labels and fields (Mesh and Geometry)
       myDlg->setObjectShown( SMESHGUI_MeshDlg::Mesh, false );
       myDlg->setObjectShown( SMESHGUI_MeshDlg::Geom, false );
       myDlg->adjustSize();
       readMesh();
     }
+    int curIndex = myDlg->currentMeshType( );
+    QStringList TypeMeshList;
+    createMeshTypeList( TypeMeshList );
+    setAvailableMeshType( TypeMeshList );
+    curIndex =( curIndex >= TypeMeshList.count() ) ? 0 : curIndex;
+    myDlg->setCurrentMeshType( curIndex );
+    setFilteredAlgoData( myMaxShapeDim, curIndex);
   }
   catch ( const SALOME::SALOME_Exception& S_ex )
   {
@@ -730,9 +751,13 @@ bool SMESHGUI_MeshOp::isValid( QString& theMess ) const
   if ( myToCreate )
   {
     QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
-    if ( aGeomEntry == "" )
+    if ( aGeomEntry.isEmpty() )
     {
-      theMess = tr( "GEOMETRY_OBJECT_IS_NOT_DEFINED" );
+      theMess = tr( myIsMesh ?
+                    "GEOMETRY_OBJECT_IS_NOT_DEFINED_MESH" :
+                    "GEOMETRY_OBJECT_IS_NOT_DEFINED_SUBMESH");
+      if ( !myIsMesh )
+        return false;
       dlg()->show();
       if ( SUIT_MessageBox::warning( myDlg, tr( "SMESH_WRN_WARNING" ), theMess,
            SUIT_MessageBox::Yes, SUIT_MessageBox::No ) == SUIT_MessageBox::No )
@@ -821,7 +846,7 @@ void SMESHGUI_MeshOp::availableHyps( const int       theDim,
   theHyps.clear();
   bool isAlgo = ( theHypType == Algo );
   bool isAux  = ( theHypType == AddHyp );
-  QStringList aHypTypeNameList = SMESH::GetAvailableHypotheses( isAlgo, theDim, isAux, myIsOnGeometry );
+  QStringList aHypTypeNameList = SMESH::GetAvailableHypotheses( isAlgo, theDim, isAux, myIsOnGeometry, !myIsMesh );
 
   QStringList::const_iterator anIter;
   for ( anIter = aHypTypeNameList.begin(); anIter != aHypTypeNameList.end(); ++anIter )
@@ -837,23 +862,23 @@ void SMESHGUI_MeshOp::availableHyps( const int       theDim,
 //================================================================================
 /*!
  * \brief Gets existing hypotheses or algorithms
 * \param theDim - specifies dimension of returned hypotheses/algorifms
 * \param theHypType - specifies whether algorims or hypotheses or additional ones
 * are retrieved (possible values are in HypType enumeration)
 * \param theFather - start object for finding ( may be component, mesh, or sub-mesh )
 * \param theHyps - output list of names.
 * \param theHypVars - output list of variables.
 * \param theAlgoData - to select hypos able to be used by this algo (optional)
 \param theDim - specifies dimension of returned hypotheses/algorifms
 \param theHypType - specifies whether algorims or hypotheses or additional ones
 are retrieved (possible values are in HypType enumeration)
 \param theFather - start object for finding ( may be component, mesh, or sub-mesh )
 \param theHyps - output list of names.
 \param theHypVars - output list of variables.
 \param theAlgoData - to select hypos able to be used by this algo (optional)
  *
  * Gets existing (i.e. already created) hypotheses or algorithm in accordance with
  * input parameters
  */
 //================================================================================
-void SMESHGUI_MeshOp::existingHyps( const int theDim,
-                                    const int theHypType,
-                                    _PTR(SObject) theFather,
-                                    QStringList& theHyps,
-                                    THypList& theHypList,
+void SMESHGUI_MeshOp::existingHyps( const int       theDim,
+                                    const int       theHypType,
+                                    _PTR(SObject)   theFather,
+                                    QStringList&    theHyps,
+                                    THypList&       theHypList,
                                     HypothesisData* theAlgoData)
 {
   // Clear hypoheses list
@@ -906,7 +931,7 @@ void SMESHGUI_MeshOp::existingHyps( const int theDim,
             if ( !aData) continue;
             if ( ( theDim == -1 || aData->Dim.contains( theDim ) ) &&
                  ( isCompatible ( theAlgoData, aData, theHypType )) &&
-                 ( isAux == aData->IsAux ))
+                 ( theHypType == Algo || isAux == aData->IsAuxOrNeedHyp ))
             {
               std::string aHypName = aName->Value();
               theHyps.append( aHypName.c_str() );
@@ -1371,20 +1396,47 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
 
   const bool isSubmesh = ( myToCreate ? !myIsMesh : myDlg->isObjectShown( SMESHGUI_MeshDlg::Mesh ));
 
+  // if ( aDim >= SMESH::DIM_2D ) myAvailableHypData[ aDim ][ Algo ] = myFilteredAlgoData[aDim];
   HypothesisData* algoData = hypData( aDim, Algo, theIndex );
   HypothesisData* algoByDim[4];
   algoByDim[ aDim ] = algoData;
 
   QStringList anAvailable;
-  if ( !algoData ) { // all algos becomes available
-    availableHyps( aDim, Algo, anAvailable, myAvailableHypData[ aDim ][ Algo ]);
-    myDlg->tab( aDim )->setAvailableHyps( Algo, anAvailable );
+
+  // check that tab enabled of one less dimension
+  if ( aDim > SMESH::DIM_0D )
+  {
+    if ( isAccessibleDim( aDim - 1 ) )
+    {
+      if (( myDlg->currentMeshType() != MT_ANY ) &&
+          ( !algoData || ( myIsOnGeometry && algoData->InputTypes.isEmpty() )))
+        for (int i = aDim - 1; i >= SMESH::DIM_0D; i--)
+          if ( isAccessibleDim( i ) ) {
+            myDlg->disableTab( i );
+            setCurrentHyp(i, Algo, -1);
+          }
+    }
+    else if ( algoData && myIsOnGeometry && !algoData->InputTypes.isEmpty() )
+    {
+      myDlg->enableTab( aDim - 1 );
+    }
   }
 
   // check that algorithms of other dimentions are compatible with
   // the selected one
-
-   // 2 loops: backward and forward from algo dimension
+  if ( !algoData ) { // all algos becomes available
+    if (myDlg->currentMeshType() == MT_ANY || aDim == SMESH::DIM_1D || aDim == SMESH::DIM_0D)
+      availableHyps( aDim, Algo, anAvailable, myAvailableHypData[ aDim ][ Algo ]);
+    else{
+      anAvailable.clear();
+      for (int i = 0; i < myFilteredAlgoData[aDim].count(); ++i) {
+        HypothesisData* aCurAlgo = myFilteredAlgoData[aDim][ i ];
+        anAvailable.append( aCurAlgo->Label );
+      }
+    }
+    myDlg->tab( aDim )->setAvailableHyps( Algo, anAvailable );
+  }
+  // 2 loops: backward and forward from algo dimension
   for ( int forward = false; forward <= true; ++forward )
   {
     int dim = aDim + 1, lastDim = SMESH::DIM_3D, dir = 1;
@@ -1412,12 +1464,26 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
           curAlgo = 0;
       }
       // set new available algoritms
-      availableHyps( dim, Algo, anAvailable, myAvailableHypData[dim][Algo], prevAlgo );
+      if (myDlg->currentMeshType() == MT_ANY || dim == SMESH::DIM_1D || dim == SMESH::DIM_0D)
+        availableHyps( dim, Algo, anAvailable, myAvailableHypData[dim][Algo], prevAlgo );
+      else{
+        anAvailable.clear();
+        myAvailableHypData[dim][Algo].clear();
+        for (int i = 0; i < myFilteredAlgoData[dim].count(); ++i) {
+          HypothesisData* aCurAlgo = myFilteredAlgoData[dim][ i ];
+          if ( isCompatible ( prevAlgo, aCurAlgo, Algo )) {
+            anAvailable.append( aCurAlgo->Label );
+            myAvailableHypData[dim][Algo].append( aCurAlgo );
+          }
+        }
+      }
       HypothesisData* soleCompatible = 0;
       if ( anAvailable.count() == 1 )
         soleCompatible = myAvailableHypData[dim][Algo][0];
-      if ( dim == aTopDim && prevAlgo ) // all available algoritms should be selectable any way
-        availableHyps( dim, Algo, anAvailable, myAvailableHypData[dim][Algo], 0 );
+      if ( dim == aTopDim && prevAlgo ) {// all available algoritms should be selectable any way
+        if (myDlg->currentMeshType() == MT_ANY)
+          availableHyps( dim, Algo, anAvailable, myAvailableHypData[dim][Algo], 0 );
+      }
       myDlg->tab( dim )->setAvailableHyps( Algo, anAvailable );
       noCompatible = anAvailable.isEmpty();
 
@@ -1426,7 +1492,7 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
       if ( !isSubmesh && algoIndex < 0 && soleCompatible && !forward && dim != SMESH::DIM_0D)
         // select the sole compatible algo
         algoIndex = myAvailableHypData[dim][Algo].indexOf( soleCompatible );
-      setCurrentHyp( dim, Algo, algoIndex );
+      setCurrentHyp( dim, Algo, algoIndex);
 
       // remember current algo
       prevAlgo = algoByDim[ dim ] = hypData( dim, Algo, algoIndex );
@@ -1458,8 +1524,8 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
         bool algoDeselectedByUser = ( theDim < 0 && aDim == dim );
         CORBA::String_var curHypType = curHyp->GetName();
         if ( !algoDeselectedByUser &&
-             myObjHyps[ dim ][ type ].count() > 0 &&
-             !strcmp( curHypType, myObjHyps[ dim ][ type ].first().first->GetName()) )
+            myObjHyps[ dim ][ type ].count() > 0 &&
+            !strcmp( curHypType, myObjHyps[ dim ][ type ].first().first->GetName()) )
         {
           HypothesisData* hypData = SMESH::GetHypothesisData( curHyp->GetName() );
           for (int i = 0; i < myAvailableHypData[ dim ][ Algo ].count(); ++i) {
@@ -1472,6 +1538,7 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
         }
       }
       // get hyps compatible with curAlgo
+      bool defaulHypAvlbl = false;
       if ( curAlgo )
       {
         // check if a selected hyp is compatible with the curAlgo
@@ -1482,10 +1549,11 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
         }
         existingHyps( dim, type, pObj, anExisting, myExistingHyps[ dim ][ type ], curAlgo);
         availableHyps( dim, type, anAvailable, myAvailableHypData[ dim ][ type ], curAlgo);
+        defaulHypAvlbl = (type == MainHyp && !curAlgo->IsAuxOrNeedHyp );
       }
       // set list of hypotheses
       myDlg->tab( dim )->setAvailableHyps( type, anAvailable );
-      myDlg->tab( dim )->setExistingHyps( type, anExisting );
+      myDlg->tab( dim )->setExistingHyps( type, anExisting, defaulHypAvlbl );
 
       // set current existing hypothesis
       if ( !curHyp->_is_nil() && !anExisting.isEmpty() )
@@ -1497,8 +1565,8 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
         CORBA::String_var hypTypeName = myExistingHyps[ dim ][ type ].first().first->GetName();
         bool isOptional = true;
         if ( algoByDim[ dim ] &&
-             SMESH::IsAvailableHypothesis( algoByDim[ dim ], hypTypeName.in(), isOptional ) &&
-             !isOptional )
+            SMESH::IsAvailableHypothesis( algoByDim[ dim ], hypTypeName.in(), isOptional ) &&
+            !isOptional )
           hypIndex = 0;
       }
       setCurrentHyp( dim, type, hypIndex );
@@ -1603,9 +1671,6 @@ bool SMESHGUI_MeshOp::createMesh( QString& theMess, QStringList& theEntryList )
 {
   theMess = "";
 
-  //QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
-  //QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
-
   QStringList aList;
   myDlg->selectedObject( SMESHGUI_MeshDlg::Geom, aList );
   if ( aList.isEmpty() )
@@ -1625,8 +1690,20 @@ bool SMESHGUI_MeshOp::createMesh( QString& theMess, QStringList& theEntryList )
     }
     return true;
   }
+  QString namePrefix;
+  if ( aList.count() > 1 )
+  {
+    namePrefix = myDlg->objectText( SMESHGUI_MeshDlg::Obj );
+    int i = namePrefix.length() - 1;
+    while ( i > 0 && namePrefix[i].isDigit() )
+      --i;
+    if ( i < namePrefix.length() - 1 )
+      namePrefix.chop( namePrefix.length() - 1 - i );
+    else
+      namePrefix += "_";
+  }
   QStringList::Iterator it = aList.begin();
-  for ( ; it!=aList.end(); it++)
+  for ( int i = 0; it!=aList.end(); it++, ++i )
   {
     QString aGeomEntry = *it;
     _PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.toLatin1().data() );
@@ -1645,8 +1722,9 @@ bool SMESHGUI_MeshOp::createMesh( QString& theMess, QStringList& theEntryList )
       return false;
     _PTR(SObject) aMeshSO = SMESH::FindSObject( aMeshVar.in() );
     if ( aMeshSO ) {
-      SMESH::SetName( aMeshSO, myDlg->objectText( SMESHGUI_MeshDlg::Obj ) );
       theEntryList.append( aMeshSO->GetID().c_str() );
+      if ( i > 0 ) setDefaultName( namePrefix );
+      SMESH::SetName( aMeshSO, myDlg->objectText( SMESHGUI_MeshDlg::Obj ) );
     }
 
     for ( int aDim = SMESH::DIM_0D; aDim <= SMESH::DIM_3D; aDim++ ) {
@@ -1804,6 +1882,8 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess, QStringList& theEntryList
   selectObject( _PTR(SObject)() );
   selectionDone();
 
+  checkSubMeshConcurrency( aMeshVar, aSubMeshVar, /*askUser=*/true );
+
   return true;
 }
 
@@ -1860,13 +1940,17 @@ void SMESHGUI_MeshOp::setCurrentHyp( const int theDim,
  * Generates and sets default mesh/submesh name(Mesh_1, Mesh_2, etc.)
  */
 //================================================================================
-void SMESHGUI_MeshOp::setDefaultName() const
+void SMESHGUI_MeshOp::setDefaultName( const QString& thePrefix ) const
 {
   QString aResName;
 
   _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
   int i = 1;
-  QString aPrefix = tr( myIsMesh ? "SMESH_OBJECT_MESH" : "SMESH_SUBMESH" ) + "_";
+
+  QString aPrefix = thePrefix;
+  if ( aPrefix.isEmpty() )
+    aPrefix = tr( myIsMesh ? "SMESH_OBJECT_MESH" : "SMESH_SUBMESH" ) + "_";
+
   _PTR(SObject) anObj;
   do
   {
@@ -1969,7 +2053,7 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
 
 //================================================================================
 /*!
- * \brief Reads parameters of an edited mesh and assigns them to the dialog
+ * \brief Reads parameters of an edited mesh/sub-mesh and assigns them to the dialog
  *
  * Called when mesh is edited only.
  */
@@ -1994,6 +2078,7 @@ void SMESHGUI_MeshOp::readMesh()
         QString aMeshName = name( aMeshSO );
         myDlg->setObjectText( SMESHGUI_MeshDlg::Mesh, aMeshName );
       }
+      myHasConcurrentSubBefore = checkSubMeshConcurrency( aMeshVar, aSubMeshVar );
     }
 
     // Get name of geometry object
@@ -2009,6 +2094,7 @@ void SMESHGUI_MeshOp::readMesh()
   // Get hypotheses and algorithms assigned to the mesh/sub-mesh
   QStringList anExisting;
   const int lastDim = ( myIsOnGeometry ) ? SMESH::DIM_0D : SMESH::DIM_3D;
+  bool algoFound = false;
   for ( int dim = SMESH::DIM_3D; dim >= lastDim; --dim )
   {
     // get algorithm
@@ -2025,10 +2111,12 @@ void SMESHGUI_MeshOp::readMesh()
 //         myAvailableHypData[ dim ][ Algo ].push_back( algoData );
 //         aHypIndex = myAvailableHypData[ dim ][ hypType ].count() - 1;
 //       }
+      algoFound = ( aHypIndex > -1 );
     }
     setCurrentHyp( dim, Algo, aHypIndex );
     // set existing and available hypothesis according to the selected algo
-    onAlgoSelected( aHypIndex, dim );
+    if ( aHypIndex > -1 || !algoFound )
+      onAlgoSelected( aHypIndex, dim );
   }
 
   // get hypotheses
@@ -2165,6 +2253,14 @@ bool SMESHGUI_MeshOp::editMeshOrSubMesh( QString& theMess )
     }
   }
 
+  SALOMEDS_SObject* aSObject = _CAST(SObject, pObj);
+  CORBA::Object_var anObject = aSObject->GetObject();
+  SMESH::SMESH_Mesh_var       aMeshVar = SMESH::SMESH_Mesh::_narrow( anObject );
+  SMESH::SMESH_subMesh_var aSubMeshVar = SMESH::SMESH_subMesh::_narrow( anObject );
+  bool isMesh = !aMeshVar->_is_nil();
+  if ( !isMesh && !aSubMeshVar->_is_nil() )
+    aMeshVar = aSubMeshVar->GetFather();
+
   // Assign new algorithms and hypotheses
   for ( int dim = aDim; dim <= SMESH::DIM_3D; dim++ )
   {
@@ -2177,18 +2273,11 @@ bool SMESHGUI_MeshOp::editMeshOrSubMesh( QString& theMess )
     if ( !anAlgoVar->_is_nil() && // some algo selected and
          myObjHyps[ dim ][ Algo ].count() == 0 ) // no algo assigned
     {
-      SALOMEDS_SObject* aSObject = _CAST(SObject, pObj);
-      CORBA::Object_var anObject = aSObject->GetObject();
-      SMESH::SMESH_Mesh_var aMeshVar = SMESH::SMESH_Mesh::_narrow( anObject );
-      bool isMesh = !aMeshVar->_is_nil();
-      if ( isMesh ) {
+      if ( isMesh )
         SMESH::AddHypothesisOnMesh( aMeshVar, anAlgoVar );
-      } else {
-        SMESH::SMESH_subMesh_var aVar =
-          SMESH::SMESH_subMesh::_narrow( _CAST(SObject,pObj)->GetObject() );
-        if ( !aVar->_is_nil() )
-          SMESH::AddHypothesisOnSubMesh( aVar, anAlgoVar );
-      }
+      else if ( !aSubMeshVar->_is_nil() )
+        SMESH::AddHypothesisOnSubMesh( aSubMeshVar, anAlgoVar );
+
       myObjHyps[ dim ][ Algo ].append( THypItem( anAlgoVar, aName) );
     }
 
@@ -2213,24 +2302,14 @@ bool SMESHGUI_MeshOp::editMeshOrSubMesh( QString& theMess )
       }
 
       // assign new hypotheses
-      if ( aNewHypIndex != anOldHypIndex && aNewHypIndex != -1 )
+      if ( aNewHypIndex != anOldHypIndex && aNewHypIndex > -1 )
       {
-        SMESH::SMESH_Mesh_var aMeshVar =
-          SMESH::SMESH_Mesh::_narrow( _CAST(SObject,pObj)->GetObject() );
-        bool isMesh = !aMeshVar->_is_nil();
         if ( isMesh )
-        {
           SMESH::AddHypothesisOnMesh
             (aMeshVar, myExistingHyps[ dim ][ hypType ][ aNewHypIndex ].first );
-        }
-        else
-        {
-          SMESH::SMESH_subMesh_var aVar =
-            SMESH::SMESH_subMesh::_narrow( _CAST(SObject,pObj)->GetObject() );
-          if ( !aVar->_is_nil() )
-            SMESH::AddHypothesisOnSubMesh
-              ( aVar, myExistingHyps[ dim ][ hypType ][ aNewHypIndex ].first );
-        }
+        else if ( !aSubMeshVar->_is_nil() )
+          SMESH::AddHypothesisOnSubMesh
+            ( aSubMeshVar, myExistingHyps[ dim ][ hypType ][ aNewHypIndex ].first );
       }
       // reread all hypotheses of mesh if necessary
       QStringList anExisting;
@@ -2238,9 +2317,61 @@ bool SMESHGUI_MeshOp::editMeshOrSubMesh( QString& theMess )
     }
   }
 
+  myHasConcurrentSubBefore =
+    checkSubMeshConcurrency( aMeshVar, aSubMeshVar, /*askUser=*/!myHasConcurrentSubBefore );
+
   return true;
 }
 
+//================================================================================
+/*!
+ * \brief Checks if a concurrent sub-meshes appear as result of sub-mesh
+ *        creation/edition and, if (askUser) , proposes the uses to set up a desired
+ *        order of sub-mesh computation.
+ *        Returns \c true if a sub-mesh concurrency detected.
+ */
+//================================================================================
+
+bool SMESHGUI_MeshOp::checkSubMeshConcurrency(SMESH::SMESH_Mesh_ptr    mesh,
+                                              SMESH::SMESH_subMesh_ptr submesh,
+                                              bool                     askUser)
+{
+  if ( CORBA::is_nil( mesh ) || CORBA::is_nil( submesh ))
+    return false;
+
+  bool isNewConcurrent = mesh->IsUnorderedSubMesh( submesh->GetId() );
+  if ( isNewConcurrent && askUser )
+  {
+    int butID = SUIT_MessageBox::warning( myDlg->parentWidget(), tr( "SMESH_WARNING" ),
+                                          tr("CONCURRENT_SUBMESH_APPEARS"),
+                                          tr("SMESH_BUT_YES"), tr("SMESH_BUT_NO"));
+    if ( butID == 0 )
+    {
+      _PTR(SObject) meshSO = SMESH::FindSObject( mesh );
+      LightApp_SelectionMgr* aSelectionMgr = selectionMgr();
+      if ( meshSO && aSelectionMgr )
+      {
+        myDlg->setEnabled( false ); // disactivate selection
+        selectionMgr()->clearFilters();
+        selectObject( meshSO );
+        SMESHGUI::GetSMESHGUI()->OnGUIEvent( 713 ); // MESH_ORDER
+        qApp->processEvents();
+
+        myDlg->setEnabled( true );
+        int obj = myDlg->getActiveObject();
+        onActivateObject( obj ); // restore filter
+        if ( !myToCreate )
+        {
+          selectObject( SMESH::FindSObject( submesh ));
+          selectionDone();
+        }
+      }
+    }
+  }
+
+  return isNewConcurrent;
+}
+
 //================================================================================
 /*!
  * \brief Verifies whether given operator is valid for this one
@@ -2343,3 +2474,280 @@ void SMESHGUI_MeshOp::selectObject( _PTR(SObject) theSObj ) const
     sm->setSelectedObjects( anIOList, false );
   }
 }
+//================================================================================
+/*!
+ * \brief Create available list types of mesh
+  * \param theTypeMesh - Output list of available types of mesh
+ */
+//================================================================================
+void SMESHGUI_MeshOp::createMeshTypeList( QStringList& theTypeMesh)
+{
+  theTypeMesh.clear();
+  theTypeMesh.append( tr( "MT_ANY" ) );
+  if ( myMaxShapeDim >= 2 || myMaxShapeDim == -1 )
+  {
+    theTypeMesh.append( tr( "MT_TRIANGULAR" ) );
+    theTypeMesh.append( tr( "MT_QUADRILATERAL" ) );
+  }
+  if ( myMaxShapeDim == 3 || myMaxShapeDim == -1 )
+  {
+    theTypeMesh.append( tr( "MT_TETRAHEDRAL" ) );
+    theTypeMesh.append( tr( "MT_HEXAHEDRAL" ) );
+  }
+
+}
+//================================================================================
+/*!
+ * \brief Set available types of mesh
+  * \param theTypeMesh - List of available types of mesh
+ */
+//================================================================================
+void SMESHGUI_MeshOp::setAvailableMeshType( const QStringList& theTypeMesh )
+{
+  myDlg->setAvailableMeshType( theTypeMesh );
+}
+
+//================================================================================
+/*!
+ * \brief SLOT. Is called when the user select type of mesh
+  * \param theTabIndex - Index of current active tab
+  * \param theIndex - Index of current type of mesh
+ */
+//================================================================================
+void SMESHGUI_MeshOp::onAlgoSetByMeshType( const int theTabIndex, const int theIndex)
+{
+  setFilteredAlgoData( theTabIndex, theIndex);
+}
+
+//================================================================================
+/*!
+ * \brief Set a filtered list of available algorithms by mesh type
+  * \param theTabIndex - Index of current active tab
+  * \param theIndex - Index of current type of mesh
+ */
+//================================================================================
+void SMESHGUI_MeshOp::setFilteredAlgoData( const int theTabIndex, const int theIndex)
+{
+  int aDim;
+  THypDataList anAvailableAlgsData;
+  QStringList anAvailableAlgs;
+  QString anCompareType = "";
+  bool isAvailableChoiceAlgo = false;
+  int anCurrentAvailableAlgo = 0;
+  bool isNone = true;
+  switch ( theIndex ) {
+  case MT_ANY:
+    anCompareType = "ANY";
+    aDim = SMESH::DIM_3D;
+    break;
+  case MT_TRIANGULAR:
+    aDim = SMESH::DIM_2D;
+    anCompareType = "TRIA";
+    break;
+  case MT_QUADRILATERAL:
+    aDim = SMESH::DIM_2D;
+    anCompareType = "QUAD";
+    break;
+  case MT_TETRAHEDRAL:
+    aDim = SMESH::DIM_3D;
+    anCompareType = "TETRA";
+    break;
+  case MT_HEXAHEDRAL:
+    aDim = SMESH::DIM_3D;
+    anCompareType = "HEXA";
+    break;
+  default:;
+  }
+
+  bool toCheckIsApplicableToAll = !myIsMesh;
+  GEOM::GEOM_Object_var aGeomVar;
+  QString anEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
+  if ( _PTR(SObject) so = studyDS()->FindObjectID( anEntry.toLatin1().data() ))
+  {
+    CORBA::Object_var obj = _CAST( SObject,so )->GetObject();
+    aGeomVar = GEOM::GEOM_Object::_narrow( obj );
+    if ( !aGeomVar->_is_nil() && toCheckIsApplicableToAll )
+      toCheckIsApplicableToAll = ( aGeomVar->GetType() == GEOM_GROUP );
+  }
+
+  if ( anCompareType == "ANY" )
+  {
+    for ( int dim = SMESH::DIM_2D; dim <= SMESH::DIM_3D; dim++ )
+    {
+      isNone = currentHyp( dim, Algo ) < 0;
+      isAvailableChoiceAlgo = false;
+      // retrieves a list of available algorithms from resources
+      availableHyps( dim, Algo, anAvailableAlgs, anAvailableAlgsData );
+      //return current algo in current tab and set new algorithm list
+      HypothesisData* algoCur;
+      if ( !isNone && !myAvailableHypData[dim][Algo].empty() ) {
+        algoCur = myAvailableHypData[dim][Algo].at( currentHyp( dim, Algo ) );
+      }
+      myAvailableHypData[dim][Algo].clear();
+      anAvailableAlgs.clear();
+      for (int i = 0 ; i < anAvailableAlgsData.count(); i++)
+      {
+        HypothesisData* curAlgo = anAvailableAlgsData.at(i);
+        if ( aGeomVar->_is_nil() ||
+             SMESH::IsApplicable( curAlgo->TypeName, aGeomVar, toCheckIsApplicableToAll ))
+        {
+          anAvailableAlgs.append( curAlgo->Label );
+          myAvailableHypData[dim][Algo].append( curAlgo );
+        }
+      }
+      if ( !isNone && algoCur ) {
+        for (int i = 0 ; i < myAvailableHypData[dim][Algo].count(); i++)
+        {
+          HypothesisData* algoAny = myAvailableHypData[dim][Algo].at(i);
+          if ( algoAny->Label == algoCur->Label ){
+            isAvailableChoiceAlgo = true;
+            anCurrentAvailableAlgo = i;
+            break;
+          }
+        }
+      }
+      else if ( !isNone ) {
+        isAvailableChoiceAlgo = true;
+        anCurrentAvailableAlgo = currentHyp( dim, Algo );
+      }
+      myDlg->tab( dim )->setAvailableHyps( Algo, anAvailableAlgs );
+      if ( isAvailableChoiceAlgo )
+        setCurrentHyp( dim, Algo, anCurrentAvailableAlgo );
+    }
+    if ( !myIsOnGeometry )
+      for ( int i = SMESH::DIM_0D; i <= SMESH::DIM_3D; i++ ) {
+        if ( i < SMESH::DIM_3D ) myDlg->disableTab( i );
+        else                     myDlg->enableTab( i );
+      }
+    else
+      for ( int i = SMESH::DIM_0D; i <= SMESH::DIM_3D; i++ ) {
+        if ( i > myMaxShapeDim ) myDlg->disableTab( i );
+        else                     myDlg->enableTab( i );
+      }
+    myDlg->setCurrentTab( theTabIndex );
+  }
+  else
+  {
+    QString anCurrentAlgo;
+    bool isReqDisBound = true;
+    QString anCurrentCompareType = anCompareType;
+    isNone = currentHyp( aDim, Algo ) < 0;
+    if ( !isNone && !myAvailableHypData[aDim][Algo].empty() &&
+        myAvailableHypData[aDim][Algo].count() != anAvailableAlgsData.count() )
+      isReqDisBound = myAvailableHypData[aDim][Algo].at( currentHyp( aDim, Algo ) )->InputTypes.isEmpty();
+    else if ( !isNone )
+      isReqDisBound = anAvailableAlgsData.at( currentHyp( aDim, Algo ) )->InputTypes.isEmpty();
+    for ( int dim = aDim; dim >= SMESH::DIM_2D; dim-- )
+    {
+      bool isNoneAlg = currentHyp( dim, Algo ) < 0;
+      isAvailableChoiceAlgo = false;
+      // retrieves a list of available algorithms from resources
+      availableHyps( dim, Algo, anAvailableAlgs, anAvailableAlgsData );
+      // finding algorithm which is selected
+      if ( !isNoneAlg && !myAvailableHypData[dim][Algo].empty() &&
+          myAvailableHypData[dim][Algo].count() != anAvailableAlgsData.count() )
+        anCurrentAlgo = myAvailableHypData[dim][Algo].at( currentHyp( dim, Algo ) )->Label;
+      else if ( !isNoneAlg )
+        anCurrentAlgo = anAvailableAlgsData.at( currentHyp( dim, Algo ) )->Label;
+      anAvailableAlgs.clear();
+      myAvailableHypData[dim][Algo].clear();
+      myFilteredAlgoData[dim].clear();
+      // finding and adding algorithm depending on the type mesh
+      for ( int i = 0 ; i < anAvailableAlgsData.count(); i++ )
+      {
+        HypothesisData* algoIn = anAvailableAlgsData.at( i );
+        bool isAvailableAlgo = ( algoIn->OutputTypes.count() == 0 );
+        QStringList::const_iterator inElemType = algoIn->OutputTypes.begin();
+        for ( ; inElemType != algoIn->OutputTypes.end(); inElemType++ )
+        {
+          if ( *inElemType == anCurrentCompareType ) {
+            isAvailableAlgo = true;
+            break;
+          }
+        }
+        if ( isAvailableAlgo || algoIn->OutputTypes.count()==0 ) {
+          if ( aGeomVar->_is_nil() || myMaxShapeDim != dim ||
+               SMESH::IsApplicable( algoIn->TypeName, aGeomVar, toCheckIsApplicableToAll ))
+          {
+            anAvailableAlgs.append( algoIn->Label );
+            myAvailableHypData[dim][Algo].append( algoIn );
+            myFilteredAlgoData[dim].append( algoIn );
+          }
+        }
+        //algorithm will be active, if the chosen algorithm available in the current mesh type
+        if ( !isNoneAlg &&  isAvailableAlgo && algoIn->Label == anCurrentAlgo ) {
+          isAvailableChoiceAlgo = true;
+          anCurrentAvailableAlgo = anAvailableAlgs.count() - 1 ;
+        }
+      }
+      //set new algorithm list and select the current algorithm
+      myDlg->tab( dim )->setAvailableHyps( Algo, anAvailableAlgs );
+      anCurrentCompareType = ( anCompareType == "HEXA" ) ? "QUAD" : "TRIA";
+      if ( isAvailableChoiceAlgo )
+        setCurrentHyp( dim, Algo, anCurrentAvailableAlgo );
+      else
+        setCurrentHyp( dim, Algo, -1 );
+    }
+
+    if ( isNone || isReqDisBound ) {
+      for ( int i = SMESH::DIM_0D; i <= myMaxShapeDim; i++ ) {
+        if ( aDim != i ) {
+          myDlg->disableTab( i );
+          setCurrentHyp(i, Algo, -1);
+        }
+      }
+    }
+    else if ( !isNone ) {
+      if ( aDim == SMESH::DIM_2D){
+        myDlg->disableTab( SMESH::DIM_3D );
+        setCurrentHyp( SMESH::DIM_3D, Algo, -1);
+      }
+      for ( int i = myMaxShapeDim; i > SMESH::DIM_0D; i-- )
+      {
+        isReqDisBound = ( currentHyp( i, Algo ) < 0 ) ? true :
+            myAvailableHypData[i][Algo].at( currentHyp( i, Algo ) )->InputTypes.isEmpty();
+        if ( isReqDisBound ) {
+          for (int j = i - 1; j >= SMESH::DIM_0D; j--){
+            myDlg->disableTab( j );
+            setCurrentHyp( j , Algo, -1 );
+          }
+          break;
+        }
+      }
+    }
+    myDlg->enableTab( aDim );
+    myDlg->setCurrentTab( aDim );
+  }
+  QStringList aHypothesesSetsList = SMESH::GetHypothesesSets( aDim );
+  QStringList aFilteredHypothesesSetsList;
+  aFilteredHypothesesSetsList.clear();
+  QStringList::const_iterator inHypoSetName = aHypothesesSetsList.begin();
+  for ( ; inHypoSetName != aHypothesesSetsList.end(); ++inHypoSetName )
+  {
+    HypothesesSet* currentHypoSet = SMESH::GetHypothesesSet( *inHypoSetName );
+    bool isAvailable = false;
+    currentHypoSet->init( true );
+    while ( currentHypoSet->next(), currentHypoSet->more() )
+    {
+      isAvailable = false;
+      if ( HypothesisData* algoDataIn = SMESH::GetHypothesisData( currentHypoSet->current() ))
+      {
+        for (int i = SMESH::DIM_0D; i <= myMaxShapeDim; i++)
+        {
+          for (int j = 0; j < myAvailableHypData[i][Algo].count(); ++j) {
+            HypothesisData* aCurAlgo =  hypData( i, Algo, j );
+            if ( aCurAlgo->Label == algoDataIn->Label ){
+              isAvailable = true;
+              break;
+            }
+          }
+          if ( isAvailable ) break;
+        }
+        if ( !isAvailable ) break;
+      }
+    }
+    if ( isAvailable )
+      aFilteredHypothesesSetsList.append( *inHypoSetName );
+  }
+  myDlg->setHypoSets( aFilteredHypothesesSetsList );
+}
index 91c39ed72bb8b16ce305e4630a9d3cf2d5f35d9c..fcaedabf3fe112271e81fb3281a8658a1c8aef9f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -48,6 +48,7 @@ class SMESHGUI_EXPORT SMESHGUI_MeshOp : public SMESHGUI_SelectionOp
       
 public:
   enum HypType{ Algo = 0, MainHyp, AddHyp, NbHypTypes };
+  enum MeshType{ MT_ANY = 0, MT_TRIANGULAR, MT_QUADRILATERAL, MT_TETRAHEDRAL, MT_HEXAHEDRAL };
 
   typedef std::pair<SMESH::SMESH_Hypothesis_var, QString> THypItem;
   typedef QList< THypItem > THypList;
@@ -83,6 +84,7 @@ protected slots:
   void                           processSet();
   void                           onHypoCreated( int );
   void                           onHypoEdited( int );
+  void                           onAlgoSetByMeshType( const int, const int );
 
 private:
   typedef QList<HypothesisData*> THypDataList; // typedef: list of hypothesis data
@@ -109,11 +111,14 @@ private:
   bool                           createMesh( QString&, QStringList& );
   bool                           createSubMesh( QString&, QStringList& );
   bool                           editMeshOrSubMesh( QString& );
+  bool                           checkSubMeshConcurrency( SMESH::SMESH_Mesh_ptr    mesh,
+                                                          SMESH::SMESH_subMesh_ptr submesh,
+                                                          bool                     askUser=false);
 
   int                            currentHyp( const int, const int ) const;
   bool                           isAccessibleDim( const int ) const;
   void                           setCurrentHyp( const int, const int, const int );
-  void                           setDefaultName() const;
+  void                           setDefaultName( const QString& prefix="" ) const;
   SMESH::SMESH_Hypothesis_var    getAlgo( const int );
   void                           readMesh();
   QString                        name( _PTR(SObject) ) const;
@@ -125,24 +130,26 @@ private:
   char*                          isSubmeshIgnored() const;
   _PTR(SObject)                  getSubmeshByGeom() const;
   void                           selectObject( _PTR(SObject) ) const;
-
+  void                           createMeshTypeList( QStringList& );
+  void                           setAvailableMeshType( const QStringList& );
+  void                           setFilteredAlgoData( const int, const int );
 private:
   SMESHGUI_MeshDlg*              myDlg;
   SMESHGUI_ShapeByMeshOp*        myShapeByMeshOp;
   bool                           myToCreate;
   bool                           myIsMesh;
   bool                           myIsOnGeometry; //!< TRUE if edited mesh accotiated with geometrical object
+  bool                           myHasConcurrentSubBefore;
 
   TDim2Type2HypList              myExistingHyps; //!< all hypothesis of SMESH module
   TDim2Type2HypList              myObjHyps;      //!< hypothesis assigned to the current 
                                                  //   edited mesh/sub-mesh
-
   // hypdata corresponding to hypotheses present in myDlg
   THypDataList                   myAvailableHypData[4][NbHypTypes];
-
+  THypDataList                   myFilteredAlgoData[4];
   bool                           myIgnoreAlgoSelection;
   HypothesesSet* myHypoSet;
-  int myDim, myType;
+  int myDim, myType, myMaxShapeDim;
 
   QString                        myObjectToSelect;
 };
index ee38d0ce4c1fa808f00d972159aef3b39f84c4d9..4feeca8da3c818da0352f49f080f17c8a58ab70e 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index dafe10fd0cc7bf9fd57430e7ce13b4699fddfeed..629d3d3528d0b2f73f5bc88864e8e2ece4ee873f 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 96caaa5810ccf2571157248e908a3d0ec7da17e1..88a471b21667566872e6d30c1a876b054bd0e832 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -295,7 +295,8 @@ bool SMESHGUI_MeshOrderMgr::SetMeshOrder( const  ListListId& theListListIds )
       _PTR(SObject) aSmObj = smIter->Value();
       SMESH::SMESH_subMesh_var sm =
         SMESH::SObjectToInterface<SMESH::SMESH_subMesh>( aSmObj );
-      mapOfSubMesh[ sm->GetId() ] = SMESH::SMESH_subMesh::_duplicate(sm);
+      if ( !sm->_is_nil() )
+        mapOfSubMesh[ sm->GetId() ] = SMESH::SMESH_subMesh::_duplicate(sm);
     }
   }
 
index a899d3b22b1d3fbc07b663d456bb3370073729f3..6b4940ed1960c1cfbbc2cc45dbbc05413302d143 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3d6501053fe8076406687f946fab9e8e9c71211f..46bf3ef55f73d3773143e785055c307d01a84b01 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -119,13 +119,13 @@ SMESHGUI_MeshPatternDlg::SMESHGUI_MeshPatternDlg( SMESHGUI* theModule )
   aDlgLay->setMargin( MARGIN );
   aDlgLay->setSpacing( SPACING );
 
-  QWidget* aMainFrame = createMainFrame  ( this );
+  myMainFrame = createMainFrame  ( this );
   QWidget* aBtnFrame  = createButtonFrame( this );
 
-  aDlgLay->addWidget( aMainFrame );
+  aDlgLay->addWidget( myMainFrame );
   aDlgLay->addWidget( aBtnFrame );
 
-  aDlgLay->setStretchFactor( aMainFrame, 1 );
+  aDlgLay->setStretchFactor( myMainFrame, 1 );
 
   mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
 
@@ -1201,11 +1201,16 @@ void SMESHGUI_MeshPatternDlg::onTypeChanged (int theType)
     myNode2Lbl->show();
     myNode2   ->show();
   }
-
   mySelInput = Mesh;
   activateSelection();
   updateWgState();
   displayPreview();
+  myPicture2d->hide();
+  myPicture2d->show();
+  myPicture2d->resize(minimumSizeHint());
+  myMainFrame->hide();
+  myMainFrame->show();
+  resize(minimumSizeHint());
 }
 
 //=======================================================================
@@ -1331,8 +1336,10 @@ void SMESHGUI_MeshPatternDlg::onModeToggled (bool on)
 {
   on ? myRefineGrp->show() : myRefineGrp->hide();
   on ? myGeomGrp->hide()   : myGeomGrp->show();
-
+  myMainFrame->hide();
+  myMainFrame->show();
   displayPreview();
+  resize(minimumSizeHint());
 }
 
 //=======================================================================
index 0ec8a49d740306e0743222d3e11e50c537ea7bf3..43317618f40971ba28f2585a431c4495963be220 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -141,6 +141,8 @@ private:
   QMap<int, QLineEdit*>               mySelEdit;
   QMap<int, QLabel*>                  mySelLbl;
 
+  QWidget*                            myMainFrame;
+
   QLineEdit*                          myName;
   QPushButton*                        myOpenBtn;
   QPushButton*                        myNewBtn;
index b6036d4de0a2527fa93899410bdef242b9a61bbe..d4e69f5e2dca66c01b3188ceb17e9f4bad445aac 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d0fa41a7ce3cee93b1b988deb493f18158a83619..fcadc44d908ade341bc26cf3a6703c30eeb69c91 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d48e740f5903e8ef301126e4589cd7a20f32b9ce..503de82d7bb741cfb0f69c037a8d6be5d5cef31b 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #include "SMESHGUI_SpinBox.h"
 #include "SMESHGUI_MeshEditPreview.h"
 
-#include <SMESH_Actor.h>
-#include <SMESH_TypeFilter.hxx>
-#include <SMDS_Mesh.hxx>
+#include "SMDS_Mesh.hxx"
+#include "SMDS_MeshNode.hxx"
+#include "SMDS_VolumeTool.hxx"
+#include "SMESH_Actor.h"
+#include "SMESH_MeshAlgos.hxx"
+#include "SMESH_TypeFilter.hxx"
 
 // SALOME GUI includes
 #include <SUIT_Desktop.h>
 #include <VTKViewer_CellLocationsArray.h>
 
 // OCCT includes
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <Bnd_B3d.hxx>
 #include <TColStd_DataMapOfIntegerInteger.hxx>
+#include <TColStd_IndexedMapOfInteger.hxx>
 #include <TColStd_MapIteratorOfMapOfInteger.hxx>
+#include <gp_Ax1.hxx>
 
 // VTK includes
 #include <vtkIdList.h>
 // Purpose : Constructor
 //=======================================================================
 SMESHGUI_MultiEditDlg
-::SMESHGUI_MultiEditDlg(SMESHGUI* theModule,
-                        const int theMode,
-                        const bool the3d2d):
+::SMESHGUI_MultiEditDlg(SMESHGUI*  theModule,
+                        const int  theMode,
+                        const bool the3d2d,
+                        bool       theDoInit):
   SMESHGUI_PreviewDlg(theModule),
   mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
   mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
@@ -128,7 +134,8 @@ SMESHGUI_MultiEditDlg
   aDlgLay->addWidget(aMainFrame);
   aDlgLay->addWidget(aBtnFrame);
 
-  Init();
+  if ( theDoInit )
+    Init();
 }
 
 //=======================================================================
@@ -162,6 +169,7 @@ QWidget* SMESHGUI_MultiEditDlg::createMainFrame (QWidget* theParent, const bool
     QRadioButton* aFaceRb = new QRadioButton(tr("SMESH_FACE"), aEntityTypeGrp);
     QRadioButton* aVolumeRb = new QRadioButton(tr("SMESH_VOLUME"), aEntityTypeGrp);
 
+
     aEntityLayout->addWidget(aFaceRb);
     aEntityLayout->addWidget(aVolumeRb);
 
@@ -226,9 +234,6 @@ QWidget* SMESHGUI_MultiEditDlg::createMainFrame (QWidget* theParent, const bool
   myComboBoxFunctor->addItem(tr("ASPECTRATIO_ELEMENTS"));
   myComboBoxFunctor->addItem(tr("MINIMUMANGLE_ELEMENTS"));
   myComboBoxFunctor->addItem(tr("SKEW_ELEMENTS"));
-  //myComboBoxFunctor->addItem(tr("AREA_ELEMENTS"));
-  //myComboBoxFunctor->addItem(tr("LENGTH2D_EDGES")); // for existing elements only
-  //myComboBoxFunctor->addItem(tr("MULTI2D_BORDERS")); // for existing elements only
   myComboBoxFunctor->setCurrentIndex(0);
 
   aCriterionLayout->addWidget(myChoiceWidget);
@@ -305,7 +310,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() && nbElemsInMesh() > 0)));
 }
 
 //=======================================================================
@@ -1071,6 +1076,11 @@ bool SMESHGUI_ChangeOrientationDlg::process (SMESH::SMESH_MeshEditor_ptr theEdit
     return theEditor->ReorientObject( obj );
 }
 
+int SMESHGUI_ChangeOrientationDlg::nbElemsInMesh()
+{
+  return ( myFilterType = SMESH::FaceFilter ) ? myMesh->NbFaces() : myMesh->NbVolumes();
+}
+
 /*!
  *  Class       : SMESHGUI_UnionOfTrianglesDlg
  *  Description : Construction of quadrangles by automatic association of triangles
@@ -1163,39 +1173,44 @@ bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEdito
     ok = theEditor->TriToQuadObject(obj, aCriterion, aMaxAngle);
   return ok;
 }
+
+int SMESHGUI_UnionOfTrianglesDlg::nbElemsInMesh()
+{
+  return myMesh->NbTriangles();
+}
   
 void SMESHGUI_UnionOfTrianglesDlg::onDisplaySimulation( bool toDisplayPreview )
 {
   if ( myPreviewCheckBox->isChecked() && toDisplayPreview ) {
     if ( isValid( true ) ) {
       try{
-       SUIT_OverrideCursor aWaitCursor;
-       // get Ids of elements
-       SMESH::SMESH_IDSource_var obj;
-       SMESH::long_array_var anElemIds = getIds( obj );
+        SUIT_OverrideCursor aWaitCursor;
+        // get Ids of elements
+        SMESH::SMESH_IDSource_var obj;
+        SMESH::long_array_var anElemIds = getIds( obj );
 
-       SMESH::NumericalFunctor_var aCriterion  = getNumericalFunctor();
-       SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
+        SMESH::NumericalFunctor_var aCriterion  = getNumericalFunctor();
+        SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
 
-       double aMaxAngle = myMaxAngleSpin->GetValue() * M_PI / 180.0;
+        double aMaxAngle = myMaxAngleSpin->GetValue() * M_PI / 180.0;
       
-       if ( CORBA::is_nil( obj ) )
-         aMeshEditor->TriToQuad( anElemIds.inout(), aCriterion, aMaxAngle );
-       else
-         aMeshEditor->TriToQuadObject( obj, aCriterion, aMaxAngle );
+        if ( CORBA::is_nil( obj ) )
+          aMeshEditor->TriToQuad( anElemIds.inout(), aCriterion, aMaxAngle );
+        else
+          aMeshEditor->TriToQuadObject( obj, aCriterion, aMaxAngle );
       
-       SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData();
+        SMESH::MeshPreviewStruct_var aMeshPreviewStruct = aMeshEditor->GetPreviewData();
 
-       vtkProperty* aProp = vtkProperty::New();
-       aProp->SetRepresentationToWireframe();
-       aProp->SetColor( 250, 0, 250 );
-       aProp->SetLineWidth( SMESH::GetFloat( "SMESH:element_width", 1 ) + 3 );
-       mySimulation->GetActor()->SetProperty( aProp );
-       aProp->Delete();
+        vtkProperty* aProp = vtkProperty::New();
+        aProp->SetRepresentationToWireframe();
+        aProp->SetColor( 250, 0, 250 );
+        aProp->SetLineWidth( SMESH::GetFloat( "SMESH:element_width", 1 ) + 3 );
+        mySimulation->GetActor()->SetProperty( aProp );
+        aProp->Delete();
 
-       mySimulation->SetData( aMeshPreviewStruct._retn() );
+        mySimulation->SetData( aMeshPreviewStruct._retn() );
       } catch ( ... ) {
-       hidePreview();
+        hidePreview();
       }
     } else {
       hidePreview();
@@ -1279,6 +1294,12 @@ bool SMESHGUI_CuttingOfQuadsDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
   return hasObj ? theEditor->QuadToTriObject(obj, aCrit) : theEditor->QuadToTri(theIds, aCrit);
 }
 
+int SMESHGUI_CuttingOfQuadsDlg::nbElemsInMesh()
+{
+  return myMesh->NbQuadrangles();
+}
+
+
 void SMESHGUI_CuttingOfQuadsDlg::onCriterionRB()
 {
   if (myGroupChoice->checkedId() == 2) // Use numeric functor
@@ -1488,51 +1509,149 @@ void SMESHGUI_CuttingOfQuadsDlg::displayPreview()
 }
 
 /*!
- *  Class       : SMESHGUI_CuttingIntoTetraDlg
- *  Description : Modification of orientation of faces
+ *  Class       : SMESHGUI_SplitVolumesDlg
+ *  Description : Spliter of volumes into tetrahedra or prisms
  */
 
-SMESHGUI_CuttingIntoTetraDlg::SMESHGUI_CuttingIntoTetraDlg(SMESHGUI* theModule)
-  : SMESHGUI_MultiEditDlg(theModule, SMESH::VolumeFilter, false)
+SMESHGUI_SplitVolumesDlg::SMESHGUI_SplitVolumesDlg(SMESHGUI* theModule)
+  : SMESHGUI_MultiEditDlg(theModule, SMESH::VolumeFilter, /*the3d2d=*/true, /*doInit=*/false)
 {
   setWindowTitle(tr("CAPTION"));
   myHelpFileName = "split_to_tetra_page.html";
   myEntityType = 1;
+  myCellSize = -1.;
+
+  // Facet selection group
+
+  myFacetSelGrp = new QGroupBox(tr("FACET_TO_SPLIT"), myCriterionGrp->parentWidget());
+  QGridLayout* facetSelLayout = new QGridLayout( myFacetSelGrp );
+  facetSelLayout->setMargin(MARGIN);
+  facetSelLayout->setSpacing(SPACING);
+
+  QLabel* pointLbl = new QLabel( tr("START_POINT"), myFacetSelGrp);
+  QLabel* normalLbl = new QLabel( tr("FACET_NORMAL"), myFacetSelGrp);
+  myFacetSelBtn = new QPushButton( mySubmeshBtn->icon(), "", myFacetSelGrp );
+  myFacetSelBtn->setCheckable( true );
+  QLabel* XLbl = new QLabel( tr("SMESH_X"), myFacetSelGrp);
+  QLabel* YLbl = new QLabel( tr("SMESH_Y"), myFacetSelGrp);
+  QLabel* ZLbl = new QLabel( tr("SMESH_Z"), myFacetSelGrp);
+  QLabel* dXLbl = new QLabel( tr("SMESH_DX"), myFacetSelGrp);
+  QLabel* dYLbl = new QLabel( tr("SMESH_DY"), myFacetSelGrp);
+  QLabel* dZLbl = new QLabel( tr("SMESH_DZ"), myFacetSelGrp);
+  QPushButton* axisBtn[3];
+  for ( int i = 0; i < 3; ++i )
+  {
+    myPointSpin[i] = new SMESHGUI_SpinBox( myFacetSelGrp );
+    myDirSpin  [i] = new SMESHGUI_SpinBox( myFacetSelGrp );
+    myPointSpin[i]->RangeStepAndValidator( -1e10, 1e10, 10 );
+    myDirSpin  [i]->RangeStepAndValidator( -1., 1., 0.1 );
+    myPointSpin[i]->SetValue(0.);
+    myDirSpin  [i]->SetValue(0.);
+    myAxisBtn  [i] = new QPushButton( QString("|| O") + char('X'+i ), myFacetSelGrp);
+  }
+  myDirSpin[2]->SetValue(1.);
+
+  myAllDomainsChk = new QCheckBox( tr("ALL_DOMAINS"), mySelGrp );
+
+  facetSelLayout->addWidget( pointLbl,      0, 0 );
+  facetSelLayout->addWidget( myFacetSelBtn, 0, 1 );
+  facetSelLayout->addWidget( XLbl,          0, 2 );
+  facetSelLayout->addWidget( myPointSpin[0],0, 3 );
+  facetSelLayout->addWidget( YLbl,          0, 4 );
+  facetSelLayout->addWidget( myPointSpin[1],0, 5 );
+  facetSelLayout->addWidget( ZLbl,          0, 6 );
+  facetSelLayout->addWidget( myPointSpin[2],0, 7 );
+
+  facetSelLayout->addWidget( normalLbl,     1, 0 );
+  facetSelLayout->addWidget( dXLbl,         1, 2 );
+  facetSelLayout->addWidget( myDirSpin[0],  1, 3 );
+  facetSelLayout->addWidget( dYLbl,         1, 4 );
+  facetSelLayout->addWidget( myDirSpin[1],  1, 5 );
+  facetSelLayout->addWidget( dZLbl,         1, 6 );
+  facetSelLayout->addWidget( myDirSpin[2],  1, 7 );
+
+  facetSelLayout->addWidget( myAxisBtn[0],  2, 2, 1, 2 );
+  facetSelLayout->addWidget( myAxisBtn[1],  2, 4, 1, 2 );
+  facetSelLayout->addWidget( myAxisBtn[2],  2, 6, 1, 2 );
+
+  myCriterionGrp->layout()->addWidget( myFacetSelGrp );
+  myCriterionGrp->layout()->addWidget( myAllDomainsChk );
+  //myChoiceWidget->layout()->addWidget( myAllDomainsChk );
+
+  connect( myFacetSelBtn,    SIGNAL(clicked(bool)), SLOT(onFacetSelection(bool)) );
+  for ( int i = 0; i < 3; ++i )
+  {
+    connect( myAxisBtn  [i], SIGNAL(clicked()),     SLOT(onSetDir()) );
+    connect( myPointSpin[i], SIGNAL(valueChanged       (const QString&)),
+             this,           SLOT  (updateNormalPreview(const QString&)) );
+    connect( myDirSpin  [i], SIGNAL(valueChanged       (const QString&)),
+             this,           SLOT  (updateNormalPreview(const QString&)) );
+  }
+  if ( myEntityTypeGrp )
+  {
+    myEntityTypeGrp->button(0)->setText( tr("SMESH_TETRAS"));
+    myEntityTypeGrp->button(1)->setText( tr("SMESH_PRISM"));
+    if ( QGroupBox* gb = qobject_cast< QGroupBox* >( myEntityTypeGrp->button(0)->parent() ))
+      gb->setTitle( tr("TARGET_ELEM_TYPE"));
+  }
 
   myToAllChk->setChecked( true ); //aplly to the whole mesh by default
 
   bool hasHexa = true;//myMesh->_is_nil() ? false : myMesh->NbHexas();
-
   if ( hasHexa )
   {
-    myGroupChoice->button(0)->setText( tr("SPLIT_HEX_TO_5_TETRA"));
-    myGroupChoice->button(1)->setText( tr("SPLIT_HEX_TO_6_TETRA"));
-    myGroupChoice->button(2)->setText( tr("SPLIT_HEX_TO_24_TETRA"));
-
     myCriterionGrp->setTitle( tr("SPLIT_METHOD"));
     myCriterionGrp->show();
     myComboBoxFunctor->hide();
     myChoiceWidget->show();
   }
-  setSelectionMode();
-  updateButtons();
+
+  on3d2dChanged( 0 );
+  Init();
 }
 
-SMESHGUI_CuttingIntoTetraDlg::~SMESHGUI_CuttingIntoTetraDlg()
+SMESHGUI_SplitVolumesDlg::~SMESHGUI_SplitVolumesDlg()
 {
 }
 
-bool SMESHGUI_CuttingIntoTetraDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
-                                            const SMESH::long_array&    theIds,
-                                            SMESH::SMESH_IDSource_ptr   theObj)
+bool SMESHGUI_SplitVolumesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
+                                        const SMESH::long_array&    theIds,
+                                        SMESH::SMESH_IDSource_ptr   theObj)
 {
   SMESH::SMESH_IDSource_wrap obj = theObj;
   if ( CORBA::is_nil( obj ))
-    obj = theEditor->MakeIDSource( theIds, myEntityType ? SMESH::VOLUME : SMESH::FACE );
+    obj = theEditor->MakeIDSource( theIds, SMESH::VOLUME );
   else
     obj->Register();
   try {
-    theEditor->SplitVolumesIntoTetra( obj, myGroupChoice->checkedId()+1 );
+    if ( isIntoPrisms() )
+    {
+      QStringList aParameters;
+      aParameters << myPointSpin[0]->text();
+      aParameters << myPointSpin[1]->text();
+      aParameters << myPointSpin[2]->text();
+      aParameters << myDirSpin[0]->text();
+      aParameters << myDirSpin[1]->text();
+      aParameters << myDirSpin[2]->text();
+      myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+
+      SMESH::PointStruct_var point = new SMESH::PointStruct;
+      point->x  = myPointSpin[0]->GetValue();
+      point->y  = myPointSpin[1]->GetValue();
+      point->z  = myPointSpin[2]->GetValue();
+      SMESH::DirStruct_var norm = new SMESH::DirStruct;
+      norm->PS.x = myDirSpin[0]->GetValue();
+      norm->PS.y = myDirSpin[1]->GetValue();
+      norm->PS.z = myDirSpin[2]->GetValue();
+
+      theEditor->SplitHexahedraIntoPrisms( obj, point, norm,
+                                           myGroupChoice->checkedId()+1,
+                                           myAllDomainsChk->isChecked() );
+    }
+    else
+    {
+      theEditor->SplitVolumesIntoTetra( obj, myGroupChoice->checkedId()+1 );
+    }
   }
   catch ( const SALOME::SALOME_Exception& S_ex ) {
     SalomeApp_Tools::QtCatchCorbaException( S_ex );
@@ -1543,3 +1662,314 @@ bool SMESHGUI_CuttingIntoTetraDlg::process (SMESH::SMESH_MeshEditor_ptr theEdito
   }
   return true;
 }
+
+int SMESHGUI_SplitVolumesDlg::nbElemsInMesh()
+{
+  return isIntoPrisms() ? myMesh->NbHexas() : myMesh->NbVolumes() - myMesh->NbTetras();
+}
+
+bool SMESHGUI_SplitVolumesDlg::isIntoPrisms()
+{
+  return ( myEntityTypeGrp->checkedId() == 1 );
+}
+
+//================================================================================
+/*!
+ * \brief Slot called when a target element type changes
+ */
+//================================================================================
+
+void SMESHGUI_SplitVolumesDlg::on3d2dChanged(int isPrism)
+{
+  if ( isPrism )
+  {
+    myFacetSelGrp->show();
+    myAllDomainsChk->show();
+    myGroupChoice->button(2)->hide();
+    myGroupChoice->button(0)->setText( tr("SPLIT_HEX_TO_2_PRISMS"));
+    myGroupChoice->button(1)->setText( tr("SPLIT_HEX_TO_4_PRISMS"));
+  }
+  else
+  {
+    myFacetSelGrp->hide();
+    myAllDomainsChk->hide();
+    myGroupChoice->button(2)->show();
+    myGroupChoice->button(0)->setText( tr("SPLIT_HEX_TO_5_TETRA"));
+    myGroupChoice->button(1)->setText( tr("SPLIT_HEX_TO_6_TETRA"));
+    myGroupChoice->button(2)->setText( tr("SPLIT_HEX_TO_24_TETRA"));
+  }
+  SMESHGUI_MultiEditDlg::on3d2dChanged( !myEntityType );
+  myEntityType = 1; // == VOLUME
+  myChoiceWidget->hide();
+  myChoiceWidget->show();
+  resize(minimumSizeHint());
+  onSelectionDone();
+}
+
+//================================================================================
+/*!
+ * \brief Set selection mode
+ */
+//================================================================================
+
+void SMESHGUI_SplitVolumesDlg::setSelectionMode()
+{
+  if ( myBusy || !isEnabled() ) return;
+
+  SMESH::RemoveFilters();
+
+  mySelectionMgr->clearFilters();
+
+  if (mySubmeshChk->isChecked()) {
+    if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+      aViewWindow->SetSelectionMode(ActorSelection);
+    mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::SUBMESH));
+    myFacetSelBtn->setChecked( false );
+  }
+  else if (myGroupChk->isChecked()) {
+    if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+      aViewWindow->SetSelectionMode(ActorSelection);
+    mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::GROUP));
+    myFacetSelBtn->setChecked( false );
+  }
+
+  if ( myFacetSelBtn->isChecked() )
+  {
+    // facet selection - select any element
+    if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+      aViewWindow->SetSelectionMode( CellSelection );
+    myFilterType = SMESH::AllElementsFilter;
+  }
+  else
+  {
+    if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+      aViewWindow->SetSelectionMode( VolumeSelection );
+    if ( isIntoPrisms() )
+    {
+      SMESH::SetFilter(new SMESHGUI_VolumeShapeFilter( SMDSGeom_HEXA ));
+      myFilterType = SMESHGUI_VolumeShapeFilter::GetId( SMDSGeom_HEXA );
+    }
+    else // to tetrahedra
+    {
+      SMESH::SetFilter(new SMESHGUI_VolumesFilter());
+      myFilterType = SMESH::VolumeFilter;
+    }
+  }
+}
+
+//================================================================================
+/*!
+ * \brief SLOT called when selection changed
+ */
+//================================================================================
+
+void SMESHGUI_SplitVolumesDlg::onSelectionDone()
+{
+  if (myBusy || !isEnabled()) return;
+
+  if ( !myFacetSelBtn->isChecked() )
+  {
+    SMESHGUI_MultiEditDlg::onSelectionDone();
+  }
+  else // set point and normal by a selected element
+  {
+    const SALOME_ListIO& aList = mySelector->StoredIObjects();
+    int nbSel = aList.Extent();
+    if (nbSel > 0)
+    {
+      Handle(SALOME_InteractiveObject) anIO = aList.First();
+
+      myActor = SMESH::FindActorByEntry( anIO->getEntry() );
+
+      SMESH::SMESH_Mesh_var aSelMesh = SMESH::GetMeshByIO(anIO);
+      if (!aSelMesh->_is_nil())
+        myMesh = aSelMesh;
+
+      TColStd_IndexedMapOfInteger aMapIndex;
+      mySelector->GetIndex( anIO, aMapIndex );
+      if ( !aMapIndex.IsEmpty() )
+        showFacetByElement( aMapIndex(1) );
+      else if ( myCellSize < 0 )
+        showFacetByElement( 1 );
+    }
+    updateButtons();
+  }
+
+  myCriterionGrp->setEnabled( !myMesh->_is_nil() && nbElemsInMesh() > 0 );
+}
+
+//================================================================================
+/*!
+ * \brief Show facet normal by a selected element
+ */
+//================================================================================
+
+void SMESHGUI_SplitVolumesDlg::showFacetByElement( int elemID )
+{
+  if ( !isIntoPrisms() || !myActor )
+  {
+    mySimulation->SetVisibility( false );
+    return;
+  }
+  SMDS_Mesh*              mesh = myActor->GetObject()->GetMesh();
+  const SMDS_MeshElement* elem = mesh->FindElement( elemID );
+  if ( !elem ) return;
+
+  // set point XYZ by the element barycenter
+  gp_XYZ bc( 0,0,0 );
+  Bnd_B3d bbox;
+  SMDS_NodeIteratorPtr nIt = elem->nodeIterator();
+  vector< const SMDS_MeshNode* > nodes;
+  nodes.reserve( elem->NbNodes() );
+  while ( nIt->more() )
+  {
+    nodes.push_back( nIt->next() );
+    gp_XYZ p = SMESH_TNodeXYZ( nodes.back() );
+    bc += p;
+    bbox.Add( p );
+  }
+  bc /= nodes.size();
+
+  myPointSpin[0]->SetValue( bc.X() );
+  myPointSpin[1]->SetValue( bc.Y() );
+  myPointSpin[2]->SetValue( bc.Z() );
+
+  // set size
+  myCellSize = sqrt( bbox.SquareExtent() );
+
+  // set normal and size
+  gp_XYZ norm;
+  switch ( elem->GetType())
+  {
+  case SMDSAbs_Edge:
+  {
+    norm = SMESH_TNodeXYZ( nodes[1] ) - SMESH_TNodeXYZ( nodes[0] );
+    break;
+  }
+  case SMDSAbs_Face:
+  {
+    if ( !SMESH_MeshAlgos::FaceNormal( elem, norm, /*normalized=*/false ))
+      return;
+    break;
+  }
+  case SMDSAbs_Volume:
+  {
+    SMDS_VolumeTool vTool( elem );
+    vTool.SetExternalNormal();
+    bool freeFacetFound = false;
+    double n[3];
+    for ( int i = 0; i < vTool.NbFaces() && !freeFacetFound; ++i )
+      if (( freeFacetFound = vTool.IsFreeFace( i )))
+        vTool.GetFaceNormal( i, n[0], n[1], n[2] );
+    if ( !freeFacetFound )
+      vTool.GetFaceNormal( 0, n[0], n[1], n[2] );
+    norm.SetCoord( n[0], n[1], n[2] );
+    break;
+  }
+  default: return;
+  }
+
+  double size = norm.Modulus();
+  if ( size < 1e-20 )
+    return;
+  norm /= size;
+
+  myDirSpin[0]->SetValue( norm.X() );
+  myDirSpin[1]->SetValue( norm.Y() );
+  myDirSpin[2]->SetValue( norm.Z() );
+
+  if ( myCellSize > 0. )
+    updateNormalPreview();
+}
+
+//================================================================================
+/*!
+ * \brief SLOT called when a point or a normal changes
+ */
+//================================================================================
+
+void SMESHGUI_SplitVolumesDlg::updateNormalPreview(const QString&)
+{
+  if ( myCellSize < 0. )
+  {
+    showFacetByElement( 1 );
+    return;
+  }
+
+  gp_Pnt point ( myPointSpin[0]->GetValue(),
+                 myPointSpin[1]->GetValue(),
+                 myPointSpin[2]->GetValue() );
+  gp_XYZ norm  ( myDirSpin[0]->GetValue(),
+                 myDirSpin[1]->GetValue(),
+                 myDirSpin[2]->GetValue() );
+  if ( norm.Modulus() < 1e-20 )
+    return;
+
+  vtkUnstructuredGrid* grid = mySimulation->GetGrid();
+
+  // Initialize the preview mesh of an arrow
+  if ( grid->GetNumberOfPoints() == 0 )
+  {
+    mySimulation->SetArrowShapeAndNb( /*nb=*/1, /*hLen=*/0.3, /*R=*/0.1, /*start=*/0 );
+  }
+
+  // Compute new coordinates of the grid according to the dialog controls
+
+  gp_Ax1 axis( point, norm );
+  mySimulation->SetArrows( &axis, 4 * myCellSize );
+  mySimulation->SetVisibility(true);
+}
+
+//================================================================================
+/*!
+ * \brief Slot called when facet selection button is clicked
+ */
+//================================================================================
+
+void SMESHGUI_SplitVolumesDlg::onFacetSelection(bool isFacetSelection)
+{
+  setSelectionMode();
+  onSelectionDone();
+  mySelGrp->setEnabled( !isFacetSelection );
+}
+
+//================================================================================
+/*!
+ * \brief Slot called when an || axis button is clicked
+ */
+//================================================================================
+
+void SMESHGUI_SplitVolumesDlg::onSetDir()
+{
+  myDirSpin[0]->SetValue(0.);
+  myDirSpin[1]->SetValue(0.);
+  myDirSpin[2]->SetValue(0.);
+  int i = 0;
+  for ( ; i < 3; ++i )
+    if ( sender() == myAxisBtn[i] )
+      break;
+  if ( i == 3 )
+    i == 0;
+  myDirSpin[i]->SetValue(1.);
+
+  if ( myActor && !myMesh->_is_nil() && myMesh->NbNodes() > 0 )
+  {
+    double b[6];
+    myActor->GetUnstructuredGrid()->GetBounds(b);
+    gp_XYZ center( 0.5 * ( b[0] + b[1] ),
+                   0.5 * ( b[2] + b[3] ),
+                   0.5 * ( b[4] + b[5] ));
+    gp_XYZ point ( myPointSpin[0]->GetValue(),
+                   myPointSpin[1]->GetValue(),
+                   myPointSpin[2]->GetValue() );
+    gp_XYZ norm  ( myDirSpin[0]->GetValue(),
+                   myDirSpin[1]->GetValue(),
+                   myDirSpin[2]->GetValue() );
+
+    gp_Vec cp( center, point );
+    if ( cp.Dot( norm ) < 0. )
+      myDirSpin[i]->SetValue(-1.);
+  }
+
+  updateNormalPreview();
+}
index 68847772b6536db491a7644e1cd35313e74bb0af..a8a0d0a62dbbdcbb7ee24c3d6fe0033e1cc01f32 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -70,7 +70,10 @@ class SMESHGUI_EXPORT SMESHGUI_MultiEditDlg : public SMESHGUI_PreviewDlg
   Q_OBJECT
 
 public:
-  SMESHGUI_MultiEditDlg( SMESHGUI*, const int, const bool = false );
+  SMESHGUI_MultiEditDlg( SMESHGUI*  theModule,
+                         const int  theMode,
+                         const bool the3d2d = false,
+                         bool       theDoInit = true );
   virtual ~SMESHGUI_MultiEditDlg();
 
   void                      Init();
@@ -87,7 +90,7 @@ protected slots:
   void                      onHelp();
 
   void                      onDeactivate();
-  void                      onSelectionDone();
+  virtual void              onSelectionDone();
 
   void                      onFilterBtn();
   void                      onAddBtn();
@@ -98,7 +101,7 @@ protected slots:
   void                      onGroupChk();
   virtual void              onToAllChk();
   void                      onFilterAccepted();
-  void                      on3d2dChanged(int);
+  virtual void              on3d2dChanged(int);
 
   SMESH::NumericalFunctor_ptr getNumericalFunctor();
 
@@ -110,11 +113,12 @@ protected:
   virtual bool              isValid( const bool );
   SMESH::long_array_var     getIds(SMESH::SMESH_IDSource_var& obj);
   void                      updateButtons();
-  void                      setSelectionMode();
+  virtual void              setSelectionMode();
   virtual bool              isIdValid( const int ) const;
   virtual bool              process( SMESH::SMESH_MeshEditor_ptr, 
                                      const SMESH::long_array& ,
                                      SMESH::SMESH_IDSource_ptr obj) = 0;
+  virtual int               nbElemsInMesh() = 0;
   int                       entityType();
 
 protected:
@@ -178,6 +182,7 @@ protected:
   virtual bool process( SMESH::SMESH_MeshEditor_ptr,
                         const SMESH::long_array& ,
                         SMESH::SMESH_IDSource_ptr obj);
+  virtual int  nbElemsInMesh();
 };
 
 /*!
@@ -197,6 +202,7 @@ protected:
   virtual bool      process( SMESH::SMESH_MeshEditor_ptr,
                              const SMESH::long_array&,
                              SMESH::SMESH_IDSource_ptr obj );
+  virtual int       nbElemsInMesh();
 
 protected slots:
    virtual void     onDisplaySimulation( bool );
@@ -221,6 +227,7 @@ protected:
   virtual bool  process( SMESH::SMESH_MeshEditor_ptr,
                          const SMESH::long_array& ,
                          SMESH::SMESH_IDSource_ptr obj);
+  virtual int   nbElemsInMesh();
 
 protected slots:
   virtual void  reject();
@@ -237,21 +244,45 @@ private:
 };
 
 /*!
- * Class       : SMESHGUI_CuttingIntoTetraDlg
+ * Class       : SMESHGUI_SplitVolumesDlg
  * Description : Split all volumes into tetrahedrons
  */
-class  SMESHGUI_CuttingIntoTetraDlg : public SMESHGUI_MultiEditDlg
+class  SMESHGUI_SplitVolumesDlg : public SMESHGUI_MultiEditDlg
 {
   Q_OBJECT
 
 public:
-  SMESHGUI_CuttingIntoTetraDlg( SMESHGUI* );
-  virtual ~SMESHGUI_CuttingIntoTetraDlg();
+  SMESHGUI_SplitVolumesDlg( SMESHGUI* );
+  virtual ~SMESHGUI_SplitVolumesDlg();
+
+protected slots:
+
+  virtual void on3d2dChanged(int);
+  virtual void onSelectionDone();
+
+  void         onFacetSelection(bool);
+  void         onSetDir();
+  void         updateNormalPreview(const QString& s="");
 
 protected:
+
   virtual bool process( SMESH::SMESH_MeshEditor_ptr,
                         const SMESH::long_array&,
                         SMESH::SMESH_IDSource_ptr obj );
+  virtual int  nbElemsInMesh();
+
+  virtual void setSelectionMode();
+  void         showFacetByElement( int id );
+  bool         isIntoPrisms();
+
+  QGroupBox*        myFacetSelGrp;
+  SMESHGUI_SpinBox* myPointSpin[3];
+  SMESHGUI_SpinBox* myDirSpin  [3];
+  QPushButton*      myFacetSelBtn;
+  QPushButton*      myAxisBtn[3];
+  QCheckBox*        myAllDomainsChk;
+
+  double            myCellSize;
 };
 
 #endif // SMESHGUI_MULTIEDITDLG_H
index 1d52cc0739f8e45999caeac084f467d728ba32e2..6988b3972e3c97b9bb165555edaf78fd811d1a40 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 735a55c3af5965cb0320f5d41ad6ffc5d6766ebd..b5b2faa9ddb4658bc5825d5b50fadce91c4a48bb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 62311db80c84493c59a3fbfde79a7385f4cc59f5..59c4e139d5a1f37ebc5ce05fa2a4a6beebd5b172 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7d49e73568cf5ad56a91982e54ba88d47abc4245..4e5097c93cbb4ddc20be63c2d76b61688f9c5aed 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5996a41bf49606ec8fe0de19d0bc0d6a6865e97b..5b469954ca9a90833c85aecfdbc3870d61f9f1d2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2c6b0e711932b139bf7c2e4df167d7064c2b0858..4d7a821ea1fedcfe8dc982f6f28a9b77799aff54 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index aafdcee7b3b3d2d71ef672d74259daff11fb3fa5..747cd59a82be15a6220fdc5a746fdee67d7cdd88 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -42,7 +42,7 @@ SMESHGUI_PatternWidget::SMESHGUI_PatternWidget( QWidget* parent )
   : QFrame( parent )
 {
   myMinU = myMinV = myMaxU = myMaxV = 0;
-  setMinimumHeight( 150 );
+  //setMinimumHeight( 150 );
 }
 
 //=================================================================================
index ca76c605ef5440973cb0389392f5951c775b3aac..3c2087bffdb46d8c02b4074fab3da87edb02fa17 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 168f9e108176265050864aa1ef863fd949b7953a..4ecb44cabf556f96e7afd618cd9337287e40a070 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9c9fc953999a3a7f8a65244d165bfb395ae375b1..d286d2c411f36ecfc74e260bb50f4a9bc8c76efd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 254e8b0fa37476f3846a6d8a1844472629af4369..3fc6b4776bec1966066417f5e8eb629f443c0583 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5d125c673ed39cf89bec979ef2ae0ebe2d756b09..1b63f92240a5f4edc5b662a19c5094b3d18bc877 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f7444c60d1a3847338df0a69ed11f07033618e9e..400a02532f77e09d797a6bbdb724343d35509910 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -34,6 +34,7 @@
 #include <QtxBiColorTool.h>
 #include <QtxColorButton.h>
 #include <QtxIntSpinBox.h>
+#include <QtxDoubleSpinBox.h>
 #include <VTKViewer_MarkerWidget.h>
 #include <SUIT_Session.h>
 #include <LightApp_Application.h>
@@ -157,6 +158,8 @@ SMESHGUI_PropertiesDlg::SMESHGUI_PropertiesDlg( const VTK::MarkerMap& customMark
   myBallColor = new QtxColorButton( myBallGrp );
   QLabel* ballSizeLab = new QLabel( tr( "SIZE" ), myBallGrp );
   myBallSize = new QtxIntSpinBox( myBallGrp );
+  QLabel* ballScaleLab = new QLabel( tr( "SCALE_FACTOR" ), myBallGrp );
+  myBallScale = new QtxDoubleSpinBox( 1e-2, 1e7, 0.5, myBallGrp );
   hl = new QHBoxLayout( myBallGrp );
   hl->setMargin( MARGIN );
   hl->setSpacing( SPACING );
@@ -164,6 +167,8 @@ SMESHGUI_PropertiesDlg::SMESHGUI_PropertiesDlg( const VTK::MarkerMap& customMark
   hl->addWidget( myBallColor );
   hl->addWidget( ballSizeLab );
   hl->addWidget( myBallSize );
+  hl->addWidget( ballScaleLab );
+  hl->addWidget( myBallScale );
   widthLab1 = qMax( widthLab1, ballColorLab->minimumSizeHint().width() );
   widthLab2 = qMax( widthLab2, ballSizeLab->minimumSizeHint().width() );
   
@@ -171,7 +176,7 @@ SMESHGUI_PropertiesDlg::SMESHGUI_PropertiesDlg( const VTK::MarkerMap& customMark
   myOrientationGrp = new QGroupBox( tr( "ORIENTATIONS" ), mainFrame() );
   QLabel* orientationColorLab = new QLabel( tr( "COLOR" ), myOrientationGrp );
   myOrientationColor = new QtxColorButton( myOrientationGrp );
-  QLabel* orientationScaleLab = new QLabel( tr( "ORIENTATION_SCALE" ), myOrientationGrp );
+  QLabel* orientationScaleLab = new QLabel( tr( "SCALE_FACTOR" ), myOrientationGrp );
   myOrientationSize = new QtxIntSpinBox( myOrientationGrp );
   myOrientationSize->setSuffix( "% ");
   myOrientation3d = new QCheckBox( tr("ORIENTATION_3D"), myOrientationGrp );
@@ -236,6 +241,7 @@ SMESHGUI_PropertiesDlg::SMESHGUI_PropertiesDlg( const VTK::MarkerMap& customMark
   myOutlineWidth->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
   myElem0dSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
   myBallSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+  myBallScale->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
   myOrientationSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
   myShrinkSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
 
@@ -530,6 +536,24 @@ int SMESHGUI_PropertiesDlg::ballSize() const
   return myBallSize->value();
 }
 
+/*!
+  \brief Set discrete elements (balls) scale factor
+  \param size discrete elements (balls) scale factor
+*/
+void SMESHGUI_PropertiesDlg::setBallScale( double size )
+{
+  myBallScale->setValue( size );
+}
+
+/*!
+  \brief Get discrete elements (balls) scale factor
+  \return current discrete elements (balls) scale factor
+*/
+double SMESHGUI_PropertiesDlg::ballScale() const
+{
+  return myBallScale->value();
+}
+
 /*!
   \brief Set orientation vectors color
   \param color orientation vectors color
index 390b5a12656dee541baebff86837a4892a22574b..5ec3ce6200065554c3d89e53dd4ebe5c40106223 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -38,6 +38,7 @@ class QGroupBox;
 class QtxColorButton;
 class QtxBiColorTool;
 class QtxIntSpinBox;
+class QtxDoubleSpinBox;
 class VTKViewer_MarkerWidget;
 
 class SMESHGUI_EXPORT SMESHGUI_PropertiesDlg : public SMESHGUI_Dialog
@@ -83,6 +84,8 @@ public:
   QColor            ballColor() const;
   void              setBallSize( int );
   int               ballSize() const;
+  void              setBallScale( double );
+  double            ballScale() const;
 
   void              setOrientationColor( const QColor& );
   QColor            orientationColor() const;
@@ -132,6 +135,7 @@ private:
   // - balls
   QtxColorButton*         myBallColor;
   QtxIntSpinBox*          myBallSize;
+  QtxDoubleSpinBox*       myBallScale;
   // - orientation vectors
   QtxColorButton*         myOrientationColor;
   QtxIntSpinBox*          myOrientationSize;
index 2b7fbbdc454e23a88badb0563ce5edede0f7703c..9654bc166922a4f5fe618ecf2b5018eb76c12b7a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b8df30aebcd41eefedd09150fdd6fbe3d7f9af7d..b4872622310c4e12b5df6502a244aa30a7232864 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index bfcd05733b11efcb2018d3a93bcdd045c489019a..5780ce55ac1a7e89d9dd60fda1743555e1a5f693 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -364,7 +364,7 @@ void SMESHGUI_RemoveNodesDlg::SelectionIntoArgument()
 
   // get selected mesh
   SALOME_ListIO aList;
-  mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
+  mySelectionMgr->selectedObjects(aList);
 
   int nbSel = aList.Extent();
   if (nbSel == 1) {
index c327e300a77d10c7815a8cea506584d02446acf3..0ffc235ace83cd13e4586bdb90d6575bd97a9bd4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 00633ebccd953620dfb072ae795e1be111dbf254..0c70bfdbbea70a49111519ffce67878b1cdc2517 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index dc0f518ed9e40972ab41a6cde9108a55d002a6f1..26ae2b311e8186e8b26aacff2a0035da6822aae5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e32551bb18734caf03646faada64bd609709f19c..aee6f62d77c8ef99c6099ed1e93123038fbdc893 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 6d03a5770374cc514888a00278936a74e347b50e..400850b89a176b4218f259aa2143d12210c7df74 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a70f3e02c0ab8826cec1bd32080552b3472b4b6c..6e5ccb913b39dcda6f835c7685952f1401cb4a6e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -712,8 +712,8 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument()
     return;
 
   // get selected mesh
-  const SALOME_ListIO& aList = mySelector->StoredIObjects();
-
+  SALOME_ListIO aList;
+  mySelectionMgr->selectedObjects(aList);
   int nbSel = aList.Extent();
   if (nbSel != 1) 
     return;
index 4dffd6429534d4ab4a00af40e3c5310e8e76a9eb..811f65132d8bbda4fc5d326b3d3ebebafc87bc44 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 18aabb74cd3a30580050eed98ec2da2214205b96..936a228c1d60691a4373ea112e7d184a1b1c9861 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -664,7 +664,7 @@ void SMESHGUI_RotationDlg::SelectionIntoArgument()
 
   // get selected mesh
   SALOME_ListIO aList;
-  mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
+  mySelectionMgr->selectedObjects(aList);
 
   int nbSel = aList.Extent();
   if (nbSel < 1)
index 97131cb5752214e4304f03fd579f50e9010a685c..3f2c1b9ce7273549f1e9cdc88f46d1e44f8dc177 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 09a941be6be6ea6b9609f6e38bbd3bc08b1654bc..9da433c69e549de8b2fd66354087949690232bed 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -425,6 +425,8 @@ void SMESHGUI_ScaleDlg::ConstructorsClicked (int constructorId)
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
 
   QApplication::instance()->processEvents();
+  myEditCurrentArgument->hide();
+  myEditCurrentArgument->show();
   updateGeometry();
   resize(100,100);
 }
@@ -704,7 +706,7 @@ void SMESHGUI_ScaleDlg::SelectionIntoArgument()
 
   // get selected mesh
   SALOME_ListIO aList;
-  mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
+  mySelectionMgr->selectedObjects(aList);
 
   int nbSel = aList.Extent();
   if (nbSel < 1)
index aee598be9fc3496e48c586a8bd0dcc00ba3b321a..378b17af0f5b092819bf4cf5ba481872cbdddcc4 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ea8bf0317c19b3830abdec24ee16db29ec52e6a9..80ca0346658b215125ed614f352ff6779bbe1d81 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5f2a50bdb7f0d94860e0920f730f89ef39606e4d..0a9d46ccc57805001321ad98643dfb61aca66a34 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ce349a055b67c6833ce83d28e6694e2c6e38d076..0c8486ed2e944befe69846068b34557bf40ff4a7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -318,7 +318,9 @@ int SMESHGUI_SelectionOp::typeById( const QString& str, const EntityType objtype
           GEOM::GEOM_Object_var obj = GEOM::GEOM_Object::_narrow(
             dynamic_cast<SALOMEDS_SObject*>( sobj.get() )->GetObject() );
           if( !CORBA::is_nil( obj ) )
-            res = SMESHGUI_Dialog::prefix( "GEOM" ) + obj->GetType();
+            // as decoding of type id is not realized in LightApp_Dialog,
+            //make all GEOM objects have same type id
+            res = SMESHGUI_Dialog::prefix( "GEOM" );// + obj->GetType();
         }
       }
       else
index 82070355c6ae3be6c808a5ad4cd731373d11c166..c8080f9ae3057bfded5227a6e01fedf298495c1b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 94e008506572aa7767d2fb2da34192d4bfb9aea8..6bb73e2dd149ba914d5187d05010f232c81fcdf8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -726,7 +726,7 @@ void SMESHGUI_SewingDlg::SelectionIntoArgument (bool isSelectionChanged)
 
   // get selected mesh
   SALOME_ListIO aList;
-  mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
+  mySelectionMgr->selectedObjects(aList);
 
   int nbSel = aList.Extent();
   if (nbSel != 1)
index e34ad4a46efc7aef9ac969584f46ca5c79ba13d8..7ba8a45c484fa54e5c6f730ec31a2016a93f5ca0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index fbd51ae0b3f1ce3b75cfdd870c308d5b9bd77350..9c63004b331ffc0b9ded4916c9a3bd6b2b1e5022 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -420,7 +420,7 @@ void SMESHGUI_ShapeByMeshOp::onSelectionDone()
 
   try {
     SALOME_ListIO aList;
-    selectionMgr()->selectedObjects(aList, SVTK_Viewer::Type());
+    selectionMgr()->selectedObjects(aList);
     if (!myIsMultipleAllowed && aList.Extent() != 1)
       return;
 
index fc73862728b2e54e921f8435c203253c9b3346d7..4b6abe4f46f685bb0a2fce0b9b5ebec600ba90c1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8059552fe5d1b6808061459f136aaecdd659d7df..df03f4559971db547b29401de65a83c1bfe7dd64 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d652d3a13030ca234b1a13f03f16c9e5ea9e0598..9e5261746f662ad4aabdc6c8e7d1d3215305eba3 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a3ad8b3117482ebded7b23edd0e2a029c02fb16c..7e1d8d0518e25e811f203d7e1b94cb8f7d709b85 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -565,7 +565,7 @@ void SMESHGUI_SmoothingDlg::SelectionIntoArgument()
 
   // get selected mesh
   SALOME_ListIO aList;
-  mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
+  mySelectionMgr->selectedObjects(aList);
   int nbSel = aList.Extent();
   if (nbSel != 1)
     return;
index 13d022622a9fbcb67fdacea7d0f35d03640da440..792134d3833bc303fa810ac0873ad043cea82ba1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d0094a58d7388663bc92f2e787b6a3bfca5344c0..b1817d584585dde86b11f836745315ace1ce1e09 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 6bc244e64c56aabb6012cf1da6609608721d7973..dab3f34ba23584cb036aa0586d227eda0ec9a15f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 869026ab0b8af5a9e718e1152faa4499992ad6a9..c887edf8444acb16874fd3e34bbd720ceab7d714 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -453,6 +453,8 @@ void SMESHGUI_SymmetryDlg::ConstructorsClicked (int constructorId)
   onDisplaySimulation(true);
 
   QApplication::instance()->processEvents();
+  myEditCurrentArgument->hide();
+  myEditCurrentArgument->show();
   updateGeometry();
   resize(100,100);
 }
@@ -722,7 +724,7 @@ void SMESHGUI_SymmetryDlg::SelectionIntoArgument()
 
   // get selected mesh
   SALOME_ListIO aList;
-  mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
+  mySelectionMgr->selectedObjects(aList);
 
   int nbSel = aList.Extent();
   if (nbSel < 1)
index bb7b4ecd30503f5d65f8157ed8fa4a5175aa09a9..efb69b8310080483ecec5361644232c25dfaf39c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3805733db5912da061bd25fe6cce73aab363cfad..e4bf823f8c700252996134fb8f92cf1cc4a82332 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -451,7 +451,8 @@ void SMESHGUI_TranslationDlg::ConstructorsClicked (int constructorId)
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
 
   onDisplaySimulation(true);
-
+  myEditCurrentArgument->hide();
+  myEditCurrentArgument->show();
   QApplication::instance()->processEvents();
   updateGeometry();
   resize(100,100);
@@ -728,7 +729,7 @@ void SMESHGUI_TranslationDlg::SelectionIntoArgument()
 
   // get selected mesh
   SALOME_ListIO aList;
-  mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
+  mySelectionMgr->selectedObjects(aList);
 
   int nbSel = aList.Extent();
   if (nbSel < 1)
index 8b11e0f1ebe8f8ebf5addbc6562791d719d825ee..4ee72ab047f39cc851d3c28670458353924eaad0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 25788102f28db4ed62e6360d980b7778d0c4b3b4..58b52c670dc1e928e7a3563df74898fd09e43b61 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a7ddf88fbe9a577d63a74e5f7601cab8ded22b05..91f13fc4161c1f9cbca9cfbdd147ce87780a3b3b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 563e740ad034587a7d724424ebf2c1996a32dbf4..d539ac8a076aa8ef61c8ad14c94e343fb03f25e3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 49a98c2d2952f657619b99d83f289921dfb8c6f6..2cf9eaac2896dabd7d51b2b33f3dfeb360afb6c2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4a72abca58cbc361903add17cdef0ef78606bb1c..6b67d5e9cc8cb3ffb6a1d399c1b562bee2dc679f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c45edf22f37649f66d19b7710a1eb0e38d4dbde0..4fe56eef73bff4122f0ef9fb21dc826713d74e89 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d2c18706b6173960453b749163fa9a8b3cf97600..b5c53d4b56d516d504ce42e5cc76efb463e07324 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -69,8 +69,8 @@ bool SMESHGUI_XmlHandler::startDocument()
 
   Reimplemented from QXmlDefaultHandler.
 */
-bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&, 
-                                        const QString& qName, 
+bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
+                                        const QString& qName,
                                         const QXmlAttributes& atts)
 {
   if (qName == "meshers")
@@ -80,22 +80,22 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
   }
   else if (qName == "meshers-group") // group of hypotheses and algorithms
   {
-//    if (atts.value("server-lib") != "")
+    //    if (atts.value("server-lib") != "")
     {
       myPluginName = atts.value("name");
       myServerLib  = atts.value("server-lib");
       myClientLib  = atts.value("gui-lib");
-/* It's Need to tranlate lib name for WIN32 or X platform
- * (only client lib, because server lib translates in SMESH_Gen_i::createHypothesis
- *  for normal work of *.py files )
- */
+      /* It's Need to tranlate lib name for WIN32 or X platform
      * (only client lib, because server lib translates in SMESH_Gen_i::createHypothesis
      *  for normal work of *.py files )
      */
       if( !myClientLib.isEmpty() )
       {
 #ifdef WIN32
-      //myServerLib += ".dll";
+        //myServerLib += ".dll";
         myClientLib += ".dll";
 #else
-      //myServerLib = "lib" + myServerLib + ".so";
+        //myServerLib = "lib" + myServerLib + ".so";
         myClientLib = "lib" + myClientLib + ".so";
 #endif
       }
@@ -123,9 +123,11 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
     if (atts.value("type") != "")
     {
       QString aHypAlType = atts.value("type");
-      QString aLabel = atts.value("label-id");
-      QString anIcon = atts.value("icon-id");
-      bool isAux = atts.value("auxiliary") == "true";
+      QString     aLabel = atts.value("label-id");
+      QString     anIcon = atts.value("icon-id");
+      bool isAuxOrNeedHyp = ( qName == "hypothesis" ?
+                              atts.value("auxiliary") == "true" :
+                              atts.value("need-hyp" ) == "true" );
       bool isNeedGeom = true, isSupportSubmeshes = false;
       QString aNeedGeom = atts.value("need-geom");
       if ( !aNeedGeom.isEmpty() )
@@ -133,6 +135,11 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
       QString suppSub = atts.value("support-submeshes");
       if ( !suppSub.isEmpty() )
         isSupportSubmeshes = (suppSub == "true");
+      QString context = atts.value("context");
+      if ( context.isEmpty() )
+        context = "ANY";
+      else
+        context = context.toUpper();
 
       QString aDimStr = atts.value("dim");
       aDimStr = aDimStr.remove( ' ' );
@@ -158,11 +165,11 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
           attr[ i ] = aStr.split( ',', QString::SkipEmptyParts );
         }
       }
-      
+
       if ( !aHypAlType.contains( BAD_HYP_FLAG ) ) {
         HypothesisData* aHypData =
           new HypothesisData (aHypAlType, myPluginName, myServerLib, myClientLib,
-                              aLabel, anIcon, aDim, isAux,
+                              aLabel, anIcon, context, aDim, isAuxOrNeedHyp,
                               attr[ HYPOS ], attr[ OPT_HYPOS ], attr[ INPUT ], attr[ OUTPUT ],
                               isNeedGeom, isSupportSubmeshes );
 
@@ -189,9 +196,9 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
       bool badSet = hypos.contains( BAD_HYP_FLAG ) || algos.contains( BAD_HYP_FLAG );
 
       if ( !badSet )
-       myListOfHypothesesSets.append( new HypothesesSet ( atts.value("name"), 
-                                                          hypos.split( ',', QString::SkipEmptyParts ),
-                                                          algos.split( ',', QString::SkipEmptyParts ) ) );
+        myListOfHypothesesSets.append( new HypothesesSet ( atts.value("name"),
+                                                           hypos.split( ',', QString::SkipEmptyParts ),
+                                                           algos.split( ',', QString::SkipEmptyParts ) ) );
     }
   }
   else if ( qName == "python-wrap" ||
index 87b83e2bf6ddca03687822a04311fe8c7bb42383..28203594cd551436ce69f1ba9eae7b6800b6770a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c94612f6edbf9fa8f697aceecc358bd3560c1223..0638b5995f25d1a0cbf27d78fcfb3ba0b77d5512 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c985f167e22847b3fcbd038587df8ad91dd37f9a..b27b101ca169423f5e611ff3e73dccd66ccc0137 100644 (file)
             <source>ICON_DLG_MOVE_NODE</source>
             <translation>mesh_move_node.png</translation>
         </message>
+        <message>
+            <source>ICON_DLG_MOVE_WITHOUT_NODE</source>
+            <translation>mesh_move_without_node.png</translation>
+        </message>
         <message>
             <source>ICON_DLG_NODE</source>
             <translation>mesh_vertex.png</translation>
             <source>ICON_SMESH_DUPLICATE_NODES_WITH_ELEM</source>
             <translation>mesh_duplicate_nodes_with_elem.png</translation>
         </message>
-           <message>
+        <message>
             <source>ICON_SMESH_DUPLICATE_ELEM_ONLY</source>
             <translation>mesh_duplicate_elem_only.png</translation>
         </message>
+        <message>
+            <source>ICON_SMESH_DUPLICATE_GROUP_BOUNDARY</source>
+            <translation>mesh_duplicate_group_boundary.png</translation>
+        </message>
         <message>
             <source>ICON_SMESH_TREE_ALGO</source>
             <translation>mesh_tree_algo.png</translation>
index 174bcf16528015b0f8c79d064d9d9d36ea684e96..9b320f8e487bdf09ab24f5d7d1d048d63d3b68e8 100644 (file)
     </message>
     <message>
         <source>MEN_SPLIT_TO_TETRA</source>
-        <translation>Split into Tetrahedra</translation>
+        <translation>Split Volumes</translation>
     </message>
     <message>
         <source>TOP_SPLIT_TO_TETRA</source>
-        <translation>Split into Tetrahedra</translation>
+        <translation>Split Volumes</translation>
     </message>
     <message>
         <source>STB_SPLIT_TO_TETRA</source>
-        <translation>Split into Tetrahedra</translation>
+        <translation>Split Volumes</translation>
     </message>
     <message>
         <source>MESHERS_FILE_CANT_OPEN</source>
@@ -2040,6 +2040,10 @@ Check algorithm documentation for supported geometry</translation>
         <source>SMESH_MESHINFO_ORDER2</source>
         <translation>Quadratic</translation>
     </message>
+    <message>
+        <source>SMESH_MESHINFO_ORDER3</source>
+        <translation>Bi-Quadratic</translation>
+    </message>
     <message>
         <source>SMESH_MESHINFO_HEXAPRISM</source>
         <translation>Hexagonal prisms</translation>
@@ -4220,19 +4224,30 @@ It can&apos;t be deleted </translation>
         <translation>Sort child items</translation>
     </message>
 </context>
+<context>
+    <name>SMESHGUI_FieldSelectorWdg</name>
+    <message>
+        <source>FIELDS_TO_EXPORT</source>
+        <translation>Export Fields</translation>
+    </message>
+</context>
 <context>
     <name>SMESHGUI_Dialog</name>
     <message>
         <source>DLG_MESH</source>
-        <translation>meshes</translation>
+        <translation>mesh(s)</translation>
     </message>
     <message>
         <source>DLG_HYPO</source>
-        <translation>hypotheses</translation>
+        <translation>hypothesis(s)</translation>
     </message>
     <message>
         <source>DLG_ALGO</source>
-        <translation>algorithms</translation>
+        <translation>algorithm(s)</translation>
+    </message>
+    <message>
+        <source>DLG_GEOM</source>
+        <translation>object(s)</translation>
     </message>
 </context>
 <context>
@@ -4562,6 +4577,10 @@ Please, create VTK viewer and try again</translation>
         <source>PREF_BALL_SIZE</source>
         <translation>Size of ball elements</translation>
     </message>
+    <message>
+        <source>PREF_BALL_SCALE</source>
+        <translation>Scale factor of ball elements</translation>
+    </message>
     <message>
         <source>PREF_WIDTH</source>
         <translation>Line width</translation>
@@ -5977,6 +5996,10 @@ Please specify them and try again</translation>
         <source>MESH</source>
         <translation>Mesh</translation>
     </message>
+    <message>
+        <source>MESH_TYPE</source>
+        <translation>Mesh type</translation>
+    </message>
     <message>
         <source>NAME</source>
         <translation>Name</translation>
@@ -5998,10 +6021,15 @@ Please specify them and try again</translation>
         <translation>No sense in creating a submesh ignored by global algorithm &quot;%1&quot;</translation>
     </message>
     <message>
-        <source>GEOMETRY_OBJECT_IS_NOT_DEFINED</source>
+        <source>GEOMETRY_OBJECT_IS_NOT_DEFINED_MESH</source>
         <translation>Geometry object is not defined.
 Do you want to create an empty mesh 
 without algorithms and hypotheses? </translation>
+    </message>
+    <message>
+        <source>GEOMETRY_OBJECT_IS_NOT_DEFINED_SUBMESH</source>
+        <translation>Geometry object is not defined.
+Please specify it and try again</translation>
     </message>
     <message>
         <source>GEOMETRY_OBJECT_IS_NULL</source>
@@ -6032,6 +6060,26 @@ Please specify it and try again</translation>
         <source>MESH_IS_NULL</source>
         <translation>Mesh is null</translation>
     </message>
+    <message>
+        <source>MT_ANY</source>
+        <translation>Any</translation>
+    </message>
+    <message>
+        <source>MT_HEXAHEDRAL</source>
+        <translation>Hexahedral</translation>
+    </message>
+    <message>
+        <source>MT_TETRAHEDRAL</source>
+        <translation>Tetrahedral</translation>
+    </message>
+    <message>
+        <source>MT_TRIANGULAR</source>
+        <translation>Triangular</translation>
+    </message>
+    <message>
+        <source>MT_QUADRILATERAL</source>
+        <translation>Quadrilateral</translation>
+    </message>
     <message>
         <source>NAME_OF_MESH_IS_EMPTY</source>
         <translation>Name of mesh is empty
@@ -6047,6 +6095,14 @@ Please enter valid name and try again</translation>
         <translation>There is no object for editing. Please
 select mesh or sub-mesh and try again</translation>
     </message>
+    <message>
+        <source>CONCURRENT_SUBMESH_APPEARS</source>
+        <translation> 
+The assigned algorithm has the same priority as one assigned to an 
+adjacent sub-mesh, hence it's undefined which algorithm to use for
+meshing boundary shared by two sub-meshes. Would you like to set
+the order of sub-mesh computation? </translation>
+    </message>
 </context>
 <context>
     <name>SMESHGUI_MeshPatternDlg</name>
@@ -6209,6 +6265,14 @@ It is impossible to read point coordinates from file</translation>
         <source>NONE</source>
         <translation>&lt;None&gt;</translation>
     </message>
+    <message>
+        <source>DEFAULT</source>
+        <translation>&lt;Default&gt;</translation>
+    </message>
+    <message>
+        <source>SELECT</source>
+        <translation>&lt;Select&gt;</translation>
+    </message>
 </context>
 <context>
     <name>SMESHGUI_MultiEditDlg</name>
@@ -6254,10 +6318,10 @@ It is impossible to read point coordinates from file</translation>
     </message>
 </context>
 <context>
-    <name>SMESHGUI_CuttingIntoTetraDlg</name>
+    <name>SMESHGUI_SplitVolumesDlg</name>
     <message>
         <source>CAPTION</source>
-        <translation>Splitting volumes into tetrahedra</translation>
+        <translation>Splitting volumes</translation>
     </message>
     <message>
         <source>SPLIT_METHOD</source>
@@ -6275,6 +6339,34 @@ It is impossible to read point coordinates from file</translation>
         <source>SPLIT_HEX_TO_24_TETRA</source>
         <translation>Into 24 tetrahedra</translation>
     </message>
+    <message>
+        <source>SPLIT_HEX_TO_2_PRISMS</source>
+        <translation>Into 2 prisms</translation>
+    </message>
+    <message>
+        <source>SPLIT_HEX_TO_4_PRISMS</source>
+        <translation>Into 4 Prisms</translation>
+    </message>
+    <message>
+        <source>TARGET_ELEM_TYPE</source>
+        <translation>Target element type</translation>
+    </message>
+    <message>
+        <source>FACET_TO_SPLIT</source>
+        <translation>Facet to split</translation>
+    </message>
+    <message>
+        <source>START_POINT</source>
+        <translation>Hexa location</translation>
+    </message>
+    <message>
+        <source>FACET_NORMAL</source>
+        <translation>Facet normal</translation>
+    </message>
+    <message>
+        <source>ALL_DOMAINS</source>
+        <translation>All domains</translation>
+    </message>
 </context>
 <context>
     <name>SMESHGUI_PrecisionDlg</name>
@@ -6668,6 +6760,10 @@ It is impossible to read point coordinates from file</translation>
         <source>DUPLICATION_ONLY_ELEMS</source>
         <translation>Duplicate elements only</translation>
     </message>
+    <message>
+        <source>DUPLICATION_GROUP_BOUNDARY</source>
+        <translation>Duplicate nodes on group boundaries</translation>
+    </message>
     <message>
         <source>GROUP_ELEMS_TO_DUPLICATE</source>
         <translation>Group of elements to duplicate</translation>
@@ -6680,6 +6776,10 @@ It is impossible to read point coordinates from file</translation>
         <source>GROUP_ELEMS_TO_REPLACE</source>
         <translation>Group of elements to replace nodes with new ones</translation>
     </message>
+    <message>
+        <source>GROUP_VOLUME_GROUPS</source>
+        <translation>Groups of volumes</translation>
+    </message>
     <message>
         <source>CONSTRUCT_NEW_GROUP_NODES</source>
         <translation>Construct group with newly created nodes</translation>
@@ -6688,6 +6788,14 @@ It is impossible to read point coordinates from file</translation>
         <source>CONSTRUCT_NEW_GROUP_ELEMENTS</source>
         <translation>Construct group with newly created elements</translation>
     </message>
+    <message>
+        <source>CREATE_JOINT_ELEMENTS</source>
+        <translation>Create joint elements</translation>
+    </message>
+    <message>
+        <source>ON_ALL_BOUNDARIES</source>
+        <translation>On all boundaries</translation>
+    </message>
 </context>
 <context>
     <name>SMESHGUI_Make2DFrom3DDlg</name>
@@ -6815,6 +6923,10 @@ as they are of improper type:
         <source>QUADRATIC_LAB</source>
         <translation>Quadratic</translation>
     </message>
+    <message>
+        <source>BI_QUADRATIC_LAB</source>
+        <translation>Bi-Quadratic</translation>
+    </message>
     <message>
         <source>0D_LAB</source>
         <translation>0D:</translation>
@@ -7668,7 +7780,7 @@ as they are of improper type:
         <translation>Size:</translation>
     </message>
     <message>
-        <source>ORIENTATION_SCALE</source>
+        <source>SCALE_FACTOR</source>
         <translation>Scale:</translation>
     </message>
     <message>
index 749b17e7e8af0afad7d4f3d373b060d9e1762b2f..3181afe3f5abfc49025feef11d32903b598bb804 100755 (executable)
@@ -3,102 +3,6 @@
 <TS version="2.0" language="fr_FR">
 <context>
     <name>@default</name>
-    <message>
-        <source>TB_ADD1D</source>
-        <translation type="unfinished">Mesh Toolbar</translation>
-    </message>
-    <message>
-        <source>TB_INFO</source>
-        <translation type="unfinished">Information Toolbar</translation>
-    </message>
-    <message>
-        <source>TB_GROUP</source>
-        <translation type="unfinished">Group Toolbar</translation>
-    </message>
-    <message>
-        <source>TB_MEASUREM</source>
-        <translation type="unfinished">Measurements Toolbar</translation>
-    </message>
-    <message>
-        <source>TB_CTRL3D</source>
-        <translation type="unfinished">Volume Controls Toolbar</translation>
-    </message>
-    <message>
-        <source>TB_CTRL2D</source>
-        <translation type="unfinished">Face Controls Toolbar</translation>
-    </message>
-    <message>
-        <source>TB_CTRL1D</source>
-        <translation type="unfinished">Edge Controls Toolbar</translation>
-    </message>
-    <message>
-        <source>TB_CTRL0D</source>
-        <translation type="unfinished">Node Controls Toolbar</translation>
-    </message>
-    <message>
-        <source>TB_TRANSFORM</source>
-        <translation type="unfinished">Transformation Toolbar</translation>
-    </message>
-    <message>
-        <source>TB_RENUMBER</source>
-        <translation type="unfinished">Renumbering Toolbar</translation>
-    </message>
-    <message>
-        <source>TB_REM</source>
-        <translation type="unfinished">Remove Toolbar</translation>
-    </message>
-    <message>
-        <source>TB_ADDNON</source>
-        <translation type="unfinished">Add Non Linear Element Toolbar</translation>
-    </message>
-    <message>
-        <source>TB_ADD</source>
-        <translation type="unfinished">Add Element Toolbar</translation>
-    </message>
-    <message>
-        <source>COMPERR_BAD_PARMETERS</source>
-        <translation type="unfinished">Invalid input parameters</translation>
-    </message>
-    <message>
-        <source>SMESH_GIGABYTE</source>
-        <translation type="unfinished">%1 GB</translation>
-    </message>
-    <message>
-        <source>SMESH_FREERAM</source>
-        <translation type="unfinished">Free RAM</translation>
-    </message>
-    <message>
-        <source>STB_BIQUADRATIC_TRIANGLE</source>
-        <translation type="unfinished">BiQuadratic Triangle</translation>
-    </message>
-    <message>
-        <source>TOP_BIQUADRATIC_TRIANGLE</source>
-        <translation type="unfinished">BiQuadratic Triangle</translation>
-    </message>
-    <message>
-        <source>MEN_BIQUADRATIC_TRIANGLE</source>
-        <translation type="unfinished">BiQuadratic Triangle</translation>
-    </message>
-    <message>
-        <source>SMESH_BIQUADRATIC_TRIANGLES</source>
-        <translation type="unfinished">BiQuadratic Triangles</translation>
-    </message>
-    <message>
-        <source>SMESH_BIQUADRATIC_TRIANGLE</source>
-        <translation type="unfinished">BiQuadratic Triangle</translation>
-    </message>
-    <message>
-        <source>SMESH_AUTO_DIM</source>
-        <translation type="unfinished">Automatically define space dimension</translation>
-    </message>
-    <message>
-        <source>SMESH_ADD_BIQUADRATIC_TRIANGLE_TITLE</source>
-        <translation type="unfinished">Add BiQuadratic Triangle</translation>
-    </message>
-    <message>
-        <source>COMPERR_WARNING</source>
-        <translation type="unfinished">Warning</translation>
-    </message>
     <message>
         <source>SMESH_EXPORT_MESH</source>
         <translation>Exporter le maillage</translation>
         <source>COMPERR_STD_EXCEPTION</source>
         <translation>std::exception</translation>
     </message>
+    <message>
+        <source>COMPERR_WARNING</source>
+        <translation>Attention</translation>
+    </message>
     <message>
         <source>COMPERR_UNKNOWN</source>
         <translation>Erreur inconnue</translation>
         <source>COMPERR_NO_MESH_ON_SHAPE</source>
         <translation>Aucun élément n&apos;est associé à une sous-shape</translation>
     </message>
+    <message>
+        <source>COMPERR_BAD_PARMETERS</source>
+        <translation>Paramètres d&apos;entrée invalides</translation>
+    </message>
     <message>
         <source>EDITERR_NO_MEDIUM_ON_GEOM</source>
         <translation>Certain noeuds milieux (affichés en magenta) ne sont pas placés
     </message>
     <message>
         <source>MEN_BASIC_PROPERTIES</source>
-        <translation type="unfinished">Basic Properties</translation>
+        <translation>Propriétés basiques</translation>
     </message>
     <message>
         <source>MEN_MEASURE_LENGTH</source>
-        <translation type="unfinished">Length</translation>
+        <translation>Longueur</translation>
     </message>
     <message>
         <source>STB_MEASURE_LENGTH</source>
-        <translation type="unfinished">Calculate sum of length of all 1D elements of the selected object(s)</translation>
+        <translation>Calcul de la somme des longueurs de tous les éléments 1D des objets sélectionnés</translation>
     </message>
     <message>
         <source>TOP_MEASURE_LENGTH</source>
-        <translation type="unfinished">Length</translation>
+        <translation>Longueur</translation>
     </message>
     <message>
         <source>MEN_MEASURE_AREA</source>
-        <translation type="unfinished">Area</translation>
+        <translation>Surface</translation>
     </message>
     <message>
         <source>STB_MEASURE_AREA</source>
-        <translation type="unfinished">Calculate sum of area of all 2D elements of the selected object(s)</translation>
+        <translation>Calcul de la somme des surfaces de tous les éléments 2D des objets sélectionnés</translation>
     </message>
     <message>
         <source>TOP_MEASURE_AREA</source>
-        <translation type="unfinished">Area</translation>
+        <translation>Surface</translation>
     </message>
      <message>
         <source>MEN_MEASURE_VOLUME</source>
-        <translation type="unfinished">Volume</translation>
+        <translation>Volume</translation>
     </message>
     <message>
         <source>STB_MEASURE_VOLUME</source>
-        <translation type="unfinished">Calculate sum of volume of all 3D elements of the selected object(s)</translation>
+        <translation>Calcul de la somme des volumes de tous les éléments 3D des objets sélectionnés</translation>
     </message>
     <message>
         <source>TOP_MEASURE_VOLUME</source>
-        <translation type="unfinished">Volume</translation>
+        <translation>Volume</translation>
     </message>
     <message>
         <source>MEN_MOVE</source>
     </message>
     <message>
         <source>MEN_OVERALL_MESH_QUALITY</source>
-        <translation type="unfinished">Overall Mesh Quality</translation>
+        <translation>Qualité du maillage global</translation>
     </message>
     <message>
         <source>MEN_DISTRIBUTION_CTRL</source>
@@ -1365,6 +1277,10 @@ Merci de les corriger, puis essayez de nouveau</translation>
         <source>SMESH_ADD_QUADRATIC_TRIANGLE_TITLE</source>
         <translation>Ajouter un triangle quadratique</translation>
     </message>
+    <message>
+        <source>SMESH_ADD_BIQUADRATIC_TRIANGLE_TITLE</source>
+        <translation>Ajouter un triangle biquadratique</translation>
+    </message>
     <message>
         <source>SMESH_ADD_SUBMESH</source>
         <translation>Construction d&apos;un sous-maillage</translation>
@@ -1401,6 +1317,10 @@ Merci de les corriger, puis essayez de nouveau</translation>
         <source>SMESH_AUTO_GROUPS</source>
         <translation>Créer les groupes automatiquement</translation>
     </message>
+    <message>
+        <source>SMESH_AUTO_DIM</source>
+        <translation>Définition automatique des dimensions spatiales</translation>
+    </message>
     <message>
         <source>SMESH_REQUIRED_GROUPS</source>
         <translation>Créer les groupes des types nécessaires</translation>
@@ -2120,6 +2040,10 @@ Référez-vous à la documentation sur l&apos;algorithme et la géométrie suppo
         <source>SMESH_MESHINFO_ORDER2</source>
         <translation>Quadratique</translation>
     </message>
+    <message>
+        <source>SMESH_MESHINFO_ORDER3</source>
+        <translation type="unfinished">Bi-Quadratic</translation>
+    </message>
     <message>
         <source>SMESH_MESHINFO_HEXAPRISM</source>
         <translation>Prismes hexagonaux</translation>
@@ -2516,6 +2440,26 @@ Référez-vous à la documentation sur l&apos;algorithme et la géométrie suppo
         <source>STB_BIQUADRATIC_QUADRANGLE</source>
         <translation>Quadrangle biquadratique</translation>
     </message>
+    <message>
+        <source>SMESH_BIQUADRATIC_TRIANGLE</source>
+        <translation>Triangle biquadratique</translation>
+    </message>
+    <message>
+        <source>SMESH_BIQUADRATIC_TRIANGLES</source>
+        <translation>Triangles biquadratiques</translation>
+    </message>
+    <message>
+        <source>MEN_BIQUADRATIC_TRIANGLE</source>
+        <translation>Triangle biquadratique</translation>
+    </message>
+    <message>
+        <source>TOP_BIQUADRATIC_TRIANGLE</source>
+        <translation>Triangle biquadratique</translation>
+    </message>
+    <message>
+        <source>STB_BIQUADRATIC_TRIANGLE</source>
+        <translation>Triangle biquadratique</translation>
+    </message>
     <message>
         <source>SMESH_QUADRATIC_TETRAHEDRON</source>
         <translation>Tétraèdre quadratique</translation>
@@ -3478,12 +3422,44 @@ Utilisez le menu "Visualiser une entité" pour les afficher.
         <translation>Cône</translation>
     </message>
     <message>
-        <source>TB_ADD_REMOVE</source>
-        <translation>Ajouter/supprimer la barre d&apos;outils</translation>
+        <source>TB_ADD</source>
+        <translation>Barre d&apos;ajout d&apos;éléments</translation>
+    </message>
+    <message>
+        <source>TB_ADDNON</source>
+        <translation>Barre d&apos;ajout d&apos;éléments non linéaires</translation>
+    </message>
+    <message>
+        <source>TB_REM</source>
+        <translation>Barre de suppression</translation>
+    </message>
+    <message>
+        <source>TB_RENUMBER</source>
+        <translation>Barre de renumérotation</translation>
+    </message>
+    <message>
+        <source>TB_TRANSFORM</source>
+        <translation>Barre des transformations</translation>
+    </message>
+    <message>
+        <source>TB_CTRL0D</source>
+        <translation>Barre des contrôles des nœuds</translation>
+    </message>
+    <message>
+        <source>TB_CTRL1D</source>
+        <translation>Barre des contrôles des arêtes</translation>
+    </message>
+    <message>
+        <source>TB_CTRL2D</source>
+        <translation>Barre des contrôles des faces</translation>
     </message>
     <message>
-        <source>TB_CTRL</source>
-        <translation>Barre d&apos;outils des contrôles</translation>
+        <source>TB_CTRL3D</source>
+        <translation>Barre des contrôles des volumes</translation>
+    </message>
+    <message>
+        <source>TB_MEASUREM</source>
+        <translation>Barre des mesures</translation>
     </message>
     <message>
         <source>TB_DISP_MODE</source>
@@ -3497,6 +3473,18 @@ Utilisez le menu "Visualiser une entité" pour les afficher.
         <source>TB_MESH</source>
         <translation>Barre de maillage</translation>
     </message>
+    <message>
+        <source>TB_GROUP</source>
+        <translation>Barre des groupes</translation>
+    </message>
+    <message>
+        <source>TB_INFO</source>
+        <translation>Barre d'information</translation>
+    </message>
+    <message>
+        <source>TB_ADD1D</source>
+        <translation>Barre de maillage</translation>
+    </message>
     <message>
         <source>TB_MODIFY</source>
         <translation>Barre des modifications</translation>
@@ -4087,7 +4075,7 @@ Utilisez le menu "Visualiser une entité" pour les afficher.
     </message>
     <message>
         <source>UPDATE_DESTINATION</source>
-        <translation type="unfinished">Update Destination</translation>
+        <translation>Mettre à jour la destination</translation>
     </message>
     <message>
         <source>VOLUME_3D_ELEMENTS</source>
@@ -4220,13 +4208,21 @@ avec le paramètre &apos;%1&apos; des préférences du module Mesh.</translation
         <translation>L&apos;objet sélectionné a été utilisé pour en créer un autre.
 Il ne peut pas être supprimé.</translation>
     </message>
+    <message>
+        <source>SMESH_FREERAM</source>
+        <translation>RAM libre</translation>
+    </message>
+    <message>
+        <source>SMESH_GIGABYTE</source>
+        <translation>%1 GB</translation>
+    </message>
     <message>
         <source>MEN_SORT_CHILD_ITEMS</source>
-        <translation type="unfinished">Sort children</translation>
+        <translation>Trier les enfants</translation>
     </message>
     <message>
         <source>STB_SORT_CHILD_ITEMS</source>
-        <translation type="unfinished">Sort child items</translation>
+        <translation>Trier les items enfants</translation>
     </message>
 </context>
 <context>
@@ -4246,10 +4242,6 @@ Il ne peut pas être supprimé.</translation>
 </context>
 <context>
     <name>SMESHGUI</name>
-    <message>
-        <source>PREF_PREVIEW_COLOR</source>
-        <translation type="unfinished">Preview color</translation>
-    </message>
     <message>
         <source>NOT_A_VTK_VIEWER</source>
         <translation>Cette commande n&apos;est disponible qu&apos;à partir d&apos;une fenêtre VTK.
@@ -4293,7 +4285,7 @@ Ouvrez une fenêtre VTK et essayez de nouveau</translation>
     </message>
     <message>
         <source>PREF_INCREMENTAL_LIMIT</source>
-        <translation type="unfinished">Incremental limit check</translation>
+        <translation>Vérification de la limite incrémentale</translation>
     </message>
     <message>
         <source>PREF_BACKFACE</source>
@@ -4363,6 +4355,10 @@ Ouvrez une fenêtre VTK et essayez de nouveau</translation>
         <source>PREF_FILL</source>
         <translation>Remplir</translation>
     </message>
+    <message>
+        <source>PREF_PREVIEW_COLOR</source>
+        <translation>Couleur de prévisualisation</translation>
+    </message>
     <message>
         <source>PREF_NOTIFY_MODE</source>
         <translation>Montrer la notification sur le résultat de calcul</translation>
@@ -4409,7 +4405,7 @@ Ouvrez une fenêtre VTK et essayez de nouveau</translation>
     </message>
     <message>
         <source>PREF_DUMP_CTRL_INFO</source>
-        <translation type="unfinished">Dump controls information</translation>
+        <translation>Copier les informations des contrôles</translation>
     </message>
     <message>
         <source>PREF_GPP_NODES_LIMIT</source>
@@ -4417,7 +4413,7 @@ Ouvrez une fenêtre VTK et essayez de nouveau</translation>
     </message>
     <message>
         <source>PREF_CTRL_LIMIT</source>
-        <translation type="unfinished">Automatic controls compute limit</translation>
+        <translation>Contrôle automatique des limites du calcul</translation>
     </message>
     <message>
         <source>SMESH_PREF_GROUP_PRECISION</source>
@@ -4571,6 +4567,10 @@ Ouvrez une fenêtre VTK et essayez de nouveau</translation>
         <source>PREF_BALL_SIZE</source>
         <translation>Taille des éléments particulaires</translation>
     </message>
+    <message>
+        <source>PREF_BALL_SCALE</source>
+        <translation>Facteur d&apos;échelle des éléments particulaires</translation>
+    </message>
     <message>
         <source>PREF_WIDTH</source>
         <translation>Epaisseur de ligne</translation>
@@ -4615,10 +4615,6 @@ Ouvrez une fenêtre VTK et essayez de nouveau</translation>
 </context>
 <context>
     <name>SMESHGUI_AddQuadraticElementDlg</name>
-    <message>
-        <source>SMESH_ADD_BIQUADRATIC_TRIANGLE</source>
-        <translation type="unfinished">Add BiQuadratic Triangle</translation>
-    </message>
     <message>
         <source>SMESH_ADD_QUADRATIC_EDGE</source>
         <translation>Ajouter une arête quadratique</translation>
@@ -4655,6 +4651,10 @@ Ouvrez une fenêtre VTK et essayez de nouveau</translation>
         <source>SMESH_ADD_QUADRATIC_TRIANGLE</source>
         <translation>Ajouter un triangle quadratique</translation>
     </message>
+    <message>
+        <source>SMESH_ADD_BIQUADRATIC_TRIANGLE</source>
+        <translation>Ajouter un triangle biquadratique</translation>
+    </message>
     <message>
         <source>SMESH_CORNER_NODES</source>
         <translation>Nœuds angulaires:</translation>
@@ -4728,10 +4728,6 @@ Ouvrez une fenêtre VTK et essayez de nouveau</translation>
 </context>
 <context>
     <name>SMESHGUI_ComputeDlg</name>
-    <message>
-        <source>GROUP_OF_BAD_MESH</source>
-        <translation type="unfinished">Bad Mesh to Group</translation>
-    </message>
     <message>
         <source>CAPTION</source>
         <translation>Le calcul du maillage a échoué</translation>
@@ -4768,6 +4764,25 @@ Ouvrez une fenêtre VTK et essayez de nouveau</translation>
         <source>SHOW_BAD_MESH</source>
         <translation>Montrer le maillage incorrect</translation>
     </message>
+    <message>
+        <source>GROUP_OF_BAD_MESH</source>
+        <translation>Grouper les mauvais éléments</translation>
+    </message>
+</context>
+<context>
+    <name>SMESHGUI_ComputeDlg_QThreadQDialog</name>
+    <message>
+        <source>CANCEL</source>
+        <translation>Annuler</translation>
+    </message>
+    <message>
+        <source>CANCELING</source>
+        <translation>Annulation...</translation>
+    </message>
+    <message>
+        <source>TITLE</source>
+        <translation>Calcul</translation>
+    </message>
 </context>
 <context>
     <name>SMESHGUI_PrecomputeDlg</name>
@@ -4951,14 +4966,14 @@ Vérifiez l&apos;espace de disque disponible et vos droits d&apos;écriture dans
 </context>
 <context>
     <name>SMESHGUI_CuttingOfQuadsDlg</name>
-    <message>
-        <source>TO_4_TRIA</source>
-        <translation type="unfinished">Cut into 4 triangles</translation>
-    </message>
     <message>
         <source>CAPTION</source>
         <translation>Découpe des quadrangles</translation>
     </message>
+    <message>
+        <source>TO_4_TRIA</source>
+        <translation>Découpe en 4 triangles</translation>
+    </message>
 </context>
 <context>
     <name>SMESHGUI_DeleteGroupDlg</name>
@@ -5000,11 +5015,11 @@ Choisissez un groupe et essayez de nouveau</translation>
     </message>
     <message>
         <source>SHOW_NODES_IDS</source>
-        <translation type="unfinished">Show double nodes IDs</translation>
+        <translation>Afficher les IDs des nœuds doubles</translation>
     </message>
     <message>
         <source>SHOW_ELEMS_IDS</source>
-        <translation type="unfinished">Show double elements IDs</translation>
+        <translation>Afficher les IDs des éléments doubles</translation>
     </message>
     <message>
         <source>EXCLUDE_GROUPS</source>
@@ -5324,22 +5339,6 @@ Vérifiez la validité des informations données</translation>
 </context>
 <context>
     <name>SMESHGUI_FilterTable</name>
-    <message>
-        <source>ENTITY_TYPE_24</source>
-        <translation type="unfinished">BALL</translation>
-    </message>
-    <message>
-        <source>ENTITY_TYPE_23</source>
-        <translation type="unfinished">QPOLYEDRE</translation>
-    </message>
-    <message>
-        <source>ENTITY_TYPE_1</source>
-        <translation type="unfinished">POINT1</translation>
-    </message>
-    <message>
-        <source>CONNECTED_ELEMS</source>
-        <translation type="unfinished">Elements of a domain</translation>
-    </message>
     <message>
         <source>ADD</source>
         <translation>Ajouter</translation>
@@ -5420,6 +5419,10 @@ Vérifiez la validité des informations données</translation>
         <source>COPLANAR_FACES</source>
         <translation>Faces coplanaires</translation>
     </message>
+    <message>
+        <source>CONNECTED_ELEMS</source>
+        <translation>Eléments d&apos;un domaine</translation>
+    </message>
   <message>
     <source>NUMBEROFNODESINELEMENT</source>
     <translation>Nombre de noeuds dans l&apos;élément</translation>
@@ -5597,6 +5600,10 @@ Entrez une valeur correcte et essayez de nouveau</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_0</source>
+        <translation>NONE</translation>
+    </message>
+    <message>
+        <source>ENTITY_TYPE_1</source>
         <translation>POINT1</translation>
     </message>
     <message>
@@ -5617,70 +5624,78 @@ Entrez une valeur correcte et essayez de nouveau</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_6</source>
-        <translation>QUAD4</translation>
+        <translation>TRIA7</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_7</source>
-        <translation>QUAD8</translation>
+        <translation>QUAD4</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_8</source>
-        <translation>QUAD9</translation>
+        <translation>QUAD8</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_9</source>
-        <translation>TETRA4</translation>
+        <translation>QUAD9</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_10</source>
-        <translation>TETRA10</translation>
+        <translation>POLYGON</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_11</source>
-        <translation>PYRA5</translation>
+        <translation>QPOLYGON</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_12</source>
-        <translation>PYRA13</translation>
+        <translation>TETRA4</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_13</source>
-        <translation>PENTA6</translation>
+        <translation>TETRA10</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_14</source>
-        <translation>PENTA15</translation>
+        <translation>PYRA5</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_15</source>
-        <translation>HEXA8</translation>
+        <translation>PYRA13</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_16</source>
-        <translation>HEXA20</translation>
+        <translation>HEXA8</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_17</source>
-        <translation>HEXA27</translation>
+        <translation>HEXA20</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_18</source>
-        <translation>OCTA12</translation>
+        <translation>HEXA27</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_19</source>
-        <translation>POLYGONE</translation>
+        <translation>PENTA6</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_20</source>
-        <translation>POLYEDRE</translation>
+        <translation>PENTA15</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_21</source>
-        <translation>NONE</translation>
+        <translation>OCTA12</translation>
     </message>
     <message>
         <source>ENTITY_TYPE_22</source>
+        <translation>POLYEDRE</translation>
+    </message>
+    <message>
+        <source>ENTITY_TYPE_23</source>
+        <translation>QPOLYEDRE</translation>
+    </message>
+    <message>
+        <source>ENTITY_TYPE_24</source>
         <translation>BALL</translation>
     </message>
     <message>
@@ -5971,6 +5986,10 @@ Indiquez-les et essayez de nouveau</translation>
         <source>MESH</source>
         <translation>Maillage</translation>
     </message>
+    <message>
+        <source>MESH_TYPE</source>
+        <translation>Type de maillage</translation>
+    </message>
     <message>
         <source>NAME</source>
         <translation>Nom</translation>
@@ -5993,9 +6012,9 @@ Voulez-vous éditer ce sous-maillage?</translation>
     </message>
     <message>
         <source>GEOMETRY_OBJECT_IS_NOT_DEFINED</source>
-        <translation type="unfinished">Geometry object is not defined.
-Do you want to create an empty mesh 
-without algorithms and hypotheses? </translation>
+        <translation>La géométrie n&apos;est pas définie.
+Voulez-vous créer un maillage vide
+sans algorithme ni hypothèse ? </translation>
     </message>
     <message>
         <source>GEOMETRY_OBJECT_IS_NULL</source>
@@ -6026,6 +6045,26 @@ Spécifiez-le et essayez de nouveau</translation>
         <source>MESH_IS_NULL</source>
         <translation>Le maillage est nul</translation>
     </message>
+    <message>
+        <source>MT_ANY</source>
+        <translation>Tout type</translation>
+    </message>
+    <message>
+        <source>MT_HEXAHEDRAL</source>
+        <translation>Hexahèdre</translation>
+    </message>
+    <message>
+        <source>MT_TETRAHEDRAL</source>
+        <translation>Tetrahèdre</translation>
+    </message>
+    <message>
+        <source>MT_TRIANGULAR</source>
+        <translation>Triangulaire</translation>
+    </message>
+    <message>
+        <source>MT_QUADRILATERAL</source>
+        <translation>Quadrilatères</translation>
+    </message>
     <message>
         <source>NAME_OF_MESH_IS_EMPTY</source>
         <translation>Le nom du maillage est vide
@@ -6619,14 +6658,6 @@ Il y a trop peu de points dans le fichier </translation>
         <source>RELATIVE</source>
         <translation>Relative</translation>
     </message>
-    <message>
-        <source>RESET</source>
-        <translation>Réinitialiser</translation>
-    </message>
-    <message>
-        <source>INVERT</source>
-        <translation>Inverser</translation>
-    </message>
     <message>
         <source>BASE_POINT</source>
         <translation>Le point fondamental</translation>
@@ -6635,13 +6666,17 @@ Il y a trop peu de points dans le fichier </translation>
         <source>DIRECTION</source>
         <translation>Direction</translation>
     </message>
+    <message>
+        <source>RESET</source>
+        <translation>Réinitialiser</translation>
+    </message>
+    <message>
+        <source>INVERT</source>
+        <translation>Inverser</translation>
+    </message>
 </context>
 <context>
     <name>SMESHGUI_DuplicateNodesDlg</name>
-    <message>
-        <source>DUPLICATION_ONLY_ELEMS</source>
-        <translation type="unfinished">Duplicate elements only</translation>
-    </message>
     <message>
         <source>DUPLICATION_MODE</source>
         <translation>Mode de duplication</translation>
@@ -6662,6 +6697,10 @@ Il y a trop peu de points dans le fichier </translation>
         <source>DUPLICATION_WITH_ELEMS</source>
         <translation>Avec duplication des éléments de frontière</translation>
     </message>
+    <message>
+        <source>DUPLICATION_ONLY_ELEMS</source>
+        <translation>Avec duplication des éléments de frontière seulement</translation>
+    </message>
     <message>
         <source>GROUP_ELEMS_TO_DUPLICATE</source>
         <translation>Groupe des éléments à dupliquer</translation>
@@ -6809,6 +6848,10 @@ en raison de leurs types incompatibles:
         <source>QUADRATIC_LAB</source>
         <translation>Quadratique</translation>
     </message>
+    <message>
+        <source>BI_QUADRATIC_LAB</source>
+        <translation type="unfinished">Bi-Quadratic</translation>
+    </message>
     <message>
         <source>0D_LAB</source>
         <translation>0D:</translation>
@@ -6918,15 +6961,15 @@ en raison de leurs types incompatibles:
     </message>
     <message>
         <source>ELEM_INFO</source>
-        <translation>Infos sur les éléments</translation>
+        <translation>Informations sur les éléments</translation>
     </message>
     <message>
         <source>ADDITIONAL_INFO</source>
-        <translation>Infos détaillées</translation>
+        <translation>Informations détaillées</translation>
     </message>
     <message>
         <source>CTRL_INFO</source>
-        <translation type="unfinished">Quality Info</translation>
+        <translation>Informations sur la qualité</translation>
     </message>
     <message>
         <source>NODE_MODE</source>
@@ -7298,90 +7341,90 @@ en raison de leurs types incompatibles:
     <name>SMESHGUI_CtrlInfo</name>
     <message>
         <source>CTRL_INFO</source>
-        <translation type="unfinished">Quality information</translation>
+        <translation>Informations sur la qualité</translation>
     </message>
     <message>
         <source>NAME_LAB</source>
-        <translation type="unfinished">Name:</translation>
+        <translation>Nom:</translation>
     </message>
     <message>
         <source>VALUE</source>
-        <translation type="unfinished">Value</translation>
+        <translation>Valeur</translation>
     </message>
     <message>
         <source>BUT_COMPUTE</source>
-        <translation type="unfinished">Compute</translation>
+        <translation>Calculer</translation>
     </message>
     <message>
         <source>NODES_INFO</source>
-        <translation type="unfinished">Nodes Information:</translation>
+        <translation>Informations des nœuds:</translation>
     </message>
     <message>
         <source>NUMBER_OF_THE_FREE_NODES</source>
-        <translation type="unfinished">Number of the free nodes</translation>
-    </message>
-    <message>
-        <source>NUMBER_OF_THE_DOUBLE_NODES</source>
-        <translation type="unfinished">Number of the double nodes</translation>
+        <translation>Nombre de nœuds libres</translation>
     </message>
     <message>
         <source>DOUBLE_NODES_TOLERANCE</source>
         <translation>Tolérance des nœuds doubles</translation>
     </message>
+    <message>
+        <source>NUMBER_OF_THE_DOUBLE_NODES</source>
+        <translation>Nombre de nœuds doubles</translation>
+    </message>
     <message>
         <source>EDGES_INFO</source>
-        <translation type="unfinished">Edges Information:</translation>
+        <translation>Informations des arêtes:</translation>
     </message>
     <message>
         <source>NUMBER_OF_THE_DOUBLE_EDGES</source>
-        <translation type="unfinished">Number of the double edges</translation>
+        <translation>Nombre d&apos;arêtes doubles</translation>
     </message>
     <message>
         <source>FACES_INFO</source>
-        <translation type="unfinished">Faces Information:</translation>
+        <translation>Informations des faces:</translation>
     </message>
     <message>
         <source>NUMBER_OF_THE_DOUBLE_FACES</source>
-        <translation type="unfinished">Number of the double faces</translation>
+        <translation>Nombre de faces doubles</translation>
     </message>   
     <message>
         <source>ASPECT_RATIO_HISTOGRAM</source>
-        <translation type="unfinished">Aspect Ratio histogram</translation>
+        <translation>Histogramme du rapport de forme</translation>
     </message>
     <message>
         <source>VOLUMES_INFO</source>
-        <translation type="unfinished">Volumes Information:</translation>
+        <translation>Informations des volumes:</translation>
     </message>
     <message>
         <source>NUMBER_OF_THE_DOUBLE_VOLUMES</source>
-        <translation type="unfinished">Number of the double volumes</translation>
+        <translation>Nombre de volumes doubles</translation>
     </message>
     <message>
         <source>NUMBER_OF_THE_OVER_CONSTRAINED</source>
-        <translation type="unfinished">Number of the over-constrained</translation>
+        <translation>Nombre de sur-contraintes</translation>
     </message>
     <message>
         <source>ASPECT_RATIO_3D_HISTOGRAM</source>
-        <translation type="unfinished">Aspect Ratio 3D histogram</translation>
+        <translation>Histogramme du rapport de forme 3D</translation>
     </message>
 </context>
 <context>
     <name>SMESHGUI_CtrlInfoDlg</name>
     <message>
-        <source>SAVE_INFO</source>
-        <translation type="unfinished">Save info</translation>
+        <source>CTRL_INFO</source>
+        <translation>Informations sur la qualité</translation>
     </message>
     <message>
-        <source>TEXT_FILES</source>
-        <translation type="unfinished">Text files (*.txt)</translation>
+        <source>BUT_DUMP_MESH</source>
+        <translation>&amp;Dumper</translation>
     </message>
     <message>
-        <source>BUT_DUMP_MESH</source>
-        <translation type="unfinished">&amp;Dump</translation>
+        <source>TEXT_FILES</source>
+        <translation>Fichiers texte (*.txt)</translation>
     </message>
     <message>
-        <source>CTRL_INFO</source>
-        <translation type="unfinished">Quality Info</translation>
+        <source>SAVE_INFO</source>
+        <translation>Sauvegarder les informations</translation>
     </message>
 </context>
 <context>
@@ -7427,27 +7470,27 @@ en raison de leurs types incompatibles:
     <name>SMESHGUI_BasicProperties</name>
     <message>
         <source>PROPERTY</source>
-        <translation type="unfinished">Property</translation>
+        <translation>Propriété</translation>
     </message>
     <message>
         <source>LENGTH</source>
-        <translation type="unfinished">Length</translation>
+        <translation>Longueur</translation>
     </message>
     <message>
         <source>AREA</source>
-        <translation type="unfinished">Area</translation>
+        <translation>Surface</translation>
     </message>
     <message>
         <source>VOLUME</source>
-        <translation type="unfinished">Volume</translation>
+        <translation>Volume</translation>
     </message>
     <message>
         <source>SOURCE_MESH_SUBMESH_GROUP</source>
-        <translation type="unfinished">Source (mesh, sub-mesh or group)</translation>
+        <translation>Source (maillage, sous-maillage ou groupe)</translation>
     </message>
     <message>
         <source>COMPUTE</source>
-        <translation type="unfinished">Compute</translation>
+        <translation>Calculer</translation>
     </message>
 </context>
 <context>
@@ -7481,7 +7524,7 @@ en raison de leurs types incompatibles:
     </message>
     <message>
         <source>BASIC_PROPERTIES</source>
-        <translation type="unfinished">Basic Properties</translation>
+        <translation>Propriétés basiques</translation>
     </message>
 </context>
 <context>
@@ -7662,7 +7705,7 @@ en raison de leurs types incompatibles:
         <translation>Taille:</translation>
     </message>
     <message>
-        <source>ORIENTATION_SCALE</source>
+        <source>SCALE_FACTOR</source>
         <translation>Echelle:</translation>
     </message>
     <message>
@@ -7674,19 +7717,4 @@ en raison de leurs types incompatibles:
         <translation>Coef de réduction:</translation>
     </message>
 </context>
-<context>
-    <name>SMESHGUI_ComputeDlg_QThreadQDialog</name>
-    <message>
-        <source>TITLE</source>
-        <translation type="unfinished">Compute</translation>
-    </message>
-    <message>
-        <source>CANCELING</source>
-        <translation type="unfinished">Canceling...</translation>
-    </message>
-    <message>
-        <source>CANCEL</source>
-        <translation type="unfinished">Cancel</translation>
-    </message>
-</context>
 </TS>
index f5e88adb629ad39fc60960385b2d93b140dface6..8350a23d7d9d3defa090668f8c33145c96b5c66c 100644 (file)
       <source>SMESH_MESHINFO_ORDER2</source>
       <translation>二次</translation>
     </message>
+    <message>
+        <source>SMESH_MESHINFO_ORDER3</source>
+        <translation type="unfinished">Bi-Quadratic</translation>
+    </message>
     <message>
       <source>SMESH_MESHINFO_HEXAPRISM</source>
       <translation>六角形プリズム</translation>
       <source>QUADRATIC_LAB</source>
       <translation>二次</translation>
     </message>
+    <message>
+        <source>BI_QUADRATIC_LAB</source>
+        <translation type="unfinished">Bi-Quadratic</translation>
+    </message>
     <message>
       <source>0D_LAB</source>
       <translation>0D:</translation>
       <translation>サイズ</translation>
     </message>
     <message>
-      <source>ORIENTATION_SCALE</source>
+      <source>SCALE_FACTOR</source>
       <translation>スケール:</translation>
     </message>
     <message>
index ecdc716c086b40d7a56d09218677f83b8aa431a0..5261c5d7fdebc35f3684644b26186d9f6a66e4df 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -42,6 +42,7 @@ SET(_link_LIBRARIES
   ${CAS_TKG3d}
   ${CAS_TKGeomBase}
   ${CAS_TKGeomAlgo}
+  ${Boost_LIBRARIES}
   SMESHDS
 )
 
index 7d2ed2a7127da1630f6cb0586ea11dc6761197a0..472061d248ed18d71fab520344a49eb9a4fc3f6b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 //
 #include "SMESH_Block.hxx"
 
+#include "SMDS_MeshNode.hxx"
+#include "SMDS_MeshVolume.hxx"
+#include "SMDS_VolumeTool.hxx"
+#include "SMESH_MeshAlgos.hxx"
+
 #include <BRepAdaptor_Curve.hxx>
 #include <BRepAdaptor_Curve2d.hxx>
 #include <BRepAdaptor_Surface.hxx>
 #include <math_Matrix.hxx>
 #include <math_Vector.hxx>
 
-#include "SMDS_MeshNode.hxx"
-#include "SMDS_MeshVolume.hxx"
-#include "SMDS_VolumeTool.hxx"
-#include "utilities.h"
+#include <utilities.h>
 
 #include <list>
 #include <limits>
@@ -309,24 +311,15 @@ gp_XYZ SMESH_Block::TFace::Point( const gp_XYZ& theParams ) const
 
 namespace
 {
+  inline
   bool isPntInTria( const gp_XY& p, const gp_XY& t0, const gp_XY& t1, const gp_XY& t2  )
   {
-    const double // matrix 2x2
-      T11 = t0.X()-t2.X(), T12 = t1.X()-t2.X(),
-      T21 = t0.Y()-t2.Y(), T22 = t1.Y()-t2.Y();
-    const double Tdet = T11*T22 - T12*T21; // matrix determinant
-    if ( Abs( Tdet ) < std::numeric_limits<double>::min() )
-      return false;
-    // matrix inverse
-    const double t11 = T22, t12 = -T12, t21 = -T21, t22 = T11;
-    // vector
-    const double r11 = p.X()-t2.X(), r12 = p.Y()-t2.Y();
-    // barycentric coordinates: mutiply matrix by vector
-    const double bc0 = (t11 * r11 + t12 * r12)/Tdet;
-    const double bc1 = (t21 * r11 + t22 * r12)/Tdet;
+    double bc0, bc1;
+    SMESH_MeshAlgos::GetBarycentricCoords( p, t0, t1, t2, bc0, bc1 );
     return ( bc0 >= 0. && bc1 >= 0. && bc0 + bc1 <= 1. );
   }
 
+  inline
   bool isPntInQuad( const gp_XY& p,
                     const gp_XY& q0, const gp_XY& q1, const gp_XY& q2, const gp_XY& q3 )
   {
index a2fcd0a1ab8e7709dbdcc447240f645b15c232da..47de73b39ce8b146523cc4ddb8d57f69dbb0e160 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -68,20 +68,19 @@ class SMESHUtils_EXPORT SMESH_Block: public math_FunctionSetWithDerivatives
     // ----------------------------
     ID_NONE = 0,
 
-    ID_V000 = 1, ID_V100, ID_V010, ID_V110, ID_V001, ID_V101, ID_V011, ID_V111,
+    ID_V000 = 1, ID_V100, ID_V010, ID_V110, ID_V001, ID_V101, ID_V011, ID_V111, // 1-8
 
-    ID_Ex00, ID_Ex10, ID_Ex01, ID_Ex11,
-    ID_E0y0, ID_E1y0, ID_E0y1, ID_E1y1,
-    ID_E00z, ID_E10z, ID_E01z, ID_E11z,
+    ID_Ex00, ID_Ex10, ID_Ex01, ID_Ex11, // 9-12
+    ID_E0y0, ID_E1y0, ID_E0y1, ID_E1y1, // 13-16
+    ID_E00z, ID_E10z, ID_E01z, ID_E11z, // 17-20
 
-    ID_Fxy0, ID_Fxy1, ID_Fx0z, ID_Fx1z, ID_F0yz, ID_F1yz,
+    ID_Fxy0, ID_Fxy1, ID_Fx0z, ID_Fx1z, ID_F0yz, ID_F1yz, // 21-26
 
-    ID_Shell
-    };
-  enum { // to use TShapeID for indexing certain type subshapes
+    ID_Shell, // 27
 
-    ID_FirstV = ID_V000, ID_FirstE = ID_Ex00, ID_FirstF = ID_Fxy0
+    // to use TShapeID for indexing certain type subshapes
 
+    ID_FirstV = ID_V000, ID_FirstE = ID_Ex00, ID_FirstF = ID_Fxy0
   };
 
 
@@ -285,7 +284,7 @@ public:
                               std::list< int >  &       theNbEdgesInWires,
                               TopoDS_Vertex             theFirstVertex=TopoDS_Vertex(),
                               const bool                theShapeAnalysisAlgo=false);
-  // Return nb wires and a list of oredered edges.
+  // Return nb wires and a list of ordered edges.
   // It is used to assign indices to subshapes.
   // theFirstVertex may be NULL.
   // Always try to set a seam edge first
index 415171743160bb5d9cc48eb208753f8672d5417b..8e8db16d1530056acdd9b328e9ccb465d00c08a8 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 07d1a90889898df6f7d817cffc374db5de75736c..68a86787040d6bc2325150be924db80a7bd1830b 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -111,6 +111,7 @@ std::string SMESH_ComputeError::CommonName() const
   _case2char(COMPERR_WARNING         );
   _case2char(COMPERR_CANCELED        );
   _case2char(COMPERR_NO_MESH_ON_SHAPE);
+  _case2char(COMPERR_BAD_PARMETERS   );
   default:;
   }
   return "";
index 79bbfbc8aca7e7978fd924a3912ce1a0b9f8c178..d75cd108adc87461108262cbca7bdc22a3cc4c99 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // 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 "SMESH_File.hxx"
 
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/mman.h>
 #endif
 
+#include <boost/filesystem.hpp>
+
+namespace boofs = boost::filesystem;
+
 //================================================================================
 /*!
  * \brief Creator opening the file for reading by default
@@ -133,6 +131,16 @@ void SMESH_File::close()
     _pos = _end = 0;
     _size = -1;
   }
+  else if ( _file >= 0 )
+  {
+#ifdef WIN32
+    CloseHandle(_file);
+    _file = INVALID_HANDLE_VALUE;
+#else
+    ::close(_file);
+    _file = -1;
+#endif
+  }
 }
 
 //================================================================================
@@ -144,15 +152,12 @@ void SMESH_File::close()
 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;
+
+  boost::system::error_code err;
+  boofs::remove( _name, err );
+  _error = err.message();
+
+  return !err;
 }
 
 //================================================================================
@@ -161,21 +166,45 @@ bool SMESH_File::remove()
  */
 //================================================================================
 
-int SMESH_File::size() const
+long SMESH_File::size()
 {
-  if ( _size >= 0 ) return _size; // size of open file
+  if ( _size >= 0 ) return _size; // size of an 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;
+  boost::system::error_code err;
+  boost::uintmax_t size = boofs::file_size( _name, err );
+  _error = err.message();
+
+  return err ? -1 : (long) size;
+}
+
+//================================================================================
+/*!
+ * \brief Check existence
+ */
+//================================================================================
+
+bool SMESH_File::exists()
+{
+  boost::system::error_code err;
+  bool res = boofs::exists( _name, err );
+  _error = err.message();
+
+  return err ? false : res;
+}
+
+//================================================================================
+/*!
+ * \brief Check existence
+ */
+//================================================================================
+
+bool SMESH_File::isDirectory()
+{
+  boost::system::error_code err;
+  bool res = boofs::is_directory( _name, err );
+  _error = err.message();
+
+  return err ? false : res;
 }
 
 //================================================================================
@@ -238,3 +267,56 @@ bool SMESH_File::getInts(std::vector<int>& ints)
   }
   return ( i == ints.size() );
 }
+
+//================================================================================
+/*!
+ * \brief Open for binary writing only.
+ */
+//================================================================================
+
+bool SMESH_File::openForWriting()
+{
+#ifdef WIN32
+
+  _file = CreateFile( _name.c_str(),          // name of the write
+                      GENERIC_WRITE,          // open for writing
+                      0,                      // do not share
+                      NULL,                   // default security
+                      OPEN_ALWAYS,            // CREATE NEW or OPEN EXISTING
+                      FILE_ATTRIBUTE_NORMAL,  // normal file
+                      NULL);                  // no attr. template
+  return ( _file != INVALID_HANDLE_VALUE );
+
+#else
+
+  _file = ::open( _name.c_str(),
+                  O_WRONLY | O_CREAT,
+                  S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ); // rw-r--r--
+  return _file >= 0;
+
+#endif
+}
+
+//================================================================================
+/*!
+ * \brief Write binary data
+ */
+//================================================================================
+
+bool SMESH_File::writeRaw(const void* data, size_t size)
+{
+#ifdef WIN32
+
+  DWORD nbWritten = 0;
+  BOOL err = WriteFile( _file, data, size, & nbWritten, NULL);
+
+  return (( err == FALSE ) &&
+          ( nbWritten == (DWORD) size ));
+
+#else
+
+  ssize_t nbWritten = ::write( _file, data, size );
+  return ( nbWritten == size );
+
+#endif
+}
index 9625c0339fcfce8286f9afa3c6b6920ee1200dfe..0e7ccca52097dd656c794777871d589f078f8356 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -42,24 +42,30 @@ class SMESHUtils_EXPORT SMESH_File
 {
 public:
 
-  SMESH_File(const std::string& name, bool open=true);
+  SMESH_File(const std::string& name, bool openForReading=true);
 
   ~SMESH_File();
 
   std::string getName() const { return _name; }
 
-  bool open();
+  const std::string& error() const { return _error; }
 
   void close();
 
   bool remove();
 
-  int size() const;
+  long size();
+
+  bool exists();
+
+  bool isDirectory();
 
   // ------------------------
   // Access to file contents
   // ------------------------
 
+  bool open(); // for reading
+
   operator const char*() const { return _pos; }
 
   bool operator++() { return ++_pos < _end; }
@@ -68,6 +74,8 @@ public:
 
   bool eof() const { return _pos >= _end; }
 
+  const char* end() const { return _end; }
+
   const char* getPos() const { return _pos; }
 
   void setPos(const char* pos);
@@ -78,10 +86,31 @@ public:
 
   bool getInts(std::vector<int>& ids);
 
+  // ------------------------
+  // Writting a binary file
+  // ------------------------
+
+  bool openForWriting(); // binary writing only
+
+  template <typename T>
+    bool write( const T* values, size_t nbTValues )
+  {
+    return writeRaw((const void*) values, nbTValues * sizeof(T));
+  }
+
+  template <typename T>
+    bool write( const T& value )
+  {
+    return writeRaw((const void*) & value, sizeof(T));
+  }
+
+  bool writeRaw(const void* data, size_t size);
+
 private:
 
   std::string _name; //!< file name
   int         _size; //!< file size
+  std::string _error;
 #ifdef WIN32
   HANDLE      _file, _mapObj;
 #else
index 45acf33b115cb4067aa23516ee4a774f59d5fdec..957828474e306b0d3bb07286179f454aaf297c1c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 #include "SMESH_MeshAlgos.hxx"
 
+#include "SMDS_FaceOfNodes.hxx"
 #include "SMDS_LinearEdge.hxx"
-#include "SMDS_VolumeTool.hxx"
 #include "SMDS_Mesh.hxx"
+#include "SMDS_PolygonalFaceOfNodes.hxx"
+#include "SMDS_VolumeTool.hxx"
 #include "SMESH_OctreeNode.hxx"
 
 #include <GC_MakeSegment.hxx>
@@ -743,7 +745,7 @@ SMESH_ElementSearcherImpl::FindClosestTo( const gp_Pnt&       point,
 {
   const SMDS_MeshElement* closestElem = 0;
 
-  if ( type == SMDSAbs_Face )
+  if ( type == SMDSAbs_Face || type == SMDSAbs_Volume )
   {
     if ( !_ebbTree || _elementType != type )
     {
@@ -757,10 +759,10 @@ SMESH_ElementSearcherImpl::FindClosestTo( const gp_Pnt&       point,
     {
       gp_Pnt boxCenter = 0.5 * ( _ebbTree->getBox()->CornerMin() +
                                  _ebbTree->getBox()->CornerMax() );
-      double radius;
+      double radius = -1;
       if ( _ebbTree->getBox()->IsOut( point.XYZ() ))
         radius = point.Distance( boxCenter ) - 0.5 * _ebbTree->maxSize();
-      else
+      if ( radius < 0 )
         radius = _ebbTree->maxSize() / pow( 2., _ebbTree->getHeight()) / 2;
       while ( suspectElems.empty() )
       {
@@ -773,8 +775,7 @@ SMESH_ElementSearcherImpl::FindClosestTo( const gp_Pnt&       point,
     TIDSortedElemSet::iterator elem = suspectElems.begin();
     for ( ; elem != suspectElems.end(); ++elem )
     {
-      double dist = SMESH_MeshAlgos::GetDistance( dynamic_cast<const SMDS_MeshFace*>(*elem),
-                                                   point );
+      double dist = SMESH_MeshAlgos::GetDistance( *elem, point );
       if ( dist < minDist + 1e-10)
       {
         minDist = dist;
@@ -1290,6 +1291,31 @@ namespace
   }
 }
 
+//=======================================================================
+/*!
+ * \brief Return minimal distance from a point to an element
+ *
+ * Currently we ignore non-planarity and 2nd order of face
+ */
+//=======================================================================
+
+double SMESH_MeshAlgos::GetDistance( const SMDS_MeshElement* elem,
+                                     const gp_Pnt&           point )
+{
+  switch ( elem->GetType() )
+  {
+  case SMDSAbs_Volume:
+    return GetDistance( dynamic_cast<const SMDS_MeshVolume*>( elem ), point);
+  case SMDSAbs_Face:
+    return GetDistance( dynamic_cast<const SMDS_MeshFace*>( elem ), point);
+  case SMDSAbs_Edge:
+    return GetDistance( dynamic_cast<const SMDS_MeshEdge*>( elem ), point);
+  case SMDSAbs_Node:
+    return point.Distance( SMESH_TNodeXYZ( elem ));
+  }
+  return -1;
+}
+
 //=======================================================================
 /*!
  * \brief Return minimal distance from a point to a face
@@ -1386,6 +1412,101 @@ double SMESH_MeshAlgos::GetDistance( const SMDS_MeshFace* face,
   return badDistance;
 }
 
+//=======================================================================
+/*!
+ * \brief Return minimal distance from a point to an edge
+ */
+//=======================================================================
+
+double SMESH_MeshAlgos::GetDistance( const SMDS_MeshEdge* edge, const gp_Pnt& point )
+{
+  throw SALOME_Exception(LOCALIZED("not implemented so far"));
+}
+
+//=======================================================================
+/*!
+ * \brief Return minimal distance from a point to a volume
+ *
+ * Currently we ignore non-planarity and 2nd order
+ */
+//=======================================================================
+
+double SMESH_MeshAlgos::GetDistance( const SMDS_MeshVolume* volume, const gp_Pnt& point )
+{
+  SMDS_VolumeTool vTool( volume );
+  vTool.SetExternalNormal();
+  const int iQ = volume->IsQuadratic() ? 2 : 1;
+
+  double n[3], bc[3];
+  double minDist = 1e100, dist;
+  for ( int iF = 0; iF < vTool.NbFaces(); ++iF )
+  {
+    // skip a facet with normal not "looking at" the point
+    if ( !vTool.GetFaceNormal( iF, n[0], n[1], n[2] ) ||
+         !vTool.GetFaceBaryCenter( iF, bc[0], bc[1], bc[2] ))
+      continue;
+    gp_XYZ bcp = point.XYZ() - gp_XYZ( bc[0], bc[1], bc[2] );
+    if ( gp_XYZ( n[0], n[1], n[2] ) * bcp < 1e-6 )
+      continue;
+
+    // find distance to a facet
+    const SMDS_MeshNode** nodes = vTool.GetFaceNodes( iF );
+    switch ( vTool.NbFaceNodes( iF ) / iQ ) {
+    case 3:
+    {
+      SMDS_FaceOfNodes tmpFace( nodes[0], nodes[ 1*iQ ], nodes[ 2*iQ ] );
+      dist = GetDistance( &tmpFace, point );
+      break;
+    }
+    case 4:
+    {
+      SMDS_FaceOfNodes tmpFace( nodes[0], nodes[ 1*iQ ], nodes[ 2*iQ ], nodes[ 3*iQ ]);
+      dist = GetDistance( &tmpFace, point );
+      break;
+    }
+    default:
+      vector<const SMDS_MeshNode *> nvec( nodes, nodes + vTool.NbFaceNodes( iF ));
+      SMDS_PolygonalFaceOfNodes tmpFace( nvec );
+      dist = GetDistance( &tmpFace, point );
+    }
+    minDist = Min( minDist, dist );
+  }
+  return minDist;
+}
+
+//================================================================================
+/*!
+ * \brief Returns barycentric coordinates of a point within a triangle.
+ *        A not returned bc2 = 1. - bc0 - bc1.
+ *        The point lies within the triangle if ( bc0 >= 0 && bc1 >= 0 && bc0+bc1 <= 1 )
+ */
+//================================================================================
+
+void SMESH_MeshAlgos::GetBarycentricCoords( const gp_XY& p,
+                                            const gp_XY& t0,
+                                            const gp_XY& t1,
+                                            const gp_XY& t2,
+                                            double &     bc0,
+                                            double &     bc1)
+{
+  const double // matrix 2x2
+    T11 = t0.X()-t2.X(), T12 = t1.X()-t2.X(),
+    T21 = t0.Y()-t2.Y(), T22 = t1.Y()-t2.Y();
+  const double Tdet = T11*T22 - T12*T21; // matrix determinant
+  if ( Abs( Tdet ) < std::numeric_limits<double>::min() )
+  {
+    bc0 = bc1 = 2.;
+    return;
+  }
+  // matrix inverse
+  const double t11 = T22, t12 = -T12, t21 = -T21, t22 = T11;
+  // vector
+  const double r11 = p.X()-t2.X(), r12 = p.Y()-t2.Y();
+  // barycentric coordinates: mutiply matrix by vector
+  bc0 = (t11 * r11 + t12 * r12)/Tdet;
+  bc1 = (t21 * r11 + t22 * r12)/Tdet;
+}
+
 //=======================================================================
 //function : FindFaceInSet
 //purpose  : Return a face having linked nodes n1 and n2 and which is
index a02ba10ddd73db31e0fd470bc5c4ae2132558e2a..f1604572b2a83bba6922c0e95a5eae7bd8513f4f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -97,9 +97,25 @@ namespace SMESH_MeshAlgos
   /*!
    * \brief Return true if the point is IN or ON of the element
    */
-  SMESHUtils_EXPORT bool IsOut( const SMDS_MeshElement* element, const gp_Pnt& point, double tol );
+  SMESHUtils_EXPORT
+  bool IsOut( const SMDS_MeshElement* element, const gp_Pnt& point, double tol );
 
-  SMESHUtils_EXPORT double GetDistance( const SMDS_MeshFace* face, const gp_Pnt& point );
+  SMESHUtils_EXPORT
+  double GetDistance( const SMDS_MeshElement* elem, const gp_Pnt& point );
+
+  SMESHUtils_EXPORT
+  double GetDistance( const SMDS_MeshEdge* edge, const gp_Pnt& point );
+
+  SMESHUtils_EXPORT
+  double GetDistance( const SMDS_MeshFace* face, const gp_Pnt& point );
+
+  SMESHUtils_EXPORT
+  double GetDistance( const SMDS_MeshVolume* volume, const gp_Pnt& point );
+
+  SMESHUtils_EXPORT
+  void GetBarycentricCoords( const gp_XY& point,
+                             const gp_XY& t0, const gp_XY& t1, const gp_XY& t2,
+                             double &    bc0, double &    bc1);
 
   /*!
    * Return a face having linked nodes n1 and n2 and which is
@@ -107,35 +123,40 @@ namespace SMESH_MeshAlgos
    * - in elemSet provided that !elemSet.empty()
    * i1 and i2 optionally returns indices of n1 and n2
    */
-  SMESHUtils_EXPORT const SMDS_MeshElement* 
-    FindFaceInSet(const SMDS_MeshNode*    n1,
-                  const SMDS_MeshNode*    n2,
-                  const TIDSortedElemSet& elemSet,
-                  const TIDSortedElemSet& avoidSet,
-                  int*                    i1=0,
-                  int*                    i2=0);
+  SMESHUtils_EXPORT
+  const SMDS_MeshElement* FindFaceInSet(const SMDS_MeshNode*    n1,
+                                        const SMDS_MeshNode*    n2,
+                                        const TIDSortedElemSet& elemSet,
+                                        const TIDSortedElemSet& avoidSet,
+                                        int*                    i1=0,
+                                        int*                    i2=0);
   /*!
    * \brief Calculate normal of a mesh face
    */
-  SMESHUtils_EXPORT bool FaceNormal(const SMDS_MeshElement* F, gp_XYZ& normal, bool normalized=true);
+  SMESHUtils_EXPORT
+  bool FaceNormal(const SMDS_MeshElement* F, gp_XYZ& normal, bool normalized=true);
 
   /*!
    * \brief Return nodes common to two elements
    */
-  SMESHUtils_EXPORT std::vector< const SMDS_MeshNode*> GetCommonNodes(const SMDS_MeshElement* e1,
+  SMESHUtils_EXPORT
+  std::vector< const SMDS_MeshNode*> GetCommonNodes(const SMDS_MeshElement* e1,
                                                     const SMDS_MeshElement* e2);
 
   /*!
    * \brief Return SMESH_NodeSearcher. The caller is responsible for deleteing it
    */
-  SMESHUtils_EXPORT SMESH_NodeSearcher* GetNodeSearcher( SMDS_Mesh& mesh );
+  SMESHUtils_EXPORT
+  SMESH_NodeSearcher* GetNodeSearcher( SMDS_Mesh& mesh );
 
   /*!
    * \brief Return SMESH_ElementSearcher. The caller is responsible for deleting it
    */
-  SMESHUtils_EXPORT SMESH_ElementSearcher* GetElementSearcher( SMDS_Mesh& mesh );
-  SMESHUtils_EXPORT SMESH_ElementSearcher* GetElementSearcher( SMDS_Mesh& mesh,
-                                                               SMDS_ElemIteratorPtr elemIt );
+  SMESHUtils_EXPORT
+  SMESH_ElementSearcher* GetElementSearcher( SMDS_Mesh& mesh );
+  SMESHUtils_EXPORT
+  SMESH_ElementSearcher* GetElementSearcher( SMDS_Mesh& mesh,
+                                             SMDS_ElemIteratorPtr elemIt );
 }
 
 #endif
index 483fcf37aa6f5aa3b3d17e1bca5a3a31055d4eef..45ceb21b32b0e829d4776aa47ee7ccfeab99237f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ebcc8dd64b694ecc50e96f182f4d3a83fba8e121..df25fd5739ef1717854a96f552108eaafae36caf 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 95353575fe7d32ada94f2ec4f87b366d2d8de72e..1c85e046994b73f160fccc55b044ef8403bca546 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -222,6 +222,7 @@ bool SMESH_OctreeNode::NodesAround(const gp_XYZ &node,
     }
     else if ( NbNodes() > 0 )
     {
+      size_t nbFoundBefore = dist2Nodes.size();
       double minDist = precision * precision;
       gp_Pnt p1 ( node.X(), node.Y(), node.Z() );
       TIDSortedNodeSet::iterator nIt = myNodes.begin();
@@ -235,7 +236,7 @@ bool SMESH_OctreeNode::NodesAround(const gp_XYZ &node,
 //       if ( dist2Nodes.size() > 1 ) // leave only closest node in dist2Nodes
 //         dist2Nodes.erase( ++dist2Nodes.begin(), dist2Nodes.end());
 
-      return ( sqrt( minDist) <= precision * 1e-12 );
+      return ( nbFoundBefore < dist2Nodes.size() );
     }
   }
   return false;
index a4bd318460490d1f319e1cf9f5fdbc849673ec71..dac8766ba7211b193800788ba07488b63c6adc76 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 041d0f696d7f1920c44146fc80688a2ca4ce96d9..c5724304394c7a7a943ec0e4b9359b589f0a6e4b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1afb599f39823fc97123f786999e1c751f3b82a8..59ede255d6b4a93977904bd8447be57730d42915 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index cb821ce71a71460dcd126c09be2477e8ab955817..4c0e16a7ed0424901da5f22a6f7c3cf4269d861c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 486ec24ad7ce2b025e03d33427e88c32863f1d72..eaac4e60d0a9769e91ad9afc1e9012f84e21ee9b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 6a9d53621b530dd8ea4c63ad2063b5e3a37ceec4..00fbcef584eddea00a5a4ed654ca53992264eaa4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2555cc371e6581ba8f0c9b870639b71fda071ef8..2d116bf9c1efeb317c0a27ae29b4c3b9f1134e89 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 #include "SMESH_Utils.hxx"
 
-#include <SMDS_MeshNode.hxx>
+#include "SMDS_MeshNode.hxx"
 
 #include <gp_XYZ.hxx>
+#include <gp_XY.hxx>
 
 #include <map>
 #include <list>
@@ -42,7 +43,7 @@ typedef std::map<const SMDS_MeshElement*,
                  std::list<const SMDS_MeshElement*>, TIDCompare > TElemOfElemListMap;
 typedef std::map<const SMDS_MeshElement*,
                  std::list<const SMDS_MeshNode*>,    TIDCompare > TElemOfNodeListMap;
-typedef std::map<const SMDS_MeshNode*, const SMDS_MeshNode*> TNodeNodeMap;
+typedef std::map<const SMDS_MeshNode*, const SMDS_MeshNode*>      TNodeNodeMap;
 
 //!< Set of elements sorted by ID, to be used to assure predictability of edition
 typedef std::set< const SMDS_MeshElement*, TIDCompare >      TIDSortedElemSet;
@@ -50,8 +51,8 @@ typedef std::set< const SMDS_MeshNode*,    TIDCompare >      TIDSortedNodeSet;
 
 typedef std::pair< const SMDS_MeshNode*, const SMDS_MeshNode* >   NLink;
 
-struct faceQuadStruct; // defined in StdMeshers_Quadrangle_2D.hxx
-typedef boost::shared_ptr<faceQuadStruct> TFaceQuadStructPtr;
+struct FaceQuadStruct; // defined in StdMeshers_Quadrangle_2D.hxx
+typedef boost::shared_ptr<FaceQuadStruct> TFaceQuadStructPtr;
 
 
 namespace SMESHUtils
@@ -71,6 +72,30 @@ namespace SMESHUtils
     TVECTOR v2( vec );
     vec.swap( v2 );
   }
+  /*!
+   * \brief Auto pointer
+   */
+  template <typename TOBJ>
+  struct Deleter
+  {
+    TOBJ* _obj;
+    Deleter( TOBJ* obj ): _obj( obj ) {}
+    ~Deleter() { delete _obj; _obj = 0; }
+  private:
+    Deleter( const Deleter& );
+  };
+  /*!
+   * \brief Auto pointer to array
+   */
+  template <typename TOBJ>
+  struct ArrayDeleter
+  {
+    TOBJ* _obj;
+    ArrayDeleter( TOBJ* obj ): _obj( obj ) {}
+    ~ArrayDeleter() { delete [] _obj; _obj = 0; }
+  private:
+    ArrayDeleter( const ArrayDeleter& );
+  };
 }
 
 //=======================================================================
@@ -137,6 +162,10 @@ typedef struct uvPtStruct
   double x, y; // 2d parameter, normalized [0,1]
   const SMDS_MeshNode * node;
 
+  uvPtStruct(): node(NULL) {}
+
+  inline gp_XY UV() const { return gp_XY( u, v ); }
+
   struct NodeAccessor // accessor to iterate on nodes in UVPtStructVec
   {
     static const SMDS_MeshNode* value(std::vector< uvPtStruct >::const_iterator it)
@@ -166,46 +195,4 @@ DEFINE_BASECOLLECTION (SMESH_BaseCollectionNodePtr, SMDS_MeshNodePtr)
 DEFINE_SEQUENCE(SMESH_SequenceOfNode,
                 SMESH_BaseCollectionNodePtr, SMDS_MeshNodePtr)
 
-// --------------------------------------------------------------------------------
-// #include "SMESHDS_DataMapOfShape.hxx"
-
-// #include <NCollection_DefineIndexedMap.hxx>
-
-// #include <TopoDS_Shape.hxx>
-
-///  Class SMESH_IndexedMapOfShape
-
-// DEFINE_BASECOLLECTION (SMESH_BaseCollectionShape, TopoDS_Shape)
-// DEFINE_INDEXEDMAP (SMESH_IndexedMapOfShape, SMESH_BaseCollectionShape, TopoDS_Shape)
-
-///  Class SMESH_IndexedDataMapOfShapeIndexedMapOfShape
-
-// DEFINE_BASECOLLECTION (SMESH_BaseCollectionIndexedMapOfShape, SMESH_IndexedMapOfShape)
-// DEFINE_INDEXEDDATAMAP (SMESH_IndexedDataMapOfShapeIndexedMapOfShape,
-//                        SMESH_BaseCollectionIndexedMapOfShape, TopoDS_Shape,
-//                        SMESH_IndexedMapOfShape)
-
-// --------------------------------------------------------------------------------
-// class SMESH_DataMapOfElemPtrSequenceOfElemPtr
-
-// SMESHUtils_EXPORT 
-// inline Standard_Integer HashCode(SMDS_MeshElementPtr theElem,
-//                                  const Standard_Integer theUpper)
-// {
-//   void* anElem = (void*) theElem;
-//   return HashCode(anElem,theUpper);
-// }
-
-// SMESHUtils_EXPORT 
-// inline Standard_Boolean IsEqual(SMDS_MeshElementPtr theOne,
-//                                 SMDS_MeshElementPtr theTwo)
-// {
-//   return theOne == theTwo;
-// }
-
-// DEFINE_BASECOLLECTION (SMESH_BaseCollectionSequenceOfElemPtr, SMESH_SequenceOfElemPtr)
-// DEFINE_DATAMAP (SMESH_DataMapOfElemPtrSequenceOfElemPtr,
-//                 SMESH_BaseCollectionSequenceOfElemPtr,
-//                 SMDS_MeshElementPtr, SMESH_SequenceOfElemPtr)
-
 #endif
index 815c1c435f68f0ad4c28505686fba0cc42da0173..88a6a9305d2f344d81a0387428a6b1ec2257d412 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7eaa07cf3f80237dfcebc99ceaf5714d5f19dba8..3643f0928f6fdc8c82bccaa8de9e0f4d6d30fc57 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -80,6 +80,7 @@ SET(_link_LIBRARIES
   SMDS
   SMESHDS
   SMESHControls
+  MeshDriverMED
 )
 
 # --- headers ---
index 4565eb8b7c69c33eab3da4da3a090aec3a2962fc..bd2a48bec483011754a3785428355cc2eede184c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 55ef4964563c8376ab7d5837c57121a762df3f59..a97a169cca1161a5432fdf73809e82ce44e5850b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e0c9017c5dfb4052ab92468dbd7c763822d9275b..c401cd258281ebaf5d8a1163f5e30e77b6ad6568 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b433eb9e1f486876d85a588b76b1b7d2b7971612..7f7d1a4c3d2896e66651720cf22816d2012a0d9b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f7b2f6b283b7e55279acc384457b78770b22bdd3..107187977122d38bb0e19c7b0e4885841a99b957 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 36114f9c3977de6428a4b3a8a15da1726f1a0fd4..92cb289b6d44561458e832ec091185e51ac9f179 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f527b7dc9a6c5866d32a88b0e6f2ccf57c9a5906..da442b4c1c6c223b9d9f5b8a562a4c3fa8cd055a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 929da0dcf43bc2518b5e946ff3dd1d90e88374f8..f5595c08aaa65e5298d0e8903ba69778bddf47ce 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -372,7 +372,7 @@ namespace {
    */
   //================================================================================
 
-  void StructToList( Handle( _pyCommand)& theCommand )
+  void StructToList( Handle( _pyCommand)& theCommand, const bool checkMethod=true )
   {
     static TStringSet methodsAcceptingList;
     if ( methodsAcceptingList.empty() ) {
@@ -386,11 +386,11 @@ namespace {
         "ExtrusionSweepObject2D","ExtrusionSweepObject2DMakeGroups",
         "Translate","TranslateMakeGroups","TranslateMakeMesh",
         "TranslateObject","TranslateObjectMakeGroups", "TranslateObjectMakeMesh",
-        "ExtrusionAlongPathX","ExtrusionAlongPathObjX"
+        "ExtrusionAlongPathX","ExtrusionAlongPathObjX","SplitHexahedraIntoPrisms"
         ,"" }; // <- mark of the end
       methodsAcceptingList.Insert( methodNames );
     }
-    if ( methodsAcceptingList.Contains( theCommand->GetMethod() ))
+    if ( !checkMethod || methodsAcceptingList.Contains( theCommand->GetMethod() ))
     {
       for ( int i = theCommand->GetNbArgs(); i > 0; --i )
       {
@@ -1963,9 +1963,9 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
       TCollection_AsciiString newMethod = method;
       newMethod.Remove( 7, 6 );
       theCommand->SetMethod( newMethod );
-      // make the 1st arg be the last one (or last but one for ExportMED())
+      // make the 1st arg be the last one (or last but three for ExportMED())
       _pyID partID = theCommand->GetArg( 1 );
-      int nbArgs = theCommand->GetNbArgs() - (newMethod == "ExportMED");
+      int nbArgs = theCommand->GetNbArgs() - 3 * (newMethod == "ExportMED");
       for ( int i = 2; i <= nbArgs; ++i )
         theCommand->SetArg( i-1, theCommand->GetArg( i ));
       theCommand->SetArg( nbArgs, partID );
@@ -2075,6 +2075,7 @@ bool _pyMesh::NeedMeshAccess( const Handle(_pyCommand)& theCommand )
         "GetSubMeshElementsId","GetSubMeshNodesId","GetSubMeshElementType","Dump","GetNodeXYZ",
         "GetNodeInverseElements","GetShapeID","GetShapeIDForElem","GetElemNbNodes",
         "GetElemNode","IsMediumNode","IsMediumNodeOfAnyElem","ElemNbEdges","ElemNbFaces",
+        "GetElemFaceNodes", "GetFaceNormal", "FindElementByNodes",
         "IsPoly","IsQuadratic","BaryCenter","GetHypothesisList", "SetAutoColor", "GetAutoColor",
         "Clear", "ConvertToStandalone", "GetMeshOrder", "SetMeshOrder"
         ,"" }; // <- mark of end
@@ -2375,7 +2376,7 @@ void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand)
       "GetLastCreatedElems",
       "MirrorMakeMesh","MirrorObjectMakeMesh","TranslateMakeMesh","TranslateObjectMakeMesh",
       "Scale","ScaleMakeMesh","RotateMakeMesh","RotateObjectMakeMesh","MakeBoundaryMesh",
-      "MakeBoundaryElements", "SplitVolumesIntoTetra",
+      "MakeBoundaryElements", "SplitVolumesIntoTetra","SplitHexahedraIntoPrisms",
       "DoubleElements","DoubleNodes","DoubleNode","DoubleNodeGroup","DoubleNodeGroups",
       "DoubleNodeElem","DoubleNodeElemInRegion","DoubleNodeElemGroup",
       "DoubleNodeElemGroupInRegion","DoubleNodeElemGroups","DoubleNodeElemGroupsInRegion",
@@ -2631,6 +2632,8 @@ Handle(_pyHypothesis) _pyHypothesis::NewHypothesis( const Handle(_pyCommand)& th
     hyp->SetConvMethodAndType( "SetGrid", "Cartesian_3D");
     for ( int iArg = 0; iArg < 4; ++iArg )
       hyp->setCreationArg( iArg+1, "[]");
+    hyp->AddAccumulativeMethod( "SetGrid" );
+    hyp->AddAccumulativeMethod( "SetGridSpacing" );
   }
   else
   {
@@ -3089,9 +3092,11 @@ void _pyComplexParamHypo::Process( const Handle(_pyCommand)& theCommand)
   {
     // CartesianParameters3D hyp
 
-    if ( theCommand->GetMethod() == "SetSizeThreshold" )
+    if ( theCommand->GetMethod() == "SetSizeThreshold"  ||
+         theCommand->GetMethod() == "SetToAddEdges" )
     {
-      setCreationArg( 4, theCommand->GetArg( 1 ));
+      int iEdges = ( theCommand->GetMethod().Value( 4 ) == 'T' );
+      setCreationArg( 4+iEdges, theCommand->GetArg( 1 ));
       myArgCommands.push_back( theCommand );
       return;
     }
@@ -3113,7 +3118,9 @@ void _pyComplexParamHypo::Process( const Handle(_pyCommand)& theCommand)
         myCurCrMethod->myArgs[ iArg ] += "]";
       }
       myArgCommands.push_back( theCommand );
-      rememberCmdOfParameter( theCommand );
+      //rememberCmdOfParameter( theCommand ); -- these commands are marked as
+      //                                  accumulative, else, if the creation
+      //                 is not converted, commands for axes 1 and 2 are lost
       return;
     }
   }
@@ -3154,13 +3161,23 @@ void _pyComplexParamHypo::Flush()
     for ( ; cmd != myUnusedCommands.end(); ++cmd )
       if ((*cmd)->GetMethod() == "SetObjectEntry" )
         (*cmd)->Clear();
+
+    if ( GetAlgoType() == "Cartesian_3D" )
+    {
+      _pyID algo = myCreationCmd->GetObject();
+      for ( cmd = myProcessedCmds.begin(); cmd != myProcessedCmds.end(); ++cmd )
+      {
+        StructToList( *cmd, /*checkMethod=*/false );
+        (*cmd)->SetObject( algo );
+      }
+    }
   }
 }
 
 //================================================================================
 /*!
  * \brief Convert methods of 1D hypotheses to my own methods
 * \param theCommand - The called hypothesis method
+ * \param theCommand - The called hypothesis method
  */
 //================================================================================
 
index 9008d0a563f4852302e08b10a745c5cd01bc2884..4e6531ddee31c3ed6e9785afc58f6e2f9a19853d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 07fe7b4db0cdaaf147281ba179a7035dcd0d2c52..178d906c8a7058d95a6ffe2bbe8617ebbf175a75 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d47bdade86d87997f0cbed434be62b7b4d6363ec..a18bbab1b9fab96ca3b746221090196fe3ccb7fd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index df7276aad07b60c901ff25ba979c279aa1260fa7..3001b765061969c1371fadf98e3f6b50ff50b54c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 357e12ef0dc149a2e09b369bc2c508d197cbdd63..70f041860edaacf217a4a38a62b624260497c407 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 43ffd029bf2d152242bcdc67fd1a3983183b5dfe..494722b8aee4837c73bfe0e7c9939e93aede4662 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -240,13 +240,20 @@ namespace SMESH
   template<class TArray>
   void DumpArray(const TArray& theArray, TPythonDump & theStream)
   {
-    theStream << "[ ";
-    for (int i = 1; i <= theArray.length(); i++) {
-      theStream << theArray[i-1];
-      if ( i < theArray.length() )
-        theStream << ", ";
+    if ( theArray.length() == 0 )
+    {
+      theStream << "[]";
+    }
+    else
+    {
+      theStream << "[ ";
+      for (int i = 1; i <= theArray.length(); i++) {
+        theStream << theArray[i-1];
+        if ( i < theArray.length() )
+          theStream << ", ";
+      }
+      theStream << " ]";
     }
-    theStream << " ]";
   }
 
   TPythonDump&
@@ -263,6 +270,13 @@ namespace SMESH
     return *this;
   }
 
+  TPythonDump&
+  TPythonDump::operator<<(const SMESH::nodes_array& theArg)
+  {
+    DumpArray( theArg, *this );
+    return *this;
+  }
+
   TPythonDump&
   TPythonDump::operator<<(const SMESH::string_array& theArray)
   {
@@ -517,6 +531,16 @@ namespace SMESH
     DumpArray( *theList, *this );
     return *this;
   }
+  TPythonDump& TPythonDump::operator<<(const GEOM::ListOfGO& theList)
+  {
+    DumpArray( theList, *this );
+    return *this;
+  }
+  TPythonDump& TPythonDump::operator<<(const GEOM::ListOfGBO& theList)
+  {
+    DumpArray( theList, *this );
+    return *this;
+  }
   TPythonDump& TPythonDump::operator<<(const SMESH::ListOfIDSources& theList)
   {
     DumpArray( theList, *this );
index 5ccc12bff946e60b75af5b70f72c15855be05fe8..351a0f2683985d994b98e9231bd16631cf407dcd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 87684f25715f4357d158a4475f472038c02d9e37..92c4618df1bc21d77a11d057c435f77639c83331 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5bcf88bda36dcc27229ed75bdc81c6624b677f26..718d2bc945e0d4ace64c19f95c881081571da994 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -93,7 +93,7 @@
 #include "SMESH_Mesh_i.hxx"
 #include "SMESH_PreMeshInfo.hxx"
 #include "SMESH_PythonDump.hxx"
-//#include "memoire.h"
+#include "SMESH_TryCatch.hxx" // to include after OCC headers!
 
 #include CORBA_SERVER_HEADER(SMESH_Group)
 #include CORBA_SERVER_HEADER(SMESH_Filter)
@@ -355,20 +355,20 @@ SMESH_Gen_i::~SMESH_Gen_i()
   if ( myShapeReader )
     delete myShapeReader;
 }
-
 //=============================================================================
 /*!
- *  SMESH_Gen_i::createHypothesis
+ *  SMESH_Gen_i::getHypothesisCreator
  *
- *  Create hypothesis of given type
+ *  Get hypothesis creator
  */
 //=============================================================================
-SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName,
-                                                          const char* theLibName)
+GenericHypothesisCreator_i* SMESH_Gen_i::getHypothesisCreator(const char* theHypName,
+                                                              const char* theLibName,
+                                                              std::string& thePlatformLibName)
   throw (SALOME::SALOME_Exception)
 {
-  /* It's Need to tranlate lib name for WIN32 or X platform */
   std::string aPlatformLibName;
+  /* It's Need to tranlate lib name for WIN32 or X platform */
   if ( theLibName && theLibName[0] != '\0'  )
   {
     int libNameLen = strlen(theLibName);
@@ -395,14 +395,13 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
 #endif
     }
   }
+  thePlatformLibName = aPlatformLibName;
 
   Unexpect aCatch(SALOME_SalomeException);
   if(MYDEBUG) MESSAGE( "Create Hypothesis <" << theHypName << "> from " << aPlatformLibName);
 
-  // create a new hypothesis object servant
-  SMESH_Hypothesis_i* myHypothesis_i = 0;
-  SMESH::SMESH_Hypothesis_var hypothesis_i;
-
+  typedef GenericHypothesisCreator_i* (*GetHypothesisCreator)(const char* );
+  GenericHypothesisCreator_i* aCreator;
   try
   {
     // check, if creator for this hypothesis type already exists
@@ -424,7 +423,6 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
 
       // get method, returning hypothesis creator
       if(MYDEBUG) MESSAGE("Find GetHypothesisCreator() method ...");
-      typedef GenericHypothesisCreator_i* (*GetHypothesisCreator)(const char* theHypName);
       GetHypothesisCreator procHandle =
         (GetHypothesisCreator)GetProc( libHandle, "GetHypothesisCreator" );
       if (!procHandle)
@@ -435,26 +433,47 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
 
       // get hypothesis creator
       if(MYDEBUG) MESSAGE("Get Hypothesis Creator for " << theHypName);
-      GenericHypothesisCreator_i* aCreator = procHandle(theHypName);
+      aCreator = procHandle(theHypName);
       if (!aCreator)
       {
         throw(SALOME_Exception(LOCALIZED("no such a hypothesis in this plugin")));
       }
-
       // map hypothesis creator to a hypothesis name
       myHypCreatorMap[string(theHypName)] = aCreator;
+      return aCreator;
+    }
+    else
+    {
+      return myHypCreatorMap[string(theHypName)];
     }
-
-    // create a new hypothesis object, store its ref. in studyContext
-    if(MYDEBUG) MESSAGE("Create Hypothesis " << theHypName);
-    myHypothesis_i =
-      myHypCreatorMap[string(theHypName)]->Create(myPoa, GetCurrentStudyID(), &myGen);
-    myHypothesis_i->SetLibName(aPlatformLibName.c_str()); // for persistency assurance
   }
   catch (SALOME_Exception& S_ex)
   {
     THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
   }
+  return aCreator;
+}
+
+//=============================================================================
+/*!
+ *  SMESH_Gen_i::createHypothesis
+ *
+ *  Create hypothesis of given type
+ */
+//=============================================================================
+SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName,
+                                                          const char* theLibName)
+{
+  SMESH_Hypothesis_i* myHypothesis_i = 0;
+  SMESH::SMESH_Hypothesis_var hypothesis_i;
+  std::string aPlatformLibName;
+  typedef GenericHypothesisCreator_i* (*GetHypothesisCreator)(const char* );
+  GenericHypothesisCreator_i* aCreator = getHypothesisCreator(theHypName, theLibName, aPlatformLibName);
+  // create a new hypothesis object, store its ref. in studyContext
+  if(MYDEBUG) MESSAGE("Create Hypothesis " << theHypName);
+  myHypothesis_i =
+      myHypCreatorMap[string(theHypName)]->Create(myPoa, GetCurrentStudyID(), &myGen);
+  myHypothesis_i->SetLibName(aPlatformLibName.c_str()); // for persistency assurance
 
   if (!myHypothesis_i)
     return hypothesis_i._retn();
@@ -621,7 +640,7 @@ void SMESH_Gen_i::setCurrentStudy( SALOMEDS::Study_ptr theStudy,
           SALOMEDS::SObject_wrap so = anIter->Value();
           CORBA::Object_var     ior = SObjectToObject( so );
           if ( SMESH_Mesh_i*   mesh = SMESH::DownCast<SMESH_Mesh_i*>( ior ))
-            mesh->CheckGeomGroupModif();
+            mesh->CheckGeomModif();
         }
       }
     }
@@ -1723,7 +1742,7 @@ CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh,
     ASSERT( meshServant );
     if ( meshServant ) {
       // NPAL16168: "geometrical group edition from a submesh don't modifiy mesh computation"
-      meshServant->CheckGeomGroupModif();
+      meshServant->CheckGeomModif();
       // get local TopoDS_Shape
       TopoDS_Shape myLocShape;
       if(theMesh->HasShapeToMesh())
@@ -1805,7 +1824,7 @@ SMESH::MeshPreviewStruct* SMESH_Gen_i::Precompute( SMESH::SMESH_Mesh_ptr theMesh
     ASSERT( meshServant );
     if ( meshServant ) {
       // NPAL16168: "geometrical group edition from a submesh don't modifiy mesh computation"
-      meshServant->CheckGeomGroupModif();
+      meshServant->CheckGeomModif();
       // get local TopoDS_Shape
       TopoDS_Shape myLocShape;
       if(theMesh->HasShapeToMesh())
@@ -2001,7 +2020,7 @@ SMESH::long_array* SMESH_Gen_i::Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
     ASSERT( meshServant );
     if ( meshServant ) {
       // NPAL16168: "geometrical group edition from a submesh don't modifiy mesh computation"
-      meshServant->CheckGeomGroupModif();
+      meshServant->CheckGeomModif();
       // get local TopoDS_Shape
       TopoDS_Shape myLocShape;
       if(theMesh->HasShapeToMesh())
@@ -2635,6 +2654,7 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CopyMesh(SMESH::SMESH_IDSource_ptr meshPart,
   SMESH::array_of_ElementType_var srcElemTypes = meshPart->GetTypes();
   if ( SMESH::DownCast<SMESH_Mesh_i*>( meshPart ))
   {
+    srcMesh_i->Load();
     srcElemIt = srcMeshDS->elementsIterator();
     srcNodeIt = srcMeshDS->nodesIterator();
   }
@@ -2701,10 +2721,15 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CopyMesh(SMESH::SMESH_IDSource_ptr meshPart,
       const SMDS_MeshElement * newElem;
       switch ( elem->GetEntityType() ) {
       case SMDSEntity_Polyhedra:
-        newElem = editor.GetMeshDS()->
-          AddPolyhedralVolumeWithID( nodes,
-                                     static_cast<const SMDS_VtkVolume*>(elem)->GetQuantities(),
-                                     ID);
+        if ( toKeepIDs )
+          newElem = editor.GetMeshDS()->
+            AddPolyhedralVolumeWithID( nodes,
+                                       static_cast<const SMDS_VtkVolume*>(elem)->GetQuantities(),
+                                       ID);
+        else
+          newElem = editor.GetMeshDS()->
+            AddPolyhedralVolume( nodes,
+                                 static_cast<const SMDS_VtkVolume*>(elem)->GetQuantities());
         break;
       case SMDSEntity_Ball:
         newElem = editor.AddElement( nodes, SMDSAbs_Ball, false, ID,
@@ -5042,13 +5067,42 @@ void SMESH_Gen_i::Move( const SMESH::sobject_list& what,
       useCaseBuilder->AppendTo( where, sobj );        // append to the end of list
   }
 }
+//=================================================================================
+// function : IsApplicable
+// purpose  : Return true if algorithm can be applied
+//=================================================================================
+CORBA::Boolean SMESH_Gen_i::IsApplicable ( const char*           theAlgoType,
+                                           const char*           theLibName,
+                                           GEOM::GEOM_Object_ptr theGeomObject,
+                                           CORBA::Boolean        toCheckAll)
+{
+  SMESH_TRY;
+
+  std::string aPlatformLibName;
+  typedef GenericHypothesisCreator_i* (*GetHypothesisCreator)(const char*);
+  GenericHypothesisCreator_i* aCreator = getHypothesisCreator(theAlgoType, theLibName, aPlatformLibName);
+  if (aCreator)
+  {
+    TopoDS_Shape shape = GeomObjectToShape( theGeomObject );
+    if ( !shape.IsNull() )
+      return aCreator->IsApplicable( shape, toCheckAll );
+  }
+  else
+  {
+    return false;
+  }
+
+  SMESH_CATCH( SMESH::doNothing );
+  return true;
+}
 
 //=================================================================================
 // function : importData
 // purpose  : imports mesh data file (the med one) into the SMESH internal data structure
 //=================================================================================
-Engines::ListOfIdentifiers* SMESH_Gen_i::importData(
-  CORBA::Long studyId, Engines::DataContainer_ptr data, const Engines::ListOfOptions& options)
+Engines::ListOfIdentifiers* SMESH_Gen_i::importData(CORBA::Long                   studyId,
+                                                    Engines::DataContainer_ptr    data,
+                                                    const Engines::ListOfOptions& options)
 {
   Engines::ListOfIdentifiers_var aResultIds = new Engines::ListOfIdentifiers;
   list<string> aResultList;
index 6b134e51f065449ad93babf5f350f308f858e335..3405a83750840b9a68b6f6f72bec51f53d7b5671 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -595,13 +595,20 @@ public:
   void Move( const SMESH::sobject_list& what,
              SALOMEDS::SObject_ptr where,
              CORBA::Long row );
+  CORBA::Boolean IsApplicable ( const char*           theAlgoType,
+                                const char*           theLibName,
+                                GEOM::GEOM_Object_ptr theShapeObject,
+                                CORBA::Boolean        toCheckAll);
 
 private:
+  // Get hypothesis creator
+  GenericHypothesisCreator_i* getHypothesisCreator( const char*  theHypName,
+                                                    const char*  theLibName,
+                                                    std::string& thePlatformLibName)
+  throw ( SALOME::SALOME_Exception );
   // Create hypothesis of given type
   SMESH::SMESH_Hypothesis_ptr createHypothesis( const char* theHypName,
-                                                const char* theLibName)
-    throw ( SALOME::SALOME_Exception );
-
+                                                const char* theLibName);
   // Create empty mesh on shape
   SMESH::SMESH_Mesh_ptr createMesh()
     throw ( SALOME::SALOME_Exception );
index a3bc1733171339e1d0f5e16efeb89cd3e41a892a..f155ae93d20ed6714e37a0d8ed3b7f0c9e6b6bca 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 76dae46734525895a5d4f03339a742e0e1c7cb07..ebdd1052c2e599827517a3f5788f01985711aab8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -411,9 +411,9 @@ CORBA::Long SMESH_Group_i::AddFrom( SMESH::SMESH_IDSource_ptr theSource )
   long prevNb = Size();
   SMESHDS_Group* aGroupDS = dynamic_cast<SMESHDS_Group*>( GetGroupDS() );
   if (aGroupDS) {
-    SMDS_ElemIteratorPtr elemIt = SMESH_Mesh_i::GetElements( theSource, GetType() );
-    while ( elemIt->more() )
-      aGroupDS->SMDSGroup().Add( elemIt->next() );
+    if ( SMDS_ElemIteratorPtr elemIt = SMESH_Mesh_i::GetElements( theSource, GetType() ))
+      while ( elemIt->more() )
+        aGroupDS->SMDSGroup().Add( elemIt->next() );
   }
 
   // Update Python script
index 152abd53c0d1d3b3e2f55598a36e4a76ce1afa2e..f08e51b2440772c3d89ebf24d132797766a2b968 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c1b5c956a72edb85ca224c2fe54e358c5fced769..ceac6085ef184f55670319264a808c773afb79bb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 835131af0a51999685e7e12f20726f64421674cd..5cc8e54d961ecf6c7a29b7c7da6c042eedc8c49a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -134,6 +134,7 @@ public:
                                      ::SMESH_Gen*            theGenImpl) = 0;
   // return the name of IDL module
   virtual std::string GetModuleName() = 0;
+  virtual bool IsApplicable( const TopoDS_Shape &S, bool toCheckAll ) {return true;}
 };
 
 //=============================================================================
index 5107e5b2bf35edc2b10617665afacd44206af6c8..d0de81b916b93c0c121ba2421b941aa40ed7af13 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f7135ae44c970ffc127ab995fe59e1cbce0593dd..127017c5a6370848d7f26b37e710b51c44077b92 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 69bf34ec12d21a49fba0617182175f699810c31c..9de57c975706a25fbf79216219c01df44de7816e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1999,13 +1999,15 @@ void SMESH_MeshEditor_i::SplitVolumesIntoTetra (SMESH::SMESH_IDSource_ptr elems,
 {
   SMESH_TRY;
   initData();
-
   prepareIdSource( elems );
-  SMESH::long_array_var anElementsId = elems->GetIDs();
-  TIDSortedElemSet elemSet;
-  arrayToSet( anElementsId, getMeshDS(), elemSet, SMDSAbs_Volume );
 
-  getEditor().SplitVolumesIntoTetra( elemSet, int( methodFlags ));
+  ::SMESH_MeshEditor::TFacetOfElem elemSet;
+  const int noneFacet = -1;
+  SMDS_ElemIteratorPtr volIt = myMesh_i->GetElements( elems, SMESH::VOLUME );
+  while( volIt->more() )
+    elemSet.insert( elemSet.end(), make_pair( volIt->next(), noneFacet ));
+
+  getEditor().SplitVolumes( elemSet, int( methodFlags ));
   declareMeshModified( /*isReComputeSafe=*/true ); // it does not influence Compute()
 
   TPythonDump() << this << ".SplitVolumesIntoTetra( "
@@ -2014,6 +2016,70 @@ void SMESH_MeshEditor_i::SplitVolumesIntoTetra (SMESH::SMESH_IDSource_ptr elems,
   SMESH_CATCH( SMESH::throwCorbaException );
 }
 
+//================================================================================
+/*!
+ * \brief Split hexahedra into triangular prisms
+ *  \param elems - elements to split
+ *  \param facetToSplitNormal - normal used to find a facet of hexahedron
+ *         to split into triangles
+ *  \param methodFlags - flags passing splitting method:
+ *         1 - split the hexahedron into 2 prisms
+ *         2 - split the hexahedron into 4 prisms
+ */
+//================================================================================
+
+void SMESH_MeshEditor_i::SplitHexahedraIntoPrisms (SMESH::SMESH_IDSource_ptr  elems,
+                                                   const SMESH::PointStruct & startHexPoint,
+                                                   const SMESH::DirStruct&    facetToSplitNormal,
+                                                   CORBA::Short               methodFlags,
+                                                   CORBA::Boolean             allDomains)
+  throw (SALOME::SALOME_Exception)
+{
+  SMESH_TRY;
+  initData();
+  prepareIdSource( elems );
+
+  gp_Ax1 facetNorm( gp_Pnt( startHexPoint.x,
+                            startHexPoint.y,
+                            startHexPoint.z ),
+                    gp_Dir( facetToSplitNormal.PS.x,
+                            facetToSplitNormal.PS.y,
+                            facetToSplitNormal.PS.z ));
+  TIDSortedElemSet elemSet;
+  SMESH::long_array_var anElementsId = elems->GetIDs();
+  SMDS_MeshElement::GeomFilter filter( SMDSGeom_HEXA );
+  arrayToSet( anElementsId, getMeshDS(), elemSet, SMDSAbs_Volume, &filter );
+
+  ::SMESH_MeshEditor::TFacetOfElem elemFacets;
+  while ( !elemSet.empty() )
+  {
+    getEditor().GetHexaFacetsToSplit( elemSet, facetNorm, elemFacets );
+    if ( !allDomains )
+      break;
+
+    ::SMESH_MeshEditor::TFacetOfElem::iterator ef = elemFacets.begin();
+    for ( ; ef != elemFacets.end(); ++ef )
+      elemSet.erase( ef->first );
+  }
+
+  if ( methodFlags == 2 )
+    methodFlags = int( ::SMESH_MeshEditor::HEXA_TO_4_PRISMS );
+  else
+    methodFlags = int( ::SMESH_MeshEditor::HEXA_TO_2_PRISMS );
+
+  getEditor().SplitVolumes( elemFacets, int( methodFlags ));
+  declareMeshModified( /*isReComputeSafe=*/true ); // it does not influence Compute()
+
+  TPythonDump() << this << ".SplitHexahedraIntoPrisms( "
+                << elems << ", "
+                << startHexPoint << ", "
+                << facetToSplitNormal<< ", "
+                << methodFlags<< ", "
+                << allDomains << " )";
+
+  SMESH_CATCH( SMESH::throwCorbaException );
+}
+
 //=======================================================================
 //function : Smooth
 //purpose  :
@@ -5187,13 +5253,6 @@ SMESH::long_array* SMESH_MeshEditor_i::FindElementsByPoint(CORBA::Double      x,
   for ( int i = 0; i < foundElems.size(); ++i )
     res[i] = foundElems[i]->GetID();
 
-  if ( !myIsPreviewMode ) // call from tui
-    TPythonDump() << "res = " << this << ".FindElementsByPoint( "
-                  << x << ", "
-                  << y << ", "
-                  << z << ", "
-                  << type << " )";
-
   return res._retn();
 
   SMESH_CATCH( SMESH::throwCorbaException );
@@ -5255,14 +5314,6 @@ SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementID
   for ( int i = 0; i < foundElems.size(); ++i )
     res[i] = foundElems[i]->GetID();
 
-  if ( !myIsPreviewMode ) // call from tui
-    TPythonDump() << "res = " << this << ".FindAmongElementsByPoint( "
-                  << elementIDs << ", "
-                  << x << ", "
-                  << y << ", "
-                  << z << ", "
-                  << type << " )";
-
   return res._retn();
 
   SMESH_CATCH( SMESH::throwCorbaException );
@@ -6824,18 +6875,21 @@ CORBA::Boolean SMESH_MeshEditor_i::Make2DMeshFrom3D()
  * If there is no shared faces between the group #n and the group #p in the list, the group j_n_p is not created.
  * All the flat elements are gathered into the group named "joints3D" (or "joints2D" in 2D situation).
  * The flat element of the multiple junctions between the simple junction are stored in a group named "jointsMultiples".
- * @param theDomains - list of groups of volumes
- * @param createJointElems - if TRUE, create the elements
- * @return TRUE if operation has been completed successfully, FALSE otherwise
+ * \param theDomains - list of groups of volumes
+ * \param createJointElems - if TRUE, create the elements
+ * \param onAllBoundaries - if TRUE, the nodes and elements are also created on
+ *        the boundary between \a theDomains and the rest mesh
+ * \return TRUE if operation has been completed successfully, FALSE otherwise
  */
 //================================================================================
 
 CORBA::Boolean
 SMESH_MeshEditor_i::DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& theDomains,
-                                                  CORBA::Boolean             createJointElems )
+                                                  CORBA::Boolean             createJointElems,
+                                                  CORBA::Boolean             onAllBoundaries )
   throw (SALOME::SALOME_Exception)
 {
-  bool aResult = false;
+  bool isOK = false;
 
   SMESH_TRY;
   initData();
@@ -6843,10 +6897,11 @@ SMESH_MeshEditor_i::DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& the
   SMESHDS_Mesh* aMeshDS = getMeshDS();
 
   // MESSAGE("theDomains.length = "<<theDomains.length());
-  if ( theDomains.length() <= 1 )
+  if ( theDomains.length() <= 1 && !onAllBoundaries )
     THROW_SALOME_CORBA_EXCEPTION("At least 2 groups are required.", SALOME::BAD_PARAM);
+
   vector<TIDSortedElemSet> domains;
-  domains.clear();
+  domains.resize( theDomains.length() );
 
   for ( int i = 0, n = theDomains.length(); i < n; i++ )
   {
@@ -6855,26 +6910,25 @@ SMESH_MeshEditor_i::DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& the
     {
 //      if ( aGrp->GetType() != SMESH::VOLUME )
 //        THROW_SALOME_CORBA_EXCEPTION("Not a volume group", SALOME::BAD_PARAM);
-      TIDSortedElemSet domain;
-      domain.clear();
-      domains.push_back(domain);
       SMESH::long_array_var anIDs = aGrp->GetIDs();
       arrayToSet( anIDs, aMeshDS, domains[ i ], SMDSAbs_All );
     }
   }
 
-  aResult = getEditor().DoubleNodesOnGroupBoundaries( domains, createJointElems );
+  isOK = getEditor().DoubleNodesOnGroupBoundaries( domains, createJointElems, onAllBoundaries );
   // TODO publish the groups of flat elements in study
 
-  declareMeshModified( /*isReComputeSafe=*/ !aResult );
+  declareMeshModified( /*isReComputeSafe=*/ !isOK );
 
   // Update Python script
   TPythonDump() << "isDone = " << this << ".DoubleNodesOnGroupBoundaries( " << &theDomains
-      << ", " << createJointElems << " )";
+                << ", " << createJointElems << ", " << onAllBoundaries << " )";
 
   SMESH_CATCH( SMESH::throwCorbaException );
 
-  return aResult;
+  myMesh_i->CreateGroupServants(); // publish created groups if any
+
+  return isOK;
 }
 
 //================================================================================
index e74df378834285a2cc7c147dbfde1ddb327da45c..ead3048b05607721d39a334cef77fd3b6c75c736 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -233,6 +233,12 @@ public:
   void           SplitVolumesIntoTetra(SMESH::SMESH_IDSource_ptr elems,
                                        CORBA::Short             methodFlags)
     throw (SALOME::SALOME_Exception);
+  void           SplitHexahedraIntoPrisms(SMESH::SMESH_IDSource_ptr  elems,
+                                          const SMESH::PointStruct & startHexPoint,
+                                          const SMESH::DirStruct&    facetToSplitNormal,
+                                          CORBA::Short               methodFlags,
+                                          CORBA::Boolean             allDomains)
+    throw (SALOME::SALOME_Exception);
 
   CORBA::Boolean Smooth(const SMESH::long_array &              IDsOfElements,
                         const SMESH::long_array &              IDsOfFixedNodes,
@@ -917,12 +923,15 @@ public:
    * The nodes of the internal faces at the boundaries of the groups are doubled.
    * In option, the internal faces are replaced by flat elements.
    * Triangles are transformed in prisms, and quadrangles in hexahedrons.
-   * @param theDomains - list of groups of volumes
-   * @param createJointElems - if TRUE, create the elements
-   * @return TRUE if operation has been completed successfully, FALSE otherwise
+   * \param theDomains - list of groups of volumes
+   * \param createJointElems - if TRUE, create the elements
+   * \param onAllBoundaries - if TRUE, the nodes and elements are also create on
+   *        the boundary between \a theDomains and the rest mesh
+   * \return TRUE if operation has been completed successfully, FALSE otherwise
    */
   CORBA::Boolean DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& theDomains,
-                                               CORBA::Boolean createJointElems )
+                                               CORBA::Boolean             createJointElems,
+                                               CORBA::Boolean             onAllBoundaries )
     throw (SALOME::SALOME_Exception);
   /*!
    * \brief Double nodes on some external faces and create flat elements.
index a558c22d24bcb41d1535ae0acb52d7eebfa12d71..f58249f2ef8ef9f954c7d7972ea5ef19fdf8936d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 812d3c0cdb83a5a751ef9fa17182ed741e66d24d..b0c453b462763636c52da5d6daa3d1f9fce970d2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -26,6 +26,7 @@
 #include "SMESH_Mesh_i.hxx"
 
 #include "DriverMED_R_SMESHDS_Mesh.h"
+#include "DriverMED_W_Field.h"
 #include "DriverMED_W_SMESHDS_Mesh.h"
 #include "MED_Factory.hxx"
 #include "SMDS_EdgePosition.hxx"
 #include "SMESHDS_Group.hxx"
 #include "SMESHDS_GroupOnGeom.hxx"
 #include "SMESH_Controls.hxx"
+#include "SMESH_File.hxx"
 #include "SMESH_Filter_i.hxx"
 #include "SMESH_Gen_i.hxx"
 #include "SMESH_Group.hxx"
 #include "SMESH_Group_i.hxx"
+#include "SMESH_Mesh.hxx"
+#include "SMESH_MeshAlgos.hxx"
 #include "SMESH_MeshEditor.hxx"
 #include "SMESH_MeshEditor_i.hxx"
 #include "SMESH_MeshPartDS.hxx"
 #include "SMESH_PythonDump.hxx"
 #include "SMESH_subMesh_i.hxx"
 
-#include <OpUtil.hxx>
 #include <SALOMEDS_Attributes_wrap.hxx>
 #include <SALOMEDS_wrap.hxx>
-#include <SALOME_NamingService.hxx>
 #include <Utils_ExceptHandlers.hxx>
-#include <Utils_SINGLETON.hxx>
 #include <utilities.h>
 
 #include <GEOMImpl_Types.hxx>
 
 // OCCT Includes
 #include <BRep_Builder.hxx>
-#include <OSD_Directory.hxx>
-#include <OSD_File.hxx>
-#include <OSD_Path.hxx>
-#include <OSD_Protection.hxx>
-#include <Standard_OutOfMemory.hxx>
-#include <TColStd_MapIteratorOfMapOfInteger.hxx>
+#include <Standard_ErrorHandler.hxx>
 #include <TColStd_MapOfInteger.hxx>
-#include <TColStd_SequenceOfInteger.hxx>
-#include <TCollection_AsciiString.hxx>
 #include <TopExp.hxx>
 #include <TopExp_Explorer.hxx>
 #include <TopTools_MapIteratorOfMapOfShape.hxx>
 #include <TopTools_MapOfShape.hxx>
 #include <TopoDS_Compound.hxx>
 
-#include "SMESH_TryCatch.hxx" // include after OCCT headers!
-
 // STL Includes
 #include <algorithm>
-#include <string>
 #include <iostream>
 #include <sstream>
 
-#include <sys/stat.h>
+// to pass CORBA exception through SMESH_TRY
+#define SMY_OWN_CATCH catch( SALOME::SALOME_Exception& se ) { throw se; }
+
+#include "SMESH_TryCatch.hxx" // include after OCCT headers!
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
@@ -120,6 +114,7 @@ SMESH_Mesh_i::SMESH_Mesh_i( PortableServer::POA_ptr thePOA,
   _editor        = NULL;
   _previewEditor = NULL;
   _preMeshInfo   = NULL;
+  _mainShapeTick = 0;
 }
 
 //=============================================================================
@@ -193,6 +188,8 @@ void SMESH_Mesh_i::SetShape( GEOM::GEOM_Object_ptr theShapeObject )
   // to track changes of GEOM groups
   SMESH::SMESH_Mesh_var mesh = _this();
   addGeomGroupData( theShapeObject, mesh );
+  if ( !CORBA::is_nil( theShapeObject ))
+    _mainShapeTick = theShapeObject->GetTick();
 }
 
 //================================================================================
@@ -275,7 +272,7 @@ void SMESH_Mesh_i::Clear() throw (SALOME::SALOME_Exception)
 
   try {
     _impl->Clear();
-    CheckGeomGroupModif(); // issue 20145
+    //CheckGeomGroupModif(); // issue 20145
   }
   catch(SALOME_Exception & S_ex) {
     THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
@@ -396,14 +393,7 @@ SMESH_Mesh_i::ImportMEDFile( const char* theFileName, const char* theMeshName )
   _medFileInfo->major    = major;
   _medFileInfo->minor    = minor;
   _medFileInfo->release  = release;
-#ifdef WIN32
-  struct _stati64 d;
-  if ( ::_stati64( theFileName, &d ) != -1 )
-#else
-  struct stat64 d;
-  if ( ::stat64( theFileName, &d ) != -1 )
-#endif
-    _medFileInfo->fileSize = d.st_size;
+  _medFileInfo->fileSize = SMESH_File( theFileName ).size();
 
   return ConvertDriverMEDReadStatus(status);
 }
@@ -1503,7 +1493,7 @@ SMESH_Mesh_i::CutListOfGroups(const SMESH::ListOfGroups& theMainGroups,
     if ( aType == SMESH::ALL )
       aType = aGrp->GetType();
     else if ( aType != aGrp->GetType() )
-      THROW_SALOME_CORBA_EXCEPTION("UnionListOfGroups(): different group types",
+      THROW_SALOME_CORBA_EXCEPTION("CutListOfGroups(): different group types",
                                    SALOME::BAD_PARAM);
     if ( SMESH_GroupBase_i* grp_i = SMESH::DownCast< SMESH_GroupBase_i* >( aGrp ))
       if ( SMESHDS_GroupBase* grpDS = grp_i->GetGroupDS() )
@@ -1521,7 +1511,7 @@ SMESH_Mesh_i::CutListOfGroups(const SMESH::ListOfGroups& theMainGroups,
     if ( CORBA::is_nil( aGrp ) )
       continue;
     if ( aType != aGrp->GetType() )
-      THROW_SALOME_CORBA_EXCEPTION("UnionListOfGroups(): different group types",
+      THROW_SALOME_CORBA_EXCEPTION("CutListOfGroups(): different group types",
                                    SALOME::BAD_PARAM);
     if ( SMESH_GroupBase_i* grp_i = SMESH::DownCast< SMESH_GroupBase_i* >( aGrp ))
       if ( SMESHDS_GroupBase* grpDS = grp_i->GetGroupDS() )
@@ -1702,6 +1692,9 @@ void SMESH_Mesh_i::addGeomGroupData(GEOM::GEOM_Object_ptr theGeomObj,
     groupData._indices.insert( ids[i] );
   // SMESH object
   groupData._smeshObject = CORBA::Object::_duplicate( theSmeshObj );
+  // shape index in SMESHDS
+  // TopoDS_Shape shape = _gen_i->GeomObjectToShape( theGeomObj );
+  // groupData._dsID = shape.IsNull() ? 0 : _impl->GetSubMesh( shape )->GetId();
 }
 
 //================================================================================
@@ -1775,22 +1768,176 @@ TopoDS_Shape SMESH_Mesh_i::newGroupShape( TGeomGroupData & groupData)
 
 namespace
 {
-  //=============================================================================
+  //-----------------------------------------------------------------------------
   /*!
    * \brief Storage of shape and index used in CheckGeomGroupModif()
    */
-  //=============================================================================
   struct TIndexedShape
   {
     int          _index;
     TopoDS_Shape _shape;
     TIndexedShape( int i, const TopoDS_Shape& s ):_index(i), _shape(s) {}
   };
+  //-----------------------------------------------------------------------------
+  /*!
+   * \brief Data to re-create a group on geometry
+   */
+  struct TGroupOnGeomData
+  {
+    int                 _oldID;
+    int                 _shapeID;
+    SMDSAbs_ElementType _type;
+    std::string         _name;
+    Quantity_Color      _color;
+  };
 }
+
+//=============================================================================
+/*!
+ * \brief Update data if geometry changes
+ *
+ * Issue 0022501
+ */
+//=============================================================================
+
+void SMESH_Mesh_i::CheckGeomModif()
+{
+  if ( !_impl->HasShapeToMesh() ) return;
+
+  SALOMEDS::Study_var study = _gen_i->GetCurrentStudy();
+  if ( study->_is_nil() ) return;
+
+  GEOM::GEOM_Object_var mainGO = _gen_i->ShapeToGeomObject( _impl->GetShapeToMesh() );
+  if ( mainGO->_is_nil() ) return;
+
+  if ( mainGO->GetType() == GEOM_GROUP ||
+       mainGO->GetTick() == _mainShapeTick )
+  {
+    CheckGeomGroupModif();
+    return;
+  }
+
+  GEOM_Client* geomClient = _gen_i->GetShapeReader();
+  if ( !geomClient ) return;
+  GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine();
+  if ( geomGen->_is_nil() ) return;
+
+  CORBA::String_var ior = geomGen->GetStringFromIOR( mainGO );
+  geomClient->RemoveShapeFromBuffer( ior.in() );
+
+  // Update data taking into account that
+  // all sub-shapes change but IDs of sub-shapes remain (except for geom groups)
+
+  _impl->Clear();
+  TopoDS_Shape newShape = _gen_i->GeomObjectToShape( mainGO );
+  if ( newShape.IsNull() )
+    return;
+
+  _mainShapeTick = mainGO->GetTick();
+
+  SMESHDS_Mesh * meshDS = _impl->GetMeshDS();
+
+  // store data of groups on geometry
+  vector< TGroupOnGeomData > groupsData;
+  const set<SMESHDS_GroupBase*>& groups = meshDS->GetGroups();
+  groupsData.reserve( groups.size() );
+  set<SMESHDS_GroupBase*>::const_iterator g = groups.begin();
+  for ( ; g != groups.end(); ++g )
+    if ( const SMESHDS_GroupOnGeom* group = dynamic_cast< SMESHDS_GroupOnGeom* >( *g ))
+    {
+      TGroupOnGeomData data;
+      data._oldID   = group->GetID();
+      data._shapeID = meshDS->ShapeToIndex( group->GetShape() );
+      data._type    = group->GetType();
+      data._name    = group->GetStoreName();
+      data._color   = group->GetColor();
+      groupsData.push_back( data );
+    }
+  // store assigned hypotheses
+  vector< pair< int, THypList > > ids2Hyps;
+  const ShapeToHypothesis & hyps = meshDS->GetHypotheses();
+  for ( ShapeToHypothesis::Iterator s2hyps( hyps ); s2hyps.More(); s2hyps.Next() )
+  {
+    const TopoDS_Shape& s = s2hyps.Key();
+    const THypList&  hyps = s2hyps.ChangeValue();
+    ids2Hyps.push_back( make_pair( meshDS->ShapeToIndex( s ), hyps ));
+  }
+
+  // change shape to mesh
+  int oldNbSubShapes = meshDS->MaxShapeIndex();
+  _impl->ShapeToMesh( TopoDS_Shape() );
+  _impl->ShapeToMesh( newShape );
+
+  // re-add shapes of geom groups
+  list<TGeomGroupData>::iterator data = _geomGroupData.begin();
+  for ( ; data != _geomGroupData.end(); ++data )
+  {
+    TopoDS_Shape newShape = newGroupShape( *data );
+    if ( !newShape.IsNull() )
+    {
+      if ( meshDS->ShapeToIndex( newShape ) > 0 ) // a group reduced to one sub-shape
+      {
+        TopoDS_Compound compound;
+        BRep_Builder().MakeCompound( compound );
+        BRep_Builder().Add( compound, newShape );
+        newShape = compound;
+      }
+      _impl->GetSubMesh( newShape );
+    }
+  }
+  if ( oldNbSubShapes != meshDS->MaxShapeIndex() )
+    THROW_SALOME_CORBA_EXCEPTION( "SMESH_Mesh_i::CheckGeomModif() bug",
+                                  SALOME::INTERNAL_ERROR );
+
+  // re-assign hypotheses
+  for ( size_t i = 0; i < ids2Hyps.size(); ++i )
+  {
+    const TopoDS_Shape& s = meshDS->IndexToShape( ids2Hyps[i].first );
+    const THypList&  hyps = ids2Hyps[i].second;
+    THypList::const_iterator h = hyps.begin();
+    for ( ; h != hyps.end(); ++h )
+      _impl->AddHypothesis( s, (*h)->GetID() );
+  }
+
+  // restore groups
+  for ( size_t i = 0; i < groupsData.size(); ++i )
+  {
+    const TGroupOnGeomData& data = groupsData[i];
+
+    map<int, SMESH::SMESH_GroupBase_ptr>::iterator i2g = _mapGroups.find( data._oldID );
+    if ( i2g == _mapGroups.end() ) continue;
+
+    SMESH_GroupBase_i* gr_i = SMESH::DownCast<SMESH_GroupBase_i*>( i2g->second );
+    if ( !gr_i ) continue;
+
+    int id;
+    SMESH_Group* g = _impl->AddGroup( data._type, data._name.c_str(), id,
+                                      meshDS->IndexToShape( data._shapeID ));
+    if ( !g )
+    {
+      _mapGroups.erase( i2g );
+    }
+    else
+    {
+      g->GetGroupDS()->SetColor( data._color );
+      gr_i->changeLocalId( id );
+      _mapGroups[ id ] = i2g->second;
+      if ( data._oldID != id )
+        _mapGroups.erase( i2g );
+    }
+  }
+
+  // update _mapSubMesh
+  map<int, ::SMESH_subMesh*>::iterator i_sm = _mapSubMesh.begin();
+  for ( ; i_sm != _mapSubMesh.end(); ++i_sm )
+    i_sm->second = _impl->GetSubMesh( meshDS->IndexToShape( i_sm->first ));
+
+}
+
 //=============================================================================
 /*!
  * \brief Update objects depending on changed geom groups
- * 
+ *
  * NPAL16168: geometrical group edition from a submesh don't modifiy mesh computation
  * issue 0020210: Update of a smesh group after modification of the associated geom group
  */
@@ -2608,44 +2755,36 @@ CORBA::Boolean SMESH_Mesh_i::HasDuplicatedGroupNamesMED()
 
 void SMESH_Mesh_i::PrepareForWriting (const char* file, bool overwrite)
 {
-  TCollection_AsciiString aFullName ((char*)file);
-  OSD_Path aPath (aFullName);
-  OSD_File aFile (aPath);
-  if (aFile.Exists()) {
+  SMESH_File aFile( file );
+  SMESH_Comment msg;
+  if (aFile.exists()) {
     // existing filesystem node
-    if (aFile.KindOfFile() == OSD_FILE) {
-      if (aFile.IsWriteable()) {
-        if (overwrite) {
-          aFile.Reset();
-          aFile.Remove();
-        }
-        if (aFile.Failed()) {
-          TCollection_AsciiString msg ("File ");
-          msg += aFullName + " cannot be replaced.";
-          THROW_SALOME_CORBA_EXCEPTION(msg.ToCString(), SALOME::BAD_PARAM);
+    if ( !aFile.isDirectory() ) {
+      if ( aFile.openForWriting() ) {
+        if ( overwrite && ! aFile.remove()) {
+          msg << "Can't replace " << aFile.getName();
         }
       } else {
-        TCollection_AsciiString msg ("File ");
-        msg += aFullName + " cannot be overwritten.";
-        THROW_SALOME_CORBA_EXCEPTION(msg.ToCString(), SALOME::BAD_PARAM);
+        msg << "Can't write into " << aFile.getName();
       }
     } else {
-      TCollection_AsciiString msg ("Location ");
-      msg += aFullName + " is not a file.";
-      THROW_SALOME_CORBA_EXCEPTION(msg.ToCString(), SALOME::BAD_PARAM);
+      msg << "Location " << aFile.getName() << " is not a file";
     }
-  } else {
+  }
+  else {
     // nonexisting file; check if it can be created
-    aFile.Reset();
-    aFile.Build(OSD_WriteOnly, OSD_Protection());
-    if (aFile.Failed()) {
-      TCollection_AsciiString msg ("You cannot create the file ");
-      msg += aFullName + ". Check the directory existance and access rights.";
-      THROW_SALOME_CORBA_EXCEPTION(msg.ToCString(), SALOME::BAD_PARAM);
-    } else {
-      aFile.Close();
-      aFile.Remove();
+    if ( !aFile.openForWriting() ) {
+      msg << "You cannot create the file "
+          << aFile.getName()
+          << ". Check the directory existance and access rights";
     }
+    aFile.remove();
+  }
+
+  if ( !msg.empty() )
+  {
+    msg << ".";
+    THROW_SALOME_CORBA_EXCEPTION(msg.c_str(), SALOME::BAD_PARAM);
   }
 }
 
@@ -2715,13 +2854,13 @@ void SMESH_Mesh_i::ExportToMEDX (const char*        file,
     _preMeshInfo->FullLoadFromFile();
 
   string aMeshName = prepareMeshNameAndGroups(file, overwrite);
+  _impl->ExportMED( file, aMeshName.c_str(), auto_groups, theVersion, 0, autoDimension );
+
   TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportToMEDX( r'"
                 << file << "', " << auto_groups << ", "
                 << theVersion << ", " << overwrite << ", "
                 << autoDimension << " )";
 
-  _impl->ExportMED( file, aMeshName.c_str(), auto_groups, theVersion, 0, autoDimension );
-
   SMESH_CATCH( SMESH::throwCorbaException );
 }
 
@@ -2849,20 +2988,65 @@ void SMESH_Mesh_i::ExportSTL (const char *file, const bool isascii)
  */
 //================================================================================
 
-void SMESH_Mesh_i::ExportPartToMED(::SMESH::SMESH_IDSource_ptr meshPart,
-                                   const char*                 file,
-                                   CORBA::Boolean              auto_groups,
-                                   ::SMESH::MED_VERSION        version,
-                                   ::CORBA::Boolean            overwrite,
-                                   ::CORBA::Boolean            autoDimension)
+void SMESH_Mesh_i::ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart,
+                                   const char*               file,
+                                   CORBA::Boolean            auto_groups,
+                                   SMESH::MED_VERSION        version,
+                                   CORBA::Boolean            overwrite,
+                                   CORBA::Boolean            autoDimension,
+                                   const GEOM::ListOfFields& fields,
+                                   const char*               geomAssocFields)
   throw (SALOME::SALOME_Exception)
 {
-  Unexpect aCatch(SALOME_SalomeException);
-  TPythonDump pyDump;
+  SMESH_TRY;
+  if ( _preMeshInfo )
+    _preMeshInfo->FullLoadFromFile();
+
+  // check fields
+  bool have0dField = false;
+  if ( fields.length() > 0 )
+  {
+    GEOM::GEOM_Object_var shapeToMesh = GetShapeToMesh();
+    if ( shapeToMesh->_is_nil() )
+      THROW_SALOME_CORBA_EXCEPTION( "No shape to mesh", SALOME::INTERNAL_ERROR );
+
+    for ( size_t i = 0; i < fields.length(); ++i )
+    {
+      if ( fields[i]->GetDataType() == GEOM::FDT_String )
+        THROW_SALOME_CORBA_EXCEPTION
+          ( "Export of string fields is not supported", SALOME::BAD_PARAM);
+      GEOM::GEOM_Object_var fieldShape = fields[i]->GetShape();
+      if ( fieldShape->_is_nil() )
+        THROW_SALOME_CORBA_EXCEPTION( "Null shape under a field", SALOME::INTERNAL_ERROR );
+      if ( !fieldShape->IsSame( shapeToMesh ) )
+        THROW_SALOME_CORBA_EXCEPTION
+          ( "Field defined not on shape", SALOME::BAD_PARAM);
+      if ( fields[i]->GetDimension() == 0 )
+        have0dField = true;
+    }
+    if ( geomAssocFields )
+      for ( int i = 0; geomAssocFields[i]; ++i )
+        switch ( geomAssocFields[i] ) {
+        case 'v':case 'e':case 'f':case 's': break;
+        case 'V':case 'E':case 'F':case 'S': break;
+        default: THROW_SALOME_CORBA_EXCEPTION
+            ( "geomAssocFields can include only [vefs] characters", SALOME::BAD_PARAM);
+        }
+  }
+
+  SMESHDS_Mesh* meshDS = _impl->GetMeshDS();
 
-  if ( SMESH_Mesh_i * mesh = SMESH::DownCast< SMESH_Mesh_i* >( meshPart ))
+  // write mesh
+
+  string aMeshName = "Mesh";
+  SMESHUtils::Deleter< SMESH_MeshPartDS > tmpDSDeleter(0);
+  if ( CORBA::is_nil( meshPart ) ||
+       SMESH::DownCast< SMESH_Mesh_i* >( meshPart ))
   {
-    mesh->ExportToMEDX( file, auto_groups, version, autoDimension );
+    aMeshName = prepareMeshNameAndGroups(file, overwrite);
+    _impl->ExportMED( file, aMeshName.c_str(), auto_groups,
+                      version, 0, autoDimension, /*addODOnVertices=*/have0dField);
+    meshDS = _impl->GetMeshDS();
   }
   else
   {
@@ -2871,7 +3055,6 @@ void SMESH_Mesh_i::ExportPartToMED(::SMESH::SMESH_IDSource_ptr meshPart,
 
     PrepareForWriting(file, overwrite);
 
-    string aMeshName = "Mesh";
     SALOMEDS::Study_var aStudy = _gen_i->GetCurrentStudy();
     if ( !aStudy->_is_nil() ) {
       SALOMEDS::SObject_wrap SO = _gen_i->ObjectToSObject( aStudy, meshPart );
@@ -2880,13 +3063,287 @@ void SMESH_Mesh_i::ExportPartToMED(::SMESH::SMESH_IDSource_ptr meshPart,
         aMeshName = name;
       }
     }
-    SMESH_MeshPartDS partDS( meshPart );
-    _impl->ExportMED( file, aMeshName.c_str(), auto_groups, version, &partDS, autoDimension );
+    SMESH_MeshPartDS* partDS = new SMESH_MeshPartDS( meshPart );
+    _impl->ExportMED( file, aMeshName.c_str(), auto_groups,
+                      version, partDS, autoDimension, /*addODOnVertices=*/have0dField);
+    meshDS = tmpDSDeleter._obj = partDS;
+  }
+
+  // write fields
+
+  if ( _impl->HasShapeToMesh() )
+  {
+    DriverMED_W_Field fieldWriter;
+    fieldWriter.SetFile( file );
+    fieldWriter.SetMeshName( aMeshName );
+    fieldWriter.AddODOnVertices( have0dField );
+
+    exportMEDFields( fieldWriter, meshDS, fields, geomAssocFields );
   }
-  pyDump << SMESH::SMESH_Mesh_var(_this()) << ".ExportPartToMED( "
-         << meshPart << ", r'" << file << "', "
-         << auto_groups << ", " << version << ", " << overwrite << ", "
-         << autoDimension << " )";
+
+  // dump
+  GEOM::ListOfGBO_var goList = new GEOM::ListOfGBO;
+  goList->length( fields.length() );
+  for ( size_t i = 0; i < fields.length(); ++i )
+  {
+    GEOM::GEOM_BaseObject_var gbo = GEOM::GEOM_BaseObject::_narrow( fields[i] );
+    goList[i] = gbo;
+  }
+  TPythonDump() << _this() << ".ExportPartToMED( "
+                << meshPart << ", r'" << file << "', "
+                << auto_groups << ", " << version << ", " << overwrite << ", "
+                << autoDimension << ", " << goList
+                << ", '" << ( geomAssocFields ? geomAssocFields : "" ) << "'" << " )";
+
+  SMESH_CATCH( SMESH::throwCorbaException );
+}
+
+//================================================================================
+/*!
+ * Write GEOM fields to MED file
+ */
+//================================================================================
+
+void SMESH_Mesh_i::exportMEDFields( DriverMED_W_Field&        fieldWriter,
+                                    SMESHDS_Mesh*             meshDS,
+                                    const GEOM::ListOfFields& fields,
+                                    const char*               geomAssocFields)
+{
+#define METH "SMESH_Mesh_i::exportMEDFields() "
+
+  if (( fields.length() < 1 ) &&
+      ( !geomAssocFields || !geomAssocFields[0] ))
+    return;
+
+  std::vector< double > dblVals( meshDS->MaxShapeIndex()+1 );
+  std::vector< int >    intVals( meshDS->MaxShapeIndex()+1 );
+  std::vector< int >    subIdsByDim[ 4 ];
+  const double noneDblValue = 0.;
+  const double noneIntValue = 0;
+
+  for ( size_t iF = 0; iF < fields.length(); ++iF )
+  {
+    // set field data
+
+    int dim = fields[ iF ]->GetDimension();
+    SMDSAbs_ElementType elemType;
+    TopAbs_ShapeEnum    shapeType;
+    switch ( dim ) {
+    case 0: elemType = SMDSAbs_0DElement; shapeType = TopAbs_VERTEX; break;
+    case 1: elemType = SMDSAbs_Edge;      shapeType = TopAbs_EDGE;   break;
+    case 2: elemType = SMDSAbs_Face;      shapeType = TopAbs_FACE;   break;
+    case 3: elemType = SMDSAbs_Volume;    shapeType = TopAbs_SOLID;  break;
+    default:
+      continue; // skip fields on whole shape
+    }
+    GEOM::field_data_type dataType = fields[ iF ]->GetDataType();
+    if ( dataType == GEOM::FDT_String )
+      continue;
+    GEOM::ListOfLong_var stepIDs = fields[ iF ]->GetSteps();
+    if ( stepIDs->length() < 1 )
+      continue;
+    GEOM::string_array_var comps = fields[ iF ]->GetComponents();
+    if ( comps->length() < 1 )
+      continue;
+    CORBA::String_var       name = fields[ iF ]->GetName();
+
+    if ( !fieldWriter.Set( meshDS,
+                           name.in(),
+                           elemType,
+                           comps->length(),
+                           /*isIntData=*/false ))//( dataType == GEOM::FDT_Int )))
+      continue;
+
+    for ( size_t iC = 0; iC < comps->length(); ++iC )
+      fieldWriter.SetCompName( iC, comps[ iC ].in() );
+
+    // find sub-shape IDs
+
+    std::vector< int >& subIds = subIdsByDim[ dim ];
+    if ( subIds.empty() )
+      for ( int id = 1; id <= meshDS->MaxShapeIndex(); ++id )
+        if ( meshDS->IndexToShape( id ).ShapeType() == shapeType )
+          subIds.push_back( id );
+
+    // write steps
+
+    SMDS_ElemIteratorPtr elemIt = fieldWriter.GetOrderedElems();
+    if ( !elemIt )
+      continue;
+
+    for ( size_t iS = 0; iS < stepIDs->length(); ++iS )
+    {
+      GEOM::GEOM_FieldStep_var step = fields[ iF ]->GetStep( stepIDs[ iS ]);
+      if ( step->_is_nil() )
+        continue;
+
+      CORBA::Long stamp = step->GetStamp();
+      CORBA::Long id    = step->GetID();
+      fieldWriter.SetDtIt( int( stamp ), int( id ));
+
+      // fill dblVals or intVals
+      switch ( dataType )
+      {
+      case GEOM::FDT_Double:
+      {
+        GEOM::GEOM_DoubleFieldStep_var dblStep = GEOM::GEOM_DoubleFieldStep::_narrow( step );
+        if ( dblStep->_is_nil() ) continue;
+        GEOM::ListOfDouble_var vv = dblStep->GetValues();
+        if ( vv->length() != subIds.size() )
+          THROW_SALOME_CORBA_EXCEPTION( METH "BUG: wrong nb subIds", SALOME::INTERNAL_ERROR );
+        for ( size_t i = 0; i < vv->length(); ++i )
+          dblVals[ subIds[ i ]] = vv[ i ];
+        break;
+      }
+      case GEOM::FDT_Int:
+      {
+        GEOM::GEOM_IntFieldStep_var intStep = GEOM::GEOM_IntFieldStep::_narrow( step );
+        if ( intStep->_is_nil() ) continue;
+        GEOM::ListOfLong_var vv = intStep->GetValues();
+        if ( vv->length() != subIds.size() )
+          THROW_SALOME_CORBA_EXCEPTION( METH "BUG: wrong nb subIds", SALOME::INTERNAL_ERROR );
+        for ( size_t i = 0; i < vv->length(); ++i )
+          intVals[ subIds[ i ]] = (int) vv[ i ];
+        break;
+      }
+      case GEOM::FDT_Bool:
+      {
+        GEOM::GEOM_BoolFieldStep_var boolStep = GEOM::GEOM_BoolFieldStep::_narrow( step );
+        if ( boolStep->_is_nil() ) continue;
+        GEOM::short_array_var vv = boolStep->GetValues();
+        if ( vv->length() != subIds.size() )
+          THROW_SALOME_CORBA_EXCEPTION( METH "BUG: wrong nb subIds", SALOME::INTERNAL_ERROR );
+        for ( size_t i = 0; i < vv->length(); ++i )
+          intVals[ subIds[ i ]] = (int) vv[ i ];
+        break;
+      }
+      default: continue;
+      }
+
+      // pass values to fieldWriter
+      elemIt = fieldWriter.GetOrderedElems();
+      if ( dataType == GEOM::FDT_Double )
+        while ( elemIt->more() )
+        {
+          const SMDS_MeshElement* e = elemIt->next();
+          const int shapeID = e->getshapeId();
+          if ( shapeID < 1 || shapeID >= dblVals.size() )
+            fieldWriter.AddValue( noneDblValue );
+          else
+            fieldWriter.AddValue( dblVals[ shapeID ]);
+        }
+      else
+        while ( elemIt->more() )
+        {
+          const SMDS_MeshElement* e = elemIt->next();
+          const int shapeID = e->getshapeId();
+          if ( shapeID < 1 || shapeID >= intVals.size() )
+            fieldWriter.AddValue( (double) noneIntValue );
+          else
+            fieldWriter.AddValue( (double) intVals[ shapeID ]);
+        }
+
+      // write a step
+      fieldWriter.Perform();
+      SMESH_ComputeErrorPtr res = fieldWriter.GetError();
+      if ( res && res->IsKO() )
+      {
+        if ( res->myComment.empty() )
+        { THROW_SALOME_CORBA_EXCEPTION( METH "Fatal error", SALOME::INTERNAL_ERROR ); }
+        else
+        { THROW_SALOME_CORBA_EXCEPTION( res->myComment.c_str(), SALOME::INTERNAL_ERROR ); }
+      }
+
+    } // loop on steps
+  } // loop on fields
+
+  if ( !geomAssocFields || !geomAssocFields[0] )
+    return;
+
+  // write geomAssocFields
+
+  std::vector< int > shapeDim( TopAbs_SHAPE + 1 );
+  shapeDim[ TopAbs_COMPOUND  ] = 3;
+  shapeDim[ TopAbs_COMPSOLID ] = 3;
+  shapeDim[ TopAbs_SOLID     ] = 3;
+  shapeDim[ TopAbs_SHELL     ] = 2;
+  shapeDim[ TopAbs_FACE      ] = 2;
+  shapeDim[ TopAbs_WIRE      ] = 1;
+  shapeDim[ TopAbs_EDGE      ] = 1;
+  shapeDim[ TopAbs_VERTEX    ] = 0;
+  shapeDim[ TopAbs_SHAPE     ] = 3;
+
+  for ( int iF = 0; geomAssocFields[ iF ]; ++iF )
+  {
+    std::vector< std::string > compNames;
+    switch ( geomAssocFields[ iF ]) {
+    case 'v': case 'V':
+      fieldWriter.Set( meshDS, "_vertices_", SMDSAbs_Node, /*nbComps=*/2, /*isInt=*/false );
+      compNames.push_back( "dim" );
+      break;
+    case 'e': case 'E':
+      fieldWriter.Set( meshDS, "_edges_", SMDSAbs_Edge, /*nbComps=*/1, /*isInt=*/false );
+      break;
+    case 'f': case 'F':
+      fieldWriter.Set( meshDS, "_faces_", SMDSAbs_Face, /*nbComps=*/1, /*isInt=*/false );
+      break;
+    case 's': case 'S':
+      fieldWriter.Set( meshDS, "_solids_", SMDSAbs_Volume, /*nbComps=*/1, /*isInt=*/false );
+      break;
+    default: continue;
+    }
+    compNames.push_back( "id" );
+    for ( size_t iC = 0; iC < compNames.size(); ++iC )
+      fieldWriter.SetCompName( iC, compNames[ iC ].c_str() );
+
+    fieldWriter.SetDtIt( -1, -1 );
+
+    SMDS_ElemIteratorPtr elemIt = fieldWriter.GetOrderedElems();
+    if ( !elemIt )
+      continue;
+
+    if ( compNames.size() == 2 ) // _vertices_
+      while ( elemIt->more() )
+      {
+        const SMDS_MeshElement* e = elemIt->next();
+        const int shapeID = e->getshapeId();
+        if ( shapeID < 1 )
+        {
+          fieldWriter.AddValue( (double) -1 );
+          fieldWriter.AddValue( (double) -1 );
+        }
+        else
+        {
+          const TopoDS_Shape& S = meshDS->IndexToShape( shapeID );
+          fieldWriter.AddValue( (double) ( S.IsNull() ? -1 : shapeDim[ S.ShapeType() ]));
+          fieldWriter.AddValue( (double) shapeID );
+        }
+      }
+    else
+      while ( elemIt->more() )
+      {
+        const SMDS_MeshElement* e = elemIt->next();
+        const int shapeID = e->getshapeId();
+        if ( shapeID < 1 )
+          fieldWriter.AddValue( (double) -1 );
+        else
+          fieldWriter.AddValue( (double) shapeID );
+      }
+
+    // write a step
+    fieldWriter.Perform();
+    SMESH_ComputeErrorPtr res = fieldWriter.GetError();
+    if ( res && res->IsKO() )
+    {
+      if ( res->myComment.empty() )
+      { THROW_SALOME_CORBA_EXCEPTION( METH "Fatal error", SALOME::INTERNAL_ERROR ); }
+      else
+      { THROW_SALOME_CORBA_EXCEPTION( res->myComment.c_str(), SALOME::INTERNAL_ERROR ); }
+    }
+
+  } // loop on geomAssocFields
+
+#undef METH
 }
 
 //================================================================================
@@ -3466,6 +3923,25 @@ SMESH::EntityType SMESH_Mesh_i::GetElementGeomType( const CORBA::Long id )
   return ( SMESH::EntityType ) e->GetEntityType();
 }
 
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+
+SMESH::GeometryType SMESH_Mesh_i::GetElementShape( const CORBA::Long id )
+  throw (SALOME::SALOME_Exception)
+{
+  if ( _preMeshInfo )
+    _preMeshInfo->FullLoadFromFile();
+
+  const SMDS_MeshElement* e = _impl->GetMeshDS()->FindElement(id);
+  if ( !e )
+    THROW_SALOME_CORBA_EXCEPTION( "invalid element id", SALOME::BAD_PARAM );
+
+  return ( SMESH::GeometryType ) e->GetGeomType();
+}
+
 //=============================================================================
 /*!
  * Returns ID of elements for given submesh
@@ -3662,17 +4138,11 @@ SMESH::long_array* SMESH_Mesh_i::GetNodeInverseElements(const CORBA::Long id)
 
   // find inverse elements
   SMDS_ElemIteratorPtr eIt = aNode->GetInverseElementIterator();
-  TColStd_SequenceOfInteger IDs;
-  while(eIt->more()) {
+  aResult->length( aNode->NbInverseElements() );  
+  for( int i = 0; eIt->more(); ++i )
+  {
     const SMDS_MeshElement* elem = eIt->next();
-    IDs.Append(elem->GetID());
-  }
-  if(IDs.Length()>0) {
-    aResult->length(IDs.Length());
-    int i = 1;
-    for(; i<=IDs.Length(); i++) {
-      aResult[i-1] = IDs.Value(i);
-    }
+    aResult[ i ] = elem->GetID();
   }
   return aResult._retn();
 }
@@ -4023,6 +4493,33 @@ SMESH::long_array* SMESH_Mesh_i::GetElemFaceNodes(CORBA::Long  elemId,
   return aResult._retn();
 }
 
+//=======================================================================
+//function : GetElemFaceNodes
+//purpose  : Returns three components of normal of given mesh face.
+//=======================================================================
+
+SMESH::double_array* SMESH_Mesh_i::GetFaceNormal(CORBA::Long    elemId,
+                                                 CORBA::Boolean normalized)
+{
+  if ( _preMeshInfo )
+    _preMeshInfo->FullLoadFromFile();
+
+  SMESH::double_array_var aResult = new SMESH::double_array();
+
+  if ( SMESHDS_Mesh* mesh = _impl->GetMeshDS() )
+  {
+    gp_XYZ normal;
+    if ( SMESH_MeshAlgos::FaceNormal( mesh->FindElement(elemId), normal, normalized ))
+    {
+      aResult->length( 3 );
+      aResult[ 0 ] = normal.X();
+      aResult[ 1 ] = normal.Y();
+      aResult[ 2 ] = normal.Z();
+    }
+  }
+  return aResult._retn();
+}
+
 //=======================================================================
 //function : FindElementByNodes
 //purpose  : Returns an element based on all given nodes.
@@ -5053,8 +5550,37 @@ void findCommonSubMesh (list<const SMESH_subMesh*>& theSubMeshList,
   //theCommon.insert( theSubMesh );
 }
 
+//-----------------------------------------------------------------------------
+bool isSubMeshInList ( int smID, const TListOfListOfInt& smLists )
+{
+  TListOfListOfInt::const_iterator listsIt = smLists.begin();
+  for ( ; listsIt != smLists.end(); ++listsIt )
+  {
+    const TListOfInt& smIDs = *listsIt;
+    if ( std::find( smIDs.begin(), smIDs.end(), smID ) != smIDs.end() )
+      return true;
+  }
+  return false;
+}
+
 } // namespace
 
+//=============================================================================
+/*!
+ * \brief Return \c true if a meshing order not yet set for a concurrent sub-mesh
+ */
+//=============================================================================
+
+CORBA::Boolean SMESH_Mesh_i::IsUnorderedSubMesh(CORBA::Long submeshID)
+{
+  TListOfListOfInt anOrder = GetImpl().GetMeshOrder(); // already defined order
+  if ( isSubMeshInList( submeshID, anOrder ))
+    return false;
+
+  TListOfListOfInt allConurrent = findConcurrentSubMeshes();
+  return isSubMeshInList( submeshID, allConurrent );
+}
+
 //=============================================================================
 /*!
  * \brief Return submesh objects list in meshing order
@@ -5068,14 +5594,37 @@ SMESH::submesh_array_array* SMESH_Mesh_i::GetMeshOrder()
   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() ) {
 
+  TListOfListOfInt      anOrder = GetImpl().GetMeshOrder(); // already defined order
+  TListOfListOfInt allConurrent = findConcurrentSubMeshes();
+  anOrder.splice( anOrder.end(), allConurrent );
+
+  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, false );
+
+  return aResult._retn();
+}
+
+//=============================================================================
+/*!
+ * \brief Finds concurrent sub-meshes
+ */
+//=============================================================================
+
+TListOfListOfInt SMESH_Mesh_i::findConcurrentSubMeshes()
+{
+  TListOfListOfInt anOrder;
+  ::SMESH_Mesh& mesh = GetImpl();
+  {
     // collect submeshes and detect 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;
@@ -5147,11 +5696,8 @@ SMESH::submesh_array_array* SMESH_Mesh_i::GetMeshOrder()
     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, false );
 
-  return aResult._retn();
+  return anOrder;
 }
 
 //=============================================================================
@@ -5240,7 +5786,8 @@ void SMESH_Mesh_i::convertMeshOrder (const TListOfListOfInt&     theIdsOrder,
     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++ ) {
+    int j;
+    for( j = 0; subIt != aSubOrder.end(); subIt++ ) {
       if ( _mapSubMeshIor.find(*subIt) == _mapSubMeshIor.end() )
         continue;
       SMESH::SMESH_subMesh_var subMesh =
@@ -5254,7 +5801,8 @@ void SMESH_Mesh_i::convertMeshOrder (const TListOfListOfInt&     theIdsOrder,
     }
     if ( theIsDump )
       aPythonDump << " ]";
-    theResOrder[ listIndx++ ] = aResSubSet;
+    if ( j > 1 )
+      theResOrder[ listIndx++ ] = aResSubSet;
   }
   // correct number of lists
   theResOrder.length( listIndx );
index c52699bb2bdec9fa699849cfe43ae7f4ffaa76a3..cd9a7a9166388121dc1a630f64fef47988f8102e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -47,6 +47,8 @@ class SMESH_GroupBase_i;
 class SMESH_subMesh_i;
 class SMESH_PreMeshInfo;
 class SMESH_MeshEditor_i;
+class DriverMED_W_Field;
+class SMESHDS_Mesh;
 
 class SMESH_I_EXPORT SMESH_Mesh_i:
   public virtual POA_SMESH::SMESH_Mesh,
@@ -255,7 +257,9 @@ public:
                        CORBA::Boolean            auto_groups,
                        SMESH::MED_VERSION        version,
                        CORBA::Boolean            overwrite,
-                       CORBA::Boolean            autoDim=true) throw (SALOME::SALOME_Exception);
+                       CORBA::Boolean            autoDim,
+                       const GEOM::ListOfFields& fields,
+                       const char*               geomAssocFields) throw (SALOME::SALOME_Exception);
   void ExportPartToDAT(SMESH::SMESH_IDSource_ptr meshPart,
                        const char*               file) throw (SALOME::SALOME_Exception);
   void ExportPartToUNV(SMESH::SMESH_IDSource_ptr meshPart,
@@ -368,6 +372,9 @@ public:
   SMESH::EntityType GetElementGeomType( CORBA::Long id )
     throw (SALOME::SALOME_Exception);
 
+  SMESH::GeometryType GetElementShape( CORBA::Long id )
+    throw (SALOME::SALOME_Exception);
+
   /*!
    * Returns ID of elements for given submesh
    */
@@ -433,6 +440,12 @@ public:
 
   void checkMeshLoaded();
 
+  /*!
+   * \brief Update data if geometry changes
+   *
+   * Issue 0022501
+   */
+  void CheckGeomModif();
   /*!
    * \brief Update hypotheses assigned to geom groups if the latter change
    *
@@ -532,6 +545,11 @@ public:
    */
   SMESH::long_array* GetElemFaceNodes(CORBA::Long elemId, CORBA::Short faceIndex);
 
+  /*!
+   * Returns three components of normal of given mesh face (or an empty array in KO case)
+   */
+  SMESH::double_array* GetFaceNormal(CORBA::Long faceId, CORBA::Boolean normalized);
+
   /*!
    * Returns an element based on all given nodes.
    */
@@ -577,6 +595,10 @@ public:
    */
   SMESH::string_array* GetLastParameters();
 
+  /*!
+   * \brief Return \c true if a meshing order not yet set for a concurrent sub-mesh
+   */
+  CORBA::Boolean IsUnorderedSubMesh(CORBA::Long submeshID);
   /*!
    * \brief Return submesh objects list in meshing order
    */
@@ -638,6 +660,13 @@ private:
    */
   void checkGroupNames();
 
+  /*
+   * Write GEOM fields to MED file
+   */
+  void exportMEDFields( DriverMED_W_Field &       writer,
+                        SMESHDS_Mesh*             meshDS,
+                        const GEOM::ListOfFields& fields,
+                        const char*               geomAssocFields);
   /*!
    * Convert submesh ids into submesh interfaces
    */
@@ -645,6 +674,11 @@ private:
                         SMESH::submesh_array_array& theSubMeshOrder,
                         const bool                  theIsDump);
 
+  /*!
+   * \brief Finds concurrent sub-meshes
+   */
+  TListOfListOfInt findConcurrentSubMeshes();
+
 private:
 
   static int    _idGenerator;
@@ -674,6 +708,7 @@ private:
     CORBA::Object_var _smeshObject; // SMESH object depending on GEOM group
   };
   std::list<TGeomGroupData> _geomGroupData;
+  int                       _mainShapeTick; // to track modifications of the meshed shape
 
   /*!
    * Remember GEOM group data
index 324dd253e3c00d8d3586184abe2a0fbb18564fc9..800df2eceb47810bd5f85e8cbd933b8e4c663094 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3ef1c8b6bc24c6e378e62ed29607d8e331b4fdc4..12491c5bebc1213a0c22d808126ae43d1899ece9 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ba7fafb00573e1ec1701409be57eb5481bb4efd0..8a90fb7655de3e76a1fbba55d1536581a56729ec 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4032c7a11c93154adaeb3171802dfd99c31071d0..ef39ace50e0e0e90ba49c841b874a49d156f7466 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 159db363b983b85a609c345e290cde069ab05044..59a7e65c8318f73712850918bad3f1181882b1cc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -26,7 +26,9 @@
 
 #include "SMESH_PreMeshInfo.hxx"
 
+#include "DriverMED.hxx"
 #include "DriverMED_R_SMESHDS_Mesh.h"
+#include "MED_Factory.hxx"
 #include "SMDS_EdgePosition.hxx"
 #include "SMDS_FacePosition.hxx"
 #include "SMDS_SpacePosition.hxx"
@@ -38,8 +40,6 @@
 #include "SMESH_Mesh_i.hxx"
 #include "SMESH_subMesh_i.hxx"
 
-#include <MED_Factory.hxx>
-
 #include <HDFarray.hxx>
 #include <HDFdataset.hxx>
 #include <HDFfile.hxx>
@@ -228,54 +228,17 @@ namespace
     static map< MED::EGeometrieElement, SMDSAbs_EntityType> med2smeshTypes;
     if ( med2smeshTypes.empty() )
     {
-      med2smeshTypes[ MED::ePOINT1   ] = SMDSEntity_0D                ;
-      med2smeshTypes[ MED::eSEG2     ] = SMDSEntity_Edge              ;
-      med2smeshTypes[ MED::eSEG3     ] = SMDSEntity_Quad_Edge         ;
-      med2smeshTypes[ MED::eTRIA3    ] = SMDSEntity_Triangle          ;
-      med2smeshTypes[ MED::eTRIA6    ] = SMDSEntity_Quad_Triangle     ;
-      med2smeshTypes[ MED::eTRIA7    ] = SMDSEntity_BiQuad_Triangle   ;
-      med2smeshTypes[ MED::eQUAD4    ] = SMDSEntity_Quadrangle        ;
-      med2smeshTypes[ MED::eQUAD8    ] = SMDSEntity_Quad_Quadrangle   ;
-      med2smeshTypes[ MED::eQUAD9    ] = SMDSEntity_BiQuad_Quadrangle ;
-      med2smeshTypes[ MED::eTETRA4   ] = SMDSEntity_Tetra             ;
-      med2smeshTypes[ MED::ePYRA5    ] = SMDSEntity_Pyramid           ;
-      med2smeshTypes[ MED::ePENTA6   ] = SMDSEntity_Penta             ;
-      med2smeshTypes[ MED::eHEXA8    ] = SMDSEntity_Hexa              ;
-      med2smeshTypes[ MED::eOCTA12   ] = SMDSEntity_Hexagonal_Prism   ;
-      med2smeshTypes[ MED::eTETRA10  ] = SMDSEntity_Quad_Tetra        ;
-      med2smeshTypes[ MED::ePYRA13   ] = SMDSEntity_Quad_Pyramid      ;
-      med2smeshTypes[ MED::ePENTA15  ] = SMDSEntity_Quad_Penta        ;
-      med2smeshTypes[ MED::eHEXA20   ] = SMDSEntity_Quad_Hexa         ;
-      med2smeshTypes[ MED::eHEXA27   ] = SMDSEntity_TriQuad_Hexa      ;
-      med2smeshTypes[ MED::ePOLYGONE ] = SMDSEntity_Polygon           ;
-      med2smeshTypes[ MED::ePOLYEDRE ] = SMDSEntity_Polyhedra         ;
-      med2smeshTypes[ MED::eNONE     ] = SMDSEntity_Node              ;
-      med2smeshTypes[ MED::eBALL     ] = SMDSEntity_Ball              ;
+      for  ( int iG = 0; iG < SMDSEntity_Last; ++iG )
+      {
+        SMDSAbs_EntityType    smdsType = (SMDSAbs_EntityType) iG;
+        MED::EGeometrieElement medType =
+          (MED::EGeometrieElement) DriverMED::GetMedGeoType( smdsType );
+        med2smeshTypes.insert( make_pair( medType, smdsType ));
+      }
     }
     return med2smeshTypes;
   }
 
-  //================================================================================
-  /*!
-   * \brief Return a vector<MED::EGeometrieElement> intended to retrieve
-   *        MED::EGeometrieElement by SMDSAbs_EntityType
-   */
-  //================================================================================
-
-  const vector<MED::EGeometrieElement>& mesh2medElemType()
-  {
-    static vector<MED::EGeometrieElement> mesh2medElemTypes;
-    if ( mesh2medElemTypes.empty() )
-    {
-      mesh2medElemTypes.resize( SMDSEntity_Last + 1 );
-      Tmed2smeshElemTypeMap::const_iterator me2sme    = med2smeshElemTypeMap().begin();
-      Tmed2smeshElemTypeMap::const_iterator me2smeEnd = med2smeshElemTypeMap().end();
-      for ( ; me2sme != me2smeEnd; ++me2sme )
-        mesh2medElemTypes[ me2sme->second ] = me2sme->first;
-    }
-    return mesh2medElemTypes;
-  }
-
   //================================================================================
   /*!
    * \brief Writes meshInfo into a HDF file
@@ -289,14 +252,14 @@ namespace
     // we use med identification of element (MED::EGeometrieElement) types
     // but not enum SMDSAbs_EntityType because values of SMDSAbs_EntityType may
     // change at insertion of new items in the middle.
-    const vector<MED::EGeometrieElement>& medTypes = mesh2medElemType();
+    //const vector<MED::EGeometrieElement>& medTypes = mesh2medElemType();
 
     vector<int> data;
 
     for ( size_t i = 0; i < meshInfo->length(); ++i )
       if ( meshInfo[i] > 0 )
       {
-        data.push_back( medTypes[ i ] );
+        data.push_back( DriverMED::GetMedGeoType( SMDSAbs_EntityType( i ))); //medTypes[ i ] );
         data.push_back( meshInfo[ i ] );
       }
 
index 87f83ba2f8db9ffdd80ffb727df03b4fbfaf0fa2..ef2351cf1c16ef7b6067d3a147bb017fb8af1d32 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 595e732fa952be39a50f2372bba61d872e0bdae4..13d66a497d5bcd605251e744ef0d0379f94c90ec 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -27,6 +27,7 @@
 
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SMESH_Mesh)
+#include CORBA_SERVER_HEADER(GEOM_Gen)
 #include CORBA_SERVER_HEADER(SALOMEDS)
 
 #include <TCollection_AsciiString.hxx>
@@ -162,6 +163,9 @@ namespace SMESH
     TPythonDump&
     operator<<(const SMESH::string_array& theArg);
 
+    TPythonDump&
+    operator<<(const SMESH::nodes_array& theArg);
+
     TPythonDump&
     operator<<(SMESH::SMESH_Hypothesis_ptr theArg);
 
@@ -216,6 +220,12 @@ namespace SMESH
     TPythonDump&
     operator<<(const SMESH::ListOfGroups * theList);
 
+    TPythonDump&
+    operator<<(const GEOM::ListOfGO& theList);
+
+    TPythonDump&
+    operator<<(const GEOM::ListOfGBO& theList);
+
     TPythonDump&
     operator<<(const SMESH::ListOfIDSources& theList);
 
index 19a483dcbac6cddf72da1859d0f73e71325c77f6..ac64d86ad9ef83f867a07c05297571559956d147 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5282620ddc127f23d719dfef57d60ad0358b4b58..69fdcd72ec323a6ad002ac4fa2c39036fd2ee45f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 22f3d372ab1e077eec2c27e51059281d7cff10c9..a8ae78e0857049ad804d956bce2b68ee7a58c419 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index ce5d41cdb5c01fe1079e2b57ab0c6c79d6d37f33..3b1f2f4b2a9cbbe858ea7c0eb6db870d6b87b433 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2010-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4a2a9c6926075c8fc08929c406e116ea76079981..a043765799c6872dff1abbb53f15badbb03d5c47 100644 (file)
@@ -1,11 +1,11 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
+## \package smeshstudytools Python API to access SMESH objects in the study.
+
+## \defgroup smeshstudytools Accessing SMESH object in the study
+#  \{ 
+#  \details
+#  Module \b smeshstudytools provides a new class SMeshStudyTools to facilitate the
+#  use of mesh objects in Salome study.
+#  \}
+
 """
 This module provides a new class :class:`SMeshStudyTools` to facilitate the
 use of mesh objects in Salome study.
@@ -31,6 +41,15 @@ from salome.kernel.deprecation import is_called_by_sphinx
 if not is_called_by_sphinx():
   from salome.gui import helper
 
+## This class provides several methods to manipulate mesh objects in Salome
+#  study. The parameter \em studyEditor defines a \b StudyEditor
+#  object used to access the study. If \b None, the method returns a 
+#  \b StudyEditor object on the current study.
+#
+#  \b editor
+#  This instance attribute contains the underlying \b StudyEditor object. 
+#  It can be used to access the study but the attribute itself should not be modified.
+#  \ingroup smeshstudytools
 class SMeshStudyTools:
     """
     This class provides several methods to manipulate mesh objects in Salome
@@ -56,13 +75,18 @@ class SMeshStudyTools:
         self.editor = studyEditor
         self.smeshGui = None
 
+    ## This function updates the tools so that it works on the
+    #  specified study.
     def updateStudy(self, studyId=None):
         """
         This function updates the tools so that it works on the
         specified study.
         """
         self.editor = getStudyEditor(studyId)
-        
+
+    ## Get the mesh item owning the mesh group \em meshGroupItem.
+    #  \param  meshGroupItem (SObject) mesh group belonging to the searched mesh.
+    #  \return The SObject corresponding to the mesh, or None if it was not found.        
     def getMeshFromGroup(self, meshGroupItem):
         """
         Get the mesh item owning the mesh group `meshGroupItem`.
@@ -81,20 +105,22 @@ class SMeshStudyTools:
             meshItem = salome.ObjectToSObject(meshObj)
         return meshItem
 
-
+    ## Returns the MESH object currently selected in the active study.
     def getMeshObjectSelected(self):
-        '''
+        """
         Returns the MESH object currently selected in the active study.
-        '''
+        """
         sobject, entry = helper.getSObjectSelected()
         meshObject = self.getMeshObjectFromEntry(entry)
         return meshObject
 
+    ## Returns the MESH object associated to the specified entry,
+    #  (the entry is the identifier of an item in the objects browser).
     def getMeshObjectFromEntry(self, entry):
-        '''
+        """
         Returns the MESH object associated to the specified entry,
         (the entry is the identifier of an item in the objects browser).
-        '''
+        """
         if entry is None:
             return None
         import SMESH
@@ -103,12 +129,14 @@ class SMeshStudyTools:
 
         meshObject=smesh.IDToObject(entry)
         return meshObject
-
+    
+    ## Returns the SMESH object associated to the specified \em SObject,
+    #  (the SObject is an item in the objects browser).
     def getMeshObjectFromSObject(self, sobject):
-        '''
+        """
         Returns the SMESH object associated to the specified SObject,
         (the SObject is an item in the objects browser).
-        '''
+        """
         if sobject is None:
             return None
         
@@ -116,11 +144,13 @@ class SMeshStudyTools:
         meshObject = obj._narrow(SMESH.SMESH_Mesh)
         return meshObject
 
+    ## Display the SMESH object associated to the specified \em entry
+    #  (the entry is the identifier of an item in the objects browser).
     def displayMeshObjectFromEntry(self,entry):
-        '''
+        """
         Display the SMESH object associated to the specified entry
         (the entry is the identifier of an item in the objects browser).    
-        '''
+        """
         if self.smeshGui is None:
             self.smeshGui = salome.ImportComponentGUI("SMESH")
 
index cc0e6c94b68b78a336b84eb59b9afb05949c615c..f11ded9118dfa37df9496e72e77c7053ac6f810e 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 12c5b883748d41af83dbf8e552b576e0e39a94bd..672183e8cb4d8f03a7c172d5e78dd5a783740895 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index a51bf5b0018ddfae1890e173ac3faa2c521ad5ca..b36472401a2a48a43942a37df9914f50dd7100e3 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index b547265bcbfd36f608e669c93503f867476c813b..8ed443096410bc7ffb5dffd615d9efd2f037043b 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 49062d34292d594d824ea4eb43ffa2456e1887c5..1d8468aada42e9aa39b88412b98294b8668caafe 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4efbc01b493bfbc366ce731c3de615bb15d01377..cfbfdbd42c714816bf1180a884e4693b8098a256 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 599b09dd0b9d43f8f9f5796805672bf5de935052..30d418663a08e36d45f8e8c184612cbd9ba384e8 100644 (file)
@@ -1,10 +1,10 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2631388ec1fd625d17207813a27e30dcb4f0de55..4140aaeb46bee14568989b62914a0dee00acb07d 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9b13c6f612c60feaa799fea176b9427018c807ff..4e1aeb1f2b6e4e08eda3e49a2716fde4193a3fbc 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3c55446cba1bba5b6155f0ce23d1b8aab3894e7b..54e6b5360d127abd23d077290ef1fc1199a0982e 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index fdbeb489c9b21b81b1ebf8f8cc988ea3d97aba45..09637e6c344c1485ec00528064108dd34d026da0 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5a85f26ffbb818bbe9d98d7ce69ee18191021700..16c301efbdc95f4e81aa2b21a757b26821b185c4 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 58d2aadd3864e28ecd40606a814839a468f208e6..0b745d4c84aeafde795bca5f42df1dd4b209b310 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index c5a5e17e64e2d76de43b9db676eb2ccc137bd9fd..84fbef2f64f74ec55a5d58b00ffdeb5c2eaf35cf 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index c38c5292fa58d01d313cfba7b2581932c21cfaca..d287da529749d15203f95789e624a0f14ec0ab50 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 850df8e66a99430e20fa7733788fd5bcc6d42eb8..4677ff7605982d2305eb25996bf52d4f47c1f5cd 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1e4963d4aa12771d1c26d40940a3041b35f85364..c914e253658045fecec5356f7fc897828e1754e7 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index f6edcf762a1224231d59e4d56b163d32aa5a0dff..42797d079c7d747d770510f7361624d1b6234b00 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5084f5c4db22936fb37534873d2dbd41b987181b..6604c5ba6af7e0b6b424cef28989f247ea4ae2cc 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 6e6837816b4335116977b2801dfa10a50e29fbcf..2423b8898a552becfd8c7a1f7fa5c2fc98471fcd 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8a327def58d6f03946eaa12a63b9488446731a87..58baf90b6a97418a7a4185f60e820cf84690eef1 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 489a2971fb71210c2d88155d0d936285eed3472c..7c30de974af903b72b731e3c32d634c3b85ce79f 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1f31fdd205d7eb365661a4eb4d64d2711ce3fc43..5fa307f9cbbf97479257744cedbda8a7577631a0 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 77d1d37e15b13aacd0b810ecda88db6fd8cff823..0964cff0ddd267a6f48d46885e664c6d3d957e66 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index fce24d7499414b6f0953fb18495f51970a840711..699bca4937369d1e7e62631b025abddb51806086 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 809fbff8d580c171104d72222c9f0fb5be536f7c..b5be912c4e2341b4bd6ad76b52f959ec694dcc05 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index dc9b617b530c68adfb9794993614ccb04aa65c0d..1284b20e5151e75f390325ab6bac2b4eaa2e5f4d 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 784ccd373bee37b3528328713339129a8ca481d4..bd1b239dcc2593078aea75c85a75bf0dbd94bfb7 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index c973d4b44f817242d9a4100349d4cc9f797f1200..2db6baf0f456c338fc18808c097b9924ec9b4fd4 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 280975e64c817173356a62f68d73f11dd1c171dc..a6a757a0a9b9d084748fcc6c9961145b4cbad4c7 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 68996d81cecc81c650d44adb4025ffffac854678..7a72d6f5c0d8a315f950a993a916e7997f980456 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2880748b2fc35680fd50fcadce98ad6859f9a284..8883aba833deb73e0ecc3ddc818b4cc5b66250cb 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 57098e8f1469bab73c5640b8155407b7c78ea0d1..f8bdb0f58616dcbf508bb8e2c108fbafa294dbcb 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index c296df6fda85bc21baeea3410b2eedbc20a21fa4..5a2c43eac96748aa52f67043a0a75e2fd9b91a63 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 0ddb6f3c6d739f7108540a1ffcf10f54f8a4a0b5..ce8ffb33cdab8eb9ac738f88d02d986afa1ced13 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2a34cec6c90c0c0017901967e3daf4b67de8bd0c..5a4237e0abf7a173f129d23bff2af91aa7dfc007 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index c3a09133dac6a7fec926793d5230071ae3c64f8e..30eb5e17b6b405f54837d800ae3edb5793a7f454 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index c2aa883ec953428180a970650fd0ce1f2dc819f2..9c11bb8b9b54312c4eb3cd97ebae1335b1c92b66 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5a967a42e7709d4bd36cc21850eaf3de35addc2b..65bb26292b825e991399b2f3c0f3af1befa60a06 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index ea8bc3c8c2c9ededfb9498d45473539761cea41d..bd63444ed227941fcd38047d431ade911466a10d 100755 (executable)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 625a82f9e868343491fd707f36a08eaa872c0656..df88ecc30a8b16231de84f27140f8d3e22c54522 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index e28659b556cf8f9bd2159991c95910487f1b918b..1e9c735332a99c79bbfadde90cb2a50c2a3eeb7f 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -199,7 +199,8 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm):
         hyp.SetDeflection(deflection)
         return hyp
 
-    ## Defines "Arithmetic1D" hypothesis to cut an edge in several segments with increasing arithmetic length
+    ## Defines "Arithmetic1D" hypothesis to cut an edge in several segments with a length
+    #  that changes in arithmetic progression
     #  @param start defines the length of the first segment
     #  @param end   defines the length of the last  segment
     #  @param reversedEdges is a list of edges to mesh using reversed orientation.
@@ -226,6 +227,32 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm):
         hyp.SetObjectEntry( entry )
         return hyp
 
+    ## Defines "GeometricProgression" hypothesis to cut an edge in several
+    #  segments with a length that changes in Geometric progression
+    #  @param start defines the length of the first segment
+    #  @param ratio defines the common ratio of the geometric progression
+    #  @param reversedEdges is a list of edges to mesh using reversed orientation.
+    #                       A list item can also be a tuple (edge, 1st_vertex_of_edge)
+    #  @param UseExisting if ==true - searches for an existing hypothesis created with
+    #                     the same parameters, else (default) - creates a new one
+    #  @return an instance of StdMeshers_Geometric1D hypothesis
+    #  @ingroup l3_hypos_1dhyps
+    def GeometricProgression(self, start, ratio, reversedEdges=[], UseExisting=0):
+        reversedEdgeInd = self.ReversedEdgeIndices(reversedEdges)
+        entry = self.MainShapeEntry()
+        from salome.smesh.smeshBuilder import IsEqual
+        compFun = lambda hyp, args: ( IsEqual(hyp.GetLength(1), args[0]) and \
+                                      IsEqual(hyp.GetLength(0), args[1]) and \
+                                      hyp.GetReversedEdges() == args[2]  and \
+                                      (not args[2] or hyp.GetObjectEntry() == args[3]))
+        hyp = self.Hypothesis("GeometricProgression", [start, ratio, reversedEdgeInd, entry],
+                              UseExisting=UseExisting, CompareMethod=compFun)
+        hyp.SetStartLength( start )
+        hyp.SetCommonRatio( ratio )
+        hyp.SetReversedEdges( reversedEdgeInd )
+        hyp.SetObjectEntry( entry )
+        return hyp
+
     ## Defines "FixedPoints1D" hypothesis to cut an edge using parameter
     # on curve from 0 to 1 (additionally it is neecessary to check
     # orientation of edges and create list of reversed edges if it is
@@ -237,7 +264,7 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm):
     #                       A list item can also be a tuple (edge, 1st_vertex_of_edge)
     #  @param UseExisting if ==true - searches for an existing hypothesis created with
     #                     the same parameters, else (default) - creates a new one
-    #  @return an instance of StdMeshers_Arithmetic1D hypothesis
+    #  @return an instance of StdMeshers_FixedPoints1D hypothesis
     #  @ingroup l3_hypos_1dhyps
     def FixedPoints1D(self, points, nbSegs=[1], reversedEdges=[], UseExisting=0):
         if not isinstance(reversedEdges,list): #old version script, before adding reversedEdges
@@ -295,12 +322,23 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm):
         hyp.SetDeflection(d)
         return hyp
 
-    ## Defines "Propagation" hypothesis that propagates all other hypotheses on all other edges that are at
-    #  the opposite side in case of quadrangular faces
+    ## Defines "Propagation" hypothesis that propagates 1D hypotheses
+    #  from an edge where this hypothesis is assigned to
+    #  on all other edges that are at the opposite side in case of quadrangular faces
+    #  This hypothesis should be assigned to an edge to propagate a hypothesis from.
     #  @ingroup l3_hypos_additi
     def Propagation(self):
         return self.Hypothesis("Propagation", UseExisting=1, CompareMethod=self.CompareEqualHyp)
 
+    ## Defines "Propagation of Node Distribution" hypothesis that propagates
+    #  distribution of nodes from an edge where this hypothesis is assigned to,
+    #  to opposite edges of quadrangular faces, so that number of segments on all these
+    #  edges will be the same, as well as relations between segment lengths. 
+    #  @ingroup l3_hypos_additi
+    def PropagationOfDistribution(self):
+        return self.Hypothesis("PropagOfDistribution", UseExisting=1,
+                               CompareMethod=self.CompareEqualHyp)
+
     ## Defines "AutomaticLength" hypothesis
     #  @param fineness for the fineness [0-1]
     #  @param UseExisting if ==true - searches for an existing hypothesis created with the
@@ -552,28 +590,56 @@ class StdMeshersBuilder_Quadrangle(Mesh_Algorithm):
     #                    same number of segments, the other pair must have an even difference
     #                    between the numbers of segments on the sides.
     #  @param triangleVertex: 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
+    #                    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 enfVertices: list of shapes defining positions where nodes (enforced nodes)
+    #                    must be created by the mesher. Shapes can be of any type,
+    #                    vertices of given shapes define positions of enforced nodes.
+    #                    Only vertices successfully projected to the face are used.
+    #  @param enfPoints: list of points giving positions of enforced nodes.
+    #                    Point can be defined either as SMESH.PointStruct's
+    #                    ([SMESH.PointStruct(x1,y1,z1), SMESH.PointStruct(x2,y2,z2),...])
+    #                    or triples of values ([[x1,y1,z1], [x2,y2,z2], ...]).
+    #                    In the case if the defined QuadrangleParameters() refer to a sole face,
+    #                    all given points must lie on this face, else the mesher fails.
+    #  @param UseExisting: if \c True - searches for the existing hypothesis created with
+    #                    the same parameters, else (default) - creates a new one
     #  @ingroup l3_hypos_quad
-    def QuadrangleParameters(self, quadType=StdMeshers.QUAD_STANDARD, triangleVertex=0, UseExisting=0):
-        import GEOM
+    def QuadrangleParameters(self, quadType=StdMeshers.QUAD_STANDARD, triangleVertex=0,
+                             enfVertices=[],enfPoints=[],UseExisting=0):
+        import GEOM, SMESH
         vertexID = triangleVertex
         if isinstance( triangleVertex, GEOM._objref_GEOM_Object ):
             vertexID = self.mesh.geompyD.GetSubShapeID( self.mesh.geom, triangleVertex )
+        if isinstance( enfVertices, int ) and not enfPoints and not UseExisting:
+            # a call of old syntax, before inserting enfVertices and enfPoints before UseExisting
+            UseExisting, enfVertices = enfVertices, []
+        pStructs, xyz = [], []
+        for p in enfPoints:
+            if isinstance( p, SMESH.PointStruct ):
+                xyz.append(( p.x, p.y, p.z ))
+                pStructs.append( p )
+            else:
+                xyz.append(( p[0], p[1], p[2] ))
+                pStructs.append( SMESH.PointStruct( p[0], p[1], p[2] ))
         if not self.params:
             compFun = lambda hyp,args: \
                       hyp.GetQuadType() == args[0] and \
-                      ( hyp.GetTriaVertex()==args[1] or ( hyp.GetTriaVertex()<1 and args[1]<1))
-            self.params = self.Hypothesis("QuadrangleParams", [quadType,vertexID],
+                      (hyp.GetTriaVertex()==args[1] or ( hyp.GetTriaVertex()<1 and args[1]<1)) and \
+                      ((hyp.GetEnforcedNodes()) == (args[2],args[3])) # True w/o enfVertices only
+            entries = [ shape.GetStudyEntry() for shape in enfVertices ]
+            self.params = self.Hypothesis("QuadrangleParams", [quadType,vertexID,entries,xyz],
                                           UseExisting = UseExisting, CompareMethod=compFun)
             pass
         if self.params.GetQuadType() != quadType:
             self.params.SetQuadType(quadType)
         if vertexID > 0:
             self.params.SetTriaVertex( vertexID )
+        from salome.smesh.smeshBuilder import AssureGeomPublished
+        for v in enfVertices:
+            AssureGeomPublished( self.mesh, v )
+        self.params.SetEnforcedNodes( enfVertices, pStructs )
         return self.params
 
     ## Defines "QuadrangleParams" hypothesis with a type of quadrangulation that only
@@ -980,7 +1046,8 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm):
         return hyp
 
     ## Defines "Arithmetic1D" hypothesis, specifying the distribution of segments
-    #  to build between the inner and the outer shells with a length that changes in arithmetic progression
+    #  to build between the inner and the outer shells with a length that changes
+    #  in arithmetic progression
     #  @param start  the length of the first segment
     #  @param end    the length of the last  segment
     def Arithmetic1D(self, start, end ):
@@ -992,6 +1059,20 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm):
         hyp.SetLength(end  , 0)
         return hyp
 
+    ## Defines "GeometricProgression" hypothesis, specifying the distribution of segments
+    #  to build between the inner and the outer shells with a length that changes
+    #  in Geometric progression
+    #  @param start  the length of the first segment
+    #  @param ratio  the common ratio of the geometric progression
+    def GeometricProgression(self, start, ratio ):
+        if self.algoType != "RadialPrism_3D":
+            print "Prism_3D algorith doesn't support any hyposesis"
+            return None
+        hyp = self.OwnHypothesis("GeometricProgression", [start, ratio])
+        hyp.SetStartLength( start )
+        hyp.SetCommonRatio( ratio )
+        return hyp
+
     ## Defines "StartEndLength" hypothesis, specifying distribution of segments
     #  to build between the inner and the outer shells as geometric length increasing
     #  @param start for the length of the first segment
@@ -1148,6 +1229,16 @@ class StdMeshersBuilder_RadialQuadrangle1D2D(Mesh_Algorithm):
         hyp.SetLength(end  , 0)
         return hyp
 
+    ## Defines "GeometricProgression" hypothesis, specifying the distribution of segments
+    #  with a length that changes in Geometric progression
+    #  @param start  the length of the first segment
+    #  @param ratio  the common ratio of the geometric progression
+    def GeometricProgression(self, start, ratio ):
+        hyp = self.OwnHypothesis("GeometricProgression", [start, ratio])
+        hyp.SetStartLength( start )
+        hyp.SetCommonRatio( ratio )
+        return hyp
+
     ## Defines "StartEndLength" hypothesis, specifying distribution of segments
     #  as geometric length increasing
     #  @param start for the length of the first segment
@@ -1309,22 +1400,21 @@ class StdMeshersBuilder_Cartesian_3D(Mesh_Algorithm):
     #    Examples:
     #    - "10.5" - defines a grid with a constant spacing
     #    - [["1", "1+10*t", "11"] [0.1, 0.6]] - defines different spacing in 3 ranges.
-    #  @param yGridDef defines the grid along the Y asix the same way as \a xGridDef does
-    #  @param zGridDef defines the grid along the Z asix the same way as \a xGridDef does
+    #  @param yGridDef defines the grid along the Y asix the same way as \a xGridDef does.
+    #  @param zGridDef defines the grid along the Z asix the same way as \a xGridDef does.
     #  @param sizeThreshold (> 1.0) defines a minimal size of a polyhedron so that
-    #         a polyhedron of size less than hexSize/sizeThreshold is not created
-    #  @param UseExisting if ==true - searches for the existing hypothesis created with
-    #                     the same parameters, else (default) - creates a new one
-    def SetGrid(self, xGridDef, yGridDef, zGridDef, sizeThreshold=4.0, UseExisting=False):
+    #         a polyhedron of size less than hexSize/sizeThreshold is not created.
+    #  @param implEdges enables implementation of geometrical edges into the mesh.
+    def SetGrid(self, xGridDef, yGridDef, zGridDef, sizeThreshold=4.0, implEdges=False):
         if not self.hyp:
             compFun = lambda hyp, args: False
             self.hyp = self.Hypothesis("CartesianParameters3D",
                                        [xGridDef, yGridDef, zGridDef, sizeThreshold],
-                                       UseExisting=UseExisting, CompareMethod=compFun)
+                                       UseExisting=False, CompareMethod=compFun)
         if not self.mesh.IsUsedHypothesis( self.hyp, self.geom ):
             self.mesh.AddHypothesis( self.hyp, self.geom )
 
-        for axis, gridDef in enumerate( [xGridDef, yGridDef, zGridDef]):
+        for axis, gridDef in enumerate( [xGridDef, yGridDef, zGridDef] ):
             if not gridDef: raise ValueError, "Empty grid definition"
             if isinstance( gridDef, str ):
                 self.hyp.SetGridSpacing( [gridDef], [], axis )
@@ -1336,8 +1426,69 @@ class StdMeshersBuilder_Cartesian_3D(Mesh_Algorithm):
             else:
                 self.hyp.SetGridSpacing( gridDef[0], gridDef[1], axis )
         self.hyp.SetSizeThreshold( sizeThreshold )
+        self.hyp.SetToAddEdges( implEdges )
         return self.hyp
 
+    ## Defines custom directions of axes of the grid
+    #  @param xAxis either SMESH.DirStruct or a vector, or 3 vector components
+    #  @param yAxis either SMESH.DirStruct or a vector, or 3 vector components
+    #  @param zAxis either SMESH.DirStruct or a vector, or 3 vector components
+    def SetAxesDirs( self, xAxis, yAxis, zAxis ):
+        import GEOM
+        if hasattr( xAxis, "__getitem__" ):
+            xAxis = self.mesh.smeshpyD.MakeDirStruct( xAxis[0],xAxis[1],xAxis[2] )
+        elif isinstance( xAxis, GEOM._objref_GEOM_Object ):
+            xAxis = self.mesh.smeshpyD.GetDirStruct( xAxis )
+        if hasattr( yAxis, "__getitem__" ):
+            yAxis = self.mesh.smeshpyD.MakeDirStruct( yAxis[0],yAxis[1],yAxis[2] )
+        elif isinstance( yAxis, GEOM._objref_GEOM_Object ):
+            yAxis = self.mesh.smeshpyD.GetDirStruct( yAxis )
+        if hasattr( zAxis, "__getitem__" ):
+            zAxis = self.mesh.smeshpyD.MakeDirStruct( zAxis[0],zAxis[1],zAxis[2] )
+        elif isinstance( zAxis, GEOM._objref_GEOM_Object ):
+            zAxis = self.mesh.smeshpyD.GetDirStruct( zAxis )
+        if not self.hyp:
+            self.hyp = self.Hypothesis("CartesianParameters3D")
+        if not self.mesh.IsUsedHypothesis( self.hyp, self.geom ):
+            self.mesh.AddHypothesis( self.hyp, self.geom )
+        self.hyp.SetAxesDirs( xAxis, yAxis, zAxis )
+        return self.hyp
+
+    ## Automatically defines directions of axes of the grid at which
+    #  a number of generated hexahedra is maximal
+    #  @param isOrthogonal defines whether the axes mush be orthogonal
+    def SetOptimalAxesDirs(self, isOrthogonal=True):
+        if not self.hyp:
+            self.hyp = self.Hypothesis("CartesianParameters3D")
+        if not self.mesh.IsUsedHypothesis( self.hyp, self.geom ):
+            self.mesh.AddHypothesis( self.hyp, self.geom )
+        x,y,z = self.hyp.ComputeOptimalAxesDirs( self.geom, isOrthogonal )
+        self.hyp.SetAxesDirs( x,y,z )
+        return self.hyp
+
+    ## Sets/unsets a fixed point. The algorithm makes a plane of the grid pass
+    #  through the fixed point in each direction at which the grid is defined
+    #  by spacing
+    #  @param p coordinates of the fixed point. Either SMESH.PointStruct or
+    #         a vertex or 3 components of coordinates.
+    #  @param toUnset defines whether the fixed point is defined or removed.
+    def SetFixedPoint( self, p, toUnset=False ):
+        import SMESH, GEOM
+        if toUnset:
+            if not self.hyp: return
+            p = SMESH.PointStruct(0,0,0)
+        elif hasattr( p, "__getitem__" ):
+            p = SMESH.PointStruct( p[0],p[1],p[2] )
+        elif isinstance( p, GEOM._objref_GEOM_Object ):
+            p = self.mesh.smeshpyD.GetPointStruct( p )
+        if not self.hyp:
+            self.hyp = self.Hypothesis("CartesianParameters3D")
+        if not self.mesh.IsUsedHypothesis( self.hyp, self.geom ):
+            self.mesh.AddHypothesis( self.hyp, self.geom )
+        self.hyp.SetFixedPoint( p, toUnset )
+        return self.hyp
+        
+
     pass # end of StdMeshersBuilder_Cartesian_3D class
 
 ## Defines a stub 1D algorithm, which enables "manual" creation of nodes and
index 630e0eda86afd08582ab081a91a22760a3f388d6..af0e5b2080c95da71cc6eddce5bad559a3d19075 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 608edbd83ef11687713c54694e27b087fa24efbb..d3e5ced2da7534d4b0f160eb41edbb0b110f20fd 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index df4ce35c699c3db87b30d3625b2b07e472c53c0e..0d92fa69ebc7e6db742061e5b9fa26aee6e9b1ce 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 18cd1f28436bc65cd4fba50632401c4b95a979fe..3c75a1a8c552f269641db999fb26f4cddff79d14 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 76b3a38408d28d2070485a69a4b0e4b4cc3a55b6..aac3b4fc864d8f5cde7647764866c1e4f4226c23 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index e064c2ec700386dab32cbd623cfab407cfb4fc28..1080b3957917a1f3858650879e131352423c7611 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index ea1c24cf4732e26d466867ab6ec36cdb022ce929..a339e350e065d3483068983f45da2c862cbe7018 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index fae90efe0e383de400cd64ef175c3fcc2f6ca7e0..fae3a095fb48abb64c3efee861a0fbe7a7f97e28 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1c0493df878100ff1b75cd1290e6714144367aaf..b7a55672e44f0e8c758c7fb41489f4a50c12f79c 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7729e0379aaa65d6cdd3c6d2d3daf5a96e564523..45a831cfdfa610366bc39b5947fd98ab42ed29cd 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index d6ec2a23c107b00ee230df7bf628f425de76a6ab..1b5cd2c996242913204a086bba74743c16fc5472 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 0c33f99a4b07281047e315ff2c7ab25547462f90..1b00e2dd7d0303ab132d4e4fae1b84677ad0849e 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index a015b75e2def17fdc50e64bef266ac98a683589f..367fbdd25b421a6536f6fb941357239e67f02b34 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index c743d40d4c9b20b657414e68a5102e45a82bf6ac..d129ffea4d50f73c48f190d302f8e90282324b91 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3d3e336f30547f72ececaf5727b6c153ada84cb3..197132f4131cc31abe799e4312fa4bf4bdd8f5b9 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index b8f550880a63d8a7cb5f395bf501493ef8b36acc..a548126d40b1c154a28a3b39fa5bbc328e59b140 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 772df4bd36f40c2ff206925bff8890be8bfbb4f7..e34f06c2b7d76d6af6cc2f16ee0d68c798e67df0 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 02eb337afd85387255294b45675f6da6b499e0c0..6f007504e7b17323b92c20996df7de7794aded5b 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4f77b34b56f00df7eaa17bb6ce3929fde426b179..27f4c6115f41423683cf8bbb654928adccd55a44 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index bab16b2e98c751885b050f9d55cdefb01f89bbb9..1f98e3f1dbc1bd587e6a8db492cbb28c4ef86134 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index c94c55d4c312cf8c4f175bb20e420fd2704a893c..a204dcafca90619697aa308333ec18c91b501242 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index db66d8514566f92d7b9d57aa0990d3e196f0be99..be243ac99eec87b831f206b7b4babb02bc55372d 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index b8ffcf36b502d73796f213041a19dd233d04ff55..d59b048a56b6e148114efdf180765d0c762db363 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 40ae9591d78701161f2a26ea75a87038bf9dec74..ebd582a8d89a71a601ad0ff4e862a511dd2a9cab 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 0ab9ddaec0bff8431195dcba31d8175e5f785e8e..f510c05fa95c7783ce8efa3d67daaacf5818ef35 100644 (file)
@@ -1,10 +1,10 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 6325ed890378102bf9468ddcff079706afc13b17..a709614fae8e1b2189c18b6130dcf123e376017d 100644 (file)
@@ -1,10 +1,10 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5cae0b029c33fc499e9def718acc6c5305b40218..53dcd14a7031bbb26491c0052987237d0084d135 100755 (executable)
@@ -1,10 +1,10 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index fd41f3aae09a21d8690eee6319dd9a7e70360a34..f40a8284a5e3863b3c7ace63a8afa2da490db405 100644 (file)
@@ -1,10 +1,10 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 65830faac3d04784194793d096437caca757fa49..037dfcec7c39ad83d4049c8715173e0bbbe14b56 100755 (executable)
@@ -1,10 +1,10 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 99ab3db11d537af2fb76582b1450015b29d5f34b..d5ba24ac3f07465eb421400b502afb8cdc162c06 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5e68dc230b7992786766b656063a8299b19e2ce2..ce0a35594f1a35befb4d9109ad41333536073ffd 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -73,7 +73,7 @@
 ##   @defgroup l2_modif_invdiag  Diagonal inversion of elements
 ##   @defgroup l2_modif_unitetri Uniting triangles
 ##   @defgroup l2_modif_changori Changing orientation of elements
-##   @defgroup l2_modif_cutquadr Cutting quadrangles
+##   @defgroup l2_modif_cutquadr Cutting elements
 ##   @defgroup l2_modif_smooth   Smoothing
 ##   @defgroup l2_modif_extrurev Extrusion and Revolution
 ##   @defgroup l2_modif_patterns Pattern mapping
@@ -93,6 +93,16 @@ import SALOME
 import SALOMEDS
 import os
 
+class MeshMeta(type):
+    def __instancecheck__(cls, inst):
+        """Implement isinstance(inst, cls)."""
+        return any(cls.__subclasscheck__(c)
+                   for c in {type(inst), inst.__class__})
+
+    def __subclasscheck__(cls, sub):
+        """Implement issubclass(sub, cls)."""
+        return type.__subclasscheck__(cls, sub) or (cls.__name__ == sub.__name__ and cls.__module__ == sub.__module__)
+
 ## @addtogroup l1_auxiliary
 ## @{
 
@@ -307,7 +317,7 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen):
     [TopAbs_IN, TopAbs_OUT, TopAbs_ON, TopAbs_UNKNOWN] = range(4)
 
     # Methods of splitting a hexahedron into tetrahedra
-    Hex_5Tet, Hex_6Tet, Hex_24Tet = 1, 2, 3
+    Hex_5Tet, Hex_6Tet, Hex_24Tet, Hex_2Prisms, Hex_4Prisms = 1, 2, 3, 1, 2
 
     def __new__(cls):
         global engine
@@ -374,9 +384,12 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen):
         #print "init_smesh"
         self.SetCurrentStudy(theStudy,geompyD)
 
-    ## Creates an empty Mesh. This mesh can have an underlying geometry.
-    #  @param obj the Geometrical object on which the mesh is built. If not defined,
-    #             the mesh will have no underlying geometry.
+    ## Creates a mesh. This can be either an empty mesh, possibly having an underlying geometry,
+    #  or a mesh wrapping a CORBA mesh given as a parameter.
+    #  @param obj either (1) a CORBA mesh (SMESH._objref_SMESH_Mesh) got e.g. by calling
+    #         salome.myStudy.FindObjectID("0:1:2:3").GetObject() or
+    #         (2) a Geometrical object for meshing or
+    #         (3) none.
     #  @param name the name for the new mesh.
     #  @return an instance of Mesh class.
     #  @ingroup l2_construct
@@ -851,11 +864,15 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen):
 
     ## Creates a filter from criteria
     #  @param criteria a list of criteria
+    #  @param binOp binary operator used when binary operator of criteria is undefined
     #  @return SMESH_Filter
     #
     #  <a href="../tui_filters_page.html#tui_filters">Example of Filters usage</a>
     #  @ingroup l1_controls
-    def GetFilterFromCriteria(self,criteria):
+    def GetFilterFromCriteria(self,criteria, binOp=SMESH.FT_LogicalAND):
+        for i in range( len( criteria ) - 1 ):
+            if criteria[i].BinaryOp == self.EnumToLong( SMESH.FT_Undefined ):
+                criteria[i].BinaryOp = self.EnumToLong( binOp )
         aFilterMgr = self.CreateFilterManager()
         aFilter = aFilterMgr.CreateFilter()
         aFilter.SetCriteria(criteria)
@@ -1140,6 +1157,7 @@ def New( study, instance=None):
 #  new nodes and elements and by changing the existing entities), to get information
 #  about a mesh and to export a mesh into different formats.
 class Mesh:
+    __metaclass__ = MeshMeta
 
     geom = 0
     mesh = 0
@@ -1548,13 +1566,24 @@ class Mesh:
             if not geom:
                 geom = self.mesh.GetShapeToMesh()
             pass
-        AssureGeomPublished( self, geom, "shape for %s" % hyp.GetName())
-        status = self.mesh.AddHypothesis(geom, hyp)
-        isAlgo = hyp._narrow( SMESH_Algo )
+        isApplicable = True
+        if self.mesh.HasShapeToMesh():
+            hyp_type     = hyp.GetName()
+            lib_name     = hyp.GetLibName()
+            checkAll    = ( not geom.IsSame( self.mesh.GetShapeToMesh() ))
+            if checkAll and geom:
+                checkAll = geom.GetType() == 37
+            isApplicable = self.smeshpyD.IsApplicable(hyp_type, lib_name, geom, checkAll)
+        if isApplicable:
+            AssureGeomPublished( self, geom, "shape for %s" % hyp.GetName())
+            status = self.mesh.AddHypothesis(geom, hyp)
+        else:
+            status = HYP_BAD_GEOMETRY
         hyp_name = GetName( hyp )
         geom_name = ""
         if geom:
-            geom_name = GetName( geom )
+            geom_name = geom.GetName()
+        isAlgo = hyp._narrow( SMESH_Algo )
         TreatHypoStatus( status, hyp_name, geom_name, isAlgo )
         return status
 
@@ -1626,17 +1655,24 @@ class Mesh:
     #         - 1D if all mesh nodes lie on OX coordinate axis, or
     #         - 2D if all mesh nodes lie on XOY coordinate plane, or
     #         - 3D in the rest cases.
-    #
     #         If @a autoDimension is @c False, the space dimension is always 3.
+    #  @param fields : list of GEOM fields defined on the shape to mesh.
+    #  @param geomAssocFields : each character of this string means a need to export a 
+    #         corresponding field; correspondence between fields and characters is following:
+    #         - 'v' stands for _vertices_ field;
+    #         - 'e' stands for _edges_ field;
+    #         - 'f' stands for _faces_ field;
+    #         - 's' stands for _solids_ field.
     #  @ingroup l2_impexp
     def ExportMED(self, f, auto_groups=0, version=MED_V2_2,
-                  overwrite=1, meshPart=None, autoDimension=True):
-        if meshPart:
+                  overwrite=1, meshPart=None, autoDimension=True, fields=[], geomAssocFields=''):
+        if meshPart or fields or geomAssocFields:
             unRegister = genObjUnRegister()
             if isinstance( meshPart, list ):
                 meshPart = self.GetIDSource( meshPart, SMESH.ALL )
                 unRegister.set( meshPart )
-            self.mesh.ExportPartToMED( meshPart, f, auto_groups, version, overwrite, autoDimension)
+            self.mesh.ExportPartToMED( meshPart, f, auto_groups, version, overwrite, autoDimension,
+                                       fields, geomAssocFields)
         else:
             self.mesh.ExportToMEDX(f, auto_groups, version, overwrite, autoDimension)
 
@@ -1897,7 +1933,7 @@ class Mesh:
     def RemoveGroupWithContents(self, group):
         self.mesh.RemoveGroupWithContents(group)
 
-    ## Gets the list of groups existing in the mesh
+    ## Gets the list of groups existing in the mesh in the order of creation (starting from the oldest one)
     #  @return a sequence of SMESH_GroupBase
     #  @ingroup l2_grps_create
     def GetGroups(self):
@@ -2284,6 +2320,12 @@ class Mesh:
     def GetElementGeomType(self, id):
         return self.mesh.GetElementGeomType(id)
 
+    ## Returns the shape type of mesh element
+    #  @return the value from SMESH::GeometryType enumeration
+    #  @ingroup l1_meshinfo
+    def GetElementShape(self, id):
+        return self.mesh.GetElementShape(id)
+
     ## Returns the list of submesh elements IDs
     #  @param Shape a geom object(sub-shape) IOR
     #         Shape must be the sub-shape of a ShapeToMesh()
@@ -2418,6 +2460,12 @@ class Mesh:
     def GetElemFaceNodes(self,elemId, faceIndex):
         return self.mesh.GetElemFaceNodes(elemId, faceIndex)
 
+    ## Returns three components of normal of given mesh face
+    #  (or an empty array in KO case)
+    #  @ingroup l1_meshinfo
+    def GetFaceNormal(self, faceId, normalized=False):
+        return self.mesh.GetFaceNormal(faceId,normalized)
+
     ## Returns an element based on all given nodes.
     #  @ingroup l1_meshinfo
     def FindElementByNodes(self,nodes):
@@ -3020,18 +3068,60 @@ class Mesh:
         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: Hex_5Tet, Hex_6Tet, Hex_24Tet
-    #         Hex_5Tet - split the hexahedron into 5 tetrahedrons, etc
+    #  @param elems either a list of elements or a mesh or a group or a submesh or a filter
+    #  @param method  flags passing splitting method:
+    #         smesh.Hex_5Tet, smesh.Hex_6Tet, smesh.Hex_24Tet.
+    #         smesh.Hex_5Tet - to split the hexahedron into 5 tetrahedrons, etc.
+    #  @ingroup l2_modif_cutquadr
+    def SplitVolumesIntoTetra(self, elems, method=smeshBuilder.Hex_5Tet ):
+        unRegister = genObjUnRegister()
+        if isinstance( elems, Mesh ):
+            elems = elems.GetMesh()
+        if ( isinstance( elems, list )):
+            elems = self.editor.MakeIDSource(elems, SMESH.VOLUME)
+            unRegister.set( elems )
+        self.editor.SplitVolumesIntoTetra(elems, method)
+
+    ## Splits hexahedra into prisms
+    #  @param elems either a list of elements or a mesh or a group or a submesh or a filter
+    #  @param startHexPoint a point used to find a hexahedron for which @a facetNormal
+    #         gives a normal vector defining facets to split into triangles.
+    #         @a startHexPoint can be either a triple of coordinates or a vertex.
+    #  @param facetNormal a normal to a facet to split into triangles of a
+    #         hexahedron found by @a startHexPoint.
+    #         @a facetNormal can be either a triple of coordinates or an edge.
+    #  @param method  flags passing splitting method: smesh.Hex_2Prisms, smesh.Hex_4Prisms.
+    #         smesh.Hex_2Prisms - to split the hexahedron into 2 prisms, etc.
+    #  @param allDomains if @c False, only hexahedra adjacent to one closest
+    #         to @a startHexPoint are split, else @a startHexPoint
+    #         is used to find the facet to split in all domains present in @a elems.
     #  @ingroup l2_modif_cutquadr
-    def SplitVolumesIntoTetra(self, elemIDs, method=smeshBuilder.Hex_5Tet ):
+    def SplitHexahedraIntoPrisms(self, elems, startHexPoint, facetNormal,
+                                 method=smeshBuilder.Hex_2Prisms, allDomains=False ):
+        # IDSource
         unRegister = genObjUnRegister()
-        if isinstance( elemIDs, Mesh ):
-            elemIDs = elemIDs.GetMesh()
-        if ( isinstance( elemIDs, list )):
-            elemIDs = self.editor.MakeIDSource(elemIDs, SMESH.VOLUME)
-            unRegister.set( elemIDs )
-        self.editor.SplitVolumesIntoTetra(elemIDs, method)
+        if isinstance( elems, Mesh ):
+            elems = elems.GetMesh()
+        if ( isinstance( elems, list )):
+            elems = self.editor.MakeIDSource(elems, SMESH.VOLUME)
+            unRegister.set( elems )
+            pass
+        # axis
+        if isinstance( startHexPoint, geomBuilder.GEOM._objref_GEOM_Object):
+            startHexPoint = self.smeshpyD.GetPointStruct( startHexPoint )
+        elif isinstance( startHexPoint, list ):
+            startHexPoint = SMESH.PointStruct( startHexPoint[0],
+                                               startHexPoint[1],
+                                               startHexPoint[2])
+        if isinstance( facetNormal, geomBuilder.GEOM._objref_GEOM_Object):
+            facetNormal = self.smeshpyD.GetDirStruct( facetNormal )
+        elif isinstance( facetNormal, list ):
+            facetNormal = self.smeshpyD.MakeDirStruct( facetNormal[0],
+                                                       facetNormal[1],
+                                                       facetNormal[2])
+        self.mesh.SetParameters( startHexPoint.parameters + facetNormal.PS.parameters )
+
+        self.editor.SplitHexahedraIntoPrisms(elems, startHexPoint, facetNormal, method, allDomains)
 
     ## Splits quadrangle faces near triangular facets of volumes
     #
@@ -3181,7 +3271,8 @@ class Mesh:
     #  Note that nodes built on edges and boundary nodes are always fixed.
     #  @param MaxNbOfIterations the maximum number of iterations
     #  @param MaxAspectRatio varies in range [1.0, inf]
-    #  @param Method is Laplacian(LAPLACIAN_SMOOTH) or Centroidal(CENTROIDAL_SMOOTH)
+    #  @param Method is either Laplacian (smesh.LAPLACIAN_SMOOTH)
+    #         or Centroidal (smesh.CENTROIDAL_SMOOTH)
     #  @return TRUE in case of success, FALSE otherwise.
     #  @ingroup l2_modif_smooth
     def Smooth(self, IDsOfElements, IDsOfFixedNodes,
@@ -3199,7 +3290,8 @@ class Mesh:
     #  Note that nodes built on edges and boundary nodes are always fixed.
     #  @param MaxNbOfIterations the maximum number of iterations
     #  @param MaxAspectRatio varies in range [1.0, inf]
-    #  @param Method is Laplacian(LAPLACIAN_SMOOTH) or Centroidal(CENTROIDAL_SMOOTH)
+    #  @param Method is either Laplacian (smesh.LAPLACIAN_SMOOTH)
+    #         or Centroidal (smesh.CENTROIDAL_SMOOTH)
     #  @return TRUE in case of success, FALSE otherwise.
     #  @ingroup l2_modif_smooth
     def SmoothObject(self, theObject, IDsOfFixedNodes,
@@ -3215,7 +3307,8 @@ class Mesh:
     #  Note that nodes built on edges and boundary nodes are always fixed.
     #  @param MaxNbOfIterations the maximum number of iterations
     #  @param MaxAspectRatio varies in range [1.0, inf]
-    #  @param Method is Laplacian(LAPLACIAN_SMOOTH) or Centroidal(CENTROIDAL_SMOOTH)
+    #  @param Method is either Laplacian (smesh.LAPLACIAN_SMOOTH)
+    #         or Centroidal (smesh.CENTROIDAL_SMOOTH)
     #  @return TRUE in case of success, FALSE otherwise.
     #  @ingroup l2_modif_smooth
     def SmoothParametric(self, IDsOfElements, IDsOfFixedNodes,
@@ -3233,7 +3326,8 @@ class Mesh:
     #  Note that nodes built on edges and boundary nodes are always fixed.
     #  @param MaxNbOfIterations the maximum number of iterations
     #  @param MaxAspectRatio varies in range [1.0, inf]
-    #  @param Method Laplacian(LAPLACIAN_SMOOTH) or Centroidal(CENTROIDAL_SMOOTH)
+    #  @param Method is either Laplacian (smesh.LAPLACIAN_SMOOTH)
+    #         or Centroidal (smesh.CENTROIDAL_SMOOTH)
     #  @return TRUE in case of success, FALSE otherwise.
     #  @ingroup l2_modif_smooth
     def SmoothParametricObject(self, theObject, IDsOfFixedNodes,
@@ -4412,9 +4506,11 @@ class Mesh:
     # Triangles are transformed in prisms, and quadrangles in hexahedrons.
     # @param theDomains - list of groups of volumes
     # @param createJointElems - if TRUE, create the elements
+    # @param onAllBoundaries - if TRUE, the nodes and elements are also created on
+    #        the boundary between \a theDomains and the rest mesh
     # @return TRUE if operation has been completed successfully, FALSE otherwise
-    def DoubleNodesOnGroupBoundaries(self, theDomains, createJointElems ):
-       return self.editor.DoubleNodesOnGroupBoundaries( theDomains, createJointElems )
+    def DoubleNodesOnGroupBoundaries(self, theDomains, createJointElems, onAllBoundaries=False ):
+       return self.editor.DoubleNodesOnGroupBoundaries( theDomains, createJointElems, onAllBoundaries )
 
     ## Double nodes on some external faces and create flat elements.
     # Flat elements are mainly used by some types of mechanic calculations.
@@ -4534,7 +4630,7 @@ class Mesh:
         return self._valueFromFunctor(SMESH.FT_Skew, elemId)
 
     pass # end of Mesh class
-    
+
 ## Helper class for wrapping of SMESH.SMESH_Pattern CORBA class
 #
 class Pattern(SMESH._objref_SMESH_Pattern):
index a81f825a6ac4ebd2440f3d079bb63423a13a8340..cac705e124f8778b75257cd2bf081447e05d7e61 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -195,21 +195,14 @@ class Mesh_Algorithm:
         if geom is None and mesh.mesh.HasShapeToMesh():
             raise RuntimeError, "Attemp to create " + algo + " algoritm on None shape"
         self.mesh = mesh
-        name = ""
         if not geom or geom.IsSame( mesh.geom ):
             self.geom = mesh.geom
         else:
             self.geom = geom
             AssureGeomPublished( mesh, geom )
-            try:
-                name = GetName(geom)
-                pass
-            except:
-                pass
             self.subm = mesh.mesh.GetSubMesh(geom, algo.GetName())
         self.algo = algo
-        status = mesh.mesh.AddHypothesis(self.geom, self.algo)
-        TreatHypoStatus( status, algo.GetName(), name, True )
+        status = mesh.AddHypothesis(self.algo, self.geom)
         return
 
     def CompareHyp (self, hyp, args):
@@ -267,21 +260,26 @@ class Mesh_Algorithm:
     #  @param thickness total thickness of layers of prisms
     #  @param numberOfLayers number of layers of prisms
     #  @param stretchFactor factor (>1.0) of growth of layer thickness towards inside of mesh
-    #  @param ignoreFaces list of geometrical faces (or their ids) not to generate layers on
+    #  @param faces list of geometrical faces (or their ids).
+    #         Viscous layers are either generated on these faces or not, depending on
+    #         the value of \a isFacesToIgnore parameter.
+    #  @param isFacesToIgnore if \c True, the Viscous layers are not generated on the
+    #         faces specified by the previous parameter (\a faces).
     #  @ingroup l3_hypos_additi
-    def ViscousLayers(self, thickness, numberOfLayers, stretchFactor, ignoreFaces=[]):
+    def ViscousLayers(self, thickness, numberOfLayers, stretchFactor,
+                      faces=[], isFacesToIgnore=True ):
         if not isinstance(self.algo, SMESH._objref_SMESH_3D_Algo):
             raise TypeError, "ViscousLayers are supported by 3D algorithms only"
         if not "ViscousLayers" in self.GetCompatibleHypothesis():
             raise TypeError, "ViscousLayers are not supported by %s"%self.algo.GetName()
-        if ignoreFaces and isinstance( ignoreFaces[0], geomBuilder.GEOM._objref_GEOM_Object ):
-            ignoreFaces = [ self.mesh.geompyD.GetSubShapeID(self.mesh.geom, f) for f in ignoreFaces ]
+        if faces and isinstance( faces[0], geomBuilder.GEOM._objref_GEOM_Object ):
+            faces = [ self.mesh.geompyD.GetSubShapeID(self.mesh.geom, f) for f in faces ]
         hyp = self.Hypothesis("ViscousLayers",
-                              [thickness, numberOfLayers, stretchFactor, ignoreFaces])
+                              [thickness, numberOfLayers, stretchFactor, faces])
         hyp.SetTotalThickness(thickness)
         hyp.SetNumberLayers(numberOfLayers)
         hyp.SetStretchFactor(stretchFactor)
-        hyp.SetIgnoreFaces(ignoreFaces)
+        hyp.SetFaces(faces, isFacesToIgnore)
         return hyp
 
     ## Defines "ViscousLayers2D" hypothesis to give parameters of layers of quadrilateral
@@ -290,9 +288,9 @@ class Mesh_Algorithm:
     #  @param thickness total thickness of layers of quadrilaterals
     #  @param numberOfLayers number of layers
     #  @param stretchFactor factor (>1.0) of growth of layer thickness towards inside of mesh
-    #  @param edges list of geometrical edge (or their ids).
+    #  @param edges list of geometrical edges (or their ids).
     #         Viscous layers are either generated on these edges or not, depending on
-    #         the values of \a isEdgesToIgnore parameter.
+    #         the value of \a isEdgesToIgnore parameter.
     #  @param isEdgesToIgnore if \c True, the Viscous layers are not generated on the
     #         edges specified by the previous parameter (\a edges).
     #  @ingroup l3_hypos_additi
@@ -313,7 +311,7 @@ class Mesh_Algorithm:
         hyp.SetEdges(edges, isEdgesToIgnore)
         return hyp
 
-    ## Transform a list of ether edges or tuples (edge, 1st_vertex_of_edge)
+    ## Transform a list of either edges or tuples (edge, 1st_vertex_of_edge)
     #  into a list acceptable to SetReversedEdges() of some 1D hypotheses
     #  @ingroup l3_hypos_1dhyps
     def ReversedEdgeIndices(self, reverseList):
index d900626ef5473d04f3928178e8de021b1ec29300..acc21d3c8d9dc78b30b6e41952d1a918bf033917 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5aa7e1aeda34a1e70e4f06e31c03591d8e9ed223..633f986f91a02ef684c00afceacc6bf82a93dce7 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9b4c5319d62f5058bd2bc3330de3966e5ab319cf..e20cdbc11613529f14a00f61276d98b339ba5e9d 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c10c0fe964898d3255b94304bf04a3b3876bb446..f255dd54990f0a43be04fca17e730afce3e25a7e 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index de84b50262e8a2ad60486d545355d343ac43a2d1..b30a69e09697af69ec80cd09673524ff0116c9a9 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -30,6 +30,7 @@ INCLUDE_DIRECTORIES(
   ${VTK_INCLUDE_DIRS}
   ${KERNEL_INCLUDE_DIRS}
   ${GUI_INCLUDE_DIRS}
+  ${GEOM_INCLUDE_DIRS}
   ${PROJECT_SOURCE_DIR}/src/SMESHUtils
   ${PROJECT_SOURCE_DIR}/src/SMESH
   ${PROJECT_SOURCE_DIR}/src/SMESHDS
@@ -61,6 +62,7 @@ SET(_link_LIBRARIES
   ${CAS_TKAdvTools}
   ${CAS_TKTopAlgo}
   ${CAS_TKG3d}
+  ${GEOM_GEOMUtils}
   SMESHimpl
   SMESHDS
   ${TBB_LIBS}
@@ -75,8 +77,10 @@ ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
 # header files / no moc processing
 SET(StdMeshers_HEADERS
   StdMeshers_LocalLength.hxx
+  StdMeshers_Reversible1D.hxx
   StdMeshers_StartEndLength.hxx
   StdMeshers_Arithmetic1D.hxx
+  StdMeshers_Geometric1D.hxx
   StdMeshers_FixedPoints1D.hxx
   StdMeshers_NumberOfSegments.hxx
   StdMeshers_Deflection1D.hxx
@@ -136,8 +140,10 @@ ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
 # sources / static
 SET(StdMeshers_SOURCES
   StdMeshers_LocalLength.cxx
+  StdMeshers_Reversible1D.cxx
   StdMeshers_StartEndLength.cxx
   StdMeshers_Arithmetic1D.cxx
+  StdMeshers_Geometric1D.cxx
   StdMeshers_FixedPoints1D.cxx
   StdMeshers_NumberOfSegments.cxx
   StdMeshers_Deflection1D.cxx
index 7904c05ea9f445a9ac24961801d4d5a992079eba..3d62963feded83156119bf7c2cc68525e19786d7 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1d3d0f31adddab06f271a29d8d3a2ef66967d366..ecb30b1aa86f3821e5655b71fee58aa1abf382d9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index dfaa98efee14e8848bfac5081fe79a0b81fd4a62..a6211808737ba44051c5eef788470c62e75cfe0e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a7c988c1ef7a51e02db41f1e80248b86824d09c8..481b5b17305e80ed7bc1910ea792e267e6f0d3c1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e8ff635fa8b9031ea7f9b96eb6a16594af924460..8a402383a6d27c57f640f77a6e14209978404cc6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3c8a01a475dd60cb3b80ecf1affd0dcc67330f40..5c04dd7fc1bccd86eb7b2c1c193c57dc6635b431 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d8dead7c50a439cd72d44881734643205e8d9eba..3d74c78cf126b75b2bc87166bc8cf99aaeae74e8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index fa4aa909f70bbb4552187ed3de3d359f22426b4f..0b7ac0235d3530dc63a1ff914afe938703dfb672 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 #include "utilities.h"
 
-#include <Precision.hxx>
-#include <Bnd_Box.hxx>
-
+#include <map>
 #include <limits>
 
+#include <BRepGProp.hxx>
+#include <BRep_Tool.hxx>
+#include <Bnd_Box.hxx>
+#include <GProp_GProps.hxx>
+#include <GeomLib_IsPlanarSurface.hxx>
+#include <Geom_Surface.hxx>
+#include <Precision.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopLoc_Location.hxx>
+#include <TopTools_MapIteratorOfMapOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Face.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Mat.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Vec.hxx>
+
 using namespace std;
 
 //=======================================================================
@@ -48,10 +64,28 @@ StdMeshers_CartesianParameters3D::StdMeshers_CartesianParameters3D(int         h
                                                                    int         studyId,
                                                                    SMESH_Gen * gen)
   : SMESH_Hypothesis(hypId, studyId, gen),
-    _sizeThreshold( 4.0 ) // default according to the customer specification
+    _sizeThreshold( 4.0 ), // default according to the customer specification
+    _toAddEdges( false )
 {
   _name = "CartesianParameters3D"; // used by "Cartesian_3D"
   _param_algo_dim = 3; // 3D
+
+  _axisDirs[0] = 1.;
+  _axisDirs[1] = 0.;
+  _axisDirs[2] = 0.;
+
+  _axisDirs[3] = 0.;
+  _axisDirs[4] = 1.;
+  _axisDirs[5] = 0.;
+
+  _axisDirs[6] = 0.;
+  _axisDirs[7] = 0.;
+  _axisDirs[8] = 1.;
+
+  _fixedPoint[0] = 0.;
+  _fixedPoint[1] = 0.;
+  _fixedPoint[2] = 0.;
+  SetFixedPoint( _fixedPoint, /*toUnset=*/true );
 }
 
 
@@ -59,6 +93,22 @@ namespace
 {
   const char* axisName[3] = { "X", "Y", "Z" };
 
+  typedef std::pair< double, std::pair< double, double > > TCooTriple;
+
+#define gpXYZ( cTriple ) gp_XYZ( (cTriple).first, (cTriple).second.first, (cTriple).second.second )
+
+  //================================================================================
+  /*!
+   * \brief Compare two normals
+   */
+  //================================================================================
+
+  bool sameDir( const TCooTriple& n1, const TCooTriple& n2 )
+  {
+    gp_XYZ xyz1 = gpXYZ( n1 ), xyz2 = gpXYZ( n2 );
+    return ( xyz1 - xyz2 ).Modulus() < 0.01;
+  }
+
   //================================================================================
   /*!
    * \brief Checks validity of an axis index, throws in case of invalidity
@@ -163,6 +213,36 @@ void StdMeshers_CartesianParameters3D::SetGridSpacing(std::vector<string>& xSpac
     NotifySubMeshesHypothesisModification();
 }
 
+//=======================================================================
+//function : SetFixedPoint
+//purpose  : * Set/unset a fixed point, at which a node will be created provided that grid
+//           * is defined by spacing in all directions
+//=======================================================================
+
+void StdMeshers_CartesianParameters3D::SetFixedPoint(const double p[3], bool toUnset)
+{
+  if ( toUnset != Precision::IsInfinite( _fixedPoint[0] ))
+    NotifySubMeshesHypothesisModification();
+
+  if ( toUnset )
+    _fixedPoint[0] = Precision::Infinite();
+  else
+    std::copy( &p[0], &p[0]+3, &_fixedPoint[0] );
+}
+
+//=======================================================================
+//function : GetFixedPoint
+//purpose  : Returns either false or (true + point coordinates)
+//=======================================================================
+
+bool StdMeshers_CartesianParameters3D::GetFixedPoint(double p[3]) const
+{
+  if ( Precision::IsInfinite( _fixedPoint[0] ))
+    return false;
+  std::copy( &_fixedPoint[0], &_fixedPoint[0]+3, &p[0] );
+}
+
+
 //=======================================================================
 //function : SetSizeThreshold
 //purpose  : Set size threshold
@@ -215,15 +295,36 @@ bool StdMeshers_CartesianParameters3D::IsGridBySpacing(const int axis) const
 //purpose  : Computes node coordinates by spacing functions
 //=======================================================================
 
-void StdMeshers_CartesianParameters3D::ComputeCoordinates(const double         x0,
-                                                          const double         x1,
-                                                          vector<std::string>& spaceFuns,
-                                                          vector<double>&      points,
-                                                          vector<double>&      coords,
-                                                          const std::string&   axis )
+void StdMeshers_CartesianParameters3D::ComputeCoordinates(const double    x0,
+                                                          const double    x1,
+                                                          vector<string>& theSpaceFuns,
+                                                          vector<double>& thePoints,
+                                                          vector<double>& coords,
+                                                          const string&   axis,
+                                                          const double*   xForced )
   throw ( SALOME_Exception )
 {
-  checkGridSpacing( spaceFuns, points, axis );
+  checkGridSpacing( theSpaceFuns, thePoints, axis );
+
+  vector<string> spaceFuns = theSpaceFuns;
+  vector<double> points    = thePoints;
+
+  bool forced = false;
+  if (( forced = ( xForced && ( x0 < *xForced ) && ( *xForced < x1 ))))
+  {
+    // divide a range at xForced
+
+    // find a range to insert xForced
+    double pos = ( *xForced - x0 ) / ( x1 - x0 );
+    int iR = 1;
+    while ( pos > points[ iR ] ) ++iR;
+
+    // insert xForced
+    vector<double>::iterator pntIt = points.begin() + iR;
+    points.insert( pntIt, pos );
+    vector<string>::iterator funIt = spaceFuns.begin() + iR;
+    spaceFuns.insert( funIt, spaceFuns[ iR-1 ]);
+  }
 
   coords.clear();
   for ( size_t i = 0; i < spaceFuns.size(); ++i )
@@ -266,6 +367,28 @@ void StdMeshers_CartesianParameters3D::ComputeCoordinates(const double         x
     if ( fabs( coords.back() - p1 ) > 0.5 * lastCellLen )
       coords.push_back ( p1 );
   }
+
+  // correct coords if a forced point is too close to a neighbor node
+  if ( forced )
+  {
+    int iF = 0;
+    double minLen = ( x1 - x0 );
+    for ( size_t i = 1; i < coords.size(); ++i )
+    {
+      if ( !iF && Abs( coords[i] - *xForced ) < 1e-20 )
+        iF = i++; // xForced found
+      else
+        minLen = Min( minLen, coords[i] - coords[i-1] );
+    }
+    const double tol = minLen * 1e-3;
+    int iRem = -1;
+    if (( iF > 1 ) && ( coords[iF] - coords[iF-1] < tol ))
+      iRem = iF-1;
+    else if (( iF < coords.size()-2 ) && ( coords[iF+1] - coords[iF] < tol ))
+      iRem = iF+1;
+    if ( iRem > 0 )
+      coords.erase( coords.begin() + iRem );
+  }
 }
 
 //=======================================================================
@@ -291,23 +414,281 @@ void StdMeshers_CartesianParameters3D::GetCoordinates(std::vector<double>& xNode
     bndBox.Get(x0,y0,z0, x1,y1,z1);
   }
 
+  double fp[3], *pfp[3] = { NULL, NULL, NULL };
+  if ( GetFixedPoint( fp ))
+  {
+    // convert fp into a basis defined by _axisDirs
+    gp_XYZ axis[3] = { gp_XYZ( _axisDirs[0], _axisDirs[1], _axisDirs[2] ),
+                       gp_XYZ( _axisDirs[3], _axisDirs[4], _axisDirs[5] ),
+                       gp_XYZ( _axisDirs[6], _axisDirs[7], _axisDirs[8] ) };
+    axis[0].Normalize();
+    axis[1].Normalize();
+    axis[2].Normalize();
+
+    gp_Mat basis( axis[0], axis[1], axis[2] );
+    gp_Mat bi = basis.Inverted();
+
+    gp_XYZ p( fp[0], fp[1], fp[2] );
+    p *= bi;
+    p.Coord( fp[0], fp[1], fp[2] );
+
+    pfp[0] = & fp[0];
+    pfp[1] = & fp[1];
+    pfp[2] = & fp[2];
+  }
+
   StdMeshers_CartesianParameters3D* me = const_cast<StdMeshers_CartesianParameters3D*>(this);
   if ( IsGridBySpacing(0) )
-    ComputeCoordinates( x0, x1, me->_spaceFunctions[0], me->_internalPoints[0], xNodes, "X" );
+    ComputeCoordinates
+      ( x0, x1, me->_spaceFunctions[0], me->_internalPoints[0], xNodes, "X", pfp[0] );
   else
     xNodes = _coords[0];
 
   if ( IsGridBySpacing(1) )
-    ComputeCoordinates( y0, y1, me->_spaceFunctions[1], me->_internalPoints[1], yNodes, "Y" );
+    ComputeCoordinates
+      ( y0, y1, me->_spaceFunctions[1], me->_internalPoints[1], yNodes, "Y", pfp[1] );
   else
     yNodes = _coords[1];
 
   if ( IsGridBySpacing(2) )
-    ComputeCoordinates( z0, z1, me->_spaceFunctions[2], me->_internalPoints[2], zNodes, "Z" );
+    ComputeCoordinates
+      ( z0, z1, me->_spaceFunctions[2], me->_internalPoints[2], zNodes, "Z", pfp[2] );
   else
     zNodes = _coords[2];
 }
 
+//=======================================================================
+//function : ComputeOptimalAxesDirs
+//purpose  : Returns axes at which number of hexahedra is maximal
+//=======================================================================
+
+void StdMeshers_CartesianParameters3D::
+ComputeOptimalAxesDirs(const TopoDS_Shape& shape,
+                       const bool          isOrthogonal,
+                       double              dirCoords[9])
+{
+  for ( int i = 0; i < 9; ++i ) dirCoords[i] = 0.;
+  dirCoords[0] = dirCoords[4] = dirCoords[8] = 1.;
+
+  if ( shape.IsNull() ) return;
+
+  TopLoc_Location loc;
+  TopExp_Explorer exp;
+
+  // get external FACEs of the shape
+  TopTools_MapOfShape faceMap;
+  for ( exp.Init( shape, TopAbs_FACE ); exp.More(); exp.Next() )
+    if ( !faceMap.Add( exp.Current() ))
+      faceMap.Remove( exp.Current() );
+
+  // sort areas of planar faces by normal direction
+
+  std::multimap< TCooTriple, double > areasByNormal;
+
+  TopTools_MapIteratorOfMapOfShape fIt ( faceMap );
+  for ( ; fIt.More(); fIt.Next() )
+  {
+    const TopoDS_Face&   face = TopoDS::Face( fIt.Key() );
+    Handle(Geom_Surface) surf = BRep_Tool::Surface( face, loc );
+    if ( surf.IsNull() ) continue;
+
+    GeomLib_IsPlanarSurface check( surf, 1e-5 );
+    if ( !check.IsPlanar() ) continue;
+
+    GProp_GProps SProps;
+    BRepGProp::SurfaceProperties( face, SProps );
+    double area = SProps.Mass();
+
+    gp_Pln pln  = check.Plan();
+    gp_Dir norm = pln.Axis().Direction().Transformed( loc );
+    if ( norm.X() < -1e-3 ) { // negative X
+      norm.Reverse();
+    } else if ( norm.X() < 1e-3 ) { // zero X
+      if ( norm.Y() < -1e-3 ) { // negative Y
+        norm.Reverse();
+      } else if ( norm.Y() < 1e-3 ) { // zero X && zero Y
+        if ( norm.Y() < -1e-3 ) // negative Z
+          norm.Reverse();
+      }
+    }
+    TCooTriple coo3( norm.X(), make_pair( norm.Y(), norm.Z() ));
+    areasByNormal.insert( make_pair( coo3, area ));
+  }
+
+  // group coplanar normals and sort groups by sum area
+
+  std::multimap< double, vector< const TCooTriple* > > normsByArea;
+  std::multimap< TCooTriple, double >::iterator norm2a = areasByNormal.begin();
+  const TCooTriple*           norm1 = 0;
+  double                      sumArea = 0;
+  vector< const TCooTriple* > norms;
+  for ( int iF = 1; norm2a != areasByNormal.end(); ++norm2a, ++iF )
+  {
+
+    if ( !norm1 || !sameDir( *norm1, norm2a->first ))
+    {
+      if ( !norms.empty() )
+      {
+        normsByArea.insert( make_pair( sumArea, norms ));
+        norms.clear();
+      }
+      norm1   = & norm2a->first;
+      sumArea = norm2a->second;
+      norms.push_back( norm1 );
+    }
+    else
+    {
+      sumArea += norm2a->second;
+      norms.push_back( & norm2a->first );
+    }
+    if ( iF == areasByNormal.size() )
+      normsByArea.insert( make_pair( sumArea, norms ));
+  }
+
+  // try to set dirs by planar faces
+
+  gp_XYZ normDirs[3]; // normals to largest planes
+
+  if ( !normsByArea.empty() )
+  {
+    norm1 = normsByArea.rbegin()->second[0];
+    normDirs[0] = gpXYZ( *norm1 );
+
+    if ( normsByArea.size() == 1 )
+    {
+      normDirs[1] = normDirs[0];
+      if ( Abs( normDirs[0].Y() ) < 1e-100 &&
+           Abs( normDirs[0].Z() ) < 1e-100 ) // normDirs[0] || OX
+        normDirs[1].SetY( normDirs[0].Y() + 1. );
+      else
+        normDirs[1].SetX( normDirs[0].X() + 1. );
+    }
+    else
+    {
+      // look for 2 other directions
+      gp_XYZ testDir = normDirs[0], minDir, maxDir;
+      for ( int is2nd = 0; is2nd < 2; ++is2nd )
+      {
+        double maxMetric = 0, minMetric = 1e100;
+        std::multimap< double, vector< const TCooTriple* > >::iterator a2n;
+        for ( a2n = normsByArea.begin(); a2n != normsByArea.end(); ++a2n )
+        {
+          gp_XYZ n = gpXYZ( *( a2n->second[0]) );
+          double dot = Abs( n * testDir );
+          double metric = ( 1. - dot ) * ( isOrthogonal ? 1 : a2n->first );
+          if ( metric > maxMetric )
+          {
+            maxDir = n;
+            maxMetric = metric;
+          }
+          if ( metric < minMetric )
+          {
+            minDir = n;
+            minMetric = metric;
+          }
+        }
+        if ( is2nd )
+        {
+          normDirs[2] = minDir;
+        }
+        else
+        {
+          normDirs[1] = maxDir;
+          normDirs[2] = normDirs[0] ^ normDirs[1];
+          if ( isOrthogonal || normsByArea.size() < 3 )
+            break;
+          testDir = normDirs[2];
+        }
+      }
+    }
+    if ( isOrthogonal || normsByArea.size() == 1 )
+    {
+      normDirs[2] = normDirs[0] ^ normDirs[1];
+      normDirs[1] = normDirs[2] ^ normDirs[0];
+    }
+  }
+  else
+  {
+    return;
+  }
+
+  gp_XYZ dirs[3];
+  dirs[0] = normDirs[0] ^ normDirs[1];
+  dirs[1] = normDirs[1] ^ normDirs[2];
+  dirs[2] = normDirs[2] ^ normDirs[0];
+
+  dirs[0].Normalize();
+  dirs[1].Normalize();
+  dirs[2].Normalize();
+
+  // Select dirs for X, Y and Z axes
+  int iX = ( Abs( dirs[0].X() ) > Abs( dirs[1].X() )) ? 0 : 1;
+  if ( Abs( dirs[iX].X() ) < Abs( dirs[2].X() ))
+    iX = 2;
+  int iY = ( iX == 0 ) ? 1 : (( Abs( dirs[0].Y() ) > Abs( dirs[1].Y() )) ? 0 : 1 );
+  if ( Abs( dirs[iY].Y() ) < Abs( dirs[2].Y() ) && iX != 2 )
+    iY = 2;
+  int iZ = 3 - iX - iY;
+
+  if ( dirs[iX].X() < 0 ) dirs[iX].Reverse();
+  if ( dirs[iY].Y() < 0 ) dirs[iY].Reverse();
+  gp_XYZ zDir = dirs[iX] ^ dirs[iY];
+  if ( dirs[iZ] * zDir < 0 )
+    dirs[iZ].Reverse();
+
+  dirCoords[0] = dirs[iX].X();
+  dirCoords[1] = dirs[iX].Y();
+  dirCoords[2] = dirs[iX].Z();
+  dirCoords[3] = dirs[iY].X();
+  dirCoords[4] = dirs[iY].Y();
+  dirCoords[5] = dirs[iY].Z();
+  dirCoords[6] = dirs[iZ].X();
+  dirCoords[7] = dirs[iZ].Y();
+  dirCoords[8] = dirs[iZ].Z();
+}
+
+//=======================================================================
+//function : SetAxisDirs
+//purpose  : Sets custom direction of axes
+//=======================================================================
+
+void StdMeshers_CartesianParameters3D::SetAxisDirs(const double* the9DirComps)
+  throw ( SALOME_Exception )
+{
+  gp_Vec x( the9DirComps[0],
+            the9DirComps[1],
+            the9DirComps[2] );
+  gp_Vec y( the9DirComps[3],
+            the9DirComps[4],
+            the9DirComps[5] );
+  gp_Vec z( the9DirComps[6],
+            the9DirComps[7],
+            the9DirComps[8] );
+  if ( x.Magnitude() < RealSmall() ||
+       y.Magnitude() < RealSmall() ||
+       z.Magnitude() < RealSmall() )
+    throw SALOME_Exception("Zero magnitude of axis direction");
+
+  if ( x.IsParallel( y, M_PI / 180. ) ||
+       x.IsParallel( z, M_PI / 180. ) ||
+       y.IsParallel( z, M_PI / 180. ))
+    throw SALOME_Exception("Parallel axis directions");
+
+  gp_Vec normXY = x ^ y, normYZ = y ^ z;
+  if ( normXY.IsParallel( normYZ, M_PI / 180. ))
+    throw SALOME_Exception("Axes lie in one plane");
+
+  bool isChanged = false;
+  for ( int i = 0; i < 9; ++i )
+  {
+    if ( Abs( _axisDirs[i] - the9DirComps[i] ) > 1e-7 )
+      isChanged = true;
+    _axisDirs[i] = the9DirComps[i];
+  }
+  if ( isChanged )
+    NotifySubMeshesHypothesisModification();
+}
+
 //=======================================================================
 //function : GetGrid
 //purpose  : Return coordinates of node positions along the three axes
@@ -332,6 +713,33 @@ double StdMeshers_CartesianParameters3D::GetSizeThreshold() const
   return _sizeThreshold;
 }
 
+//=======================================================================
+//function : SetToAddEdges
+//purpose  : Enables implementation of geometrical edges into the mesh. If this feature
+//           is disabled, sharp edges of the shape are lost ("smoothed") in the mesh if
+//           they don't coincide with the grid lines
+//=======================================================================
+
+void StdMeshers_CartesianParameters3D::SetToAddEdges(bool toAdd)
+{
+  if ( _toAddEdges != toAdd )
+  {
+    _toAddEdges = toAdd;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
+//=======================================================================
+//function : GetToAddEdges
+//purpose  : Returns true if implementation of geometrical edges into the
+//           mesh is enabled
+//=======================================================================
+
+bool StdMeshers_CartesianParameters3D::GetToAddEdges() const
+{
+  return _toAddEdges;
+}
+
 //=======================================================================
 //function : IsDefined
 //purpose  : Return true if parameters are well defined
@@ -369,6 +777,15 @@ std::ostream & StdMeshers_CartesianParameters3D::SaveTo(std::ostream & save)
     for ( size_t j = 0; j < _spaceFunctions[i].size(); ++j )
       save << _spaceFunctions[i][j] << " ";
   }
+  save << _toAddEdges << " ";
+
+  save.setf( save.scientific );
+  save.precision( 12 );
+  for ( int i = 0; i < 9; ++i )
+    save << _axisDirs[i] << " ";
+
+  for ( int i = 0; i < 3; ++i )
+    save << _fixedPoint[i] << " ";
 
   return save;
 }
@@ -382,7 +799,7 @@ std::istream & StdMeshers_CartesianParameters3D::LoadFrom(std::istream & load)
 {
   bool ok;
 
-  ok = (load >> _sizeThreshold  );
+  ok = ( load >> _sizeThreshold );
   for ( int ax = 0; ax < 3; ++ax )
   {
     if (ok)
@@ -419,6 +836,15 @@ std::istream & StdMeshers_CartesianParameters3D::LoadFrom(std::istream & load)
       }
     }
   }
+
+  ok = ( load >> _toAddEdges );
+
+  for ( int i = 0; i < 9 && ok; ++i )
+    ok = ( load >> _axisDirs[i]);
+
+  for ( int i = 0; i < 3 && ok ; ++i )
+    ok = ( load >> _fixedPoint[i]);
+
   return load;
 }
 
index adb22f00c777f6b832cb3af2446a1ff7f417ce1d..5edbc53a2be71a3b02787c709cc6cbcacfe74cd9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -78,6 +78,13 @@ public:
 
   bool IsGridBySpacing(const int axis) const throw ( SALOME_Exception );
 
+  /*!
+   * Set/unset a fixed point, at which a node will be created provided that grid
+   * is defined by spacing in all directions
+   */
+  void SetFixedPoint(const double p[3], bool toUnset);
+  bool GetFixedPoint(double p[3]) const;
+
   /*!
    * \brief Computes node coordinates by spacing functions
    *  \param x0 - lower coordinate
@@ -91,7 +98,8 @@ public:
                                  std::vector<std::string>& spaceFuns,
                                  std::vector<double>&      points,
                                  std::vector<double>&      coords,
-                                 const std::string&        axis ) throw (SALOME_Exception);
+                                 const std::string&        axis,
+                                 const double*             xForced=0) throw (SALOME_Exception);
   /*!
    * Return coordinates of node positions along the three axes.
    * If the grid is defined by spacing functions, the coordinates are computed
@@ -100,10 +108,22 @@ public:
                       std::vector<double>& yNodes,
                       std::vector<double>& zNodes,
                       const Bnd_Box&       bndBox) const throw ( SALOME_Exception );
+
+  /*!
+   * \brief Set custom direction of axes
+   */
+  void SetAxisDirs(const double* the9DirComps) throw ( SALOME_Exception );
+  const double* GetAxisDirs() const { return _axisDirs; }
+  /*!
+   * \brief Returns axes at which number of hexahedra is maximal
+   */
+  static void ComputeOptimalAxesDirs(const TopoDS_Shape& shape,
+                                     const bool          isOrthogonal,
+                                     double              dirCoords[9]);
   /*!
    * Set size threshold. A polyhedral cell got by cutting an initial
    * hexahedron by geometry boundary is considered small and is removed if
-   * it's size is \athreshold times less than the size of the initial hexahedron. 
+   * it's size is \athreshold times less than the size of the initial hexahedron.
    */
   void SetSizeThreshold(const double threshold) throw ( SALOME_Exception );
   /*!
@@ -111,6 +131,14 @@ public:
    */
   double GetSizeThreshold() const;
 
+  /*!
+   * \brief Enables implementation of geometrical edges into the mesh. If this feature
+   *        is disabled, sharp edges of the shape are lost ("smoothed") in the mesh if
+   *        they don't coincide with the grid lines
+   */
+  void SetToAddEdges(bool toAdd);
+  bool GetToAddEdges() const;
+
   /*!
    * \brief Return true if parameters are well defined
    */
@@ -138,7 +166,11 @@ public:
   std::vector<std::string> _spaceFunctions[3];
   std::vector<double>      _internalPoints[3];
 
+  double _axisDirs  [9];
+  double _fixedPoint[3];
+
   double _sizeThreshold;
+  bool   _toAddEdges;
 };
 
 #endif
index 83447b16ad03c512985434201081969d430a388b..eb23a493a1f8da1ddcfe981a2a0658f13f0b79c1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #include "SMESH_subMeshEventListener.hxx"
 #include "StdMeshers_CartesianParameters3D.hxx"
 
-#include "utilities.h"
-#include "Utils_ExceptHandlers.hxx"
+#include <utilities.h>
+#include <Utils_ExceptHandlers.hxx>
 #include <Basics_OCCTVersion.hxx>
 
+#include <GEOMUtils.hxx>
+
+#include <BRepAdaptor_Curve.hxx>
 #include <BRepAdaptor_Surface.hxx>
 #include <BRepBndLib.hxx>
 #include <BRepBuilderAPI_Copy.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
 #include <BRepTools.hxx>
+#include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
+#include <Bnd_B3d.hxx>
 #include <Bnd_Box.hxx>
 #include <ElSLib.hxx>
+#include <GCPnts_UniformDeflection.hxx>
 #include <Geom2d_BSplineCurve.hxx>
 #include <Geom2d_BezierCurve.hxx>
 #include <Geom2d_TrimmedCurve.hxx>
+#include <GeomAPI_ProjectPointOnSurf.hxx>
+#include <GeomLib.hxx>
 #include <Geom_BSplineCurve.hxx>
 #include <Geom_BSplineSurface.hxx>
 #include <Geom_BezierCurve.hxx>
@@ -63,9 +72,9 @@
 #include <TopExp.hxx>
 #include <TopExp_Explorer.hxx>
 #include <TopLoc_Location.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
 #include <TopTools_MapOfShape.hxx>
 #include <TopoDS.hxx>
+#include <TopoDS_Compound.hxx>
 #include <TopoDS_Face.hxx>
 #include <TopoDS_TShape.hxx>
 #include <gp_Cone.hxx>
@@ -76,7 +85,9 @@
 #include <gp_Sphere.hxx>
 #include <gp_Torus.hxx>
 
-//#undef WITH_TBB
+#include <limits>
+
+#undef WITH_TBB
 #ifdef WITH_TBB
 #include <tbb/parallel_for.h>
 //#include <tbb/enumerable_thread_specific.h>
@@ -150,6 +161,8 @@ bool StdMeshers_Cartesian_3D::CheckHypothesis (SMESH_Mesh&          aMesh,
 
 namespace
 {
+  typedef int TGeomID;
+
   //=============================================================================
   // Definitions of internal utils
   // --------------------------------------------------------------------------
@@ -161,17 +174,40 @@ namespace
   };
   // --------------------------------------------------------------------------
   /*!
-   * \brief Data of intersection between a GridLine and a TopoDS_Face
+   * \brief Common data of any intersection between a Grid and a shape
    */
-  struct IntersectionPoint
+  struct B_IntersectPoint
   {
-    double                       _paramOnLine;
-    mutable Transition           _transition;
     mutable const SMDS_MeshNode* _node;
-    mutable size_t               _indexOnLine;
+    mutable vector< TGeomID >    _faceIDs;
+
+    B_IntersectPoint(): _node(NULL) {}
+    void Add( const vector< TGeomID >& fIDs, const SMDS_MeshNode* n=0 ) const;
+    int HasCommonFace( const B_IntersectPoint * other, int avoidFace=-1 ) const;
+    bool IsOnFace( int faceID ) const;
+    virtual ~B_IntersectPoint() {}
+  };
+  // --------------------------------------------------------------------------
+  /*!
+   * \brief Data of intersection between a GridLine and a TopoDS_Face
+   */
+  struct F_IntersectPoint : public B_IntersectPoint
+  {
+    double             _paramOnLine;
+    mutable Transition _transition;
+    mutable size_t     _indexOnLine;
 
-    IntersectionPoint(): _node(0) {}
-    bool operator< ( const IntersectionPoint& o ) const { return _paramOnLine < o._paramOnLine; }
+    bool operator< ( const F_IntersectPoint& o ) const { return _paramOnLine < o._paramOnLine; }
+  };
+  // --------------------------------------------------------------------------
+  /*!
+   * \brief Data of intersection between GridPlanes and a TopoDS_EDGE
+   */
+  struct E_IntersectPoint : public B_IntersectPoint
+  {
+    gp_Pnt  _point;
+    double  _uvw[3];
+    TGeomID _shapeID;
   };
   // --------------------------------------------------------------------------
   /*!
@@ -181,10 +217,20 @@ namespace
   {
     gp_Lin _line;
     double _length; // line length
-    multiset< IntersectionPoint > _intPoints;
+    multiset< F_IntersectPoint > _intPoints;
 
     void RemoveExcessIntPoints( const double tol );
-    bool GetIsOutBefore( multiset< IntersectionPoint >::iterator ip, bool prevIsOut );
+    bool GetIsOutBefore( multiset< F_IntersectPoint >::iterator ip, bool prevIsOut );
+  };
+  // --------------------------------------------------------------------------
+  /*!
+   * \brief Planes of the grid used to find intersections of an EDGE with a hexahedron
+   */
+  struct GridPlanes
+  {
+    gp_XYZ _uNorm, _vNorm, _zNorm;
+    vector< gp_XYZ > _origins; // origin points of all planes in one direction
+    vector< double > _zProjs;  // projections of origins to _zNorm
   };
   // --------------------------------------------------------------------------
   /*!
@@ -234,11 +280,20 @@ namespace
   struct Grid
   {
     vector< double >   _coords[3]; // coordinates of grid nodes
-    vector< GridLine > _lines [3]; //  in 3 directions
+    gp_XYZ             _axes  [3]; // axis directions
+    vector< GridLine > _lines [3]; //    in 3 directions
     double             _tol, _minCellSize;
+    gp_XYZ             _origin;
+    gp_Mat             _invB; // inverted basis of _axes
+    //bool               _isOrthogonalAxes;
+
+    vector< const SMDS_MeshNode* >    _nodes; // mesh nodes at grid nodes
+    vector< const F_IntersectPoint* > _gridIntP; // grid node intersection with geometry
 
-    vector< const SMDS_MeshNode* > _nodes; // mesh nodes at grid nodes
-    vector< bool >                 _isBndNode; // is mesh node at intersection with geometry
+    list< E_IntersectPoint >          _edgeIntP; // intersections with EDGEs
+    TopTools_IndexedMapOfShape        _shapes;
+
+    SMESH_MesherHelper*               _helper;
 
     size_t CellIndex( size_t i, size_t j, size_t k ) const
     {
@@ -257,7 +312,9 @@ namespace
     void SetCoordinates(const vector<double>& xCoords,
                         const vector<double>& yCoords,
                         const vector<double>& zCoords,
-                        const TopoDS_Shape&   shape );
+                        const double*         axesDirs,
+                        const Bnd_Box&        bndBox );
+    void ComputeUVW(const gp_XYZ& p, double uvw[3]);
     void ComputeNodes(SMESH_MesherHelper& helper);
   };
 #ifdef ELLIPSOLID_WORKAROUND
@@ -302,10 +359,11 @@ namespace
   struct FaceGridIntersector
   {
     TopoDS_Face _face;
+    TGeomID     _faceID;
     Grid*       _grid;
     Bnd_Box     _bndBox;
     __IntCurvesFace_Intersector* _surfaceInt;
-    vector< std::pair< GridLine*, IntersectionPoint > > _intersections;
+    vector< std::pair< GridLine*, F_IntersectPoint > > _intersections;
 
     FaceGridIntersector(): _grid(0), _surfaceInt(0) {}
     void Intersect();
@@ -314,7 +372,12 @@ namespace
     void StoreIntersections()
     {
       for ( size_t i = 0; i < _intersections.size(); ++i )
-        _intersections[i].first->_intPoints.insert( _intersections[i].second );
+      {
+        multiset< F_IntersectPoint >::iterator ip = 
+          _intersections[i].first->_intPoints.insert( _intersections[i].second );
+        ip->_faceIDs.reserve( 1 );
+        ip->_faceIDs.push_back( _faceID );
+      }
     }
     const Bnd_Box& GetFaceBndBox()
     {
@@ -352,7 +415,7 @@ namespace
     gp_Torus    _torus;
     __IntCurvesFace_Intersector* _surfaceInt;
 
-    vector< IntersectionPoint > _intPoints;
+    vector< F_IntersectPoint > _intPoints;
 
     void IntersectWithPlane   (const GridLine& gridLine);
     void IntersectWithCylinder(const GridLine& gridLine);
@@ -381,22 +444,65 @@ namespace
     struct _Face;
     struct _Link;
     // --------------------------------------------------------------------------------
-    struct _Node //!< node either at a hexahedron corner or at GridLine intersection
+    struct _Node //!< node either at a hexahedron corner or at intersection
     {
-      const SMDS_MeshNode*     _node; // mesh node at hexahedron corner
-      const IntersectionPoint* _intPoint;
-
-      _Node(const SMDS_MeshNode* n=0, const IntersectionPoint* ip=0):_node(n), _intPoint(ip) {} 
-      const SMDS_MeshNode* Node() const { return _intPoint ? _intPoint->_node : _node; }
-      //bool IsCorner() const { return _node; }
+      const SMDS_MeshNode*    _node; // mesh node at hexahedron corner
+      const B_IntersectPoint* _intPoint;
+      const _Face*            _usedInFace;
+
+      _Node(const SMDS_MeshNode* n=0, const B_IntersectPoint* ip=0)
+        :_node(n), _intPoint(ip), _usedInFace(0) {} 
+      const SMDS_MeshNode*    Node() const
+      { return ( _intPoint && _intPoint->_node ) ? _intPoint->_node : _node; }
+      //const F_IntersectPoint* FaceIntPnt() const
+      //{ return static_cast< const F_IntersectPoint* >( _intPoint ); }
+      const E_IntersectPoint* EdgeIntPnt() const
+      { return static_cast< const E_IntersectPoint* >( _intPoint ); }
+      bool IsUsedInFace( const _Face* polygon = 0 )
+      {
+        return polygon ? ( _usedInFace == polygon ) : bool( _usedInFace );
+      }
+      void Add( const E_IntersectPoint* ip )
+      {
+        if ( !_intPoint ) {
+          _intPoint = ip;
+        }
+        else if ( !_intPoint->_node ) {
+          ip->Add( _intPoint->_faceIDs );
+          _intPoint = ip;
+        }
+        else  {
+          _intPoint->Add( ip->_faceIDs );
+        }
+      }
+      int IsLinked( const B_IntersectPoint* other,
+                    int                     avoidFace=-1 ) const // returns id of a common face
+      {
+        return _intPoint ? _intPoint->HasCommonFace( other, avoidFace ) : 0;
+      }
+      bool IsOnFace( int faceID ) const // returns true if faceID is found
+      {
+        return _intPoint ? _intPoint->IsOnFace( faceID ) : false;
+      }
+      gp_Pnt Point() const
+      {
+        if ( const SMDS_MeshNode* n = Node() )
+          return SMESH_TNodeXYZ( n );
+        if ( const E_IntersectPoint* eip =
+             dynamic_cast< const E_IntersectPoint* >( _intPoint ))
+          return eip->_point;
+        return gp_Pnt( 1e100, 0, 0 );
+      }
     };
     // --------------------------------------------------------------------------------
     struct _Link // link connecting two _Node's
     {
       _Node* _nodes[2];
-      vector< _Node>  _intNodes; // _Node's at GridLine intersections
-      vector< _Link > _splits;
-      vector< _Face*> _faces;
+      _Face* _faces[2]; // polygons sharing a link
+      vector< const F_IntersectPoint* > _fIntPoints; // GridLine intersections with FACEs
+      vector< _Node* >                  _fIntNodes;   // _Node's at _fIntPoints
+      vector< _Link >                   _splits;
+      _Link() { _faces[0] = 0; }
     };
     // --------------------------------------------------------------------------------
     struct _OrientedLink
@@ -411,55 +517,117 @@ namespace
         return _OrientedLink(&_link->_splits[_reverse ? NbResultLinks()-i-1 : i],_reverse);
       }
       _Node* FirstNode() const { return _link->_nodes[ _reverse ]; }
-      _Node* LastNode() const { return _link->_nodes[ !_reverse ]; }
+      _Node* LastNode()  const { return _link->_nodes[ !_reverse ]; }
+      operator bool() const { return _link; }
+      vector< TGeomID > GetNotUsedFace(const set<TGeomID>& usedIDs ) const // returns supporting FACEs
+      {
+        vector< TGeomID > faces;
+        const B_IntersectPoint *ip0, *ip1;
+        if (( ip0 = _link->_nodes[0]->_intPoint ) &&
+            ( ip1 = _link->_nodes[1]->_intPoint ))
+        {
+          for ( size_t i = 0; i < ip0->_faceIDs.size(); ++i )
+            if ( ip1->IsOnFace ( ip0->_faceIDs[i] ) &&
+                 !usedIDs.count( ip0->_faceIDs[i] ) )
+              faces.push_back( ip0->_faceIDs[i] );
+        }
+        return faces;
+      }
+      bool HasEdgeNodes() const
+      {
+        return ( dynamic_cast< const E_IntersectPoint* >( _link->_nodes[0]->_intPoint ) ||
+                 dynamic_cast< const E_IntersectPoint* >( _link->_nodes[1]->_intPoint ));
+      }
+      int NbFaces() const
+      {
+        return !_link->_faces[0] ? 0 : 1 + bool( _link->_faces[1] );
+      }
+      void AddFace( _Face* f )
+      {
+        if ( _link->_faces[0] )
+        {
+          _link->_faces[1] = f;
+        }
+        else
+        {
+          _link->_faces[0] = f;
+          _link->_faces[1] = 0;
+        }
+      }
+      void RemoveFace( _Face* f )
+      {
+        if ( !_link->_faces[0] ) return;
+
+        if ( _link->_faces[1] == f )
+        {
+          _link->_faces[1] = 0;
+        }
+        else if ( _link->_faces[0] == f )
+        {
+          _link->_faces[0];
+          if ( _link->_faces[1] )
+          {
+            _link->_faces[0] = _link->_faces[1];
+            _link->_faces[1] = 0;
+          }
+        }
+      }
     };
     // --------------------------------------------------------------------------------
     struct _Face
     {
-      vector< _OrientedLink > _links;
-      vector< _Link >         _polyLinks; // links added to close a polygonal face
+      vector< _OrientedLink > _links;       // links on GridLine's
+      vector< _Link >         _polyLinks;   // links added to close a polygonal face
+      vector< _Node* >        _eIntNodes;   // nodes at intersection with EDGEs
+      bool isPolyLink( const _OrientedLink& ol )
+      {
+        return _polyLinks.empty() ? false :
+          ( &_polyLinks[0] <= ol._link &&  ol._link <= &_polyLinks.back() );
+      }
     };
     // --------------------------------------------------------------------------------
     struct _volumeDef // holder of nodes of a volume mesh element
     {
-      vector< const SMDS_MeshNode* > _nodes;
-      vector< int >                  _quantities;
+      vector< _Node* > _nodes;
+      vector< int >    _quantities;
       typedef boost::shared_ptr<_volumeDef> Ptr;
-      void set( const vector< const SMDS_MeshNode* >& nodes,
-                const vector< int > quant = vector< int >() )
+      void set( const vector< _Node* >& nodes,
+                const vector< int >&    quant = vector< int >() )
       { _nodes = nodes; _quantities = quant; }
-      // static Ptr New( const vector< const SMDS_MeshNode* >& nodes,
-      //                 const vector< int > quant = vector< int >() )
-      // {
-      //   _volumeDef* def = new _volumeDef;
-      //   def->_nodes = nodes;
-      //   def->_quantities = quant;
-      //   return Ptr( def );
-      // }
     };
 
     // topology of a hexahedron
     int   _nodeShift[8];
-    _Node _hexNodes[8];
-    _Link _hexLinks[12];
-    _Face _hexQuads[6];
+    _Node _hexNodes [8];
+    _Link _hexLinks [12];
+    _Face _hexQuads [6];
 
     // faces resulted from hexahedron intersection
     vector< _Face > _polygons;
 
+    // intresections with EDGEs
+    vector< const E_IntersectPoint* > _eIntPoints;
+
+    // additional nodes created at intersection points
+    vector< _Node > _intNodes;
+
+    // nodes inside the hexahedron (at VERTEXes)
+    vector< _Node* > _vIntNodes;
+
     // computed volume elements
     //vector< _volumeDef::Ptr > _volumeDefs;
     _volumeDef _volumeDefs;
 
     Grid*       _grid;
     double      _sizeThreshold, _sideLength[3];
-    int         _nbCornerNodes, _nbIntNodes, _nbBndNodes;
+    int         _nbCornerNodes, _nbFaceIntNodes, _nbBndNodes;
     int         _origNodeInd; // index of _hexNodes[0] node within the _grid
     size_t      _i,_j,_k;
 
   public:
     Hexahedron(const double sizeThreshold, Grid* grid);
-    int MakeElements(SMESH_MesherHelper& helper);
+    int MakeElements(SMESH_MesherHelper&                      helper,
+                     const map< TGeomID, vector< TGeomID > >& edge2faceIDsMap);
     void ComputeElements();
     void Init() { init( _i, _j, _k ); }
 
@@ -467,15 +635,39 @@ namespace
     Hexahedron(const Hexahedron& other );
     void init( size_t i, size_t j, size_t k );
     void init( size_t i );
+    void addEdges(SMESH_MesherHelper&                      helper,
+                  vector< Hexahedron* >&                   intersectedHex,
+                  const map< TGeomID, vector< TGeomID > >& edge2faceIDsMap);
+    gp_Pnt findIntPoint( double u1, double proj1, double u2, double proj2,
+                         double proj, BRepAdaptor_Curve& curve,
+                         const gp_XYZ& axis, const gp_XYZ& origin );
+    int  getEntity( const E_IntersectPoint* ip, int* facets, int& sub );
+    bool addIntersection( const E_IntersectPoint& ip,
+                          vector< Hexahedron* >&  hexes,
+                          int ijk[], int dIJK[] );
+    bool findChain( _Node* n1, _Node* n2, _Face& quad, vector<_Node*>& chainNodes );
+    bool closePolygon( _Face* polygon, vector<_Node*>& chainNodes ) const;
     int  addElements(SMESH_MesherHelper& helper);
+    bool is1stNodeOut( _Link& link ) const;
     bool isInHole() const;
     bool checkPolyhedronSize() const;
     bool addHexa ();
     bool addTetra();
     bool addPenta();
     bool addPyra ();
+    bool debugDumpLink( _Link* link );
+    _Node* FindEqualNode( vector< _Node* >&       nodes,
+                          const E_IntersectPoint* ip,
+                          const double            tol2 )
+    {
+      for ( size_t i = 0; i < nodes.size(); ++i )
+        if ( nodes[i]->EdgeIntPnt() == ip ||
+             nodes[i]->Point().SquareDistance( ip->_point ) <= tol2 )
+          return nodes[i];
+      return 0;
+    }
   };
+
 #ifdef WITH_TBB
   // --------------------------------------------------------------------------
   /*!
@@ -507,11 +699,34 @@ namespace
         _faceVec[i].Intersect();
     }
   };
-
 #endif
+
   //=============================================================================
   // Implementation of internal utils
   //=============================================================================
+  /*!
+   * \brief adjust \a i to have \a val between values[i] and values[i+1]
+   */
+  inline void locateValue( int & i, double val, const vector<double>& values,
+                           int& di, double tol )
+  {
+    //val += values[0]; // input \a val is measured from 0.
+    if ( i > values.size()-2 )
+      i = values.size()-2;
+    else
+      while ( i+2 < values.size() && val > values[ i+1 ])
+        ++i;
+    while ( i > 0 && val < values[ i ])
+      --i;
+
+    if ( i > 0 && val - values[ i ] < tol )
+      di = -1;
+    else if ( i+2 < values.size() && values[ i+1 ] - val < tol )
+      di = 1;
+    else
+      di = 0;
+  }
+  //=============================================================================
   /*
    * Remove coincident intersection points
    */
@@ -520,15 +735,16 @@ namespace
     if ( _intPoints.size() < 2 ) return;
 
     set< Transition > tranSet;
-    multiset< IntersectionPoint >::iterator ip1, ip2 = _intPoints.begin();
+    multiset< F_IntersectPoint >::iterator ip1, ip2 = _intPoints.begin();
     while ( ip2 != _intPoints.end() )
     {
       tranSet.clear();
       ip1 = ip2++;
-      while ( ip2->_paramOnLine - ip1->_paramOnLine <= tol  && ip2 != _intPoints.end())
+      while ( ip2 != _intPoints.end() && ip2->_paramOnLine - ip1->_paramOnLine <= tol )
       {
         tranSet.insert( ip1->_transition );
         tranSet.insert( ip2->_transition );
+        ip2->Add( ip1->_faceIDs );
         _intPoints.erase( ip1 );
         ip1 = ip2++;
       }
@@ -547,7 +763,7 @@ namespace
   /*
    * Return "is OUT" state for nodes before the given intersection point
    */
-  bool GridLine::GetIsOutBefore( multiset< IntersectionPoint >::iterator ip, bool prevIsOut )
+  bool GridLine::GetIsOutBefore( multiset< F_IntersectPoint >::iterator ip, bool prevIsOut )
   {
     if ( ip->_transition == Trans_IN )
       return true;
@@ -558,7 +774,7 @@ namespace
       // singularity point (apex of a cone)
       if ( _intPoints.size() == 1 || ip == _intPoints.begin() )
         return true;
-      multiset< IntersectionPoint >::iterator ipBef = ip, ipAft = ++ip;
+      multiset< F_IntersectPoint >::iterator ipBef = ip, ipAft = ++ip;
       if ( ipAft == _intPoints.end() )
         return false;
       --ipBef;
@@ -566,7 +782,51 @@ namespace
         return ( ipBef->_transition == Trans_OUT );
       return ( ipBef->_transition != Trans_OUT );
     }
-    return prevIsOut; // _transition == Trans_TANGENT
+    // _transition == Trans_TANGENT
+    return !prevIsOut;
+  }
+  //================================================================================
+  /*
+   * Adds face IDs
+   */
+  void B_IntersectPoint::Add( const vector< TGeomID >& fIDs,
+                              const SMDS_MeshNode*     n) const
+  {
+    if ( _faceIDs.empty() )
+      _faceIDs = fIDs;
+    else
+      for ( size_t i = 0; i < fIDs.size(); ++i )
+      {
+        vector< TGeomID >::iterator it =
+          std::find( _faceIDs.begin(), _faceIDs.end(), fIDs[i] );
+        if ( it == _faceIDs.end() )
+          _faceIDs.push_back( fIDs[i] );
+      }
+    if ( !_node )
+      _node = n;
+  }
+  //================================================================================
+  /*
+   * Returns index of a common face if any, else zero
+   */
+  int B_IntersectPoint::HasCommonFace( const B_IntersectPoint * other, int avoidFace ) const
+  {
+    if ( other )
+      for ( size_t i = 0; i < other->_faceIDs.size(); ++i )
+        if ( avoidFace != other->_faceIDs[i] &&
+             IsOnFace   ( other->_faceIDs[i] ))
+          return other->_faceIDs[i];
+    return 0;
+  }
+  //================================================================================
+  /*
+   * Returns \c true if \a faceID in in this->_faceIDs
+   */
+  bool B_IntersectPoint::IsOnFace( int faceID ) const // returns true if faceID is found
+  {
+    vector< TGeomID >::const_iterator it =
+      std::find( _faceIDs.begin(), _faceIDs.end(), faceID );
+    return ( it != _faceIDs.end() );
   }
   //================================================================================
   /*
@@ -575,7 +835,7 @@ namespace
   LineIndexer Grid::GetLineIndexer(size_t iDir) const
   {
     const size_t indices[] = { 1,2,0, 0,2,1, 0,1,2 };
-    const string s[] = { "X", "Y", "Z" };
+    const string s      [] = { "X", "Y", "Z" };
     LineIndexer li( _coords[0].size(),  _coords[1].size(),    _coords[2].size(),
                     indices[iDir*3],    indices[iDir*3+1],    indices[iDir*3+2],
                     s[indices[iDir*3]], s[indices[iDir*3+1]], s[indices[iDir*3+2]]);
@@ -588,12 +848,33 @@ namespace
   void Grid::SetCoordinates(const vector<double>& xCoords,
                             const vector<double>& yCoords,
                             const vector<double>& zCoords,
-                            const TopoDS_Shape&   shape)
+                            const double*         axesDirs,
+                            const Bnd_Box&        shapeBox)
   {
     _coords[0] = xCoords;
     _coords[1] = yCoords;
     _coords[2] = zCoords;
 
+    _axes[0].SetCoord( axesDirs[0],
+                       axesDirs[1],
+                       axesDirs[2]);
+    _axes[1].SetCoord( axesDirs[3],
+                       axesDirs[4],
+                       axesDirs[5]);
+    _axes[2].SetCoord( axesDirs[6],
+                       axesDirs[7],
+                       axesDirs[8]);
+    _axes[0].Normalize();
+    _axes[1].Normalize();
+    _axes[2].Normalize();
+
+    _invB.SetCols( _axes[0], _axes[1], _axes[2] );
+    _invB.Invert();
+
+    // _isOrthogonalAxes = ( Abs( _axes[0] * _axes[1] ) < 1e-20 &&
+    //                       Abs( _axes[1] * _axes[2] ) < 1e-20 &&
+    //                       Abs( _axes[2] * _axes[0] ) < 1e-20 );
+
     // compute tolerance
     _minCellSize = Precision::Infinite();
     for ( int iDir = 0; iDir < 3; ++iDir ) // loop on 3 line directions
@@ -607,21 +888,37 @@ namespace
     }
     if ( _minCellSize < Precision::Confusion() )
       throw SMESH_ComputeError (COMPERR_ALGO_FAILED,
-                                SMESH_Comment("Too small cell size: ") << _tol );
+                                SMESH_Comment("Too small cell size: ") << _minCellSize );
     _tol = _minCellSize / 1000.;
 
-    // attune grid extremities to shape bounding box computed by vertices
-    Bnd_Box shapeBox;
-    for ( TopExp_Explorer vExp( shape, TopAbs_VERTEX ); vExp.More(); vExp.Next() )
-      shapeBox.Add( BRep_Tool::Pnt( TopoDS::Vertex( vExp.Current() )));
-    
+    // attune grid extremities to shape bounding box
+
     double sP[6]; // aXmin, aYmin, aZmin, aXmax, aYmax, aZmax
     shapeBox.Get(sP[0],sP[1],sP[2],sP[3],sP[4],sP[5]);
     double* cP[6] = { &_coords[0].front(), &_coords[1].front(), &_coords[2].front(),
                       &_coords[0].back(),  &_coords[1].back(),  &_coords[2].back() };
     for ( int i = 0; i < 6; ++i )
       if ( fabs( sP[i] - *cP[i] ) < _tol )
-        *cP[i] = sP[i] + _tol/1000. * ( i < 3 ? +1 : -1 );
+        *cP[i] = sP[i];// + _tol/1000. * ( i < 3 ? +1 : -1 );
+
+    for ( int iDir = 0; iDir < 3; ++iDir )
+    {
+      if ( _coords[iDir][0] - sP[iDir] > _tol )
+      {
+        _minCellSize = Min( _minCellSize, _coords[iDir][0] - sP[iDir] );
+        _coords[iDir].insert( _coords[iDir].begin(), sP[iDir] + _tol/1000.);
+      }
+      if ( sP[iDir+3] - _coords[iDir].back() > _tol  )
+      {
+        _minCellSize = Min( _minCellSize, sP[iDir+3] - _coords[iDir].back() );
+        _coords[iDir].push_back( sP[iDir+3] - _tol/1000.);
+      }
+    }
+    _tol = _minCellSize / 1000.;
+
+    _origin = ( _coords[0][0] * _axes[0] +
+                _coords[1][0] * _axes[1] +
+                _coords[2][0] * _axes[2] );
 
     // create lines
     for ( int iDir = 0; iDir < 3; ++iDir ) // loop on 3 line directions
@@ -629,17 +926,34 @@ namespace
       LineIndexer li = GetLineIndexer( iDir );
       _lines[iDir].resize( li.NbLines() );
       double len = _coords[ iDir ].back() - _coords[iDir].front();
-      gp_Vec dir( iDir==0, iDir==1, iDir==2 );
       for ( ; li.More(); ++li )
       {
         GridLine& gl = _lines[iDir][ li.LineIndex() ];
-        gl._line.SetLocation(gp_Pnt(_coords[0][li.I()], _coords[1][li.J()], _coords[2][li.K()])); 
-        gl._line.SetDirection( dir );
+        gl._line.SetLocation( _coords[0][li.I()] * _axes[0] +
+                              _coords[1][li.J()] * _axes[1] +
+                              _coords[2][li.K()] * _axes[2] );
+        gl._line.SetDirection( _axes[ iDir ]);
         gl._length = len;
       }
     }
   }
   //================================================================================
+  /*
+   * Computes coordinates of a point in the grid CS
+   */
+  void Grid::ComputeUVW(const gp_XYZ& P, double UVW[3])
+  {
+    // gp_XYZ p = P - _origin;
+    // UVW[ 0 ] = p.X() * _invB( 1, 1 ) + p.Y() * _invB( 1, 2 ) + p.Z() * _invB( 1, 3 );
+    // UVW[ 1 ] = p.X() * _invB( 2, 1 ) + p.Y() * _invB( 2, 2 ) + p.Z() * _invB( 2, 3 );
+    // UVW[ 2 ] = p.X() * _invB( 3, 1 ) + p.Y() * _invB( 3, 2 ) + p.Z() * _invB( 3, 3 );
+    // UVW[ 0 ] += _coords[0][0];
+    // UVW[ 1 ] += _coords[1][0];
+    // UVW[ 2 ] += _coords[2][0];
+    gp_XYZ p = P * _invB;
+    p.Coord( UVW[0], UVW[1], UVW[2] );
+  }
+  //================================================================================
   /*
    * Creates all nodes
    */
@@ -649,7 +963,7 @@ namespace
     const size_t nbGridNodes = _coords[0].size() * _coords[1].size() * _coords[2].size();
     vector< bool > isNodeOut( nbGridNodes, false );
     _nodes.resize( nbGridNodes, 0 );
-    _isBndNode.resize( nbGridNodes, false );
+    _gridIntP.resize( nbGridNodes, NULL );
 
     for ( int iDir = 0; iDir < 3; ++iDir ) // loop on 3 line directions
     {
@@ -668,12 +982,16 @@ namespace
         nIndex0 = NodeIndex( li.I(), li.J(), li.K() );
 
         GridLine& line = _lines[ iDir ][ li.LineIndex() ];
+        const gp_XYZ lineLoc = line._line.Location().XYZ();
+        const gp_XYZ lineDir = line._line.Direction().XYZ();
         line.RemoveExcessIntPoints( _tol );
-        multiset< IntersectionPoint >& intPnts = _lines[ iDir ][ li.LineIndex() ]._intPoints;
-        multiset< IntersectionPoint >::iterator ip = intPnts.begin();
+        multiset< F_IntersectPoint >& intPnts = _lines[ iDir ][ li.LineIndex() ]._intPoints;
+        multiset< F_IntersectPoint >::iterator ip = intPnts.begin();
 
         bool isOut = true;
-        const double* nodeCoord = & coords[0], *coord0 = nodeCoord, *coordEnd = coord0 + coords.size();
+        const double* nodeCoord = & coords[0];
+        const double* coord0    = nodeCoord;
+        const double* coordEnd  = coord0 + coords.size();
         double nodeParam = 0;
         for ( ; ip != intPnts.end(); ++ip )
         {
@@ -696,24 +1014,30 @@ namespace
           // create a mesh node on a GridLine at ip if it does not coincide with a grid node
           if ( nodeParam > ip->_paramOnLine + _tol )
           {
-            li.SetIndexOnLine( 0 );
-            double xyz[3] = { _coords[0][ li.I() ], _coords[1][ li.J() ], _coords[2][ li.K() ]};
-            xyz[ li._iConst ] += ip->_paramOnLine;
-            ip->_node = helper.AddNode( xyz[0], xyz[1], xyz[2] );
+            // li.SetIndexOnLine( 0 );
+            // double xyz[3] = { _coords[0][ li.I() ], _coords[1][ li.J() ], _coords[2][ li.K() ]};
+            // xyz[ li._iConst ] += ip->_paramOnLine;
+            gp_XYZ xyz = lineLoc + ip->_paramOnLine * lineDir;
+            ip->_node = helper.AddNode( xyz.X(), xyz.Y(), xyz.Z() );
             ip->_indexOnLine = nodeCoord-coord0-1;
           }
           // create a mesh node at ip concident with a grid node
           else
           {
             int nodeIndex = nIndex0 + nShift * ( nodeCoord-coord0 );
-            if ( ! _nodes[ nodeIndex ] )
+            if ( !_nodes[ nodeIndex ] )
             {
-              li.SetIndexOnLine( nodeCoord-coord0 );
-              double xyz[3] = { _coords[0][ li.I() ], _coords[1][ li.J() ], _coords[2][ li.K() ]};
-              _nodes[ nodeIndex ] = helper.AddNode( xyz[0], xyz[1], xyz[2] );
-              _isBndNode[ nodeIndex ] = true;
+              //li.SetIndexOnLine( nodeCoord-coord0 );
+              //double xyz[3] = { _coords[0][ li.I() ], _coords[1][ li.J() ], _coords[2][ li.K() ]};
+              gp_XYZ xyz = lineLoc + nodeParam * lineDir;
+              _nodes   [ nodeIndex ] = helper.AddNode( xyz.X(), xyz.Y(), xyz.Z() );
+              _gridIntP[ nodeIndex ] = & * ip;
             }
-            //ip->_node = _nodes[ nodeIndex ];
+            if ( _gridIntP[ nodeIndex ] )
+              _gridIntP[ nodeIndex ]->Add( ip->_faceIDs );
+            else
+              _gridIntP[ nodeIndex ] = & * ip;
+            // ip->_node        = _nodes[ nodeIndex ]; -- to differ from ip on links
             ip->_indexOnLine = nodeCoord-coord0;
             if ( ++nodeCoord < coordEnd )
               nodeParam = *nodeCoord - *coord0;
@@ -733,7 +1057,13 @@ namespace
         {
           size_t nodeIndex = NodeIndex( x, y, z );
           if ( !isNodeOut[ nodeIndex ] && !_nodes[ nodeIndex] )
-            _nodes[ nodeIndex ] = helper.AddNode( _coords[0][x], _coords[1][y], _coords[2][z] );
+          {
+            //_nodes[ nodeIndex ] = helper.AddNode( _coords[0][x], _coords[1][y], _coords[2][z] );
+            gp_XYZ xyz = ( _coords[0][x] * _axes[0] +
+                           _coords[1][y] * _axes[1] +
+                           _coords[2][z] * _axes[2] );
+            _nodes[ nodeIndex ] = helper.AddNode( xyz.X(), xyz.Y(), xyz.Z() );
+          }
         }
 
 #ifdef _MY_DEBUG_
@@ -744,7 +1074,7 @@ namespace
       LineIndexer li = GetLineIndexer( iDir );
       for ( ; li.More(); ++li )
       {
-        multiset< IntersectionPoint >& intPnts = _lines[ iDir ][ li.LineIndex() ]._intPoints;
+        multiset< F_IntersectPoint >& intPnts = _lines[ iDir ][ li.LineIndex() ]._intPoints;
         if ( intPnts.empty() ) continue;
         if ( intPnts.size() == 1 )
         {
@@ -782,72 +1112,72 @@ namespace
    */
   bool FaceGridIntersector::IsInGrid(const Bnd_Box& gridBox)
   {
-    double x0,y0,z0, x1,y1,z1;
-    const Bnd_Box& faceBox = GetFaceBndBox();
-    faceBox.Get(x0,y0,z0, x1,y1,z1);
-
-    if ( !gridBox.IsOut( gp_Pnt( x0,y0,z0 )) &&
-         !gridBox.IsOut( gp_Pnt( x1,y1,z1 )))
-      return true;
-
-    double X0,Y0,Z0, X1,Y1,Z1;
-    gridBox.Get(X0,Y0,Z0, X1,Y1,Z1);
-    double faceP[6] = { x0,y0,z0, x1,y1,z1 };
-    double gridP[6] = { X0,Y0,Z0, X1,Y1,Z1 };
-    gp_Dir axes[3]  = { gp::DX(), gp::DY(), gp::DZ() };
-    for ( int iDir = 0; iDir < 6; ++iDir )
-    {
-      if ( iDir < 3  && gridP[ iDir ] <= faceP[ iDir ] ) continue;
-      if ( iDir >= 3 && gridP[ iDir ] >= faceP[ iDir ] ) continue;
-
-      // check if the face intersects a side of a gridBox
-
-      gp_Pnt p = iDir < 3 ? gp_Pnt( X0,Y0,Z0 ) : gp_Pnt( X1,Y1,Z1 );
-      gp_Ax1 norm( p, axes[ iDir % 3 ] );
-      if ( iDir < 3 ) norm.Reverse();
-
-      gp_XYZ O = norm.Location().XYZ(), N = norm.Direction().XYZ();
-
-      TopLoc_Location loc = _face.Location();
-      Handle(Poly_Triangulation) aPoly = BRep_Tool::Triangulation(_face,loc);
-      if ( !aPoly.IsNull() )
-      {
-        if ( !loc.IsIdentity() )
-        {
-          norm.Transform( loc.Transformation().Inverted() );
-          O = norm.Location().XYZ(), N = norm.Direction().XYZ();
-        }
-        const double deflection = aPoly->Deflection();
-
-        const TColgp_Array1OfPnt& nodes = aPoly->Nodes();
-        for ( int i = nodes.Lower(); i <= nodes.Upper(); ++i )
-          if (( nodes( i ).XYZ() - O ) * N > _grid->_tol + deflection )
-            return false;
-      }
-      else
-      {
-        BRepAdaptor_Surface surf( _face );
-        double u0, u1, v0, v1, du, dv, u, v;
-        BRepTools::UVBounds( _face, u0, u1, v0, v1);
-        if ( surf.GetType() == GeomAbs_Plane ) {
-          du = u1 - u0, dv = v1 - v0;
-        }
-        else {
-          du = surf.UResolution( _grid->_minCellSize / 10. );
-          dv = surf.VResolution( _grid->_minCellSize / 10. );
-        }
-        for ( u = u0, v = v0; u <= u1 && v <= v1; u += du, v += dv )
-        {
-          gp_Pnt p = surf.Value( u, v );
-          if (( p.XYZ() - O ) * N > _grid->_tol )
-          {
-            TopAbs_State state = GetCurveFaceIntersector()->ClassifyUVPoint(gp_Pnt2d( u, v ));
-            if ( state == TopAbs_IN || state == TopAbs_ON )
-              return false;
-          }
-        }
-      }
-    }
+    // double x0,y0,z0, x1,y1,z1;
+    // const Bnd_Box& faceBox = GetFaceBndBox();
+    // faceBox.Get(x0,y0,z0, x1,y1,z1);
+
+    // if ( !gridBox.IsOut( gp_Pnt( x0,y0,z0 )) &&
+    //      !gridBox.IsOut( gp_Pnt( x1,y1,z1 )))
+    //   return true;
+
+    // double X0,Y0,Z0, X1,Y1,Z1;
+    // gridBox.Get(X0,Y0,Z0, X1,Y1,Z1);
+    // double faceP[6] = { x0,y0,z0, x1,y1,z1 };
+    // double gridP[6] = { X0,Y0,Z0, X1,Y1,Z1 };
+    // gp_Dir axes[3]  = { gp::DX(), gp::DY(), gp::DZ() };
+    // for ( int iDir = 0; iDir < 6; ++iDir )
+    // {
+    //   if ( iDir < 3  && gridP[ iDir ] <= faceP[ iDir ] ) continue;
+    //   if ( iDir >= 3 && gridP[ iDir ] >= faceP[ iDir ] ) continue;
+
+    //   // check if the face intersects a side of a gridBox
+
+    //   gp_Pnt p = iDir < 3 ? gp_Pnt( X0,Y0,Z0 ) : gp_Pnt( X1,Y1,Z1 );
+    //   gp_Ax1 norm( p, axes[ iDir % 3 ] );
+    //   if ( iDir < 3 ) norm.Reverse();
+
+    //   gp_XYZ O = norm.Location().XYZ(), N = norm.Direction().XYZ();
+
+    //   TopLoc_Location loc = _face.Location();
+    //   Handle(Poly_Triangulation) aPoly = BRep_Tool::Triangulation(_face,loc);
+    //   if ( !aPoly.IsNull() )
+    //   {
+    //     if ( !loc.IsIdentity() )
+    //     {
+    //       norm.Transform( loc.Transformation().Inverted() );
+    //       O = norm.Location().XYZ(), N = norm.Direction().XYZ();
+    //     }
+    //     const double deflection = aPoly->Deflection();
+
+    //     const TColgp_Array1OfPnt& nodes = aPoly->Nodes();
+    //     for ( int i = nodes.Lower(); i <= nodes.Upper(); ++i )
+    //       if (( nodes( i ).XYZ() - O ) * N > _grid->_tol + deflection )
+    //         return false;
+    //   }
+    //   else
+    //   {
+    //     BRepAdaptor_Surface surf( _face );
+    //     double u0, u1, v0, v1, du, dv, u, v;
+    //     BRepTools::UVBounds( _face, u0, u1, v0, v1);
+    //     if ( surf.GetType() == GeomAbs_Plane ) {
+    //       du = u1 - u0, dv = v1 - v0;
+    //     }
+    //     else {
+    //       du = surf.UResolution( _grid->_minCellSize / 10. );
+    //       dv = surf.VResolution( _grid->_minCellSize / 10. );
+    //     }
+    //     for ( u = u0, v = v0; u <= u1 && v <= v1; u += du, v += dv )
+    //     {
+    //       gp_Pnt p = surf.Value( u, v );
+    //       if (( p.XYZ() - O ) * N > _grid->_tol )
+    //       {
+    //         TopAbs_State state = GetCurveFaceIntersector()->ClassifyUVPoint(gp_Pnt2d( u, v ));
+    //         if ( state == TopAbs_IN || state == TopAbs_ON )
+    //           return false;
+    //       }
+    //     }
+    //   }
+    // }
     return true;
   }
   //=============================================================================
@@ -921,7 +1251,7 @@ namespace
         if ( _bndBox.IsOut( gridLine._line )) continue;
 
         intersector._intPoints.clear();
-        (intersector.*interFunction)( gridLine );
+        (intersector.*interFunction)( gridLine ); // <- intersection with gridLine
         for ( size_t i = 0; i < intersector._intPoints.size(); ++i )
           _intersections.push_back( make_pair( &gridLine, intersector._intPoints[i] ));
       }
@@ -944,7 +1274,7 @@ namespace
   {
     if ( !toClassify || UVIsOnFace() )
     {
-      IntersectionPoint p;
+      F_IntersectPoint p;
       p._paramOnLine = _w;
       p._transition  = _transition;
       _intPoints.push_back( p );
@@ -970,7 +1300,7 @@ namespace
    */
   void FaceLineIntersector::IntersectWithCylinder(const GridLine& gridLine)
   {
-    IntAna_IntConicQuad linCylinder( gridLine._line,_cylinder);
+    IntAna_IntConicQuad linCylinder( gridLine._line, _cylinder );
     if ( linCylinder.IsDone() && linCylinder.NbPoints() > 0 )
     {
       _w = linCylinder.ParamOnConic(1);
@@ -1181,7 +1511,7 @@ namespace
    * \brief Creates topology of the hexahedron
    */
   Hexahedron::Hexahedron(const double sizeThreshold, Grid* grid)
-    : _grid( grid ), _sizeThreshold( sizeThreshold ), _nbIntNodes(0)
+    : _grid( grid ), _sizeThreshold( sizeThreshold ), _nbFaceIntNodes(0)
   {
     _polygons.reserve(100); // to avoid reallocation;
 
@@ -1214,8 +1544,6 @@ namespace
       _Link& link = _hexLinks[ SMESH_Block::ShapeIndex( linkID )];
       link._nodes[0] = &_hexNodes[ SMESH_Block::ShapeIndex( idVec[0] )];
       link._nodes[1] = &_hexNodes[ SMESH_Block::ShapeIndex( idVec[1] )];
-      link._intNodes.reserve( 10 ); // to avoid reallocation
-      link._splits.reserve( 10 );
     }
 
     // set links to faces
@@ -1246,7 +1574,7 @@ namespace
    * \brief Copy constructor
    */
   Hexahedron::Hexahedron( const Hexahedron& other )
-    :_grid( other._grid ), _sizeThreshold( other._sizeThreshold ), _nbIntNodes(0)
+    :_grid( other._grid ), _sizeThreshold( other._sizeThreshold ), _nbFaceIntNodes(0)
   {
     _polygons.reserve(100); // to avoid reallocation;
 
@@ -1259,8 +1587,6 @@ namespace
       _Link&       tgtLink = this->_hexLinks[ i ];
       tgtLink._nodes[0] = _hexNodes + ( srcLink._nodes[0] - other._hexNodes );
       tgtLink._nodes[1] = _hexNodes + ( srcLink._nodes[1] - other._hexNodes );
-      tgtLink._intNodes.reserve( 10 ); // to avoid reallocation
-      tgtLink._splits.reserve( 10 );
     }
 
     for ( int i = 0; i < 6; ++i )
@@ -1291,40 +1617,184 @@ namespace
     _origNodeInd   = _grid->NodeIndex( i,j,k );
     for ( int iN = 0; iN < 8; ++iN )
     {
-      _hexNodes[iN]._node = _grid->_nodes[ _origNodeInd + _nodeShift[iN] ];
+      _hexNodes[iN]._node     = _grid->_nodes   [ _origNodeInd + _nodeShift[iN] ];
+      _hexNodes[iN]._intPoint = _grid->_gridIntP[ _origNodeInd + _nodeShift[iN] ];
       _nbCornerNodes += bool( _hexNodes[iN]._node );
-      _nbBndNodes    += _grid->_isBndNode[ _origNodeInd + _nodeShift[iN] ];
+      _nbBndNodes    += bool( _hexNodes[iN]._intPoint );
     }
 
     _sideLength[0] = _grid->_coords[0][i+1] - _grid->_coords[0][i];
     _sideLength[1] = _grid->_coords[1][j+1] - _grid->_coords[1][j];
     _sideLength[2] = _grid->_coords[2][k+1] - _grid->_coords[2][k];
 
-    if ( _nbCornerNodes < 8 && _nbIntNodes + _nbCornerNodes > 3)
+    _intNodes.clear();
+    _vIntNodes.clear();
+
+    if ( _nbFaceIntNodes + _eIntPoints.size() > 0 &&
+         _nbFaceIntNodes + _nbCornerNodes + _eIntPoints.size() > 3)
     {
+      _intNodes.reserve( 3 * _nbBndNodes + _nbFaceIntNodes + _eIntPoints.size() );
+
       _Link split;
-      // create sub-links (_splits) by splitting links with _intNodes
+      // create sub-links (_splits) by splitting links with _fIntPoints
       for ( int iLink = 0; iLink < 12; ++iLink )
       {
         _Link& link = _hexLinks[ iLink ];
+        link._fIntNodes.resize( link._fIntPoints.size() );
+        for ( size_t i = 0; i < link._fIntPoints.size(); ++i )
+        {
+          _intNodes.push_back( _Node( 0, link._fIntPoints[i] ));
+          link._fIntNodes[ i ] = & _intNodes.back();
+        }
+
         link._splits.clear();
         split._nodes[ 0 ] = link._nodes[0];
-        for ( size_t i = 0; i < link._intNodes.size(); ++ i )
+        bool isOut = ( ! link._nodes[0]->Node() ); // is1stNodeOut( iLink );
+        bool checkTransition;
+        for ( size_t i = 0; i < link._fIntNodes.size(); ++i )
+        {
+          if ( link._fIntNodes[i]->Node() ) // intersection non-coinsident with a grid node
+          {
+            if ( split._nodes[ 0 ]->Node() && !isOut )
+            {
+              split._nodes[ 1 ] = link._fIntNodes[i];
+              link._splits.push_back( split );
+            }
+            split._nodes[ 0 ] = link._fIntNodes[i];
+            checkTransition = true;
+          }
+          else // FACE intersection coinsident with a grid node
+          {
+            checkTransition = ( link._nodes[0]->Node() );
+          }
+          if ( checkTransition )
+          {
+            switch ( link._fIntPoints[i]->_transition ) {
+            case Trans_OUT: isOut = true; break;
+            case Trans_IN : isOut = false; break;
+            default:
+              if ( !link._fIntNodes[i]->Node() && i == 0 )
+                isOut = is1stNodeOut( link );
+              else
+                ; // isOut remains the same
+            }
+          }
+        }
+        if ( link._nodes[ 1 ]->Node() && split._nodes[ 0 ]->Node() && !isOut )
+        {
+          split._nodes[ 1 ] = link._nodes[1];
+          link._splits.push_back( split );
+        }
+      }
+
+      // Create _Node's at intersections with EDGEs.
+
+      const double tol2 = _grid->_tol * _grid->_tol;
+      int facets[3], nbFacets, subEntity;
+
+      for ( size_t iP = 0; iP < _eIntPoints.size(); ++iP )
+      {
+        nbFacets = getEntity( _eIntPoints[iP], facets, subEntity );
+        _Node* equalNode = 0;
+        switch( nbFacets ) {
+        case 1: // in a _Face
+        {
+          _Face& quad = _hexQuads[ facets[0] - SMESH_Block::ID_FirstF ];
+          equalNode = FindEqualNode( quad._eIntNodes, _eIntPoints[ iP ], tol2 );
+          if ( equalNode ) {
+            equalNode->Add( _eIntPoints[ iP ] );
+          }
+          else {
+            _intNodes.push_back( _Node( 0, _eIntPoints[ iP ]));
+            quad._eIntNodes.push_back( & _intNodes.back() );
+          }
+          break;
+        }
+        case 2: // on a _Link
+        {
+          _Link& link = _hexLinks[ subEntity - SMESH_Block::ID_FirstE ];
+          if ( link._splits.size() > 0 )
+          {
+            equalNode = FindEqualNode( link._fIntNodes, _eIntPoints[ iP ], tol2 );
+            if ( equalNode )
+              equalNode->Add( _eIntPoints[ iP ] );
+          }
+          else
+          {
+            _intNodes.push_back( _Node( 0, _eIntPoints[ iP ]));
+            for ( int iF = 0; iF < 2; ++iF )
+            {
+              _Face& quad = _hexQuads[ facets[iF] - SMESH_Block::ID_FirstF ];
+              equalNode = FindEqualNode( quad._eIntNodes, _eIntPoints[ iP ], tol2 );
+              if ( equalNode ) {
+                equalNode->Add( _eIntPoints[ iP ] );
+              }
+              else {
+                quad._eIntNodes.push_back( & _intNodes.back() );
+              }
+            }
+          }
+          break;
+        }
+        case 3: // at a corner
         {
-          if ( split._nodes[ 0 ]->Node() )
+          _Node& node = _hexNodes[ subEntity - SMESH_Block::ID_FirstV ];
+          if ( node.Node() > 0 )
+          {
+            if ( node._intPoint )
+              node._intPoint->Add( _eIntPoints[ iP ]->_faceIDs, _eIntPoints[ iP ]->_node );
+          }
+          else
           {
-            split._nodes[ 1 ] = &link._intNodes[i];
-            link._splits.push_back( split );
+            _intNodes.push_back( _Node( 0, _eIntPoints[ iP ]));
+            for ( int iF = 0; iF < 3; ++iF )
+            {
+              _Face& quad = _hexQuads[ facets[iF] - SMESH_Block::ID_FirstF ];
+              equalNode = FindEqualNode( quad._eIntNodes, _eIntPoints[ iP ], tol2 );
+              if ( equalNode ) {
+                equalNode->Add( _eIntPoints[ iP ] );
+              }
+              else {
+                quad._eIntNodes.push_back( & _intNodes.back() );
+              }
+            }
           }
-          split._nodes[ 0 ] = &link._intNodes[i];
+          break;
         }
-        if ( link._nodes[ 1 ]->Node() && split._nodes[ 0 ]->Node() )
+        } // switch( nbFacets )
+
+        if ( nbFacets == 0 ||
+             _grid->_shapes( _eIntPoints[ iP ]->_shapeID ).ShapeType() == TopAbs_VERTEX )
+        {
+          equalNode = FindEqualNode( _vIntNodes, _eIntPoints[ iP ], tol2 );
+          if ( equalNode ) {
+            equalNode->Add( _eIntPoints[ iP ] );
+          }
+          else {
+            if ( _intNodes.empty() || _intNodes.back().EdgeIntPnt() != _eIntPoints[ iP ])
+              _intNodes.push_back( _Node( 0, _eIntPoints[ iP ]));
+            _vIntNodes.push_back( & _intNodes.back() );
+          }
+        }
+      } // loop on _eIntPoints
+    }
+    else if ( 3 < _nbCornerNodes && _nbCornerNodes < 8 ) // _nbFaceIntNodes == 0
+    {
+      _Link split;
+      // create sub-links (_splits) of whole links
+      for ( int iLink = 0; iLink < 12; ++iLink )
+      {
+        _Link& link = _hexLinks[ iLink ];
+        link._splits.clear();
+        if ( link._nodes[ 0 ]->Node() && link._nodes[ 1 ]->Node() )
         {
+          split._nodes[ 0 ] = link._nodes[0];
           split._nodes[ 1 ] = link._nodes[1];
           link._splits.push_back( split );
         }
       }
     }
+
   }
   //================================================================================
   /*!
@@ -1348,149 +1818,505 @@ namespace
   {
     Init();
 
-    if ( _nbCornerNodes + _nbIntNodes < 4 )
+    int nbIntersections = _nbFaceIntNodes + _eIntPoints.size();
+    if ( _nbCornerNodes + nbIntersections < 4 )
       return;
 
-    if ( _nbBndNodes == _nbCornerNodes && isInHole() )
+    if ( _nbBndNodes == _nbCornerNodes && nbIntersections == 0 && isInHole() )
       return;
 
     _polygons.clear();
+    _polygons.reserve( 20 );
 
-    vector<const SMDS_MeshNode* > polyhedraNodes;
-    vector<int>                   quantities;
-
-    // create polygons from quadrangles and get their nodes
+    // Create polygons from quadrangles
+    // --------------------------------
 
-    vector<_Node*> nodes;
-    nodes.reserve( _nbCornerNodes + _nbIntNodes );
+    _Link                   polyLink;
+    vector< _OrientedLink > splits;
+    vector<_Node*>          chainNodes, usedEdgeNodes;
+    _Face*                  coplanarPolyg;
 
-    _Link polyLink;
-    polyLink._faces.reserve( 1 );
+    bool hasEdgeIntersections = !_eIntPoints.empty();
 
     for ( int iF = 0; iF < 6; ++iF ) // loop on 6 sides of a hexahedron
     {
-      const _Face& quad = _hexQuads[ iF ] ;
+      _Face& quad = _hexQuads[ iF ] ;
 
       _polygons.resize( _polygons.size() + 1 );
-      _Face& polygon = _polygons.back();
-      polygon._links.clear();
-      polygon._polyLinks.clear(); polygon._polyLinks.reserve( 10 );
+      _Face* polygon = &_polygons.back();
+      polygon->_polyLinks.reserve( 20 );
 
-      // add splits of a link to a polygon and collect info on nodes
-      //int nbIn = 0, nbOut = 0, nbCorners = 0;
-      nodes.clear();
+      splits.clear();
       for ( int iE = 0; iE < 4; ++iE ) // loop on 4 sides of a quadrangle
+        for ( int iS = 0; iS < quad._links[ iE ].NbResultLinks(); ++iS )
+          splits.push_back( quad._links[ iE ].ResultLink( iS ));
+
+      // add splits of links to a polygon and add _polyLinks to make
+      // polygon's boundary closed
+
+      int nbSplits = splits.size();
+      if ( nbSplits < 2 && quad._eIntNodes.empty() )
+        nbSplits = 0;
+
+#ifdef _DEBUG_
+      for ( size_t iP = 0; iP < quad._eIntNodes.size(); ++iP )
+        if ( quad._eIntNodes[ iP ]->IsUsedInFace( polygon ))
+          quad._eIntNodes[ iP ]->_usedInFace = 0;
+#endif
+      int nbUsedEdgeNodes = 0;
+
+      while ( nbSplits > 0 )
       {
-        int nbSpits = quad._links[ iE ].NbResultLinks();
-        for ( int iS = 0; iS < nbSpits; ++iS )
+        size_t iS = 0;
+        while ( !splits[ iS ] )
+          ++iS;
+
+        if ( !polygon->_links.empty() )
+        {
+          _polygons.resize( _polygons.size() + 1 );
+          polygon = &_polygons.back();
+          polygon->_polyLinks.reserve( 20 );
+        }
+        polygon->_links.push_back( splits[ iS ] );
+        splits[ iS++ ]._link = 0;
+        --nbSplits;
+
+        _Node* nFirst = polygon->_links.back().FirstNode();
+        _Node *n1,*n2 = polygon->_links.back().LastNode();
+        for ( ; nFirst != n2 && iS < splits.size(); ++iS )
         {
-          _OrientedLink split = quad._links[ iE ].ResultLink( iS );
-          _Node* n = split.FirstNode();
-          if ( !polygon._links.empty() )
+          _OrientedLink& split = splits[ iS ];
+          if ( !split ) continue;
+
+          n1 = split.FirstNode();
+          if ( n1 != n2 )
           {
-            _Node* nPrev = polygon._links.back().LastNode();
-            if ( nPrev != n )
+            // try to connect to intersections with EDGEs
+            if ( quad._eIntNodes.size() > nbUsedEdgeNodes  &&
+                 findChain( n2, n1, quad, chainNodes ))
+            {
+              for ( size_t i = 1; i < chainNodes.size(); ++i )
+              {
+                polyLink._nodes[0] = chainNodes[i-1];
+                polyLink._nodes[1] = chainNodes[i];
+                polygon->_polyLinks.push_back( polyLink );
+                polygon->_links.push_back( _OrientedLink( &polygon->_polyLinks.back() ));
+                nbUsedEdgeNodes += ( polyLink._nodes[1]->IsUsedInFace( polygon ));
+              }
+              if ( chainNodes.back() != n1 )
+              {
+                n2 = chainNodes.back();
+                --iS;
+                continue;
+              }
+            }
+            // try to connect to a split ending on the same FACE
+            else
             {
-              polyLink._nodes[0] = nPrev;
-              polyLink._nodes[1] = n;
-              polygon._polyLinks.push_back( polyLink );
-              polygon._links.push_back( _OrientedLink( &polygon._polyLinks.back() ));
-              nodes.push_back( nPrev );
+              _OrientedLink foundSplit;
+              for ( int i = iS; i < splits.size() && !foundSplit; ++i )
+                if (( foundSplit = splits[ i ]) &&
+                    ( n2->IsLinked( foundSplit.FirstNode()->_intPoint )))
+                {
+                  polyLink._nodes[0] = n2;
+                  polyLink._nodes[1] = foundSplit.FirstNode();
+                  polygon->_polyLinks.push_back( polyLink );
+                  polygon->_links.push_back( _OrientedLink( &polygon->_polyLinks.back() ));
+                  iS = i - 1;
+                }
+                else
+                {
+                  foundSplit._link = 0;
+                }
+              if ( foundSplit )
+              {
+                n2 = foundSplit.FirstNode();
+                continue;
+              }
+              else
+              {
+                if ( n2->IsLinked( nFirst->_intPoint ))
+                  break;
+                polyLink._nodes[0] = n2;
+                polyLink._nodes[1] = n1;
+                polygon->_polyLinks.push_back( polyLink );
+                polygon->_links.push_back( _OrientedLink( &polygon->_polyLinks.back() ));
+              }
             }
           }
-          polygon._links.push_back( split );
-          nodes.push_back( n );
+          polygon->_links.push_back( split );
+          split._link = 0;
+          --nbSplits;
+          n2 = polygon->_links.back().LastNode();
+
+        } // loop on splits
+
+        if ( nFirst != n2 ) // close a polygon
+        {
+          if ( !findChain( n2, nFirst, quad, chainNodes ))
+          {
+            if ( !closePolygon( polygon, chainNodes ))
+              chainNodes.push_back( nFirst );
+          }
+          for ( size_t i = 1; i < chainNodes.size(); ++i )
+          {
+            polyLink._nodes[0] = chainNodes[i-1];
+            polyLink._nodes[1] = chainNodes[i];
+            polygon->_polyLinks.push_back( polyLink );
+            polygon->_links.push_back( _OrientedLink( &polygon->_polyLinks.back() ));
+            nbUsedEdgeNodes += bool( polyLink._nodes[1]->IsUsedInFace( polygon ));
+          }
         }
-      }
-      if ( polygon._links.size() > 1 )
-      {
-        _Node* n1 = polygon._links.back().LastNode();
-        _Node* n2 = polygon._links.front().FirstNode();
-        if ( n1 != n2 )
+
+        if ( polygon->_links.size() < 3 && nbSplits > 0 )
         {
-          polyLink._nodes[0] = n1;
-          polyLink._nodes[1] = n2;
-          polygon._polyLinks.push_back( polyLink );
-          polygon._links.push_back( _OrientedLink( &polygon._polyLinks.back() ));
-          nodes.push_back( n1 );
+          polygon->_polyLinks.clear();
+          polygon->_links.clear();
         }
-        // add polygon to its links
-        for ( size_t iL = 0; iL < polygon._links.size(); ++iL )
-          polygon._links[ iL ]._link->_faces.push_back( &polygon );
-        // store polygon nodes
-        quantities.push_back( nodes.size() );
-        for ( size_t i = 0; i < nodes.size(); ++i )
-          polyhedraNodes.push_back( nodes[i]->Node() );
-      }
-      else
+      } // while ( nbSplits > 0 )
+
+      // if ( quad._eIntNodes.size() > nbUsedEdgeNodes )
+      // {
+      //   // make _vIntNodes from not used _eIntNodes
+      //   const double tol = 0.05 * Min( Min( _sideLength[0], _sideLength[1] ), _sideLength[0] );
+      //   for ( size_t iP = 0; iP < quad._eIntNodes.size(); ++iP )
+      //   {
+      //     if ( quad._eIntNodes[ iP ]->IsUsedInFace() ) continue;
+      //     _Node* equalNode =
+      //       FindEqualNode( _vIntNodes, quad._eIntNodes[ iP ].EdgeIntPnt(), tol*tol );
+      //     if ( equalNode )
+      //       equalNode->Add( quad._eIntNodes[ iP ].EdgeIntPnt() );
+      //     else
+      //       _vIntNodes.push_back( quad._eIntNodes[ iP ]);
+      //   }
+      // }
+
+      if ( polygon->_links.size() < 3 )
       {
-        _polygons.resize( _polygons.size() - 1 );
+        _polygons.pop_back();
+        //usedEdgeNodes.resize( usedEdgeNodes.size() - nbUsedEdgeNodes );
       }
-    }
+    }  // loop on 6 hexahedron sides
+
+    // Create polygons closing holes in a polyhedron
+    // ----------------------------------------------
 
-    // create polygons closing holes in a polyhedron
+    // clear _usedInFace
+    for ( size_t iN = 0; iN < _intNodes.size(); ++iN )
+      _intNodes[ iN ]._usedInFace = 0;
 
+    // add polygons to their links and mark used nodes
+    for ( size_t iP = 0; iP < _polygons.size(); ++iP )
+    {
+      _Face& polygon = _polygons[ iP ];
+      for ( size_t iL = 0; iL < polygon._links.size(); ++iL )
+      {
+        polygon._links[ iL ].AddFace( &polygon );
+        polygon._links[ iL ].FirstNode()->_usedInFace = &polygon;
+      }
+    }
     // find free links
     vector< _OrientedLink* > freeLinks;
+    freeLinks.reserve(20);
     for ( size_t iP = 0; iP < _polygons.size(); ++iP )
     {
       _Face& polygon = _polygons[ iP ];
       for ( size_t iL = 0; iL < polygon._links.size(); ++iL )
-        if ( polygon._links[ iL ]._link->_faces.size() < 2 )
+        if ( polygon._links[ iL ].NbFaces() < 2 )
+        {
           freeLinks.push_back( & polygon._links[ iL ]);
+          freeLinks.back()->FirstNode()->IsUsedInFace() == true;
+        }
     }
-    // make closed chains of free links
     int nbFreeLinks = freeLinks.size();
-    if ( 0 < nbFreeLinks && nbFreeLinks < 3 ) return;
+    if ( nbFreeLinks > 0 && nbFreeLinks < 3 ) return;
+
+    // put not used intersection nodes to _vIntNodes
+    int nbVertexNodes = 0; // nb not used vertex nodes
+    {
+      for ( size_t iN = 0; iN < _vIntNodes.size(); ++iN )
+        nbVertexNodes += ( !_vIntNodes[ iN ]->IsUsedInFace() );
+
+      const double tol = 1e-3 * Min( Min( _sideLength[0], _sideLength[1] ), _sideLength[0] );
+      for ( size_t iN = _nbFaceIntNodes; iN < _intNodes.size(); ++iN )
+      {
+        if ( _intNodes[ iN ].IsUsedInFace() ) continue;
+        if ( dynamic_cast< const F_IntersectPoint* >( _intNodes[ iN ]._intPoint )) continue;
+        _Node* equalNode =
+          FindEqualNode( _vIntNodes, _intNodes[ iN ].EdgeIntPnt(), tol*tol );
+        if ( !equalNode /*|| equalNode->IsUsedInFace()*/ )
+        {
+          _vIntNodes.push_back( &_intNodes[ iN ]);
+          ++nbVertexNodes;
+        }
+      }
+    }
+
+    set<TGeomID> usedFaceIDs;
+    TGeomID curFace = 0;
+    const size_t nbQuadPolygons = _polygons.size();
+
+    // create polygons by making closed chains of free links
+    size_t iPolygon = _polygons.size();
     while ( nbFreeLinks > 0 )
     {
-      nodes.clear();
-      _polygons.resize( _polygons.size() + 1 );
-      _Face& polygon = _polygons.back();
-      polygon._links.clear();
+      if ( iPolygon == _polygons.size() )
+        _polygons.resize( _polygons.size() + 1 );
+      _Face& polygon = _polygons[ iPolygon ];
+      polygon._polyLinks.reserve( 20 );
+      polygon._links.reserve( 20 );
 
-      // get a remaining link to start from
       _OrientedLink* curLink = 0;
-      for ( size_t iL = 0; iL < freeLinks.size() && !curLink; ++iL )
-        if (( curLink = freeLinks[ iL ] ))
-          freeLinks[ iL ] = 0;
-      nodes.push_back( curLink->LastNode() );
-      polygon._links.push_back( *curLink );
-
-      // find all links connected to curLink
-      _Node* curNode = 0;
-      do
-      {
-        curNode = curLink->FirstNode();
-        curLink = 0;
+      _Node*         curNode;
+      if (( !hasEdgeIntersections ) ||
+          ( nbFreeLinks < 4 && nbVertexNodes == 0 ))
+      {
+        // get a remaining link to start from
         for ( size_t iL = 0; iL < freeLinks.size() && !curLink; ++iL )
-          if ( freeLinks[ iL ] && freeLinks[ iL ]->LastNode() == curNode )
-          {
-            curLink = freeLinks[ iL ];
+          if (( curLink = freeLinks[ iL ] ))
             freeLinks[ iL ] = 0;
-            nodes.push_back( curNode );
-            polygon._links.push_back( *curLink );
+        polygon._links.push_back( *curLink );
+        --nbFreeLinks;
+        do
+        {
+          // find all links connected to curLink
+          curNode = curLink->FirstNode();
+          curLink = 0;
+          for ( size_t iL = 0; iL < freeLinks.size() && !curLink; ++iL )
+            if ( freeLinks[ iL ] && freeLinks[ iL ]->LastNode() == curNode )
+            {
+              curLink = freeLinks[ iL ];
+              freeLinks[ iL ] = 0;
+              --nbFreeLinks;
+              polygon._links.push_back( *curLink );
+            }
+        } while ( curLink );
+      }
+      else // there are intersections with EDGEs
+      {
+        // get a remaining link to start from, one lying on minimal
+        // nb of FACEs
+        {
+          vector< pair< TGeomID, int > > facesOfLink[3];
+          pair< TGeomID, int > faceOfLink( -1, -1 );
+          vector< TGeomID > faces;
+          for ( size_t iL = 0; iL < freeLinks.size(); ++iL )
+            if ( freeLinks[ iL ] )
+            {
+              faces = freeLinks[ iL ]->GetNotUsedFace( usedFaceIDs );
+              if ( faces.size() == 1 )
+              {
+                faceOfLink = make_pair( faces[0], iL );
+                if ( !freeLinks[ iL ]->HasEdgeNodes() )
+                  break;
+                facesOfLink[0].push_back( faceOfLink );
+              }
+              else if ( facesOfLink[0].empty() )
+              {
+                faceOfLink = make_pair(( faces.empty() ? -1 : faces[0]), iL );
+                facesOfLink[ 1 + faces.empty() ].push_back( faceOfLink );
+              }
+            }
+          for ( int i = 0; faceOfLink.second < 0 && i < 3; ++i )
+            if ( !facesOfLink[i].empty() )
+              faceOfLink = facesOfLink[i][0];
+
+          if ( faceOfLink.first < 0 ) // all faces used
+          {
+            for ( size_t i = 0; i < facesOfLink[2].size() && faceOfLink.first < 1; ++i )
+            {
+              curLink = freeLinks[ facesOfLink[2][i].second ];
+              faceOfLink.first = curLink->FirstNode()->IsLinked( curLink->LastNode()->_intPoint );
+            }
+            usedFaceIDs.clear();
           }
-      } while ( curLink );
+          curFace = faceOfLink.first;
+          curLink = freeLinks[ faceOfLink.second ];
+          freeLinks[ faceOfLink.second ] = 0;
+        }
+        usedFaceIDs.insert( curFace );
+        polygon._links.push_back( *curLink );
+        --nbFreeLinks;
 
-      nbFreeLinks -= polygon._links.size();
+        // find all links bounding a FACE of curLink
+        do
+        {
+          // go forward from curLink
+          curNode = curLink->LastNode();
+          curLink = 0;
+          for ( size_t iL = 0; iL < freeLinks.size() && !curLink; ++iL )
+            if ( freeLinks[ iL ] &&
+                 freeLinks[ iL ]->FirstNode() == curNode &&
+                 freeLinks[ iL ]->LastNode()->IsOnFace( curFace ))
+            {
+              curLink = freeLinks[ iL ];
+              freeLinks[ iL ] = 0;
+              polygon._links.push_back( *curLink );
+              --nbFreeLinks;
+            }
+        } while ( curLink );
 
-      if ( curNode != nodes.front() || polygon._links.size() < 3 )
-        return; // closed polygon not found -> invalid polyhedron
+        std::reverse( polygon._links.begin(), polygon._links.end() );
 
-      quantities.push_back( nodes.size() );
-      for ( size_t i = 0; i < nodes.size(); ++i )
-        polyhedraNodes.push_back( nodes[i]->Node() );
+        curLink = & polygon._links.back();
+        do
+        {
+          // go backward from curLink
+          curNode = curLink->FirstNode();
+          curLink = 0;
+          for ( size_t iL = 0; iL < freeLinks.size() && !curLink; ++iL )
+            if ( freeLinks[ iL ] &&
+                 freeLinks[ iL ]->LastNode() == curNode &&
+                 freeLinks[ iL ]->FirstNode()->IsOnFace( curFace ))
+            {
+              curLink = freeLinks[ iL ];
+              freeLinks[ iL ] = 0;
+              polygon._links.push_back( *curLink );
+              --nbFreeLinks;
+            }
+        } while ( curLink );
+
+        curNode = polygon._links.back().FirstNode();
+
+        if ( polygon._links[0].LastNode() != curNode )
+        {
+          if ( nbVertexNodes > 0 )
+          {
+            // add links with _vIntNodes if not already used
+            for ( size_t iN = 0; iN < _vIntNodes.size(); ++iN )
+              if ( !_vIntNodes[ iN ]->IsUsedInFace() &&
+                   _vIntNodes[ iN ]->IsOnFace( curFace ))
+              {
+                _vIntNodes[ iN ]->_usedInFace = &polygon;
+                --nbVertexNodes;
+                polyLink._nodes[0] = _vIntNodes[ iN ];
+                polyLink._nodes[1] = curNode;
+                polygon._polyLinks.push_back( polyLink );
+                polygon._links.push_back( _OrientedLink( &polygon._polyLinks.back() ));
+                freeLinks.push_back( &polygon._links.back() );
+                ++nbFreeLinks;
+                curNode = _vIntNodes[ iN ];
+                // TODO: to reorder _vIntNodes within polygon, if there are several ones
+              }
+          }
+          // if ( polygon._links.size() > 1 )
+          {
+            polyLink._nodes[0] = polygon._links[0].LastNode();
+            polyLink._nodes[1] = curNode;
+            polygon._polyLinks.push_back( polyLink );
+            polygon._links.push_back( _OrientedLink( &polygon._polyLinks.back() ));
+            freeLinks.push_back( &polygon._links.back() );
+            ++nbFreeLinks;
+          }
+        }
+      } // if there are intersections with EDGEs
 
-      // add polygon to its links and reverse links
-      for ( size_t i = 0; i < polygon._links.size(); ++i )
+      if ( polygon._links.size() < 2 ||
+           polygon._links[0].LastNode() != polygon._links.back().FirstNode() )
+        return; // closed polygon not found -> invalid polyhedron
+
+      if ( polygon._links.size() == 2 )
       {
-        polygon._links[i].Reverse();
-        polygon._links[i]._link->_faces.push_back( &polygon );
+        if ( freeLinks.back() == &polygon._links.back() )
+        {
+          freeLinks.pop_back();
+          --nbFreeLinks;
+        }
+        if ( polygon._links.front().NbFaces() > 0 )
+          polygon._links.back().AddFace( polygon._links.front()._link->_faces[0] );
+        if ( polygon._links.back().NbFaces() > 0 )
+          polygon._links.front().AddFace( polygon._links.back()._link->_faces[0] );
+
+        _polygons.pop_back();
       }
+      else // polygon._links.size() >= 2
+      {
+        // add polygon to its links
+        for ( size_t iL = 0; iL < polygon._links.size(); ++iL )
+        {
+          polygon._links[ iL ].AddFace( &polygon );
+          polygon._links[ iL ].Reverse();
+        }
+        if ( hasEdgeIntersections && iPolygon == _polygons.size() - 1 )
+        {
+          // check that a polygon does not lie in the plane of another polygon
+          coplanarPolyg = 0;
+          for ( size_t iL = 0; iL < polygon._links.size() && !coplanarPolyg; ++iL )
+          {
+            if ( polygon._links[ iL ].NbFaces() < 2 )
+              continue; // it's a just added free link
+            // look for a polygon made on a hexa side and sharing
+            // two or more haxa links
+            size_t iL2;
+            coplanarPolyg = polygon._links[ iL ]._link->_faces[0];
+            for ( iL2 = iL + 1; iL2 < polygon._links.size(); ++iL2 )
+              if ( polygon._links[ iL2 ]._link->_faces[0] == coplanarPolyg &&
+                   !coplanarPolyg->isPolyLink( polygon._links[ iL2 ]) &&
+                   coplanarPolyg < & _polygons[ nbQuadPolygons ])
+                break;
+            if ( iL2 == polygon._links.size() )
+              coplanarPolyg = 0;
+          }
+          if ( 0 /*coplanarPolyg*/ ) // coplanar polygon found
+          {
+            freeLinks.resize( freeLinks.size() - polygon._polyLinks.size() );
+            nbFreeLinks -= polygon._polyLinks.size();
+
+            // fill freeLinks with links not shared by coplanarPolyg and polygon
+            for ( size_t iL = 0; iL < polygon._links.size(); ++iL )
+              if ( polygon._links[ iL ]._link->_faces[1] &&
+                   polygon._links[ iL ]._link->_faces[0] != coplanarPolyg )
+              {
+                _Face* p = polygon._links[ iL ]._link->_faces[0];
+                for ( size_t iL2 = 0; iL2 < p->_links.size(); ++iL2 )
+                  if ( p->_links[ iL2 ]._link == polygon._links[ iL ]._link )
+                  {
+                    freeLinks.push_back( & p->_links[ iL2 ] );
+                    ++nbFreeLinks;
+                    freeLinks.back()->RemoveFace( &polygon );
+                    break;
+                  }
+              }
+            for ( size_t iL = 0; iL < coplanarPolyg->_links.size(); ++iL )
+              if ( coplanarPolyg->_links[ iL ]._link->_faces[1] &&
+                   coplanarPolyg->_links[ iL ]._link->_faces[1] != &polygon )
+              {
+                _Face* p = coplanarPolyg->_links[ iL ]._link->_faces[0];
+                if ( p == coplanarPolyg )
+                  p = coplanarPolyg->_links[ iL ]._link->_faces[1];
+                for ( size_t iL2 = 0; iL2 < p->_links.size(); ++iL2 )
+                  if ( p->_links[ iL2 ]._link == coplanarPolyg->_links[ iL ]._link )
+                  {
+                    freeLinks.push_back( & p->_links[ iL2 ] );
+                    ++nbFreeLinks;
+                    freeLinks.back()->RemoveFace( coplanarPolyg );
+                    break;
+                  }
+              }
+            // set coplanarPolyg to be re-created next
+            for ( size_t iP = 0; iP < _polygons.size(); ++iP )
+              if ( coplanarPolyg == & _polygons[ iP ] )
+              {
+                iPolygon = iP;
+                _polygons[ iPolygon ]._links.clear();
+                _polygons[ iPolygon ]._polyLinks.clear();
+                break;
+              }
+            if ( freeLinks.back() == &polygon._links.back() )
+            {
+              freeLinks.pop_back();
+              --nbFreeLinks;
+            }
+            _polygons.pop_back();
+            usedFaceIDs.erase( curFace );
+            continue;
+          } // if ( coplanarPolyg )
+        } // if ( hasEdgeIntersections )
 
-      //const size_t firstPoly = _polygons.size();
-    }
+        iPolygon = _polygons.size();
+
+      } // end of case ( polygon._links.size() > 2 )
+    } // while ( nbFreeLinks > 0 )
 
     if ( ! checkPolyhedronSize() )
     {
@@ -1498,27 +2324,39 @@ namespace
     }
 
     // create a classic cell if possible
-    const int nbNodes = _nbCornerNodes + _nbIntNodes;
+    const int nbNodes = _nbCornerNodes + nbIntersections;
     bool isClassicElem = false;
     if (      nbNodes == 8 && _polygons.size() == 6 ) isClassicElem = addHexa();
     else if ( nbNodes == 4 && _polygons.size() == 4 ) isClassicElem = addTetra();
     else if ( nbNodes == 6 && _polygons.size() == 5 ) isClassicElem = addPenta();
     else if ( nbNodes == 5 && _polygons.size() == 5 ) isClassicElem = addPyra ();
     if ( !isClassicElem )
-      _volumeDefs.set( polyhedraNodes, quantities );
+    {
+      _volumeDefs._nodes.clear();
+      _volumeDefs._quantities.clear();
+
+      for ( size_t iF = 0; iF < _polygons.size(); ++iF )
+      {
+        const size_t nbLinks = _polygons[ iF ]._links.size();
+        _volumeDefs._quantities.push_back( nbLinks );
+        for ( size_t iL = 0; iL < nbLinks; ++iL )
+          _volumeDefs._nodes.push_back( _polygons[ iF ]._links[ iL ].FirstNode() );
+      }
+    }
   }
   //================================================================================
   /*!
    * \brief Create elements in the mesh
    */
-  int Hexahedron::MakeElements(SMESH_MesherHelper& helper)
+  int Hexahedron::MakeElements(SMESH_MesherHelper&                      helper,
+                               const map< TGeomID, vector< TGeomID > >& edge2faceIDsMap)
   {
     SMESHDS_Mesh* mesh = helper.GetMeshDS();
 
     size_t nbCells[3] = { _grid->_coords[0].size() - 1,
                           _grid->_coords[1].size() - 1,
                           _grid->_coords[2].size() - 1 };
-    const size_t nbGridCells = nbCells[0] *nbCells [1] * nbCells[2];
+    const size_t nbGridCells = nbCells[0] * nbCells[1] * nbCells[2];
     vector< Hexahedron* > intersectedHex( nbGridCells, 0 );
     int nbIntHex = 0;
 
@@ -1535,10 +2373,10 @@ namespace
       for ( ; lineInd.More(); ++lineInd )
       {
         GridLine& line = _grid->_lines[ iDir ][ lineInd.LineIndex() ];
-        multiset< IntersectionPoint >::const_iterator ip = line._intPoints.begin();
+        multiset< F_IntersectPoint >::const_iterator ip = line._intPoints.begin();
         for ( ; ip != line._intPoints.end(); ++ip )
         {
-          if ( !ip->_node ) continue;
+          // if ( !ip->_node ) continue; // intersection at a grid node
           lineInd.SetIndexOnLine( ip->_indexOnLine );
           for ( int iL = 0; iL < 4; ++iL ) // loop on 4 cells sharing a link
           {
@@ -1560,13 +2398,17 @@ namespace
               ++nbIntHex;
             }
             const int iLink = iL + iDir * 4;
-            hex->_hexLinks[iLink]._intNodes.push_back( _Node( 0, &(*ip) ));
-            hex->_nbIntNodes++;
+            hex->_hexLinks[iLink]._fIntPoints.push_back( &(*ip) );
+            //hex->_hexLinks[iLink]._fIntNodes.push_back( _Node( 0, &(*ip) ));
+            hex->_nbFaceIntNodes += bool( ip->_node );
           }
         }
       }
     }
 
+    // implement geom edges into the mesh
+    addEdges( helper, intersectedHex, edge2faceIDsMap );
+
     // add not split hexadrons to the mesh
     int nbAdded = 0;
     vector<int> intHexInd( nbIntHex );
@@ -1577,14 +2419,16 @@ namespace
       if ( hex )
       {
         intHexInd[ nbIntHex++ ] = i;
-        if ( hex->_nbIntNodes > 0 ) continue;
-        init( hex->_i, hex->_j, hex->_k );
+        if ( hex->_nbFaceIntNodes > 0 || hex->_eIntPoints.size() > 0 )
+          continue; // treat intersected hex later
+        this->init( hex->_i, hex->_j, hex->_k );
       }
       else
       {    
-        init( i );
+        this->init( i );
       }
-      if ( _nbCornerNodes == 8 && ( _nbBndNodes < _nbCornerNodes || !isInHole() ))
+      if (( _nbCornerNodes == 8 ) &&
+          ( _nbBndNodes < _nbCornerNodes || !isInHole() ))
       {
         // order of _hexNodes is defined by enum SMESH_Block::TShapeID
         SMDS_MeshElement* el =
@@ -1605,7 +2449,10 @@ namespace
       {
         // all intersection of hex with geometry are at grid nodes
         hex = new Hexahedron( *this );
-        hex->init( i );
+        //hex->init( i );
+        hex->_i = _i;
+        hex->_j = _j;
+        hex->_k = _k;
         intHexInd.push_back(0);
         intHexInd[ nbIntHex++ ] = i;
       }
@@ -1636,6 +2483,492 @@ namespace
     return nbAdded;
   }
 
+  //================================================================================
+  /*!
+   * \brief Implements geom edges into the mesh
+   */
+  void Hexahedron::addEdges(SMESH_MesherHelper&                      helper,
+                            vector< Hexahedron* >&                   hexes,
+                            const map< TGeomID, vector< TGeomID > >& edge2faceIDsMap)
+  {
+    if ( edge2faceIDsMap.empty() ) return;
+
+    // Prepare planes for intersecting with EDGEs
+    GridPlanes pln[3];
+    {
+      for ( int iDirZ = 0; iDirZ < 3; ++iDirZ ) // iDirZ gives normal direction to planes
+      {
+        GridPlanes& planes = pln[ iDirZ ];
+        int iDirX = ( iDirZ + 1 ) % 3;
+        int iDirY = ( iDirZ + 2 ) % 3;
+        // planes._uNorm  = ( _grid->_axes[ iDirY ] ^ _grid->_axes[ iDirZ ] ).Normalized();
+        // planes._vNorm  = ( _grid->_axes[ iDirZ ] ^ _grid->_axes[ iDirX ] ).Normalized();
+        planes._zNorm  = ( _grid->_axes[ iDirX ] ^ _grid->_axes[ iDirY ] ).Normalized();
+        planes._zProjs.resize ( _grid->_coords[ iDirZ ].size() );
+        planes._zProjs [0] = 0;
+        const double       zFactor = _grid->_axes[ iDirZ ] * planes._zNorm;
+        const vector< double > & u = _grid->_coords[ iDirZ ];
+        for ( int i = 1; i < planes._zProjs.size(); ++i )
+        {
+          planes._zProjs [i] = zFactor * ( u[i] - u[0] );
+        }
+      }
+    }
+    const double deflection = _grid->_minCellSize / 20.;
+    const double tol        = _grid->_tol;
+    E_IntersectPoint ip;
+
+    // Intersect EDGEs with the planes
+    map< TGeomID, vector< TGeomID > >::const_iterator e2fIt = edge2faceIDsMap.begin();
+    for ( ; e2fIt != edge2faceIDsMap.end(); ++e2fIt )
+    {
+      const TGeomID  edgeID = e2fIt->first;
+      const TopoDS_Edge & E = TopoDS::Edge( _grid->_shapes( edgeID ));
+      BRepAdaptor_Curve curve( E );
+      TopoDS_Vertex v1 = helper.IthVertex( 0, E, false ); 
+      TopoDS_Vertex v2 = helper.IthVertex( 1, E, false ); 
+
+      ip._faceIDs = e2fIt->second;
+      ip._shapeID = edgeID;
+
+      // discretize the EGDE
+      GCPnts_UniformDeflection discret( curve, deflection, true );
+      if ( !discret.IsDone() || discret.NbPoints() < 2 )
+        continue;
+
+      // perform intersection
+      for ( int iDirZ = 0; iDirZ < 3; ++iDirZ )
+      {
+        GridPlanes& planes = pln[ iDirZ ];
+        int      iDirX = ( iDirZ + 1 ) % 3;
+        int      iDirY = ( iDirZ + 2 ) % 3;
+        double    xLen = _grid->_coords[ iDirX ].back() - _grid->_coords[ iDirX ][0];
+        double    yLen = _grid->_coords[ iDirY ].back() - _grid->_coords[ iDirY ][0];
+        double    zLen = _grid->_coords[ iDirZ ].back() - _grid->_coords[ iDirZ ][0];
+        //double zFactor = _grid->_axes[ iDirZ ] * planes._zNorm;
+        int dIJK[3], d000[3] = { 0,0,0 };
+        double o[3] = { _grid->_coords[0][0],
+                        _grid->_coords[1][0],
+                        _grid->_coords[2][0] };
+
+        // locate the 1st point of a segment within the grid
+        gp_XYZ p1     = discret.Value( 1 ).XYZ();
+        double u1     = discret.Parameter( 1 );
+        double zProj1 = planes._zNorm * ( p1 - _grid->_origin );
+
+        _grid->ComputeUVW( p1, ip._uvw );
+        int iX1 = int(( ip._uvw[iDirX] - o[iDirX]) / xLen * (_grid->_coords[ iDirX ].size() - 1));
+        int iY1 = int(( ip._uvw[iDirY] - o[iDirY]) / yLen * (_grid->_coords[ iDirY ].size() - 1));
+        int iZ1 = int(( ip._uvw[iDirZ] - o[iDirZ]) / zLen * (_grid->_coords[ iDirZ ].size() - 1));
+        locateValue( iX1, ip._uvw[iDirX], _grid->_coords[ iDirX ], dIJK[ iDirX ], tol );
+        locateValue( iY1, ip._uvw[iDirY], _grid->_coords[ iDirY ], dIJK[ iDirY ], tol );
+        locateValue( iZ1, ip._uvw[iDirZ], _grid->_coords[ iDirZ ], dIJK[ iDirZ ], tol );
+
+        int ijk[3]; // grid index where a segment intersect a plane
+        ijk[ iDirX ] = iX1;
+        ijk[ iDirY ] = iY1;
+        ijk[ iDirZ ] = iZ1;
+
+        // add the 1st vertex point to a hexahedron
+        if ( iDirZ == 0 )
+        {
+          ip._point   = p1;
+          ip._shapeID = _grid->_shapes.Add( v1 );
+          _grid->_edgeIntP.push_back( ip );
+          if ( !addIntersection( _grid->_edgeIntP.back(), hexes, ijk, d000 ))
+            _grid->_edgeIntP.pop_back();
+          ip._shapeID = edgeID;
+        }
+        for ( int iP = 2; iP <= discret.NbPoints(); ++iP )
+        {
+          // locate the 2nd point of a segment within the grid
+          gp_XYZ p2     = discret.Value( iP ).XYZ();
+          double u2     = discret.Parameter( iP );
+          double zProj2 = planes._zNorm * ( p2 - _grid->_origin );
+          int    iZ2    = iZ1;
+          if ( Abs( zProj2 - zProj1 ) <= std::numeric_limits<double>::min() )
+            continue;
+          locateValue( iZ2, zProj2, planes._zProjs, dIJK[ iDirZ ], tol );
+
+          // treat intersections with planes between 2 end points of a segment
+          int dZ = ( iZ1 <= iZ2 ) ? +1 : -1;
+          int iZ = iZ1 + ( iZ1 < iZ2 );
+          for ( int i = 0, nb = Abs( iZ1 - iZ2 ); i < nb; ++i, iZ += dZ )
+          {
+            ip._point = findIntPoint( u1, zProj1, u2, zProj2,
+                                      planes._zProjs[ iZ ],
+                                      curve, planes._zNorm, _grid->_origin );
+            _grid->ComputeUVW( ip._point.XYZ(), ip._uvw );
+            locateValue( ijk[iDirX], ip._uvw[iDirX], _grid->_coords[iDirX], dIJK[iDirX], tol );
+            locateValue( ijk[iDirY], ip._uvw[iDirY], _grid->_coords[iDirY], dIJK[iDirY], tol );
+            ijk[ iDirZ ] = iZ;
+
+            // add ip to hex "above" the plane
+            _grid->_edgeIntP.push_back( ip );
+            dIJK[ iDirZ ] = 0;
+            bool added = addIntersection(_grid->_edgeIntP.back(), hexes, ijk, dIJK);
+
+            // add ip to hex "below" the plane
+            ijk[ iDirZ ] = iZ-1;
+            if ( !addIntersection( _grid->_edgeIntP.back(), hexes, ijk, dIJK ) &&
+                 !added)
+              _grid->_edgeIntP.pop_back();
+          }
+          iZ1    = iZ2;
+          p1     = p2;
+          u1     = u2;
+          zProj1 = zProj2;
+        }
+        // add the 2nd vertex point to a hexahedron
+        if ( iDirZ == 0 )
+        {
+          ip._shapeID = _grid->_shapes.Add( v2 );
+          ip._point = p1;
+          _grid->ComputeUVW( p1, ip._uvw );
+          locateValue( ijk[iDirX], ip._uvw[iDirX], _grid->_coords[iDirX], dIJK[iDirX], tol );
+          locateValue( ijk[iDirY], ip._uvw[iDirY], _grid->_coords[iDirY], dIJK[iDirY], tol );
+          ijk[ iDirZ ] = iZ1;
+          _grid->_edgeIntP.push_back( ip );
+          if ( !addIntersection( _grid->_edgeIntP.back(), hexes, ijk, d000 ))
+            _grid->_edgeIntP.pop_back();
+          ip._shapeID = edgeID;
+        }
+      } // loop on 3 grid directions
+    } // loop on EDGEs
+
+    // Create nodes at found intersections
+    // const E_IntersectPoint* eip;
+    // for ( size_t i = 0; i < hexes.size(); ++i )
+    // {
+    //   Hexahedron* h = hexes[i];
+    //   if ( !h ) continue;
+    //   for ( int iF = 0; iF < 6; ++iF )
+    //   {
+    //     _Face& quad = h->_hexQuads[ iF ];
+    //     for ( size_t iP = 0; iP < quad._eIntNodes.size(); ++iP )
+    //       if ( !quad._eIntNodes[ iP ]._node )
+    //         if (( eip = quad._eIntNodes[ iP ].EdgeIntPnt() ))
+    //           quad._eIntNodes[ iP ]._intPoint->_node = helper.AddNode( eip->_point.X(),
+    //                                                                    eip->_point.Y(),
+    //                                                                    eip->_point.Z() );
+    //   }
+    //   for ( size_t iP = 0; iP < hexes[i]->_vIntNodes.size(); ++iP )
+    //     if (( eip = h->_vIntNodes[ iP ].EdgeIntPnt() ))
+    //       h->_vIntNodes[ iP ]._intPoint->_node = helper.AddNode( eip->_point.X(),
+    //                                                                eip->_point.Y(),
+    //                                                                eip->_point.Z() );
+    // }
+  }
+
+  //================================================================================
+  /*!
+   * \brief Finds intersection of a curve with a plane
+   *  \param [in] u1 - parameter of one curve point
+   *  \param [in] proj1 - projection of the curve point to the plane normal
+   *  \param [in] u2 - parameter of another curve point
+   *  \param [in] proj2 - projection of the other curve point to the plane normal
+   *  \param [in] proj - projection of a point where the curve intersects the plane
+   *  \param [in] curve - the curve
+   *  \param [in] axis - the plane normal
+   *  \param [in] origin - the plane origin
+   *  \return gp_Pnt - the found intersection point
+   */
+  gp_Pnt Hexahedron::findIntPoint( double u1, double proj1,
+                                   double u2, double proj2,
+                                   double proj,
+                                   BRepAdaptor_Curve& curve,
+                                   const gp_XYZ& axis,
+                                   const gp_XYZ& origin)
+  {
+    double r = (( proj - proj1 ) / ( proj2 - proj1 ));
+    double u = u1 * ( 1 - r ) + u2 * r;
+    gp_Pnt p = curve.Value( u );
+    double newProj =  axis * ( p.XYZ() - origin );
+    if ( Abs( proj - newProj ) > _grid->_tol / 10. )
+    {
+      if ( r > 0.5 )
+        return findIntPoint( u2, proj2, u, newProj, proj, curve, axis, origin );
+      else
+        return findIntPoint( u1, proj2, u, newProj, proj, curve, axis, origin );
+    }
+    return p;
+  }
+
+  //================================================================================
+  /*!
+   * \brief Returns indices of a hexahedron sub-entities holding a point
+   *  \param [in] ip - intersection point
+   *  \param [out] facets - 0-3 facets holding a point
+   *  \param [out] sub - index of a vertex or an edge holding a point
+   *  \return int - number of facets holding a point
+   */
+  int Hexahedron::getEntity( const E_IntersectPoint* ip, int* facets, int& sub )
+  {
+    enum { X = 1, Y = 2, Z = 4 }; // == 001, 010, 100
+    int nbFacets = 0;
+    int vertex = 0, egdeMask = 0;
+
+    if ( Abs( _grid->_coords[0][ _i   ] - ip->_uvw[0] ) < _grid->_tol ) {
+      facets[ nbFacets++ ] = SMESH_Block::ID_F0yz;
+      egdeMask |= X;
+    }
+    else if ( Abs( _grid->_coords[0][ _i+1 ] - ip->_uvw[0] ) < _grid->_tol ) {
+      facets[ nbFacets++ ] = SMESH_Block::ID_F1yz;
+      vertex   |= X;
+      egdeMask |= X;
+    }
+    if ( Abs( _grid->_coords[1][ _j   ] - ip->_uvw[1] ) < _grid->_tol ) {
+      facets[ nbFacets++ ] = SMESH_Block::ID_Fx0z;
+      egdeMask |= Y;
+    }
+    else if ( Abs( _grid->_coords[1][ _j+1 ] - ip->_uvw[1] ) < _grid->_tol ) {
+      facets[ nbFacets++ ] = SMESH_Block::ID_Fx1z;
+      vertex   |= Y;
+      egdeMask |= Y;
+    }
+    if ( Abs( _grid->_coords[2][ _k   ] - ip->_uvw[2] ) < _grid->_tol ) {
+      facets[ nbFacets++ ] = SMESH_Block::ID_Fxy0;
+      egdeMask |= Z;
+    }
+    else if ( Abs( _grid->_coords[2][ _k+1 ] - ip->_uvw[2] ) < _grid->_tol ) {
+      facets[ nbFacets++ ] = SMESH_Block::ID_Fxy1;
+      vertex   |= Z;
+      egdeMask |= Z;
+    }
+
+    switch ( nbFacets )
+    {
+    case 0: sub = 0;         break;
+    case 1: sub = facets[0]; break;
+    case 2: {
+      const int edge [3][8] = {
+        { SMESH_Block::ID_E00z, SMESH_Block::ID_E10z,
+          SMESH_Block::ID_E01z, SMESH_Block::ID_E11z },
+        { SMESH_Block::ID_E0y0, SMESH_Block::ID_E1y0, 0, 0,
+          SMESH_Block::ID_E0y1, SMESH_Block::ID_E1y1 },
+        { SMESH_Block::ID_Ex00, 0, SMESH_Block::ID_Ex10, 0,
+          SMESH_Block::ID_Ex01, 0, SMESH_Block::ID_Ex11 }
+      };
+      switch ( egdeMask ) {
+      case X | Y: sub = edge[ 0 ][ vertex ]; break;
+      case X | Z: sub = edge[ 1 ][ vertex ]; break;
+      default:    sub = edge[ 2 ][ vertex ];
+      }
+      break;
+    }
+    //case 3:
+    default:
+      sub = vertex + SMESH_Block::ID_FirstV;
+    }
+
+    return nbFacets;
+  }
+  //================================================================================
+  /*!
+   * \brief Adds intersection with an EDGE
+   */
+  bool Hexahedron::addIntersection( const E_IntersectPoint& ip,
+                                    vector< Hexahedron* >&  hexes,
+                                    int ijk[], int dIJK[] )
+  {
+    bool added = false;
+
+    size_t hexIndex[4] = {
+      _grid->CellIndex( ijk[0], ijk[1], ijk[2] ),
+      dIJK[0] ? _grid->CellIndex( ijk[0]+dIJK[0], ijk[1], ijk[2] ) : -1,
+      dIJK[1] ? _grid->CellIndex( ijk[0], ijk[1]+dIJK[1], ijk[2] ) : -1,
+      dIJK[2] ? _grid->CellIndex( ijk[0], ijk[1], ijk[2]+dIJK[2] ) : -1
+    };
+    for ( int i = 0; i < 4; ++i )
+    {
+      if ( /*0 <= hexIndex[i] &&*/ hexIndex[i] < hexes.size() && hexes[ hexIndex[i] ] )
+      {
+        Hexahedron* h = hexes[ hexIndex[i] ];
+        // check if ip is really inside the hex
+#ifdef _DEBUG_
+        if (( _grid->_coords[0][ h->_i   ] - _grid->_tol > ip._uvw[0] ) ||
+            ( _grid->_coords[0][ h->_i+1 ] + _grid->_tol < ip._uvw[0] ) ||
+            ( _grid->_coords[1][ h->_j   ] - _grid->_tol > ip._uvw[1] ) ||
+            ( _grid->_coords[1][ h->_j+1 ] + _grid->_tol < ip._uvw[1] ) ||
+            ( _grid->_coords[2][ h->_k   ] - _grid->_tol > ip._uvw[2] ) ||
+            ( _grid->_coords[2][ h->_k+1 ] + _grid->_tol < ip._uvw[2] ))
+          throw SALOME_Exception("ip outside a hex");
+#endif
+        h->_eIntPoints.push_back( & ip );
+        added = true;
+      }
+    }
+    return added;
+  }
+  //================================================================================
+  /*!
+   * \brief Finds nodes at a path from one node to another via intersections with EDGEs
+   */
+  bool Hexahedron::findChain( _Node*          n1,
+                              _Node*          n2,
+                              _Face&          quad,
+                              vector<_Node*>& chn )
+  {
+    chn.clear();
+    chn.push_back( n1 );
+    for ( size_t iP = 0; iP < quad._eIntNodes.size(); ++iP )
+      if ( !quad._eIntNodes[ iP ]->IsUsedInFace( &quad ) &&
+           n1->IsLinked( quad._eIntNodes[ iP ]->_intPoint ) &&
+           n2->IsLinked( quad._eIntNodes[ iP ]->_intPoint ))
+      {
+        chn.push_back( quad._eIntNodes[ iP ]);
+        chn.push_back( n2 );
+        quad._eIntNodes[ iP ]->_usedInFace = &quad;
+        return true;
+      }
+    bool found;
+    do
+    {
+      found = false;
+      for ( size_t iP = 0; iP < quad._eIntNodes.size(); ++iP )
+        if ( !quad._eIntNodes[ iP ]->IsUsedInFace( &quad ) &&
+             chn.back()->IsLinked( quad._eIntNodes[ iP ]->_intPoint ))
+        {
+          chn.push_back( quad._eIntNodes[ iP ]);
+          found = quad._eIntNodes[ iP ]->_usedInFace = &quad;
+          break;
+        }
+    } while ( found && ! chn.back()->IsLinked( n2->_intPoint ) );
+
+    if ( chn.back() != n2 && chn.back()->IsLinked( n2->_intPoint ))
+      chn.push_back( n2 );
+
+    return chn.size() > 1;
+  }
+  //================================================================================
+  /*!
+   * \brief Try to heal a polygon whose ends are not connected
+   */
+  bool Hexahedron::closePolygon( _Face* polygon, vector<_Node*>& chainNodes ) const
+  {
+    int i = -1, nbLinks = polygon->_links.size();
+    if ( nbLinks < 3 )
+      return false;
+    vector< _OrientedLink > newLinks;
+    // find a node lying on the same FACE as the last one
+    _Node*   node = polygon->_links.back().LastNode();
+    int avoidFace = node->IsLinked( polygon->_links.back().FirstNode()->_intPoint );
+    for ( i = nbLinks - 2; i >= 0; --i )
+      if ( node->IsLinked( polygon->_links[i].FirstNode()->_intPoint, avoidFace ))
+        break;
+    if ( i >= 0 )
+    {
+      for ( ; i < nbLinks; ++i )
+        newLinks.push_back( polygon->_links[i] );
+    }
+    else
+    {
+      // find a node lying on the same FACE as the first one
+      node      = polygon->_links[0].FirstNode();
+      avoidFace = node->IsLinked( polygon->_links[0].LastNode()->_intPoint );
+      for ( i = 1; i < nbLinks; ++i )
+        if ( node->IsLinked( polygon->_links[i].LastNode()->_intPoint, avoidFace ))
+          break;
+      if ( i < nbLinks )
+        for ( nbLinks = i + 1, i = 0; i < nbLinks; ++i )
+          newLinks.push_back( polygon->_links[i] );
+    }
+    if ( newLinks.size() > 1 )
+    {
+      polygon->_links.swap( newLinks );
+      chainNodes.clear();
+      chainNodes.push_back( polygon->_links.back().LastNode() );
+      chainNodes.push_back( polygon->_links[0].FirstNode() );
+      return true;
+    }
+    return false;
+  }
+  //================================================================================
+  /*!
+   * \brief Checks transition at the 1st node of a link
+   */
+  bool Hexahedron::is1stNodeOut( _Link& link /*int iLink*/ ) const
+  {
+    // new version is for the case: tangent transition at the 1st node
+    bool isOut = false;
+    if ( link._fIntNodes.size() > 1 )
+    {
+      // check transition at the next intersection
+      switch ( link._fIntPoints[1]->_transition ) {
+      case Trans_OUT: return false;
+      case Trans_IN : return true;
+      default: ; // tangent transition
+      }
+    }
+    gp_Pnt p1 = link._nodes[0]->Point();
+    gp_Pnt p2 = link._nodes[1]->Point();
+    gp_Pnt testPnt = 0.8 * p1.XYZ() + 0.2 * p2.XYZ();
+
+    TGeomID          faceID = link._fIntPoints[0]->_faceIDs[0];
+    const TopoDS_Face& face = TopoDS::Face( _grid->_shapes( faceID ));
+    TopLoc_Location loc;
+    GeomAPI_ProjectPointOnSurf& proj =
+      _grid->_helper->GetProjector( face, loc, 0.1*_grid->_tol );
+    testPnt.Transform( loc );
+    proj.Perform( testPnt );
+    if ( proj.IsDone() &&
+         proj.NbPoints() > 0 &&
+         proj.LowerDistance() > _grid->_tol )
+    {
+      Quantity_Parameter u,v;
+      proj.LowerDistanceParameters( u,v );
+      gp_Dir normal;
+      if ( GeomLib::NormEstim( BRep_Tool::Surface( face, loc ),
+                               gp_Pnt2d( u,v ),
+                               0.1*_grid->_tol,
+                               normal ) < 3 )
+      {
+        if ( face.Orientation() == TopAbs_REVERSED )
+          normal.Reverse();
+        gp_Vec v( proj.NearestPoint(), testPnt );
+        return v * normal > 0;
+      }
+    }
+    //     if ( !_hexLinks[ iLink ]._nodes[0]->Node() ) // no node
+    //       return true;
+    //     if ( !_hexLinks[ iLink ]._nodes[0]->_intPoint ) // no intersection with geometry
+    //       return false;
+    //     switch ( _hexLinks[ iLink ]._nodes[0]->FaceIntPnt()->_transition ) {
+    //     case Trans_OUT: return true;
+    //     case Trans_IN : return false;
+    //     default: ; // tangent transition
+    //     }
+
+//     // ijk of a GridLine corresponding to the link
+//     int   iDir = iLink / 4;
+//     int indSub = iLink % 4;
+//     LineIndexer li = _grid->GetLineIndexer( iDir );
+//     li.SetIJK( _i,_j,_k );
+//     size_t lineIndex[4] = { li.LineIndex  (),
+//                             li.LineIndex10(),
+//                             li.LineIndex01(),
+//                             li.LineIndex11() };
+//     GridLine& line = _grid->_lines[ iDir ][ lineIndex[ indSub ]];
+
+//     // analyze transition of previous ip
+//     bool isOut = true;
+//     multiset< F_IntersectPoint >::const_iterator ip = line._intPoints.begin();
+//     for ( ; ip != line._intPoints.end(); ++ip )
+//     {
+//       if ( &(*ip) == _hexLinks[ iLink ]._nodes[0]->_intPoint )
+//         break;
+//       switch ( ip->_transition ) {
+//       case Trans_OUT: isOut = true;
+//       case Trans_IN : isOut = false;
+//       default:;
+//       }
+//     }
+// #ifdef _DEBUG_
+//     if ( ip == line._intPoints.end() )
+//       cout << "BUG: Wrong GridLine. IKJ = ( "<< _i << " " << _j << " " << _k << " )" << endl;
+// #endif
+    return isOut;
+  }
   //================================================================================
   /*!
    * \brief Adds computed elements to the mesh
@@ -1646,8 +2979,19 @@ namespace
     // add elements resulted from hexahedron intersection
     //for ( size_t i = 0; i < _volumeDefs.size(); ++i )
     {
-      vector< const SMDS_MeshNode* >& nodes = _volumeDefs._nodes;
-      
+      vector< const SMDS_MeshNode* > nodes( _volumeDefs._nodes.size() );
+      for ( size_t iN = 0; iN < nodes.size(); ++iN )
+        if ( !( nodes[iN] = _volumeDefs._nodes[iN]->Node() ))
+        {
+          if ( const E_IntersectPoint* eip = _volumeDefs._nodes[iN]->EdgeIntPnt() )
+            nodes[iN] = _volumeDefs._nodes[iN]->_intPoint->_node =
+              helper.AddNode( eip->_point.X(),
+                              eip->_point.Y(),
+                              eip->_point.Z() );
+          else
+            throw SALOME_Exception("Bug: no node at intersection point");
+        }
+
       if ( !_volumeDefs._quantities.empty() )
       {
         helper.AddPolyhedralVolume( nodes, _volumeDefs._quantities );
@@ -1679,8 +3023,11 @@ namespace
    */
   bool Hexahedron::isInHole() const
   {
+    if ( !_vIntNodes.empty() )
+      return false;
+
     const int ijk[3] = { _i, _j, _k };
-    IntersectionPoint curIntPnt;
+    F_IntersectPoint curIntPnt;
 
     // consider a cell to be in a hole if all links in any direction
     // comes OUT of geometry
@@ -1698,19 +3045,19 @@ namespace
       {
         const _Link& link = _hexLinks[ iL + 4*iDir ];
         // check transition of the first node of a link
-        const IntersectionPoint* firstIntPnt = 0;
+        const F_IntersectPoint* firstIntPnt = 0;
         if ( link._nodes[0]->Node() ) // 1st node is a hexa corner
         {
           curIntPnt._paramOnLine = coords[ ijk[ iDir ]] - coords[0];
           const GridLine& line = _grid->_lines[ iDir ][ lineIndex[ iL ]];
-          multiset< IntersectionPoint >::const_iterator ip =
+          multiset< F_IntersectPoint >::const_iterator ip =
             line._intPoints.upper_bound( curIntPnt );
           --ip;
           firstIntPnt = &(*ip);
         }
-        else if ( !link._intNodes.empty() )
+        else if ( !link._fIntPoints.empty() )
         {
-          firstIntPnt = link._intNodes[0]._intPoint;
+          firstIntPnt = link._fIntPoints[0];
         }
 
         if ( firstIntPnt )
@@ -1736,10 +3083,10 @@ namespace
     {
       const _Face& polygon = _polygons[iP];
       gp_XYZ area (0,0,0);
-      SMESH_TNodeXYZ p1 ( polygon._links[ 0 ].FirstNode()->Node() );
+      gp_XYZ p1 = polygon._links[ 0 ].FirstNode()->Point().XYZ();
       for ( size_t iL = 0; iL < polygon._links.size(); ++iL )
       {
-        SMESH_TNodeXYZ p2 ( polygon._links[ iL ].LastNode()->Node() );
+        gp_XYZ p2 = polygon._links[ iL ].LastNode()->Point().XYZ();
         area += p1 ^ p2;
         p1 = p2;
       }
@@ -1764,30 +3111,32 @@ namespace
          _polygons[4]._links.size() != 4 ||
          _polygons[5]._links.size() != 4   )
       return false;
-    const SMDS_MeshNode* nodes[8];
+    _Node* nodes[8];
     int nbN = 0;
     for ( int iL = 0; iL < 4; ++iL )
     {
       // a base node
-      nodes[iL] = _polygons[0]._links[iL].FirstNode()->Node();
+      nodes[iL] = _polygons[0]._links[iL].FirstNode();
       ++nbN;
 
       // find a top node above the base node
       _Link* link = _polygons[0]._links[iL]._link;
-      ASSERT( link->_faces.size() > 1 );
+      //ASSERT( link->_faces.size() > 1 );
+      if ( !link->_faces[0] || !link->_faces[1] )
+        return debugDumpLink( link );
       // a quadrangle sharing <link> with _polygons[0]
       _Face* quad = link->_faces[ bool( link->_faces[0] == & _polygons[0] )];
       for ( int i = 0; i < 4; ++i )
         if ( quad->_links[i]._link == link )
         {
           // 1st node of a link opposite to <link> in <quad>
-          nodes[iL+4] = quad->_links[(i+2)%4].FirstNode()->Node();
+          nodes[iL+4] = quad->_links[(i+2)%4].FirstNode();
           ++nbN;
           break;
         }
     }
     if ( nbN == 8 )
-      _volumeDefs.set( vector< const SMDS_MeshNode* >( nodes, nodes+8 ));
+      _volumeDefs.set( vector< _Node* >( nodes, nodes+8 ));
 
     return nbN == 8;
   }
@@ -1797,21 +3146,23 @@ namespace
    */
   bool Hexahedron::addTetra()
   {
-    const SMDS_MeshNode* nodes[4];
-    nodes[0] = _polygons[0]._links[0].FirstNode()->Node();
-    nodes[1] = _polygons[0]._links[1].FirstNode()->Node();
-    nodes[2] = _polygons[0]._links[2].FirstNode()->Node();
+    _Node* nodes[4];
+    nodes[0] = _polygons[0]._links[0].FirstNode();
+    nodes[1] = _polygons[0]._links[1].FirstNode();
+    nodes[2] = _polygons[0]._links[2].FirstNode();
 
     _Link* link = _polygons[0]._links[0]._link;
-    ASSERT( link->_faces.size() > 1 );
+    //ASSERT( link->_faces.size() > 1 );
+      if ( !link->_faces[0] || !link->_faces[1] )
+      return debugDumpLink( link );
 
     // a triangle sharing <link> with _polygons[0]
     _Face* tria = link->_faces[ bool( link->_faces[0] == & _polygons[0] )];
     for ( int i = 0; i < 3; ++i )
       if ( tria->_links[i]._link == link )
       {
-        nodes[3] = tria->_links[(i+1)%3].LastNode()->Node();
-        _volumeDefs.set( vector< const SMDS_MeshNode* >( nodes, nodes+4 ));
+        nodes[3] = tria->_links[(i+1)%3].LastNode();
+        _volumeDefs.set( vector< _Node* >( nodes, nodes+4 ));
         return true;
       }
 
@@ -1831,17 +3182,19 @@ namespace
     if ( iTri < 0 ) return false;
 
     // find nodes
-    const SMDS_MeshNode* nodes[6];
+    _Node* nodes[6];
     int nbN = 0;
     for ( int iL = 0; iL < 3; ++iL )
     {
       // a base node
-      nodes[iL] = _polygons[ iTri ]._links[iL].FirstNode()->Node();
+      nodes[iL] = _polygons[ iTri ]._links[iL].FirstNode();
       ++nbN;
 
       // find a top node above the base node
       _Link* link = _polygons[ iTri ]._links[iL]._link;
-      ASSERT( link->_faces.size() > 1 );
+      //ASSERT( link->_faces.size() > 1 );
+      if ( !link->_faces[0] || !link->_faces[1] )
+        return debugDumpLink( link );
       // a quadrangle sharing <link> with a base triangle
       _Face* quad = link->_faces[ bool( link->_faces[0] == & _polygons[ iTri ] )];
       if ( quad->_links.size() != 4 ) return false;
@@ -1849,13 +3202,13 @@ namespace
         if ( quad->_links[i]._link == link )
         {
           // 1st node of a link opposite to <link> in <quad>
-          nodes[iL+3] = quad->_links[(i+2)%4].FirstNode()->Node();
+          nodes[iL+3] = quad->_links[(i+2)%4].FirstNode();
           ++nbN;
           break;
         }
     }
     if ( nbN == 6 )
-      _volumeDefs.set( vector< const SMDS_MeshNode* >( nodes, nodes+6 ));
+      _volumeDefs.set( vector< _Node* >( nodes, nodes+6 ));
 
     return ( nbN == 6 );
   }
@@ -1873,14 +3226,16 @@ namespace
     if ( iQuad < 0 ) return false;
 
     // find nodes
-    const SMDS_MeshNode* nodes[5];
-    nodes[0] = _polygons[iQuad]._links[0].FirstNode()->Node();
-    nodes[1] = _polygons[iQuad]._links[1].FirstNode()->Node();
-    nodes[2] = _polygons[iQuad]._links[2].FirstNode()->Node();
-    nodes[3] = _polygons[iQuad]._links[3].FirstNode()->Node();
+    _Node* nodes[5];
+    nodes[0] = _polygons[iQuad]._links[0].FirstNode();
+    nodes[1] = _polygons[iQuad]._links[1].FirstNode();
+    nodes[2] = _polygons[iQuad]._links[2].FirstNode();
+    nodes[3] = _polygons[iQuad]._links[3].FirstNode();
 
     _Link* link = _polygons[iQuad]._links[0]._link;
-    ASSERT( link->_faces.size() > 1 );
+    //ASSERT( link->_faces.size() > 1 );
+    if ( !link->_faces[0] || !link->_faces[1] )
+      return debugDumpLink( link );
 
     // a triangle sharing <link> with a base quadrangle
     _Face* tria = link->_faces[ bool( link->_faces[0] == & _polygons[ iQuad ] )];
@@ -1888,13 +3243,111 @@ namespace
     for ( int i = 0; i < 3; ++i )
       if ( tria->_links[i]._link == link )
       {
-        nodes[4] = tria->_links[(i+1)%3].LastNode()->Node();
-        _volumeDefs.set( vector< const SMDS_MeshNode* >( nodes, nodes+5 ));
+        nodes[4] = tria->_links[(i+1)%3].LastNode();
+        _volumeDefs.set( vector< _Node* >( nodes, nodes+5 ));
         return true;
       }
 
     return false;
   }
+  //================================================================================
+  /*!
+   * \brief Dump a link and return \c false
+   */
+  bool Hexahedron::debugDumpLink( Hexahedron::_Link* link )
+  {
+#ifdef _DEBUG_
+    gp_Pnt p1 = link->_nodes[0]->Point(), p2 = link->_nodes[1]->Point();
+    cout << "BUG: not shared link. IKJ = ( "<< _i << " " << _j << " " << _k << " )" << endl
+         << "n1 (" << p1.X() << ", "<< p1.Y() << ", "<< p1.Z() << " )" << endl
+         << "n2 (" << p2.X() << ", "<< p2.Y() << ", "<< p2.Z() << " )" << endl;
+#endif
+    return false;
+  }
+
+  //================================================================================
+  /*!
+   * \brief computes exact bounding box with axes parallel to given ones
+   */
+  //================================================================================
+
+  void getExactBndBox( const vector< TopoDS_Shape >& faceVec,
+                       const double*                 axesDirs,
+                       Bnd_Box&                      shapeBox )
+  {
+    BRep_Builder b;
+    TopoDS_Compound allFacesComp;
+    b.MakeCompound( allFacesComp );
+    for ( size_t iF = 0; iF < faceVec.size(); ++iF )
+      b.Add( allFacesComp, faceVec[ iF ] );
+
+    double sP[6]; // aXmin, aYmin, aZmin, aXmax, aYmax, aZmax
+    shapeBox.Get(sP[0],sP[1],sP[2],sP[3],sP[4],sP[5]);
+    double farDist = 0;
+    for ( int i = 0; i < 6; ++i )
+      farDist = Max( farDist, 10 * sP[i] );
+
+    gp_XYZ axis[3] = { gp_XYZ( axesDirs[0], axesDirs[1], axesDirs[2] ),
+                       gp_XYZ( axesDirs[3], axesDirs[4], axesDirs[5] ),
+                       gp_XYZ( axesDirs[6], axesDirs[7], axesDirs[8] ) };
+    axis[0].Normalize();
+    axis[1].Normalize();
+    axis[2].Normalize();
+
+    gp_Mat basis( axis[0], axis[1], axis[2] );
+    gp_Mat bi = basis.Inverted();
+
+    gp_Pnt pMin, pMax;
+    for ( int iDir = 0; iDir < 3; ++iDir )
+    {
+      gp_XYZ axis0 = axis[ iDir ];
+      gp_XYZ axis1 = axis[ ( iDir + 1 ) % 3 ];
+      gp_XYZ axis2 = axis[ ( iDir + 2 ) % 3 ];
+      for ( int isMax = 0; isMax < 2; ++isMax )
+      {
+        double shift = isMax ? farDist : -farDist;
+        gp_XYZ orig = shift * axis0;
+        gp_XYZ norm = axis1 ^ axis2;
+        gp_Pln pln( orig, norm );
+        norm = pln.Axis().Direction().XYZ();
+        BRepBuilderAPI_MakeFace plane( pln, -farDist, farDist, -farDist, farDist );
+
+        gp_Pnt& pAxis = isMax ? pMax : pMin;
+        gp_Pnt pPlane, pFaces;
+        double dist = GEOMUtils::GetMinDistance( plane, allFacesComp, pPlane, pFaces );
+        if ( dist < 0 )
+        {
+          Bnd_B3d bb;
+          gp_XYZ corner;
+          for ( int i = 0; i < 2; ++i ) {
+            corner.SetCoord( 1, sP[ i*3 ]);
+            for ( int j = 0; j < 2; ++j ) {
+              corner.SetCoord( 2, sP[ i*3 + 1 ]);
+              for ( int k = 0; k < 2; ++k )
+              {
+                corner.SetCoord( 3, sP[ i*3 + 2 ]);
+                corner *= bi;
+                bb.Add( corner );
+              }
+            }
+          }
+          corner = isMax ? bb.CornerMax() : bb.CornerMin();
+          pAxis.SetCoord( iDir+1, corner.Coord( iDir+1 ));
+        }
+        else
+        {
+          gp_XYZ pf = pFaces.XYZ() * bi;
+          pAxis.SetCoord( iDir+1, pf.Coord( iDir+1 ) );
+        }
+      }
+    } // loop on 3 axes
+
+    shapeBox.SetVoid();
+    shapeBox.Add( pMin );
+    shapeBox.Add( pMax );
+
+    return;
+  }
 
 } // namespace
 
@@ -1926,51 +3379,56 @@ bool StdMeshers_Cartesian_3D::Compute(SMESH_Mesh &         theMesh,
 
   _computeCanceled = false;
 
+  SMESH_MesherHelper helper( theMesh );
+
   try
   {
     Grid grid;
+    grid._helper = &helper;
 
-    TopTools_MapOfShape faceMap;
-    for ( TopExp_Explorer fExp( theShape, TopAbs_FACE ); fExp.More(); fExp.Next() )
-      if ( !faceMap.Add( fExp.Current() ))
-        faceMap.Remove( fExp.Current() ); // remove a face shared by two solids
-
+    vector< TopoDS_Shape > faceVec;
+    {
+      TopTools_MapOfShape faceMap;
+      TopExp_Explorer fExp;
+      for ( fExp.Init( theShape, TopAbs_FACE ); fExp.More(); fExp.Next() )
+        if ( !faceMap.Add( fExp.Current() ))
+          faceMap.Remove( fExp.Current() ); // remove a face shared by two solids
+
+      for ( fExp.ReInit(); fExp.More(); fExp.Next() )
+        if ( faceMap.Contains( fExp.Current() ))
+          faceVec.push_back( fExp.Current() );
+    }
+    vector<FaceGridIntersector> facesItersectors( faceVec.size() );
+    map< TGeomID, vector< TGeomID > > edge2faceIDsMap;
+    TopExp_Explorer eExp;
     Bnd_Box shapeBox;
-    vector<FaceGridIntersector> facesItersectors( faceMap.Extent() );
-    TopTools_MapIteratorOfMapOfShape faceMppIt( faceMap );
-    for ( int i = 0; faceMppIt.More(); faceMppIt.Next(), ++i )
+    for ( int i = 0; i < faceVec.size(); ++i )
     {
-      facesItersectors[i]._face = TopoDS::Face( faceMppIt.Key() );
-      facesItersectors[i]._grid = &grid;
+      facesItersectors[i]._face   = TopoDS::Face    ( faceVec[i] );
+      facesItersectors[i]._faceID = grid._shapes.Add( faceVec[i] );
+      facesItersectors[i]._grid   = &grid;
       shapeBox.Add( facesItersectors[i].GetFaceBndBox() );
+
+      if ( _hyp->GetToAddEdges() )
+      {
+        helper.SetSubShape( faceVec[i] );
+        for ( eExp.Init( faceVec[i], TopAbs_EDGE ); eExp.More(); eExp.Next() )
+        {
+          const TopoDS_Edge& edge = TopoDS::Edge( eExp.Current() );
+          if ( !SMESH_Algo::isDegenerated( edge ) &&
+               !helper.IsRealSeam( edge ))
+            edge2faceIDsMap[ grid._shapes.Add( edge )].push_back( facesItersectors[i]._faceID );
+        }
+      }
     }
 
+    getExactBndBox( faceVec, _hyp->GetAxisDirs(), shapeBox );
+
     vector<double> xCoords, yCoords, zCoords;
     _hyp->GetCoordinates( xCoords, yCoords, zCoords, shapeBox );
 
-    grid.SetCoordinates( xCoords, yCoords, zCoords, theShape );
-
-    // check if the grid encloses the shape
-    if ( !_hyp->IsGridBySpacing(0) ||
-         !_hyp->IsGridBySpacing(1) ||
-         !_hyp->IsGridBySpacing(2) )
-    {
-      Bnd_Box gridBox;
-      gridBox.Add( gp_Pnt( xCoords[0], yCoords[0], zCoords[0] ));
-      gridBox.Add( gp_Pnt( xCoords.back(), yCoords.back(), zCoords.back() ));
-      double x0,y0,z0, x1,y1,z1;
-      shapeBox.Get(x0,y0,z0, x1,y1,z1);
-      if ( gridBox.IsOut( gp_Pnt( x0,y0,z0 )) ||
-           gridBox.IsOut( gp_Pnt( x1,y1,z1 )))
-        for ( size_t i = 0; i < facesItersectors.size(); ++i )
-        {
-          if ( !facesItersectors[i].IsInGrid( gridBox ))
-            return error("The grid doesn't enclose the geometry");
-#ifdef ELLIPSOLID_WORKAROUND
-          delete facesItersectors[i]._surfaceInt, facesItersectors[i]._surfaceInt = 0;
-#endif
-        }
-    }
+    grid.SetCoordinates( xCoords, yCoords, zCoords, _hyp->GetAxisDirs(), shapeBox );
+
     if ( _computeCanceled ) return false;
 
 #ifdef WITH_TBB
@@ -2001,7 +3459,6 @@ bool StdMeshers_Cartesian_3D::Compute(SMESH_Mesh &         theMesh,
     for ( size_t i = 0; i < facesItersectors.size(); ++i )
       facesItersectors[i].StoreIntersections();
 
-    SMESH_MesherHelper helper( theMesh );
     TopExp_Explorer solidExp (theShape, TopAbs_SOLID);
     helper.SetSubShape( solidExp.Current() );
     helper.SetElementsOnShape( true );
@@ -2015,12 +3472,12 @@ bool StdMeshers_Cartesian_3D::Compute(SMESH_Mesh &         theMesh,
 
     // create volume elements
     Hexahedron hex( _hyp->GetSizeThreshold(), &grid );
-    int nbAdded = hex.MakeElements( helper );
+    int nbAdded = hex.MakeElements( helper, edge2faceIDsMap );
 
     SMESHDS_Mesh* meshDS = theMesh.GetMeshDS();
     if ( nbAdded > 0 )
     {
-      // make all SOLIDS computed
+      // make all SOLIDs computed
       if ( SMESHDS_SubMesh* sm1 = meshDS->MeshElements( solidExp.Current()) )
       {
         SMDS_ElemIteratorPtr volIt = sm1->GetElements();
@@ -2038,23 +3495,28 @@ bool StdMeshers_Cartesian_3D::Compute(SMESH_Mesh &         theMesh,
     // remove free nodes
     if ( SMESHDS_SubMesh * smDS = meshDS->MeshElements( helper.GetSubShapeID() ))
     {
-      // intersection nodes
+      TIDSortedNodeSet nodesToRemove;
+      // get intersection nodes
       for ( int iDir = 0; iDir < 3; ++iDir )
       {
         vector< GridLine >& lines = grid._lines[ iDir ];
         for ( size_t i = 0; i < lines.size(); ++i )
         {
-          multiset< IntersectionPoint >::iterator ip = lines[i]._intPoints.begin();
+          multiset< F_IntersectPoint >::iterator ip = lines[i]._intPoints.begin();
           for ( ; ip != lines[i]._intPoints.end(); ++ip )
             if ( ip->_node && ip->_node->NbInverseElements() == 0 )
-              meshDS->RemoveFreeNode( ip->_node, smDS, /*fromGroups=*/false );
+              nodesToRemove.insert( nodesToRemove.end(), ip->_node );
         }
       }
-      // grid nodes
+      // get grid nodes
       for ( size_t i = 0; i < grid._nodes.size(); ++i )
-        if ( !grid._isBndNode[i] ) // nodes on boundary are already removed
-          if ( grid._nodes[i] && grid._nodes[i]->NbInverseElements() == 0 )
-            meshDS->RemoveFreeNode( grid._nodes[i], smDS, /*fromGroups=*/false );
+        if ( grid._nodes[i] && grid._nodes[i]->NbInverseElements() == 0 )
+          nodesToRemove.insert( nodesToRemove.end(), grid._nodes[i] );
+
+      // do remove
+      TIDSortedNodeSet::iterator n = nodesToRemove.begin();
+      for ( ; n != nodesToRemove.end(); ++n )
+        meshDS->RemoveFreeNode( *n, smDS, /*fromGroups=*/false );
     }
 
     return nbAdded;
index 3d5d47325828d879d18f1b1adb40f60a5c0f18a7..0caab9f1ed811537db76bc9da8beda86f8af7bfb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 30b645a622793de22e636862ba28688f23e51168..1311ca42c0a8ef762c5534be5aea76b20f1429a3 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 458ff946e928be0496250d3d051144773d8c0653..0a27f88f988e24db24ef740ab84fad6338490c2e 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 6de7b8e52dc9a8fc4bd6b31f194efd3e4ca7b46e..5a830c208a46d75158c56663f1ec61f6cf9f3b6e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c76b5497afcb2b86a36a0f1718188dce3c328f4e..f7cd5d32480aa8a08e0ee635ece582e86eef1bac 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index be865e829f37e0148c5cb05233912e4fd28b9bd3..cf8223cd84e0cca35afc4ed0b3cfefca1c51a357 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2f6e6c43f3104d8a973d9330f63fd0f8b4a45929..e52536b2fa1245cfb66d79d3df5d479d002ff99f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index bd94993539ece756f0903a017597835786539205..aa7ebf1f56ab7095aba68ffb4ec0b746de2fe5c7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 630fed8ad7bbe2616e6044a4636edd450c9d0d6d..d5744d2dab1f4454549ce5a9f0614873e746714b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4e5e0478af102aa743419d1065ede20a14e6f9e1..b543928dcabd653c2e7adfda7f4f26fca61b11c5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -251,7 +251,8 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const StdMeshers_FaceSide*  theSide,
  */
 //================================================================================
 
-StdMeshers_FaceSide::StdMeshers_FaceSide(UVPtStructVec& theSideNodes)
+StdMeshers_FaceSide::StdMeshers_FaceSide(UVPtStructVec&     theSideNodes,
+                                         const TopoDS_Face& theFace)
 {
   myEdge.resize( 1 );
   myEdgeID.resize( 1, -1 );
@@ -272,12 +273,42 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(UVPtStructVec& theSideNodes)
   if ( !myPoints.empty() )
   {
     myPoints[0].normParam = 0;
-    gp_Pnt pPrev = SMESH_TNodeXYZ( myPoints[0].node );
-    for ( size_t i = 1; i < myPoints.size(); ++i )
+    if ( myPoints[0].node &&
+         myPoints.back().node &&
+         myPoints[ myNbPonits/2 ].node )
     {
-      gp_Pnt p = SMESH_TNodeXYZ( myPoints[i].node );
-      myLength += ( myPoints[i].normParam = p.Distance( pPrev ));
-      pPrev = p;
+      gp_Pnt pPrev = SMESH_TNodeXYZ( myPoints[0].node );
+      for ( size_t i = 1; i < myPoints.size(); ++i )
+      {
+        gp_Pnt p = SMESH_TNodeXYZ( myPoints[i].node );
+        myLength += p.Distance( pPrev );
+        myPoints[i].normParam = myLength;
+        pPrev = p;
+      }
+    }
+    else if ( !theFace.IsNull() )
+    {
+      TopLoc_Location loc;
+      Handle(Geom_Surface) surf = BRep_Tool::Surface( theFace, loc );
+      gp_Pnt pPrev = surf->Value( myPoints[0].u, myPoints[0].v );
+      for ( size_t i = 1; i < myPoints.size(); ++i )
+      {
+        gp_Pnt p = surf->Value( myPoints[i].u, myPoints[i].v );
+        myLength += p.Distance( pPrev );
+        myPoints[i].normParam = myLength;
+        pPrev = p;
+      }
+    }
+    else
+    {
+      gp_Pnt2d pPrev = myPoints[0].UV();
+      for ( size_t i = 1; i < myPoints.size(); ++i )
+      {
+        gp_Pnt2d p = myPoints[i].UV();
+        myLength += p.Distance( pPrev );
+        myPoints[i].normParam = myLength;
+        pPrev = p;
+      }
     }
     if ( myLength > std::numeric_limits<double>::min() )
       for ( size_t i = 1; i < myPoints.size(); ++i )
@@ -694,6 +725,7 @@ void StdMeshers_FaceSide::Reverse()
   }
   for ( size_t i = 0; i < myEdge.size(); ++i )
   {
+    if ( myEdge[i].IsNull() ) continue; // for a side on points only
     double fp,lp;
     Handle(Geom_Curve) C3d = BRep_Tool::Curve(myEdge[i],fp,lp);
     if ( !C3d.IsNull() )
@@ -926,6 +958,18 @@ gp_Pnt2d StdMeshers_FaceSide::Value2d(double U) const
     return myC2d[ i ]->Value(par);
 
   }
+  else if ( !myPoints.empty() )
+  {
+    int i = U * double( myPoints.size()-1 );
+    while ( i > 0 && myPoints[ i ].normParam > U )
+      --i;
+    while ( i+1 < myPoints.size() && myPoints[ i+1 ].normParam < U )
+      ++i;
+    double r = (( U - myPoints[ i ].normParam ) /
+                ( myPoints[ i+1 ].normParam - myPoints[ i ].normParam ));
+    return ( myPoints[ i   ].UV() * ( 1 - r ) +
+             myPoints[ i+1 ].UV() * r );
+  }
   return myDefaultPnt2d;
 }
 
index 4f714d4bf0c111960747d3f004d4a895d507f2ec..9ef5960fb9ddb0687056fd5f5b50157d939e7250 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -35,6 +35,7 @@
 #include <Geom2d_Curve.hxx>
 #include <GeomAdaptor_Curve.hxx>
 #include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
 #include <TopoDS_Vertex.hxx>
 #include <gp_Pnt2d.hxx>
 
@@ -47,7 +48,6 @@ class SMESH_Mesh;
 class Adaptor2d_Curve2d;
 class Adaptor3d_Curve;
 class BRepAdaptor_CompCurve;
-class TopoDS_Face;
 struct SMESH_ComputeError;
 class StdMeshers_FaceSide;
 
@@ -96,7 +96,43 @@ public:
   /*!
    * \brief Create a side from an UVPtStructVec
    */
-  StdMeshers_FaceSide(UVPtStructVec& theSideNodes);
+  StdMeshers_FaceSide(UVPtStructVec&     theSideNodes,
+                      const TopoDS_Face& theFace = TopoDS_Face());
+
+  // static "consrtuctors"
+  static StdMeshers_FaceSidePtr New(const TopoDS_Face&   Face,
+                                    const TopoDS_Edge&   Edge,
+                                    SMESH_Mesh*          Mesh,
+                                    const bool           IsForward,
+                                    const bool           IgnoreMediumNodes,
+                                    SMESH_ProxyMesh::Ptr ProxyMesh = SMESH_ProxyMesh::Ptr())
+  { return StdMeshers_FaceSidePtr
+      ( new StdMeshers_FaceSide( Face,Edge,Mesh,IsForward,IgnoreMediumNodes,ProxyMesh ));
+  }
+  static StdMeshers_FaceSidePtr New (const TopoDS_Face&      Face,
+                                     std::list<TopoDS_Edge>& Edges,
+                                     SMESH_Mesh*             Mesh,
+                                     const bool              IsForward,
+                                     const bool              IgnoreMediumNodes,
+                                     SMESH_ProxyMesh::Ptr    ProxyMesh = SMESH_ProxyMesh::Ptr())
+  { return StdMeshers_FaceSidePtr
+      ( new StdMeshers_FaceSide( Face,Edges,Mesh,IsForward,IgnoreMediumNodes,ProxyMesh ));
+  }
+  static StdMeshers_FaceSidePtr New (const StdMeshers_FaceSide*  Side,
+                                     const SMDS_MeshNode*        Node,
+                                     const gp_Pnt2d*             Pnt2d1,
+                                     const gp_Pnt2d*             Pnt2d2=NULL,
+                                     const Handle(Geom2d_Curve)& C2d=NULL,
+                                     const double                UFirst=0.,
+                                     const double                ULast=1.)
+  { return StdMeshers_FaceSidePtr
+      ( new StdMeshers_FaceSide( Side,Node,Pnt2d1,Pnt2d2,C2d,UFirst,ULast ));
+  }
+  static StdMeshers_FaceSidePtr New (UVPtStructVec&     theSideNodes,
+                                     const TopoDS_Face& theFace = TopoDS_Face())
+  {
+    return StdMeshers_FaceSidePtr( new StdMeshers_FaceSide( theSideNodes, theFace ));
+  }
 
   /*!
    * \brief Return wires of a face as StdMeshers_FaceSide's
index bcc8855d3900b5ea0de5d9bf35f7156b2756e274..a731f9b2a211a15205b7df465b8224dffa909cd3 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2f74c15a3f1632444af0c7b2404a371d091cfa86..5cbcd4c10cb0b569ef54b9edff1da64514e547ce 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/StdMeshers/StdMeshers_Geometric1D.cxx b/src/StdMeshers/StdMeshers_Geometric1D.cxx
new file mode 100644 (file)
index 0000000..35820dc
--- /dev/null
@@ -0,0 +1,204 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//  SMESH SMESH : implementaion of SMESH idl descriptions
+//  File   : StdMeshers_Geometric1D.cxx
+//  Module : SMESH
+//
+#include "StdMeshers_Geometric1D.hxx"
+
+#include "SMESH_Mesh.hxx"
+
+#include <BRepAdaptor_Curve.hxx>
+#include <GCPnts_AbscissaPoint.hxx>
+#include <SMESH_Algo.hxx>
+#include <TopExp.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
+
+//=============================================================================
+/*!
+ * Constructor
+ */
+//=============================================================================
+
+StdMeshers_Geometric1D::StdMeshers_Geometric1D(int hypId, int studyId, SMESH_Gen * gen)
+  :StdMeshers_Reversible1D(hypId, studyId, gen)
+{
+  _begLength = 1.;
+  _ratio = 1.;
+  _name = "GeometricProgression";
+}
+
+//=============================================================================
+/*!
+ * Sets length of the first segment
+ */
+//=============================================================================
+
+void StdMeshers_Geometric1D::SetStartLength(double length)
+  throw(SALOME_Exception)
+{
+  if ( _begLength != length )
+  {
+    if (length <= 0)
+      throw SALOME_Exception(LOCALIZED("length must be positive"));
+    _begLength = length;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
+//=============================================================================
+/*!
+ * Sets value of Common Ratio
+ */
+//=============================================================================
+
+void StdMeshers_Geometric1D::SetCommonRatio(double factor)
+  throw(SALOME_Exception)
+{
+  if ( _ratio != factor )
+  {
+    if (factor == 0)
+      throw SALOME_Exception(LOCALIZED("Zero factor is not allowed"));
+    _ratio = factor;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
+//=============================================================================
+/*!
+ * Returns length of the first segment 
+ */
+//=============================================================================
+
+double StdMeshers_Geometric1D::GetStartLength() const
+{
+  return _begLength;
+}
+
+//=============================================================================
+/*!
+ * Returns value of Common Ratio
+ */
+//=============================================================================
+
+double StdMeshers_Geometric1D::GetCommonRatio() const
+{
+  return _ratio;
+}
+
+//=============================================================================
+/*!
+ *  
+ */
+//=============================================================================
+
+ostream & StdMeshers_Geometric1D::SaveTo(ostream & save)
+{
+  save << _begLength << " " << _ratio << " ";
+
+  StdMeshers_Reversible1D::SaveTo( save );
+
+  return save;
+}
+
+//=============================================================================
+/*!
+ *  
+ */
+//=============================================================================
+
+istream & StdMeshers_Geometric1D::LoadFrom(istream & load)
+{
+  bool isOK = true;
+  isOK = (load >> _begLength);
+  isOK = (load >> _ratio);
+
+  if (isOK)
+    StdMeshers_Reversible1D::LoadFrom( load );
+
+  return load;
+}
+
+//================================================================================
+/*!
+ * \brief Initialize start and end length by the mesh built on the geometry
+ * \param theMesh - the built mesh
+ * \param theShape - the geometry of interest
+ * \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_Geometric1D::SetParametersByMesh(const SMESH_Mesh*   theMesh,
+                                                 const TopoDS_Shape& theShape)
+{
+  if ( !theMesh || theShape.IsNull() )
+    return false;
+
+  _begLength = _ratio = 0.;
+
+  int nbEdges = 0;
+  TopTools_IndexedMapOfShape edgeMap;
+  TopExp::MapShapes( theShape, TopAbs_EDGE, edgeMap );
+  for ( int i = 1; i <= edgeMap.Extent(); ++i )
+  {
+    const TopoDS_Edge& edge = TopoDS::Edge( edgeMap( i ));
+    BRepAdaptor_Curve C( edge );
+
+    vector< double > params;
+    if ( SMESH_Algo::GetNodeParamOnEdge( theMesh->GetMeshDS(), edge, params ))
+    {
+      nbEdges++;
+      double l1 = GCPnts_AbscissaPoint::Length( C, params[0], params[1] );
+      _begLength += l1;
+      if ( params.size() > 2 && l1 > 1e-100 )
+        _ratio += GCPnts_AbscissaPoint::Length( C, params[1], params[2]) / l1;
+      else
+        _ratio += 1;
+    }
+  }
+  if ( nbEdges ) {
+    _begLength /= nbEdges;
+    _ratio     /= nbEdges;
+  }
+  else {
+    _begLength = 1;
+    _ratio     = 1;
+  }
+  return nbEdges;
+}
+
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by default parameters.
+ *  \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool StdMeshers_Geometric1D::SetParametersByDefaults(const TDefaults&  dflts,
+                                                     const SMESH_Mesh* /*mesh*/)
+{
+  return ( _begLength = dflts._elemLength );
+}
+
diff --git a/src/StdMeshers/StdMeshers_Geometric1D.hxx b/src/StdMeshers/StdMeshers_Geometric1D.hxx
new file mode 100644 (file)
index 0000000..a14edc2
--- /dev/null
@@ -0,0 +1,67 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//  SMESH SMESH : implementaion of SMESH idl descriptions
+//  File   : StdMeshers_Geometric1D.hxx
+//  Module : SMESH
+//
+#ifndef _SMESH_Geometric1D_HXX_
+#define _SMESH_Geometric1D_HXX_
+
+#include "SMESH_StdMeshers.hxx"
+
+#include "StdMeshers_Reversible1D.hxx"
+#include "Utils_SALOME_Exception.hxx"
+
+class STDMESHERS_EXPORT StdMeshers_Geometric1D: public StdMeshers_Reversible1D
+{
+public:
+  StdMeshers_Geometric1D(int hypId, int studyId, SMESH_Gen* gen);
+
+  void SetStartLength(double length) throw(SALOME_Exception);
+  void SetCommonRatio(double factor) throw(SALOME_Exception);
+
+  double GetStartLength() const;
+  double GetCommonRatio() const;
+
+  virtual std::ostream & SaveTo(std::ostream & save);
+  virtual std::istream & LoadFrom(std::istream & load);
+
+  /*!
+   * \brief Initialize start and end length by the mesh built on the geometry
+    * \param theMesh - the built mesh
+    * \param theShape - the geometry of interest
+    * \retval bool - true if parameter values have been successfully defined
+   */
+  virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, 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);
+
+protected:
+  double _begLength, _ratio;
+};
+
+#endif
index e316d297125ae2baf96200f137781cb6d8aa9c06..b4a502da38930b5e93545cd00ce2d625436749c6 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 21ea206243adb2541e646bedc8fb8270bdfe7aac..c6d5dbee20d19c117b43ef2ce58d38259811cbbf 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 949ba6709144546c007b1d6e02a5a90e0830734e..0271fc41ce80197d965c1425b2d1ef587339a42d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -222,8 +222,8 @@ namespace
    * \brief Finds FaceQuadStruct having a side equal to a given one and rearranges
    *  the found FaceQuadStruct::side to have the given side at a Q_BOTTOM place
    */
-  FaceQuadStructPtr getQuadWithBottom( StdMeshers_FaceSide* side,
-                                       FaceQuadStructPtr    quad[ 6 ])
+  FaceQuadStructPtr getQuadWithBottom( StdMeshers_FaceSidePtr side,
+                                       FaceQuadStructPtr      quad[ 6 ])
   {
     FaceQuadStructPtr foundQuad;
     for ( int i = 1; i < 6; ++i )
@@ -231,7 +231,7 @@ namespace
       if ( !quad[i] ) continue;
       for ( unsigned iS = 0; iS < quad[i]->side.size(); ++iS )
       {
-        const StdMeshers_FaceSide* side2 = quad[i]->side[iS];
+        const StdMeshers_FaceSidePtr side2 = quad[i]->side[iS];
         if (( side->FirstVertex().IsSame( side2->FirstVertex() ) ||
               side->FirstVertex().IsSame( side2->LastVertex() ))
             &&
@@ -241,7 +241,7 @@ namespace
         {
           if ( iS != Q_BOTTOM )
           {
-            vector< StdMeshers_FaceSide*> newSides;
+            vector< FaceQuadStruct::Side > newSides;
             for ( unsigned j = iS; j < quad[i]->side.size(); ++j )
               newSides.push_back( quad[i]->side[j] );
             for ( unsigned j = 0; j < iS; ++j )
@@ -287,9 +287,9 @@ namespace
 //=============================================================================
 /*!
  * Generates hexahedron mesh on hexaedron like form using algorithm from
- * "Application de l'interpolation transfinie à la création de maillages
+ * "Application de l'interpolation transfinie � la cr�ation de maillages
  *  C0 ou G1 continus sur des triangles, quadrangles, tetraedres, pentaedres
- *  et hexaedres déformés."
+ *  et hexaedres d�form�s."
  * Alain PERONNET - 8 janvier 1999
  */
 //=============================================================================
@@ -391,7 +391,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh &         aMesh,
   for ( int i = 0; i < 6; ++i )
   {
     const TopoDS_Face& F = aCubeSide[i]._quad->face;
-    StdMeshers_FaceSide* baseQuadSide = aCubeSide[i]._quad->side[ Q_BOTTOM ];
+    StdMeshers_FaceSidePtr baseQuadSide = aCubeSide[i]._quad->side[ Q_BOTTOM ];
     list<TopoDS_Edge> baseEdges( baseQuadSide->Edges().begin(), baseQuadSide->Edges().end() );
 
     // assure correctness of node positions on baseE:
@@ -741,6 +741,39 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper
   return error( algo->GetComputeError());
 }
 
+//================================================================================
+/*!
+ * \brief Return true if the algorithm can mesh this shape
+ *  \param [in] aShape - shape to check
+ *  \param [in] toCheckAll - if true, this check returns OK if all shapes are OK,
+ *              else, returns OK if at least one shape is OK
+ */
+//================================================================================
+
+bool StdMeshers_Hexa_3D::IsApplicable( const TopoDS_Shape & aShape, bool toCheckAll )
+{
+  TopExp_Explorer exp0( aShape, TopAbs_SOLID );
+  if ( !exp0.More() ) return false;
+
+  for ( ; exp0.More(); exp0.Next() )
+  {
+    int nbFoundShells = 0;
+    TopExp_Explorer exp1( exp0.Current(), TopAbs_SHELL );
+    for ( ; exp1.More(); exp1.Next(), ++nbFoundShells)
+      if ( nbFoundShells == 2 ) break;
+    if ( nbFoundShells != 1 ) {
+      if ( toCheckAll ) return false;
+      continue;
+    }   
+    exp1.Init( exp0.Current(), TopAbs_FACE );
+    int nbEdges = SMESH_MesherHelper::Count( exp1.Current(), TopAbs_EDGE, /*ignoreSame=*/true );
+    bool ok = ( nbEdges > 3 );
+    if ( toCheckAll && !ok ) return false;
+    if ( !toCheckAll && ok ) return true;
+  }
+  return toCheckAll;
+};
+
 //=======================================================================
 //function : ComputePentahedralMesh
 //purpose  : 
index 8be85aafe84805b3468c3b17701efaa6f467da0f..7c64bd497ea41bfe2ab47e0271edd3edf880141f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -54,6 +54,7 @@ public:
   virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
                         MapShapeNbElems& aResMap);
 
+  static bool IsApplicable(const TopoDS_Shape & aShape, bool toCheckAll);
 protected:
 
   const StdMeshers_ViscousLayers* _viscousLayersHyp;
index 4bcebe2fa4037e4907817cb2fc39b277d6fde240..aea04659506f929498b36809838e4442662737fc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2066dff4b50b8ca8e24ebd4984957b1fb89fb9f9..78facb160ad419719cdaed8d826e0af72b0bb0f0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a75c2f5cc472c9e62287e0df4252e94c5b2d1c29..ee9fe4ef1032964c27bb5edec130bb6795b04a36 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2b2ceabfdc14f624801fb8336a8ab9b6eb220543..b45fe5f501280744ba5ae4267949fc1565a075c1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4b54fa774c58e82d8ab8ab9e5b8a01df35c899f3..6aff7c2078072f33b097a32f716a5e43b500b2fe 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e40a0b2ff13246c631d8c2276d826352e8ebf152..e008b99d46dd8f398ab7431449b2f6a965f54e90 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4748230bc6fbad11c9d11054782734e2995ebcdc..6b7b972da1100d124501a5b23fc4d07433ab2bbd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a6a7737b028ce106c80c79e3f248deeb690693a2..25823ecbbc67b317ce1f0e1abc38fc57a00cf70b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 42287a26618fba5b06625e745f4aebb0776933bd..815768e4fa88832cb51d40344893ce8b1cc9b5a5 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c645c5f40cf9c3406f86cf5ce7486842fcc6e80b..a17fe0627141aa995e56ec55a17551ba1c329364 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 38d4de8fbff47e87471099132aef5603e78ea7ef..48bc31a8e6c5c14713ee8374fc27546886dcde5a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f896ed6b890f1a4bf95eea735b8a3e646ea0b684..fb9bf49de4bc79e96a20d1c1d3d8d404d5205ce8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 89a5dd8c73d4027df7577fcf74584bc9d576f5a2..6546c4492327b14b87930083fab74ba612eed91a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 6febdeedb2f8dcf6395199813a9f95ef9c05e474..5d3895d9e9733562c529d096cbe3227d900551c4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 6f9499cd3bf4e1cd39f7b0f637190750c73ccf4d..75db563136dd7a0ab154bcb6785bd8771646fc61 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 34eed0587db558e6560b6e1a5e246a41376f2c66..c7b51380501940da15bd89ec5566ea7b5c4409a7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f75f1970e4877c7e84e5b47a2b002e9ccac90d22..0b027ad45db75d03f7233b868b6dfca659e2a482 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 06fdebd4bea16b5b7bfe29d5f12ea651c8afe086..4864643e9554a978b0e8849f4256d9205a47ce85 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 0f24ceabfff81344b79c9268a357cf49cb07e151..2b3fd114cfbf1370790320c46dc28e61a4a59ea9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b0603bbaabd06299e5ce0de83508728155a89d39..9b1ef03b904f3d6f52b634922b5488ee91baac13 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 72c701ff7cb5fd44550a1cd53cba3821a6ecc6ba..661b3e6038cd7bd414c304b4d39748a14deeb3ab 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f0c5b4069ab0ddf0a6d8de1fefff9248f4fa9ecd..48b2fe5a005d36a740458e0b7a9eebb07a67eaeb 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 0b169e8d0184a9f7385ad54e842997572ea96ac5..e88b93fc9551568d537f0e99c79d734a6073063a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 06d7badbb118ff94b3029acea6dc948a161f6414..7d79bedf8194fd17a124bb577a788e3b6dd97776 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c19e2162098d5a7f878702c68abdeff8128894f7..ad7cfbfe2decbbc2b341e10e9324818f27bfbc0f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 16fc304958b4e3a6bcb5bcc0a611b82e99aa2d6b..2e6365b5b43559f6b42ba27fd25424e16dcc0450 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 61c6c76d2ac864254d062aadc73f0048f6081842..66f5690f797e6688c7cc6c5122fd30dc591ecadd 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index de871030578c23c2e21c0858335e8996c8ebb62f..daad9b2fd620618822e9a8287162b59071f144cd 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5f230274fede6d3e0a008c545a977ce21837ec73..f09dc7a10d1cf66ef59c211e80a592008b697b2d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ae7c9dd47e5079ff3bb59b2304b9ab8e1c7069a7..6857cffb33cd1893445a659351993b13c03b3418 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3db3f2dd9e9a53ce62d9d9aece172c3c958a6957..2038c10f775e6eb8548065cc9910fb6d7b46b047 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 43a599bd2223e10325c6b0420d2482cc9e30627e..ef09f3a35743f29d44024b801f6b3cca262915ee 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 07e9a166d838772b7633130ec1f1613038a434ed..c43a126c3e2823188a2992bec17ac34dbfbf1e8a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -107,7 +107,7 @@ namespace {
            algo->myProxyMesh->GetMesh() != helper->GetMesh() )
         algo->myProxyMesh.reset( new SMESH_ProxyMesh( *helper->GetMesh() ));
 
-      algo->myQuadStruct.reset();
+      algo->myQuadList.clear();
 
       if ( helper )
         algo->_quadraticMesh = helper->GetIsQuadratic();
@@ -166,15 +166,15 @@ namespace {
   //================================================================================
 
   bool setBottomEdge( const TopoDS_Edge&   botE,
-                      faceQuadStruct::Ptr& quad,
+                      FaceQuadStruct::Ptr& quad,
                       const TopoDS_Shape&  face)
   {
-    quad->side[ QUAD_TOP_SIDE  ]->Reverse();
-    quad->side[ QUAD_LEFT_SIDE ]->Reverse();
+    quad->side[ QUAD_TOP_SIDE  ].grid->Reverse();
+    quad->side[ QUAD_LEFT_SIDE ].grid->Reverse();
     int edgeIndex = 0;
     for ( size_t i = 0; i < quad->side.size(); ++i )
     {
-      StdMeshers_FaceSide* quadSide = quad->side[i];
+      StdMeshers_FaceSidePtr quadSide = quad->side[i];
       for ( int iE = 0; iE < quadSide->NbEdges(); ++iE )
         if ( botE.IsSame( quadSide->Edge( iE )))
         {
@@ -681,7 +681,7 @@ bool StdMeshers_Prism_3D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theSh
               continue; // already computed prism
             }
             // find a source FACE of the SOLID: it's a FACE sharing a bottom EDGE with wFace
-            const TopoDS_Edge& wEdge = (*wQuad)->side[ QUAD_TOP_SIDE ]->Edge(0);
+            const TopoDS_Edge& wEdge = (*wQuad)->side[ QUAD_TOP_SIDE ].grid->Edge(0);
             PShapeIteratorPtr faceIt = myHelper->GetAncestors( wEdge, *myHelper->GetMesh(),
                                                                TopAbs_FACE);
             while ( const TopoDS_Shape* f = faceIt->next() )
@@ -879,7 +879,7 @@ bool StdMeshers_Prism_3D::getWallFaces( Prism_3D::TPrismTopo & thePrism,
     int nbKnownFaces;
     do {
       nbKnownFaces = faceMap.Extent();
-      StdMeshers_FaceSide *rightSide, *topSide; // sides of the quad
+      StdMeshers_FaceSidePtr rightSide, topSide; // sides of the quad
       for ( size_t i = 0; i < thePrism.myWallQuads.size(); ++i )
       {
         rightSide = thePrism.myWallQuads[i].back()->side[ QUAD_RIGHT_SIDE ];
@@ -911,8 +911,8 @@ bool StdMeshers_Prism_3D::getWallFaces( Prism_3D::TPrismTopo & thePrism,
     {
       for ( size_t i = 0; i < thePrism.myWallQuads.size(); ++i )
       {
-        StdMeshers_FaceSide* topSide = thePrism.myWallQuads[i].back()->side[ QUAD_TOP_SIDE ];
-        const TopoDS_Edge &     topE = topSide->Edge( 0 );
+        StdMeshers_FaceSidePtr topSide = thePrism.myWallQuads[i].back()->side[ QUAD_TOP_SIDE ];
+        const TopoDS_Edge &       topE = topSide->Edge( 0 );
         if ( topSide->NbEdges() > 1 )
           return toSM( error(COMPERR_BAD_SHAPE, TCom("Side face #") <<
                              shapeID( thePrism.myWallQuads[i].back()->face )
@@ -958,8 +958,8 @@ bool StdMeshers_Prism_3D::getWallFaces( Prism_3D::TPrismTopo & thePrism,
   // Check that the top FACE shares all the top EDGEs
   for ( size_t i = 0; i < thePrism.myWallQuads.size(); ++i )
   {
-    StdMeshers_FaceSide* topSide = thePrism.myWallQuads[i].back()->side[ QUAD_TOP_SIDE ];
-    const TopoDS_Edge &     topE = topSide->Edge( 0 );
+    StdMeshers_FaceSidePtr topSide = thePrism.myWallQuads[i].back()->side[ QUAD_TOP_SIDE ];
+    const TopoDS_Edge &       topE = topSide->Edge( 0 );
     if ( !myHelper->IsSubShape( topE, thePrism.myTop ))
       return toSM( error( TCom("Wrong source face (#") << shapeID( thePrism.myBottom )));
   }
@@ -1205,7 +1205,7 @@ bool StdMeshers_Prism_3D::computeWalls(const Prism_3D::TPrismTopo& thePrism)
     int wgt = 0; // "weight"
     for ( ; quad != thePrism.myWallQuads[iW].end(); ++quad )
     {
-      StdMeshers_FaceSide* lftSide = (*quad)->side[ QUAD_LEFT_SIDE ];
+      StdMeshers_FaceSidePtr lftSide = (*quad)->side[ QUAD_LEFT_SIDE ];
       for ( int i = 0; i < lftSide->NbEdges(); ++i )
       {
         ++wgt;
@@ -1224,7 +1224,7 @@ bool StdMeshers_Prism_3D::computeWalls(const Prism_3D::TPrismTopo& thePrism)
       quad = thePrism.myWallQuads[iW].begin();
       for ( ; quad != thePrism.myWallQuads[iW].end(); ++quad )
         for ( int i = 0; i < NB_QUAD_SIDES; ++i )
-          (*quad)->side[ i ]->SetIgnoreMediumNodes( true );
+          (*quad)->side[ i ].grid->SetIgnoreMediumNodes( true );
     }
   }
 
@@ -1237,8 +1237,8 @@ bool StdMeshers_Prism_3D::computeWalls(const Prism_3D::TPrismTopo& thePrism)
     Prism_3D::TQuadList::const_iterator quad = quads.begin();
     for ( ; quad != quads.end(); ++quad )
     {
-      StdMeshers_FaceSide* rgtSide = (*quad)->side[ QUAD_RIGHT_SIDE ]; // tgt
-      StdMeshers_FaceSide* lftSide = (*quad)->side[ QUAD_LEFT_SIDE ];  // src
+      StdMeshers_FaceSidePtr rgtSide = (*quad)->side[ QUAD_RIGHT_SIDE ]; // tgt
+      StdMeshers_FaceSidePtr lftSide = (*quad)->side[ QUAD_LEFT_SIDE ];  // src
       bool swapLeftRight = ( lftSide->NbSegments( /*update=*/true ) == 0 &&
                              rgtSide->NbSegments( /*update=*/true )  > 0 );
       if ( swapLeftRight )
@@ -1373,8 +1373,8 @@ bool StdMeshers_Prism_3D::computeWalls(const Prism_3D::TPrismTopo& thePrism)
       // to compute stuctured quad mesh on wall FACEs
       // ---------------------------------------------------
       {
-        const TopoDS_Edge& botE = (*quad)->side[ QUAD_BOTTOM_SIDE ]->Edge(0);
-        const TopoDS_Edge& topE = (*quad)->side[ QUAD_TOP_SIDE    ]->Edge(0);
+        const TopoDS_Edge& botE = (*quad)->side[ QUAD_BOTTOM_SIDE ].grid->Edge(0);
+        const TopoDS_Edge& topE = (*quad)->side[ QUAD_TOP_SIDE    ].grid->Edge(0);
         SMESH_subMesh*    botSM = mesh->GetSubMesh( botE );
         SMESH_subMesh*    topSM = mesh->GetSubMesh( topE );
         SMESH_subMesh*    srcSM = botSM;
@@ -2037,6 +2037,341 @@ int StdMeshers_Prism_3D::shapeID( const TopoDS_Shape& S )
   return myHelper->GetMeshDS()->ShapeToIndex( S );
 }
 
+namespace // utils used by StdMeshers_Prism_3D::IsApplicable()
+{
+  struct EdgeWithNeighbors
+  {
+    TopoDS_Edge _edge;
+    int         _iL, _iR;
+    EdgeWithNeighbors(const TopoDS_Edge& E, int iE, int nbE, int shift = 0 ):
+      _edge( E ),
+      _iL( SMESH_MesherHelper::WrapIndex( iE-1, nbE ) + shift ),
+      _iR( SMESH_MesherHelper::WrapIndex( iE+1, nbE ) + shift )
+    {
+    }
+    EdgeWithNeighbors() {}
+  };
+  struct PrismSide
+  {
+    TopoDS_Face                 _face;
+    TopTools_IndexedMapOfShape *_faces; // pointer because its copy constructor is private
+    TopoDS_Edge                 _topEdge;
+    vector< EdgeWithNeighbors >*_edges;
+    int                         _iBotEdge;
+    vector< bool >              _isCheckedEdge;
+    int                         _nbCheckedEdges; // nb of EDGEs whose location is defined
+    PrismSide                  *_leftSide;
+    PrismSide                  *_rightSide;
+    const TopoDS_Edge& Edge( int i ) const
+    {
+      return (*_edges)[ i ]._edge;
+    }
+    int FindEdge( const TopoDS_Edge& E ) const
+    {
+      for ( size_t i = 0; i < _edges->size(); ++i )
+        if ( E.IsSame( Edge( i ))) return i;
+      return -1;
+    }
+  };
+  //--------------------------------------------------------------------------------
+  /*!
+   * \brief Return ordered edges of a face
+   */
+  bool getEdges( const TopoDS_Face&            face,
+                 vector< EdgeWithNeighbors > & edges,
+                 const bool                    noHolesAllowed)
+  {
+    list< TopoDS_Edge > ee;
+    list< int >         nbEdgesInWires;
+    int nbW = SMESH_Block::GetOrderedEdges( face, ee, nbEdgesInWires );
+    if ( nbW > 1 && noHolesAllowed )
+      return false;
+
+    int iE, nbTot = 0;
+    list< TopoDS_Edge >::iterator e = ee.begin();
+    list< int >::iterator       nbE = nbEdgesInWires.begin();
+    for ( ; nbE != nbEdgesInWires.end(); ++nbE )
+      for ( iE = 0; iE < *nbE; ++e, ++iE )
+        if ( SMESH_Algo::isDegenerated( *e ))
+        {
+          ee.erase( e );
+          --(*nbE);
+          --iE;
+        }
+        else
+        {
+          e->Orientation( TopAbs_FORWARD ); // for operator==() to work
+        }
+
+    edges.clear();
+    e = ee.begin();
+    for ( nbE = nbEdgesInWires.begin(); nbE != nbEdgesInWires.end(); ++nbE )
+    {
+      for ( iE = 0; iE < *nbE; ++e, ++iE )
+        edges.push_back( EdgeWithNeighbors( *e, iE, *nbE, nbTot ));
+      nbTot += *nbE;
+    }
+    return edges.size();
+  }
+  //--------------------------------------------------------------------------------
+  /*!
+   * \brief Return another faces sharing an edge
+   */
+  const TopoDS_Shape & getAnotherFace( const TopoDS_Face& face,
+                                       const TopoDS_Edge& edge,
+                                       TopTools_IndexedDataMapOfShapeListOfShape& facesOfEdge)
+  {
+    TopTools_ListIteratorOfListOfShape faceIt( facesOfEdge.FindFromKey( edge ));
+    for ( ; faceIt.More(); faceIt.Next() )
+      if ( !face.IsSame( faceIt.Value() ))
+        return faceIt.Value();
+    return face;
+  }
+}
+
+//================================================================================
+/*!
+ * \brief Return true if the algorithm can mesh this shape
+ *  \param [in] aShape - shape to check
+ *  \param [in] toCheckAll - if true, this check returns OK if all shapes are OK,
+ *              else, returns OK if at least one shape is OK
+ */
+//================================================================================
+
+bool StdMeshers_Prism_3D::IsApplicable(const TopoDS_Shape & shape, bool toCheckAll)
+{
+  TopExp_Explorer sExp( shape, TopAbs_SOLID );
+  if ( !sExp.More() )
+    return false;
+
+  for ( ; sExp.More(); sExp.Next() )
+  {
+    // check nb shells
+    TopoDS_Shape shell;
+    TopExp_Explorer shExp( sExp.Current(), TopAbs_SHELL );
+    if ( shExp.More() ) {
+      shell = shExp.Current();
+      shExp.Next();
+      if ( shExp.More() )
+        shell.Nullify();
+    }
+    if ( shell.IsNull() ) {
+      if ( toCheckAll ) return false;
+      continue;
+    }
+    // get all faces
+    TopTools_IndexedMapOfShape allFaces;
+    TopExp::MapShapes( shell, TopAbs_FACE, allFaces );
+    if ( allFaces.Extent() < 3 ) {
+      if ( toCheckAll ) return false;
+      continue;
+    }
+    // is a box?
+    if ( allFaces.Extent() == 6 )
+    {
+      TopTools_IndexedMapOfOrientedShape map;
+      bool isBox = SMESH_Block::FindBlockShapes( TopoDS::Shell( shell ),
+                                                 TopoDS_Vertex(), TopoDS_Vertex(), map );
+      if ( isBox ) {
+        if ( !toCheckAll ) return true;
+        continue;
+      }
+    }
+#ifdef _DEBUG_
+    TopTools_IndexedMapOfShape allShapes;
+    TopExp::MapShapes( shape, allShapes );
+#endif
+
+    TopTools_IndexedDataMapOfShapeListOfShape facesOfEdge;
+    TopTools_ListIteratorOfListOfShape faceIt;
+    TopExp::MapShapesAndAncestors( sExp.Current(), TopAbs_EDGE, TopAbs_FACE , facesOfEdge );
+    if ( facesOfEdge.IsEmpty() ) {
+      if ( toCheckAll ) return false;
+      continue;
+    }
+
+    typedef vector< EdgeWithNeighbors > TEdgeWithNeighborsVec;
+    vector< TEdgeWithNeighborsVec > faceEdgesVec( allFaces.Extent() + 1 );
+    TopTools_IndexedMapOfShape* facesOfSide = new TopTools_IndexedMapOfShape[ faceEdgesVec.size() ];
+    SMESHUtils::ArrayDeleter<TopTools_IndexedMapOfShape> delFacesOfSide( facesOfSide );
+
+    // try to use each face as a bottom one
+    bool prismDetected = false;
+    for ( int iF = 1; iF < allFaces.Extent() && !prismDetected; ++iF )
+    {
+      const TopoDS_Face& botF = TopoDS::Face( allFaces( iF ));
+
+      TEdgeWithNeighborsVec& botEdges = faceEdgesVec[ iF ];
+      if ( botEdges.empty() )
+      {
+        if ( !getEdges( botF, botEdges, /*noHoles=*/false ))
+          break;
+        if ( allFaces.Extent()-1 <= (int) botEdges.size() )
+          continue; // all faces are adjacent to botF - no top FACE
+      }
+      // init data of side FACEs
+      vector< PrismSide > sides( botEdges.size() );
+      for ( int iS = 0; iS < botEdges.size(); ++iS )
+      {
+        sides[ iS ]._topEdge = botEdges[ iS ]._edge;
+        sides[ iS ]._face    = botF;
+        sides[ iS ]._leftSide  = & sides[ botEdges[ iS ]._iR ];
+        sides[ iS ]._rightSide = & sides[ botEdges[ iS ]._iL ];
+        sides[ iS ]._faces = & facesOfSide[ iS ];
+        sides[ iS ]._faces->Clear();
+      }
+
+      bool isOK = true; // ok for a current botF
+      bool isAdvanced = true;
+      int nbFoundSideFaces = 0;
+      for ( int iLoop = 0; isOK && isAdvanced; ++iLoop )
+      {
+        isAdvanced = false;
+        for ( size_t iS = 0; iS < sides.size() && isOK; ++iS )
+        {
+          PrismSide& side = sides[ iS ];
+          if ( side._face.IsNull() )
+            continue;
+          if ( side._topEdge.IsNull() )
+          {
+            // find vertical EDGEs --- EGDEs shared with neighbor side FACEs
+            for ( int is2nd = 0; is2nd < 2 && isOK; ++is2nd ) // 2 adjacent neighbors
+            {
+              int di = is2nd ? 1 : -1;
+              const PrismSide* adjSide = is2nd ? side._rightSide : side._leftSide;
+              for ( size_t i = 1; i < side._edges->size(); ++i )
+              {
+                int iE = SMESH_MesherHelper::WrapIndex( i*di + side._iBotEdge, side._edges->size());
+                if ( side._isCheckedEdge[ iE ] ) continue;
+                const TopoDS_Edge&      vertE = side.Edge( iE );
+                const TopoDS_Shape& neighborF = getAnotherFace( side._face, vertE, facesOfEdge );
+                bool isEdgeShared = adjSide->_faces->Contains( neighborF );
+                if ( isEdgeShared )
+                {
+                  isAdvanced = true;
+                  side._isCheckedEdge[ iE ] = true;
+                  side._nbCheckedEdges++;
+                  int nbNotCheckedE = side._edges->size() - side._nbCheckedEdges;
+                  if ( nbNotCheckedE == 1 )
+                    break;
+                }
+                else
+                {
+                  if ( i == 1 && iLoop == 0 ) isOK = false;
+                  break;
+                }
+              }
+            }
+            // find a top EDGE
+            int nbNotCheckedE = side._edges->size() - side._nbCheckedEdges;
+            if ( nbNotCheckedE == 1 )
+            {
+              vector<bool>::iterator ii = std::find( side._isCheckedEdge.begin(),
+                                                     side._isCheckedEdge.end(), false );
+              if ( ii != side._isCheckedEdge.end() )
+              {
+                size_t iE = std::distance( side._isCheckedEdge.begin(), ii );
+                side._topEdge = side.Edge( iE );
+              }
+            }
+            isOK = ( nbNotCheckedE >= 1 );
+          }
+          else //if ( !side._topEdge.IsNull() )
+          {
+            // get a next face of a side
+            const TopoDS_Shape& f = getAnotherFace( side._face, side._topEdge, facesOfEdge );
+            side._faces->Add( f );
+            bool stop = false;
+            if ( f.IsSame( side._face ) || // _topEdge is a seam
+                 SMESH_MesherHelper::Count( f, TopAbs_WIRE, false ) != 1 )
+            {
+              stop = true;
+            }
+            else if ( side._leftSide != & side ) // not closed side face
+            {
+              if ( side._leftSide->_faces->Contains( f ))
+              {
+                stop = true;
+                side._leftSide->_face.Nullify();
+                side._leftSide->_topEdge.Nullify();
+              }
+              if ( side._rightSide->_faces->Contains( f ))
+              {
+                stop = true;
+                side._rightSide->_face.Nullify();
+                side._rightSide->_topEdge.Nullify();
+              }
+            }
+            if ( stop )
+            {
+              side._face.Nullify();
+              side._topEdge.Nullify();
+              continue;
+            }
+            side._face = TopoDS::Face( f );
+            int faceID = allFaces.FindIndex( side._face );
+            side._edges = & faceEdgesVec[ faceID ];
+            if ( side._edges->empty() )
+              if ( !getEdges( side._face, * side._edges, /*noHoles=*/true ))
+                break;
+            const int nbE = side._edges->size();
+            if ( nbE >= 4 )
+            {
+              isAdvanced = true;
+              ++nbFoundSideFaces;
+              side._iBotEdge = side.FindEdge( side._topEdge );
+              side._isCheckedEdge.clear();
+              side._isCheckedEdge.resize( nbE, false );
+              side._isCheckedEdge[ side._iBotEdge ] = true;
+              side._nbCheckedEdges = 1; // bottom EDGE is known
+            }
+            side._topEdge.Nullify();
+            isOK = ( !side._edges->empty() || side._faces->Extent() > 1 );
+
+          } //if ( !side._topEdge.IsNull() )
+
+        } // loop on prism sides
+
+        if ( nbFoundSideFaces > allFaces.Extent() )
+        {
+          isOK = false;
+        }
+        if ( iLoop > allFaces.Extent() * 10 )
+        {
+          isOK = false;
+#ifdef _DEBUG_
+          cerr << "BUG: infinite loop in StdMeshers_Prism_3D::IsApplicable()" << endl;
+#endif
+        }
+      } // while isAdvanced
+
+      if ( isOK && sides[0]._faces->Extent() > 1 )
+      {
+        const int nbFaces = sides[0]._faces->Extent();
+        if ( botEdges.size() == 1 ) // cylinder
+        {
+          prismDetected = ( nbFaces == allFaces.Extent()-1 );
+        }
+        else
+        {
+          const TopoDS_Shape& topFace = sides[0]._faces->FindKey( nbFaces );
+          size_t iS;
+          for ( iS = 1; iS < sides.size(); ++iS )
+            if ( !sides[ iS ]._faces->Contains( topFace ))
+              break;
+          prismDetected = ( iS == sides.size() );
+        }
+      }
+    } // loop on allFaces
+
+    if ( !prismDetected && toCheckAll ) return false;
+    if ( prismDetected && !toCheckAll ) return true;
+
+  } // loop on solids
+
+  return toCheckAll;
+}
+
 namespace Prism_3D
 {
   //================================================================================
@@ -2352,7 +2687,7 @@ bool StdMeshers_PrismAsBlock::Init(SMESH_MesherHelper*         helper,
     Prism_3D::TQuadList::const_iterator quad = thePrism.myWallQuads[ iE ].begin();
     for ( ; quad != thePrism.myWallQuads[ iE ].end(); ++quad )
     {
-      const TopoDS_Edge& quadBot = (*quad)->side[ QUAD_BOTTOM_SIDE ]->Edge( 0 );
+      const TopoDS_Edge& quadBot = (*quad)->side[ QUAD_BOTTOM_SIDE ].grid->Edge( 0 );
       if ( !myHelper->LoadNodeColumns( faceColumns, (*quad)->face, quadBot, meshDS ))
         return error(COMPERR_BAD_INPUT_MESH, TCom("Can't find regular quadrangle mesh ")
                      << "on a side face #" << MeshDS()->ShapeToIndex( (*quad)->face ));
@@ -2373,7 +2708,7 @@ bool StdMeshers_PrismAsBlock::Init(SMESH_MesherHelper*         helper,
     Prism_3D::TQuadList::const_iterator quad = thePrism.myWallQuads[ iE ].begin();
     for ( ; quad != thePrism.myWallQuads[ iE ].end(); ++quad )
     {
-      const TopoDS_Edge& quadBot = (*quad)->side[ QUAD_BOTTOM_SIDE ]->Edge( 0 );
+      const TopoDS_Edge& quadBot = (*quad)->side[ QUAD_BOTTOM_SIDE ].grid->Edge( 0 );
       if ( !myHelper->LoadNodeColumns( faceColumns, (*quad)->face, quadBot, meshDS ))
         return error(COMPERR_BAD_INPUT_MESH, TCom("Can't find regular quadrangle mesh ")
                      << "on a side face #" << MeshDS()->ShapeToIndex( (*quad)->face ));
@@ -3592,6 +3927,8 @@ TPCurveOnHorFaceAdaptor::TPCurveOnHorFaceAdaptor( const TSideFace*   sideFace,
     const int Z = isTop ? sideFace->ColumnHeight() - 1 : 0;
     map<double, const SMDS_MeshNode* > u2nodes;
     sideFace->GetNodesAtZ( Z, u2nodes );
+    if ( u2nodes.empty() )
+      return;
 
     SMESH_MesherHelper helper( *sideFace->GetMesh() );
     helper.SetSubShape( horFace );
@@ -3656,7 +3993,7 @@ gp_Pnt2d StdMeshers_PrismAsBlock::TPCurveOnHorFaceAdaptor::Value(const Standard_
   map< double, gp_XY >::const_iterator i1 = myUVmap.upper_bound( U );
 
   if ( i1 == myUVmap.end() )
-    return myUVmap.rbegin()->second;
+    return myUVmap.empty() ? gp_XY(0,0) : myUVmap.rbegin()->second;
 
   if ( i1 == myUVmap.begin() )
     return (*i1).second;
index 9fcfd2585aa9e94585f9dc0bec26086cff79f041..3a4f61f4dcd49d4bd2e4294be4db7d8f43a841ba 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -432,9 +432,11 @@ public:
     * \param helper - helper initialized by mesh and shape to add prisms to
    */
   static void AddPrisms( std::vector<const TNodeColumn*> & nodeColumns,
-                         SMESH_MesherHelper*          helper);
+                         SMESH_MesherHelper*               helper);
 
-private:
+  static bool IsApplicable(const TopoDS_Shape & aShape, bool toCheckAll);
+
+ private:
 
   /*!
    * \brief Analyse shape geometry and mesh.
index d9f0d746cb0b3223a9a30d235f995ce75d3604bc..8dd29e4c8a261c48858acdb20c67c88fefa72feb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4845f3c7dd6a4b190f8bd03d0157ced9ae2e6d37..3cbf55c8cc4a19840be24d36d004b57e8a28c559 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1cd3ca0411b2f89f045bce2a422799b244c8d57e..5034d7920398715666406c283a1145c55e57f9e6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 967c57d28c4a44af368c7d75a74b435a86fcf096..892730e4402bb272fc9a95ef850cb79fb5fe8439 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c52e472105b3026f719d4b4cd7c6b20ca1007a6f..efa55b390a1b629bf8ce818902844f134ed6772f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 64980c91944ee1cbf6ea6fcb8a697e694fc859b4..abaa2df892e20f80bee6cb34be64a8873f17b4e3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 262c92507de9fe45e8bbda35bb757ed810f62d64..730f78c62c4c628caa715a63c0ff3bc82f7a5c05 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 55dd1a68e1b0e1f0f44b0c146cd02f7a1a6a3239..9709cd6c86c53c3214a11345f6f6c4630228cdb2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4d9fad9190d0522fdbbcf77a7ee2d4cdb86af48e..10da51638ee6219e584d9de170871a2418e6bdda 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 73f3f35e6c4baaba35bf5a046a5819d086a950a9..b76450ef401ee06b95930611b1cf8987f1841274 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 517eddf9e1bcaacceec7d06b72cab35a8341458c..63fc73dc9ae518f145fa3b2b6bd9d39e891a47c7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e5ae80b6d4b0482ec402843cc29810793f1ef70a..a8a20f405adbe1788bf86c485faff73f0b507eb4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 6bb6adc1fa94d0693d7d55fbf7bf1679d003fc12..c4bbc0c6825a62e7c7cd539df111cb3cbc32d800 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1018,9 +1018,9 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
       map< double, const SMDS_MeshNode* >::iterator u_oldNode, u_newNode, u_newOnSeam, newEnd;
       set< const SMDS_MeshNode* > seamNodes;
 
-      // mapper puts on a seam edge nodes from 2 edges
+      // mapper changed, no more "mapper puts on a seam edge nodes from 2 edges"
       if ( isSeam && ! getBoundaryNodes ( sm, tgtFace, u2nodesOnSeam, seamNodes ))
-        RETURN_BAD_RESULT("getBoundaryNodes() failed");
+        ;//RETURN_BAD_RESULT("getBoundaryNodes() failed");
 
       SMDS_NodeIteratorPtr nIt = smDS->GetNodes();
       while ( nIt->more() )
index f46b48d47c86cb8a10477d40cca8c6bfe3cd96e7..57e34dbc4d46f20599d30c56178008c1439612ed 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 767acddbb201173732e83a8a63ec1a1d8e332d3b..3079c7bd86a70d4a5f05a9c3274fc6db2418603b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 14595442e0e88117192d5aaa6b69abba00c68d30..363a38e93e4e34dfaa1ddde1a59d611eaa7746b4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index bfe999db9ecd4c4204b36863b7f464100838e1ee..730bc5a52e11d78fe6ddae8575aa3e35673ce270 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -64,7 +64,8 @@ namespace {
     /*!
      * \brief Return an edge from which hypotheses are propagated from
      */
-    static TopoDS_Edge GetSource(SMESH_subMesh * submesh);
+    static TopoDS_Edge GetSource(SMESH_subMesh * submesh,
+                                 bool&           isPropagOfDistribution);
     /*!
      * \brief Does it's main job
      */
@@ -90,23 +91,28 @@ StdMeshers_Propagation::StdMeshers_Propagation (int hypId, int studyId, SMESH_Ge
   _name = GetName();
   _param_algo_dim = -1; // 1D auxiliary
 }
+StdMeshers_PropagOfDistribution::StdMeshers_PropagOfDistribution (int hypId,
+                                                                  int studyId,
+                                                                  SMESH_Gen * gen)
+  : StdMeshers_Propagation(hypId, studyId, gen)                        { _name = GetName(); }
 StdMeshers_Propagation::~StdMeshers_Propagation()                      {}
 string StdMeshers_Propagation::GetName ()                              { return "Propagation"; }
+string StdMeshers_PropagOfDistribution::GetName ()                     { return "PropagOfDistribution"; }
 ostream & StdMeshers_Propagation::SaveTo (ostream & save)              { return save; }
 istream & StdMeshers_Propagation::LoadFrom (istream & load)            { return load; }
-ostream & operator << (ostream & save, StdMeshers_Propagation & hyp)   { return hyp.SaveTo(save); }
-istream & operator >> (istream & load, StdMeshers_Propagation & hyp)   { return hyp.LoadFrom(load); }
 bool StdMeshers_Propagation::SetParametersByMesh(const SMESH_Mesh*,
                                                  const TopoDS_Shape& ) { return false; }
 bool StdMeshers_Propagation::SetParametersByDefaults(const TDefaults&,const SMESH_Mesh*) { return false; }
 void StdMeshers_Propagation::SetPropagationMgr(SMESH_subMesh* subMesh) { PropagationMgr::Set( subMesh ); }
 /*!
- * \brief Return an edge from which hypotheses are propagated from
+ * \brief Return an edge from which hypotheses are propagated
  */
-TopoDS_Edge StdMeshers_Propagation::GetPropagationSource(SMESH_Mesh& theMesh,
-                                                         const TopoDS_Shape& theEdge)
+TopoDS_Edge StdMeshers_Propagation::GetPropagationSource(SMESH_Mesh&         theMesh,
+                                                         const TopoDS_Shape& theEdge,
+                                                         bool&               isPropagOfDistribution)
 {
-  return PropagationMgr::GetSource(theMesh.GetSubMeshContaining( theEdge ));
+  return PropagationMgr::GetSource( theMesh.GetSubMeshContaining( theEdge ),
+                                    isPropagOfDistribution);
 }
 
 //=============================================================================
@@ -126,11 +132,13 @@ namespace {
   struct PropagationMgrData : public EventListenerData
   {
     bool myForward; //!< true if a curve of edge in chain is codirected with one of source edge
+    bool myIsPropagOfDistribution; //!< type of Propagation hyp
     PropagationMgrData( SubMeshState state=WAIT_PROPAG_HYP ): EventListenerData(true) {
-      myType = state; myForward = true;
+      myType = state; myForward = true; myIsPropagOfDistribution = false;
     }
     void Init() {
       myType = WAIT_PROPAG_HYP;  mySubMeshes.clear(); myForward = true;
+      myIsPropagOfDistribution = false;
     }
     SubMeshState State() const {
       return (SubMeshState) myType;
@@ -217,8 +225,13 @@ namespace {
   const SMESH_Hypothesis* getProagationHyp (SMESH_Mesh&         theMesh,
                                             const TopoDS_Shape& theEdge)
   {
-    static SMESH_HypoFilter propagHypFilter
-      ( SMESH_HypoFilter::HasName( StdMeshers_Propagation::GetName ()));
+    static SMESH_HypoFilter propagHypFilter;
+    if ( propagHypFilter.IsEmpty() )
+    {
+      propagHypFilter.
+        Init( SMESH_HypoFilter::HasName( StdMeshers_Propagation::GetName ())).
+        Or  ( SMESH_HypoFilter::HasName( StdMeshers_PropagOfDistribution::GetName ()));
+    }
     return theMesh.GetHypothesis( theEdge, propagHypFilter, true );
   }
   //================================================================================
@@ -248,6 +261,10 @@ namespace {
     PropagationMgrData* chainData = getData( theMainSubMesh );
     chainData->SetState( HAS_PROPAG_HYP );
 
+    if ( const SMESH_Hypothesis * propagHyp = getProagationHyp( *mesh, theMainEdge ))
+      chainData->myIsPropagOfDistribution =
+        ( StdMeshers_PropagOfDistribution::GetName() == propagHyp->GetName() );
+
     // Edge submeshes, to which the 1D hypothesis will be propagated from theMainEdge
     list<SMESH_subMesh*> & chain = chainData->mySubMeshes;
     chain.clear();
@@ -462,17 +479,21 @@ namespace {
   {
     if ( findData( submesh )) return;
     DBGMSG( "PropagationMgr::Set() on  " << submesh->GetId() );
-    EventListenerData* data = new PropagationMgrData();
+    PropagationMgrData* data = new PropagationMgrData();
     submesh->SetEventListener( getListener(), data, submesh );
 
     const SMESH_Hypothesis * propagHyp =
       getProagationHyp( *submesh->GetFather(), submesh->GetSubShape() );
     if ( propagHyp )
+    {
+      data->myIsPropagOfDistribution =
+        ( StdMeshers_PropagOfDistribution::GetName() == propagHyp->GetName() );
       getListener()->ProcessEvent( SMESH_subMesh::ADD_HYP,
                                    SMESH_subMesh::ALGO_EVENT,
                                    submesh,
                                    data,
                                    propagHyp);
+    }
   }
   //================================================================================
   /*!
@@ -480,7 +501,8 @@ namespace {
    */
   //================================================================================
 
-  TopoDS_Edge PropagationMgr::GetSource(SMESH_subMesh * submesh)
+  TopoDS_Edge PropagationMgr::GetSource(SMESH_subMesh * submesh,
+                                        bool&           isPropagOfDistribution)
   {
     if ( PropagationMgrData* data = findData( submesh )) {
       if ( data->State() == IN_CHAIN ) {
@@ -489,6 +511,9 @@ namespace {
           TopoDS_Shape edge = sm->GetSubShape();
           edge = edge.Oriented( data->myForward ? TopAbs_FORWARD : TopAbs_REVERSED );
           DBGMSG( " GetSource() = edge " << sm->GetId() << " REV = " << (!data->myForward));
+          isPropagOfDistribution = false;
+          if ( PropagationMgrData* data = findData( sm ))
+            isPropagOfDistribution = data->myIsPropagOfDistribution;
           if ( edge.ShapeType() == TopAbs_EDGE )
             return TopoDS::Edge( edge );
         }
@@ -502,9 +527,9 @@ namespace {
    */
   //================================================================================
 
-  void PropagationMgr::ProcessEvent(const int          event,
-                                    const int          eventType,
-                                    SMESH_subMesh*     subMesh,
+  void PropagationMgr::ProcessEvent(const int                       event,
+                                    const int                       eventType,
+                                    SMESH_subMesh*                  subMesh,
                                     SMESH_subMeshEventListenerData* listenerData,
                                     const SMESH_Hypothesis*         hyp)
   {
@@ -516,7 +541,8 @@ namespace {
       return;
     DBGMSG( "PropagationMgr::ProcessEvent() on  " << subMesh->GetId() );
 
-    bool isPropagHyp = ( StdMeshers_Propagation::GetName() == hyp->GetName() );
+    bool isPropagHyp = ( StdMeshers_Propagation::GetName()          == hyp->GetName() ||
+                         StdMeshers_PropagOfDistribution::GetName() == hyp->GetName() );
 
     PropagationMgrData* data = static_cast<PropagationMgrData*>( listenerData );
     switch ( data->State() ) {
index c5a1616f7d5347b716ccf04650a518df8f207310..fa6acfda3409f434dc9180e07b1eca46dc488438 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -50,8 +50,6 @@ class STDMESHERS_EXPORT StdMeshers_Propagation:public SMESH_Hypothesis
 
   virtual std::ostream & SaveTo(std::ostream & save);
   virtual std::istream & LoadFrom(std::istream & load);
-  friend std::ostream & operator <<(std::ostream & save, StdMeshers_Propagation & hyp);
-  friend std::istream & operator >>(std::istream & load, StdMeshers_Propagation & hyp);
 
   static std::string GetName ();
 
@@ -69,7 +67,9 @@ class STDMESHERS_EXPORT StdMeshers_Propagation:public SMESH_Hypothesis
     * \param theEdge - edge to which hypotheses are propagated
     * \retval TopoDS_Edge - source edge, also passing orientation
    */
-  static TopoDS_Edge GetPropagationSource(SMESH_Mesh& theMesh, const TopoDS_Shape& theEdge);
+  static TopoDS_Edge GetPropagationSource(SMESH_Mesh&         theMesh,
+                                          const TopoDS_Shape& theEdge,
+                                          bool&               isPropagOfDistribution );
 
   /*!
    * \brief Initialize my parameter values by the mesh built on the geometry
@@ -88,4 +88,19 @@ class STDMESHERS_EXPORT StdMeshers_Propagation:public SMESH_Hypothesis
   virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
 
 };
+
+// =======================================================================
+/*!
+ * \brief Propagation Of Distribution hypothesis
+ */
+// =======================================================================
+
+class STDMESHERS_EXPORT StdMeshers_PropagOfDistribution: public StdMeshers_Propagation
+{
+ public:
+  StdMeshers_PropagOfDistribution(int hypId, int studyId, SMESH_Gen * gen);
+
+  static std::string GetName();
+};
+
 #endif
index c69fa9e7a5bea43830f733f4a71cf4c917550b1b..8ddd342ca519722167e21236d6cb4989f43209f2 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c2d4f4b42144d318d52ab1423d39141dcb298bc3..0cdb63fd14de6b8c2bcdb5986fa25e4b7c8948f7 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5369e598cb38ca23f8947b46840af3de870f5932..4ed750b13e96d5675c51190ed6a0c0a752906a88 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -87,6 +87,43 @@ void StdMeshers_QuadrangleParams::SetQuadType (StdMeshers_QuadType type)
   }
 }
 
+//================================================================================
+/*!
+ * \brief Set positions of enforced nodes
+ */
+//================================================================================
+
+void StdMeshers_QuadrangleParams::
+SetEnforcedNodes( const std::vector< TopoDS_Shape >& shapes,
+                  const std::vector< gp_Pnt >&       points )
+{
+  bool isChanged = ( shapes        != _enforcedVertices ||
+                     points.size() != _enforcedPoints.size() );
+  for ( size_t i = 0; i < points.size() && !isChanged; ++i )
+    isChanged = ( _enforcedPoints[ i ].SquareDistance( points[i] ) > 1e-100 );
+      
+  if ( isChanged )
+  {
+    _enforcedVertices = shapes;
+    _enforcedPoints   = points;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
+//================================================================================
+/*!
+ * \brief Returns positions of enforced nodes
+ */
+//================================================================================
+
+void StdMeshers_QuadrangleParams::
+GetEnforcedNodes( std::vector< TopoDS_Shape >& shapes,
+                  std::vector< gp_Pnt >&       points ) const
+{
+  shapes = _enforcedVertices;
+  points = _enforcedPoints;
+}
+
 //=============================================================================
 /*!
  *
@@ -98,6 +135,13 @@ ostream & StdMeshers_QuadrangleParams::SaveTo(ostream & save)
     save << _triaVertexID << " UNDEFINED " << int(_quadType);
   else
     save << _triaVertexID << " " << _objEntry << " " << int(_quadType);
+
+  save << " " << _enforcedPoints.size();
+  for ( size_t i = 0; i < _enforcedPoints.size(); ++i )
+    save << " " << _enforcedPoints[i].X()
+         << " " << _enforcedPoints[i].Y()
+         << " " << _enforcedPoints[i].Z();
+
   return save;
 }
 
@@ -122,29 +166,25 @@ istream & StdMeshers_QuadrangleParams::LoadFrom(istream & load)
   if (isOK)
     _quadType = StdMeshers_QuadType(type);
 
+  // _enforcedVertices are loaded at StdMeshers_I level
+  // because GEOM objects are referred by study entry.
+
+  int nbP = 0;
+  double x,y,z;
+  if ( load >> nbP && nbP > 0 )
+  {
+    _enforcedPoints.reserve( nbP );
+    while ( _enforcedPoints.size() < _enforcedPoints.capacity() )
+      if ( load >> x &&
+           load >> y &&
+           load >> z )
+        _enforcedPoints.push_back( gp_Pnt( x,y,z ));
+      else
+        break;
+  }
   return load;
 }
 
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-ostream & operator <<(ostream & save, StdMeshers_QuadrangleParams & hyp)
-{
-  return hyp.SaveTo( save );
-}
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-istream & operator >>(istream & load, StdMeshers_QuadrangleParams & hyp)
-{
-  return hyp.LoadFrom( load );
-}
-
 //================================================================================
 /*!
  * \brief Redifined method
index 9d8374daa47ae2584e808177cccfb23e028f1a62..9dc1641f5d1d536f67f08429c745ac0e533da3b5 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #define _SMESH_QUADRANGLEPARAMS_HXX_
 
 #include "SMESH_StdMeshers.hxx"
-
 #include "SMESH_Hypothesis.hxx"
-#include "Utils_SALOME_Exception.hxx"
+
+#include <gp_Pnt.hxx>
+
+#include <vector>
+#include <string>
 
 enum StdMeshers_QuadType
   {
@@ -38,8 +41,7 @@ enum StdMeshers_QuadType
     QUAD_NB_TYPES
   };
 
-class STDMESHERS_EXPORT StdMeshers_QuadrangleParams:
-  public SMESH_Hypothesis
+class STDMESHERS_EXPORT StdMeshers_QuadrangleParams: public SMESH_Hypothesis
 {
 public:
   StdMeshers_QuadrangleParams(int hypId, int studyId, SMESH_Gen* gen);
@@ -54,12 +56,13 @@ public:
   void SetQuadType (StdMeshers_QuadType type);
   StdMeshers_QuadType GetQuadType() const { return _quadType; }
 
+  void SetEnforcedNodes( const std::vector< TopoDS_Shape >& shapes,
+                         const std::vector< gp_Pnt >&       points );
+  void GetEnforcedNodes( std::vector< TopoDS_Shape >& shapes,
+                         std::vector< gp_Pnt >&       points ) const;
+
   virtual std::ostream & SaveTo(std::ostream & save);
   virtual std::istream & LoadFrom(std::istream & load);
-  friend std::ostream& operator << (std::ostream & save,
-                                    StdMeshers_QuadrangleParams & hyp);
-  friend std::istream& operator >> (std::istream & load,
-                                    StdMeshers_QuadrangleParams & hyp);
 
   /*!
    * \brief Initialize start and end length by the mesh built on the geometry
@@ -78,9 +81,11 @@ public:
                                        const SMESH_Mesh* theMesh=0);
 
 protected:
-  int                 _triaVertexID;
-  std::string         _objEntry;
-  StdMeshers_QuadType _quadType;
+  int                         _triaVertexID;
+  std::string                 _objEntry;
+  StdMeshers_QuadType         _quadType;
+  std::vector< TopoDS_Shape > _enforcedVertices;
+  std::vector< gp_Pnt >       _enforcedPoints;
 };
 
 #endif
index e5dcecb397275af00bd683dbb8fa6407b84b2db8..61260eff437da70734ff77bac3c1d015a1ae9a5a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 57ef8c0ad74e0a9226ea333f9de1c023ca7af101..2657ac8aaa7db497a6f5ccf0b85d74fb5a907320 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 62fadc505d62aee51cbe755056e3b12f4581aa06..016a5098db2c27e8f35e096d8077e519502b4483 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #include "SMESH_Block.hxx"
 #include "SMESH_Comment.hxx"
 #include "SMESH_Gen.hxx"
+#include "SMESH_HypoFilter.hxx"
 #include "SMESH_Mesh.hxx"
+#include "SMESH_MeshAlgos.hxx"
 #include "SMESH_MesherHelper.hxx"
 #include "SMESH_subMesh.hxx"
 #include "StdMeshers_FaceSide.hxx"
 #include "StdMeshers_QuadrangleParams.hxx"
 #include "StdMeshers_ViscousLayers2D.hxx"
 
+#include <BRepBndLib.hxx>
+#include <BRepClass_FaceClassifier.hxx>
 #include <BRep_Tool.hxx>
+#include <Bnd_Box.hxx>
 #include <GeomAPI_ProjectPointOnSurf.hxx>
 #include <Geom_Surface.hxx>
 #include <NCollection_DefineArray2.hxx>
@@ -85,8 +90,10 @@ StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D (int hypId, int studyId,
     myTrianglePreference(false),
     myTriaVertexID(-1),
     myNeedSmooth(false),
+    myCheckOri(false),
+    myParams( NULL ),
     myQuadType(QUAD_STANDARD),
-    myHelper( 0 )
+    myHelper( NULL )
 {
   MESSAGE("StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D");
   _name = "Quadrangle_2D";
@@ -119,15 +126,16 @@ bool StdMeshers_Quadrangle_2D::CheckHypothesis
                           const TopoDS_Shape&                  aShape,
                           SMESH_Hypothesis::Hypothesis_Status& aStatus)
 {
-  myTriaVertexID = -1;
-  myQuadType = QUAD_STANDARD;
+  myTriaVertexID         = -1;
+  myQuadType             = QUAD_STANDARD;
   myQuadranglePreference = false;
-  myTrianglePreference = false;
-  myQuadStruct.reset();
-  myHelper = NULL;
+  myTrianglePreference   = false;
+  myHelper               = (SMESH_MesherHelper*)NULL;
+  myParams               = NULL;
+  myQuadList.clear();
 
   bool isOk = true;
-  aStatus = SMESH_Hypothesis::HYP_OK;
+  aStatus   = SMESH_Hypothesis::HYP_OK;
 
   const list <const SMESHDS_Hypothesis * >& hyps =
     GetUsedHypothesis(aMesh, aShape, false);
@@ -138,11 +146,11 @@ bool StdMeshers_Quadrangle_2D::CheckHypothesis
   // First assigned hypothesis (if any) is processed now
   if (hyps.size() > 0) {
     aHyp = hyps.front();
-    if (strcmp("QuadrangleParams", aHyp->GetName()) == 0) {
-      const StdMeshers_QuadrangleParams* aHyp1 = 
-        (const StdMeshers_QuadrangleParams*)aHyp;
-      myTriaVertexID = aHyp1->GetTriaVertex();
-      myQuadType = aHyp1->GetQuadType();
+    if (strcmp("QuadrangleParams", aHyp->GetName()) == 0)
+    {
+      myParams = (const StdMeshers_QuadrangleParams*)aHyp;
+      myTriaVertexID = myParams->GetTriaVertex();
+      myQuadType     = myParams->GetQuadType();
       if (myQuadType == QUAD_QUADRANGLE_PREF ||
           myQuadType == QUAD_QUADRANGLE_PREF_REVERSED)
         myQuadranglePreference = true;
@@ -208,35 +216,43 @@ bool StdMeshers_Quadrangle_2D::Compute (SMESH_Mesh&         aMesh,
   const TopoDS_Face& F = TopoDS::Face(aShape);
   aMesh.GetSubMesh( F );
 
+  // do not initialize my fields before this as StdMeshers_ViscousLayers2D
+  // can call Compute() recursively
+  SMESH_ProxyMesh::Ptr proxyMesh = StdMeshers_ViscousLayers2D::Compute( aMesh, F );
+  if ( !proxyMesh )
+    return false;
+
+  myProxyMesh = proxyMesh;
+
   SMESH_MesherHelper helper (aMesh);
   myHelper = &helper;
 
-  myProxyMesh = StdMeshers_ViscousLayers2D::Compute( aMesh, F );
-  if ( !myProxyMesh )
-    return false;
-
   _quadraticMesh = myHelper->IsQuadraticSubMesh(aShape);
   myNeedSmooth = false;
+  myCheckOri   = false;
 
   FaceQuadStruct::Ptr quad = CheckNbEdges( aMesh, F, /*considerMesh=*/true );
   if (!quad)
     return false;
-  myQuadStruct = quad;
+  myQuadList.clear();
+  myQuadList.push_back( quad );
+
+  if ( !getEnforcedUV() )
+    return false;
 
   updateDegenUV( quad );
 
+  int n1 = quad->side[0].NbPoints();
+  int n2 = quad->side[1].NbPoints();
+  int n3 = quad->side[2].NbPoints();
+  int n4 = quad->side[3].NbPoints();
+
   enum { NOT_COMPUTED = -1, COMPUTE_FAILED = 0, COMPUTE_OK = 1 };
   int res = NOT_COMPUTED;
   if (myQuadranglePreference)
   {
-    int n1    = quad->side[0]->NbPoints();
-    int n2    = quad->side[1]->NbPoints();
-    int n3    = quad->side[2]->NbPoints();
-    int n4    = quad->side[3]->NbPoints();
     int nfull = n1+n2+n3+n4;
-    int ntmp  = nfull/2;
-    ntmp = ntmp*2;
-    if (nfull == ntmp && ((n1 != n3) || (n2 != n4)))
+    if ((nfull % 2) == 0 && ((n1 != n3) || (n2 != n4)))
     {
       // special path genarating only quandrangle faces
       res = computeQuadPref( aMesh, F, quad );
@@ -244,10 +260,6 @@ bool StdMeshers_Quadrangle_2D::Compute (SMESH_Mesh&         aMesh,
   }
   else if (myQuadType == QUAD_REDUCED)
   {
-    int n1     = quad->side[0]->NbPoints();
-    int n2     = quad->side[1]->NbPoints();
-    int n3     = quad->side[2]->NbPoints();
-    int n4     = quad->side[3]->NbPoints();
     int n13    = n1 - n3;
     int n24    = n2 - n4;
     int n13tmp = n13/2; n13tmp = n13tmp*2;
@@ -275,15 +287,106 @@ bool StdMeshers_Quadrangle_2D::Compute (SMESH_Mesh&         aMesh,
 
   if ( res == NOT_COMPUTED )
   {
-    res = computeQuadDominant( aMesh, F, quad );
+    if ( n1 != n3 || n2 != n4 )
+      res = computeTriangles( aMesh, F, quad );
+    else
+      res = computeQuadDominant( aMesh, F );
   }
 
   if ( res == COMPUTE_OK && myNeedSmooth )
     smooth( quad );
 
+  if ( res == COMPUTE_OK )
+    res = check();
+
   return ( res == COMPUTE_OK );
 }
 
+//================================================================================
+/*!
+ * \brief Compute quadrangles and triangles on the quad
+ */
+//================================================================================
+
+bool StdMeshers_Quadrangle_2D::computeTriangles(SMESH_Mesh&         aMesh,
+                                                const TopoDS_Face&  aFace,
+                                                FaceQuadStruct::Ptr quad)
+{
+  int nb = quad->side[0].grid->NbPoints();
+  int nr = quad->side[1].grid->NbPoints();
+  int nt = quad->side[2].grid->NbPoints();
+  int nl = quad->side[3].grid->NbPoints();
+
+  // rotate the quad to have nbNodeOut sides on TOP [and LEFT]
+  if ( nb > nt )
+    quad->shift( nl > nr ? 3 : 2, true );
+  else if ( nr > nl )
+    quad->shift( 1, true );
+  else if ( nl > nr )
+    quad->shift( nt > nb ? 0 : 3, true );
+
+  if ( !setNormalizedGrid( quad ))
+    return false;
+
+  if ( quad->nbNodeOut( QUAD_TOP_SIDE    ))
+  {
+    splitQuad( quad, 0, quad->jSize-2 );
+  }
+  if ( quad->nbNodeOut( QUAD_BOTTOM_SIDE )) // this should not happen
+  {
+    splitQuad( quad, 0, 1 );
+  }
+  FaceQuadStruct::Ptr newQuad = myQuadList.back();
+  if ( quad != newQuad ) // split done
+  {
+    {
+      FaceQuadStruct::Ptr botQuad = // a bottom part
+        ( quad->side[ QUAD_LEFT_SIDE ].from == 0 ) ? quad : newQuad;
+      if ( botQuad->nbNodeOut( QUAD_LEFT_SIDE ) > 0 )
+        botQuad->side[ QUAD_LEFT_SIDE ].to += botQuad->nbNodeOut( QUAD_LEFT_SIDE );
+      else if ( botQuad->nbNodeOut( QUAD_RIGHT_SIDE ) > 0 )
+        botQuad->side[ QUAD_RIGHT_SIDE ].to += botQuad->nbNodeOut( QUAD_RIGHT_SIDE );
+    }
+    // make quad be a greatest one
+    if ( quad->side[ QUAD_LEFT_SIDE ].NbPoints() == 2 ||
+         quad->side[ QUAD_RIGHT_SIDE ].NbPoints() == 2  )
+      quad = newQuad;
+    if ( !setNormalizedGrid( quad ))
+      return false;
+  }
+
+  if ( quad->nbNodeOut( QUAD_RIGHT_SIDE ))
+  {
+    splitQuad( quad, quad->iSize-2, 0 );
+  }
+  if ( quad->nbNodeOut( QUAD_LEFT_SIDE    ))
+  {
+    splitQuad( quad, 1, 0 );
+  }
+
+  return computeQuadDominant( aMesh, aFace );
+}
+
+//================================================================================
+/*!
+ * \brief Compute quadrangles and possibly triangles on all quads of myQuadList
+ */
+//================================================================================
+
+bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
+                                                   const TopoDS_Face&  aFace)
+{
+  if ( !addEnforcedNodes() )
+    return false;
+
+  std::list< FaceQuadStruct::Ptr >::iterator quad = myQuadList.begin();
+  for ( ; quad != myQuadList.end(); ++quad )
+    if ( !computeQuadDominant( aMesh, aFace, *quad ))
+      return false;
+
+  return true;
+}
+
 //================================================================================
 /*!
  * \brief Compute quadrangles and possibly triangles
@@ -294,37 +397,28 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
                                                    const TopoDS_Face&  aFace,
                                                    FaceQuadStruct::Ptr quad)
 {
-  // set normalized grid on unit square in parametric domain
+  // --- set normalized grid on unit square in parametric domain
 
-  if (!setNormalizedGrid(aMesh, aFace, quad))
+  if ( !setNormalizedGrid( quad ))
     return false;
 
-  // --- compute 3D values on points, store points & quadrangles
-
-  int nbdown  = quad->side[0]->NbPoints();
-  int nbup    = quad->side[2]->NbPoints();
-
-  int nbright = quad->side[1]->NbPoints();
-  int nbleft  = quad->side[3]->NbPoints();
+  // --- create nodes on points, and create quadrangles
 
-  int nbhoriz  = Min(nbdown, nbup);
-  int nbvertic = Min(nbright, nbleft);
+  int nbhoriz  = quad->iSize;
+  int nbvertic = quad->jSize;
 
   // internal mesh nodes
   SMESHDS_Mesh *  meshDS = aMesh.GetMeshDS();
   Handle(Geom_Surface) S = BRep_Tool::Surface(aFace);
-  int i, j, geomFaceID = meshDS->ShapeToIndex(aFace);
-  for (i = 1; i < nbhoriz - 1; i++) {
-    for (j = 1; j < nbvertic - 1; j++) {
-      int ij = j * nbhoriz + i;
-      double u = quad->uv_grid[ij].u;
-      double v = quad->uv_grid[ij].v;
-      gp_Pnt P = S->Value(u, v);
-      SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z());
-      meshDS->SetNodeOnFace(node, geomFaceID, u, v);
-      quad->uv_grid[ij].node = node;
+  int i,j,    geomFaceID = meshDS->ShapeToIndex(aFace);
+  for (i = 1; i < nbhoriz - 1; i++)
+    for (j = 1; j < nbvertic - 1; j++)
+    {
+      UVPtStruct& uvPnt = quad->UVPt( i, j );
+      gp_Pnt P          = S->Value( uvPnt.u, uvPnt.v );
+      uvPnt.node        = meshDS->AddNode(P.X(), P.Y(), P.Z());
+      meshDS->SetNodeOnFace( uvPnt.node, geomFaceID, uvPnt.u, uvPnt.v );
     }
-  }
   
   // mesh faces
 
@@ -340,21 +434,20 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
   //              i
   //             [0]
   
-  i = 0;
   int ilow = 0;
   int iup = nbhoriz - 1;
-  if (quad->isEdgeOut[3]) { ilow++; } else { if (quad->isEdgeOut[1]) iup--; }
+  if (quad->nbNodeOut(3)) { ilow++; } else { if (quad->nbNodeOut(1)) iup--; }
   
   int jlow = 0;
   int jup = nbvertic - 1;
-  if (quad->isEdgeOut[0]) { jlow++; } else { if (quad->isEdgeOut[2]) jup--; }
+  if (quad->nbNodeOut(0)) { jlow++; } else { if (quad->nbNodeOut(2)) jup--; }
   
   // regular quadrangles
   for (i = ilow; i < iup; i++) {
     for (j = jlow; j < jup; j++) {
       const SMDS_MeshNode *a, *b, *c, *d;
-      a = quad->uv_grid[      * nbhoriz + i    ].node;
-      b = quad->uv_grid[      * nbhoriz + i + 1].node;
+      a = quad->uv_grid[ j      * nbhoriz + i    ].node;
+      b = quad->uv_grid[ j      * nbhoriz + i + 1].node;
       c = quad->uv_grid[(j + 1) * nbhoriz + i + 1].node;
       d = quad->uv_grid[(j + 1) * nbhoriz + i    ].node;
       SMDS_MeshFace* face = myHelper->AddFace(a, b, c, d);
@@ -364,19 +457,25 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
     }
   }
 
-  const vector<UVPtStruct>& uv_e0 = quad->side[0]->GetUVPtStruct(true,0);
-  const vector<UVPtStruct>& uv_e1 = quad->side[1]->GetUVPtStruct(false,1);
-  const vector<UVPtStruct>& uv_e2 = quad->side[2]->GetUVPtStruct(true,1);
-  const vector<UVPtStruct>& uv_e3 = quad->side[3]->GetUVPtStruct(false,0);
+  // Boundary elements (must always be on an outer boundary of the FACE)
+  
+  const vector<UVPtStruct>& uv_e0 = quad->side[0].grid->GetUVPtStruct();
+  const vector<UVPtStruct>& uv_e1 = quad->side[1].grid->GetUVPtStruct();
+  const vector<UVPtStruct>& uv_e2 = quad->side[2].grid->GetUVPtStruct();
+  const vector<UVPtStruct>& uv_e3 = quad->side[3].grid->GetUVPtStruct();
 
   if (uv_e0.empty() || uv_e1.empty() || uv_e2.empty() || uv_e3.empty())
     return error(COMPERR_BAD_INPUT_MESH);
 
   double eps = Precision::Confusion();
 
-  // Boundary quadrangles
-  
-  if (quad->isEdgeOut[0]) {
+  int nbdown  = (int) uv_e0.size();
+  int nbup    = (int) uv_e2.size();
+  int nbright = (int) uv_e1.size();
+  int nbleft  = (int) uv_e3.size();
+
+  if (quad->nbNodeOut(0) && nbvertic == 2) // this should not occure
+  {
     // Down edge is out
     // 
     // |___|___|___|___|___|___|
@@ -393,8 +492,12 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
     // number of last node of the down edge to be processed
     int stop = nbdown - 1;
     // if right edge is out, we will stop at a node, previous to the last one
-    if (quad->isEdgeOut[1]) stop--;
-    
+    //if (quad->nbNodeOut(1)) stop--;
+    if ( quad->nbNodeOut( QUAD_RIGHT_SIDE ))
+      quad->UVPt( nbhoriz-1, 1 ).node = uv_e1[1].node;
+    if ( quad->nbNodeOut( QUAD_LEFT_SIDE ))
+      quad->UVPt( 0, 1 ).node = uv_e3[1].node;
+
     // for each node of the down edge find nearest node
     // in the first row of the regular grid and link them
     for (i = 0; i < stop; i++) {
@@ -449,7 +552,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
           if (face) meshDS->SetMeshElementOnShape(face, geomFaceID);
         }
         else {
-          splitQuad(meshDS, geomFaceID, a, b, c, d);
+          splitQuadFace(meshDS, geomFaceID, a, b, c, d);
         }
 
         // if node d is not at position g - make additional triangles
@@ -468,7 +571,8 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
       }
     }
   } else {
-    if (quad->isEdgeOut[2]) {
+    if (quad->nbNodeOut(2) && nbvertic == 2)
+    {
       // Up edge is out
       // 
       // <-<-<-<-<-<-<-<-<-<-<-<-< -- direction of processing
@@ -483,9 +587,16 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
 
       int g = nbhoriz - 1; // last processed node in the regular grid
 
+      ilow = 0;
+      iup = nbhoriz - 1;
+
       int stop = 0;
       // if left edge is out, we will stop at a second node
-      if (quad->isEdgeOut[3]) stop++;
+      //if (quad->nbNodeOut(3)) stop++;
+      if ( quad->nbNodeOut( QUAD_RIGHT_SIDE ))
+        quad->UVPt( nbhoriz-1, 0 ).node = uv_e1[ nbright-2 ].node;
+      if ( quad->nbNodeOut( QUAD_LEFT_SIDE ))
+        quad->UVPt( 0, 0 ).node = uv_e3[ nbleft-2 ].node;
 
       // for each node of the up edge find nearest node
       // in the first row of the regular grid and link them
@@ -536,10 +647,10 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
             if (face) meshDS->SetMeshElementOnShape(face, geomFaceID);
           }
           else {
-            splitQuad(meshDS, geomFaceID, a, b, c, d);
+            splitQuadFace(meshDS, geomFaceID, a, b, c, d);
           }
 
-          if (near + 1 < g) { // if d not is at g - make additional triangles
+          if (near + 1 < g) { // if d is not at g - make additional triangles
             for (int k = near + 1; k < g; k++) {
               c = quad->uv_grid[nbhoriz*(nbvertic - 2) + k].node;
               if (k + 1 > iup)
@@ -557,12 +668,14 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
   }
 
   // right or left boundary quadrangles
-  if (quad->isEdgeOut[1]) {
-//    MESSAGE("right edge is out");
+  if (quad->nbNodeOut( QUAD_RIGHT_SIDE ) && nbhoriz == 2) // this should not occure
+  {
     int g = 0; // last processed node in the grid
     int stop = nbright - 1;
-    if (quad->isEdgeOut[2]) stop--;
-    for (i = 0; i < stop; i++) {
+    i = 0;
+    if (quad->side[ QUAD_RIGHT_SIDE ].from != i    ) i++;
+    if (quad->side[ QUAD_RIGHT_SIDE ].to   != stop ) stop--;
+    for ( ; i < stop; i++) {
       const SMDS_MeshNode *a, *b, *c, *d;
       a = uv_e1[i].node;
       b = uv_e1[i + 1].node;
@@ -609,7 +722,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
           if (face) meshDS->SetMeshElementOnShape(face, geomFaceID);
         }
         else {
-          splitQuad(meshDS, geomFaceID, a, b, c, d);
+          splitQuadFace(meshDS, geomFaceID, a, b, c, d);
         }
 
         if (near - 1 > g) { // if d not is at g - make additional triangles
@@ -627,12 +740,12 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
       }
     }
   } else {
-    if (quad->isEdgeOut[3]) {
+    if (quad->nbNodeOut(3) && nbhoriz == 2) {
 //      MESSAGE("left edge is out");
       int g = nbvertic - 1; // last processed node in the grid
       int stop = 0;
-      if (quad->isEdgeOut[0]) stop++;
-      for (i = nbleft - 1; i > stop; i--) {
+      i = quad->side[ QUAD_LEFT_SIDE ].to-1; // nbleft - 1;
+      for (; i > stop; i--) {
         const SMDS_MeshNode *a, *b, *c, *d;
         a = uv_e3[i].node;
         b = uv_e3[i - 1].node;
@@ -678,7 +791,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadDominant(SMESH_Mesh&         aMesh,
             if (face) meshDS->SetMeshElementOnShape(face, geomFaceID);
           }
           else {
-            splitQuad(meshDS, geomFaceID, a, b, c, d);
+            splitQuadFace(meshDS, geomFaceID, a, b, c, d);
           }
 
           if (near + 1 < g) { // if d not is at g - make additional triangles
@@ -796,6 +909,38 @@ bool StdMeshers_Quadrangle_2D::Evaluate(SMESH_Mesh&         aMesh,
   return true;
 }
 
+//================================================================================
+/*!
+ * \brief Return true if the algorithm can mesh this shape
+ *  \param [in] aShape - shape to check
+ *  \param [in] toCheckAll - if true, this check returns OK if all shapes are OK,
+ *              else, returns OK if at least one shape is OK
+ */
+//================================================================================
+
+bool StdMeshers_Quadrangle_2D::IsApplicable( const TopoDS_Shape & aShape, bool toCheckAll )
+{
+  int nbFoundFaces = 0;
+  for (TopExp_Explorer exp( aShape, TopAbs_FACE ); exp.More(); exp.Next(), ++nbFoundFaces )
+  {
+    const TopoDS_Shape& aFace = exp.Current();
+    int nbWire = SMESH_MesherHelper::Count( aFace, TopAbs_WIRE, false );
+    if ( nbWire != 1 ) {
+      if ( toCheckAll ) return false;
+      continue;
+    }
+
+    int nbNoDegenEdges = 0;
+    TopExp_Explorer eExp( aFace, TopAbs_EDGE );
+    for ( ; eExp.More() && nbNoDegenEdges < 3; eExp.Next() ) {
+      if ( !SMESH_Algo::isDegenerated( TopoDS::Edge( eExp.Current() )))
+        ++nbNoDegenEdges;
+    }
+    if ( toCheckAll  && nbNoDegenEdges <  3 ) return false;
+    if ( !toCheckAll && nbNoDegenEdges >= 3 ) return true;
+  }
+  return ( toCheckAll && nbFoundFaces != 0 );
+}
 
 //================================================================================
 /*!
@@ -828,14 +973,14 @@ FaceQuadStruct::Ptr StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &
                                                            const TopoDS_Shape & aShape,
                                                            const bool           considerMesh)
 {
-  if ( myQuadStruct && myQuadStruct->face.IsSame( aShape ))
-    return myQuadStruct;
+  if ( !myQuadList.empty() && myQuadList.front()->face.IsSame( aShape ))
+    return myQuadList.front();
 
   TopoDS_Face F = TopoDS::Face(aShape);
   if ( F.Orientation() >= TopAbs_INTERNAL ) F.Orientation( TopAbs_FORWARD );
   const bool ignoreMediumNodes = _quadraticMesh;
 
-  // verify 1 wire only, with 4 edges
+  // verify 1 wire only
   list< TopoDS_Edge > edges;
   list< int > nbEdgesInWire;
   int nbWire = SMESH_Block::GetOrderedEdges (F, edges, nbEdgesInWire);
@@ -852,7 +997,6 @@ FaceQuadStruct::Ptr StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &
     return FaceQuadStruct::Ptr();
   }
   FaceQuadStruct::Ptr quad( new FaceQuadStruct );
-  quad->uv_grid = 0;
   quad->side.reserve(nbEdgesInWire.front());
   quad->face = F;
 
@@ -870,17 +1014,17 @@ FaceQuadStruct::Ptr StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &
         else
           sideEdges.push_back( *edgeIt++ );
       if ( !sideEdges.empty() )
-        quad->side.push_back(new StdMeshers_FaceSide(F, sideEdges, &aMesh, iSide < QUAD_TOP_SIDE,
-                                                     ignoreMediumNodes, myProxyMesh));
+        quad->side.push_back( StdMeshers_FaceSide::New(F, sideEdges, &aMesh, iSide < QUAD_TOP_SIDE,
+                                                       ignoreMediumNodes, myProxyMesh));
       else
         --iSide;
     }
-    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 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(quad->side[1], aNode, &aPnt2d));
+    gp_Pnt2d aPnt2d = UVPSleft[0].UV();
+    quad->side.push_back( StdMeshers_FaceSide::New( quad->side[1].grid.get(), aNode, &aPnt2d ));
     myNeedSmooth = ( nbDegenEdges > 0 );
     return quad;
   }
@@ -922,15 +1066,15 @@ FaceQuadStruct::Ptr StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &
       }
       if ( !sideEdges.empty() )
       {
-        quad->side.push_back(new StdMeshers_FaceSide(F, sideEdges, &aMesh, iSide < QUAD_TOP_SIDE,
-                                                     ignoreMediumNodes, myProxyMesh));
+        quad->side.push_back( StdMeshers_FaceSide::New( F, sideEdges, &aMesh, iSide < QUAD_TOP_SIDE,
+                                                        ignoreMediumNodes, myProxyMesh ));
         ++iSide;
       }
       else if ( !SMESH_Algo::isDegenerated( *edgeIt ) && // closed EDGE
                 myHelper->IthVertex( 0, *edgeIt ).IsSame( myHelper->IthVertex( 1, *edgeIt )))
       {
-        quad->side.push_back(new StdMeshers_FaceSide(F, *edgeIt++, &aMesh, iSide < QUAD_TOP_SIDE,
-                                                     ignoreMediumNodes, myProxyMesh));
+        quad->side.push_back( StdMeshers_FaceSide::New( F, *edgeIt++, &aMesh, iSide < QUAD_TOP_SIDE,
+                                                        ignoreMediumNodes, myProxyMesh));
         ++iSide;
       }
       if ( quad->side.size() == 4 )
@@ -1155,36 +1299,12 @@ StdMeshers_Quadrangle_2D::CheckAnd2Dcompute (SMESH_Mesh &         aMesh,
   if ( quad )
   {
     // set normalized grid on unit square in parametric domain
-    if ( ! setNormalizedGrid( aMesh, TopoDS::Face( aShape ), quad))
+    if ( ! setNormalizedGrid( quad ))
       quad.reset();
   }
   return quad;
 }
 
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-faceQuadStruct::~faceQuadStruct()
-{
-  for (size_t i = 0; i < side.size(); i++) {
-    if (side[i]) {
-      delete side[i];
-      for (size_t j = i+1; j < side.size(); j++)
-        if ( side[i] == side[j] )
-          side[j] = 0;
-    }
-  }
-  side.clear();
-
-  if (uv_grid) {
-    delete [] uv_grid;
-    uv_grid = 0;
-  }
-}
-
 namespace
 {
   inline const vector<UVPtStruct>& getUVPtStructIn(FaceQuadStruct::Ptr& quad, int i, int nbSeg)
@@ -1192,9 +1312,9 @@ namespace
     bool   isXConst   = (i == QUAD_BOTTOM_SIDE || i == QUAD_TOP_SIDE);
     double constValue = (i == QUAD_BOTTOM_SIDE || i == QUAD_LEFT_SIDE) ? 0 : 1;
     return
-      quad->isEdgeOut[i] ?
-      quad->side[i]->SimulateUVPtStruct(nbSeg,isXConst,constValue) :
-      quad->side[i]->GetUVPtStruct(isXConst,constValue);
+      quad->nbNodeOut(i) ?
+      quad->side[i].grid->SimulateUVPtStruct(nbSeg,isXConst,constValue) :
+      quad->side[i].grid->GetUVPtStruct     (isXConst,constValue);
   }
   inline gp_UV calcUV(double x, double y,
                       const gp_UV& a0,const gp_UV& a1,const gp_UV& a2,const gp_UV& a3,
@@ -1212,10 +1332,11 @@ namespace
  */
 //=============================================================================
 
-bool StdMeshers_Quadrangle_2D::setNormalizedGrid (SMESH_Mesh &          aMesh,
-                                                  const TopoDS_Face&    aFace,
-                                                  FaceQuadStruct::Ptr & quad)
+bool StdMeshers_Quadrangle_2D::setNormalizedGrid (FaceQuadStruct::Ptr quad)
 {
+  if ( !quad->uv_grid.empty() )
+    return true;
+
   // Algorithme décrit dans "Génération automatique de maillages"
   // P.L. GEORGE, MASSON, § 6.4.1 p. 84-85
   // traitement dans le domaine paramétrique 2d u,v
@@ -1232,82 +1353,133 @@ bool StdMeshers_Quadrangle_2D::setNormalizedGrid (SMESH_Mesh &          aMesh,
   //      min             max                    0     x0     1
   //             =down
   //
+  const FaceQuadStruct::Side & bSide = quad->side[0];
+  const FaceQuadStruct::Side & rSide = quad->side[1];
+  const FaceQuadStruct::Side & tSide = quad->side[2];
+  const FaceQuadStruct::Side & lSide = quad->side[3];
 
-  int nbhoriz  = Min(quad->side[0]->NbPoints(), quad->side[2]->NbPoints());
-  int nbvertic = Min(quad->side[1]->NbPoints(), quad->side[3]->NbPoints());
-
-  quad->isEdgeOut[0] = (quad->side[0]->NbPoints() > quad->side[2]->NbPoints());
-  quad->isEdgeOut[1] = (quad->side[1]->NbPoints() > quad->side[3]->NbPoints());
-  quad->isEdgeOut[2] = (quad->side[2]->NbPoints() > quad->side[0]->NbPoints());
-  quad->isEdgeOut[3] = (quad->side[3]->NbPoints() > quad->side[1]->NbPoints());
-
-  UVPtStruct *uv_grid = quad->uv_grid = new UVPtStruct[nbvertic * nbhoriz];
-
-  const vector<UVPtStruct>& uv_e0 = getUVPtStructIn(quad, 0, nbhoriz - 1);
-  const vector<UVPtStruct>& uv_e1 = getUVPtStructIn(quad, 1, nbvertic - 1);
-  const vector<UVPtStruct>& uv_e2 = getUVPtStructIn(quad, 2, nbhoriz - 1);
-  const vector<UVPtStruct>& uv_e3 = getUVPtStructIn(quad, 3, nbvertic - 1);
+  int nbhoriz  = Min( bSide.NbPoints(), tSide.NbPoints() );
+  int nbvertic = Min( rSide.NbPoints(), lSide.NbPoints() );
 
+  if ( myQuadList.size() == 1 )
+  {
+    // all sub-quads must have NO sides with nbNodeOut > 0
+    quad->nbNodeOut(0) = Max( 0, bSide.grid->NbPoints() - tSide.grid->NbPoints() );
+    quad->nbNodeOut(1) = Max( 0, rSide.grid->NbPoints() - lSide.grid->NbPoints() );
+    quad->nbNodeOut(2) = Max( 0, tSide.grid->NbPoints() - bSide.grid->NbPoints() );
+    quad->nbNodeOut(3) = Max( 0, lSide.grid->NbPoints() - rSide.grid->NbPoints() );
+  }
+  const vector<UVPtStruct>& uv_e0 = bSide.GetUVPtStruct();
+  const vector<UVPtStruct>& uv_e1 = rSide.GetUVPtStruct();
+  const vector<UVPtStruct>& uv_e2 = tSide.GetUVPtStruct();
+  const vector<UVPtStruct>& uv_e3 = lSide.GetUVPtStruct();
   if (uv_e0.empty() || uv_e1.empty() || uv_e2.empty() || uv_e3.empty())
     //return error("Can't find nodes on sides");
     return error(COMPERR_BAD_INPUT_MESH);
 
+  quad->uv_grid.resize( nbvertic * nbhoriz );
+  quad->iSize = nbhoriz;
+  quad->jSize = nbvertic;
+  UVPtStruct *uv_grid = & quad->uv_grid[0];
+
+  quad->uv_box.Clear();
+
   // copy data of face boundary
-  {
-    const int j = 0;
-    for (int i = 0; i < nbhoriz; i++)       // down
-      uv_grid[ j * nbhoriz + i ] = uv_e0[i];
+
+  FaceQuadStruct::SideIterator sideIter;
+
+  { // BOTTOM
+    const int     j = 0;
+    const double x0 = bSide.First().normParam;
+    const double dx = bSide.Last().normParam - bSide.First().normParam;
+    for ( sideIter.Init( bSide ); sideIter.More(); sideIter.Next() ) {
+      sideIter.UVPt().x = ( sideIter.UVPt().normParam - x0 ) / dx;
+      sideIter.UVPt().y = 0.;
+      uv_grid[ j * nbhoriz + sideIter.Count() ] = sideIter.UVPt();
+      quad->uv_box.Add( sideIter.UVPt().UV() );
+    }
   }
-  {
-    const int i = nbhoriz - 1;
-    for (int j = 0; j < nbvertic; j++)      // right
-      uv_grid[ j * nbhoriz + i ] = uv_e1[j];
+  { // RIGHT
+    const int     i = nbhoriz - 1;
+    const double y0 = rSide.First().normParam;
+    const double dy = rSide.Last().normParam - rSide.First().normParam;
+    sideIter.Init( rSide );
+    if ( quad->UVPt( i, sideIter.Count() ).node )
+      sideIter.Next(); // avoid copying from a split emulated side
+    for ( ; sideIter.More(); sideIter.Next() ) {
+      sideIter.UVPt().x = 1.;
+      sideIter.UVPt().y = ( sideIter.UVPt().normParam - y0 ) / dy;
+      uv_grid[ sideIter.Count() * nbhoriz + i ] = sideIter.UVPt();
+      quad->uv_box.Add( sideIter.UVPt().UV() );
+    }
   }
-  {
-    const int j = nbvertic - 1;
-    for (int i = 0; i < nbhoriz; i++)       // up
-      uv_grid[ j * nbhoriz + i ] = uv_e2[i];
+  { // TOP
+    const int     j = nbvertic - 1;
+    const double x0 = tSide.First().normParam;
+    const double dx = tSide.Last().normParam - tSide.First().normParam;
+    int i = 0, nb = nbhoriz;
+    sideIter.Init( tSide );
+    if ( quad->UVPt( nb-1, j ).node ) --nb; // avoid copying from a split emulated side
+    for ( ; i < nb; i++, sideIter.Next()) {
+      sideIter.UVPt().x = ( sideIter.UVPt().normParam - x0 ) / dx;
+      sideIter.UVPt().y = 1.;
+      uv_grid[ j * nbhoriz + i ] = sideIter.UVPt();
+      quad->uv_box.Add( sideIter.UVPt().UV() );
+    }
   }
-  {
+  { // LEFT
     const int i = 0;
-    for (int j = 0; j < nbvertic; j++)      // left
-      uv_grid[ j * nbhoriz + i ] = uv_e3[j];
+    const double y0 = lSide.First().normParam;
+    const double dy = lSide.Last().normParam - lSide.First().normParam;
+    int j = 0, nb = nbvertic;
+    sideIter.Init( lSide );
+    if ( quad->UVPt( i, j    ).node )
+      ++j, sideIter.Next(); // avoid copying from a split emulated side
+    if ( quad->UVPt( i, nb-1 ).node )
+      --nb;
+    for ( ; j < nb; j++, sideIter.Next()) {
+      sideIter.UVPt().x = 0.;
+      sideIter.UVPt().y = ( sideIter.UVPt().normParam - y0 ) / dy;
+      uv_grid[ j * nbhoriz + i ] = sideIter.UVPt();
+      quad->uv_box.Add( sideIter.UVPt().UV() );
+    }
   }
 
   // normalized 2d parameters on grid
 
-  for (int i = 0; i < nbhoriz; i++) {
-    for (int j = 0; j < nbvertic; j++) {
-      int ij = j * nbhoriz + i;
-      // --- droite i cste : x = x0 + y(x1-x0)
-      double x0 = uv_e0[i].normParam;   // bas  - sud
-      double x1 = uv_e2[i].normParam;   // haut - nord
-      // --- droite j cste : y = y0 + x(y1-y0)
-      double y0 = uv_e3[j].normParam;   // gauche - ouest
-      double y1 = uv_e1[j].normParam;   // droite - est
+  for (int i = 1; i < nbhoriz-1; i++)
+  {
+    const double x0 = quad->UVPt( i, 0          ).x;
+    const double x1 = quad->UVPt( i, nbvertic-1 ).x;
+    for (int j = 1; j < nbvertic-1; j++)
+    {
+      const double y0 = quad->UVPt( 0,         j ).y;
+      const double y1 = quad->UVPt( nbhoriz-1, j ).y;
       // --- intersection : x=x0+(y0+x(y1-y0))(x1-x0)
       double x = (x0 + y0 * (x1 - x0)) / (1 - (y1 - y0) * (x1 - x0));
       double y = y0 + x * (y1 - y0);
+      int   ij = j * nbhoriz + i;
       uv_grid[ij].x = x;
       uv_grid[ij].y = y;
+      uv_grid[ij].node = NULL;
     }
   }
 
   // projection on 2d domain (u,v)
 
-  gp_UV a0 (uv_e0.front().u, uv_e0.front().v);
-  gp_UV a1 (uv_e0.back().u,  uv_e0.back().v );
-  gp_UV a2 (uv_e2.back().u,  uv_e2.back().v );
-  gp_UV a3 (uv_e2.front().u, uv_e2.front().v);
+  gp_UV a0 = quad->UVPt( 0,         0          ).UV();
+  gp_UV a1 = quad->UVPt( nbhoriz-1, 0          ).UV();
+  gp_UV a2 = quad->UVPt( nbhoriz-1, nbvertic-1 ).UV();
+  gp_UV a3 = quad->UVPt( 0,         nbvertic-1 ).UV();
 
-  for (int i = 0; i < nbhoriz; i++)
+  for (int i = 1; i < nbhoriz-1; i++)
   {
-    gp_UV p0( uv_e0[i].u, uv_e0[i].v );
-    gp_UV p2( uv_e2[i].u, uv_e2[i].v );
-    for (int j = 0; j < nbvertic; j++)
+    gp_UV p0 = quad->UVPt( i, 0          ).UV();
+    gp_UV p2 = quad->UVPt( i, nbvertic-1 ).UV();
+    for (int j = 1; j < nbvertic-1; j++)
     {
-      gp_UV p1( uv_e1[j].u, uv_e1[j].v );
-      gp_UV p3( uv_e3[j].u, uv_e3[j].v );
+      gp_UV p1 = quad->UVPt( nbhoriz-1, j ).UV();
+      gp_UV p3 = quad->UVPt( 0,         j ).UV();
 
       int ij = j * nbhoriz + i;
       double x = uv_grid[ij].x;
@@ -1327,31 +1499,55 @@ bool StdMeshers_Quadrangle_2D::setNormalizedGrid (SMESH_Mesh &          aMesh,
 //purpose  : auxilary function for computeQuadPref
 //=======================================================================
 
-static void shiftQuad(FaceQuadStruct::Ptr& quad, const int num)
+void StdMeshers_Quadrangle_2D::shiftQuad(FaceQuadStruct::Ptr& quad, const int num )
 {
-  quad->shift( num, /*ori=*/true );
+  quad->shift( num, /*ori=*/true, /*keepGrid=*/myQuadList.size() > 1 );
 }
 
 //================================================================================
 /*!
- * \brief Rotate sides of a quad by nb
+ * \brief Rotate sides of a quad by given nb of quartes
  *  \param nb  - number of rotation quartes
  *  \param ori - to keep orientation of sides as in an unit quad or not
+ *  \param keepGrid - if \c true Side::grid is not changed, Side::from and Side::to
+ *         are altered instead
  */
 //================================================================================
 
-void FaceQuadStruct::shift( size_t nb, bool ori )
+void FaceQuadStruct::shift( size_t nb, bool ori, bool keepGrid )
 {
   if ( nb == 0 ) return;
-  StdMeshers_FaceSide* sideArr[4] = { side[0], side[1], side[2], side[3] };
-  for (int i = QUAD_BOTTOM_SIDE; i < NB_QUAD_SIDES; ++i) {
+
+  vector< Side > newSides( side.size() );
+  vector< Side* > sidePtrs( side.size() );
+  for (int i = QUAD_BOTTOM_SIDE; i < NB_QUAD_SIDES; ++i)
+  {
     int id = (i + nb) % NB_QUAD_SIDES;
-    bool wasForward = (i  < QUAD_TOP_SIDE);
-    bool newForward = (id < QUAD_TOP_SIDE);
-    if (ori && wasForward != newForward)
-      sideArr[ i ]->Reverse();
-    side[ id ] = sideArr[ i ];
+    if ( ori )
+    {
+      bool wasForward = (i  < QUAD_TOP_SIDE);
+      bool newForward = (id < QUAD_TOP_SIDE);
+      if ( wasForward != newForward )
+        side[ i ].Reverse( keepGrid );
+    }
+    newSides[ id ] = side[ i ];
+    sidePtrs[ i ] = & side[ i ];
+  }
+  // make newSides refer newSides via Side::Contact's
+  for ( size_t i = 0; i < newSides.size(); ++i )
+  {
+    FaceQuadStruct::Side& ns = newSides[ i ];
+    for ( size_t iC = 0; iC < ns.contacts.size(); ++iC )
+    {
+      FaceQuadStruct::Side* oSide = ns.contacts[iC].other_side;
+      vector< Side* >::iterator sIt = std::find( sidePtrs.begin(), sidePtrs.end(), oSide );
+      if ( sIt != sidePtrs.end() )
+        ns.contacts[iC].other_side = & newSides[ *sIt - sidePtrs[0] ];
+    }
   }
+  newSides.swap( side );
+
+  uv_grid.clear();
 }
 
 //=======================================================================
@@ -1367,10 +1563,10 @@ static gp_UV calcUV(double x0, double x1, double y0, double y1,
   double x = (x0 + y0 * (x1 - x0)) / (1 - (y1 - y0) * (x1 - x0));
   double y = y0 + x * (y1 - y0);
 
-  gp_UV p0 = quad->side[QUAD_BOTTOM_SIDE]->Value2d(x).XY();
-  gp_UV p1 = quad->side[QUAD_RIGHT_SIDE ]->Value2d(y).XY();
-  gp_UV p2 = quad->side[QUAD_TOP_SIDE   ]->Value2d(x).XY();
-  gp_UV p3 = quad->side[QUAD_LEFT_SIDE  ]->Value2d(y).XY();
+  gp_UV p0 = quad->side[QUAD_BOTTOM_SIDE].grid->Value2d(x).XY();
+  gp_UV p1 = quad->side[QUAD_RIGHT_SIDE ].grid->Value2d(y).XY();
+  gp_UV p2 = quad->side[QUAD_TOP_SIDE   ].grid->Value2d(x).XY();
+  gp_UV p3 = quad->side[QUAD_LEFT_SIDE  ].grid->Value2d(y).XY();
 
   gp_UV uv = calcUV(x,y, a0,a1,a2,a3, p0,p1,p2,p3);
 
@@ -1387,10 +1583,10 @@ static gp_UV calcUV2(double x, double y,
                      const gp_UV& a0, const gp_UV& a1,
                      const gp_UV& a2, const gp_UV& a3)
 {
-  gp_UV p0 = quad->side[QUAD_BOTTOM_SIDE]->Value2d(x).XY();
-  gp_UV p1 = quad->side[QUAD_RIGHT_SIDE ]->Value2d(y).XY();
-  gp_UV p2 = quad->side[QUAD_TOP_SIDE   ]->Value2d(x).XY();
-  gp_UV p3 = quad->side[QUAD_LEFT_SIDE  ]->Value2d(y).XY();
+  gp_UV p0 = quad->side[QUAD_BOTTOM_SIDE].grid->Value2d(x).XY();
+  gp_UV p1 = quad->side[QUAD_RIGHT_SIDE ].grid->Value2d(y).XY();
+  gp_UV p2 = quad->side[QUAD_TOP_SIDE   ].grid->Value2d(x).XY();
+  gp_UV p3 = quad->side[QUAD_LEFT_SIDE  ].grid->Value2d(y).XY();
 
   gp_UV uv = calcUV(x,y, a0,a1,a2,a3, p0,p1,p2,p3);
 
@@ -1408,34 +1604,44 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
                                                 const TopoDS_Face&  aFace,
                                                 FaceQuadStruct::Ptr quad)
 {
-  // Auxilary key in order to keep old variant
-  // of meshing after implementation new variant
-  // for bug 0016220 from Mantis.
-  bool OldVersion = (myQuadType == QUAD_QUADRANGLE_PREF_REVERSED);
+  const bool OldVersion = (myQuadType == QUAD_QUADRANGLE_PREF_REVERSED);
+  const bool WisF = true;
 
   SMESHDS_Mesh *  meshDS = aMesh.GetMeshDS();
   Handle(Geom_Surface) S = BRep_Tool::Surface(aFace);
-  bool WisF = true;
-  int i,j,geomFaceID = meshDS->ShapeToIndex(aFace);
+  int i,j,    geomFaceID = meshDS->ShapeToIndex(aFace);
 
-  int nb = quad->side[0]->NbPoints();
-  int nr = quad->side[1]->NbPoints();
-  int nt = quad->side[2]->NbPoints();
-  int nl = quad->side[3]->NbPoints();
+  int nb = quad->side[0].NbPoints();
+  int nr = quad->side[1].NbPoints();
+  int nt = quad->side[2].NbPoints();
+  int nl = quad->side[3].NbPoints();
   int dh = abs(nb-nt);
   int dv = abs(nr-nl);
 
-  // rotate sides to be as in the picture below and to have
-  // dh >= dv and nt > nb
-  if ( dh >= dv )
-    shiftQuad( quad, ( nt > nb ) ? 0 : 2 );
+  if ( myForcedPnts.empty() )
+  {
+    // rotate sides to be as in the picture below and to have
+    // dh >= dv and nt > nb
+    if ( dh >= dv )
+      shiftQuad( quad, ( nt > nb ) ? 0 : 2 );
+    else
+      shiftQuad( quad, ( nr > nl ) ? 1 : 3 );
+  }
   else
-    shiftQuad( quad, ( nr > nl ) ? 1 : 3 );
+  {
+    // rotate the quad to have nt > nb [and nr > nl]
+    if ( nb > nt )
+      shiftQuad ( quad, nr > nl ? 1 : 2 );
+    else if ( nr > nl )
+      shiftQuad( quad, nb == nt ? 1 : 0 );
+    else if ( nl > nr )
+      shiftQuad( quad, 3 );
+  }
 
-  nb = quad->side[0]->NbPoints();
-  nr = quad->side[1]->NbPoints();
-  nt = quad->side[2]->NbPoints();
-  nl = quad->side[3]->NbPoints();
+  nb = quad->side[0].NbPoints();
+  nr = quad->side[1].NbPoints();
+  nt = quad->side[2].NbPoints();
+  nl = quad->side[3].NbPoints();
   dh = abs(nb-nt);
   dv = abs(nr-nl);
   int nbh  = Max(nb,nt);
@@ -1470,6 +1676,326 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
   //      0------------0
   //       0  bottom  1
 
+
+  const int bfrom = quad->side[0].from;
+  const int rfrom = quad->side[1].from;
+  const int tfrom = quad->side[2].from;
+  const int lfrom = quad->side[3].from;
+  {
+    const vector<UVPtStruct>& uv_eb_vec = quad->side[0].GetUVPtStruct(true,0);
+    const vector<UVPtStruct>& uv_er_vec = quad->side[1].GetUVPtStruct(false,1);
+    const vector<UVPtStruct>& uv_et_vec = quad->side[2].GetUVPtStruct(true,1);
+    const vector<UVPtStruct>& uv_el_vec = quad->side[3].GetUVPtStruct(false,0);
+    if (uv_eb_vec.empty() ||
+        uv_er_vec.empty() ||
+        uv_et_vec.empty() ||
+        uv_el_vec.empty())
+      return error(COMPERR_BAD_INPUT_MESH);
+  }
+  FaceQuadStruct::SideIterator uv_eb, uv_er, uv_et, uv_el;
+  uv_eb.Init( quad->side[0] );
+  uv_er.Init( quad->side[1] );
+  uv_et.Init( quad->side[2] );
+  uv_el.Init( quad->side[3] );
+
+  gp_UV a0,a1,a2,a3, p0,p1,p2,p3, uv;
+  double x,y;
+
+  a0 = uv_eb[ 0 ].UV();
+  a1 = uv_er[ 0 ].UV();
+  a2 = uv_er[ nr-1 ].UV();
+  a3 = uv_et[ 0 ].UV();
+
+  if ( !myForcedPnts.empty() )
+  {
+    if ( dv != 0 && dh != 0 ) // here myQuadList.size() == 1
+    {
+      const int dmin = Min( dv, dh );
+
+      // Make a side separating domains L and Cb
+      StdMeshers_FaceSidePtr sideLCb;
+      UVPtStruct p3dom; // a point where 3 domains meat
+      {                                                     //   dmin
+        vector<UVPtStruct> pointsLCb( dmin+1 );             // 1--------1
+        pointsLCb[0] = uv_eb[0];                            //  |   |  |
+        for ( int i = 1; i <= dmin; ++i )                   //  |   |Ct|
+        {                                                   //  | L |  |
+          x  = uv_et[ i ].normParam;                        //  |   |__|
+          y  = uv_er[ i ].normParam;                        //  |  /   |
+          p0 = quad->side[0].grid->Value2d( x ).XY();       //  | / Cb |dmin
+          p1 = uv_er[ i ].UV();                             //  |/     |
+          p2 = uv_et[ i ].UV();                             // 0--------0
+          p3 = quad->side[3].grid->Value2d( y ).XY();
+          uv = calcUV( x,y, a0,a1,a2,a3, p0,p1,p2,p3 );
+          pointsLCb[ i ].u = uv.X();
+          pointsLCb[ i ].v = uv.Y();
+        }
+        sideLCb = StdMeshers_FaceSide::New( pointsLCb, aFace );
+        p3dom   = pointsLCb.back();
+      }
+      // Make a side separating domains L and Ct
+      StdMeshers_FaceSidePtr sideLCt;
+      {
+        vector<UVPtStruct> pointsLCt( nl );
+        pointsLCt[0]     = p3dom;
+        pointsLCt.back() = uv_et[ dmin ];
+        x  = uv_et[ dmin ].normParam;
+        p0 = quad->side[0].grid->Value2d( x ).XY();
+        p2 = uv_et[ dmin ].UV();
+        double y0 = uv_er[ dmin ].normParam;
+        for ( int i = 1; i < nl-1; ++i )
+        {
+          y  = y0 + i / ( nl-1. ) * ( 1. - y0 );
+          p1 = quad->side[1].grid->Value2d( y ).XY();
+          p3 = quad->side[3].grid->Value2d( y ).XY();
+          uv = calcUV( x,y, a0,a1,a2,a3, p0,p1,p2,p3 );
+          pointsLCt[ i ].u = uv.X();
+          pointsLCt[ i ].v = uv.Y();
+        }
+        sideLCt = StdMeshers_FaceSide::New( pointsLCt, aFace );
+      }
+      // Make a side separating domains Cb and Ct
+      StdMeshers_FaceSidePtr sideCbCt;
+      {
+        vector<UVPtStruct> pointsCbCt( nb );
+        pointsCbCt[0]     = p3dom;
+        pointsCbCt.back() = uv_er[ dmin ];
+        y  = uv_er[ dmin ].normParam;
+        p1 = uv_er[ dmin ].UV();
+        p3 = quad->side[3].grid->Value2d( y ).XY();
+        double x0 = uv_et[ dmin ].normParam;
+        for ( int i = 1; i < nb-1; ++i )
+        {
+          x  = x0 + i / ( nb-1. ) * ( 1. - x0 );
+          p2 = quad->side[2].grid->Value2d( x ).XY();
+          p0 = quad->side[0].grid->Value2d( x ).XY();
+          uv = calcUV( x,y, a0,a1,a2,a3, p0,p1,p2,p3 );
+          pointsCbCt[ i ].u = uv.X();
+          pointsCbCt[ i ].v = uv.Y();
+        }
+        sideCbCt = StdMeshers_FaceSide::New( pointsCbCt, aFace );
+      }
+      // Make Cb quad
+      FaceQuadStruct* qCb = new FaceQuadStruct( quad->face, "Cb" );
+      myQuadList.push_back( FaceQuadStruct::Ptr( qCb ));
+      qCb->side.resize(4);
+      qCb->side[0] = quad->side[0];
+      qCb->side[1] = quad->side[1];
+      qCb->side[2] = sideCbCt;
+      qCb->side[3] = sideLCb;
+      qCb->side[1].to = dmin+1;
+      // Make L quad
+      FaceQuadStruct* qL = new FaceQuadStruct( quad->face, "L" );
+      myQuadList.push_back( FaceQuadStruct::Ptr( qL ));
+      qL->side.resize(4);
+      qL->side[0] = sideLCb;
+      qL->side[1] = sideLCt;
+      qL->side[2] = quad->side[2];
+      qL->side[3] = quad->side[3];
+      qL->side[2].to = dmin+1;
+      // Make Ct from the main quad
+      FaceQuadStruct::Ptr qCt = quad;
+      qCt->side[0] = sideCbCt;
+      qCt->side[3] = sideLCt;
+      qCt->side[1].from = dmin;
+      qCt->side[2].from = dmin;
+      qCt->uv_grid.clear();
+      qCt->name = "Ct";
+
+      // Connect sides
+      qCb->side[3].AddContact( dmin, & qCb->side[2], 0 );
+      qCb->side[3].AddContact( dmin, & qCt->side[3], 0 );
+      qCt->side[3].AddContact(    0, & qCt->side[0], 0 );
+      qCt->side[0].AddContact(    0, & qL ->side[0], dmin );
+      qL ->side[0].AddContact( dmin, & qL ->side[1], 0 );
+      qL ->side[0].AddContact( dmin, & qCb->side[2], 0 );
+
+      if ( dh == dv )
+        return computeQuadDominant( aMesh, aFace );
+      else
+        return computeQuadPref( aMesh, aFace, qCt );
+
+    } // if ( dv != 0 && dh != 0 )
+
+    const int db = quad->side[0].IsReversed() ? -1 : +1;
+    const int dr = quad->side[1].IsReversed() ? -1 : +1;
+    const int dt = quad->side[2].IsReversed() ? -1 : +1;
+    const int dl = quad->side[3].IsReversed() ? -1 : +1;
+
+    // Case dv == 0,  here possibly myQuadList.size() > 1
+    //
+    //     lw   nb  lw = dh/2
+    //    +------------+
+    //    |   |    |   |
+    //    |   | Ct |   |
+    //    | L |    | R |
+    //    |   |____|   |
+    //    |  /      \  |
+    //    | /   Cb   \ |
+    //    |/          \|
+    //    +------------+
+    const int lw = dh/2; // lateral width
+
+    double yCbL, yCbR;
+    {
+      double   lL = quad->side[3].Length();
+      double lLwL = quad->side[2].Length( tfrom,
+                                          tfrom + ( lw ) * dt );
+      yCbL = lLwL / ( lLwL + lL );
+
+      double   lR = quad->side[1].Length();
+      double lLwR = quad->side[2].Length( tfrom + ( lw + nb-1 ) * dt,
+                                          tfrom + ( lw + nb-1 + lw ) * dt);
+      yCbR = lLwR / ( lLwR + lR );
+    }
+    // Make sides separating domains Cb and L and R
+    StdMeshers_FaceSidePtr sideLCb, sideRCb;
+    UVPtStruct pTBL, pTBR; // points where 3 domains meat
+    {
+      vector<UVPtStruct> pointsLCb( lw+1 ), pointsRCb( lw+1 );
+      pointsLCb[0] = uv_eb[ 0    ];
+      pointsRCb[0] = uv_eb[ nb-1 ];
+      for ( int i = 1, i2 = nt-2; i <= lw; ++i, --i2 )
+      {
+        x  = quad->side[2].Param( i );
+        y  = yCbL * i / lw;
+        p0 = quad->side[0].Value2d( x );
+        p1 = quad->side[1].Value2d( y );
+        p2 = uv_et[ i ].UV();
+        p3 = quad->side[3].Value2d( y );
+        uv = calcUV( x,y, a0,a1,a2,a3, p0,p1,p2,p3 );
+        pointsLCb[ i ].u = uv.X();
+        pointsLCb[ i ].v = uv.Y();
+        pointsLCb[ i ].x = x;
+
+        x  = quad->side[2].Param( i2 );
+        y  = yCbR * i / lw;
+        p1 = quad->side[1].Value2d( y );
+        p0 = quad->side[0].Value2d( x );
+        p2 = uv_et[ i2 ].UV();
+        p3 = quad->side[3].Value2d( y );
+        uv = calcUV( x,y, a0,a1,a2,a3, p0,p1,p2,p3 );
+        pointsRCb[ i ].u = uv.X();
+        pointsRCb[ i ].v = uv.Y();
+        pointsRCb[ i ].x = x;
+      }
+      sideLCb = StdMeshers_FaceSide::New( pointsLCb, aFace );
+      sideRCb = StdMeshers_FaceSide::New( pointsRCb, aFace );
+      pTBL    = pointsLCb.back();
+      pTBR    = pointsRCb.back();
+    }
+    // Make sides separating domains Ct and L and R
+    StdMeshers_FaceSidePtr sideLCt, sideRCt;
+    {
+      vector<UVPtStruct> pointsLCt( nl ), pointsRCt( nl );
+      pointsLCt[0]     = pTBL;
+      pointsLCt.back() = uv_et[ lw ];
+      pointsRCt[0]     = pTBR;
+      pointsRCt.back() = uv_et[ lw + nb - 1 ];
+      x  = pTBL.x;
+      p0 = quad->side[0].Value2d( x );
+      p2 = uv_et[ lw ].UV();
+      int     iR = lw + nb - 1;
+      double  xR = pTBR.x;
+      gp_UV  p0R = quad->side[0].Value2d( xR );
+      gp_UV  p2R = uv_et[ iR ].UV();
+      for ( int i = 1; i < nl-1; ++i )
+      {
+        y  = yCbL + ( 1. - yCbL ) * i / (nl-1.);
+        p1 = quad->side[1].Value2d( y );
+        p3 = quad->side[3].Value2d( y );
+        uv = calcUV( x,y, a0,a1,a2,a3, p0,p1,p2,p3 );
+        pointsLCt[ i ].u = uv.X();
+        pointsLCt[ i ].v = uv.Y();
+
+        y  = yCbR + ( 1. - yCbR ) * i / (nl-1.);
+        p1 = quad->side[1].Value2d( y );
+        p3 = quad->side[3].Value2d( y );
+        uv = calcUV( xR,y, a0,a1,a2,a3, p0R,p1,p2R,p3 );
+        pointsRCt[ i ].u = uv.X();
+        pointsRCt[ i ].v = uv.Y();
+      }
+      sideLCt = StdMeshers_FaceSide::New( pointsLCt, aFace );
+      sideRCt = StdMeshers_FaceSide::New( pointsRCt, aFace );
+    }
+    // Make a side separating domains Cb and Ct
+    StdMeshers_FaceSidePtr sideCbCt;
+    {
+      vector<UVPtStruct> pointsCbCt( nb );
+      pointsCbCt[0]     = pTBL;
+      pointsCbCt.back() = pTBR;
+      p1 = quad->side[1].Value2d( yCbR );
+      p3 = quad->side[3].Value2d( yCbL );
+      for ( int i = 1; i < nb-1; ++i )
+      {
+        x  = quad->side[2].Param( i + lw );
+        y  = yCbL + ( yCbR - yCbL ) * i / (nb-1.);
+        p2 = uv_et[ i + lw ].UV();
+        p0 = quad->side[0].Value2d( x );
+        uv = calcUV( x,y, a0,a1,a2,a3, p0,p1,p2,p3 );
+        pointsCbCt[ i ].u = uv.X();
+        pointsCbCt[ i ].v = uv.Y();
+      }
+      sideCbCt = StdMeshers_FaceSide::New( pointsCbCt, aFace );
+    }
+    // Make Cb quad
+    FaceQuadStruct* qCb = new FaceQuadStruct( quad->face, "Cb" );
+    myQuadList.push_back( FaceQuadStruct::Ptr( qCb ));
+    qCb->side.resize(4);
+    qCb->side[0] = quad->side[0];
+    qCb->side[1] = sideRCb;
+    qCb->side[2] = sideCbCt;
+    qCb->side[3] = sideLCb;
+    // Make L quad
+    FaceQuadStruct* qL = new FaceQuadStruct( quad->face, "L" );
+    myQuadList.push_back( FaceQuadStruct::Ptr( qL ));
+    qL->side.resize(4);
+    qL->side[0] = sideLCb;
+    qL->side[1] = sideLCt;
+    qL->side[2] = quad->side[2];
+    qL->side[3] = quad->side[3];
+    qL->side[2].to = ( lw + 1 ) * dt + tfrom;
+    // Make R quad
+    FaceQuadStruct* qR = new FaceQuadStruct( quad->face, "R" );
+    myQuadList.push_back( FaceQuadStruct::Ptr( qR ));
+    qR->side.resize(4);
+    qR->side[0] = sideRCb;
+    qR->side[0].from = lw;
+    qR->side[0].to   = -1;
+    qR->side[0].di   = -1;
+    qR->side[1] = quad->side[1];
+    qR->side[2] = quad->side[2];
+    qR->side[2].from = ( lw + nb-1 ) * dt + tfrom;
+    qR->side[3] = sideRCt;
+    // Make Ct from the main quad
+    FaceQuadStruct::Ptr qCt = quad;
+    qCt->side[0] = sideCbCt;
+    qCt->side[1] = sideRCt;
+    qCt->side[2].from = ( lw ) * dt + tfrom;
+    qCt->side[2].to   = ( lw + nb ) * dt + tfrom;
+    qCt->side[3] = sideLCt;
+    qCt->uv_grid.clear();
+    qCt->name = "Ct";
+
+    // Connect sides
+    qCb->side[3].AddContact( lw, & qCb->side[2], 0 );
+    qCb->side[3].AddContact( lw, & qCt->side[3], 0 );
+    qCt->side[3].AddContact( 0,  & qCt->side[0], 0 );
+    qCt->side[0].AddContact( 0,  & qL ->side[0], lw );
+    qL ->side[0].AddContact( lw, & qL ->side[1], 0 );
+    qL ->side[0].AddContact( lw, & qCb->side[2], 0 );
+    //
+    qCb->side[1].AddContact( lw,   & qCb->side[2], nb-1 );
+    qCb->side[1].AddContact( lw,   & qCt->side[1], 0 );
+    qCt->side[0].AddContact( nb-1, & qCt->side[1], 0 );
+    qCt->side[0].AddContact( nb-1, & qR ->side[0], lw );
+    qR ->side[3].AddContact( 0,    & qR ->side[0], lw );
+    qR ->side[3].AddContact( 0,    & qCb->side[2], nb-1 );
+
+    return computeQuadDominant( aMesh, aFace );
+
+  } // if ( !myForcedPnts.empty() )
+
   if ( dh > dv ) {
     addv = (dh-dv)/2;
     nbv  = nbv + addv;
@@ -1479,19 +2005,6 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
     nbh  = nbh + addh;
   }
 
-  const vector<UVPtStruct>& uv_eb = quad->side[0]->GetUVPtStruct(true,0);
-  const vector<UVPtStruct>& uv_er = quad->side[1]->GetUVPtStruct(false,1);
-  const vector<UVPtStruct>& uv_et = quad->side[2]->GetUVPtStruct(true,1);
-  const vector<UVPtStruct>& uv_el = quad->side[3]->GetUVPtStruct(false,0);
-
-  if (uv_eb.size() != nb || uv_er.size() != nr || uv_et.size() != nt || uv_el.size() != nl)
-    return error(COMPERR_BAD_INPUT_MESH);
-
-  if ( !OldVersion )
-  {
-    // dh/2, Min(nb,nt), dh - dh/2, dv
-  }
-
   // arrays for normalized params
   TColStd_SequenceOfReal npb, npr, npt, npl;
   for (i=0; i<nb; i++) {
@@ -1523,11 +2036,6 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
       npl.InsertAfter(1,npl.Value(2)-dpr);
     }
   }
-  
-  gp_XY a0(uv_eb.front().u, uv_eb.front().v);
-  gp_XY a1(uv_eb.back().u,  uv_eb.back().v);
-  gp_XY a2(uv_et.back().u,  uv_et.back().v);
-  gp_XY a3(uv_et.front().u, uv_et.front().v);
 
   int nnn = Min(nr,nl);
   // auxilary sequence of XY for creation nodes
@@ -1543,7 +2051,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
       NodesL.SetValue(1,j,uv_el[j-1].node);
     if (dl>0) {
       // add top nodes
-      for (i=1; i<=dl; i++) 
+      for (i=1; i<=dl; i++)
         NodesL.SetValue(i+1,nl,uv_et[i].node);
       // create and add needed nodes
       TColgp_SequenceOfXY UVtmp;
@@ -1580,13 +2088,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
           if (WisF) {
             SMDS_MeshFace* F =
               myHelper->AddFace(NodesL.Value(i,j), NodesL.Value(i+1,j),
-                              NodesL.Value(i+1,j+1), NodesL.Value(i,j+1));
-            if (F) meshDS->SetMeshElementOnShape(F, geomFaceID);
-          }
-          else {
-            SMDS_MeshFace* F =
-              myHelper->AddFace(NodesL.Value(i,j), NodesL.Value(i,j+1),
-                              NodesL.Value(i+1,j+1), NodesL.Value(i+1,j));
+                                NodesL.Value(i+1,j+1), NodesL.Value(i,j+1));
             if (F) meshDS->SetMeshElementOnShape(F, geomFaceID);
           }
         }
@@ -1598,15 +2100,15 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
         UVL.Append(gp_UV (uv_el[i].u, uv_el[i].v));
       }
     }
-    
+
     // step2: create faces for right domain
     StdMeshers_Array2OfNode NodesR(1,dr+1,1,nr);
     // add right nodes
-    for (j=1; j<=nr; j++) 
+    for (j=1; j<=nr; j++)
       NodesR.SetValue(1,j,uv_er[nr-j].node);
     if (dr>0) {
       // add top nodes
-      for (i=1; i<=dr; i++) 
+      for (i=1; i<=dr; i++)
         NodesR.SetValue(i+1,1,uv_et[nt-1-i].node);
       // create and add needed nodes
       TColgp_SequenceOfXY UVtmp;
@@ -1643,13 +2145,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
           if (WisF) {
             SMDS_MeshFace* F =
               myHelper->AddFace(NodesR.Value(i,j), NodesR.Value(i+1,j),
-                              NodesR.Value(i+1,j+1), NodesR.Value(i,j+1));
-            if (F) meshDS->SetMeshElementOnShape(F, geomFaceID);
-          }
-          else {
-            SMDS_MeshFace* F =
-              myHelper->AddFace(NodesR.Value(i,j), NodesR.Value(i,j+1),
-                              NodesR.Value(i+1,j+1), NodesR.Value(i+1,j));
+                                NodesR.Value(i+1,j+1), NodesR.Value(i,j+1));
             if (F) meshDS->SetMeshElementOnShape(F, geomFaceID);
           }
         }
@@ -1661,7 +2157,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
         UVR.Append(gp_UV(uv_er[i].u, uv_er[i].v));
       }
     }
-    
+
     // step3: create faces for central domain
     StdMeshers_Array2OfNode NodesC(1,nb,1,nbv);
     // add first line using NodesL
@@ -1675,12 +2171,12 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
     for (i=1; i<nr; i++)
       NodesC.SetValue(nb,dr+i+1,NodesR(dr+1,nr-i));
     // add top nodes (last columns)
-    for (i=dl+2; i<nbh-dr; i++) 
+    for (i=dl+2; i<nbh-dr; i++)
       NodesC.SetValue(i-dl,nbv,uv_et[i-1].node);
     // add bottom nodes (first columns)
     for (i=2; i<nb; i++)
       NodesC.SetValue(i,1,uv_eb[i-1].node);
-    
+
     // create and add needed nodes
     // add linear layers
     for (i=2; i<nb; i++) {
@@ -1722,13 +2218,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
         if (WisF) {
           SMDS_MeshFace* F =
             myHelper->AddFace(NodesC.Value(i,j), NodesC.Value(i+1,j),
-                            NodesC.Value(i+1,j+1), NodesC.Value(i,j+1));
-          if (F) meshDS->SetMeshElementOnShape(F, geomFaceID);
-        }
-        else {
-          SMDS_MeshFace* F =
-            myHelper->AddFace(NodesC.Value(i,j), NodesC.Value(i,j+1),
-                            NodesC.Value(i+1,j+1), NodesC.Value(i+1,j));
+                              NodesC.Value(i+1,j+1), NodesC.Value(i,j+1));
           if (F) meshDS->SetMeshElementOnShape(F, geomFaceID);
         }
       }
@@ -1760,13 +2250,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
         if (WisF) {
           SMDS_MeshFace* F =
             myHelper->AddFace(NodesBRD.Value(i,j), NodesBRD.Value(i+1,j),
-                            NodesBRD.Value(i+1,j+1), NodesBRD.Value(i,j+1));
-          if (F) meshDS->SetMeshElementOnShape(F, geomFaceID);
-        }
-        else {
-          SMDS_MeshFace* F =
-            myHelper->AddFace(NodesBRD.Value(i,j), NodesBRD.Value(i,j+1),
-                            NodesBRD.Value(i+1,j+1), NodesBRD.Value(i+1,j));
+                              NodesBRD.Value(i+1,j+1), NodesBRD.Value(i,j+1));
           if (F) meshDS->SetMeshElementOnShape(F, geomFaceID);
         }
       }
@@ -1812,7 +2296,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
           double yy1 = y1 + dy1*i;
           double dyy = yy1 - yy0;
           for (j=1; j<=nb; j++) {
-            double x = npt.Value(i+1+drl) + 
+            double x = npt.Value(i+1+drl) +
               npb.Value(j) * (npt.Value(nt-i) - npt.Value(i+1+drl));
             double y = yy0 + dyy*x;
             gp_UV UV = calcUV2(x, y, quad, a0, a1, a2, a3);
@@ -1855,7 +2339,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
           double yy1 = y1 + dy1*i;
           double dyy = yy1 - yy0;
           for (j=1; j<=nb; j++) {
-            double x = npt.Value(i+1) + 
+            double x = npt.Value(i+1) +
               npb.Value(j) * (npt.Value(nt-i-drl) - npt.Value(i+1));
             double y = yy0 + dyy*x;
             gp_UV UV = calcUV2(x, y, quad, a0, a1, a2, a3);
@@ -1872,13 +2356,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
           if (WisF) {
             SMDS_MeshFace* F =
               myHelper->AddFace(NodesC.Value(i,j), NodesC.Value(i+1,j),
-                              NodesC.Value(i+1,j+1), NodesC.Value(i,j+1));
-            if (F) meshDS->SetMeshElementOnShape(F, geomFaceID);
-          }
-          else {
-            SMDS_MeshFace* F =
-              myHelper->AddFace(NodesC.Value(i,j), NodesC.Value(i,j+1),
-                              NodesC.Value(i+1,j+1), NodesC.Value(i+1,j));
+                                NodesC.Value(i+1,j+1), NodesC.Value(i,j+1));
             if (F) meshDS->SetMeshElementOnShape(F, geomFaceID);
           }
         }
@@ -1905,13 +2383,7 @@ bool StdMeshers_Quadrangle_2D::computeQuadPref (SMESH_Mesh &        aMesh,
         if (WisF) {
           SMDS_MeshFace* F =
             myHelper->AddFace(NodesLast.Value(i,1), NodesLast.Value(i+1,1),
-                            NodesLast.Value(i+1,2), NodesLast.Value(i,2));
-          if (F) meshDS->SetMeshElementOnShape(F, geomFaceID);
-        }
-        else {
-          SMDS_MeshFace* F =
-            myHelper->AddFace(NodesLast.Value(i,1), NodesLast.Value(i,2),
-                            NodesLast.Value(i+1,2), NodesLast.Value(i+1,2));
+                              NodesLast.Value(i+1,2), NodesLast.Value(i,2));
           if (F) meshDS->SetMeshElementOnShape(F, geomFaceID);
         }
       }
@@ -2064,12 +2536,12 @@ bool StdMeshers_Quadrangle_2D::evaluateQuadPref(SMESH_Mesh &        aMesh,
  */
 //=============================================================================
 
-void StdMeshers_Quadrangle_2D::splitQuad(SMESHDS_Mesh *       theMeshDS,
-                                         int                  theFaceID,
-                                         const SMDS_MeshNode* theNode1,
-                                         const SMDS_MeshNode* theNode2,
-                                         const SMDS_MeshNode* theNode3,
-                                         const SMDS_MeshNode* theNode4)
+void StdMeshers_Quadrangle_2D::splitQuadFace(SMESHDS_Mesh *       theMeshDS,
+                                             int                  theFaceID,
+                                             const SMDS_MeshNode* theNode1,
+                                             const SMDS_MeshNode* theNode2,
+                                             const SMDS_MeshNode* theNode3,
+                                             const SMDS_MeshNode* theNode4)
 {
   SMDS_MeshFace* face;
   if ( SMESH_TNodeXYZ( theNode1 ).SquareDistance( theNode3 ) >
@@ -2100,8 +2572,8 @@ namespace
                                    SMESH_MesherHelper*  helper,
                                    Handle(Geom_Surface) S)
   {
-    const vector<UVPtStruct>& uv_eb = quad->side[QUAD_BOTTOM_SIDE]->GetUVPtStruct();
-    const vector<UVPtStruct>& uv_et = quad->side[QUAD_TOP_SIDE   ]->GetUVPtStruct();
+    const vector<UVPtStruct>& uv_eb = quad->side[QUAD_BOTTOM_SIDE].GetUVPtStruct();
+    const vector<UVPtStruct>& uv_et = quad->side[QUAD_TOP_SIDE   ].GetUVPtStruct();
     double rBot = ( uv_eb.size() - 1 ) * uvPt.normParam;
     double rTop = ( uv_et.size() - 1 ) * uvPt.normParam;
     int iBot = int( rBot );
@@ -2112,9 +2584,9 @@ namespace
     
     gp_UV uv = calcUV(/*x,y=*/x, y,
                       /*a0,...=*/UVs[UV_A0], UVs[UV_A1], UVs[UV_A2], UVs[UV_A3],
-                      /*p0=*/quad->side[QUAD_BOTTOM_SIDE]->Value2d( x ).XY(),
+                      /*p0=*/quad->side[QUAD_BOTTOM_SIDE].grid->Value2d( x ).XY(),
                       /*p1=*/UVs[ UV_R ],
-                      /*p2=*/quad->side[QUAD_TOP_SIDE   ]->Value2d( x ).XY(),
+                      /*p2=*/quad->side[QUAD_TOP_SIDE   ].grid->Value2d( x ).XY(),
                       /*p3=*/UVs[ UV_L ]);
     gp_Pnt P = S->Value( uv.X(), uv.Y() );
     uvPt.u = uv.X();
@@ -2280,10 +2752,10 @@ bool StdMeshers_Quadrangle_2D::computeReduced (SMESH_Mesh &        aMesh,
   Handle(Geom_Surface) S = BRep_Tool::Surface(aFace);
   int i,j,geomFaceID     = meshDS->ShapeToIndex(aFace);
 
-  int nb = quad->side[0]->NbPoints(); // bottom
-  int nr = quad->side[1]->NbPoints(); // right
-  int nt = quad->side[2]->NbPoints(); // top
-  int nl = quad->side[3]->NbPoints(); // left
+  int nb = quad->side[0].NbPoints(); // bottom
+  int nr = quad->side[1].NbPoints(); // right
+  int nt = quad->side[2].NbPoints(); // top
+  int nl = quad->side[3].NbPoints(); // left
 
   //  Simple Reduce 10->8->6->4 (3 steps)     Multiple Reduce 10->4 (1 step)
   //
@@ -2372,10 +2844,10 @@ bool StdMeshers_Quadrangle_2D::computeReduced (SMESH_Mesh &        aMesh,
       }
     }
 
-    nb = quad->side[0]->NbPoints();
-    nr = quad->side[1]->NbPoints();
-    nt = quad->side[2]->NbPoints();
-    nl = quad->side[3]->NbPoints();
+    nb = quad->side[0].NbPoints();
+    nr = quad->side[1].NbPoints();
+    nt = quad->side[2].NbPoints();
+    nl = quad->side[3].NbPoints();
     dh = abs(nb-nt);
     dv = abs(nr-nl);
     int nbh = Max(nb,nt);
@@ -2392,10 +2864,10 @@ bool StdMeshers_Quadrangle_2D::computeReduced (SMESH_Mesh &        aMesh,
       nbh = nbh + addh;
     }
 
-    const vector<UVPtStruct>& uv_eb = quad->side[0]->GetUVPtStruct(true,0);
-    const vector<UVPtStruct>& uv_er = quad->side[1]->GetUVPtStruct(false,1);
-    const vector<UVPtStruct>& uv_et = quad->side[2]->GetUVPtStruct(true,1);
-    const vector<UVPtStruct>& uv_el = quad->side[3]->GetUVPtStruct(false,0);
+    const vector<UVPtStruct>& uv_eb = quad->side[0].GetUVPtStruct(true,0);
+    const vector<UVPtStruct>& uv_er = quad->side[1].GetUVPtStruct(false,1);
+    const vector<UVPtStruct>& uv_et = quad->side[2].GetUVPtStruct(true,1);
+    const vector<UVPtStruct>& uv_el = quad->side[3].GetUVPtStruct(false,0);
 
     if (uv_eb.size() != nb || uv_er.size() != nr || uv_et.size() != nt || uv_el.size() != nl)
       return error(COMPERR_BAD_INPUT_MESH);
@@ -2646,10 +3118,10 @@ bool StdMeshers_Quadrangle_2D::computeReduced (SMESH_Mesh &        aMesh,
       }
     }
 
-    nb = quad->side[0]->NbPoints();
-    nr = quad->side[1]->NbPoints();
-    nt = quad->side[2]->NbPoints();
-    nl = quad->side[3]->NbPoints();
+    nb = quad->side[0].NbPoints();
+    nr = quad->side[1].NbPoints();
+    nt = quad->side[2].NbPoints();
+    nl = quad->side[3].NbPoints();
 
     // number of rows and columns
     int nrows = nr - 1; // and also == nl - 1
@@ -2711,10 +3183,10 @@ bool StdMeshers_Quadrangle_2D::computeReduced (SMESH_Mesh &        aMesh,
       }
     }
 
-    const vector<UVPtStruct>& uv_eb = quad->side[0]->GetUVPtStruct(true,0);
-    const vector<UVPtStruct>& uv_er = quad->side[1]->GetUVPtStruct(false,1);
-    const vector<UVPtStruct>& uv_et = quad->side[2]->GetUVPtStruct(true,1);
-    const vector<UVPtStruct>& uv_el = quad->side[3]->GetUVPtStruct(false,0);
+    const vector<UVPtStruct>& uv_eb = quad->side[0].GetUVPtStruct(true,0);
+    const vector<UVPtStruct>& uv_er = quad->side[1].GetUVPtStruct(false,1);
+    const vector<UVPtStruct>& uv_et = quad->side[2].GetUVPtStruct(true,1);
+    const vector<UVPtStruct>& uv_el = quad->side[3].GetUVPtStruct(false,0);
 
     if (uv_eb.size() != nb || uv_er.size() != nr || uv_et.size() != nt || uv_el.size() != nl)
       return error(COMPERR_BAD_INPUT_MESH);
@@ -3216,6 +3688,18 @@ namespace // data for smoothing
     double d = v1 ^ v2;
     return d > 1e-100;
   }
+  //================================================================================
+  /*!
+   * \brief Returns area of a triangle
+   */
+  //================================================================================
+
+  double getArea( const gp_UV uv1, const gp_UV uv2, const gp_UV uv3 )
+  {
+    gp_XY v1 = uv1 - uv2, v2 = uv3 - uv2;
+    double a = v2 ^ v1;
+    return a;
+  }
 }
 
 //================================================================================
@@ -3234,8 +3718,7 @@ void StdMeshers_Quadrangle_2D::updateDegenUV(FaceQuadStruct::Ptr quad)
     // --------------------------------------------------------------------------
     for ( unsigned i = 0; i < quad->side.size(); ++i )
     {
-      StdMeshers_FaceSide* side = quad->side[i];
-      const vector<UVPtStruct>& uvVec = side->GetUVPtStruct();
+      const vector<UVPtStruct>& uvVec = quad->side[i].GetUVPtStruct();
 
       // find which end of the side is on degenerated shape
       int degenInd = -1;
@@ -3251,10 +3734,9 @@ void StdMeshers_Quadrangle_2D::updateDegenUV(FaceQuadStruct::Ptr quad)
       if ( i >= QUAD_TOP_SIDE )
         isPrev = !isPrev;
       int i2 = ( isPrev ? ( i + 3 ) : ( i + 1 )) % 4;
-      StdMeshers_FaceSide* side2 = quad->side[ i2 ];
-      const vector<UVPtStruct>& uvVec2 = side2->GetUVPtStruct();
+      const vector<UVPtStruct>& uvVec2 = quad->side[ i2 ].GetUVPtStruct();
       int degenInd2 = -1;
-      if ( uvVec[ degenInd ].node == uvVec2[0].node )
+      if (      uvVec[ degenInd ].node == uvVec2.front().node )
         degenInd2 = 0;
       else if ( uvVec[ degenInd ].node == uvVec2.back().node )
         degenInd2 = uvVec2.size() - 1;
@@ -3274,10 +3756,10 @@ void StdMeshers_Quadrangle_2D::updateDegenUV(FaceQuadStruct::Ptr quad)
     // ----------------------------------------------------------------------------
     for ( unsigned i = 0; i < quad->side.size(); ++i )
     {
-      StdMeshers_FaceSide* degSide = quad->side[i];
+      StdMeshers_FaceSidePtr degSide = quad->side[i];
       if ( !myHelper->IsDegenShape( degSide->EdgeID(0) ))
         continue;
-      StdMeshers_FaceSide* oppSide = quad->side[( i+2 ) % quad->side.size() ];
+      StdMeshers_FaceSidePtr oppSide = quad->side[( i+2 ) % quad->side.size() ];
       if ( degSide->NbSegments() == oppSide->NbSegments() )
         continue;
 
@@ -3286,11 +3768,10 @@ void StdMeshers_Quadrangle_2D::updateDegenUV(FaceQuadStruct::Ptr quad)
       const SMDS_MeshNode*   n = uvVecDegOld[0].node;
       Handle(Geom2d_Curve) c2d = degSide->Curve2d(0);
       double f = degSide->FirstU(0), l = degSide->LastU(0);
-      gp_Pnt2d p1( uvVecDegOld.front().u, uvVecDegOld.front().v );
-      gp_Pnt2d p2( uvVecDegOld.back().u,  uvVecDegOld.back().v );
+      gp_Pnt2d p1 = uvVecDegOld.front().UV();
+      gp_Pnt2d p2 = uvVecDegOld.back().UV();
 
-      delete degSide;
-      quad->side[i] = new StdMeshers_FaceSide( oppSide, n, &p1, &p2, c2d, f, l );
+      quad->side[i] = StdMeshers_FaceSide::New( oppSide.get(), n, &p1, &p2, c2d, f, l );
     }
 }
 
@@ -3306,6 +3787,8 @@ void StdMeshers_Quadrangle_2D::smooth (FaceQuadStruct::Ptr quad)
 
   // Get nodes to smooth
 
+  // TODO: do not smooth fixed nodes
+
   typedef map< const SMDS_MeshNode*, TSmoothNode, TIDCompare > TNo2SmooNoMap;
   TNo2SmooNoMap smooNoMap;
 
@@ -3344,11 +3827,11 @@ void StdMeshers_Quadrangle_2D::smooth (FaceQuadStruct::Ptr quad)
   // set _uv of smooth nodes on FACE boundary
   for ( unsigned i = 0; i < quad->side.size(); ++i )
   {
-    const vector<UVPtStruct>& uvVec = quad->side[i]->GetUVPtStruct();
+    const vector<UVPtStruct>& uvVec = quad->side[i].GetUVPtStruct();
     for ( unsigned j = 0; j < uvVec.size(); ++j )
     {
       TSmoothNode & sNode = smooNoMap[ uvVec[j].node ];
-      sNode._uv.SetCoord( uvVec[j].u, uvVec[j].v );
+      sNode._uv  = uvVec[j].UV();
       sNode._xyz = SMESH_TNodeXYZ( uvVec[j].node );
     }
   }
@@ -3459,37 +3942,175 @@ void StdMeshers_Quadrangle_2D::smooth (FaceQuadStruct::Ptr quad)
   }
 }
 
-/*//================================================================================
+//================================================================================
 /*!
- * \brief Finds vertices at the most sharp face corners
- *  \param [in] theFace - the FACE
- *  \param [in,out] theWire - the ordered edges of the face. It can be modified to
- *         have the first VERTEX of the first EDGE in \a vertices
- *  \param [out] theVertices - the found corner vertices in the order corresponding to
- *         the order of EDGEs in \a theWire
- *  \param [out] theNbDegenEdges - nb of degenerated EDGEs in theFace
- *  \param [in] theConsiderMesh - if \c true, only meshed VERTEXes are considered
- *         as possible corners
- *  \return int - number of quad sides found: 0, 3 or 4
+ * \brief Checks validity of generated faces
  */
 //================================================================================
 
-int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face&          theFace,
-                                         SMESH_Mesh &                theMesh,
-                                         std::list<TopoDS_Edge>&     theWire,
-                                         std::vector<TopoDS_Vertex>& theVertices,
-                                         int &                       theNbDegenEdges,
-                                         const bool                  theConsiderMesh)
+bool StdMeshers_Quadrangle_2D::check()
 {
-  theNbDegenEdges = 0;
+  const bool isOK = true;
+  if ( !myCheckOri || myQuadList.empty() || !myQuadList.front() || !myHelper )
+    return isOK;
 
-  SMESH_MesherHelper helper( theMesh );
+  TopoDS_Face      geomFace = TopoDS::Face( myHelper->GetSubShape() );
+  SMESHDS_Mesh*    meshDS   = myHelper->GetMeshDS();
+  SMESHDS_SubMesh* fSubMesh = meshDS->MeshElements( geomFace );
+  bool toCheckUV;
+  if ( geomFace.Orientation() >= TopAbs_INTERNAL ) geomFace.Orientation( TopAbs_FORWARD );
 
-  // sort theVertices by angle
-  multimap<double, TopoDS_Vertex> vertexByAngle;
-  TopTools_DataMapOfShapeReal angleByVertex;
-  TopoDS_Edge prevE = theWire.back();
-  if ( SMESH_Algo::isDegenerated( prevE ))
+  // Get a reference orientation sign
+
+  double okSign;
+  {
+    TError err;
+    TSideVector wireVec =
+      StdMeshers_FaceSide::GetFaceWires( geomFace, *myHelper->GetMesh(), true, err );
+    StdMeshers_FaceSidePtr wire = wireVec[0];
+
+    // find a right angle VERTEX
+    int iVertex;
+    double maxAngle = -1e100;
+    for ( int i = 0; i < wire->NbEdges(); ++i )
+    {
+      int iPrev = myHelper->WrapIndex( i-1, wire->NbEdges() );
+      const TopoDS_Edge& e1 = wire->Edge( iPrev );
+      const TopoDS_Edge& e2 = wire->Edge( i );
+      double angle = myHelper->GetAngle( e1, e2, geomFace );
+      if ( maxAngle < angle && angle < 0.9 * M_PI )
+      {
+        maxAngle = angle;
+        iVertex = i;
+      }
+    }
+    if ( maxAngle < -2*M_PI ) return isOK;
+
+    // get a sign of 2D area of a corner face
+
+    int iPrev = myHelper->WrapIndex( iVertex-1, wire->NbEdges() );
+    const TopoDS_Edge& e1 = wire->Edge( iPrev );
+    const TopoDS_Edge& e2 = wire->Edge( iVertex );
+
+    gp_Vec2d v1, v2; gp_Pnt2d p;
+    double u[2];
+    {
+      bool rev = ( e1.Orientation() == TopAbs_REVERSED );
+      Handle(Geom2d_Curve) c = BRep_Tool::CurveOnSurface( e1, geomFace, u[0], u[1] );
+      c->D1( u[ !rev ], p, v1 );
+      if ( !rev )
+        v1.Reverse();
+    }
+    {
+      bool rev = ( e2.Orientation() == TopAbs_REVERSED );
+      Handle(Geom2d_Curve) c = BRep_Tool::CurveOnSurface( e2, geomFace, u[0], u[1] );
+      c->D1( u[ rev ], p, v2 );
+      if ( rev )
+        v2.Reverse();
+    }
+
+    okSign = v2 ^ v1;
+
+    if ( maxAngle < 0 )
+      okSign *= -1;
+  }
+
+  // Look for incorrectly oriented faces
+
+  std::list<const SMDS_MeshElement*> badFaces;
+
+  const SMDS_MeshNode* nn [ 8 ]; // 8 is just for safety
+  gp_UV                uv [ 8 ];
+  SMDS_ElemIteratorPtr fIt = fSubMesh->GetElements();
+  while ( fIt->more() ) // loop on faces bound to a FACE
+  {
+    const SMDS_MeshElement* f = fIt->next();
+
+    const int nbN = f->NbCornerNodes();
+    for ( int i = 0; i < nbN; ++i )
+      nn[ i ] = f->GetNode( i );
+
+    const SMDS_MeshNode* nInFace = 0;
+    if ( myHelper->HasSeam() )
+      for ( int i = 0; i < nbN && !nInFace; ++i )
+        if ( !myHelper->IsSeamShape( nn[i]->getshapeId() ))
+          nInFace = nn[i];
+
+    for ( int i = 0; i < nbN; ++i )
+      uv[ i ] = myHelper->GetNodeUV( geomFace, nn[i], nInFace, &toCheckUV );
+
+    switch ( nbN ) {
+    case 4:
+    {
+      double sign1 = getArea( uv[0], uv[1], uv[2] );
+      double sign2 = getArea( uv[0], uv[2], uv[3] );
+      if ( sign1 * sign2 < 0 )
+      {
+        sign2 = getArea( uv[1], uv[2], uv[3] );
+        sign1 = getArea( uv[1], uv[3], uv[0] );
+        if ( sign1 * sign2 < 0 )
+          continue; // this should not happen
+      }
+      if ( sign1 * okSign < 0 )
+        badFaces.push_back ( f );
+      break;
+    }
+    case 3:
+    {
+      double sign = getArea( uv[0], uv[1], uv[2] );
+      if ( sign * okSign < 0 )
+        badFaces.push_back ( f );
+      break;
+    }
+    default:;
+    }
+  }
+
+  if ( !badFaces.empty() )
+  {
+    SMESH_subMesh* fSM = myHelper->GetMesh()->GetSubMesh( geomFace );
+    SMESH_ComputeErrorPtr& err = fSM->GetComputeError();
+    err.reset ( new SMESH_ComputeError( COMPERR_ALGO_FAILED,
+                                        "Inverted elements generated"));
+    err->myBadElements.swap( badFaces );
+
+    return !isOK;
+  }
+
+  return isOK;
+}
+
+/*//================================================================================
+/*!
+ * \brief Finds vertices at the most sharp face corners
+ *  \param [in] theFace - the FACE
+ *  \param [in,out] theWire - the ordered edges of the face. It can be modified to
+ *         have the first VERTEX of the first EDGE in \a vertices
+ *  \param [out] theVertices - the found corner vertices in the order corresponding to
+ *         the order of EDGEs in \a theWire
+ *  \param [out] theNbDegenEdges - nb of degenerated EDGEs in theFace
+ *  \param [in] theConsiderMesh - if \c true, only meshed VERTEXes are considered
+ *         as possible corners
+ *  \return int - number of quad sides found: 0, 3 or 4
+ */
+//================================================================================
+
+int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face&          theFace,
+                                         SMESH_Mesh &                theMesh,
+                                         std::list<TopoDS_Edge>&     theWire,
+                                         std::vector<TopoDS_Vertex>& theVertices,
+                                         int &                       theNbDegenEdges,
+                                         const bool                  theConsiderMesh)
+{
+  theNbDegenEdges = 0;
+
+  SMESH_MesherHelper helper( theMesh );
+
+  // sort theVertices by angle
+  multimap<double, TopoDS_Vertex> vertexByAngle;
+  TopTools_DataMapOfShapeReal angleByVertex;
+  TopoDS_Edge prevE = theWire.back();
+  if ( SMESH_Algo::isDegenerated( prevE ))
   {
     list<TopoDS_Edge>::reverse_iterator edge = ++theWire.rbegin();
     while ( SMESH_Algo::isDegenerated( *edge ))
@@ -3521,7 +4142,8 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face&          theFace,
   TopoDS_Shape triaVertex = helper.GetMeshDS()->IndexToShape( myTriaVertexID );
   if ( !triaVertex.IsNull() &&
        triaVertex.ShapeType() == TopAbs_VERTEX &&
-       helper.IsSubShape( triaVertex, theFace ))
+       helper.IsSubShape( triaVertex, theFace ) &&
+       ( vertexByAngle.size() != 4 || vertexByAngle.begin()->first < 5 * M_PI/180. ))
     nbCorners = 3;
   else
     triaVertex.Nullify();
@@ -3572,6 +4194,9 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face&          theFace,
     isThereVariants  = ( lostAngle * 1.1 >= lastAngle );
   }
 
+  myCheckOri = ( vertexByAngle.size() > nbCorners ||
+                 vertexByAngle.begin()->first < 5.* M_PI/180 );
+
   // make theWire begin from a corner vertex or triaVertex
   if ( nbCorners == 3 )
     while ( !triaVertex.IsSame( ( helper.IthVertex( 0, theWire.front() ))) ||
@@ -3704,3 +4329,1070 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face&          theFace,
 
   return nbCorners;
 }
+
+//================================================================================
+/*!
+ * \brief Constructor of a side of quad
+ */
+//================================================================================
+
+FaceQuadStruct::Side::Side(StdMeshers_FaceSidePtr theGrid)
+  : grid(theGrid), nbNodeOut(0), from(0), to(theGrid ? theGrid->NbPoints() : 0 ), di(1)
+{
+}
+
+//=============================================================================
+/*!
+ * \brief Constructor of a quad
+ */
+//=============================================================================
+
+FaceQuadStruct::FaceQuadStruct(const TopoDS_Face& F, const std::string& theName)
+  : face( F ), name( theName )
+{
+  side.reserve(4);
+}
+
+//================================================================================
+/*!
+ * \brief Fills myForcedPnts
+ */
+//================================================================================
+
+bool StdMeshers_Quadrangle_2D::getEnforcedUV()
+{
+  myForcedPnts.clear();
+  if ( !myParams ) return true; // missing hypothesis
+
+  std::vector< TopoDS_Shape > shapes;
+  std::vector< gp_Pnt >       points;
+  myParams->GetEnforcedNodes( shapes, points );
+
+  TopTools_IndexedMapOfShape vMap;
+  for ( size_t i = 0; i < shapes.size(); ++i )
+    if ( !shapes[i].IsNull() )
+      TopExp::MapShapes( shapes[i], TopAbs_VERTEX, vMap );
+
+  size_t nbPoints = points.size();
+  for ( int i = 1; i <= vMap.Extent(); ++i )
+    points.push_back( BRep_Tool::Pnt( TopoDS::Vertex( vMap( i ))));
+
+  // find out if all points must be in the FACE, which is so if
+  // myParams is a local hypothesis on the FACE being meshed
+  bool isStrictCheck = false;
+  {
+    SMESH_HypoFilter paramFilter( SMESH_HypoFilter::Is( myParams ));
+    TopoDS_Shape assignedTo;
+    if ( myHelper->GetMesh()->GetHypothesis( myHelper->GetSubShape(),
+                                             paramFilter,
+                                             /*ancestors=*/true,
+                                             &assignedTo ))
+      isStrictCheck = ( assignedTo.IsSame( myHelper->GetSubShape() ));
+  }
+
+  multimap< double, ForcedPoint > sortedFP; // sort points by distance from EDGEs
+
+  Standard_Real u1,u2,v1,v2;
+  const TopoDS_Face&   face = TopoDS::Face( myHelper->GetSubShape() );
+  const double          tol = BRep_Tool::Tolerance( face );
+  Handle(Geom_Surface) surf = BRep_Tool::Surface( face );
+  surf->Bounds( u1,u2,v1,v2 );
+  GeomAPI_ProjectPointOnSurf project;
+  project.Init(surf, u1,u2, v1,v2, tol );
+  Bnd_Box bbox;
+  BRepBndLib::Add( face, bbox );
+  double farTol = 0.01 * sqrt( bbox.SquareExtent() );
+
+  for ( size_t iP = 0; iP < points.size(); ++iP )
+  {
+    project.Perform( points[ iP ]);
+    if ( !project.IsDone() )
+    {
+      if ( isStrictCheck && iP < nbPoints )
+        return error
+          (TComm("Projection of an enforced point to the face failed - (")
+           << points[ iP ].X() << ", "<< points[ iP ].Y() << ", "<< points[ iP ].Z() << " )");
+      continue;
+    }
+    if ( project.LowerDistance() > farTol )
+    {
+      if ( isStrictCheck && iP < nbPoints )
+        return error
+          (COMPERR_BAD_PARMETERS, TComm("An enforced point is too far from the face, dist = ")
+           << project.LowerDistance() << " - ("
+           << points[ iP ].X() << ", "<< points[ iP ].Y() << ", "<< points[ iP ].Z() << " )");
+      continue;
+    }
+    Quantity_Parameter u, v;
+    project.LowerDistanceParameters(u, v);
+    gp_Pnt2d uv( u, v );
+    BRepClass_FaceClassifier clsf ( face, uv, tol );
+    switch ( clsf.State() ) {
+    case TopAbs_IN:
+    {
+      double edgeDist =  ( Min( Abs( u - u1 ), Abs( u - u2 )) +
+                           Min( Abs( v - v1 ), Abs( v - v2 )));
+      ForcedPoint fp;
+      fp.uv  = uv.XY();
+      fp.xyz = points[ iP ].XYZ();
+      if ( iP >= nbPoints )
+        fp.vertex = TopoDS::Vertex( vMap( iP - nbPoints + 1 ));
+
+      sortedFP.insert( make_pair( edgeDist, fp ));
+      break;
+    }
+    case TopAbs_OUT:
+    {
+      if ( isStrictCheck && iP < nbPoints )
+        return error
+          (COMPERR_BAD_PARMETERS, TComm("An enforced point is out of the face boundary - ")
+           << points[ iP ].X() << ", "<< points[ iP ].Y() << ", "<< points[ iP ].Z() << " )");
+      break;
+    }
+    case TopAbs_ON:
+    {
+      if ( isStrictCheck && iP < nbPoints )
+        return error
+          (COMPERR_BAD_PARMETERS, TComm("An enforced point is on the face boundary - ")
+           << points[ iP ].X() << ", "<< points[ iP ].Y() << ", "<< points[ iP ].Z() << " )");
+      break;
+    }
+    default:
+    {
+      if ( isStrictCheck && iP < nbPoints )
+        return error
+          (TComm("Classification of an enforced point ralative to the face boundary failed - ")
+           << points[ iP ].X() << ", "<< points[ iP ].Y() << ", "<< points[ iP ].Z() << " )");
+    }
+    }
+  }
+
+  multimap< double, ForcedPoint >::iterator d2uv = sortedFP.begin();
+  for ( ; d2uv != sortedFP.end(); ++d2uv )
+    myForcedPnts.push_back( (*d2uv).second );
+
+  return true;
+}
+
+//================================================================================
+/*!
+ * \brief Splits quads by adding points of enforced nodes and create nodes on
+ *        the sides shared by quads
+ */
+//================================================================================
+
+bool StdMeshers_Quadrangle_2D::addEnforcedNodes()
+{
+  // if ( myForcedPnts.empty() )
+  //   return true;
+
+  // make a map of quads sharing a side
+  map< StdMeshers_FaceSidePtr, vector< FaceQuadStruct::Ptr > > quadsBySide;
+  list< FaceQuadStruct::Ptr >::iterator quadIt = myQuadList.begin();
+  for ( ; quadIt != myQuadList.end(); ++quadIt )
+    for ( size_t iSide = 0; iSide < (*quadIt)->side.size(); ++iSide )
+    {
+      if ( !setNormalizedGrid( *quadIt ))
+        return false;
+      quadsBySide[ (*quadIt)->side[iSide] ].push_back( *quadIt );
+    }
+
+  SMESH_Mesh*          mesh = myHelper->GetMesh();
+  SMESHDS_Mesh*      meshDS = myHelper->GetMeshDS();
+  const TopoDS_Face&   face = TopoDS::Face( myHelper->GetSubShape() );
+  Handle(Geom_Surface) surf = BRep_Tool::Surface( face );
+
+  for ( size_t iFP = 0; iFP < myForcedPnts.size(); ++iFP )
+  {
+    bool isNodeEnforced = false;
+
+    // look for a quad enclosing a enforced point
+    for ( quadIt = myQuadList.begin(); quadIt != myQuadList.end(); ++quadIt )
+    {
+      FaceQuadStruct::Ptr quad = *quadIt;
+      if ( !setNormalizedGrid( *quadIt ))
+        return false;
+      int i,j;
+      if ( !quad->findCell( myForcedPnts[ iFP ], i, j ))
+        continue;
+
+      // a grid cell is found, select a node of the cell to move
+      // to the enforced point to and to split the quad at
+      multimap< double, pair< int, int > > ijByDist;
+      for ( int di = 0; di < 2; ++di )
+        for ( int dj = 0; dj < 2; ++dj )
+        {
+          double dist2 = ( myForcedPnts[ iFP ].uv - quad->UVPt( i+di,j+dj ).UV() ).SquareModulus();
+          ijByDist.insert( make_pair( dist2, make_pair( di,dj )));
+        }
+      // try all nodes starting from the closest one
+      set< FaceQuadStruct::Ptr > changedQuads;
+      multimap< double, pair< int, int > >::iterator d2ij = ijByDist.begin();
+      for ( ; !isNodeEnforced  &&  d2ij != ijByDist.end(); ++d2ij )
+      {
+        int di = d2ij->second.first;
+        int dj = d2ij->second.second;
+
+        // check if a node is at a side
+        int iSide = -1;
+        if ( dj== 0 && j == 0 )
+          iSide = QUAD_BOTTOM_SIDE;
+        else if ( dj == 1 && j+2 == quad->jSize )
+          iSide = QUAD_TOP_SIDE;
+        else if ( di == 0 && i == 0 )
+          iSide = QUAD_LEFT_SIDE;
+        else if ( di == 1 && i+2 == quad->iSize )
+          iSide = QUAD_RIGHT_SIDE;
+
+        if ( iSide > -1 ) // ----- node is at a side
+        {
+          FaceQuadStruct::Side& side = quad->side[ iSide ];
+          // check if this node can be moved
+          if ( quadsBySide[ side ].size() < 2 )
+            continue; // its a face boundary -> can't move the node
+
+          int quadNodeIndex = ( iSide % 2 ) ? j : i;
+          int sideNodeIndex = side.ToSideIndex( quadNodeIndex );
+          if ( side.IsForced( sideNodeIndex ))
+          {
+            // the node is already moved to another enforced point
+            isNodeEnforced = quad->isEqual( myForcedPnts[ iFP ], i, j );
+            continue;
+          }
+          // make a node of a side forced
+          vector<UVPtStruct>& points = (vector<UVPtStruct>&) side.GetUVPtStruct();
+          points[ sideNodeIndex ].u = myForcedPnts[ iFP ].U();
+          points[ sideNodeIndex ].v = myForcedPnts[ iFP ].V();
+
+          updateSideUV( side, sideNodeIndex, quadsBySide );
+
+          // update adjacent sides
+          set< StdMeshers_FaceSidePtr > updatedSides;
+          updatedSides.insert( side );
+          for ( size_t i = 0; i < side.contacts.size(); ++i )
+            if ( side.contacts[i].point == sideNodeIndex )
+            {
+              const vector< FaceQuadStruct::Ptr >& adjQuads =
+                quadsBySide[ *side.contacts[i].other_side ];
+              if ( adjQuads.size() > 1 &&
+                   updatedSides.insert( * side.contacts[i].other_side ).second )
+              {
+                updateSideUV( *side.contacts[i].other_side,
+                              side.contacts[i].other_point,
+                              quadsBySide );
+              }
+              changedQuads.insert( adjQuads.begin(), adjQuads.end() );
+            }
+          const vector< FaceQuadStruct::Ptr >& adjQuads = quadsBySide[ side ];
+          changedQuads.insert( adjQuads.begin(), adjQuads.end() );
+
+          isNodeEnforced = true;
+        }
+        else // ------------------ node is inside the quad
+        {
+          i += di;
+          j += dj;
+          // make a new side passing through IJ node and split the quad
+          int indForced, iNewSide;
+          if ( quad->iSize < quad->jSize ) // split vertically
+          {
+            quad->updateUV( myForcedPnts[ iFP ].uv, i, j, /*isVert=*/true );
+            indForced = j;
+            iNewSide  = splitQuad( quad, i, 0 );
+          }
+          else
+          {
+            quad->updateUV( myForcedPnts[ iFP ].uv, i, j, /*isVert=*/false );
+            indForced = i;
+            iNewSide  = splitQuad( quad, 0, j );
+          }
+          FaceQuadStruct::Ptr   newQuad = myQuadList.back();
+          FaceQuadStruct::Side& newSide = newQuad->side[ iNewSide ];
+
+          newSide.forced_nodes.insert( indForced );
+          quad->side[( iNewSide+2 ) % 4 ].forced_nodes.insert( indForced );
+
+          quadsBySide[ newSide ].push_back( quad );
+          quadsBySide[ newQuad->side[0] ].push_back( newQuad );
+          quadsBySide[ newQuad->side[1] ].push_back( newQuad );
+          quadsBySide[ newQuad->side[2] ].push_back( newQuad );
+          quadsBySide[ newQuad->side[3] ].push_back( newQuad );
+
+          isNodeEnforced = true;
+
+        } // end of "node is inside the quad"
+
+      } // loop on nodes of the cell
+
+      // remove out-of-date uv grid of changedQuads
+      set< FaceQuadStruct::Ptr >::iterator qIt = changedQuads.begin();
+      for ( ; qIt != changedQuads.end(); ++qIt )
+        (*qIt)->uv_grid.clear();
+
+      if ( isNodeEnforced )
+        break;
+
+    } // loop on quads
+
+    if ( !isNodeEnforced )
+    {
+      if ( !myForcedPnts[ iFP ].vertex.IsNull() )
+        return error(TComm("Unable to move any node to vertex #")
+                     <<myHelper->GetMeshDS()->ShapeToIndex( myForcedPnts[ iFP ].vertex ));
+      else
+        return error(TComm("Unable to move any node to point ( ")
+                     << myForcedPnts[iFP].xyz.X() << ", "
+                     << myForcedPnts[iFP].xyz.Y() << ", "
+                     << myForcedPnts[iFP].xyz.Z() << " )");
+    }
+
+  } // loop on enforced points
+
+  // Compute nodes on all sides, where not yet present
+
+  for ( quadIt = myQuadList.begin(); quadIt != myQuadList.end(); ++quadIt )
+  {
+    FaceQuadStruct::Ptr quad = *quadIt;
+    for ( int iSide = 0; iSide < 4; ++iSide )
+    {
+      FaceQuadStruct::Side & side = quad->side[ iSide ];
+      if ( side.nbNodeOut > 0 )
+        continue; // emulated side
+      vector< FaceQuadStruct::Ptr >& quadVec = quadsBySide[ side ];
+      if ( quadVec.size() <= 1 )
+        continue; // outer side
+
+      bool missedNodesOnSide = false;
+      const vector<UVPtStruct>& points = side.grid->GetUVPtStruct();
+      for ( size_t iC = 0; iC < side.contacts.size(); ++iC )
+      {
+        const vector<UVPtStruct>& oGrid = side.contacts[iC].other_side->grid->GetUVPtStruct();
+        const UVPtStruct&         uvPt  = points[ side.contacts[iC].point ];
+        if ( side.contacts[iC].other_point >= oGrid.size()      ||
+             side.contacts[iC].point       >= points.size() )
+          throw SALOME_Exception( "StdMeshers_Quadrangle_2D::addEnforcedNodes(): wrong contact" );
+        if ( oGrid[ side.contacts[iC].other_point ].node )
+          (( UVPtStruct& ) uvPt).node = oGrid[ side.contacts[iC].other_point ].node;
+      }
+      for ( size_t iP = 0; iP < points.size(); ++iP )
+        if ( !points[ iP ].node )
+        {
+          UVPtStruct& uvPnt = ( UVPtStruct& ) points[ iP ];
+          gp_Pnt P = surf->Value( uvPnt.u, uvPnt.v );
+          uvPnt.node = meshDS->AddNode(P.X(), P.Y(), P.Z());
+          meshDS->SetNodeOnFace( uvPnt.node, myHelper->GetSubShapeID(), uvPnt.u, uvPnt.v );
+          missedNodesOnSide = true;
+        }
+      if ( missedNodesOnSide )
+      {
+        // clear uv_grid where nodes are missing
+        for ( size_t iQ = 0; iQ < quadVec.size(); ++iQ )
+          quadVec[ iQ ]->uv_grid.clear();
+      }
+    }
+  }
+
+  return true;
+}
+
+//================================================================================
+/*!
+ * \brief Splits a quad at I or J. Returns an index of a new side in the new quad
+ */
+//================================================================================
+
+int StdMeshers_Quadrangle_2D::splitQuad(FaceQuadStruct::Ptr quad, int I, int J)
+{
+  FaceQuadStruct* newQuad = new FaceQuadStruct( quad->face );
+  myQuadList.push_back( FaceQuadStruct::Ptr( newQuad ));
+
+  vector<UVPtStruct> points;
+  if ( I > 0 )
+  {
+    points.reserve( quad->jSize );
+    for ( int jP = 0; jP < quad->jSize; ++jP )
+      points.push_back( quad->UVPt( I, jP ));
+
+    newQuad->side.resize( 4 );
+    newQuad->side[ QUAD_BOTTOM_SIDE ] = quad->side[ QUAD_BOTTOM_SIDE ];
+    newQuad->side[ QUAD_RIGHT_SIDE  ] = quad->side[ QUAD_RIGHT_SIDE  ];
+    newQuad->side[ QUAD_TOP_SIDE    ] = quad->side[ QUAD_TOP_SIDE    ];
+    newQuad->side[ QUAD_LEFT_SIDE   ] = StdMeshers_FaceSide::New( points, quad->face );
+
+    FaceQuadStruct::Side& newSide  = newQuad->side[ QUAD_LEFT_SIDE ];
+    FaceQuadStruct::Side& newSide2 = quad->side   [ QUAD_RIGHT_SIDE ];
+
+    quad->side[ QUAD_RIGHT_SIDE  ] = newSide;
+
+    int iBot = quad->side[ QUAD_BOTTOM_SIDE ].ToSideIndex( I );
+    int iTop = quad->side[ QUAD_TOP_SIDE    ].ToSideIndex( I );
+
+    newSide.AddContact ( 0,               & quad->side[ QUAD_BOTTOM_SIDE ], iBot );
+    newSide2.AddContact( 0,               & quad->side[ QUAD_BOTTOM_SIDE ], iBot );
+    newSide.AddContact ( quad->jSize - 1, & quad->side[ QUAD_TOP_SIDE    ], iTop );
+    newSide2.AddContact( quad->jSize - 1, & quad->side[ QUAD_TOP_SIDE    ], iTop );
+    // cout << "Contact: L " << &newSide << " "<< newSide.NbPoints()
+    //      << " R " << &newSide2 << " "<< newSide2.NbPoints()
+    //      << " B " << &quad->side[ QUAD_BOTTOM_SIDE ] << " "<< quad->side[ QUAD_BOTTOM_SIDE].NbPoints()
+    //      << " T " << &quad->side[ QUAD_TOP_SIDE ]  << " "<< quad->side[ QUAD_TOP_SIDE].NbPoints()<< endl;
+
+    newQuad->side[ QUAD_BOTTOM_SIDE ].from = iBot;
+    newQuad->side[ QUAD_TOP_SIDE    ].from = iTop;
+    newQuad->name = ( TComm("Right of I=") << I );
+
+    quad->side[ QUAD_BOTTOM_SIDE ].to = iBot + 1;
+    quad->side[ QUAD_TOP_SIDE    ].to = iTop + 1;
+    quad->uv_grid.clear();
+
+    return QUAD_LEFT_SIDE;
+  }
+  else if ( J > 0 ) //// split horizontally, a new quad is below an old one
+  {
+    points.reserve( quad->iSize );
+    for ( int iP = 0; iP < quad->iSize; ++iP )
+      points.push_back( quad->UVPt( iP, J ));
+
+    newQuad->side.resize( 4 );
+    newQuad->side[ QUAD_BOTTOM_SIDE ] = quad->side[ QUAD_BOTTOM_SIDE ];
+    newQuad->side[ QUAD_RIGHT_SIDE  ] = quad->side[ QUAD_RIGHT_SIDE  ];
+    newQuad->side[ QUAD_TOP_SIDE    ] = StdMeshers_FaceSide::New( points, quad->face );
+    newQuad->side[ QUAD_LEFT_SIDE   ] = quad->side[ QUAD_LEFT_SIDE   ];
+
+    FaceQuadStruct::Side& newSide  = newQuad->side[ QUAD_TOP_SIDE    ];
+    FaceQuadStruct::Side& newSide2 = quad->side   [ QUAD_BOTTOM_SIDE ];
+
+    quad->side[ QUAD_BOTTOM_SIDE ] = newSide;
+
+    int iLft = quad->side[ QUAD_LEFT_SIDE  ].ToSideIndex( J );
+    int iRgt = quad->side[ QUAD_RIGHT_SIDE ].ToSideIndex( J );
+
+    newSide.AddContact ( 0,               & quad->side[ QUAD_LEFT_SIDE  ], iLft );
+    newSide2.AddContact( 0,               & quad->side[ QUAD_LEFT_SIDE  ], iLft );
+    newSide.AddContact ( quad->iSize - 1, & quad->side[ QUAD_RIGHT_SIDE ], iRgt );
+    newSide2.AddContact( quad->iSize - 1, & quad->side[ QUAD_RIGHT_SIDE ], iRgt );
+    // cout << "Contact: T " << &newSide << " "<< newSide.NbPoints()
+    //      << " B " << &newSide2 << " "<< newSide2.NbPoints()
+    //      << " L " << &quad->side[ QUAD_LEFT_SIDE ] << " "<< quad->side[ QUAD_LEFT_SIDE].NbPoints()
+    //      << " R " << &quad->side[ QUAD_RIGHT_SIDE ]  << " "<< quad->side[ QUAD_RIGHT_SIDE].NbPoints()<< endl;
+
+    newQuad->side[ QUAD_RIGHT_SIDE ].to = iRgt+1;
+    newQuad->side[ QUAD_LEFT_SIDE  ].to = iLft+1;
+    newQuad->name = ( TComm("Below J=") << J );
+
+    quad->side[ QUAD_RIGHT_SIDE ].from = iRgt;
+    quad->side[ QUAD_LEFT_SIDE  ].from = iLft;
+    quad->uv_grid.clear();
+
+    return QUAD_TOP_SIDE;
+  }
+
+  myQuadList.pop_back();
+  return -1;
+}
+
+//================================================================================
+/*!
+ * \brief Updates UV of a side after moving its node
+ */
+//================================================================================
+
+void StdMeshers_Quadrangle_2D::updateSideUV( FaceQuadStruct::Side&  side,
+                                             int                    iForced,
+                                             const TQuadsBySide&    quadsBySide,
+                                             int *                  iNext)
+{
+  if ( !iNext )
+  {
+    side.forced_nodes.insert( iForced );
+
+    // update parts of the side before and after iForced
+
+    set<int>::iterator iIt = side.forced_nodes.upper_bound( iForced );
+    int iEnd = Min( side.NbPoints()-1, ( iIt == side.forced_nodes.end() ) ? int(1e7) : *iIt );
+    if ( iForced + 1 < iEnd )
+      updateSideUV( side, iForced, quadsBySide, &iEnd );
+
+    iIt = side.forced_nodes.lower_bound( iForced );
+    int iBeg = Max( 0, ( iIt == side.forced_nodes.begin() ) ? 0 : *--iIt );
+    if ( iForced - 1 > iBeg )
+      updateSideUV( side, iForced, quadsBySide, &iBeg );
+
+    return;
+  }
+
+  const int iFrom    = Min ( iForced, *iNext );
+  const int iTo      = Max ( iForced, *iNext ) + 1;
+  const int sideSize = iTo - iFrom;
+
+  vector<UVPtStruct> points[4]; // side points of a temporary quad
+
+  // from the quads get grid points adjacent to the side
+  // to make two sides of a temporary quad
+  vector< FaceQuadStruct::Ptr > quads = quadsBySide.find( side )->second; // copy!
+  for ( int is2nd = 0; is2nd < 2; ++is2nd )
+  {
+    points[ is2nd ].reserve( sideSize );
+    int nbLoops = 0;
+    while ( points[is2nd].size() < sideSize )
+    {
+      int iCur = iFrom + points[is2nd].size() - int( !points[is2nd].empty() );
+
+      // look for a quad adjacent to iCur-th point of the side
+      for ( size_t iQ = 0; iQ < quads.size(); ++iQ )
+      {
+        FaceQuadStruct::Ptr q = quads[ iQ ];
+        if ( !q )
+          continue;
+        size_t iS;
+        for ( iS = 0; iS < q->side.size(); ++iS )
+          if ( side.grid == q->side[ iS ].grid )
+            break;
+        bool isOut;
+        if ( !q->side[ iS ].IsReversed() )
+          isOut = ( q->side[ iS ].from > iCur || q->side[ iS ].to-1 <= iCur );
+        else
+          isOut = ( q->side[ iS ].to  >= iCur || q->side[ iS ].from <= iCur );
+        if ( isOut )
+          continue;
+        if ( !setNormalizedGrid( q ))
+          continue;
+
+        // found - copy points
+        int i,j,di,dj,nb;
+        if ( iS % 2 ) // right or left
+        {
+          i  = ( iS == QUAD_LEFT_SIDE ) ? 1 : q->iSize-2;
+          j  = q->side[ iS ].ToQuadIndex( iCur );
+          di = 0;
+          dj = ( q->side[ iS ].IsReversed() ) ? -1  : +1;
+          nb = ( q->side[ iS ].IsReversed() ) ? j+1 : q->jSize-j;
+        }
+        else // bottom or top
+        {
+          i  = q->side[ iS ].ToQuadIndex( iCur );
+          j  = ( iS == QUAD_BOTTOM_SIDE )  ?  1 : q->jSize-2;
+          di = ( q->side[ iS ].IsReversed() ) ? -1  : +1;
+          dj = 0;
+          nb = ( q->side[ iS ].IsReversed() ) ? i+1 : q->iSize-i;
+        }
+        if ( !points[is2nd].empty() )
+        {
+          gp_UV lastUV = points[is2nd].back().UV();
+          gp_UV quadUV = q->UVPt( i, j ).UV();
+          if ( ( lastUV - quadUV ).SquareModulus() > 1e-10 )
+            continue; // quad is on the other side of the side
+          i += di; j += dj; --nb;
+        }
+        for ( ; nb > 0 ; --nb )
+        {
+          points[ is2nd ].push_back( q->UVPt( i, j ));
+          if ( points[is2nd].size() >= sideSize )
+            break;
+          i += di; j += dj;
+        }
+        quads[ iQ ].reset(); // not to use this quad anymore
+
+        if ( points[is2nd].size() >= sideSize )
+          break;
+      } // loop on quads
+
+      if ( nbLoops++ > quads.size() )
+        throw SALOME_Exception( "StdMeshers_Quadrangle_2D::updateSideUV() bug: infinite loop" );
+
+    } // while ( points[is2nd].size() < sideSize )
+  } // two loops to fill points[0] and points[1]
+
+  // points for other pair of opposite sides of the temporary quad
+
+  enum { L,R,B,T }; // side index of points[]
+
+  points[B].push_back( points[L].front() );
+  points[B].push_back( side.GetUVPtStruct()[ iFrom ]);
+  points[B].push_back( points[R].front() );
+
+  points[T].push_back( points[L].back() );
+  points[T].push_back( side.GetUVPtStruct()[ iTo-1 ]);
+  points[T].push_back( points[R].back() );
+
+  // make the temporary quad
+  FaceQuadStruct::Ptr tmpQuad
+    ( new FaceQuadStruct( TopoDS::Face( myHelper->GetSubShape() ), "tmpQuad"));
+  tmpQuad->side.push_back( StdMeshers_FaceSide::New( points[B] )); // bottom
+  tmpQuad->side.push_back( StdMeshers_FaceSide::New( points[R] )); // right
+  tmpQuad->side.push_back( StdMeshers_FaceSide::New( points[T] ));
+  tmpQuad->side.push_back( StdMeshers_FaceSide::New( points[L] ));
+
+  // compute new UV of the side
+  setNormalizedGrid( tmpQuad );
+  gp_UV uv = tmpQuad->UVPt(1,0).UV();
+  tmpQuad->updateUV( uv, 1,0, /*isVertical=*/true );
+
+  // update UV of the side
+  vector<UVPtStruct>& sidePoints = (vector<UVPtStruct>&) side.GetUVPtStruct();
+  for ( int i = iFrom; i < iTo; ++i )
+  {
+    const uvPtStruct& uvPt = tmpQuad->UVPt( 1, i-iFrom );
+    sidePoints[ i ].u = uvPt.u;
+    sidePoints[ i ].v = uvPt.v;
+  }
+}
+
+//================================================================================
+/*!
+ * \brief Finds indices of a grid quad enclosing the given enforced UV
+ */
+//================================================================================
+
+bool FaceQuadStruct::findCell( const gp_XY& UV, int & I, int & J )
+{
+  // setNormalizedGrid() must be called before!
+  if ( uv_box.IsOut( UV ))
+    return false;
+
+  // find an approximate position
+  double x = 0.5, y = 0.5;
+  gp_XY t0 = UVPt( iSize - 1, 0 ).UV();
+  gp_XY t1 = UVPt( 0, jSize - 1 ).UV();
+  gp_XY t2 = UVPt( 0, 0         ).UV();
+  SMESH_MeshAlgos::GetBarycentricCoords( UV, t0, t1, t2, x, y );
+  x = Min( 1., Max( 0., x ));
+  y = Min( 1., Max( 0., y ));
+
+  // precise the position
+  normPa2IJ( x,y, I,J );
+  if ( !isNear( UV, I,J ))
+  {
+    // look for the most close IJ by traversing uv_grid in the middle
+    double dist2, minDist2 = ( UV - UVPt( I,J ).UV() ).SquareModulus();
+    for ( int isU = 0; isU < 2; ++isU )
+    {
+      int ind1 = isU ? 0 : iSize / 2;
+      int ind2 = isU ? jSize / 2 : 0;
+      int di1  = isU ? Max( 2, iSize / 20 ) : 0;
+      int di2  = isU ? 0 : Max( 2, jSize / 20 );
+      int i,nb = isU ? iSize / di1 : jSize / di2;
+      for ( i = 0; i < nb; ++i, ind1 += di1, ind2 += di2 )
+        if (( dist2 = ( UV - UVPt( ind1,ind2 ).UV() ).SquareModulus() ) < minDist2 )
+        {
+          I = ind1;
+          J = ind2;
+          if ( isNear( UV, I,J ))
+            return true;
+          minDist2 = ( UV - UVPt( I,J ).UV() ).SquareModulus();
+        }
+    }
+    if ( !isNear( UV, I,J, Max( iSize, jSize ) /2 ))
+      return false;
+  }
+  return true;
+}
+
+//================================================================================
+/*!
+ * \brief Find indices (i,j) of a point in uv_grid by normalized parameters (x,y)
+ */
+//================================================================================
+
+void FaceQuadStruct::normPa2IJ(double X, double Y, int & I, int & J )
+{
+
+  I = Min( int ( iSize * X ), iSize - 2 );
+  J = Min( int ( jSize * Y ), jSize - 2 );
+
+  int oldI, oldJ;
+  do
+  {
+    oldI = I, oldJ = J;
+    while ( X <= UVPt( I,J ).x   && I != 0 )
+      --I;
+    while ( X >  UVPt( I+1,J ).x && I+2 < iSize )
+      ++I;
+    while ( Y <= UVPt( I,J ).y   && J != 0 )
+      --J;
+    while ( Y >  UVPt( I,J+1 ).y && J+2 < jSize )
+      ++J;
+  } while ( oldI != I || oldJ != J );
+}
+
+//================================================================================
+/*!
+ * \brief Looks for UV in quads around a given (I,J) and precise (I,J)
+ */
+//================================================================================
+
+bool FaceQuadStruct::isNear( const gp_XY& UV, int & I, int & J, int nbLoops )
+{
+  if ( I+1 >= iSize ) I = iSize - 2;
+  if ( J+1 >= jSize ) J = jSize - 2;
+
+  double bcI, bcJ;
+  gp_XY uvI, uvJ, uv0, uv1;
+  for ( int iLoop = 0; iLoop < nbLoops; ++iLoop )
+  {
+    int oldI = I, oldJ = J;
+
+    uvI = UVPt( I+1, J ).UV();
+    uvJ = UVPt( I, J+1 ).UV();
+    uv0 = UVPt( I, J   ).UV();
+    SMESH_MeshAlgos::GetBarycentricCoords( UV, uvI, uvJ, uv0, bcI, bcJ );
+    if ( bcI >= 0. && bcJ >= 0. && bcI + bcJ <= 1.)
+      return true;
+
+    if ( I > 0       && bcI < 0. ) --I;
+    if ( I+2 < iSize && bcI > 1. ) ++I;
+    if ( J > 0       && bcJ < 0. ) --J;
+    if ( J+2 < jSize && bcJ > 1. ) ++J;
+
+    uv1 = UVPt( I+1,J+1).UV();
+    if ( I != oldI || J != oldJ )
+    {
+      uvI = UVPt( I+1, J ).UV();
+      uvJ = UVPt( I, J+1 ).UV();
+    }
+    SMESH_MeshAlgos::GetBarycentricCoords( UV, uvI, uvJ, uv1, bcI, bcJ );
+    if ( bcI >= 0. && bcJ >= 0. && bcI + bcJ <= 1.)
+      return true;
+
+    if ( I > 0       && bcI > 1. ) --I;
+    if ( I+2 < iSize && bcI < 0. ) ++I;
+    if ( J > 0       && bcJ > 1. ) --J;
+    if ( J+2 < jSize && bcJ < 0. ) ++J;
+
+    if ( I == oldI && J == oldJ )
+      return false;
+
+    if ( iLoop+1 == nbLoops )
+    {
+      uvI = UVPt( I+1, J ).UV();
+      uvJ = UVPt( I, J+1 ).UV();
+      uv0 = UVPt( I, J   ).UV();
+      SMESH_MeshAlgos::GetBarycentricCoords( UV, uvI, uvJ, uv0, bcI, bcJ );
+      if ( bcI >= 0. && bcJ >= 0. && bcI + bcJ <= 1.)
+        return true;
+
+      uv1 = UVPt( I+1,J+1).UV();
+      SMESH_MeshAlgos::GetBarycentricCoords( UV, uvI, uvJ, uv1, bcI, bcJ );
+      if ( bcI >= 0. && bcJ >= 0. && bcI + bcJ <= 1.)
+        return true;
+    }
+  }
+  return false;
+}
+
+//================================================================================
+/*!
+ * \brief Checks if a given UV is equal to a given grid point
+ */
+//================================================================================
+
+bool FaceQuadStruct::isEqual( const gp_XY& UV, int I, int J )
+{
+  TopLoc_Location loc;
+  Handle(Geom_Surface) surf = BRep_Tool::Surface( face, loc );
+  gp_Pnt p1 = surf->Value( UV.X(), UV.Y() );
+  gp_Pnt p2 = surf->Value( UVPt( I,J ).u, UVPt( I,J ).v );
+
+  double dist2 = 1e100;
+  for ( int di = -1; di < 2; di += 2 )
+  {
+    int i = I + di;
+    if ( i < 0 || i+1 >= iSize ) continue;
+    for ( int dj = -1; dj < 2; dj += 2 )
+    {
+      int j = J + dj;
+      if ( j < 0 || j+1 >= jSize ) continue;
+
+      dist2 = Min( dist2,
+                   p2.SquareDistance( surf->Value( UVPt( i,j ).u, UVPt( i,j ).v )));
+    }
+  }
+  double tol2 = dist2 / 1000.;
+  return p1.SquareDistance( p2 ) < tol2;
+}
+
+//================================================================================
+/*!
+ * \brief Recompute UV of grid points around a moved point in one direction
+ */
+//================================================================================
+
+void FaceQuadStruct::updateUV( const gp_XY& UV, int I, int J, bool isVertical )
+{
+  UVPt( I, J ).u = UV.X();
+  UVPt( I, J ).v = UV.Y();
+
+  if ( isVertical )
+  {
+    // above J
+    if ( J+1 < jSize-1 )
+    {
+      gp_UV a0 = UVPt( 0,       J       ).UV();
+      gp_UV a1 = UVPt( iSize-1, J       ).UV();
+      gp_UV a2 = UVPt( iSize-1, jSize-1 ).UV();
+      gp_UV a3 = UVPt( 0,       jSize-1 ).UV();
+
+      gp_UV p0 = UVPt( I, J       ).UV();
+      gp_UV p2 = UVPt( I, jSize-1 ).UV();
+      const double y0 = UVPt( I, J ).y, dy = 1. - y0;
+      for (int j = J+1; j < jSize-1; j++)
+      {
+        gp_UV p1 = UVPt( iSize-1, j ).UV();
+        gp_UV p3 = UVPt( 0,       j ).UV();
+
+        UVPtStruct& uvPt = UVPt( I, j );
+        gp_UV uv = calcUV( uvPt.x, ( uvPt.y - y0 ) / dy, a0,a1,a2,a3, p0,p1,p2,p3);
+        uvPt.u = uv.X();
+        uvPt.v = uv.Y();
+      }
+    }
+    // under J
+    if ( J-1 > 0 )
+    {
+      gp_UV a0 = UVPt( 0,       0 ).UV();
+      gp_UV a1 = UVPt( iSize-1, 0 ).UV();
+      gp_UV a2 = UVPt( iSize-1, J ).UV();
+      gp_UV a3 = UVPt( 0,       J ).UV();
+
+      gp_UV p0 = UVPt( I, 0 ).UV();
+      gp_UV p2 = UVPt( I, J ).UV();
+      const double y0 = 0., dy = UVPt( I, J ).y - y0;
+      for (int j = 1; j < J; j++)
+      {
+        gp_UV p1 = UVPt( iSize-1, j ).UV();
+        gp_UV p3 = UVPt( 0,       j ).UV();
+
+        UVPtStruct& uvPt = UVPt( I, j );
+        gp_UV uv = calcUV( uvPt.x, ( uvPt.y - y0 ) / dy, a0,a1,a2,a3, p0,p1,p2,p3);
+        uvPt.u = uv.X();
+        uvPt.v = uv.Y();
+      }
+    }
+  }
+  else  // horizontally
+  {
+    // before I
+    if ( I-1 > 0 )
+    {
+      gp_UV a0 = UVPt( 0, 0 ).UV();
+      gp_UV a1 = UVPt( I, 0 ).UV();
+      gp_UV a2 = UVPt( I, jSize-1 ).UV();
+      gp_UV a3 = UVPt( 0, jSize-1 ).UV();
+
+      gp_UV p1 = UVPt( I, J ).UV();
+      gp_UV p3 = UVPt( 0, J ).UV();
+      const double x0 = 0., dx = UVPt( I, J ).x - x0;
+      for (int i = 1; i < I; i++)
+      {
+        gp_UV p0 = UVPt( i, 0       ).UV();
+        gp_UV p2 = UVPt( i, jSize-1 ).UV();
+
+        UVPtStruct& uvPt = UVPt( i, J );
+        gp_UV uv = calcUV(( uvPt.x - x0 ) / dx , uvPt.y, a0,a1,a2,a3, p0,p1,p2,p3);
+        uvPt.u = uv.X();
+        uvPt.v = uv.Y();
+      }
+    }
+    // after I
+    if ( I+1 < iSize-1 )
+    {
+      gp_UV a0 = UVPt( I,       0 ).UV();
+      gp_UV a1 = UVPt( iSize-1, 0 ).UV();
+      gp_UV a2 = UVPt( iSize-1, jSize-1 ).UV();
+      gp_UV a3 = UVPt( I,       jSize-1 ).UV();
+
+      gp_UV p1 = UVPt( iSize-1, J ).UV();
+      gp_UV p3 = UVPt( I,       J ).UV();
+      const double x0 = UVPt( I, J ).x, dx = 1. - x0;
+      for (int i = I+1; i < iSize-1; i++)
+      {
+        gp_UV p0 = UVPt( i, 0       ).UV();
+        gp_UV p2 = UVPt( i, jSize-1 ).UV();
+
+        UVPtStruct& uvPt = UVPt( i, J );
+        gp_UV uv = calcUV(( uvPt.x - x0 ) / dx , uvPt.y, a0,a1,a2,a3, p0,p1,p2,p3);
+        uvPt.u = uv.X();
+        uvPt.v = uv.Y();
+      }
+    }
+  }
+}
+
+//================================================================================
+/*!
+ * \brief Side copying
+ */
+//================================================================================
+
+FaceQuadStruct::Side& FaceQuadStruct::Side::operator=(const Side& otherSide)
+{
+  grid = otherSide.grid;
+  from = otherSide.from;
+  to   = otherSide.to;
+  di   = otherSide.di;
+  forced_nodes = otherSide.forced_nodes;
+  contacts     = otherSide.contacts;
+  nbNodeOut    = otherSide.nbNodeOut;
+
+  for ( size_t iC = 0; iC < contacts.size(); ++iC )
+  {
+    FaceQuadStruct::Side* oSide = contacts[iC].other_side;
+    for ( size_t iOC = 0; iOC < oSide->contacts.size(); ++iOC )
+      if ( oSide->contacts[iOC].other_side == & otherSide )
+      {
+        // cout << "SHIFT old " << &otherSide << " " << otherSide.NbPoints()
+        //      << " -> new " << this << " " << this->NbPoints() << endl;
+        oSide->contacts[iOC].other_side = this;
+      }
+  }
+  return *this;
+}
+
+//================================================================================
+/*!
+ * \brief Converts node index of a quad to node index of this side
+ */
+//================================================================================
+
+int FaceQuadStruct::Side::ToSideIndex( int quadNodeIndex ) const
+{
+  return from + di * quadNodeIndex;
+}
+
+//================================================================================
+/*!
+ * \brief Converts node index of this side to node index of a quad
+ */
+//================================================================================
+
+int FaceQuadStruct::Side::ToQuadIndex( int sideNodeIndex ) const
+{
+  return ( sideNodeIndex - from ) * di;
+}
+
+//================================================================================
+/*!
+ * \brief Reverse the side
+ */
+//================================================================================
+
+bool FaceQuadStruct::Side::Reverse(bool keepGrid)
+{
+  if ( grid )
+  {
+    if ( keepGrid )
+    {
+      from -= di;
+      to   -= di;
+      std::swap( from, to );
+      di   *= -1;
+    }
+    else
+    {
+      grid->Reverse();
+    }
+  }
+  return (bool)grid;
+}
+
+//================================================================================
+/*!
+ * \brief Checks if a node is enforced
+ *  \param [in] nodeIndex - an index of a node in a size
+ *  \return bool - \c true if the node is forced
+ */
+//================================================================================
+
+bool FaceQuadStruct::Side::IsForced( int nodeIndex ) const
+{
+  if ( nodeIndex < 0 || nodeIndex >= grid->NbPoints() )
+    throw SALOME_Exception( " FaceQuadStruct::Side::IsForced(): wrong index" );
+
+  if ( forced_nodes.count( nodeIndex ) )
+    return true;
+
+  for ( size_t i = 0; i < this->contacts.size(); ++i )
+    if ( contacts[ i ].point == nodeIndex &&
+         contacts[ i ].other_side->forced_nodes.count( contacts[ i ].other_point ))
+      return true;
+
+  return false;
+}
+
+//================================================================================
+/*!
+ * \brief Sets up a contact between this and another side
+ */
+//================================================================================
+
+void FaceQuadStruct::Side::AddContact( int ip, Side* side, int iop )
+{
+  if ( ip  >= GetUVPtStruct().size()      ||
+       iop >= side->GetUVPtStruct().size() )
+    throw SALOME_Exception( "FaceQuadStruct::Side::AddContact(): wrong point" );
+  {
+    contacts.resize( contacts.size() + 1 );
+    Contact&    c = contacts.back();
+    c.point       = ip;
+    c.other_side  = side;
+    c.other_point = iop;
+  }
+  {
+    side->contacts.resize( side->contacts.size() + 1 );
+    Contact&    c = side->contacts.back();
+    c.point       = iop;
+    c.other_side  = this;
+    c.other_point = ip;
+  }
+}
+
+//================================================================================
+/*!
+ * \brief Returns a normalized parameter of a point indexed within a quadrangle
+ */
+//================================================================================
+
+double FaceQuadStruct::Side::Param( int i ) const
+{
+  const vector<UVPtStruct>& points = GetUVPtStruct();
+  return (( points[ from + i * di ].normParam - points[ from ].normParam ) /
+          ( points[ to   - 1 * di ].normParam - points[ from ].normParam ));
+}
+
+//================================================================================
+/*!
+ * \brief Returns UV by a parameter normalized within a quadrangle
+ */
+//================================================================================
+
+gp_XY FaceQuadStruct::Side::Value2d( double x ) const
+{
+  const vector<UVPtStruct>& points = GetUVPtStruct();
+  double u = ( points[ from ].normParam +
+               x * ( points[ to-di ].normParam - points[ from ].normParam ));
+  return grid->Value2d( u ).XY();
+}
+
+//================================================================================
+/*!
+ * \brief Returns side length
+ */
+//================================================================================
+
+double FaceQuadStruct::Side::Length(int theFrom, int theTo) const
+{
+  if ( IsReversed() != ( theTo < theFrom ))
+    std::swap( theTo, theFrom );
+
+  const vector<UVPtStruct>& points = GetUVPtStruct();
+  double r;
+  if ( theFrom == theTo && theTo == -1 )
+    r = Abs( First().normParam -
+             Last ().normParam );
+  else if ( IsReversed() )
+    r = Abs( points[ Max( to,   theTo+1 ) ].normParam -
+             points[ Min( from, theFrom ) ].normParam );
+  else
+    r = Abs( points[ Min( to,   theTo-1 ) ].normParam -
+             points[ Max( from, theFrom ) ].normParam );
+  return r * grid->Length();
+}
index 54a2a066408b1961c11df8f09d302f767c60f39c..b17fd7fa71a52376fa2147f5e616188211064307 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #include "SMESH_Algo.hxx"
 #include "SMESH_ProxyMesh.hxx"
 #include "SMESH_StdMeshers.hxx"
+#include "StdMeshers_FaceSide.hxx"
 #include "StdMeshers_QuadrangleParams.hxx"
 
 #include <TopoDS_Face.hxx>
+#include <Bnd_B2d.hxx>
 
 class SMDS_MeshNode;
 class SMESH_Mesh;
 class SMESH_MesherHelper;
 class SMESH_ProxyMesh;
-class StdMeshers_FaceSide;
 struct uvPtStruct;
 
 
 enum TSideID { QUAD_BOTTOM_SIDE=0, QUAD_RIGHT_SIDE, QUAD_TOP_SIDE, QUAD_LEFT_SIDE, NB_QUAD_SIDES };
 
 typedef uvPtStruct UVPtStruct;
-typedef struct faceQuadStruct
+struct FaceQuadStruct
 {
-  std::vector< StdMeshers_FaceSide*> side;
-  bool isEdgeOut[4]; // true, if an EDGE has more nodes, than an opposite one
-  UVPtStruct* uv_grid;
-  TopoDS_Face face;
-  ~faceQuadStruct();
-  void shift( size_t nb, bool keepUnitOri );
-  typedef boost::shared_ptr<faceQuadStruct> Ptr;
-} FaceQuadStruct;
+  struct Side // a side of FaceQuadStruct
+  {
+    struct Contact // contact of two sides
+    {
+      int   point; // index of a grid point of this side where two sides meat
+      Side* other_side;
+      int   other_point;
+    };
+    StdMeshers_FaceSidePtr grid;
+    int                    from, to;     // indices of grid points used by the quad
+    int                    di;           // +1 or -1 depending on IsReversed()
+    std::set<int>          forced_nodes; // indices of forced grid points
+    std::vector<Contact>   contacts;     // contacts with sides of other quads
+    int                    nbNodeOut;    // nb of missing nodes on an opposite shorter side
+
+    Side(StdMeshers_FaceSidePtr theGrid = StdMeshers_FaceSidePtr());
+    Side& operator=(const Side& otherSide);
+    operator StdMeshers_FaceSidePtr() { return grid; }
+    operator const StdMeshers_FaceSidePtr() const { return grid; }
+    void AddContact( int ip, Side* side, int iop );
+    int  ToSideIndex( int quadNodeIndex ) const;
+    int  ToQuadIndex( int sideNodeIndex ) const;
+    bool IsForced( int nodeIndex ) const;
+    bool IsReversed() const { return nbNodeOut ? false : to < from; }
+    bool Reverse(bool keepGrid);
+    int  NbPoints() const { return Abs( to - from ); }
+    double Param( int nodeIndex ) const;
+    double Length( int from=-1, int to=-1) const;
+    gp_XY Value2d( double x ) const;
+    const UVPtStruct& First() const { return GetUVPtStruct()[ from ]; }
+    const UVPtStruct& Last()  const {
+      return GetUVPtStruct()[ to-nbNodeOut-(IsReversed() ? -1 : +1)];
+    }
+    // some sortcuts
+    const vector<UVPtStruct>& GetUVPtStruct(bool isXConst=0, double constValue=0) const
+    { return nbNodeOut ?
+        grid->SimulateUVPtStruct( NbPoints()-nbNodeOut-1, isXConst, constValue ) :
+        grid->GetUVPtStruct( isXConst, constValue );
+    }
+  };
+  struct SideIterator // iterator on UVPtStruct of a Side
+  {
+    const UVPtStruct *uvPtr, *uvEnd;
+    int               dPtr, counter;
+    SideIterator(): uvPtr(0), uvEnd(0), dPtr(0), counter(0) {}
+    void Init( const Side& side ) {
+      dPtr  = counter = 0;
+      uvPtr = uvEnd = 0;
+      if ( side.NbPoints() > 0 ) {
+        uvPtr = & side.First();
+        uvEnd = & side.Last();
+        dPtr  = ( uvEnd > uvPtr ) ? +1 : -1;
+        uvEnd += dPtr;
+      }
+    }
+    bool More() const { return uvPtr != uvEnd; }
+    void Next() { uvPtr += dPtr; ++counter; }
+    UVPtStruct& UVPt() const { return (UVPtStruct&) *uvPtr; }
+    UVPtStruct& operator[](int i) { return (UVPtStruct&) uvPtr[ i*dPtr]; }
+    int  Count() const { return counter; }
+  };
+
+  std::vector< Side >      side;
+  std::vector< UVPtStruct> uv_grid;
+  int                      iSize, jSize;
+  TopoDS_Face              face;
+  Bnd_B2d                  uv_box;
+  std::string              name; // to ease debugging
+
+  FaceQuadStruct ( const TopoDS_Face& F = TopoDS_Face(), const std::string& nm="main" );
+  UVPtStruct& UVPt( int i, int j ) { return uv_grid[ i + j * iSize ]; }
+  void  shift    ( size_t nb, bool keepUnitOri, bool keepGrid=false );
+  int & nbNodeOut( int iSide ) { return side[ iSide ].nbNodeOut; }
+  bool  findCell ( const gp_XY& uv, int & i, int & j );
+  bool  isNear   ( const gp_XY& uv, int & i, int & j, int nbLoops=1 );
+  bool  isEqual  ( const gp_XY& uv, int   i, int   j );
+  void  normPa2IJ( double x, double y, int & i, int & j );
+  void  updateUV ( const gp_XY& uv, int   i, int   j, bool isVertical );
+
+  typedef boost::shared_ptr<FaceQuadStruct> Ptr;
+};
 
 class STDMESHERS_EXPORT StdMeshers_Quadrangle_2D: public SMESH_2D_Algo
 {
-public:
+ public:
   StdMeshers_Quadrangle_2D(int hypId, int studyId, SMESH_Gen* gen);
   virtual ~StdMeshers_Quadrangle_2D();
 
@@ -81,7 +155,9 @@ public:
                                    const TopoDS_Shape& aShape,
                                    const bool          considerMesh=false);
 
-protected:
+  static bool IsApplicable(const TopoDS_Shape & aShape, bool toCheckAll);
+
+ protected:
 
   bool checkNbEdgesForEvaluate(SMESH_Mesh& aMesh,
                                const TopoDS_Shape & aShape,
@@ -89,16 +165,17 @@ protected:
                                std::vector<int>& aNbNodes,
                                bool& IsQuadratic);
 
-  bool setNormalizedGrid(SMESH_Mesh&          aMesh,
-                         const TopoDS_Face&   aFace,
-                         FaceQuadStruct::Ptr& quad);
-  
-  void splitQuad(SMESHDS_Mesh *theMeshDS,
-                 const int theFaceID,
-                 const SMDS_MeshNode* theNode1,
-                 const SMDS_MeshNode* theNode2,
-                 const SMDS_MeshNode* theNode3,
-                 const SMDS_MeshNode* theNode4);
+  bool setNormalizedGrid(FaceQuadStruct::Ptr quad);
+
+  void splitQuadFace(SMESHDS_Mesh *       theMeshDS,
+                     const int            theFaceID,
+                     const SMDS_MeshNode* theNode1,
+                     const SMDS_MeshNode* theNode2,
+                     const SMDS_MeshNode* theNode3,
+                     const SMDS_MeshNode* theNode4);
+
+  bool computeQuadDominant(SMESH_Mesh&         aMesh,
+                           const TopoDS_Face&  aFace);
 
   bool computeQuadDominant(SMESH_Mesh&         aMesh,
                            const TopoDS_Face&  aFace,
@@ -108,6 +185,10 @@ protected:
                        const TopoDS_Face&  aFace,
                        FaceQuadStruct::Ptr quad);
 
+  bool computeTriangles(SMESH_Mesh&         aMesh,
+                        const TopoDS_Face&  aFace,
+                        FaceQuadStruct::Ptr quad);
+
   bool evaluateQuadPref(SMESH_Mesh&         aMesh,
                         const TopoDS_Shape& aShape,
                         std::vector<int>&   aNbNodes,
@@ -122,6 +203,8 @@ protected:
 
   void smooth (FaceQuadStruct::Ptr quad);
 
+  bool check();
+
   int getCorners(const TopoDS_Face&          theFace,
                  SMESH_Mesh &                theMesh,
                  std::list<TopoDS_Edge>&     theWire,
@@ -129,20 +212,45 @@ protected:
                  int &                       theNbDegenEdges,
                  const bool                  considerMesh);
 
+  bool getEnforcedUV();
+
+  bool addEnforcedNodes();
+
+  int splitQuad(FaceQuadStruct::Ptr quad, int i, int j);
+
+  void shiftQuad(FaceQuadStruct::Ptr& quad, const int num );
+
+  typedef std::map< StdMeshers_FaceSidePtr, std::vector< FaceQuadStruct::Ptr > > TQuadsBySide;
+  void updateSideUV( FaceQuadStruct::Side&  side,
+                     int                    iForced,
+                     const TQuadsBySide&    quads,
+                     int *                  iNext=NULL);
+
+
+ protected: // Fields
 
-  // true if QuadranglePreference hypothesis is assigned that forces
-  // construction of quadrangles if the number of nodes on opposite edges
-  // is not the same in the case where the global number of nodes on edges
-  // is even
   bool myQuadranglePreference;
   bool myTrianglePreference;
   int  myTriaVertexID;
-  bool myNeedSmooth;
+  bool myNeedSmooth, myCheckOri;
+  const StdMeshers_QuadrangleParams* myParams;
+  StdMeshers_QuadType                myQuadType;
+
+  SMESH_MesherHelper*                myHelper;
+  SMESH_ProxyMesh::Ptr               myProxyMesh;
+  std::list< FaceQuadStruct::Ptr >   myQuadList;
+
+  struct ForcedPoint
+  {
+    gp_XY         uv;
+    gp_XYZ        xyz;
+    TopoDS_Vertex vertex;
 
-  StdMeshers_QuadType  myQuadType;
-  SMESH_MesherHelper*  myHelper; // tool for working with quadratic elements
-  SMESH_ProxyMesh::Ptr myProxyMesh;
-  FaceQuadStruct::Ptr  myQuadStruct;
+    double U() const { return uv.X(); }
+    double V() const { return uv.Y(); }
+    operator const gp_XY& () { return uv; }
+  };
+  std::vector< ForcedPoint >         myForcedPnts;
 };
 
 #endif
index be7b65fae5b386916cfb2fe11b6972c14b241476..5821911837e3ff7bc5f3e9d301001a57dac1b18d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5f3ee87a214f3fc874f7ef8973e41955fb240035..866b120ad4976a055bdbffc799b462f0510cd6a7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1814680af4c91b05a457b0d91a2ffb6c3fe2f8dc..17411417e315f49b649a018489b82e7ff8c00b0b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -598,3 +598,57 @@ bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
 
   return true;
 }
+
+//================================================================================
+/*!
+ * \brief Return true if the algorithm can mesh this shape
+ *  \param [in] aShape - shape to check
+ *  \param [in] toCheckAll - if true, this check returns OK if all shapes are OK,
+ *              else, returns OK if at least one shape is OK
+ */
+//================================================================================
+
+bool StdMeshers_RadialPrism_3D::IsApplicable( const TopoDS_Shape & aShape, bool toCheckAll )
+{
+  bool isCurShellApp;
+  int nbFoundSolids = 0;
+  for (TopExp_Explorer exp( aShape, TopAbs_SOLID ); exp.More(); exp.Next(), ++nbFoundSolids )
+  {
+    TopoDS_Shape shell[2];
+    int nbShells = 0;
+    for ( TopoDS_Iterator It (exp.Current()); It.More(); It.Next() )
+    {
+      nbShells++;
+      if ( nbShells > 2 ) {
+        if ( toCheckAll ) return false;
+        break;
+      }
+      shell[ nbShells-1 ] = It.Value();
+    }
+    if ( nbShells != 2 ) { 
+      if ( toCheckAll ) return false;  
+      continue; 
+    }
+
+    int nbFaces1 = SMESH_MesherHelper:: Count( shell[0], TopAbs_FACE, 0 );
+    int nbFaces2 = SMESH_MesherHelper:: Count( shell[1], TopAbs_FACE, 0 );
+    if ( nbFaces1 != nbFaces2 ){
+      if( toCheckAll ) return false;
+      continue;
+    }
+    int nbEdges1 = SMESH_MesherHelper:: Count( shell[0], TopAbs_EDGE, 0 );
+    int nbEdges2 = SMESH_MesherHelper:: Count( shell[1], TopAbs_EDGE, 0 );
+    if ( nbEdges1 != nbEdges2 ){
+      if( toCheckAll ) return false;
+      continue;
+    }
+    int nbVertices1 = SMESH_MesherHelper:: Count( shell[0], TopAbs_VERTEX, 0 );
+    int nbVertices2 = SMESH_MesherHelper:: Count( shell[1], TopAbs_VERTEX, 0 );
+    if ( nbVertices1 != nbVertices2 ){
+      if( toCheckAll ) return false;
+      continue;
+    }
+    if ( !toCheckAll ) return true;
+  }
+  return ( toCheckAll && nbFoundSolids != 0);
+};
index ea9185e30ba8ed4688dd3f9643ba885051048847..e1b1f21f4b3b57aa01d88080249ecfa0b30bafa3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -55,6 +55,8 @@ public:
   virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
                         MapShapeNbElems& aResMap);
 
+  static bool IsApplicable(const TopoDS_Shape & aShape, bool toCheckAll);
+
 protected:
 
   typedef std::vector<const SMDS_MeshNode* >            TNodeColumn;
index fde94e9ae5158341496f92d15b653ccd63b60cbf..92b2949002e18f62f822772b8113341583e509cb 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1281,3 +1281,24 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
   return false;
 
 }
+
+//================================================================================
+/*!
+ * \brief Return true if applied compute mesh on this shape
+ */
+//================================================================================
+
+bool StdMeshers_RadialQuadrangle_1D2D::IsApplicable( const TopoDS_Shape & aShape, bool toCheckAll )
+{
+  int nbFoundFaces = 0;
+  for (TopExp_Explorer exp( aShape, TopAbs_FACE ); exp.More(); exp.Next(), ++nbFoundFaces ){
+    TopoDS_Edge CircEdge, LinEdge1, LinEdge2;
+    int nbe = analyseFace( exp.Current(), CircEdge, LinEdge1, LinEdge2 );
+    Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast( getCurve( CircEdge ));
+    bool ok = ( nbe <= 3 && nbe >= 1 && !aCirc.IsNull() );
+    if( toCheckAll  && !ok ) return false;
+    if( !toCheckAll && ok  ) return true;
+  }
+  if( toCheckAll && nbFoundFaces != 0 ) return true;
+  return false;
+};
index 5a17238987c95dd3732f2d3c9a6bb552d051e130..80f117f1494de3242778591974035abe444c3cee 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -59,6 +59,8 @@ public:
    */
   virtual void SubmeshRestored(SMESH_subMesh* subMesh);
   
+  static bool IsApplicable(const TopoDS_Shape & aShape, bool toCheckAll);
+
 protected:
 
   bool computeLayerPositions(const gp_Pnt&      p1,
index 5377a6fa5d79d09cc40bc3800602f51524e3e2de..f3449e85df61d1926df7074cbec8d7d107dbb9dc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -37,6 +37,7 @@
 #include "SMESH_subMeshEventListener.hxx"
 #include "StdMeshers_Adaptive1D.hxx"
 #include "StdMeshers_Arithmetic1D.hxx"
+#include "StdMeshers_Geometric1D.hxx"
 #include "StdMeshers_AutomaticLength.hxx"
 #include "StdMeshers_Deflection1D.hxx"
 #include "StdMeshers_Distribution.hxx"
@@ -89,12 +90,14 @@ StdMeshers_Regular_1D::StdMeshers_Regular_1D(int hypId, int studyId,
   _compatibleHypothesis.push_back("StartEndLength");
   _compatibleHypothesis.push_back("Deflection1D");
   _compatibleHypothesis.push_back("Arithmetic1D");
+  _compatibleHypothesis.push_back("GeometricProgression");
   _compatibleHypothesis.push_back("FixedPoints1D");
   _compatibleHypothesis.push_back("AutomaticLength");
   _compatibleHypothesis.push_back("Adaptive1D");
-
-  _compatibleHypothesis.push_back("QuadraticMesh"); // auxiliary !!!
-  _compatibleHypothesis.push_back("Propagation"); // auxiliary !!!
+  // auxiliary:
+  _compatibleHypothesis.push_back("QuadraticMesh");
+  _compatibleHypothesis.push_back("Propagation");
+  _compatibleHypothesis.push_back("PropagOfDistribution");
 }
 
 //=============================================================================
@@ -223,6 +226,21 @@ bool StdMeshers_Regular_1D::CheckHypothesis( SMESH_Mesh&         aMesh,
     aStatus = SMESH_Hypothesis::HYP_OK;
   }
 
+  else if (hypName == "GeometricProgression")
+  {
+    const StdMeshers_Geometric1D * hyp =
+      dynamic_cast <const StdMeshers_Geometric1D * >(theHyp);
+    ASSERT(hyp);
+    _value[ BEG_LENGTH_IND ] = hyp->GetStartLength();
+    _value[ END_LENGTH_IND ] = hyp->GetCommonRatio();
+    ASSERT( _value[ BEG_LENGTH_IND ] > 0 && _value[ END_LENGTH_IND ] > 0 );
+    _hypType = GEOMETRIC_1D;
+
+    _revEdgesIDs = hyp->GetReversedEdges();
+
+    aStatus = SMESH_Hypothesis::HYP_OK;
+  }
+
   else if (hypName == "FixedPoints1D") {
     _fpHyp = dynamic_cast <const StdMeshers_FixedPoints1D*>(theHyp);
     ASSERT(_fpHyp);
@@ -616,6 +634,58 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh &     theMesh,
 
   double f = theFirstU, l = theLastU;
 
+  // Propagation Of Distribution
+  //
+  if ( !_mainEdge.IsNull() && _isPropagOfDistribution )
+  {
+    TopoDS_Edge mainEdge = TopoDS::Edge( _mainEdge ); // should not be a reference!
+    _gen->Compute( theMesh, mainEdge, /*aShapeOnly=*/true, /*anUpward=*/true);
+
+    SMESHDS_SubMesh* smDS = theMesh.GetMeshDS()->MeshElements( mainEdge );
+    if ( !smDS )
+      return error("No mesh on the source edge of Propagation Of Distribution");
+    if ( smDS->NbNodes() < 1 )
+      return true; // 1 segment
+
+    vector< double > mainEdgeParams;
+    if ( ! SMESH_Algo::GetNodeParamOnEdge( theMesh.GetMeshDS(), mainEdge, mainEdgeParams ))
+      return error("Bad node parameters on the source edge of Propagation Of Distribution");
+
+    vector< double > segLen( mainEdgeParams.size() - 1 );
+    double totalLen = 0;
+    BRepAdaptor_Curve mainEdgeCurve( mainEdge );
+    for ( size_t i = 1; i < mainEdgeParams.size(); ++i )
+    {
+      segLen[ i-1 ] = GCPnts_AbscissaPoint::Length( mainEdgeCurve,
+                                                    mainEdgeParams[i-1],
+                                                    mainEdgeParams[i]);
+      totalLen += segLen[ i-1 ];
+    }
+    for ( size_t i = 0; i < segLen.size(); ++i )
+      segLen[ i ] *= theLength / totalLen;
+
+    size_t iSeg = theReverse ? segLen.size()-1 : 0;
+    size_t dSeg = theReverse ? -1 : +1;
+    double param = theFirstU;
+    int nbParams = 0;
+    for ( int i = 0, nb = segLen.size()-1; i < nb; ++i, iSeg += dSeg )
+    {
+      GCPnts_AbscissaPoint Discret( theC3d, segLen[ iSeg ], param );
+      if ( !Discret.IsDone() ) break;
+      param = Discret.Parameter();
+      theParams.push_back( param );
+      ++nbParams;
+    }
+    if ( nbParams != segLen.size()-1 )
+      return error( SMESH_Comment("Can't divide into ") << segLen.size() << " segements");
+
+    compensateError( segLen[ theReverse ? segLen.size()-1 : 0 ],
+                     segLen[ theReverse ? 0 : segLen.size()-1 ],
+                     f, l, theLength, theC3d, theParams, true );
+    return true;
+  }
+
+
   switch( _hypType )
   {
   case LOCAL_LENGTH:
@@ -824,9 +894,54 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh &     theMesh,
     return true;
   }
 
+  case GEOMETRIC_1D: {
+
+    double a1 = _value[ BEG_LENGTH_IND ], an;
+    double q  = _value[ END_LENGTH_IND ];
+
+    double U1 = theReverse ? l : f;
+    double Un = theReverse ? f : l;
+    double param = U1;
+    double eltSize = a1;
+    if ( theReverse )
+      eltSize = -eltSize;
+
+    int nbParams = 0;
+    while ( true ) {
+      // computes a point on a curve <theC3d> at the distance <eltSize>
+      // from the point of parameter <param>.
+      GCPnts_AbscissaPoint Discret( theC3d, eltSize, param );
+      if ( !Discret.IsDone() ) break;
+      param = Discret.Parameter();
+      if ( f < param && param < l )
+        theParams.push_back( param );
+      else
+        break;
+      an = eltSize;
+      eltSize *= q;
+      ++nbParams;
+    }
+    if ( nbParams > 1 )
+    {
+      if ( Abs( param - Un ) < 0.2 * Abs( param - theParams.back() ))
+      {
+        compensateError( a1, eltSize, U1, Un, theLength, theC3d, theParams );
+      }
+      else if ( Abs( Un - theParams.back() ) <
+                0.2 * Abs( theParams.back() - *(--theParams.rbegin())))
+      {
+        theParams.pop_back();
+        compensateError( a1, an, U1, Un, theLength, theC3d, theParams );
+      }
+    }
+    if (theReverse) theParams.reverse(); // NPAL18025
+
+    return true;
+  }
+
   case FIXED_POINTS_1D: {
     const std::vector<double>& aPnts = _fpHyp->GetPoints();
-    const std::vector<int>& nbsegs = _fpHyp->GetNbSegments();
+    const std::vector<int>&   nbsegs = _fpHyp->GetNbSegments();
     int i = 0;
     TColStd_SequenceOfReal Params;
     for(; i<aPnts.size(); i++) {
@@ -1231,7 +1346,8 @@ StdMeshers_Regular_1D::GetUsedHypothesis(SMESH_Mesh &         aMesh,
   if (nbHyp == 0 && aShape.ShapeType() == TopAbs_EDGE)
   {
     // Check, if propagated from some other edge
-    _mainEdge = StdMeshers_Propagation::GetPropagationSource( aMesh, aShape );
+    _mainEdge = StdMeshers_Propagation::GetPropagationSource( aMesh, aShape,
+                                                              _isPropagOfDistribution );
     if ( !_mainEdge.IsNull() )
     {
       // Propagation of 1D hypothesis from <aMainEdge> on this edge;
index fbb9d0380628e70b8af7abd89b69cd6eb365467b..7db04d4afee4dc75d2449d98c1de44634ebbebba 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -102,7 +102,7 @@ protected:
   StdMeshers_SegmentLengthAroundVertex* getVertexHyp(SMESH_Mesh &          theMesh,
                                                      const TopoDS_Vertex & theV);
 
-  enum HypothesisType { LOCAL_LENGTH, MAX_LENGTH, NB_SEGMENTS, BEG_END_LENGTH, DEFLECTION, ARITHMETIC_1D, FIXED_POINTS_1D, ADAPTIVE, NONE };
+  enum HypothesisType { LOCAL_LENGTH, MAX_LENGTH, NB_SEGMENTS, BEG_END_LENGTH, DEFLECTION, ARITHMETIC_1D, FIXED_POINTS_1D, ADAPTIVE, GEOMETRIC_1D, NONE };
 
   enum ValueIndex {
     SCALE_FACTOR_IND = 0,
@@ -140,6 +140,7 @@ protected:
   // a source of propagated hypothesis, is set by CheckHypothesis()
   // always called before Compute()
   TopoDS_Shape _mainEdge;
+  bool         _isPropagOfDistribution;
 };
 
 #endif
diff --git a/src/StdMeshers/StdMeshers_Reversible1D.cxx b/src/StdMeshers/StdMeshers_Reversible1D.cxx
new file mode 100644 (file)
index 0000000..fe589a9
--- /dev/null
@@ -0,0 +1,99 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//  SMESH SMESH : implementaion of SMESH idl descriptions
+//  File   : StdMeshers_Reversible1D.cxx
+//  Module : SMESH
+//
+
+#include "StdMeshers_Reversible1D.hxx"
+
+//=============================================================================
+/*!
+ *  
+ */
+//=============================================================================
+
+StdMeshers_Reversible1D::StdMeshers_Reversible1D(int hypId, int studyId, SMESH_Gen * gen)
+  :SMESH_Hypothesis(hypId, studyId, gen)
+{
+  _param_algo_dim = 1; 
+}
+
+//=============================================================================
+/*!
+ *  
+ */
+//=============================================================================
+
+void StdMeshers_Reversible1D::SetReversedEdges( const std::vector<int>& ids )
+{
+  if ( ids != _edgeIDs )
+  {
+    _edgeIDs = ids;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
+//=============================================================================
+/*!
+ *  
+ */
+//=============================================================================
+
+std::ostream & StdMeshers_Reversible1D::SaveTo(std::ostream & save)
+{
+  save << " " << _edgeIDs.size() << " ";
+
+  if ( !_edgeIDs.empty() )
+  {
+    for ( size_t i = 0; i < _edgeIDs.size(); i++)
+      save << " " << _edgeIDs[i];
+    save << " " << _objEntry << " ";
+  }
+
+  return save;
+}
+
+//=============================================================================
+/*!
+ *  
+ */
+//=============================================================================
+
+std::istream & StdMeshers_Reversible1D::LoadFrom(std::istream & load)
+{
+  bool isOK;
+  int intVal;
+
+  isOK = (load >> intVal);
+  if (isOK && intVal > 0) {
+    _edgeIDs.reserve( intVal );
+    for (int i = 0; i < _edgeIDs.capacity() && isOK; i++) {
+      isOK = (load >> intVal);
+      if ( isOK ) _edgeIDs.push_back( intVal );
+    }
+    isOK = (load >> _objEntry);
+  }
+
+  return load;
+}
diff --git a/src/StdMeshers/StdMeshers_Reversible1D.hxx b/src/StdMeshers/StdMeshers_Reversible1D.hxx
new file mode 100644 (file)
index 0000000..5a2588c
--- /dev/null
@@ -0,0 +1,59 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//  SMESH SMESH : implementaion of SMESH idl descriptions
+//  File   : StdMeshers_Reversible1D.hxx
+//  Module : SMESH
+//
+#ifndef _SMESH_Reversible1D_HXX_
+#define _SMESH_Reversible1D_HXX_
+
+#include "SMESH_StdMeshers.hxx"
+#include "SMESH_Hypothesis.hxx"
+
+#include <vector>
+
+/*!
+ * \brief A base of reversible 1D hypotheses
+ */
+class STDMESHERS_EXPORT StdMeshers_Reversible1D : public SMESH_Hypothesis
+{
+public:
+  StdMeshers_Reversible1D(int hypId, int studyId, SMESH_Gen* gen);
+
+  void SetReversedEdges( const std::vector<int>& ids);
+
+  void SetObjectEntry( const char* entry ) { _objEntry = entry; }
+
+  const char* GetObjectEntry() { return _objEntry.c_str(); }
+
+  const std::vector<int>& GetReversedEdges() const { return _edgeIDs; }
+
+  virtual std::ostream & SaveTo(std::ostream & save);
+  virtual std::istream & LoadFrom(std::istream & load);
+
+protected:
+  std::vector<int> _edgeIDs;
+  std::string      _objEntry;
+};
+
+#endif
index dccb4823323b621f02b66926969511b888476109..845f7c65a3614e52d3842f56a55f1c53f5857090 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 40c5113c4a6e8a1d17cb0fcab2205b321beb22f8..c863445d0afc8a6b56bef0030c71b5dd48cc7925 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9ad1475a500b615364a76bccfccf0662ce2cdebc..4e2db58e041fac22f6fc9fe933f773ab6c6a742c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index cbec5ac71a6ee2483f807b064cf0d3aa576d531d..a3843758ede3b56b99273e3db150b47018b80f75 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9974f6a3b4a600c13dfcec3e5bf9d04fbb7f0934..7f0e4659294dff3cc151b3d0f0dc43be341da055 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5c9a9ae695957367f566aa88035bc0dfe3a794cd..8f3274db84064c3bc802fda306ca64de030906e7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ee2eb57f6accd73f240b073025824e183a592ac1..8dea8bf197d6be5e288c01f582f16bbf9da7aadd 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -25,6 +25,9 @@
 //
 #include "StdMeshers_UseExisting_1D2D.hxx"
 
+#include "SMESH_Mesh.hxx"
+#include "SMESH_subMesh.hxx"
+
 //=======================================================================
 //function : StdMeshers_UseExisting_1D
 //purpose  : 
@@ -56,10 +59,11 @@ bool StdMeshers_UseExisting_1D::CheckHypothesis(SMESH_Mesh& ,
 //purpose  : 
 //=======================================================================
 
-bool StdMeshers_UseExisting_1D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
+bool StdMeshers_UseExisting_1D::Compute(SMESH_Mesh& mesh, const TopoDS_Shape& edge)
 {
   // This algorithm exists to allow mesh generation by mesh
   // edition functions in TUI mode
+  mesh.GetSubMesh( edge )->SetIsAlwaysComputed( true );
   return true;
 }
 
@@ -110,10 +114,11 @@ bool StdMeshers_UseExisting_2D::CheckHypothesis(SMESH_Mesh& ,
 //purpose  : 
 //=======================================================================
 
-bool StdMeshers_UseExisting_2D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
+bool StdMeshers_UseExisting_2D::Compute(SMESH_Mesh& mesh, const TopoDS_Shape& face)
 {
   // This algorithm exists to allow mesh generation by mesh edition
   // functions in TUI mode
+  mesh.GetSubMesh( face )->SetIsAlwaysComputed( true );
   return true;
 }
 
index f1cd686a5da084eddd79225f2dc0cd6f69cf0590..4b708461ee04b2ef224984089c3dd5e43ed98678 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e38c311ad027cea2b435f76df73843778ccf9ed1..a012d0292b9cca955567585276c1b7a8f097fe90 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -35,6 +35,7 @@
 #include "SMESH_ControlsDef.hxx"
 #include "SMESH_Gen.hxx"
 #include "SMESH_Group.hxx"
+#include "SMESH_HypoFilter.hxx"
 #include "SMESH_Mesh.hxx"
 #include "SMESH_MeshAlgos.hxx"
 #include "SMESH_MesherHelper.hxx"
@@ -63,6 +64,7 @@
 #include <TopExp.hxx>
 #include <TopExp_Explorer.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
 #include <TopTools_MapOfShape.hxx>
 #include <TopoDS.hxx>
 #include <TopoDS_Edge.hxx>
@@ -382,8 +384,10 @@ namespace VISCOUS_3D
   {
     TopoDS_Shape                    _solid;
     const StdMeshers_ViscousLayers* _hyp;
+    TopoDS_Shape                    _hypShape;
     _MeshOfSolid*                   _proxyMesh;
     set<TGeomID>                    _reversedFaceIds;
+    set<TGeomID>                    _ignoreFaceIds;
 
     double                          _stepSize, _stepSizeCoeff;
     const SMDS_MeshNode*            _stepSizeNodes[2];
@@ -393,10 +397,10 @@ namespace VISCOUS_3D
     // iteration over the map is 5 time longer than over the vector
     vector< _LayerEdge* >           _edges;
 
-    // key: an id of shape (EDGE or VERTEX) shared by a FACE with
-    // layers and a FACE w/o layers
+    // key:   an id of shape (EDGE or VERTEX) shared by a FACE with
+    //        layers and a FACE w/o layers
     // value: the shape (FACE or EDGE) to shrink mesh on.
-    // _LayerEdge's basing on nodes on key shape are inflated along the value shape
+    //       _LayerEdge's basing on nodes on key shape are inflated along the value shape
     map< TGeomID, TopoDS_Shape >     _shrinkShape2Shape;
 
     // FACE's WOL, srink on which is forbiden due to algo on the adjacent SOLID
@@ -414,7 +418,9 @@ namespace VISCOUS_3D
 
     _SolidData(const TopoDS_Shape&             s=TopoDS_Shape(),
                const StdMeshers_ViscousLayers* h=0,
-               _MeshOfSolid*                   m=0) :_solid(s), _hyp(h), _proxyMesh(m) {}
+               const TopoDS_Shape&             hs=TopoDS_Shape(),
+               _MeshOfSolid*                   m=0)
+      :_solid(s), _hyp(h), _hypShape(hs), _proxyMesh(m) {}
     ~_SolidData();
 
     Handle(Geom_Curve) CurveForSmooth( const TopoDS_Edge&    E,
@@ -517,7 +523,6 @@ namespace VISCOUS_3D
     SMESH_ComputeErrorPtr _error;
 
     vector< _SolidData >  _sdVec;
-    set<TGeomID>          _ignoreShapeIds;
     int                   _tmpFaceID;
   };
   //--------------------------------------------------------------------------------
@@ -617,7 +622,7 @@ namespace VISCOUS_3D
 //
 StdMeshers_ViscousLayers::StdMeshers_ViscousLayers(int hypId, int studyId, SMESH_Gen* gen)
   :SMESH_Hypothesis(hypId, studyId, gen),
-   _isToIgnoreShapes(18), _nbLayers(1), _thickness(1), _stretchFactor(1)
+   _isToIgnoreShapes(1), _nbLayers(1), _thickness(1), _stretchFactor(1)
 {
   _name = StdMeshers_ViscousLayers::GetHypType();
   _param_algo_dim = -3; // auxiliary hyp used by 3D algos
@@ -686,7 +691,7 @@ std::ostream & StdMeshers_ViscousLayers::SaveTo(std::ostream & save)
        << " " << _thickness
        << " " << _stretchFactor
        << " " << _shapeIds.size();
-  for ( unsigned i = 0; i < _shapeIds.size(); ++i )
+  for ( size_t i = 0; i < _shapeIds.size(); ++i )
     save << " " << _shapeIds[i];
   save << " " << !_isToIgnoreShapes; // negate to keep the behavior in old studies.
   return save;
@@ -788,7 +793,7 @@ namespace
     // get average dir of edges going fromV
     gp_XYZ edgeDir;
     //if ( edges.size() > 1 )
-      for ( unsigned i = 0; i < edges.size(); ++i )
+      for ( size_t i = 0; i < edges.size(); ++i )
       {
         edgeDir = getEdgeDir( edges[i], fromV );
         double size2 = edgeDir.SquareModulus();
@@ -909,9 +914,9 @@ namespace
       py = new ofstream(fname);
       *py << "import SMESH" << endl
           << "from salome.smesh import smeshBuilder" << endl
-          << "smesh = smeshBuilder.New(salome.myStudy)" << endl
+          << "smesh  = smeshBuilder.New(salome.myStudy)" << endl
           << "meshSO = smesh.GetCurrentStudy().FindObjectID('0:1:2:3')" << endl
-          << "mesh = smesh.Mesh( meshSO.GetObject() )"<<endl;
+          << "mesh   = smesh.Mesh( meshSO.GetObject() )"<<endl;
     }
     void Finish() {
       if (py)
@@ -1069,7 +1074,7 @@ SMESH_ComputeErrorPtr _ViscousBuilder::Compute(SMESH_Mesh&         theMesh,
   if ( !findFacesWithLayers() )
     return _error;
 
-  for ( unsigned i = 0; i < _sdVec.size(); ++i )
+  for ( size_t i = 0; i < _sdVec.size(); ++i )
   {
     if ( ! makeLayer(_sdVec[i]) )
       return _error;
@@ -1108,6 +1113,7 @@ bool _ViscousBuilder::findSolidsWithLayers()
   _sdVec.reserve( allSolids.Extent());
 
   SMESH_Gen* gen = _mesh->GetGen();
+  SMESH_HypoFilter filter;
   for ( int i = 1; i <= allSolids.Extent(); ++i )
   {
     // find StdMeshers_ViscousLayers hyp assigned to the i-th solid
@@ -1122,10 +1128,14 @@ bool _ViscousBuilder::findSolidsWithLayers()
       viscHyp = dynamic_cast<const StdMeshers_ViscousLayers*>( *hyp );
     if ( viscHyp )
     {
+      TopoDS_Shape hypShape;
+      filter.Init( filter.Is( viscHyp ));
+      _mesh->GetHypothesis( allSolids(i), filter, true, &hypShape );
+
       _MeshOfSolid* proxyMesh = _ViscousListener::GetSolidMesh( _mesh,
                                                                 allSolids(i),
                                                                 /*toCreate=*/true);
-      _sdVec.push_back( _SolidData( allSolids(i), viscHyp, proxyMesh ));
+      _sdVec.push_back( _SolidData( allSolids(i), viscHyp, hypShape, proxyMesh ));
       _sdVec.back()._index = getMeshDS()->ShapeToIndex( allSolids(i));
     }
   }
@@ -1144,44 +1154,69 @@ bool _ViscousBuilder::findSolidsWithLayers()
 
 bool _ViscousBuilder::findFacesWithLayers()
 {
+  SMESH_MesherHelper helper( *_mesh );
+  TopExp_Explorer exp;
+  TopTools_IndexedMapOfShape solids;
+
   // collect all faces to ignore defined by hyp
-  vector<TopoDS_Shape> ignoreFaces;
-  for ( unsigned i = 0; i < _sdVec.size(); ++i )
+  for ( size_t i = 0; i < _sdVec.size(); ++i )
   {
+    solids.Add( _sdVec[i]._solid );
+
     vector<TGeomID> ids = _sdVec[i]._hyp->GetBndShapes();
-    for ( unsigned i = 0; i < ids.size(); ++i )
+    if ( _sdVec[i]._hyp->IsToIgnoreShapes() ) // FACEs to ignore are given
     {
-      const TopoDS_Shape& s = getMeshDS()->IndexToShape( ids[i] );
-      if ( !s.IsNull() && s.ShapeType() == TopAbs_FACE )
+      for ( size_t ii = 0; ii < ids.size(); ++ii )
       {
-        _ignoreShapeIds.insert( ids[i] );
-        ignoreFaces.push_back( s );
+        const TopoDS_Shape& s = getMeshDS()->IndexToShape( ids[ii] );
+        if ( !s.IsNull() && s.ShapeType() == TopAbs_FACE )
+          _sdVec[i]._ignoreFaceIds.insert( ids[ii] );
+      }
+    }
+    else // FACEs with layers are given
+    {
+      exp.Init( _sdVec[i]._solid, TopAbs_FACE );
+      for ( ; exp.More(); exp.Next() )
+      {
+        TGeomID faceInd = getMeshDS()->ShapeToIndex( exp.Current() );
+        if ( find( ids.begin(), ids.end(), faceInd ) == ids.end() )
+          _sdVec[i]._ignoreFaceIds.insert( faceInd );
       }
     }
-  }
 
-  // ignore internal faces
-  SMESH_MesherHelper helper( *_mesh );
-  TopExp_Explorer exp;
-  for ( unsigned i = 0; i < _sdVec.size(); ++i )
-  {
-    exp.Init( _sdVec[i]._solid.Oriented( TopAbs_FORWARD ), TopAbs_FACE );
-    for ( ; exp.More(); exp.Next() )
+    // ignore internal FACEs if inlets and outlets are specified
     {
-      TGeomID faceInd = getMeshDS()->ShapeToIndex( exp.Current() );
-      if ( helper.NbAncestors( exp.Current(), *_mesh, TopAbs_SOLID ) > 1 )
-      {     
-        _ignoreShapeIds.insert( faceInd );
-        ignoreFaces.push_back( exp.Current() );
-        if ( helper.IsReversedSubMesh( TopoDS::Face( exp.Current() )))
+      TopTools_IndexedDataMapOfShapeListOfShape solidsOfFace;
+      if ( _sdVec[i]._hyp->IsToIgnoreShapes() )
+        TopExp::MapShapesAndAncestors( _sdVec[i]._hypShape,
+                                       TopAbs_FACE, TopAbs_SOLID, solidsOfFace);
+
+      exp.Init( _sdVec[i]._solid.Oriented( TopAbs_FORWARD ), TopAbs_FACE );
+      for ( ; exp.More(); exp.Next() )
+      {
+        const TopoDS_Face& face = TopoDS::Face( exp.Current() );
+        if ( helper.NbAncestors( face, *_mesh, TopAbs_SOLID ) < 2 )
+          continue;
+
+        const TGeomID faceInd = getMeshDS()->ShapeToIndex( face );
+        if ( _sdVec[i]._hyp->IsToIgnoreShapes() )
+        {
+          int nbSolids = solidsOfFace.FindFromKey( face ).Extent();
+          if ( nbSolids > 1 )
+            _sdVec[i]._ignoreFaceIds.insert( faceInd );
+        }
+
+        if ( helper.IsReversedSubMesh( face ))
+        {
           _sdVec[i]._reversedFaceIds.insert( faceInd );
+        }
       }
     }
   }
 
   // Find faces to shrink mesh on (solution 2 in issue 0020832);
   TopTools_IndexedMapOfShape shapes;
-  for ( unsigned i = 0; i < _sdVec.size(); ++i )
+  for ( size_t i = 0; i < _sdVec.size(); ++i )
   {
     shapes.Clear();
     TopExp::MapShapes(_sdVec[i]._solid, TopAbs_EDGE, shapes);
@@ -1201,18 +1236,35 @@ bool _ViscousBuilder::findFacesWithLayers()
       // check presence of layers on them
       int ignore[2];
       for ( int j = 0; j < 2; ++j )
-        ignore[j] = _ignoreShapeIds.count ( getMeshDS()->ShapeToIndex( FF[j] ));
-      if ( ignore[0] == ignore[1] ) continue; // nothing interesting
+        ignore[j] = _sdVec[i]._ignoreFaceIds.count ( getMeshDS()->ShapeToIndex( FF[j] ));
+      if ( ignore[0] == ignore[1] )
+        continue; // nothing interesting
       TopoDS_Shape fWOL = FF[ ignore[0] ? 0 : 1 ];
+      // check presence of layers on fWOL within an adjacent SOLID
+      PShapeIteratorPtr sIt = helper.GetAncestors( fWOL, *_mesh, TopAbs_SOLID );
+      while ( const TopoDS_Shape* solid = sIt->next() )
+        if ( !solid->IsSame( _sdVec[i]._solid ))
+        {
+          int iSolid = solids.FindIndex( *solid );
+          int  iFace = getMeshDS()->ShapeToIndex( fWOL );
+          if ( iSolid > 0 && !_sdVec[ iSolid-1 ]._ignoreFaceIds.count( iFace ))
+          {
+            _sdVec[i]._noShrinkFaces.insert( iFace );
+            fWOL.Nullify();
+          }
+        }
       // add edge to maps
-      TGeomID edgeInd = getMeshDS()->ShapeToIndex( edge );
-      _sdVec[i]._shrinkShape2Shape.insert( make_pair( edgeInd, fWOL ));
+      if ( !fWOL.IsNull())
+      {
+        TGeomID edgeInd = getMeshDS()->ShapeToIndex( edge );
+        _sdVec[i]._shrinkShape2Shape.insert( make_pair( edgeInd, fWOL ));
+      }
     }
   }
   // Exclude from _shrinkShape2Shape FACE's that can't be shrinked since
   // the algo of the SOLID sharing the FACE does not support it
   set< string > notSupportAlgos; notSupportAlgos.insert("Hexa_3D");
-  for ( unsigned i = 0; i < _sdVec.size(); ++i )
+  for ( size_t i = 0; i < _sdVec.size(); ++i )
   {
     TopTools_MapOfShape noShrinkVertices;
     map< TGeomID, TopoDS_Shape >::iterator e2f = _sdVec[i]._shrinkShape2Shape.begin();
@@ -1229,7 +1281,7 @@ bool _ViscousBuilder::findFacesWithLayers()
         SMESH_Algo* algo = _mesh->GetGen()->GetAlgo( *_mesh, *solid );
         if ( !algo || !notSupportAlgos.count( algo->GetName() )) continue;
         notShrinkFace = true;
-        for ( unsigned j = 0; j < _sdVec.size(); ++j )
+        for ( size_t j = 0; j < _sdVec.size(); ++j )
         {
           if ( _sdVec[j]._solid.IsSame( *solid ) )
             if ( _sdVec[j]._shrinkShape2Shape.count( edgeID ))
@@ -1262,10 +1314,10 @@ bool _ViscousBuilder::findFacesWithLayers()
       }
     }
   }
-      
+
   // Find the SHAPE along which to inflate _LayerEdge based on VERTEX
 
-  for ( unsigned i = 0; i < _sdVec.size(); ++i )
+  for ( size_t i = 0; i < _sdVec.size(); ++i )
   {
     shapes.Clear();
     TopExp::MapShapes(_sdVec[i]._solid, TopAbs_VERTEX, shapes);
@@ -1279,11 +1331,12 @@ bool _ViscousBuilder::findFacesWithLayers()
       while ( fIt->more())
       {
         const TopoDS_Shape* f = fIt->next();
-        const int         fID = getMeshDS()->ShapeToIndex( *f );
         if ( helper.IsSubShape( *f, _sdVec[i]._solid ) )
         {
           totalNbFaces++;
-          if ( _ignoreShapeIds.count ( fID ) && ! _sdVec[i]._noShrinkFaces.count( fID ))
+          const int fID = getMeshDS()->ShapeToIndex( *f );
+          if ( _sdVec[i]._ignoreFaceIds.count ( fID ) &&
+               !_sdVec[i]._noShrinkFaces.count( fID ))
             facesWOL.push_back( *f );
         }
       }
@@ -1293,42 +1346,42 @@ bool _ViscousBuilder::findFacesWithLayers()
       switch ( facesWOL.size() )
       {
       case 1:
+      {
+        helper.SetSubShape( facesWOL[0] );
+        if ( helper.IsRealSeam( vInd )) // inflate along a seam edge?
         {
-          helper.SetSubShape( facesWOL[0] );
-          if ( helper.IsRealSeam( vInd )) // inflate along a seam edge?
+          TopoDS_Shape seamEdge;
+          PShapeIteratorPtr eIt = helper.GetAncestors(vertex, *_mesh, TopAbs_EDGE);
+          while ( eIt->more() && seamEdge.IsNull() )
           {
-            TopoDS_Shape seamEdge;
-            PShapeIteratorPtr eIt = helper.GetAncestors(vertex, *_mesh, TopAbs_EDGE);
-            while ( eIt->more() && seamEdge.IsNull() )
-            {
-              const TopoDS_Shape* e = eIt->next();
-              if ( helper.IsRealSeam( *e ) )
-                seamEdge = *e;
-            }
-            if ( !seamEdge.IsNull() )
-            {
-              _sdVec[i]._shrinkShape2Shape.insert( make_pair( vInd, seamEdge ));
-              break;
-            }
+            const TopoDS_Shape* e = eIt->next();
+            if ( helper.IsRealSeam( *e ) )
+              seamEdge = *e;
+          }
+          if ( !seamEdge.IsNull() )
+          {
+            _sdVec[i]._shrinkShape2Shape.insert( make_pair( vInd, seamEdge ));
+            break;
           }
-          _sdVec[i]._shrinkShape2Shape.insert( make_pair( vInd, facesWOL[0] ));
-          break;
         }
+        _sdVec[i]._shrinkShape2Shape.insert( make_pair( vInd, facesWOL[0] ));
+        break;
+      }
       case 2:
+      {
+        // find an edge shared by 2 faces
+        PShapeIteratorPtr eIt = helper.GetAncestors(vertex, *_mesh, TopAbs_EDGE);
+        while ( eIt->more())
         {
-          // find an edge shared by 2 faces
-          PShapeIteratorPtr eIt = helper.GetAncestors(vertex, *_mesh, TopAbs_EDGE);
-          while ( eIt->more())
+          const TopoDS_Shape* e = eIt->next();
+          if ( helper.IsSubShape( *e, facesWOL[0]) &&
+               helper.IsSubShape( *e, facesWOL[1]))
           {
-            const TopoDS_Shape* e = eIt->next();
-            if ( helper.IsSubShape( *e, facesWOL[0]) &&
-                 helper.IsSubShape( *e, facesWOL[1]))
-            {
-              _sdVec[i]._shrinkShape2Shape.insert( make_pair( vInd, *e )); break;
-            }
+            _sdVec[i]._shrinkShape2Shape.insert( make_pair( vInd, *e )); break;
           }
-          break;
         }
+        break;
+      }
       default:
         return error("Not yet supported case", _sdVec[i]._index);
       }
@@ -1351,10 +1404,10 @@ bool _ViscousBuilder::makeLayer(_SolidData& data)
   subIds = data._noShrinkFaces;
   TopExp_Explorer exp( data._solid, TopAbs_FACE );
   for ( ; exp.More(); exp.Next() )
-    if ( ! _ignoreShapeIds.count( getMeshDS()->ShapeToIndex( exp.Current() )))
     {
       SMESH_subMesh* fSubM = _mesh->GetSubMesh( exp.Current() );
-      faceIds.insert( fSubM->GetId() );
+      if ( ! data._ignoreFaceIds.count( getMeshDS()->ShapeToIndex( exp.Current() )))
+        faceIds.insert( fSubM->GetId() );
       SMESH_subMeshIteratorPtr subIt =
         fSubM->getDependsOnIterator(/*includeSelf=*/true, /*complexShapeFirst=*/false);
       while ( subIt->more() )
@@ -1368,7 +1421,7 @@ bool _ViscousBuilder::makeLayer(_SolidData& data)
   for (; s2s != data._shrinkShape2Shape.end(); ++s2s )
   {
     TGeomID shapeInd = s2s->first;
-    for ( unsigned i = 0; i < _sdVec.size(); ++i )
+    for ( size_t i = 0; i < _sdVec.size(); ++i )
     {
       if ( _sdVec[i]._index == data._index ) continue;
       map< TGeomID, TopoDS_Shape >::iterator s2s2 = _sdVec[i]._shrinkShape2Shape.find( shapeInd );
@@ -1475,7 +1528,7 @@ bool _ViscousBuilder::makeLayer(_SolidData& data)
 
   // Set target nodes into _Simplex and _2NearEdges
   TNode2Edge::iterator n2e;
-  for ( unsigned i = 0; i < data._edges.size(); ++i )
+  for ( size_t i = 0; i < data._edges.size(); ++i )
   {
     if ( data._edges[i]->IsOnEdge())
       for ( int j = 0; j < 2; ++j )
@@ -1489,7 +1542,7 @@ bool _ViscousBuilder::makeLayer(_SolidData& data)
         data._edges[i]->_2neibors->_edges[j] = n2e->second;
       }
     else
-      for ( unsigned j = 0; j < data._edges[i]->_simplices.size(); ++j )
+      for ( size_t j = 0; j < data._edges[i]->_simplices.size(); ++j )
       {
         _Simplex& s = data._edges[i]->_simplices[j];
         s._nNext = data._n2eMap[ s._nNext ]->_nodes.back();
@@ -1573,7 +1626,7 @@ bool _ViscousBuilder::sortEdges( _SolidData&                    data,
   SMESH_MesherHelper helper( *_mesh );
   bool ok = true;
 
-  for ( unsigned iS = 0; iS < edgesByGeom.size(); ++iS )
+  for ( size_t iS = 0; iS < edgesByGeom.size(); ++iS )
   {
     vector<_LayerEdge*>& eS = edgesByGeom[iS];
     if ( eS.empty() ) continue;
@@ -1617,7 +1670,7 @@ bool _ViscousBuilder::sortEdges( _SolidData&                    data,
         if ( eE.empty() ) continue;
         if ( eE[0]->_sWOL.IsNull() )
         {
-          for ( unsigned i = 0; i < eE.size() && !needSmooth; ++i )
+          for ( size_t i = 0; i < eE.size() && !needSmooth; ++i )
             needSmooth = ( eE[i]->_cosin > 0.1 );
         }
         else
@@ -1625,7 +1678,7 @@ bool _ViscousBuilder::sortEdges( _SolidData&                    data,
           const TopoDS_Face& F1 = TopoDS::Face( S );
           const TopoDS_Face& F2 = TopoDS::Face( eE[0]->_sWOL );
           const TopoDS_Edge& E  = TopoDS::Edge( eExp.Current() );
-          for ( unsigned i = 0; i < eE.size() && !needSmooth; ++i )
+          for ( size_t i = 0; i < eE.size() && !needSmooth; ++i )
           {
             gp_Vec dir1 = getFaceDir( F1, E, eE[i]->_nodes[0], helper, ok );
             gp_Vec dir2 = getFaceDir( F2, E, eE[i]->_nodes[0], helper, ok );
@@ -1664,7 +1717,7 @@ bool _ViscousBuilder::sortEdges( _SolidData&                    data,
   }
 
   // then the rest _LayerEdge's
-  for ( unsigned iS = 0; iS < edgesByGeom.size(); ++iS )
+  for ( size_t iS = 0; iS < edgesByGeom.size(); ++iS )
   {
     vector<_LayerEdge*>& eVec = edgesByGeom[iS];
     data._edges.insert( data._edges.end(), eVec.begin(), eVec.end() );
@@ -1870,9 +1923,9 @@ bool _ViscousBuilder::setEdgeData(_LayerEdge&         edge,
 
     if ( posType == SMDS_TOP_FACE )
     {
-      getSimplices( node, edge._simplices, _ignoreShapeIds, &data );
+      getSimplices( node, edge._simplices, data._ignoreFaceIds, &data );
       double avgNormProj = 0, avgLen = 0;
-      for ( unsigned i = 0; i < edge._simplices.size(); ++i )
+      for ( size_t i = 0; i < edge._simplices.size(); ++i )
       {
         gp_XYZ vec = edge._pos.back() - SMESH_TNodeXYZ( edge._simplices[i]._nPrev );
         avgNormProj += edge._normal * vec;
@@ -2103,7 +2156,7 @@ void _ViscousBuilder::getSimplices( const SMDS_MeshNode* node,
 void _ViscousBuilder::makeGroupOfLE()
 {
 #ifdef _DEBUG_
-  for ( unsigned i = 0 ; i < _sdVec.size(); ++i )
+  for ( size_t i = 0 ; i < _sdVec.size(); ++i )
   {
     if ( _sdVec[i]._edges.empty() ) continue;
 //     string name = SMESH_Comment("_LayerEdge's_") << i;
@@ -2113,10 +2166,10 @@ void _ViscousBuilder::makeGroupOfLE()
 //     SMESHDS_Mesh* mDS = _mesh->GetMeshDS();
 
     dumpFunction( SMESH_Comment("make_LayerEdge_") << i );
-    for ( unsigned j = 0 ; j < _sdVec[i]._edges.size(); ++j )
+    for ( size_t j = 0 ; j < _sdVec[i]._edges.size(); ++j )
     {
       _LayerEdge* le = _sdVec[i]._edges[j];
-      for ( unsigned iN = 1; iN < le->_nodes.size(); ++iN )
+      for ( size_t iN = 1; iN < le->_nodes.size(); ++iN )
         dumpCmd(SMESH_Comment("mesh.AddEdge([ ") <<le->_nodes[iN-1]->GetID()
                 << ", " << le->_nodes[iN]->GetID() <<"])");
       //gDS->SMDSGroup().Add( mDS->AddEdge( le->_nodes[iN-1], le->_nodes[iN]));
@@ -2124,7 +2177,7 @@ void _ViscousBuilder::makeGroupOfLE()
     dumpFunctionEnd();
 
     dumpFunction( SMESH_Comment("makeNormals") << i );
-    for ( unsigned j = 0 ; j < _sdVec[i]._edges.size(); ++j )
+    for ( size_t j = 0 ; j < _sdVec[i]._edges.size(); ++j )
     {
       _LayerEdge& edge = *_sdVec[i]._edges[j];
       SMESH_TNodeXYZ nXYZ( edge._nodes[0] );
@@ -2178,7 +2231,7 @@ bool _ViscousBuilder::inflate(_SolidData& data)
   auto_ptr<SMESH_ElementSearcher> searcher
     ( SMESH_MeshAlgos::GetElementSearcher( *getMeshDS(),
                                            data._proxyMesh->GetFaces( data._solid )) );
-  for ( unsigned i = 0; i < data._edges.size(); ++i )
+  for ( size_t i = 0; i < data._edges.size(); ++i )
   {
     if ( data._edges[i]->IsOnEdge() ) continue;
     data._edges[i]->FindIntersection( *searcher, intersecDist, data._epsilon );
@@ -2213,7 +2266,7 @@ bool _ViscousBuilder::inflate(_SolidData& data)
 
     // Elongate _LayerEdge's
     dumpFunction(SMESH_Comment("inflate")<<data._index<<"_step"<<nbSteps); // debug
-    for ( unsigned i = 0; i < data._edges.size(); ++i )
+    for ( size_t i = 0; i < data._edges.size(); ++i )
     {
       data._edges[i]->SetNewLength( curThick, helper );
     }
@@ -2229,7 +2282,7 @@ bool _ViscousBuilder::inflate(_SolidData& data)
       if ( nbSteps > 0 )
       {
         dumpFunction(SMESH_Comment("invalidate")<<data._index<<"_step"<<nbSteps); // debug
-        for ( unsigned i = 0; i < data._edges.size(); ++i )
+        for ( size_t i = 0; i < data._edges.size(); ++i )
         {
           data._edges[i]->InvalidateStep( nbSteps+1 );
         }
@@ -2241,7 +2294,7 @@ bool _ViscousBuilder::inflate(_SolidData& data)
 
     // Evaluate achieved thickness
     avgThick = 0;
-    for ( unsigned i = 0; i < data._edges.size(); ++i )
+    for ( size_t i = 0; i < data._edges.size(); ++i )
       avgThick += data._edges[i]->_len;
     avgThick /= data._edges.size();
 #ifdef __myDEBUG
@@ -2289,7 +2342,7 @@ bool _ViscousBuilder::smoothAndCheck(_SolidData& data,
   TopoDS_Face F;
 
   int iBeg, iEnd = 0;
-  for ( unsigned iS = 0; iS < data._endEdgeToSmooth.size(); ++iS )
+  for ( size_t iS = 0; iS < data._endEdgeToSmooth.size(); ++iS )
   {
     iBeg = iEnd;
     iEnd = data._endEdgeToSmooth[ iS ];
@@ -2355,7 +2408,7 @@ bool _ViscousBuilder::smoothAndCheck(_SolidData& data,
         {
           _LayerEdge* edge = data._edges[i];
           SMESH_TNodeXYZ tgtXYZ( edge->_nodes.back() );
-          for ( unsigned j = 0; j < edge->_simplices.size(); ++j )
+          for ( size_t j = 0; j < edge->_simplices.size(); ++j )
             if ( !edge->_simplices[j].IsForward( edge->_nodes[0], &tgtXYZ ))
             {
               cout << "Bad simplex ( " << edge->_nodes[0]->GetID()<< " "<< tgtXYZ._node->GetID()
@@ -2384,7 +2437,7 @@ bool _ViscousBuilder::smoothAndCheck(_SolidData& data,
   const SMDS_MeshElement* closestFace = 0;
   int iLE = 0;
 #endif
-  for ( unsigned i = 0; i < data._edges.size(); ++i )
+  for ( size_t i = 0; i < data._edges.size(); ++i )
   {
     if ( data._edges[i]->FindIntersection( *searcher, dist, data._epsilon, &intFace ))
       return false;
@@ -2695,7 +2748,7 @@ bool _ViscousBuilder::updateNormals( _SolidData&         data,
     vector< const SMDS_MeshNode*> nodes(4); // of a tmp mesh face
 
     dumpFunction(SMESH_Comment("makeTmpFacesOnEdges")<<data._index);
-    for ( unsigned i = 0; i < data._edges.size(); ++i )
+    for ( size_t i = 0; i < data._edges.size(); ++i )
     {
       _LayerEdge* edge = data._edges[i];
       if ( !edge->IsOnEdge() || !edge->_sWOL.IsNull() ) continue;
@@ -2712,7 +2765,7 @@ bool _ViscousBuilder::updateNormals( _SolidData&         data,
         }
         // look for a _LayerEdge containg tgt2
 //         _LayerEdge* neiborEdge = 0;
-//         unsigned di = 0; // check _edges[i+di] and _edges[i-di]
+//         size_t di = 0; // check _edges[i+di] and _edges[i-di]
 //         while ( !neiborEdge && ++di <= data._edges.size() )
 //         {
 //           if ( i+di < data._edges.size() && data._edges[i+di]->_nodes.back() == tgt2 )
@@ -2751,7 +2804,7 @@ bool _ViscousBuilder::updateNormals( _SolidData&         data,
   TLEdge2LEdgeSet edge2CloseEdge;
 
   const double eps = data._epsilon * data._epsilon;
-  for ( unsigned i = 0; i < data._edges.size(); ++i )
+  for ( size_t i = 0; i < data._edges.size(); ++i )
   {
     _LayerEdge* edge = data._edges[i];
     if ( !edge->IsOnEdge() || !edge->_sWOL.IsNull() ) continue;
@@ -2922,7 +2975,7 @@ bool _ViscousBuilder::updateNormals( _SolidData&         data,
   // 2) Check absence of intersections
   // TODO?
 
-  for ( unsigned i = 0 ; i < tmpFaces.size(); ++i )
+  for ( size_t i = 0 ; i < tmpFaces.size(); ++i )
     delete tmpFaces[i];
 
   return true;
@@ -2948,7 +3001,7 @@ bool _LayerEdge::FindIntersection( SMESH_ElementSearcher&   searcher,
   bool segmentIntersected = false;
   distance = Precision::Infinite();
   int iFace = -1; // intersected face
-  for ( unsigned j = 0 ; j < suspectFaces.size() && !segmentIntersected; ++j )
+  for ( size_t j = 0 ; j < suspectFaces.size() && !segmentIntersected; ++j )
   {
     const SMDS_MeshElement* face = suspectFaces[j];
     if ( face->GetNodeIndex( _nodes.back() ) >= 0 ||
@@ -3236,7 +3289,7 @@ bool _LayerEdge::Smooth(int& badNb)
 
   // compute new position for the last _pos
   gp_XYZ newPos (0,0,0);
-  for ( unsigned i = 0; i < _simplices.size(); ++i )
+  for ( size_t i = 0; i < _simplices.size(); ++i )
     newPos += SMESH_TNodeXYZ( _simplices[i]._nPrev );
   newPos /= _simplices.size();
 
@@ -3259,11 +3312,11 @@ bool _LayerEdge::Smooth(int& badNb)
   // count quality metrics (orientation) of tetras around _tgtNode
   int nbOkBefore = 0;
   SMESH_TNodeXYZ tgtXYZ( _nodes.back() );
-  for ( unsigned i = 0; i < _simplices.size(); ++i )
+  for ( size_t i = 0; i < _simplices.size(); ++i )
     nbOkBefore += _simplices[i].IsForward( _nodes[0], &tgtXYZ );
 
   int nbOkAfter = 0;
-  for ( unsigned i = 0; i < _simplices.size(); ++i )
+  for ( size_t i = 0; i < _simplices.size(); ++i )
     nbOkAfter += _simplices[i].IsForward( _nodes[0], &newPos );
 
   if ( nbOkAfter < nbOkBefore )
@@ -3389,14 +3442,14 @@ bool _ViscousBuilder::refine(_SolidData& data)
   gp_XY uv;
   bool isOnEdge;
 
-  for ( unsigned i = 0; i < data._edges.size(); ++i )
+  for ( size_t i = 0; i < data._edges.size(); ++i )
   {
     _LayerEdge& edge = *data._edges[i];
 
     // get accumulated length of segments
     vector< double > segLen( edge._pos.size() );
     segLen[0] = 0.0;
-    for ( unsigned j = 1; j < edge._pos.size(); ++j )
+    for ( size_t j = 1; j < edge._pos.size(); ++j )
       segLen[j] = segLen[j-1] + (edge._pos[j-1] - edge._pos[j] ).Modulus();
 
     // allocate memory for new nodes if it is not yet refined
@@ -3444,8 +3497,8 @@ bool _ViscousBuilder::refine(_SolidData& data)
 
     // create intermediate nodes
     double hSum = 0, hi = h0/f;
-    unsigned iSeg = 1;
-    for ( unsigned iStep = 1; iStep < edge._nodes.size(); ++iStep )
+    size_t iSeg = 1;
+    for ( size_t iStep = 1; iStep < edge._nodes.size(); ++iStep )
     {
       // compute an intermediate position
       hi *= f;
@@ -3512,7 +3565,7 @@ bool _ViscousBuilder::refine(_SolidData& data)
 
   if ( !getMeshDS()->IsEmbeddedMode() )
     // Log node movement
-    for ( unsigned i = 0; i < data._edges.size(); ++i )
+    for ( size_t i = 0; i < data._edges.size(); ++i )
     {
       _LayerEdge& edge = *data._edges[i];
       SMESH_TNodeXYZ p ( edge._nodes.back() );
@@ -3526,7 +3579,7 @@ bool _ViscousBuilder::refine(_SolidData& data)
   TopExp_Explorer exp( data._solid, TopAbs_FACE );
   for ( ; exp.More(); exp.Next() )
   {
-    if ( _ignoreShapeIds.count( getMeshDS()->ShapeToIndex( exp.Current() )))
+    if ( data._ignoreFaceIds.count( getMeshDS()->ShapeToIndex( exp.Current() )))
       continue;
     SMESHDS_SubMesh* fSubM = getMeshDS()->MeshElements( exp.Current() );
     SMDS_ElemIteratorPtr fIt = fSubM->GetElements();
@@ -3577,7 +3630,7 @@ bool _ViscousBuilder::shrink()
   // make map of (ids of FACEs to shrink mesh on) to (_SolidData containing _LayerEdge's
   // inflated along FACE or EDGE)
   map< TGeomID, _SolidData* > f2sdMap;
-  for ( unsigned i = 0 ; i < _sdVec.size(); ++i )
+  for ( size_t i = 0 ; i < _sdVec.size(); ++i )
   {
     _SolidData& data = _sdVec[i];
     TopTools_MapOfShape FFMap;
@@ -3684,7 +3737,7 @@ bool _ViscousBuilder::shrink()
 
     // Replace source nodes by target nodes in mesh faces to shrink
     const SMDS_MeshNode* nodes[20];
-    for ( unsigned i = 0; i < lEdges.size(); ++i )
+    for ( size_t i = 0; i < lEdges.size(); ++i )
     {
       _LayerEdge& edge = *lEdges[i];
       const SMDS_MeshNode* srcNode = edge._nodes[0];
@@ -3712,7 +3765,7 @@ bool _ViscousBuilder::shrink()
     vector< _SmoothNode > nodesToSmooth( smoothNodes.size() );
     {
       const bool sortSimplices = isConcaveFace;
-      for ( unsigned i = 0; i < smoothNodes.size(); ++i )
+      for ( size_t i = 0; i < smoothNodes.size(); ++i )
       {
         const SMDS_MeshNode* n = smoothNodes[i];
         nodesToSmooth[ i ]._node = n;
@@ -3728,7 +3781,7 @@ bool _ViscousBuilder::shrink()
     // Find EDGE's to shrink and set simpices to LayerEdge's
     set< _Shrinker1D* > eShri1D;
     {
-      for ( unsigned i = 0; i < lEdges.size(); ++i )
+      for ( size_t i = 0; i < lEdges.size(); ++i )
       {
         _LayerEdge* edge = lEdges[i];
         if ( edge->_sWOL.ShapeType() == TopAbs_EDGE )
@@ -3801,7 +3854,7 @@ bool _ViscousBuilder::shrink()
         int oldBadNb = badNb;
         badNb = 0;
         moved = false;
-        for ( unsigned i = 0; i < nodesToSmooth.size(); ++i )
+        for ( size_t i = 0; i < nodesToSmooth.size(); ++i )
         {
           moved |= nodesToSmooth[i].Smooth( badNb,surface,helper,refSign,
                                             smoothType, /*set3D=*/isConcaveFace);
@@ -3870,7 +3923,7 @@ bool _ViscousBuilder::shrink()
         case 3: smoothType = _SmoothNode::ANGULAR; break;
         }
         dumpFunction(SMESH_Comment("shrinkFace")<<f2sd->first<<"_st"<<++smooStep); // debug
-        for ( unsigned i = 0; i < nodesToSmooth.size(); ++i )
+        for ( size_t i = 0; i < nodesToSmooth.size(); ++i )
         {
           nodesToSmooth[i].Smooth( badNb,surface,helper,refSign,
                                    smoothType,/*set3D=*/st==1 );
@@ -3883,7 +3936,7 @@ bool _ViscousBuilder::shrink()
 
     if ( !getMeshDS()->IsEmbeddedMode() )
       // Log node movement
-      for ( unsigned i = 0; i < nodesToSmooth.size(); ++i )
+      for ( size_t i = 0; i < nodesToSmooth.size(); ++i )
       {
         SMESH_TNodeXYZ p ( nodesToSmooth[i]._node );
         getMeshDS()->MoveNode( nodesToSmooth[i]._node, p.X(), p.Y(), p.Z() );
@@ -3937,7 +3990,7 @@ bool _ViscousBuilder::prepareEdgeToShrink( _LayerEdge&            edge,
     //   if ( faceSubMesh->Contains( f ))
     //     faces.push_back( f );
     // }
-    // for ( unsigned i = 0; i < faces.size(); ++i )
+    // for ( size_t i = 0; i < faces.size(); ++i )
     // {
     //   const int nbNodes = faces[i]->NbCornerNodes();
     //   for ( int j = 0; j < nbNodes; ++j )
@@ -4397,11 +4450,11 @@ bool _SmoothNode::Smooth(int&                  badNb,
   // count quality metrics (orientation) of triangles around the node
   int nbOkBefore = 0;
   gp_XY tgtUV = helper.GetNodeUV( face, _node );
-  for ( unsigned i = 0; i < _simplices.size(); ++i )
+  for ( size_t i = 0; i < _simplices.size(); ++i )
     nbOkBefore += _simplices[i].IsForward( tgtUV, _node, face, helper, refSign );
 
   int nbOkAfter = 0;
-  for ( unsigned i = 0; i < _simplices.size(); ++i )
+  for ( size_t i = 0; i < _simplices.size(); ++i )
     nbOkAfter += _simplices[i].IsForward( newPos, _node, face, helper, refSign );
 
   if ( nbOkAfter < nbOkBefore )
@@ -4496,7 +4549,7 @@ gp_XY _SmoothNode::computeAngularPos(vector<gp_XY>& uv,
 
 _SolidData::~_SolidData()
 {
-  for ( unsigned i = 0; i < _edges.size(); ++i )
+  for ( size_t i = 0; i < _edges.size(); ++i )
   {
     if ( _edges[i] && _edges[i]->_2neibors )
       delete _edges[i]->_2neibors;
@@ -4569,7 +4622,7 @@ void _Shrinker1D::AddEdge( const _LayerEdge* e, SMESH_MesherHelper& helper )
   {
     // remove target node of the _LayerEdge from _nodes
     int nbFound = 0;
-    for ( unsigned i = 0; i < _nodes.size(); ++i )
+    for ( size_t i = 0; i < _nodes.size(); ++i )
       if ( !_nodes[i] || _nodes[i] == tgtNode0 || _nodes[i] == tgtNode1 )
         _nodes[i] = 0, nbFound++;
     if ( nbFound == _nodes.size() )
@@ -4607,7 +4660,7 @@ void _Shrinker1D::Compute(bool set3D, SMESH_MesherHelper& helper)
       l = helper.GetNodeU( E, _edges[1]->_nodes.back(), _nodes.back() );
     double totLen = GCPnts_AbscissaPoint::Length( aCurve, f, l );
 
-    for ( unsigned i = 0; i < _nodes.size(); ++i )
+    for ( size_t i = 0; i < _nodes.size(); ++i )
     {
       if ( !_nodes[i] ) continue;
       double len = totLen * _normPar[i];
@@ -4629,7 +4682,7 @@ void _Shrinker1D::Compute(bool set3D, SMESH_MesherHelper& helper)
     if ( _edges[1] )
       l = helper.GetNodeU( E, _edges[1]->_nodes.back(), _nodes.back() );
     
-    for ( unsigned i = 0; i < _nodes.size(); ++i )
+    for ( size_t i = 0; i < _nodes.size(); ++i )
     {
       if ( !_nodes[i] ) continue;
       double u = f * ( 1-_normPar[i] ) + l * _normPar[i];
@@ -4648,7 +4701,7 @@ void _Shrinker1D::Compute(bool set3D, SMESH_MesherHelper& helper)
 void _Shrinker1D::RestoreParams()
 {
   if ( _done )
-    for ( unsigned i = 0; i < _nodes.size(); ++i )
+    for ( size_t i = 0; i < _nodes.size(); ++i )
     {
       if ( !_nodes[i] ) continue;
       SMDS_EdgePosition* pos = static_cast<SMDS_EdgePosition*>( _nodes[i]->GetPosition() );
@@ -4701,7 +4754,7 @@ bool _ViscousBuilder::addBoundaryElements()
 {
   SMESH_MesherHelper helper( *_mesh );
 
-  for ( unsigned i = 0; i < _sdVec.size(); ++i )
+  for ( size_t i = 0; i < _sdVec.size(); ++i )
   {
     _SolidData& data = _sdVec[i];
     TopTools_IndexedMapOfShape geomEdges;
@@ -4772,7 +4825,7 @@ bool _ViscousBuilder::addBoundaryElements()
         {
           const TopoDS_Shape* pF = fIt->next();
           if ( helper.IsSubShape( *pF, data._solid) &&
-               !_ignoreShapeIds.count( e2f->first ))
+               !data._ignoreFaceIds.count( e2f->first ))
             F = *pF;
         }
       }
@@ -4788,7 +4841,7 @@ bool _ViscousBuilder::addBoundaryElements()
       // Make faces
       const int dj1 = reverse ? 0 : 1;
       const int dj2 = reverse ? 1 : 0;
-      for ( unsigned j = 1; j < ledges.size(); ++j )
+      for ( size_t j = 1; j < ledges.size(); ++j )
       {
         vector< const SMDS_MeshNode*>&  nn1 = ledges[j-dj1]->_nodes;
         vector< const SMDS_MeshNode*>&  nn2 = ledges[j-dj2]->_nodes;
index b62e165b03ea82eac45f2b39a0878a5229ab5849..5fe0a7b804cb5569b237aedc453dbfacc6f7d6c0 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 96dbbad6207b1121b674c864ceb5c20b7f07d2e0..7e51343806582b8efe075c49f1ae779e1d08eeee 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -389,6 +389,7 @@ namespace VISCOUS_2D
     TSideVector                 _faceSideVec; // wires (StdMeshers_FaceSide) of _face
     vector<_PolyLine>           _polyLineVec; // fronts to advance
     bool                        _is2DIsotropic; // is same U and V resoulution of _face
+    vector<TopoDS_Face>         _clearedFaces; // FACEs whose mesh was removed by shrink()
 
     double                      _fPowN; // to compute thickness of layers
     double                      _thickness; // required or possible layers thickness
@@ -633,25 +634,31 @@ bool _ViscousBuilder2D::findEdgesWithLayers(const TopoDS_Shape& theShapeHypAssig
   // collect all EDGEs to ignore defined by hyp
   int nbMyEdgesIgnored = getEdgesToIgnore( _hyp, _face, getMeshDS(), _ignoreShapeIds );
 
-  // check all EDGEs of the _face
-  int totalNbEdges = 0;
+  // get all shared EDGEs
+  TopTools_MapOfShape sharedEdges;
   TopTools_IndexedDataMapOfShapeListOfShape facesOfEdgeMap;
   TopExp::MapShapesAndAncestors( theShapeHypAssignedTo,
                                  TopAbs_EDGE, TopAbs_FACE, facesOfEdgeMap);
+  for ( int iE = 1; iE <= facesOfEdgeMap.Extent(); ++iE )
+    if ( facesOfEdgeMap( iE ).Extent() > 1 )
+      sharedEdges.Add( facesOfEdgeMap.FindKey( iE ));
+
+  // check all EDGEs of the _face
+  int totalNbEdges = 0;
   for ( size_t iWire = 0; iWire < _faceSideVec.size(); ++iWire )
   {
     StdMeshers_FaceSidePtr wire = _faceSideVec[ iWire ];
     totalNbEdges += wire->NbEdges();
     for ( int iE = 0; iE < wire->NbEdges(); ++iE )
     {
-      const TopTools_ListOfShape& faceList = facesOfEdgeMap.FindFromKey( wire->Edge( iE ));
-      if ( faceList.Extent() > 1 )
+      if ( sharedEdges.Contains( wire->Edge( iE )))
       {
         // ignore internal EDGEs (shared by several FACEs)
         const TGeomID edgeID = wire->EdgeID( iE );
         _ignoreShapeIds.insert( edgeID );
 
         // check if ends of an EDGE are to be added to _noShrinkVert
+        const TopTools_ListOfShape& faceList = facesOfEdgeMap.FindFromKey( wire->Edge( iE ));
         TopTools_ListIteratorOfListOfShape faceIt( faceList );
         for ( ; faceIt.More(); faceIt.Next() )
         {
@@ -682,7 +689,8 @@ bool _ViscousBuilder2D::findEdgesWithLayers(const TopoDS_Shape& theShapeHypAssig
               while ( const TopoDS_Shape* edge = edgeIt->next() )
                 if ( !edge->IsSame( wire->Edge( iE )) &&
                      _helper.IsSubShape( *edge, neighbourFace ) &&
-                     neighbourIgnoreEdges.count( getMeshDS()->ShapeToIndex( *edge )))
+                     ( neighbourIgnoreEdges.count( getMeshDS()->ShapeToIndex( *edge )) ||
+                       sharedEdges.Contains( *edge )))
                 {
                   _noShrinkVert.insert( getMeshDS()->ShapeToIndex( vertex ));
                   break;
@@ -1480,10 +1488,19 @@ bool _ViscousBuilder2D::shrink()
     if ( nbAdvancable == 0 )
       continue;
 
-    const TopoDS_Edge&        E = L._wire->Edge      ( L._edgeInd );
-    const int            edgeID = L._wire->EdgeID    ( L._edgeInd );
-    const double        edgeLen = L._wire->EdgeLength( L._edgeInd );
-    Handle(Geom2d_Curve) pcurve = L._wire->Curve2d   ( L._edgeInd );
+    const TopoDS_Vertex&  V1 = L._wire->FirstVertex( L._edgeInd );
+    const TopoDS_Vertex&  V2 = L._wire->LastVertex ( L._edgeInd );
+    const int           v1ID = getMeshDS()->ShapeToIndex( V1 );
+    const int           v2ID = getMeshDS()->ShapeToIndex( V2 );
+    const bool isShrinkableL = ! _noShrinkVert.count( v1ID ) && L._leftLine->_advancable;
+    const bool isShrinkableR = ! _noShrinkVert.count( v2ID ) && L._rightLine->_advancable;
+    if ( !isShrinkableL && !isShrinkableR )
+      continue;
+
+    const TopoDS_Edge&        E = L._wire->Edge       ( L._edgeInd );
+    const int            edgeID = L._wire->EdgeID     ( L._edgeInd );
+    const double        edgeLen = L._wire->EdgeLength ( L._edgeInd );
+    Handle(Geom2d_Curve) pcurve = L._wire->Curve2d    ( L._edgeInd );
     const bool     edgeReversed = ( E.Orientation() == TopAbs_REVERSED );
 
     SMESH_MesherHelper helper( *_mesh ); // to create nodes and edges on E
@@ -1499,10 +1516,12 @@ bool _ViscousBuilder2D::shrink()
       {
         adjFace = TopoDS::Face( *f );
         SMESH_ProxyMesh::Ptr pm = _ProxyMeshHolder::FindProxyMeshOfFace( adjFace, *_mesh );
-        if ( !pm || pm->NbProxySubMeshes() == 0 )
+        if ( !pm || pm->NbProxySubMeshes() == 0 /*|| !pm->GetProxySubMesh( E )*/)
         {
           // There are no viscous layers on an adjacent FACE, clear it's 2D mesh
           removeMeshFaces( adjFace );
+          // if ( removeMeshFaces( adjFace ))
+          //   _clearedFaces.push_back( adjFace ); // to re-compute after all
         }
         else
         {
@@ -1512,7 +1531,7 @@ bool _ViscousBuilder2D::shrink()
           //
           const vector<UVPtStruct>& points = L._wire->GetUVPtStruct();
           int iPFrom = L._firstPntInd, iPTo = L._lastPntInd;
-          if ( L._leftLine->_advancable )
+          if ( isShrinkableL )
           {
             vector<gp_XY>& uvVec = L._lEdges.front()._uvRefined;
             for ( int i = 0; i < _hyp->GetNumberLayers(); ++i ) {
@@ -1521,7 +1540,7 @@ bool _ViscousBuilder2D::shrink()
               uvVec.push_back ( pcurve->Value( uvPt.param ).XY() );
             }
           }
-          if ( L._rightLine->_advancable )
+          if ( isShrinkableR )
           {
             vector<gp_XY>& uvVec = L._lEdges.back()._uvRefined;
             for ( int i = 0; i < _hyp->GetNumberLayers(); ++i ) {
@@ -1532,8 +1551,8 @@ bool _ViscousBuilder2D::shrink()
           }
           // make proxy sub-mesh data of present nodes
           //
-          if ( L._leftLine->_advancable )  iPFrom += _hyp->GetNumberLayers();
-          if ( L._rightLine->_advancable ) iPTo   -= _hyp->GetNumberLayers();
+          if ( isShrinkableL ) iPFrom += _hyp->GetNumberLayers();
+          if ( isShrinkableR ) iPTo   -= _hyp->GetNumberLayers();
           UVPtStructVec nodeDataVec( & points[ iPFrom ], & points[ iPTo + 1 ]);
 
           double normSize = nodeDataVec.back().normParam - nodeDataVec.front().normParam;
@@ -1605,6 +1624,8 @@ bool _ViscousBuilder2D::shrink()
       if ( !L2->_advancable &&
            !toShrinkForAdjacent( adjFace, E, L._wire->FirstVertex( L._edgeInd + isR )))
         continue;
+      if ( isR ? !isShrinkableR : !isShrinkableL )
+        continue;
 
       double & u = isR ? u2 : u1; // param to move
       double  u0 = isR ? ul : uf; // init value of the param to move
@@ -1641,17 +1662,17 @@ bool _ViscousBuilder2D::shrink()
           length1D = Abs( u - curveInt.Point( 1 ).ParamOnFirst() );
           double maxDist2d = 2 * L2->_lEdges[ iLSeg2 ]._length2D;
           isConvex = ( length1D < maxDist2d * len1dTo2dRatio );
-                                                  /*  |L  seg2     
-                                                   *  |  o---o--- 
-                                                   *  | /    |    
-                                                   *  |/     |  L2
-                                                   *  x------x---      */
+          /*                                          |L  seg2
+           *                                          |  o---o---
+           *                                          | /    |
+           *                                          |/     |  L2
+           *                                          x------x---      */
         }
-        if ( !isConvex ) { /* concave VERTEX */   /*  o-----o--- 
-                                                   *   \    |    
+        if ( !isConvex ) { /* concave VERTEX */   /*  o-----o---
+                                                   *   \    |
                                                    *    \   |  L2
-                                                   *     x--x--- 
-                                                   *    /        
+                                                   *     x--x---
+                                                   *    /
                                                    * L /               */
           length2D = L2->_lEdges[ iFSeg2 ]._length2D;
           //if ( L2->_advancable ) continue;
@@ -1737,7 +1758,7 @@ bool _ViscousBuilder2D::shrink()
       {
         const SMDS_MeshElement* segment = segIt->next();
         if ( segment->getshapeId() != edgeID ) continue;
-        
+
         const int nbNodes = segment->NbNodes();
         for ( int i = 0; i < nbNodes; ++i )
         {
@@ -1808,16 +1829,16 @@ bool _ViscousBuilder2D::shrink()
       }
       // concatenate nodeDataVec and nodeDataForAdjacent
       nodeDataVec.insert(( isRShrinkedForAdjacent ? nodeDataVec.end() : nodeDataVec.begin() ),
-                          nodeDataForAdjacent.begin(), nodeDataForAdjacent.end() );
+                         nodeDataForAdjacent.begin(), nodeDataForAdjacent.end() );
     }
 
     // Extend nodeDataVec by a node located at the end of not shared _LayerEdge
     /*      n - to add to nodeDataVec
-     *      o-----o--- 
-     *      |\    |    
+     *      o-----o---
+     *      |\    |
      *      | o---o---
      *      | |x--x--- L2
-     *      | /        
+     *      | /
      *      |/ L
      *      x
      *     /    */
@@ -1855,7 +1876,7 @@ bool _ViscousBuilder2D::shrink()
       nodeDataVec.insert(( isR ? nodeDataVec.end() : nodeDataVec.begin() ), ptOfNode );
 
       // recompute normParam of nodes in nodeDataVec
-      newLength = GCPnts_AbscissaPoint::Length( curve, 
+      newLength = GCPnts_AbscissaPoint::Length( curve,
                                                 nodeDataVec.front().param,
                                                 nodeDataVec.back().param);
       for ( size_t iP = 1; iP < nodeDataVec.size(); ++iP )
@@ -1891,6 +1912,9 @@ bool _ViscousBuilder2D::toShrinkForAdjacent( const TopoDS_Face&   adjFace,
                                              const TopoDS_Edge&   E,
                                              const TopoDS_Vertex& V)
 {
+  if ( _noShrinkVert.count( getMeshDS()->ShapeToIndex( V )))
+    return false;
+
   TopoDS_Shape hypAssignedTo;
   if ( const StdMeshers_ViscousLayers2D* vlHyp = findHyp( *_mesh, adjFace, &hypAssignedTo ))
   {
@@ -1934,18 +1958,18 @@ bool _ViscousBuilder2D::refine()
     if ( !L._advancable ) continue;
 
     // replace an inactive (1st) _LayerEdge with an active one of a neighbour _PolyLine
-    size_t iLE = 0, nbLE = L._lEdges.size();
+    //size_t iLE = 0, nbLE = L._lEdges.size();
     const bool leftEdgeShared  = L.IsCommonEdgeShared( *L._leftLine );
     const bool rightEdgeShared = L.IsCommonEdgeShared( *L._rightLine );
     if ( /*!L._leftLine->_advancable &&*/ leftEdgeShared )
     {
       L._lEdges[0] = L._leftLine->_lEdges.back();
-      iLE += int( !L._leftLine->_advancable );
+      //iLE += int( !L._leftLine->_advancable );
     }
     if ( !L._rightLine->_advancable && rightEdgeShared )
     {
       L._lEdges.back() = L._rightLine->_lEdges[0];
-      --nbLE;
+      //--nbLE;
     }
 
     // limit length of neighbour _LayerEdge's to avoid sharp change of layers thickness
@@ -1989,6 +2013,9 @@ bool _ViscousBuilder2D::refine()
     // cerr << "import smesh" << endl << "mesh = smesh.Mesh()"<< endl;
 
     // calculate intermediate UV on _LayerEdge's ( _LayerEdge::_uvRefined )   
+    size_t iLE = 0, nbLE = L._lEdges.size();
+    if ( ! L._lEdges[0]._uvRefined.empty() )     ++iLE;
+    if ( ! L._lEdges.back()._uvRefined.empty() ) --nbLE;
     for ( ; iLE < nbLE; ++iLE )
     {
       _LayerEdge& LE = L._lEdges[iLE];
@@ -2029,14 +2056,21 @@ bool _ViscousBuilder2D::refine()
 
     // Create layers of faces
     
+    const TopoDS_Vertex&  V1 = L._wire->FirstVertex( L._edgeInd );
+    const TopoDS_Vertex&  V2 = L._wire->LastVertex ( L._edgeInd );
+    const int           v1ID = getMeshDS()->ShapeToIndex( V1 );
+    const int           v2ID = getMeshDS()->ShapeToIndex( V2 );
+    const bool isShrinkableL = ! _noShrinkVert.count( v1ID );
+    const bool isShrinkableR = ! _noShrinkVert.count( v2ID );
+
     bool hasLeftNode     = ( !L._leftLine->_rightNodes.empty() && leftEdgeShared  );
     bool hasRightNode    = ( !L._rightLine->_leftNodes.empty() && rightEdgeShared );
     bool hasOwnLeftNode  = ( !L._leftNodes.empty() );
     bool hasOwnRightNode = ( !L._rightNodes.empty() );
     bool isClosedEdge    = ( outerNodes.front() == outerNodes.back() );
     size_t iS,
-      iN0 = ( hasLeftNode || hasOwnLeftNode || isClosedEdge ),
-      nbN = innerNodes.size() - ( hasRightNode || hasOwnRightNode );
+      iN0 = ( hasLeftNode || hasOwnLeftNode || isClosedEdge || !isShrinkableL ),
+      nbN = innerNodes.size() - ( hasRightNode || hasOwnRightNode || !isShrinkableR);
     L._leftNodes .reserve( _hyp->GetNumberLayers() );
     L._rightNodes.reserve( _hyp->GetNumberLayers() );
     int cur = 0, prev = -1; // to take into account orientation of _face
@@ -2081,8 +2115,10 @@ bool _ViscousBuilder2D::refine()
       if ( hasOwnRightNode )   innerNodes.back()  = L._rightNodes[ iF ];
       else if ( hasRightNode ) innerNodes.back()  = L._rightLine->_leftNodes[ iF ];
       if ( isClosedEdge )      innerNodes.front() = innerNodes.back(); // circle
-      if ( !hasOwnLeftNode )  L._leftNodes.push_back( innerNodes.front() );
-      if ( !hasOwnRightNode ) L._rightNodes.push_back( innerNodes.back() );
+      if ( !isShrinkableL )    innerNodes.front() = outerNodes.front();
+      if ( !isShrinkableR )    innerNodes.back()  = outerNodes.back();
+      if ( !hasOwnLeftNode )   L._leftNodes.push_back( innerNodes.front() );
+      if ( !hasOwnRightNode )  L._rightNodes.push_back( innerNodes.back() );
 
       // create faces
       for ( size_t i = 1; i < innerNodes.size(); ++i )
@@ -2137,6 +2173,14 @@ bool _ViscousBuilder2D::refine()
 
   } // loop on _PolyLine's
 
+  // re-compute FACEs whose mesh was removed by shrink()
+  for ( size_t i = 0; i < _clearedFaces.size(); ++i )
+  {
+    SMESH_subMesh* sm = _mesh->GetSubMesh( _clearedFaces[i] );
+    if ( sm->GetComputeState() == SMESH_subMesh::READY_TO_COMPUTE )
+      sm->ComputeStateEngine( SMESH_subMesh::COMPUTE );
+  }
+
   return true;
 }
 
index 5b7f09548d909d5779fe668dd22b26dcddd284fb..a7b6c9c45a8d4df0dd74f30481a1992cee5769c2 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f6e38a1f9971fde0d22120b37efdc9fae331b74c..229c9ac2d9929fd2a33d2679a55928dfc5cefa8b 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index a85cdc286680d97376bcac135e5996f8c365d0ed..0e78ac5ac5bda17efcbe230aacd74b7a5d9f321c 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 982ddbaf2d5999001f169d4560305ec19a0c50e5..c23b6fd01f13d81322585fb1526861a912e8d6a2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -27,6 +27,7 @@
 #include "StdMeshersGUI_StdHypothesisCreator.h"
 #include "StdMeshersGUI_NbSegmentsCreator.h"
 #include "StdMeshersGUI_CartesianParamCreator.h"
+#include "StdMeshersGUI_QuadrangleParamWdg.h"
 
 //=============================================================================
 /*! GetHypothesisCreator
@@ -42,6 +43,8 @@ extern "C"
       return new StdMeshersGUI_NbSegmentsCreator();
     else if ( aHypType=="CartesianParameters3D" )
       return new StdMeshersGUI_CartesianParamCreator( aHypType );
+    else if ( aHypType=="QuadrangleParams" )
+      return new StdMeshersGUI_QuadrangleParamCreator( aHypType );
     else
       return new StdMeshersGUI_StdHypothesisCreator( aHypType );
   }
index 937c79066efa46a064d6c65bce302e29f9b0912e..88ad6ddc365c25c9465b4933239af2a301aef088 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // SMESH includes
 #include "StdMeshersGUI_CartesianParamCreator.h"
 
-#include <SMESHGUI.h>
-#include <SMESHGUI_Utils.h>
-#include <SMESHGUI_HypothesesUtils.h>
-#include <SMESHGUI_SpinBox.h>
+#include "SMESHGUI.h"
+#include "SMESHGUI_Utils.h"
+#include "SMESHGUI_VTKUtils.h"
+#include "SMESHGUI_HypothesesUtils.h"
+#include "SMESHGUI_SpinBox.h"
+#include "SMESHGUI_MeshEditPreview.h"
 
 // IDL includes
 #include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
 
 // SALOME GUI includes
-#include <SalomeApp_Tools.h>
-#include <SalomeApp_IntSpinBox.h>
+#include <LightApp_SelectionMgr.h>
 #include <QtxComboBox.h>
+#include <SALOME_InteractiveObject.hxx>
+#include <SALOME_ListIO.hxx>
+#include <SALOME_ListIteratorOfListIO.hxx>
+#include <SUIT_ResourceMgr.h>
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_Tools.h>
+
+#include <GEOMBase.h>
+
+#include <BRepBndLib.hxx>
+#include <Bnd_Box.hxx>
+#include <TopoDS_Iterator.hxx>
+#include <TopoDS_Shape.hxx>
+#include <gp_Pnt.hxx>
 
 // Qt includes
 #include <QAbstractItemModel>
 #include <QApplication>
 #include <QButtonGroup>
+#include <QCheckBox>
 #include <QGridLayout>
 #include <QGroupBox>
 #include <QHBoxLayout>
 #include <QLineEdit>
 #include <QListWidget>
 #include <QModelIndex>
+#include <QPushButton>
 #include <QRadioButton>
 #include <QString>
 #include <QStyleOptionViewItem>
+#include <QTabWidget>
 #include <QTreeWidget>
 #include <QTreeWidgetItem>
 #include <QVBoxLayout>
-#include <QPushButton>
-#include <QTabWidget>
 
 #define SPACING 6
 #define MARGIN  11
@@ -162,7 +178,7 @@ namespace StdMeshersGUI
     myStepSpin->SetValue( myStep = 1. );
 
     // 3) Coodrinates/Spacing group
-    QFrame* csFrame = new QFrame( this );
+    QFrame*    csFrame = new QFrame( this );
     QVBoxLayout* scLay = new QVBoxLayout( csFrame );
     scLay->setMargin( 0 );
     scLay->setSpacing( SPACING );
@@ -200,11 +216,18 @@ namespace StdMeshersGUI
     connect( myInsertBtn,      SIGNAL( clicked() ),             SLOT( onInsert() ));
     connect( myDeleteBtn,      SIGNAL( clicked() ),             SLOT( onDelete() ));
     connect( myModeGroup,      SIGNAL( buttonClicked ( int )),  SLOT( onMode(int)));
+    connect( myModeGroup,      SIGNAL( buttonClicked ( int )),  SIGNAL( gridModeChanged(int)));
     connect( mySpacingTreeWdg, SIGNAL( itemSelectionChanged()), SLOT( updateButtons() ));
     connect( myCoordList,      SIGNAL( itemSelectionChanged()), SLOT( updateButtons() ));
     connect( myStepSpin,       SIGNAL( valueChanged(double)),   SLOT( onStepChange() ));
   }
 
+  //================================================================================
+  /*!
+   * \brief SLOT onInsert
+   */
+  //================================================================================
+
   void GridAxisTab::onInsert()
   {
     if ( isGridBySpacing() )
@@ -253,6 +276,12 @@ namespace StdMeshersGUI
     updateButtons();
   }
 
+  //================================================================================
+  /*!
+   * \brief SLOT onDelete
+   */
+  //================================================================================
+
   void GridAxisTab::onDelete()
   {
     if ( isGridBySpacing() )
@@ -282,6 +311,12 @@ namespace StdMeshersGUI
     updateButtons();
   }
 
+  //================================================================================
+  /*!
+   * \brief SLOT onMode
+   */
+  //================================================================================
+
   void GridAxisTab::onMode(int isSpacing)
   {
     mySpacingTreeWdg->setShown( isSpacing );
@@ -312,6 +347,12 @@ namespace StdMeshersGUI
     updateButtons();
   }
 
+  //================================================================================
+  /*!
+   * \brief SLOT onStepChange
+   */
+  //================================================================================
+
   void GridAxisTab::onStepChange()
   {
     if ( fabs( myStepSpin->GetValue() ) < 1e-100 )
@@ -322,6 +363,12 @@ namespace StdMeshersGUI
     myStep = myStepSpin->GetValue();
   }
 
+  //================================================================================
+  /*!
+   * \brief Enables/disables buttons
+   */
+  //================================================================================
+
   void GridAxisTab::updateButtons()
   {
     bool insertEnable = false, deleteEnable = false;
@@ -346,6 +393,12 @@ namespace StdMeshersGUI
     myDeleteBtn->setEnabled( deleteEnable );
   }
 
+  //================================================================================
+  /*!
+   * \brief Inserts coordinates into myCoordList
+   */
+  //================================================================================
+
   void GridAxisTab::setCoordinates( SMESH::double_array_var coords )
   {
     myCoordList->clear();
@@ -356,6 +409,12 @@ namespace StdMeshersGUI
     onMode( COORD_BUT );
   }
 
+  //================================================================================
+  /*!
+   * \brief Sets spacing got from hypothesis
+   */
+  //================================================================================
+
   void GridAxisTab::setSpacing( SMESH::string_array_var funs, SMESH::double_array_var points )
   {
     mySpacingTreeWdg->clear();
@@ -369,11 +428,23 @@ namespace StdMeshersGUI
     onMode( SPACING_BUT );
   }
 
+  //================================================================================
+  /*!
+   * \brief Checks grid definintion mode
+   */
+  //================================================================================
+
   bool GridAxisTab::isGridBySpacing() const
   {
     return ( myModeGroup->checkedId() == SPACING_BUT );
   }
 
+  //================================================================================
+  /*!
+   * \brief Returns coordinates to set to a hypothesis
+   */
+  //================================================================================
+
   SMESH::double_array* GridAxisTab::getCoordinates()
   {
     SMESH::double_array_var coords = new SMESH::double_array;
@@ -384,6 +455,12 @@ namespace StdMeshersGUI
     return coords._retn();
   }
 
+  //================================================================================
+  /*!
+   * \brief Returms spacing to set to a hypothesis
+   */
+  //================================================================================
+
   void GridAxisTab::getSpacing(SMESH::string_array_out funs,
                                SMESH::double_array_out points) const
   {
@@ -403,6 +480,12 @@ namespace StdMeshersGUI
   }
 
 
+  //================================================================================
+  /*!
+   * \brief Verifies parameters
+   */
+  //================================================================================
+
   bool GridAxisTab::checkParams(QString& msg, SMESH::SMESH_Hypothesis_var& hyp) const
   {
     if ( isGridBySpacing() )
@@ -431,6 +514,12 @@ namespace StdMeshersGUI
     return true;
   }
 
+  //================================================================================
+  /*!
+   * \brief LineDelegate constructor
+   */
+  //================================================================================
+
   LineDelegate::LineDelegate( QWidget* parent ):
     QItemDelegate( parent ),
     mySpacingTreeWdg( qobject_cast<QTreeWidget*>( parent )),
@@ -438,6 +527,12 @@ namespace StdMeshersGUI
   {
   }
 
+  //================================================================================
+  /*!
+   * \brief Creates an editor depending on a current item
+   */
+  //================================================================================
+
   QWidget* LineDelegate::createEditor( QWidget*                    parent,
                                        const QStyleOptionViewItem& opt,
                                        const QModelIndex&          index) const
@@ -471,6 +566,12 @@ namespace StdMeshersGUI
     return w;
   }
 
+  //================================================================================
+  /*!
+   * \brief Limit value range in the spin of a neighbor range
+   */
+  //================================================================================
+
   void LineDelegate::setEditorData ( QWidget * editor, const QModelIndex & index ) const
   {
     if ( mySpacingTreeWdg && index.column() == 0 )
@@ -493,6 +594,13 @@ namespace StdMeshersGUI
       QItemDelegate::setEditorData( editor, index );
     }
   }
+
+  //================================================================================
+  /*!
+   * \brief
+   */
+  //================================================================================
+
   void LineDelegate::setModelData( QWidget*            editor,
                                    QAbstractItemModel* model,
                                    const QModelIndex&  index ) const
@@ -529,6 +637,53 @@ namespace StdMeshersGUI
 
 } // namespace StdMeshersGUI
 
+namespace
+{
+  const double theAngTol = M_PI / 180.;
+
+  //================================================================================
+  /*!
+   * \brief Set variables to groups of spin boxes
+   */
+  //================================================================================
+
+  void setText( const QString& vars, SMESHGUI_SpinBox** spins )
+  {
+    QStringList varList = vars.split( ':' );
+    for ( int i = 0; i < 3 && i < varList.count(); ++i )
+      if ( !varList[i].isEmpty() )
+        spins[i]->setText( varList[i] );
+  }
+  
+  //================================================================================
+  /*!
+   * \brief Computes more 2 axes by one
+   *  \param [in] iOk - index of a given axis
+   *  \param [in,out] dirs - directions of 3 axes
+   */
+  //================================================================================
+
+  void get3Dirs( int iOk, gp_XYZ dirs[3] )
+  {
+    dirs[ ( iOk+1 ) % 3 ] = dirs[ iOk ];
+
+    if ( Abs( dirs[ iOk ].Y() ) < 1e-100 &&
+         Abs( dirs[ iOk ].Z() ) < 1e-100 )
+      // dirs[ iOk ] || OX
+      dirs[ ( iOk+1 ) % 3 ].SetY( dirs[ iOk ].Y() + 1. );
+    else
+      dirs[ ( iOk+1 ) % 3 ].SetX( dirs[ iOk ].X() + 1. );
+
+    dirs[( iOk+2 ) % 3] = dirs[ iOk ] ^ dirs[ ( iOk+1 ) % 3 ];
+    dirs[( iOk+1 ) % 3] = dirs[ ( iOk+2 ) % 3 ] ^ dirs[ iOk ];
+  }
+}
+
+//================================================================================
+/*!
+ * \brief StdMeshersGUI_CartesianParamCreator constructor
+ */
+//================================================================================
 
 StdMeshersGUI_CartesianParamCreator::StdMeshersGUI_CartesianParamCreator(const QString& aHypType)
   : StdMeshersGUI_StdHypothesisCreator( aHypType ),
@@ -537,8 +692,23 @@ StdMeshersGUI_CartesianParamCreator::StdMeshersGUI_CartesianParamCreator(const Q
   myAxisTabs[0] = 0;
   myAxisTabs[1] = 0;
   myAxisTabs[2] = 0;
+
+  myAxesPreview = new SMESHGUI_MeshEditPreview( SMESH::GetViewWindow( SMESHGUI::GetSMESHGUI() ));
+  myAxesPreview->SetArrowShapeAndNb( /*nbArrows=*/3,
+                                     /*headLength=*/0.1,
+                                     /*headRadius=*/0.01,
+                                     /*start=*/0.,
+                                     /*labels=*/"XYZ");
+
+  myDirTic[0] = myDirTic[1] = myDirTic[2] = 0;
 }
 
+//================================================================================
+/*!
+ * \brief StdMeshersGUI_CartesianParamCreator destructor
+ */
+//================================================================================
+
 StdMeshersGUI_CartesianParamCreator::~StdMeshersGUI_CartesianParamCreator()
 {
   if ( myAxisTabs[0] ) delete myAxisTabs[0];
@@ -547,8 +717,16 @@ StdMeshersGUI_CartesianParamCreator::~StdMeshersGUI_CartesianParamCreator()
   myAxisTabs[0] = 0;
   myAxisTabs[1] = 0;
   myAxisTabs[2] = 0;
+
+  delete myAxesPreview;
 }
 
+//================================================================================
+/*!
+ * \brief Validate parameters
+ */
+//================================================================================
+
 bool StdMeshersGUI_CartesianParamCreator::checkParams( QString& msg ) const
 {
   if( !SMESHGUI_GenericHypothesisCreator::checkParams( msg ) )
@@ -567,9 +745,22 @@ bool StdMeshersGUI_CartesianParamCreator::checkParams( QString& msg ) const
   if ( !myAxisTabs[1]->checkParams( msg, hyp )) return false;
   if ( !myAxisTabs[2]->checkParams( msg, hyp )) return false;
 
+  StdMeshersGUI_CartesianParamCreator* me = (StdMeshersGUI_CartesianParamCreator*) this;
+  if ( !me->updateAxesPreview() )
+  {
+    msg = tr("INVALID_AXES_DIR");
+    return false;
+  }
+
   return true;
 }
 
+//================================================================================
+/*!
+ * \brief Create widgets
+ */
+//================================================================================
+
 QFrame* StdMeshersGUI_CartesianParamCreator::buildFrame()
 {
   QFrame* fr = new QFrame();
@@ -610,7 +801,12 @@ QFrame* StdMeshersGUI_CartesianParamCreator::buildFrame()
   argGroupLayout->addWidget( myThreshold, row, 1 );
   row++;
   
-  // 2)  Grid definition
+  // 2)  "Implement edges"
+  myAddEdges = new QCheckBox( tr("ADD_EDGES"), GroupC1 );
+  argGroupLayout->addWidget( myAddEdges, row, 0, 1, 2 );
+  row++;
+
+  // 3)  Grid definition
   QTabWidget* tabWdg = new QTabWidget( fr );
   myAxisTabs[ 0 ] = new StdMeshersGUI::GridAxisTab( tabWdg, 0 );
   myAxisTabs[ 1 ] = new StdMeshersGUI::GridAxisTab( tabWdg, 1 );
@@ -619,10 +815,154 @@ QFrame* StdMeshersGUI_CartesianParamCreator::buildFrame()
   tabWdg->addTab( myAxisTabs[ 1 ], tr( "AXIS_Y" ) );
   tabWdg->addTab( myAxisTabs[ 2 ], tr( "AXIS_Z" ) );
   argGroupLayout->addWidget( tabWdg, row, 0, 1, 2 );
+  row++;
+
+  QPixmap aPix = SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT"));
+
+  // 4) Fixed point
+  myFixedPointGrp = new QGroupBox( tr("FIXED_POINT"), fr );
+  myFixedPointGrp->setCheckable( true );
+  //QPushButton* pointBtn = new QPushButton( QIcon(aPix), "", myFixedPointGrp );
+  QLabel* pXLbl = new QLabel( tr("SMESH_X"), myFixedPointGrp );
+  QLabel* pYLbl = new QLabel( tr("SMESH_Y"), myFixedPointGrp );
+  QLabel* pZLbl = new QLabel( tr("SMESH_Z"), myFixedPointGrp );
+  for ( int i = 0; i < 3; ++i )
+  {
+    myPointSpin[i] = new SMESHGUI_SpinBox( myFixedPointGrp );
+    myPointSpin[i]->RangeStepAndValidator( -1e20, 1e20, 10 );
+    myPointSpin[i]->SetValue( 0. );
+  }
+  QHBoxLayout* aFixedPointLay = new QHBoxLayout( myFixedPointGrp );
+  aFixedPointLay->addWidget( pXLbl, 0, Qt::AlignRight );
+  aFixedPointLay->addWidget( myPointSpin[0], 1 );
+  aFixedPointLay->addWidget( pYLbl, 0, Qt::AlignRight );
+  aFixedPointLay->addWidget( myPointSpin[1], 1 );
+  aFixedPointLay->addWidget( pZLbl, 0, Qt::AlignRight );
+  aFixedPointLay->addWidget( myPointSpin[2], 1 );
+  argGroupLayout->addWidget( myFixedPointGrp, row, 0, 1, 2 );
+  row++;
+
+  // 5) Axes direction
+  QGroupBox* axesDirGrp = new QGroupBox( tr("AXES_DIRECTION"), fr );
+  QGridLayout* axisDirLay = new QGridLayout( axesDirGrp );
+  axisDirLay->setSpacing( SPACING );
+  axisDirLay->setMargin( MARGIN );
+  axisDirLay->setColumnStretch( 0, 2 );
+  // is orthogonal
+  myOrthogonalChk = new QCheckBox( tr("ORTHOGONAL_AXES"), axesDirGrp );
+  axisDirLay->addWidget( myOrthogonalChk, 0, 0, 1, 7 );
+  // axes
+  QLabel* axisLbl[3];
+  axisLbl[0] = new QLabel( tr( "AXIS_X"), axesDirGrp );
+  axisLbl[1] = new QLabel( tr( "AXIS_Y"), axesDirGrp );
+  axisLbl[2] = new QLabel( tr( "AXIS_Z"), axesDirGrp );
+  QLabel* dLbl[3];
+  myAxisBtnGrp = new QButtonGroup( axesDirGrp );
+  SMESHGUI_SpinBox** spins[3] = { &myXDirSpin[0], &myYDirSpin[0], &myZDirSpin[0] };
+  for ( int i = 0; i < 3; ++i )
+  {
+    QPushButton* axisBtn = new QPushButton( QIcon(aPix), "", axesDirGrp );
+    axisBtn->setCheckable( true );
+    myAxisBtnGrp->addButton( axisBtn, i );
+    myXDirSpin[i] = new SMESHGUI_SpinBox( axesDirGrp );
+    myYDirSpin[i] = new SMESHGUI_SpinBox( axesDirGrp );
+    myZDirSpin[i] = new SMESHGUI_SpinBox( axesDirGrp );
+    myXDirSpin[i]->RangeStepAndValidator( -1, 1, 0.1, "len_tol_precision" );
+    myYDirSpin[i]->RangeStepAndValidator( -1, 1, 0.1, "len_tol_precision" );
+    myZDirSpin[i]->RangeStepAndValidator( -1, 1, 0.1, "len_tol_precision" );
+    dLbl[0] = new QLabel( tr("SMESH_DX"), axesDirGrp );
+    dLbl[1] = new QLabel( tr("SMESH_DY"), axesDirGrp );
+    dLbl[2] = new QLabel( tr("SMESH_DZ"), axesDirGrp );
+    axisDirLay->addWidget( axisLbl[i],    i+1, 0 );
+    axisDirLay->addWidget( axisBtn,       i+1, 1 );
+    axisDirLay->addWidget( dLbl[0],       i+1, 2 );
+    axisDirLay->addWidget( dLbl[1],       i+1, 4 );
+    axisDirLay->addWidget( dLbl[2],       i+1, 6 );
+    axisDirLay->addWidget( myXDirSpin[i], 1, 3+i*2 );
+    axisDirLay->addWidget( myYDirSpin[i], 2, 3+i*2 );
+    axisDirLay->addWidget( myZDirSpin[i], 3, 3+i*2 );
+  }
+  axisDirLay->setColumnStretch( 3, 10 );
+  axisDirLay->setColumnStretch( 5, 10 );
+  axisDirLay->setColumnStretch( 7, 10 );
+
+  // set optimal axes
+  QPushButton* optimBtn = new QPushButton( tr("OPTIMAL_AXES"), axesDirGrp );
+  QPushButton* resetBtn = new QPushButton( tr("RESET_AXES"), axesDirGrp );
+  axisDirLay->addWidget( optimBtn, 4, 0, 1, 4 );
+  axisDirLay->addWidget( resetBtn, 4, 4, 1, 4 );
+
+  argGroupLayout->addWidget( axesDirGrp, row, 0, 1, 2 );
+  row++;
+
+  // Signals
+
+  LightApp_SelectionMgr* selMgr = SMESH::GetSelectionMgr( SMESHGUI::GetSMESHGUI() );
+
+  connect( selMgr,          SIGNAL( currentSelectionChanged()), SLOT( onSelectionChange()));
+  connect( myOrthogonalChk, SIGNAL( toggled(bool)),             SLOT( onOrthogonalAxes(bool)));
+  connect( optimBtn,        SIGNAL( clicked(bool)),             SLOT( onOptimalAxes(bool)));
+  connect( resetBtn,        SIGNAL( clicked(bool)),             SLOT( onResetAxes(bool)));
+  for ( int i = 0; i < 3; ++i )
+  {
+    connect( myXDirSpin[i], SIGNAL(valueChanged   (const QString&)),
+             this,          SLOT  (onAxisDirChange(const QString&)) );
+    connect( myYDirSpin[i], SIGNAL(valueChanged   (const QString&)),
+             this,          SLOT  (onAxisDirChange(const QString&)) );
+    connect( myZDirSpin[i], SIGNAL(valueChanged   (const QString&)),
+             this,          SLOT  (onAxisDirChange(const QString&)) );
+    connect( myAxisTabs[i], SIGNAL(gridModeChanged(int)),
+             this,          SLOT  (onGridModeChanged(int)));
+  }
+
+  // Show axes
+  myAxesLen = 120; // default trihedron size is 100
+  myOrigin[0] = myOrigin[1] = myOrigin[2] = 0.;
+  TopoDS_Shape shape;
+  QString shapeEntry = getMainShapeEntry();
+  if ( !shapeEntry.isEmpty() )
+  {
+    // find origin
+    Handle(SALOME_InteractiveObject) io =
+      new SALOME_InteractiveObject( shapeEntry.toStdString().c_str(), "GEOM" );
+    GEOM::GEOM_Object_var geomObj = SMESH::IObjectToInterface<GEOM::GEOM_Object>( io );
+    if ( GEOMBase::GetShape( geomObj, shape ) && !shape.IsNull())
+    {
+      Bnd_Box box;
+      BRepBndLib::Add( shape, box );
+      double max[3];
+      if ( !box.IsVoid() )
+      {
+        box.Get( myOrigin[0], myOrigin[1], myOrigin[2], max[0], max[1], max[2] );
+        gp_Pnt o( myOrigin[0], myOrigin[1], myOrigin[2] );
+        gp_Pnt x( max[0], max[1], max[2] );
+        myAxesLen = o.Distance( x );
+
+        double step = 1e20;
+        while ( step > myAxesLen / 5 )
+          step /= 10;
+        myPointSpin[0]->SetStep( step );
+        myPointSpin[1]->SetStep( step );
+        myPointSpin[2]->SetStep( step );
+      }
+    }
+  }
+  myAxisBtnGrp->button(0)->setEnabled( !shape.IsNull() );
+  myAxisBtnGrp->button(1)->setEnabled( !shape.IsNull() );
+  myAxisBtnGrp->button(2)->setEnabled( !shape.IsNull() );
+  optimBtn->setEnabled( !shape.IsNull() );
+
+  updateAxesPreview();
 
   return fr;
 }
 
+//================================================================================
+/*!
+ * \brief Tranfer parameters from hypothesis to widgets
+ */
+//================================================================================
+
 void StdMeshersGUI_CartesianParamCreator::retrieveParams() const
 {
   StdMeshers::StdMeshers_CartesianParameters3D_var h =
@@ -637,6 +977,9 @@ void StdMeshersGUI_CartesianParamCreator::retrieveParams() const
   else
     myThreshold->setText( varName );
 
+  myAddEdges->setChecked( h->GetToAddEdges() );
+
+  // grid definition
   for ( int ax = 0; ax < 3; ++ax )
   {
     if ( h->IsGridBySpacing( ax ))
@@ -652,10 +995,62 @@ void StdMeshersGUI_CartesianParamCreator::retrieveParams() const
       myAxisTabs[ax]->setCoordinates( coords );
     }
   }
+
+  // fixed point
+  SMESH::PointStruct fp;
+  StdMeshersGUI_CartesianParamCreator* me = (StdMeshersGUI_CartesianParamCreator*) this;
+  if ( h->GetFixedPoint( fp ))
+  {
+    me->myPointSpin[0]->SetValue( fp.x );
+    me->myPointSpin[1]->SetValue( fp.y );
+    me->myPointSpin[2]->SetValue( fp.z );
+    setText( getVariableName("GetFixedPoint"), &me->myPointSpin[0] );
+    myFixedPointGrp->setChecked( true );
+  }
+  else
+  {
+    myFixedPointGrp->setChecked( false );
+  }
+
+  // axes directions
+  SMESHGUI_SpinBox** spins[3] = { &me->myXDirSpin[0], &me->myYDirSpin[0], &me->myZDirSpin[0] };
+  SMESH::DirStruct axisDir[3];
+  h->GetAxesDirs( axisDir[0],
+                  axisDir[1],
+                  axisDir[2]);
+  QString vars = getVariableName("GetAxesDirs");
+  for ( int i = 0; i < 3; ++i )
+  {
+    spins[i][0]->SetValue( axisDir[i].PS.x );
+    spins[i][1]->SetValue( axisDir[i].PS.y );
+    spins[i][2]->SetValue( axisDir[i].PS.z );
+    setText( vars, spins[i] );
+
+    // cut off 3 used vars
+    if ( !vars.isEmpty() )
+    {
+      int ind = -1;
+      for ( int j = 0; j < 3; ++j )
+        if (( ind = vars.indexOf(':', ind+1 )) < 0 )
+          break;
+      if ( ind < 0 )
+        vars.clear();
+      else
+        vars.remove( 0, ind+1 );
+    }
+  }
+
   if ( dlg() )
-    dlg()->setMinimumSize( dlg()->minimumSizeHint().width(), dlg()->minimumSizeHint().height() );
+    dlg()->setMinimumSize( dlg()->minimumSizeHint().width(),
+                           dlg()->minimumSizeHint().height() );
 }
 
+//================================================================================
+/*!
+ * \brief Tranfer parameters from widgets to hypothesis
+ */
+//================================================================================
+
 QString StdMeshersGUI_CartesianParamCreator::storeParams() const
 {
   StdMeshers::StdMeshers_CartesianParameters3D_var h =
@@ -666,9 +1061,12 @@ QString StdMeshersGUI_CartesianParamCreator::storeParams() const
     if( isCreation() )
       SMESH::SetName( SMESH::FindSObject( h ), myName->text().toLatin1().constData() );
 
+    // threshold
     h->SetVarParameter( myThreshold->text().toLatin1().constData(), "SetSizeThreshold" );
     h->SetSizeThreshold( myThreshold->text().toDouble() );
+    h->SetToAddEdges( myAddEdges->isChecked() );
 
+    // grid
     for ( int ax = 0; ax < 3; ++ax )
     {
       if ( myAxisTabs[ax]->isGridBySpacing())
@@ -684,6 +1082,40 @@ QString StdMeshersGUI_CartesianParamCreator::storeParams() const
         h->SetGrid( coords, ax );
       }
     }
+
+    // fixed point
+    QStringList params;
+    params << myPointSpin[0]->text();
+    params << myPointSpin[1]->text();
+    params << myPointSpin[2]->text();
+    h->SetVarParameter( params.join(":").toLatin1().constData(), "SetFixedPoint" );
+    params.clear();
+
+    SMESH::PointStruct ps;
+    ps.x = myPointSpin[0]->GetValue();
+    ps.y = myPointSpin[1]->GetValue();
+    ps.z = myPointSpin[2]->GetValue();
+    h->SetFixedPoint( ps, !myFixedPointGrp->isEnabled() || !myFixedPointGrp->isChecked() );
+
+    // axes directions
+    SMESHGUI_SpinBox* const * spins[3] = { &myXDirSpin[0], &myYDirSpin[0], &myZDirSpin[0] };
+    for ( int ax = 0; ax < 3; ++ax )
+    {
+      params << spins[ax][0]->text();
+      params << spins[ax][1]->text();
+      params << spins[ax][2]->text();
+    }
+    h->SetVarParameter( params.join(":").toLatin1().constData(), "SetAxesDirs" );
+
+    SMESH::DirStruct axDir[3];
+    for ( int ax = 0; ax < 3; ++ax )
+    {
+      axDir[ax].PS.x = spins[ax][0]->GetValue();
+      axDir[ax].PS.y = spins[ax][1]->GetValue();
+      axDir[ax].PS.z = spins[ax][2]->GetValue();
+    }
+    h->SetAxesDirs( axDir[0], axDir[1], axDir[2] );
+
   }
   catch(const SALOME::SALOME_Exception& ex)
   {
@@ -692,7 +1124,298 @@ QString StdMeshersGUI_CartesianParamCreator::storeParams() const
   return "";
 }
 
+//================================================================================
+/*!
+ * \brief Returns a name of help page
+ */
+//================================================================================
+
 QString StdMeshersGUI_CartesianParamCreator::helpPage() const
 {
   return "cartesian_algo_page.html#cartesian_hyp_anchor";
 }
+
+//================================================================================
+/*!
+ * \brief Show axes if they are OK
+ */
+//================================================================================
+
+bool StdMeshersGUI_CartesianParamCreator::updateAxesPreview()
+{
+  bool isOk = true;
+  gp_Ax1 axes[3];
+  SMESHGUI_SpinBox** spins[3] = { &myXDirSpin[0], &myYDirSpin[0], &myZDirSpin[0] };
+  for ( int i = 0; i < 3 && isOk; ++i )
+  {
+    gp_XYZ dir( spins[i][0]->GetValue(),
+                spins[i][1]->GetValue(),
+                spins[i][2]->GetValue());
+    if (( isOk = ( dir.Modulus() > 1e-100 )))
+      axes[i].SetDirection( gp_Dir( dir ));
+
+    axes[i].SetLocation ( gp_Pnt( myOrigin[0],
+                                  myOrigin[1],
+                                  myOrigin[2]));
+  }
+  gp_Vec norm01 = axes[0].Direction().XYZ() ^ axes[1].Direction().XYZ();
+  gp_Vec norm12 = axes[1].Direction().XYZ() ^ axes[2].Direction().XYZ();
+  if ( isOk )
+    isOk = ( !axes[0].Direction().IsParallel( axes[1].Direction(), theAngTol ) &&
+             !axes[1].Direction().IsParallel( axes[2].Direction(), theAngTol ) &&
+             !axes[2].Direction().IsParallel( axes[0].Direction(), theAngTol ) &&
+             !norm01.IsParallel( norm12, theAngTol ) );
+  if ( isOk )
+    myAxesPreview->SetArrows( axes, myAxesLen );
+
+  myAxesPreview->SetVisibility( isOk );
+
+  return isOk;
+}
+
+//================================================================================
+/*!
+ * \brief Makes axes orthogonal if necessary
+ */
+//================================================================================
+
+void StdMeshersGUI_CartesianParamCreator::onOrthogonalAxes(bool isOrtho)
+{
+  if ( !isOrtho )
+  {
+    updateAxesPreview();
+    return;
+  }
+
+  std::multimap< int, int > ageOfAxis;
+  gp_XYZ dirs[3];
+  SMESHGUI_SpinBox** spins[3] = { &myXDirSpin[0], &myYDirSpin[0], &myZDirSpin[0] };
+  int nbOk = 0, isOk;
+  for ( int iAx = 0; iAx < 3; ++iAx )
+  {
+    dirs[iAx].SetCoord( spins[iAx][0]->GetValue(),
+                        spins[iAx][1]->GetValue(),
+                        spins[iAx][2]->GetValue());
+    if (( isOk = ( dirs[iAx].Modulus() > 1e-100 )))
+      ageOfAxis.insert( std::make_pair( myDirTic[iAx], iAx ));
+    else
+      ageOfAxis.insert( std::make_pair( -1, iAx ));
+    nbOk += isOk;
+  }
+  switch ( nbOk )
+  {
+  case 0:
+  {
+    dirs[0].SetCoord( 1, 0, 0 );
+    dirs[1].SetCoord( 0, 1, 0 );
+    dirs[2].SetCoord( 0, 0, 1 );
+    break;
+  }
+  case 1:
+  {
+    int iOk = ageOfAxis.rbegin()->second;
+    get3Dirs( iOk, dirs );
+    break;
+  }
+  default:
+    std::multimap< int, int >::reverse_iterator ag2ax = ageOfAxis.rbegin();
+    int iOk1 = ag2ax->second;
+    int iOk2 = (++ag2ax)->second;
+    int iKo  = (++ag2ax)->second;
+    if ( gp_Vec( dirs[ iOk1 ]).IsParallel( gp_Vec( dirs[ iOk2 ]), theAngTol ))
+      std::swap( iOk2, iKo );
+    if ( gp_Vec( dirs[ iOk1 ]).IsParallel( gp_Vec( dirs[ iOk2 ]), theAngTol ))
+    {
+      get3Dirs( iOk1, dirs );
+    }
+    else
+    {
+      dirs[ iKo  ] = dirs[ iOk1 ] ^ dirs[ iOk2 ];
+      dirs[ iOk2 ] = dirs[ iKo  ] ^ dirs[ iOk1 ];
+      if ( ( iOk1+1 ) % 3 != iOk2 )
+        dirs[ iKo ].Reverse();
+    }
+  }
+
+  for ( int iAx = 0; iAx < 3; ++iAx )
+  {
+    double size = dirs[iAx].Modulus();
+    if ( size > 1e-100 )
+      dirs[iAx] /= size;
+    for (int i = 0; i < 3; ++i )
+    {
+      bool isBlocked = spins[iAx][i]->blockSignals( true );
+      spins[iAx][i]->SetValue( dirs[iAx].Coord( i+1 ));
+      spins[iAx][i]->blockSignals( isBlocked );
+    }
+  }
+
+  updateAxesPreview();
+}
+
+//================================================================================
+/*!
+ * \brief Increment myDirTic and update the preview of axes
+ */
+//================================================================================
+
+void StdMeshersGUI_CartesianParamCreator::onAxisDirChange(const QString&)
+{
+  QObject* changedSpin = sender();
+  SMESHGUI_SpinBox** spins[3] = { &myXDirSpin[0], &myYDirSpin[0], &myZDirSpin[0] };
+  for ( int iAx = 0; iAx < 3; ++iAx )
+    if ( spins[iAx][0] == changedSpin ||
+         spins[iAx][1] == changedSpin ||
+         spins[iAx][2] == changedSpin )
+    {
+      myDirTic[ iAx ] = 1 + Max( Max( myDirTic[0], myDirTic[1] ), myDirTic[2] );
+      break;
+    }
+
+  onOrthogonalAxes( myOrthogonalChk->isChecked() );
+}
+
+//================================================================================
+/*!
+ * \brief Sets axis direction by a selected EDGE
+ */
+//================================================================================
+
+void StdMeshersGUI_CartesianParamCreator::onSelectionChange()
+{
+  int iAxis = myAxisBtnGrp->checkedId();
+  if ( iAxis < 0 )
+    return;
+
+  SALOME_ListIO aList;
+  SMESHGUI::GetSMESHGUI()->selectionMgr()->selectedObjects(aList);
+
+  TopoDS_Shape edge, shape;
+  for( SALOME_ListIteratorOfListIO anIt( aList ); anIt.More(); anIt.Next() )
+  {
+    GEOM::GEOM_Object_var go = SMESH::IObjectToInterface<GEOM::GEOM_Object>( anIt.Value() );
+    if ( GEOMBase::GetShape( go, shape ) && shape.ShapeType() == TopAbs_EDGE )
+    {
+      if ( !edge.IsNull() )
+        return; // several EDGEs selected
+      edge = shape;
+    }
+  }
+  if ( edge.IsNull() )
+    return;
+
+  TopoDS_Shape vv[2];
+  TopoDS_Iterator vIt( edge );
+  for ( ; vIt.More() && vv[1].IsNull(); vIt.Next() )
+    vv[ !vv[0].IsNull() ] = vIt.Value();
+
+  gp_Pnt pp[2];
+  if ( !GEOMBase::VertexToPoint( vv[0], pp[0] ) ||
+       !GEOMBase::VertexToPoint( vv[1], pp[1] ))
+    return;
+
+  SMESHGUI_SpinBox** spins[3] = { &myXDirSpin[0], &myYDirSpin[0], &myZDirSpin[0] };
+
+  gp_Vec newDir( pp[0], pp[1] );
+  gp_Vec curDir( spins[iAxis][0]->GetValue(),
+                 spins[iAxis][1]->GetValue(),
+                 spins[iAxis][2]->GetValue());
+  if ( newDir * curDir < 0 )
+    newDir.Reverse();
+
+  double size = newDir.Magnitude();
+  if ( size < 1e-100 )
+    return;
+  newDir /= size;
+
+  for (int i = 0; i < 3; ++i )
+  {
+    bool isBlocked = spins[iAxis][i]->blockSignals( true );
+    spins[iAxis][i]->SetValue( newDir.Coord( i+1 ));
+    spins[iAxis][i]->blockSignals( isBlocked );
+  }
+  myDirTic[ iAxis ] = 1 + Max( Max( myDirTic[0], myDirTic[1] ), myDirTic[2] );
+
+  onOrthogonalAxes( myOrthogonalChk->isChecked() );
+}
+
+//================================================================================
+/*!
+ * \brief Sets axes at which number of hexahedra is maximal
+ */
+//================================================================================
+
+void StdMeshersGUI_CartesianParamCreator::onOptimalAxes(bool)
+{
+  StdMeshers::StdMeshers_CartesianParameters3D_var h =
+    StdMeshers::StdMeshers_CartesianParameters3D::_narrow( hypothesis() );
+  if ( h->_is_nil() )
+    return;
+
+  QString shapeEntry = getMainShapeEntry();
+  if ( shapeEntry.isEmpty() )
+    return;
+
+  Handle(SALOME_InteractiveObject) io =
+    new SALOME_InteractiveObject( shapeEntry.toStdString().c_str(), "GEOM" );
+  GEOM::GEOM_Object_var geomObj = SMESH::IObjectToInterface<GEOM::GEOM_Object>( io );
+  if ( geomObj->_is_nil() )
+    return;
+
+  SMESH::DirStruct axDirs[3];
+  h->ComputeOptimalAxesDirs( geomObj,
+                             myOrthogonalChk->isChecked(),
+                             axDirs[0],
+                             axDirs[1],
+                             axDirs[2]);
+
+  SMESHGUI_SpinBox** spins[3] = { &myXDirSpin[0], &myYDirSpin[0], &myZDirSpin[0] };
+  for ( int iAx = 0; iAx < 3; ++iAx )
+  {
+    double coords[3] = { axDirs[iAx].PS.x, axDirs[iAx].PS.y, axDirs[iAx].PS.z };
+    for (int i = 0; i < 3; ++i )
+    {
+      bool isBlocked = spins[iAx][i]->blockSignals( true );
+      spins[iAx][i]->SetValue( coords[ i ]);
+      spins[iAx][i]->blockSignals( isBlocked );
+    }
+  }
+  updateAxesPreview();
+}
+
+//================================================================================
+/*!
+ * \brief Sets axes || to the axes of global CS
+ */
+//================================================================================
+
+void StdMeshersGUI_CartesianParamCreator::onResetAxes(bool)
+{
+  SMESHGUI_SpinBox** spins[3] = { &myXDirSpin[0], &myYDirSpin[0], &myZDirSpin[0] };
+  for ( int iAx = 0; iAx < 3; ++iAx )
+  {
+    for (int i = 0; i < 3; ++i )
+    {
+      bool isBlocked = spins[iAx][i]->blockSignals( true );
+      spins[iAx][i]->SetValue( iAx == i ? 1. : 0. );
+      spins[iAx][i]->blockSignals( isBlocked );
+    }
+    myDirTic[iAx] = 0;
+  }
+  updateAxesPreview();
+}
+
+//================================================================================
+/*!
+ * \brief SLOT called when the grid definintion mode changes
+ */
+//================================================================================
+
+void StdMeshersGUI_CartesianParamCreator::onGridModeChanged(int)
+{
+  bool haveSpacing = ( myAxisTabs[0]->isGridBySpacing() ||
+                       myAxisTabs[1]->isGridBySpacing() ||
+                       myAxisTabs[2]->isGridBySpacing() );
+
+  myFixedPointGrp->setEnabled( haveSpacing );
+}
index 5a02d5ca13bfcb1151ffed1e39c1e5e5e7593b30..48477ea0d9f262987f90ddd8864e1df0af5a06ee 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #include <QFrame>
 #include <QItemDelegate>
 
-class SMESHGUI_SpinBox;
-class QLineEdit;
+class QAbstractItemModel;
 class QButtonGroup;
-class QTreeWidgetItem;
-class QString;
-class QWidget;
-class QTreeWidget;
+class QCheckBox;
+class QGroupBox;
+class QLineEdit;
 class QListWidget;
-class QStyleOptionViewItem;
-class QModelIndex;
-class QAbstractItemModel;
 class QListWidgetItem;
+class QModelIndex;
+class QString;
+class QStyleOptionViewItem;
+class QTreeWidget;
+class QTreeWidgetItem;
+class QWidget;
+class SMESHGUI_MeshEditPreview;
+class SMESHGUI_SpinBox;
 
 namespace StdMeshersGUI
 {
@@ -78,6 +81,9 @@ namespace StdMeshersGUI
     SMESH::double_array* getCoordinates();
     void getSpacing(SMESH::string_array_out funs, SMESH::double_array_out points) const;
 
+  signals:
+    void gridModeChanged(int);
+
   private slots:
     void onInsert();
     void onDelete();
@@ -125,18 +131,40 @@ public:
   StdMeshersGUI_CartesianParamCreator( const QString& aHypType );
   virtual ~StdMeshersGUI_CartesianParamCreator();
 
-  virtual bool    checkParams( QString& ) const;
-  virtual QString helpPage() const;
+  virtual bool     checkParams( QString& ) const;
+  virtual QString  helpPage() const;
 
 protected:
   virtual QFrame*  buildFrame();
   virtual void     retrieveParams() const;
   virtual QString  storeParams() const;
 
+private slots:
+  bool             updateAxesPreview();
+  void             onOrthogonalAxes(bool);
+  void             onAxisDirChange(const QString&);
+  void             onSelectionChange();
+  void             onOptimalAxes(bool);
+  void             onResetAxes(bool);
+  void             onGridModeChanged(int);
+
 private:
   QLineEdit*                  myName;
   SMESHGUI_SpinBox*           myThreshold;
+  QCheckBox*                  myAddEdges;
+
   StdMeshersGUI::GridAxisTab* myAxisTabs[3];
+  QGroupBox*                  myFixedPointGrp;
+  SMESHGUI_SpinBox*           myPointSpin[3];
+  QCheckBox*                  myOrthogonalChk;
+  QButtonGroup*               myAxisBtnGrp;
+  SMESHGUI_SpinBox*           myXDirSpin[3];
+  SMESHGUI_SpinBox*           myYDirSpin[3];
+  SMESHGUI_SpinBox*           myZDirSpin[3];
+  SMESHGUI_MeshEditPreview*   myAxesPreview;
+  double                      myOrigin[3];
+  double                      myAxesLen;
+  int                         myDirTic[3];
 };
 
 #endif // STDMESHERSGUI_CartesianParamCreator_H
index cac019a7b42718cef118b37665b88f93b0bf0b93..5234cf911ad42c7629c978a15bb93dbff2275c4f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9659781adde3880df11c4861b628e3bcf9186584..3806b3e55b4352eb1277afc26c16e22413ad3048 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 6b733a2498cad5937c8681275b15ca465f70635c..582b92b2585ab0bd1df17b282c932c538be729f7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8078d08b5edf59a8324e8d2afbca62deba1804f7..7cdbc84e83256150c1a288a3a476c0cce01ca3e5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7451a16e5ddb97a79ad34c5557766ba5e0c94208..4d36d494c43c8e683bf2ab5b8548b980ae275884 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c60a0949e75682d21545fc5acfd9e41a8e788bc2..bcd19407eedeea0992f3af18fc14e67f6df0c2ab 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4cbe1bce3493bdd033c946864519b15d0b3b0559..78608b81f07bc4cfb490abe5193afc781db51836 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index aaeb5ff2d7bf9c17613abcbd1c06d0c616450225..2a86090def3c124f362c37f286297b90340470c8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3e2bd4e433bb8e0cd0c68bc7dce560b64546bf77..9003083e8b3686d36343e8428357e305ffab4469 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1792ae8559441808a45eb3b14dd10652c21cb8f5..7c9cb4dc4b5333ad214ae1384d03dff886f1ed76 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 90fe4011bc52ffeefd496d6e99ea5ebcb9b0932e..85b048d6e959636c6767e424cac1b8c931917d34 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f1582f2ba3d75ec2a0cbcb3ea99195001b331b64..02f4f36e097daf2ca1370f92ad7cfcd4042041da 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index bbde9200ced6819239079f1991f5b01f5b1ba0b6..a99177bceb2ed0d32217f38da14ffdc21e646316 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #include "StdMeshersGUI_QuadrangleParamWdg.h"
 
 #include "SMESHGUI.h"
+#include "SMESHGUI_SpinBox.h"
+#include "StdMeshersGUI_SubShapeSelectorWdg.h"
 
-#include "SUIT_ResourceMgr.h"
+#include <GEOMBase.h>
+#include <LightApp_SelectionMgr.h>
+#include <SALOME_ListIO.hxx>
+#include <SALOME_ListIteratorOfListIO.hxx>
+#include <SUIT_ResourceMgr.h>
 
 // Qt includes
 #include <QButtonGroup>
-#include <QRadioButton>
-#include <QLabel>
+#include <QFrame>
 #include <QGridLayout>
+#include <QGroupBox>
+#include <QLabel>
+#include <QLineEdit>
+#include <QListWidget>
+#include <QListWidgetItem>
+#include <QPushButton>
+#include <QRadioButton>
+#include <QTreeWidget>
+#include <QVBoxLayout>
 
 // IDL includes
 #include <SALOMEconfig.h>
 #include CORBA_CLIENT_HEADER(SMESH_BasicHypothesis)
+#include CORBA_CLIENT_HEADER(GEOM_Gen)
+
 
 #define SPACING 6
-#define MARGIN 0
+#define MARGIN 11
+
+enum { TAB_TRANSITION, TAB_VERTEX, TAB_ENF_POINTS };
+
+//================================================================================
+// function : Constructor
+// purpose  :
+//================================================================================
+
+StdMeshersGUI_QuadrangleParamCreator::StdMeshersGUI_QuadrangleParamCreator(const QString& aHypType)
+  : StdMeshersGUI_StdHypothesisCreator( aHypType )
+{
+}
+
+//=======================================================================
+//function : helpPage
+//purpose  : 
+//=======================================================================
+
+QString  StdMeshersGUI_QuadrangleParamCreator::helpPage() const
+{
+  return "a2d_meshing_hypo_page.html#hypo_quad_params_anchor";
+}
+
+//=======================================================================
+//function : buildFrame
+//purpose  :
+//=======================================================================
+
+QFrame*  StdMeshersGUI_QuadrangleParamCreator::buildFrame()
+{
+  QFrame* fr = new QFrame();
+
+  QGridLayout* lay = new QGridLayout( fr );
+  lay->setMargin( MARGIN );
+  lay->setSpacing( SPACING );
+  int row = 0;
+
+  myName = 0;
+  if ( isCreation() )
+  {
+    myName = new QLineEdit( fr );
+    QLabel* nameLab = new QLabel( tr("SMESH_NAME"));
+    lay->addWidget( nameLab, row, 0 );
+    lay->addWidget( myName,  row, 1 );
+    ++row;
+  }
+
+  // Transition type
+
+  myTypeWdg = new StdMeshersGUI_QuadrangleParamWdg( fr );
+
+  // Vertexes
+
+  myVertexSelWdg = new StdMeshersGUI_SubShapeSelectorWdg( fr, TopAbs_VERTEX );
+  myVertexSelWdg->layout()->setMargin( MARGIN );
+
+  // Enforced Points
+
+  QWidget* pointsFrame = new QWidget( fr );
+  QVBoxLayout* pointsLay = new QVBoxLayout( pointsFrame );
+  pointsLay->setMargin(MARGIN);
+  pointsLay->setSpacing(SPACING);
+
+  // shapes
+  QGroupBox* shapesGroup = new QGroupBox( tr("SHAPES"), pointsFrame );
+  myShapesList = new QListWidget( shapesGroup );
+  myAddShapeBut = new QPushButton( tr("SMESH_BUT_ADD"), shapesGroup );
+  QPushButton* remShapeBut = new QPushButton( tr("SMESH_BUT_REMOVE"), shapesGroup );
+  //
+  QGridLayout* shapesLay = new QGridLayout( shapesGroup );
+  shapesLay->setMargin(MARGIN);
+  shapesLay->setSpacing(SPACING);
+  shapesLay->addWidget( myShapesList,  0, 0, 3, 2 );
+  shapesLay->addWidget( myAddShapeBut, 0, 2 );
+  shapesLay->addWidget( remShapeBut,   1, 2 );
+  shapesLay->setColumnStretch( 0, 1 );
+  shapesLay->setRowStretch   ( 2, 1 );
+
+  // coords
+  QGroupBox* coordsGroup = new QGroupBox( tr("POINTS"), pointsFrame );
+  myCoordsTreeWdg = new QTreeWidget( coordsGroup );
+  myCoordsTreeWdg->setColumnCount ( 3 );
+  myCoordsTreeWdg->setHeaderLabels( QStringList() << "X" << "Y" << "Z" );
+  myCoordsTreeWdg->setItemDelegate( new ItemDelegate( myCoordsTreeWdg ));
+  QPushButton* addCoordBut = new QPushButton( tr("SMESH_BUT_ADD"), coordsGroup );
+  QPushButton* remCoordBut = new QPushButton( tr("SMESH_BUT_REMOVE"), coordsGroup );
+  //
+  QGridLayout* coordsLay = new QGridLayout( coordsGroup );
+  coordsLay->setMargin(MARGIN);
+  coordsLay->setSpacing(SPACING);
+  coordsLay->addWidget( myCoordsTreeWdg, 0, 0, 3, 2 );
+  coordsLay->addWidget( addCoordBut,     0, 2 );
+  coordsLay->addWidget( remCoordBut,     1, 2 );
+  coordsLay->setColumnStretch( 0, 1 );
+  coordsLay->setRowStretch   ( 2, 1 );
+
+  pointsLay->addWidget( shapesGroup );
+  pointsLay->addWidget( coordsGroup );
+
+  // Tabs
+  myTabs = new QTabWidget( fr );
+  myTabs->addTab( myTypeWdg,      tr("TRANSITION"));
+  myTabs->addTab( myVertexSelWdg, tr("SMESH_BASE_VERTEX"));
+  myTabs->addTab( pointsFrame,    tr("ENF_NODES"));
+
+  lay->addWidget( myTabs, row, 0, 2, 3 );
+
+  // signals
+  connect( myTypeWdg,     SIGNAL( typeChanged(int)),   SLOT( onTypeChanged(int)));
+  connect( myAddShapeBut, SIGNAL( clicked()),          SLOT( onAddShape() ));
+  connect( remShapeBut,   SIGNAL( clicked()),          SLOT( onRemoveShape() ));
+  connect( addCoordBut,   SIGNAL( clicked()),          SLOT( onAddPoint() ));
+  connect( remCoordBut,   SIGNAL( clicked()),          SLOT( onRemovePoint() ));
+  connect( myTabs,        SIGNAL( currentChanged(int)),SLOT( onTabChanged(int)));
+
+  LightApp_SelectionMgr* selMgr = SMESHGUI::GetSMESHGUI()->selectionMgr();
+  connect( selMgr, SIGNAL(currentSelectionChanged()), SLOT( onSelectionChanged()));
+
+  return fr;
+}
+
+//=======================================================================
+//function : retrieveParams
+//purpose  :
+//=======================================================================
+
+void StdMeshersGUI_QuadrangleParamCreator::retrieveParams() const
+{
+  StdMeshers::StdMeshers_QuadrangleParams_var h =
+    StdMeshers::StdMeshers_QuadrangleParams::_narrow( initParamsHypothesis() );
+
+  // name
+  if( myName )
+    myName->setText( hypName() );
+
+  // main shape
+  myVertexSelWdg->SetMaxSize(1);
+  QString anEntry    = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
+  QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry();
+  if ( anEntry.isEmpty() )
+    anEntry = h->GetObjectEntry();
+  myVertexSelWdg->SetGeomShapeEntry(anEntry);
+  myVertexSelWdg->SetMainShapeEntry(aMainEntry);
+
+  if ( !isCreation())
+  {
+    // type
+    myTypeWdg->SetType(int(h->GetQuadType()));
+
+    // vertex
+    int vertID = h->GetTriaVertex();
+    if (vertID > 0) {
+      SMESH::long_array_var aVec = new SMESH::long_array;
+      aVec->length(1);
+      aVec[0] = vertID;
+      myVertexSelWdg->SetListOfIDs(aVec);
+    }
+
+    // enforced nodes
+    GEOM::ListOfGO_var     shapes;
+    SMESH::nodes_array_var points;
+    h->GetEnforcedNodes( shapes, points );
+    for ( int i = 0; i < shapes->length(); ++i )
+    {
+      CORBA::String_var name  = shapes[i]->GetName();
+      CORBA::String_var entry = shapes[i]->GetStudyEntry();
+      QListWidgetItem* item = new QListWidgetItem( name.in() );
+      item->setData( Qt::UserRole, entry.in() );
+      myShapesList->addItem( item );
+    }
+    for ( int i = 0; i < points->length(); ++i )
+    {
+      QTreeWidgetItem* item = new QTreeWidgetItem
+        ( QStringList()
+          << QString::number( points[i].x )
+          << QString::number( points[i].y )
+          << QString::number( points[i].z ));
+      item->setFlags( item->flags() | Qt::ItemIsEditable );
+      myCoordsTreeWdg->addTopLevelItem( item );
+    }
+  }
+  ((StdMeshersGUI_QuadrangleParamCreator*) this)->onSelectionChanged();
+}
+
+//=======================================================================
+//function : storeParams
+//purpose  :
+//=======================================================================
+
+QString  StdMeshersGUI_QuadrangleParamCreator::storeParams() const
+{
+  StdMeshers::StdMeshers_QuadrangleParams_var h =
+    StdMeshers::StdMeshers_QuadrangleParams::_narrow( hypothesis() );
+
+  // name
+  if( myName )
+    SMESH::SetName( SMESH::FindSObject( h ), myName->text().toLatin1().constData() );
+
+  // transition
+  h->SetQuadType( StdMeshers::QuadType( myTypeWdg->GetType()) );
+
+  // vertex
+  if ( myVertexSelWdg->GetListSize() > 0 )
+  {
+    h->SetTriaVertex( myVertexSelWdg->GetListOfIDs()[0] ); // getlist must be called once
+    h->SetObjectEntry( myVertexSelWdg->GetMainShapeEntry() );
+  }
+  else
+  {
+    h->SetTriaVertex( -1 );
+  }
+
+  // enfored nodes
+
+  GEOM::ListOfGO_var goList = new GEOM::ListOfGO;
+  int nbShapes = 0;
+  goList->length( myShapesList->count() );
+  for ( int i = 0; i < myShapesList->count(); ++i )
+  {
+    QListWidgetItem* item = myShapesList->item(i);
+    QString         entry = item->data( Qt::UserRole ).toString();
+    Handle(SALOME_InteractiveObject) io =
+      new SALOME_InteractiveObject( entry.toStdString().c_str(), "GEOM" );
+    GEOM::GEOM_Object_var go = GEOMBase::ConvertIOinGEOMObject( io );
+    if ( !go->_is_nil() )
+      goList[ nbShapes++ ] = go;
+  }
+  goList->length( nbShapes );
+  
+  SMESH::nodes_array_var points = new SMESH::nodes_array;
+  points->length( myCoordsTreeWdg->topLevelItemCount() );
+  for ( int i = 0; i < myCoordsTreeWdg->topLevelItemCount(); ++i )
+  {
+    QTreeWidgetItem* item = myCoordsTreeWdg->topLevelItem( i );
+    points[i].x = item->text(0).toInt();
+    points[i].y = item->text(1).toInt();
+    points[i].z = item->text(2).toInt();
+  }
+  h->SetEnforcedNodes( goList, points );
+
+  return "";
+}
+
+//=======================================================================
+//function : onTypeChanged
+//purpose  :
+//=======================================================================
+
+void StdMeshersGUI_QuadrangleParamCreator::onTypeChanged(int type)
+{
+  myTabs->setTabEnabled( TAB_ENF_POINTS, ( type != StdMeshers::QUAD_REDUCED ));
+}
+
+//=======================================================================
+//function : onAddShape
+//purpose  : 
+//=======================================================================
+
+void StdMeshersGUI_QuadrangleParamCreator::onAddShape()
+{
+  if ( !mySelectedShapeIO.IsNull() )
+  {
+    QListWidgetItem* item = new QListWidgetItem( mySelectedShapeIO->getName() );
+    item->setData( Qt::UserRole, mySelectedShapeIO->getEntry() );
+    myShapesList->addItem( item );
+    mySelectedShapeIO.Nullify();
+    myAddShapeBut->setEnabled( false );
+  }
+}
+
+//=======================================================================
+//function : onRemoveShape
+//purpose  : 
+//=======================================================================
+
+void StdMeshersGUI_QuadrangleParamCreator::onRemoveShape()
+{
+  if ( QListWidgetItem * item = myShapesList->currentItem() )
+    delete item;
+  onSelectionChanged();
+}
+
+//=======================================================================
+//function : onAddPoint
+//purpose  : 
+//=======================================================================
+
+void StdMeshersGUI_QuadrangleParamCreator::onAddPoint()
+{
+  QTreeWidgetItem* item = new QTreeWidgetItem( QStringList() << "0" << "0" << "0" );
+  item->setFlags( item->flags() | Qt::ItemIsEditable );
+  myCoordsTreeWdg->addTopLevelItem( item );
+}
+
+//=======================================================================
+//function : onRemovePoint
+//purpose  :
+//=======================================================================
+
+void StdMeshersGUI_QuadrangleParamCreator::onRemovePoint()
+{
+  if ( myCoordsTreeWdg->topLevelItemCount() )
+    delete myCoordsTreeWdg->currentItem();
+}
+
+//=======================================================================
+//function : onSelectionChanged
+//purpose  : 
+//=======================================================================
+
+void StdMeshersGUI_QuadrangleParamCreator::onSelectionChanged()
+{
+  mySelectedShapeIO.Nullify();
+
+  // find a sole selected geometry
+  LightApp_SelectionMgr* selMgr = SMESHGUI::GetSMESHGUI()->selectionMgr();
+  SALOME_ListIO          selList;
+  selMgr->selectedObjects( selList );
+  SALOME_ListIteratorOfListIO selIt( selList );
+  for ( ; selIt.More(); selIt.Next() )
+  {
+    GEOM::GEOM_Object_var go = GEOMBase::ConvertIOinGEOMObject( selIt.Value() );
+    if ( !go->_is_nil() )
+    {
+      if ( !mySelectedShapeIO.IsNull() )
+      {
+        mySelectedShapeIO.Nullify();
+        break;
+      }
+      mySelectedShapeIO = selIt.Value();
+      if ( !mySelectedShapeIO->getName() || !mySelectedShapeIO->getName()[0] )
+        mySelectedShapeIO.Nullify();
+    }
+  }
+  // check if a selected geometry is not already in myShapesList
+  if ( !mySelectedShapeIO.IsNull() )
+  {
+    for ( int i = 0; i < myShapesList->count(); ++i )
+      if ( myShapesList->item(i)->data( Qt::UserRole ) == mySelectedShapeIO->getEntry() )
+      {
+        mySelectedShapeIO.Nullify();
+        break;
+      }
+  }
+  myAddShapeBut->setEnabled( !mySelectedShapeIO.IsNull() );
+}
+
+//=======================================================================
+//function : onTabChanged
+//purpose  : 
+//=======================================================================
+
+void StdMeshersGUI_QuadrangleParamCreator::onTabChanged(int i)
+{
+  myVertexSelWdg->showPreview( i == TAB_VERTEX );
+}
 
 //================================================================================
 // function : Constructor
 // purpose  :
 //================================================================================
+
 StdMeshersGUI_QuadrangleParamWdg::StdMeshersGUI_QuadrangleParamWdg (QWidget * parent)
-  : QWidget(parent),
-    myType(0)
+  : QWidget(parent), myType(0)
 {
   myType = new QButtonGroup (this);
 
@@ -71,6 +443,8 @@ StdMeshersGUI_QuadrangleParamWdg::StdMeshersGUI_QuadrangleParamWdg (QWidget * pa
 
   setLayout(typeLay);
   setMinimumWidth(300);
+
+  connect( myType, SIGNAL( buttonClicked(int)), this, SIGNAL( typeChanged(int)));
 }
 
 //================================================================================
@@ -98,3 +472,25 @@ int StdMeshersGUI_QuadrangleParamWdg::GetType()
 {
   return myType->checkedId();
 }
+
+//================================================================================
+/*!
+  \brief Constructor
+*/
+StdMeshersGUI_QuadrangleParamCreator::
+ItemDelegate::ItemDelegate( QObject* parent ) : QItemDelegate( parent )
+{
+}
+//================================================================================
+/*!
+  \brief Create item editor widget
+*/
+QWidget* StdMeshersGUI_QuadrangleParamCreator::
+ItemDelegate::createEditor( QWidget*                    parent,
+                            const QStyleOptionViewItem& option,
+                            const QModelIndex&          index ) const
+{
+  SMESHGUI_SpinBox* sb = new SMESHGUI_SpinBox( parent );
+  sb->RangeStepAndValidator( COORD_MIN, COORD_MAX, 10 );
+  return sb;
+}
index 7ce5b314d626425e62fc6c82fd01a054041cc8bd..3e87369b067a2970c05bdba7e3cc6dbdcfc08e58 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 // SMESH includes
 #include "SMESH_StdMeshersGUI.hxx"
+#include "StdMeshersGUI_StdHypothesisCreator.h"
+
+#include <SALOME_InteractiveObject.hxx>
 
 // Qt includes
 #include <QWidget>
+#include <QItemDelegate>
+
 
 class QButtonGroup;
+class QLineEdit;
+class QListWidget;
+class QPushButton;
+class QTabWidget;
+class QTreeWidget;
+class StdMeshersGUI_QuadrangleParamWdg;
+class StdMeshersGUI_SubShapeSelectorWdg;
+
+//================================================================================
+/*!
+ * \brief Quadrangle Parameters Creator
+ */
+class STDMESHERSGUI_EXPORT StdMeshersGUI_QuadrangleParamCreator : public StdMeshersGUI_StdHypothesisCreator
+{
+  Q_OBJECT
+
+    class ItemDelegate;
+
+ public:
+  StdMeshersGUI_QuadrangleParamCreator( const QString& aHypType );
+
+  //virtual bool     checkParams( QString& ) const;
+  virtual QString  helpPage() const;
+
+ protected:
+  virtual QFrame*  buildFrame();
+  virtual void     retrieveParams() const;
+  virtual QString  storeParams() const;
+
+ private slots:
+
+  void onTypeChanged(int type);
+  void onAddShape();
+  void onRemoveShape();
+  void onAddPoint();
+  void onRemovePoint();
+  void onSelectionChanged();
+  void onTabChanged(int);
+
+ private:
 
+  QLineEdit*                         myName;
+  StdMeshersGUI_QuadrangleParamWdg*  myTypeWdg;
+  StdMeshersGUI_SubShapeSelectorWdg* myVertexSelWdg;
+  QListWidget*                       myShapesList;
+  QPushButton*                       myAddShapeBut;
+  QTreeWidget*                       myCoordsTreeWdg;
+  QTabWidget*                        myTabs;
+  Handle(SALOME_InteractiveObject)   mySelectedShapeIO;
+};
+
+//================================================================================
+/*!
+ * \brief Transition type widget
+ */
 class STDMESHERSGUI_EXPORT StdMeshersGUI_QuadrangleParamWdg : public QWidget
 {
   Q_OBJECT
 
-public:
+    public:
   StdMeshersGUI_QuadrangleParamWdg (QWidget* parent = 0);
   ~StdMeshersGUI_QuadrangleParamWdg();
 
   void SetType (int theType);
   int  GetType ();
 
-private:
-  // Quadranle preference, Triangle preference, Reduced
-  QButtonGroup* myType;
+  GEOM::ListOfGO*     GetShapes();
+  SMESH::nodes_array* GetPoints();
+  void                Set( GEOM::ListOfGO_var shapes, SMESH::nodes_array_var points );
+
+ signals:
+
+  void typeChanged(int);
+
+ private:
+  QButtonGroup* myType; // Quadranle preference, Triangle preference, Reduced
+};
+
+//================================================================================
+/*!
+ * \brief Item delegate for a tree widget
+ */
+class StdMeshersGUI_QuadrangleParamCreator::ItemDelegate : public QItemDelegate
+{
+  Q_OBJECT
+public:
+  ItemDelegate( QObject* );
+  QWidget* createEditor( QWidget*, const QStyleOptionViewItem&, const QModelIndex& ) const;
 };
 
 #endif // STDMESHERSGUI_QUADRANGLEPARAMWDG_H
index cca80aa17dc8febde0f83562447571f5e849342c..1d939f28bcde2ded62e7e5990fa89a6087c81a93 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index fd8be84a27ff875745e4f5019e035c312b1ea152..a0133136b8fec292b957b4be5c55a349947fbe4f 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ca774d105c118f684ab2517e567f0bf1952146a1..891b2c0c86170a4fdc62f383ba55a3eb9d44303d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -523,6 +523,23 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
         h->SetObjectEntry( w->GetMainShapeEntry() );
       }
     }
+    else if( hypType()=="GeometricProgression" )
+    {
+      StdMeshers::StdMeshers_Geometric1D_var h =
+        StdMeshers::StdMeshers_Geometric1D::_narrow( hypothesis() );
+
+      StdMeshersGUI_SubShapeSelectorWdg* w = 
+        widget< StdMeshersGUI_SubShapeSelectorWdg >( 2 );
+
+      h->SetVarParameter( params[0].text(), "SetStartLength" );
+      h->SetStartLength( params[0].myValue.toDouble() );
+      h->SetVarParameter( params[1].text(), "SetCommonRatio" );
+      h->SetCommonRatio( params[1].myValue.toDouble() );
+      if (w) {
+        h->SetReversedEdges( w->GetListOfIDs() );
+        h->SetObjectEntry( w->GetMainShapeEntry() );
+      }
+    }
     else if( hypType()=="FixedPoints1D" )
     {
       StdMeshers::StdMeshers_FixedPoints1D_var h =
@@ -704,9 +721,9 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
       h->SetStretchFactor ( params[2].myValue.toDouble() );
 
       if ( StdMeshersGUI_SubShapeSelectorWdg* idsWg = 
-           widget< StdMeshersGUI_SubShapeSelectorWdg >( 3 ))
+           widget< StdMeshersGUI_SubShapeSelectorWdg >( 4 ))
       {
-        h->SetIgnoreFaces( idsWg->GetListOfIDs() );
+        h->SetFaces( idsWg->GetListOfIDs(), params[3].myValue.toInt() );
       }
     }
     else if( hypType()=="ViscousLayers2D" )
@@ -727,23 +744,23 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
         h->SetEdges( idsWg->GetListOfIDs(), params[3].myValue.toInt() );
       }
     }
-    else if( hypType()=="QuadrangleParams" )
-    {
-      StdMeshers::StdMeshers_QuadrangleParams_var h =
-        StdMeshers::StdMeshers_QuadrangleParams::_narrow( hypothesis() );
-      StdMeshersGUI_SubShapeSelectorWdg* w1 =
-        widget< StdMeshersGUI_SubShapeSelectorWdg >( 0 );
-      StdMeshersGUI_QuadrangleParamWdg* w2 =
-        widget< StdMeshersGUI_QuadrangleParamWdg >( 1 );
-      if (w1 && w2) {
-        if (w1->GetListSize() > 0) {
-          h->SetTriaVertex(w1->GetListOfIDs()[0]); // getlist must be called once
-          const char * entry = w1->GetMainShapeEntry();
-          h->SetObjectEntry(entry);
-        }
-        h->SetQuadType(StdMeshers::QuadType(w2->GetType()));
-      }
-    }
+    // else if( hypType()=="QuadrangleParams" )
+    // {
+    //   StdMeshers::StdMeshers_QuadrangleParams_var h =
+    //     StdMeshers::StdMeshers_QuadrangleParams::_narrow( hypothesis() );
+    //   StdMeshersGUI_SubShapeSelectorWdg* w1 =
+    //     widget< StdMeshersGUI_SubShapeSelectorWdg >( 0 );
+    //   StdMeshersGUI_QuadrangleParamWdg* w2 =
+    //     widget< StdMeshersGUI_QuadrangleParamWdg >( 1 );
+    //   if (w1 && w2) {
+    //     if (w1->GetListSize() > 0) {
+    //       h->SetTriaVertex(w1->GetListOfIDs()[0]); // getlist must be called once
+    //       const char * entry = w1->GetMainShapeEntry();
+    //       h->SetObjectEntry(entry);
+    //     }
+    //     h->SetQuadType(StdMeshers::QuadType(w2->GetType()));
+    //   }
+    // }
   }
   return valueStr;
 }
@@ -878,6 +895,41 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
     customWidgets()->append ( aDirectionWidget );
   }
 
+  else if( hypType()=="GeometricProgression" )
+  {
+    StdMeshers::StdMeshers_Geometric1D_var h =
+      StdMeshers::StdMeshers_Geometric1D::_narrow( hyp );
+
+    item.myName = tr( "SMESH_START_LENGTH_PARAM" );
+    if(!initVariableName( hyp, item, "SetStartLength" ))
+      item.myValue = h->GetStartLength();
+    p.append( item );
+
+    customWidgets()->append (0);
+
+    item.myName = tr( "SMESH_COMMON_RATIO" );
+    if(!initVariableName( hyp, item, "SetCommonRatio" ))
+      item.myValue = h->GetCommonRatio();
+    p.append( item );
+
+    customWidgets()->append (0);
+
+    item.myName = tr( "SMESH_REVERSED_EDGES" );
+    p.append( item );
+
+    StdMeshersGUI_SubShapeSelectorWdg* aDirectionWidget =
+      new StdMeshersGUI_SubShapeSelectorWdg();
+    QString aGeomEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
+    QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry();
+    if ( aGeomEntry == "" )
+      aGeomEntry = h->GetObjectEntry();
+
+    aDirectionWidget->SetGeomShapeEntry( aGeomEntry );
+    aDirectionWidget->SetMainShapeEntry( aMainEntry );
+    aDirectionWidget->SetListOfIDs( h->GetReversedEdges() );
+    aDirectionWidget->showPreview( true );
+    customWidgets()->append ( aDirectionWidget );
+  }
 
   else if( hypType()=="FixedPoints1D" )
   {
@@ -1190,17 +1242,30 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
     customWidgets()->append (0);
 
     QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry();
+    QString aSubEntry  = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
     if ( !aMainEntry.isEmpty() )
     {
-      item.myName = tr( "SMESH_FACES_WO_LAYERS" );
+      item.myName = tr( "TO_IGNORE_FACES_OR_NOT" );
+      p.append( item );
+
+      StdMeshersGUI_RadioButtonsGrpWdg* ignoreWdg = new StdMeshersGUI_RadioButtonsGrpWdg("");
+      ignoreWdg->setButtonLabels ( QStringList()
+                                   << tr("NOT_TO_IGNORE_FACES")
+                                   << tr("TO_IGNORE_FACES") );
+      ignoreWdg->setChecked( h->GetIsToIgnoreFaces() );
+      connect(ignoreWdg->getButtonGroup(),SIGNAL(buttonClicked(int)),this,SLOT(onValueChanged()));
+      customWidgets()->append( ignoreWdg );
+
+      item.myName =
+        tr( h->GetIsToIgnoreFaces() ? "SMESH_FACES_WO_LAYERS" : "SMESH_FACES_WITH_LAYERS" );
       p.append( item );
 
       StdMeshersGUI_SubShapeSelectorWdg* idsWg =
         new StdMeshersGUI_SubShapeSelectorWdg(0,TopAbs_FACE);
 
-      idsWg->SetGeomShapeEntry( aMainEntry );
       idsWg->SetMainShapeEntry( aMainEntry );
-      idsWg->SetListOfIDs( h->GetIgnoreFaces() );
+      idsWg->SetGeomShapeEntry( aSubEntry.isEmpty() ? aMainEntry : aSubEntry );
+      idsWg->SetListOfIDs( h->GetFaces() );
       idsWg->showPreview( true );
       customWidgets()->append ( idsWg );
     }
@@ -1229,6 +1294,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
     customWidgets()->append (0);
 
     QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry();
+    QString aSubEntry  = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
     if ( !aMainEntry.isEmpty() )
     {
       item.myName = tr("TO_IGNORE_EDGES_OR_NOT");
@@ -1249,53 +1315,53 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
       StdMeshersGUI_SubShapeSelectorWdg* idsWg =
         new StdMeshersGUI_SubShapeSelectorWdg(0,TopAbs_EDGE);
 
-      idsWg->SetGeomShapeEntry( aMainEntry );
       idsWg->SetMainShapeEntry( aMainEntry );
+      idsWg->SetGeomShapeEntry( aSubEntry.isEmpty() ? aMainEntry : aSubEntry );
       idsWg->SetListOfIDs( h->GetEdges() );
       idsWg->showPreview( true );
       customWidgets()->append ( idsWg );
     }
   }
-  else if (hypType() == "QuadrangleParams")
-  {
-    StdMeshers::StdMeshers_QuadrangleParams_var h =
-      StdMeshers::StdMeshers_QuadrangleParams::_narrow(hyp);
-
-    item.myName = tr("SMESH_BASE_VERTEX");
-    p.append(item);
-
-    StdMeshersGUI_SubShapeSelectorWdg* aDirectionWidget =
-      new StdMeshersGUI_SubShapeSelectorWdg(0, TopAbs_VERTEX);
-    aDirectionWidget->SetMaxSize(1);
-    QString anEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
-    QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry();
-    if (anEntry == "")
-      anEntry = h->GetObjectEntry();
-    aDirectionWidget->SetGeomShapeEntry(anEntry);
-    aDirectionWidget->SetMainShapeEntry(aMainEntry);
-    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->showPreview(true);
-
-    item.myName = tr("SMESH_QUAD_TYPE");
-    p.append(item);
-
-    StdMeshersGUI_QuadrangleParamWdg* aTypeWidget =
-      new StdMeshersGUI_QuadrangleParamWdg();
-    if (!isCreation()) {
-      aTypeWidget->SetType(int(h->GetQuadType()));
-    }
-
-    customWidgets()->append(aDirectionWidget);
-    customWidgets()->append(aTypeWidget);
-  }
+  // else if (hypType() == "QuadrangleParams")
+  // {
+  //   StdMeshers::StdMeshers_QuadrangleParams_var h =
+  //     StdMeshers::StdMeshers_QuadrangleParams::_narrow(hyp);
+
+  //   item.myName = tr("SMESH_BASE_VERTEX");
+  //   p.append(item);
+
+  //   StdMeshersGUI_SubShapeSelectorWdg* aDirectionWidget =
+  //     new StdMeshersGUI_SubShapeSelectorWdg(0, TopAbs_VERTEX);
+  //   aDirectionWidget->SetMaxSize(1);
+  //   QString anEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
+  //   QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry();
+  //   if (anEntry == "")
+  //     anEntry = h->GetObjectEntry();
+  //   aDirectionWidget->SetGeomShapeEntry(anEntry);
+  //   aDirectionWidget->SetMainShapeEntry(aMainEntry);
+  //   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->showPreview(true);
+
+  //   item.myName = tr("SMESH_QUAD_TYPE");
+  //   p.append(item);
+
+  //   StdMeshersGUI_QuadrangleParamWdg* aTypeWidget =
+  //     new StdMeshersGUI_QuadrangleParamWdg();
+  //   if (!isCreation()) {
+  //     aTypeWidget->SetType(int(h->GetQuadType()));
+  //   }
+
+  //   customWidgets()->append(aDirectionWidget);
+  //   customWidgets()->append(aTypeWidget);
+  // }
   else
     res = false;
   return res;
@@ -1325,6 +1391,13 @@ void StdMeshersGUI_StdHypothesisCreator::attuneStdWidget (QWidget* w, const int)
     {
       sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "parametric_precision" );
     }
+    else if( hypType()=="GeometricProgression" )
+    {
+      if (sb->objectName() == tr("SMESH_START_LENGTH_PARAM"))
+        sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
+      else if (sb->objectName() == tr("SMESH_COMMON_RATIO"))
+        sb->RangeStepAndValidator( -VALUE_MAX, VALUE_MAX, 0.5, "len_tol_precision" );
+    }
     else if( hypType()=="MaxLength" )
     {
       sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
@@ -1423,6 +1496,7 @@ QString StdMeshersGUI_StdHypothesisCreator::hypTypeName( const QString& t ) cons
     types.insert( "Deflection1D", "DEFLECTION1D" );
     types.insert( "Adaptive1D", "ADAPTIVE1D" );
     types.insert( "Arithmetic1D", "ARITHMETIC_1D" );
+    types.insert( "GeometricProgression", "GEOMETRIC_1D" );
     types.insert( "FixedPoints1D", "FIXED_POINTS_1D" );
     types.insert( "AutomaticLength", "AUTOMATIC_LENGTH" );
     types.insert( "ProjectionSource1D", "PROJECTION_SOURCE_1D" );
@@ -1519,13 +1593,11 @@ bool StdMeshersGUI_StdHypothesisCreator::getParamFromCustomWidget( StdParam & pa
     param.myValue = w->GetValue();
     return true;
   }
-  if ( widget->inherits( "StdMeshersGUI_QuadrangleParamWdg" ))
-  {
-    //const StdMeshersGUI_QuadrangleParamWdg * w =
-    //  static_cast<const StdMeshersGUI_QuadrangleParamWdg*>( widget );
-    param.myValue = "QuadType";
-    return true;
-  }
+  // if ( widget->inherits( "StdMeshersGUI_QuadrangleParamWdg" ))
+  // {
+  //   param.myValue = "QuadType";
+  //   return true;
+  // }
   if ( widget->inherits( "StdMeshersGUI_FixedPointsParamWdg" ))
   {
     const StdMeshersGUI_FixedPointsParamWdg * w =
@@ -1596,12 +1668,15 @@ void StdMeshersGUI_StdHypothesisCreator::valueChanged( QWidget* paramWidget)
       toCopyGroups->setEnabled( true );
     }
   }
-  else if ( hypType() == "ViscousLayers2D" && paramWidget->inherits("QButtonGroup"))
+  else if ( hypType().startsWith( "ViscousLayers" ) && paramWidget->inherits("QButtonGroup"))
   {
     if ( QLabel* label = getLabel(4) )
     {
       bool toIgnore = widget< StdMeshersGUI_RadioButtonsGrpWdg >( 3 )->checkedId();
-      label->setText( tr( toIgnore ? "SMESH_EDGES_WO_LAYERS" : "SMESH_EDGES_WITH_LAYERS" ));
+      if ( hypType() == "ViscousLayers2D" )
+        label->setText( tr( toIgnore ? "SMESH_EDGES_WO_LAYERS" : "SMESH_EDGES_WITH_LAYERS" ));
+      else
+        label->setText( tr( toIgnore ? "SMESH_FACES_WO_LAYERS" : "SMESH_FACES_WITH_LAYERS" ));
     }
   }
 }
index b43746cd2ddf19aa50406dde161d981eb6177edf..2f8a3859c481d1472e7d6aea278f0df76f80e50b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4f63c559b5027472855678b4c77d0070aca20791..935df0cc39f7119edfdc249b0711beff7ed24f2f 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 661b6bd18abd560393b43787259b6f5788fbcf84..f8ea6e9e1ec43b38f1ab004ffad66998d0bfa412 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a729340e2902e8852c3f8effc7ff6f85b1b39c87..537118cf5d75d3a393595ca145fa0a47897d8b15 100644 (file)
@@ -7,6 +7,10 @@
             <source>ICON_DLG_ARITHMETIC_1D</source>
             <translation>mesh_hypo_length.png</translation>
         </message>
+        <message>
+            <source>ICON_DLG_GEOMETRIC_1D</source>
+            <translation>mesh_hypo_length.png</translation>
+        </message>
         <message>
             <source>ICON_DLG_FIXED_POINTS_1D</source>
             <translation>mesh_hypo_length.png</translation>
             <source>ICON_DLG_ADAPTIVE1D</source>
             <translation>mesh_hypo_length.png</translation>
         </message>
-        <message>
-            <source>ICON_DLG_GEOMETRIC_1D</source>
-            <translation>mesh_hypo_length.png</translation>
-        </message>
         <message>
             <source>ICON_DLG_LAYER_DISTRIBUTION</source>
             <translation>mesh_hypo_layer_distribution.png</translation>
             <source>ICON_SMESH_TREE_HYPO_Arithmetic1D</source>
             <translation>mesh_tree_hypo_length.png</translation>
         </message>
+        <message>
+            <source>ICON_SMESH_TREE_HYPO_Geometric1D</source>
+            <translation>mesh_tree_hypo_length.png</translation>
+        </message>
         <message>
             <source>ICON_SMESH_TREE_HYPO_AutomaticLength</source>
             <translation>mesh_tree_hypo_length.png</translation>
             <source>ICON_SMESH_TREE_HYPO_Propagation</source>
             <translation>mesh_tree_hypo_length.png</translation>
         </message>
+        <message>
+            <source>ICON_SMESH_TREE_HYPO_PropagOfDistribution</source>
+            <translation>mesh_tree_hypo_length.png</translation>
+        </message>
         <message>
             <source>ICON_SMESH_TREE_HYPO_QuadranglePreference</source>
             <translation>mesh_tree_algo_quad.png</translation>
index c9982405eed93452836a1e3f84f8bc1fee9b19c1..08dcd56718567ff24e3e5fafeca25a544978d25e 100644 (file)
         <source>TO_IGNORE_EDGES</source>
         <translation>Edges without layers (inlets and oulets)</translation>
     </message>
+    <message>
+        <source>TO_IGNORE_FACES_OR_NOT</source>
+        <translation>Specified faces are</translation>
+    </message>
+    <message>
+        <source>NOT_TO_IGNORE_FACES</source>
+        <translation>Faces with layers (walls)</translation>
+    </message>
+    <message>
+        <source>TO_IGNORE_FACES</source>
+        <translation>Faces without layers (inlets and oulets)</translation>
+    </message>
 </context>
 <context>
     <name>@default</name>
         <translation>Arithmetic 1D</translation>
     </message>
     <message>
-        <source>SMESH_ARITHMETIC_1D_PARAM</source>
-        <translation>Arithmetic Reason</translation>
+        <source>SMESH_ARITHMETIC_1D_TITLE</source>
+        <translation>Hypothesis Construction</translation>
     </message>
     <message>
-        <source>SMESH_ARITHMETIC_1D_TITLE</source>
+        <source>SMESH_GEOMETRIC_1D_HYPOTHESIS</source>
+        <translation>Geometric Progression</translation>
+    </message>
+    <message>
+        <source>SMESH_GEOMETRIC_1D_TITLE</source>
         <translation>Hypothesis Construction</translation>
     </message>
+    <message>
+        <source>SMESH_COMMON_RATIO</source>
+        <translation>Common Ratio</translation>
+    </message>
     <message>
         <source>SMESH_AUTOMATIC_LENGTH_HYPOTHESIS</source>
         <translation>Automatic Length</translation>
         <translation>Reduced</translation>
     </message>
 </context>
+<context>
+    <name>StdMeshersGUI_QuadrangleParamCreator</name>
+    <message>
+        <source>POINTS</source>
+        <translation>Points</translation>
+    </message>
+    <message>
+        <source>SHAPES</source>
+        <translation>Vertices</translation>
+    </message>
+    <message>
+        <source>TRANSITION</source>
+        <translation>Transition</translation>
+    </message>
+    <message>
+        <source>ENF_NODES</source>
+        <translation>Enforced nodes</translation>
+    </message>
+    <message>
+        <source></source>
+        <translation></translation>
+    </message>
+</context>
 <context>
     <name>StdMeshersGUI_LayerDistributionParamWdg</name>
     <message>
         <source>THRESHOLD</source>
         <translation>Threshold</translation>
     </message>
+    <message>
+        <source>ADD_EDGES</source>
+        <translation>Implement Edges</translation>
+    </message>
     <message>
         <source>AXIS_X</source>
         <translation>Axis X</translation>
         <source>AXIS_Z</source>
         <translation>Axis Z</translation>
     </message>
+    <message>
+        <source>INVALID_AXES_DIR</source>
+        <translation>Invalid directions of axes</translation>
+    </message>
+    <message>
+        <source>FIXED_POINT</source>
+        <translation>Fixed Point</translation>
+    </message>
+    <message>
+        <source>AXES_DIRECTION</source>
+        <translation>Directions of Axes</translation>
+    </message>
+    <message>
+        <source>ORTHOGONAL_AXES</source>
+        <translation>Orthogonal Axes</translation>
+    </message>
+    <message>
+        <source>OPTIMAL_AXES</source>
+        <translation>Optimal Axes</translation>
+    </message>
+    <message>
+        <source>RESET_AXES</source>
+        <translation>Reset</translation>
+    </message>
 </context>
 <context>
     <name>StdMeshersGUI::GridAxisTab</name>
index 4f3de78838b1c62b41e10a1404a8fc97a3e1b7b6..dba9000575ffa37e84de675b694369f42fc98198 100755 (executable)
@@ -3,6 +3,18 @@
 <TS version="2.0" language="fr_FR">
 <context>
     <name>@default</name>
+    <message>
+        <source>SMESH_COMMON_RATIO</source>
+        <translation type="unfinished">Common Ratio</translation>
+    </message>
+    <message>
+        <source>SMESH_GEOMETRIC_1D_TITLE</source>
+        <translation type="unfinished">Hypothesis Construction</translation>
+    </message>
+    <message>
+        <source>SMESH_GEOMETRIC_1D_HYPOTHESIS</source>
+        <translation type="unfinished">Geometric Progression</translation>
+    </message>
     <message>
         <source>SMESH_EDGES_WITH_LAYERS</source>
         <translation type="unfinished">Edges with layers</translation>
 </context>
 <context>
     <name>StdMeshersGUI_CartesianParamCreator</name>
+    <message>
+        <source>ADD_EDGES</source>
+        <translation type="unfinished">Implement Edges</translation>
+    </message>
     <message>
         <source>THRESHOLD</source>
         <translation>Seuil</translation>
index 51cbd0c0d14ce1b14409fb8cb0606e457e42d8fc..e53bf5fa482e77b4ff495e52dc5ec91828fb9e72 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -129,8 +129,10 @@ ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
 SET(StdMeshersEngine_SOURCES
   StdMeshers_i.cxx
   StdMeshers_LocalLength_i.cxx 
+  StdMeshers_Reversible1D_i.cxx
   StdMeshers_StartEndLength_i.cxx
   StdMeshers_Arithmetic1D_i.cxx
+  StdMeshers_Geometric1D_i.cxx
   StdMeshers_FixedPoints1D_i.cxx
   StdMeshers_NumberOfSegments_i.cxx
   StdMeshers_Deflection1D_i.cxx
index dc04b886c0c904d79d7ddc2f4d1f06be9d83830c..f1aed23dc0fad43ee408f9416427fb455cf19874 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 99bc768edde8e17fdbb9f99466964a1f0808e822..c6d82b9c11e41d0fe96fc171f40bc2de96dc1637 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ac168ec72bb2ddf1bae33780795979641ca74498..7dd59e708a64d918715fccc168730fe179b0be3b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c2ae8af9ecd64664231de2ef5a90421c7b4f6ca7..9fe0a6e71efcb2a04fd2267118ce5bd481eb9200 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 45a868d9d133029f56ec25bfe1189d50fb645324..53d6538d874f028c1521dcb91386febfacd75d8d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 93189bae7a8dc950aa154d0b075ea0464a7e1811..1b77d6e861809b3347f0cd156b7318496afa43d1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e7bb68b30f779e36fcd6a5c6fa53403cffac7d56..cccf0075a9786844cc3466bc69cc2bc72d41d802 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5221f2cec47627d7763b27830095febfdde0bc0d..cd90066a0da17cdd200bc5439d411158f477d592 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -224,9 +224,124 @@ void StdMeshers_CartesianParameters3D_i::GetGridSpacing(SMESH::string_array_out
   }
 }
 
+//=======================================================================
+//function : SetAxesDirs
+//purpose  : Set custom direction of axes
+//=======================================================================
+
+void StdMeshers_CartesianParameters3D_i::SetAxesDirs(const SMESH::DirStruct& xDir,
+                                                     const SMESH::DirStruct& yDir,
+                                                     const SMESH::DirStruct& zDir)
+  throw (SALOME::SALOME_Exception)
+{
+  double coords[9];
+  coords[0] = xDir.PS.x;
+  coords[1] = xDir.PS.y;
+  coords[2] = xDir.PS.z;
+  coords[3] = yDir.PS.x;
+  coords[4] = yDir.PS.y;
+  coords[5] = yDir.PS.z;
+  coords[6] = zDir.PS.x;
+  coords[7] = zDir.PS.y;
+  coords[8] = zDir.PS.z;
+  try {
+    this->GetImpl()->SetAxisDirs(coords);
+
+    SMESH::TPythonDump() << _this() << ".SetAxesDirs( "
+                         << xDir << ", "
+                         << yDir << ", "
+                         << zDir << " )";
+  }
+  catch ( SALOME_Exception& S_ex ) {
+    THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
+  }
+}
+
+//=======================================================================
+//function : GetAxesDirs
+//purpose  : Returns direction of axes
+//=======================================================================
+
+void StdMeshers_CartesianParameters3D_i::GetAxesDirs(SMESH::DirStruct& xDir,
+                                                     SMESH::DirStruct& yDir,
+                                                     SMESH::DirStruct& zDir)
+{
+  const double* coords = GetImpl()->GetAxisDirs();
+  xDir.PS.x = coords[0];
+  xDir.PS.y = coords[1];
+  xDir.PS.z = coords[2];
+  yDir.PS.x = coords[3];
+  yDir.PS.y = coords[4];
+  yDir.PS.z = coords[5];
+  zDir.PS.x = coords[6];
+  zDir.PS.y = coords[7];
+  zDir.PS.z = coords[8];
+}
+
+//=======================================================================
+//function : SetFixedPoint
+//purpose  : * Set/unset a fixed point, at which a node will be created provided that grid
+//           * is defined by spacing in all directions
+//=======================================================================
+
+void StdMeshers_CartesianParameters3D_i::SetFixedPoint(const SMESH::PointStruct& ps,
+                                                       CORBA::Boolean            toUnset)
+{
+  double p[3] = { ps.x, ps.y, ps.z };
+  GetImpl()->SetFixedPoint( p, toUnset );
+
+  SMESH::TPythonDump() << _this() << ".SetFixedPoint( " << ps << ", " << toUnset << " )";
+}
+
+//=======================================================================
+//function : GetFixedPoint
+//purpose  : Returns a fixed point
+//=======================================================================
+
+CORBA::Boolean StdMeshers_CartesianParameters3D_i::GetFixedPoint(SMESH::PointStruct& ps)
+{
+  double p[3];
+  if ( GetImpl()->GetFixedPoint( p ) )
+  {
+    ps.x = p[0];
+    ps.y = p[1];
+    ps.z = p[2];
+    return true;
+  }
+  else
+  {
+    ps.x = 0.;
+    ps.y = 0.;
+    ps.z = 0.;
+  }
+  return false;
+}
+
+//=======================================================================
+//function : SetToAddEdges
+//purpose  : Enables implementation of geometrical edges into the mesh.
+//=======================================================================
+
+void StdMeshers_CartesianParameters3D_i::SetToAddEdges(CORBA::Boolean toAdd)
+{
+  GetImpl()->SetToAddEdges( toAdd );
+  SMESH::TPythonDump() << _this() << ".SetToAddEdges( " << toAdd << " )";
+}
+
+//=======================================================================
+//function : GetToAddEdges
+//purpose  : Returns true if implementation of geometrical edges into the
+//           mesh is enabled
+//=======================================================================
+
+CORBA::Boolean StdMeshers_CartesianParameters3D_i::GetToAddEdges()
+{
+  return GetImpl()->GetToAddEdges();
+}
+
 //=======================================================================
 //function : IsGridBySpacing
-//purpose  : Return true if the grid is defined by spacing functions and 
+//purpose  : Return true if the grid is defined by spacing functions and
 //           not by node coordinates
 //=======================================================================
 
@@ -235,6 +350,37 @@ CORBA::Boolean StdMeshers_CartesianParameters3D_i::IsGridBySpacing(CORBA::Short
   return this->GetImpl()->IsGridBySpacing(axis);
 }
 
+//=======================================================================
+//function : ComputeOptimalAxesDirs
+//purpose  : Returns axes at which number of hexahedra is maximal
+//=======================================================================
+
+void StdMeshers_CartesianParameters3D_i::
+ComputeOptimalAxesDirs(GEOM::GEOM_Object_ptr go,
+                       CORBA::Boolean        isOrthogonal,
+                       SMESH::DirStruct&     xDir,
+                       SMESH::DirStruct&     yDir,
+                       SMESH::DirStruct&     zDir)
+  throw (SALOME::SALOME_Exception)
+{
+  TopoDS_Shape shape = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( go );
+  if ( shape.IsNull() )
+    THROW_SALOME_CORBA_EXCEPTION( "Null shape", SALOME::BAD_PARAM );
+
+  double c[9];
+  ::StdMeshers_CartesianParameters3D::ComputeOptimalAxesDirs( shape, isOrthogonal, c );
+
+  xDir.PS.x = c[0];
+  xDir.PS.y = c[1];
+  xDir.PS.z = c[2];
+  yDir.PS.x = c[3];
+  yDir.PS.y = c[4];
+  yDir.PS.z = c[5];
+  zDir.PS.x = c[6];
+  zDir.PS.y = c[7];
+  zDir.PS.z = c[8];
+}
+
 //=======================================================================
 //function : ComputeCoordinates
 //purpose  : Computes node coordinates by spacing functions
@@ -246,13 +392,13 @@ StdMeshers_CartesianParameters3D_i::ComputeCoordinates(CORBA::Double
                                                        const SMESH::string_array& spaceFuns,
                                                        const SMESH::double_array& points,
                                                        const char*                axisName )
-    throw (SALOME::SALOME_Exception)
+  throw (SALOME::SALOME_Exception)
 {
   vector<string> xFuns;
   vector<double> xPoints, coords;
   _array2vec( spaceFuns, xFuns, (const char*) );
   _array2vec( points, xPoints, );
-  
+
   try {
     this->GetImpl()->ComputeCoordinates( x0, x1, xFuns, xPoints, coords, axisName );
   }
index a1f00f6059b24d160c9172d3f882bf835c9b6a75..7246ac1f383dabbd3b50fae052f2a7b286054468 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -83,6 +83,30 @@ class STDMESHERS_I_EXPORT StdMeshers_CartesianParameters3D_i:
   void GetGridSpacing(SMESH::string_array_out xSpaceFunctions,
                       SMESH::double_array_out xInternalPoints,
                       CORBA::Short            axis) throw (SALOME::SALOME_Exception);
+  /*!
+   * Set custom direction of axes
+   */
+  void SetAxesDirs(const SMESH::DirStruct& x,
+                   const SMESH::DirStruct& y,
+                   const SMESH::DirStruct& z) throw (SALOME::SALOME_Exception);
+  void GetAxesDirs(SMESH::DirStruct& x,
+                   SMESH::DirStruct& y,
+                   SMESH::DirStruct& z);
+  /*!
+   * Set/unset a fixed point, at which a node will be created provided that grid
+   * is defined by spacing in all directions
+   */
+  void SetFixedPoint(const ::SMESH::PointStruct& p, CORBA::Boolean toUnset);
+  CORBA::Boolean GetFixedPoint(::SMESH::PointStruct& p);
+
+
+  /*!
+   * \brief Enables implementation of geometrical edges into the mesh. If this feature
+   *        is disabled, sharp edges of the shape are lost ("smoothed") in the mesh if
+   *        they don't coincide with the grid lines
+   */
+  void SetToAddEdges(CORBA::Boolean toAdd);
+  CORBA::Boolean GetToAddEdges();
 
   /*!
    * \brief Return true if the grid is defined by spacing functions and 
@@ -90,6 +114,14 @@ class STDMESHERS_I_EXPORT StdMeshers_CartesianParameters3D_i:
    */
   CORBA::Boolean IsGridBySpacing(CORBA::Short axis);
 
+  /*!
+   * Returns axes at which number of hexahedra is maximal
+   */
+  void ComputeOptimalAxesDirs(GEOM::GEOM_Object_ptr shape,
+                              CORBA::Boolean        isOrthogonal,
+                              SMESH::DirStruct&     x,
+                              SMESH::DirStruct&     y,
+                              SMESH::DirStruct&     z) throw (SALOME::SALOME_Exception);
   /*!
    * \brief Computes node coordinates by spacing functions
    *  \param x0 - lower coordinate
index aca5cda266aaceb0d49ed122306a9eccc12aa6f5..b17bdf2d57f63e58879dc60dd0e92e53e7c097ca 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8690d8317f6497f8f403e87ed806de0cd1489199..c6b1bbb3417ee7b656b30316c6e84a184c59ce9c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 252af2b604be352c3187bc1ccbedd96e41a20605..acc773b9a3cb7d08b68861e11e1ff37aba62eb2b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5d6bf8e1fe7fd6babfeb6d5b1afdee75fc878805..61473104677e8d8d25e1439f4c03e00fd12ade33 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3a4b0a9e09fc21d5512913470103335c7e8b8277..1668a857ed03c6b7f97e93131c43a0fea8d57638 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ae8908b3d4882bfe430f54de75d7aeabfec39c2e..60186cfcd57bdfa593e3972b07c7b2f54fb229c3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 73fd93755082c37d352b2cf2d189d8cf469fe99a..12bd81879635fd9056dc1ea821e928ee61a75227 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 76e12a79705f02f826683b8a76faeae0e78ade96..803414187677b71c678a8fe695ad4e52a0c56ac0 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/StdMeshers_I/StdMeshers_Geometric1D_i.cxx b/src/StdMeshers_I/StdMeshers_Geometric1D_i.cxx
new file mode 100644 (file)
index 0000000..6bf8701
--- /dev/null
@@ -0,0 +1,143 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
+//  File   : StdMeshers_Geometric1D_i.cxx
+//  Module : SMESH
+//
+#include "StdMeshers_Geometric1D_i.hxx"
+#include "SMESH_Gen_i.hxx"
+#include "SMESH_Gen.hxx"
+#include "SMESH_PythonDump.hxx"
+
+#include <Utils_CorbaException.hxx>
+#include <utilities.h>
+
+//=============================================================================
+/*!
+ *  StdMeshers_Geometric1D_i::StdMeshers_Geometric1D_i
+ *
+ *  Constructor
+ */
+//=============================================================================
+
+StdMeshers_Geometric1D_i::StdMeshers_Geometric1D_i( PortableServer::POA_ptr thePOA,
+                                                    int                     theStudyId,
+                                                    ::SMESH_Gen*            theGenImpl )
+  : SALOME::GenericObj_i( thePOA ), 
+    SMESH_Hypothesis_i( thePOA ),
+    StdMeshers_Reversible1D_i( this )
+{
+  myBaseImpl = new ::StdMeshers_Geometric1D( theGenImpl->GetANewId(),
+                                             theStudyId,
+                                             theGenImpl );
+}
+
+//=============================================================================
+/*!
+ * Sets <start segment length> parameter value
+ */
+//=============================================================================
+
+void StdMeshers_Geometric1D_i::SetStartLength( CORBA::Double theLength )
+  throw (SALOME::SALOME_Exception)
+{
+  try {
+    this->GetImpl()->SetStartLength( theLength );
+  }
+  catch ( SALOME_Exception& S_ex ) {
+    THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
+  }
+  // Update Python script
+  SMESH::TPythonDump()
+    << _this() << ".SetStartLength( " << SMESH::TVar(theLength) << " )";
+}
+
+//=============================================================================
+/*!
+ * Sets <common ratio> parameter value
+ */
+//=============================================================================
+
+void StdMeshers_Geometric1D_i::SetCommonRatio( CORBA::Double factor )
+  throw (SALOME::SALOME_Exception)
+{
+  try {
+    this->GetImpl()->SetCommonRatio( factor );
+  }
+  catch ( SALOME_Exception& S_ex ) {
+    THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
+  }
+  // Update Python script
+  SMESH::TPythonDump()
+    << _this() << ".SetCommonRatio( " << SMESH::TVar(factor) << " )";
+}
+
+//=============================================================================
+/*!
+ *  Returns length of the first segment 
+ */
+//=============================================================================
+
+CORBA::Double StdMeshers_Geometric1D_i::GetStartLength()
+{
+  return this->GetImpl()->GetStartLength();
+}
+
+//=============================================================================
+/*!
+ * Returns value of Common Ratio
+ */
+//=============================================================================
+
+CORBA::Double StdMeshers_Geometric1D_i::GetCommonRatio()
+{
+  return this->GetImpl()->GetCommonRatio();
+}
+
+//=============================================================================
+/*!
+ *  StdMeshers_Geometric1D_i::GetImpl
+ *
+ *  Get implementation
+ */
+//=============================================================================
+
+::StdMeshers_Geometric1D* StdMeshers_Geometric1D_i::GetImpl()
+{
+  return ( ::StdMeshers_Geometric1D* )myBaseImpl;
+}
+
+//================================================================================
+/*!
+ * \brief Verify whether hypothesis supports given entity type 
+  * \param type - dimension (see SMESH::Dimension enumeration)
+  * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
+ * 
+ * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
+ */
+//================================================================================  
+
+CORBA::Boolean StdMeshers_Geometric1D_i::IsDimSupported(::SMESH::Dimension type)
+{
+  return type == SMESH::DIM_1D;
+}
diff --git a/src/StdMeshers_I/StdMeshers_Geometric1D_i.hxx b/src/StdMeshers_I/StdMeshers_Geometric1D_i.hxx
new file mode 100644 (file)
index 0000000..fb98072
--- /dev/null
@@ -0,0 +1,65 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
+//  File   : StdMeshers_Geometric1D_i.hxx
+//  Module : SMESH
+//
+#ifndef _SMESH_Geometric1D_I_HXX_
+#define _SMESH_Geometric1D_I_HXX_
+
+#include "SMESH_StdMeshers_I.hxx"
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
+
+#include "SMESH_Hypothesis_i.hxx"
+#include "StdMeshers_Geometric1D.hxx"
+#include "StdMeshers_Reversible1D_i.hxx"
+
+// ======================================================
+// Geometric 1D hypothesis
+// ======================================================
+class STDMESHERS_I_EXPORT StdMeshers_Geometric1D_i:
+  public virtual POA_StdMeshers::StdMeshers_Geometric1D,
+  public virtual SMESH_Hypothesis_i,
+  public virtual StdMeshers_Reversible1D_i
+{
+ public:
+  // Constructor
+  StdMeshers_Geometric1D_i( PortableServer::POA_ptr thePOA,
+                            int                     theStudyId,
+                            ::SMESH_Gen*            theGenImpl );
+
+  void SetStartLength(CORBA::Double length) throw(SALOME::SALOME_Exception);
+  void SetCommonRatio(CORBA::Double factor) throw(SALOME::SALOME_Exception);
+
+  CORBA::Double GetStartLength();
+  CORBA::Double GetCommonRatio();
+
+  virtual ::CORBA::Boolean IsDimSupported(::SMESH::Dimension type);
+
+  // Get implementation
+  ::StdMeshers_Geometric1D* GetImpl();
+};
+
+#endif
index d1e12a85032a2a1a7b4a9c18789b16e633b28801..9b1f7e22b22ae85b7952a9fcd24baf6d11fd97cc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -25,7 +25,6 @@
 //           Moved here from SMESH_Hexa_3D_i.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
-//  $Header$
 //
 #include "StdMeshers_Hexa_3D_i.hxx"
 #include "SMESH_Gen.hxx"
@@ -44,17 +43,17 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA,
-                                  int                     theStudyId,
-                                  ::SMESH_Gen*            theGenImpl )
-     : SALOME::GenericObj_i( thePOA ), 
-       SMESH_Hypothesis_i( thePOA ), 
-       SMESH_Algo_i( thePOA ),
-       SMESH_3D_Algo_i( thePOA )
+                                            int                     theStudyId,
+                                            ::SMESH_Gen*            theGenImpl )
+  : SALOME::GenericObj_i( thePOA ),
+    SMESH_Hypothesis_i( thePOA ),
+    SMESH_Algo_i( thePOA ),
+    SMESH_3D_Algo_i( thePOA )
 {
   MESSAGE( "StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i" );
   myBaseImpl = new ::StdMeshers_Hexa_3D( theGenImpl->GetANewId(),
-                                    theStudyId,
-                                    theGenImpl );
+                                         theStudyId,
+                                         theGenImpl );
 }
 
 //=============================================================================
@@ -83,3 +82,17 @@ StdMeshers_Hexa_3D_i::~StdMeshers_Hexa_3D_i()
   MESSAGE( "StdMeshers_Hexa_3D_i::GetImpl" );
   return ( ::StdMeshers_Hexa_3D* )myBaseImpl;
 }
+
+//=============================================================================
+/*!
+ *  StdMeshers_Hexa_3D_i::IsApplicable
+ *
+ *  Return true if the algorithm is applicable to a shape
+ */
+//=============================================================================
+
+CORBA::Boolean StdMeshers_Hexa_3D_i::IsApplicable( const TopoDS_Shape &S,
+                                                   CORBA::Boolean toCheckAll )
+{
+  return ::StdMeshers_Hexa_3D::IsApplicable( S, toCheckAll );
+}
index 7224f145f23ae1c347b59bfef87e8a0de96ccb46..999eb94d2d4cf188db372d4762d5fcf0253fc642 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -25,7 +25,6 @@
 //           Moved here from SMESH_Hexa_3D_i.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
-//  $Header$
 //
 #ifndef _SMESH_HEXA_3D_I_HXX_
 #define _SMESH_HEXA_3D_I_HXX_
@@ -58,6 +57,9 @@ public:
 
   // Get implementation
   ::StdMeshers_Hexa_3D* GetImpl();
+
+  // Return true if the algorithm is applicable to a shape
+  static CORBA::Boolean IsApplicable(const TopoDS_Shape &S, CORBA::Boolean toCheckAll);
 };
 
 #endif
index e86a81e0305f26124c8d265951f5de2bb84d229e..cea7bc36febe07c87b7db6474cb1a0a104c1956b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d2a00512a69bd87bf09db0bf9f5d931652ffe885..b48d9e28b3e40e9308a94e51c743662c4a157fae 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 085da0287ba796fb09caba50bcdbbc58e51e733b..545d98d018ef82f1b9b3e5f76e7683c564f2c0dc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 13cf85b51641cd337355190be811e0bd37bf727c..53570f5157b1ef5c32389f939c48cd34b5596419 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f87523b2e90508e84227433a2354fed453445570..c15ed6f3cff8373578ac17a73aadac71b895b1a0 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8fc293f292e48970e831239e5ada4891d24c8f16..662871cb783007b2951d9ba15a0a01b1bc763d44 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d186ad10c29a6e49fed8ffc42260be70178de49b..e7b1a1f5750781e0a90c75fda29c3bb38f3bee70 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ec02c0f4545eed2b855cb52e2ae5a21f004fbbb5..5dd4e1e30750ad0593fd2b377695d470c39f6336 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a7891071ab77cca9aef7abc443af617a79120011..c710649e21ee74ebf3ac459c8eb7cc5eb438fa04 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 275148bd104bf030e5f9ade33cc8cfa7d1646073..abb456f47c0c8f7d74a2326fc9c9ddcf71873752 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8a9db16a7fdb9a68f74cb29348729f6185336dfa..bfdc329479c30bb60574748fbd9cb913dcfd1901 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e603a3efc712bc451e15950806aabd8540e79332..a54acd92c53493126f07c8dc493a3b70c65de578 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c1b48360bfed06b794bc6f23a2d75bb5d0555f57..9802d36d8d421d26cb0bb6cd1051a59c1a4bb7ec 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index df22866a5c515900066fa6924b9ed7596c880c16..7fe1ddf099d5a9c2929704e3192d82987d6502cf 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3a26c63b072ca4d46c571643add816f7a9e3f31e..f9d209d5e733b1fe33a24d61811f9ccf7635c4d0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4b659ba014054e6ccd5fe5dde54cb61470b16823..4b9ce31234979d610f0a7c297aa846b4bc6e69be 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7507fa5092648c38f2806b7ce0bff4fc4dbe732c..df1f7d0259cbbdd7e741946503a0a439d5a60b35 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c0cb08d3903ace9dca320de57fa0d213e9934486..a7542cdc769c68e6969a35d482b185de5434127d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f10fa6cb376eb112c29b36c265f782c8ff7be46d..43c9f853f6699d128064586ddb8bfeae84f944b2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3689e4973d80cc41d812663a6236da3656022bdb..e3482d1238ae7603e11e28c92d9d4bd529d14ad4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 37cf749f4a2cfd6709cac22b9fe580045d6f0ab9..dfd637651ae42a2d45cc787420160c9c2ef8bc59 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 601dea39d301a464b287c6682701aebe7e43b7f3..0a7c75ae44e4134cc7bf9b44191350f4166c9894 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d2fbfe2faab3f7cdd57e65e1e7dfc38a00d68d8f..258c8ac19651dd7b788bd371749a0658bd89cde6 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 02814bb236c8fa1659d6a347aa922015da0ee5e6..8ab02cb683db5067b0335d9c78baf018e0ca4ced 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a9e97fe94771c1bace7638d37039d9d7f18f8c41..c2a1931b690ca85d61bbd66605570e97d40f52ac 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 470df10891af0ce7faa6179c6d8f62c350dd3c30..be2df28ab5537af21b130134037e42c20c4ebd04 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index cb8abc3520ed37e08b382b285f3435515ea76b9c..220ac6506923e3031b927f8401375827e26201d7 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 58c6d72e9d595f2b13de7c9f062af2a85ff8d1a2..af4e58063bba6d82a1c4a67054c4cda0ea1954a8 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3c7ec10440ff5a8b4185974b94738e5b66471f4f..c0c9ffcb8bcdc8cbb95788a3133169b89ed19154 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3ed8f932681c3cc7352f8d1474f9802e6fa5be7f..d177572d2a9143b85108d66a064f018502bcd6ff 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 24fef1a9c70731285bfc59bc793df4aca379f719..a59fd13183d842c9c5e2f05906752f162b31e144 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c526769f66b930ef72e18ca7c7a671ec97d5c8ff..e81711b2f72dbe7cd0659a04b8ec0bc22a495c72 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 88a0163ec928dd52d1910b02deda913650f45ff0..4afaa0a8b99033b7e1177a7dec5ebb341a26f0dd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -37,7 +37,7 @@ using namespace std;
 //purpose  : Return study entry of GEOM Object
 //=======================================================================
 
-std::string StdMeshers_ObjRefUlils::GeomObjectToEntry(GEOM::GEOM_Object_ptr theGeomObject)
+std::string StdMeshers_ObjRefUlils::GeomObjectToEntry(GEOM::GEOM_Object_ptr theGeomObject)
 {
   if ( CORBA::is_nil( theGeomObject ))
     return "NULL_OBJECT";
@@ -109,13 +109,16 @@ void StdMeshers_ObjRefUlils::SaveToStream( const TopoDS_Shape& theShape, ostream
    */
 //================================================================================
 
-TopoDS_Shape StdMeshers_ObjRefUlils::LoadFromStream( istream & stream)
+TopoDS_Shape StdMeshers_ObjRefUlils::LoadFromStream( istream &    stream,
+                                                     std::string* entry)
 {
-  if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) {
-    SALOMEDS::Study_var study = gen->GetCurrentStudy();
-    if ( ! study->_is_nil() ) {
-      string str;
-      if (stream >> str) {
+  string str;
+  if (stream >> str) {
+    if ( entry )
+      * entry = str;
+    if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) {
+      SALOMEDS::Study_var study = gen->GetCurrentStudy();
+      if ( ! study->_is_nil() ) {
         SALOMEDS::SObject_wrap sobj = study->FindObjectID( str.c_str() );
         CORBA::Object_var       obj = gen->SObjectToObject( sobj );
         GEOM::GEOM_Object_var  geom = GEOM::GEOM_Object::_narrow( obj );
@@ -123,6 +126,8 @@ TopoDS_Shape StdMeshers_ObjRefUlils::LoadFromStream( istream & stream)
       }
     }
   }
+  if ( entry )
+    entry->clear();
   return TopoDS_Shape();
 }
 
index c7d6ed86561270514a89d0bac39bb4c4f7fb1c0a..b79fba02fcf0a3565aa438bb6737687387c24925 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -68,7 +68,7 @@ public:
   /*!
    * \brief Return study entry of GEOM Object
    */
-  static std::string GeomObjectToEntry(GEOM::GEOM_Object_ptr theGeomObject);
+  static std::string GeomObjectToEntry(GEOM::GEOM_Object_ptr theGeomObject);
 
   /*!
    * \brief Return GEOM Object by its study entry or TopoDS_Shape
@@ -89,7 +89,7 @@ public:
     * \param stream - the stream
     * \retval TopoDS_Shape - resulting shape
    */
-  static TopoDS_Shape LoadFromStream( std::istream & stream );
+  static TopoDS_Shape LoadFromStream( std::istream & stream, std::string* entry=NULL );
 
   /*!
    * \brief Store the CORBA object in the stream
index d19fdb979ce3fb0dfafe278b13bd7b10a9b53aac..450e32586e16d78fec4e5c8ab6098ba4ebe33670 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -25,7 +25,6 @@
 //           Moved here from SMESH_Prism_3D_i.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
-//  $Header$
 //
 #include "StdMeshers_Prism_3D_i.hxx"
 #include "SMESH_Gen.hxx"
@@ -42,12 +41,12 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Prism_3D_i::StdMeshers_Prism_3D_i( PortableServer::POA_ptr thePOA,
-                                  int                     theStudyId,
-                                  ::SMESH_Gen*            theGenImpl )
-     : SALOME::GenericObj_i( thePOA ), 
-       SMESH_Hypothesis_i( thePOA ), 
-       SMESH_Algo_i( thePOA ),
-       SMESH_3D_Algo_i( thePOA )
+                                              int                     theStudyId,
+                                              ::SMESH_Gen*            theGenImpl )
+  : SALOME::GenericObj_i( thePOA ),
+    SMESH_Hypothesis_i( thePOA ),
+    SMESH_Algo_i( thePOA ),
+    SMESH_3D_Algo_i( thePOA )
 {
   MESSAGE( "StdMeshers_Prism_3D_i::StdMeshers_Prism_3D_i" );
   myBaseImpl = new ::StdMeshers_Prism_3D( theGenImpl->GetANewId(),
@@ -67,6 +66,13 @@ StdMeshers_Prism_3D_i::~StdMeshers_Prism_3D_i()
   MESSAGE( "StdMeshers_Prism_3D_i::GetImpl" );
   return ( ::StdMeshers_Prism_3D* )myBaseImpl;
 }
+//-----------------------------------------------------------------------------
+
+CORBA::Boolean StdMeshers_Prism_3D_i::IsApplicable( const TopoDS_Shape &S,
+                                                    CORBA::Boolean toCheckAll )
+{
+  return ::StdMeshers_Prism_3D::IsApplicable( S, toCheckAll );
+}
 
 
 //=============================================================================
@@ -76,17 +82,17 @@ 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 )
-     : SALOME::GenericObj_i( thePOA ), 
-       SMESH_Hypothesis_i( thePOA ), 
-       SMESH_Algo_i( thePOA ),
-       SMESH_3D_Algo_i( thePOA )
+                                                          int                     theStudyId,
+                                                          ::SMESH_Gen*            theGenImpl )
+  : SALOME::GenericObj_i( thePOA ),
+    SMESH_Hypothesis_i( thePOA ),
+    SMESH_Algo_i( thePOA ),
+    SMESH_3D_Algo_i( thePOA )
 {
   MESSAGE( "StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i" );
   myBaseImpl = new ::StdMeshers_RadialPrism_3D( theGenImpl->GetANewId(),
-                                    theStudyId,
-                                    theGenImpl );
+                                                theStudyId,
+                                                theGenImpl );
 }
 //-----------------------------------------------------------------------------
 
@@ -101,4 +107,10 @@ StdMeshers_RadialPrism_3D_i::~StdMeshers_RadialPrism_3D_i()
   MESSAGE( "StdMeshers_RadialPrism_3D_i::GetImpl" );
   return ( ::StdMeshers_RadialPrism_3D* )myBaseImpl;
 }
+//-----------------------------------------------------------------------------
 
+CORBA::Boolean StdMeshers_RadialPrism_3D_i::IsApplicable( const TopoDS_Shape &S,
+                                                          CORBA::Boolean toCheckAll )
+{
+  return ::StdMeshers_RadialPrism_3D::IsApplicable( S, toCheckAll );
+}
index 995463cc3f994f3ffaf676fae055ac4be648012f..dc01ef2e7c4542adb2c1beb3505e54054ed0fda9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -25,7 +25,6 @@
 //           Moved here from SMESH_Prism_3D_i.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
-//  $Header$
 //
 #ifndef _SMESH_Prism_3D_I_HXX_
 #define _SMESH_Prism_3D_I_HXX_
@@ -57,6 +56,9 @@ public:
 
   // Get implementation
   ::StdMeshers_Prism_3D* GetImpl();
+
+  // Return true if the algorithm is applicable to a shape
+  static CORBA::Boolean IsApplicable(const TopoDS_Shape &S, CORBA::Boolean toCheckAll);
 };
 
 // ======================================================
@@ -77,6 +79,9 @@ public:
 
   // Get implementation
   ::StdMeshers_RadialPrism_3D* GetImpl();
+
+  // Return true if the algorithm is applicable to a shape
+  static CORBA::Boolean IsApplicable(const TopoDS_Shape &S, CORBA::Boolean toCheckAll);
 };
 
 
index deb62285d3bc2f772d20e1a99a9bce33584d23bc..9ee397fae3d297cc6bc9bc8f43e18d9d7fc4b37c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c50a996d8582e9902a9456894a7238a2340ea472..9b4fa33684550d1e20b7a673828b2b9c4500a0d9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8e33647ffada3a0cb30ef8718f7361b6a5528d7e..28f63e480934a20d00066aa6db77a5e369f0c19b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f26e6ca5878a6a7c3ea2e7a2ec3cc591e0cdb019..2aea213ba587768d9b2f4120d4540d9f92846e50 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8dd2b5f9f75dae7dbc326424776cf7b3d570f7f7..05414ee40d5e75eab2dbc71bde07c2519fa84a37 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index b92e8d8e944fe1a5c99108fa4193874c44eaddd5..e28f881e73663772c2b0f9c959ff459d18f5d62c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e6ff323e94fa0c759a0f2456b7f7cf4d1a397ad0..771b4e828d955e9a636e5046ceee8e5764f76527 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 47635e949c4b4b8fb985dc303d6ed979b34095a8..c1d3517e0a1994170bf409779842b1c8eb3a27c1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 919d2f698ef07705fdb5fa1911a3109820f78dd7..f49333a5e2cd26f6ea03cc0abd474125a33bf3d5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,7 +23,6 @@
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Propagation_i.cxx
 //  Module : SMESH
-//  $Header$
 //
 #include "StdMeshers_Propagation_i.hxx"
 #include "SMESH_Gen.hxx"
@@ -43,8 +42,8 @@ using namespace std;
 StdMeshers_Propagation_i::StdMeshers_Propagation_i (PortableServer::POA_ptr thePOA,
                                                     int                     theStudyId,
                                                     ::SMESH_Gen*            theGenImpl )
-     : SALOME::GenericObj_i( thePOA ), 
-       SMESH_Hypothesis_i( thePOA )
+  : SALOME::GenericObj_i( thePOA ),
+    SMESH_Hypothesis_i( thePOA )
 {
   MESSAGE( "StdMeshers_Propagation_i::StdMeshers_Propagation_i" );
   myBaseImpl = new ::StdMeshers_Propagation(theGenImpl->GetANewId(),
@@ -52,41 +51,49 @@ StdMeshers_Propagation_i::StdMeshers_Propagation_i (PortableServer::POA_ptr theP
                                             theGenImpl);
 }
 
-//=============================================================================
+//================================================================================
 /*!
- *  StdMeshers_Propagation_i::~StdMeshers_Propagation_i
+ * \brief Verify whether hypothesis supports given entity type
+ * \param type - dimension (see SMESH::Dimension enumeration)
+ * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
  *
- *  Destructor
+ * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
  */
-//=============================================================================
-StdMeshers_Propagation_i::~StdMeshers_Propagation_i()
+//================================================================================
+CORBA::Boolean StdMeshers_Propagation_i::IsDimSupported( SMESH::Dimension type )
 {
-  MESSAGE( "StdMeshers_Propagation_i::~StdMeshers_Propagation_i" );
+  return type == SMESH::DIM_1D;
 }
 
 //=============================================================================
 /*!
- *  StdMeshers_Propagation_i::GetImpl
+ *  StdMeshers_PropagOfDistribution_i::StdMeshers_PropagOfDistribution_i
  *
- *  Get implementation
+ *  Constructor
  */
 //=============================================================================
-::StdMeshers_Propagation* StdMeshers_Propagation_i::GetImpl()
+StdMeshers_PropagOfDistribution_i::
+StdMeshers_PropagOfDistribution_i (PortableServer::POA_ptr thePOA,
+                                   int                     theStudyId,
+                                   ::SMESH_Gen*            theGenImpl )
+  : SALOME::GenericObj_i( thePOA ),
+    SMESH_Hypothesis_i( thePOA )
 {
-  MESSAGE( "StdMeshers_Propagation_i::GetImpl" );
-  return ( ::StdMeshers_Propagation* )myBaseImpl;
+  myBaseImpl = new ::StdMeshers_PropagOfDistribution(theGenImpl->GetANewId(),
+                                                     theStudyId,
+                                                     theGenImpl);
 }
 
 //================================================================================
 /*!
- * \brief Verify whether hypothesis supports given entity type 
 * \param type - dimension (see SMESH::Dimension enumeration)
 * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
- * 
+ * \brief Verify whether hypothesis supports given entity type
+ * \param type - dimension (see SMESH::Dimension enumeration)
+ * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
+ *
  * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
  */
-//================================================================================  
-CORBA::Boolean StdMeshers_Propagation_i::IsDimSupported( SMESH::Dimension type )
+//================================================================================
+CORBA::Boolean StdMeshers_PropagOfDistribution_i::IsDimSupported( SMESH::Dimension type )
 {
   return type == SMESH::DIM_1D;
 }
index 0b303abfda90c1ad3304ea3c50376fde98be984b..c7d8ba4815d375e2a60881411f997456441cd564 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,7 +23,6 @@
 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_Propagation_i.hxx
 //  Module : SMESH
-//  $Header$
 //
 #ifndef _SMESH_PROPAGATION_I_HXX_
 #define _SMESH_PROPAGATION_I_HXX_
@@ -41,6 +40,7 @@ class SMESH_Gen;
 // ======================================================
 // Propagation hypothesis
 // ======================================================
+
 class STDMESHERS_I_EXPORT StdMeshers_Propagation_i:
   public virtual POA_StdMeshers::StdMeshers_Propagation,
   public virtual SMESH_Hypothesis_i
@@ -50,11 +50,24 @@ public:
   StdMeshers_Propagation_i (PortableServer::POA_ptr thePOA,
                             int                     theStudyId,
                             ::SMESH_Gen*            theGenImpl);
-  // Destructor
-  virtual ~StdMeshers_Propagation_i();
+  
+  // Verify whether hypothesis supports given entity type 
+  CORBA::Boolean IsDimSupported( SMESH::Dimension type );
+};
+
+// ======================================================
+// Propagation of Distribution hypothesis
+// ======================================================
 
-  // Get implementation
-  ::StdMeshers_Propagation* GetImpl();
+class STDMESHERS_I_EXPORT StdMeshers_PropagOfDistribution_i:
+  public virtual POA_StdMeshers::StdMeshers_PropagOfDistribution,
+  public virtual SMESH_Hypothesis_i
+{
+public:
+  // Constructor
+  StdMeshers_PropagOfDistribution_i (PortableServer::POA_ptr thePOA,
+                                     int                     theStudyId,
+                                     ::SMESH_Gen*            theGenImpl);
   
   // Verify whether hypothesis supports given entity type 
   CORBA::Boolean IsDimSupported( SMESH::Dimension type );
index ba32f927ae638baf9cb653b3e6f6594704cc5196..a76be4f4fb8af40712036a2d1fd751922db608c6 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  Module : SMESH
 
 #include "StdMeshers_QuadrangleParams_i.hxx"
-#include "SMESH_Gen_i.hxx"
+
 #include "SMESH_Gen.hxx"
+#include "SMESH_Gen_i.hxx"
 #include "SMESH_PythonDump.hxx"
+#include "StdMeshers_ObjRefUlils.hxx"
 
-#include "Utils_CorbaException.hxx"
-#include "utilities.h"
+#include <Utils_CorbaException.hxx>
+#include <utilities.h>
 
-#include <TCollection_AsciiString.hxx>
+#include <Standard_ErrorHandler.hxx>
+#include "SMESH_TryCatch.hxx"
 
 using namespace std;
 
@@ -82,13 +85,11 @@ void StdMeshers_QuadrangleParams_i::SetTriaVertex(CORBA::Long vertID)
     this->GetImpl()->SetTriaVertex( vertID );
   }
   catch ( SALOME_Exception& S_ex ) {
-    THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                  SALOME::BAD_PARAM );
+    THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
   }
 
   // Update Python script
-  SMESH::TPythonDump() << _this() << ".SetTriaVertex( "
-      << vertID << " )";
+  SMESH::TPythonDump() << _this() << ".SetTriaVertex( " << vertID << " )";
 }
 
 //=============================================================================
@@ -147,8 +148,7 @@ char* StdMeshers_QuadrangleParams_i::GetObjectEntry()
     entry = this->GetImpl()->GetObjectEntry();
   }
   catch ( SALOME_Exception& S_ex ) {
-    THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),
-                                  SALOME::BAD_PARAM );
+    THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
   }
   return CORBA::string_dup( entry );
 }
@@ -162,12 +162,6 @@ char* StdMeshers_QuadrangleParams_i::GetObjectEntry()
 //=============================================================================
 void StdMeshers_QuadrangleParams_i::SetQuadType(StdMeshers::QuadType type)
 {
-  //static char* quadTypes[5] = {"StdMeshers.QUAD_STANDARD",
-  //                             "StdMeshers.QUAD_TRIANGLE_PREF",
-  //                             "StdMeshers.QUAD_QUADRANGLE_PREF",
-  //                             "StdMeshers.QUAD_QUADRANGLE_PREF_REVERSED",
-  //                             "StdMeshers.QUAD_REDUCED"};
-
   MESSAGE("StdMeshers_QuadrangleParams_i::SetQuadType");
   ASSERT(myBaseImpl);
 
@@ -199,7 +193,6 @@ void StdMeshers_QuadrangleParams_i::SetQuadType(StdMeshers::QuadType type)
     quadType = "UNKNOWN";
   }
   SMESH::TPythonDump() << _this() << ".SetQuadType( " << quadType << " )";
-  //SMESH::TPythonDump() << _this() << ".SetQuadType( " << quadTypes[int(type)] << " )";
 }
 
 //=============================================================================
@@ -216,6 +209,100 @@ StdMeshers::QuadType StdMeshers_QuadrangleParams_i::GetQuadType()
   return StdMeshers::QuadType(int(this->GetImpl()->GetQuadType()));
 }
 
+//================================================================================
+/*!
+ * \brief Set positions of enforced nodes
+ */
+//================================================================================
+
+void StdMeshers_QuadrangleParams_i::SetEnforcedNodes(const GEOM::ListOfGO&     theVertices,
+                                                     const SMESH::nodes_array& thePoints)
+  throw ( SALOME::SALOME_Exception )
+{
+  try {
+    std::vector< TopoDS_Shape > shapes;
+    std::vector< gp_Pnt       > points;
+    shapes.reserve( theVertices.length() );
+    points.reserve( thePoints.length() );
+
+    myShapeEntries.clear();
+
+    for ( size_t i = 0; i < theVertices.length(); ++i )
+    {
+      if ( CORBA::is_nil( theVertices[i] ))
+        continue;
+      CORBA::String_var entry = theVertices[i]->GetStudyEntry();
+      if ( !entry.in() || !entry.in()[0] )
+        THROW_SALOME_CORBA_EXCEPTION( "Not published enforced vertex shape", SALOME::BAD_PARAM );
+
+      shapes.push_back( StdMeshers_ObjRefUlils::GeomObjectToShape( theVertices[i].in() ));
+      myShapeEntries.push_back( entry.in() );
+    }
+    for ( size_t i = 0; i < thePoints.length(); ++i )
+    {
+      points.push_back( gp_Pnt( thePoints[i].x, thePoints[i].y, thePoints[i].z ));
+    }
+    this->GetImpl()->SetEnforcedNodes( shapes, points );
+  }
+  catch ( SALOME_Exception& S_ex ) {
+    THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
+  }
+  // Update Python script
+  SMESH::TPythonDump() << _this() << ".SetEnforcedNodes( "
+                       << theVertices << ", " << thePoints << " )";
+}
+  
+//================================================================================
+/*!
+ * \brief Returns positions of enforced nodes
+ */
+//================================================================================
+
+void StdMeshers_QuadrangleParams_i::GetEnforcedNodes(GEOM::ListOfGO_out     theVertices,
+                                                     SMESH::nodes_array_out thePoints)
+{
+  SMESH_TRY;
+
+  std::vector< TopoDS_Shape > shapes;
+  std::vector< gp_Pnt       > points;
+  this->GetImpl()->GetEnforcedNodes( shapes, points );
+
+  theVertices = new GEOM::ListOfGO;
+  thePoints   = new SMESH::nodes_array;
+
+  size_t i = 0;
+  theVertices->length( myShapeEntries.size() );
+  for ( i = 0; i < myShapeEntries.size(); ++i )
+    theVertices[i] =
+      StdMeshers_ObjRefUlils::EntryOrShapeToGeomObject( myShapeEntries[i], shapes[i] );
+
+  thePoints->length( points.size() );
+  for ( i = 0; i < points.size(); ++i )
+  {
+    thePoints[i].x = points[i].X();
+    thePoints[i].y = points[i].Y();
+    thePoints[i].z = points[i].Z();
+  }
+  SMESH_CATCH( SMESH::doNothing );
+}
+
+//================================================================================
+/*!
+ * \brief Returns study entries of shapes defining enforced nodes
+ */
+//================================================================================
+
+SMESH::string_array* StdMeshers_QuadrangleParams_i::GetEnfVertices()
+{
+  SMESH::string_array_var arr = new SMESH::string_array;
+  arr->length( myShapeEntries.size() );
+
+  for ( size_t i = 0; i < myShapeEntries.size(); ++i )
+    arr[ i ] = myShapeEntries[ i ].c_str();
+
+  return arr._retn();
+}
+
 //=============================================================================
 /*!
  *  StdMeshers_QuadrangleParams_i::GetImpl
@@ -243,3 +330,58 @@ CORBA::Boolean StdMeshers_QuadrangleParams_i::IsDimSupported( SMESH::Dimension t
 {
   return type == SMESH::DIM_2D;
 }
+
+//================================================================================
+/*!
+ * \brief Write parameters in a string
+  * \retval char* - resulting string
+ */
+//================================================================================
+
+char* StdMeshers_QuadrangleParams_i::SaveTo()
+{
+  ASSERT( myBaseImpl );
+  std::ostringstream os;
+
+  os << "ENTRIES: " << myShapeEntries.size();
+  for ( size_t i = 0; i < myShapeEntries.size(); ++i )
+    StdMeshers_ObjRefUlils::SaveToStream( myShapeEntries[ i ], os );
+  os << " ";
+
+  myBaseImpl->SaveTo( os );
+
+  return CORBA::string_dup( os.str().c_str() );
+}
+
+//================================================================================
+/*!
+ * \brief Retrieve parameters from the string
+  * \param theStream - the input string
+ */
+//================================================================================
+
+void StdMeshers_QuadrangleParams_i::LoadFrom( const char* theStream )
+{
+  ASSERT( myBaseImpl );
+
+  bool hasEntries = ( strncmp( "ENTRIES: ", theStream, 9 ) == 0 );
+  std::istringstream is( theStream + ( hasEntries ? 9 : 0 ));
+
+  if ( hasEntries )
+  {
+    int nb = 0;
+    if ( is >> nb && nb > 0 )
+    {
+      std::vector< TopoDS_Shape > shapes;
+      std::vector< gp_Pnt >       points;
+      myShapeEntries.resize( nb );
+
+      for ( int i = 0; i < nb; ++i )
+        shapes.push_back( StdMeshers_ObjRefUlils::LoadFromStream( is, & myShapeEntries[i] ));
+
+      GetImpl()->SetEnforcedNodes( shapes, points );
+    }
+  }
+
+  myBaseImpl->LoadFrom( is );
+}
index 4596712a0deda887074e0f92ac761f2056bf56bd..6a3d00400dbdf73932813eec0660a2540d153515 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,6 @@
 //  File   : StdMeshers_QuadrangleParams_i.hxx
 //  Author : Sergey KUUL, OCC
 //  Module : SMESH
-//  $Header$
 
 #ifndef _SMESH_QUADRANGLEPARAMS_I_HXX_
 #define _SMESH_QUADRANGLEPARAMS_I_HXX_
@@ -47,13 +46,6 @@ public:
   // Destructor
   virtual ~StdMeshers_QuadrangleParams_i();
 
-  // Set length
-  //void SetLength( CORBA::Double theLength, CORBA::Boolean theIsStart )
-  //  throw ( SALOME::SALOME_Exception );
-
-  // Get length
-  //CORBA::Double GetLength(CORBA::Boolean theIsStart);
-
   // Set base vertex for triangles
   void SetTriaVertex (CORBA::Long vertID);
 
@@ -72,11 +64,31 @@ public:
   // Get the type of quadrangulation
   StdMeshers::QuadType GetQuadType();
 
+  // Set positions of enforced nodes
+  void SetEnforcedNodes(const GEOM::ListOfGO&     vertices,
+                        const SMESH::nodes_array& points) throw ( SALOME::SALOME_Exception );
+  
+  // Returns positions of enforced nodes
+  void GetEnforcedNodes(GEOM::ListOfGO_out vertices, SMESH::nodes_array_out points);
+
+  // Returns entries of shapes defining enforced nodes
+  SMESH::string_array* GetEnfVertices();
+
+
   // Get implementation
   ::StdMeshers_QuadrangleParams* GetImpl();
   
   // Verify whether hypothesis supports given entity type 
   CORBA::Boolean IsDimSupported( SMESH::Dimension type );
+
+  // Redefined Persistence
+  virtual char* SaveTo();
+  virtual void  LoadFrom( const char* theStream );
+
+ protected:
+
+  std::vector<std::string> myShapeEntries;
+  
 };
 
 #endif
index d0f1354ae1f71c2fe66bea1decba73d847383306..e1b44fe318d1d74e5927b541b953a15580e0c025 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9759fa0776e4348c9a224f825693a81328134dee..474246550772101bf4aa912a3baee05b57ce3cb1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e09f1313a14867b4800cb866fb5891ebd2c817cd..3ca07c9e8f677b2f77d196b12bf52a813aa79bdd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -25,7 +25,6 @@
 //           Moved here from SMESH_Quadrangle_2D_i.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
-//  $Header$
 //
 #include "StdMeshers_Quadrangle_2D_i.hxx"
 #include "SMESH_Gen.hxx"
@@ -44,17 +43,17 @@ using namespace std;
 //=============================================================================
 
 StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr thePOA,
-                                              int                     theStudyId,
-                                              ::SMESH_Gen*            theGenImpl )
-     : SALOME::GenericObj_i( thePOA ), 
-       SMESH_Hypothesis_i( thePOA ), 
-       SMESH_Algo_i( thePOA ),
-       SMESH_2D_Algo_i( thePOA )
+                                                        int                     theStudyId,
+                                                        ::SMESH_Gen*            theGenImpl )
+  : SALOME::GenericObj_i( thePOA ),
+    SMESH_Hypothesis_i( thePOA ),
+    SMESH_Algo_i( thePOA ),
+    SMESH_2D_Algo_i( thePOA )
 {
   MESSAGE( "StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i" );
   myBaseImpl = new ::StdMeshers_Quadrangle_2D( theGenImpl->GetANewId(),
-                                          theStudyId,
-                                          theGenImpl );
+                                               theStudyId,
+                                               theGenImpl );
 }
 
 //=============================================================================
@@ -62,7 +61,7 @@ StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr
  *  StdMeshers_Quadrangle_2D_i::~StdMeshers_Quadrangle_2D_i
  *
  *  Destructor
- *  
+ *
  */
 //=============================================================================
 
@@ -85,3 +84,17 @@ StdMeshers_Quadrangle_2D_i::~StdMeshers_Quadrangle_2D_i()
   return ( ::StdMeshers_Quadrangle_2D* )myBaseImpl;
 }
 
+//=============================================================================
+/*!
+ *  StdMeshers_Quadrangle_2D_i::IsApplicable
+ *
+ *  Return true if the algorithm is applicable to a shape
+ */
+//=============================================================================
+
+CORBA::Boolean StdMeshers_Quadrangle_2D_i::IsApplicable( const TopoDS_Shape &S,
+                                                         CORBA::Boolean toCheckAll )
+{
+  return ::StdMeshers_Quadrangle_2D::IsApplicable( S, toCheckAll );
+}
+
index eea60f3df41cfa2927241252a325a0496f0c09b4..194817527ce8a6eaf946de31da138ec57c30b662 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -25,7 +25,6 @@
 //           Moved here from SMESH_Quadrangle_2D_i.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
-//  $Header$
 //
 #ifndef _SMESH_QUADRANGLE_2D_I_HXX_
 #define _SMESH_QUADRANGLE_2D_I_HXX_
@@ -47,17 +46,20 @@ class STDMESHERS_I_EXPORT StdMeshers_Quadrangle_2D_i:
   public virtual POA_StdMeshers::StdMeshers_Quadrangle_2D,
   public virtual SMESH_2D_Algo_i
 {
-public:
+ public:
   // Constructor
   StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr thePOA,
-                         int                     theStudyId,
-                         ::SMESH_Gen*            theGenImpl );
+                              int                     theStudyId,
+                              ::SMESH_Gen*            theGenImpl );
 
   // Destructor
   virtual ~StdMeshers_Quadrangle_2D_i();
 
   // Get implementation
   ::StdMeshers_Quadrangle_2D* GetImpl();
+
+  // Return true if the algorithm is applicable to a shape
+  static CORBA::Boolean IsApplicable(const TopoDS_Shape &S, CORBA::Boolean toCheckAll);
 };
 
 #endif
index 6d58139275be01c6f2574a979536ca3a25d8ae01..b7309f46f960c69260e4ca09ddf13cc34d319851 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 113e72b368cdd71a69f540b631f8f8f3dd86e0b6..bfa27b206f0cede10f116f414915f7bcd8347e3b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d69291af820f77b426f46abc0e4da92453d85634..2e085910f888c0d19ade2ef06b99a376fc3918b5 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -66,3 +66,9 @@ StdMeshers_RadialQuadrangle_1D2D_i::~StdMeshers_RadialQuadrangle_1D2D_i()
   return ( ::StdMeshers_RadialQuadrangle_1D2D* )myBaseImpl;
 }
 
+//-----------------------------------------------------------------------------
+
+CORBA::Boolean StdMeshers_RadialQuadrangle_1D2D_i::IsApplicable( const TopoDS_Shape &S, CORBA::Boolean toCheckAll )
+{
+  return ::StdMeshers_RadialQuadrangle_1D2D::IsApplicable( S, toCheckAll );
+}
index f710d2581927ea18fb60b0fa977ab92e669772df..6b5ad31158e599ab74a125055bbffbf17713fb98 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -47,6 +47,9 @@ public:
 
   // Get implementation
   ::StdMeshers_RadialQuadrangle_1D2D* GetImpl();
+
+  // Return true if the algorithm is applicable to a shape
+  static CORBA::Boolean IsApplicable(const TopoDS_Shape &S, CORBA::Boolean toCheckAll);
 };
 
 
index a20b1863283e1e752dbe44519a2bc914d27af508..151551f2e2b01491dfe35254c339312cb3e2ee5e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 43ccce8e279ed876a2e76c65c6d40087335feaac..c1ddc6bec147fb327d88bfb9e2f2eee5768a98fd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx b/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx
new file mode 100644 (file)
index 0000000..b09207f
--- /dev/null
@@ -0,0 +1,143 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
+//  File   : StdMeshers_Reversible1D_i.cxx
+//  Module : SMESH
+//
+#include "StdMeshers_Reversible1D_i.hxx"
+#include "SMESH_PythonDump.hxx"
+
+#include <Utils_CorbaException.hxx>
+#include <utilities.h>
+
+#include CORBA_SERVER_HEADER(SMESH_Hypothesis)
+
+//================================================================================
+/*!
+ * \brief Constructor
+ */
+//================================================================================
+
+StdMeshers_Reversible1D_i::StdMeshers_Reversible1D_i( SMESH_Hypothesis_i* reversible )
+  : myHyp( reversible )
+{
+}
+
+//=============================================================================
+/*!
+ *  StdMeshers_Reversible1D_i::SetReversedEdges
+ *
+ *  Set edges to reverse
+ */
+//=============================================================================
+
+void StdMeshers_Reversible1D_i::SetReversedEdges( const SMESH::long_array& theIds )
+{
+  try {
+    std::vector<int> ids( theIds.length() );
+    CORBA::Long iEnd = theIds.length();
+    for ( CORBA::Long i = 0; i < iEnd; i++ )
+      ids[ i ] = theIds[ i ];
+
+    this->GetImpl()->SetReversedEdges( ids );
+  }
+  catch ( SALOME_Exception& S_ex ) {
+    THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
+  }
+
+  // Update Python script
+  SMESH::TPythonDump() << myHyp->_this() << ".SetReversedEdges( " << theIds << " )";
+}
+
+//=============================================================================
+/*!
+ *  StdMeshers_Reversible1D_i::SetObjectEntry
+ *
+ *  Set the Entry for the Main Object
+ */
+//=============================================================================
+
+void StdMeshers_Reversible1D_i::SetObjectEntry( const char* theEntry )
+{
+  string entry(theEntry); // actually needed as theEntry is spoiled by moment of dumping
+  try {
+    this->GetImpl()->SetObjectEntry( entry.c_str() );
+    // Update Python script
+    SMESH::TPythonDump() << myHyp->_this() << ".SetObjectEntry( \"" << entry.c_str() << "\" )";
+  }
+  catch ( SALOME_Exception& S_ex ) {
+    THROW_SALOME_CORBA_EXCEPTION( S_ex.what(),SALOME::BAD_PARAM );
+  }
+}
+
+//=============================================================================
+/*!
+ *  StdMeshers_Reversible1D_i::GetObjectEntry
+ *
+ *  Set the Entry for the Main Object
+ */
+//=============================================================================
+
+char* StdMeshers_Reversible1D_i::GetObjectEntry()
+{
+  const char* entry;
+  try {
+    entry = this->GetImpl()->GetObjectEntry();
+  }
+  catch ( SALOME_Exception& S_ex ) {
+    THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
+  }
+  return CORBA::string_dup( entry );
+}
+
+//=============================================================================
+/*!
+ *  StdMeshers_Reversible1D_i::GetReversedEdges
+ *
+ *  Get reversed edges
+ */
+//=============================================================================
+
+SMESH::long_array* StdMeshers_Reversible1D_i::GetReversedEdges()
+{
+  SMESH::long_array_var anArray = new SMESH::long_array;
+  std::vector<int> ids = this->GetImpl()->GetReversedEdges();
+  anArray->length( ids.size() );
+  for ( CORBA::Long i = 0; i < ids.size(); i++)
+    anArray [ i ] = ids [ i ];
+
+  return anArray._retn();
+}
+
+//=============================================================================
+/*!
+ *  StdMeshers_Reversible1D_i::GetImpl
+ *
+ *  Get implementation
+ */
+//=============================================================================
+
+::StdMeshers_Reversible1D* StdMeshers_Reversible1D_i::GetImpl()
+{
+  return ( ::StdMeshers_Reversible1D* )myHyp->GetImpl();
+}
diff --git a/src/StdMeshers_I/StdMeshers_Reversible1D_i.hxx b/src/StdMeshers_I/StdMeshers_Reversible1D_i.hxx
new file mode 100644 (file)
index 0000000..f03c5d8
--- /dev/null
@@ -0,0 +1,66 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
+//  File   : StdMeshers_Reversible1D_i.hxx
+//  Module : SMESH
+//
+#ifndef _SMESH_Reversible1D_I_HXX_
+#define _SMESH_Reversible1D_I_HXX_
+
+#include "SMESH_StdMeshers_I.hxx"
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
+
+#include "SMESH_Hypothesis_i.hxx"
+#include "StdMeshers_Reversible1D.hxx"
+
+// ======================================================
+// Common metrhods of Reversible 1D hypotheses
+// ======================================================
+class STDMESHERS_I_EXPORT StdMeshers_Reversible1D_i:
+  public virtual POA_StdMeshers::Reversible1D
+{
+ public:
+  StdMeshers_Reversible1D_i( SMESH_Hypothesis_i* reversible );
+
+  //Set Reversed Edges
+  void SetReversedEdges( const SMESH::long_array& theIDs);
+
+  //Get Reversed Edges
+  SMESH::long_array*  GetReversedEdges();
+
+  //Set the Entry of the Object
+  void SetObjectEntry( const char* theEntry);
+
+  //Get Object Entry
+  char* GetObjectEntry();
+
+  // Get implementation
+  ::StdMeshers_Reversible1D* GetImpl();
+
+ private:
+  SMESH_Hypothesis_i* myHyp;
+};
+
+#endif
index ec9381ae1db5e0d60794f4588b81e55eb09008d1..346842f63b508cc00d5cc832d20be7dfdf1f5329 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9b03579d17a1aed25a999e6b4eca72586ee5517f..9a5c5030a6550a103890c456985903490251bba8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 912c532360865961b19eabe132a73750e34248a9..a294ee46413da9359386b467241a7774f356999f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 0d6c58e2069581917f49cf8715df158c76a33774..1729a48bc583aa97eb79beee3b71c2816e61fcb7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e6e03703eaaaead4630964555a3713474a89bc84..7e8b3ac4cb4e51b54fb437bb235cf07be2350462 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 873583407d2821a8a9c75ff0bcb803ca6ae9eb01..79a9dbf55405fa49f12d6780221f3ad748858313 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 9c2e16027dff55e77a83637baaebb18254b0267d..8790c981012341353f4239faa0d297503570d95d 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 187412245cadd864d95dfe9f42ba64b144ebfc16..01f182067b30cd20954123e7d5efb754fdec1a3c 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e26f4cae5f3e7fcfb6e21d0032c582e5e3579e0a..c8fae2d92dacee1fcf9fa7e0cc30895bb5d000df 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 91b072146ec197cf53a7fd9bba265f1f8549123f..f521d3431c60226a3abc3b3907b9d1d74210ea6f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5ad82c7ecbb22ef1dd9b8a2c8d775b25ccc0f63c..6a1f41daa8aac95da73942a36a69c6c17d07b4c1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -78,15 +78,18 @@ StdMeshers_ViscousLayers_i::~StdMeshers_ViscousLayers_i()
  */
 //================================================================================
 
-void StdMeshers_ViscousLayers_i::SetIgnoreFaces(const ::SMESH::long_array& faceIDs)
-throw ( SALOME::SALOME_Exception )
+void StdMeshers_ViscousLayers_i::SetFaces(const ::SMESH::long_array& faceIDs,
+                                          CORBA::Boolean             toIgnore)
+  throw ( SALOME::SALOME_Exception )
 {
   vector<int> ids( faceIDs.length() );
   for ( unsigned i = 0; i < ids.size(); ++i )
     if (( ids[i] = faceIDs[i] ) < 1 )
       THROW_SALOME_CORBA_EXCEPTION( "Invalid face id", SALOME::BAD_PARAM );
-  GetImpl()->SetBndShapes( ids, /*toIgnore=*/true );
-  SMESH::TPythonDump() << _this() << ".SetIgnoreFaces( " << faceIDs << " )";
+
+  GetImpl()->SetBndShapes( ids, toIgnore );
+
+  SMESH::TPythonDump() << _this() << ".SetFaces( " << faceIDs << ", " << toIgnore << " )";
 }
 
 //================================================================================
@@ -95,16 +98,13 @@ throw ( SALOME::SALOME_Exception )
  */
 //================================================================================
 
-SMESH::long_array* StdMeshers_ViscousLayers_i::GetIgnoreFaces()
+SMESH::long_array* StdMeshers_ViscousLayers_i::GetFaces()
 {
+  vector<int> idsVec = GetImpl()->GetBndShapes();
   SMESH::long_array_var ids = new SMESH::long_array;
-  if ( GetImpl()->IsToIgnoreShapes() )
-  {
-    vector<int> idsVec = GetImpl()->GetBndShapes();
-    ids->length( idsVec.size() );
-    for ( unsigned i = 0; i < idsVec.size(); ++i )
-      ids[i] = idsVec[i];
-  }
+  ids->length( idsVec.size() );
+  for ( unsigned i = 0; i < idsVec.size(); ++i )
+    ids[i] = idsVec[i];
   return ids._retn();
 }
 
@@ -114,6 +114,47 @@ SMESH::long_array* StdMeshers_ViscousLayers_i::GetIgnoreFaces()
  */
 //================================================================================
 
+SMESH::long_array* StdMeshers_ViscousLayers_i::GetIgnoreFaces()
+{
+  if ( GetImpl()->IsToIgnoreShapes() )
+    return this->GetFaces();
+  return new SMESH::long_array;
+}
+
+//================================================================================
+/*!
+ * \brief 
+ */
+//================================================================================
+
+CORBA::Boolean StdMeshers_ViscousLayers_i::GetIsToIgnoreFaces()
+{
+  return GetImpl()->IsToIgnoreShapes();
+}
+
+//================================================================================
+/*!
+ * \brief 
+ */
+//================================================================================
+
+void StdMeshers_ViscousLayers_i::SetIgnoreFaces(const ::SMESH::long_array& faceIDs)
+throw ( SALOME::SALOME_Exception )
+{
+  vector<int> ids( faceIDs.length() );
+  for ( unsigned i = 0; i < ids.size(); ++i )
+    if (( ids[i] = faceIDs[i] ) < 1 )
+      THROW_SALOME_CORBA_EXCEPTION( "Invalid face id", SALOME::BAD_PARAM );
+  GetImpl()->SetBndShapes( ids, /*toIgnore=*/true );
+  SMESH::TPythonDump() << _this() << ".SetIgnoreFaces( " << faceIDs << " )";
+}
+
+//================================================================================
+/*!
+ * \brief 
+ */
+//================================================================================
+
 void StdMeshers_ViscousLayers_i::SetTotalThickness(::CORBA::Double thickness)
 throw ( SALOME::SALOME_Exception )
 {
index 59c8d324c2098c2d3c931d95368359127fc91b1a..e2e5b4b9da3181b8663c8f45fc822827c8833d27 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -51,6 +51,11 @@ class STDMESHERS_I_EXPORT StdMeshers_ViscousLayers_i:
   void SetIgnoreFaces(const ::SMESH::long_array& faceIDs) throw ( SALOME::SALOME_Exception );
   SMESH::long_array* GetIgnoreFaces();
 
+  void SetFaces(const SMESH::long_array& faceIDs,
+                CORBA::Boolean           toIgnore) throw (SALOME::SALOME_Exception);
+  SMESH::long_array* GetFaces();
+  CORBA::Boolean     GetIsToIgnoreFaces();
+
   void SetTotalThickness(::CORBA::Double thickness) throw ( SALOME::SALOME_Exception );
   ::CORBA::Double GetTotalThickness();
 
index 3cc3ac0507f6d5c96828e1ffecb2753354937aec..bdfcb2fc8d3256e92a57b05d1857dea02e2ef36c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -35,6 +35,7 @@
 #include "StdMeshers_AutomaticLength_i.hxx"
 #include "StdMeshers_StartEndLength_i.hxx"
 #include "StdMeshers_Arithmetic1D_i.hxx"
+#include "StdMeshers_Geometric1D_i.hxx"
 #include "StdMeshers_FixedPoints1D_i.hxx"
 #include "StdMeshers_NumberOfSegments_i.hxx"
 #include "StdMeshers_Deflection1D_i.hxx"
 #include "StdMeshers_ViscousLayers2D_i.hxx"
 #include "StdMeshers_CartesianParameters3D_i.hxx"
 
-template <class T> class StdHypothesisCreator_i:public HypothesisCreator_i<T>
+namespace SMESH {
+  class ApplicableToAny
+  {
+  public:
+    static CORBA::Boolean IsApplicable( const TopoDS_Shape &S, CORBA::Boolean toCheckAll ) {
+      return true;
+    }
+  };
+};
+template <class T, class TIsApplicable = SMESH::ApplicableToAny> class StdHypothesisCreator_i:public HypothesisCreator_i<T>
 {
 public:
   // as we have 'module StdMeshers' in SMESH_BasicHypothesis.idl
   virtual std::string GetModuleName() { return "StdMeshers"; }
+  virtual CORBA::Boolean IsApplicable( const TopoDS_Shape & S, CORBA::Boolean toCheckAll ) {
+    return TIsApplicable::IsApplicable( S, toCheckAll );
+  }
 };
 
 //=============================================================================
@@ -136,6 +149,8 @@ STDMESHERS_I_EXPORT
       aCreator = new StdHypothesisCreator_i<StdMeshers_NotConformAllowed_i>;
     else if (strcmp(aHypName, "Propagation") == 0)
       aCreator = new StdHypothesisCreator_i<StdMeshers_Propagation_i>;
+    else if (strcmp(aHypName, "PropagOfDistribution") == 0)
+      aCreator = new StdHypothesisCreator_i<StdMeshers_PropagOfDistribution_i>;
     else if (strcmp(aHypName, "MaxElementArea") == 0)
       aCreator = new StdHypothesisCreator_i<StdMeshers_MaxElementArea_i>;
     else if (strcmp(aHypName, "MaxElementVolume") == 0)
@@ -150,6 +165,8 @@ STDMESHERS_I_EXPORT
       aCreator = new StdHypothesisCreator_i<StdMeshers_FixedPoints1D_i>;
     else if (strcmp(aHypName, "Arithmetic1D") == 0)
       aCreator = new StdHypothesisCreator_i<StdMeshers_Arithmetic1D_i>;
+    else if (strcmp(aHypName, "GeometricProgression") == 0)
+      aCreator = new StdHypothesisCreator_i<StdMeshers_Geometric1D_i>;
     else if (strcmp(aHypName, "AutomaticLength") == 0)
       aCreator = new StdHypothesisCreator_i<StdMeshers_AutomaticLength_i>;
     else if (strcmp(aHypName, "QuadranglePreference") == 0)
@@ -198,9 +215,9 @@ STDMESHERS_I_EXPORT
       aCreator = new StdHypothesisCreator_i<StdMeshers_MEFISTO_2D_i>;
 #endif
     else if (strcmp(aHypName, "Quadrangle_2D") == 0)
-      aCreator = new StdHypothesisCreator_i<StdMeshers_Quadrangle_2D_i>;
+      aCreator = new StdHypothesisCreator_i<StdMeshers_Quadrangle_2D_i, StdMeshers_Quadrangle_2D_i>;
     else if (strcmp(aHypName, "Hexa_3D") == 0)
-      aCreator = new StdHypothesisCreator_i<StdMeshers_Hexa_3D_i>;
+      aCreator = new StdHypothesisCreator_i<StdMeshers_Hexa_3D_i, StdMeshers_Hexa_3D_i>;
     else if (strcmp(aHypName, "Projection_1D") == 0)
       aCreator = new StdHypothesisCreator_i<StdMeshers_Projection_1D_i>;
     else if (strcmp(aHypName, "Projection_1D2D") == 0)
@@ -208,11 +225,11 @@ STDMESHERS_I_EXPORT
     else if (strcmp(aHypName, "Projection_2D") == 0)
       aCreator = new StdHypothesisCreator_i<StdMeshers_Projection_2D_i>;
     else if (strcmp(aHypName, "Projection_3D") == 0)
-      aCreator = new StdHypothesisCreator_i<StdMeshers_Projection_3D_i>;
+      aCreator = new StdHypothesisCreator_i<StdMeshers_Projection_3D_i, StdMeshers_Hexa_3D_i>;
     else if (strcmp(aHypName, "Prism_3D") == 0)
-      aCreator = new StdHypothesisCreator_i<StdMeshers_Prism_3D_i>;
+      aCreator = new StdHypothesisCreator_i<StdMeshers_Prism_3D_i, StdMeshers_Prism_3D_i>;
     else if (strcmp(aHypName, "RadialPrism_3D") == 0)
-      aCreator = new StdHypothesisCreator_i<StdMeshers_RadialPrism_3D_i>;
+      aCreator = new StdHypothesisCreator_i<StdMeshers_RadialPrism_3D_i, StdMeshers_RadialPrism_3D_i>;
     else if (strcmp(aHypName, "SegmentAroundVertex_0D") == 0)
       aCreator = new StdHypothesisCreator_i<StdMeshers_SegmentAroundVertex_0D_i>;
     else if (strcmp(aHypName, "CompositeSegment_1D") == 0)
@@ -222,7 +239,7 @@ STDMESHERS_I_EXPORT
     else if (strcmp(aHypName, "UseExisting_2D") == 0)
       aCreator = new StdHypothesisCreator_i<StdMeshers_UseExisting_2D_i>;
     else if (strcmp(aHypName, "RadialQuadrangle_1D2D") == 0)
-      aCreator = new StdHypothesisCreator_i<StdMeshers_RadialQuadrangle_1D2D_i>;
+      aCreator = new StdHypothesisCreator_i<StdMeshers_RadialQuadrangle_1D2D_i, StdMeshers_RadialQuadrangle_1D2D_i>;
     else if (strcmp(aHypName, "Import_1D") == 0)
       aCreator = new StdHypothesisCreator_i<StdMeshers_Import_1D_i>;
     else if (strcmp(aHypName, "Import_1D2D") == 0)
index a2abf7d4909f44bea2d09cdb8a873d0ed54322bd..bf0346e8fee7bc592240f892bc8550b65dbcd9fe 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2012-201 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 ADD_SUBDIRECTORY(MeshCut)
 ADD_SUBDIRECTORY(padder)
 ADD_SUBDIRECTORY(Verima)
+ADD_SUBDIRECTORY(blocFissure)
+ADD_SUBDIRECTORY(MacMesh)
 
 IF(SALOME_BUILD_GUI)
   ADD_SUBDIRECTORY(MGCleanerPlug)
   ADD_SUBDIRECTORY(YamsPlug)
+  ADD_SUBDIRECTORY(ZCracksPlug)
 ENDIF(SALOME_BUILD_GUI)
 
 # scripts / static
index d6147291d8adec351a4ea36bb0904d941ad15ecb..f631a56c5606b54a598919498517ed21931d58e9 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index b7d02ec8ef1dbb52f84c2520b6b6973346bf3048..9eb63906467229a0710ea5b1d30da77fdc2a7036 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2007-2013  EDF R&D
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index aa8170a976161a3f907f1070cfd98342c8a04734..b139a0d4c0db6e96c9ce5df36544ad86977f5317 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2007-2013  EDF R&D
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 80eeae790cc6bee86ab51aebb50869cbe1b169a3..18893f886a03a61dee16c7de7fe3e80f2c568b36 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2006-2013  EDF R&D
+# Copyright (C) 2006-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 686ed4be96889dead81548eeb89bc0dd10d80484..faeb39e6dbae33e496d456fcdaa981430d5f3a3d 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index cb90813a786e8caf1cd4407545cb0d707fdb44dc..5d8876c8b06b2460ab73d6279b16d61ed6e9d29a 100644 (file)
@@ -36,7 +36,7 @@ master_doc = 'index'
 
 # General substitutions.
 project = 'MGCleaner Plug-in'
-copyright = '2013, CEA'
+copyright = '2013-2014, CEA'
 
 # The default replacements for |version| and |release|, also used in various
 # other places throughout the built documents.
diff --git a/src/Tools/MacMesh/CMakeLists.txt b/src/Tools/MacMesh/CMakeLists.txt
new file mode 100644 (file)
index 0000000..4cf6c72
--- /dev/null
@@ -0,0 +1,68 @@
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+
+# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+SET(MACMESH_INSTALL_PY ${SALOME_SMESH_INSTALL_PLUGINS}/MacMesh)
+SET(MACMESH_INSTALL_DOC ${SALOME_INSTALL_DOC}/gui/SMESH/MacMesh)
+
+SALOME_CONFIGURE_FILE(Doc/index.html.in index.html)
+SALOME_CONFIGURE_FILE(Example/PressureValve.py.in PressureValve.py)
+
+SET(plugin_DOC_FILES
+  Doc/MacMesh.v.10avr.pdf
+  ${CMAKE_CURRENT_BINARY_DIR}/index.html
+  Doc/snap.jpg
+  )
+
+IF(SALOME_BUILD_DOC)
+  INSTALL(FILES ${plugin_DOC_FILES} DESTINATION ${MACMESH_INSTALL_DOC})
+ENDIF(SALOME_BUILD_DOC)
+
+# --- scripts ---
+
+# scripts / static
+SET(plugin_SCRIPTS
+  MacMesh/Alarms.py
+  MacMesh/CentralUnrefine.py
+  MacMesh/CompositeBox.py
+  MacMesh/CompositeBoxF.py
+  MacMesh/Config.py
+  MacMesh/CutnGroup.py
+  MacMesh/Cylinder.py
+  MacMesh/GenFunctions.py
+  MacMesh/MacObject.py
+  MacMesh/PublishGroups.py
+  MacMesh/SharpAngle.py
+)
+SET(sample_SCRIPT
+  ${CMAKE_CURRENT_BINARY_DIR}/PressureValve.py
+)
+# --- rules ---
+
+SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${MACMESH_INSTALL_PY})
+SALOME_INSTALL_SCRIPTS("${sample_SCRIPT}" ${SALOME_INSTALL_SCRIPT_PYTHON} DEF_PERMS)
+
+SET(testname MacMesh_Example_PressureValve)
+SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
+ADD_TEST(
+  NAME ${testname}
+  COMMAND ${PYTHON_EXECUTABLE} -B ${CMAKE_SOURCE_DIR}/doc/salome/examples/testme.py ${sample_SCRIPT})
+SET_TESTS_PROPERTIES(${testname} PROPERTIES ENVIRONMENT "${tests_env}")
+
diff --git a/src/Tools/MacMesh/Doc/MacMesh.v.10avr.pdf b/src/Tools/MacMesh/Doc/MacMesh.v.10avr.pdf
new file mode 100755 (executable)
index 0000000..0c59d56
Binary files /dev/null and b/src/Tools/MacMesh/Doc/MacMesh.v.10avr.pdf differ
diff --git a/src/Tools/MacMesh/Doc/index.html.in b/src/Tools/MacMesh/Doc/index.html.in
new file mode 100644 (file)
index 0000000..fc87fe2
--- /dev/null
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>MacMesh for Salome</title>
+  </head>
+    <h1>The multi-purpose Salome plug-in for regular 2D meshing </h1>
+    <ul>
+      <li>Consider reading <a href="MacMesh.v.10avr.pdf">
+          User manual </a> to learn how to use the plug-in</li>
+      <li>Type <em><font color="brown">import PressureValve</font></em> in the Python console of
+        Salome to run a sample script</li>
+      <li> <a href="../../../../../../@SALOME_INSTALL_SCRIPT_PYTHON@/PressureValve.py">
+          Download the sample script</a></li>
+      <li>Python files of the plugin are located in <br><font color="brown">
+        ${SMESH_ROOT_DIR}/@MACMESH_INSTALL_PY@ </font> directory</li>
+    </ul>
+    <img src="snap.jpg" width="100%">
+  </body>
+</html>
diff --git a/src/Tools/MacMesh/Doc/snap.jpg b/src/Tools/MacMesh/Doc/snap.jpg
new file mode 100644 (file)
index 0000000..a9765fc
Binary files /dev/null and b/src/Tools/MacMesh/Doc/snap.jpg differ
diff --git a/src/Tools/MacMesh/Example/PressureValve.py.in b/src/Tools/MacMesh/Example/PressureValve.py.in
new file mode 100755 (executable)
index 0000000..713e27f
--- /dev/null
@@ -0,0 +1,115 @@
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+
+# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+##################################################################
+# Header for salome initialization ###############################
+
+import sys, salome, math, os
+sys.path.append( os.path.join( os.getenv('SMESH_ROOT_DIR'), '@MACMESH_INSTALL_PY@'))
+
+import Config, GenFunctions
+
+Config.theStudy = salome.myStudy; 
+
+from MacObject import *
+from SharpAngle import *
+from CentralUnrefine import *
+from PublishGroups import *
+from CompositeBox import *
+from CompositeBoxF import *
+
+
+
+##################################################################
+# Mesh name ######################################################
+
+Config.StudyName = "SRV_X."
+
+##################################################################
+# Definition of geometrical parameters ###########################
+
+X = 1.0         # Valve initial opening
+
+Config.StudyName += str(X)+"mm"
+
+R = 7.5         # Upstream pipe radius
+T = 5.0         # Upstream pipe thickness
+H = 20.0        # Upstream pipe height
+J = 6.0         # Jet distance
+E = 60.0        # Exit extent
+
+##################################################################
+# Definition of meshing parameters ###############################
+
+d = 0.1         # Meshing element size at the inner corner
+Nl = 1          # Number of levels in the local refinement
+##################################################################
+Bloc = []
+
+# Object No. 1 #
+Bloc.append( SharpAngleOut(0.,0.,X,1.5*X,X,d,'NE',Nl,
+              groups=['PH','PV_IN','VH',None,None,None])  )
+
+# Object No. 2 #
+Bloc.append( CompositeBox(X/2.+0.5*(R-X/2.),0.5*(X+X/2.)-X/2.,R-X/2.,X+X/2.,
+              groups=[None,'VH',None,'AXIS']           )  )
+
+# Object No. 3 #
+Bloc.append( CompositeBoxF((0.,-X/2.),(R,-X/2.),(R,-H),(0.,-H),
+              groups=['IN',None,'PV_IN','AXIS']           )  )
+
+# Object No. 4 #
+Bloc.append( SharpAngleOut(-T,0.,X,X,X,d,'NW',Nl,
+              groups=['PH','PV_OUT',None,None,None,None])  )
+              
+# Object No. 5 #
+Bloc.append( SharpAngleOut(-T,X,X,X,X,d,'SW',Nl,
+              groups=['VH','VV',None,None,None,None])  )
+              
+if X < T :
+        gap = T-X
+        Bloc.append( MacObject('CompBoxF',[(-X/2.-gap/2.,X/2.),(gap,X)],
+              ['auto'],groups=['PH','VH',None,None]    )  )
+              
+# Object No. 6 #
+Bloc.append( MacObject('CompBoxF',[(-T-X/2.-(J-X/2.)/2.,X/2.),(J-X/2.,2.*X)],
+              ['auto'],groups=[None,None,None,None]    )  )    
+
+# Object No. 7 #
+Bloc.append( CentralUnrefine(-T-J,X/2.,2.*E-J,E,'EW',
+              groups=[None,None,None,'OUT_V','OUT_H_HI','OUT_H_LO'])) 
+
+# Object No. 8 #
+Bloc.append( CompositeBox(-T-J/2.,-X/2.-0.5*((E-X)/2.-X/2.),J,(E-X)/2.-X/2.,
+              groups=['OUT_H_LO',None,None,'PV_OUT']   )  )
+               
+# Object No. 9 #
+Bloc.append( CompositeBox(-T-J/2.,X+X/2.+0.5*((E-X)/2.-X/2.),J,(E-X)/2.-X/2.,
+              groups=[None,'OUT_H_HI',None,'VV'] )  )
+                                                                                  
+SRVMesh = PublishGroups()
+
+RealLocalMeshing = Bloc[0][0].GeoPar[1][0]/Bloc[0][0].DirectionalMeshParams[0]
+ExtrusionAngle = 2. * math.asin(RealLocalMeshing/(2*R))*180./math.pi
+print "\nThe mesh will be revolved with an angle of :",ExtrusionAngle
+
+RevolveMesh(SRVMesh, Center=[R+0.01,0,0], Direction=[0,1,0], AngleDeg=ExtrusionAngle, Scale=0.001)
+
diff --git a/src/Tools/MacMesh/MacMesh/Alarms.py b/src/Tools/MacMesh/MacMesh/Alarms.py
new file mode 100644 (file)
index 0000000..9bfd71a
--- /dev/null
@@ -0,0 +1,31 @@
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+
+# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+def Message (code) :
+       import sys
+       MessageString = { 1 : lambda x: "Successfully created \n",
+                          2 : lambda x: "Fatal: Incorrect input \n",
+                          3 : lambda x: "Fatal: Overlapping objects detected \n",
+                          4 : lambda x: "Fatal: Incompatible object type with neighbouring objects" }[code](str(code))
+       print MessageString
+       #if code > 1 : sys.exit()
+       return 1
+
diff --git a/src/Tools/MacMesh/MacMesh/CentralUnrefine.py b/src/Tools/MacMesh/MacMesh/CentralUnrefine.py
new file mode 100644 (file)
index 0000000..2a7c9d5
--- /dev/null
@@ -0,0 +1,190 @@
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+
+# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+
+
+
+# This object allows unrefining from a central point (actually, a line) to the exterior
+# X0 and Y0 are the center points of the origin point and not those of the center of the generated block
+
+
+
+import sys, math, commands
+CWD = commands.getoutput('pwd')
+sys.path.append(CWD)
+
+from MacObject import *
+import Config, GenFunctions
+
+def CentralUnrefine (X0 , Y0 , DX , DY , Orientation, **args ) : 
+
+       DirPar =     {'SN' : lambda : ['NW', 'NE', 'EW', 'NW', 'SN', 'SN', 'NE', 'WE'],
+                     'NS' : lambda : ['SE', 'SW', 'WE', 'SE', 'NS', 'NS', 'SW', 'EW'],
+                     'EW' : lambda : ['NW', 'SW', 'SN', 'NW', 'EW', 'EW', 'SW', 'NS'],
+                     'WE' : lambda : ['SE', 'NE', 'NS', 'SE', 'WE', 'WE', 'NE', 'SN'], }[Orientation]()
+
+       CoefVer =   {'SN' : lambda :  1.,
+                    'NS' : lambda : -1.,
+                    'EW' : lambda :  0.,
+                    'WE' : lambda :  0., }[Orientation]()
+
+       CoefHor =   {'SN' : lambda :  0.,
+                    'NS' : lambda :  0.,
+                    'EW' : lambda : -1.,
+                    'WE' : lambda :  1., }[Orientation]()
+
+
+       MacObject('CompBoxF',[(X0+CoefHor*DX/2,Y0+CoefVer*DY/2),(DX,DY)],['auto'],publish=0)
+       ToLook1 = {'SN' : lambda : 2,
+                  'NS' : lambda : 3,
+                  'EW' : lambda : 1,
+                  'WE' : lambda : 0, }[Orientation]()
+
+       ToLook2 = {'SN' : lambda : 0,
+                  'NS' : lambda : 0,
+                  'EW' : lambda : 2,
+                  'WE' : lambda : 2, }[Orientation]()
+                   
+       ToLook3 = {'SN' : lambda : [0,1,2,3],
+                  'NS' : lambda : [1,0,3,2],
+                  'EW' : lambda : [3,2,1,0],
+                  'WE' : lambda : [2,3,0,1], }[Orientation]() 
+                                     
+        if args.__contains__('groups') :
+                GroupNames = args['groups']
+       else : GroupNames = [None, None, None, None, None, None]
+                
+       ExistingSegments = Config.ListObj[-1].DirectionalMeshParams[ToLook1]
+       ObjIDs = Config.Connections[-1][ToLook1]
+        RemoveLastObj()
+        
+       ExtensionSegments = math.ceil(ExistingSegments/12.)*12.
+       Dmin = 1.E50
+       Dmax = -1.E50
+       for ObjID in ObjIDs : 
+               Boundaries = Config.ListObj[ObjID].Boundaries()
+               if Boundaries[ToLook2] < Dmin : Dmin = Boundaries[ToLook2]
+               if Boundaries[ToLook2+1] > Dmax : Dmax = Boundaries[ToLook2+1]
+        dx = 0                    
+       if ExtensionSegments > ExistingSegments :
+               dn = (ExtensionSegments-ExistingSegments)/2.
+               dx = dn*(Dmax-Dmin)/ExistingSegments
+               #MacObject('CompBoxF',[(X0-CoefHor*dx/2+CoefVer*(-X0+Dmin-dx/2),Y0-CoefVer*dx/2+CoefHor*(-Y0+Dmin-dx/2)),(dx,dx)],[(dn,dn)],publish=0)
+               #MacObject('CompBoxF',[(X0-CoefHor*dx/2+CoefVer*(-X0+Dmax+dx/2),Y0-CoefVer*dx/2+CoefHor*(-Y0+Dmax+dx/2)),(dx,dx)],[(dn,dn)],publish=0)
+        
+        BoxSide = (Dmax-Dmin+2*dx)/2.
+        
+        Obj = []
+        Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(BoxSide/2)+CoefVer*(-BoxSide/2),Y0+CoefVer*(BoxSide/2)+CoefHor*(-BoxSide/2)),(BoxSide,BoxSide)],[int(ExtensionSegments/6),DirPar[0]],groups=GroupArray(ToLook3[0],GroupNames[0])))       
+        Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(BoxSide/2)+CoefVer*(BoxSide/2),Y0+CoefVer*(BoxSide/2)+CoefHor*(BoxSide/2)),(BoxSide,BoxSide)],[int(ExtensionSegments/6),DirPar[1]],groups=GroupArray(ToLook3[0],GroupNames[0])))        
+
+        NLevOpt = 0
+        for NLevels in range (1,100) : 
+                DX1 = abs(CoefVer)*BoxSide*2.**(NLevels+1)+abs(CoefHor)*BoxSide*2.**(NLevels)
+                DY1 = abs(CoefHor)*BoxSide*2.**(NLevels+1)+abs(CoefVer)*BoxSide*2.**(NLevels)
+                if DX1 > DX or DY1 > DY :
+                        NLevOpt = NLevels-1
+                        DXinner = DX1/2.
+                        DYinner = DY1/2.
+                        break
+                        
+        dummyArray = [DXinner,DYinner,DYinner,DXinner]                 
+        D1inner = dummyArray[ToLook2]           # = DXinner for SN and NS orientations
+        D2inner = dummyArray[ToLook2+1]         # = DYinner for SN and NS orientations
+         
+        dummyArray = [DX,DY,DY,DX]                 
+        D1 = dummyArray[ToLook2]                # = DX for SN and NS orientations
+        D2 = dummyArray[ToLook2+1]              # = DY for SN and NS orientations
+                       
+        if D1inner < D1 : 
+                GN0a = GroupArray(ToLook3[0],GroupNames[1])
+                GN0b = GroupArray(ToLook3[0],GroupNames[2])              
+                GN01 = GroupArray(ToLook3[0],GroupNames[1])
+                GN02 = GroupArray(ToLook3[0],GroupNames[2])
+                if D2inner < D2 : 
+                        GN10 = [None,None,None,None]
+                        GN11 = [None,None,None,None]
+                        GN20 = [None,None,None,None]
+                else : 
+                        GN10 = GroupArray(ToLook3[1],GroupNames[3])
+                        GN11 = GroupArray(ToLook3[1],GroupNames[3])
+                        GN20 = GroupArray(ToLook3[1],GroupNames[3]) 
+        else : 
+                GN0a = GroupArray(ToLook3[0],GroupNames[1])
+                GN0b = GroupArray(ToLook3[0],GroupNames[2])
+                GN01 = GroupArray([ToLook3[0],ToLook3[2]],[GroupNames[1],GroupNames[4]]) 
+                GN02 = GroupArray([ToLook3[0],ToLook3[3]],[GroupNames[2],GroupNames[5]]) 
+                if D2inner < D2 : 
+                        GN10 = GroupArray(ToLook3[2],GroupNames[4])
+                        GN11 = GroupArray(ToLook3[3],GroupNames[5])
+                        GN20 = [None,None,None,None]
+                else : 
+                        GN10 = GroupArray([ToLook3[1],ToLook3[2]],[GroupNames[3],GroupNames[4]])
+                        GN11 = GroupArray([ToLook3[1],ToLook3[3]],[GroupNames[3],GroupNames[5]])
+                        GN20 = GroupArray(ToLook3[1],GroupNames[3]) 
+                                              
+        for N in range (1,NLevOpt+1):
+               n=N-1
+                D = BoxSide*(2.**n)
+                if N < NLevOpt : 
+                       Obj.append(MacObject('Box42'   ,[(X0+D*(CoefHor*1/2-CoefVer*3/2)  , Y0+D*(CoefVer*1/2-CoefHor*3/2) )          , (D,D)],['auto',DirPar[2]], groups=GN0a))
+                       Obj.append(MacObject('BoxAng32',[(X0+D*(CoefHor*3/2-CoefVer*3/2)  , Y0+D*(CoefVer*3/2-CoefHor*3/2) )          , (D,D)],['auto',DirPar[3]]))
+                       Obj.append(MacObject('Box42'   ,[(X0+D*(CoefHor*3/2-CoefVer*1/2)  , Y0+D*(CoefVer*3/2-CoefHor*1/2) )          , (D,D)],['auto',DirPar[4]]))
+                       Obj.append(MacObject('Box42'   ,[(X0+D*(CoefHor*3/2+CoefVer*1/2)  , Y0+D*(CoefHor*1/2+CoefVer*3/2) )          , (D,D)],['auto',DirPar[5]]))
+                       Obj.append(MacObject('BoxAng32',[(X0+D*(CoefVer*3/2+CoefHor*3/2)  , Y0+D*(CoefVer*3/2+CoefHor*3/2) )          , (D,D)],['auto',DirPar[6]]))
+                       Obj.append(MacObject('Box42'   ,[(X0+D*(CoefVer*3/2+CoefHor*1/2)  , Y0+D*(CoefHor*3/2+CoefVer*1/2) )          , (D,D)],['auto',DirPar[7]], groups=GN0b))
+                else :
+                       Obj.append(MacObject('Box42'   ,[(X0+D*(CoefHor*1/2-CoefVer*3/2)  , Y0+D*(CoefVer*1/2-CoefHor*3/2) )          , (D,D)],['auto',DirPar[2]], groups=GN01))
+                       Obj.append(MacObject('BoxAng32',[(X0+D*(CoefHor*3/2-CoefVer*3/2)  , Y0+D*(CoefVer*3/2-CoefHor*3/2) )          , (D,D)],['auto',DirPar[3]], groups=GN10))
+                       Obj.append(MacObject('Box42'   ,[(X0+D*(CoefHor*3/2-CoefVer*1/2)  , Y0+D*(CoefVer*3/2-CoefHor*1/2) )          , (D,D)],['auto',DirPar[4]], groups=GN20))
+                       Obj.append(MacObject('Box42'   ,[(X0+D*(CoefHor*3/2+CoefVer*1/2)  , Y0+D*(CoefHor*1/2+CoefVer*3/2) )          , (D,D)],['auto',DirPar[5]], groups=GN20))
+                       Obj.append(MacObject('BoxAng32',[(X0+D*(CoefVer*3/2+CoefHor*3/2)  , Y0+D*(CoefVer*3/2+CoefHor*3/2) )          , (D,D)],['auto',DirPar[6]], groups=GN11))
+                       Obj.append(MacObject('Box42'   ,[(X0+D*(CoefVer*3/2+CoefHor*1/2)  , Y0+D*(CoefHor*3/2+CoefVer*1/2) )          , (D,D)],['auto',DirPar[7]], groups=GN02))
+
+        
+       if CoefVer and DX>DXinner : 
+                Obj.append(MacObject('CompBoxF',[(X0-CoefVer*0.25*(DX+DXinner),Y0+CoefVer*DYinner/2),((DX-DXinner)/2,DYinner)],['auto'], groups = GroupArray([ToLook3[0],ToLook3[2]],[GroupNames[1],GroupNames[4]])))
+                Obj.append(MacObject('CompBoxF',[(X0+CoefVer*0.25*(DX+DXinner),Y0+CoefVer*DYinner/2),((DX-DXinner)/2,DYinner)],['auto'], groups = GroupArray([ToLook3[0],ToLook3[3]],[GroupNames[2],GroupNames[5]])))
+                if DY>DYinner : 
+                        Obj.append(MacObject('CompBoxF',[(X0-CoefVer*0.25*(DX+DXinner),Y0+CoefVer*(DY+DYinner)/2.),((DX-DXinner)/2,DY-DYinner)],['auto'], groups = GroupArray([ToLook3[1],ToLook3[2]],[GroupNames[3],GroupNames[4]])))
+                        Obj.append(MacObject('CompBoxF',[(X0+CoefVer*0.25*(DX+DXinner),Y0+CoefVer*(DY+DYinner)/2.),((DX-DXinner)/2,DY-DYinner)],['auto'], groups = GroupArray([ToLook3[1],ToLook3[3]],[GroupNames[3],GroupNames[5]])))
+                        Obj.append(MacObject('CompBoxF',[(X0,Y0+CoefVer*(DY+DYinner)/2.),(DXinner,DY-DYinner)],['auto'], groups = GroupArray(ToLook3[1],GroupNames[3])))
+        elif CoefHor and DY>DYinner : 
+                Obj.append(MacObject('CompBoxF',[(X0+CoefHor*DXinner/2,Y0-CoefHor*0.25*(DY+DYinner)),(DXinner,(DY-DYinner)/2)],['auto'], groups = GroupArray([ToLook3[0],ToLook3[2]],[GroupNames[1],GroupNames[4]])))
+                Obj.append(MacObject('CompBoxF',[(X0+CoefHor*DXinner/2,Y0+CoefHor*0.25*(DY+DYinner)),(DXinner,(DY-DYinner)/2)],['auto'], groups = GroupArray([ToLook3[0],ToLook3[3]],[GroupNames[2],GroupNames[5]])))
+                if DX>DXinner : 
+                        Obj.append(MacObject('CompBoxF',[(X0+CoefHor*(DX+DXinner)/2.,Y0-CoefHor*0.25*(DY+DYinner)),(DX-DXinner,(DY-DYinner)/2)],['auto'], groups = GroupArray([ToLook3[1],ToLook3[2]],[GroupNames[3],GroupNames[4]])))
+                        Obj.append(MacObject('CompBoxF',[(X0+CoefHor*(DX+DXinner)/2.,Y0+CoefHor*0.25*(DY+DYinner)),(DX-DXinner,(DY-DYinner)/2)],['auto'], groups = GroupArray([ToLook3[1],ToLook3[3]],[GroupNames[3],GroupNames[5]])))
+                        Obj.append(MacObject('CompBoxF',[(X0+CoefHor*(DX+DXinner)/2.,Y0),(DX-DXinner,DYinner)],['auto'], groups = GroupArray(ToLook3[1],GroupNames[3])))
+        return Obj
+
+def RemoveLastObj() : 
+        Config.ListObj = Config.ListObj[:-1]
+        Config.Connections = Config.Connections[:-1]
+def GroupArray(indices, GroupNames) :
+        if type(indices) is int : 
+                indices = [indices]
+                GroupNames = [GroupNames]
+        Output = [None,None,None,None]
+        for i, ind in enumerate(indices) : 
+                Output[ind] = GroupNames[i]
+        return Output
diff --git a/src/Tools/MacMesh/MacMesh/CompositeBox.py b/src/Tools/MacMesh/MacMesh/CompositeBox.py
new file mode 100644 (file)
index 0000000..773fc41
--- /dev/null
@@ -0,0 +1,188 @@
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+
+# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+
+
+# INTRODUCTION HERE
+
+import sys, math, copy, commands
+CWD = commands.getoutput('pwd')
+sys.path.append(CWD)
+
+from MacObject import *
+import Config, GenFunctions
+
+def CompositeBox (X0 , Y0 , DX , DY , **args ) : 
+                                     
+        if args.__contains__('groups') :
+                GroupNames = args['groups']
+       else : GroupNames = [None, None, None, None]
+        # Create a full Box just to inherit, globally, the mesh parameters of bounding objects
+       MacObject('CompBoxF',[(X0,Y0),(DX,DY)],['auto'],publish=0)
+        
+        # Save the existing number of segments on each direction
+       ExistingSegments = Config.ListObj[-1].DirectionalMeshParams
+        
+        # Sort the connection list for the full Box
+        ObjIDLists = SortObjLists(Config.Connections[-1],X0 , Y0 , DX , DY )
+        RemoveLastObj()
+        
+        print "ObjIDLists: ", ObjIDLists
+        
+        RealSegments = []
+        Direction = []
+        flag = 0
+        if not(args.__contains__('recursive')) : Config.Count = 0
+        print "Config.Count : ", Config.Count
+        Config.Criterion = GetCriterion(ObjIDLists)
+        for index, ObjList in enumerate(ObjIDLists) :
+                if not (ObjList[0] == -1 or Config.Count >= Config.Criterion):
+                        if len(ObjList)>1 : flag = 1
+                        else : flag = 0
+                        for ObjID in ObjList:
+                           ToLook0 = [2,2,0,0][index]
+                           ToLook1 = [3,2,1,0][index]
+                           CommonSide =  FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),[X0-DX/2.,X0+DX/2.,Y0-DY/2.,Y0+DY/2.][ToLook0:ToLook0+2])
+                           ToLook2 = [1,0,3,2][index]
+                           RealSegments.append(Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]*IntLen(CommonSide)/IntLen(Config.ListObj[ObjID].DirBoundaries(ToLook1)))
+                           Direction.append(ToLook0/2)
+                           
+                           if flag and Config.Count < Config.Criterion:
+                                if index < 2 :
+                                        if abs(CommonSide[0] - (Y0-DY/2.))<1e-7 : SouthGR = GroupNames[0]
+                                        else : SouthGR = None
+                                        if abs(CommonSide[1] - (Y0+DY/2.))<1e-7 : NorthGR = GroupNames[1]
+                                        else : NorthGR = None
+                                        CompositeBox (X0, CommonSide[0]+IntLen(CommonSide)/2., DX,IntLen(CommonSide), recursive=1, groups = [SouthGR,NorthGR]+GroupNames[2:4])
+                                else : 
+                                        if abs(CommonSide[0] - (X0-DX/2.))<1e-7 : EastGR = GroupNames[2]
+                                        else : EastGR = None
+                                        if abs(CommonSide[1] - (X0+DX/2.))<1e-7 : WestGR = GroupNames[3]
+                                        else : WestGR = None
+                                        CompositeBox (CommonSide[0]+IntLen(CommonSide)/2., Y0, IntLen(CommonSide),DY, recursive=1, groups = GroupNames[0:2]+[EastGR,WestGR])
+
+                           if Config.Count >= Config.Criterion :
+                                break
+        if flag == 0 and Config.Count < Config.Criterion:
+                #print "Dir : ", Direction
+                #print "RealSegments : ", RealSegments
+                
+                #Xind = Direction.index(0)
+                #Yind = Direction.index(1)
+                #MacObject('CompBoxF',[(X0,Y0),(DX,DY)] ,[(RealSegments[Xind],RealSegments[Yind])], groups = GroupNames)
+                MacObject('CompBoxF',[(X0,Y0),(DX,DY)] ,['auto'], groups = GroupNames)
+                
+                Config.Count += 1
+
+                           
+def FindCommonSide (Int1, Int2) :
+        if abs(min(Int1[1],Int2[1])-max(Int1[0],Int2[0])) < 1e-5: return [0,0]
+        else : return [max(Int1[0],Int2[0]), min(Int1[1],Int2[1])]
+        
+def IntLen (Interval) :
+        return abs(Interval[1]-Interval[0])     
+           
+def RemoveLastObj() : 
+        Config.ListObj = Config.ListObj[:-1]
+        Config.Connections = Config.Connections[:-1]
+        
+def GetCriterion (ObjListIDs):
+        return max(Config.Criterion, max(len(ObjListIDs[0]),len(ObjListIDs[1]))*max(len(ObjListIDs[2]),len(ObjListIDs[3])))
+
+def SortObjLists (List,X0,Y0,DX,DY) :
+        """ 
+        This function sorts the list of neighbouring objects on each side, according to their intersection
+        with the object being created. From South to North and from East to West
+        """
+        Output = List
+        # First find the directions where no neighbour exists
+        # Important : Here we assume that exactly two directions have no neighbours !!!
+        #             Should we change this to allow a more general case ????
+        dummy = IndexMultiOcc(List,(-1,))
+        
+        # dummy[0] is either 0, meaning there is no neighbour on X- (West)
+        #                 or 1, meaning there is no neighbour on X+ (East)
+        # Similarly dummy[1] can be either 2 or 3 (South and North respectively)
+        # In order to get back to the formalism of groups (SNWE) 
+        #  => we do the following to define Sense of no neighbours and then the Direction list
+        #       is calculated as to include uniquely the directions where we DO have neighbours
+        if len(dummy) == 1 :
+                # This adds a second direction where neighbours are not regarded, it is either 0 or 2
+                dummy.append(2*(dummy[0]+2<4))
+                print("Careful, you have neighbours on 3 or more sides of the box, we will not check if on two parallel sides the boxes are compatible !!!")
+        if len(dummy) == 2 or len(dummy) == 1 :
+                # Sense contains : Vertical then Horizontal
+                Sense = [dummy[1]%2,dummy[0]]
+                DirList = [[1,0][dummy[0]],[3,2][dummy[1]%2]]
+                for index,Direction in enumerate(DirList) :
+                        ObjList = List[Direction]
+                        RankMin = []
+                        ToLook0 = [2,2,0,0][Direction]
+                        ToLook1 = [3,2,1,0][Direction]
+                        for index1,ObjID in enumerate(ObjList) : 
+                                RankMin.append([-1.,1.][Sense[index]] * FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),[X0-DX/2.,X0+DX/2.,Y0-DY/2.,Y0+DY/2.][ToLook0:ToLook0+2])[Sense[index]])
+                        Output[Direction] = SortList(ObjList,RankMin)
+                        
+        elif len(dummy) == 3 :
+                # We find the direction where we do have neighbours and then we sort the object list along it
+                Sense = dummy[0]%2
+                Direction = [ i not in dummy for i in range(4) ].index(True)
+                ObjList = List[Direction]
+                RankMin = []
+                ToLook0 = [2,2,0,0][Direction]
+                ToLook1 = [3,2,1,0][Direction]
+                for index1,ObjID in enumerate(ObjList) : 
+                        RankMin.append([-1.,1.][Sense] * FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),[X0-DX/2.,X0+DX/2.,Y0-DY/2.,Y0+DY/2.][ToLook0:ToLook0+2])[Sense])
+                Output[Direction] = SortList(ObjList,RankMin)
+        else :
+                print ("Error : the composite box being created has no neighbours, how on earth do you want us to inherit its mesh parameters!!!")
+                
+        
+        return Output
+        
+def IndexMultiOcc (Array,Element) :
+        """
+        This functions returns the occurrences indices of Element in Array.
+        As opposed to Array.index(Element) method, this allows determining      
+        multiple entries rather than just the first one!
+        """
+        Output = []
+        try : Array.index(Element)
+        except ValueError : print "No more occurrences"
+        else : Output.append(Array.index(Element))
+                
+        if not(Output == []) and len(Array) > 1 :
+                for index, ArrElem in enumerate(Array[Output[0]+1:]) :
+                        if ArrElem == Element : Output.append(index+Output[0]+1)
+                 
+        return Output
+        
+def SortList (ValList, CritList):
+        Output = []
+        SortedCritList = copy.copy(CritList)
+        SortedCritList.sort()
+        for i in range(0,len(ValList)):
+                index = CritList.index(SortedCritList[i])
+                Output.append(ValList[index])
+        return Output
+
+
+            
diff --git a/src/Tools/MacMesh/MacMesh/CompositeBoxF.py b/src/Tools/MacMesh/MacMesh/CompositeBoxF.py
new file mode 100644 (file)
index 0000000..88cdc83
--- /dev/null
@@ -0,0 +1,254 @@
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+
+# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+
+
+
+# INTRODUCTION HERE
+
+import sys, math, copy, commands
+CWD = commands.getoutput('pwd')
+sys.path.append(CWD)
+
+from MacObject import *
+import Config, GenFunctions
+
+def CompositeBoxF (Pt1 , Pt2 , Pt3 , Pt4 , **args ) : 
+        [Pt1 , Pt2 , Pt3 , Pt4] = GenFunctions.SortPoints([Pt1 , Pt2 , Pt3 , Pt4])
+        if args.__contains__('groups') :
+                GroupNames = args['groups']
+       else : GroupNames = [None, None, None, None]
+        # Create a full NonOrtho box just to inherit, globally, the mesh parameters of bounding objects
+       dummy = MacObject('NonOrtho',[Pt1,Pt2,Pt3,Pt4],['auto'],publish=0)
+        # Save the existing number of segments on each direction
+        ExistingSeg0 = Config.ListObj[-1].DirectionalMeshParams
+        Convention = [2,3,0,1]
+        ExistingSegments = [ExistingSeg0[Convention[i]] for i in range(4)]
+        # Save Boundary lengths on each direction
+        BoundaryLengths = [IntLen(dummy.DirBoundaries(i)) for i in range(4) ]
+        # Calculate global mesh element size on each direction
+        GlobalDelta = [1.*BoundaryLengths[i]/ExistingSegments[i] for i in range(4) ]
+        print "GlobalDelta :",GlobalDelta
+        # Sort the connection list for the full Box
+        [(X0,Y0),(DX,DY)] = dummy.GeoPar
+        ObjIDLists = SortObjLists(Config.Connections[-1],X0 , Y0 , DX , DY )
+        [Xmin,Xmax,Ymin,Ymax] = dummy.Boundaries() # Used for groups determination
+        RemoveLastObj()
+               
+        RealSegments = []
+        Direction = []
+        flag = 0
+        if not(args.__contains__('recursive')) : 
+                Config.Count = 0
+
+        Config.Criterion = GetCriterion(ObjIDLists)
+        for index, ObjList in enumerate(ObjIDLists) :
+                if not (ObjList[0] == -1 or Config.Count >= Config.Criterion):
+                        if not(args.__contains__('recursive')) : 
+                                Config.DirIndex = index
+                                if index > 1 : Config.RefPts = [Pt2, Pt3]
+                                elif index == 0 : Config.RefPts = [Pt1, Pt2]
+                                else : Config.RefPts = [Pt4, Pt3]
+                                
+                        if len(ObjList)>1 : flag = 1
+                        else : flag = 0
+                        for ObjID in ObjList:
+                           ToLook0 = [2,3,0,1][index]
+                           ToLook1 = [3,2,1,0][index]
+                           CommonSide =  FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),dummy.DirBoundaries(ToLook0))
+                           ToLook2 = [1,0,3,2][index]
+                           RealSegments = Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]*IntLen(CommonSide)/IntLen(Config.ListObj[ObjID].DirBoundaries(ToLook1))
+                           LocalDelta = 1.*IntLen(CommonSide)/RealSegments
+                           print "Direction:", ["West","East","South","North"][ToLook2]
+                           print "IntLen(CommonSide):",IntLen(CommonSide) 
+                           print "RealSegments:",RealSegments    
+                           print "LocalDelta:",LocalDelta                                                    
+                           if flag and Config.Count < Config.Criterion:
+                                if index ==0 :
+                                        if abs(CommonSide[0] - Ymin)<1e-7 : SouthGR = GroupNames[0]
+                                        else : SouthGR = None
+                                        if abs(CommonSide[1] - Ymax)<1e-7 : NorthGR = GroupNames[1]
+                                        else : NorthGR = None
+                                        
+                                        NDelta = Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]* (LocalDelta-GlobalDelta[Convention[index]])
+                                        [Pt1,Pt2] = Config.RefPts
+                                        Coef = [1.,-1.][index] 
+                                        Vref1 = [Coef*(Pt2[0]-Pt1[0]),Coef*(Pt2[1]-Pt1[1])]
+                                        Vref2 = NormalizeVector([Pt2[0]-Pt3[0],Pt2[1]-Pt3[1]])
+                                        Ptref = Config.ListObj[ObjID].PtCoor[[2,3][index]]
+                                        NewPt = ExtrapPoint (Ptref,Vref1,Vref2,NDelta)
+                                        CompositeBoxF (Pt1, Pt2, NewPt, Ptref, recursive=1, groups = [SouthGR,NorthGR]+GroupNames[2:4])
+                                elif index == 1:
+                                        if abs(CommonSide[0] - Ymin)<1e-7 : SouthGR = GroupNames[0]
+                                        else : SouthGR = None
+                                        if abs(CommonSide[1] - Ymax)<1e-7 : NorthGR = GroupNames[1]
+                                        else : NorthGR = None
+                                        
+                                        NDelta = Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]* (LocalDelta-GlobalDelta[Convention[index]])
+                                        [Pt4,Pt3] = Config.RefPts
+                                        Coef = 1.
+                                        Vref1 = [Coef*(Pt4[0]-Pt3[0]),Coef*(Pt4[1]-Pt3[1])]
+                                        Vref2 = NormalizeVector([Pt1[0]-Pt4[0],Pt1[1]-Pt4[1]])
+                                        Ptref = Config.ListObj[ObjID].PtCoor[0]
+                                        NewPt = ExtrapPoint (Ptref,Vref1,Vref2,NDelta)
+                                        CompositeBoxF (NewPt, Ptref, Pt3, Pt4, recursive=1, groups = [SouthGR,NorthGR]+GroupNames[2:4])                                        
+                                else : 
+                                        if abs(CommonSide[0] - Xmin)<1e-7 : WestGR = GroupNames[2]
+                                        else : WestGR = None
+                                        if abs(CommonSide[1] - Xmax)<1e-7 : EastGR = GroupNames[3]
+                                        else : EastGR = None
+                                        
+                                        NDelta = Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]* (LocalDelta-GlobalDelta[Convention[index]])
+                                        [Pt2,Pt3] = Config.RefPts
+                                        Coef = [1.,-1.][index-2] 
+                                        Vref1 = [Coef*(Pt3[0]-Pt2[0]),Coef*(Pt3[1]-Pt2[1])]
+                                        Vref2 = NormalizeVector([Pt3[0]-Pt4[0],Pt3[1]-Pt4[1]])
+                                        Ptref = Config.ListObj[ObjID].PtCoor[[3,0][index-2]]
+                                        NewPt = ExtrapPoint (Ptref,Vref1,Vref2,NDelta)
+                                        CompositeBoxF (Ptref, Pt2, Pt3, NewPt, recursive=1, groups = GroupNames[0:2] + [WestGR,EastGR])
+
+                           if Config.Count >= Config.Criterion :
+                                break
+        if flag == 0 and Config.Count < Config.Criterion:
+                print "Creating NonOrtho object with the points:", Pt1,Pt2,Pt3,Pt4
+                MacObject('NonOrtho',[Pt1,Pt2,Pt3,Pt4] ,['auto'], groups = GroupNames)
+                
+                Config.Count += 1
+                if Config.DirIndex > 1 : Config.RefPts = [Pt1, Pt4]
+                elif Config.DirIndex==0 : Config.RefPts = [Pt4, Pt3]
+                else : Config.RefPts = [Pt1, Pt2]
+                           
+def FindCommonSide (Int1, Int2) :
+        if max(Int1[0],Int2[0])<min(Int1[1],Int2[1]): return [max(Int1[0],Int2[0]), min(Int1[1],Int2[1])]
+        else : 
+                print "Can not find interval intersection, returning [0,0]..."
+                return [0,0]
+        
+def IntLen (Interval) :
+        return float(abs(Interval[1]-Interval[0]))     
+           
+def RemoveLastObj() : 
+        Config.ListObj = Config.ListObj[:-1]
+        Config.Connections = Config.Connections[:-1]
+        
+def NormalizeVector(V):
+        Magnitude = math.sqrt(GenFunctions.DotProd(V,V))
+        return [ V[i]/Magnitude for i in range(len(V))]
+        
+def GetCriterion (ObjListIDs):
+        return max(Config.Criterion, max(len(ObjListIDs[0]),len(ObjListIDs[1]))*max(len(ObjListIDs[2]),len(ObjListIDs[3])))
+
+def SortObjLists (List,X0,Y0,DX,DY) :
+        """ 
+        This function sorts the list of neighbouring objects on each side, according to their intersection
+        with the object being created. From South to North and from East to West
+        """
+        Output = List
+        # First find the directions where no neighbour exists
+        # Important : Here we assume that exactly two directions have no neighbours !!!
+        #             Should we change this to allow a more general case ????
+        dummy = IndexMultiOcc(List,(-1,))
+        
+        # dummy[0] is either 0, meaning there is no neighbour on X- (West)
+        #                 or 1, meaning there is no neighbour on X+ (East)
+        # Similarly dummy[1] can be either 2 or 3 (South and North respectively)
+        # In order to get back to the formalism of groups (SNWE) 
+        #  => we do the following to define Sense of no neighbours and then the Direction list
+        #       is calculated as to include uniquely the directions where we DO have neighbours
+        if len(dummy) == 1 :
+                # This adds a second direction where neighbours are not regarded, it is either 0 or 2
+                dummy.append(2*(dummy[0]+2<4))
+                print("Careful, you have neighbours on 3 or more sides of the box, we will not check if on two parallel sides the boxes are compatible !!!")
+        if len(dummy) == 2 or len(dummy) == 1 :
+                # Sense contains : Vertical then Horizontal
+                Sense = [dummy[1]%2,dummy[0]]
+                DirList = [[1,0][dummy[0]],[3,2][dummy[1]%2]]
+                for index,Direction in enumerate(DirList) :
+                        ObjList = List[Direction]
+                        RankMin = []
+                        ToLook0 = [2,2,0,0][Direction]
+                        ToLook1 = [3,2,1,0][Direction]
+                        for index1,ObjID in enumerate(ObjList) : 
+                                RankMin.append([-1.,1.][Sense[index]] * FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),[X0-DX/2.,X0+DX/2.,Y0-DY/2.,Y0+DY/2.][ToLook0:ToLook0+2])[Sense[index]])
+                        Output[Direction] = SortList(ObjList,RankMin)
+                        
+        elif len(dummy) == 3 :
+                # We find the direction where we do have neighbours and then we sort the object list along it
+                Sense = dummy[0]%2
+                Direction = [ i not in dummy for i in range(4) ].index(True)
+                ObjList = List[Direction]
+                RankMin = []
+                ToLook0 = [2,2,0,0][Direction]
+                ToLook1 = [3,2,1,0][Direction]
+                for index1,ObjID in enumerate(ObjList) : 
+                        RankMin.append([-1.,1.][Sense] * FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),[X0-DX/2.,X0+DX/2.,Y0-DY/2.,Y0+DY/2.][ToLook0:ToLook0+2])[Sense])
+                Output[Direction] = SortList(ObjList,RankMin)
+        else :
+                print ("Error : the composite box being created has no neighbours, how on earth do you want us to inherit its mesh parameters!!!")
+                
+        
+        return Output
+        
+def IndexMultiOcc (Array,Element) :
+        """
+        This functions returns the occurrences indices of Element in Array.
+        As opposed to Array.index(Element) method, this allows determining      
+        multiple entries rather than just the first one!
+        """
+        Output = []
+        try : Array.index(Element)
+        except ValueError : print "No more occurrences"
+        else : Output.append(Array.index(Element))
+                
+        if not(Output == []) and len(Array) > 1 :
+                for index, ArrElem in enumerate(Array[Output[0]+1:]) :
+                        if ArrElem == Element : Output.append(index+Output[0]+1)
+                 
+        return Output
+        
+def SortList (ValList, CritList):
+        Output = []
+        SortedCritList = copy.copy(CritList)
+        SortedCritList.sort()
+        for i in range(0,len(ValList)):
+                index = CritList.index(SortedCritList[i])
+                Output.append(ValList[index])
+        return Output
+
+def ExtrapPoint (Ptref,Vref1,Vref2,Delta):
+        """
+        This function allows determining the absolute coordinates of an extrapolation point
+        as shown in the following :
+        
+        
+        ExtrapPoint x---Vref2->--------o
+                   /       delta_glob  |Vref1 
+                  /                    |
+           Ptref x---------------------+
+                        delta_loc * Nseg
+                        
+             Delta = (delta_loc - delta_glob) * Nseg    
+        """
+        
+        X = Ptref[0] + Vref1[0] + Delta*Vref2[0]
+        Y = Ptref[1] + Vref1[1] + Delta*Vref2[1]
+        return (X,Y,)
+        
diff --git a/src/Tools/MacMesh/MacMesh/Config.py b/src/Tools/MacMesh/MacMesh/Config.py
new file mode 100644 (file)
index 0000000..a0816f4
--- /dev/null
@@ -0,0 +1,60 @@
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+
+# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+
+
+dz = 1
+debug = 1
+
+try : ListObj
+except NameError : ListObj = []
+
+try: Connections
+except NameError: Connections = []
+
+try : publish
+except NameError : publish = 1
+
+try : Groups
+except NameError : Groups = []
+
+try : StudyName
+except NameError : StudyName = "Compound"
+
+try : Criterion
+except NameError : Criterion = 1
+
+try : Count
+except NameError : Count = 0
+
+try : RefPts
+except NameError : RefPts = []
+
+try : DirIndex
+except NameError : DirIndex = 0
+
+try : theStudy
+except NameError :
+    import salome
+    salome.salome_init()
+    theStudy = salome.myStudy
+
+
diff --git a/src/Tools/MacMesh/MacMesh/CutnGroup.py b/src/Tools/MacMesh/MacMesh/CutnGroup.py
new file mode 100644 (file)
index 0000000..3a4cd4f
--- /dev/null
@@ -0,0 +1,229 @@
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+
+# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+
+
+
+# This module allows cutting and grouping geometries by defining plane sections, with level of cutting as well as customizable Prefixes.
+
+import math, Config
+
+from salome.geom import geomBuilder
+geompy = geomBuilder.New( Config.theStudy )
+
+def Go(GeoObj, CutPlnLst, OutLvlLst, PrefixLst, Publish):
+
+       """
+       This function cuts any geometry (with infinite trim !) into several subgeometries that are cleanly saved inside the navigation tree. (Check GoTrim for the same functionality with custom trim size)
+         - GeoObj is the geometrical object to be cut and grouped
+         - CutPlnLst is a list of plane definitions. Each plane is a 6-tuple (contains 6 values). The first three represent the coordinates of the origin point and the second three represent the coordinates of the normal vector to the plane
+               Example 1: [(0,0,0,1,0,0)]: cut along a plane passing through the origin and normal to the x-axis
+               Example 2: [(0,0,0,1,0,0),(50,0,0,0,1,0)]: in addition to the first plane cut, cut through a plane passing by (50,0,0) and normal to the y axis.
+               Note that the plane size us determined automatically from the size of the geometry in question (using a very big trim size = 100 x length of geometry!)
+         - OutLvlLst is a list containing integers that represent the inner sectioning level with respect to the original geometry type
+               A value of 1 means that the section will provide elements of one level lower than the original type. For exemple a solid sectioned at level 1 will produce faces. A Face sectioned at level 1 will produce edges.
+               A value of 2 means that a deeper sectioning will be applied. A solid sectioned with level 2 will give faces and edges. A face will give edges and vertices. An edge will give only vertices
+               The number of elements in this list should be (this is verified in the code) equal to the number of elements in the plane cut list. This is logical.
+               Example 1: [1]
+               Example 2: [1, 2], This means that the cut over the second plane will produce two types of elements unlike the first cut which will only output the first level objects.
+         - PrefixLst is a list of strings that contains the naming Prefixes that are used by the script to generate the subshape names. This is very useful for relating the results to the sectioning requested.
+               Example 1: ['Entry']
+               Example 2: ['Entry','Exit']     The resulting groups from the sectioning with plane no.1 will then be saved as "Entry_FACE" and/or "Entry_EDGE" according to the original geometry object type and the cutting level
+       
+       Imagine that we have a solid called ExampleSolid, an example command will be:
+       CutnGroup.Go(ExampleSolid,[(0,0,0,1,0,0),(50,0,0,0,1,0)],[1, 2],['Entry','Exit'])
+       """
+
+       NumCuts = CheckInput(CutPlnLst, OutLvlLst, PrefixLst, 1)
+       OrigType = FindStandType(GeoObj,0)
+       InvDictionary = dict((v,k) for k, v in geompy.ShapeType.iteritems())    # Give geometry type name as a function of standard type numbering, ex: 4=FACE, 6=EDGE, 7=VERTEX
+       TrimSize = geompy.BasicProperties(GeoObj)[0]*100
+       CutPlane = [] ; Sections = [] ; Parts = []
+       
+       if NumCuts:
+               for i in range(0, NumCuts):             # Loop over the cutting planes to create them one by one
+                       CutPlane.append(CreatePlane(CutPlnLst[i],TrimSize))
+               OutFather = geompy.MakePartition([GeoObj],CutPlane, [], [],FindStandType(GeoObj,1), 0, [], 0)   #Creating the partition object
+               if Publish: geompy.addToStudy(OutFather,'SectionedObject')
+               for i in range(0, NumCuts):
+                       for j in range(OrigType+1+2, OrigType+1+2*(OutLvlLst[i]+1),2):
+                               if j == 8 : j = 7;      # Exception for the vertex case (=7)
+                               PossSubShapesID = geompy.SubShapeAllIDs(OutFather,j)    # List of subshape IDs than correspond to the required cutting level (section type : face/wire/vertex)
+                               PossSubShapes = geompy.ExtractShapes(OutFather,j)               # and the corresponding objects
+                               Accepted = []
+                               for k in range(0,len(PossSubShapesID)):         # Loop over all the subshapes checking if they belong to the cutting plane! if yes add them to current list
+                                       if  IsOnPlane(PossSubShapes[k], CutPlnLst[i], 1e-7):                    
+                                               Accepted.append(PossSubShapesID[k])
+                               if Accepted :                                   # If some element is found, save it as a group with the prescribed Prefix
+                                       dummyObj = geompy.CreateGroup(OutFather, j)
+                                       geompy.UnionIDs(dummyObj, Accepted)
+                                       Sections.append(dummyObj)
+                                       if Publish:geompy.addToStudyInFather(OutFather, dummyObj, PrefixLst[i]+"_"+InvDictionary[j][0:2])
+                               else :
+                                       print "Warning: For the section no.", i, ", No intersection of type " + InvDictionary[j] + " was found. Hence, no corresponding groups were created"
+               
+               SubShapesID = geompy.SubShapeAllIDs(OutFather,OrigType+1)               # Saving also the groups corresponding to the sectioned item of the same type: ex. A solid into n sub-solids due to the sections
+               for i in range(0,len(SubShapesID)):
+                       dummyObj = geompy.CreateGroup(OutFather, OrigType+1)
+                       geompy.UnionIDs(dummyObj, [SubShapesID[i]])
+                       Parts.append(dummyObj)
+                       if Publish: geompy.addToStudyInFather(OutFather, dummyObj, "SB"+"_"+InvDictionary[OrigType+1][0:3]+"_"+str(i+1))
+
+               return OutFather, Sections, Parts
+       else:
+               print("Fatal error, the routine cannot continue any further, check your input variables")
+               return -1
+
+def GoTrim(GeoObj, CutPlnLst, OutLvlLst, PrefixLst, Publish):
+
+       """
+       This function cuts any geometry into several subgeometries that are cleanly saved inside the navigation tree with a fully customizable trim size.
+         - GeoObj is the geometrical object to be cut and grouped
+         - CutPlnLst is a list of plane definitions. Each plane is a 7-tuple (contains 7 values). The first three represent the coordinates of the origin point and the second three represent the coordinates of the normal vector to the plane, the last value corresponds to the trim size of the planes
+               Example 1: [(0,0,0,1,0,0,5)]: cut along a plane passing through the origin and normal to the x-axis with a trim size of 5
+               Example 2: [(0,0,0,1,0,0,5),(50,0,0,0,1,0,10)]: in addition to the first plane cut, cut through a plane passing by (50,0,0) and normal to the y axis with a trim size of 10
+         - OutLvlLst is a list containing integers that represent the inner sectioning level with respect to the original geometry type
+               A value of 1 means that the section will provide elements of one level lower than the original type. For exemple a solid sectioned at level 1 will produce faces. A Face sectioned at level 1 will produce edges.
+               A value of 2 means that a deeper sectioning will be applied. A solid sectioned with level 2 will give faces and edges. A face will give edges and vertices. An edge will give only vertices
+               The number of elements in this list should be (this is verified in the code) equal to the number of elements in the plane cut list. This is logical.
+               Example 1: [1]
+               Example 2: [1, 2], This means that the cut over the second plane will produce two types of elements unlike the first cut which will only output the first level objects.
+         - PrefixLst is a list of strings that contains the naming Prefixes that are used by the script to generate the subshape names. This is very useful for relating the results to the sectioning requested.
+               Example 1: ['Entry']
+               Example 2: ['Entry','Exit']     The resulting groups from the sectioning with plane no.1 will then be saved as "Entry_FACE" and/or "Entry_EDGE" according to the original geometry object type and the cutting level
+       
+       Imagine that we have a solid called ExampleSolid, an example command will be:
+       CutnGroup.Go(ExampleSolid,[(0,0,0,1,0,0,5),(50,0,0,0,1,0,10)],[1, 2],['Entry','Exit'])
+       """
+
+       NumCuts = CheckInput(CutPlnLst, OutLvlLst, PrefixLst, 0)
+       OrigType = FindStandType(GeoObj,0)
+       InvDictionary = dict((v,k) for k, v in geompy.ShapeType.iteritems())    # Give geometry type name as a function of standard type numbering, ex: 4=FACE, 6=EDGE, 7=VERTEX
+       CutPlane = [] ; Sections = [] ; Parts = []
+       if NumCuts:
+               for i in range(0, NumCuts):             # Loop over the cutting planes to create them one by one
+                       CutPlane.append(CreatePlane(CutPlnLst[i][0:6],CutPlnLst[i][6]))
+               OutFather = geompy.MakePartition([GeoObj],CutPlane, [], [],FindStandType(GeoObj,1), 0, [], 0)   #Creating the partition object
+               if Publish: geompy.addToStudy(OutFather,'SectionedObject')
+               for i in range(0, NumCuts):
+                       for j in range(OrigType+1+2, OrigType+1+2*(OutLvlLst[i]+1),2):
+                               if j == 8 : j = 7;      # Exception for the vertex case (=7)
+                               PossSubShapesID = geompy.SubShapeAllIDs(OutFather,j)    # List of subshape IDs than correspond to the required cutting level (section type : face/wire/vertex)
+                               PossSubShapes = geompy.ExtractShapes(OutFather,j)               # and the corresponding objects
+                               Accepted = []
+                               for k in range(0,len(PossSubShapesID)):         # Loop over all the subshapes checking if they belong to the cutting plane WITH THE TRIM SIZE CONDITION! if yes add them to current list
+                                       if  IsOnPlane(PossSubShapes[k], CutPlnLst[i], 1e-7) and Distance2Pt(geompy.PointCoordinates(geompy.MakeCDG(PossSubShapes[k])),CutPlnLst[i][0:3])<=CutPlnLst[i][-1]:                     
+                                               Accepted.append(PossSubShapesID[k])
+                               if Accepted :                                   # If some element is found, save it as a group with the prescribed Prefix
+                                       dummyObj = geompy.CreateGroup(OutFather, j)
+                                       geompy.UnionIDs(dummyObj, Accepted)
+                                       Sections.append(dummyObj)
+                                       if Publish: geompy.addToStudyInFather(OutFather, dummyObj, PrefixLst[i]+"_"+InvDictionary[j][0:2])
+                               else :
+                                       print "Warning: For the section no.", i, ", No intersection of type " + InvDictionary[j] + " was found. Hence, no corresponding groups were created"
+               
+               SubShapesID = geompy.SubShapeAllIDs(OutFather,OrigType+1)               # Saving also the groups corresponding to the sectioned item of the same type: ex. A solid into n sub-solids due to the sections
+               for i in range(0,len(SubShapesID)):
+                       dummyObj = geompy.CreateGroup(OutFather, OrigType+1)
+                       geompy.UnionIDs(dummyObj, [SubShapesID[i]])
+                       Parts.append(dummyObj)
+                       if Publish: geompy.addToStudyInFather(OutFather, dummyObj, "SB"+"_"+InvDictionary[OrigType+1][0:3]+"_"+str(i+1))
+
+               return OutFather, Sections, Parts
+       else:
+               print("Fatal error, the routine cannot continue any further, check your input variables")
+               return -1
+def FindStandType(GeoObj, method):
+       """
+       Find the standard index for the Geometrical object/compound type input, see dictionary in geompy.ShapeType
+       """
+       TopType = GeoObj.GetMaxShapeType().__str__()
+       UnModType = geompy.ShapeType[TopType]
+       if method == 0 :
+               StandType = UnModType-int(not(UnModType%2))             # So that wires and edges and considered the same, faces and shells, and so on
+       else :
+               StandType = UnModType
+
+       return(StandType)
+
+def CreatePlane(CutPlnVar,Trim):
+       """
+       Creates a temporary point and vector in salome in order to build the sectioning planes needed
+       """
+       Temp_Vtx = geompy.MakeVertex(CutPlnVar[0], CutPlnVar[1], CutPlnVar[2])
+       Temp_Vec = geompy.MakeVectorDXDYDZ(CutPlnVar[3], CutPlnVar[4], CutPlnVar[5])
+       CutPlane = geompy.MakePlane(Temp_Vtx, Temp_Vec, Trim)
+       return(CutPlane)
+
+def CheckInput(CutPlnLst, OutLvlLst, PrefixLst, AutoTrim):
+       """
+       Checks the user input specifically if all needed parameters are provided
+       """
+       if not ((len(CutPlnLst) == len(OutLvlLst)) and (len(CutPlnLst) == len(PrefixLst))):
+               print("Missing information about one or more of the cut planes") 
+               return 0
+       elif not ((len(CutPlnLst[0]) == 6+int(not AutoTrim))):
+               print("For each cutting plane you need to specify 6 parameters = 2 x 3 coordinates") 
+               return 0
+       else:
+               return len(CutPlnLst)
+
+def IsOnPlane(GeoSubObj, CutPlnVar, tolerance):
+       """
+       Checks whether a geometry (vertex, segment, or face) belongs *completely* to the plane defined as a point and a normal vector
+       """
+       # lambda function that represents the plane equation, function = 0 <=> Pt defined with Coor belongs to plane
+       PlaneEq = lambda Coor: CutPlnVar[3]*(Coor[0]-CutPlnVar[0])+CutPlnVar[4]*(Coor[1]-CutPlnVar[1])+CutPlnVar[5]*(Coor[2]-CutPlnVar[2])
+       OrigType = FindStandType(GeoSubObj,0)
+       if (OrigType >= 7):             # Vertex
+               NonTrimDecision = abs(PlaneEq(geompy.PointCoordinates(GeoSubObj))) < tolerance
+                if len(CutPlnVar) == 6 : return NonTrimDecision # No trim condition used
+                else : return (NonTrimDecision and Distance2Pt(CutPlnVar[0:3],geompy.PointCoordinates(GeoSubObj))<=CutPlnVar[6]/2)
+       elif (OrigType >= 5):           # Line, decompose into two points then call recursively IsOnPlane function!
+               Verdict = True
+               for i in range(0,2):
+                       Verdict = Verdict and IsOnPlane(geompy.GetVertexByIndex(GeoSubObj,i), CutPlnVar, tolerance)
+               return Verdict
+       elif (OrigType >= 3):           # Face, decompose into three points then call recursively IsOnPlane function!
+               if IsOnPlane(geompy.MakeCDG(GeoSubObj),CutPlnVar, tolerance) : # Center of gravity belongs to plane, check if normal is parallel to plane
+                       NormalP1Coor = geompy.PointCoordinates(geompy.GetVertexByIndex(geompy.GetNormal(GeoSubObj),0))
+                       NormalP2Coor = geompy.PointCoordinates(geompy.GetVertexByIndex(geompy.GetNormal(GeoSubObj),1))
+                       Normal = [NormalP1Coor[0]-NormalP2Coor[0], NormalP1Coor[1]-NormalP2Coor[1], NormalP1Coor[2]-NormalP2Coor[2]]
+                       CrossP = CrossProd(CutPlnVar[3:6],Normal)               # Checks whether normals (of section plane and of face) are parallel or not
+                       if (abs(CrossP[0])<tolerance and abs(CrossP[1])<tolerance and abs(CrossP[2])<tolerance):        # meaning zero cross product => parallel
+                               return True
+                       else :
+                               return False
+               else :
+                       return False
+
+
+def CrossProd(V1,V2):
+       """
+       Determines the cross product of two 3D vectors
+       """
+       return ([V1[1]*V2[2]-V1[2]*V2[1], V1[2]*V2[0]-V1[0]*V2[2], V1[0]*V2[1]-V1[1]*V2[0]])
+
+def Distance2Pt(P1,P2):
+       """
+       Returns the distance between two points
+       """
+       return (math.sqrt((P1[0]-P2[0])**2+(P1[1]-P2[1])**2+(P1[2]-P2[2])**2))
diff --git a/src/Tools/MacMesh/MacMesh/Cylinder.py b/src/Tools/MacMesh/MacMesh/Cylinder.py
new file mode 100644 (file)
index 0000000..e2e2c42
--- /dev/null
@@ -0,0 +1,119 @@
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+
+# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+
+
+
+
+# This is an automation of the cylinder-box object, defined with the coordinates of its center, its radius, and the box's 
+# boundary size.
+# The pitch ratio is calculated automatically from the minimum of the box dimensions on x and y.
+# This functions can take a groups input containing the group names of 4 sides in addition to the internal circular boundary
+# in the following order : [South,North,West,East,Internal].
+
+import sys, math, commands
+CWD = commands.getoutput('pwd')
+sys.path.append(CWD)
+
+
+from MacObject import *
+import Config, GenFunctions
+
+def Cylinder (X0 , Y0 , D , DX , DY , LocalMeshing , **args) : 
+       if args.__contains__('DLocal') : DLocal = float(args['DLocal']) 
+       else : DLocal = float(min(DX,DY))
+
+        # K is the pitch ratio
+        K = float(D)/(DLocal-D)
+        print "A local pitch ratio of K =", K ," will be used.  "
+        NumCuts =  2*GenFunctions.QuarCylParam(K)
+        InternalMeshing = int(math.ceil(math.pi*D/(4*NumCuts*LocalMeshing)))
+       if InternalMeshing == 0 : InternalMeshing = 1           # This sets a minimum meshing condition in order to avoid an error. The user is notified of the value considered for the local meshing
+        print "Possible Local meshing is :", math.pi*D/(4*NumCuts*InternalMeshing), "\nThis value is returned by this function for your convenience.\n"
+        if args.__contains__('groups') :
+                GroupNames = args['groups']
+       else : GroupNames = [None, None, None, None, None]
+        
+        if DY == DLocal :
+                if DX == DLocal:
+                        GN1 = [None,GroupNames[1],None,GroupNames[3],GroupNames[4]]
+                        GN2 = [None,GroupNames[1],GroupNames[2],None,GroupNames[4]]
+                        GN3 = [GroupNames[0],None,GroupNames[2],None,GroupNames[4]]
+                        GN4 = [GroupNames[0],None,None,GroupNames[3],GroupNames[4]]
+                else :
+                        GN1 = [None,GroupNames[1],None,None,GroupNames[4]]
+                        GN2 = [None,GroupNames[1],None,None,GroupNames[4]]
+                        GN3 = [GroupNames[0],None,None,None,GroupNames[4]]
+                        GN4 = [GroupNames[0],None,None,None,GroupNames[4]]
+                        
+                        GN5 = [GroupNames[0],GroupNames[1],None,GroupNames[3]]
+                        GN6 = [GroupNames[0],GroupNames[1],GroupNames[2],None]
+        else :
+                if DX == DLocal:
+                        GN1 = [None,None,None,GroupNames[3],GroupNames[4]]
+                        GN2 = [None,None,GroupNames[2],None,GroupNames[4]]
+                        GN3 = [None,None,GroupNames[2],None,GroupNames[4]]
+                        GN4 = [None,None,None,GroupNames[3],GroupNames[4]]
+                        GN7 = [GroupNames[0],None,GroupNames[2],GroupNames[3]]
+                        GN8 = [None,GroupNames[1],GroupNames[2],GroupNames[3]]
+                else :
+                        GN1 = [None,None,None,None,GroupNames[4]]
+                        GN2 = [None,None,None,None,GroupNames[4]]
+                        GN3 = [None,None,None,None,GroupNames[4]]
+                        GN4 = [None,None,None,None,GroupNames[4]]
+                        
+                        GN5 = [None,None,None,GroupNames[3]]
+                        GN6 = [None,None,GroupNames[2],None]
+                        
+                        GN9  = [GroupNames[0],None,None,GroupNames[3]]
+                        GN10 = [GroupNames[0],None,None,None]
+                        GN11 = [GroupNames[0],None,GroupNames[2],None]
+                        
+                        GN12 = [None,GroupNames[1],None,GroupNames[3]]
+                        GN13 = [None,GroupNames[1],None,None]
+                        GN14 = [None,GroupNames[1],GroupNames[2],None]
+                        
+       Obj = []
+
+       Obj.append(MacObject('QuartCyl',[(X0+DLocal/4.,Y0+DLocal/4.),(DLocal/2.,DLocal/2.)],[InternalMeshing,'NE',K], groups = GN1))
+       Obj.append(MacObject('QuartCyl',[(X0-DLocal/4.,Y0+DLocal/4.),(DLocal/2.,DLocal/2.)],['auto','NW',K], groups = GN2))
+       Obj.append(MacObject('QuartCyl',[(X0-DLocal/4.,Y0-DLocal/4.),(DLocal/2.,DLocal/2.)],['auto','SW',K], groups = GN3))
+       Obj.append(MacObject('QuartCyl',[(X0+DLocal/4.,Y0-DLocal/4.),(DLocal/2.,DLocal/2.)],['auto','SE',K], groups = GN4))
+
+       if DX > DLocal :
+               dX = (DX - DLocal)/2.
+               Obj.append(MacObject('CompBoxF',[(X0+DLocal/2.+dX/2.,Y0),(dX,DLocal)],['auto'], groups = GN5))
+               Obj.append(MacObject('CompBoxF',[(X0-DLocal/2.-dX/2.,Y0),(dX,DLocal)],['auto'], groups = GN6))
+
+       if DY > DLocal :
+               dY = (DY - DLocal)/2.
+               if DX > DLocal : 
+                       Obj.append(MacObject('CompBoxF',[(X0+DLocal/2.+dX/2.,Y0-DLocal/2.-dY/2.),(dX,dY)],['auto'], groups = GN9))
+                       Obj.append(MacObject('CompBoxF',[(X0,Y0-DLocal/2.-dY/2.),(DLocal,dY)],['auto'], groups = GN10))
+                       Obj.append(MacObject('CompBoxF',[(X0-DLocal/2.-dX/2.,Y0-DLocal/2.-dY/2.),(dX,dY)],['auto'], groups = GN11))
+                       Obj.append(MacObject('CompBoxF',[(X0+DLocal/2.+dX/2.,Y0+DLocal/2.+dY/2.),(dX,dY)],['auto'], groups = GN12))
+                       Obj.append(MacObject('CompBoxF',[(X0,Y0+DLocal/2.+dY/2.),(DLocal,dY)],['auto'], groups = GN13))
+                       Obj.append(MacObject('CompBoxF',[(X0-DLocal/2.-dX/2.,Y0+DLocal/2.+dY/2.),(dX,dY)],['auto'], groups = GN14))
+                else:
+                       Obj.append(MacObject('CompBoxF',[(X0,Y0-DLocal/2.-dY/2.),(DLocal,dY)],['auto'], groups = GN7))
+                       Obj.append(MacObject('CompBoxF',[(X0,Y0+DLocal/2.+dY/2.),(DLocal,dY)],['auto'], groups = GN8))
+                                       
+       return Obj
diff --git a/src/Tools/MacMesh/MacMesh/GenFunctions.py b/src/Tools/MacMesh/MacMesh/GenFunctions.py
new file mode 100644 (file)
index 0000000..2e3dce3
--- /dev/null
@@ -0,0 +1,873 @@
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+
+# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+
+
+# In this file are all the generation functions for manipulating the different created macro-objects
+
+import math, copy
+import Config
+import CutnGroup
+import CompositeBox
+
+from salome.geom import geomBuilder
+geompy = geomBuilder.New( Config.theStudy )
+
+from salome.smesh import smeshBuilder
+smesh = smeshBuilder.New( Config.theStudy )
+
+##########################################################################################################
+
+def Box11 (MacObject):
+       if Config.debug : print "Generating regular box"
+
+       dummy1 = geompy.MakeScaleAlongAxes( ElemBox11 (), None , MacObject.GeoPar[1][0], MacObject.GeoPar[1][1], 1)
+       RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0)
+
+       MacObject.GeoChildren.append(RectFace)
+       MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1))
+        
+       if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames)
+
+        if Config.publish :
+               MacObject.Mesh.append(smesh.Mesh(RectFace))                     # Creation of a new mesh
+               Quad2D = MacObject.Mesh[0].Quadrangle()                 # Applying a quadrangle hypothesis
+
+               EdgeIDs = geompy.SubShapeAllSorted(RectFace,6)  # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary
+               Reg1D = MacObject.Mesh[0].Segment()
+               Reg1D.NumberOfSegments(MacObject.MeshPar[0])
+
+               MacObject.Mesh[0].Compute()                     # Generates the mesh
+                
+       MacObject.DirectionalMeshParams = [MacObject.MeshPar[0],MacObject.MeshPar[0],MacObject.MeshPar[0],MacObject.MeshPar[0]]
+
+       MacObject.status = 1
+        Config.ListObj.append(MacObject)
+       return MacObject
+
+##########################################################################################################
+
+def Box42 (MacObject):
+       if Config.debug : print "Generating box 4-2 reducer"
+
+       Z_Axis = geompy.MakeVectorDXDYDZ(0., 0., 1.) 
+       RotAngle = {'SN' : lambda : 0,
+                   'NS' : lambda : math.pi,
+                   'EW' : lambda : math.pi/2,
+                   'WE' : lambda : -math.pi/2, }[MacObject.MeshPar[1]]()
+       dummy0 = geompy.MakeRotation( ElemBox42 () , Z_Axis, RotAngle )
+       dummy1 = geompy.MakeScaleAlongAxes( dummy0, None , MacObject.GeoPar[1][0], MacObject.GeoPar[1][1], 1)
+       RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0)
+
+       MacObject.GeoChildren.append(RectFace)
+       MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1))
+        
+       if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames)
+
+        if Config.publish :
+               MacObject.Mesh.append(smesh.Mesh(RectFace))                     # Creation of a new mesh
+               Quad2D = MacObject.Mesh[0].Quadrangle()                 # Applying a quadrangle hypothesis
+
+               EdgeIDs = geompy.SubShapeAllSorted(RectFace,6)  # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary
+               Reg1D = MacObject.Mesh[0].Segment()
+               Reg1D.NumberOfSegments(MacObject.MeshPar[0])
+
+               MacObject.Mesh[0].Compute()                     # Generates the mesh
+
+       MacObject.status = 1
+
+       x = MacObject.MeshPar[0]
+       MacObject.DirectionalMeshParams = {'SN' : lambda : [3*x, 3*x, 4*x, 2*x],
+                                          'NS' : lambda : [3*x, 3*x, 2*x, 4*x],
+                                          'EW' : lambda : [2*x, 4*x, 3*x, 3*x],
+                                          'WE' : lambda : [4*x, 2*x, 3*x, 3*x], }[MacObject.MeshPar[1]]()
+
+        Config.ListObj.append(MacObject)
+       return MacObject
+
+       
+##########################################################################################################
+
+def BoxAng32 (MacObject):
+       if Config.debug : print "Generating sharp angle"
+       Z_Axis = geompy.MakeVectorDXDYDZ(0., 0., 1.) 
+       RotAngle = {'NE' : lambda : 0,
+                   'NW' : lambda : math.pi/2,
+                   'SW' : lambda : math.pi,
+                   'SE' : lambda : -math.pi/2, }[MacObject.MeshPar[1]]()
+       dummy0 = geompy.MakeRotation( ElemEdge32 () , Z_Axis, RotAngle )
+       dummy1 = geompy.MakeScaleAlongAxes( dummy0, None , MacObject.GeoPar[1][0], MacObject.GeoPar[1][1], 1)
+       RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0)
+
+       MacObject.GeoChildren.append(RectFace)
+       MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1))
+        
+       if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames)
+        
+        if Config.publish : 
+               MacObject.Mesh.append(smesh.Mesh(RectFace))                     # Creation of a new mesh
+               Quad2D = MacObject.Mesh[0].Quadrangle()                 # Applying a quadrangle hypothesis
+
+               EdgeIDs = geompy.SubShapeAllSorted(RectFace,6)      # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary
+               Reg1D = MacObject.Mesh[0].Segment()
+               Reg1D.NumberOfSegments(MacObject.MeshPar[0])
+
+               MacObject.Mesh[0].Compute()                     # Generates the mesh
+
+       MacObject.status = 1
+
+       x = MacObject.MeshPar[0]
+       MacObject.DirectionalMeshParams = {'NE' : lambda : [3*x, 2*x, 3*x, 2*x],
+                                          'NW' : lambda : [2*x, 3*x, 3*x, 2*x],
+                                          'SW' : lambda : [2*x, 3*x, 2*x, 3*x],
+                                          'SE' : lambda : [3*x, 2*x, 2*x, 3*x], }[MacObject.MeshPar[1]]()
+
+        Config.ListObj.append(MacObject)
+       return MacObject
+##########################################################################################################
+def CompBox (MacObject):
+       if Config.debug : print "Generating composite box"
+
+       dummy1 = geompy.MakeScaleAlongAxes( ElemBox11 (), None , MacObject.GeoPar[1][0], MacObject.GeoPar[1][1], 1)
+       RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0)
+
+       MacObject.GeoChildren.append(RectFace)
+       MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1))
+        
+        if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames)
+
+        if Config.publish : 
+              MacObject.Mesh.append(smesh.Mesh(RectFace))                     # Creation of a new mesh
+              Quad2D = MacObject.Mesh[0].Quadrangle()                 # Applying a quadrangle hypothesis
+
+              EdgeIDs = geompy.SubShapeAllSorted(RectFace,6)      # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary
+
+              ReducedRatio = ReduceRatio(MacObject.GeoPar[1][0],MacObject.GeoPar[1][1])
+
+              Reference = [0,0,0]
+              Vec = [(1,0,0),(0,1,0)]
+              for Edge in EdgeIDs:
+                              for i in range(0,2):
+                                      if IsParallel(Edge,Vec[i]):
+                                              if not Reference[i]:    # If this is the first found edge to be parallel to this direction, apply user preferences for meshing
+                                                      Reference[i] = Edge
+                                                      ApplyConstant1DMesh(MacObject.Mesh[0],Edge,int(round(ReducedRatio[i]*MacObject.MeshPar[0])))
+                                                      break
+                                              else:                   # If there already exists an edge parallel to this direction, then use a 1D projection
+                                                      Apply1DProjMesh(MacObject.Mesh[0],Edge,Reference[i])
+                                                      break
+
+              MacObject.Mesh[0].Compute()                     # Generates the mesh
+       
+        MacObject.DirectionalMeshParams = [MacObject.MeshPar[0]*ReducedRatio[1],MacObject.MeshPar[0]*ReducedRatio[1],MacObject.MeshPar[0]*ReducedRatio[0],MacObject.MeshPar[0]*ReducedRatio[0]]
+
+       MacObject.status = 1
+        Config.ListObj.append(MacObject)
+       return MacObject
+
+##########################################################################################################
+
+def CompBoxF (MacObject):
+       if Config.debug : print "Generating composite box"
+
+       dummy1 = geompy.MakeScaleAlongAxes( ElemBox11 (), None , MacObject.GeoPar[1][0], MacObject.GeoPar[1][1], 1)
+       RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0)
+
+       MacObject.GeoChildren.append(RectFace)
+       MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1))
+        
+       if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames)
+        
+        if Config.publish : 
+               MacObject.Mesh.append(smesh.Mesh(RectFace))                     # Creation of a new mesh
+               Quad2D = MacObject.Mesh[0].Quadrangle()                 # Applying a quadrangle hypothesis
+
+               EdgeIDs = geompy.SubShapeAllSorted(RectFace,6)      # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary
+
+               #ReducedRatio = ReduceRatio(MacObject.GeoPar[1][0],MacObject.GeoPar[1][1])
+
+               Reference = [0,0,0]
+               Vec = [(1,0,0),(0,1,0)]
+               for Edge in EdgeIDs:
+                               for i in range(0,2):
+                                       if IsParallel(Edge,Vec[i]):
+                                               if not Reference[i]:    # If this is the first found edge to be parallel to this direction, apply user preferences for meshing
+                                                       Reference[i] = Edge
+                                                       ApplyConstant1DMesh(MacObject.Mesh[0],Edge,int(round(MacObject.MeshPar[0][i])))
+                                                       break
+                                               else:                   # If there already exists an edge parallel to this direction, then use a 1D projection
+                                                       Apply1DProjMesh(MacObject.Mesh[0],Edge,Reference[i])
+                                                       break
+
+               MacObject.Mesh[0].Compute()                 # Generates the mesh
+       
+        MacObject.DirectionalMeshParams = [MacObject.MeshPar[0][1],MacObject.MeshPar[0][1],MacObject.MeshPar[0][0],MacObject.MeshPar[0][0]]
+
+       MacObject.status = 1
+        Config.ListObj.append(MacObject)
+       return MacObject
+##########################################################################################################
+
+def NonOrtho (MacObject):
+       if Config.debug : print "Generating Non-orthogonal quadrangle"
+
+       RectFace = Quadrangler (MacObject.PtCoor)
+
+       MacObject.GeoChildren.append(RectFace)
+       MacObject.GeoChildrenNames.append("Quad_"+ str(len(Config.ListObj)+1))
+        
+        
+       if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames)
+        
+        if Config.publish : 
+               MacObject.Mesh.append(smesh.Mesh(RectFace))                     # Creation of a new mesh
+               Quad2D = MacObject.Mesh[0].Quadrangle()                 # Applying a quadrangle hypothesis
+
+               EdgeIDs = geompy.SubShapeAllSorted(RectFace,6)      # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary
+
+               #ReducedRatio = ReduceRatio(MacObject.GeoPar[1][0],MacObject.GeoPar[1][1])
+
+               Vec = [MacObject.DirVectors(i) for i in range(4)]
+               for Edge in EdgeIDs:
+                        Dir = [IsParallel(Edge,Vec[j]) for j in range(4)].index(True)
+                        DirConv = [0,0,1,1][Dir]
+                        ApplyConstant1DMesh(MacObject.Mesh[0],Edge,int(round(MacObject.MeshPar[0][DirConv])))
+
+               MacObject.Mesh[0].Compute()                 # Generates the mesh
+       
+        MacObject.DirectionalMeshParams = [MacObject.MeshPar[0][1],MacObject.MeshPar[0][1],MacObject.MeshPar[0][0],MacObject.MeshPar[0][0]]       
+        
+        MacObject.status = 1
+       Config.ListObj.append(MacObject)
+        return MacObject
+
+##########################################################################################################
+
+def QuartCyl (MacObject):
+       if Config.debug : print "Generating quarter cylinder"
+       Z_Axis = geompy.MakeVectorDXDYDZ(0., 0., 1.) 
+       RotAngle = {'NE' : lambda : 0,
+                   'NW' : lambda : math.pi/2,
+                   'SW' : lambda : math.pi,
+                   'SE' : lambda : -math.pi/2, }[MacObject.MeshPar[1]]()
+       dummy0 = geompy.MakeRotation( ElemQuartCyl(MacObject.MeshPar[2]) , Z_Axis, RotAngle )
+       dummy1 = geompy.MakeScaleAlongAxes( dummy0, None , MacObject.GeoPar[1][0]/10., MacObject.GeoPar[1][1]/10., 1)
+       RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0)
+
+       MacObject.GeoChildren.append(RectFace)
+       MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1))
+        
+       if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames)
+        
+        if Config.publish : 
+               MacObject.Mesh.append(smesh.Mesh(RectFace))                     # Creation of a new mesh
+               Quad2D = MacObject.Mesh[0].Quadrangle()                 # Applying a quadrangle hypothesis
+
+               EdgeIDs = geompy.SubShapeAllSorted(RectFace,6)      # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary
+               Reg1D = MacObject.Mesh[0].Segment()
+                            
+               #if MacObject.MeshPar[0] == 2 and MacObject.MeshPar[2] <= 2.:
+               #         print("Due to a bug in Salome 6.3, we are forced to either increase or decrease the local refinement by 50%, we choose in this case to increase the model's refinement.")
+               #         MacObject.MeshPar[0] = 3
+
+               Reg1D.NumberOfSegments(MacObject.MeshPar[0])
+
+               MacObject.Mesh[0].Compute()                     # Generates the mesh
+
+       MacObject.status = 1
+
+       x = MacObject.MeshPar[0]
+        N = QuarCylParam(MacObject.MeshPar[2])+1
+        
+       MacObject.DirectionalMeshParams = {'NE' : lambda : [2*x, N*x, 2*x, N*x],
+                                          'NW' : lambda : [N*x, 2*x, 2*x, N*x],
+                                          'SW' : lambda : [N*x, 2*x, N*x, 2*x],
+                                          'SE' : lambda : [2*x, N*x, N*x, 2*x], }[MacObject.MeshPar[1]]()
+
+        Config.ListObj.append(MacObject)
+       return MacObject
+        
+##########################################################################################################
+# Below this are the elementary calculation/visualization functions 
+##########################################################################################################
+
+def Publish (ObjToPublish,NamesToPublish):
+       i = 0
+       for GeoObj in ObjToPublish :
+               geompy.addToStudy(GeoObj,NamesToPublish[i])
+               i = i+1
+
+def IsParallel (Edge, Vector):
+        """
+        Function checks whether a given edge object is parallel to a reference vector. 
+        Output can be 0 (not parallel) or 1 (parallel and same sense) or 2 (parallel and opposite sense).
+        If the reference vector is null, the function returns 0
+        """
+        if Vector == (0,0,0) : return 0
+       else :
+                P1 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,0))
+               P2 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,1))
+               V0 = [ P1[0] - P2[0], P1[1] - P2[1], P1[2] - P2[2] ]
+               if Distance2Pt((0,0,0),CrossProd(V0,Vector))<1e-7 and DotProd(V0,Vector) > 0 : return 1
+               elif Distance2Pt((0,0,0),CrossProd(V0,Vector))<1e-7 and DotProd(V0,Vector) < 0 : return 2
+               else : return 0
+
+def IsOnCircle (Edge, Center, Radius):
+        """
+        Function checks whether a given edge object belong to the periphery of a circle defined by its 
+        center and radius. 
+        Output can be 0 (does not belong) or 1 (belongs).
+        If the reference Radius is null, the function returns 0
+        Note that this function is basic in the sense that it only checks if the two border points of a 
+        given edge belong to the arc of reference.
+        """
+        if Radius == 0 : return 0
+       else :
+                P1 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,0))
+               P2 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,1))
+               if abs(Distance2Pt(Center,P1)-Radius) < 1e-6 and abs(Distance2Pt(Center,P2)-Radius) < 1e-6:
+                        return 1
+                else :
+                       return 0
+                
+def CrossProd(V1,V2):
+       """
+       Determines the cross product of two 3D vectors
+       """
+       return ([V1[1]*V2[2]-V1[2]*V2[1], V1[2]*V2[0]-V1[0]*V2[2], V1[0]*V2[1]-V1[1]*V2[0]])
+
+def QuarCylParam(PitchRatio):
+        R = float(PitchRatio)/(PitchRatio+1)
+        Eps = 1. - R
+        X = (R+Eps/2.)*math.sin(math.pi/4)+Eps/2.
+        N = int(math.floor((math.pi*R/4.)/(Eps/2.)))
+        return N
+
+def DotProd(V1,V2):
+       """
+       Determines the dot product of two 3D vectors
+       """
+        if len(V1)==2 : V1.append(0)
+        if len(V2)==2 : V2.append(0)
+        
+       return (V1[0]*V2[0]+V1[1]*V2[1]+V1[2]*V2[2])
+
+def Distance2Pt(P1,P2):
+       """
+       Returns the distance between two points
+       """
+       return (math.sqrt((P1[0]-P2[0])**2+(P1[1]-P2[1])**2+(P1[2]-P2[2])**2))
+
+def ApplyConstant1DMesh (ParentMsh, Edge, Nseg):
+       Reg1D = ParentMsh.Segment(geom=Edge)
+       Len = Reg1D.NumberOfSegments(Nseg)
+
+def Apply1DProjMesh (ParentMsh, Edge, Ref):
+       Proj1D = ParentMsh.Projection1D(geom=Edge)
+       SrcEdge = Proj1D.SourceEdge(Ref,None,None,None)
+
+def EdgeLength (Edge):
+        """
+        This function returns the edge object length.
+        """
+       P1 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,0))
+       P2 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,1))
+       return Distance2Pt(P1,P2)
+
+
+def D2R (Angle):
+       return Angle*math.pi/180
+
+def R2D (Angle):
+       return Angle*180/math.pi
+
+def F2D (FloatNumber):
+       return round(FloatNumber*100.)/100.
+
+def BezierGen (PointA, PointB, AngleA, AngleB):
+
+       if AngleA == 0 and AngleB == 0 : return (geompy.MakeEdge(PointA, PointB))
+       else : 
+               A = geompy.PointCoordinates(PointA)
+               B = geompy.PointCoordinates(PointB)
+               dAB = Distance2Pt(A,B)
+               dAC = dAB * (math.tan(AngleA)*math.tan(AngleB)) / (math.sin(AngleA) * ( math.tan(AngleA)+math.tan(AngleB) ) )
+               AngleOX_AB = math.acos((B[0]-A[0])/dAB)
+               PointC = geompy.MakeVertex(A[0]+math.cos(AngleA+AngleOX_AB)*dAC,A[1]+math.sin(AngleA+AngleOX_AB)*dAC,0)
+               CurveACB = geompy.MakeBezier([PointA,PointC,PointB])
+               return CurveACB
+
+def GetSideAngleForBezier (PointA , PointB):
+       """
+       This function takes for input two points A and B where the bezier line is needed. It calculates the incident 
+       angle needed at point A so that the final curve is either at 0 or 90 degrees from the x'Ox axis
+       """
+       A = geompy.PointCoordinates(PointA)
+       B = geompy.PointCoordinates(PointB)
+       ABx = B[0]-A[0]
+       dAB = Distance2Pt(A,B)
+       Alpha = math.acos(ABx/dAB)
+       #print "New angle request"
+       #print ABx, dAB, R2D(Alpha)
+       if Alpha < math.pi/4 :
+               #print "returning", R2D(-Alpha)
+               return -Alpha
+       elif Alpha < 3*math.pi/4 :
+               #print "returning", R2D(-(Alpha-math.pi/2))
+               return -(Alpha-math.pi/2)
+       else : 
+               #print "returning", R2D(-(Alpha-math.pi))
+               return -(Alpha-math.pi)
+
+def VecDivRatio (Vec1, Vec2):
+       """
+       This function tries to find the ratio of Vec1 on Vec2 while neglecting any zero term in Vec1. This is used afterwards
+       for determining the global mesh parameter from automatically detected directional mesh params. If no compatibility is
+       possible, the function returns -1
+       """
+       Vec3 = []
+       for i in range(len(Vec1)) :
+               Vec3.append(float(Vec1[i])/Vec2[i])
+       Ratio=[]
+       for i in Vec3 : 
+               if not (abs(i)<1e-7) : Ratio.append(i)
+       if Ratio :
+               if min(Ratio) == max(Ratio) and min(Ratio)==int(min(Ratio)) : return(min(Ratio))
+               else : return -1                
+       else :
+               return -2
+                       
+                       
+def ReduceRatio (dx, dy):
+       """
+       This function transforms a decimal ratio into a scale between two integers, for example : [0.2,0.05] --> [4,1] ; 
+       """
+       Output = [0,0]
+       ratio = float(dy)/dx
+       if isinteger(ratio) : return [1,ratio]
+       elif dx == 1 :                  # when this function is called recursively! 
+               for i in range(1,20) :  # searches over 20 decimals
+                       if isinteger(ratio * (10**i) ) :
+                               Output = GetScale((10**i),int(round(ratio * (10**i) ) ) )
+                               break
+                       else :
+                               for n in range(0,i) :
+                                       if isinteger(ratio * ( 10**(i)-10**(n) )) :
+                                               Output = GetScale( 10**(i)-10**(n)  ,  int(round(ratio * ( 10**(i)-10**(n) ) ) ) )
+                                               break
+                               if not (Output==[0,0]) : break
+               return Output           
+       else :
+               for i in range(1,10) :  # searches over 10 decimals
+                       if isinteger(ratio * (10**i) ) :
+                               Output = GetScale((10**i),int(round(ratio * (10**i) ) ) )
+                               break
+                       else :
+                               for n in range(0,i) :
+                                       if isinteger(ratio * ( 10**(i)-10**(n) )) :
+                                               Output = GetScale( 10**(i)-10**(n)  ,  int(round(ratio * ( 10**(i)-10**(n) ) ) ) )
+                                               break
+                               if not (Output==[0,0]) : break
+
+               if Output == [0,0] : 
+                       print "We are having some trouble while interpreting the following ratio: ",ratio, "\nWe will try a recursive method which may in some cases take some time..."
+                       if dy > dx :
+                               A = ReduceRatio (dx, dy-dx)
+                               return ([A[0],A[1]+A[0]])
+                       else : 
+                               A = ReduceRatio (dy, dx-dy)
+                               return ([A[1]+A[0],A[0]])
+
+               else : return Output
+               
+def GetScale (X,Y):
+       """
+       This function is called within ReduceRatio and aims to reduce down two integers X and Y by dividing them with their common divisors;
+       Example: 25 and 5 ---> 5 and 1 / 63 and 12 ---> 21 and 4
+       """
+       MaxDiv = max(X,Y)
+       Divisor = 2             # Initializing the divisor
+       while MaxDiv >= Divisor :
+               X0 = 0
+               Y0 = 0
+               if not(X%Divisor) : 
+                       X0 = X/Divisor
+                       MaxDiv = max(MaxDiv,X0)
+               if not(Y%Divisor) : 
+                       Y0 = Y/Divisor
+                       MaxDiv = max(MaxDiv,Y0)
+               if (X0*Y0) : 
+                       X = X0
+                       Y = Y0
+               else : 
+                       Divisor = Divisor + 1 
+       return [X,Y]
+
+def isinteger (x) :
+       """
+       This functions applies a simple check if the entered value is an integer
+       """
+       x = float('%.5f' % (x))         #Truncate x to 5 digits after the decimal point
+       if math.ceil(x) == math.floor(x) : return True
+       else : return False             
+##########################################################################################
+# Below this are the functions that create the elementary forms for the macro objects
+##########################################################################################
+
+def ElemBox11 ():
+       """
+       This function returns a simple square face of 1 side length
+       """ 
+       RectFace = geompy.MakeFaceHW(1, 1, 1)
+       return RectFace
+
+def ElemBox42 ():
+       """
+       This function returns a square face of 1 side length, partitioned
+       according to the elementary 4 to 2 reductor method
+       """ 
+       OrigRectFace = geompy.MakeFaceHW(1, 1, 1)
+
+       SouthPt1 = geompy.MakeVertex (-.25, -.5, 0)
+       SouthPt2 = geompy.MakeVertex (0, -.5, 0)
+       SouthPt3 = geompy.MakeVertex (.25, -.5, 0)
+       WestPt1 = geompy.MakeVertex (-.5, -.5+1./3, 0)
+       WestPt2 = geompy.MakeVertex (-.5, -.5+2./3, 0)
+       EastPt1 = geompy.MakeVertex (.5, -.5+1./3, 0)
+       EastPt2 = geompy.MakeVertex (.5, -.5+2./3, 0)
+       NorthPt = geompy.MakeVertex (0, .5, 0)
+       MidPt1 = geompy.MakeVertex (0, .05, 0)
+       MidPt2 = geompy.MakeVertex (.2, -.18, 0)
+       MidPt3 = geompy.MakeVertex (0, -.28, 0)
+       MidPt4 = geompy.MakeVertex (-.2, -.18, 0)
+
+       Cutter = []
+       Cutter.append(geompy.MakeEdge(SouthPt2, MidPt3))
+       Cutter.append(geompy.MakeEdge(MidPt1, NorthPt))
+       Cutter.append(BezierGen(SouthPt1, MidPt4, GetSideAngleForBezier(SouthPt1,MidPt4), D2R(15)))
+       Cutter.append(BezierGen(SouthPt3, MidPt2, GetSideAngleForBezier(SouthPt3,MidPt2), D2R(-15)))
+       Cutter.append(BezierGen(WestPt1, MidPt4, GetSideAngleForBezier(WestPt1,MidPt4), D2R(-10)))
+       Cutter.append(BezierGen(EastPt1, MidPt2, GetSideAngleForBezier(EastPt1,MidPt2), D2R(10)))
+       Cutter.append(BezierGen(WestPt2, MidPt1, GetSideAngleForBezier(WestPt2,MidPt1), D2R(-10)))
+       Cutter.append(BezierGen(EastPt2, MidPt1, GetSideAngleForBezier(EastPt2,MidPt1), D2R(10)))
+       Cutter.append(BezierGen(MidPt2, MidPt1, D2R(-15), D2R(-15)))
+       Cutter.append(BezierGen(MidPt3, MidPt2, D2R(10), D2R(15)))
+       Cutter.append(BezierGen(MidPt3, MidPt4, D2R(-10), D2R(-15)))
+       Cutter.append(BezierGen(MidPt4, MidPt1, D2R(15), D2R(15)))
+
+       RectFace = geompy.MakePartition([OrigRectFace],Cutter, [], [],4, 0, [], 0)      #Creating the partition object
+       #i=1
+       #for SingleCut in Cutter :
+       #       geompy.addToStudy(SingleCut,'Cutter'+str(i))
+       #       i = i+1
+       #geompy.addToStudy(RectFace,'RectFace')
+       return RectFace
+
+def ElemEdge32 ():
+       """
+       This function returns a square face of 1 side length, partitioned
+       according to the elementary edge with 3 to 2 reductor
+       """ 
+       OrigRectFace = geompy.MakeFaceHW(1., 1., 1)
+
+       SouthPt1 = geompy.MakeVertex (-1./6, -0.5, 0.)
+       SouthPt2 = geompy.MakeVertex ( 1./6, -0.5, 0.)
+       WestPt1 = geompy.MakeVertex  (-0.5, -1./6, 0.)
+       WestPt2 = geompy.MakeVertex  (-0.5,  1./6, 0.)
+       EastPt = geompy.MakeVertex   ( 0.5, 0., 0.)
+       NorthPt = geompy.MakeVertex  (0., 0.5, 0.)
+
+       MidPt1 = geompy.MakeVertex (-0.2, -0.2, 0.)
+       MidPt2 = geompy.MakeVertex ( -0.02,  -0.02, 0.)
+
+       Cutter = []
+       Cutter.append(BezierGen(SouthPt1,  MidPt1,  GetSideAngleForBezier(SouthPt1,MidPt1) , D2R(-5)))
+       Cutter.append(BezierGen( WestPt1,  MidPt1,  GetSideAngleForBezier(WestPt1 ,MidPt1) , D2R(-5)))
+       Cutter.append(BezierGen(SouthPt2,  MidPt2,  GetSideAngleForBezier(SouthPt2,MidPt2) , D2R(-10)))
+       Cutter.append(BezierGen(  EastPt,  MidPt2,  GetSideAngleForBezier(EastPt  ,MidPt2) , D2R(5)))
+       Cutter.append(BezierGen( WestPt2,  MidPt2,  GetSideAngleForBezier(WestPt2 ,MidPt2) , D2R(-10)))
+       Cutter.append(BezierGen(  MidPt2, NorthPt,  GetSideAngleForBezier(NorthPt ,MidPt2) , D2R(-5)))
+
+       Cutter.append(geompy.MakeEdge(MidPt1, MidPt2))
+
+       RectFace = geompy.MakePartition([OrigRectFace],Cutter, [], [],4, 0, [], 0)      #Creating the partition object
+       #i=1
+       #for SingleCut in Cutter :
+       #       geompy.addToStudy(SingleCut,'Cutter'+str(i))
+       #       i = i+1
+       #geompy.addToStudy(RectFace,'RectFace')
+       return RectFace
+
+def Quadrangler (Points):
+       """
+       This function returns a quadranglar face based on four points, non of which 3 are non-colinear.  
+        The points are defined by their 2D [(x1,y1),(x2,y2)..] coordinates.
+        Note that the list of points is already arranged upon the creation in MacObject
+       """ 
+        Pt = []
+        for Point in Points: Pt.append(geompy.MakeVertex(Point[0], Point[1], 0))
+        # The first point is added at the end of the list in order to facilitate the line creation
+        Pt.append(Pt[0])
+        #Draw the lines in order to form the 4 side polygon
+        Ln=[]
+        for i in range(4) : Ln.append(geompy.MakeLineTwoPnt(Pt[i],Pt[i+1]))    
+       RectFace = geompy.MakeQuad (Ln[0],Ln[1],Ln[2],Ln[3])    
+       return RectFace
+
+def ElemQuartCyl(K):
+       """
+       This function returns a quarter cylinder to box relay of 1 side length, partitioned
+       with a pitch ratio of K, In other words the side of the box is R*(1+(1/K))
+       """ 
+        R = 10.*float(K)/(K+1)
+        Eps = 10.- R
+        
+        Config.theStudy.SetReal("R"  , R)
+        Config.theStudy.SetReal("minusR"  , -R)                                
+       Config.theStudy.SetReal("Eps", Eps)
+        
+       CylWire = geompy.MakeSketcher("Sketcher:F 'R' 0:R 0:L 'Eps':TT 10. 10.0:R 90:L 10.0:R 90:L 'Eps':R 90:C 'minusR' 90.0:WW", [0, 0, 0, 0, 0, 1, 1, 0, -0])        
+       CylFace = geompy.MakeFace(CylWire, 1)
+
+       SouthPt = geompy.MakeVertex (R+Eps/2., 0., 0)
+       SouthWestPt = geompy.MakeVertex ( 0.,0., 0)   #The origin can be used for practical partionning objectifs
+       WestPt = geompy.MakeVertex  (0., R+Eps/2., 0)
+        
+        N = int(math.floor((math.pi*R/4.)/(Eps/2.)))
+        X = 10.*(1.-1./(N+1))
+      
+         
+       EastPt = geompy.MakeVertex  (10.0,  X, 0.)
+       NorthPt = geompy.MakeVertex   ( X, 10.0, 0.)
+
+        DivFactor = 8./(F2D(math.log(K))-0.223)
+        #MidPt = geompy.MakeVertex ((R+Eps)*math.cos(math.pi/4), (R+Eps)*math.sin(math.pi/4), 0.)
+       MidPt = geompy.MakeVertex (X-Eps/DivFactor, X-Eps/DivFactor, 0.)
+
+       Cutter = []
+       Cutter.append(BezierGen(SouthWestPt,  MidPt,  GetSideAngleForBezier(SouthWestPt,MidPt) , D2R(-5)))
+       Cutter.append(BezierGen( EastPt, MidPt,  GetSideAngleForBezier(EastPt,MidPt) , D2R(5)))
+       Cutter.append(BezierGen( MidPt, NorthPt, (-1)**((K<1.25)*1)*D2R(-5), GetSideAngleForBezier(NorthPt,MidPt)))      
+       SMBezier = BezierGen( SouthPt,  MidPt,  GetSideAngleForBezier(SouthPt ,MidPt) , D2R((K<1.25)*180-5))
+        WMBezier = BezierGen( WestPt,  MidPt,  GetSideAngleForBezier(WestPt, MidPt) , D2R(-5))
+       Cutter.append(WMBezier)
+        Cutter.append(SMBezier)
+        
+        for i in range(1,N) :
+                # Determining intermediate points on the bezier lines and then performing additional cuts
+                
+                TempAnglePlus = (math.pi/4)*(1+float(i)/N)
+                SectionResult = CutnGroup.Go(WMBezier, [(0,0,0,math.sin(TempAnglePlus),-math.cos(TempAnglePlus),0)], [1], ['Dummy'], 0)
+                TempPt1 = SectionResult[1][0]
+                TempPt11 = geompy.MakeVertex  ((N-i)*X/N, 10., 0)
+                
+                TempAngleMinus = (math.pi/4)*(1-float(i)/N)
+                SectionResult = CutnGroup.Go(SMBezier, [(0,0,0,math.sin(TempAngleMinus),-math.cos(TempAngleMinus),0)], [1], ['Dummy'], 0)
+                TempPt2 = SectionResult[1][0]
+                TempPt21 = geompy.MakeVertex  (10.,  (N-i)*X/N, 0)
+                
+                Cutter.append(geompy.MakeEdge(SouthWestPt, TempPt1))
+                Cutter.append(geompy.MakeEdge(SouthWestPt, TempPt2))
+                Cutter.append(geompy.MakeEdge(TempPt1, TempPt11))
+                Cutter.append(geompy.MakeEdge(TempPt2, TempPt21))                
+
+       CylFace = geompy.MakePartition([CylFace],Cutter, [], [],4, 0, [], 0)    #Creating the partition object
+       CylFace = geompy.MakeTranslation(CylFace, -5., -5., 0.0)
+
+       return CylFace
+        
+def CompatibilityTest(MacObject):
+       Type = MacObject.Type
+       if Type == 'Box11' :
+               BaseDirPar = [1,1,1,1]
+               return int(VecDivRatio(MacObject.DirectionalMeshParams, BaseDirPar))
+       elif Type == 'Box42' :
+               BaseDirPar = {'SN' : lambda : [3, 3, 4, 2],
+                             'NS' : lambda : [3, 3, 2, 4],
+                             'EW' : lambda : [2, 4, 3, 3],
+                             'WE' : lambda : [4, 2, 3, 3], }[MacObject.MeshPar[1]]()
+               return int(VecDivRatio(MacObject.DirectionalMeshParams, BaseDirPar))
+       elif Type == 'BoxAng32' :
+               BaseDirPar = {'NE' : lambda : [3, 2, 3, 2],
+                             'NW' : lambda : [2, 3, 3, 2],
+                             'SW' : lambda : [2, 3, 2, 3],
+                             'SE' : lambda : [3, 2, 2, 3], }[MacObject.MeshPar[1]]()
+               return int(VecDivRatio(MacObject.DirectionalMeshParams, BaseDirPar))
+       elif Type == 'CompBox' :
+               #print "dx is: ", MacObject.GeoPar[1][1], ". dy is: ",MacObject.GeoPar[1][0]
+               ReducedRatio = ReduceRatio(MacObject.GeoPar[1][0], MacObject.GeoPar[1][1])
+               #print ReducedRatio
+               BaseDirPar = [ReducedRatio[1], ReducedRatio[1], ReducedRatio[0], ReducedRatio[0]]
+               return int(VecDivRatio(MacObject.DirectionalMeshParams, BaseDirPar))
+                
+       elif Type == 'QuartCyl' :
+                N = QuarCylParam(MacObject.MeshPar[2])+1
+               BaseDirPar = {'NE' : lambda : [2, N, 2, N],
+                             'NW' : lambda : [N, 2, 2, N],
+                             'SW' : lambda : [N, 2, N, 2],
+                             'SE' : lambda : [2, N, N, 2], }[MacObject.MeshPar[1]]()
+               return int(VecDivRatio(MacObject.DirectionalMeshParams, BaseDirPar))
+       elif Type == 'CompBoxF' : 
+               RealRatio = MacObject.GeoPar[1][1]/MacObject.GeoPar[1][0]
+               Xd = 0
+               Yd = 0
+               if MacObject.DirectionalMeshParams[2]+MacObject.DirectionalMeshParams[3] :
+                       A = int(max(MacObject.DirectionalMeshParams[2:4]))                       
+                       Xd = int(VecDivRatio([A,0,0,0], [1,1,1,1]))                       
+               if MacObject.DirectionalMeshParams[0]+MacObject.DirectionalMeshParams[1] :
+                       A = int(max(MacObject.DirectionalMeshParams[0:2]))                       
+                       Yd = int(VecDivRatio([0,0,A,0], [1,1,1,1]))
+                        
+               if Xd == 0 and Yd : Xd = int(round(Yd/RealRatio))
+               elif Yd == 0 : Yd = int(round(RealRatio*Xd))
+               
+               return [Xd,Yd]
+       elif Type == 'NonOrtho' :
+                MeanDX = 0.5*(IntLen(MacObject.DirBoundaries(0))+IntLen(MacObject.DirBoundaries(1)))
+                MeanDY = 0.5*(IntLen(MacObject.DirBoundaries(2))+IntLen(MacObject.DirBoundaries(3)))
+               RealRatio = MeanDY/MeanDX
+               Xd = 0
+               Yd = 0
+               if MacObject.DirectionalMeshParams[2]+MacObject.DirectionalMeshParams[3] :
+                       A = int(max(MacObject.DirectionalMeshParams[2:4]))                       
+                       Xd = int(VecDivRatio([A,0,0,0], [1,1,1,1]))                       
+               if MacObject.DirectionalMeshParams[0]+MacObject.DirectionalMeshParams[1] :
+                       A = int(max(MacObject.DirectionalMeshParams[0:2]))                       
+                       Yd = int(VecDivRatio([0,0,A,0], [1,1,1,1]))
+                        
+               if Xd == 0 and Yd : Xd = int(round(Yd/RealRatio))
+               elif Yd == 0 : Yd = int(round(RealRatio*Xd))
+               
+               return [Xd,Yd]
+
+def IntLen (Interval) :
+        """
+        This function returns the length of a given interval even if the latter is not sorted correctly.
+        """
+        return abs(Interval[1]-Interval[0])
+                        
+def NextTo (RefBox, Direction, Extension):
+        """
+        This functions returns geometrical parameters for easy positioning of neighbouring objects.
+        The input (RefBox) and output are in the form :  [(X0,Y0),(DX,DY)]        
+        """
+        X0_0 = RefBox[0][0]
+        Y0_0 = RefBox[0][1]
+        DX_0 = RefBox[1][0]
+        DY_0 = RefBox[1][1]
+        
+        DirectionalCoef = {'Above' : lambda : [ 0, 1],
+                          'Below' : lambda : [ 0,-1],
+                          'Right' : lambda : [ 1, 0],
+                          'Left ' : lambda : [-1, 0], }[Direction]()
+        
+        X0_1 = X0_0+ DirectionalCoef[0] * (DX_0/2.+Extension/2.)
+        DX_1 = abs(DirectionalCoef[0]) * (Extension) + abs(DirectionalCoef[1])*DX_0
+        Y0_1 = Y0_0+ DirectionalCoef[1] * (DY_0/2.+Extension/2.)
+        DY_1 = abs(DirectionalCoef[1]) * (Extension) + abs(DirectionalCoef[0])*DY_0
+        
+        return [(X0_1,Y0_1),(DX_1,DY_1)]
+        
+def GeomMinMax (PtA, PtB):
+        """
+        This function returns geometrical parameters in the format  [(X0,Y0),(DX,DY)]. The input being 
+        the coordinates of two points (Xa,Ya), (Xb,Yb).
+        """
+        # First test that the vector relying the two points is oblique
+        AB = [PtB[0]- PtA[0],PtB[1]- PtA[1]]
+        if 0 in AB :
+                print ("Error: the two points are not correctly defined. In the orthonormal system XOY, it is impossible to define a rectangle with these two points")
+                return -1
+        else:
+                X0 = 0.5*(PtA[0]+PtB[0])
+                Y0 = 0.5*(PtA[1]+PtB[1])
+                DX = abs(AB[0])
+                DY = abs(AB[1])
+                return [(X0,Y0),(DX,DY)]
+
+def AddIfDifferent (List, Element):
+        if not(Element in List):
+                List = List+(Element,)
+        return List
+
+def IndexMultiOcc (Array,Element) :
+        """
+        This functions returns the occurrences indices of Element in Array.
+        As opposed to Array.index(Element) method, this allows determining      
+        multiple entries rather than just the first one!
+        """
+        Output = []
+        try : Array.index(Element)
+        except ValueError : print "No more occurrences"
+        else : Output.append(Array.index(Element))
+                
+        if not(Output == []) and len(Array) > 1 :
+                for index, ArrElem in enumerate(Array[Output[0]+1:]) :
+                        if ArrElem == Element : Output.append(index+Output[0]+1)
+                 
+        return Output
+        
+def SortList (ValList, CritList):
+        Output = []
+        SortedCritList = copy.copy(CritList)
+        SortedCritList.sort()
+        for i in range(0,len(ValList)):
+                if i > 0 :
+                        if not(SortedCritList[i]==SortedCritList[i-1]):
+                                index = IndexMultiOcc(CritList,SortedCritList[i])
+                                Output= Output + [ValList[j] for j in index]
+                else :  
+                        index = IndexMultiOcc(CritList,SortedCritList[i])
+                        Output= Output + [ValList[j] for j in index]
+                        
+        return Output
+
+def SortPoints(Points):
+        """
+        This function sorts a list of the coordinates of N points as to start at 
+        an origin that represents Xmin and Xmax and then proceed in a counter
+        clock-wise sense
+        """
+        NbPts = len(Points)
+        Xmin = min([Points[i][0] for i in range(NbPts)])
+        Ymin = min([Points[i][1] for i in range(NbPts)])
+        Xmax = max([Points[i][0] for i in range(NbPts)])
+        Ymax = max([Points[i][1] for i in range(NbPts)])        
+        Crit = [(abs(Point[0]-Xmin)+0.1*(Xmax-Xmin))*(abs(Point[1]-Ymin)+0.1*(Ymax-Ymin)) for Point in Points]
+        #print "Input Points      : ", Points
+        #print "Sorting Criterion : ", Crit
+        Order = SortList (range(NbPts), Crit)
+        #print "Sorted Results    : ", Order
+        Output = []
+        Output.append(Points[Order[0]])
+        
+        Point0 = Points[Order[0]]
+        #print "Reference point :", Point0
+        
+        V = [[Point1[0]-Point0[0],Point1[1]-Point0[1]] for Point1 in Points]
+        Cosines = [-(vec[0]-1E-10)/(math.sqrt(DotProd(vec,vec)+1e-25)) for vec in V]
+        #print "Cosines criterion :", Cosines
+        Order = SortList(range(NbPts),Cosines)
+        #print "Ordered points:", Order
+        for PtIndex in Order[:-1]: Output.append(Points[PtIndex])
+        
+        return Output
+
diff --git a/src/Tools/MacMesh/MacMesh/MacObject.py b/src/Tools/MacMesh/MacMesh/MacObject.py
new file mode 100644 (file)
index 0000000..4b78724
--- /dev/null
@@ -0,0 +1,302 @@
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+
+# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+
+
+class MacObject:
+       """ 
+       This represents a python class definition which contains 
+       all necessary information about the macro object being created
+       in Salome 
+       """
+
+       def __init__( self, ObjectType, GeoParameters, MeshParameters, **args ):
+               """
+               Initializes the macro object to be created, saves parameters inside of it, checks for neighboring objects,
+               determines meshing parameters if necessary and finally launches the generation process.
+               """
+               import Config,GenFunctions
+               if Config.debug : print "Initializing object No. " + str(len(Config.ListObj)+1)
+
+                if 'publish' in args :
+                       if args['publish']==0 : Config.publish = 0
+                       else : Config.publish = 1
+               else : Config.publish = 1
+                
+                if 'groups' in args :
+                       self.GroupNames = args['groups']
+                        for group in args['groups'] :
+                                if not(group in Config.Groups) and group : Config.Groups.append(group)
+               else : self.GroupNames = [None, None, None, None]
+                
+                if ObjectType == 'NonOrtho':
+                        if not(len(GeoParameters)==4): print "Error: trying to construct a non-ortho object but the 4 constitutive vertices are not given!"
+                        else :
+                                Xmin = min([GeoParameters[i][0] for i in range(4)])
+                                Xmax = max([GeoParameters[i][0] for i in range(4)])
+                                Ymin = min([GeoParameters[i][1] for i in range(4)])
+                                Ymax = max([GeoParameters[i][1] for i in range(4)])                        
+                                self.GeoPar = [(0.5*(Xmin+Xmax),0.5*(Ymin+Ymax)),(Xmax-Xmin,Ymax-Ymin)]
+                                self.PtCoor = GenFunctions.SortPoints(GeoParameters)
+                else:
+                        self.GeoPar = GeoParameters
+                        [Xmin,Ymin,Xmax,Ymax] = [ self.GeoPar[0][0]-0.5*self.GeoPar[1][0], self.GeoPar[0][1]-0.5*self.GeoPar[1][1] ] + [ self.GeoPar[0][0]+0.5*self.GeoPar[1][0], self.GeoPar[0][1]+0.5*self.GeoPar[1][1] ]
+                        self.PtCoor = [(Xmin,Ymin),(Xmax,Ymin),(Xmax,Ymax),(Xmin,Ymax)]      
+                
+               self.Type = ObjectType
+               self.LowBound = [ self.GeoPar[0][0]-0.5*self.GeoPar[1][0], self.GeoPar[0][1]-0.5*self.GeoPar[1][1] ]
+               self.UpperBound = [ self.GeoPar[0][0]+0.5*self.GeoPar[1][0], self.GeoPar[0][1]+0.5*self.GeoPar[1][1] ]
+               self.MeshPar = MeshParameters
+               self.GeoChildren = []
+               self.GeoChildrenNames = []
+               self.Mesh = []
+               self.MeshGroups = []
+               self.CheckInterfaces()
+               if 'auto' in MeshParameters : self.AutoParam()
+               if not(self.MeshPar[0]<0): self.Generate()
+               else : 
+                       Config.ListObj.append(self)
+                       print("Aborting object creation\n ")
+
+       def Generate(self) :
+               """
+               This method generates the geometrical object with the corresponding mesh once all verifications (CheckInterfaces and AutoParam) 
+               have been accomplished
+               """
+               import GenFunctions, Alarms, Config
+               self = {'Box11'    : lambda : GenFunctions.Box11(self),
+                       'Box42'    : lambda : GenFunctions.Box42(self),
+                       'BoxAng32' : lambda : GenFunctions.BoxAng32(self),
+                       'CompBox'  : lambda : GenFunctions.CompBox(self),
+                       'CompBoxF' : lambda : GenFunctions.CompBoxF(self),
+                       'NonOrtho' : lambda : GenFunctions.NonOrtho(self),
+                       'QuartCyl' : lambda : GenFunctions.QuartCyl(self) }[self.Type]()
+
+               if Config.debug : Alarms.Message(self.status)   # notification on the result of the generation algorithm
+                
+
+       def CheckInterfaces(self):
+               """
+               This method searches for neighbours for the object being created and saves them inside the Config.Connections
+               array. This array contains 4 entries per object corresponding to West, East, South, and North neighbours.
+               Note that an object may have more than one neighbour for a given direction. 
+               """
+               import Alarms, Config
+                from GenFunctions import AddIfDifferent
+                from CompositeBox import FindCommonSide
+                
+               Config.Connections.append([(-1,),(-1,),(-1,),(-1,)])
+               itemID = len(Config.ListObj)
+                # In all cases except non ortho, PrincipleBoxes is unitary and contains the box in question
+                # In the non-ortho case it contains all possible combinations of boxes with 3 vertices 
+                PrincipleBoxes = self.PrincipleBoxes()
+               for i, TestObj in enumerate(Config.ListObj): 
+                        SecondaryBoxes = TestObj.PrincipleBoxes()                               
+                       ConnX = 0
+                       ConnY = 0
+                        for Box0 in PrincipleBoxes:
+                                for Box1 in SecondaryBoxes:
+                                       # Along X
+                                       CenterDis = abs(Box1[0][0]-Box0[0][0])
+                                       Extension = 0.5*(Box1[1][0]+Box0[1][0])
+                                       if CenterDis - Extension < -1e-7 : 
+                                               ConnX = -1
+                                       elif CenterDis - Extension < 1e-7 :
+                                                if not(FindCommonSide(self.DirBoundaries(2),TestObj.DirBoundaries(3))==[0,0]) and Box1[0][0] < Box0[0][0] : ConnX = 1
+                                               elif not(FindCommonSide(self.DirBoundaries(3),TestObj.DirBoundaries(2))==[0,0]) and Box1[0][0] >= Box0[0][0]: ConnX = 2
+                                                else : ConnX = 0
+                                                
+                                       # Along Y
+                                       CenterDis = abs(Box1[0][1]-Box0[0][1])
+                                       Extension = 0.5*(Box1[1][1]+Box0[1][1])
+                                       if CenterDis - Extension < -1e-7 : 
+                                               ConnY = -1
+                                       elif CenterDis - Extension < 1e-7 :
+                                               if not(FindCommonSide(self.DirBoundaries(0),TestObj.DirBoundaries(1))==[0,0]) and Box1[0][1] < Box0[0][1] : ConnY = 1
+                                               elif not(FindCommonSide(self.DirBoundaries(1),TestObj.DirBoundaries(0))==[0,0]) and Box1[0][1] >= Box0[0][1]: ConnY = 2
+                                                else : ConnY = 0
+
+                                       if not (ConnX*ConnY == 0) :
+                                               if max(ConnX,ConnY) == -1 and not('NonOrtho' in [self.Type,TestObj.Type]) : Alarms.Message(3)
+                                               else:
+                                                       if ConnX == 1 and ConnY == -1:
+                                                               if Config.Connections[i][1] == (-1,) : Config.Connections[i][1] = (itemID,)
+                                                               else : Config.Connections[i][1] = AddIfDifferent(Config.Connections[i][1],itemID)
+                                                               if Config.Connections[itemID][0] == (-1,) : Config.Connections[itemID][0] = (i,)
+                                                               else : Config.Connections[itemID][0] = AddIfDifferent(Config.Connections[itemID][0],i)
+                                                       elif ConnX == 2 and ConnY == -1:
+                                                               if Config.Connections[i][0] == (-1,) : Config.Connections[i][0] = (itemID,)
+                                                               else : Config.Connections[i][0] = AddIfDifferent(Config.Connections[i][0],itemID)
+                                                               if Config.Connections[itemID][1] == (-1,) : Config.Connections[itemID][1] = (i,)
+                                                               else : Config.Connections[itemID][1] = AddIfDifferent(Config.Connections[itemID][1],i)
+                                                       elif ConnY == 1 and ConnX == -1:
+                                                               if Config.Connections[i][3] == (-1,) : Config.Connections[i][3] = (itemID,)
+                                                               else : Config.Connections[i][3] = AddIfDifferent(Config.Connections[i][3],itemID)
+                                                               if Config.Connections[itemID][2] == (-1,) : Config.Connections[itemID][2] = (i,)
+                                                               else : Config.Connections[itemID][2] = AddIfDifferent(Config.Connections[itemID][2],i)
+                                                       elif ConnY ==2 and ConnX == -1:
+                                                               if Config.Connections[i][2] == (-1,) : Config.Connections[i][2] = (itemID,)
+                                                               else : Config.Connections[i][2] = AddIfDifferent(Config.Connections[i][2],itemID)
+                                                               if Config.Connections[itemID][3] == (-1,) : Config.Connections[itemID][3] = (i,)
+                                                               else : Config.Connections[itemID][3] = AddIfDifferent(Config.Connections[itemID][3],i)
+
+       def AutoParam (self):
+               """
+               This method is called only if the 'auto' keyword is used inside the meshing algorithm. It is based on the 
+               connection results per object and tries to find the correct parameters for obtaining a final compatible mesh
+               between the objects already present and the one being created. If this is not possible, the method gives an error
+               message.
+               """
+               import Alarms, Config, GenFunctions, CompositeBox
+               MeshPar = [0,0,0,0]     # initialize the mesh parameter value to be used to -1
+                [(X0,Y0),(DX,DY)] = self.GeoPar
+               ObjectsInvolved = []
+               for i, Conn in enumerate(Config.Connections[-1]):
+                       if not ( Conn == (-1,) ):   # Meaning that there is one or more neighbors on this direction
+                               for ObjID in Conn : 
+                                        ToLook0 = [2,3,0,1][i]
+                                        ToLook1 = [3,2,1,0][i]
+                                        CommonSide =  CompositeBox.FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),self.DirBoundaries(ToLook0))
+                                        #print "Common Side is:", CommonSide
+                                        ToLook2 = [1,0,3,2][i]
+                                        #print "Full Side is:", CompositeBox.IntLen(Config.ListObj[ObjID].DirBoundaries(ToLook1))
+                                        #print "Full Segments on this direction are:", Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]
+                                        RealSegments = round(Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]*CompositeBox.IntLen(CommonSide)/CompositeBox.IntLen(Config.ListObj[ObjID].DirBoundaries(ToLook1)))
+                                        #print "RealSegments :", RealSegments
+                                        
+                                       MeshPar[i] = MeshPar[i] + RealSegments
+                                       ObjectsInvolved.append(ObjID+1)
+               self.DirectionalMeshParams =  MeshPar
+               self.MeshPar[0] = GenFunctions.CompatibilityTest(self)
+
+               if self.MeshPar[0] < 0 : 
+                       Alarms.Message(4)
+                       if self.MeshPar[0] == -1 : print ("Problem encountered with object(s) no. "+str(ObjectsInvolved))
+                       elif self.MeshPar[0] == -2 : print ("This object has no neighbours !!!")
+
+       def Boundaries (self):
+                """
+                This method returns the global boundaries of the MacObject. [Xmin,Xmax,Ymin,Ymax]
+                """
+                Xmin = min([self.DirBoundaries(i)[0] for i in [0,1]])
+                Xmax = max([self.DirBoundaries(i)[1] for i in [0,1]])
+                Ymin = min([self.DirBoundaries(i)[0] for i in [2,3]])
+                Ymax = max([self.DirBoundaries(i)[1] for i in [2,3]])
+                
+                return [Xmin,Xmax,Ymin,Ymax]
+                
+       def DirBoundaries (self, Direction):
+                """
+                This method returns a single interval giving [Xmin,Xmax] or [Ymin,Ymax] according to the required direction.
+                This works particularly well for nonorthogonal objects.
+                Direction : [0,1,2,3] <=> [South, North, West, East]
+                """
+                PtCoor = self.PtCoor
+                PtCoor.append(self.PtCoor[0])
+                if type(Direction) is str :
+                        Dir = { 'South'  : lambda : 0,
+                               'North'  : lambda : 1,
+                               'West'   : lambda : 2,
+                                'East'   : lambda : 3,}[Direction]()
+                else : Dir = int(Direction)
+                         
+                PtIndex  = [0,2,3,1][Dir]
+                DirIndex = [0,0,1,1][Dir]
+                             
+               return sorted([PtCoor[PtIndex][DirIndex],PtCoor[PtIndex+1][DirIndex]])
+        def DirVectors (self, Direction):
+                """
+                This method returns for a given object, the real vectors which define a given direction
+                The interest in using this method is for non-orthogonal objects where the sides can be 
+                deviated from the orthogonal basis vectors
+                """
+                if type(Direction) is str :
+                        Dir = { 'South'  : lambda : 0,
+                               'North'  : lambda : 1,
+                               'West'   : lambda : 2,
+                                'East'   : lambda : 3,}[Direction]()
+                else : Dir = int(Direction)
+                PtCoor = self.PtCoor
+                PtCoor.append(self.PtCoor[0])
+                PtIndex  = [0,2,3,1][Dir]
+                return [PtCoor[PtIndex+1][0]-PtCoor[PtIndex][0],PtCoor[PtIndex+1][1]-PtCoor[PtIndex][1],0.]
+                                
+        def GetBorder (self, Criterion):
+                import GenFunctions, Config
+
+                from salome.geom import geomBuilder
+                geompy = geomBuilder.New( Config.theStudy )
+                
+                if type(Criterion) is str :
+                        Crit = {'South'  : lambda : 0,
+                               'North'  : lambda : 1,
+                               'West'   : lambda : 2,
+                                'East'   : lambda : 3,}[Criterion]()
+                else : Crit = int(Criterion)
+                
+                AcceptedObj = []
+                if Crit < 4 :
+                        Boundaries = self.Boundaries()
+                        Research = {0 : lambda : [self.DirVectors(0),1,Boundaries[2]],
+                                   1 : lambda : [self.DirVectors(1),1,Boundaries[3]],
+                                   2 : lambda : [self.DirVectors(2),0,Boundaries[0]],
+                                   3 : lambda : [self.DirVectors(3),0,Boundaries[1]], }[Crit]()
+                                                            
+                        for i,ElemObj in enumerate(self.GeoChildren):
+                               EdgeIDs = geompy.ExtractShapes(ElemObj,6)# List of Edge IDs belonging to ElemObj
+                                for Edge in EdgeIDs:
+                                        if GenFunctions.IsParallel(Edge,Research[0]):
+                                                if abs( geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,0))[Research[1]] - Research[2] )< 1e-6 or abs( geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,1))[Research[1]] - Research[2] )< 1e-6 :
+                                                        AcceptedObj.append(Edge)
+                else :
+                       CenterSrchPar = {'NE' : lambda : [-1., -1.],
+                                        'NW' : lambda : [ 1., -1.],
+                                        'SW' : lambda : [ 1.,  1.],
+                                        'SE' : lambda : [-1.,  1.], }[self.MeshPar[1]]()
+                        Radius = self.GeoPar[1][1]*float(self.MeshPar[2])/(self.MeshPar[2]+1)
+                        Center = (self.GeoPar[0][0]+CenterSrchPar[0]*self.GeoPar[1][0]/2.,self.GeoPar[0][1]+CenterSrchPar[1]*self.GeoPar[1][1]/2.,0.)
+                        for i,ElemObj in enumerate(self.GeoChildren):
+                               EdgeIDs = geompy.ExtractShapes(ElemObj,6)# List of Edge IDs belonging to ElemObj
+                                for Edge in EdgeIDs:
+                                        if GenFunctions.IsOnCircle(Edge,Center,Radius):
+                                                AcceptedObj.append(Edge)
+                return AcceptedObj
+
+        def PrincipleBoxes (self):
+                """
+                This function returns all possible combination rectangular shape objects that can contain at least 3 of the principle vertices
+                constituting the MacObject. This is indispensible for the Non-ortho types and shall return a number of 24 possible combinations
+                """
+                from itertools import combinations
+                Boxes = []
+                if self.Type == 'NonOrtho':
+                        for combi in combinations(range(4),3):
+                                Xmin = min([self.PtCoor[i][0] for i in combi])
+                                Xmax = max([self.PtCoor[i][0] for i in combi])
+                                Ymin = min([self.PtCoor[i][1] for i in combi])
+                                Ymax = max([self.PtCoor[i][1] for i in combi])                        
+                                Boxes.append([(0.5*(Xmin+Xmax),0.5*(Ymin+Ymax)),(Xmax-Xmin,Ymax-Ymin)])
+                else :
+                        Boxes = [self.GeoPar]
+                
+                return Boxes     
+                        
+        
diff --git a/src/Tools/MacMesh/MacMesh/PublishGroups.py b/src/Tools/MacMesh/MacMesh/PublishGroups.py
new file mode 100644 (file)
index 0000000..f634488
--- /dev/null
@@ -0,0 +1,250 @@
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+
+# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+
+# 
+import SMESH
+import math
+import Config
+
+from salome.geom import geomBuilder
+geompy = geomBuilder.New( Config.theStudy )
+
+from salome.smesh import smeshBuilder
+smesh = smeshBuilder.New( Config.theStudy )
+
+##########################################################################################################
+
+def PublishGroups ():
+        aFilterManager = smesh.CreateFilterManager()
+
+        # Building geometric and mesh compounds and  groups ##############################################
+        if Config.debug : print "Searching for geometric groups and publishing final compound"
+        
+        TempGEOList = []
+        TempMESHList = []
+        
+        for MacroObj in Config.ListObj : 
+                TempGEOList += MacroObj.GeoChildren
+                TempMESHList += MacroObj.Mesh
+                
+        FinalCompound = geompy.MakeCompound(TempGEOList)
+        geompy.addToStudy (FinalCompound,Config.StudyName)
+        MeshCompound = smesh.Concatenate(TempMESHList, 1, 1, 1e-5)
+        MeshCompound.SetName(Config.StudyName)
+        
+        GroupGEO = []
+        for group in Config.Groups :
+        
+                # Geometric groups definition
+                TempGEOList = []
+                TempNames = []
+                for MacroObj in Config.ListObj :
+                        if group in MacroObj.GroupNames :
+                                Occurences = IndexMultiOcc(MacroObj.GroupNames, group)
+                                for Occ in Occurences :
+                                        TempGEOList += MacroObj.GetBorder(Occ)
+                GroupGEO.append(geompy.MakeCompound(TempGEOList))
+                geompy.addToStudyInFather(FinalCompound,GroupGEO[-1],'GR_'+group)
+                
+                # Mesh groups definition
+                Criterion = smesh.GetCriterion(SMESH.EDGE, SMESH.FT_BelongToGeom,'=',GroupGEO[-1],Tolerance=1e-06)
+                #Criterion = smesh.Filter.Criterion(18,39,0,'GR_'+group,'GR_'+group,39,39,1e-06,smesh.EDGE,7)
+                MeshCompound.MakeGroupByCriterion(group,Criterion)
+        
+        StudyBuilder = Config.theStudy.NewBuilder()
+        for MeshObj in TempMESHList:
+                SO = Config.theStudy.FindObjectIOR(Config.theStudy.ConvertObjectToIOR(MeshObj))
+                if SO is not None: StudyBuilder.RemoveObjectWithChildren(SO)
+        
+        return MeshCompound        
+                
+
+def IndexMultiOcc (Array,Element) :
+        """
+        This function returns the occurrences indices of Element in Array.
+        As opposed to Array.index(Element) method, this allows determining      
+        multiple entries rather than just the first one!
+        """
+        Output = []
+        try : Array.index(Element)
+        except ValueError : print "No more occurrences"
+        else : Output.append(Array.index(Element))
+                
+        if not(Output == [-1]) and len(Array) > 1 :
+                for index, ArrElem in enumerate(Array[Output[0]+1:]) :
+                        if ArrElem is Element : Output.append(index+Output[0]+1)
+                 
+        return Output
+            
+def Publish (ObjToPublish):
+       for i,GeoObj in enumerate(ObjToPublish) : geompy.addToStudy(GeoObj,"Sub_"+str(i))
+        
+def RevolveMesh(MainMesh,**args):
+        """
+        This function premits to revolute and scale a 2D mesh while transforming the edge
+        groups into face groups. Moreover, the function automatically creates the face groups 
+        corresponding to the symmetry lower and upper faces
+        Facultatif arguments are : 
+                - Center [X,Y,Z], origin being the default
+                - Direction [VX,VY,VZ], x-axis being the default
+                - AngleDeg or AngleRad : ALPHA, 10 degrees being the default
+                - Scale : BETA, no scaling being default
+        """
+        ################################################################################
+        # Reading input arguments and proceeding to defaults if necessary
+        ################################################################################       
+        if 'Center' in args : CenterCoor = [float(Coor) for Coor in args['Center']]
+        else : 
+                print "\nThe coordinates of the center of revolution were not given\nThe origin is used by default."
+                CenterCoor = [0.,0.,0.]
+        
+        if 'Direction' in args : Direction = [float(Dir) for Dir in args['Direction']]
+        else :
+                print "\nThe axis vector of revolution was not given\nThe x-axis is used by default."
+                Direction = [1.,0.,0.]
+        
+        if 'AngleDeg' in args : Angle = float(args['AngleDeg'])*math.pi/180.
+        elif 'AngleRad' in args : Angle = float(args['AngleRad'])
+        else :
+                print "\nThe revolution angle was not given\nAn angle of 10 degrees is used by default."
+                Angle = 10.*math.pi/180.
+                
+        if 'Scale' in args : Scale = float(args['Scale'])
+        else : Scale = 1.
+        
+
+        # Creating the lower face group LOFAC
+        LOFAC = MainMesh.CreateEmptyGroup( SMESH.FACE, 'LOFAC' )
+        LOFAC.AddFrom(MainMesh.GetMesh())
+
+        GR_Names = MainMesh.GetGroupNames()
+        GRs = MainMesh.GetGroups()
+        Rev3DMeshGroups = MainMesh.RotationSweepObject2D( MainMesh, SMESH.AxisStruct( CenterCoor[0], CenterCoor[1], CenterCoor[2], Direction[0], Direction[1], Direction[2] ), Angle, 1, 1e-05 ,True)
+
+        # Adding an EDGE suffix to the edge groups (to be deleted eventually by the user...)
+        for GR in GRs:
+                CurrentName = GR.GetName()
+                if CurrentName in GR_Names and not(CurrentName=='LOFAC'):  # Meaning that this is an old edge group
+                        GR.SetName(CurrentName+'_EDGE')
+
+        # Removing the _rotated prefix from the rotated FACE groups
+        for GR in Rev3DMeshGroups:
+                CurrentName = GR.GetName()
+                if CurrentName.endswith( "_rotated"):
+                        if CurrentName.startswith( 'LOFAC_' ):
+                                GR.SetName('VOL')
+                        else:
+                                GR.SetName(CurrentName[:-8])
+                elif CurrentName == 'LOFAC_top':
+                        GR.SetName('HIFAC')
+                        #Index = [ GR_Names[i] in CurrentName for i in range(0,len(GR_Names)) ].index(True)
+                        #GR.SetName(GR_Names[Index])
+
+        # Creating the upper face group HIFAC
+        ALLFAC = MainMesh.CreateEmptyGroup( SMESH.FACE, 'ALLFAC' )
+        ALLFAC.AddFrom(MainMesh.GetMesh())
+
+        #HIFAC = MainMesh.GetMesh().CutListOfGroups( [ ALLFAC ], [LOFAC] + [ MeshGroup for MeshGroup in Rev3DMeshGroups if not(MeshGroup.GetName()=='VOL') ], 'HIFAC' )
+        #HIFAC = MainMesh.GetMesh().CutListOfGroups( [ ALLFAC ], [LOFAC] + [ MeshGroup for MeshGroup in Rev3DMeshGroups if ( not(MeshGroup.GetName()=='VOL') and MeshGroup.GetType() == SMESH.FACE )], 'HIFAC' )
+
+        # Scaling down the mesh to meter units
+        if not(Scale==1.):
+                MeshEditor = MainMesh.GetMeshEditor()
+                MeshEditor.Scale( MainMesh.GetMesh(), SMESH.PointStruct( 0, 0, 0 ) ,[ Scale, Scale, Scale ], 0 )
+     
+                
+def ExtrudeMesh(MainMesh,**args):
+        """
+        This function premits to extrude and scale a 2D mesh while transforming the edge
+        groups into face groups. Moreover, the function automatically creates the face groups 
+        corresponding to the symmetry lower and upper faces
+        Facultatif arguments are : 
+                - Direction [VX,VY,VZ], z-axis being default
+                - Distance : D, default is 1
+                - NSteps : the object will be extruded by NSteps*Distance, default is Nsteps = 1
+                - Scale : BETA, no scaling being default
+        """
+        ################################################################################
+        # Reading input arguments and proceeding to defaults if necessary
+        ################################################################################              
+        if 'Distance' in args : Distance = float(args['Distance'])
+        else :
+                print "\nThe extrusion distance was not given\nA default value of 1 is used."
+                Distance = 1.
+                
+        if 'Direction' in args : Direction = NormalizeVector([float(Dir) for Dir in args['Direction']],Distance)
+        else :
+                print "\nThe extrusion vector of revolution was not given\nThe z-axis is used by default."
+                Direction = NormalizeVector([0.,0.,1.],Distance)
+                                
+        if 'Scale' in args : Scale = float(args['Scale'])
+        else : Scale = 1.
+        
+        if 'NSteps' in args : NSteps = int(args['NSteps'])
+        else : NSteps = 1
+        
+        # Creating the lower face group LOFAC
+        LOFAC = MainMesh.CreateEmptyGroup( SMESH.FACE, 'LOFAC' )
+        LOFAC.AddFrom(MainMesh.GetMesh())
+
+        GR_Names = MainMesh.GetGroupNames()
+        GRs = MainMesh.GetGroups()
+        Ext3DMeshGroups = MainMesh.ExtrusionSweepObject2D(MainMesh,SMESH.DirStruct(SMESH.PointStruct(Direction[0],Direction[1],Direction[2])), NSteps, True)
+
+        # Adding an EDGE suffix to the edge groups (to be deleted eventually by the user...)
+        for GR in GRs:
+                CurrentName = GR.GetName()
+                if CurrentName in GR_Names and not(CurrentName=='LOFAC'):  # Meaning that this is an old edge group
+                        GR.SetName(CurrentName+'_EDGE')
+
+        # Removing the _extruded suffix from the extruded FACE groups
+        for GR in Ext3DMeshGroups:
+                CurrentName = GR.GetName()
+                if CurrentName.endswith( "_extruded"):
+                        if CurrentName.startswith( 'LOFAC_' ):
+                                GR.SetName('VOL')
+                        else:
+                                GR.SetName(CurrentName[:-9])
+                elif CurrentName == 'LOFAC_top':
+                        GR.SetName('HIFAC')
+
+        # Creating the upper face group HIFAC
+        ALLFAC = MainMesh.CreateEmptyGroup( SMESH.FACE, 'ALLFAC' )
+        ALLFAC.AddFrom(MainMesh.GetMesh())
+
+        #HIFAC = MainMesh.GetMesh().CutListOfGroups( [ ALLFAC ], [LOFAC] + [ MeshGroup for MeshGroup in Ext3DMeshGroups if not(MeshGroup.GetName()=='VOL') ], 'HIFAC' )
+
+        # Scaling down the mesh to meter units
+        if not(Scale==1.):
+                MeshEditor = MainMesh.GetMeshEditor()
+                MeshEditor.Scale( MainMesh.GetMesh(), SMESH.PointStruct( 0, 0, 0 ) ,[ Scale, Scale, Scale ], 0 )
+     
+               
+def NormalizeVector (V,Norm):
+        """
+        This function returns a normalized vector (magnitude = Norm), parallel to the entered one
+        """
+        V = [float(Coor) for Coor in V]
+        Norm = float(Norm)
+        MagV = math.sqrt(V[0]*V[0]+V[1]*V[1]+V[2]*V[2])
+        return [Coor*Norm/MagV for Coor in V]
+  
diff --git a/src/Tools/MacMesh/MacMesh/SharpAngle.py b/src/Tools/MacMesh/MacMesh/SharpAngle.py
new file mode 100644 (file)
index 0000000..dd62930
--- /dev/null
@@ -0,0 +1,249 @@
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+
+# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+
+
+# This is an automation of the sharp angle object, with a corner at (X0,Y0), side length : Extension and a fine local meshing : LocalMeshing
+# The corner orientation is defined as NE (North-East) , NW (North-West), SE, or SW. The object's "arm" is 8/14 of Extension
+#                      |      |     8      6
+#               -------        ---------
+#      ---->   |                        |   <----
+#              |   NW             NE    |  oo
+#         _____|                        |_____
+
+import sys, math, commands
+CWD = commands.getoutput('pwd')
+sys.path.append(CWD)
+
+from MacObject import *
+from CompositeBox import *
+import Config, GenFunctions
+
+def SharpAngleOut (X0 , Y0 , DX , DY , DLocal, LocalMeshing , CornerOrientation , NLevels, **args) : 
+       if DLocal == 'auto' : DLocal = float(min(DX,DY))
+
+       BoxSide = DLocal/(2.**(NLevels+1))
+       InternalMeshing = int(math.ceil(BoxSide/(3*LocalMeshing)))
+       InternalMeshing = InternalMeshing+InternalMeshing%2     # An even number is needed, otherwise the objects would not be compatible once created
+       if InternalMeshing == 0 : InternalMeshing = 2           # This sets a minimum meshing condition in order to avoid an error. The user is notified of the value considered for the local meshing
+       print "Possible Local meshing is :", BoxSide/(3*InternalMeshing), "\nThis value is returned by this function for your convenience"
+
+       DirPar =     {'NE' : lambda : ['NE', 'NW', 'SE', 'EW', 'NW', 'SN', 'SN', 'NE', 'WE', 'WE', 'SE', 'NS'],
+                     'NW' : lambda : ['NW', 'NE', 'SW', 'WE', 'NE', 'SN', 'SN', 'NW', 'EW', 'EW', 'SW', 'NS'],
+                     'SE' : lambda : ['SE', 'SW', 'NE', 'EW', 'SW', 'NS', 'NS', 'SE', 'WE', 'WE', 'NE', 'SN'],
+                     'SW' : lambda : ['SW', 'SE', 'NW', 'WE', 'SE', 'NS', 'NS', 'SW', 'EW', 'EW', 'NW', 'SN'], }[CornerOrientation]()
+
+       CoefVer =   {'NE' : lambda :  1,
+                    'NW' : lambda :  1,
+                    'SE' : lambda : -1,
+                    'SW' : lambda : -1, }[CornerOrientation]()
+
+       CoefHor =   {'NE' : lambda :  1,
+                    'NW' : lambda : -1,
+                    'SE' : lambda :  1,
+                    'SW' : lambda : -1, }[CornerOrientation]()
+                     
+       ToLook  = {'NE' : lambda : [0,2,1,3],
+                  'NW' : lambda : [0,3,1,2],
+                  'SE' : lambda : [1,2,0,3],
+                  'SW' : lambda : [1,3,0,2], }[CornerOrientation]()        
+       
+        if args.__contains__('groups') :
+                GroupNames = args['groups']
+       else : GroupNames = [None, None, None, None, None, None]
+        
+        GN00 = GroupArray(ToLook[0],GroupNames[0])
+        GN01 = GroupArray(ToLook[1],GroupNames[1])
+        
+        GN1 = GroupArray([ToLook[0],ToLook[1]],[GroupNames[0],GroupNames[5]])
+        GN7 = GroupArray([ToLook[0],ToLook[1]],[GroupNames[4],GroupNames[1]])
+        
+        if DY == DLocal :
+                GN2 = GroupArray([ToLook[1],ToLook[2]],[GroupNames[5],GroupNames[2]])
+                GN3 = GroupArray(ToLook[2],GroupNames[2])
+                if DX == DLocal:
+                        GN4 = GroupArray([ToLook[2],ToLook[3]],[GroupNames[2],GroupNames[3]])
+                        GN5 = GroupArray(ToLook[3],GroupNames[3])
+                        GN6 = GroupArray([ToLook[3],ToLook[0]],[GroupNames[3],GroupNames[4]])
+                else :
+                        GN4 = GroupArray(ToLook[2],GroupNames[2])
+                        GN5 = [None,None,None,None]
+                        GN6 = GroupArray(ToLook[0],GroupNames[4])
+                        GN21 = GroupArray([ToLook[3],ToLook[0],ToLook[2]],[GroupNames[3],GroupNames[4],GroupNames[2]])
+        else :
+                GN2 = GroupArray(ToLook[1],GroupNames[5])
+                GN3 = [None,None,None,None]
+                if DX == DLocal:
+                        GN4 = GroupArray(ToLook[3],GroupNames[3])
+                        GN5 = GroupArray(ToLook[3],GroupNames[3])
+                        GN6 = GroupArray([ToLook[3],ToLook[0]],[GroupNames[3],GroupNames[4]])
+                        GN22 = GroupArray([ToLook[1],ToLook[2],ToLook[3]],[GroupNames[5],GroupNames[2],GroupNames[3]])
+                else :
+                        GN4 = [None,None,None,None]
+                        GN5 = [None,None,None,None]
+                        GN6 = GroupArray(ToLook[0],GroupNames[4])
+                        GN21 = GroupArray([ToLook[3],ToLook[0]],[GroupNames[3],GroupNames[4]])
+                        GN22 = GroupArray([ToLook[1],ToLook[2]],[GroupNames[5],GroupNames[2]])
+                        GN23 = GroupArray([ToLook[2],ToLook[3]],[GroupNames[2],GroupNames[3]])
+                        
+       Obj = []
+
+       Obj.append(MacObject('BoxAng32',[(X0+CoefHor*BoxSide/2,Y0+CoefVer*BoxSide/2),(BoxSide,BoxSide)],[InternalMeshing,DirPar[0]]))
+       Obj.append(MacObject('BoxAng32',[(X0-CoefHor*BoxSide/2,Y0+CoefVer*BoxSide/2),(BoxSide,BoxSide)],['auto',DirPar[1]], groups = GroupArray(ToLook[0],GroupNames[0])))
+       Obj.append(MacObject('BoxAng32',[(X0+CoefHor*BoxSide/2,Y0-CoefVer*BoxSide/2),(BoxSide,BoxSide)],['auto',DirPar[2]], groups = GroupArray(ToLook[1],GroupNames[1])))
+       
+       for N in range (1,NLevels+1):
+               n = N-1
+                if N < NLevels : 
+                      Obj.append(MacObject('Box42',[(X0-CoefHor*BoxSide*(2**n)*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[3]]      , groups = GN00))
+                      Obj.append(MacObject('BoxAng32',[(X0-CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[4]]               ))
+                      Obj.append(MacObject('Box42',[(X0-CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[5]]                    ))
+                      Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[6]]                    ))
+                      Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[7]]               ))
+                      Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[8]]                    ))
+                      Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0-CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[9]]                    ))
+                      Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0-CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[10]]              ))
+                      Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0-CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[11]]     , groups = GN01))
+                else :
+                      Obj.append(MacObject('Box42',[(X0-CoefHor*BoxSide*(2**n)*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[3]]      , groups = GN1))
+                      Obj.append(MacObject('BoxAng32',[(X0-CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[4]] , groups = GN2))
+                      Obj.append(MacObject('Box42',[(X0-CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[5]]      , groups = GN3))
+                      Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[6]]      , groups = GN3))
+                      Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[7]] , groups = GN4))
+                      Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[8]]      , groups = GN5))
+                      Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0-CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[9]]      , groups = GN5))
+                      Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0-CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[10]], groups = GN6))
+                      Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0-CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[11]]     , groups = GN7))
+                       
+       OuterMeshing = (3/2)*InternalMeshing*2**(NLevels-1)
+       OuterSegLength = (DLocal/OuterMeshing)
+
+       if DX > DLocal :
+               dX = DX - DLocal
+               Obj.append(MacObject('CompBoxF',[(X0+CoefHor*(DX)/2.,Y0),(dX,DLocal)],['auto'], groups = GN21))
+       if DY > DLocal :
+               dY = DY - DLocal
+               if DX > DLocal : 
+                       Obj.append(MacObject('CompBoxF',[(X0+CoefHor*DX/2.,Y0+CoefVer*(DY)/2.),(DX-DLocal,dY)],['auto'], groups = GN23))
+
+               Obj.append(MacObject('CompBoxF',[(X0,Y0+CoefVer*(DY)/2.),(DLocal,dY)],['auto'], groups = GN22))
+               
+       return Obj
+
+def SharpAngleIn (X0 , Y0 , DX , DY , DLocal, LocalMeshing , CornerOrientation , NLevels, **args) : 
+       if DLocal == 'auto' : DLocal = float(min(DX,DY))
+
+       BoxSide = DLocal/(2.**(NLevels))
+       InternalMeshing = int(math.ceil(BoxSide/(3*LocalMeshing)))
+       InternalMeshing = InternalMeshing+InternalMeshing%2     # An even number is needed, otherwise the objects would not be compatible once created
+       if InternalMeshing == 0 : InternalMeshing = 2           # This sets a minimum meshing condition in order to avoid an error. The user is notified of the value considered for the local meshing
+       print "Possible Local meshing is :", BoxSide/(3*InternalMeshing), "\nThis value is returned by this function for your convenience..."
+
+       DirPar =     {'NE' : lambda : ['NE', 'SN', 'NE', 'WE'],
+                     'NW' : lambda : ['NW', 'SN', 'NW', 'EW'],
+                     'SE' : lambda : ['SE', 'NS', 'SE', 'WE'],
+                     'SW' : lambda : ['SW', 'NS', 'SW', 'EW'], }[CornerOrientation]()
+
+       CoefVer =   {'NE' : lambda :  1,
+                    'NW' : lambda :  1,
+                    'SE' : lambda : -1,
+                    'SW' : lambda : -1, }[CornerOrientation]()
+
+       CoefHor =   {'NE' : lambda :  1,
+                    'NW' : lambda : -1,
+                    'SE' : lambda :  1,
+                    'SW' : lambda : -1, }[CornerOrientation]()
+                     
+       ToLook  = {'NE' : lambda : [0,2,1,3],
+                  'NW' : lambda : [0,3,1,2],
+                  'SE' : lambda : [1,2,0,3],
+                  'SW' : lambda : [1,3,0,2], }[CornerOrientation]()
+                                               
+        if args.__contains__('groups') :
+                GroupNames = args['groups']
+       else : GroupNames = [None, None, None, None]
+        
+        GN01 = GroupArray([ToLook[0],ToLook[1]],[GroupNames[ToLook[0]],GroupNames[ToLook[1]]])
+        GN02 = GroupArray(ToLook[1],GroupNames[ToLook[1]])        
+        GN03 = [None, None, None, None]
+        GN04 = GroupArray(ToLook[0],GroupNames[ToLook[0]])  
+
+        if DY == DLocal :
+                GN05 = GroupArray([ToLook[1],ToLook[2]],[GroupNames[ToLook[1]],GroupNames[ToLook[2]]])
+                GN08 = GroupArray([ToLook[0],ToLook[2],ToLook[3]],[GroupNames[ToLook[0]],GroupNames[ToLook[2]],GroupNames[ToLook[3]]])
+                if DX == DLocal:
+                        GN06 = GroupArray([ToLook[2],ToLook[3]],[GroupNames[ToLook[2]],GroupNames[ToLook[3]]])
+                        GN07 = GroupArray([ToLook[0],ToLook[3]],[GroupNames[ToLook[0]],GroupNames[ToLook[3]]])
+                else :
+                        GN06 = GroupArray(ToLook[2],GroupNames[ToLook[2]])
+                        GN07 = GroupArray(ToLook[0],GroupNames[ToLook[0]])
+        else :
+                GN05 = GroupArray(ToLook[1],GroupNames[ToLook[1]])
+                if DX == DLocal : 
+                        GN06 = GroupArray(ToLook[3],GroupNames[ToLook[3]])
+                        GN07 = GroupArray([ToLook[0],ToLook[3]],[GroupNames[ToLook[0]],GroupNames[ToLook[3]]])
+                        GN10 = GroupArray([ToLook[1],ToLook[2],ToLook[3]],[GroupNames[ToLook[1]],GroupNames[ToLook[2]],GroupNames[ToLook[3]]])
+                else :
+                        GN06 = [None, None, None, None]
+                        GN07 = GroupArray(ToLook[0],GroupNames[ToLook[0]])
+                        GN08 = GroupArray([ToLook[0],ToLook[3]],[GroupNames[ToLook[0]],GroupNames[ToLook[3]]])
+                        GN09 = GroupArray([ToLook[2],ToLook[3]],[GroupNames[ToLook[2]],GroupNames[ToLook[3]]])
+                        GN10 = GroupArray([ToLook[1],ToLook[2]],[GroupNames[ToLook[1]],GroupNames[ToLook[2]]])
+         
+       Obj = []
+
+       Obj.append(MacObject('BoxAng32',[(X0+CoefHor*BoxSide/2,Y0+CoefVer*BoxSide/2),(BoxSide,BoxSide)],[InternalMeshing,DirPar[0]],groups = GN01))
+       
+       for N in range (1,NLevels+1):
+               n = N-1
+                if N < NLevels : 
+                       Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[1]],groups = GN02))
+                       Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[2]],groups = GN03))
+                       Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[3]],groups = GN04))
+                else :
+                       Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[1]],groups = GN05))
+                       Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[2]],groups = GN06))
+                       Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[3]],groups = GN07))
+       OuterMeshing = (3/2)*InternalMeshing*2**(NLevels-1)
+       OuterSegLength = (DLocal/OuterMeshing)
+
+       if DX > DLocal :
+               dX = DX - DLocal
+               Obj = Obj + CompositeBox(X0+CoefHor*(DLocal+dX/2.),Y0+CoefVer*(DLocal)/2.,dX,DLocal, groups = GN08)
+       if DY > DLocal :
+               dY = DY - DLocal
+
+               if DX > DLocal : 
+                       Obj = Obj + CompositeBox(X0+CoefHor*(DLocal+(DX-DLocal)/2.),Y0+CoefVer*(DLocal+dY/2.),DX-DLocal,dY, groups = GN09)
+
+               Obj = Obj + CompositeBox(X0+CoefHor*DLocal/2,Y0+CoefVer*(DLocal+dY/2.),DLocal,dY,groups = GN10)
+
+       return Obj
+
+def GroupArray(indices, GroupNames) :
+        if type(indices) is int : 
+                indices = [indices]
+                GroupNames = [GroupNames]
+        Output = [None,None,None,None]
+        for i, ind in enumerate(indices) : 
+                Output[ind] = GroupNames[i]
+        return Output
index c02afecfc1bdf75ce85001cfcf81d8ea9a224410..5aed1ff41d16a3c47adadfe78d51dfd50fd29f63 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  EDF R&D
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4bd505ef10d27f216da2067bc9f2cd89a0ec6a2c..9eb6b11a7d6ddc091590fae27b5e9d927857dda5 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 5128f0471c368960513d5d24609787ba642bf1ff..8c5f88e67778919a9037e68f1d6d540cfb045317 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  EDF R&D
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 3bceb5a07e428ceb49b312673c83d86f7758cd66..ceb4bc118632f9a1849a71dd099e66ea2742673b 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  EDF R&D
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1b4e9c5d20f61dceff3a824d13ea0afcdc5111b9..9b43f468ad55b4711fe11ca9de1d6170f4ea1107 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  EDF R&D
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index d3700b582a147932da1f4b5a0c7b013bfe52c98d..be2d926a1021226d6cc37ce5c40a9d0a793eb446 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  EDF R&D
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 842cf22656433d74d737513e7bdb6509d28d731d..02572a17aae01007323da6b524c77731690276ae 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  EDF R&D
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index a837c726e2d789d7dd67e67527ce47277f7641d2..58e36a4f78450c95f8c601ad7e884ccfdc977ad8 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  EDF R&D
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 44bb0c20285d39f8a404d08f4a9fdd46f0c2176d..e702abbe7a4009a2e5a25a725da200b7ea62ad89 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  EDF R&D
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 716ae846e4681e07828406a853ed82db1f699237..7fb1fc1ef67871c5b307e70cc64dff3ad893c439 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  EDF R&D
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 70f02cc81ca921fa043c7c0a02d8f2a698d34b05..ca589a035ad41bd7f2b9bf2af2809cbf716d3d97 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  EDF R&D
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f0f36ca78241f0023e04660a588d79dc2367c4e1..6997cf42b5e1bf7d3d6d9aeaea75a69ec2b0c4f9 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  EDF R&D
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 01e9aa74bac152053db456bfe2f08eefb31791fd..38ec6cb7a0118b0d1ab1cb3dd8684487d063c5b5 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  EDF R&D
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index e39e1a4e36cd2ebd17e23de2fcd2f6d3bc1de85e..778728b6fed4012c2f9db2551e699a3b62c1572c 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  EDF R&D
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 0396707503c8cd3899a977800f2863861ed12bdb..7670a2606cc5061f6aff7b192280fedbde774a31 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  EDF R&D
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index dbb0967ab25c8e3da311e8a7ac015a74892b7c3c..63658e5a8409fe5cad1d9b7280b2c3fe44cd5b4e 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  EDF R&D
+// Copyright (C) 2006-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 81a43d3831d8b28710d22be9d66d7c3ffebdb639..997f72e2887dd0f0bbfc59c6a0c09eee2f274ef1 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2006-2013  EDF R&D
+# Copyright (C) 2006-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index ce7f0ae25376b6fe7573ac8229a97c2272f5a2c9..cf308ee0c3f4ffa11ab5d34c34ba0b8e50c14599 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2012-201 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 07e6537b0f38c1e91d03488236284e42a4eef761..e191ff2ca04d70765aa613726bf95658c751adae 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2007-201  EDF R&D
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 269d6d9aef9bd1f4a7cac1269a77eb7ed1548697..a71fe299748990c0a49b51fc80eb8cd4a6a5025d 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2012-201 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 838796ed2e1e424a23272b1a4b07673118e36e1f..e9c294b2551c6a54d03156ef5feaee2ff7b657c1 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2012-201 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2f96268b20b307b6ad5669ce4b14fb294306f2ae..7cb14af7ca75e951f343852e160e56fadae6718a 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2007-201  EDF R&D
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 1b6bd9075cbf08db61dfd200c9b5000eba9a6ea0..3a2437b9938099bf54666419c184e772fe081d3e 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2012-201 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index c4ca90b9b7b61dd3cd149112e3ebe6ef0fc4068e..0dfa0613df74be3abe5aa5067ec7d19891934850 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index b5341647f7f3e67b58fb45175600efba9105761e..eb5c48184ce4cf790e79d7b3fec864618f7a58eb 100644 (file)
@@ -36,7 +36,7 @@ master_doc = 'index'
 
 # General substitutions.
 project = 'Verima Plug-in'
-copyright = '2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE'
+copyright = '2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE'
 
 # The default replacements for |version| and |release|, also used in various
 # other places throughout the built documents.
index 54d8271d494d155931a5d2afc1e367f2be599583..026e2d8edc037542ed31782cf38a6822c588ca29 100644 (file)
@@ -36,7 +36,7 @@ master_doc = 'index'
 
 # General substitutions.
 project = 'Verima Plug-in'
-copyright = '2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE'
+copyright = '2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE'
 
 # The default replacements for |version| and |release|, also used in various
 # other places throughout the built documents.
index 74903ed5a26a09740252eccf8a9c431081ad9fa4..2cadddafd01ea7fac8b937c158250ed33e9c555b 100644 (file)
@@ -1,21 +1,20 @@
-#  Copyright (C) 2011 EDF R&D
+# Copyright (C) 2011-2014  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 free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
 #
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
+# 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
 #
 
 srcdir="."
index 4c170d8d67be5b7052f4ffc56e0a374105333797..e905750d6018d9bf0e0c2d36921ed4d22331d6f8 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index b6ea681fb4a0696c74769cada70bbe7890ce4c21..38b413ea3fa1defab7a0b93c47765e18ecd1a5fb 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2007-201  EDF R&D
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 30c77d90f90aa6a63faf7c35d56dd3d7aea56cd0..0ccd41e6f71266fa35cb0ad6ed9484ee0a2807e2 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2012-201 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 56ff1da4216d455796ea9876460046d1d2449ac9..d38d82790e57e3d513fab28c49b3b01643043ea7 100644 (file)
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 
 ###
-### Copyright EDF R&D 2012
+### Copyright EDF R&D 2012-2014
 ###
 ### Gérald NICOLAS
 ### (33/0)1.47.65.56.94
index 3deee6f3a547b9b65bf9574ddda0fe6f62dfd0ed..50da5101182cdd83ec80d1dcee5e8b203871469f 100644 (file)
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
 Maillage du tunnel
-Copyright EDF R&D 2012, 2013
+Copyright EDF R&D 2012-2014
 
  Gérald NICOLAS
  (+33/0)1.47.65.56.94
index 85fa6aa227c74d8f1547581a7b2fe2c114909fee..3acbf933e8669ab2f5ee9533b83fdc3d8b533562 100644 (file)
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 
 ###
-### Copyright EDF R&D 2012
+### Copyright EDF R&D 2012-2014
 ###
 ### Gérald NICOLAS
 ### (33/0)1.47.65.56.94
index 3deee6f3a547b9b65bf9574ddda0fe6f62dfd0ed..50da5101182cdd83ec80d1dcee5e8b203871469f 100644 (file)
@@ -1,7 +1,7 @@
 # -*- coding: iso-8859-1 -*-
 """
 Maillage du tunnel
-Copyright EDF R&D 2012, 2013
+Copyright EDF R&D 2012-2014
 
  Gérald NICOLAS
  (+33/0)1.47.65.56.94
index 8a5d7e3f9c736bb93f4ca99136fa39de382cdaab..f53e313ee664b7dbac8b4b7c361f37faaac2d455 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2012-201 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 2f96268b20b307b6ad5669ce4b14fb294306f2ae..7cb14af7ca75e951f343852e160e56fadae6718a 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2007-201  EDF R&D
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 88f6aa847fff89ea7a88e5eb990ab344b756df2d..fd66d218a3706ec9836fb858b9483bd6052b1664 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2007-201  EDF R&D
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 7efe46b58d04c97e5ff00332f1f72c9a70568c39..aaa6bd1826a667c408391bf3db982f3860f99170 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index dffc3f9a32bc8f60625a88fa9874e68ce421c2b2..b62b187130283577506a939b966d9d36a1a4540f 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index dedf61b45186af6f9f1e6cc31f63939ef80d7343..a49c3ab61d42d3fcdc93987ec308dd58af9b0775 100644 (file)
@@ -36,7 +36,7 @@ master_doc = 'index'
 
 # General substitutions.
 project = 'MeshGems-SurfOpt Plug-in'
-copyright = '2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE'
+copyright = '2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE'
 
 # The default replacements for |version| and |release|, also used in various
 # other places throughout the built documents.
index 5402841b8d99c6556915a67291f940bbb95d068d..d3061e688fac58f2e5f94f8e2473a31576086d36 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2007-2013  EDF R&D
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 076030b594b516e6f31c58579a95bd7c843c41ec..7f43838c450cd950f209b5d4244041b1b6c6c5ed 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2007-2013  EDF R&D
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index f61ed050f9225cff5fc8008d22243c83baf2d227..94a4cd9fe2b5d0d8ef0a31e328b0f7d8b58a989c 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2006-2013  EDF R&D
+# Copyright (C) 2006-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/Tools/ZCracksPlug/CMakeLists.txt b/src/Tools/ZCracksPlug/CMakeLists.txt
new file mode 100644 (file)
index 0000000..07cbf93
--- /dev/null
@@ -0,0 +1,33 @@
+# Copyright (C) 2012-2013  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
+#
+
+
+
+# --- scripts ---
+
+# scripts / static
+SET(plugin_SCRIPTS
+   zcracks_plugin.py
+)
+
+
+# --- rules ---
+
+SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS})
+
diff --git a/src/Tools/ZCracksPlug/zcracks_plugin.py b/src/Tools/ZCracksPlug/zcracks_plugin.py
new file mode 100644 (file)
index 0000000..85ced69
--- /dev/null
@@ -0,0 +1,38 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2006-2013  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
+#
+
+import SalomePyQt
+sgPyQt = SalomePyQt.SalomePyQt()
+import eficasSalome
+
+class EficasForZcracks(eficasSalome.MyEficas):
+    """
+    """
+    def __init__(self, fichier = None, version = None):
+        eficasSalome.MyEficas.__init__(self, sgPyQt.getDesktop(),
+                                       "ZCRACKS",
+                                       fichier, version = version)
+        #sgPyQt.createView(custom_appli.widgetname, self)
+
+
+def ZcracksLct(context):
+  
+  window=EficasForZcracks()
+  window.show()
diff --git a/src/Tools/blocFissure/CMakeLists.txt b/src/Tools/blocFissure/CMakeLists.txt
new file mode 100644 (file)
index 0000000..4620174
--- /dev/null
@@ -0,0 +1,40 @@
+# Copyright (C) 2012-2014  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, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+ADD_SUBDIRECTORY(CasTests)
+ADD_SUBDIRECTORY(gmu)
+ADD_SUBDIRECTORY(materielCasTests)
+
+IF(SALOME_BUILD_GUI)
+  ADD_SUBDIRECTORY(ihm)
+ENDIF(SALOME_BUILD_GUI)
+
+# --- scripts ---
+
+# scripts / static
+SET(plugin_SCRIPTS
+  __init__.py
+  casStandard.py
+  exemple.py
+  exemple2.py
+)
+
+# --- rules ---
+
+SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/blocFissure)
diff --git a/src/Tools/blocFissure/CasTests/CMakeLists.txt b/src/Tools/blocFissure/CasTests/CMakeLists.txt
new file mode 100644 (file)
index 0000000..3cf970a
--- /dev/null
@@ -0,0 +1,55 @@
+# Copyright (C) 2012-2014  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, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# --- scripts ---
+
+# scripts / static
+SET(plugin_SCRIPTS
+  __init__.py
+  cubeAngle2.py
+  cubeAngle.py
+  cylindre_2.py
+  cylindre.py
+  disquePerce.py
+  ellipse_1.py
+  ellipse_2.py
+  eprouvetteCourbe.py
+  eprouvetteDroite_2.py
+  eprouvetteDroite.py
+  execution_Cas.py
+  faceGauche_2.py
+  faceGauche.py
+  fissureCoude_10.py
+  fissureCoude_1.py
+  fissureCoude_2.py
+  fissureCoude_3.py
+  fissure_Coude_4.py
+  fissureCoude_4.py
+  fissureCoude_5.py
+  fissureCoude_6.py
+  fissureCoude_7.py
+  fissureCoude_8.py
+  fissureCoude_9.py
+  fissure_Coude.py
+  vis_1.py
+)
+
+# --- rules ---
+
+SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/blocFissure/CasTests)
diff --git a/src/Tools/blocFissure/CasTests/__init__.py b/src/Tools/blocFissure/CasTests/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/Tools/blocFissure/CasTests/cubeAngle.py b/src/Tools/blocFissure/CasTests/cubeAngle.py
new file mode 100644 (file)
index 0000000..579d241
--- /dev/null
@@ -0,0 +1,103 @@
+# -*- coding: utf-8 -*-
+
+import os
+from blocFissure import gmu
+from blocFissure.gmu.geomsmesh import geompy, smesh
+
+import math
+import GEOM
+import SALOMEDS
+import SMESH
+#import StdMeshers
+#import GHS3DPlugin
+#import NETGENPlugin
+import logging
+
+from blocFissure.gmu.fissureGenerique import fissureGenerique
+
+from blocFissure.gmu.triedreBase import triedreBase
+from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
+from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
+from blocFissure.gmu.insereFissureGenerale import insereFissureGenerale
+
+O, OX, OY, OZ = triedreBase()
+
+class cubeAngle(fissureGenerique):
+  """
+  problème de fissure plane coupant 2 faces (angle), débouches normaux, objet plan
+  """
+
+  nomProbleme = "cubeAngle"
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageSain(self, geometriesSaines, meshParams):
+    logging.info("genereMaillageSain %s", self.nomCas)
+
+    ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, 'materielCasTests/CubeAngle.med'))
+    smesh.SetName(objetSain.GetMesh(), 'objetSain')
+
+    return [objetSain, True] # True : maillage hexa
+
+  # ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour méthode insereFissureGenerale
+    lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage)
+    rayonPipe   : le rayon du pile maillé en hexa autour du fond de fissure
+    """
+    logging.info("setParamShapeFissure %s", self.nomCas)
+    self.shapeFissureParams = dict(lgInfluence = 20,
+                                   rayonPipe   = 10)
+
+  # ---------------------------------------------------------------------------
+  def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
+    logging.info("genereShapeFissure %s", self.nomCas)
+
+    lgInfluence = shapeFissureParams['lgInfluence']
+
+    shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/CubeAngleFiss.brep"), "BREP")
+    fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
+    geompy.UnionIDs(fondFiss, [4])
+    geompy.addToStudy( shellFiss, 'shellFiss' )
+    geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
+
+
+    coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10)
+
+    centre = None
+    return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    self.maillageFissureParams = dict(nomRep           = '.',
+                                      nomFicSain       = self.nomCas,
+                                      nomFicFissure    = 'fissure_' + self.nomCas,
+                                      nbsegRad         = 5,
+                                      nbsegCercle      = 8,
+                                      areteFaceFissure = 10)
+
+  # ---------------------------------------------------------------------------
+  def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
+    elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
+    return elementsDefaut
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageFissure(self, geometriesSaines, maillagesSains,
+                            shapesFissure, shapeFissureParams,
+                            maillageFissureParams, elementsDefaut, step):
+    maillageFissure = insereFissureGenerale(maillagesSains,
+                                            shapesFissure, shapeFissureParams,
+                                            maillageFissureParams, elementsDefaut, step)
+    return maillageFissure
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 204,
+                                          Entity_Quad_Triangle   = 336,
+                                          Entity_Quad_Edge       = 278,
+                                          Entity_Quad_Penta      = 96,
+                                          Entity_Quad_Hexa       = 3651,
+                                          Entity_Node            = 20490,
+                                          Entity_Quad_Tetra      = 1877,
+                                          Entity_Quad_Quadrangle = 1702)
+
diff --git a/src/Tools/blocFissure/CasTests/cubeAngle2.py b/src/Tools/blocFissure/CasTests/cubeAngle2.py
new file mode 100644 (file)
index 0000000..a33fc2a
--- /dev/null
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+
+from cubeAngle import cubeAngle
+
+class cubeAngle2(cubeAngle):
+  """
+  problème de fissure plane coupant 2 faces (angle), débouches normaux, objet plan
+  detection d'un probleme de tolerance sur les edges de jonction pipe et face fissure externe 
+  """
+
+  nomProbleme = "cubeAngle2"
+
+  # ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour méthode insereFissureGenerale
+    lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage)
+    rayonPipe   : le rayon du pile maillé en hexa autour du fond de fissure
+    """
+    self.shapeFissureParams = dict(lgInfluence = 20,
+                                   rayonPipe   = 5)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    self.maillageFissureParams = dict(nomRep           = '.',
+                                      nomFicSain       = self.nomCas,
+                                      nomFicFissure    = 'fissure_' + self.nomCas,
+                                      nbsegRad         = 5,
+                                      nbsegCercle      = 32,
+                                      areteFaceFissure = 5)
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 748,
+                                          Entity_Quad_Triangle   = 1228,
+                                          Entity_Quad_Edge       = 351,
+                                          Entity_Quad_Penta      = 640,
+                                          Entity_Quad_Hexa       = 5827,
+                                          Entity_Node            = 42865,
+                                          Entity_Quad_Tetra      = 9216,
+                                          Entity_Quad_Quadrangle = 2518)
+
diff --git a/src/Tools/blocFissure/CasTests/cylindre.py b/src/Tools/blocFissure/CasTests/cylindre.py
new file mode 100644 (file)
index 0000000..87657a1
--- /dev/null
@@ -0,0 +1,107 @@
+# -*- coding: utf-8 -*-
+
+import os
+from blocFissure import gmu
+from blocFissure.gmu.geomsmesh import geompy, smesh
+
+import math
+import GEOM
+import SALOMEDS
+import SMESH
+#import StdMeshers
+#import GHS3DPlugin
+#import NETGENPlugin
+import logging
+
+from blocFissure.gmu.fissureGenerique import fissureGenerique
+
+from blocFissure.gmu.triedreBase import triedreBase
+from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
+from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
+from blocFissure.gmu.insereFissureGenerale import insereFissureGenerale
+
+O, OX, OY, OZ = triedreBase()
+
+class cylindre(fissureGenerique):
+  """
+  problème de fissure plane sur cylindre, grand fond de fissure en arc de cercle
+  """
+
+  nomProbleme = "cylindre"
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageSain(self, geometriesSaines, meshParams):
+    """
+    génère le maillage de l'objet sain, par chargement d'un fichier med
+    ici, les paramètres de géométrie et de maillage ne sont pas utiles
+    """
+    logging.info("genereMaillageSain %s", self.nomCas)
+
+    ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests/CylindreSain.med"))
+    smesh.SetName(objetSain.GetMesh(), 'objetSain')
+
+    return [objetSain, True] # True : maillage hexa
+
+  # ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour méthode insereFissureGenerale
+    lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage)
+    rayonPipe   : le rayon du pile maillé en hexa autour du fond de fissure
+    """
+    logging.info("setParamShapeFissure %s", self.nomCas)
+    self.shapeFissureParams = dict(lgInfluence = 20,
+                                   rayonPipe   = 5)
+
+  # ---------------------------------------------------------------------------
+  def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
+    logging.info("genereShapeFissure %s", self.nomCas)
+
+    lgInfluence = shapeFissureParams['lgInfluence']
+
+    shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/FissInCylindre2.brep"), "BREP")
+    fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
+    geompy.UnionIDs(fondFiss, [7])
+    geompy.addToStudy( shellFiss, 'shellFiss' )
+    geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
+
+
+    coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,15)
+
+    centre = None
+    return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    self.maillageFissureParams = dict(nomRep           = '.',
+                                      nomFicSain       = self.nomCas,
+                                      nomFicFissure    = 'fissure_' + self.nomCas,
+                                      nbsegRad         = 5,
+                                      nbsegCercle      = 8,
+                                      areteFaceFissure = 20)
+
+  # ---------------------------------------------------------------------------
+  def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
+    elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
+    return elementsDefaut
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageFissure(self, geometriesSaines, maillagesSains,
+                            shapesFissure, shapeFissureParams,
+                            maillageFissureParams, elementsDefaut, step):
+    maillageFissure = insereFissureGenerale(maillagesSains,
+                                            shapesFissure, shapeFissureParams,
+                                            maillageFissureParams, elementsDefaut, step)
+    return maillageFissure
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 1270,
+                                          Entity_Quad_Triangle   = 1260,
+                                          Entity_Quad_Edge       = 758,
+                                          Entity_Quad_Penta      = 496,
+                                          Entity_Quad_Hexa       = 18814,
+                                          Entity_Node            = 113313,
+                                          Entity_Quad_Tetra      = 20469,
+                                          Entity_Quad_Quadrangle = 7280)
+
diff --git a/src/Tools/blocFissure/CasTests/cylindre_2.py b/src/Tools/blocFissure/CasTests/cylindre_2.py
new file mode 100644 (file)
index 0000000..e2023fe
--- /dev/null
@@ -0,0 +1,56 @@
+# -*- coding: utf-8 -*-
+
+import os
+from blocFissure import gmu
+from blocFissure.gmu.geomsmesh import geompy, smesh
+
+import math
+import GEOM
+import SALOMEDS
+import SMESH
+import logging
+
+from cylindre import cylindre
+
+from blocFissure.gmu.triedreBase import triedreBase
+from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
+from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
+from blocFissure.gmu.insereFissureGenerale import insereFissureGenerale
+
+O, OX, OY, OZ = triedreBase()
+
+class cylindre_2(cylindre):
+  """
+  problème de fissure plane sur cylindre hexa, fond de fissure complexe : polyline
+  """
+  nomProbleme = "cylindre2"
+
+  # ---------------------------------------------------------------------------
+  def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
+    logging.info("genereShapeFissure %s", self.nomCas)
+
+    lgInfluence = shapeFissureParams['lgInfluence']
+
+    shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/FissInCylindre.brep"), "BREP")
+    fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
+    geompy.UnionIDs(fondFiss, [3])
+    geompy.addToStudy( shellFiss, 'shellFiss' )
+    geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
+
+
+    coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,15)
+
+    centre = None
+    return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 1334,
+                                          Entity_Quad_Triangle   = 1432,
+                                          Entity_Quad_Edge       = 785,
+                                          Entity_Quad_Penta      = 560,
+                                          Entity_Quad_Hexa       = 19070,
+                                          Entity_Node            = 114290,
+                                          Entity_Quad_Tetra      = 19978,
+                                          Entity_Quad_Quadrangle = 7424)
+
diff --git a/src/Tools/blocFissure/CasTests/disquePerce.py b/src/Tools/blocFissure/CasTests/disquePerce.py
new file mode 100644 (file)
index 0000000..5c4b63f
--- /dev/null
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+
+import os
+from blocFissure import gmu
+
+dicoParams = dict(nomCas            = 'disque',
+                  maillageSain      = os.path.join(gmu.pathBloc, 'materielCasTests/disque.med'),
+                  brepFaceFissure   = os.path.join(gmu.pathBloc, "materielCasTests/ellipse_disque.brep"),
+                  edgeFissIds       = [4],
+                  lgInfluence       = 10,
+                  meshBrep          = (0.5,2.5),
+                  rayonPipe         = 1.0,
+                  lenSegPipe        = 1.5,
+                  nbSegRad          = 6,
+                  nbSegCercle       = 16,
+                  areteFaceFissure  = 2.5)
+
+  # ---------------------------------------------------------------------------
+
+referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 610,
+                                 Entity_Quad_Triangle   = 1284,
+                                 Entity_Quad_Edge       = 393,
+                                 Entity_Quad_Penta      = 592,
+                                 Entity_Quad_Hexa       = 6952,
+                                 Entity_Node            = 51119,
+                                 Entity_Quad_Tetra      = 11672,
+                                 Entity_Quad_Quadrangle = 3000)
+
diff --git a/src/Tools/blocFissure/CasTests/ellipse_1.py b/src/Tools/blocFissure/CasTests/ellipse_1.py
new file mode 100644 (file)
index 0000000..00eef0d
--- /dev/null
@@ -0,0 +1,111 @@
+# -*- coding: utf-8 -*-
+
+import os
+from blocFissure import gmu
+from blocFissure.gmu.geomsmesh import geompy, smesh
+
+import math
+import GEOM
+import SALOMEDS
+import SMESH
+#import StdMeshers
+#import GHS3DPlugin
+#import NETGENPlugin
+import logging
+
+from blocFissure.gmu.fissureGenerique import fissureGenerique
+
+from blocFissure.gmu.triedreBase import triedreBase
+from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
+from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
+from blocFissure.gmu.insereFissureGenerale import insereFissureGenerale
+
+O, OX, OY, OZ = triedreBase()
+
+class ellipse_1(fissureGenerique):
+  """
+  problème de fissure non plane, débouchante non normale
+  """
+
+  nomProbleme = "ellipse1"
+
+#  # ---------------------------------------------------------------------------
+#  def genereGeometrieSaine(self, geomParams):
+#    logging.info("genereGeometrieSaine %s", self.nomCas)
+#    box = geompy.MakeBox(0, -500, 0, 400, 500, 800, "boiteSaine")
+#    return [box]
+    
+  # ---------------------------------------------------------------------------
+  def genereMaillageSain(self, geometriesSaines, meshParams):
+    logging.info("genereMaillageSain %s", self.nomCas)
+
+    ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests/boiteSaine.med"))
+    smesh.SetName(objetSain.GetMesh(), 'objetSain')
+
+    return [objetSain, True] # True : maillage hexa
+
+  # ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour méthode insereFissureGenerale
+    lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage)
+    rayonPipe   : le rayon du pile maillé en hexa autour du fond de fissure
+    convexe     : optionnel, True : la face est convexe (vue de l'exterieur) sert si on ne donne pas de point interne
+    pointIn_x   : optionnel, coordonnée x d'un point dans le solide sain (pour orienter la face)
+    """
+    logging.info("setParamShapeFissure %s", self.nomCas)
+    self.shapeFissureParams = dict(lgInfluence = 50,
+                                   rayonPipe   = 20)
+
+  # ---------------------------------------------------------------------------
+  def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
+    logging.info("genereShapeFissure %s", self.nomCas)
+
+    lgInfluence = shapeFissureParams['lgInfluence']
+
+    shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/ellipse1.brep"), "BREP")
+    fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
+    geompy.UnionIDs(fondFiss, [4])
+    geompy.addToStudy( shellFiss, 'shellFiss' )
+    geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
+
+
+    coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25)
+
+    centre = None
+    return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    self.maillageFissureParams = dict(nomRep           = '.',
+                                      nomFicSain       = self.nomCas,
+                                      nomFicFissure    = 'fissure_' + self.nomCas,
+                                      nbsegRad         = 5,
+                                      nbsegCercle      = 8,
+                                      areteFaceFissure = 1000)
+
+  # ---------------------------------------------------------------------------
+  def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
+    elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
+    return elementsDefaut
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageFissure(self, geometriesSaines, maillagesSains,
+                            shapesFissure, shapeFissureParams,
+                            maillageFissureParams, elementsDefaut, step):
+    maillageFissure = insereFissureGenerale(maillagesSains,
+                                            shapesFissure, shapeFissureParams,
+                                            maillageFissureParams, elementsDefaut, step)
+    return maillageFissure
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 175,
+                                          Entity_Quad_Triangle   = 298,
+                                          Entity_Quad_Edge       = 248,
+                                          Entity_Quad_Penta      = 96,
+                                          Entity_Quad_Hexa       = 3699,
+                                          Entity_Node            = 20741,
+                                          Entity_Quad_Tetra      = 1979,
+                                          Entity_Quad_Quadrangle = 1694)
+
diff --git a/src/Tools/blocFissure/CasTests/ellipse_2.py b/src/Tools/blocFissure/CasTests/ellipse_2.py
new file mode 100644 (file)
index 0000000..15e0c1b
--- /dev/null
@@ -0,0 +1,59 @@
+# -*- coding: utf-8 -*-
+
+import os
+from blocFissure import gmu
+from blocFissure.gmu.geomsmesh import geompy, smesh
+
+import math
+import GEOM
+import SALOMEDS
+import SMESH
+#import StdMeshers
+#import GHS3DPlugin
+#import NETGENPlugin
+import logging
+
+from ellipse_1 import ellipse_1
+
+from blocFissure.gmu.triedreBase import triedreBase
+from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
+from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
+from blocFissure.gmu.insereFissureGenerale import insereFissureGenerale
+
+O, OX, OY, OZ = triedreBase()
+
+class ellipse_2(ellipse_1):
+  """
+  problème de fissure non plane, débouchante non normale
+  """
+
+  nomProbleme = "ellipse2"
+
+  # ---------------------------------------------------------------------------
+  def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
+    logging.info("genereShapeFissure %s", self.nomCas)
+
+    lgInfluence = shapeFissureParams['lgInfluence']
+
+    shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/ellipse1_pb.brep"), "BREP")
+    fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
+    geompy.UnionIDs(fondFiss, [4])
+    geompy.addToStudy( shellFiss, 'shellFiss' )
+    geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
+
+
+    coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25)
+
+    centre = None
+    return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 159,
+                                          Entity_Quad_Triangle   = 438,
+                                          Entity_Quad_Edge       = 249,
+                                          Entity_Quad_Penta      = 80,
+                                          Entity_Quad_Hexa       = 3635,
+                                          Entity_Node            = 20519,
+                                          Entity_Quad_Tetra      = 1973,
+                                          Entity_Quad_Quadrangle = 1658)
diff --git a/src/Tools/blocFissure/CasTests/eprouvetteCourbe.py b/src/Tools/blocFissure/CasTests/eprouvetteCourbe.py
new file mode 100644 (file)
index 0000000..66f9774
--- /dev/null
@@ -0,0 +1,105 @@
+# -*- coding: utf-8 -*-
+
+import os
+from blocFissure import gmu
+from blocFissure.gmu.geomsmesh import geompy, smesh
+
+import math
+import GEOM
+import SALOMEDS
+import SMESH
+#import StdMeshers
+#import GHS3DPlugin
+#import NETGENPlugin
+import logging
+
+from blocFissure.gmu.fissureGenerique import fissureGenerique
+
+from blocFissure.gmu.triedreBase import triedreBase
+from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
+from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
+from blocFissure.gmu.insereFissureGenerale import insereFissureGenerale
+
+O, OX, OY, OZ = triedreBase()
+
+class eprouvetteCourbe(fissureGenerique):
+  """
+  problème de fissure plane coupant 3 faces (éprouvette), faces au débouché non planes, incidence presque normale
+  """
+
+  nomProbleme = "eprouvetteCourbe"
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageSain(self, geometriesSaines, meshParams):
+    logging.info("genereMaillageSain %s", self.nomCas)
+
+    ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteCourbe.med"))
+    smesh.SetName(objetSain.GetMesh(), 'objetSain')
+
+    return [objetSain, True] # True : maillage hexa
+
+  # ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour méthode insereFissureGenerale
+    lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage)
+    rayonPipe   : le rayon du pile maillé en hexa autour du fond de fissure
+    convexe     : optionnel True : la face est convexe (vue de l'exterieur) sert si on ne donne pas de point interne
+    pointIn_x   : optionnel coordonnée x d'un point dans le solide sain (pour orienter la face)
+    """
+    logging.info("setParamShapeFissure %s", self.nomCas)
+    self.shapeFissureParams = dict(lgInfluence = 30,
+                                   rayonPipe   = 10)
+
+  # ---------------------------------------------------------------------------
+  def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
+    logging.info("genereShapeFissure %s", self.nomCas)
+
+    lgInfluence = shapeFissureParams['lgInfluence']
+
+    shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteCourbeFiss.brep"), "BREP")
+    fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
+    geompy.UnionIDs(fondFiss, [8])
+    geompy.addToStudy( shellFiss, 'shellFiss' )
+    geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
+
+
+    coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10)
+
+    centre = None
+    return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    self.maillageFissureParams = dict(nomRep           = '.',
+                                      nomFicSain       = self.nomCas,
+                                      nomFicFissure    = 'fissure_' + self.nomCas,
+                                      nbsegRad         = 5,
+                                      nbsegCercle      = 8,
+                                      areteFaceFissure = 15)
+
+  # ---------------------------------------------------------------------------
+  def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
+    elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
+    return elementsDefaut
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageFissure(self, geometriesSaines, maillagesSains,
+                            shapesFissure, shapeFissureParams,
+                            maillageFissureParams, elementsDefaut, step):
+    maillageFissure = insereFissureGenerale(maillagesSains,
+                                            shapesFissure, shapeFissureParams,
+                                            maillageFissureParams, elementsDefaut, step)
+    return maillageFissure
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 618,
+                                          Entity_Quad_Triangle   = 1224,
+                                          Entity_Quad_Edge       = 578,
+                                          Entity_Quad_Penta      = 168,
+                                          Entity_Quad_Hexa       = 18342,
+                                          Entity_Node            = 98170,
+                                          Entity_Quad_Tetra      = 10809,
+                                          Entity_Quad_Quadrangle = 5408)
+
diff --git a/src/Tools/blocFissure/CasTests/eprouvetteDroite.py b/src/Tools/blocFissure/CasTests/eprouvetteDroite.py
new file mode 100644 (file)
index 0000000..8e08dd8
--- /dev/null
@@ -0,0 +1,107 @@
+# -*- coding: utf-8 -*-
+
+import os
+from blocFissure import gmu
+from blocFissure.gmu.geomsmesh import geompy, smesh
+
+import os
+import math
+import GEOM
+import SALOMEDS
+import SMESH
+#import StdMeshers
+#import GHS3DPlugin
+#import NETGENPlugin
+import logging
+
+from blocFissure.gmu.fissureGenerique import fissureGenerique
+
+from blocFissure.gmu.triedreBase import triedreBase
+from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
+from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
+from blocFissure.gmu.insereFissureGenerale import insereFissureGenerale
+
+O, OX, OY, OZ = triedreBase()
+
+class eprouvetteDroite(fissureGenerique):
+  """
+  problème de fissure plane coupant 3 faces (éprouvette), débouches normaux, objet plan
+  """
+
+  nomProbleme = "eprouvetteDroite"
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageSain(self, geometriesSaines, meshParams):
+    logging.info("genereMaillageSain %s", self.nomCas)
+
+    ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests/eprouvetteDroite.med"))
+    smesh.SetName(objetSain.GetMesh(), 'objetSain')
+
+    return [objetSain, True] # True : maillage hexa
+
+  # ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour méthode insereFissureGenerale
+    lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage)
+    rayonPipe   : le rayon du pile maillé en hexa autour du fond de fissure
+    convexe     : optionnel True : la face est convexe (vue de l'exterieur) sert si on ne donne pas de point interne
+    pointIn_x   : optionnel coordonnée x d'un point dans le solide sain (pour orienter la face)
+    """
+    logging.info("setParamShapeFissure %s", self.nomCas)
+    self.shapeFissureParams = dict(lgInfluence = 30,
+                                   rayonPipe   = 10,
+                                   lenSegPipe  = 6)
+
+  # ---------------------------------------------------------------------------
+  def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
+    logging.info("genereShapeFissure %s", self.nomCas)
+
+    lgInfluence = shapeFissureParams['lgInfluence']
+
+    shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFiss_1.brep"), "BREP")
+    fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
+    geompy.UnionIDs(fondFiss, [8])
+    geompy.addToStudy( shellFiss, 'shellFiss' )
+    geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
+
+
+    coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10)
+
+    centre = None
+    return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    self.maillageFissureParams = dict(nomRep           = '.',
+                                      nomFicSain       = self.nomCas,
+                                      nomFicFissure    = 'fissure_' + self.nomCas,
+                                      nbsegRad         = 5,
+                                      nbsegCercle      = 8,
+                                      areteFaceFissure = 15)
+
+  # ---------------------------------------------------------------------------
+  def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
+    elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
+    return elementsDefaut
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageFissure(self, geometriesSaines, maillagesSains,
+                            shapesFissure, shapeFissureParams,
+                            maillageFissureParams, elementsDefaut, step):
+    maillageFissure = insereFissureGenerale(maillagesSains,
+                                            shapesFissure, shapeFissureParams,
+                                            maillageFissureParams, elementsDefaut, step)
+    return maillageFissure
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 368,
+                                          Entity_Quad_Triangle   = 798,
+                                          Entity_Quad_Edge       = 491,
+                                          Entity_Quad_Penta      = 88,
+                                          Entity_Quad_Hexa       = 9692,
+                                          Entity_Node            = 52652,
+                                          Entity_Quad_Tetra      = 5093,
+                                          Entity_Quad_Quadrangle = 3750)
+
diff --git a/src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py b/src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py
new file mode 100644 (file)
index 0000000..de55fd2
--- /dev/null
@@ -0,0 +1,60 @@
+# -*- coding: utf-8 -*-
+
+import os
+from blocFissure import gmu
+from blocFissure.gmu.geomsmesh import geompy, smesh
+
+import math
+import GEOM
+import SALOMEDS
+import SMESH
+#import StdMeshers
+#import GHS3DPlugin
+#import NETGENPlugin
+import logging
+
+from eprouvetteDroite import eprouvetteDroite
+
+from blocFissure.gmu.triedreBase import triedreBase
+from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
+from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
+from blocFissure.gmu.insereFissureGenerale import insereFissureGenerale
+
+O, OX, OY, OZ = triedreBase()
+
+class eprouvetteDroite_2(eprouvetteDroite):
+  """
+  problème de fissure plane coupant 3 faces (éprouvette), débouches non normaux, objet plan
+  """
+
+  nomProbleme = "eprouvetteDroite2"
+
+  # ---------------------------------------------------------------------------
+  def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
+    logging.info("genereShapeFissure %s", self.nomCas)
+
+    lgInfluence = shapeFissureParams['lgInfluence']
+
+    shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFiss_2.brep"), "BREP")
+    fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
+    geompy.UnionIDs(fondFiss, [10])
+    geompy.addToStudy( shellFiss, 'shellFiss' )
+    geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
+
+
+    coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10)
+
+    centre = None
+    return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 396,
+                                          Entity_Quad_Triangle   = 1084,
+                                          Entity_Quad_Edge       = 510,
+                                          Entity_Quad_Penta      = 96,
+                                          Entity_Quad_Hexa       = 9504,
+                                          Entity_Node            = 55482,
+                                          Entity_Quad_Tetra      = 7545,
+                                          Entity_Quad_Quadrangle = 3724)
+
diff --git a/src/Tools/blocFissure/CasTests/execution_Cas.py b/src/Tools/blocFissure/CasTests/execution_Cas.py
new file mode 100644 (file)
index 0000000..2d7b80d
--- /dev/null
@@ -0,0 +1,127 @@
+# -*- coding: utf-8 -*-
+
+import sys, traceback
+from blocFissure import gmu
+from blocFissure.gmu import initLog
+#initLog.setDebug()
+initLog.setVerbose()
+
+from blocFissure.gmu import geomsmesh
+from blocFissure.casStandard import casStandard
+
+problemes = []
+
+cas=0
+from blocFissure.CasTests.fissure_Coude import fissure_Coude
+problemes.append(fissure_Coude(cas))
+
+cas=1
+from blocFissure.CasTests.faceGauche import faceGauche
+problemes.append(faceGauche(cas))
+
+cas=2
+from blocFissure.CasTests.faceGauche_2 import faceGauche_2
+problemes.append(faceGauche_2(cas))
+
+cas=3
+from blocFissure.CasTests.ellipse_1 import ellipse_1
+problemes.append(ellipse_1(cas))
+
+cas=4
+from blocFissure.CasTests.fissure_Coude_4 import fissure_Coude_4
+problemes.append(fissure_Coude_4(cas))
+
+cas=5
+from blocFissure.CasTests.cylindre import cylindre
+problemes.append(cylindre(cas))
+
+cas=6
+from blocFissure.CasTests.cylindre_2 import cylindre_2
+problemes.append(cylindre_2(cas))
+
+cas=7
+from blocFissure.CasTests.eprouvetteCourbe import eprouvetteCourbe
+problemes.append(eprouvetteCourbe(cas))
+
+cas=8
+from blocFissure.CasTests.eprouvetteDroite import eprouvetteDroite
+problemes.append(eprouvetteDroite(cas))
+
+cas=9
+from blocFissure.CasTests.eprouvetteDroite_2 import eprouvetteDroite_2
+problemes.append(eprouvetteDroite_2(cas))
+
+cas=10
+from blocFissure.CasTests.cubeAngle import cubeAngle
+problemes.append(cubeAngle(cas))
+
+cas=11
+from blocFissure.CasTests.fissureCoude_1 import fissureCoude_1
+problemes.append(fissureCoude_1(cas))
+
+cas=12
+from blocFissure.CasTests.fissureCoude_2 import fissureCoude_2
+problemes.append(fissureCoude_2(cas))
+
+cas=13
+from blocFissure.CasTests.fissureCoude_3 import fissureCoude_3
+problemes.append(fissureCoude_3(cas))
+
+cas=14
+from blocFissure.CasTests.fissureCoude_4 import fissureCoude_4
+problemes.append(fissureCoude_4(cas))
+
+cas=15
+from blocFissure.CasTests.fissureCoude_5 import fissureCoude_5
+problemes.append(fissureCoude_5(cas))
+
+cas=16
+from blocFissure.CasTests.ellipse_2 import ellipse_2
+problemes.append(ellipse_2(cas))
+
+cas=17
+from blocFissure.CasTests.cubeAngle2 import cubeAngle2
+problemes.append(cubeAngle2(cas))
+
+cas=18
+from blocFissure.CasTests import disquePerce
+problemes.append(casStandard(disquePerce.dicoParams, disquePerce.referencesMaillageFissure, cas))
+
+cas=19
+from blocFissure.CasTests.fissureCoude_6 import fissureCoude_6
+problemes.append(fissureCoude_6(cas))
+
+cas=20
+from blocFissure.CasTests.fissureCoude_7 import fissureCoude_7
+problemes.append(fissureCoude_7(cas))
+
+cas=21
+from blocFissure.CasTests.fissureCoude_8 import fissureCoude_8
+problemes.append(fissureCoude_8(cas))
+
+cas=22
+from blocFissure.CasTests.fissureCoude_9 import fissureCoude_9
+problemes.append(fissureCoude_9(cas))
+
+cas=23
+from blocFissure.CasTests.fissureCoude_10 import fissureCoude_10
+problemes.append(fissureCoude_10(cas))
+
+cas=24
+from blocFissure.CasTests.vis_1 import vis_1
+problemes.append(vis_1(cas))
+
+# ---tous les cas en sequence, ou les cas selectionnés ...
+runall = True
+if runall:
+  torun = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,]
+else: #prob 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24   
+  torun = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]
+  
+for i in range(len(problemes)):
+  if torun[i]:
+    try:
+      problemes[i].executeProbleme()
+    except:
+      traceback.print_exc()
+    print "---------------------------------------------------------------------"
diff --git a/src/Tools/blocFissure/CasTests/faceGauche.py b/src/Tools/blocFissure/CasTests/faceGauche.py
new file mode 100644 (file)
index 0000000..dfb251c
--- /dev/null
@@ -0,0 +1,105 @@
+# -*- coding: utf-8 -*-
+
+import os
+from blocFissure import gmu
+from blocFissure.gmu.geomsmesh import geompy, smesh
+
+import math
+import GEOM
+import SALOMEDS
+import SMESH
+#import StdMeshers
+#import GHS3DPlugin
+#import NETGENPlugin
+import logging
+
+from blocFissure.gmu.fissureGenerique import fissureGenerique
+
+from blocFissure.gmu.triedreBase import triedreBase
+from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
+from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
+from blocFissure.gmu.insereFissureGenerale import insereFissureGenerale
+
+O, OX, OY, OZ = triedreBase()
+
+class faceGauche(fissureGenerique):
+  """
+  problème de fissure non plane, débouchante non normale
+  """
+
+  nomProbleme = "faceGauche"
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageSain(self, geometriesSaines, meshParams):
+    logging.info("genereMaillageSain %s", self.nomCas)
+
+    ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests/faceGaucheSain.med"))
+    smesh.SetName(objetSain.GetMesh(), 'objetSain')
+
+    return [objetSain, True] # True : maillage hexa
+
+  # ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour méthode insereFissureGenerale
+    lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage)
+    rayonPipe   : le rayon du pile maillé en hexa autour du fond de fissure
+    convexe     : optionnel True : la face est convexe (vue de l'exterieur) sert si on ne donne pas de point interne
+    pointIn_x   : optionnel coordonnée x d'un point dans le solide sain (pour orienter la face)
+    """
+    logging.info("setParamShapeFissure %s", self.nomCas)
+    self.shapeFissureParams = dict(lgInfluence = 300,
+                                   rayonPipe   = 20)
+
+  # ---------------------------------------------------------------------------
+  def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
+    logging.info("genereShapeFissure %s", self.nomCas)
+
+    lgInfluence = shapeFissureParams['lgInfluence']
+
+    shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/faceGaucheFiss.brep"), "BREP")
+    fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
+    geompy.UnionIDs(fondFiss, [6])
+    geompy.addToStudy( shellFiss, 'shellFiss' )
+    geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
+
+
+    coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,50)
+
+    centre = None
+    return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    self.maillageFissureParams = dict(nomRep           = '.',
+                                      nomFicSain       = self.nomCas,
+                                      nomFicFissure    = 'fissure_' + self.nomCas,
+                                      nbsegRad         = 5,
+                                      nbsegCercle      = 8,
+                                      areteFaceFissure = 1000)
+
+  # ---------------------------------------------------------------------------
+  def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
+    elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
+    return elementsDefaut
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageFissure(self, geometriesSaines, maillagesSains,
+                            shapesFissure, shapeFissureParams,
+                            maillageFissureParams, elementsDefaut, step):
+    maillageFissure = insereFissureGenerale(maillagesSains,
+                                            shapesFissure, shapeFissureParams,
+                                            maillageFissureParams, elementsDefaut, step)
+    return maillageFissure
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 1284,
+                                          Entity_Quad_Triangle   = 2336,
+                                          Entity_Quad_Edge       = 758,
+                                          Entity_Quad_Penta      = 984,
+                                          Entity_Quad_Hexa       = 6416,
+                                          Entity_Node            = 85673,
+                                          Entity_Quad_Tetra      = 35990,
+                                          Entity_Quad_Quadrangle = 4285)
+
diff --git a/src/Tools/blocFissure/CasTests/faceGauche_2.py b/src/Tools/blocFissure/CasTests/faceGauche_2.py
new file mode 100644 (file)
index 0000000..cc8a03d
--- /dev/null
@@ -0,0 +1,106 @@
+# -*- coding: utf-8 -*-
+
+import os
+from blocFissure import gmu
+from blocFissure.gmu.geomsmesh import geompy, smesh
+
+import math
+import GEOM
+import SALOMEDS
+import SMESH
+#import StdMeshers
+#import GHS3DPlugin
+#import NETGENPlugin
+import logging
+
+from blocFissure.gmu.fissureGenerique import fissureGenerique
+
+
+from blocFissure.gmu.triedreBase import triedreBase
+from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
+from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
+from blocFissure.gmu.insereFissureGenerale import insereFissureGenerale
+
+O, OX, OY, OZ = triedreBase()
+
+class faceGauche_2(fissureGenerique):
+  """
+  problème de fissure non plane, débouchante non normale
+  """
+
+  nomProbleme = "faceGauche2"
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageSain(self, geometriesSaines, meshParams):
+    logging.info("genereMaillageSain %s", self.nomCas)
+
+    ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests/boiteSaine.med"))
+    smesh.SetName(objetSain.GetMesh(), 'objetSain')
+
+    return [objetSain, True] # True : maillage hexa
+
+  # ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour méthode insereFissureGenerale
+    lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage)
+    rayonPipe   : le rayon du pile maillé en hexa autour du fond de fissure
+    convexe     : optionnel True : la face est convexe (vue de l'exterieur) sert si on ne donne pas de point interne
+    pointIn_x   : optionnel coordonnée x d'un point dans le solide sain (pour orienter la face)
+    """
+    logging.info("setParamShapeFissure %s", self.nomCas)
+    self.shapeFissureParams = dict(lgInfluence = 100,
+                                   rayonPipe   = 20)
+
+  # ---------------------------------------------------------------------------
+  def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
+    logging.info("genereShapeFissure %s", self.nomCas)
+
+    lgInfluence = shapeFissureParams['lgInfluence']
+
+    shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/faceGauche2FissCoupe.brep"), "BREP")
+    fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
+    geompy.UnionIDs(fondFiss, [12, 4])
+    geompy.addToStudy( shellFiss, 'shellFiss' )
+    geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
+
+
+    coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25)
+
+    centre = None
+    return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    self.maillageFissureParams = dict(nomRep           = '.',
+                                      nomFicSain       = self.nomCas,
+                                      nomFicFissure    = 'fissure_' + self.nomCas,
+                                      nbsegRad         = 5,
+                                      nbsegCercle      = 8,
+                                      areteFaceFissure = 1000)
+
+  # ---------------------------------------------------------------------------
+  def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
+    elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
+    return elementsDefaut
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageFissure(self, geometriesSaines, maillagesSains,
+                            shapesFissure, shapeFissureParams,
+                            maillageFissureParams, elementsDefaut, step):
+    maillageFissure = insereFissureGenerale(maillagesSains,
+                                            shapesFissure, shapeFissureParams,
+                                            maillageFissureParams, elementsDefaut, step)
+    return maillageFissure
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 859,
+                                          Entity_Quad_Triangle   = 634,
+                                          Entity_Quad_Edge       = 323,
+                                          Entity_Quad_Penta      = 288,
+                                          Entity_Quad_Hexa       = 3435,
+                                          Entity_Node            = 44095,
+                                          Entity_Quad_Tetra      = 18400,
+                                          Entity_Quad_Quadrangle = 2542)
+
diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_1.py b/src/Tools/blocFissure/CasTests/fissureCoude_1.py
new file mode 100644 (file)
index 0000000..9e76365
--- /dev/null
@@ -0,0 +1,92 @@
+# -*- coding: utf-8 -*-
+
+from blocFissure.gmu.fissureCoude  import fissureCoude
+
+class fissureCoude_1(fissureCoude):
+  """
+  problème de fissure du Coude :
+  adaptation maillage
+  """
+
+# ---------------------------------------------------------------------------
+  def setParamGeometrieSaine(self):
+    """
+    Paramètres géométriques du tuyau coudé sain:
+    angleCoude
+    r_cintr
+    l_tube_p1
+    l_tube_p2
+    epais
+    de
+    """
+    self.geomParams = dict(angleCoude = 60,
+                           r_cintr    = 1200,
+                           l_tube_p1  = 1600,
+                           l_tube_p2  = 1200,
+                           epais      = 40,
+                           de         = 760)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageSain(self):
+    self.meshParams = dict(n_long_p1    = 16,
+                           n_ep         = 3,
+                           n_long_coude = 15,
+                           n_circ_g     = 20,
+                           n_circ_d     = 20,
+                           n_long_p2    = 12)
+
+# ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour le tuyau coude
+    profondeur  : 0 < profondeur <= épaisseur
+    rayonPipe   : rayon du pipe correspondant au maillage rayonnant
+    lenSegPipe  : longueur des mailles rayonnantes le long du fond de fissure (= rayonPipe par défaut)
+    azimut      : entre 0 et 360°
+    alpha       : 0 < alpha < angleCoude
+    longueur    : <=2*profondeur ==> force une fissure elliptique (longueur/profondeur = grand axe/petit axe).
+    orientation : 0° : longitudinale, 90° : circonférentielle, autre : uniquement fissures elliptiques
+    lgInfluence : distance autour de la shape de fissure a remailler (si 0, pris égal à profondeur. A ajuster selon le maillage)
+    elliptique  : True : fissure elliptique (longueur/profondeur = grand axe/petit axe); False : fissure longue (fond de fissure de profondeur constante, demi-cercles aux extrémites)
+    pointIn_x   : optionnel coordonnées x d'un point dans le solide, pas trop loin du centre du fond de fissure (idem y,z)
+    externe     : True : fissure face externe, False : fissure face interne
+    """
+    print "setParamShapeFissure", self.nomCas
+    self.shapeFissureParams = dict(profondeur  = 10,
+                                   rayonPipe   = 2.5,
+                                   lenSegPipe  = 2.5,
+                                   azimut      = 160,
+                                   alpha       = 20,
+                                   longueur    = 400,
+                                   orientation = 90,
+                                   lgInfluence = 50,
+                                   elliptique  = False,
+                                   externe     = True)
+
+# ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    """
+    Paramètres du maillage de la fissure pour le tuyau coudé
+    Voir également setParamShapeFissure, paramètres rayonPipe et lenSegPipe.
+    nbSegRad = nombre de couronnes
+    nbSegCercle = nombre de secteurs
+    areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
+    """
+    self.maillageFissureParams = dict(nomRep        = '.',
+                                      nomFicSain    = self.nomCas,
+                                      nomFicFissure = 'fissure_' + self.nomCas,
+                                      nbsegRad      = 5,
+                                      nbsegCercle   = 6,
+                                      areteFaceFissure = 5)
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Node            = 77917,
+                                          Entity_Quad_Edge       = 975,
+                                          Entity_Quad_Triangle   = 2182,
+                                          Entity_Quad_Quadrangle = 6842,
+                                          Entity_Quad_Tetra      = 20135,
+                                          Entity_Quad_Hexa       = 8994,
+                                          Entity_Quad_Penta      = 972,
+                                          Entity_Quad_Pyramid    = 1038)
+
diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_10.py b/src/Tools/blocFissure/CasTests/fissureCoude_10.py
new file mode 100644 (file)
index 0000000..33ab3e0
--- /dev/null
@@ -0,0 +1,92 @@
+# -*- coding: utf-8 -*-
+
+from blocFissure.gmu.fissureCoude  import fissureCoude
+
+class fissureCoude_10(fissureCoude):
+  # cas test ASCOU17
+
+
+# ---------------------------------------------------------------------------
+  def setParamGeometrieSaine(self):
+    """
+    Paramètres géométriques du tuyau coudé sain:
+    angleCoude
+    r_cintr
+    l_tube_p1
+    l_tube_p2
+    epais
+    de
+    """
+    self.geomParams = dict(angleCoude = 90,
+                           r_cintr    = 1143,
+                           l_tube_p1  = 3200,
+                           l_tube_p2  = 3200,
+                           epais      = 35,
+                           de         = 762)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageSain(self):
+    self.meshParams = dict(n_long_p1    = 13,
+                           n_ep         = 2,
+                           n_long_coude = 20,
+                           n_circ_g     = 20,
+                           n_circ_d     = 20,
+                           n_long_p2    = 13)
+
+  # ---------------------------------------------------------------------------
+
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour le tuyau coude
+    profondeur  : 0 < profondeur <= épaisseur
+    rayonPipe   : rayon du pipe correspondant au maillage rayonnant
+    lenSegPipe  : longueur des mailles rayonnantes le long du fond de fissure (= rayonPipe par défaut)
+    azimut      : entre 0 et 360°
+    alpha       : 0 < alpha < angleCoude
+    longueur    : <=2*profondeur ==> force une fissure elliptique (longueur/profondeur = grand axe/petit axe).
+    orientation : 0° : longitudinale, 90° : circonférentielle, autre : uniquement fissures elliptiques
+    lgInfluence : distance autour de la shape de fissure a remailler (si 0, pris égal à profondeur. A ajuster selon le maillage)
+    elliptique  : True : fissure elliptique (longueur/profondeur = grand axe/petit axe); False : fissure longue (fond de fissure de profondeur constante, demi-cercles aux extrémites)
+    pointIn_x   : optionnel coordonnées x d'un point dans le solide, pas trop loin du centre du fond de fissure (idem y,z)
+    externe     : True : fissure face externe, False : fissure face interne
+    """
+#    logging.info("setParamShapeFissure %s", self.nomCas)
+    self.shapeFissureParams = dict(profondeur  = 2.5,
+                                   rayonPipe   = 1.5,
+                                   lenSegPipe  = 6,
+                                   azimut      = 180,
+                                   alpha       = 45,
+                                   longueur    = 1196,
+                                   orientation = 0,
+                                   lgInfluence = 30,
+                                   elliptique  = False,
+                                   externe     = False)
+
+  # ---------------------------------------------------------------------------
+                                   
+  def setParamMaillageFissure(self):
+    """
+    Paramètres du maillage de la fissure pour le tuyau coudé
+    Voir également setParamShapeFissure, paramètres rayonPipe et lenSegPipe.
+    nbSegRad = nombre de couronnes
+    nbSegCercle = nombre de secteurs
+    areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
+    """
+    self.maillageFissureParams = dict(nomRep        = '.',
+                                      nomFicSain    = self.nomCas,
+                                      nomFicFissure = 'fissure_' + self.nomCas,
+                                      nbsegRad      = 3,
+                                      nbsegCercle   = 8,
+                                      areteFaceFissure = 2.5)
+    
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Node            = 93352,
+                                          Entity_Quad_Edge       = 1456,
+                                          Entity_Quad_Triangle   = 8934,
+                                          Entity_Quad_Quadrangle = 6978,
+                                          Entity_Quad_Tetra      = 31147,
+                                          Entity_Quad_Hexa       = 6972,
+                                          Entity_Quad_Penta      = 1600,
+                                          Entity_Quad_Pyramid    = 1696)
+
diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_2.py b/src/Tools/blocFissure/CasTests/fissureCoude_2.py
new file mode 100644 (file)
index 0000000..0690c01
--- /dev/null
@@ -0,0 +1,92 @@
+# -*- coding: utf-8 -*-
+
+from blocFissure.gmu.fissureCoude  import fissureCoude
+
+class fissureCoude_2(fissureCoude):
+  """
+  problème de fissure du Coude :
+  adaptation maillage
+  """
+
+# ---------------------------------------------------------------------------
+  def setParamGeometrieSaine(self):
+    """
+    Paramètres géométriques du tuyau coudé sain:
+    angleCoude
+    r_cintr
+    l_tube_p1
+    l_tube_p2
+    epais
+    de
+    """
+    self.geomParams = dict(angleCoude = 90,
+                           r_cintr    = 1200,
+                           l_tube_p1  = 1600,
+                           l_tube_p2  = 1200,
+                           epais      = 40,
+                           de         = 760)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageSain(self):
+    self.meshParams = dict(n_long_p1    = 16,
+                           n_ep         = 3,
+                           n_long_coude = 15,
+                           n_circ_g     = 20,
+                           n_circ_d     = 20,
+                           n_long_p2    = 12)
+
+# ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour le tuyau coude
+    profondeur  : 0 < profondeur <= épaisseur
+    rayonPipe   : rayon du pipe correspondant au maillage rayonnant
+    lenSegPipe  : longueur des mailles rayonnantes le long du fond de fissure (= rayonPipe par défaut)
+    azimut      : entre 0 et 360°
+    alpha       : 0 < alpha < angleCoude
+    longueur    : <=2*profondeur ==> force une fissure elliptique (longueur/profondeur = grand axe/petit axe).
+    orientation : 0° : longitudinale, 90° : circonférentielle, autre : uniquement fissures elliptiques
+    lgInfluence : distance autour de la shape de fissure a remailler (si 0, pris égal à profondeur. A ajuster selon le maillage)
+    elliptique  : True : fissure elliptique (longueur/profondeur = grand axe/petit axe); False : fissure longue (fond de fissure de profondeur constante, demi-cercles aux extrémites)
+    pointIn_x   : optionnel coordonnées x d'un point dans le solide, pas trop loin du centre du fond de fissure (idem y,z)
+    externe     : True : fissure face externe, False : fissure face interne
+    """
+    print "setParamShapeFissure", self.nomCas
+    self.shapeFissureParams = dict(profondeur  = 10,
+                                   rayonPipe   = 2.5,
+                                   lenSegPipe  = 2.5,
+                                   azimut      = 200,
+                                   alpha       = 40,
+                                   longueur    = 800,
+                                   orientation = 0,
+                                   lgInfluence = 50,
+                                   elliptique  = False,
+                                   externe     = True)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    """
+    Paramètres du maillage de la fissure pour le tuyau coudé
+    Voir également setParamShapeFissure, paramètres rayonPipe et lenSegPipe.
+    nbSegRad = nombre de couronnes
+    nbSegCercle = nombre de secteurs
+    areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
+    """
+    self.maillageFissureParams = dict(nomRep        = '.',
+                                      nomFicSain    = self.nomCas,
+                                      nomFicFissure = 'fissure_' + self.nomCas,
+                                      nbsegRad      = 5,
+                                      nbsegCercle   = 6,
+                                      areteFaceFissure = 5)
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Node            = 132120,
+                                          Entity_Quad_Edge       = 1411,
+                                          Entity_Quad_Triangle   = 5342,
+                                          Entity_Quad_Quadrangle = 9524,
+                                          Entity_Quad_Tetra      = 40902,
+                                          Entity_Quad_Hexa       = 12981,
+                                          Entity_Quad_Penta      = 1980,
+                                          Entity_Quad_Pyramid    = 2064)
+
diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_3.py b/src/Tools/blocFissure/CasTests/fissureCoude_3.py
new file mode 100644 (file)
index 0000000..653192d
--- /dev/null
@@ -0,0 +1,92 @@
+# -*- coding: utf-8 -*-
+
+from blocFissure.gmu.fissureCoude  import fissureCoude
+
+class fissureCoude_3(fissureCoude):
+  """
+  problème de fissure du Coude
+  adaptation maillage
+  """
+
+# ---------------------------------------------------------------------------
+  def setParamGeometrieSaine(self):
+    """
+    Paramètres géométriques du tuyau coudé sain:
+    angleCoude
+    r_cintr
+    l_tube_p1
+    l_tube_p2
+    epais
+    de
+    """
+    self.geomParams = dict(angleCoude = 40,
+                           r_cintr    = 654,
+                           l_tube_p1  = 1700,
+                           l_tube_p2  = 1700,
+                           epais      = 62.5,
+                           de         = 912.4)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageSain(self):
+    self.meshParams = dict(n_long_p1    = 16,
+                           n_ep         = 3,
+                           n_long_coude = 30,
+                           n_circ_g     = 50,
+                           n_circ_d     = 20,
+                           n_long_p2    = 12)
+
+# ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour le tuyau coude
+    profondeur  : 0 < profondeur <= épaisseur
+    rayonPipe   : rayon du pipe correspondant au maillage rayonnant
+    lenSegPipe  : longueur des mailles rayonnantes le long du fond de fissure (= rayonPipe par défaut)
+    azimut      : entre 0 et 360°
+    alpha       : 0 < alpha < angleCoude
+    longueur    : <=2*profondeur ==> force une fissure elliptique (longueur/profondeur = grand axe/petit axe).
+    orientation : 0° : longitudinale, 90° : circonférentielle, autre : uniquement fissures elliptiques
+    lgInfluence : distance autour de la shape de fissure a remailler (si 0, pris égal à profondeur. A ajuster selon le maillage)
+    elliptique  : True : fissure elliptique (longueur/profondeur = grand axe/petit axe); False : fissure longue (fond de fissure de profondeur constante, demi-cercles aux extrémites)
+    pointIn_x   : optionnel coordonnées x d'un point dans le solide, pas trop loin du centre du fond de fissure (idem y,z)
+    externe     : True : fissure face externe, False : fissure face interne
+    """
+    print "setParamShapeFissure", self.nomCas
+    self.shapeFissureParams = dict(profondeur  = 10,
+                                   rayonPipe   = 2.5,
+                                   lenSegPipe  = 2.5,
+                                   azimut      = 90,
+                                   alpha       = 20,
+                                   longueur    = 240,
+                                   orientation = 90,
+                                   lgInfluence = 30,
+                                   elliptique  = False,
+                                   externe     = False)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    """
+    Paramètres du maillage de la fissure pour le tuyau coudé
+    Voir également setParamShapeFissure, paramètres rayonPipe et lenSegPipe.
+    nbSegRad = nombre de couronnes
+    nbSegCercle = nombre de secteurs
+    areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
+    """
+    self.maillageFissureParams = dict(nomRep        = '.',
+                                      nomFicSain    = self.nomCas,
+                                      nomFicFissure = 'fissure_' + self.nomCas,
+                                      nbsegRad      = 5,
+                                      nbsegCercle   = 6,
+                                      areteFaceFissure = 5)
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Node            = 98643,
+                                          Entity_Quad_Edge       = 1130,
+                                          Entity_Quad_Triangle   = 1476,
+                                          Entity_Quad_Quadrangle = 11100,
+                                          Entity_Quad_Tetra      = 15993,
+                                          Entity_Quad_Hexa       = 14508,
+                                          Entity_Quad_Penta      = 624,
+                                          Entity_Quad_Pyramid    = 788)
+
diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_4.py b/src/Tools/blocFissure/CasTests/fissureCoude_4.py
new file mode 100644 (file)
index 0000000..8d43dcc
--- /dev/null
@@ -0,0 +1,92 @@
+# -*- coding: utf-8 -*-
+
+from blocFissure.gmu.fissureCoude  import fissureCoude
+
+class fissureCoude_4(fissureCoude):
+  """
+  problème de fissure du Coude : ASCOU09A
+  adaptation maillage
+  """
+
+# ---------------------------------------------------------------------------
+  def setParamGeometrieSaine(self):
+    """
+    Paramètres géométriques du tuyau coudé sain:
+    angleCoude
+    r_cintr
+    l_tube_p1
+    l_tube_p2
+    epais
+    de
+    """
+    self.geomParams = dict(angleCoude = 40,
+                           r_cintr    = 654,
+                           l_tube_p1  = 1700,
+                           l_tube_p2  = 1700,
+                           epais      = 62.5,
+                           de         = 912.4)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageSain(self):
+    self.meshParams = dict(n_long_p1    = 16,
+                           n_ep         = 5,
+                           n_long_coude = 30,
+                           n_circ_g     = 50,
+                           n_circ_d     = 20,
+                           n_long_p2    = 12)
+
+# ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour le tuyau coude
+    profondeur  : 0 < profondeur <= épaisseur
+    rayonPipe   : rayon du pipe correspondant au maillage rayonnant
+    lenSegPipe  : longueur des mailles rayonnantes le long du fond de fissure (= rayonPipe par défaut)
+    azimut      : entre 0 et 360°
+    alpha       : 0 < alpha < angleCoude
+    longueur    : <=2*profondeur ==> force une fissure elliptique (longueur/profondeur = grand axe/petit axe).
+    orientation : 0° : longitudinale, 90° : circonférentielle, autre : uniquement fissures elliptiques
+    lgInfluence : distance autour de la shape de fissure a remailler (si 0, pris égal à profondeur. A ajuster selon le maillage)
+    elliptique  : True : fissure elliptique (longueur/profondeur = grand axe/petit axe); False : fissure longue (fond de fissure de profondeur constante, demi-cercles aux extrémites)
+    pointIn_x   : optionnel coordonnées x d'un point dans le solide, pas trop loin du centre du fond de fissure (idem y,z)
+    externe     : True : fissure face externe, False : fissure face interne
+    """
+    print "setParamShapeFissure", self.nomCas
+    self.shapeFissureParams = dict(profondeur  = 10,
+                                   rayonPipe   = 2.5,
+                                   lenSegPipe  =2.5,
+                                   azimut      = 90,
+                                   alpha       = 20,
+                                   longueur    = 240,
+                                   orientation = 90,
+                                   lgInfluence = 30,
+                                   elliptique  = False,
+                                   externe     = True)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    """
+    Paramètres du maillage de la fissure pour le tuyau coudé
+    Voir également setParamShapeFissure, paramètres rayonPipe et lenSegPipe.
+    nbSegRad = nombre de couronnes
+    nbSegCercle = nombre de secteurs
+    areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
+    """
+    self.maillageFissureParams = dict(nomRep        = '.',
+                                      nomFicSain    = self.nomCas,
+                                      nomFicFissure = 'fissure_' + self.nomCas,
+                                      nbsegRad      = 5,
+                                      nbsegCercle   = 6,
+                                      areteFaceFissure = 5)
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Node            = 133832,
+                                          Entity_Quad_Edge       = 1133,
+                                          Entity_Quad_Triangle   = 1498,
+                                          Entity_Quad_Quadrangle = 11892,
+                                          Entity_Quad_Tetra      = 18401,
+                                          Entity_Quad_Hexa       = 22412,
+                                          Entity_Quad_Penta      = 600,
+                                          Entity_Quad_Pyramid    = 816)
+
diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_5.py b/src/Tools/blocFissure/CasTests/fissureCoude_5.py
new file mode 100644 (file)
index 0000000..23477e1
--- /dev/null
@@ -0,0 +1,92 @@
+# -*- coding: utf-8 -*-
+
+from blocFissure.gmu.fissureCoude  import fissureCoude
+
+class fissureCoude_5(fissureCoude):
+  """
+  problème de fissure du Coude :
+  adaptation maillage
+  """
+
+# ---------------------------------------------------------------------------
+  def setParamGeometrieSaine(self):
+    """
+    Paramètres géométriques du tuyau coudé sain:
+    angleCoude
+    r_cintr
+    l_tube_p1
+    l_tube_p2
+    epais
+    de
+    """
+    self.geomParams = dict(angleCoude = 90,
+                           r_cintr    = 1200,
+                           l_tube_p1  = 1600,
+                           l_tube_p2  = 1200,
+                           epais      = 40,
+                           de         = 760)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageSain(self):
+    self.meshParams = dict(n_long_p1    = 16,
+                           n_ep         = 3,
+                           n_long_coude = 15,
+                           n_circ_g     = 20,
+                           n_circ_d     = 20,
+                           n_long_p2    = 12)
+
+# ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour le tuyau coude
+    profondeur  : 0 < profondeur <= épaisseur
+    rayonPipe   : rayon du pipe correspondant au maillage rayonnant
+    lenSegPipe  : longueur des mailles rayonnantes le long du fond de fissure (= rayonPipe par défaut)
+    azimut      : entre 0 et 360°
+    alpha       : 0 < alpha < angleCoude
+    longueur    : <=2*profondeur ==> force une fissure elliptique (longueur/profondeur = grand axe/petit axe).
+    orientation : 0° : longitudinale, 90° : circonférentielle, autre : uniquement fissures elliptiques
+    lgInfluence : distance autour de la shape de fissure a remailler (si 0, pris égal à profondeur. A ajuster selon le maillage)
+    elliptique  : True : fissure elliptique (longueur/profondeur = grand axe/petit axe); False : fissure longue (fond de fissure de profondeur constante, demi-cercles aux extrémites)
+    pointIn_x   : optionnel coordonnées x d'un point dans le solide, pas trop loin du centre du fond de fissure (idem y,z)
+    externe     : True : fissure face externe, False : fissure face interne
+    """
+    print "setParamShapeFissure", self.nomCas
+    self.shapeFissureParams = dict(profondeur  = 10,
+                                   rayonPipe   = 2.5,
+                                   lenSegPipe  = 2.5,
+                                   azimut      = 180,
+                                   alpha       = 40,
+                                   longueur    = 200,
+                                   orientation = 0,
+                                   lgInfluence = 50,
+                                   elliptique  = False,
+                                   externe     = False)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    """
+    Paramètres du maillage de la fissure pour le tuyau coudé
+    Voir également setParamShapeFissure, paramètres rayonPipe et lenSegPipe.
+    nbSegRad = nombre de couronnes
+    nbSegCercle = nombre de secteurs
+    areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
+    """
+    self.maillageFissureParams = dict(nomRep        = '.',
+                                      nomFicSain    = self.nomCas,
+                                      nomFicFissure = 'fissure_' + self.nomCas,
+                                      nbsegRad      = 5,
+                                      nbsegCercle   = 6,
+                                      areteFaceFissure = 5)
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Node            = 55217,
+                                          Entity_Quad_Edge       = 762,
+                                          Entity_Quad_Triangle   = 1586,
+                                          Entity_Quad_Quadrangle = 5610,
+                                          Entity_Quad_Tetra      = 11468,
+                                          Entity_Quad_Hexa       = 7200,
+                                          Entity_Quad_Penta      = 516,
+                                          Entity_Quad_Pyramid    = 552)
+
diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_6.py b/src/Tools/blocFissure/CasTests/fissureCoude_6.py
new file mode 100644 (file)
index 0000000..0952579
--- /dev/null
@@ -0,0 +1,91 @@
+# -*- coding: utf-8 -*-
+
+from blocFissure.gmu.fissureCoude  import fissureCoude
+
+class fissureCoude_6(fissureCoude):
+# --- cas ASCOU08
+
+# ---------------------------------------------------------------------------
+  def setParamGeometrieSaine(self):
+    """
+    Paramètres géométriques du tuyau coudé sain:
+    angleCoude
+    r_cintr
+    l_tube_p1
+    l_tube_p2
+    epais
+    de
+    """
+    self.geomParams = dict(angleCoude = 40,
+                           r_cintr    = 854,
+                           l_tube_p1  = 1700,
+                           l_tube_p2  = 1700,
+                           epais      = 62.5,
+                           de         = 912.4)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageSain(self):
+    self.meshParams = dict(n_long_p1    = 15,
+                           n_ep         = 3,
+                           n_long_coude = 16,
+                           n_circ_g     = 30,
+                           n_circ_d     = 30,
+                           n_long_p2    = 15)
+
+# ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour le tuyau coude
+    profondeur  : 0 < profondeur <= épaisseur
+    rayonPipe   : rayon du pipe correspondant au maillage rayonnant
+    lenSegPipe  : longueur des mailles rayonnantes le long du fond de fissure (= rayonPipe par défaut)
+    azimut      : entre 0 et 360°
+    alpha       : 0 < alpha < angleCoude
+    longueur    : <=2*profondeur ==> force une fissure elliptique (longueur/profondeur = grand axe/petit axe).
+    orientation : 0° : longitudinale, 90° : circonférentielle, autre : uniquement fissures elliptiques
+    lgInfluence : distance autour de la shape de fissure a remailler (si 0, pris égal à profondeur. A ajuster selon le maillage)
+    elliptique  : True : fissure elliptique (longueur/profondeur = grand axe/petit axe); False : fissure longue (fond de fissure de profondeur constante, demi-cercles aux extrémites)
+    pointIn_x   : optionnel coordonnées x d'un point dans le solide, pas trop loin du centre du fond de fissure (idem y,z)
+    externe     : True : fissure face externe, False : fissure face interne
+    """
+    print "setParamShapeFissure", self.nomCas
+    self.shapeFissureParams = dict(profondeur  = 10,
+                                   rayonPipe   = 4,
+                                   lenSegPipe  = 4,
+                                   azimut      = 90,
+                                   alpha       = 20,
+                                   longueur    = 133,
+                                   orientation = 0,
+                                   lgInfluence = 30,
+                                   elliptique  = False,
+                                   externe     = True)
+
+  # ---------------------------------------------------------------------------
+                                   
+  def setParamMaillageFissure(self):
+    """
+    Paramètres du maillage de la fissure pour le tuyau coudé
+    Voir également setParamShapeFissure, paramètres rayonPipe et lenSegPipe.
+    nbSegRad = nombre de couronnes
+    nbSegCercle = nombre de secteurs
+    areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
+    """
+    self.maillageFissureParams = dict(nomRep        = '.',
+                                      nomFicSain    = self.nomCas,
+                                      nomFicFissure = 'fissure_' + self.nomCas,
+                                      nbsegRad      = 5,
+                                      nbsegCercle   = 12,
+                                      areteFaceFissure = 5)                                   
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Node            = 63783,
+                                          Entity_Quad_Edge       = 831,
+                                          Entity_Quad_Triangle   = 742,
+                                          Entity_Quad_Quadrangle = 7480,
+                                          Entity_Quad_Tetra      = 8084,
+                                          Entity_Quad_Hexa       = 10080,
+                                          Entity_Quad_Penta      = 456,
+                                          Entity_Quad_Pyramid    = 500)
+
+
diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_7.py b/src/Tools/blocFissure/CasTests/fissureCoude_7.py
new file mode 100644 (file)
index 0000000..d19a4b1
--- /dev/null
@@ -0,0 +1,91 @@
+# -*- coding: utf-8 -*-
+
+from blocFissure.gmu.fissureCoude  import fissureCoude
+
+class fissureCoude_7(fissureCoude):
+
+
+# ---------------------------------------------------------------------------
+  def setParamGeometrieSaine(self):
+    """
+    Paramètres géométriques du tuyau coudé sain:
+    angleCoude
+    r_cintr
+    l_tube_p1
+    l_tube_p2
+    epais
+    de
+    """
+    self.geomParams = dict(angleCoude = 40,
+                           r_cintr    = 654,
+                           l_tube_p1  = 1700,
+                           l_tube_p2  = 1700,
+                           epais      = 62.5,
+                           de         = 912.4)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageSain(self):
+    self.meshParams = dict(n_long_p1    = 15,
+                           n_ep         = 3,
+                           n_long_coude = 16,
+                           n_circ_g     = 30,
+                           n_circ_d     = 30,
+                           n_long_p2    = 15)
+
+  # ---------------------------------------------------------------------------
+
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour le tuyau coude
+    profondeur  : 0 < profondeur <= épaisseur
+    rayonPipe   : rayon du pipe correspondant au maillage rayonnant
+    lenSegPipe  : longueur des mailles rayonnantes le long du fond de fissure (= rayonPipe par défaut)
+    azimut      : entre 0 et 360°
+    alpha       : 0 < alpha < angleCoude
+    longueur    : <=2*profondeur ==> force une fissure elliptique (longueur/profondeur = grand axe/petit axe).
+    orientation : 0° : longitudinale, 90° : circonférentielle, autre : uniquement fissures elliptiques
+    lgInfluence : distance autour de la shape de fissure a remailler (si 0, pris égal à profondeur. A ajuster selon le maillage)
+    elliptique  : True : fissure elliptique (longueur/profondeur = grand axe/petit axe); False : fissure longue (fond de fissure de profondeur constante, demi-cercles aux extrémites)
+    pointIn_x   : optionnel coordonnées x d'un point dans le solide, pas trop loin du centre du fond de fissure (idem y,z)
+    externe     : True : fissure face externe, False : fissure face interne
+    """
+#    logging.info("setParamShapeFissure %s", self.nomCas)
+    self.shapeFissureParams = dict(profondeur  = 10,
+                                   rayonPipe   = 4,
+                                   lenSegPipe  = 4,
+                                   azimut      = 0,
+                                   alpha       = 20,
+                                   longueur    = 240,
+                                   orientation = 0,
+                                   lgInfluence = 30,
+                                   elliptique  = False,
+                                   externe     = True)
+
+  # ---------------------------------------------------------------------------
+                                   
+  def setParamMaillageFissure(self):
+    """
+    Paramètres du maillage de la fissure pour le tuyau coudé
+    Voir également setParamShapeFissure, paramètres rayonPipe et lenSegPipe.
+    nbSegRad = nombre de couronnes
+    nbSegCercle = nombre de secteurs
+    areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
+    """
+    self.maillageFissureParams = dict(nomRep        = '.',
+                                      nomFicSain    = self.nomCas,
+                                      nomFicFissure = 'fissure_' + self.nomCas,
+                                      nbsegRad      = 5,
+                                      nbsegCercle   = 12,
+                                      areteFaceFissure = 5)                                   
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Node            = 75580,
+                                          Entity_Quad_Edge       = 899,
+                                          Entity_Quad_Triangle   = 1158,
+                                          Entity_Quad_Quadrangle = 8022,
+                                          Entity_Quad_Tetra      = 13162,
+                                          Entity_Quad_Hexa       = 11272,
+                                          Entity_Quad_Penta      = 756,
+                                          Entity_Quad_Pyramid    = 812)
+
diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_8.py b/src/Tools/blocFissure/CasTests/fissureCoude_8.py
new file mode 100644 (file)
index 0000000..49439b6
--- /dev/null
@@ -0,0 +1,92 @@
+# -*- coding: utf-8 -*-
+
+from blocFissure.gmu.fissureCoude  import fissureCoude
+
+class fissureCoude_8(fissureCoude):
+  # cas test ASCOU15
+
+
+# ---------------------------------------------------------------------------
+  def setParamGeometrieSaine(self):
+    """
+    Paramètres géométriques du tuyau coudé sain:
+    angleCoude
+    r_cintr
+    l_tube_p1
+    l_tube_p2
+    epais
+    de
+    """
+    self.geomParams = dict(angleCoude = 90,
+                           r_cintr    = 2290,
+                           l_tube_p1  = 3200,
+                           l_tube_p2  = 3200,
+                           epais      = 30.5,
+                           de         = 762)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageSain(self):
+    self.meshParams = dict(n_long_p1    = 8,
+                           n_ep         = 2,
+                           n_long_coude = 20,
+                           n_circ_g     = 20,
+                           n_circ_d     = 20,
+                           n_long_p2    = 8)
+
+  # ---------------------------------------------------------------------------
+
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour le tuyau coude
+    profondeur  : 0 < profondeur <= épaisseur
+    rayonPipe   : rayon du pipe correspondant au maillage rayonnant
+    lenSegPipe  : longueur des mailles rayonnantes le long du fond de fissure (= rayonPipe par défaut)
+    azimut      : entre 0 et 360°
+    alpha       : 0 < alpha < angleCoude
+    longueur    : <=2*profondeur ==> force une fissure elliptique (longueur/profondeur = grand axe/petit axe).
+    orientation : 0° : longitudinale, 90° : circonférentielle, autre : uniquement fissures elliptiques
+    lgInfluence : distance autour de la shape de fissure a remailler (si 0, pris égal à profondeur. A ajuster selon le maillage)
+    elliptique  : True : fissure elliptique (longueur/profondeur = grand axe/petit axe); False : fissure longue (fond de fissure de profondeur constante, demi-cercles aux extrémites)
+    pointIn_x   : optionnel coordonnées x d'un point dans le solide, pas trop loin du centre du fond de fissure (idem y,z)
+    externe     : True : fissure face externe, False : fissure face interne
+    """
+#    logging.info("setParamShapeFissure %s", self.nomCas)
+    self.shapeFissureParams = dict(profondeur  = 8,
+                                   rayonPipe   = 1,
+                                   lenSegPipe  = 1.5,
+                                   azimut      = 180,
+                                   alpha       = 45,
+                                   longueur    = 48,
+                                   orientation = 0,
+                                   lgInfluence = 30,
+                                   elliptique  = True,
+                                   externe     = False)
+
+  # ---------------------------------------------------------------------------
+                                   
+  def setParamMaillageFissure(self):
+    """
+    Paramètres du maillage de la fissure pour le tuyau coudé
+    Voir également setParamShapeFissure, paramètres rayonPipe et lenSegPipe.
+    nbSegRad = nombre de couronnes
+    nbSegCercle = nombre de secteurs
+    areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
+    """
+    self.maillageFissureParams = dict(nomRep        = '.',
+                                      nomFicSain    = self.nomCas,
+                                      nomFicFissure = 'fissure_' + self.nomCas,
+                                      nbsegRad      = 4,
+                                      nbsegCercle   = 16,
+                                      areteFaceFissure = 5)
+    
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Node            = 50627,
+                                          Entity_Quad_Edge       = 666,
+                                          Entity_Quad_Triangle   = 1498,
+                                          Entity_Quad_Quadrangle = 4747,
+                                          Entity_Quad_Tetra      = 13225,
+                                          Entity_Quad_Hexa       = 5464,
+                                          Entity_Quad_Penta      = 864,
+                                          Entity_Quad_Pyramid    = 880)
+
diff --git a/src/Tools/blocFissure/CasTests/fissureCoude_9.py b/src/Tools/blocFissure/CasTests/fissureCoude_9.py
new file mode 100644 (file)
index 0000000..d7370d1
--- /dev/null
@@ -0,0 +1,90 @@
+# -*- coding: utf-8 -*-
+
+from blocFissure.gmu.fissureCoude  import fissureCoude
+
+class fissureCoude_9(fissureCoude):
+  # cas test ASCOU19
+
+
+# ---------------------------------------------------------------------------
+  def setParamGeometrieSaine(self):
+    """
+    Paramètres géométriques du tuyau coudé sain:
+    angleCoude
+    r_cintr
+    l_tube_p1
+    l_tube_p2
+    epais
+    de
+    """
+    self.geomParams = dict(angleCoude = 90,
+                           r_cintr    = 1144,
+                           l_tube_p1  = 1651,
+                           l_tube_p2  = 1651,
+                           epais      = 39,
+                           de         = 762)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageSain(self):
+    self.meshParams = dict(n_long_p1    = 16,
+                           n_ep         = 4,
+                           n_long_coude = 40,
+                           n_circ_g     = 40,
+                           n_circ_d     = 40,
+                           n_long_p2    = 16)
+
+# ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour le tuyau coude
+    profondeur  : 0 < profondeur <= épaisseur
+    rayonPipe   : rayon du pipe correspondant au maillage rayonnant
+    lenSegPipe  : longueur des mailles rayonnantes le long du fond de fissure (= rayonPipe par défaut)
+    azimut      : entre 0 et 360°
+    alpha       : 0 < alpha < angleCoude
+    longueur    : <=2*profondeur ==> force une fissure elliptique (longueur/profondeur = grand axe/petit axe).
+    orientation : 0° : longitudinale, 90° : circonférentielle, autre : uniquement fissures elliptiques
+    lgInfluence : distance autour de la shape de fissure a remailler (si 0, pris égal à profondeur. A ajuster selon le maillage)
+    elliptique  : True : fissure elliptique (longueur/profondeur = grand axe/petit axe); False : fissure longue (fond de fissure de profondeur constante, demi-cercles aux extrémites)
+    pointIn_x   : optionnel coordonnées x d'un point dans le solide, pas trop loin du centre du fond de fissure (idem y,z)
+    externe     : True : fissure face externe, False : fissure face interne
+    """
+    print "setParamShapeFissure", self.nomCas
+    self.shapeFissureParams = dict(profondeur  = 10,
+                                   rayonPipe   = 2,
+                                   lenSegPipe  = 6,
+                                   azimut      = 0,
+                                   alpha       = 30.8456,
+                                   longueur    = 240,
+                                   orientation = 90,
+                                   lgInfluence = 50,
+                                   elliptique  = False,
+                                   externe     = False)
+
+# ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    """
+    Paramètres du maillage de la fissure pour le tuyau coudé
+    Voir également setParamShapeFissure, paramètres rayonPipe et lenSegPipe.
+    nbSegRad = nombre de couronnes
+    nbSegCercle = nombre de secteurs
+    areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
+    """
+    self.maillageFissureParams = dict(nomRep        = '.',
+                                      nomFicSain    = self.nomCas,
+                                      nomFicFissure = 'fissure_' + self.nomCas,
+                                      nbsegRad      = 6,
+                                      nbsegCercle   = 20,
+                                      areteFaceFissure = 2.5)
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Node            = 162936,
+                                          Entity_Quad_Edge       = 1254,
+                                          Entity_Quad_Triangle   = 3238,
+                                          Entity_Quad_Quadrangle = 15088,
+                                          Entity_Quad_Tetra      = 19305,
+                                          Entity_Quad_Hexa       = 27472,
+                                          Entity_Quad_Penta      = 920,
+                                          Entity_Quad_Pyramid    = 1056)
+
diff --git a/src/Tools/blocFissure/CasTests/fissure_Coude.py b/src/Tools/blocFissure/CasTests/fissure_Coude.py
new file mode 100644 (file)
index 0000000..6f87ec6
--- /dev/null
@@ -0,0 +1,496 @@
+# -*- coding: utf-8 -*-
+
+from blocFissure import gmu
+from blocFissure.gmu.geomsmesh import geompy, smesh
+
+import math
+import GEOM
+import SALOMEDS
+import SMESH
+#import StdMeshers
+#import GHS3DPlugin
+#import NETGENPlugin
+import logging
+
+from blocFissure.gmu.fissureGenerique import fissureGenerique
+
+from blocFissure.gmu.triedreBase import triedreBase
+from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
+from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
+from blocFissure.gmu.insereFissureLongue import insereFissureLongue
+
+O, OX, OY, OZ = triedreBase()
+
+class fissure_Coude(fissureGenerique):
+  """
+  problème de fissure du Coude : version de base
+  maillage hexa
+  """
+
+  nomProbleme = "tuyau_Coude"
+
+  # ---------------------------------------------------------------------------
+  def setParamGeometrieSaine(self):
+    """
+    Paramètres géométriques du tuyau coudé sain:
+    angleCoude
+    r_cintr
+    l_tube_p1
+    l_tube_p2
+    epais
+    de
+    """
+    self.geomParams = dict(angleCoude = 60,
+                           r_cintr    = 1200,
+                           l_tube_p1  = 1600,
+                           l_tube_p2  = 1200,
+                           epais      = 40,
+                           de         = 760)
+
+  # ---------------------------------------------------------------------------
+  def genereGeometrieSaine(self, geomParams):
+    logging.info("genereGeometrieSaine %s", self.nomCas)
+
+    angleCoude = geomParams['angleCoude']
+    r_cintr    = geomParams['r_cintr']
+    l_tube_p1  = geomParams['l_tube_p1']
+    l_tube_p2  = geomParams['l_tube_p2']
+    epais      = geomParams['epais']
+    de         = geomParams['de']
+
+    centre = geompy.MakeVertex(0, 0, -l_tube_p1)
+    Disk_1 = geompy.MakeDiskPntVecR(centre, OZ, de/2.)
+    Disk_2 = geompy.MakeDiskPntVecR(centre, OZ, de/2. -epais)
+    Cut_1 = geompy.MakeCut(Disk_1, Disk_2)
+    Extrusion_1 = geompy.MakePrismVecH(Cut_1, OZ, l_tube_p1)
+    axe = geompy.MakeTranslation(OY, -r_cintr, 0, -l_tube_p1)
+    Revolution_1 = geompy.MakeRevolution(Cut_1, axe, angleCoude*math.pi/180.0)
+    Rotation_1 = geompy.MakeRotation(Cut_1, axe, angleCoude*math.pi/180.0)
+    Rotation_2 = geompy.MakeRotation(OZ, OY, angleCoude*math.pi/180.0)
+    Extrusion_2 = geompy.MakePrismVecH(Rotation_1, Rotation_2, -l_tube_p2)
+    Plane_1 = geompy.MakePlaneLCS(None, 100000, 3)
+    geompy.addToStudy( Plane_1, "Plane_1" )
+    geompy.addToStudy( Extrusion_1, "Extrusion_1" )
+    geompy.addToStudy( Revolution_1, "Revolution_1" )
+    geompy.addToStudy( Extrusion_2, "Extrusion_2" )
+
+    P1 = O
+    geompy.addToStudy( P1, "P1" )
+    op2 = geompy.MakeVertex(0, 0, -l_tube_p1)
+    P2 = geompy.MakeRotation(op2, axe, angleCoude*math.pi/180.0)
+    P2 = geompy.MakeTranslationVectorDistance(P2, Rotation_2, -l_tube_p2)
+    geompy.addToStudy( P2, "P2" )
+
+    # --- tube coude sain
+
+    geometrieSaine = geompy.MakePartition([Extrusion_1, Revolution_1, Extrusion_2, P1, P2], [Plane_1], [], [], geompy.ShapeType["SOLID"], 0, [], 1)
+    geompy.addToStudy( geometrieSaine, self.nomCas )
+    [P1, P2] = geompy.RestoreGivenSubShapes(geometrieSaine, [P1, P2], GEOM.FSM_GetInPlaceByHistory, False, True)
+
+    [ep, circ_g, circ_d, long_p2, long_coude, long_p1] = geompy.Propagate(geometrieSaine)
+    geompy.addToStudyInFather( geometrieSaine, long_p1, 'long_p1' )
+    geompy.addToStudyInFather( geometrieSaine, ep, 'ep' )
+    geompy.addToStudyInFather( geometrieSaine, long_coude, 'long_coude' )
+    geompy.addToStudyInFather( geometrieSaine, circ_g, 'circ_g' )
+    geompy.addToStudyInFather( geometrieSaine, circ_d, 'circ_d' )
+    geompy.addToStudyInFather( geometrieSaine, long_p2, 'long_p2' )
+
+    # --- face extremite tube (EXTUBE)
+
+    facesIds = geompy.GetShapesOnPlaneIDs(geometrieSaine, geompy.ShapeType["FACE"], OZ, GEOM.ST_ON)
+    EXTUBE = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["FACE"])
+    geompy.UnionIDs(EXTUBE, facesIds)
+    geompy.addToStudyInFather( geometrieSaine, EXTUBE, 'EXTUBE' )
+
+    # --- edge bord extremite tube (BORDTU)
+
+    edge1Ids = geompy.GetShapesOnPlaneIDs(geometrieSaine, geompy.ShapeType["EDGE"], OZ, GEOM.ST_ON)
+    edge2Ids = geompy.GetShapesOnCylinderIDs(geometrieSaine, geompy.ShapeType["EDGE"], OZ, de/2., GEOM.ST_ON)
+    edgesIds = []
+    for edge in edge1Ids:
+      if edge in edge2Ids:
+        edgesIds.append(edge)
+    BORDTU = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["EDGE"])
+    geompy.UnionIDs(BORDTU, edgesIds)
+    geompy.addToStudyInFather( geometrieSaine, BORDTU, 'BORDTU' )
+
+    # --- face origine tube (CLGV)
+
+    pp2 = geompy.MakeTranslationVectorDistance(P2, Rotation_2, 10)
+    vec2 = geompy.MakeVector(P2, pp2)
+    #geompy.addToStudy(vec2, 'vec2')
+    facesIds = geompy.GetShapesOnPlaneIDs(geometrieSaine, geompy.ShapeType["FACE"], vec2, GEOM.ST_ON)
+    CLGV = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["FACE"])
+    geompy.UnionIDs(CLGV, facesIds)
+    geompy.addToStudyInFather( geometrieSaine, CLGV, 'CLGV' )
+
+    # --- peau tube interieur (PEAUINT)
+
+    extru1 = geompy.MakePrismVecH(Disk_2, OZ, l_tube_p1)
+    revol1 = geompy.MakeRevolution(Disk_2, axe, angleCoude*math.pi/180.0)
+    rot1 = geompy.MakeRotation(Disk_2, axe, angleCoude*math.pi/180.0)
+    extru2 = geompy.MakePrismVecH(rot1, Rotation_2, -l_tube_p2)
+    interne = geompy.MakeFuse(extru1, revol1)
+    interne = geompy.MakeFuse(extru2, interne)
+    geompy.addToStudy(interne, 'interne')
+    facesIds = geompy.GetShapesOnShapeIDs(interne, geometrieSaine, geompy.ShapeType["FACE"], GEOM.ST_ONIN)
+    PEAUINT = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["FACE"])
+    geompy.UnionIDs(PEAUINT, facesIds)
+    geompy.addToStudyInFather( geometrieSaine, PEAUINT, 'PEAUINT' )
+
+    # --- peau tube exterieur (PEAUEXT)
+
+    cercle1 = geompy.MakeCircle(centre, OZ, de/2.)
+    extru1 = geompy.MakePrismVecH(cercle1, OZ, l_tube_p1)
+    revol1 = geompy.MakeRevolution(cercle1, axe, angleCoude*math.pi/180.0)
+    rot1 = geompy.MakeRotation(cercle1, axe, angleCoude*math.pi/180.0)
+    extru2 = geompy.MakePrismVecH(rot1, Rotation_2, -l_tube_p2)
+    externe = geompy.MakeFuse(extru1, revol1)
+    externe = geompy.MakeFuse(extru2, externe)
+    geompy.addToStudy(externe, 'externe')
+    facesIds = geompy.GetShapesOnShapeIDs(externe, geometrieSaine, geompy.ShapeType["FACE"], GEOM.ST_ON)
+    PEAUEXT = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["FACE"])
+    geompy.UnionIDs(PEAUEXT, facesIds)
+    geompy.addToStudyInFather( geometrieSaine, PEAUEXT, 'PEAUEXT' )
+
+    # --- solide sain
+
+    volIds = geompy.SubShapeAllIDs(geometrieSaine, geompy.ShapeType["SOLID"])
+    COUDE = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["SOLID"])
+    geompy.UnionIDs(COUDE, volIds)
+    geompy.addToStudyInFather( geometrieSaine, COUDE, 'COUDSAIN' )
+
+    geometriesSaines = [geometrieSaine, long_p1, ep, long_coude, circ_g, circ_d, long_p2, P1, P2, EXTUBE, BORDTU, CLGV, PEAUINT, PEAUEXT, COUDE]
+
+    return geometriesSaines
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageSain(self):
+    self.meshParams = dict(n_long_p1    = 16,
+                           n_ep         = 3,
+                           n_long_coude = 15,
+                           n_circ_g     = 20,
+                           n_circ_d     = 20,
+                           n_long_p2    = 12)
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageSain(self, geometriesSaines, meshParams):
+    logging.info("genereMaillageSain %s", self.nomCas)
+
+    geometrieSaine = geometriesSaines[0]
+    long_p1        = geometriesSaines[1]
+    ep             = geometriesSaines[2]
+    long_coude     = geometriesSaines[3]
+    circ_g         = geometriesSaines[4]
+    circ_d         = geometriesSaines[5]
+    long_p2        = geometriesSaines[6]
+    P1             = geometriesSaines[7]
+    P2             = geometriesSaines[8]
+    EXTUBE         = geometriesSaines[9]
+    BORDTU         = geometriesSaines[10]
+    CLGV           = geometriesSaines[11]
+    PEAUINT        = geometriesSaines[12]
+    PEAUEXT        = geometriesSaines[13]
+    COUDE          = geometriesSaines[14]
+
+    n_long_p1    = meshParams['n_long_p1']
+    n_ep         = meshParams['n_ep']
+    n_long_coude = meshParams['n_long_coude']
+    n_circ_g     = meshParams['n_circ_g']
+    n_circ_d     = meshParams['n_circ_d']
+    n_long_p2    = meshParams['n_long_p2']
+
+    maillageSain = smesh.Mesh(geometrieSaine)
+
+    algo3d = maillageSain.Hexahedron()
+    algo2d = maillageSain.Quadrangle()
+    smesh.SetName(algo3d, "algo3d_maillageSain")
+    smesh.SetName(algo2d, "algo2d_maillageSain")
+
+    algo1d_long_p1 = maillageSain.Segment(geom=long_p1)
+    hypo1d_long_p1 = algo1d_long_p1.NumberOfSegments(n_long_p1)
+    smesh.SetName(algo1d_long_p1, "algo1d_long_p1")
+    smesh.SetName(hypo1d_long_p1, "hypo1d_long_p1")
+
+    algo1d_ep = maillageSain.Segment(geom=ep)
+    hypo1d_ep = algo1d_ep.NumberOfSegments(n_ep)
+    smesh.SetName(algo1d_ep, "algo1d_ep")
+    smesh.SetName(hypo1d_ep, "hypo1d_ep")
+
+    algo1d_long_coude = maillageSain.Segment(geom=long_coude)
+    hypo1d_long_coude = algo1d_long_coude.NumberOfSegments(n_long_coude)
+    smesh.SetName(algo1d_long_coude, "algo1d_long_coude")
+    smesh.SetName(hypo1d_long_coude, "hypo1d_long_coude")
+
+    algo1d_circ_g = maillageSain.Segment(geom=circ_g)
+    hypo1d_circ_g = algo1d_circ_g.NumberOfSegments(n_circ_g)
+    smesh.SetName(algo1d_circ_g, "algo1d_circ_g")
+    smesh.SetName(hypo1d_circ_g, "hypo1d_circ_g")
+
+    algo1d_circ_d = maillageSain.Segment(geom=circ_d)
+    hypo1d_circ_d = algo1d_circ_d.NumberOfSegments(n_circ_d)
+    smesh.SetName(algo1d_circ_d, "algo1d_circ_d")
+    smesh.SetName(hypo1d_circ_d, "hypo1d_circ_d")
+
+    algo1d_long_p2 = maillageSain.Segment(geom=long_p2)
+    hypo1d_long_p2 = algo1d_long_p2.NumberOfSegments(n_long_p2)
+    smesh.SetName(algo1d_long_p2, "algo1d_long_p2")
+    smesh.SetName(hypo1d_long_p2, "hypo1d_long_p2")
+
+    isDone = maillageSain.Compute()
+
+    mp1 = maillageSain.GroupOnGeom(P1,'P1',SMESH.NODE)
+    mp2 = maillageSain.GroupOnGeom(P2,'P2',SMESH.NODE)
+    ext = maillageSain.GroupOnGeom(EXTUBE,'EXTUBE',SMESH.FACE)
+    btu = maillageSain.GroupOnGeom(BORDTU,'BORDTU',SMESH.EDGE)
+    clg = maillageSain.GroupOnGeom(CLGV,'CLGV',SMESH.FACE)
+    pei = maillageSain.GroupOnGeom(PEAUINT,'PEAUINT',SMESH.FACE)
+    pex = maillageSain.GroupOnGeom(PEAUEXT,'PEAUEXT',SMESH.FACE)
+    cou = maillageSain.GroupOnGeom(COUDE,'COUDSAIN',SMESH.VOLUME)
+
+    return [maillageSain, True] # True : maillage hexa
+
+  # ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure
+    profondeur  : 0 < profondeur <= épaisseur
+    azimut      : entre 0 et 360°
+    alpha       : 0 < alpha < angleCoude
+    longueur    : <=2*profondeur ==> ellipse, >2*profondeur = fissure longue
+    lgInfluence : distance autour de la shape de fissure a remailler (si 0, pris égal à profondeur. A ajuster selon le maillage)
+    orientation : 0° : longitudinale, 90° : circonférentielle, autre : uniquement fissures elliptiques
+    externe     : True : fissure face externe, False : fissure face interne
+    """
+    logging.info("setParamShapeFissure %s", self.nomCas)
+    self.shapeFissureParams = dict(profondeur  = 10,
+                                   azimut      = 160,
+                                   alpha       = 20,
+                                   longueur    = 400,
+                                   orientation = 90,
+                                   lgInfluence = 0,
+                                   elliptique  = False,
+                                   externe     = True)
+
+  # ---------------------------------------------------------------------------
+  def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
+    logging.info("genereShapeFissure %s", self.nomCas)
+    logging.info("shapeFissureParams %s", shapeFissureParams)
+
+    angleCoude = geomParams['angleCoude']
+    r_cintr    = geomParams['r_cintr']
+    l_tube_p1  = geomParams['l_tube_p1']
+    l_tube_p2  = geomParams['l_tube_p2']
+    epais      = geomParams['epais']
+    de         = geomParams['de']
+
+    profondeur  = shapeFissureParams['profondeur']
+    azimut      = shapeFissureParams['azimut']
+    alpha       = shapeFissureParams['alpha']
+    longueur    = shapeFissureParams['longueur']
+    orientation = shapeFissureParams['orientation']
+    externe     = shapeFissureParams['externe']
+    lgInfluence = shapeFissureParams['lgInfluence']
+
+    azimut = -azimut # axe inverse / ASCOUF
+    axe = geompy.MakeTranslation(OY, -r_cintr, 0, -l_tube_p1)
+    
+    if not lgInfluence:
+      lgInfluence = profondeur
+
+    if longueur > 2*profondeur:
+      self.fissureLongue=True
+    else:
+      self.fissureLongue=False
+
+    self.circonferentielle = False
+    self.longitudinale = False
+    if self.fissureLongue and (abs(orientation) < 45) :
+      self.longitudinale = True
+    elif self.fissureLongue:
+      self.circonferentielle = True
+
+    if self.circonferentielle:
+      if externe:
+        raybor = de/2.
+        rayint = raybor - profondeur
+        rayext = raybor + profondeur
+      else:
+        rayext = de/2. - epais
+        rayint = raybor + profondeur
+        rayext = raybor - profondeur
+      lgfond = longueur -2*profondeur
+      angle = lgfond/(2*raybor)
+      pb = geompy.MakeVertex(raybor, 0, 0)
+      pi = geompy.MakeVertex(rayint, 0, 0)
+      pe = geompy.MakeVertex(rayext, 0, 0)
+      pl = geompy.MakeVertex(raybor, profondeur, 0)
+      pr = geompy.MakeVertex(raybor, -profondeur, 0)
+      pil = geompy.MakeRotation(pi, OZ, angle)
+      pll = geompy.MakeRotation(pl, OZ, angle)
+      pel = geompy.MakeRotation(pe, OZ, angle)
+      pir = geompy.MakeRotation(pi, OZ, -angle)
+      prr = geompy.MakeRotation(pr, OZ, -angle)
+      per = geompy.MakeRotation(pe, OZ, -angle)
+      arcl = geompy.MakeArc(pil, pll, pel)
+      arcr = geompy.MakeArc(pir, prr, per)
+      arci = geompy.MakeArc(pil, pi, pir)
+      arce = geompy.MakeArc(pel, pe, per)
+      wire0 = geompy.MakeWire([arcr, arci, arcl])
+      cercle0 = geompy.MakeCircle(O, OY, profondeur/4.0)
+      cercle0 = geompy.MakeRotation(cercle0, OY, math.pi/2.0)
+      cercle0 = geompy.MakeTranslationTwoPoints(cercle0, O, pi)
+      facetube0 = geompy.MakeFaceWires([cercle0], 1)
+      facetubel = geompy.MakeRotation(facetube0, OZ, angle)
+      facetuber = geompy.MakeRotation(facetube0, OZ, -angle)
+      face0 = geompy.MakeFaceWires([arcl,arci, arce, arcr], 1)
+      plan0 = geompy.MakePlane(O, OZ, 10000)
+      geompy.addToStudy( face0, 'facefissOrig' )
+      face1 = geompy.MakeRotation(face0, OZ, azimut*math.pi/180.)
+      face2 = geompy.MakeTranslation(face1, 0, 0, -l_tube_p1)
+      facefiss = geompy.MakeRotation(face2, axe, alpha*math.pi/180.)
+      geompy.addToStudy( facefiss, 'facefissPlace' )
+      centre = geompy.MakeRotation(pb, OZ, azimut*math.pi/180.)
+      centre = geompy.MakeTranslation(centre, 0, 0, -l_tube_p1)
+      centre = geompy.MakeRotation(centre, axe, alpha*math.pi/180.)
+      geompy.addToStudy( centre, 'centrefissPlace' )
+      arcr = geompy.MakeRotation(arcr, OZ, azimut*math.pi/180.)
+      arcr = geompy.MakeTranslation(arcr, 0, 0, -l_tube_p1)
+      arcr = geompy.MakeRotation(arcr, axe, alpha*math.pi/180.)
+      arci = geompy.MakeRotation(arci, OZ, azimut*math.pi/180.)
+      arci = geompy.MakeTranslation(arci, 0, 0, -l_tube_p1)
+      arci = geompy.MakeRotation(arci, axe, alpha*math.pi/180.)
+      arcl = geompy.MakeRotation(arcl, OZ, azimut*math.pi/180.)
+      arcl = geompy.MakeTranslation(arcl, 0, 0, -l_tube_p1)
+      arcl = geompy.MakeRotation(arcl, axe, alpha*math.pi/180.)
+      wiretube = geompy.MakeRotation(wire0, OZ, azimut*math.pi/180.)
+      wiretube = geompy.MakeTranslation(wiretube, 0, 0, -l_tube_p1)
+      wiretube = geompy.MakeRotation(wiretube, axe, alpha*math.pi/180.)
+      geompy.addToStudy(wiretube, 'wiretubePlace' )
+      facetubel = geompy.MakeRotation(facetubel, OZ, azimut*math.pi/180.)
+      facetubel = geompy.MakeTranslation(facetubel, 0, 0, -l_tube_p1)
+      facetubel = geompy.MakeRotation(facetubel, axe, alpha*math.pi/180.)
+      geompy.addToStudy(facetubel, 'facetubeGauche' )
+      facetuber = geompy.MakeRotation(facetuber, OZ, azimut*math.pi/180.)
+      facetuber = geompy.MakeTranslation(facetuber, 0, 0, -l_tube_p1)
+      facetuber = geompy.MakeRotation(facetuber, axe, alpha*math.pi/180.)
+      geompy.addToStudy(facetuber, 'facetubeDroit' )
+      planfiss = geompy.MakeRotation(plan0, OZ, azimut*math.pi/180.)
+      planfiss = geompy.MakeTranslation(planfiss, 0, 0, -l_tube_p1)
+      planfiss = geompy.MakeRotation(planfiss, axe, alpha*math.pi/180.)
+      geompy.addToStudy(planfiss, 'planfissPlace' )
+      pipefissl = geompy.MakePipe(facetubel, arcl)
+      pipefissi = geompy.MakePipe(facetubel, arci)
+      pipefissr = geompy.MakePipe(facetuber, arcr)
+      pipefiss = geompy.MakePartition([pipefissl, pipefissi, pipefissr], [planfiss, wiretube], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
+      geompy.addToStudy(pipefiss, 'pipefissPlace' )
+
+
+    elif self.longitudinale:
+      if externe:
+        raybor = r_cintr + de/2.
+        rayint = raybor - profondeur
+        rayext = raybor + profondeur
+      else:
+        rayext = r_cintr + de/2. - epais
+        rayint = raybor + profondeur
+        rayext = raybor - profondeur
+      lgfond = longueur -2*profondeur
+      angle = lgfond/(2*raybor)
+      pb = geompy.MakeVertex(-raybor, 0, 0)
+      pi = geompy.MakeVertex(-rayint, 0, 0)
+      pe = geompy.MakeVertex(-rayext, 0, 0)
+      pl = geompy.MakeVertex(-raybor, 0, -profondeur)
+      pr = geompy.MakeVertex(-raybor, 0, profondeur)
+      pil = geompy.MakeRotation(pi, OY, -angle)
+      pll = geompy.MakeRotation(pl, OY, -angle)
+      pel = geompy.MakeRotation(pe, OY, -angle)
+      pir = geompy.MakeRotation(pi, OY, angle)
+      prr = geompy.MakeRotation(pr, OY, angle)
+      per = geompy.MakeRotation(pe, OY, angle)
+      arcl = geompy.MakeArc(pil, pll, pel)
+      arcr = geompy.MakeArc(pir, prr, per)
+      arci = geompy.MakeArc(pil, pi, pir)
+      arce = geompy.MakeArc(pel, pe, per)
+      geompy.addToStudy( arcl, 'arcl' )
+      geompy.addToStudy( arcr, 'arcr' )
+      geompy.addToStudy( arci, 'arci' )
+      geompy.addToStudy( arce, 'arce' )
+      wire0 = geompy.MakeWire([arcr, arci, arcl])
+      cercle0 = geompy.MakeCircle(O, OZ, profondeur/4.0)
+      #cercle0 = geompy.MakeRotation(cercle0, OZ, math.pi/2.0)
+      cercle0 = geompy.MakeTranslationTwoPoints(cercle0, O, pi)
+      geompy.addToStudy( cercle0, 'cercle0' )
+      facetube0 = geompy.MakeFaceWires([cercle0], 1)
+      facetubel = geompy.MakeRotation(facetube0, OY, -angle)
+      facetuber = geompy.MakeRotation(facetube0, OY, angle)
+      geompy.addToStudy(facetubel , 'facetubel' )
+      geompy.addToStudy( facetuber, 'facetuber' )
+      face0 = geompy.MakeFaceWires([arcl,arci, arce, arcr], 1)
+      plan0 = geompy.MakePlane(O, OY, 10000)
+      geompy.addToStudy( face0, 'facefissOrig' )
+      facefiss = geompy.MakeRotation(face0, OY, alpha*math.pi/180.)
+      geompy.addToStudy( facefiss, 'facefissPlace' )
+      centre = geompy.MakeRotation(pb, OY, alpha*math.pi/180.)
+      geompy.addToStudy( centre, 'centrefissPlace' )
+      arcr = geompy.MakeRotation(arcr, OY, alpha*math.pi/180.)
+      arci = geompy.MakeRotation(arci, OY, alpha*math.pi/180.)
+      arcl = geompy.MakeRotation(arcl, OY, alpha*math.pi/180.)
+      wiretube = geompy.MakeRotation(wire0, OY, alpha*math.pi/180.)
+      geompy.addToStudy(wiretube, 'wiretubePlace' )
+      facetubel = geompy.MakeRotation(facetubel, OY, alpha*math.pi/180.)
+      geompy.addToStudy(facetubel, 'facetubeGauche' )
+      facetuber = geompy.MakeRotation(facetuber, OY, alpha*math.pi/180.)
+      geompy.addToStudy(facetubel, 'facetubeDroit' )
+      planfiss = geompy.MakeRotation(plan0, OY, alpha*math.pi/180.)
+      geompy.addToStudy(planfiss, 'planfissPlace' )
+      pipefissl = geompy.MakePipe(facetubel, arcl)
+      pipefissi = geompy.MakePipe(facetubel, arci)
+      pipefissr = geompy.MakePipe(facetuber, arcr)
+      pipefiss = geompy.MakePartition([pipefissl, pipefissi, pipefissr], [planfiss, wiretube], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
+      geompy.addToStudy(pipefiss, 'pipefissPlace' )
+    else:
+      pass
+
+    coordsNoeudsFissure = genereMeshCalculZoneDefaut(facefiss, 5 ,10)
+
+    return [facefiss, centre, lgInfluence, coordsNoeudsFissure, wiretube, facetubel, facetuber, planfiss, pipefiss]
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    self.maillageFissureParams = dict(nomRep        = '.',
+                                      nomFicSain    = self.nomCas,
+                                      nomFicFissure = 'fissure_' + self.nomCas,
+                                      nbsegExt      = 5,
+                                      nbsegGen      = 25,
+                                      nbsegRad      = 5,
+                                      scaleRad      = 4,
+                                      nbsegCercle   = 6,
+                                      nbsegFis      = 20,
+                                      lensegEllipso = 1.0)
+
+  # ---------------------------------------------------------------------------
+  def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
+    elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
+    return elementsDefaut
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageFissure(self, geometriesSaines, maillagesSains,
+                            shapesFissure, shapeFissureParams,
+                            maillageFissureParams, elementsDefaut, step):
+    maillageFissure = insereFissureLongue(geometriesSaines, maillagesSains,
+                                          shapesFissure, shapeFissureParams,
+                                          maillageFissureParams, elementsDefaut, step)
+    return maillageFissure
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Node            = 77491,
+                                          Entity_Quad_Edge       = 1006,
+                                          Entity_Quad_Triangle   = 2412,
+                                          Entity_Quad_Quadrangle = 6710,
+                                          Entity_Quad_Tetra      = 20853,
+                                          Entity_Quad_Hexa       = 8656,
+                                          Entity_Quad_Penta      = 1176,
+                                          Entity_Quad_Pyramid    = 1232)
+
diff --git a/src/Tools/blocFissure/CasTests/fissure_Coude_4.py b/src/Tools/blocFissure/CasTests/fissure_Coude_4.py
new file mode 100644 (file)
index 0000000..55a8b09
--- /dev/null
@@ -0,0 +1,73 @@
+# -*- coding: utf-8 -*-
+
+from fissure_Coude  import fissure_Coude
+
+class fissure_Coude_4(fissure_Coude):
+  """
+  probleme de fissure du Coude : ASCOU09A
+  adaptation maillage
+  """
+
+# ---------------------------------------------------------------------------
+  def setParamGeometrieSaine(self):
+    """
+    Paramètres géométriques du tuyau coudé sain:
+    angleCoude
+    r_cintr
+    l_tube_p1
+    l_tube_p2
+    epais
+    de
+    """
+    self.geomParams = dict(angleCoude = 40,
+                           r_cintr    = 654,
+                           l_tube_p1  = 1700,
+                           l_tube_p2  = 1700,
+                           epais      = 62.5,
+                           de         = 912.4)
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageSain(self):
+    self.meshParams = dict(n_long_p1    = 16,
+                           n_ep         = 5,
+                           n_long_coude = 30,
+                           n_circ_g     = 50,
+                           n_circ_d     = 20,
+                           n_long_p2    = 12)
+
+# ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure
+    profondeur  : 0 < profondeur <= épaisseur
+    azimut      : entre 0 et 360°
+    alpha       : 0 < alpha < angleCoude
+    longueur    : <=2*profondeur ==> ellipse, >2*profondeur = fissure longue
+    orientation : 0° : longitudinale, 90° : circonférentielle, autre : uniquement fissures elliptiques
+    externe     : True : fissure face externe, False : fissure face interne
+    """
+    print "setParamShapeFissure", self.nomCas
+    self.shapeFissureParams = dict(nomRep        = '.',
+                                   nomFicSain    = self.nomCas,
+                                   nomFicFissure = 'fissure_' + self.nomCas,
+                                   profondeur  = 10,
+                                   azimut      = 90,
+                                   alpha       = 20,
+                                   longueur    = 240,
+                                   orientation = 90,
+                                   lgInfluence = 30,
+                                   elliptique  = False,
+                                   convexe     = True,
+                                   externe     = True)
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 948,
+                                          Entity_Quad_Triangle   = 1562,
+                                          Entity_Quad_Edge       = 1192,
+                                          Entity_Quad_Penta      = 732,
+                                          Entity_Quad_Hexa       = 22208,
+                                          Entity_Node            = 133418,
+                                          Entity_Quad_Tetra      = 18759,
+                                          Entity_Quad_Quadrangle = 11852)
+
diff --git a/src/Tools/blocFissure/CasTests/vis_1.py b/src/Tools/blocFissure/CasTests/vis_1.py
new file mode 100644 (file)
index 0000000..fdcb5c9
--- /dev/null
@@ -0,0 +1,105 @@
+# -*- coding: utf-8 -*-
+
+import os
+from blocFissure import gmu
+from blocFissure.gmu.geomsmesh import geompy, smesh
+
+import math
+import GEOM
+import SALOMEDS
+import SMESH
+#import StdMeshers
+#import GHS3DPlugin
+#import NETGENPlugin
+import logging
+
+from blocFissure.gmu.fissureGenerique import fissureGenerique
+
+from blocFissure.gmu.triedreBase import triedreBase
+from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
+from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
+from blocFissure.gmu.insereFissureGenerale import insereFissureGenerale
+
+O, OX, OY, OZ = triedreBase()
+
+class vis_1(fissureGenerique):
+  """
+  problème de fissure non plane, débouchante non normale
+  """
+
+  nomProbleme = "vis_1"
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageSain(self, geometriesSaines, meshParams):
+    logging.info("genereMaillageSain %s", self.nomCas)
+
+    ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests/visSain.med"))
+    smesh.SetName(objetSain.GetMesh(), 'objetSain')
+
+    return [objetSain, True] # True : maillage hexa
+
+  # ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour méthode insereFissureGenerale
+    lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage)
+    rayonPipe   : le rayon du pile maillé en hexa autour du fond de fissure
+    convexe     : optionnel True : la face est convexe (vue de l'exterieur) sert si on ne donne pas de point interne
+    pointIn_x   : optionnel coordonnée x d'un point dans le solide sain (pour orienter la face)
+    """
+    logging.info("setParamShapeFissure %s", self.nomCas)
+    self.shapeFissureParams = dict(lgInfluence = 0.6,
+                                   rayonPipe   = 0.1)
+
+  # ---------------------------------------------------------------------------
+  def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
+    logging.info("genereShapeFissure %s", self.nomCas)
+
+    lgInfluence = shapeFissureParams['lgInfluence']
+
+    shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/visFiss.brep"), "BREP")
+    fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
+    geompy.UnionIDs(fondFiss, [4, 7, 9])
+    geompy.addToStudy( shellFiss, 'shellFiss' )
+    geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
+
+
+    coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 0.1 ,0.2)
+
+    centre = None
+    return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    self.maillageFissureParams = dict(nomRep           = '.',
+                                      nomFicSain       = self.nomCas,
+                                      nomFicFissure    = 'fissure_' + self.nomCas,
+                                      nbsegRad         = 5,
+                                      nbsegCercle      = 32,
+                                      areteFaceFissure = 0.1)
+
+  # ---------------------------------------------------------------------------
+  def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
+    elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
+    return elementsDefaut
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageFissure(self, geometriesSaines, maillagesSains,
+                            shapesFissure, shapeFissureParams,
+                            maillageFissureParams, elementsDefaut, step):
+    maillageFissure = insereFissureGenerale(maillagesSains,
+                                            shapesFissure, shapeFissureParams,
+                                            maillageFissureParams, elementsDefaut, step)
+    return maillageFissure
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 1284,
+                                          Entity_Quad_Triangle   = 2336,
+                                          Entity_Quad_Edge       = 758,
+                                          Entity_Quad_Penta      = 984,
+                                          Entity_Quad_Hexa       = 6416,
+                                          Entity_Node            = 85673,
+                                          Entity_Quad_Tetra      = 35990,
+                                          Entity_Quad_Quadrangle = 4285)
+
diff --git a/src/Tools/blocFissure/README b/src/Tools/blocFissure/README
new file mode 100644 (file)
index 0000000..62a3fa8
--- /dev/null
@@ -0,0 +1,25 @@
+
+Exécution des exemples et cas tests :
+------------------------------------ 
+
+- lancer salome
+- exécuter les instructions suivantes dans la console Python embarquée, ou dans une console Python avec l'environnement SALOME
+  # les shapes et fichiers med nécessaires aux tests sont créés dans ${SMESH_ROOT_DIR}/share/salome/plugins/smesh/blocFissure/CasTests
+  # les maillages fissurés sont écrits dans le répertoire d'exécution.
+
+
+# preparation des shapes et fichiers MED
+
+import sys, os
+sys.path.append(os.path.join(os.environ["SMESH_ROOT_DIR"], "share", "salome", "plugins", "smesh"))
+from blocFissure.materielCasTests import genereMateriel
+
+# execution exemples
+
+from blocFissure import exemple
+from blocFissure import exemple
+
+# execution des cas tests
+
+from blocFissure.CasTests import execution_Cas
+
diff --git a/src/Tools/blocFissure/__init__.py b/src/Tools/blocFissure/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/Tools/blocFissure/casStandard.py b/src/Tools/blocFissure/casStandard.py
new file mode 100644 (file)
index 0000000..9c1ac55
--- /dev/null
@@ -0,0 +1,145 @@
+# -*- coding: utf-8 -*-
+
+import os
+from blocFissure import gmu
+from blocFissure.gmu.geomsmesh import geompy, smesh
+
+import math
+import GEOM
+import SALOMEDS
+import SMESH
+#import StdMeshers
+#import GHS3DPlugin
+#import NETGENPlugin
+import logging
+
+from blocFissure.gmu.fissureGenerique import fissureGenerique
+
+from blocFissure.gmu.initEtude import initEtude
+from blocFissure.gmu.triedreBase import triedreBase
+from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
+from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
+from blocFissure.gmu.insereFissureGenerale import insereFissureGenerale
+
+O, OX, OY, OZ = triedreBase()
+
+class casStandard(fissureGenerique):
+  """
+  problème de fissure standard, défini par :
+  - un maillage sain (hexaèdres),
+  - une face géométrique de fissure, qui doit légèrement dépasser hors du volume maillé
+  - les numéros d'arêtes (edges géométriques) correspondant au fond de fissure
+  - les paramètres de maillage de la fissure
+  """
+
+  # ---------------------------------------------------------------------------
+  def __init__ (self, dicoParams, references = None, numeroCas = 0):
+    initEtude()
+    self.references = references
+    self.dicoParams = dicoParams
+    if self.dicoParams.has_key('nomCas'):
+      self.nomCas = self.dicoParams['nomCas']
+    else:
+      self.nomCas = 'casStandard'    
+    self.numeroCas = numeroCas
+    if self.numeroCas != 0:
+      self.nomCas = self.nomProbleme +"_%d"%(self.numeroCas)
+    else:
+      self.nomProbleme = self.nomCas
+    if self.dicoParams.has_key('lenSegPipe'):
+      self.lenSegPipe = self.dicoParams['lenSegPipe']
+    else:
+      self.lenSegPipe =self.dicoParams['rayonPipe']
+    if self.dicoParams.has_key('step'):
+      step = self.dicoParams['step']
+    else:
+      step = -1 # exécuter toutes les étapes
+    if self.numeroCas == 0: # valeur par défaut : exécution immédiate, sinon execution différée dans le cas d'une liste de problèmes
+      self.executeProbleme(step)
+    
+  # ---------------------------------------------------------------------------
+  def genereMaillageSain(self, geometriesSaines, meshParams):
+    logging.info("genereMaillageSain %s", self.nomCas)
+
+    ([objetSain], status) = smesh.CreateMeshesFromMED(self.dicoParams['maillageSain'])
+    smesh.SetName(objetSain.GetMesh(), 'objetSain')
+
+    return [objetSain, True] # True : maillage hexa
+
+  # ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour méthode insereFissureGenerale
+    lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage)
+    rayonPipe   : le rayon du pile maillé en hexa autour du fond de fissure
+    convexe     : True : la face est convexe (vue de l'exterieur) sert si on ne donne pas de point interne
+    pointIn_x   : optionnel : coordonnée x d'un point dans le solide sain (pour orienter la face - idem avec y,z)
+    """
+    logging.info("setParamShapeFissure %s", self.nomCas)
+    if self.dicoParams.has_key('pointInterieur'):
+      self.shapeFissureParams = dict(lgInfluence = self.dicoParams['lgInfluence'],
+                                     rayonPipe   = self.dicoParams['rayonPipe'],
+                                     lenSegPipe  = self.lenSegPipe,
+                                     pointIn_x   = self.dicoParams['pointInterieur'][0],
+                                     pointIn_y   = self.dicoParams['pointInterieur'][1],
+                                     pointIn_z   = self.dicoParams['pointInterieur'][2])
+    else:
+      self.shapeFissureParams = dict(lgInfluence = self.dicoParams['lgInfluence'],
+                                     rayonPipe   = self.dicoParams['rayonPipe'],
+                                     lenSegPipe  = self.lenSegPipe)
+
+  # ---------------------------------------------------------------------------
+  def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
+    logging.info("genereShapeFissure %s", self.nomCas)
+
+    lgInfluence = shapeFissureParams['lgInfluence']
+
+    shellFiss = geompy.ImportFile( self.dicoParams['brepFaceFissure'], "BREP")
+    fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
+    geompy.UnionIDs(fondFiss, self.dicoParams['edgeFissIds'] )
+    geompy.addToStudy( shellFiss, 'shellFiss' )
+    geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
+
+
+    coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, self.dicoParams['meshBrep'][0] ,self.dicoParams['meshBrep'][1])
+
+    centre = None
+    return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    self.maillageFissureParams = dict(nomRep           = '.',
+                                      nomFicSain       = self.nomCas,
+                                      nomFicFissure    = 'fissure_' + self.nomCas,
+                                      nbsegRad         = self.dicoParams['nbSegRad'],
+                                      nbsegCercle      = self.dicoParams['nbSegCercle'],
+                                      areteFaceFissure = self.dicoParams['areteFaceFissure'])
+
+  # ---------------------------------------------------------------------------
+  def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
+    elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
+    return elementsDefaut
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageFissure(self, geometriesSaines, maillagesSains,
+                            shapesFissure, shapeFissureParams,
+                            maillageFissureParams, elementsDefaut, step):
+    maillageFissure = insereFissureGenerale(maillagesSains,
+                                            shapesFissure, shapeFissureParams,
+                                            maillageFissureParams, elementsDefaut, step)
+    return maillageFissure
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    if self.references is not None:
+      self.referencesMaillageFissure = self.references
+    else:
+      self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 0,
+                                            Entity_Quad_Triangle   = 0,
+                                            Entity_Quad_Edge       = 0,
+                                            Entity_Quad_Penta      = 0,
+                                            Entity_Quad_Hexa       = 0,
+                                            Entity_Node            = 0,
+                                            Entity_Quad_Tetra      = 0,
+                                            Entity_Quad_Quadrangle = 0)
+
diff --git a/src/Tools/blocFissure/exemple.py b/src/Tools/blocFissure/exemple.py
new file mode 100644 (file)
index 0000000..f351d59
--- /dev/null
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+
+import os
+from blocFissure import gmu
+from blocFissure.gmu import initLog
+initLog.setDebug()
+#initLog.setVerbose()
+
+from blocFissure.casStandard import casStandard
+
+dicoParams = dict(nomCas            = 'angleCube',
+                  maillageSain      = os.path.join(gmu.pathBloc, 'materielCasTests/CubeAngle.med'),
+                  brepFaceFissure   = os.path.join(gmu.pathBloc, "materielCasTests/CubeAngleFiss.brep"),
+                  edgeFissIds       = [4],
+                  lgInfluence       = 20,
+                  meshBrep          = (5,10),
+                  rayonPipe         = 5,
+                  lenSegPipe        = 2.5,
+                  nbSegRad          = 5,
+                  nbSegCercle       = 32,
+                  areteFaceFissure  = 10)
+
+execInstance = casStandard(dicoParams)
diff --git a/src/Tools/blocFissure/exemple2.py b/src/Tools/blocFissure/exemple2.py
new file mode 100644 (file)
index 0000000..c6d20eb
--- /dev/null
@@ -0,0 +1,93 @@
+# -*- coding: iso-8859-1 -*-
+
+import sys
+import salome
+
+salome.salome_init()
+theStudy = salome.myStudy
+
+import salome_notebook
+notebook = salome_notebook.NoteBook(theStudy)
+
+###
+### GEOM component
+###
+
+import GEOM
+from salome.geom import geomBuilder
+import math
+import SALOMEDS
+
+
+geompy = geomBuilder.New(theStudy)
+
+O = geompy.MakeVertex(0, 0, 0)
+OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
+OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
+OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
+Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
+Vertex_1 = geompy.MakeVertex(0, 0, 100)
+Disk_1 = geompy.MakeDiskPntVecR(Vertex_1, OZ, 50)
+Rotation_1 = geompy.MakeRotation(Box_1, OZ, 45*math.pi/180.0)
+geompy.TranslateDXDYDZ(Rotation_1, -50, -250, 0)
+Cut_1 = geompy.MakeCut(Disk_1, Rotation_1)
+geompy.Export(Cut_1, "disk.brep", "BREP")
+geompy.addToStudy( O, 'O' )
+geompy.addToStudy( OX, 'OX' )
+geompy.addToStudy( OY, 'OY' )
+geompy.addToStudy( OZ, 'OZ' )
+geompy.addToStudy( Box_1, 'Box_1' )
+geompy.addToStudy( Vertex_1, 'Vertex_1' )
+geompy.addToStudy( Disk_1, 'Disk_1' )
+geompy.addToStudy( Rotation_1, 'Rotation_1' )
+geompy.addToStudy( Cut_1, 'Cut_1' )
+
+###
+### SMESH component
+###
+
+import  SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+
+smesh = smeshBuilder.New(theStudy)
+from salome.StdMeshers import StdMeshersBuilder
+boite = smesh.Mesh(Box_1)
+Regular_1D = boite.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(15)
+Nb_Segments_1.SetDistrType( 0 )
+Quadrangle_2D = boite.Quadrangle(algo=smeshBuilder.QUADRANGLE)
+Hexa_3D = boite.Hexahedron(algo=smeshBuilder.Hexa)
+isDone = boite.Compute()
+smesh.SetName(boite, 'boite')
+boite.ExportMED( r'boite.med', 0, SMESH.MED_V2_2, 1 )
+
+## set object names
+smesh.SetName(boite.GetMesh(), 'boite')
+smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
+smesh.SetName(Nb_Segments_1, 'Nb. Segments_1')
+smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
+smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D')
+
+import os
+from blocFissure import gmu
+from blocFissure.gmu import initLog
+#initLog.setDebug()
+initLog.setVerbose()
+
+from blocFissure.casStandard import casStandard
+
+dicoParams = dict(nomCas            = 'angleCube2',
+                  maillageSain      = 'boite.med',
+                  brepFaceFissure   = "disk.brep",
+                  edgeFissIds       = [4],
+                  lgInfluence       = 20,
+                  meshBrep          = (5,10),
+                  rayonPipe         = 10,
+                  nbSegRad          = 5,
+                  nbSegCercle       = 8,
+                  areteFaceFissure  = 10)
+
+execInstance = casStandard(dicoParams)
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/src/Tools/blocFissure/gmu/CMakeLists.txt b/src/Tools/blocFissure/gmu/CMakeLists.txt
new file mode 100644 (file)
index 0000000..8bd0ceb
--- /dev/null
@@ -0,0 +1,88 @@
+# Copyright (C) 2012-2014  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, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# --- scripts ---
+
+# scripts / static
+SET(plugin_SCRIPTS
+  __init__.py
+  blocDefaut.py
+  checkDecoupePartition.py
+  commonSubShapes.py
+  creeZoneDefautDansObjetSain.py
+  creeZoneDefautFilling.py
+  creeZoneDefautGeom.py
+  creeZoneDefautMaillage.py
+  distance2.py
+  eliminateDoubles.py
+  ellipsoideDefaut.py
+  enleveDefaut.py
+  extractionOrienteeMulti.py
+  extractionOrientee.py
+  facesCirculaires.py
+  facesFissure.py
+  facesToreInBloc.py
+  facesVolumesToriques.py
+  findWireEndVertices.py
+  findWireIntermediateVertices.py
+  fissureCoude.py
+  fissureGenerique.py
+  genereElemsFissureElliptique.py
+  genereMeshCalculZoneDefaut.py
+  geomsmesh.py
+  getCentreFondFiss.py
+  getStatsMaillageFissure.py
+  getSubshapeIds.py
+  initEtude.py
+  initLog.py
+  insereFissureElliptique.py
+  insereFissureGenerale.py
+  insereFissureLongue.py
+  meshBlocPart.py
+  orderEdgesFromWire.py
+  partitionBlocDefaut.py
+  partitionVolumeSain.py
+  peauInterne.py
+  produitMixte.py
+  projettePointSurCourbe.py
+  prolongeVertices.py
+  prolongeWire.py
+  propagateTore.py
+  putName.py
+  quadranglesToShape.py
+  regroupeSainEtDefaut.py
+  rotTrans.py
+  shapesSurFissure.py
+  shapeSurFissure.py
+  sortEdges.py
+  sortFaces.py
+  sortGeneratrices.py
+  sortSolids.py
+  substractSubShapes.py
+  testgmu.py
+  toreFissure.py
+  triedreBase.py
+  whichSideMulti.py
+  whichSide.py
+  whichSideVertex.py
+)
+
+# --- rules ---
+
+SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/blocFissure/gmu)
diff --git a/src/Tools/blocFissure/gmu/__init__.py b/src/Tools/blocFissure/gmu/__init__.py
new file mode 100644 (file)
index 0000000..728082f
--- /dev/null
@@ -0,0 +1,18 @@
+# -*- coding: utf-8 -*-
+
+import os
+import initLog
+#initLog.setDebug()
+#initLog.setVerbose()
+#initLog.setRelease()
+
+# --- calcul path blocFissure
+
+apath = initLog.__file__
+isabs = os.path.isabs(apath)
+pathGmu = os.path.split(apath)[0]
+if isabs:
+  pathBloc = os.path.join(pathGmu, '..')
+else:
+  pathBloc = os.path.join(os.getcwd(), pathGmu, '..')
+pathBloc = os.path.normpath(pathBloc)
diff --git a/src/Tools/blocFissure/gmu/blocDefaut.py b/src/Tools/blocFissure/gmu/blocDefaut.py
new file mode 100644 (file)
index 0000000..0e68757
--- /dev/null
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- bloc defaut
+
+def blocDefaut(blocDim):
+  """
+  Le bloc contenant la fissure est un cube construit centre a l'origine, dont on donne la demi arete.
+  @param blocdim : demi arete
+  @return  cube (geomObject)
+  """
+  logging.info("start")
+  geomObj_1 = geompy.MakeVertex(-blocDim, -blocDim, -blocDim)
+  geomObj_2 = geompy.MakeVertex( blocDim,  blocDim,  blocDim)
+  Box = geompy.MakeBoxTwoPnt(geomObj_1, geomObj_2)
+  #geompy.addToStudy( Box_1, 'Box_1' )
+  return Box
diff --git a/src/Tools/blocFissure/gmu/checkDecoupePartition.py b/src/Tools/blocFissure/gmu/checkDecoupePartition.py
new file mode 100644 (file)
index 0000000..e1fcf2b
--- /dev/null
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- teste si l'opération de partition a produit une modification
+
+def checkDecoupePartition(shapes, part):
+  """
+  Teste si l'opération de partition a produit une découpe
+  (plus de shapes dans la partition).
+  Résultat non garanti si recouvrement des shapes d'origine.
+  @param shapes : liste des shapes d'origine
+  @param part : résultat de la partition
+  @return True si la partition a découpé les shapes d'origine
+  """
+  logging.info('start')
+  # TODO: ShapeInfo donne des résultats faux (deux faces au lieu de une)
+  
+  isPart = False
+  orig = {}
+  for shape in shapes:
+    info = geompy.ShapeInfo(shape)
+    logging.debug("shape info %s", info)
+    for k in ['VERTEX', 'EDGE', 'FACE', 'SOLID']:
+      if k in orig.keys():
+        orig[k] += info[k]
+      else:
+        orig[k] = info[k]
+  logging.debug("original shapes info %s", orig)
+  info = geompy.ShapeInfo(part)
+  logging.debug("partition info %s", info)
+  for k in ['VERTEX', 'EDGE', 'FACE', 'SOLID']:
+    if orig[k] < info[k]:
+      isPart = True
+      break
+  logging.debug("partition modifie l'original %s", isPart)
+
+  return isPart
+
diff --git a/src/Tools/blocFissure/gmu/commonSubShapes.py b/src/Tools/blocFissure/gmu/commonSubShapes.py
new file mode 100644 (file)
index 0000000..1777ae8
--- /dev/null
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- subShapes communes à deux listes
+
+def commonSubShapes(obj, sub1, sub2):
+  """
+  liste de subshapes communes
+  """
+  logging.info("start")
+  idsub1 = {}
+  subList = []
+  for s in sub1:
+    idsub1[geompy.GetSubShapeID(obj, s)] = s
+  for s in sub2:
+    idsub = geompy.GetSubShapeID(obj, s)
+    if idsub in idsub1.keys():
+      subList.append(s)
+  logging.debug("subList=%s", subList)
+  return subList
diff --git a/src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py b/src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py
new file mode 100644 (file)
index 0000000..edd6855
--- /dev/null
@@ -0,0 +1,94 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import smesh
+import SMESH
+import SALOMEDS
+
+from creeZoneDefautMaillage import creeZoneDefautMaillage
+from peauInterne import peauInterne
+from quadranglesToShape import quadranglesToShape
+from creeZoneDefautFilling import creeZoneDefautFilling
+from creeZoneDefautGeom import creeZoneDefautGeom
+from getCentreFondFiss import getCentreFondFiss
+
+# -----------------------------------------------------------------------------
+# ---
+
+def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure,
+                                shapeFissureParams, maillageFissureParams):
+  """
+  TODO: a compléter
+  """
+  logging.info('start')
+  
+  #smesh.SetCurrentStudy(salome.myStudy)
+
+  geometrieSaine      = geometriesSaines[0]
+  maillageSain        = maillagesSains[0]
+  isHexa              = maillagesSains[1]
+  shapeDefaut         = shapesFissure[0]
+  tailleDefaut        = shapesFissure[2]
+  coordsNoeudsFissure = shapesFissure[3]
+
+  isElliptique = False
+  if shapeFissureParams.has_key('elliptique'):
+    isElliptique      = shapeFissureParams['elliptique']
+  if isElliptique:
+    if shapeFissureParams.has_key('demiGrandAxe'):
+      demiGrandAxe    = shapeFissureParams['demiGrandAxe']
+    else:
+      demiGrandAxe    = shapeFissureParams['longueur']
+    lgExtrusion = 2.0*demiGrandAxe
+  else:
+    lgExtrusion = 50.
+
+  nomRep              = maillageFissureParams['nomRep']
+  nomFicSain          = maillageFissureParams['nomFicSain']
+
+  fichierMaillageSain    = nomRep + '/' + nomFicSain + '.med'
+  
+  # --- centre de fond de fissure et tangente
+  
+  edgeFondExt, centreFondFiss, tgtCentre = getCentreFondFiss(shapesFissure)
+  
+
+  # --- zone de défaut
+  nomZones = "zoneDefaut"
+
+  [origShapes, verticesShapes, dmoyen] = \
+    creeZoneDefautMaillage(maillagesSains, shapeDefaut, tailleDefaut, nomZones, coordsNoeudsFissure)
+
+  maillageSain.ExportMED( fichierMaillageSain, 0, SMESH.MED_V2_2, 1 )
+  logging.debug("fichier maillage sain %s", fichierMaillageSain)
+  [maillageSain, internalBoundary, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges] = \
+    peauInterne(fichierMaillageSain, nomZones)
+
+  facesDefaut = []
+  centresDefaut = []
+  normalsDefaut =[]
+  extrusionsDefaut = []
+  isPlane = False
+  if isHexa and not isPlane:
+    meshQuad =  smesh.CopyMesh( zoneDefaut_skin, 'meshQuad', 0, 0)
+    fillings, noeuds_bords, bordsPartages, fillconts, idFilToCont  = quadranglesToShape(meshQuad, shapeFissureParams, centreFondFiss)
+    for filling in fillings:
+      [faceDefaut, centreDefaut, normalDefaut, extrusionDefaut] = \
+        creeZoneDefautFilling(filling, shapeDefaut, lgExtrusion)
+      facesDefaut.append(faceDefaut)
+      centresDefaut.append(centreDefaut)
+      normalsDefaut.append(normalDefaut)
+      extrusionsDefaut.append(extrusionDefaut)
+  else:
+    [facesDefaut, centreDefaut, normalDefaut, extrusionDefaut] = \
+      creeZoneDefautGeom( geometrieSaine, shapeDefaut, origShapes, verticesShapes, dmoyen, lgExtrusion)
+    bordsPartages =[]
+    for face in facesDefaut:
+      bordsPartages.append([None,None]) # TODO : traitement des arêtes vives ?
+    fillconts = facesDefaut
+    idFilToCont = range(len(facesDefaut))
+
+  return [facesDefaut, centresDefaut, normalsDefaut, extrusionsDefaut, dmoyen, bordsPartages, fillconts, idFilToCont,
+          maillageSain, internalBoundary, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges,
+          edgeFondExt, centreFondFiss, tgtCentre]
+
diff --git a/src/Tools/blocFissure/gmu/creeZoneDefautFilling.py b/src/Tools/blocFissure/gmu/creeZoneDefautFilling.py
new file mode 100644 (file)
index 0000000..ed3229e
--- /dev/null
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- crée zone géométrique défaut a partir d'un filling
+
+def creeZoneDefautFilling(filling, shapeDefaut, lgExtrusion=50):
+  """
+  Construction CAO de la zone à remailler, quand on utilise un filling,
+  après appel creeZoneDefautMaillage et quadranglesToShape
+  @param filling : la CAO de la peau du défaut reconstituée
+  @param shapeDefaut : objet géométrique représentant la fissure
+  (selon les cas, un point central, ou une shape plus complexe,
+  dont on ne garde que les vertices)
+  @return (facesDefaut = filling, centreDefaut, normalDefaut, extrusionDefaut)
+  """
+  logging.info("start")
+
+  trace = True
+  facesDefaut = filling
+  centreSphere = geompy.MakeCDG(shapeDefaut)
+  geompy.addToStudy(centreSphere, "cdg_defaut")
+  centreDefaut = geompy.MakeProjection(centreSphere, filling)
+  if trace:
+    geompy.addToStudy(centreDefaut, "centreDefaut")
+  normalDefaut = geompy.GetNormal(filling, centreDefaut)
+  if trace:
+    geompy.addToStudy(normalDefaut, "normalDefaut")
+  extrusionDefaut = geompy.MakePrismVecH(filling, normalDefaut, -lgExtrusion)
+  if trace:
+    geompy.addToStudy(extrusionDefaut, "extrusionDefaut")
+
+  return facesDefaut, centreDefaut, normalDefaut, extrusionDefaut
diff --git a/src/Tools/blocFissure/gmu/creeZoneDefautGeom.py b/src/Tools/blocFissure/gmu/creeZoneDefautGeom.py
new file mode 100644 (file)
index 0000000..9969c8d
--- /dev/null
@@ -0,0 +1,207 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+from prolongeVertices import prolongeVertices
+
+# -----------------------------------------------------------------------------
+# --- zone de defaut, constructions geometrique avec CAO d'origine
+
+def creeZoneDefautGeom(objetSain, shapeDefaut, origShapes, verticesShapes, dmoyen, lgExtrusion=50):
+  """
+  Construction CAO de la zone à remailler, quand on utilise la CAO d'origine,
+  apres appel creeZoneDefautMaillage
+  @param objetSain : la géometrie de l'objet initial
+  @param shapeDefaut : objet géometrique représentant la fissure
+  (selon les cas, un point central, ou une shape plus complexe,
+  dont on ne garde que les vertices)
+  @param origShapes : liste id subShapes
+  @param verticesShapes : listes noeuds de bord
+  @param dmoyen : longueur arete moyenne bord
+  @lgExtrusion : distance d'extrusion de la face du defaut
+  (ne vaut que pour des fissures courtes)
+  @return (facesDefaut, centreDefaut, normalDefaut, extrusionDefaut)
+  """
+  logging.info("start")
+
+  trace = True
+  faces = []
+  curves = []
+  cdgs = []
+  projs = []
+  normals = []
+  extrusions = []
+  partitions = []
+  decoupes = []
+
+  for ishape, vertices in enumerate(verticesShapes):
+    aShape = origShapes[ishape]
+    [face] = geompy.SubShapes(objetSain, [aShape])
+    faces.append(face)
+    curve = geompy.MakePolyline(vertices, False)
+    curves.append(curve)
+    if trace:
+      name="poly_%d"%aShape
+      geompy.addToStudy(curve, name)
+    #
+    cdg = geompy.MakeCDG(curve)
+    cdgs.append(cdg)
+    if trace:
+      name="cdgpoly_%d"%aShape
+      geompy.addToStudy(cdg, name)
+    #
+    projCdg = geompy.MakeProjection(cdg, face)
+    projs.append(projCdg)
+    if trace:
+      name="projCdg_%d"%aShape
+      geompy.addToStudy(projCdg, name)
+    #
+    normal = geompy.GetNormal(face, projCdg)
+    normals.append(normal)
+    if trace:
+      name="normal_%d"%aShape
+      geompy.addToStudy(normal, name)
+    #
+    extrusion = geompy.MakePrismVecH2Ways(curve, normal, 10)
+    extrusions.append(extrusion)
+    if trace:
+      name="extrusion_%d"%aShape
+      geompy.addToStudy(extrusion, name)
+    #
+    verticesProlongees = prolongeVertices(vertices)
+    #
+    curveprol = geompy.MakePolyline(verticesProlongees, False)
+    if trace:
+      name="polyProl_%d"%aShape
+      geompy.addToStudy(curveprol, name)
+    #
+    extruprol = geompy.MakePrismVecH2Ways(curveprol, normal, 10)
+    if trace:
+      name="extruProl_%d"%aShape
+      geompy.addToStudy(extruprol, name)
+    #
+    partition = geompy.MakePartition([face], [extruprol], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+    partitions.append(partition)
+    if trace:
+      name="partition_%d"%aShape
+      geompy.addToStudy(partition, name)
+    pass
+  #
+
+  centreSphere = geompy.MakeCDG(shapeDefaut)
+  geompy.addToStudy(centreSphere, "cdg_defaut")
+  ccurves = geompy.MakeCompound(curves)
+  gravCenter = geompy.MakeCDG(ccurves)
+  geompy.addToStudy(gravCenter, "cdg_curves")
+  for i in range(len(partitions)):
+    if trace:
+      logging.debug(" --- original shape %s", origShapes[i])
+    dists = []
+    facesToSort = []
+    subFaces = geompy.ExtractShapes(partitions[i], geompy.ShapeType["FACE"], True)
+    for aFace in subFaces:
+      cdg = geompy.MakeCDG(aFace)
+      distance = geompy.MinDistance(cdg, centreSphere)
+      dists.append(distance)
+      facesToSort.append(aFace)
+      if trace:
+        logging.debug("distance = %s", distance)
+        pass
+      pass
+    if len(dists) > 0:
+      minDist = min(dists)
+      for j,d in enumerate(dists):
+        if d == minDist:
+          aFace = facesToSort[j]
+          name="decoupe_%d"%origShapes[i]
+          geompy.addToStudy(aFace, name)
+          decoupes.append(aFace)
+          break
+        pass
+      pass
+
+  facesDefaut = decoupes[0]
+  if len(decoupes) > 1:
+    facesDefaut = geompy.MakePartition(decoupes, [], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+  geompy.addToStudy(facesDefaut, "facesDefaut")
+
+  shells=[]
+  if len(decoupes) > 1: # plusieurs faces de defaut
+    subFaces = geompy.ExtractShapes(facesDefaut, geompy.ShapeType["FACE"], True)
+    # --- regroupe les subFaces en shells connectes
+    theFaces = list(subFaces) # copy
+    while len(theFaces) > 0:
+      logging.debug("------- len(theFaces) %s" , len(theFaces))
+      theFace = theFaces[0]
+      logging.debug("  start with face %s",theFaces[0])
+      theFaces[0:1] = []
+      aShell = [theFace]
+      toAdd =[theFace]
+      while len(toAdd) > 0:
+        toAdd = []
+        toRemove = []
+        for i in range(len(theFaces)):
+          logging.debug("  try %s", theFaces[i])
+          for aFace in aShell:
+            logging.debug("    with %s", aFace)
+            try:
+              edge = geompy.GetSharedShapesMulti([aFace, theFaces[i]], geompy.ShapeType["EDGE"])
+              edgeShared = True
+            except:
+              edgeShared = False
+            if edgeShared:
+              if theFaces[i] not in toAdd:
+                toAdd.append(theFaces[i])
+                toRemove.append(i)
+                logging.debug("    --- add %s", theFaces[i])
+        aShell += toAdd
+        for k in sorted(toRemove, reverse=True):
+          theFaces[k:k+1] = []
+      theShell = geompy.MakeShell(aShell)
+      name = "theShell%d"%len(shells)
+      geompy.addToStudy(theShell,name)
+      shells.append(theShell)
+    #
+    distances = []
+    for aShell in shells: # --- trouver le shell en contact avec la fissure
+      distances.append(geompy.MinDistance(aShell, shapeDefaut))
+    minDist = min(distances)
+    for index in range(len(distances)):
+      if distances[index] == minDist:
+        break
+    theShellDefaut = shells[index]
+    #
+  else: # --- une seule face de defaut
+    subFaces = [facesDefaut]
+    theShellDefaut = geompy.MakeShell(subFaces)
+  if trace:
+    geompy.addToStudy(theShellDefaut,"theShellDefaut")
+
+  theFaces = geompy.ExtractShapes(theShellDefaut, geompy.ShapeType["FACE"], True)
+  distances = []
+  for aFace in theFaces:
+    distances.append(geompy.MinDistance(aFace, centreSphere))
+  minDist = min(distances)
+  for index in range(len(distances)):
+    if distances[index] == minDist:
+      break
+
+  centreDefaut = geompy.MakeProjection(centreSphere, theFaces[index])
+  if trace:
+    geompy.addToStudy(centreDefaut, "centreDefaut")
+  normalDefaut = geompy.GetNormal(subFaces[index], centreDefaut)
+  if trace:
+    geompy.addToStudy(normalDefaut, "normalDefaut")
+  extrusionDefaut = geompy.MakePrismVecH(theShellDefaut, normalDefaut, -lgExtrusion)
+  info = geompy.ShapeInfo(extrusionDefaut)
+  logging.debug("shape info %s", info)
+  if (info['SOLID'] > 1) or (info['COMPOUND'] > 0) :
+    solids = geompy.ExtractShapes(extrusionDefaut, geompy.ShapeType["SOLID"], True)
+    solid0 = solids[0]
+    for i in range(1,len(solids)):
+      solid0 = geompy.MakeFuse(solid0, solids[i])
+    extrusionDefaut = solid0
+  if trace:
+    geompy.addToStudy(extrusionDefaut, "extrusionDefaut")
+
+  return facesDefaut, centreDefaut, normalDefaut, extrusionDefaut
diff --git a/src/Tools/blocFissure/gmu/creeZoneDefautMaillage.py b/src/Tools/blocFissure/gmu/creeZoneDefautMaillage.py
new file mode 100644 (file)
index 0000000..9fcb7d5
--- /dev/null
@@ -0,0 +1,64 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+import math
+from distance2 import distance2
+
+# -----------------------------------------------------------------------------
+# --- zone de defaut extraite du maillage
+
+def creeZoneDefautMaillage(maillagesSains, shapeDefaut, tailleDefaut,
+                           nomZones, coordsNoeudsFissure):
+  """
+  Identification de la zone à remailler, opérations sur le maillage
+  de l'objet sain
+  La zone à remailler est définie à partir d'un objet géométrique
+  ou à partir d'un jeu de points et d'une distance d'influence.
+  @param maillagesSains : (le maillage de l'objet initial, booleen isHexa)
+  @param shapeDefaut : objet géométrique représentant la fissure
+  (selon les cas, un point central, ou une shape plus complexe,
+  dont on ne garde que les vertices)
+  @param tailleDefaut : distance d'influence définissant la zone à remailler:
+  tous les éléments du maillage initial qui pénètrent dans cette zone
+  sont détectés
+  @param nomZones : préfixe des noms de groupes créés dans le maillage initial. S'il y a un groupe de noeuds
+  @coordsNoeudsFissure : jeu de points donné par une liste (x1,y1,z1, x2,y2,z2, ...)
+  @return (origShapes, verticesShapes, dmoyen) liste id subShapes,
+  listes noeuds de bord, longueur arête moyenne bord
+  """
+  logging.info("start")
+  
+  maillageSain = maillagesSains[0]
+  isHexa = maillagesSains[1]
+  lists = maillageSain.CreateHoleSkin(tailleDefaut, shapeDefaut, nomZones, coordsNoeudsFissure)
+
+  logging.debug("lists=%s", lists)
+
+  trace = True
+  origShapes = []
+  verticesShapes = []
+
+  cumul = 0 # somme des distances carrées entre point ordonnés (taille des arêtes)
+  nb = 0    # nombre d'arêtes évaluées
+
+  for aList in lists:
+    aShape = aList[0]
+    origShapes.append(aShape)
+    logging.debug("  shapeId %s", aShape)
+    vertices = []
+    xyz0 = None
+    for inode in range(1, len(aList)):
+      xyz = maillageSain.GetNodeXYZ(aList[inode])
+      if xyz0 is not None:
+        cumul += distance2(xyz, xyz0)
+        nb += 1
+      xyz0 = xyz
+      #logging.debug("    node %s %s", aList[inode], xyz)
+      vertices.append(geompy.MakeVertex(xyz[0], xyz[1], xyz[2]))
+      pass
+    verticesShapes.append(vertices)
+    pass
+
+  dmoyen = math.sqrt(cumul/nb) # ~ taille de l'arête moyenne du maillage global
+  return origShapes, verticesShapes, dmoyen
diff --git a/src/Tools/blocFissure/gmu/distance2.py b/src/Tools/blocFissure/gmu/distance2.py
new file mode 100644 (file)
index 0000000..acdbbdc
--- /dev/null
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+
+import logging
+
+# -----------------------------------------------------------------------------
+# --- calcul de distance carree entre deux points, jeux de coordonnees x,y,z
+
+def distance2(xyz1, xyz2):
+  """
+  carré de la distance entre deux points donnés par des triplets [x,y,z]
+  """
+  #logging.info("start")
+  
+  d2 = 0
+  for i in range(3):
+    d2 += (xyz1[i]-xyz2[i])*(xyz1[i]-xyz2[i])
+  logging.debug('d2=%s', d2)
+  return d2
+
+# -----------------------------------------------------------------------------
+# --- test unitaire
+
+import unittest
+class Test_distance2(unittest.TestCase):
+
+  def setUp(self):
+    self.a=[0, 0, 0]
+    self.b=[3, 4, 5]
+    self.c=[-5,-4,-3]
+    
+  def test_calcul(self):
+    self.assertEqual(distance2(self.a, self.b), distance2(self.b, self.a))
+    self.assertEqual(distance2(self.a, self.b), distance2(self.a, self.c))
+    self.assertEqual(distance2(self.b, self.b), 0)
+    self.assertEqual(distance2(self.a, self.b), 50)
+        
\ No newline at end of file
diff --git a/src/Tools/blocFissure/gmu/eliminateDoubles.py b/src/Tools/blocFissure/gmu/eliminateDoubles.py
new file mode 100644 (file)
index 0000000..b9e2e6c
--- /dev/null
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- éliminer les doublons d'une liste de subshapes
+
+def eliminateDoubles(obj, subshapes):
+  """
+  éliminer les doublons d'une liste de subshapes
+  """
+  idsubs = {}
+  for sub in subshapes:
+    subid = geompy.GetSubShapeID(obj, sub)
+    if subid in idsubs.keys():
+      idsubs[subid].append(sub)
+    else:
+      idsubs[subid] = [sub]
+  shortList = []
+  for k, v in idsubs.iteritems():
+    shortList.append(v[0])
+  logging.debug("shortList=%s", shortList)
+  return shortList
diff --git a/src/Tools/blocFissure/gmu/ellipsoideDefaut.py b/src/Tools/blocFissure/gmu/ellipsoideDefaut.py
new file mode 100644 (file)
index 0000000..3940d57
--- /dev/null
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+
+import logging
+import math
+from geomsmesh import geompy
+from triedreBase import triedreBase
+O, OX, OY, OZ = triedreBase()
+
+# -----------------------------------------------------------------------------
+# --- ellipsoide defaut
+
+def ellipsoideDefaut(minRad,allonge,rayTore):
+  """
+  Le bloc contenant la fissure est un ellipsoide construit centre a l'origine,
+  contenant le tore elliptique de fissure
+  @param minRad :petit rayon
+  @param allonge :rapport grand rayon / petit rayon
+  @param rayTore :rayon du tore construit autour de la generatrice de l'ellipse
+  @return  ellipsoide (geomObject)
+  """
+  logging.info("start") 
+  boule = geompy.MakeSphereR(2)
+  bouler = geompy.MakeRotation(boule, OY, math.pi/2.0)
+  face = geompy.MakeFaceHW(100, 100, 3)
+  boulepart = geompy.MakePartition([bouler], [face], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
+  solids = geompy.ExtractShapes(boulepart, geompy.ShapeType["SOLID"], True)
+  solid0 = solids[0]
+  for i in range(1,len(solids)):
+    solid0 = geompy.MakeFuse(solid0, solids[i])
+  ellipsoide = geompy.MakeScaleAlongAxes(solid0, O, minRad, minRad*(allonge+2.0)/2.0, minRad) # on limite l'allongement de l'ellipsoide
+  #geompy.addToStudy( ellipsoide, 'ellipsoide' )
+  return ellipsoide
diff --git a/src/Tools/blocFissure/gmu/enleveDefaut.py b/src/Tools/blocFissure/gmu/enleveDefaut.py
new file mode 100644 (file)
index 0000000..011c764
--- /dev/null
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+
+import logging
+
+# -----------------------------------------------------------------------------
+# --- maillage sain sans la zone defaut
+
+def enleveDefaut(maillageSain, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges):
+  """
+  Maillage sain sans la zone de defaut
+  TODO: a completer
+  """
+  logging.info('start')
+
+  maillageSain.RemoveGroupWithContents(zoneDefaut)
+  if zoneDefaut_skin is not None:
+    maillageSain.RemoveGroupWithContents(zoneDefaut_skin)
+  if zoneDefaut_internalFaces is not None:
+    maillageSain.RemoveGroupWithContents(zoneDefaut_internalFaces)
+  if zoneDefaut_internalEdges is not None:
+    maillageSain.RemoveGroupWithContents(zoneDefaut_internalEdges)
+  nbRemoved = maillageSain.RemoveOrphanNodes()
+  return maillageSain
+
diff --git a/src/Tools/blocFissure/gmu/extractionOrientee.py b/src/Tools/blocFissure/gmu/extractionOrientee.py
new file mode 100644 (file)
index 0000000..2ea9e52
--- /dev/null
@@ -0,0 +1,51 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+from whichSide import whichSide
+
+# -----------------------------------------------------------------------------
+# --- renvoie l'extraction des shapes d'un objet selon leur position par rapport à la face.
+
+def extractionOrientee(face, obj, ref, shapeType, tol, prefix=""):
+  """
+  renvoie l'extraction des shapes d'un objet selon leur position
+  par rapport à la face.
+  shapeType in ["VERTEX", "EDGE", "FACE",...]
+  """
+  logging.info('start')
+  trace = True
+  sideRef = whichSide(face, ref)
+  logging.debug("ref side %s", sideRef)
+  shapesInside = []
+  shapesOutside = []
+  shapesOnside = []
+  shapes = geompy.ExtractShapes(obj, geompy.ShapeType[shapeType], False)
+  i=0
+  j=0
+  k=0
+  prefix = prefix + shapeType
+  for shape in shapes:
+    side = whichSide(face, shape, tol)
+    if side == sideRef:
+      shapesInside.append(shape)
+      if trace:
+        name = prefix + "_Inside%d"%i
+        geompy.addToStudyInFather(obj, shape, name)
+      i+=1
+    elif side == -sideRef:
+      shapesOutside.append(shape)
+      if trace:
+        name = prefix + "_Outside%d"%j
+        geompy.addToStudyInFather(obj, shape, name)
+      j+=1
+    elif side == 0:
+      shapesOnside.append(shape)
+      if trace:
+        name = prefix + "_Onside%d"%k
+        geompy.addToStudyInFather(obj, shape, name)
+      k+=1
+    logging.debug("--- shape was %s", name)
+  return [shapesInside, shapesOutside, shapesOnside]
+
diff --git a/src/Tools/blocFissure/gmu/extractionOrienteeMulti.py b/src/Tools/blocFissure/gmu/extractionOrienteeMulti.py
new file mode 100644 (file)
index 0000000..86faec8
--- /dev/null
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+from whichSideMulti import whichSideMulti
+
+# -----------------------------------------------------------------------------
+# --- renvoie l'extraction des shapes d'un objet selon leur position par rapport à la face.
+
+def extractionOrienteeMulti(faces, ifil, obj, centre, shapeType, tol, prefix=""):
+  """
+  renvoie l'extraction des shapes d'un objet selon leur position
+  par rapport aux faces.
+  shapeType in ["VERTEX", "EDGE", "FACE",...]
+  """
+  logging.info('start')
+  trace = True
+  shapesInside = []
+  shapesOutside = []
+  shapesOnside = []
+  shapes = geompy.ExtractShapes(obj, geompy.ShapeType[shapeType], False)
+  i=0
+  j=0
+  k=0
+  prefix = prefix + shapeType
+  for shape in shapes:
+    side = whichSideMulti(faces, ifil, shape, centre, tol)
+    if side == 1:
+      shapesInside.append(shape)
+      if trace:
+        name = prefix + "_Inside%d"%i
+        geompy.addToStudyInFather(obj, shape, name)
+      i+=1
+    elif side == -1:
+      shapesOutside.append(shape)
+      if trace:
+        name = prefix + "_Outside%d"%j
+        geompy.addToStudyInFather(obj, shape, name)
+      j+=1
+    elif side == 0:
+      shapesOnside.append(shape)
+      if trace:
+        name = prefix + "_Onside%d"%k
+        geompy.addToStudyInFather(obj, shape, name)
+      k+=1
+    logging.debug("--- shape was %s", name)
+  return [shapesInside, shapesOutside, shapesOnside]
+
diff --git a/src/Tools/blocFissure/gmu/facesCirculaires.py b/src/Tools/blocFissure/gmu/facesCirculaires.py
new file mode 100644 (file)
index 0000000..daca717
--- /dev/null
@@ -0,0 +1,78 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- TORE
+## --- faces 1/2 circulaires et leur centre, edges de ces faces dans le plan de fissure
+
+def facesCirculaires(bloc, tore):
+  """
+  Extraction des faces demi circulaires à l'intersection du tore partitionné et de la paroi,
+  de leur centre, les edges de ces faces situees dans le plan de fissure et un booleen par edge,
+  indiquant son sens (normal / reversed).
+  @param bloc : bloc defaut
+  @param tore : le tore partitionné et coupé
+  @return (faces, centres, edges, reverses)
+  """
+  logging.info("start")
+
+  faces = geompy.GetShapesOnShape(bloc, tore, geompy.ShapeType["FACE"], GEOM.ST_ON)
+
+  geompy.addToStudyInFather( tore, faces[0], 'face0' )
+  geompy.addToStudyInFather( tore, faces[1], 'face1' )
+  geompy.addToStudyInFather( tore, faces[2], 'face2' )
+  geompy.addToStudyInFather( tore, faces[3], 'face3' )
+
+  centres = [None, None, None, None]
+  [v1,centres[0],v3] = geompy.ExtractShapes(faces[0], geompy.ShapeType["VERTEX"], True)
+  [v1,centres[1],v3] = geompy.ExtractShapes(faces[1], geompy.ShapeType["VERTEX"], True)
+  [v1,centres[2],v3] = geompy.ExtractShapes(faces[2], geompy.ShapeType["VERTEX"], True)
+  [v1,centres[3],v3] = geompy.ExtractShapes(faces[3], geompy.ShapeType["VERTEX"], True)
+
+  geompy.addToStudyInFather( faces[0], centres[0], 'centre0' )
+  geompy.addToStudyInFather( faces[1], centres[1], 'centre1' )
+  geompy.addToStudyInFather( faces[2], centres[2], 'centre2' )
+  geompy.addToStudyInFather( faces[3], centres[3], 'centre3' )
+
+  alledges = [None, None, None, None]
+  alledges[0] = geompy.ExtractShapes(faces[0], geompy.ShapeType["EDGE"], True)
+  alledges[1] = geompy.ExtractShapes(faces[1], geompy.ShapeType["EDGE"], True)
+  alledges[2] = geompy.ExtractShapes(faces[2], geompy.ShapeType["EDGE"], True)
+  alledges[3] = geompy.ExtractShapes(faces[3], geompy.ShapeType["EDGE"], True)
+
+  dicoedge = {}
+  edges = []
+  reverses = []
+  for i in range(len(alledges)):
+    edgesface = alledges[i]
+    lenef = []
+    for j in range(len(edgesface)):
+      props = geompy.BasicProperties(edgesface[j])
+      lenef.append(props[0])
+      pass
+    maxlen = max(lenef)
+    for j in range(len(edgesface)):
+      if lenef[j] < maxlen:
+        edgid = geompy.GetSubShapeID(tore, edgesface[j])
+        if not (edgid in dicoedge):
+          dicoedge[edgid] = edgesface[j]
+          edges.append(edgesface[j])
+          named = 'edge_' + str(i) + '_' +str(j)
+          geompy.addToStudyInFather( faces[i], edgesface[j], named)
+          vertices = geompy.ExtractShapes(edgesface[j], geompy.ShapeType["VERTEX"], False)
+          #firstVertex = geompy.GetFirstVertex(edgesface[j])
+          if geompy.GetSubShapeID(tore, vertices[0]) != geompy.GetSubShapeID(tore, centres[i]):
+            reverses.append(1)
+            #print 'reversed ' + str(edgid)
+          else:
+            reverses.append(0)
+            #print 'normal' + str(edgid)
+          pass
+        pass
+      pass
+    pass
+
+  return faces, centres, edges, reverses
+
diff --git a/src/Tools/blocFissure/gmu/facesFissure.py b/src/Tools/blocFissure/gmu/facesFissure.py
new file mode 100644 (file)
index 0000000..1cbf8ce
--- /dev/null
@@ -0,0 +1,51 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- faces fissure dans et hors tore, et edges face hors tore
+
+def facesFissure(blocp, faceFissure, extrusionDefaut, genint):
+  """
+  extraction des faces de fissure dans et hors tore, des edges le long du tore et en paroi
+  @param faceFissure : la face de fissure avec la partie dans le tore elliptique et la partie externe
+  @return (facefissintore, facefissoutore, edgeint, edgeext)
+  """
+  logging.info('start')
+
+  [f0,f1] = geompy.ExtractShapes(faceFissure, geompy.ShapeType["FACE"], True)
+  ed0 = geompy.ExtractShapes(f0, geompy.ShapeType["EDGE"], True)
+  ed1 = geompy.ExtractShapes(f1, geompy.ShapeType["EDGE"], True)
+  if len(ed0) > len(ed1):
+    facefissintore = f0
+    facefissoutore = f1
+  else:
+    facefissintore = f1
+    facefissoutore = f0
+
+  geompy.addToStudyInFather(faceFissure, facefissintore,'facefissintore')
+  geompy.addToStudyInFather(faceFissure, facefissoutore,'facefissoutore')
+
+  edgeint = geompy.GetShapesOnShape(extrusionDefaut, facefissoutore, geompy.ShapeType["EDGE"], GEOM.ST_IN)
+  edgeext = geompy.GetShapesOnShape(extrusionDefaut, facefissoutore, geompy.ShapeType["EDGE"], GEOM.ST_ON)
+
+  for i in range(len(edgeint)):
+    name = "edgeint_%d"%i
+    geompy.addToStudyInFather(facefissoutore, edgeint[i],name)
+  for i in range(len(edgeext)):
+    name = "edgeext_%d"%i
+    geompy.addToStudyInFather(facefissoutore, edgeext[i],name)
+
+  reverext = []
+  if len(edgeext) > 1:
+    vertices = geompy.ExtractShapes(genint, geompy.ShapeType["VERTEX"], False)
+    for i in range(len(edgeext)):
+      vertedge = geompy.ExtractShapes(edgeext[i], geompy.ShapeType["VERTEX"], False)
+      if ((geompy.GetSubShapeID(blocp, vertedge[0]) == geompy.GetSubShapeID(blocp, vertices[0])) or
+          (geompy.GetSubShapeID(blocp, vertedge[0]) == geompy.GetSubShapeID(blocp, vertices[1]))):
+        reverext.append(0)
+      else:
+        reverext.append(1)
+
+  return facefissintore, facefissoutore, edgeint, edgeext, reverext
diff --git a/src/Tools/blocFissure/gmu/facesToreInBloc.py b/src/Tools/blocFissure/gmu/facesToreInBloc.py
new file mode 100644 (file)
index 0000000..0431554
--- /dev/null
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- identification des faces tore et fissure dans le solide hors tore du bloc partitionné
+
+def facesToreInBloc(blocp, facefissoutore, facetore1, facetore2):
+  """
+  identification des faces tore et fissure dans le bloc partitionné : sous shapes du bloc
+  @param blocp : bloc partitionné
+  @param facefissoutore : la face de fissure externe au tore
+  @param facetore1 : face du tore selon la génératrice
+  @param facetore2 : face du tore selon la génératrice
+  @return (blocFaceFiss, blocFaceTore1, blocFaceTore2) sous shapes reperées
+  """
+  logging.info('start')
+
+  blocFaceFiss = geompy.GetInPlaceByHistory(blocp, facefissoutore)
+  blocFaceTore1 = geompy.GetInPlaceByHistory(blocp, facetore1)
+  blocFaceTore2 = geompy.GetInPlaceByHistory(blocp, facetore2)
+
+  geompy.addToStudyInFather(blocp, blocFaceFiss,'blocFaceFiss')
+  geompy.addToStudyInFather(blocp, blocFaceTore1,'blocFaceTore1')
+  geompy.addToStudyInFather(blocp, blocFaceTore2,'blocFaceTore2')
+
+  return blocFaceFiss, blocFaceTore1, blocFaceTore2
+
diff --git a/src/Tools/blocFissure/gmu/facesVolumesToriques.py b/src/Tools/blocFissure/gmu/facesVolumesToriques.py
new file mode 100644 (file)
index 0000000..2ad4dc6
--- /dev/null
@@ -0,0 +1,53 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+from extractionOrientee import extractionOrientee
+from getSubshapeIds import getSubshapeIds
+
+# -----------------------------------------------------------------------------
+# --- TORE
+# --- faces toriques  et volumes du tore
+
+def facesVolumesToriques(tore, plan, facesDefaut):
+  """
+  Extraction des deux faces  et volumes du tore partitionné, qui suivent la génératrice elliptique.
+  @param tore : le tore partitionné et coupé.
+  @param plan : le plan de coupe
+  @return (facetore1,facetore2) les 2 faces selon la génératrice
+  """
+  logging.info("start")
+
+  centre = geompy.MakeVertexOnSurface(plan, 0.5, 0.5)
+  normal = geompy.GetNormal(plan, centre)
+  reference = geompy.MakeTranslationVector(centre, normal)
+
+  [facesInPlan, facesOutPlan, facesOnPlan] = extractionOrientee(plan, tore, reference, "FACE", 1.e-2, "faceTorePlan_")
+  [facesInSide, facesOutSide, facesOnSide] = extractionOrientee(facesDefaut, tore, reference, "FACE", 1.e-2, "faceTorePeau_")
+  facesIdInPlan = getSubshapeIds(tore, facesInPlan)
+  facesIdOutPlan = getSubshapeIds(tore, facesOutPlan)
+  facesIdOnSide = getSubshapeIds(tore, facesOnSide)
+  facesIdInSide = getSubshapeIds(tore, facesInSide)
+  facesIdOutSide = getSubshapeIds(tore, facesOutSide)
+  #facesIdInOutSide = facesIdInSide + facesIdOutSide
+  facetore1 = None
+  faceTore2 = None
+  for i, faceId in enumerate(facesIdInPlan):
+    if faceId not in facesIdOnSide:
+      facetore1 = facesInPlan[i]
+      break
+  for i, faceId in enumerate(facesIdOutPlan):
+    if faceId not in facesIdOnSide:
+      facetore2 = facesOutPlan[i]
+      break
+
+  #[facetore1,facetore2] = geompy.GetShapesOnShape(pipe0, tore, geompy.ShapeType["FACE"], GEOM.ST_ON)
+
+  geompy.addToStudyInFather( tore, facetore1, 'facetore1' )
+  geompy.addToStudyInFather( tore, facetore2, 'facetore2' )
+
+  [volumeTore1, volumeTore2] = geompy.ExtractShapes(tore, geompy.ShapeType["SOLID"], True)
+  geompy.addToStudyInFather( tore, volumeTore1, 'volumeTore1' )
+  geompy.addToStudyInFather( tore, volumeTore2, 'volumeTore2' )
+
+  return facetore1, facetore2, volumeTore1, volumeTore2
diff --git a/src/Tools/blocFissure/gmu/findWireEndVertices.py b/src/Tools/blocFissure/gmu/findWireEndVertices.py
new file mode 100644 (file)
index 0000000..1196e28
--- /dev/null
@@ -0,0 +1,62 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- trouver les vertices extremites d'un wire
+
+def findWireEndVertices(aWire, getNormals=False):
+  """
+  trouver les vertices extremites d'un wire
+  calcul optionnel des tangentes. Attention à la tolérance qui peut être élevée (> 0.001)
+  """
+  logging.info("start")
+  if geompy.NumberOfEdges(aWire) > 1:
+    edges = geompy.ExtractShapes(aWire, geompy.ShapeType["EDGE"], False)
+  else:
+    edges = [aWire]
+  vertices = []
+  idsubs = {}
+  shortList = []
+  if getNormals:
+    normals = []
+    idnorm = {}
+    shortNorm = []
+  for edge in edges:
+    vert = geompy.ExtractShapes(edge, geompy.ShapeType["VERTEX"], False)
+    vertices += vert
+    if getNormals:
+      v0 = geompy.MakeVertexOnCurve(edge, 0.0)
+      n0 = geompy.MakeTangentOnCurve(edge, 0.0)
+      v1 = geompy.MakeVertexOnCurve(edge, 1.0)
+      n1 = geompy.MakeTangentOnCurve(edge, 1.0)
+      dist = geompy.MinDistance(v0, vert[0])
+      logging.debug("distance %s", dist)
+      if dist < 1.e-2:
+        normals += [n0, n1]
+      else:
+        normals += [n1, n0]
+  for i, sub in enumerate(vertices):
+    subid = geompy.GetSubShapeID(aWire, sub)
+    if subid in idsubs.keys():
+      idsubs[subid].append(sub)
+    else:
+      idsubs[subid] = [sub]
+      name='vertex%d'%i
+      geompy.addToStudyInFather(aWire, sub, name)
+      if getNormals:
+        idnorm[subid] = normals[i]
+        name='norm%d'%i
+        geompy.addToStudyInFather(aWire, normals[i], name)
+  logging.debug("idsubs: %s", idsubs)
+  for k, v in idsubs.iteritems():
+    if len(v) == 1:
+      shortList.append(v[0])
+      if getNormals:
+        shortNorm.append(idnorm[k])
+  if getNormals:
+    return shortList, shortNorm
+  else:
+    return shortList
+
diff --git a/src/Tools/blocFissure/gmu/findWireIntermediateVertices.py b/src/Tools/blocFissure/gmu/findWireIntermediateVertices.py
new file mode 100644 (file)
index 0000000..3b8b405
--- /dev/null
@@ -0,0 +1,58 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- trouver les vertices intermediaires d'un wire
+
+def findWireIntermediateVertices(aWire, getNormals=False):
+  """
+  trouver les vertices d'un wire qui ne sont pas aux extremités
+  calcul optionnel des tangentes. Attention à la tolérance qui peut être élevée (> 0.001)
+  """
+  logging.info("start")
+  edges = geompy.ExtractShapes(aWire, geompy.ShapeType["EDGE"], False)
+  vertices = []
+  idsubs = {}
+  shortList = []
+  if getNormals:
+    normals = []
+    idnorm = {}
+    shortNorm = []
+  for edge in edges:
+    vert = geompy.ExtractShapes(edge, geompy.ShapeType["VERTEX"], False)
+    vertices += vert
+    if getNormals:
+      v0 = geompy.MakeVertexOnCurve(edge, 0.0)
+      n0 = geompy.MakeTangentOnCurve(edge, 0.0)
+      v1 = geompy.MakeVertexOnCurve(edge, 1.0)
+      n1 = geompy.MakeTangentOnCurve(edge, 1.0)
+      dist = geompy.MinDistance(v0, vert[0])
+      logging.debug("distance %s", dist)
+      if dist < 1.e-2:
+        normals += [n0, n1]
+      else:
+        normals += [n1, n0]
+  for i, sub in enumerate(vertices):
+    subid = geompy.GetSubShapeID(aWire, sub)
+    if subid in idsubs.keys():
+      idsubs[subid].append(sub)
+    else:
+      idsubs[subid] = [sub]
+      name='vertex%d'%i
+      geompy.addToStudyInFather(aWire, sub, name)
+      if getNormals:
+        idnorm[subid] = normals[i]
+        name='norm%d'%i
+        geompy.addToStudyInFather(aWire, normals[i], name)
+  for k, v in idsubs.iteritems():
+    if len(v) > 1:
+      shortList.append(v[0])
+      if getNormals:
+        shortNorm.append(idnorm[k])
+  if getNormals:
+    return shortList, shortNorm
+  else:
+    return shortList
+
diff --git a/src/Tools/blocFissure/gmu/fissureCoude.py b/src/Tools/blocFissure/gmu/fissureCoude.py
new file mode 100644 (file)
index 0000000..0490611
--- /dev/null
@@ -0,0 +1,669 @@
+# -*- coding: utf-8 -*-
+
+from geomsmesh import geompy, smesh
+
+import math
+import GEOM
+import SALOMEDS
+import SMESH
+#import StdMeshers
+#import GHS3DPlugin
+#import NETGENPlugin
+import logging
+
+from fissureGenerique import fissureGenerique
+
+from triedreBase import triedreBase
+from genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
+from creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
+from insereFissureGenerale import insereFissureGenerale
+from sortEdges import sortEdges
+
+O, OX, OY, OZ = triedreBase()
+
+class fissureCoude(fissureGenerique):
+  """
+  problème de fissure du Coude : version de base
+  maillage hexa
+  """
+
+  nomProbleme = "tuyau_Coude"
+
+  # ---------------------------------------------------------------------------
+  def setParamGeometrieSaine(self):
+    """
+    Paramètres géométriques du tuyau coudé sain:
+    angleCoude
+    r_cintr
+    l_tube_p1
+    l_tube_p2
+    epais
+    de
+    """
+    self.geomParams = dict(angleCoude = 60,
+                           r_cintr    = 1200,
+                           l_tube_p1  = 1600,
+                           l_tube_p2  = 1200,
+                           epais      = 40,
+                           de         = 760)
+
+  # ---------------------------------------------------------------------------
+  def genereGeometrieSaine(self, geomParams):
+    logging.info("genereGeometrieSaine %s", self.nomCas)
+
+    angleCoude = geomParams['angleCoude']
+    r_cintr    = geomParams['r_cintr']
+    l_tube_p1  = geomParams['l_tube_p1']
+    l_tube_p2  = geomParams['l_tube_p2']
+    epais      = geomParams['epais']
+    de         = geomParams['de']
+
+    centre = geompy.MakeVertex(0, 0, -l_tube_p1)
+    diskext = geompy.MakeDiskPntVecR(centre, OZ, de/2.)
+    diskint = geompy.MakeDiskPntVecR(centre, OZ, de/2. -epais)
+    couronne = geompy.MakeCut(diskext, diskint)
+    tube_1 = geompy.MakePrismVecH(couronne, OZ, l_tube_p1)
+    axe = geompy.MakeTranslation(OY, -r_cintr, 0, -l_tube_p1)
+    coude = geompy.MakeRevolution(couronne, axe, angleCoude*math.pi/180.0)
+    Rotation_1 = geompy.MakeRotation(couronne, axe, angleCoude*math.pi/180.0)
+    Rotation_2 = geompy.MakeRotation(OZ, OY, angleCoude*math.pi/180.0)
+    tube_2 = geompy.MakePrismVecH(Rotation_1, Rotation_2, -l_tube_p2)
+    plan_y = geompy.MakePlaneLCS(None, 100000, 3)
+    geompy.addToStudy( plan_y, "plan_y" )
+    geompy.addToStudy( tube_1, "tube_1" )
+    geompy.addToStudy( coude, "coude" )
+    geompy.addToStudy( tube_2, "tube_2" )
+
+    P1 = O
+    geompy.addToStudy( P1, "P1" )
+    op2 = geompy.MakeVertex(0, 0, -l_tube_p1)
+    P2 = geompy.MakeRotation(op2, axe, angleCoude*math.pi/180.0)
+    P2 = geompy.MakeTranslationVectorDistance(P2, Rotation_2, -l_tube_p2)
+    geompy.addToStudy( P2, "P2" )
+
+    # --- tube coude sain
+
+    geometrieSaine = geompy.MakePartition([tube_1, coude, tube_2, P1, P2], [plan_y], [], [], geompy.ShapeType["SOLID"], 0, [], 1)
+    geompy.addToStudy( geometrieSaine, self.nomCas )
+    [P1, P2] = geompy.RestoreGivenSubShapes(geometrieSaine, [P1, P2], GEOM.FSM_GetInPlaceByHistory, False, True)
+
+    xmin = -de -r_cintr -l_tube_p2
+    zmin = -l_tube_p1 -r_cintr -l_tube_p2 -de
+    ymax = de +100.
+    boxypos = geompy.MakeBox(xmin, 0, zmin, ymax, ymax, 100, "boxypos")
+    boxyneg = geompy.MakeBox(xmin, 0, zmin, ymax, -ymax, 100, "boxyneg")
+    edgesypos = geompy.GetShapesOnShape(boxypos, geometrieSaine, geompy.ShapeType["EDGE"], GEOM.ST_IN)
+    edgesyneg = geompy.GetShapesOnShape(boxyneg, geometrieSaine, geompy.ShapeType["EDGE"], GEOM.ST_IN)
+    circ_g = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["EDGE"])
+    geompy.UnionList(circ_g, edgesyneg)
+    circ_d = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["EDGE"])
+    geompy.UnionList(circ_d, edgesypos)
+    edgesy0pos = geompy.GetShapesOnShape(boxypos, geometrieSaine, geompy.ShapeType["EDGE"], GEOM.ST_ONIN)
+    grpedpos = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["EDGE"])
+    geompy.UnionList(grpedpos, edgesy0pos)
+    grpedy0 = geompy.CutGroups(grpedpos, circ_d, "edges_y0")
+    boxtub1 = geompy.MakeBox(-de/2.0 -1, -1, -l_tube_p1, de, de, 0, "boxtub1")
+    edgestub1 = geompy.GetShapesOnShape(boxtub1, geometrieSaine, geompy.ShapeType["EDGE"], GEOM.ST_IN)
+    grped = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["EDGE"])
+    geompy.UnionList(grped, edgestub1)
+    long_p1 = geompy.IntersectGroups(grped, grpedy0)
+    boxtub  = geompy.MakeBox(-de/2.0 -1, -1, -l_tube_p1 -l_tube_p2, de, de, -l_tube_p1)
+    boxtub2 = geompy.MakeRotation(boxtub, axe, angleCoude*math.pi/180.0, "boxttub2")
+    edgestub2 = geompy.GetShapesOnShape(boxtub2, geometrieSaine, geompy.ShapeType["EDGE"], GEOM.ST_IN)
+    grped = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["EDGE"])
+    geompy.UnionList(grped, edgestub2)
+    long_p2 = geompy.IntersectGroups(grped, grpedy0)
+    boxtub1t = geompy.MakeTranslationVectorDistance(boxtub1, OZ, -l_tube_p1)
+    facer = geompy.GetShapesOnShape(boxtub1t, boxtub1, geompy.ShapeType["FACE"], GEOM.ST_ONIN, "facer")
+    boxcoud = geompy.MakeRevolution(facer[0], axe, angleCoude*math.pi/180.0, "boxcoud")
+    edgescoud = geompy.GetShapesOnShape(boxcoud, geometrieSaine, geompy.ShapeType["EDGE"], GEOM.ST_IN)
+    grped = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["EDGE"])
+    geompy.UnionList(grped, edgescoud)
+    long_coude = geompy.IntersectGroups(grped, grpedy0)
+    grped = geompy.CutGroups(grpedy0, long_p1)
+    grped = geompy.CutGroups(grped, long_p2)
+    ep = geompy.CutGroups(grped, long_coude)
+    geompy.addToStudyInFather( geometrieSaine, long_p1, 'long_p1' )
+    geompy.addToStudyInFather( geometrieSaine, ep, 'ep' )
+    geompy.addToStudyInFather( geometrieSaine, long_coude, 'long_coude' )
+    geompy.addToStudyInFather( geometrieSaine, circ_g, 'circ_g' )
+    geompy.addToStudyInFather( geometrieSaine, circ_d, 'circ_d' )
+    geompy.addToStudyInFather( geometrieSaine, long_p2, 'long_p2' )
+
+    # --- face extremite tube (EXTUBE)
+
+    facesIds = geompy.GetShapesOnPlaneIDs(geometrieSaine, geompy.ShapeType["FACE"], OZ, GEOM.ST_ON)
+    EXTUBE = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["FACE"])
+    geompy.UnionIDs(EXTUBE, facesIds)
+    geompy.addToStudyInFather( geometrieSaine, EXTUBE, 'EXTUBE' )
+
+    # --- edge bord extremite tube (BORDTU)
+
+    edge1Ids = geompy.GetShapesOnPlaneIDs(geometrieSaine, geompy.ShapeType["EDGE"], OZ, GEOM.ST_ON)
+    edge2Ids = geompy.GetShapesOnCylinderIDs(geometrieSaine, geompy.ShapeType["EDGE"], OZ, de/2. -epais, GEOM.ST_ON)
+    edgesIds = []
+    for edge in edge1Ids:
+      if edge in edge2Ids:
+        edgesIds.append(edge)
+    BORDTU = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["EDGE"])
+    geompy.UnionIDs(BORDTU, edgesIds)
+    geompy.addToStudyInFather( geometrieSaine, BORDTU, 'BORDTU' )
+
+    # --- face origine tube (CLGV)
+
+    pp2 = geompy.MakeTranslationVectorDistance(P2, Rotation_2, 10)
+    vec2 = geompy.MakeVector(P2, pp2)
+    #geompy.addToStudy(vec2, 'vec2')
+    facesIds = geompy.GetShapesOnPlaneIDs(geometrieSaine, geompy.ShapeType["FACE"], vec2, GEOM.ST_ON)
+    CLGV = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["FACE"])
+    geompy.UnionIDs(CLGV, facesIds)
+    geompy.addToStudyInFather( geometrieSaine, CLGV, 'CLGV' )
+
+    # --- peau tube interieur (PEAUINT)
+
+    extru1 = geompy.MakePrismVecH(diskint, OZ, l_tube_p1)
+    revol1 = geompy.MakeRevolution(diskint, axe, angleCoude*math.pi/180.0)
+    rot1 = geompy.MakeRotation(diskint, axe, angleCoude*math.pi/180.0)
+    extru2 = geompy.MakePrismVecH(rot1, Rotation_2, -l_tube_p2)
+    interne = geompy.MakeFuse(extru1, revol1)
+    interne = geompy.MakeFuse(extru2, interne)
+    geompy.addToStudy(interne, 'interne')
+    facesIds = geompy.GetShapesOnShapeIDs(interne, geometrieSaine, geompy.ShapeType["FACE"], GEOM.ST_ONIN)
+    PEAUINT = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["FACE"])
+    geompy.UnionIDs(PEAUINT, facesIds)
+    geompy.addToStudyInFather( geometrieSaine, PEAUINT, 'PEAUINT' )
+
+    # --- peau tube exterieur (PEAUEXT)
+
+    cercle1 = geompy.MakeCircle(centre, OZ, de/2.)
+    extru1 = geompy.MakePrismVecH(cercle1, OZ, l_tube_p1)
+    revol1 = geompy.MakeRevolution(cercle1, axe, angleCoude*math.pi/180.0)
+    rot1 = geompy.MakeRotation(cercle1, axe, angleCoude*math.pi/180.0)
+    extru2 = geompy.MakePrismVecH(rot1, Rotation_2, -l_tube_p2)
+    externe = geompy.MakeFuse(extru1, revol1)
+    externe = geompy.MakeFuse(extru2, externe)
+    geompy.addToStudy(externe, 'externe')
+    facesIds = geompy.GetShapesOnShapeIDs(externe, geometrieSaine, geompy.ShapeType["FACE"], GEOM.ST_ON)
+    PEAUEXT = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["FACE"])
+    geompy.UnionIDs(PEAUEXT, facesIds)
+    geompy.addToStudyInFather( geometrieSaine, PEAUEXT, 'PEAUEXT' )
+
+    # --- solide sain
+
+    volIds = geompy.SubShapeAllIDs(geometrieSaine, geompy.ShapeType["SOLID"])
+    COUDE = geompy.CreateGroup(geometrieSaine, geompy.ShapeType["SOLID"])
+    geompy.UnionIDs(COUDE, volIds)
+    geompy.addToStudyInFather( geometrieSaine, COUDE, 'COUDSAIN' )
+
+    geometriesSaines = [geometrieSaine, long_p1, ep, long_coude, circ_g, circ_d, long_p2, P1, P2, EXTUBE, BORDTU, CLGV, PEAUINT, PEAUEXT, COUDE]
+
+    return geometriesSaines
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageSain(self):
+    self.meshParams = dict(n_long_p1    = 16,
+                           n_ep         = 3,
+                           n_long_coude = 15,
+                           n_circ_g     = 20,
+                           n_circ_d     = 20,
+                           n_long_p2    = 12)
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageSain(self, geometriesSaines, meshParams):
+    logging.info("genereMaillageSain %s", self.nomCas)
+
+    geometrieSaine = geometriesSaines[0]
+    long_p1        = geometriesSaines[1]
+    ep             = geometriesSaines[2]
+    long_coude     = geometriesSaines[3]
+    circ_g         = geometriesSaines[4]
+    circ_d         = geometriesSaines[5]
+    long_p2        = geometriesSaines[6]
+    P1             = geometriesSaines[7]
+    P2             = geometriesSaines[8]
+    EXTUBE         = geometriesSaines[9]
+    BORDTU         = geometriesSaines[10]
+    CLGV           = geometriesSaines[11]
+    PEAUINT        = geometriesSaines[12]
+    PEAUEXT        = geometriesSaines[13]
+    COUDE          = geometriesSaines[14]
+
+    n_long_p1    = meshParams['n_long_p1']
+    n_ep         = meshParams['n_ep']
+    n_long_coude = meshParams['n_long_coude']
+    n_circ_g     = meshParams['n_circ_g']
+    n_circ_d     = meshParams['n_circ_d']
+    n_long_p2    = meshParams['n_long_p2']
+
+    maillageSain = smesh.Mesh(geometrieSaine)
+
+    algo3d = maillageSain.Hexahedron()
+    algo2d = maillageSain.Quadrangle()
+    smesh.SetName(algo3d, "algo3d_maillageSain")
+    smesh.SetName(algo2d, "algo2d_maillageSain")
+
+    algo1d_long_p1 = maillageSain.Segment(geom=long_p1)
+    hypo1d_long_p1 = algo1d_long_p1.NumberOfSegments(n_long_p1)
+    smesh.SetName(algo1d_long_p1, "algo1d_long_p1")
+    smesh.SetName(hypo1d_long_p1, "hypo1d_long_p1")
+
+    algo1d_ep = maillageSain.Segment(geom=ep)
+    hypo1d_ep = algo1d_ep.NumberOfSegments(n_ep)
+    smesh.SetName(algo1d_ep, "algo1d_ep")
+    smesh.SetName(hypo1d_ep, "hypo1d_ep")
+
+    algo1d_long_coude = maillageSain.Segment(geom=long_coude)
+    hypo1d_long_coude = algo1d_long_coude.NumberOfSegments(n_long_coude)
+    smesh.SetName(algo1d_long_coude, "algo1d_long_coude")
+    smesh.SetName(hypo1d_long_coude, "hypo1d_long_coude")
+
+    algo1d_circ_g = maillageSain.Segment(geom=circ_g)
+    hypo1d_circ_g = algo1d_circ_g.NumberOfSegments(n_circ_g)
+    smesh.SetName(algo1d_circ_g, "algo1d_circ_g")
+    smesh.SetName(hypo1d_circ_g, "hypo1d_circ_g")
+
+    algo1d_circ_d = maillageSain.Segment(geom=circ_d)
+    hypo1d_circ_d = algo1d_circ_d.NumberOfSegments(n_circ_d)
+    smesh.SetName(algo1d_circ_d, "algo1d_circ_d")
+    smesh.SetName(hypo1d_circ_d, "hypo1d_circ_d")
+
+    algo1d_long_p2 = maillageSain.Segment(geom=long_p2)
+    hypo1d_long_p2 = algo1d_long_p2.NumberOfSegments(n_long_p2)
+    smesh.SetName(algo1d_long_p2, "algo1d_long_p2")
+    smesh.SetName(hypo1d_long_p2, "hypo1d_long_p2")
+
+    isDone = maillageSain.Compute()
+
+    mp1 = maillageSain.GroupOnGeom(P1,'P1',SMESH.NODE)
+    mp2 = maillageSain.GroupOnGeom(P2,'P2',SMESH.NODE)
+    ext = maillageSain.GroupOnGeom(EXTUBE,'EXTUBE',SMESH.FACE)
+    btu = maillageSain.GroupOnGeom(BORDTU,'BORDTU',SMESH.EDGE)
+    clg = maillageSain.GroupOnGeom(CLGV,'CLGV',SMESH.FACE)
+    pei = maillageSain.GroupOnGeom(PEAUINT,'PEAUINT',SMESH.FACE)
+    pex = maillageSain.GroupOnGeom(PEAUEXT,'PEAUEXT',SMESH.FACE)
+    cou = maillageSain.GroupOnGeom(COUDE,'COUDSAIN',SMESH.VOLUME)
+
+    return [maillageSain, True] # True : maillage hexa
+
+  # ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour le tuyau coude
+    profondeur  : 0 < profondeur <= épaisseur
+    rayonPipe   : rayon du pipe correspondant au maillage rayonnant
+    lenSegPipe  : longueur des mailles rayonnantes le long du fond de fissure (= rayonPipe par défaut)
+    azimut      : entre 0 et 360°
+    alpha       : 0 < alpha < angleCoude
+    longueur    : <=2*profondeur ==> force une fissure elliptique (longueur/profondeur = grand axe/petit axe).
+    orientation : 0° : longitudinale, 90° : circonférentielle, autre : uniquement fissures elliptiques
+    lgInfluence : distance autour de la shape de fissure a remailler (si 0, pris égal à profondeur. A ajuster selon le maillage)
+    elliptique  : True : fissure elliptique (longueur/profondeur = grand axe/petit axe); False : fissure longue (fond de fissure de profondeur constante, demi-cercles aux extrémites)
+    pointIn_x   : optionnel coordonnées x d'un point dans le solide, pas trop loin du centre du fond de fissure (idem y,z)
+    externe     : True : fissure face externe, False : fissure face interne
+    """
+    logging.info("setParamShapeFissure %s", self.nomCas)
+    self.shapeFissureParams = dict(profondeur  = 10,
+                                   rayonPipe   = 2.5,
+                                   lenSegPipe  = 2.5,
+                                   azimut      = 160,
+                                   alpha       = 20,
+                                   longueur    = 400,
+                                   orientation = 90,
+                                   lgInfluence = 50,
+                                   elliptique  = False,
+                                   externe     = True)
+
+  # ---------------------------------------------------------------------------
+  def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
+    logging.info("genereShapeFissure %s", self.nomCas)
+    logging.info("shapeFissureParams %s", shapeFissureParams)
+
+    angleCoude = geomParams['angleCoude']
+    r_cintr    = geomParams['r_cintr']
+    l_tube_p1  = geomParams['l_tube_p1']
+    l_tube_p2  = geomParams['l_tube_p2']
+    epais      = geomParams['epais']
+    de         = geomParams['de']
+
+    profondeur  = shapeFissureParams['profondeur']
+    azimut      = shapeFissureParams['azimut']
+    alpha       = shapeFissureParams['alpha']
+    longueur    = shapeFissureParams['longueur']
+    orientation = shapeFissureParams['orientation']
+    externe     = shapeFissureParams['externe']
+    lgInfluence = shapeFissureParams['lgInfluence']
+    self.elliptique  = False
+    if shapeFissureParams.has_key('elliptique'):
+      self.elliptique = shapeFissureParams['elliptique']
+      
+
+
+    azimut = -azimut # axe inverse / ASCOUF
+    axe = geompy.MakeTranslation(OY, -r_cintr, 0, -l_tube_p1)
+    geompy.addToStudy(axe,"axe")
+    
+    if not lgInfluence:
+      lgInfluence = profondeur
+
+    if longueur > 2*profondeur:
+      self.fissureLongue=True
+    else:
+      self.fissureLongue=False
+      self.elliptique = True
+
+    self.circonferentielle = False
+    self.longitudinale = False
+    if self.fissureLongue and not self.elliptique:
+      if abs(orientation) < 45 :
+        self.longitudinale = True
+      else:
+        self.circonferentielle = True
+
+    nbp1 = 10
+    if self.circonferentielle:
+      if externe:
+        dp = -1.0
+        raybor = de/2.
+        rayint = raybor - profondeur
+        rayext = raybor + profondeur/5.0
+      else:
+        dp = 1.0
+        raybor = de/2. - epais
+        rayint = raybor + profondeur
+        rayext = raybor - profondeur/5.0
+      lgfond = longueur -2*profondeur
+      angle = lgfond/(2*raybor)
+      pb = geompy.MakeVertex(raybor, 0, 0)
+      pi = geompy.MakeVertex(rayint, 0, 0)      
+      pbl = geompy.MakeRotation(pb, OZ, angle)
+      pbr = geompy.MakeRotation(pb, OZ, -angle)
+      geompy.addToStudy(pbl,"pbl")
+      geompy.addToStudy(pbr,"pbr")
+      pal = geompy.MakeTranslationVector(pbl, OZ)
+      par = geompy.MakeTranslationVector(pbr, OZ)
+      axl = geompy.MakeVector(pbl,pal)
+      axr = geompy.MakeVector(pbr,par)
+      pil = geompy.MakeRotation(pi, OZ, angle)
+      pir = geompy.MakeRotation(pi, OZ, -angle)
+      points = []
+      nbp = 3*nbp1
+      for i in range(nbp):
+        angi = dp*(nbp -i)*(2.0*math.pi/3.0)/nbp
+        pt = geompy.MakeRotation(pil, axl, angi)
+        points.append(pt)
+      for i in range(nbp):
+        angi = angle -2.0*i*angle/nbp      
+        pt = geompy.MakeRotation(pi, OZ, angi)
+        points.append(pt)
+      for i in range(nbp+1):
+        angi = -dp*i*(2.0*math.pi/3.0)/nbp
+        pt = geompy.MakeRotation(pir, axr, angi)
+        points.append(pt)
+      for i, pt in enumerate(points):
+        pt = geompy.MakeRotation(pt, OZ, azimut*math.pi/180.)
+        pt = geompy.MakeTranslation(pt, 0, 0, -l_tube_p1)
+        pt = geompy.MakeRotation(pt, axe, alpha*math.pi/180.)
+        points[i] = pt
+      wire0 = geompy.MakeInterpol(points[0:nbp+1])     
+      wire1 = geompy.MakeInterpol(points[nbp:2*nbp+1])     
+      wire2 = geompy.MakeInterpol(points[2*nbp:3*nbp+1])     
+      #wiretube = geompy.MakeInterpol(points)
+      wiretube=geompy.MakeWire([wire0,wire1,wire2])
+      geompy.addToStudy(wiretube,"wiretube")
+      
+      pe = geompy.MakeVertex(rayext, 0, 0)
+      pe = geompy.MakeRotation(pe, OZ, azimut*math.pi/180.)
+      pe = geompy.MakeTranslation(pe, 0, 0, -l_tube_p1)
+      pe = geompy.MakeRotation(pe, axe, alpha*math.pi/180.)
+     
+      arce = geompy.MakeArc(points[0], pe, points[-1])
+      geompy.addToStudy(arce,"arce")
+      
+      facefiss = geompy.MakeFaceWires([arce, wiretube], 1)
+      geompy.addToStudy( facefiss, 'facefissPlace' )
+      
+      pc = geompy.MakeVertex((raybor + rayint)/2.0, 0, 0)
+      centre = geompy.MakeRotation(pc, OZ, azimut*math.pi/180.)
+      centre = geompy.MakeTranslation(centre, 0, 0, -l_tube_p1)
+      centre = geompy.MakeRotation(centre, axe, alpha*math.pi/180.)
+      geompy.addToStudy( centre, 'centrefissPlace' )
+      
+      wiretube = geompy.GetInPlace(facefiss, wiretube)
+      geompy.addToStudy(wiretube, 'wiretubePlace' )
+      try:
+        edgetube = geompy.MakeEdgeWire(wiretube)
+        geompy.addToStudy(edgetube,"edgetube")
+      except:
+        logging.debug("erreur MakeEdgeWire sur fond de fissure, on fait sans")
+        edgetube = None
+
+    # ---------------------------------------------------------
+
+    elif self.longitudinale:
+      if externe:
+        raybor = de/2.
+        dp = -1.0
+      else:
+        raybor = de/2. - epais
+        dp = +1.0
+      prof = dp * profondeur     
+      lgfond = longueur -2*profondeur
+      cosaz = math.cos(azimut*math.pi/180.)
+      sinaz = math.sin(azimut*math.pi/180.)
+      alfrd = alpha*math.pi/180.
+      rayxy = r_cintr + raybor*cosaz
+      angle = lgfond/(2.*rayxy)
+      logging.debug("longueur: %s, angle: %s, rayon: %s",lgfond, angle, rayxy)
+      pb = geompy.MakeVertex(raybor*cosaz, raybor*sinaz, -l_tube_p1, "pb")
+      pi = geompy.MakeTranslation(pb, prof*cosaz, prof*sinaz, 0., "pi")
+      pbv = geompy.MakeTranslation(pb, -sinaz, cosaz, 0., "pbv")
+      axb  = geompy.MakeVector(pb,pbv, "axb")
+      pbl = geompy.MakeRotation(pb, axe, alfrd -angle, "pbl")
+      pbr = geompy.MakeRotation(pb, axe, alfrd +angle, "pbr")
+      axl = geompy.MakeRotation(axb, axe, alfrd -angle, "axl")
+      axr = geompy.MakeRotation(axb, axe, alfrd +angle, "axr")
+      pil = geompy.MakeRotation(pi, axe, alfrd -angle, "pil")
+      pir = geompy.MakeRotation(pi, axe, alfrd +angle, "pir")
+
+      curves = []
+
+      points = []
+      nbp = 3*nbp1
+      xs = []
+      totx = 0
+      for i in range(nbp+2):
+        x = math.sin(i*math.pi/(nbp+1)) # fonction de répartition des points : distance relative
+        x2 = x*x
+        totx += x2        
+        xs.append(totx)
+        logging.debug("x2: %s, totx: %s", x2, totx)     
+      for i in range(nbp+1):
+        #posi = nbp -i             # répartition équidistante des points sur la courbe
+        posi = nbp*(1 -xs[i]/totx) # points plus resserrés aux extrémités de la courbe
+        angi = -dp*posi*(5.0*math.pi/8.0)/nbp
+        pt = geompy.MakeRotation(pil, axl, angi)
+        points.append(pt)
+      curves.append(geompy.MakeInterpol(points))
+      point0 = points[0]
+      geompy.addToStudy(curves[-1],"curve0")
+#      for i, pt in enumerate(points):
+#        name = "point%d"%i
+#        geompy.addToStudyInFather(curves[-1], pt, name)
+
+      points = []
+      nbp = 3*nbp1
+      xs =[]
+      totx = 0
+      for i in range(nbp+1):
+        x = math.sin(i*math.pi/nbp)
+        #x = 1.0 # répartition équidistante des points sur la courbe
+        x2 = x*x # points plus resserrés aux extrémités de la courbe
+        totx += x2        
+        xs.append(totx)
+        logging.debug("x2: %s, totx: %s", x2, totx)     
+      for i in range(nbp):
+        angi = alfrd -angle +2.0*angle*xs[i]/totx      
+        pt = geompy.MakeRotation(pi, axe, angi)
+        points.append(pt)
+      curves.append(geompy.MakeInterpol(points))
+      geompy.addToStudy(curves[-1],"curve1")
+#      for i, pt in enumerate(points):
+#        name = "point%d"%i
+#        geompy.addToStudyInFather(curves[-1], pt, name)
+
+      points = []
+      nbp = 3*nbp1
+      xs = []
+      totx = 0
+      for i in range(nbp+2):
+        x = math.sin(i*math.pi/(nbp+1))
+        x2 = x*x
+        totx += x2        
+        xs.append(totx)
+        logging.debug("x2: %s, totx: %s", x2, totx)     
+      for i in range(nbp+1):
+        #posi = nbp -i        # répartition équidistante des points sur la courbe
+        posi = nbp*xs[i]/totx # points plus resserrés aux extrémités de la courbe
+        angi = dp*posi*(5.0*math.pi/8.0)/nbp
+        pt = geompy.MakeRotation(pir, axr, angi)
+        points.append(pt)
+      curves.append(geompy.MakeInterpol(points))
+      point1 = points[-1]
+      geompy.addToStudy(curves[-1],"curve2")
+#      for i, pt in enumerate(points):
+#        name = "point%d"%i
+#        geompy.addToStudyInFather(curves[-1], pt, name)
+      
+      wiretube = geompy.MakeWire(curves)
+      geompy.addToStudy(wiretube,"wiretube")
+      try:
+        edgetube = geompy.MakeEdgeWire(wiretube)
+        geompy.addToStudy(edgetube,"edgetube")
+      except:
+        logging.debug("erreur MakeEdgeWire sur fond de fissure, on fait sans")
+        edgetube = None
+      
+      pts = []
+      pts.append(point0)
+      dpr = prof*math.cos(5.0*math.pi/8.0)
+      pe = geompy.MakeTranslation(pb, dpr*cosaz, dpr*sinaz, 0., "pe")
+      for i in range(nbp):
+        angi = alfrd -angle +2.0*i*angle/nbp      
+        pt = geompy.MakeRotation(pe, axe, angi)
+        pts.append(pt)
+      pts.append(point1)
+      arce = geompy.MakeInterpol(pts)
+      geompy.addToStudy(arce,"arce")
+      
+      facefiss = geompy.MakeFaceWires([arce, wiretube], 0)
+      geompy.addToStudy( facefiss, 'facefissPlace' )
+      
+      pc = geompy.MakeTranslation(pb, 0.5*prof*cosaz, 0.5*prof*sinaz, 0.)
+      centre = geompy.MakeRotation(pc, axe, alfrd)
+      geompy.addToStudy( centre, 'centrefissPlace' )
+      
+      edges = geompy.ExtractShapes(facefiss, geompy.ShapeType["EDGE"], True)
+      edgesTriees, minl, maxl = sortEdges(edges)
+      edges = edgesTriees[:-1] # la plus grande correspond à arce, on l'elimine
+      wiretube = geompy.MakeWire(edges)
+      #wiretube = edgesTriees[-1]
+      geompy.addToStudy(wiretube, 'wiretubePlace' )
+
+    # ---------------------------------------------------------
+
+    else: # fissure elliptique, longue ou courte
+      if externe:
+        raybor = de/2.
+        dp = -1.0
+      else:
+        raybor = de/2. - epais
+        dp = +1.0
+      prof = dp * profondeur     
+      cosaz = math.cos(azimut*math.pi/180.)
+      sinaz = math.sin(azimut*math.pi/180.)
+      alfrd = alpha*math.pi/180.
+      pb = geompy.MakeVertex(raybor*cosaz, raybor*sinaz, -l_tube_p1, "pb")
+      pi = geompy.MakeTranslation(pb, prof*cosaz, prof*sinaz, 0., "pi")
+      pbv = geompy.MakeTranslation(pb, -profondeur*sinaz, profondeur*cosaz, 0., "pbv")
+      ayb  = geompy.MakeVector(pb,pbv, "ayb")
+      pb0 = geompy.MakeRotation(pb, axe, alfrd, "pb0")
+      ay0 = geompy.MakeRotation(ayb, axe, alfrd, "ay0")
+      pi0 = geompy.MakeRotation(pi, axe, alfrd, "pi0")
+      az_ = geompy.MakeVector(pi0, pb0, "az_")
+      az0 = geompy.MakeTranslationVector(az_, az_, "az0") #normale sortante
+      ax0 = geompy.MakeRotation(ay0, az0, -math.pi/2.0, "ax0")
+      ax1 = geompy.MakeRotation(ax0, az0, orientation*math.pi/180., "ax1")
+      ay1 = geompy.MakeRotation(ay0, az0, orientation*math.pi/180., "ay1")
+      originLCS = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0, "originLCS")
+      coo = geompy.PointCoordinates(pb0)
+      cox = geompy.VectorCoordinates(ax1)
+      coy = geompy.VectorCoordinates(ay1)
+      localLCS = geompy.MakeMarker(coo[0], coo[1], coo[2], cox[0], cox[1], cox[2], coy[0], coy[1], coy[2], "localLCS")
+      
+      pco = geompy.MakeVertex(0, 0, -profondeur, "pco")
+      pao = geompy.MakeRotation(pco, OY, 0.6*math.pi, "pao")
+      pbo = geompy.MakeRotation(pco, OY, -0.6*math.pi, "pbo")
+      pce = geompy.MakeVertex(0, 0, 0.1*profondeur,"pce")
+      arcoo = geompy.MakeArc(pao, pco, pbo, "arcoo")
+      linoo = geompy.MakeArc(pao, pce, pbo, "linoo")
+      scalex = longueur/profondeur
+      arco =geompy.MakeScaleAlongAxes(arcoo, O, scalex, 1., 1., "arco")
+      lino =geompy.MakeScaleAlongAxes(linoo, O, scalex, 1., 1., "lino")
+      arci = geompy.MakePosition(arco, originLCS, localLCS, "arci")
+      arce = geompy.MakePosition(lino, originLCS, localLCS, "arce")
+      facefiss = geompy.MakeFaceWires([arce, arci], 0)
+      geompy.addToStudy( facefiss, 'facefissPlace' )
+      edges = geompy.ExtractShapes(facefiss, geompy.ShapeType["EDGE"], True)
+      edgesTriees, minl, maxl = sortEdges(edges)
+      edgetube = edgesTriees[-1] # la plus grande correspond à arci
+      wiretube = edgetube
+      
+      pc = geompy.MakeTranslation(pb, 0.5*prof*cosaz, 0.5*prof*sinaz, 0.)
+      centre = geompy.MakeRotation(pc, axe, alfrd)
+      geompy.addToStudy( centre, 'centrefissPlace' )
+
+    coordsNoeudsFissure = genereMeshCalculZoneDefaut(facefiss, profondeur/2. ,profondeur)
+
+    return [facefiss, centre, lgInfluence, coordsNoeudsFissure, wiretube, edgetube]
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    """
+    Paramètres du maillage de la fissure pour le tuyau coudé
+    Voir également setParamShapeFissure, paramètres rayonPipe et lenSegPipe.
+    nbSegRad = nombre de couronnes
+    nbSegCercle = nombre de secteurs
+    areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
+    """
+    self.maillageFissureParams = dict(nomRep        = '.',
+                                      nomFicSain    = self.nomCas,
+                                      nomFicFissure = 'fissure_' + self.nomCas,
+                                      nbsegRad      = 5,
+                                      nbsegCercle   = 6,
+                                      areteFaceFissure = 5)
+
+  # ---------------------------------------------------------------------------
+  def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
+    elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
+    return elementsDefaut
+
+  # ---------------------------------------------------------------------------
+  def genereMaillageFissure(self, geometriesSaines, maillagesSains,
+                            shapesFissure, shapeFissureParams,
+                            maillageFissureParams, elementsDefaut, step):
+    maillageFissure = insereFissureGenerale(maillagesSains,
+                                            shapesFissure, shapeFissureParams,
+                                            maillageFissureParams, elementsDefaut, step)
+    return maillageFissure
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Node            = 77917,
+                                          Entity_Quad_Edge       = 975,
+                                          Entity_Quad_Triangle   = 2182,
+                                          Entity_Quad_Quadrangle = 6842,
+                                          Entity_Quad_Tetra      = 20135,
+                                          Entity_Quad_Hexa       = 8994,
+                                          Entity_Quad_Penta      = 972,
+                                          Entity_Quad_Pyramid    = 1038)
+
diff --git a/src/Tools/blocFissure/gmu/fissureGenerique.py b/src/Tools/blocFissure/gmu/fissureGenerique.py
new file mode 100644 (file)
index 0000000..17518e8
--- /dev/null
@@ -0,0 +1,98 @@
+# -*- coding: utf-8 -*-
+
+from blocFissure import gmu
+from blocFissure.gmu.initEtude import initEtude
+from blocFissure.gmu.getStatsMaillageFissure import getStatsMaillageFissure
+
+class fissureGenerique():
+  """
+  classe générique problème fissure:
+  génération géométrie et maillage sain
+  définition et positionnement d'une fissure
+  génération d'un bloc défaut inséré dans le maillage sain
+  """
+
+  nomProbleme = "generique"
+
+  def __init__(self, numeroCas):
+    initEtude()
+    self.numeroCas = numeroCas
+    self.nomCas = self.nomProbleme +"_%d"%(self.numeroCas)
+    self.fissureLongue = False
+
+  def setParamGeometrieSaine(self):
+    self.geomParams = {}
+
+  def genereGeometrieSaine(self, geomParams):
+    geometriesSaines = [None]
+    return geometriesSaines
+
+  def setParamMaillageSain(self):
+    self.meshParams = {}
+
+  def genereMaillageSain(self, geometriesSaines, meshParams):
+    maillagesSains = [None]
+    return maillagesSains
+
+  def setParamShapeFissure(self):
+    self.shapeFissureParams = {}
+
+  def genereShapeFissure(self, geometriesSaines, geomParams, shapeFissureParams):
+    shapesFissure = [None]
+    return shapesFissure
+
+  def setParamMaillageFissure(self):
+    self.maillageFissureParams = {}
+
+  def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, maillageFissureParams):
+    elementsDefaut = [None]
+    return elementsDefaut
+
+  def genereMaillageFissure(self, geometriesSaines, maillagesSains, shapesFissure,
+                            maillageFissureParams, elementsDefaut, step):
+    maillageFissure = None
+    return maillageFissure
+
+  def setReferencesMaillageFissure(self):
+    referencesMaillageFissure = {}
+    return referencesMaillageFissure
+
+# ---------------------------------------------------------------------------
+
+  def executeProbleme(self, step=-1):
+    print "executeProbleme", self.nomCas
+    if step == 0:
+      return
+
+    self.setParamGeometrieSaine()
+    geometriesSaines = self.genereGeometrieSaine(self.geomParams)
+    if step == 1:
+      return
+
+    self.setParamMaillageSain()
+    maillagesSains = self.genereMaillageSain(geometriesSaines, self.meshParams)
+    if step == 2:
+      return
+
+    self.setParamShapeFissure()
+    shapesFissure = self.genereShapeFissure(geometriesSaines, self.geomParams, self.shapeFissureParams)
+    if step == 3:
+      return
+
+    self.setParamMaillageFissure()
+    elementsDefaut = self.genereZoneDefaut(geometriesSaines, maillagesSains, shapesFissure, self.shapeFissureParams, self.maillageFissureParams)
+    if step == 4:
+      return
+
+    maillageFissure = self.genereMaillageFissure(geometriesSaines, maillagesSains,
+                                                 shapesFissure, self.shapeFissureParams,
+                                                 self.maillageFissureParams, elementsDefaut, step)
+
+    self.setReferencesMaillageFissure()
+    mesures = getStatsMaillageFissure(maillageFissure, self.referencesMaillageFissure, self.maillageFissureParams)
+
+
+
+
+
+
diff --git a/src/Tools/blocFissure/gmu/genereElemsFissureElliptique.py b/src/Tools/blocFissure/gmu/genereElemsFissureElliptique.py
new file mode 100644 (file)
index 0000000..bbf9394
--- /dev/null
@@ -0,0 +1,54 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+from toreFissure import toreFissure
+from ellipsoideDefaut import ellipsoideDefaut
+from rotTrans import rotTrans
+from genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
+
+# -----------------------------------------------------------------------------
+# --- création élements géométriques fissure elliptique
+
+def genereElemsFissureElliptique(shapeFissureParams):
+  """
+  TODO: a completer
+  """
+  logging.info('start')
+  
+  centreDefaut  = shapeFissureParams['centreDefaut']
+  vecteurDefaut = shapeFissureParams['vecteurDefaut']
+  demiGrandAxe  = shapeFissureParams['demiGrandAxe']
+  demiPetitAxe  = shapeFissureParams['demiPetitAxe']
+  orientation   = shapeFissureParams['orientation']
+  tailleDefaut  = shapeFissureParams['taille']
+
+  # --- ellipse incomplete : generatrice
+
+  allonge = demiGrandAxe/demiPetitAxe
+  rayonTore = demiPetitAxe/5.0
+  generatrice, FaceGenFiss, Pipe_1, FaceFissure, Plane_1, Pipe1Part = toreFissure(demiPetitAxe, allonge, rayonTore)
+  ellipsoide = ellipsoideDefaut(demiPetitAxe, allonge, rayonTore)
+
+  # --- positionnement sur le bloc defaut de generatrice, tore et plan fissure
+
+  pipe0 = rotTrans(Pipe_1, orientation, centreDefaut, vecteurDefaut)
+  gener1 = rotTrans(generatrice, orientation, centreDefaut, vecteurDefaut)
+  pipe1 = rotTrans(Pipe1Part, orientation, centreDefaut, vecteurDefaut)
+  facefis1 = rotTrans(FaceFissure, orientation, centreDefaut, vecteurDefaut)
+  plane1 = rotTrans(Plane_1, orientation, centreDefaut, vecteurDefaut)
+  ellipsoide1 = rotTrans(ellipsoide, orientation, centreDefaut, vecteurDefaut)
+
+  geompy.addToStudy( pipe0, 'pipe0' )
+  geompy.addToStudy( gener1, 'gener1' )
+  geompy.addToStudy( pipe1, 'pipe1' )
+  geompy.addToStudy( facefis1, 'facefis1' )
+  geompy.addToStudy( plane1, 'plane1' )
+  geompy.addToStudy( ellipsoide1, 'ellipsoide1' )
+
+  shapeDefaut = facefis1
+  xyz_defaut = geompy.PointCoordinates(centreDefaut)
+  coordsNoeudsFissure = genereMeshCalculZoneDefaut(facefis1, demiPetitAxe/10.0, demiPetitAxe/5.0)
+
+  return shapeDefaut, xyz_defaut, tailleDefaut, coordsNoeudsFissure, pipe0, gener1, pipe1, facefis1, plane1, ellipsoide1
diff --git a/src/Tools/blocFissure/gmu/genereMeshCalculZoneDefaut.py b/src/Tools/blocFissure/gmu/genereMeshCalculZoneDefaut.py
new file mode 100644 (file)
index 0000000..a08664b
--- /dev/null
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import smesh
+from salome.smesh import smeshBuilder
+
+# -----------------------------------------------------------------------------
+# --- maillage face de fissure pour identification zone de defaut
+
+def genereMeshCalculZoneDefaut(facefiss, minSize, maxSize):
+  """
+  TODO: a completer
+  """
+  logging.info('start')
+
+  meshFissure = smesh.Mesh(facefiss)
+  algo2d = meshFissure.Triangle(algo=smeshBuilder.NETGEN_1D2D)
+  hypo2d = algo2d.Parameters()
+  hypo2d.SetMaxSize( maxSize )
+  hypo2d.SetSecondOrder( 0 )
+  hypo2d.SetOptimize( 1 )
+  hypo2d.SetFineness( 2 )
+  hypo2d.SetMinSize( minSize )
+  hypo2d.SetQuadAllowed( 0 )
+  isDone = meshFissure.Compute()
+  smesh.SetName(algo2d, "algo2d_zoneFiss")
+  smesh.SetName(hypo2d, "hypo1d_zoneFiss")
+
+  coordsNoeudsFissure = []
+  nodeIds = meshFissure.GetNodesId()
+  for id in nodeIds:
+    coords = meshFissure.GetNodeXYZ(id)
+    coordsNoeudsFissure.append(coords[0])
+    coordsNoeudsFissure.append(coords[1])
+    coordsNoeudsFissure.append(coords[2])
+  return coordsNoeudsFissure
diff --git a/src/Tools/blocFissure/gmu/geomsmesh.py b/src/Tools/blocFissure/gmu/geomsmesh.py
new file mode 100644 (file)
index 0000000..889d35b
--- /dev/null
@@ -0,0 +1,15 @@
+# -*- coding: utf-8 -*-
+
+import logging
+logging.info('start')
+
+import salome
+salome.salome_init()
+
+from salome.geom import geomBuilder
+geompy = geomBuilder.New(salome.myStudy)
+
+from salome.smesh import smeshBuilder
+smesh = smeshBuilder.New(salome.myStudy)
+
+logging.debug("initialisation de geompy et smesh OK")
diff --git a/src/Tools/blocFissure/gmu/getCentreFondFiss.py b/src/Tools/blocFissure/gmu/getCentreFondFiss.py
new file mode 100644 (file)
index 0000000..6c04d36
--- /dev/null
@@ -0,0 +1,77 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+import bisect
+
+publie = False
+
+def getCentreFondFiss(shapesFissure):
+  """
+  identification du centre de fond de fissure,
+  transformation fond de fissure en edge unique (seulement pour la procédure insereFissureGenerale).
+  On distingue le cas d'utilisation de la procédure insereFissureLongue par le nombre d'éléments de shapesFissure.
+  """
+  global publie
+  logging.debug("start")
+  
+  fondFiss          = shapesFissure[4] # groupe d'edges de fond de fissure
+  if len(shapesFissure) == 6:          # procédure insereFissureGenerale, et edge fond de fissure fournie explicitement
+    edgeFondExt     = shapesFissure[5]
+  else:
+    edgeFondExt     = None
+  
+  if len(shapesFissure) > 6:           # procédure insereFissureLongue (fissure plane, plusieurs edges sur le fond de fissure)
+    centreFondFiss = shapesFissure[1]
+    tgtCentre = None
+  else:                                # procédure insereFissureGenerale, détermination edge unique et milieu de l'edge
+    if geompy.NumberOfEdges(fondFiss) > 1:
+      if geompy.NbShapes(fondFiss, geompy.ShapeType["WIRE"]) > 0: # wire
+        aWire = fondFiss
+      else:                                                       # compound
+        edges = geompy.ExtractShapes(fondFiss, geompy.ShapeType["EDGE"], False)
+        aWire = geompy.MakeWire(edges, 1e-07)
+    else:
+      edgeFondExt = fondFiss
+      aWire = geompy.MakeWire([fondFiss], 1e-07)
+    if not publie:
+      geompy.addToStudy(aWire, "wireFondFissExt")
+        
+    lgWire = geompy.BasicProperties(aWire)[0]
+    edges = geompy.ExtractShapes(aWire, geompy.ShapeType["EDGE"], True)
+    lgEdges = [geompy.BasicProperties(ed)[0] for ed in edges]
+    lgSumEd =[sum(lgEdges[0:i+1]) for i in range(len(lgEdges))]
+    iedr = bisect.bisect_left(lgSumEd, lgWire/2.0)
+    iedg = iedr -1
+    if iedg < 0:
+      lgOnEdge = lgWire/2.0
+    else:
+      lgOnEdge = lgWire/2.0 - lgSumEd[iedg]
+    logging.debug("lgsumEdges %s", lgSumEd)
+    logging.debug("id edge: %s, lgOnEdge: %s, lgEdge: %s",iedr, lgOnEdge, lgEdges[iedr])
+    if iedr > 0: # il y a une edge avant celle du milieu
+      if geompy.MinDistance(edges[iedr-1], geompy.MakeVertexOnCurve(edges[iedr], 0.0 )) < 1.e-3: # edge orientée croissante 
+        centreFondFiss = geompy.MakeVertexOnCurve(edges[iedr], lgOnEdge/lgEdges[iedr])
+      else:
+        centreFondFiss = geompy.MakeVertexOnCurve(edges[iedr], 1.0 - lgOnEdge/lgEdges[iedr])
+    elif iedr < len(edges)-1: # il y a une edge après celle du milieu
+      if geompy.MinDistance(edges[iedr+1], geompy.MakeVertexOnCurve(edges[iedr], 1.0 )) < 1.e-3: # edge orientée croissante
+        centreFondFiss = geompy.MakeVertexOnCurve(edges[iedr], lgOnEdge/lgEdges[iedr])
+      else:
+        centreFondFiss = geompy.MakeVertexOnCurve(edges[iedr], 1.0 - lgOnEdge/lgEdges[iedr])
+    else: # on ne sait pas comment est orientée l'edge unique, mais ça n'a pas d'importance
+      centreFondFiss = geompy.MakeVertexOnCurve(edges[iedr], lgOnEdge/lgEdges[iedr])
+    geompy.addToStudyInFather(aWire, centreFondFiss, "centreFondFiss")
+    tgtCentre = geompy.MakeTangentOnCurve(edges[iedr], lgOnEdge/ lgEdges[iedr])
+    
+    if edgeFondExt is None: # fond de fissure non fourni explicitement sous forme d'edge
+      try:
+        edgeFondExt = geompy.MakeEdgeWire(aWire, 0.0005, 1e-07)
+      except:
+        logging.debug("erreur MakeEdgeWire sur fond de fissure, on fait sans")
+        edgeFondExt = None
+    if not publie and edgeFondExt is not None:
+      geompy.addToStudy(edgeFondExt, "edgeFondExt")
+  
+  publie = True
+  return edgeFondExt, centreFondFiss, tgtCentre
diff --git a/src/Tools/blocFissure/gmu/getStatsMaillageFissure.py b/src/Tools/blocFissure/gmu/getStatsMaillageFissure.py
new file mode 100644 (file)
index 0000000..453b6b9
--- /dev/null
@@ -0,0 +1,58 @@
+# -*- coding: utf-8 -*-
+
+import logging
+import SMESH
+
+# -----------------------------------------------------------------------------
+# --- statistiques maillage
+
+def getStatsMaillageFissure(maillage, referencesMaillageFissure, maillageFissureParams):
+  """
+  TODO: a completer
+  """
+  logging.debug('start')
+
+  nomRep = '.'
+  if maillageFissureParams.has_key('nomRep'):
+    nomRep = maillageFissureParams['nomRep']
+  
+  nomFicFissure     = maillageFissureParams['nomFicFissure']
+  fichierStatMaillageFissure = nomRep + '/' + nomFicFissure + '.res'
+  fichierNewRef = nomRep + '/' + nomFicFissure + '.new'
+  logging.debug("fichierStatMaillageFissure=%s", fichierStatMaillageFissure)
+
+  OK = False
+  if maillage is not None:
+    mesures = maillage.GetMeshInfo()
+    d= {}
+    for key, value in mesures.iteritems():
+      logging.debug( "key: %s value: %s", key, value)
+      d[str(key)] = value
+    logging.debug("dico mesures %s", d)      
+
+    f = open(fichierStatMaillageFissure, 'w')
+    f2 = open(fichierNewRef, 'w')
+    OK = True
+    for key in ('Entity_Quad_Pyramid', 'Entity_Quad_Hexa', 'Entity_Quad_Quadrangle'):
+      if d[key] != referencesMaillageFissure[key]:
+        logging.info("Ecart: %s reference: %s calcul: %s", key, referencesMaillageFissure[key], d[key])
+        f.write("Ecart: " + key + " reference: " + str(referencesMaillageFissure[key]) + " calcul: " + str(d[key]) + '\n')
+        OK = False
+      else:
+        logging.info("Valeur_OK: %s reference: %s calcul: %s", key, referencesMaillageFissure[key], d[key])
+        f.write("Valeur_OK: " + key + " reference: " + str(referencesMaillageFissure[key]) + " calcul: " + str(d[key]) + '\n')
+      f2.write(key + " = " + str(d[key]) + ",\n")
+    tolerance = 0.05
+    for key in ('Entity_Quad_Penta', 'Entity_Quad_Tetra', 'Entity_Quad_Triangle', 'Entity_Quad_Edge', 'Entity_Node'):
+      if (d[key] < (1.0 - tolerance)*referencesMaillageFissure[key]) \
+      or (d[key] > (1.0 + tolerance)*referencesMaillageFissure[key]):
+        logging.info("Ecart: %s reference: %s calcul: %s", key, referencesMaillageFissure[key], d[key])
+        f.write("Ecart: " + key + " reference: " + str(referencesMaillageFissure[key]) + " calcul: " + str(d[key]) + '\n')
+        OK = False
+      else:
+        logging.info("Valeur_OK: %s reference: %s calcul: %s", key, referencesMaillageFissure[key], d[key])
+        f.write("Valeur_OK: " + key + " reference: " + str(referencesMaillageFissure[key]) + " calcul: " + str(d[key]) + '\n')
+      f2.write(key + " = " + str(d[key]) + ",\n")
+    f.close()
+    f2.close()
+  return OK
diff --git a/src/Tools/blocFissure/gmu/getSubshapeIds.py b/src/Tools/blocFissure/gmu/getSubshapeIds.py
new file mode 100644 (file)
index 0000000..7783596
--- /dev/null
@@ -0,0 +1,18 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- transformation d'une liste de subshapes en une liste d'Id
+
+def getSubshapeIds(obj, subshapes):
+  """
+  transformation d'une liste de subshapes en une liste d'Id
+  """
+  logging.debug("start")
+  subshapesId = []
+  for sub in subshapes:
+    subshapesId.append(geompy.GetSubShapeID(obj, sub))
+  logging.debug("subshapesId=%s", subshapesId)
+  return subshapesId
diff --git a/src/Tools/blocFissure/gmu/initEtude.py b/src/Tools/blocFissure/gmu/initEtude.py
new file mode 100644 (file)
index 0000000..1e73886
--- /dev/null
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+
+import logging
+myStudy = None
+
+def initEtude():
+  """
+  creation nouvelle etude salome
+  """
+  import geomsmesh
diff --git a/src/Tools/blocFissure/gmu/initLog.py b/src/Tools/blocFissure/gmu/initLog.py
new file mode 100644 (file)
index 0000000..63908c1
--- /dev/null
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+
+import logging
+
+def setDebug():
+  logging.basicConfig(format='%(relativeCreated)d %(funcName)s[%(lineno)d] %(message)s',
+                      level=logging.DEBUG)
+  logging.info('start Debug')
+
+def setVerbose():
+  logging.basicConfig(format='%(relativeCreated)d %(funcName)s[%(lineno)d] %(message)s',
+                      level=logging.INFO)
+  logging.info('start Verbose')
+
+def setRelease():
+  logging.basicConfig(format='%(funcName)s[%(lineno)d] %(message)s',
+                      level=logging.WARNING)
+  logging.warning('start Release')
+  
+def setUnitTests():
+  logging.basicConfig(format='%(funcName)s[%(lineno)d] %(message)s',
+                      level=logging.CRITICAL)
+  logging.critical('start UnitTests')
+  
+  #logging.basicConfig(filename='myapp.log',
+  #                    format='%(asctime)s %(message)s',
+  #                    datefmt='%m/%d/%Y %I:%M:%S %p',
+  #                    level=logging.DEBUG)
diff --git a/src/Tools/blocFissure/gmu/insereFissureElliptique.py b/src/Tools/blocFissure/gmu/insereFissureElliptique.py
new file mode 100644 (file)
index 0000000..95d4a62
--- /dev/null
@@ -0,0 +1,196 @@
+# -*- coding: utf-8 -*-
+
+import logging
+import salome
+from geomsmesh import geompy
+from geomsmesh import smesh
+import SMESH
+import math
+
+from partitionBlocDefaut import partitionBlocDefaut
+from facesVolumesToriques import facesVolumesToriques
+from facesCirculaires import facesCirculaires
+from propagateTore import propagateTore
+from sortGeneratrices import sortGeneratrices
+from facesFissure import facesFissure
+from facesToreInBloc import facesToreInBloc
+from shapeSurFissure import shapeSurFissure
+from meshBlocPart import meshBlocPart
+from enleveDefaut import enleveDefaut
+from regroupeSainEtDefaut import RegroupeSainEtDefaut
+from putName import putName
+# -----------------------------------------------------------------------------
+# --- procedure complete fissure elliptique
+
+def insereFissureElliptique(geometriesSaines, maillagesSains,
+                            shapesFissure, shapeFissureParams,
+                            maillageFissureParams, elementsDefaut, step=-1):
+  """
+  TODO: a completer
+  """
+  logging.info('start')
+
+  geometrieSaine    = geometriesSaines[0]
+  maillageSain      = maillagesSains[0]
+  isHexa            = maillagesSains[1]
+  shapeDefaut       = shapesFissure[0]
+  tailleDefaut      = shapesFissure[2]
+  pipe0             = shapesFissure[4]
+  gener1            = shapesFissure[5]
+  pipe1             = shapesFissure[6]
+  facefis1          = shapesFissure[7]
+  plane1            = shapesFissure[8]
+  ellipsoide1       = shapesFissure[9]
+
+
+  demiGrandAxe      = shapeFissureParams['demiGrandAxe']
+  demiPetitAxe      = shapeFissureParams['demiPetitAxe']
+  orientation       = shapeFissureParams['orientation']
+
+  nomRep            = maillageFissureParams['nomRep']
+  nomFicSain        = maillageFissureParams['nomFicSain']
+  nomFicFissure     = maillageFissureParams['nomFicFissure']
+
+  nbsegExt          = maillageFissureParams['nbsegExt']      # 5
+  nbsegGen          = maillageFissureParams['nbsegGen']      # 25
+  nbsegRad          = maillageFissureParams['nbsegRad']      # 5
+  scaleRad          = maillageFissureParams['scaleRad']      # 4
+  nbsegCercle       = maillageFissureParams['nbsegCercle']   # 6
+  nbsegFis          = maillageFissureParams['nbsegFis']      # 20
+  lensegEllipsoide  = maillageFissureParams['lensegEllipso'] # 1.0
+
+  fichierMaillageSain = nomRep + '/' + nomFicSain + '.med'
+  fichierMaillageFissure = nomRep + '/' + nomFicFissure + '.med'
+
+  facesDefaut              = elementsDefaut[0]
+  centreDefaut             = elementsDefaut[1]
+  normalDefaut             = elementsDefaut[2]
+  extrusionDefaut          = elementsDefaut[3]
+  dmoyen                   = elementsDefaut[4]
+  bordsPartages            = elementsDefaut[5]
+  fillconts                = elementsDefaut[6]
+  idFilToCont              = elementsDefaut[7]
+  maillageSain             = elementsDefaut[8]
+  internalBoundary         = elementsDefaut[9]
+  zoneDefaut               = elementsDefaut[10]
+  zoneDefaut_skin          = elementsDefaut[11]
+  zoneDefaut_internalFaces = elementsDefaut[12]
+  zoneDefaut_internalEdges = elementsDefaut[13]
+
+  ## --- ellipse incomplete : generatrice
+  #if step == 5:
+    #return None
+
+  #allonge = demiGrandAxe/demiPetitAxe
+  #rayonTore = demiPetitAxe/5.0
+  #generatrice, FaceGenFiss, Pipe_1, FaceFissure, Plane_1, Pipe1Part = self.toreFissure(demiPetitAxe, allonge, rayonTore)
+  #ellipsoide = self.ellipsoideDefaut(demiPetitAxe, allonge, rayonTore)
+
+  ## --- positionnement sur le bloc defaut de generatrice, tore et plan fissure
+  #if step == 6:
+    #return None
+
+  #pipe0 = self.rotTrans(Pipe_1, orientation, centreDefaut, normalDefaut)
+  #gener1 = self.rotTrans(generatrice, orientation, centreDefaut, normalDefaut)
+  #pipe1 = self.rotTrans(Pipe1Part, orientation, centreDefaut, normalDefaut)
+  #facefis1 = self.rotTrans(FaceFissure, orientation, centreDefaut, normalDefaut)
+  #plane1 = self.rotTrans(Plane_1, orientation, centreDefaut, normalDefaut)
+  #ellipsoide1 = self.rotTrans(ellipsoide, orientation, centreDefaut, normalDefaut)
+
+  #geompy.addToStudy( pipe0, 'pipe0' )
+  #geompy.addToStudy( gener1, 'gener1' )
+  #geompy.addToStudy( pipe1, 'pipe1' )
+  #geompy.addToStudy( facefis1, 'facefis1' )
+  #geompy.addToStudy( plane1, 'plane1' )
+  #geompy.addToStudy( ellipsoide1, 'ellipsoide1' )
+
+  # --- partition du bloc défaut par génératrice, tore et plan fissure
+  if step == 7:
+    return None
+
+  [blocPartition, blocp, tore,
+  faceFissure, facesExternes, facesExtBloc, facesExtElli,
+  aretesInternes, ellipsoidep, sharedFaces, sharedEdges, edgesBords] = \
+    partitionBlocDefaut(extrusionDefaut, facesDefaut, gener1, pipe1,
+                        facefis1, ellipsoide1)
+  if not isHexa:
+    edgesBords = None # maillage sain hexa ==> filling, et maillage edges Bords imposés du maillage sain
+
+  # --- TORE
+  # --- faces toriques du tore
+  if step == 8:
+    return None
+
+  [facetore1, facetore2, volumeTore1, volumeTore2] = facesVolumesToriques(tore, plane1, facesDefaut)
+
+  # --- faces 1/2 circulaires et edges dans le plan de fissure
+  if step == 9:
+    return None
+
+  [faces, centres, edges, reverses] = facesCirculaires(extrusionDefaut, tore)
+
+  # --- recherche et classement des edges du tore par propagate
+  if step == 10:
+    return None
+
+  [diams, circles, geners] = propagateTore(tore)
+
+  # --- tri par longueur des 3 génératrices
+  if step == 11:
+    return None
+
+  [genext, genint, gencnt] = sortGeneratrices(tore, geners)
+
+  # --- faces fissure dans et hors tore, et edges face hors tore
+  if step == 12:
+    return None
+
+  [facefissintore, facefissoutore, edgeint, edgeext, reverext] = \
+    facesFissure(ellipsoidep, faceFissure, extrusionDefaut, genint)
+
+  # --- identification des faces tore et fissure dans le solide hors tore
+  if step == 13:
+    return None
+
+  [blocFaceFiss, blocFaceTore1, blocFaceTore2] = \
+    facesToreInBloc(ellipsoidep, facefissoutore, facetore1, facetore2)
+
+  # --- identification des shapes modifiées par la duplication des noeuds de la face fissure (d'un coté de la face)
+
+  #shapesAModifier = self.shapesSurFissure(blocPartition, plane1 faceFissure, gencnt)
+  if step == 14:
+    return None
+
+  extrusionFaceFissure, normfiss = shapeSurFissure(plane1)
+
+  # --- maillage du bloc partitionne
+
+  if step == 15:
+    return None
+
+  [bloc1, blocComplet] = \
+    meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circles, faces,
+                gencnt, facefissoutore, edgeext, facesExternes, facesExtBloc, facesExtElli,
+                aretesInternes, internalBoundary, ellipsoidep, sharedFaces, sharedEdges, edgesBords,
+                nbsegExt, nbsegGen, nbsegRad, scaleRad, reverses, reverext, nbsegCercle,
+                nbsegFis, dmoyen, lensegEllipsoide)
+
+  if step == 16:
+    return None
+  maillageSain = enleveDefaut(maillageSain, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges)
+
+  if step == 17:
+    return None
+  maillageComplet = RegroupeSainEtDefaut(maillageSain, blocComplet, extrusionFaceFissure, faceFissure, 'VOLUMES')
+
+  if step == 18:
+    return None
+  maillageComplet.ExportMED( fichierMaillageFissure, 0, SMESH.MED_V2_2, 1 )
+  putName(maillageComplet, nomFicFissure)
+  logging.info("fichier maillage fissure : %s", fichierMaillageFissure)
+
+  if salome.sg.hasDesktop():
+    salome.sg.updateObjBrowser(1)
+
+  return maillageComplet
diff --git a/src/Tools/blocFissure/gmu/insereFissureGenerale.py b/src/Tools/blocFissure/gmu/insereFissureGenerale.py
new file mode 100644 (file)
index 0000000..3204084
--- /dev/null
@@ -0,0 +1,1371 @@
+# -*- coding: utf-8 -*-
+
+import logging
+import salome
+from geomsmesh import geompy
+import GEOM
+from geomsmesh import smesh
+from salome.smesh import smeshBuilder
+import SMESH
+import math
+import bisect
+
+from extractionOrientee import extractionOrientee
+from extractionOrienteeMulti import extractionOrienteeMulti
+from sortFaces import sortFaces
+from sortEdges import sortEdges
+from eliminateDoubles import eliminateDoubles
+from substractSubShapes import substractSubShapes
+from produitMixte import produitMixte
+from findWireEndVertices import findWireEndVertices
+from findWireIntermediateVertices import findWireIntermediateVertices
+from orderEdgesFromWire import orderEdgesFromWire
+from getSubshapeIds import getSubshapeIds
+from putName import putName
+from distance2 import distance2
+from enleveDefaut import enleveDefaut
+from shapeSurFissure import shapeSurFissure
+from regroupeSainEtDefaut import RegroupeSainEtDefaut
+from triedreBase import triedreBase
+from checkDecoupePartition import checkDecoupePartition
+from whichSide import whichSide
+from whichSideMulti import whichSideMulti
+from whichSideVertex import whichSideVertex
+from projettePointSurCourbe import projettePointSurCourbe
+from prolongeWire import prolongeWire
+#from getCentreFondFiss import getCentreFondFiss
+
+# -----------------------------------------------------------------------------
+# --- procédure complète fissure générale
+
+def insereFissureGenerale(maillagesSains,
+                          shapesFissure, shapeFissureParams,
+                          maillageFissureParams, elementsDefaut, step=-1):
+  """
+  TODO: a completer
+  """
+  logging.info('start')
+  
+  shapeDefaut       = shapesFissure[0] # faces de fissure, débordant
+  fondFiss          = shapesFissure[4] # groupe d'edges de fond de fissure
+
+  rayonPipe = shapeFissureParams['rayonPipe']
+  if shapeFissureParams.has_key('lenSegPipe'):
+    lenSegPipe = shapeFissureParams['lenSegPipe']
+  else:
+    lenSegPipe = rayonPipe
+
+  nomRep            = maillageFissureParams['nomRep']
+  nomFicSain        = maillageFissureParams['nomFicSain']
+  nomFicFissure     = maillageFissureParams['nomFicFissure']
+
+  nbsegRad          = maillageFissureParams['nbsegRad']      # nombre de couches selon un rayon du pipe
+  nbsegCercle       = maillageFissureParams['nbsegCercle']   # nombre de secteur dans un cercle du pipe
+  areteFaceFissure  = maillageFissureParams['areteFaceFissure']
+
+  pointIn_x = 0.0
+  pointIn_y = 0.0
+  pointIn_z = 0.0
+  isPointInterne = False
+  if shapeFissureParams.has_key('pointIn_x'):
+    pointIn_x = shapeFissureParams['pointIn_x']
+    isPointInterne = True
+  if shapeFissureParams.has_key('pointIn_y'):
+    pointIn_y = shapeFissureParams['pointIn_y']
+    isPointInterne = True
+  if shapeFissureParams.has_key('pointIn_z'):
+    pointIn_z = shapeFissureParams['pointIn_z']
+    isPointInterne = True
+  if isPointInterne:
+    pointInterne = geompy.MakeVertex(pointIn_x, pointIn_y, pointIn_z)
+
+  #fichierMaillageSain = nomRep + '/' + nomFicSain + '.med'
+  fichierMaillageFissure = nomRep + '/' + nomFicFissure + '.med'
+
+  facesDefaut              = elementsDefaut[0] # fillings des faces en peau 
+  #centresDefaut            = elementsDefaut[1]
+  #normalsDefaut            = elementsDefaut[2]
+  #extrusionsDefaut         = elementsDefaut[3]
+  dmoyen                   = elementsDefaut[4]
+  bordsPartages            = elementsDefaut[5]
+  fillconts                = elementsDefaut[6]
+  idFilToCont              = elementsDefaut[7]
+  maillageSain             = elementsDefaut[8]
+  internalBoundary         = elementsDefaut[9]
+  zoneDefaut               = elementsDefaut[10]
+  zoneDefaut_skin          = elementsDefaut[11]
+  zoneDefaut_internalFaces = elementsDefaut[12]
+  zoneDefaut_internalEdges = elementsDefaut[13]
+  edgeFondExt              = elementsDefaut[14]
+  centreFondFiss           = elementsDefaut[15]
+  tgtCentre                = elementsDefaut[16]
+
+  # --- restriction de la face de fissure au domaine solide :
+  #     partition face fissure étendue par fillings, on garde la plus grande face
+
+  partShapeDefaut = geompy.MakePartition([shapeDefaut], facesDefaut, [], [], geompy.ShapeType["FACE"], 0, [], 0)
+  geompy.addToStudy(partShapeDefaut, 'partShapeDefaut')
+  facesPartShapeDefaut = geompy.ExtractShapes(partShapeDefaut, geompy.ShapeType["FACE"], False)
+  if isPointInterne:
+    distfaces = [(geompy.MinDistance(face,pointInterne), i, face) for i, face in enumerate(facesPartShapeDefaut)]
+    distfaces.sort()
+    logging.debug("selection de la face la plus proche du point interne, distance=%s",distfaces[0][0])
+    facesPortFissure = distfaces[0][2]
+  else:
+    facesPartShapeDefautSorted, minSurf, maxSurf = sortFaces(facesPartShapeDefaut) # la face de fissure dans le volume doit être la plus grande
+    logging.debug("surfaces faces fissure étendue, min %s, max %s", minSurf, maxSurf)
+    facesPortFissure = facesPartShapeDefautSorted[-1]
+  
+  geompy.addToStudy(facesPortFissure, "facesPortFissure")
+
+  O, OX, OY, OZ = triedreBase()
+  
+  # -----------------------------------------------------------------------------
+  # --- pipe de fond de fissure, prolongé, partition face fissure par pipe
+  #     identification des edges communes pipe et face fissure
+  
+  if geompy.NumberOfFaces(shapeDefaut) == 1:
+    plan = geompy.MakePlane(centreFondFiss, tgtCentre, 10000)
+    shapeDefaut = geompy.MakePartition([shapeDefaut], [plan], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+    fondFissCoupe = geompy.GetInPlaceByHistory(shapeDefaut, fondFiss)
+    geompy.addToStudy(shapeDefaut, 'shapeDefaut_coupe')
+    geompy.addToStudyInFather(shapeDefaut, fondFissCoupe, 'fondFiss_coupe')
+  
+  extrem, norms = findWireEndVertices(fondFiss, True)
+  logging.debug("extrem: %s, norm: %s",extrem, norms)
+  cercle = geompy.MakeCircle(extrem[0], norms[0], rayonPipe)
+  cercle = geompy.MakeRotation(cercle, norms[0], math.pi/3.0 ) # éviter d'avoir l'arête de couture du pipe presque confondue avec la face fissure
+  geompy.addToStudy(cercle, 'cercle')
+  fondFissProlonge = prolongeWire(fondFiss, extrem, norms, 2*rayonPipe)
+  pipeFiss = geompy.MakePipe(cercle, fondFissProlonge)
+  geompy.addToStudy(pipeFiss, 'pipeFiss')
+  partFissPipe = geompy.MakePartition([shapeDefaut, pipeFiss], [], [], [], geompy.ShapeType["FACE"], 0, [], 1)
+  geompy.addToStudy(partFissPipe, 'partFissPipe')
+  fissPipe = geompy.GetInPlaceByHistory(partFissPipe, shapeDefaut)
+  geompy.addToStudy(fissPipe, 'fissPipe')
+  partPipe = geompy.GetInPlaceByHistory(partFissPipe, pipeFiss)
+  geompy.addToStudy(partPipe, 'partPipe')
+  
+  edgesPipeFiss = geompy.GetSharedShapesMulti([fissPipe, partPipe], geompy.ShapeType["EDGE"])
+  for i, edge in enumerate(edgesPipeFiss):
+    name = "edgePipe%d"%i
+    geompy.addToStudyInFather(fissPipe, edge, name)
+  try:
+    wirePipeFiss = geompy.MakeWire(edgesPipeFiss)
+  except:
+    wirePipeFiss = geompy.MakeCompound(edgesPipeFiss)
+    logging.debug("wirePipeFiss construit sous forme de compound")
+  geompy.addToStudy(wirePipeFiss, "wirePipeFiss")
+  
+  wireFondFiss = geompy.GetInPlace(partFissPipe,fondFiss)
+  edgesFondFiss = geompy.GetSharedShapesMulti([fissPipe, wireFondFiss], geompy.ShapeType["EDGE"])
+  for i, edge in enumerate(edgesFondFiss):
+    name = "edgeFondFiss%d"%i
+    geompy.addToStudyInFather(fissPipe, edge, name)
+  wireFondFiss = geompy.MakeWire(edgesFondFiss)
+  geompy.addToStudy(wireFondFiss,"wireFondFiss")  
+
+  # -----------------------------------------------------------------------------
+  # --- peau et face de fissure
+  #
+  # --- partition peau défaut - face de fissure prolongée - wire de fond de fissure prolongée
+  #     il peut y avoir plusieurs faces externes, dont certaines sont découpées par la fissure
+  #     liste de faces externes : facesDefaut
+  #     liste de partitions face externe - fissure : partitionPeauFissFond (None quand pas d'intersection)
+  
+  partitionsPeauFissFond = []
+  ipart = 0
+  for filling in facesDefaut: 
+    part = geompy.MakePartition([fissPipe, filling], [], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+    isPart = checkDecoupePartition([fissPipe, filling], part)
+    if isPart: # on recrée la partition avec toutes les faces filling en outil pour avoir une face de fissure correcte
+      otherFD = [fd for fd in facesDefaut if fd != filling]
+      if len(otherFD) > 0:
+        fissPipePart = geompy.MakePartition([fissPipe], otherFD, [], [], geompy.ShapeType["FACE"], 0, [], 0)
+      else:
+        fissPipePart = fissPipe
+      part = geompy.MakePartition([fissPipePart, filling], [], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+      partitionsPeauFissFond.append(part)
+      geompy.addToStudy( part, 'partitionPeauFissFond%d'%ipart )
+    else:
+      partitionsPeauFissFond.append(None)
+    ipart = ipart +1
+  
+  # --- arêtes vives détectées (dans quadranglesToShape)
+   
+  aretesVives = []
+  aretesVivesCoupees = []
+  ia = 0
+  for a in bordsPartages:
+    if a[0] is not None:
+      aretesVives.append(a[0])
+      name = "areteVive%d"%ia
+      geompy.addToStudy(a[0], name)
+      ia += 1
+  aretesVivesC = None
+  if len(aretesVives) > 0:
+    aretesVivesC =geompy.MakeCompound(aretesVives)
+    
+  # -------------------------------------------------------
+  # --- inventaire des faces de peau coupées par la fissure
+  #     pour chaque face de peau : 0, 1 ou 2 faces débouchante du fond de fissure
+  #                                0, 1 ou plus edges de la face de fissure externe au pipe
+  
+  nbFacesFilling = len(partitionsPeauFissFond)
+  ptEdgeFond = [ []  for i in range(nbFacesFilling)] # pour chaque face [points edge fond de fissure aux débouchés du pipe]
+  fsPipePeau = [ []  for i in range(nbFacesFilling)] # pour chaque face [faces du pipe débouchantes]
+  edRadFPiPo = [ []  for i in range(nbFacesFilling)] # pour chaque face [edge radiale des faces du pipe débouchantes ]
+  fsFissuExt = [ []  for i in range(nbFacesFilling)] # pour chaque face [faces de fissure externes au pipe]
+  edFisExtPe = [ []  for i in range(nbFacesFilling)] # pour chaque face [edge en peau des faces de fissure externes (pas subshape facePeau)]
+  edFisExtPi = [ []  for i in range(nbFacesFilling)] # pour chaque face [edge commun au pipe des faces de fissure externes]
+  facesPeaux = [None for i in range(nbFacesFilling)] # pour chaque face : la face de peau finale a mailler (percée des faces débouchantes)
+  edCircPeau = [ []  for i in range(nbFacesFilling)] # pour chaque face de peau : [subshape edge circulaire aux débouchés du pipe]
+  ptCircPeau = [ []  for i in range(nbFacesFilling)] # pour chaque face de peau : [subshape point sur edge circulaire aux débouchés du pipe]
+  gpedgeBord = [None for i in range(nbFacesFilling)] # pour chaque face de peau : groupe subshape des edges aux bords liés à la partie saine
+  gpedgeVifs = [None for i in range(nbFacesFilling)] # pour chaque face de peau : groupes subshape des edges aux arêtes vives entre fillings
+  edFissPeau = [ []  for i in range(nbFacesFilling)] # pour chaque face de peau : [subshape edge en peau des faces de fissure externes]
+  ptFisExtPi = [ []  for i in range(nbFacesFilling)] # pour chaque face de peau : [point commun edFissPeau edCircPeau]
+  
+  for ifil, partitionPeauFissFond in enumerate(partitionsPeauFissFond):
+    fillingFaceExterne = facesDefaut[ifil]
+    fillingSansDecoupe = fillconts[idFilToCont[ifil]]
+    if partitionPeauFissFond is not None:
+      logging.debug("traitement partitionPeauFissFond %s", ifil)
+      # -----------------------------------------------------------------------
+      # --- identification edges fond de fissure, edges pipe sur la face de fissure,
+      #     edges prolongées
+      
+      edgesPipeC = geompy.GetInPlace(partitionPeauFissFond, geompy.MakeCompound(edgesPipeFiss))
+      geompy.addToStudyInFather(partitionPeauFissFond, edgesPipeC, "edgesPipeFiss")
+      edgesFondC = geompy.GetInPlace(partitionPeauFissFond, geompy.MakeCompound(edgesFondFiss))
+      geompy.addToStudyInFather(partitionPeauFissFond, edgesFondC, "edgesFondFiss")
+      
+      if aretesVivesC is None:
+        [edgesInside, edgesOutside, edgesOnside] = extractionOrientee(fillingFaceExterne, partitionPeauFissFond, centreFondFiss, "EDGE", 1.e-3)
+        [facesInside, facesOutside, facesOnside] = extractionOrientee(fillingFaceExterne, partitionPeauFissFond, centreFondFiss, "FACE", 1.e-3)
+      else:
+        [edgesInside, edgesOutside, edgesOnside] = extractionOrienteeMulti(facesDefaut, ifil, partitionPeauFissFond, centreFondFiss, "EDGE", 1.e-3)
+        [facesInside, facesOutside, facesOnside] = extractionOrienteeMulti(facesDefaut, ifil, partitionPeauFissFond, centreFondFiss, "FACE", 1.e-3)
+        
+      edgesPipeIn = geompy.GetSharedShapesMulti([edgesPipeC, geompy.MakeCompound(edgesInside)], geompy.ShapeType["EDGE"])
+      verticesPipePeau = []
+
+      for i, edge in enumerate(edgesPipeIn):
+        try:
+          vertices = geompy.GetSharedShapesMulti([edge, geompy.MakeCompound(facesOnside)], geompy.ShapeType["VERTEX"])
+          verticesPipePeau.append(vertices[0])
+          name = "edgePipeIn%d"%i
+          geompy.addToStudyInFather(partitionPeauFissFond, edge, name)
+          name = "verticePipePeau%d"%i
+          geompy.addToStudyInFather(partitionPeauFissFond, vertices[0], name)
+          logging.debug("edgePipeIn%s coupe les faces OnSide", i)
+        except:
+          logging.debug("edgePipeIn%s ne coupe pas les faces OnSide", i)
+      edgesFondOut = []
+      edgesFondIn =[]
+      if len(verticesPipePeau) > 0: # au moins une extrémité du pipe sur cette face de peau  
+        tmp = geompy.GetSharedShapesMulti([edgesFondC, geompy.MakeCompound(edgesOutside)], geompy.ShapeType["EDGE"])
+        edgesFondOut = [ ed for ed in tmp if geompy.MinDistance(ed, geompy.MakeCompound(facesOnside)) < 1.e-3]
+        tmp = geompy.GetSharedShapesMulti([edgesFondC, geompy.MakeCompound(edgesInside)], geompy.ShapeType["EDGE"])
+        edgesFondIn = [ ed for ed in tmp if geompy.MinDistance(ed, geompy.MakeCompound(facesOnside)) < 1.e-3]
+      verticesEdgesFondIn = [] # les points du fond de fissure au débouché du pipe sur la peau (indice de edgesFondIn)
+      pipexts = []             # les segments de pipe associés au points de fond de fissure débouchants (même indice)
+      cercles = []             # les cercles de generation des pipes débouchant (même indice)
+      facesFissExt = []        # les faces de la fissure externe associés au points de fond de fissure débouchants (même indice)
+      edgesFissExtPeau = []    # edges des faces de fissure externe sur la peau (même indice)
+      edgesFissExtPipe = []    # edges des faces de fissure externe sur le pipe (même indice)
+      #logging.debug("edgesFondIn %s", edgesFondIn)
+
+      edgesFondFiss, edgesIdByOrientation = orderEdgesFromWire(wireFondFiss)
+      for i,edge in enumerate(edgesFondFiss):
+        geompy.addToStudyInFather(wireFondFiss, edge, "edgeFondFiss%d"%i)
+
+      for iedf, edge in enumerate(edgesFondIn):
+        name = "edgeFondIn%d"%iedf
+        geompy.addToStudyInFather(partitionPeauFissFond, edge, name)
+        dist = [ geompy.MinDistance(pt, edge) for pt in verticesPipePeau]
+        ptPeau = verticesPipePeau[dist.index(min(dist))] # le point de verticesPipePeau a distance minimale de l'edge
+        [u, PointOnEdge, EdgeInWireIndex]  = geompy.MakeProjectionOnWire(ptPeau, wireFondFiss)
+        logging.debug("u:%s, EdgeInWireIndex: %s, len(edgesFondFiss): %s", u, EdgeInWireIndex, len(edgesFondFiss))
+        localEdgeInFondFiss = edgesFondFiss[EdgeInWireIndex]
+        centre = PointOnEdge
+        centre2 = geompy.MakeVertexOnCurve(localEdgeInFondFiss, u)
+        geompy.addToStudyInFather(partitionPeauFissFond, centre2, "centre2_%d"%iedf)
+        verticesEdgesFondIn.append(centre)
+        name = "verticeEdgesFondIn%d"%iedf
+        geompy.addToStudyInFather(partitionPeauFissFond, centre, name)
+        norm = geompy.MakeTangentOnCurve(localEdgeInFondFiss, u)
+        geompy.addToStudyInFather(partitionPeauFissFond, centre, "norm%d"%iedf)
+        cercle = geompy.MakeCircle(centre, norm, rayonPipe)
+        geompy.addToStudyInFather(partitionPeauFissFond, cercle, "cerclorig%d"%iedf)
+        [vertex] = geompy.ExtractShapes(cercle, geompy.ShapeType["VERTEX"], False)
+        vec1 = geompy.MakeVector(centre, vertex)
+        vec2 = geompy.MakeVector(centre, ptPeau)
+        angle = geompy.GetAngleRadians(vec1, vec2)
+        # cas général : on reconstitue une portion de pipe, avec l'arête de couture qui coincide
+        #   avec la face de fissure, au niveau du débouché sur la face externe
+        # cas dégénéré : le pipe débouche perpendiculairement à une surface plane à l'origine.
+        #   La partition filling / pipe reconstruit échoue.
+        #   - Si on partitionne le filling avec un simple pipe obtenu par extrusion droite du cercle,
+        #     cela donne un point en trop sur le cercle.
+        #   - Si on prend une vraie surface plane (pas un filling), on peut faire la partition avec 
+        #     les pipes reconstruits              
+        logging.debug("angle=%s", angle)
+        #if abs(angle) > 1.e-7:
+        sommetAxe = geompy.MakeTranslationVector(centre, norm)
+        pm = produitMixte(centre, vertex, ptPeau, sommetAxe)
+        if pm > 0:  # ajout de pi a (-)angle pour éviter des points confondus (partition échoue) dans les cas dégénérés
+          cercle = geompy.MakeRotation(cercle, norm, angle + math.pi)
+        else:
+          cercle = geompy.MakeRotation(cercle, norm, -angle + math.pi)
+        name = "cercle%d"%iedf
+        geompy.addToStudyInFather(partitionPeauFissFond, cercle, name)
+        cercles.append(cercle)
+
+        # --- estimation de la longueur du pipe necessaire de part et d'autre du point de sortie
+        if aretesVivesC is None:
+          faceTestPeau = fillingFaceExterne
+        else:
+          faceTestPeau = facesDefaut[ifil]
+        sideCentre = whichSide(faceTestPeau, centre)
+        locPt0 = geompy.MakeVertexOnCurve(localEdgeInFondFiss, 0.0)
+        locPt1 = geompy.MakeVertexOnCurve(localEdgeInFondFiss, 1.0)
+        sidePt0 = whichSide(faceTestPeau, locPt0)
+        sidePt1 = whichSide(faceTestPeau, locPt1)
+        logging.debug("position centre cercle: %s, extremité edge u0: %s, u1: %s", sideCentre, sidePt0, sidePt1) 
+        normFace = geompy.GetNormal(faceTestPeau, ptPeau)
+        inclPipe = abs(geompy.GetAngleRadians(norm, normFace))
+        lgp = max(rayonPipe/2., abs(3*rayonPipe*math.tan(inclPipe)))
+        logging.debug("angle inclinaison Pipe en sortie: %s degres, lgp: %s", inclPipe*180/math.pi, lgp)
+        
+        # --- position des points extremite du pipe sur l'edge debouchante
+        #     il faut la distance curviligne ofp du point central par rapport à une extrémité de l'edge débouchante
+        locEdgePart = geompy.MakePartition([localEdgeInFondFiss],[centre], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+        edgesLoc = geompy.ExtractShapes(locEdgePart, geompy.ShapeType["EDGE"], False)
+        edgesLocSorted =[(geompy.MinDistance(edge, locPt0), kk, edge) for kk, edge in enumerate(edgesLoc)]
+        edgesLocSorted.sort()
+        ofp = geompy.BasicProperties(edgesLocSorted[0][2])[0] # distance curviligne centre locPt0
+        logging.debug("distance curviligne centre extremite0: %s", ofp)
+        p1 = geompy.MakeVertexOnCurveByLength(localEdgeInFondFiss, ofp +lgp, locPt0)
+        p2 = geompy.MakeVertexOnCurveByLength(localEdgeInFondFiss, ofp -lgp, locPt0)
+        geompy.addToStudyInFather(wireFondFiss, p1, "p1_%d"%iedf)
+        geompy.addToStudyInFather(wireFondFiss, p2, "p2_%d"%iedf)
+
+        edgePart = geompy.MakePartition([localEdgeInFondFiss], [p1,p2], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+        edps = geompy.ExtractShapes(edgePart, geompy.ShapeType["EDGE"], True)
+        for edp in edps:
+          if geompy.MinDistance(centre, edp) < 1.e-3:
+            pipext = geompy.MakePipe(cercle, edp)
+            name = "pipeExt%d"%iedf
+            geompy.addToStudyInFather(partitionPeauFissFond, pipext, name)
+            pipexts.append(pipext)
+
+        for face in facesInside:
+          logging.debug("recherche edges communes entre une face inside et (faces onside, edges pipe et fond débouchante)")
+          edgesPeauFis = []
+          edgesPipeFis = []
+          edgesPipeFnd = []
+          try:
+            edgesPeauFis = geompy.GetSharedShapesMulti([geompy.MakeCompound(facesOnside), face], geompy.ShapeType["EDGE"])
+            logging.debug("    faces onside %s",edgesPeauFis)
+            edgesPipeFis = geompy.GetSharedShapesMulti([geompy.MakeCompound(edgesPipeIn), face], geompy.ShapeType["EDGE"])
+            logging.debug("    edgesPipeIn %s", edgesPipeFis)
+            edgesPipeFnd = geompy.GetSharedShapesMulti([geompy.MakeCompound(edgesFondIn), face], geompy.ShapeType["EDGE"])
+            logging.debug("    edgesFondIn %s ", edgesPipeFnd)
+          except:
+            logging.debug("  pb edges communes %s %s %s",edgesPeauFis, edgesPipeFis, edgesPipeFnd)
+            pass
+          if (len(edgesPeauFis) > 0) and (len(edgesPipeFis) > 0) and (len(edgesPipeFnd) == 0):
+            dist = geompy.MinDistance(geompy.MakeCompound(edgesPeauFis), ptPeau)
+            logging.debug("    test distance extrémité reference %s", dist)
+            if dist < 1.e-3: # c'est la face de fissure externe associée
+              logging.debug("    face %s inside ajoutée", i)
+              facesFissExt.append(face)
+              name="faceFissExt%d"%iedf
+              geompy.addToStudyInFather(partitionPeauFissFond, face, name)
+              dist = 1.
+              for ipe, edpe in enumerate(edgesPeauFis):
+                for ipi, edpi in enumerate(edgesPipeFis):
+                  dist = geompy.MinDistance(edpe, edpi)
+                  if dist < 1.e-3:
+                    edgesFissExtPeau.append(edpe)
+                    name="edgesFissExtPeau%d"%iedf
+                    geompy.addToStudyInFather(partitionPeauFissFond, edpe, name)
+                    edgesFissExtPipe.append(edpi)
+                    name="edgesFissExtPipe%d"%iedf
+                    geompy.addToStudyInFather(partitionPeauFissFond, edpi, name)
+                    break
+                if dist < 1.e-3:
+                  break
+
+      if len(verticesPipePeau) == 0: # aucune extrémité du pipe sur cette face de peau
+                                     # il faut recenser les edges de fissure sur la face de peau
+        j = 0
+        for face in facesInside:
+          edgesPeauFis = []
+          edgesPipeFis = []
+          edgesPipeFnd = []
+          try:
+            edgesPeauFis = geompy.GetSharedShapesMulti([geompy.MakeCompound(facesOnside), face], geompy.ShapeType["EDGE"])
+            edgesPipeFis = geompy.GetSharedShapesMulti([geompy.MakeCompound(edgesPipeIn), face], geompy.ShapeType["EDGE"])
+            edgesPipeFnd = geompy.GetSharedShapesMulti([geompy.MakeCompound(edgesFondIn), face], geompy.ShapeType["EDGE"])
+          except:
+            pass
+          if (len(edgesPeauFis) > 0) and (len(edgesPipeFis) > 0) and (len(edgesPipeFnd) == 0):
+            edgesFissExtPeau.append(edgesPeauFis[0])
+            name="edgesFissExtPeau%d"%j
+            geompy.addToStudyInFather(partitionPeauFissFond, edgesPeauFis[0], name)
+            j += 1
+     
+      # -----------------------------------------------------------------------
+      # --- identification faces de peau : face de peau percée du pipe, extrémités du pipe
+      #     La partition avec le pipe peut créer un vertex (et un edge) de trop sur le cercle projeté,
+      #     quand le cercle est très proche de la face.
+      #     dans ce cas, la projection du cercle sur la face suivie d'une partition permet
+      #     d'éviter le point en trop
+      
+      facesAndFond = facesOnside
+      facesAndFond.append(wireFondFiss)
+      try:
+        partitionPeauByPipe = geompy.MakePartition(facesAndFond, pipexts, [], [], geompy.ShapeType["FACE"], 0, [], 1)
+      except:
+        logging.debug("probleme partition face pipe, contournement avec MakeSection")
+        sections = []
+        for pipext in pipexts:
+          sections.append(geompy.MakeSection(facesOnside[0], pipext))
+        partitionPeauByPipe = geompy.MakePartition(facesAndFond, sections, [], [], geompy.ShapeType["FACE"], 0, [], 1)
+        
+      # contrôle edge en trop sur edges circulaires
+      if len(verticesPipePeau) > 0: # --- au moins une extrémité du pipe sur cette face de peau
+        edgeEnTrop = []
+        outilPart = pipexts
+        facesPeau = geompy.ExtractShapes(partitionPeauByPipe, geompy.ShapeType["FACE"], False)
+        facesPeauSorted, minsur, maxsurf = sortFaces(facesPeau)
+        for i, face in enumerate(facesPeauSorted[:-1]): # on ne teste que la ou les petites faces "circulaires"
+          nbv = geompy.NumberOfEdges(face)
+          logging.debug("nombre d'edges sur face circulaire: %s", nbv)
+          if nbv > 3:
+            edgeEnTrop.append(True) # TODO : distinguer les cas avec deux faces circulaires dont l'une est correcte
+          else:
+            edgeEnTrop.append(False)
+        refaire = sum(edgeEnTrop)
+        if refaire > 0:
+          dc = [(geompy.MinDistance(verticesEdgesFondIn[0], fac), i)  for i, fac in enumerate(facesPeauSorted[:-1])]
+          dc.sort()
+          logging.debug("dc sorted: %s", dc)
+          i0 = dc[0][1] # indice de facesPeauSorted qui correspond à verticesEdgesFondIn[0], donc 0 pour cercles
+          direct = (i0 == 0)
+          for i, bad in enumerate(edgeEnTrop):
+            if direct:
+              j = i
+            else:
+              j = 1-i
+            if bad:
+              outilPart[j] = geompy.MakeProjection(cercles[j],facesOnside[0])
+            pass
+          partitionPeauByPipe = geompy.MakePartition(facesAndFond, outilPart, [], [], geompy.ShapeType["FACE"], 0, [], 1)
+          pass
+          
+      name="partitionPeauByPipe%d"%ifil
+      geompy.addToStudy(partitionPeauByPipe, name)
+      [edgesPeauFondIn, edgesPeauFondOut, edgesPeauFondOn] = extractionOrientee(fillingFaceExterne, partitionPeauByPipe, centreFondFiss, "EDGE", 1.e-3)
+      [facesPeauFondIn, facesPeauFondOut, facesPeauFondOn] = extractionOrientee(fillingFaceExterne, partitionPeauByPipe, centreFondFiss, "FACE", 1.e-3)
+        
+      if len(verticesPipePeau) > 0: # --- au moins une extrémité du pipe sur cette face de peau
+        facesPeauSorted, minsur, maxsurf = sortFaces(facesPeauFondOn)
+        facePeau = facesPeauSorted[-1] # la plus grande face
+      else:
+        facePeau =geompy.MakePartition(facesPeauFondOn, [], [], [], geompy.ShapeType["FACE"], 0, [], 1)
+      name="facePeau%d"%ifil
+      geompy.addToStudy(facePeau, name)
+      
+      facesPipePeau = [None for i in range(len(edgesFissExtPipe))]
+      endsEdgeFond = [None for i in range(len(edgesFissExtPipe))]
+      edgeRadFacePipePeau = [None for i in range(len(edgesFissExtPipe))]
+      
+      edgesListees = []
+      edgesCircPeau = []
+      verticesCircPeau = []
+      if len(verticesPipePeau) > 0: # --- au moins une extrémité du pipe sur cette face de peau
+        
+        for face in facesPeauSorted[:-1]: # la ou les faces débouchantes, pas la grande face de peau
+          logging.debug("examen face debouchante circulaire")
+          for i,efep in enumerate(edgesFissExtPipe):
+            dist = geompy.MinDistance(face, efep)
+            logging.debug("  distance face circulaire edge %s", dist)
+            if dist < 1e-3:
+              for ik, edpfi in enumerate(edgesPeauFondIn):
+                if geompy.MinDistance(face, edpfi) < 1e-3:
+                  break
+              sharedVertices = geompy.GetSharedShapesMulti([face, edgesPeauFondIn[ik]], geompy.ShapeType["VERTEX"])
+              nameFace = "facePipePeau%d"%i
+              nameVert = "endEdgeFond%d"%i
+              nameEdge = "edgeRadFacePipePeau%d"%i
+              facesPipePeau[i] = face
+              endsEdgeFond[i] = sharedVertices[0]
+              geompy.addToStudy(face, nameFace)
+              geompy.addToStudy(sharedVertices[0], nameVert)
+              edgesFace = geompy.ExtractShapes(face, geompy.ShapeType["EDGE"], True)
+              for edge in edgesFace:
+                if geompy.MinDistance(edge, sharedVertices[0]) < 1e-3:
+                  edgeRadFacePipePeau[i] = edge
+                  geompy.addToStudy(edge, nameEdge)
+                  break
+                pass
+              pass
+            pass
+          pass
+        
+        # --- edges circulaires de la face de peau et points de jonction de la face externe de fissure
+        logging.debug("facesPipePeau: %s", facesPipePeau)
+        edgesCircPeau = [None for i in range(len(facesPipePeau))]
+        verticesCircPeau = [None for i in range(len(facesPipePeau))]        
+        for i,fcirc in enumerate(facesPipePeau):
+          edges = geompy.GetSharedShapesMulti([facePeau, fcirc], geompy.ShapeType["EDGE"])
+          grpEdgesCirc = geompy.CreateGroup(facePeau, geompy.ShapeType["EDGE"])
+          geompy.UnionList(grpEdgesCirc, edges)
+          edgesCircPeau[i] = grpEdgesCirc
+          name = "edgeCirc%d"%i
+          geompy.addToStudyInFather(facePeau, grpEdgesCirc, name)
+          edgesListees = edgesListees + edges
+          vertices = geompy.GetSharedShapesMulti([facePeau, fcirc], geompy.ShapeType["VERTEX"])
+          grpVertCircPeau = geompy.CreateGroup(facePeau, geompy.ShapeType["VERTEX"])
+          geompy.UnionList(grpVertCircPeau, vertices)
+          verticesCircPeau[i] = grpVertCircPeau
+          name = "pointEdgeCirc%d"%i
+          geompy.addToStudyInFather(facePeau, grpVertCircPeau, name)
+          pass
+        pass # --- au moins une extrémité du pipe sur cette face de peau
+
+      # --- edges de bord de la face de peau
+
+      edgesFilling = geompy.ExtractShapes(fillingFaceExterne, geompy.ShapeType["EDGE"], False)
+      edgesBords = []
+      for i, edge in enumerate(edgesFilling):
+        edgepeau = geompy.GetInPlace(facePeau, edge)
+        name = "edgepeau%d"%i
+        geompy.addToStudyInFather(facePeau,edgepeau, name)
+        logging.debug("edgepeau %s", geompy.ShapeInfo(edgepeau))
+        if geompy.ShapeInfo(edgepeau)['EDGE'] > 1:
+          logging.debug("  EDGES multiples")
+          edgs = geompy.ExtractShapes(edgepeau, geompy.ShapeType["EDGE"], False)
+          edgesBords += edgs
+          edgesListees += edgs
+        else:
+          logging.debug("  EDGE")
+          edgesBords.append(edgepeau)
+          edgesListees.append(edgepeau)
+      groupEdgesBordPeau = geompy.CreateGroup(facePeau, geompy.ShapeType["EDGE"])
+      geompy.UnionList(groupEdgesBordPeau, edgesBords)
+      bordsVifs = None
+      if aretesVivesC is not None:
+        bordsVifs = geompy.GetInPlace(facePeau, aretesVivesC)
+      if bordsVifs is not None:
+        geompy.addToStudyInFather(facePeau, bordsVifs, "bordsVifs")
+        groupEdgesBordPeau = geompy.CutGroups(groupEdgesBordPeau, bordsVifs)
+        grptmp = None
+        if len(aretesVivesCoupees) > 0:
+          grpC = geompy.MakeCompound(aretesVivesCoupees)
+          grptmp = geompy.GetInPlace(facePeau, grpC)
+        if grptmp is not None:
+          grpnew = geompy.CutGroups(bordsVifs, grptmp) # ce qui est nouveau dans bordsVifs
+        else:
+          grpnew = bordsVifs
+        if grpnew is not None:
+          edv = geompy.ExtractShapes(grpnew, geompy.ShapeType["EDGE"], False)
+          aretesVivesCoupees += edv
+      logging.debug("aretesVivesCoupees %s",aretesVivesCoupees)
+      geompy.addToStudyInFather(facePeau, groupEdgesBordPeau , "EdgesBords")
+        
+      # ---  edges de la face de peau partagées avec la face de fissure
+      
+      edgesPeau = geompy.ExtractShapes(facePeau, geompy.ShapeType["EDGE"], False)
+      edges = substractSubShapes(facePeau, edgesPeau, edgesListees)
+      edgesFissurePeau = []
+      if len(verticesPipePeau) > 0: # --- au moins une extrémité du pipe sur cette face de peau
+        edgesFissurePeau = [None for i in range(len(verticesCircPeau))] # edges associés aux extrémités du pipe, en premier
+        for edge in edges:
+          for i, grpVert in enumerate(verticesCircPeau):
+            if (geompy.MinDistance(grpVert, edge) < 1.e-3) and (edge not in edgesFissurePeau):
+              edgesFissurePeau[i] = edge
+              name = "edgeFissurePeau%d"%i
+              geompy.addToStudyInFather(facePeau,  edge, name)
+        for edge in edges: # on ajoute après les edges manquantes
+          if edge not in edgesFissurePeau:
+            edgesFissurePeau.append(edge)
+      else:
+        for i, edge in enumerate(edges):
+          edgesFissurePeau.append(edge)
+          name = "edgeFissurePeau%d"%i
+          geompy.addToStudyInFather(facePeau,  edge, name)
+        
+
+      ptEdgeFond[ifil] = endsEdgeFond        # pour chaque face [points edge fond de fissure aux débouchés du pipe]
+      fsPipePeau[ifil] = facesPipePeau       # pour chaque face [faces du pipe débouchantes]
+      edRadFPiPo[ifil] = edgeRadFacePipePeau # pour chaque face [edge radiale des faces du pipe débouchantes ]
+      fsFissuExt[ifil] = facesFissExt        # pour chaque face [faces de fissure externes au pipe]
+      edFisExtPe[ifil] = edgesFissExtPeau    # pour chaque face [edge en peau des faces de fissure externes (pas subshape facePeau)]
+      edFisExtPi[ifil] = edgesFissExtPipe    # pour chaque face [edge commun au pipe des faces de fissure externes]
+      facesPeaux[ifil] = facePeau            # pour chaque face : la face de peau finale a mailler (percee des faces débouchantes)
+      edCircPeau[ifil] = edgesCircPeau       # pour chaque face de peau : [groupe subshapes edges circulaires aux débouchés du pipe]
+      ptCircPeau[ifil] = verticesCircPeau    # pour chaque face de peau : [groupe subshapes points sur edges circulaires aux débouchés du pipe]
+      gpedgeBord[ifil] = groupEdgesBordPeau  # pour chaque face de peau : groupe subshape des edges aux bords liés à la partie saine
+      gpedgeVifs[ifil] = bordsVifs           # pour chaque face de peau : groupe subshape des edges aux bords correspondant à des arêtes vives
+      edFissPeau[ifil] = edgesFissurePeau    # pour chaque face de peau : [subshape edge en peau des faces de fissure externes]
+      ptFisExtPi[ifil] = verticesPipePeau    # pour chaque face de peau : [point commun edFissPeau edCircPeau]
+
+  # -----------------------------------------------------------------------
+  # fin de la boucle sur les faces de filling
+  # -----------------------------------------------------------------------
+  
+  for i, avc in enumerate(aretesVivesCoupees):
+    name = "areteViveCoupee%d"%i
+    geompy.addToStudy(avc, name)
+  
+  # --- identification des faces et edges de fissure externe pour maillage
+  
+  facesFissExt = []
+  edgesFissExtPeau = []
+  edgesFissExtPipe = []
+  for ifil in range(nbFacesFilling): # TODO: éliminer les doublons (comparer tous les vertices triés, avec mesure de distance ?)
+    facesFissExt += fsFissuExt[ifil]
+    edgesFissExtPeau += edFisExtPe[ifil]
+    edgesFissExtPipe += edFisExtPi[ifil]
+  logging.debug("---------------------------- identification faces de fissure externes au pipe :%s ", len(facesFissExt))
+  # regroupement des faces de fissure externes au pipe.
+  
+  if len(facesFissExt) > 1:
+    faceFissureExterne = geompy.MakePartition(facesFissExt, [], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+    edgesPipeFissureExterneC = geompy.GetInPlace(faceFissureExterne, geompy.MakeCompound(edgesPipeFiss))    # edgesFissExtPipe peut ne pas couvrir toute la longueur
+    # edgesPeauFissureExterneC = geompy.GetInPlace(faceFissureExterne, geompy.MakeCompound(edgesFissExtPeau))
+    # il peut manquer des edges de faceFissureExterne en contact avec la peau dans edgesFissExtPeau
+    (isDone, closedFreeBoundaries, openFreeBoundaries) = geompy.GetFreeBoundary(faceFissureExterne)
+    edgesBordFFE = []
+    for bound in closedFreeBoundaries:
+      edgesBordFFE += geompy.ExtractShapes(bound, geompy.ShapeType["EDGE"], False)
+    edgesBordFFEid = [ (ed,geompy.GetSubShapeID(faceFissureExterne, ed)) for ed in edgesBordFFE]
+    logging.debug("edgesBordFFEid %s", edgesBordFFEid)
+    edgesPPE = geompy.ExtractShapes(edgesPipeFissureExterneC, geompy.ShapeType["EDGE"], False)
+    edgesPPEid = [ geompy.GetSubShapeID(faceFissureExterne, ed) for ed in edgesPPE]
+    logging.debug("edgesPPEid %s", edgesPPEid)
+    edgesPFE = [ edid[0] for edid in edgesBordFFEid if edid[1] not in edgesPPEid] # on garde toutes les edges de bord non en contact avec le pipe
+    logging.debug("edgesPFE %s", edgesPFE)
+    edgesPeauFissureExterneC = geompy.MakeCompound(edgesPFE)
+  else:
+    faceFissureExterne = facesFissExt[0]
+    edgesPeauFissureExterneC = geompy.MakeCompound(edgesFissExtPeau)
+    edgesPipeFissureExterneC = geompy.MakeCompound(edgesFissExtPipe)
+  wirePipeFissureExterne = geompy.MakeWire(geompy.ExtractShapes(edgesPipeFissureExterneC, geompy.ShapeType["EDGE"], False))
+  geompy.addToStudy(faceFissureExterne, "faceFissureExterne")
+  geompy.addToStudyInFather(faceFissureExterne, edgesPeauFissureExterneC, "edgesPeauFissureExterne")
+  geompy.addToStudyInFather(faceFissureExterne, edgesPipeFissureExterneC, "edgesPipeFissureExterne")
+  
+  logging.debug("---------------------------- Preparation Maillage du Pipe --------------")
+  # -----------------------------------------------------------------------
+  # --- preparation maillage du pipe :
+  #     - détections des points a respecter : jonction des edges/faces constituant
+  #       la face de fissure externe au pipe
+  #     - points sur les edges de fond de fissure et edges pipe/face fissure,
+  #     - vecteurs tangents au fond de fissure (normal au disque maillé)
+
+  # --- option de maillage selon le rayon de courbure du fond de fissure 
+  lenEdgeFondExt = 0
+  for edff in edgesFondFiss:
+    lenEdgeFondExt += geompy.BasicProperties(edff)[0]
+  
+  disfond = []
+  for filling in facesDefaut:
+    disfond.append(geompy.MinDistance(centreFondFiss, filling))
+  disfond.sort()
+  rcourb = disfond[0]
+  nbSegQuart = 5 # on veut 5 segments min sur un quart de cercle
+  alpha = math.pi/(4*nbSegQuart)
+  deflexion = rcourb*(1.0 -math.cos(alpha))
+  lgmin = lenSegPipe*0.25
+  lgmax = lenSegPipe*1.5               
+  logging.debug("rcourb: %s, lenFond:%s, deflexion: %s, lgmin: %s, lgmax: %s", rcourb, lenEdgeFondExt, deflexion, lgmin, lgmax)  
+
+  meshFondExt = smesh.Mesh(wireFondFiss)
+  algo1d = meshFondExt.Segment()
+  hypo1d = algo1d.Adaptive(lgmin, lgmax, deflexion) # a ajuster selon la profondeur de la fissure
+  isDone = meshFondExt.Compute()
+  
+  ptGSdic = {} # dictionnaire [paramètre sur la courbe] --> point géométrique
+  allNodeIds = meshFondExt.GetNodesId()
+  for nodeId in allNodeIds:
+    xyz = meshFondExt.GetNodeXYZ(nodeId)
+    #logging.debug("nodeId %s, coords %s", nodeId, str(xyz))
+    pt = geompy.MakeVertex(xyz[0], xyz[1], xyz[2])
+    u, PointOnEdge, EdgeInWireIndex = geompy.MakeProjectionOnWire(pt, wireFondFiss) # u compris entre 0 et 1
+    edgeOrder = edgesIdByOrientation[EdgeInWireIndex]
+    ptGSdic[(edgeOrder, EdgeInWireIndex, u)] = pt
+    #logging.debug("nodeId %s, u %s", nodeId, str(u))
+  usort = sorted(ptGSdic)  
+  logging.debug("nombre de points obtenus par deflexion %s",len(usort))
+     
+  centres = []
+  origins = []
+  normals = []      
+  for edu in usort:
+    ied = edu[1]
+    u = edu[2]
+    vertcx = ptGSdic[edu]
+    norm = geompy.MakeTangentOnCurve(edgesFondFiss[ied], u)
+    plan = geompy.MakePlane(vertcx, norm, 3*rayonPipe)
+    part = geompy.MakePartition([plan], [wirePipeFiss], [], [], geompy.ShapeType["VERTEX"], 0, [], 0)
+    liste = geompy.ExtractShapes(part, geompy.ShapeType["VERTEX"], True)
+    if len(liste) == 5: # 4 coins du plan plus intersection recherchée
+      for point in liste:
+        if geompy.MinDistance(point, vertcx) < 1.1*rayonPipe: # les quatre coins sont plus loin
+          vertpx = point
+          break
+      centres.append(vertcx)
+      origins.append(vertpx)
+      normals.append(norm)
+#      name = "vertcx%d"%i
+#      geompy.addToStudyInFather(wireFondFiss, vertcx, name)
+#      name = "vertpx%d"%i
+#      geompy.addToStudyInFather(wireFondFiss, vertpx, name)
+#      name = "plan%d"%i
+#      geompy.addToStudyInFather(wireFondFiss, plan, name)
+
+  # --- maillage du pipe étendu, sans tenir compte de l'intersection avec la face de peau
+      
+  logging.debug("nbsegCercle %s", nbsegCercle)
+  
+  # -----------------------------------------------------------------------
+  # --- points géométriques
+  
+  gptsdisks = [] # vertices géométrie de tous les disques
+  raydisks = [[] for i in range(nbsegCercle)]
+  for i in range(len(centres)): # boucle sur les disques
+    gptdsk = [] # vertices géométrie d'un disque
+    vertcx = centres[i]
+    vertpx = origins[i]
+    normal = normals[i]
+    vec1 = geompy.MakeVector(vertcx, vertpx)
+    
+    points = [vertcx] # les points du rayon de référence
+    for j in range(nbsegRad):
+      pt = geompy.MakeTranslationVectorDistance(vertcx, vec1, (j+1)*float(rayonPipe)/nbsegRad)
+      points.append(pt)
+    gptdsk.append(points)
+    pt = geompy.MakeTranslationVectorDistance(vertcx, vec1, 1.5*rayonPipe)
+    rayon = geompy.MakeLineTwoPnt(vertcx, pt)
+    raydisks[0].append(rayon)
+    
+    for k in range(nbsegCercle-1):
+      angle = (k+1)*2*math.pi/nbsegCercle
+      pts = [vertcx] # les points d'un rayon obtenu par rotation
+      for j in range(nbsegRad):
+        pt = geompy.MakeRotation(points[j+1], normal, angle)
+        pts.append(pt)
+      gptdsk.append(pts)
+      ray = geompy.MakeRotation(rayon, normal, angle)
+      raydisks[k+1].append(ray)
+      
+    gptsdisks.append(gptdsk) 
+  # -----------------------------------------------------------------------
+  # --- recherche des points en trop (externes au volume à remailler)
+  #     - on associe chaque extrémité du pipe à une face filling 
+  #     - on part des disques aux extrémités du pipe
+  #     - pour chaque disque, on prend les vertices de géométrie,
+  #       on marque leur position relative à la face.
+  #     - on s'arrete quand tous les noeuds sont dedans
+  
+  logging.debug("---------------------------- recherche des points du pipe a éliminer --------------")
+
+  pt0 = centres[0]
+  pt1 = centres[-1]
+  idFillingFromBout = [None, None]                 # contiendra l'index du filling pour les extrémités 0 et 1
+  for ifil in range(nbFacesFilling):
+    for ipt, pt in enumerate(ptEdgeFond[ifil]): # il y a un ou deux points débouchant sur cette face
+      if geompy.MinDistance(pt,pt0) < geompy.MinDistance(pt,pt1): # TODO: trouver plus fiable pour les cas tordus...
+        idFillingFromBout[0] = ifil
+      else: 
+        idFillingFromBout[1] = ifil
+  logging.debug("association bouts du pipe - faces de filling: %s", idFillingFromBout)
+  
+  facesPipePeau = []
+  edgeRadFacePipePeau = []
+  for ifil in range(nbFacesFilling):
+    facesPipePeau += fsPipePeau[ifil]
+    edgeRadFacePipePeau += edRadFPiPo[ifil]
+    
+  logging.debug("recherche des disques de noeuds complètement internes")
+  idisklim = [] # indices des premier et dernier disques internes
+  idiskout = [] # indices des premier et dernier disques externes
+  for bout in range(2):
+    if bout == 0:
+      idisk = -1
+      inc = 1
+      numout = -1
+    else:
+      idisk = len(gptsdisks)
+      inc = -1
+      numout = len(gptsdisks)
+    inside = False
+    outside = True
+    while not inside:
+      idisk = idisk + inc
+      logging.debug("examen disque %s", idisk)
+      gptdsk = gptsdisks[idisk]
+      inside = True
+      for k in range(nbsegCercle):
+        points = gptdsk[k]
+        for j, pt in enumerate(points):
+          side = whichSideVertex(facesDefaut[idFillingFromBout[bout]], pt)
+          if side < 0:
+            if outside: # premier point detecté dedans
+              outside = False
+              numout = idisk -inc # le disque précédent était dehors
+          else:
+            inside = False # ce point est dehors              
+        if not inside and not outside:
+          break
+    idisklim.append(idisk)  # premier et dernier disques internes
+    idiskout.append(numout) # premier et dernier disques externes
+    
+  # --- listes de nappes radiales en filling à chaque extrémité débouchante
+  facesDebouchantes = [False, False]
+  idFacesDebouchantes = [-1, -1] # contiendra les indices des faces disque débouchantes (facesPipePeau)
+  listNappes =[]
+  for i, idisk in enumerate(idisklim):
+    numout = idiskout[i]
+    logging.debug("extremité %s, indices disques interne %s, externe %s",i, idisk, numout)
+    nappes = []
+    if  (idisk != 0) and (idisk != len(gptsdisks)-1): # si extrémité débouchante
+      for k in range(nbsegCercle):
+        if i == 0:
+          iddeb = max(0, numout)
+          idfin = max(iddeb+3,idisk+1) # il faut 3 rayons pour faire un filling qui suive le fond de fissure
+          #logging.debug("extremité %s, indices retenus interne %s, externe %s",i, idfin, iddeb)
+          comp = geompy.MakeCompound(raydisks[k][iddeb:idfin])
+          name='compoundRay%d'%k
+          geompy.addToStudy(comp, name)
+        else:
+          idfin = min(len(gptsdisks), numout+1)
+          iddeb = min(idfin-3, idisk) # il faut 3 rayons pour faire un filling qui suive le fond de fissure
+          #logging.debug("extremité %s, indices retenus interne %s, externe %s",i, idfin, iddeb)
+          comp = geompy.MakeCompound(raydisks[k][iddeb:idfin])
+          name='compoundRay%d'%k
+          geompy.addToStudy(comp, name)
+        nappe = geompy.MakeFilling(comp, 2, 5, 0.0001, 0.0001, 0, GEOM.FOM_Default)
+        nappes.append(nappe)
+        name='nappe%d'%k
+        geompy.addToStudy(nappe, name)
+        facesDebouchantes[i] = True
+    listNappes.append(nappes)
+      
+  # --- mise en correspondance avec les indices des faces disque débouchantes (facesPipePeau)
+  for i, nappes in enumerate(listNappes):
+    if facesDebouchantes[i]:
+      for k, face in enumerate(facesPipePeau):
+        edge = geompy.MakeSection(face, nappes[0])
+        if geompy.NbShapes(edge, geompy.ShapeType["EDGE"]) > 0:
+          idFacesDebouchantes[i] = k
+          break
+  logging.debug("idFacesDebouchantes: %s", idFacesDebouchantes)
+
+  # --- construction des listes d'edges radiales sur chaque extrémité débouchante
+  listEdges = []
+  for i, nappes in enumerate(listNappes):
+    id = idFacesDebouchantes[i] # indice de face débouchante (facesPipePeau)
+    if id < 0:
+      listEdges.append([])
+    else:
+      face = facesPipePeau[id]
+      edges = [edgeRadFacePipePeau[id]]
+      for k, nappe in enumerate(nappes):
+        if k > 0:
+          obj = geompy.MakeSection(face, nappes[k]) # normalement une edge, parfois un compound d'edges dont un tout petit
+          edge = obj
+          vs = geompy.ExtractShapes(obj, geompy.ShapeType["VERTEX"], False)
+          if len(vs) > 2:
+            eds = geompy.ExtractShapes(obj, geompy.ShapeType["EDGE"], False)
+            [edsorted, minl,maxl] = sortEdges(eds)
+            edge = edsorted[-1]
+          else:
+            maxl = geompy.BasicProperties(edge)[0]
+          if maxl < 0.01: # problème MakeSection
+            logging.debug("problème MakeSection recherche edge radiale %s, longueur trop faible: %s, utilisation partition", k, maxl)
+            partNappeFace = geompy.MakePartition([face, nappes[k]], [] , [], [], geompy.ShapeType["FACE"], 0, [], 0)
+            edps= geompy.ExtractShapes(partNappeFace, geompy.ShapeType["EDGE"], False)
+            ednouv = []
+            for ii, ed in enumerate(edps):
+              vxs = geompy.ExtractShapes(ed, geompy.ShapeType["VERTEX"], False)
+              distx = [geompy.MinDistance(vx, face) for vx in vxs]
+              distx += [geompy.MinDistance(vx, nappes[k]) for vx in vxs]
+              dmax = max(distx)
+              logging.debug("  dmax %s",dmax)
+              if dmax < 0.01:
+                ednouv.append(ed)
+            logging.debug("  edges issues de la partition: %s", ednouv)
+            for ii, ed in enumerate(ednouv):
+              geompy.addToStudy(ed, "ednouv%d"%ii)
+            [edsorted, minl,maxl] = sortEdges(ednouv)
+            logging.debug("  longueur edge trouvée: %s", maxl) 
+            edge = edsorted[-1]
+          edges.append(edge)
+          name = 'edgeEndPipe%d'%k
+          geompy.addToStudy(edge, name)
+      listEdges.append(edges)
+
+  # --- création des points du maillage du pipe sur la face de peau
+  for i, edges in enumerate(listEdges):
+    id = idFacesDebouchantes[i] # indice de face débouchante (facesPipePeau)
+    if id >= 0:
+      gptdsk = []
+      if id > 0: # id vaut 0 ou 1
+        id = -1  # si id vaut 1, on prend le dernier élément de la liste (1 ou 2 extrémités débouchent sur la face)
+      centre = ptEdgeFond[idFillingFromBout[i]][id]
+      name = "centre%d"%id
+      geompy.addToStudy(centre, name)
+      vertPipePeau = ptFisExtPi[idFillingFromBout[i]][id]
+      geompy.addToStudyInFather(centre, vertPipePeau, "vertPipePeau")
+      grpsEdgesCirc = edCircPeau[idFillingFromBout[i]] # liste de groupes
+      edgesCirc = []
+      for grpEdgesCirc in grpsEdgesCirc:
+        edgesCirc += geompy.ExtractShapes(grpEdgesCirc, geompy.ShapeType["EDGE"], False)
+      for k, edge in enumerate(edges):
+        extrems = geompy.ExtractShapes(edge, geompy.ShapeType["VERTEX"], True)
+        if geompy.MinDistance(centre, extrems[0]) < geompy.MinDistance(centre, extrems[1]):
+          bout = extrems[1]
+        else:
+          bout = extrems[0]
+        # ajustement du point extrémité (bout) sur l'edge circulaire en face de peau
+        logging.debug("edgesCirc: %s", edgesCirc)
+        distEdgeCirc = [(geompy.MinDistance(bout, edgeCirc), k2, edgeCirc) for k2, edgeCirc in enumerate(edgesCirc)]
+        distEdgeCirc.sort()
+        logging.debug("distEdgeCirc: %s", distEdgeCirc)
+        u = projettePointSurCourbe(bout, distEdgeCirc[0][2])
+        if (abs(u) < 0.02) or (abs(1-u) < 0.02): # les points très proches d'une extrémité doivent y être mis précisément.
+          extrCircs = geompy.ExtractShapes(distEdgeCirc[0][2], geompy.ShapeType["VERTEX"], True)
+          if geompy.MinDistance(bout, extrCircs[0]) < geompy.MinDistance(bout, extrCircs[1]):
+            bout = extrCircs[0]
+          else:
+            bout = extrCircs[1]
+          pass
+        else:
+          bout = geompy.MakeVertexOnCurve(distEdgeCirc[0][2], u)
+        name ="bout%d"%k
+        geompy.addToStudyInFather(centre, bout, name)
+        # enregistrement des points dans la structure
+        points = []
+        for j in range(nbsegRad +1):
+          u = j/float(nbsegRad)
+          points.append(geompy.MakeVertexOnCurve(edge, u))
+        if geompy.MinDistance(bout, points[0]) < geompy.MinDistance(centre, points[0]):
+          points.reverse()
+        points[0] = centre
+        points[-1] = bout
+        gptdsk.append(points)
+      if i == 0:
+        gptsdisks[idisklim[0] -1] = gptdsk
+        idisklim[0] = idisklim[0] -1
+      else:
+        gptsdisks[idisklim[1] +1] = gptdsk
+        idisklim[1] = idisklim[1] +1
+
+  # --- ajustement precis des points sur edgesPipeFissureExterneC
+  
+  edgesPFE = geompy.ExtractShapes(edgesPipeFissureExterneC, geompy.ShapeType["EDGE"], False)
+  verticesPFE = findWireIntermediateVertices(wirePipeFissureExterne)  # vertices intermédiaires (des points en trop dans ptsInWireFissExtPipe)
+  idiskmin = idisklim[0] + 1 # on ne prend pas le disque sur la peau, déjà ajusté
+  idiskmax = idisklim[1]     # on ne prend pas le disque sur la peau, déjà ajusté
+  idiskint = []
+  for vtx in verticesPFE:
+    distPtVt = []
+    for idisk in range(idiskmin, idiskmax):
+      gptdsk = gptsdisks[idisk]
+      pt = gptdsk[0][-1]       # le point sur l'edge de la fissure externe au pipe
+      distPtVt.append((geompy.MinDistance(pt, vtx), idisk))
+    distPtVt.sort()
+    idiskint.append(distPtVt[0][1])
+    gptsdisks[idiskint[-1]][0][-1] = vtx
+    logging.debug("ajustement point sur edgePipeFissureExterne, vertex: %s %s", idiskint[-1], distPtVt[0][0])
+  for idisk in range(idiskmin, idiskmax):
+    if idisk in idiskint:
+      break
+    logging.debug("ajustement point sur edgePipeFissureExterne: %s", idisk)
+    gptdsk = gptsdisks[idisk]
+    pt = gptdsk[0][-1]       # le point sur l'edge de la fissure externe au pipe
+    distPtEd = [(geompy.MinDistance(pt, edgePFE), k, edgePFE) for k, edgePFE in enumerate(edgesPFE)]
+    distPtEd.sort()
+    edgePFE = distPtEd[0][2]
+    u = projettePointSurCourbe(pt, edgePFE)
+    ptproj = geompy.MakeVertexOnCurve(edgePFE, u)
+    gptsdisks[idisk][0][-1] = ptproj
+  
+  # -----------------------------------------------------------------------
+  # --- maillage effectif du pipe
+
+  logging.debug("---------------------------- maillage effectif du pipe --------------")
+  meshPipe = smesh.Mesh(None, "meshPipe")
+  fondFissGroup = meshPipe.CreateEmptyGroup(SMESH.EDGE, "FONDFISS")
+  nodesFondFissGroup = meshPipe.CreateEmptyGroup(SMESH.NODE, "nfondfis")
+  faceFissGroup = meshPipe.CreateEmptyGroup(SMESH.FACE, "fisInPi")
+  edgeFaceFissGroup = meshPipe.CreateEmptyGroup(SMESH.EDGE, "edgeFaceFiss")
+  edgeCircPipe0Group = meshPipe.CreateEmptyGroup(SMESH.EDGE, "edgeCircPipe0")
+  edgeCircPipe1Group = meshPipe.CreateEmptyGroup(SMESH.EDGE, "edgeCircPipe1")
+  faceCircPipe0Group = meshPipe.CreateEmptyGroup(SMESH.FACE, "faceCircPipe0")
+  faceCircPipe1Group = meshPipe.CreateEmptyGroup(SMESH.FACE, "faceCircPipe1")
+  mptsdisks = []  # vertices maillage de tous les disques
+  mEdges = []     # identifiants edges maillage fond de fissure
+  mEdgeFaces = [] # identifiants edges maillage edge face de fissure externe
+  mFaces = []     # identifiants faces maillage fissure
+  mVols  = []     # identifiants volumes maillage pipe
+
+  mptdsk = None
+  for idisk in range(idisklim[0], idisklim[1]+1): # boucle sur les disques internes
+    
+    # -----------------------------------------------------------------------
+    # --- points
+    
+    gptdsk = gptsdisks[idisk]
+    if idisk > idisklim[0]:
+      oldmpts = mptdsk
+    mptdsk = [] # vertices maillage d'un disque
+    for k in range(nbsegCercle):
+      points = gptdsk[k]
+      mptids = []
+      for j, pt in enumerate(points):
+        if j == 0 and k > 0:
+          id = mptdsk[0][0]
+        else:
+          coords = geompy.PointCoordinates(pt)
+          id = meshPipe.AddNode(coords[0], coords[1], coords[2])
+        mptids.append(id)
+      mptdsk.append(mptids)
+    mptsdisks.append(mptdsk)
+    
+    # -----------------------------------------------------------------------
+    # --- groupes edges cercles debouchants
+    
+    if idisk == idisklim[0]:
+      pts = []
+      for k in range(nbsegCercle):
+        pts.append(mptdsk[k][-1])
+      edges = []
+      for k in range(len(pts)):
+        k1 = (k+1)%len(pts)
+        idEdge = meshPipe.AddEdge([pts[k], pts[k1]])
+        edges.append(idEdge)
+      edgeCircPipe0Group.Add(edges)
+       
+    if idisk == idisklim[1]:
+      pts = []
+      for k in range(nbsegCercle):
+        pts.append(mptdsk[k][-1])
+      edges = []
+      for k in range(len(pts)):
+        k1 = (k+1)%len(pts)
+        idEdge = meshPipe.AddEdge([pts[k], pts[k1]])
+        edges.append(idEdge)
+      edgeCircPipe1Group.Add(edges)
+    
+    # -----------------------------------------------------------------------
+    # --- groupes faces  debouchantes
+    
+    if idisk == idisklim[0]:
+      faces = []
+      for j in range(nbsegRad):
+        for k in range(nbsegCercle):
+          k1 = k+1
+          if k ==  nbsegCercle-1:
+            k1 = 0
+          if j == 0:
+            idf = meshPipe.AddFace([mptdsk[k][0], mptdsk[k][1], mptdsk[k1][1]]) # triangle
+          else:
+            idf = meshPipe.AddFace([mptdsk[k][j], mptdsk[k][j+1], mptdsk[k1][j+1], mptdsk[k1][j]]) # quadrangle
+          faces.append(idf)
+      faceCircPipe0Group.Add(faces)
+
+    if idisk == idisklim[1]:
+      faces = []
+      for j in range(nbsegRad):
+        for k in range(nbsegCercle):
+          k1 = k+1
+          if k ==  nbsegCercle-1:
+            k1 = 0
+          if j == 0:
+            idf = meshPipe.AddFace([mptdsk[k][0], mptdsk[k][1], mptdsk[k1][1]]) # triangle
+          else:
+            idf = meshPipe.AddFace([mptdsk[k][j], mptdsk[k][j+1], mptdsk[k1][j+1], mptdsk[k1][j]]) # quadrangle
+          faces.append(idf)
+      faceCircPipe1Group.Add(faces)
+          
+    # -----------------------------------------------------------------------
+    # --- mailles volumiques, groupes noeuds et edges de fond de fissure, groupe de face de fissure
+    
+    if idisk == idisklim[0]:
+      mEdges.append(0)
+      mEdgeFaces.append(0)
+      mFaces.append([0])
+      mVols.append([[0]])
+      nodesFondFissGroup.Add([mptdsk[0][0]])
+    else:
+      ide = meshPipe.AddEdge([oldmpts[0][0], mptdsk[0][0]])
+      mEdges.append(ide)
+      fondFissGroup.Add([ide])
+      nodesFondFissGroup.Add([mptdsk[0][0]])
+      ide2 = meshPipe.AddEdge([oldmpts[0][-1], mptdsk[0][-1]])
+      mEdgeFaces.append(ide2)
+      edgeFaceFissGroup.Add([ide2])
+      idFaces = []
+      idVols = []
+      
+      for j in range(nbsegRad):
+        idf = meshPipe.AddFace([oldmpts[0][j], mptdsk[0][j], mptdsk[0][j+1], oldmpts[0][j+1]])
+        faceFissGroup.Add([idf])
+        idFaces.append(idf)
+        
+        idVolCercle = []
+        for k in range(nbsegCercle):
+          k1 = k+1
+          if k ==  nbsegCercle-1:
+            k1 = 0
+          if j == 0:
+            idv = meshPipe.AddVolume([mptdsk[k][j], mptdsk[k][j+1], mptdsk[k1][j+1],
+                                      oldmpts[k][j], oldmpts[k][j+1], oldmpts[k1][j+1]])
+          else:
+            idv = meshPipe.AddVolume([mptdsk[k][j], mptdsk[k][j+1], mptdsk[k1][j+1], mptdsk[k1][j],
+                                      oldmpts[k][j], oldmpts[k][j+1], oldmpts[k1][j+1], oldmpts[k1][j]])
+          idVolCercle.append(idv)
+        idVols.append(idVolCercle)  
+        
+      mFaces.append(idFaces)
+      mVols.append(idVols)
+
+  pipeFissGroup = meshPipe.CreateEmptyGroup( SMESH.VOLUME, 'PIPEFISS' )
+  nbAdd = pipeFissGroup.AddFrom( meshPipe.GetMesh() )
+
+  nb, new_mesh, new_group = meshPipe.MakeBoundaryElements(SMESH.BND_2DFROM3D, "pipeBoundaries")
+  edgesCircPipeGroup = [edgeCircPipe0Group, edgeCircPipe1Group]
+
+  # --- fin du maillage du pipe
+  # -----------------------------------------------------------------------
+  # --- edges de bord, faces défaut à respecter
+
+  aFilterManager = smesh.CreateFilterManager()
+  nbAdded, internalBoundary, _NoneGroup = internalBoundary.MakeBoundaryElements( SMESH.BND_1DFROM2D, '', '', 0, [  ])
+  criteres = []
+  unCritere = smesh.GetCriterion(SMESH.EDGE,SMESH.FT_FreeBorders,SMESH.FT_Undefined,0)
+  criteres.append(unCritere)
+  filtre = smesh.GetFilterFromCriteria(criteres)
+  bordsLibres = internalBoundary.MakeGroupByFilter( 'bords', filtre )
+  smesh.SetName(bordsLibres, 'bordsLibres')
+
+  # --- pour aider l'algo hexa-tetra à ne pas mettre de pyramides à l'exterieur des volumes repliés sur eux-mêmes
+  #     on désigne les faces de peau en quadrangles par le groupe "skinFaces"
+
+  skinFaces = internalBoundary.CreateEmptyGroup( SMESH.FACE, 'skinFaces' )
+  nbAdd = skinFaces.AddFrom( internalBoundary.GetMesh() )
+
+  # --- maillage des éventuelles arêtes vives entre faces reconstruites
+  
+  if len(aretesVivesCoupees) > 0:
+    aretesVivesC = geompy.MakeCompound(aretesVivesCoupees)
+    meshAretesVives = smesh.Mesh(aretesVivesC)
+    algo1d = meshAretesVives.Segment()
+    hypo1d = algo1d.LocalLength(dmoyen/3.0,[],1e-07)
+    putName(algo1d.GetSubMesh(), "aretesVives")
+    putName(algo1d, "algo1d_aretesVives")
+    putName(hypo1d, "hypo1d_aretesVives")
+    isDone = meshAretesVives.Compute()
+    logging.info("aretesVives fini")
+    grpAretesVives = meshAretesVives.CreateEmptyGroup( SMESH.EDGE, 'grpAretesVives' )
+    nbAdd = grpAretesVives.AddFrom( meshAretesVives.GetMesh() )
+
+  # -----------------------------------------------------------------------
+  # --- maillage faces de fissure
+  
+  logging.debug("---------------------------- maillage faces de fissure externes au pipe :%s --------------", len(facesFissExt))
+
+  meshFaceFiss = smesh.Mesh(faceFissureExterne)
+  algo2d = meshFaceFiss.Triangle(algo=smeshBuilder.NETGEN_1D2D)
+  hypo2d = algo2d.Parameters()
+  hypo2d.SetMaxSize( areteFaceFissure )
+  hypo2d.SetSecondOrder( 0 )
+  hypo2d.SetOptimize( 1 )
+  hypo2d.SetFineness( 2 )
+  hypo2d.SetMinSize( rayonPipe/float(nbsegRad) )
+  hypo2d.SetQuadAllowed( 0 )
+  putName(algo2d.GetSubMesh(), "faceFiss")
+  putName(algo2d, "algo2d_faceFiss")
+  putName(hypo2d, "hypo2d_faceFiss")
+  
+  algo1d = meshFaceFiss.UseExisting1DElements(geom=edgesPipeFissureExterneC)
+  hypo1d = algo1d.SourceEdges([ edgeFaceFissGroup ],0,0)
+  putName(algo1d.GetSubMesh(), "edgeFissPeau")
+  putName(algo1d, "algo1d_edgeFissPeau")
+  putName(hypo1d, "hypo1d_edgeFissPeau")
+  
+  isDone = meshFaceFiss.Compute()
+  logging.info("meshFaceFiss fini")
+
+  grpFaceFissureExterne = meshFaceFiss.GroupOnGeom(faceFissureExterne, "fisOutPi", SMESH.FACE)
+  grpEdgesPeauFissureExterne = meshFaceFiss.GroupOnGeom(edgesPeauFissureExterneC,'edgesPeauFissureExterne',SMESH.EDGE)
+  grpEdgesPipeFissureExterne = meshFaceFiss.GroupOnGeom(edgesPipeFissureExterneC,'edgesPipeFissureExterne',SMESH.EDGE)
+
+  # --- maillage faces de peau
+  
+  boutFromIfil = [None for i in range(nbFacesFilling)]
+  if idFillingFromBout[0] != idFillingFromBout[1]: # repérage des extremites du pipe quand elles débouchent sur des faces différentes
+    boutFromIfil[idFillingFromBout[0]] = 0
+    boutFromIfil[idFillingFromBout[1]] = 1
+  
+  logging.debug("---------------------------- maillage faces de peau --------------")
+  meshesFacesPeau = []
+  for ifil in range(nbFacesFilling):
+    meshFacePeau = None
+    if partitionsPeauFissFond[ifil] is None: # face de peau maillage sain intacte
+      
+      # --- edges de bord de la face de filling
+      filling = facesDefaut[ifil]
+      edgesFilling = geompy.ExtractShapes(filling, geompy.ShapeType["EDGE"], False)
+      groupEdgesBordPeau = geompy.CreateGroup(filling, geompy.ShapeType["EDGE"])
+      geompy.UnionList(groupEdgesBordPeau, edgesFilling)
+      geompy.addToStudyInFather(filling, groupEdgesBordPeau , "EdgesBords")
+      
+      meshFacePeau = smesh.Mesh(facesDefaut[ifil])
+      
+      algo1d = meshFacePeau.UseExisting1DElements(geom=groupEdgesBordPeau)
+      hypo1d = algo1d.SourceEdges([ bordsLibres ],0,0)
+      putName(algo1d.GetSubMesh(), "bordsLibres", ifil)
+      putName(algo1d, "algo1d_bordsLibres", ifil)
+      putName(hypo1d, "hypo1d_bordsLibres", ifil)
+      
+    else:
+      
+      facePeau           = facesPeaux[ifil] # pour chaque face : la face de peau finale a mailler (percée des faces débouchantes)
+      edgesCircPeau      = edCircPeau[ifil] # pour chaque face de peau : [subshape edge circulaire aux débouchés du pipe]
+      verticesCircPeau   = ptCircPeau[ifil] # pour chaque face de peau : [subshape point sur edge circulaire aux débouchés du pipe]
+      groupEdgesBordPeau = gpedgeBord[ifil] # pour chaque face de peau : groupe subshape des edges aux bords liés à la partie saine
+      bordsVifs          = gpedgeVifs[ifil] # pour chaque face de peau : groupe subshape des edges aux bords correspondant à des arêtes vives
+      edgesFissurePeau   = edFissPeau[ifil] # pour chaque face de peau : [subshape edge en peau des faces de fissure externes]
+
+      meshFacePeau = smesh.Mesh(facePeau)
+      
+      algo1d = meshFacePeau.UseExisting1DElements(geom=groupEdgesBordPeau)
+      hypo1d = algo1d.SourceEdges([ bordsLibres ],0,0)
+      putName(algo1d.GetSubMesh(), "bordsLibres", ifil)
+      putName(algo1d, "algo1d_bordsLibres", ifil)
+      putName(hypo1d, "hypo1d_bordsLibres", ifil)
+      
+      algo1d = meshFacePeau.UseExisting1DElements(geom=geompy.MakeCompound(edgesFissurePeau))
+      hypo1d = algo1d.SourceEdges([ grpEdgesPeauFissureExterne ],0,0)
+      putName(algo1d.GetSubMesh(), "edgePeauFiss", ifil)
+      putName(algo1d, "algo1d_edgePeauFiss", ifil)
+      putName(hypo1d, "hypo1d_edgePeauFiss", ifil)
+      
+      if bordsVifs is not None:
+        algo1d = meshFacePeau.UseExisting1DElements(geom=bordsVifs)
+        hypo1d = algo1d.SourceEdges([ grpAretesVives ],0,0)
+        putName(algo1d.GetSubMesh(), "bordsVifs", ifil)
+        putName(algo1d, "algo1d_bordsVifs", ifil)
+        putName(hypo1d, "hypo1d_bordsVifs", ifil)
+        
+      for i, edgeCirc in enumerate(edgesCircPeau):
+        if edgeCirc is not None:
+          algo1d = meshFacePeau.UseExisting1DElements(geom=edgeCirc)
+          if boutFromIfil[ifil] is None:
+            hypo1d = algo1d.SourceEdges([ edgesCircPipeGroup[i] ],0,0)
+          else:
+            hypo1d = algo1d.SourceEdges([ edgesCircPipeGroup[boutFromIfil[ifil]] ],0,0)
+          name = "cercle%d"%i
+          putName(algo1d.GetSubMesh(), name, ifil)
+          putName(algo1d, "algo1d_" + name, ifil)
+          putName(hypo1d, "hypo1d_" + name, ifil)
+   
+    algo2d = meshFacePeau.Triangle(algo=smeshBuilder.NETGEN_1D2D)
+    hypo2d = algo2d.Parameters()
+    hypo2d.SetMaxSize( dmoyen )
+    hypo2d.SetOptimize( 1 )
+    hypo2d.SetFineness( 2 )
+    hypo2d.SetMinSize( rayonPipe/float(nbsegRad) )
+    hypo2d.SetQuadAllowed( 0 )
+    putName(algo2d.GetSubMesh(), "facePeau", ifil)
+    putName(algo2d, "algo2d_facePeau", ifil)
+    putName(hypo2d, "hypo2d_facePeau", ifil)
+      
+    isDone = meshFacePeau.Compute()
+    logging.info("meshFacePeau %d fini", ifil)
+    GroupFaces = meshFacePeau.CreateEmptyGroup( SMESH.FACE, "facePeau%d"%ifil )
+    nbAdd = GroupFaces.AddFrom( meshFacePeau.GetMesh() )
+    meshesFacesPeau.append(meshFacePeau)
+
+  # --- regroupement des maillages du défaut
+
+  listMeshes = [internalBoundary.GetMesh(),
+                meshPipe.GetMesh(),
+                meshFaceFiss.GetMesh()]
+  for mp in meshesFacesPeau:
+    listMeshes.append(mp.GetMesh())
+
+  meshBoiteDefaut = smesh.Concatenate(listMeshes, 1, 1, 1e-05,False)
+  # pour aider l'algo hexa-tetra à ne pas mettre de pyramides à l'exterieur des volumes repliés sur eux-mêmes
+  # on désigne les faces de peau en quadrangles par le groupe "skinFaces"
+  group_faceFissOutPipe = None
+  group_faceFissInPipe = None
+  groups = meshBoiteDefaut.GetGroups()
+  for grp in groups:
+    if grp.GetType() == SMESH.FACE:
+      #if "internalBoundary" in grp.GetName():
+      #  grp.SetName("skinFaces")
+      if grp.GetName() == "fisOutPi":
+        group_faceFissOutPipe = grp
+      elif grp.GetName() == "fisInPi":
+        group_faceFissInPipe = grp
+
+  # le maillage NETGEN ne passe pas toujours ==> utiliser GHS3D
+  distene=True
+  if distene:
+    algo3d = meshBoiteDefaut.Tetrahedron(algo=smeshBuilder.GHS3D)
+  else:
+    algo3d = meshBoiteDefaut.Tetrahedron(algo=smeshBuilder.NETGEN)
+    hypo3d = algo3d.MaxElementVolume(1000.0)
+  putName(algo3d.GetSubMesh(), "boiteDefaut")
+  putName(algo3d, "algo3d_boiteDefaut")
+  isDone = meshBoiteDefaut.Compute()
+  putName(meshBoiteDefaut, "boiteDefaut")
+  logging.info("meshBoiteDefaut fini")
+  
+  faceFissure = meshBoiteDefaut.GetMesh().UnionListOfGroups( [ group_faceFissOutPipe, group_faceFissInPipe ], 'FACE1' )
+  maillageSain = enleveDefaut(maillageSain, zoneDefaut, zoneDefaut_skin,
+                              zoneDefaut_internalFaces, zoneDefaut_internalEdges)
+  putName(maillageSain, nomFicSain+"_coupe")
+  extrusionFaceFissure, normfiss = shapeSurFissure(facesPortFissure)
+  maillageComplet = RegroupeSainEtDefaut(maillageSain, meshBoiteDefaut,
+                                         None, None, 'COMPLET', normfiss)
+
+  logging.info("conversion quadratique")
+  maillageComplet.ConvertToQuadratic( 1 )
+  logging.info("groupes")
+  groups = maillageComplet.GetGroups()
+  grps = [ grp for grp in groups if grp.GetName() == 'FONDFISS']
+  fond = maillageComplet.GetMesh().CreateDimGroup( grps, SMESH.NODE, 'FONDFISS' )
+
+  logging.info("réorientation face de fissure FACE1")
+  grps = [ grp for grp in groups if grp.GetName() == 'FACE1']
+  nb = maillageComplet.Reorient2D( grps[0], normfiss, grps[0].GetID(1))
+
+  logging.info("réorientation face de fissure FACE2")
+  plansim = geompy.MakePlane(O, normfiss, 10000)
+  fissnorm = geompy.MakeMirrorByPlane(normfiss, plansim)
+  grps = [ grp for grp in groups if grp.GetName() == 'FACE2']
+  nb = maillageComplet.Reorient2D( grps[0], fissnorm, grps[0].GetID(1))
+  fond = maillageComplet.GetMesh().CreateDimGroup( grps, SMESH.NODE, 'FACE2' )
+
+  logging.info("export maillage fini")
+  maillageComplet.ExportMED( fichierMaillageFissure, 0, SMESH.MED_V2_2, 1 )
+  putName(maillageComplet, nomFicFissure)
+  logging.info("fichier maillage fissure %s", fichierMaillageFissure)
+
+  if salome.sg.hasDesktop():
+    salome.sg.updateObjBrowser(1)
+
+  logging.info("maillage fissure fini")
+  
+  return maillageComplet
diff --git a/src/Tools/blocFissure/gmu/insereFissureLongue.py b/src/Tools/blocFissure/gmu/insereFissureLongue.py
new file mode 100644 (file)
index 0000000..ec8307c
--- /dev/null
@@ -0,0 +1,656 @@
+# -*- coding: utf-8 -*-
+
+import logging
+import salome
+from geomsmesh import geompy
+from geomsmesh import smesh
+from salome.smesh import smeshBuilder
+import SMESH
+import math
+
+from extractionOrientee import extractionOrientee
+from sortFaces import sortFaces
+from sortEdges import sortEdges
+from eliminateDoubles import eliminateDoubles
+from substractSubShapes import substractSubShapes
+from produitMixte import produitMixte
+from findWireEndVertices import findWireEndVertices
+from getSubshapeIds import getSubshapeIds
+from putName import putName
+from distance2 import distance2
+from enleveDefaut import enleveDefaut
+from shapeSurFissure import shapeSurFissure
+from regroupeSainEtDefaut import RegroupeSainEtDefaut
+from triedreBase import triedreBase
+
+# -----------------------------------------------------------------------------
+# --- procedure complete fissure longue
+
+def insereFissureLongue(geometriesSaines, maillagesSains,
+                        shapesFissure, shapeFissureParams,
+                        maillageFissureParams, elementsDefaut, step=-1):
+  """
+  TODO: a completer
+  """
+  logging.info('start')
+
+  #geometrieSaine    = geometriesSaines[0]
+  #maillageSain      = maillagesSains[0]
+  #isHexa            = maillagesSains[1]
+  shapeDefaut       = shapesFissure[0] # face de fissure, debordant
+  #tailleDefaut      = shapesFissure[2]
+  wiretube          = shapesFissure[4] # wire fond de fissure, debordant
+  planfiss          = shapesFissure[7] # plan de fissure
+  pipefiss          = shapesFissure[8] # pipe, debordant
+
+  profondeur  = shapeFissureParams['profondeur']
+  rayonPipe   = profondeur/4.0
+
+  nomRep            = maillageFissureParams['nomRep']
+  nomFicSain        = maillageFissureParams['nomFicSain']
+  nomFicFissure     = maillageFissureParams['nomFicFissure']
+
+  #nbsegExt          = maillageFissureParams['nbsegExt']      # 5
+  #nbsegGen          = maillageFissureParams['nbsegGen']      # 25
+  #nbsegRad          = maillageFissureParams['nbsegRad']      # 5
+  #scaleRad          = maillageFissureParams['scaleRad']      # 4
+  #nbsegCercle       = maillageFissureParams['nbsegCercle']   # 6
+  #nbsegFis          = maillageFissureParams['nbsegFis']      # 20
+  #lensegEllipsoide  = maillageFissureParams['lensegEllipso'] # 1.0
+
+  #fichierMaillageSain = nomRep + '/' + nomFicSain + '.med'
+  fichierMaillageFissure = nomRep + '/' + nomFicFissure + '.med'
+
+  facesDefaut              = elementsDefaut[0]
+  #centreDefaut             = elementsDefaut[1]
+  #normalDefaut             = elementsDefaut[2]
+  #extrusionDefaut          = elementsDefaut[3]
+  #dmoyen                   = elementsDefaut[4]
+  #bordsPartages            = elementsDefaut[5]
+  #fillconts                = elementsDefaut[6]
+  #idFilToCont              = elementsDefaut[7]
+  maillageSain             = elementsDefaut[8]
+  internalBoundary         = elementsDefaut[9]
+  zoneDefaut               = elementsDefaut[10]
+  zoneDefaut_skin          = elementsDefaut[11]
+  zoneDefaut_internalFaces = elementsDefaut[12]
+  zoneDefaut_internalEdges = elementsDefaut[13]
+
+  facePorteFissure =  shapeDefaut
+  WirePorteFondFissure = wiretube
+  fillingFaceExterne = facesDefaut[0]
+  print fillingFaceExterne
+  geompy.addToStudy(fillingFaceExterne, "fillingFaceExterne")
+  edgesFilling = geompy.ExtractShapes(fillingFaceExterne, geompy.ShapeType["EDGE"], False)
+
+  O, OX, OY, OZ = triedreBase()
+  
+  # -----------------------------------------------------------------------------
+  # --- peau et face de fissure
+
+  # --- partition peau defaut - face de fissure prolongee - wire de fond de fissure prolongée
+  partitionPeauFissFond = geompy.MakePartition([facePorteFissure, WirePorteFondFissure, fillingFaceExterne], [], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+  geompy.addToStudy( partitionPeauFissFond, 'partitionPeauFissFond' )
+
+  edges = geompy.ExtractShapes(WirePorteFondFissure, geompy.ShapeType["EDGE"], False)
+
+  lgmax = 0
+  imax = 0
+  for i, edge in enumerate(edges):
+    props = geompy.BasicProperties(edge)
+    lg = props[0]
+    if lg > lgmax:
+      lgmax = lg
+      imax = i
+  edgemax = edges[imax]
+  geompy.addToStudy(edgemax, 'edgemax')
+  centreFondFiss = geompy.MakeVertexOnCurve(edgemax, 0.5)
+  geompy.addToStudy(centreFondFiss, 'centreFondFiss')
+  tangentFondFiss = geompy.MakeTangentOnCurve(edgemax, 0.5)
+  geompy.addToStudy(tangentFondFiss, 'tangentFondFiss')
+
+  bord1FondFiss = geompy.MakeVertexOnCurve(edgemax, 0.0)
+  geompy.addToStudy(bord1FondFiss, 'bord1FondFiss')
+  tangentBord1FondFiss = geompy.MakeTangentOnCurve(edgemax, 0.0)
+  geompy.addToStudy(tangentBord1FondFiss, 'tangentBord1FondFiss')
+
+  bord2FondFiss = geompy.MakeVertexOnCurve(edgemax, 1.0)
+  geompy.addToStudy(bord2FondFiss, 'bord2FondFiss')
+  tangentBord2FondFiss = geompy.MakeTangentOnCurve(edgemax, 1.0)
+  geompy.addToStudy(tangentBord2FondFiss, 'tangentBord2FondFiss')
+
+  planBord1 = geompy.MakePlane(bord1FondFiss, tangentBord1FondFiss, 3*rayonPipe)
+  planBord2 = geompy.MakePlane(bord2FondFiss, tangentBord2FondFiss, 3*rayonPipe)
+  geompy.addToStudy(planBord1, 'planBord1')
+  geompy.addToStudy(planBord2, 'planBord2')
+
+  [edgesInside, edgesOutside, edgesOnside] = extractionOrientee(fillingFaceExterne, partitionPeauFissFond, centreFondFiss, "EDGE", 1.e-3)
+  [facesInside, facesOutside, facesOnside] = extractionOrientee(fillingFaceExterne, partitionPeauFissFond, centreFondFiss, "FACE", 1.e-3)
+
+  # --- partition peau -face fissure - pipe fond de fissure prolongé
+  partitionPeauFissByPipe = geompy.MakePartition([facesInside[0], facesOnside[0]], [pipefiss], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+  geompy.addToStudy( partitionPeauFissByPipe, 'partitionPeauFissByPipe' )
+
+  # --- identification face de peau
+  [facesPeauFissInside, facesPeauFissOutside, facesPeauFissOnside] = extractionOrientee(fillingFaceExterne, partitionPeauFissByPipe, centreFondFiss, "FACE", 0.1, "peauFiss_bord_")
+  facesPeauSorted, minsur, maxsurf = sortFaces(facesPeauFissOnside) # 4 demi disques, une grande face
+  facePeau = facesPeauSorted[-1] # la plus grande face
+  geompy.addToStudyInFather(partitionPeauFissByPipe, facePeau, "facePeau")
+
+  # --- identification edges de bord face peau
+  edgesBords = []
+  for i, edge in enumerate(edgesFilling):
+    edgepeau = geompy.GetInPlace(facePeau, edge)
+    edgesBords.append(edgepeau)
+  groupEdgesBordPeau = geompy.CreateGroup(facePeau, geompy.ShapeType["EDGE"])
+  geompy.UnionList(groupEdgesBordPeau, edgesBords)
+  geompy.addToStudyInFather(facePeau, groupEdgesBordPeau , "EdgesBords")
+
+  # --- identification face fissure externe au pipe et edge commune peau fissure
+  for face in facesPeauFissInside:
+    try:
+      sharedEdges = geompy.GetSharedShapesMulti([facePeau, face], geompy.ShapeType["EDGE"])
+      if sharedEdges is not None:
+        faceFiss = face
+        edgePeauFiss = sharedEdges[0]
+        geompy.addToStudyInFather(partitionPeauFissByPipe, faceFiss, "faceFiss")
+        geompy.addToStudyInFather(faceFiss, edgePeauFiss, "edgePeauFiss")
+        geompy.addToStudyInFather(facePeau, edgePeauFiss, "edgePeauFiss")
+        break
+    except:
+      pass
+  verticesEdgePeauFiss = geompy.ExtractShapes(edgePeauFiss, geompy.ShapeType["VERTEX"], False)
+
+  # --- identification edges demi cercle dans face de peau
+  edgesFacePeau = geompy.ExtractShapes(facePeau, geompy.ShapeType["EDGE"], False)
+  edgesFacePeauSorted, minlg, maxlg = sortEdges(edgesFacePeau)
+  demiCerclesPeau = edgesFacePeauSorted[0:4]
+  verticesDemiCerclesPeau = []
+  for i, edge in enumerate(demiCerclesPeau):
+    name = "demiCerclePeau_%d"%i
+    geompy.addToStudyInFather(facePeau, edge, name)
+    verticesDemiCerclesPeau += geompy.ExtractShapes(edge, geompy.ShapeType["VERTEX"], False)
+  verticesDemiCerclesPeau = eliminateDoubles(facePeau, verticesDemiCerclesPeau)
+  for i, vertex in enumerate(verticesDemiCerclesPeau):
+    name = "verticesDemiCerclesPeau_%d"%i
+    geompy.addToStudyInFather(facePeau, vertex, name)
+  verticesOutCercles = substractSubShapes(facePeau, verticesDemiCerclesPeau, verticesEdgePeauFiss)
+  for i, vertex in enumerate(verticesOutCercles):
+    name = "verticesOutCercles_%d"%i
+    geompy.addToStudyInFather(facePeau, vertex, name)
+
+  # --- demi cercles  regroupés
+  groupsDemiCerclesPeau = []
+  for i, vertex in enumerate(verticesEdgePeauFiss):
+    demis = []
+    for edge in demiCerclesPeau:
+      if geompy.MinDistance(vertex, edge) < 1.e-5:
+        demis.append(edge)
+    group = geompy.CreateGroup(facePeau, geompy.ShapeType["EDGE"])
+    geompy.UnionList(group, demis)
+    name = "Cercle%d"%i
+    geompy.addToStudyInFather(facePeau, group , name)
+    groupsDemiCerclesPeau.append(group)
+
+  # --- identification edges commune pipe face fissure externe au pipe
+  edgePeauFissId = geompy.GetSubShapeID(partitionPeauFissByPipe, edgePeauFiss)
+  edgesFaceFiss = geompy.ExtractShapes(faceFiss, geompy.ShapeType["EDGE"], False)
+  edgesFaceFissPipe = []
+  for edge in edgesFaceFiss:
+    if geompy.GetSubShapeID(partitionPeauFissByPipe, edge) != edgePeauFissId:
+      edgesFaceFissPipe.append(edge)
+      name = "edgeFaceFissPipe_%d"%len(edgesFaceFissPipe)
+      geompy.addToStudyInFather(faceFiss, edge, name)
+  groupEdgesFaceFissPipe = geompy.CreateGroup(faceFiss, geompy.ShapeType["EDGE"])
+  geompy.UnionList(groupEdgesFaceFissPipe, edgesFaceFissPipe)
+  geompy.addToStudyInFather(faceFiss, groupEdgesFaceFissPipe, "edgesFaceFissPipe")
+
+  # -----------------------------------------------------------------------------
+  # --- pipe de fond de fissure
+
+  wireFondFiss = geompy.MakeWire(edgesInside, 1e-07)
+
+  disque = geompy.MakeDiskPntVecR(centreFondFiss, tangentFondFiss, rayonPipe)
+  [vertex] = geompy.ExtractShapes(disque, geompy.ShapeType["VERTEX"], False)
+  vertproj = geompy.MakeProjection(vertex, planfiss)
+  vec1 = geompy.MakeVector(centreFondFiss, vertex)
+  try:
+    # si centreFondFiss et vertproj sont proches: exception. Angle = +- 90°
+    vec2 = geompy.MakeVector(centreFondFiss, vertproj)
+    angle = geompy.GetAngleRadians(vec1, vec2)
+  except:
+    # on utilise la projection du centre sur la peau pour avoir un vecteur non nul
+    vertproj = geompy.MakeProjection(centreFondFiss, facePeau)
+    vec2 = geompy.MakeVector(centreFondFiss, vertproj)
+    angle = geompy.GetAngleRadians(vec1, vec2)
+  sommetAxe = geompy.MakeTranslationVector(centreFondFiss, tangentFondFiss)
+  pm = produitMixte(centreFondFiss, vertex, vertproj, sommetAxe)
+  if pm > 0:
+    disque = geompy.MakeRotation(disque, tangentFondFiss, angle)
+  else:
+    disque = geompy.MakeRotation(disque, tangentFondFiss, -angle)
+  [vertexReference] = geompy.ExtractShapes(disque, geompy.ShapeType["VERTEX"], False)
+
+  pipeFondFiss = geompy.MakePipe(disque, wireFondFiss)
+  pipeFondFiss = geompy.MakePartition([pipeFondFiss], [planfiss, wireFondFiss, planBord1, planBord2], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
+  #pipe = geompy.MakePipe(disque, WirePorteFondFissure)
+  #pipe = geompy.MakePartition([pipe],[fillingFaceExterne], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
+  #pipes = geompy.ExtractShapes(pipe, geompy.ShapeType["SOLID"], False)
+  #pipesSorted, volmin, volmax = sortSolids(pipes)
+  #pipeFondFiss = pipesSorted[-1]
+  #pipeFondFiss = geompy.MakePartition([pipeFondFiss], [planfiss, wireFondFiss, planBord1, planBord2], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
+
+  geompy.addToStudy( disque, 'disque')
+  geompy.addToStudy( wireFondFiss, 'wireFondFiss')
+  geompy.addToStudy( pipeFondFiss, 'pipeFondFiss')
+
+  VerticesEndFondFiss = findWireEndVertices(wireFondFiss)
+  for i, v in enumerate(VerticesEndFondFiss):
+    name = "vertexEndFondFiss_%d"%i
+    geompy.addToStudyInFather(wireFondFiss, v, name)
+  VerticesEndPipeFiss = []
+  for v in VerticesEndFondFiss:
+    VerticesEndPipeFiss.append(geompy.GetInPlace(pipeFondFiss, v))
+  for i, v in enumerate(VerticesEndPipeFiss):
+    name = "vertexEndPipeFiss_%d"%i
+    geompy.addToStudyInFather(pipeFondFiss, v, name)
+
+  geompy.addToStudyInFather(pipeFondFiss, VerticesEndPipeFiss[0], "PFOR")
+  geompy.addToStudyInFather(pipeFondFiss, VerticesEndPipeFiss[1], "PFEX")
+  if geompy.MinDistance(VerticesEndPipeFiss[0], verticesOutCercles[0]) > geompy.MinDistance(VerticesEndPipeFiss[0], verticesOutCercles[1]):
+    a = verticesOutCercles[0]
+    verticesOutCercles[0] = verticesOutCercles[1]
+    verticesOutCercles[1] = a
+  geompy.addToStudyInFather(facePeau, verticesOutCercles[0], "THOR")
+  geompy.addToStudyInFather(facePeau, verticesOutCercles[1], "THEX")
+
+  [facesPipeInside, facesPipeOutside, facesPipeOnside] = extractionOrientee(fillingFaceExterne, pipeFondFiss, centreFondFiss, "FACE", 0.1, "pipe_bord_")
+  [edgesPipeInside, edgesPipeOutside, edgesPipeOnside] = extractionOrientee(fillingFaceExterne, pipeFondFiss, centreFondFiss, "EDGE", 0.1, "pipe_bord_")
+  disqueInt1 = geompy.GetInPlaceByHistory(pipeFondFiss, planBord1)
+  disqueInt2 = geompy.GetInPlaceByHistory(pipeFondFiss, planBord2)
+  disques = facesPipeOnside + [disqueInt1, disqueInt2]
+  edgesDiskInt = geompy.ExtractShapes(disqueInt1, geompy.ShapeType["EDGE"], False)
+  edgesDiskInt = edgesDiskInt +geompy.ExtractShapes(disqueInt2, geompy.ShapeType["EDGE"], False)
+  edgesSorted, minlg, maxlg = sortEdges(edgesDiskInt) # 4 rayons, 2 demi cercles
+
+  centre = geompy.MakeVertexOnSurface(planfiss, 0.5, 0.5)
+  refpoint = geompy.MakeTranslationVector(centre, geompy.GetNormal(planfiss,centre))
+  geompy.addToStudy(refpoint, 'refpoint')
+  [facesPipeInplan, facesPipeOutplan, facesPipeOnplan] = extractionOrientee(planfiss, pipeFondFiss, refpoint, "FACE", 0.1, "pipe_plan_")
+  [edgesPipeInplan, edgesPipeOutplan, edgesPipeOnplan] = extractionOrientee(planfiss, pipeFondFiss, refpoint, "EDGE", 0.1, "pipe_plan_")
+
+  # --- rayon disques = (edgesPipeOnside inter edgesPipeOnplan) + rayons disque internes
+  #     demi cercles  = edgesPipeOnside moins edgesPipeOnplan + demi cercles disque internes
+  #     generatrices  = edgesPipeOnplan moins rayon disques (3 grandes et 6 petites)
+  edgesIdPipeOnside = getSubshapeIds(pipeFondFiss, edgesPipeOnside)
+  edgesIdPipeOnplan = getSubshapeIds(pipeFondFiss, edgesPipeOnplan)
+  rayons = []
+  demiCercles = []
+  for i, edgeId in enumerate(edgesIdPipeOnside):
+    if edgeId in edgesIdPipeOnplan:
+      rayons.append(edgesPipeOnside[i])
+    else:
+      demiCercles.append(edgesPipeOnside[i])
+  demiCerclesExternes = demiCercles
+  rayons = rayons + edgesSorted[:4]            # les 4 plus petits sont les rayons
+  demiCercles = demiCercles  + edgesSorted[4:] # les suivants sont les arcs de cercle
+  rayonsId = getSubshapeIds(pipeFondFiss, rayons)
+  generatrices = []
+  for i, edgeId in enumerate(edgesIdPipeOnplan):
+    if edgeId not in rayonsId:
+      generatrices.append(edgesPipeOnplan[i])
+
+  # --- generatrices en contact avec la face fissure externe au pipe
+  generFiss = []
+  for edge in generatrices:
+    distance = geompy.MinDistance(vertexReference, edge)
+    logging.debug("distance %s", distance)
+    if distance < 1.e-5:
+      generFiss.append(edge)
+      break
+  for edge in generatrices:
+    distance = geompy.MinDistance(generFiss[0], edge)
+    logging.debug("distance %s", distance)
+    if distance < 1.e-5:
+      generFiss.append(edge)
+  groupGenerFiss = geompy.CreateGroup(pipeFondFiss, geompy.ShapeType["EDGE"])
+  geompy.UnionList(groupGenerFiss, generFiss)
+  geompy.addToStudyInFather(pipeFondFiss, groupGenerFiss, "GenFiss")
+
+  # --- demi cercles externes regroupés
+  groupsDemiCerclesPipe = []
+  for i, vertex in enumerate(verticesEdgePeauFiss):
+    demis = []
+    for edge in demiCerclesExternes:
+      if geompy.MinDistance(vertex, edge) < 0.1:
+        demis.append(edge)
+    group = geompy.CreateGroup(pipeFondFiss, geompy.ShapeType["EDGE"])
+    geompy.UnionList(group, demis)
+    name = "Cercle%d"%i
+    geompy.addToStudyInFather(pipeFondFiss, group , name)
+    groupsDemiCerclesPipe.append(group)
+
+  # --- faces fissure dans le pipe
+
+  facesFissinPipe = []
+  generFissId = getSubshapeIds(pipeFondFiss, generFiss)
+  logging.debug("generatrice fissure %s", generFissId)
+  for face in facesPipeOnplan:
+    edges =geompy.ExtractShapes(face, geompy.ShapeType["EDGE"], False)
+    edgesId = getSubshapeIds(pipeFondFiss, edges)
+    logging.debug("  edges %s", edgesId)
+    for i,edgeId in enumerate(edgesId):
+      if edgeId in generFissId:
+        logging.debug("face found")
+        facesFissinPipe.append(face)
+        name = "faceFissInPipe_%d"%i
+        geompy.addToStudyInFather(pipeFondFiss, face, name)
+        break
+  groupFaceFissInPipe = geompy.CreateGroup(pipeFondFiss, geompy.ShapeType["FACE"])
+  geompy.UnionList(groupFaceFissInPipe, facesFissinPipe)
+  name = "FaceFissInPipe"
+  geompy.addToStudyInFather(pipeFondFiss, groupFaceFissInPipe , name)
+
+  # --- edges de fond de fissure
+
+  edgesFondFiss = []
+  for i, edge in enumerate(edgesInside):
+    anEdge = geompy.GetInPlace(pipeFondFiss, edge)
+    logging.debug("  edge %s ", anEdge)
+    edgesFondFiss.append(anEdge)
+    name ="edgeFondFissure_%d"%i
+    geompy.addToStudyInFather(pipeFondFiss, anEdge, name)
+  groupEdgeFondFiss = geompy.CreateGroup(pipeFondFiss, geompy.ShapeType["EDGE"])
+  geompy.UnionList(groupEdgeFondFiss, edgesFondFiss)
+  name = "FONDFISS"
+  geompy.addToStudyInFather(pipeFondFiss, groupEdgeFondFiss , name)
+
+  # -------------------------------------------------------------------------
+  # --- maillage
+
+  # --- edges de bord face defaut à respecter
+
+  aFilterManager = smesh.CreateFilterManager()
+  nbAdded, internalBoundary, _NoneGroup = internalBoundary.MakeBoundaryElements( SMESH.BND_1DFROM2D, '', '', 0, [  ])
+  criteres = []
+  unCritere = smesh.GetCriterion(SMESH.EDGE,SMESH.FT_FreeBorders,SMESH.FT_Undefined,0)
+  criteres.append(unCritere)
+  filtre = smesh.GetFilterFromCriteria(criteres)
+  bordsLibres = internalBoundary.MakeGroupByFilter( 'bords', filtre )
+  smesh.SetName(bordsLibres, 'bordsLibres')
+
+  # --- pour aider l'algo hexa-tetra a ne pas mettre de pyramides a l'exterieur des volumes replies sur eux-memes
+  #     on designe les faces de peau en quadrangles par le groupe "skinFaces"
+
+  skinFaces = internalBoundary.CreateEmptyGroup( SMESH.FACE, 'skinFaces' )
+  nbAdd = skinFaces.AddFrom( internalBoundary.GetMesh() )
+
+  # --- maillage pipe fond fissure
+
+  meshFondFiss = smesh.Mesh(pipeFondFiss)
+  algo2d = meshFondFiss.Quadrangle(algo=smeshBuilder.QUADRANGLE)
+  algo3d = meshFondFiss.Prism()
+  putName(algo3d.GetSubMesh(), "pipe")
+  putName(algo3d, "algo3d_pipe")
+  putName(algo2d, "algo2d_pipe")
+
+  for i, face in enumerate(disques):
+    algo2d = meshFondFiss.Quadrangle(algo=smeshBuilder.RADIAL_QUAD,geom=face)
+    putName(algo2d.GetSubMesh(), "disque", i)
+    putName(algo2d, "algo2d_disque", i)
+
+  for i, edge in enumerate(rayons):
+    algo1d = meshFondFiss.Segment(geom=edge)
+    hypo1d = algo1d.NumberOfSegments(4)
+    putName(algo1d.GetSubMesh(), "rayon", i)
+    putName(algo1d, "algo1d_rayon", i)
+    putName(hypo1d, "hypo1d_rayon", i)
+
+  for i, edge in enumerate(demiCercles):
+    algo1d = meshFondFiss.Segment(geom=edge)
+    hypo1d = algo1d.NumberOfSegments(6)
+    putName(algo1d.GetSubMesh(), "demiCercle", i)
+    putName(algo1d, "algo1d_demiCercle", i)
+    putName(hypo1d, "hypo1d_demiCercle", i)
+
+  generSorted, minlg, maxlg = sortEdges(generatrices)
+  nbSegGenLong = int(math.sqrt(3.0)*maxlg/(profondeur - rayonPipe)) # on veut 2 triangles equilateraux dans la largeur de la face
+  nbSegGenBout = 6
+  logging.info("min %s, max %s, nombre de segments %s, nombre de generatrices %s", minlg, maxlg, nbSegGenLong, len(generSorted))
+  for i, edge in enumerate(generSorted):
+    algo1d = meshFondFiss.Segment(geom=edge)
+    if i < 6:
+      hypo1d = algo1d.NumberOfSegments(nbSegGenBout)
+    else:
+      hypo1d = algo1d.NumberOfSegments(nbSegGenLong)
+    putName(algo1d.GetSubMesh(), "generatrice", i)
+    putName(algo1d, "algo1d_generatrice", i)
+    putName(hypo1d, "hypo1d_generatrice", i)
+  isDone = meshFondFiss.Compute()
+  logging.info("meshFondFiss computed")
+
+  disks = []
+  for i, face in enumerate(disques[:4]):
+    name = "disk%d"%i
+    disks.append(meshFondFiss.GroupOnGeom(face, name, SMESH.FACE))
+  peauext_pipe = meshFondFiss.GetMesh().UnionListOfGroups( disks, 'PEAUEXT' )
+
+  grpPFOR = meshFondFiss.GroupOnGeom(VerticesEndPipeFiss[0], "PFOR", SMESH.NODE)
+  grpPFEX = meshFondFiss.GroupOnGeom(VerticesEndPipeFiss[1], "PFEX", SMESH.NODE)
+
+  grp = meshFondFiss.GroupOnGeom(groupFaceFissInPipe, "fisInPi", SMESH.FACE)
+  group_edgeFondFiss = meshFondFiss.GroupOnGeom(groupEdgeFondFiss, "FONDFISS", SMESH.EDGE)
+  noeudsFondFissure = meshFondFiss.GroupOnGeom(groupEdgeFondFiss, "nfondfis", SMESH.NODE)
+  groups_demiCercles = []
+  groupnodes_demiCercles = []
+  for i, group in enumerate(groupsDemiCerclesPipe):
+    name = "Cercle%d"%i
+    groups_demiCercles.append(meshFondFiss.GroupOnGeom(group, name, SMESH.EDGE))
+    name = "nCercle%d"%i
+    groupnodes_demiCercles.append(meshFondFiss.GroupOnGeom(group, name, SMESH.NODE))
+  group_generFiss = meshFondFiss.GroupOnGeom(groupGenerFiss, "GenFiss", SMESH.EDGE)
+  groupnode_generFiss = meshFondFiss.GroupOnGeom(groupGenerFiss, "GenFiss", SMESH.NODE)
+  grpNode0 = meshFondFiss.IntersectGroups(groupnode_generFiss, groupnodes_demiCercles[0], "Node0")
+  grpNode1 = meshFondFiss.IntersectGroups(groupnode_generFiss, groupnodes_demiCercles[1], "Node1")
+  idNode0 = grpNode0.GetID(1)
+  idNode1 = grpNode1.GetID(1)
+  coordsMesh = []
+  coordsMesh.append(meshFondFiss.GetNodeXYZ(idNode0))
+  coordsMesh.append(meshFondFiss.GetNodeXYZ(idNode1))
+  coordsGeom = []
+  for vertex in verticesEdgePeauFiss:
+    coord = geompy.PointCoordinates(vertex);
+    if distance2(coord, coordsMesh[0]) < 0.1:
+      meshFondFiss.MoveNode(idNode0, coord[0], coord[1], coord[2])
+    if distance2(coord, coordsMesh[1]) < 0.1:
+      meshFondFiss.MoveNode(idNode1, coord[0], coord[1], coord[2])
+
+  for groupNodes in groupnodes_demiCercles:
+    for idNode in groupNodes.GetListOfID():
+      coordMesh = meshFondFiss.GetNodeXYZ(idNode)
+      vertex = geompy.MakeVertex(coordMesh[0], coordMesh[1], coordMesh[2])
+      minDist = 100000
+      minCoord = None
+      imin = -1
+      for i, edge in enumerate(demiCerclesPeau):
+        discoord = geompy.MinDistanceComponents(vertex, edge)
+        if discoord[0] <minDist:
+          minDist = discoord[0]
+          minCoord = discoord[1:]
+          imin = i
+      if imin >= 0 and minDist > 1.E-6:
+        logging.debug("node id moved : %s distance=%s", idNode, minDist)
+        meshFondFiss.MoveNode(idNode, coordMesh[0] + minCoord[0], coordMesh[1] + minCoord[1], coordMesh[2] + minCoord[2])
+
+
+  # --- maillage face de peau
+
+  meshFacePeau = smesh.Mesh(facePeau)
+  algo2d = meshFacePeau.Triangle(algo=smeshBuilder.NETGEN_2D)
+  hypo2d = algo2d.Parameters()
+  hypo2d.SetMaxSize( 1000 )
+  hypo2d.SetOptimize( 1 )
+  hypo2d.SetFineness( 2 )
+  hypo2d.SetMinSize( 2 )
+  hypo2d.SetQuadAllowed( 0 )
+  putName(algo2d.GetSubMesh(), "facePeau")
+  putName(algo2d, "algo2d_facePeau")
+  putName(hypo2d, "hypo2d_facePeau")
+  #
+  lenEdgePeauFiss = geompy.BasicProperties(edgePeauFiss)[0]
+  frac = profondeur/lenEdgePeauFiss
+  nbSeg = nbSegGenLong +2*nbSegGenBout
+  ratio = (nbSegGenBout/float(profondeur)) / (nbSegGenLong/lenEdgePeauFiss)
+  logging.info("lenEdgePeauFiss %s, profondeur %s, nbSegGenLong %s, nbSegGenBout %s, frac %s, ratio %s", lenEdgePeauFiss, profondeur, nbSegGenLong, nbSegGenBout, frac, ratio)
+  algo1d = meshFacePeau.Segment(geom=edgePeauFiss)
+  hypo1d = algo1d.NumberOfSegments(nbSeg,[],[  ])
+  hypo1d.SetDistrType( 2 )
+  hypo1d.SetConversionMode( 1 )
+  hypo1d.SetTableFunction( [ 0, ratio, frac, 1, (1.-frac), 1, 1, ratio ] )
+  putName(algo1d.GetSubMesh(), "edgePeauFiss")
+  putName(algo1d, "algo1d_edgePeauFiss")
+  putName(hypo1d, "hypo1d_edgePeauFiss")
+  #
+  algo1d = meshFacePeau.UseExisting1DElements(geom=groupEdgesBordPeau)
+  hypo1d = algo1d.SourceEdges([ bordsLibres ],0,0)
+  putName(algo1d.GetSubMesh(), "bordsLibres")
+  putName(algo1d, "algo1d_bordsLibres")
+  putName(hypo1d, "hypo1d_bordsLibres")
+  #
+  for i in range(2):
+    algo1d = meshFacePeau.UseExisting1DElements(geom=groupsDemiCerclesPeau[i])
+    hypo1d = algo1d.SourceEdges([ groups_demiCercles[i] ],0,0)
+    putName(algo1d.GetSubMesh(), "DemiCercles", i)
+    putName(algo1d, "algo1d_groupDemiCercles", i)
+    putName(hypo1d, "hypo1d_groupDemiCercles", i)
+  #
+  isDone = meshFacePeau.Compute()
+  logging.info("meshFacePeau computed")
+  grpTHOR = meshFacePeau.GroupOnGeom(verticesOutCercles[0], "THOR", SMESH.NODE)
+  grpTHEX = meshFacePeau.GroupOnGeom(verticesOutCercles[1], "THEX", SMESH.NODE)
+
+  groupEdgesPeauFiss = meshFacePeau.GroupOnGeom(edgePeauFiss, "PeauFis", SMESH.EDGE)
+
+  peauext_face = meshFacePeau.CreateEmptyGroup( SMESH.FACE, 'PEAUEXT' )
+  nbAdd = peauext_face.AddFrom( meshFacePeau.GetMesh() )
+
+
+  # --- maillage face de fissure
+
+  meshFaceFiss = smesh.Mesh(faceFiss)
+  algo2d = meshFaceFiss.Triangle(algo=smeshBuilder.NETGEN_2D)
+  hypo2d = algo2d.Parameters()
+  hypo2d.SetMaxSize( (profondeur - rayonPipe)/math.sqrt(3.0) ) # pour avoir deux couches de triangles equilateraux partout sur la fissure
+  hypo2d.SetOptimize( 1 )
+  hypo2d.SetFineness( 2 )
+  hypo2d.SetMinSize( 2 )
+  hypo2d.SetQuadAllowed( 0 )
+  putName(algo2d.GetSubMesh(), "faceFiss")
+  putName(algo2d, "algo2d_faceFiss")
+  putName(hypo2d, "hypo2d_faceFiss")
+  #
+  algo1d = meshFaceFiss.UseExisting1DElements(geom=edgePeauFiss)
+  hypo1d = algo1d.SourceEdges([ groupEdgesPeauFiss ],0,0)
+  putName(algo1d.GetSubMesh(), "edgeFissPeau")
+  putName(algo1d, "algo1d_edgeFissPeau")
+  putName(hypo1d, "hypo1d_edgeFissPeau")
+  #
+  algo1d = meshFaceFiss.UseExisting1DElements(geom=groupEdgesFaceFissPipe)
+  hypo1d = algo1d.SourceEdges([ group_generFiss ],0,0)
+  putName(algo1d.GetSubMesh(), "edgeFissPeau")
+  putName(algo1d, "algo1d_edgeFissPeau")
+  putName(hypo1d, "hypo1d_edgeFissPeau")
+  #
+  isDone = meshFaceFiss.Compute()
+  logging.info("meshFaceFiss computed")
+
+  grp = meshFaceFiss.GroupOnGeom(faceFiss, "fisOutPi", SMESH.FACE)
+
+  meshBoiteDefaut = smesh.Concatenate([internalBoundary.GetMesh(),
+                                   meshFondFiss.GetMesh(),
+                                   meshFacePeau.GetMesh(),
+                                   meshFaceFiss.GetMesh()],
+                                   1, 1, 1e-05,False)
+  # pour aider l'algo hexa-tetra a ne pas mettre de pyramides a l'exterieur des volumes replies sur eux-memes
+  # on designe les faces de peau en quadrangles par le groupe "skinFaces"
+  group_faceFissOutPipe = None
+  group_faceFissInPipe = None
+  groups = meshBoiteDefaut.GetGroups()
+  for grp in groups:
+    if grp.GetType() == SMESH.FACE:
+      #if "internalBoundary" in grp.GetName():
+      #  grp.SetName("skinFaces")
+      if grp.GetName() == "fisOutPi":
+        group_faceFissOutPipe = grp
+      elif grp.GetName() == "fisInPi":
+        group_faceFissInPipe = grp
+
+  # le maillage NETGEN ne passe pas toujours ==> utiliser GHS3D
+  distene=True
+  if distene:
+    algo3d = meshBoiteDefaut.Tetrahedron(algo=smeshBuilder.GHS3D)
+  else:
+    algo3d = meshBoiteDefaut.Tetrahedron(algo=smeshBuilder.NETGEN)
+    hypo3d = algo3d.MaxElementVolume(1000.0)
+  putName(algo3d.GetSubMesh(), "boiteDefaut")
+  putName(algo3d, "algo3d_boiteDefaut")
+  isDone = meshBoiteDefaut.Compute()
+  logging.info("meshBoiteDefaut computed")
+  putName(meshBoiteDefaut, "boiteDefaut")
+
+  groups = maillageSain.GetGroups()
+  grps1 = [ grp for grp in groups if grp.GetName() == 'P1']
+  grps2 = [ grp for grp in groups if grp.GetName() == 'P2']
+  coords1 = maillageSain.GetNodeXYZ(grps1[0].GetID(1))
+  coords2 = maillageSain.GetNodeXYZ(grps2[0].GetID(1))
+  logging.info("coords1 %s, coords2 %s",coords1, coords2)
+
+  faceFissure = meshBoiteDefaut.GetMesh().UnionListOfGroups( [ group_faceFissOutPipe, group_faceFissInPipe ], 'FACE1' )
+  maillageSain = enleveDefaut(maillageSain, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges)
+  putName(maillageSain, nomFicSain+"_coupe")
+  extrusionFaceFissure, normfiss = shapeSurFissure(facePorteFissure)
+  maillageComplet = RegroupeSainEtDefaut(maillageSain, meshBoiteDefaut, extrusionFaceFissure, facePorteFissure, 'COUDE')
+
+  groups = maillageComplet.GetGroups()
+  grps1 = [ grp for grp in groups if grp.GetName() == 'P1']
+  grps2 = [ grp for grp in groups if grp.GetName() == 'P2']
+  nodeid1 = maillageComplet.AddNode(coords1[0], coords1[1], coords1[2])
+  nodeid2 = maillageComplet.AddNode(coords2[0], coords2[1], coords2[2])
+  grps1[0].Add([nodeid1])
+  grps2[0].Add([nodeid2])
+  ma0d1 = maillageComplet.Add0DElement(nodeid1)
+  ma0d2 = maillageComplet.Add0DElement(nodeid2)
+  grpma0d1 = maillageComplet.CreateEmptyGroup( SMESH.ELEM0D, 'P1' )
+  nbAdd = grpma0d1.Add( [ma0d1] )
+  grpma0d2 = maillageComplet.CreateEmptyGroup( SMESH.ELEM0D, 'P2' )
+  nbAdd = grpma0d2.Add( [ma0d2] )
+
+#  grps = [ grp for grp in groups if grp.GetName() == 'affectedEdges']
+#  grps[0].SetName('affEdges')
+#  grps = [ grp for grp in groups if grp.GetName() == 'affectedFaces']
+#  grps[0].SetName('affFaces')
+#  grps = [ grp for grp in groups if grp.GetName() == 'affectedVolumes']
+#  grps[0].SetName('affVols')
+
+  maillageComplet.ConvertToQuadratic( 1 )
+  grps = [ grp for grp in groups if grp.GetName() == 'FONDFISS']
+  fond = maillageComplet.GetMesh().CreateDimGroup( grps, SMESH.NODE, 'FONDFISS' )
+
+  grps = [ grp for grp in groups if grp.GetName() == 'FACE1']
+  nb = maillageComplet.Reorient2D( grps[0], normfiss, grps[0].GetID(1))
+
+  plansim = geompy.MakePlane(O, normfiss, 10000)
+  fissnorm = geompy.MakeMirrorByPlane(normfiss, plansim)
+  grps = [ grp for grp in groups if grp.GetName() == 'FACE2']
+  nb = maillageComplet.Reorient2D( grps[0], fissnorm, grps[0].GetID(1))
+  #isDone = maillageComplet.ReorientObject( grps[0] )
+  fond = maillageComplet.GetMesh().CreateDimGroup( grps, SMESH.NODE, 'FACE2' )
+
+  maillageComplet.ExportMED( fichierMaillageFissure, 0, SMESH.MED_V2_2, 1 )
+  putName(maillageComplet, nomFicFissure)
+  logging.info("fichier maillage fissure %s", fichierMaillageFissure)
+
+  if salome.sg.hasDesktop():
+    salome.sg.updateObjBrowser(1)
+
+  return  maillageComplet
\ No newline at end of file
diff --git a/src/Tools/blocFissure/gmu/meshBlocPart.py b/src/Tools/blocFissure/gmu/meshBlocPart.py
new file mode 100644 (file)
index 0000000..c868ed1
--- /dev/null
@@ -0,0 +1,218 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+from geomsmesh import smesh
+from salome.smesh import smeshBuilder
+import SMESH
+from salome.StdMeshers import StdMeshersBuilder
+from putName import putName
+
+# -----------------------------------------------------------------------------
+# --- maillage du bloc partitionne
+
+def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circles, faces,
+                gencnt, facefissoutore, edgeext, facesExternes, facesExtBloc, facesExtElli,
+                aretesInternes, internalBoundary, ellipsoidep, sharedFaces, sharedEdges, edgesBords,
+                nbsegExt, nbsegGen, nbsegRad, scaleRad, reverses, reverext, nbsegCercle, nbsegFis, dmoyen, lensegEllipsoide):
+  """
+  Maillage du bloc partitionné
+  TODO: a completer
+  """
+  logging.info('start')
+
+  # --- edges de bord à respecter
+
+  aFilterManager = smesh.CreateFilterManager()
+  nbAdded, internalBoundary, _NoneGroup = internalBoundary.MakeBoundaryElements( SMESH.BND_1DFROM2D, '', '', 0, [  ])
+  criteres = []
+  unCritere = smesh.GetCriterion(SMESH.EDGE,SMESH.FT_FreeBorders,SMESH.FT_Undefined,0)
+  criteres.append(unCritere)
+  filtre = smesh.GetFilterFromCriteria(criteres)
+  bordsLibres = internalBoundary.MakeGroupByFilter( 'bords', filtre )
+  smesh.SetName(bordsLibres, 'bordsLibres')
+
+  # --- maillage bloc
+
+  bloc1 = smesh.Mesh(blocPartition)
+
+  for i in range(len(sharedFaces)):
+    algo2d = bloc1.Triangle(algo=smeshBuilder.NETGEN, geom=sharedFaces[i])
+    hypo2d = algo2d.Parameters(which=smesh.SIMPLE)
+    hypo2d.SetLocalLength(lensegEllipsoide)
+    hypo2d.LengthFromEdges()
+    hypo2d.SetAllowQuadrangles(0)
+    putName(algo2d.GetSubMesh(), "sharedFaces", i)
+    putName(algo2d, "algo2d_sharedFaces", i)
+    putName(hypo2d, "hypo2d_sharedFaces", i)
+
+  for i in range(len(sharedEdges)):
+    algo1d = bloc1.Segment(geom=sharedEdges[i])
+    hypo1d = algo1d.LocalLength(lensegEllipsoide)
+    putName(algo1d.GetSubMesh(), "sharedEdges", i)
+    putName(algo1d, "algo1d_sharedEdges", i)
+    putName(hypo1d, "hypo1d_sharedEdges", i)
+
+  declareAlgoEllipsoideFirst = False
+  if declareAlgoEllipsoideFirst:
+    algo3d = bloc1.Tetrahedron(algo=smeshBuilder.NETGEN,geom=ellipsoidep)
+    hypo3d = algo3d.MaxElementVolume(1000.0)
+    putName(algo3d.GetSubMesh(), "ellipsoide")
+    putName(algo3d, "algo3d_ellipsoide")
+    putName(hypo3d, "hypo3d_ellipsoide")
+
+  algo3d = bloc1.Prism(geom=tore)
+  algo2d = bloc1.Quadrangle(geom=tore)
+  algo1d = bloc1.Segment(geom=tore)
+  hypo1d = algo1d.NumberOfSegments(nbsegGen)
+  putName(algo3d.GetSubMesh(), "tore")
+  putName(algo3d, "algo3d_tore")
+  putName(algo2d, "algo2d_tore")
+  putName(algo1d, "algo1d_tore")
+  putName(hypo1d, "hypo1d_tore")
+
+  for i in range(len(faces)):
+    algo2d = bloc1.Quadrangle(geom=faces[i])
+    hypo2d = smesh.CreateHypothesis('QuadrangleParams')
+    hypo2d.SetTriaVertex( geompy.GetSubShapeID(blocPartition,centres[i]) )
+    hypo2d.SetQuadType( StdMeshersBuilder.QUAD_STANDARD )
+    status = bloc1.AddHypothesis(hypo2d,faces[i])
+    putName(algo2d.GetSubMesh(), "faces", i)
+    putName(algo2d, "algo2d_faces", i)
+    putName(hypo2d, "hypo2d_faces", i)
+
+  for i in range(len(edges)):
+    algo1d = bloc1.Segment(geom=edges[i])
+    if reverses[i] > 0:
+      hypo1d = algo1d.NumberOfSegments(nbsegRad, scaleRad,[ geompy.GetSubShapeID(blocPartition,edges[i]) ])
+    else:
+      hypo1d = algo1d.NumberOfSegments(nbsegRad, scaleRad,[  ])
+    putName(algo1d.GetSubMesh(), "edges", i)
+    putName(algo1d, "algo1d_edges", i)
+    putName(hypo1d, "hypo1d_edges", i)
+
+  for i in range(len(circles)):
+    algo1d = bloc1.Segment(geom=circles[i])
+    hypo1d = algo1d.NumberOfSegments(nbsegCercle)
+    putName(algo1d.GetSubMesh(), "circles", i)
+    putName(algo1d, "algo1d_circles", i)
+    putName(hypo1d, "hypo1d_circles", i)
+
+  if len(edgeext) == 1:
+    densite = int(round(nbsegFis/2))
+    algo1d = bloc1.Segment(geom=edgeext[0])
+    hypo1d = algo1d.NumberOfSegments(nbsegFis)
+    hypo1d.SetDistrType( 2 )
+    hypo1d.SetConversionMode( 1 )
+    hypo1d.SetTableFunction( [ 0, densite, 0.4, 1, 0.6, 1, 1, densite ] )
+    putName(algo1d.GetSubMesh(), "edgeext")
+    putName(algo1d, "algo1d_edgeext")
+    putName(hypo1d, "hypo1d_edgeext")
+  else:
+    longTotal = 0
+    longEdgeExts = []
+    for i in range(len(edgeext)):
+      props = geompy.BasicProperties(edgeext[i])
+      longEdgeExts.append(props[0])
+      longTotal += props[0]
+    for i in range(len(edgeext)):
+      local = longTotal/nbsegFis
+      nbLocal = int(round(nbsegFis*longEdgeExts[i]/longTotal))
+      densite = int(round(nbLocal/2))
+      algo1d = bloc1.Segment(geom=edgeext[i])
+      hypo1d = algo1d.NumberOfSegments(nbLocal)
+      hypo1d.SetDistrType( 2 )
+      hypo1d.SetConversionMode( 1 )
+      hypo1d.SetTableFunction( [ 0, densite, 0.8, 1, 1, 1 ] )
+      if reverext[i]:
+        hypo1d.SetReversedEdges([ geompy.GetSubShapeID(blocPartition, edgeext[i]) ])
+      putName(algo1d.GetSubMesh(), "edgeext", i)
+      putName(algo1d, "algo1d_edgeext", i)
+      putName(hypo1d, "hypo1d_edgeext", i)
+
+  algo2d = bloc1.Triangle(algo=smeshBuilder.NETGEN_2D, geom=facefissoutore)
+  hypo2d = algo2d.LengthFromEdges()
+  putName(algo2d.GetSubMesh(), "facefissoutore")
+  putName(algo2d, "algo2d_facefissoutore")
+  putName(hypo2d, "hypo2d_facefissoutore")
+
+
+  maxElemArea = 0.5*dmoyen*dmoyen
+  logging.debug("dmoyen %s, maxElemArea %s", dmoyen, maxElemArea)
+
+  for i in range(len(facesExternes)):
+    algo2d = bloc1.Triangle(algo=smeshBuilder.NETGEN_2D, geom=facesExternes[i])
+    hypo2d = algo2d.MaxElementArea(maxElemArea)
+    if edgesBords is None:
+      algo1d = bloc1.Segment(geom=facesExternes[i])
+      hypo1d = algo1d.NumberOfSegments(1)
+    putName(algo2d.GetSubMesh(), "facesExternes", i)
+    putName(algo2d, "algo2d_facesExternes", i)
+    putName(hypo2d, "hypo2d_facesExternes", i)
+    if edgesBords is None:
+      putName(algo1d, "algo1d_facesExternes", i)
+      putName(hypo1d, "hypo1d_facesExternes", i)
+
+  for i in range(len(aretesInternes)):
+    algo1d = bloc1.Segment(geom=aretesInternes[i])
+    hypo1d = algo1d.NumberOfSegments(nbsegExt)
+    putName(algo1d.GetSubMesh(), "aretesInternes", i)
+    putName(algo1d, "algo1d_aretesInternes", i)
+    putName(hypo1d, "hypo1d_aretesInternes", i)
+
+  if edgesBords is not None:
+    algo1d = bloc1.UseExisting1DElements(geom=edgesBords)
+    hypo1d = algo1d.SourceEdges([ bordsLibres ],0,0)
+    putName(algo1d.GetSubMesh(), "bordsLibres")
+    putName(algo1d, "algo1d_bordsLibres")
+    putName(hypo1d, "hypo1d_bordsLibres")
+
+  #isDone = bloc1.Compute()
+
+  if not declareAlgoEllipsoideFirst:
+    algo3d = bloc1.Tetrahedron(algo=smeshBuilder.NETGEN,geom=ellipsoidep)
+    hypo3d = algo3d.MaxElementVolume(1000.0)
+    putName(algo3d.GetSubMesh(), "ellipsoide")
+    putName(algo3d, "algo3d_ellipsoide")
+    putName(hypo3d, "hypo3d_ellipsoide")
+
+  isDone = bloc1.Compute()
+
+  nbRemoved = bloc1.RemoveOrphanNodes()
+
+  faceFissure1 = bloc1.GroupOnGeom(faceFissure,'FACE1',SMESH.FACE)
+  noeudsFondFissure = bloc1.GroupOnGeom(gencnt,'nfondfis',SMESH.NODE)
+
+  groups_faceCommuneEllipsoideBloc = []
+  for i in range(len(sharedFaces)):
+    name = "faceCommuneEllipsoideBloc_%d"%i
+    groups_faceCommuneEllipsoideBloc.append(bloc1.GroupOnGeom(sharedFaces[i], name, SMESH.FACE))
+  groups_faceExterneBloc = []
+  for i in range(len(facesExtBloc)):
+    name = "faceExterneBloc_%d"%i
+    groups_faceExterneBloc.append(bloc1.GroupOnGeom(facesExtBloc[i], name, SMESH.FACE))
+
+  skinBlocMeshes = []
+  for i in range(len(groups_faceCommuneEllipsoideBloc)):
+    name = "faceCommuneEllipsoideBloc_%d"%i
+    skinBlocMeshes.append(smesh.CopyMesh(groups_faceCommuneEllipsoideBloc[i], name, 0, 0))
+  for i in range(len(groups_faceExterneBloc)):
+    name = "faceExterneBloc_%d"%i
+    skinBlocMeshes.append(smesh.CopyMesh(groups_faceExterneBloc[i], name, 0, 0))
+
+  meshesBloc = [internalBoundary.GetMesh()]
+  for i in range(len(skinBlocMeshes)):
+    meshesBloc.append(skinBlocMeshes[i].GetMesh())
+  blocMesh = smesh.Concatenate(meshesBloc, 1, 1, 1e-05,False)
+
+  algo3d = blocMesh.Tetrahedron(algo=smeshBuilder.NETGEN)
+  hypo3d = algo3d.MaxElementVolume(1000.0)
+  putName(algo3d.GetSubMesh(), "bloc")
+  putName(algo3d, "algo3d_bloc")
+  putName(hypo3d, "hypo3d_bloc")
+
+  is_done = blocMesh.Compute()
+
+  blocComplet = smesh.Concatenate([bloc1.GetMesh(), blocMesh.GetMesh()], 1, 1, 1e-05,False)
+
+  return bloc1, blocComplet
\ No newline at end of file
diff --git a/src/Tools/blocFissure/gmu/orderEdgesFromWire.py b/src/Tools/blocFissure/gmu/orderEdgesFromWire.py
new file mode 100644 (file)
index 0000000..0a092e2
--- /dev/null
@@ -0,0 +1,72 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- trouver les vertices intermediaires d'un wire
+
+def orderEdgesFromWire(aWire):
+  """
+  fournit les edges ordonnées d'un wire selon ExtractShapes(,,False), 
+  et l'ordre des edges selon le sens de parcours (ordre des indices de la liste d'edges)
+  """
+  logging.info("start")
+  edges = geompy.ExtractShapes(aWire, geompy.ShapeType["EDGE"], False)
+  
+  idverts = {}
+  for i, edge in enumerate(edges):
+    verts = geompy.ExtractShapes(edge, geompy.ShapeType["VERTEX"], True)
+#    idverts[(i,0)] = verts[0]
+#    idverts[(i,1)] = verts[1]
+    v0 = geompy.MakeVertexOnCurve(edge, 0.0)
+    dist = geompy.MinDistance(v0, verts[0])
+    if dist < 1.e-4:
+      idverts[(i,0)] = verts[0]
+      idverts[(i,1)] = verts[1]
+    else:
+      idverts[(i,0)] = verts[1]
+      idverts[(i,1)] = verts[0]
+     
+  idsubs = {}
+  for kv, sub in idverts.iteritems():
+    subid = geompy.GetSubShapeID(aWire, sub)
+    if subid in idsubs.keys():
+      idsubs[subid].append(kv)
+    else:
+      idsubs[subid] = [kv]
+  
+  debut = -1
+  fin = -1    
+  for k, kvs in idsubs.iteritems():
+    if len(kvs) == 1: # une extremité
+      kv = kvs[0]
+      if kv[1] == 0:
+        debut = kv[0]
+      else:
+        fin = kv[0]
+  logging.debug("nombre d'edges: %s, indice edge début: %s, fin: %s",len(edges), debut, fin)
+  if debut < 0:
+    logging.critical("les edges du wire ne sont pas orientées dans le même sens: pas de début trouvé")
+    return edges, range(len(edges))
+  
+  orderedList = [debut]
+  while len(orderedList) < len(edges):
+    bout = orderedList[-1]
+    vertex = idverts[(bout,1)]
+    for k, v in idverts.iteritems():
+      if k[0] not in orderedList:
+        if geompy.MinDistance(vertex, v) < 1.e-4:
+          if k[1] == 0:
+            orderedList.append(k[0])
+            break
+          else:
+            logging.critical("les edges du wire ne sont pas orientées dans le même sens: une edge à l'envers")
+            return edges, range(len(edges))
+
+  logging.debug("liste des edges ordonnées selon le sens de parcours: %s", orderedList)
+  accessList = range(len(orderedList))
+  for i,k in enumerate(orderedList):
+    accessList[k] = i
+  logging.info("position ordonnée des edges selon le sens de parcours: %s", accessList)
+  return edges, accessList
diff --git a/src/Tools/blocFissure/gmu/partitionBlocDefaut.py b/src/Tools/blocFissure/gmu/partitionBlocDefaut.py
new file mode 100644 (file)
index 0000000..4016c9a
--- /dev/null
@@ -0,0 +1,160 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- partition du bloc defaut par generatrice, tore et plan fissure
+
+def partitionBlocDefaut(volDefaut, facesDefaut, gener, pipe,
+                        facefis, ellipsoide):
+  """
+  Partition du bloc defaut par la generatrice de l'ellipse,
+  le tore elliptique, la face plane de fissure
+  @param volDefaut : le bloc defaut
+  @param gener : la generatrice de l'ellipse, positionnée dans l'espace
+  @param pipe : le tore partitionné par le plan de fissure, positionné
+  dans l'espace
+  @param facefis : la face plane de la fissure, positionnée dans l'espace
+  @return (volDefautPart, blocp, tore, faceFissure), le bloc partitionné,
+  les sous shapes issues de la partition
+  (le bloc moins le tore, la generatrice, le tore, la face de fissure)
+  """
+  logging.info("start")
+
+  volDefautPart = geompy.MakePartition([volDefaut], [pipe, facefis, ellipsoide], [], [], geompy.ShapeType["SOLID"], 0, [], 1)
+  blocp = geompy.GetInPlaceByHistory(volDefautPart, volDefaut)
+  #gencnt = geompy.GetInPlaceByHistory(volDefautPart, gener)
+  tore = geompy.GetInPlaceByHistory(volDefautPart, pipe)
+  faceFissure = geompy.GetInPlaceByHistory(volDefautPart, facefis)
+  #ellipsoidep =geompy.GetInPlaceByHistory(volDefautPart, ellipsoide)
+
+  geompy.addToStudy( volDefautPart, 'volDefautPart' )
+  geompy.addToStudyInFather( volDefautPart, tore, 'tore' )
+  geompy.addToStudyInFather( volDefautPart, faceFissure, 'FACE1' )
+  #geompy.addToStudyInFather( volDefautPart, gencnt, 'generatrice' )
+
+  solids = geompy.ExtractShapes(blocp, geompy.ShapeType["SOLID"], True)
+  vols = []
+  for i in range(len(solids)):
+    props = geompy.BasicProperties(solids[i])
+    vols.append(props[2])
+  maxvol = max(vols)
+  imaxvol = vols.index(maxvol)
+  blocp = solids[imaxvol]
+  vols[imaxvol] = 0
+  maxvol = max(vols)
+  imaxvol = vols.index(maxvol)
+  ellipsoidep = solids[imaxvol]
+
+  geompy.addToStudyInFather( volDefautPart, blocp, 'bloc' )
+  geompy.addToStudyInFather( volDefautPart, ellipsoidep, 'ellipsoide' )
+
+  sharedFaces = geompy.GetSharedShapesMulti([blocp, ellipsoidep], geompy.ShapeType["FACE"])
+  for i in range(len(sharedFaces)):
+    name = "faceCommuneEllipsoideBloc_%d"%i
+    geompy.addToStudyInFather(blocp, sharedFaces[i], name)
+
+  #sharedEdges = geompy.GetSharedShapesMulti([blocp, ellipsoidep], geompy.ShapeType["EDGE"])
+  allSharedEdges = geompy.GetSharedShapesMulti([blocp, ellipsoidep], geompy.ShapeType["EDGE"])
+  sharedEdges = []
+  for i in range(len(allSharedEdges)):
+    if geompy.NbShapes(allSharedEdges[i], geompy.ShapeType["VERTEX"]) > 1: # edge non degeneree
+      sharedEdges.append(allSharedEdges[i])
+  for i in range(len(sharedEdges)):
+    name = "edgeCommuneEllipsoideBloc_%d"%i
+    geompy.addToStudyInFather(blocp, sharedEdges[i], name)
+
+  facesExternes = []
+  facesExtBloc = []
+  facesExtElli = []
+  faces = geompy.ExtractShapes(facesDefaut, geompy.ShapeType["FACE"], True)
+  if len(faces) == 0:
+    faces = [facesDefaut]
+  for i in range(len(faces)):
+    faceExt = geompy.GetInPlace(ellipsoidep, faces[i])
+    if faceExt is not None:
+      name = "faceExterne_e%d"%i
+      geompy.addToStudyInFather(ellipsoidep, faceExt, name)
+      facesExternes.append(faceExt)
+      facesExtElli.append(faceExt)
+
+    faceExt = geompy.GetInPlace(blocp, faces[i])
+    if faceExt is not None:
+      name = "faceExterne_b%d"%i
+      geompy.addToStudyInFather(blocp, faceExt, name)
+      facesExternes.append(faceExt)
+      facesExtBloc.append(faceExt)
+    else:
+      logging.info("  recherche faces externes par GetShapesOnShape")
+      vertex = geompy.MakeVertexOnSurface(faces[i], 0.5, 0.5)
+      normal = geompy.GetNormal(faces[i], vertex)
+      extrusionFace = geompy.MakePrismVecH(faces[i], normal, 1)
+      #extrusionFace = geompy.MakePrismVecH2Ways(faces[i], normal, 0.1)
+      #extrusionFace = geompy.MakeScaleTransform(extrusionFace, vertex, 1.01)
+      name = "extrusionFace_b%d"%i
+      geompy.addToStudyInFather(blocp, extrusionFace, name)
+      #facesExt = geompy.GetShapesOnShape(extrusionFace, blocp, geompy.ShapeType["FACE"], GEOM.ST_ONIN)
+      facesExt = geompy.GetShapesOnShape(extrusionFace, blocp, geompy.ShapeType["FACE"], GEOM.ST_ON)
+      for j in range(len(facesExt)):
+        name = "faceExterne_b%d_%d"%(i,j)
+        geompy.addToStudyInFather(blocp, facesExt[j], name)
+        facesExternes.append(facesExt[j])
+        facesExtBloc.append(facesExt[j])
+
+  if len(facesExtBloc) < len(faces): # toutes les faces externes du bloc n'ont pas été trouvées. TODO eliminer les detections  multiples
+    logging.info("  recherche faces externes par aretes partagees avec faces externes ellipsoide")
+    facesBloc = geompy.ExtractShapes(blocp, geompy.ShapeType["FACE"], True)
+    for i in range(len(facesBloc)):
+      notOnEllipsoide = True
+      for j in range(len(sharedFaces)): # eliminer les faces communes avec l'ellipsoide
+        if facesBloc[i].IsSame(sharedFaces[j]):
+          notOnEllipsoide = False
+          break
+      if notOnEllipsoide:
+        for j in range(len(facesExtElli)): # les faces recherchees ont une ou plusieurs edge communes avec la ou les faces externes de l'ellipsoide
+          allSharedEdges = []
+          try:
+            allSharedEdges += geompy.GetSharedShapesMulti([facesBloc[i], facesExtElli[j]], geompy.ShapeType["EDGE"])
+          except:
+            pass
+          if len(allSharedEdges) > 0:
+            name = "faceExterne_b%d_%d"%(i,j)
+            geompy.addToStudyInFather(blocp, facesBloc[i], name)
+            facesExternes.append(facesBloc[i])
+            facesExtBloc.append(facesBloc[i])
+
+  aretesInternes = []
+  for i in range(len(facesExternes)):
+    for j in range(i+1,len(facesExternes)):
+      shared = []
+      try:
+        shared += geompy.GetSharedShapesMulti([facesExternes[i], facesExternes[j]], geompy.ShapeType["EDGE"])
+      except:
+        logging.info("no shared edges in %s,%s",i,j)
+      else:
+        aretesInternes += shared
+  for i in range(len(aretesInternes)):
+    name = "aretesInternes_%d"%i
+    geompy.addToStudyInFather(blocp, aretesInternes[i], name)
+
+  edgesBords = []
+  for faceExtB in facesExtBloc:
+    edges = geompy.ExtractShapes(faceExtB, geompy.ShapeType["EDGE"], True)
+    for i in range(len(edges)):
+      isInterne = False
+      for j in range(len(aretesInternes)):
+        if edges[i].IsSame(aretesInternes[j]):
+          isInterne = True
+          break
+      if not isInterne:
+        edgesBords.append(edges[i])
+        name = "edgeBord%d"%i
+        geompy.addToStudyInFather(blocp,edges[i] , name)
+  group = None
+  if len(edgesBords) > 0:
+    group = geompy.CreateGroup(blocp, geompy.ShapeType["EDGE"])
+    geompy.UnionList(group, edgesBords)
+  edgesBords = group
+
+  return volDefautPart, blocp, tore, faceFissure, facesExternes, facesExtBloc, facesExtElli, aretesInternes, ellipsoidep, sharedFaces, sharedEdges, edgesBords
diff --git a/src/Tools/blocFissure/gmu/partitionVolumeSain.py b/src/Tools/blocFissure/gmu/partitionVolumeSain.py
new file mode 100644 (file)
index 0000000..a23fa59
--- /dev/null
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- partition volume sain et bloc, face du bloc recevant la fissure
+
+def partitionVolumeSain(volumeSain,boiteDefaut):
+  """
+  Partition du volume complet sur lequel porte le calcul par le cube qui contiendra le defaut
+  @param volumeSain : volume complet (geomObject)
+  @param boiteDefaut : cube qui contiendra le defaut, positionné dans l'espace (son centre doit être au voisinage
+  immediat de la peau de l'objet sain: le tore elliptique debouche de paroi)
+  @return (volumeSainPart, partieSaine, volDefaut, faceBloc) : volume complet partionné par le cube, partie saine,
+  bloc du defaut (solide commun au cube et au volume complet), face du bloc defaut correspondant à la paroi.
+  """
+  logging.info("start")
+
+  volumeSainPart = geompy.MakePartition([volumeSain], [boiteDefaut], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
+  [a,b] = geompy.ExtractShapes(volumeSainPart, geompy.ShapeType["SOLID"], True)
+  volDefaut = geompy.GetInPlaceByHistory(volumeSainPart, boiteDefaut)
+  if geompy.GetSubShapeID(volumeSainPart,b) == geompy.GetSubShapeID(volumeSainPart,volDefaut):
+    partieSaine = a
+  else:
+    partieSaine = b
+  faceBloc = geompy.GetShapesOnShapeAsCompound(volumeSain, volDefaut, geompy.ShapeType["FACE"], GEOM.ST_ON)
+
+  geompy.addToStudy( volumeSainPart, 'volumeSainPart' )
+  geompy.addToStudyInFather( volumeSainPart, partieSaine, 'partieSaine' )
+  geompy.addToStudyInFather( volumeSainPart, volDefaut, 'volDefaut' )
+  geompy.addToStudyInFather( volDefaut, faceBloc, 'faceBloc' )
+  return volumeSainPart, partieSaine, volDefaut, faceBloc
diff --git a/src/Tools/blocFissure/gmu/peauInterne.py b/src/Tools/blocFissure/gmu/peauInterne.py
new file mode 100644 (file)
index 0000000..6790061
--- /dev/null
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import smesh
+import SMESH
+
+# -----------------------------------------------------------------------------
+# --- peau interne du defaut dans le maillage sain
+
+def peauInterne(fichierMaillage, nomZones):
+  """
+  Retrouve les groupes de défaut dans le maillage sain modifié par CreateHoleSkin (CreeZoneDefautMaillage)
+  On récupère le volume et la peau de la zone de défaut, les éventuelles faces et arêtes internes de cette zone.
+  """
+  logging.info("start")
+  ([maillageSain], status) = smesh.CreateMeshesFromMED(fichierMaillage)
+
+  groups = maillageSain.GetGroups()
+  zoneDefaut = None
+  for grp in groups:
+    #print " ",grp.GetName()
+    if grp.GetName() == nomZones + "_vol":
+      zoneDefaut = grp
+      break
+  zoneDefaut_skin = None
+  for grp in groups:
+    if grp.GetName() == nomZones + "_skin":
+      zoneDefaut_skin = grp
+      break
+  zoneDefaut_internalFaces = None
+  for grp in groups:
+    if grp.GetName() == nomZones + "_internalFaces":
+      zoneDefaut_internalFaces = grp
+      break
+  zoneDefaut_internalEdges = None
+  for grp in groups:
+    if grp.GetName() == nomZones + "_internalEdges":
+      zoneDefaut_internalEdges = grp
+      break
+
+  nbAdded, maillageSain, DefautBoundary = maillageSain.MakeBoundaryElements( SMESH.BND_2DFROM3D, 'DefBound', '', 0, [ zoneDefaut ])
+  internal = maillageSain.GetMesh().CutListOfGroups( [ DefautBoundary ], [ zoneDefaut_skin ], 'internal' )
+  internalBoundary = smesh.CopyMesh( internal, 'internalBoundary', 0, 0)
+
+  return maillageSain, internalBoundary, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges
+
diff --git a/src/Tools/blocFissure/gmu/produitMixte.py b/src/Tools/blocFissure/gmu/produitMixte.py
new file mode 100644 (file)
index 0000000..509a758
--- /dev/null
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- calcul de produit mixte pour orientation
+
+def produitMixte(o, p1, p2, p3):
+  """
+  produit mixte de 3 vecteurs a partir d'une origine et 3 points
+  """
+  coordo = geompy.PointCoordinates(o)
+  coordp1 = geompy.PointCoordinates(p1)
+  coordp2 = geompy.PointCoordinates(p2)
+  coordp3 = geompy.PointCoordinates(p3)
+  u = [coordp1[0] - coordo[0], coordp1[1] - coordo[1], coordp1[2] - coordo[2]]
+  v = [coordp2[0] - coordo[0], coordp2[1] - coordo[1], coordp2[2] - coordo[2]]
+  w = [coordp3[0] - coordo[0], coordp3[1] - coordo[1], coordp3[2] - coordo[2]]
+  pm = (u[0]*v[1]*w[2] + v[0]*w[1]*u[2] + w[0]*u[1]*v[2]) - (u[0]*w[1]*v[2] + v[0]*u[1]*w[2] + w[0]*v[1]*u[2])
+  logging.debug('pm=%s', pm)
+  return pm
+
diff --git a/src/Tools/blocFissure/gmu/projettePointSurCourbe.py b/src/Tools/blocFissure/gmu/projettePointSurCourbe.py
new file mode 100644 (file)
index 0000000..fa43d39
--- /dev/null
@@ -0,0 +1,59 @@
+# -*- coding: utf-8 -*-
+
+from geomsmesh import geompy
+import logging
+import math
+
+# -----------------------------------------------------------------------------
+# --- projection d'un point sur une courbe.
+
+def projettePointSurCourbe(pt, edge):
+  """
+  projection d'un point p sur une courbe c
+  on suppose que la distance (c(u), p) passe par un minimum quand u varie entre 0 et 1
+  et qu'elle presente pas de minimum local 
+  """
+  #logging.debug("start")
+
+  dist = []
+  nbSlices = 50
+  du = 1.0/nbSlices
+  for i in range(nbSlices + 1):
+    p = geompy.MakeVertexOnCurve(edge, du*i)
+    d = geompy.MinDistance(p,pt)
+    dist.append((d,i))
+  dist.sort()
+  #logging.debug("dist %s", dist)
+  umin = du*dist[0][1]
+  umax = du*dist[1][1]
+  #umin = 0.0
+  #umax = 1.0
+  tol = 1.e-8
+  pmin = geompy.MakeVertexOnCurve(edge, umin)
+  pmax = geompy.MakeVertexOnCurve(edge, umax)
+  dmin = geompy.MinDistance(pmin,pt)
+  dmax = geompy.MinDistance(pmax,pt)
+  dext = geompy.MinDistance(pmin,pmax)
+  i=0
+  while dext > tol and i < 100 :
+    i = i+1
+    utest = (umax + umin) / 2.0
+    ptest = geompy.MakeVertexOnCurve(edge, utest)   
+    dtest = geompy.MinDistance(ptest,pt)
+    if dmin < dmax:
+      umax = utest
+      pmax = ptest
+      dmax = dtest
+    else:
+      umin = utest
+      pmin = ptest
+      dmin = dtest
+    dext = geompy.MinDistance(pmin,pmax)
+    #logging.debug('umin=%s umax=%s dmin=%s dmax=%s dtest=%s dext=%s', umin,umax,dmin,dmax,dtest,dext)
+  if abs(utest) < 1.e-7:
+    utest = 0.0
+  if abs(1.0-utest) < 1.e-7:
+    utest = 1.0
+  logging.debug('u=%s, nbiter=%s dtest=%s dext=%s',utest,i,dtest,dext)
+  return utest
+    
\ No newline at end of file
diff --git a/src/Tools/blocFissure/gmu/prolongeVertices.py b/src/Tools/blocFissure/gmu/prolongeVertices.py
new file mode 100644 (file)
index 0000000..e6e6f03
--- /dev/null
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- prolongation des segments extremité des polylines, pour la découpe
+
+def prolongeVertices(vertices):
+  """
+  Prolongation des segments extremité d'une polyline définie par un vecteur de points.
+  Chaque nouvelle extremité est obtenue par symétrie point du voisin de cette ancienne extrémité
+  (symétrie de centre l'ancienne extrémite) : les segments extremes sont doublés.
+  @param vertices : liste ordonnée des points (geomObject) de la polyline
+  @return vertices : liste avec les deux extremités modifiées
+  """
+  logging.info("start")
+  if len(vertices) < 2:
+    return vertices
+  v0 = vertices[0]
+  v1 = vertices[1]
+  m0 = geompy.MakeMirrorByPoint(v1, v0)
+  ve = vertices[-1]
+  vd = vertices[-2]
+  m1 = geompy.MakeMirrorByPoint(vd, ve)
+  vertices[0] = m0
+  vertices[-1] = m1
+  return vertices
diff --git a/src/Tools/blocFissure/gmu/prolongeWire.py b/src/Tools/blocFissure/gmu/prolongeWire.py
new file mode 100644 (file)
index 0000000..72e766d
--- /dev/null
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- prolongation d'un wire par deux segments tangents
+
+def prolongeWire(aWire, extrem, norms, long):
+  """
+  """
+  logging.info("start")
+  if geompy.NumberOfEdges(aWire) > 1:
+    edges = geompy.ExtractShapes(aWire, geompy.ShapeType["EDGE"])
+  else:
+    edges = [aWire]
+  for i, v1 in enumerate(extrem):
+    exts = [geompy.MakeTranslationVectorDistance(v1, norms[i], l) for l in (-long, long)]
+    dists = [(geompy.MinDistance(v, aWire), i , v) for i, v in enumerate(exts)]
+    dists.sort()
+    v2 = dists[-1][-1]
+    #v2 = geompy.MakeTranslationVectorDistance(v1, norms[i], long)
+    edge = geompy.MakeEdge(v1, v2)
+    edges.append(edge)
+    name = "extrem%d"%i
+    #geompy.addToStudy(edge,name)
+  wireProlonge = geompy.MakeWire(edges)
+  geompy.addToStudy(wireProlonge, "wireProlonge")
+  return wireProlonge
diff --git a/src/Tools/blocFissure/gmu/propagateTore.py b/src/Tools/blocFissure/gmu/propagateTore.py
new file mode 100644 (file)
index 0000000..70678a4
--- /dev/null
@@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- recherche et classement des edges du tore par propagate
+
+def propagateTore(tore):
+  """
+  Classement des edges du tore par une operation 'propagate'
+  @param tore partionné et coupé
+  @return (diams, circles, geners) edges dans le plan de fissure, edges demi circulaires,
+  edges selon la generatrice (liste de compounds)
+  """
+  logging.info("start")
+
+  lencomp = []
+  compounds = geompy.Propagate(tore)
+  for i in range(len(compounds)):
+    #geompy.addToStudyInFather( tore, compounds[i], 'edges' )
+    props = geompy.BasicProperties(compounds[i])
+    lencomp.append(props[0])
+    pass
+  minlen = min(lencomp)
+  maxlen = max(lencomp)
+  diams = []
+  geners = []
+  circles = []
+  for i in range(len(lencomp)):
+    if (lencomp[i]- minlen)/minlen < 0.01 :
+      diams.append(compounds[i])
+    elif (maxlen - lencomp[i])/lencomp[i] < 0.2 :
+      geners.append(compounds[i])
+    else:
+      circles.append(compounds[i])
+
+  geompy.addToStudyInFather( tore, diams[0], 'diams0' )
+  geompy.addToStudyInFather( tore, diams[1], 'diams1' )
+  geompy.addToStudyInFather( tore, circles[0], 'circles0' )
+  geompy.addToStudyInFather( tore, circles[1], 'circles1' )
+  geompy.addToStudyInFather( tore, geners[0], 'geners' )
+
+  return diams, circles, geners
diff --git a/src/Tools/blocFissure/gmu/putName.py b/src/Tools/blocFissure/gmu/putName.py
new file mode 100644 (file)
index 0000000..b8d4cbf
--- /dev/null
@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+
+from geomsmesh import smesh
+
+# -----------------------------------------------------------------------------
+# --- nommage des objets mesh (algorithme, hypothèse, subMesh)
+
+def putName(objmesh,name, i=-1):
+  if i >= 0:
+    suffix = "_%d"%i
+    name += suffix
+  smesh.SetName(objmesh, name)
+
diff --git a/src/Tools/blocFissure/gmu/quadranglesToShape.py b/src/Tools/blocFissure/gmu/quadranglesToShape.py
new file mode 100644 (file)
index 0000000..faa9478
--- /dev/null
@@ -0,0 +1,323 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+import GEOM
+import math
+import numpy as np
+
+def mydot(a):
+  return np.dot(a,a)
+
+# -----------------------------------------------------------------------------
+# --- groupe de quadrangles de face transformé en face géométrique par filling
+
+def quadranglesToShape(meshQuad, shapeFissureParams, centreFondFiss):
+  """
+  groupe de quadrangles de face transformée en faces géométriques par filling
+  on part de quadrangles définissant une zone a 4 cotés (convexe), et on reconstitue n lignes de p points.
+  Ces n lignes de p points sont transformées en n courbes géométriques,
+  à partir desquelles on reconstitue une surface géométrique.
+  Il peut y avoir plusieurs faces géométriques reconstituées, si on fournit des groupes de quadrangles non connexes.
+  On détecte les angles vifs, pour conserver des arêtes vives délimitant des faces connexes.
+  @param meshQuad : maillages constitué de quadrangles constituant une ou plusieurs zones convexes
+  @return (fillings, noeuds_Bords) : liste de geomObject, listes des bords (bord = liste ordonnée de noeuds (geomObject))
+  """
+  logging.info("start")
+
+  isVecteurDefaut = False
+  if shapeFissureParams.has_key('vecteurDefaut'):
+    isVecteurDefaut = True
+    vecteurDefaut = shapeFissureParams['vecteurDefaut']
+
+  fillings = []       # les faces reconstituées, découpées selon les arêtes vives
+  noeuds_bords = []   #
+  bords_Partages = [] # contient a la fin les courbes correspondant aux arêtes vives
+  fillconts = []      # les faces reconstituées, sans découpage selon les arêtes vives
+  idFilToCont = []    # index face découpée vers face sans découpe
+  iface = 0           # index face découpée
+  icont = 0           # index face continue
+  
+  allNodeIds = meshQuad.GetNodesId()
+  while len(allNodeIds):
+    nodeIds = allNodeIds
+    for idNode in nodeIds: # rechercher un coin
+      elems = meshQuad.GetNodeInverseElements(idNode)
+      if len(elems) == 1:
+        # un coin: un noeud, un element quadrangle
+        elem = elems[0]
+        break;
+    idStart = idNode # le noeud de coin
+    elemStart = elem # l'élément quadrangle au coin
+    xyz = meshQuad.GetNodeXYZ(idStart)
+    logging.debug("idStart %s, coords %s", idStart, str(xyz))
+  
+    nodelines =[] # on va constituer une liste de lignes de points
+    nextLine = True
+    ligneFinale = False
+    while nextLine:
+      logging.debug("--- une ligne")
+      idNode = idStart
+      elem = elemStart
+      if ligneFinale:
+        agauche = False      # sens de parcours des 4 noeuds d'un quadrangle
+        nextLine = False
+      else:
+        agauche = True
+      ligneIncomplete = True # on commence une ligne de points
+      debutLigne = True
+      nodeline = []
+      elemline = []
+      while ligneIncomplete: # compléter la ligne de points
+        nodeline.append(idNode)
+        allNodeIds.remove(idNode)
+        elemline.append(elem)
+        nodes = meshQuad.GetElemNodes(elem)
+        i = nodes.index(idNode) # repérer l'index du noeud courant (i) dans l'élément quadrangle (0 a 3)
+        if agauche:             # déterminer le noeud suivant (j) et celui opposé (k) dans le quadrangle
+          if i < 3:
+            j = i+1
+          else:
+            j = 0
+          if j < 3:
+            k = j+1
+          else:
+            k = 0
+        else:
+          if i > 0:
+            j = i -1
+          else:
+            j = 3
+          if j > 0:
+            k = j -1
+          else:
+            k = 3
+        isuiv = nodes[j]   #noeud suivant
+        iapres = nodes[k]  #noeud opposé
+        if debutLigne:
+          debutLigne = False
+          # précédent a trouver, dernière ligne : précédent au lieu de suivant
+          if agauche:
+            if i > 0:
+              iprec = nodes[i -1]
+            else:
+              iprec = nodes[3]
+            idStart = iprec
+            elems3 = meshQuad.GetNodeInverseElements(iprec)
+            if len(elems3) == 1: # autre coin
+              ligneFinale = True
+            else:
+              for elem3 in elems3:
+                if elem3 != elem:
+                  elemStart = elem3
+                  break
+        #print nodes, idNode, isuiv, iapres
+        elems1 = meshQuad.GetNodeInverseElements(isuiv)
+        elems2 = meshQuad.GetNodeInverseElements(iapres)
+        ligneIncomplete = False
+        for elem2 in elems2:
+          if elems1.count(elem2) and elem2 != elem:
+            ligneIncomplete = True
+            idNode = isuiv
+            elem = elem2
+            break
+        if not  ligneIncomplete:
+          nodeline.append(isuiv)
+          allNodeIds.remove(isuiv)
+      logging.debug("nodeline %s", nodeline)
+      logging.debug("elemline %s", elemline)
+      nodelines.append(nodeline)
+       
+    # on a constitué une liste de lignes de points connexes
+    logging.debug("dimensions [%s, %s]", len(nodelines),  len(nodeline))   
+    
+    # stockage des coordonnées dans un tableau numpy
+    mat = np.zeros((len(nodelines), len(nodeline), 3))
+    for i, ligne in enumerate(nodelines):
+      for j, nodeId in enumerate(ligne):
+        mat[i,j] = meshQuad.GetNodeXYZ(nodeId)
+    logging.debug("matrice de coordonnées: \n%s",mat)
+    logging.debug("dimensions %s", mat.shape)
+    
+    # recherche d'angles supérieurs a un seuil sur une ligne : angle entre deux vecteurs successifs
+    cosmin = math.cos(math.pi/4.)          # TODO: angle reference en paramètre
+    vecx = mat[:, 1:,  :] - mat[:, :-1, :] # vecteurs selon direction "x"
+    vx0 = vecx[:, :-1, :]                  # vecteurs amont
+    vx1 = vecx[:, 1:,  :]                  # vecteurs aval
+    e = np.einsum('ijk,ijk->ij', vx0, vx1) # produit scalaire des vecteurs
+    f = np.apply_along_axis(mydot, 2, vx0) # normes carrées vecteurs amont
+    g = np.apply_along_axis(mydot, 2, vx1) # normes carrées vecteurs aval
+    h = e/(np.sqrt(f*g))                   # cosinus
+    ruptureX = h < cosmin                  # True si angle > reference
+    logging.debug("matrice de rupture X: \n%s",ruptureX)
+    rupX = filter(lambda x: np.prod(ruptureX[:,x]), range(len(nodeline)-2))
+    logging.debug("colonnes de rupture: %s",rupX)
+    # recherche d'angles supérieurs a un seuil sur une colonne : angle entre deux vecteurs successifs
+    vecy = mat[ 1:, :, :] - mat[:-1, :, :] # vecteurs selon direction "y"
+    vy0 = vecy[:-1, :, :]                  # vecteurs amont
+    vy1 = vecy[ 1:, :, :]                  # vecteurs aval
+    e = np.einsum('ijk,ijk->ij', vy0, vy1) # produit scalaire des vecteurs
+    f = np.apply_along_axis(mydot, 2, vy0) # normes carrées vecteurs amont
+    g = np.apply_along_axis(mydot, 2, vy1) # normes carrées vecteurs aval
+    h = e/(np.sqrt(f*g))                   # cosinus
+    ruptureY = h < cosmin                  # True si angle > reference
+    logging.debug("matrice de rupture Y: \n%s",ruptureY)
+    rupY = filter(lambda x: np.prod(ruptureY[x, :]), range(len(nodelines)-2))
+    logging.debug("lignes de rupture: %s",rupY)
+    if (len(rupX)*len(rupY)) > 0:
+      logging.critical("""Cas non traité: présence d'angles vifs dans 2 directions, 
+      lors de la reconstitution des faces géométriques dans la zone remaillée""")
+    
+    mats = []
+    bordsPartages = []
+    if (len(rupX)> 0):
+      rupX.append(mat.shape[1]-1)
+      for i, index in enumerate(rupX):
+        imax = index+2
+        imin = 0
+        if i > 0:
+          imin = rupX[i-1] + 1
+        mats.append(mat[:, imin:imax, :])
+        if imax == mat.shape[1] + 1:
+          ifin = 0
+        else:
+          ifin = imax
+        bordsPartages.append([imin,ifin]) # les indices différents de 0 correspondent à des bords partagés
+    elif (len(rupY)> 0):
+      rupY.append(mat.shape[0]-1)
+      for i, index in enumerate(rupY):
+        imax = index+2
+        imin = 0
+        if i > 0:
+          imin = rupY[i-1] + 1
+        mats.append(mat[imin:imax, :, :])
+        if imax == mat.shape[0] + 1:
+          ifin = 0
+        else:
+          ifin = imax
+        bordsPartages.append([imin,ifin]) # les indices différents de 0 correspondent à des bords partagés
+    else:
+      mats.append(mat)
+      bordsPartages.append([0,0])         # les indices différents de 0 correspondent à des bords partagés
+    
+    curvconts = []
+    for nmat, amat in enumerate(mats):
+      logging.debug("dimensions matrice %s: %s", nmat, amat.shape)
+      nbLignes = amat.shape[1] # pas de rupture, ou rupture selon des colonnes: on transpose
+      nbCols = amat.shape[0]
+      if len(rupY) > 0 :       # rupture selon des lignes: pas de transposition
+        nbLignes = amat.shape[0]
+        nbCols = amat.shape[1]
+      curves = []
+      noeudsBords = []
+      for i in range(4):
+        noeudsBords.append([])
+      k = 0
+      for i in range(nbLignes):
+        nodeList = []
+        for j in range(nbCols):
+          #logging.debug("point[%s,%s] = (%s, %s, %s)",i,j,amat[i,j,0], amat[i,j,1], amat[i,j,2])
+          if len(rupY) > 0 : # pas de transposition
+            node = geompy.MakeVertex(amat[i,j,0], amat[i,j,1], amat[i,j,2])
+          else:              # transposition
+            node = geompy.MakeVertex(amat[j,i,0], amat[j,i,1], amat[j,i,2])
+          nodeList.append(node)
+          if i == 0:
+            noeudsBords[0].append(node)
+            #name = "bord0_%d"%k
+            #geompy.addToStudy( node, name )
+          if i == (nbLignes -1):
+            noeudsBords[2].append(node)
+            #name = "bord2_%d"%k
+            #geompy.addToStudy( node, name )
+          if j == 0:
+            noeudsBords[1].append(node)
+            #name = "bord1_%d"%k
+            #geompy.addToStudy( node, name )
+          if j == (nbCols -1):
+            noeudsBords[3].append(node)
+            #name = "bord3_%d"%k
+            #geompy.addToStudy( node, name )
+            k += 1
+        curve = geompy.MakeInterpol(nodeList, False, False)
+        #name = "curve_%d"%i
+        #geompy.addToStudy( curve, name )
+        if len(curvconts) == 0 or len(curves) > 0: # éliminer les doublons de la surface sans découpe 
+          curvconts.append(nodeList)
+        curves.append(curve)
+      if bordsPartages[nmat][0] :
+        bordsPartages[nmat][0] = curves[0]  # la première ligne est un bord partagé
+      else:
+        bordsPartages[nmat][0] = None
+      if bordsPartages[nmat][1] :
+        bordsPartages[nmat][1] = curves[-1] # la dernière ligne est un bord partagé
+      else:
+        bordsPartages[nmat][1] = None
+      filling = geompy.MakeFilling(geompy.MakeCompound(curves), 2, 5, 0.0001, 0.0001, 0, GEOM.FOM_Default, True)
+      # --- test orientation filling
+      vertex = geompy.MakeVertexOnSurface(filling, 0.5, 0.5)
+      normal = geompy.GetNormal(filling, vertex)
+
+      if centreFondFiss is not None:
+        logging.debug("orientation filling a l'aide du centre de fond de fissure")
+        vecteurDefaut = geompy.MakeVector(centreFondFiss, vertex)
+        
+      if not isVecteurDefaut:
+        pointIn_x = 0.0
+        pointIn_y = 0.0
+        pointIn_z = 0.0
+        pointExplicite = False
+        if shapeFissureParams.has_key('pointIn_x'):
+          pointExplicite = True
+          pointIn_x = shapeFissureParams['pointIn_x']
+        if shapeFissureParams.has_key('pointIn_y'):
+          pointExplicite = True
+          pointIn_y = shapeFissureParams['pointIn_y']
+        if shapeFissureParams.has_key('pointIn_z'):
+          pointExplicite = True
+          pointIn_z = shapeFissureParams['pointIn_z']
+        if pointExplicite:
+          cdg = geompy.MakeVertex(pointIn_x, pointIn_y, pointIn_z)
+          logging.debug("orientation filling par point intérieur %s", (pointIn_x, pointIn_y, pointIn_z))
+          vecteurDefaut = geompy.MakeVector(cdg, vertex)
+        
+      if shapeFissureParams.has_key('convexe'):
+        isConvexe = shapeFissureParams['convexe']
+        logging.debug("orientation filling par indication de convexité %s", isConvexe)
+        cdg = geompy.MakeCDG(filling)
+        if isConvexe:
+          vecteurDefaut = geompy.MakeVector(cdg, vertex)
+        else:
+          vecteurDefaut = geompy.MakeVector(vertex, cdg)
+     
+      if vecteurDefaut is not None:
+        geompy.addToStudy(normal, "normFillOrig%d"%iface)
+        geompy.addToStudy(vecteurDefaut, "fromInterieur%d"%iface)
+        if geompy.GetAngleRadians(vecteurDefaut, normal) > math.pi/2.0:
+          filling = geompy.ChangeOrientation(filling)
+      geompy.addToStudy( filling, "filling%d"%iface )
+      #geompy.ExportBREP(filling, "filling.brep")
+      iface = iface+1
+      fillings.append(filling)
+      noeuds_bords.append(noeudsBords)
+      idFilToCont.append(icont)
+      bords_Partages += bordsPartages
+      pass # --- loop on mats
+    # --- reconstruction des faces continues à partir des listes de noeuds
+    #     les courbes doivent suivre la courbure pour éviter les oscillations
+    if icont == iface - 1: # pas de découpe, on garde la même face
+      fillcont = fillings[-1]
+    else:
+      nbLignes = len(curvconts[0])
+      curves = []
+      for i in range(nbLignes):
+        nodes = [curvconts[j][i] for j in range(len(curvconts))]
+        curve = geompy.MakeInterpol(nodes, False, False)
+        curves.append(curve)
+      fillcont = geompy.MakeFilling(geompy.MakeCompound(curves), 2, 5, 0.0001, 0.0001, 0, GEOM.FOM_Default, True)
+    geompy.addToStudy( fillcont, "filcont%d"%icont )
+    fillconts.append(fillcont)
+    icont = icont+1   
+    pass   # --- loop while there are remaining nodes
+  
+  return fillings, noeuds_bords, bords_Partages, fillconts, idFilToCont
diff --git a/src/Tools/blocFissure/gmu/regroupeSainEtDefaut.py b/src/Tools/blocFissure/gmu/regroupeSainEtDefaut.py
new file mode 100644 (file)
index 0000000..7acbe4c
--- /dev/null
@@ -0,0 +1,85 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import smesh
+import SMESH
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- maillage complet et fissure
+
+def RegroupeSainEtDefaut(maillageSain, blocComplet, extrusionFaceFissure, faceGeomFissure, nomVolume, normal = None):
+  """
+  Maillage sain sans la zone de defaut
+  TODO: a completer
+  """
+  logging.info('Concatenation')
+
+  maillageComplet = smesh.Concatenate([maillageSain.GetMesh(), blocComplet.GetMesh()], 1, 1, 1e-05,False)
+
+  groups = maillageComplet.GetGroups()
+  grps = [ grp for grp in groups if grp.GetName() == 'FACE1']
+  faceFissure = grps[0]
+  grps = [ grp for grp in groups if grp.GetName() == 'nfondfis']
+  noeudsFondFissure = grps[0]
+  grps = [ grp for grp in groups if grp.GetName() == 'fisInPi']
+  fisInPi = grps[0]
+  grps = [ grp for grp in groups if grp.GetName() == 'fisOutPi']
+  fisOutPi = grps[0]
+
+  # --- TODO: fiabiliser l'orientation dans le cas general
+  if normal is None:
+    normal  = smesh.MakeDirStruct( 0, 0, 1 )
+  maillageComplet.Reorient2D( fisInPi,  normal, [0,0,0])
+  maillageComplet.Reorient2D( fisOutPi, normal, [0,0,0])
+    
+  shapes = []
+  if extrusionFaceFissure is not None:
+    subIds = geompy.SubShapeAllIDs(extrusionFaceFissure, geompy.ShapeType["SOLID"])
+    if len(subIds) > 1:
+      shapes = geompy.ExtractShapes(extrusionFaceFissure, geompy.ShapeType["SOLID"], False)
+    else:
+      shapes = [extrusionFaceFissure]
+#  else:
+#    subIds = geompy.SubShapeAllIDs(faceGeomFissure, geompy.ShapeType["FACE"])
+#    if len(subIds) > 1:
+#      shapes = geompy.ExtractShapes(faceGeomFissure, geompy.ShapeType["FACE"], False)
+#    else:
+#      shapes = [faceGeomFissure]
+    
+  grpEdges = []
+  grpFaces = []
+  grpVolumes = []
+  if len(shapes) == 0:
+    shapes = [None] # calcul uniquement avec les normales des faces mailles de la fissure
+  for i, aShape in enumerate(shapes):
+    logging.info('Detection elements affectes par le dedoublement de la face %d'%i)
+    affectedGroups = maillageComplet.AffectedElemGroupsInRegion([faceFissure], [noeudsFondFissure], aShape)
+    grps = [ grp for grp in affectedGroups if grp.GetName() == 'affectedEdges']
+    affectedEdges = grps[0]
+    affectedEdges.SetName('affEd%d'%i)
+    grpEdges.append(affectedEdges)
+    grps = [ grp for grp in affectedGroups if grp.GetName() == 'affectedFaces']
+    affectedFaces = grps[0]
+    affectedFaces.SetName('affFa%d'%i)
+    grpFaces.append(affectedFaces)
+    grps = [ grp for grp in affectedGroups if grp.GetName() == 'affectedVolumes']
+    affectedVolumes = grps[0]
+    affectedVolumes.SetName('affVo%d'%i)
+    grpVolumes.append(affectedVolumes)
+  logging.info("union des groupes d'edges") 
+  affectedEdges = maillageComplet.UnionListOfGroups(grpEdges, 'affEdges')
+  logging.info("union des groupes de faces") 
+  affectedFaces = maillageComplet.UnionListOfGroups(grpFaces, 'affFaces')
+  logging.info("union des groupes de volumes") 
+  affectedVolumes = maillageComplet.UnionListOfGroups(grpVolumes, 'affVols')
+  for grp in affectedGroups:
+    logging.debug("nom groupe %s",grp.GetName())
+  [ FACE2, FACE2_nodes ] = maillageComplet.DoubleNodeElemGroups([faceFissure], [noeudsFondFissure], affectedGroups, True, True)
+  FACE2.SetName( 'FACE2' )
+
+  GroupVol = maillageComplet.CreateEmptyGroup( SMESH.VOLUME, nomVolume )
+  nbAdd = GroupVol.AddFrom( maillageComplet.GetMesh() )
+
+  return maillageComplet
+
diff --git a/src/Tools/blocFissure/gmu/rotTrans.py b/src/Tools/blocFissure/gmu/rotTrans.py
new file mode 100644 (file)
index 0000000..7b8ff6e
--- /dev/null
@@ -0,0 +1,57 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+import math
+from triedreBase import triedreBase
+O, OX, OY, OZ = triedreBase()
+
+# -----------------------------------------------------------------------------
+# --- operateur de rotation translation d'un objet centré à l'origine
+
+def rotTrans(objet, orientation, point, normal, trace = False):
+  """
+  Déplacement par rotation translation d'un objet centré à l'origine, vers un point de la surface de la pièce saine
+  dans laquelle on insère le défaut.
+  @param objet : objet original centré à l'origine (geomObject)
+  @param orientation : rotation selon OX de l'objet original (degrés)
+  @param point : le point qui sera le centre de l'objet déplacé (geomObject), en général sur la surface de la pièce saine
+  @param normal : la normale à la surface de la pièce saine au point central (geomObject)
+  @return trans : objet transformé (geomObject)
+  """
+  logging.info("start")
+  planXY = geompy.MakePlaneLCS(None, 2000, 1)
+  projXY = geompy.MakeProjection(normal, planXY)
+  [v1,v2] = geompy.ExtractShapes(projXY, geompy.ShapeType["VERTEX"], False)
+  xyz1 = geompy.PointCoordinates(v1)
+  xyz2 = geompy.PointCoordinates(v2)
+  x = xyz2[0] - xyz1[0]
+  y = xyz2[1] - xyz1[1]
+  sinalpha = y / math.sqrt(x*x + y*y)
+  cosalpha = x / math.sqrt(x*x + y*y)
+  alpha = math.asin(sinalpha)
+  if cosalpha < 0:
+    alpha = math.pi -alpha
+
+  beta = geompy.GetAngleRadians(OZ, normal)
+  [v1,v2] = geompy.ExtractShapes(normal, geompy.ShapeType["VERTEX"], False)
+  xyz1 = geompy.PointCoordinates(v1)
+  xyz2 = geompy.PointCoordinates(v2)
+  z = xyz2[2] - xyz1[2]
+  if z < 0:
+    beta = math.pi -beta
+
+  rot0 = geompy.MakeRotation(objet, OX, orientation*math.pi/180.0)
+  rot1 = geompy.MakeRotation(rot0, OZ, alpha)
+  axe2 = geompy.MakeRotation(OY, OZ, alpha)
+  rot2 = geompy.MakeRotation(rot1, axe2, beta -math.pi/2.)
+  logging.debug("alpha",alpha)
+  logging.debug("beta",beta)
+  if trace:
+    geompy.addToStudy( rot1, 'rot1' )
+    geompy.addToStudy( axe2, 'axe2' )
+    geompy.addToStudy( rot2, 'rot2' )
+
+  xyz = geompy.PointCoordinates(point)
+  trans = geompy.MakeTranslation(rot2, xyz[0], xyz[1], xyz[2])
+  return trans
diff --git a/src/Tools/blocFissure/gmu/shapeSurFissure.py b/src/Tools/blocFissure/gmu/shapeSurFissure.py
new file mode 100644 (file)
index 0000000..10b125f
--- /dev/null
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- construction d'une shape de dectection des éléments à modifier suite à la la duplication des noeuds de la face fissure (d'un coté de la face)
+
+def shapeSurFissure(facesFissure):
+  """
+  TODO: a completer, Normaliser les vecteurs et ponderer par les surfaces...
+  """
+  logging.info('start')
+  normal = None
+  subIds = geompy.SubShapeAllIDs(facesFissure, geompy.ShapeType["FACE"])
+  if len(subIds) > 1:
+    logging.debug("plusieurs faces de fissure")
+    faces = geompy.ExtractShapes(facesFissure, geompy.ShapeType["FACE"], False)
+    extrusions = []
+    for n,face in enumerate(faces):
+      vertex = geompy.MakeVertexOnSurface(face, 0.5, 0.5)
+      normal = geompy.GetNormal(face, vertex)
+      extrusion = geompy.MakePrismVecH(face, normal, 100)
+      extrusions.append(extrusion)
+    extrusionFaceFissure = geompy.MakeCompound(extrusions)
+  else:
+    logging.debug("une seule face de fissure")
+    face = facesFissure
+    vertex = geompy.MakeVertexOnSurface(face, 0.5, 0.5)
+    normal = geompy.GetNormal(face, vertex)
+    extrusionFaceFissure = geompy.MakePrismVecH(facesFissure, normal, 100)
+    
+  geompy.addToStudy(extrusionFaceFissure, "extrusionFaceFissure")
+  return extrusionFaceFissure, normal
+
diff --git a/src/Tools/blocFissure/gmu/shapesSurFissure.py b/src/Tools/blocFissure/gmu/shapesSurFissure.py
new file mode 100644 (file)
index 0000000..a8a98a1
--- /dev/null
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- identification des shapes modifiées par la duplication des noeuds de la face fissure (d'un coté de la face)
+
+def shapesSurFissure(blocPartition, plane1, faceFissure, gencnt):
+  """
+  TODO: a completer
+  """
+  logging.info('start')
+
+  shapesAModifier = []
+  vertex = geompy.MakeVertexOnSurface(plane1, 0.5, 0.5)
+  normal = geompy.GetNormal(plane1, vertex)
+  extrusion = geompy.MakePrismVecH(plane1, normal, 100)
+
+  sharedSolids = []
+  solids= geompy.GetShapesOnBox ( extrusion, blocPartition, geompy.ShapeType("SOLID"), GEOM.ST_ONIN )
+  for solid in solids:
+    sharedSolids += geompy.GetSharedShapes(faceFissure, solid, geompy.ShapeType["SOLID"])
+  logging.debug("sharedSolids %s",sharedSolids)
+
+  sharedFaces = []
+  faces= geompy.GetShapesOnBox ( extrusion, blocPartition, geompy.ShapeType("FACE"), GEOM.ST_ONIN )
+  for face in faces:
+    sharedFaces += geompy.GetSharedShapes(faceFissure, face, geompy.ShapeType["FACE"])
+  logging.debug("sharedFaces %s",sharedFaces)
+
+  sharedEdges = []
+  edges= geompy.GetShapesOnBox ( extrusion, blocPartition, geompy.ShapeType("EDGE"), GEOM.ST_ONIN )
+  for edge in edges:
+    if not edge.IsSame(gencnt):
+      sharedEdges += geompy.GetSharedShapes(faceFissure, edge, geompy.ShapeType["EDGE"])
+  logging.debug("sharedEdges %s",sharedEdges)
+
+  shapesAModifier = [ sharedSolids, sharedFaces, sharedEdges]
+  return shapesAModifier
diff --git a/src/Tools/blocFissure/gmu/sortEdges.py b/src/Tools/blocFissure/gmu/sortEdges.py
new file mode 100644 (file)
index 0000000..6d633f7
--- /dev/null
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- tri par longueur d'edges
+
+def sortEdges(edgesToSort):
+  """
+  tri des edges par longueur
+  """
+  logging.info('start')
+
+  lenEdges = [(geompy.BasicProperties(edge)[0], i, edge) for i, edge in enumerate(edgesToSort)]
+  lenEdges.sort()
+  edgesSorted = [edge for length, i, edge in lenEdges]
+  return edgesSorted, lenEdges[0][0], lenEdges[-1][0]
+
diff --git a/src/Tools/blocFissure/gmu/sortFaces.py b/src/Tools/blocFissure/gmu/sortFaces.py
new file mode 100644 (file)
index 0000000..0fe962e
--- /dev/null
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- tri par surface de faces
+
+def sortFaces(facesToSort):
+  """
+  tri des faces par surface
+  """
+  logging.info('start')
+
+  surFaces = [(geompy.BasicProperties(face)[1], i, face) for i, face in enumerate(facesToSort)]
+  surFaces.sort()
+  facesSorted = [face for surf, i, face in surFaces]
+  return facesSorted, surFaces[0][0], surFaces[-1][0]
+
diff --git a/src/Tools/blocFissure/gmu/sortGeneratrices.py b/src/Tools/blocFissure/gmu/sortGeneratrices.py
new file mode 100644 (file)
index 0000000..956a8bc
--- /dev/null
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- tri par longueur des 3 generatrices
+
+def sortGeneratrices(tore, geners):
+  """
+  tri des 3 edges 'génératrices' selon leur longueur.
+  @param tore
+  @param les edges 'generatrices'
+  @return (genext, genint, gencnt) les 3 edges, de la plus grande à la plus petite
+  """
+  logging.info("start")
+
+  genx = geompy.ExtractShapes(geners[0], geompy.ShapeType["EDGE"], True)
+
+  lenx = []
+  for i in range(len(genx)):
+    props = geompy.BasicProperties(genx[i])
+    lenx.append(props[0])
+    pass
+  minlen = min(lenx)
+  maxlen = max(lenx)
+  genext=None
+  gencnt=None
+  genint=None
+  for i in range(len(genx)):
+    if lenx[i] == minlen:
+      genint = genx[i]
+    elif lenx[i] == maxlen:
+      genext = genx[i]
+    else:
+      gencnt= genx[i]
+    pass
+
+  geompy.addToStudyInFather( tore, genext, 'genext' )
+  geompy.addToStudyInFather( tore, genint, 'genint' )
+  geompy.addToStudyInFather( tore, gencnt, 'gencnt' )
+
+  return genext, genint, gencnt
diff --git a/src/Tools/blocFissure/gmu/sortSolids.py b/src/Tools/blocFissure/gmu/sortSolids.py
new file mode 100644 (file)
index 0000000..c51bca5
--- /dev/null
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- tri par volume de solides
+
+def sortSolids(solidsToSort):
+  """
+  tri des solides par volume
+  """
+  logging.info('start')
+
+  volSolids = [(geompy.BasicProperties(solid)[2], i, solid) for i, solid in enumerate(solidsToSort)]
+  volSolids.sort()
+  solidsSorted = [solid for vol, i, solid in volSolids]
+  return solidsSorted, volSolids[0][0], volSolids[-1][0]
+
diff --git a/src/Tools/blocFissure/gmu/substractSubShapes.py b/src/Tools/blocFissure/gmu/substractSubShapes.py
new file mode 100644 (file)
index 0000000..3f819d7
--- /dev/null
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- substract a list of subShapes from another
+
+def substractSubShapes(obj, subs, toRemove):
+  """
+  liste de subshapes par difference
+  """
+  logging.info("start")
+  idToremove = {}
+  subList = []
+  for s in toRemove:
+    idToremove[geompy.GetSubShapeID(obj, s)] = s
+  for s in subs:
+    idsub = geompy.GetSubShapeID(obj, s)
+    if idsub not in idToremove.keys():
+      subList.append(s)
+  logging.debug("subList=%s", subList)
+  return subList
diff --git a/src/Tools/blocFissure/gmu/testgmu.py b/src/Tools/blocFissure/gmu/testgmu.py
new file mode 100644 (file)
index 0000000..219e3a9
--- /dev/null
@@ -0,0 +1,22 @@
+
+from blocFissure import gmu
+from blocFissure.gmu.initEtude import initEtude
+initEtude()
+from blocFissure.gmu.triedreBase import triedreBase
+O, OX, OY, OZ = triedreBase()
+
+from blocFissure.gmu.distance2 import distance2
+a=[10, 20, 30]
+b=[5, 7, 3]
+c=distance2(a,b)
+
+import unittest
+from blocFissure.gmu import initLog
+initLog.setUnitTests()
+
+from blocFissure.gmu import distance2
+
+suite = unittest.TestLoader().loadTestsFromTestCase(distance2.Test_distance2)
+unittest.TextTestRunner(verbosity=2).run(suite)
+
+
diff --git a/src/Tools/blocFissure/gmu/toreFissure.py b/src/Tools/blocFissure/gmu/toreFissure.py
new file mode 100644 (file)
index 0000000..899ef5e
--- /dev/null
@@ -0,0 +1,69 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+import math
+from triedreBase import triedreBase
+
+O, OX, OY, OZ = triedreBase()
+
+# -----------------------------------------------------------------------------
+# --- tore et plan de fissure
+
+def toreFissure(minRad,allonge,rayTore):
+  """
+  Construction de la geometrie du tore elliptique autour du front de fissure.
+  L'ellipse est construite dans le plan xoy, axe oy.
+  @param minRad :petit rayon
+  @param allonge :rapport grand rayon / petit rayon
+  @param rayTore :rayon du tore construit autour de la generatrice de l'ellipse
+  @return (generatrice, FaceGenFiss, Pipe_1, FaceFissure, Plane_1, Pipe1Part) : ellipse, section du tore,
+  tore plein, face plane de le fissure, plan de la fissure, tore partitioné par le plan de fissure.
+  """
+  logging.info("start ", minRad, allonge, rayTore)
+  
+  Vertex_1 = geompy.MakeVertex( minRad, 0, 0)
+  Vertex_2 = geompy.MakeVertex(-minRad, 0, 0)
+  Vertex_3 = geompy.MakeRotation(Vertex_1, OZ,  45*math.pi/180.0)
+  Arc_1 = geompy.MakeArc(Vertex_1, Vertex_2, Vertex_3)
+  generatrice = geompy.MakeScaleAlongAxes(Arc_1, O, 1, allonge, 1)
+
+  #geompy.addToStudy( Vertex_1, 'Vertex_1' )
+  #geompy.addToStudy( Vertex_2, 'Vertex_2' )
+  #geompy.addToStudy( Vertex_3, 'Vertex_3' )
+  #geompy.addToStudy( Arc_1, 'Arc_1' )
+  #geompy.addToStudy( generatrice, 'generatrice' )
+
+  # --- face circulaire sur la generatrice, pour extrusion
+
+  Circle_1 = geompy.MakeCircle(O, OY, rayTore)
+  Rotation_1 = geompy.MakeRotation(Circle_1, OY, -90*math.pi/180.0)
+  Translation_1 = geompy.MakeTranslation(Rotation_1, minRad, 0, 0)
+  FaceGenFiss = geompy.MakeFaceWires([Translation_1], 1)
+
+  #geompy.addToStudy( Circle_1, 'Circle_1' )
+  #geompy.addToStudy( Rotation_1, 'Rotation_1' )
+  #geompy.addToStudy( Translation_1, 'Translation_1' )
+  #geompy.addToStudy( FaceGenFiss, 'FaceGenFiss' )
+
+  # --- tore extrude
+
+  Pipe_1 = geompy.MakePipe(FaceGenFiss, generatrice)
+
+  # --- plan fissure, delimite par la generatrice
+
+  Scale_1_vertex_3 = geompy.GetSubShape(generatrice, [3])
+  Line_1 = geompy.MakeLineTwoPnt(Vertex_1, Scale_1_vertex_3)
+  FaceFissure = geompy.MakeFaceWires([generatrice, Line_1], 1)
+
+  #geompy.addToStudyInFather( generatrice, Scale_1_vertex_3, 'Scale_1:vertex_3' )
+  #geompy.addToStudy( Line_1, 'Line_1' )
+  #geompy.addToStudy( FaceFissure, 'FaceFissure' )
+
+  # --- tore coupe en 2 demi tore de section 1/2 disque
+
+  Plane_1 = geompy.MakePlane(O, OZ, 2000)
+  Pipe1Part = geompy.MakePartition([Pipe_1], [Plane_1], [], [], geompy.ShapeType["SOLID"], 0, [], 1)
+  geompy.addToStudy(Pipe1Part , 'Pipe1Part' )
+
+  return generatrice, FaceGenFiss, Pipe_1, FaceFissure, Plane_1, Pipe1Part
diff --git a/src/Tools/blocFissure/gmu/triedreBase.py b/src/Tools/blocFissure/gmu/triedreBase.py
new file mode 100644 (file)
index 0000000..5313563
--- /dev/null
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# --- origine et vecteurs de base
+
+O = None
+OX = None
+OY = None
+OZ = None
+
+def triedreBase():
+  """
+  definitions globales du triedre de reference,
+  objets partages par plusieurs methodes
+  """
+  global O, OX, OY, OZ
+  
+  if O == None:
+    logging.info("start")
+    O = geompy.MakeVertex(0, 0, 0)
+    OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
+    OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
+    OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
+  
+    geompy.addToStudy( O, 'O' )
+    geompy.addToStudy( OX, 'OX' )
+    geompy.addToStudy( OY, 'OY' )
+    geompy.addToStudy( OZ, 'OZ' )
+
+  return O, OX, OY, OZ
diff --git a/src/Tools/blocFissure/gmu/whichSide.py b/src/Tools/blocFissure/gmu/whichSide.py
new file mode 100644 (file)
index 0000000..d31fad2
--- /dev/null
@@ -0,0 +1,60 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- calcul de la position d'une shape par rapport à une face (dessus, dessous, sur la surface même)
+
+def whichSide(face, obj, tol = 1.e-3):
+  """
+  Position d'un objet par rapport a une face (non nécessairement plane).
+  L'objet est supposé situé entierement d'un coté de la face,
+  ou lui appartenant totalement (objets traversants non pris en compte)
+  renvoie 1 si 'objet est du coté de la normale à la face,
+  -1 de l'autre coté, 0 si il est sur la face
+  """
+  logging.debug('start')
+  side = 0
+  logging.debug("shape info %s", geompy.ShapeInfo(obj))
+  nbEdges = geompy.NbShapes(obj, geompy.ShapeType["EDGE"]) # --- attention ! pour une seule edge presente, renvoie 2
+  logging.debug("   nbEdges %s", nbEdges)
+  nbFaces = geompy.NbShapes(obj, geompy.ShapeType["FACE"]) # --- attention ! pour une seule face presente, renvoie 2
+  logging.debug("   nbFaces %s", nbFaces)
+  vertices = geompy.ExtractShapes(obj, geompy.ShapeType["VERTEX"], False)
+  if nbEdges > 0 and nbFaces == 0: # --- edges
+    if nbEdges <= 2:
+      point = geompy.MakeVertexOnCurve(obj, 0.5)
+      vertices.append(point)
+    else:
+      edges = geompy.ExtractShapes(obj, geompy.ShapeType["EDGE"], False)
+      for anEdge in edges:
+        point = geompy.MakeVertexOnCurve(anEdge, 0.5)
+        vertices.append(point)
+  elif nbFaces >0: # --- faces
+    if nbFaces <=2:
+      point = geompy.MakeVertexOnSurface(obj, 0.5, 0.5)
+      vertices.append(point)
+    if nbFaces > 2:
+      faces = geompy.ExtractShapes(obj, geompy.ShapeType["FACE"], False)
+      for aFace in faces:
+        point = geompy.MakeVertexOnSurface(aFace, 0.5, 0.5)
+        vertices.append(point)
+  else: # --- vertices
+    vertices = [obj]
+  for vertex in vertices:
+    distance = geompy.MinDistance(vertex, face)
+    logging.debug("    distance %s", distance)
+    if distance > tol:
+      projection = geompy.MakeProjection(vertex, face)
+      normal = geompy.GetNormal(face, projection)
+      vect = geompy.MakeVector(projection, vertex)
+      angle = geompy.GetAngle(normal, vect)
+      logging.debug("  angle %s", angle)
+      side = 1
+      if abs(angle) > 10:
+        side = -1
+      break
+  logging.debug("  side %s", side)
+  return side
+
diff --git a/src/Tools/blocFissure/gmu/whichSideMulti.py b/src/Tools/blocFissure/gmu/whichSideMulti.py
new file mode 100644 (file)
index 0000000..248e6cf
--- /dev/null
@@ -0,0 +1,71 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- calcul de la position d'une shape par rapport à une face (dessus, dessous, sur la surface même)
+
+def whichSideMulti(facerefs, ifil, obj, centre, tol = 1.e-3):
+  """
+  Position d'un objet par rapport a un ensemble de faces (non nécessairement planes).
+  Ces faces délimitent partiellement un volume, le point "centre" est supposé dans le volume
+  L'objet est supposé situé entierement d'un coté des faces,
+  ou appartenant totalement à une face (objets traversants non pris en compte)
+  renvoie 1 si 'objet est dedans (inside),
+  -1 dehors (outside), 0 si il est sur une face d'index ifil
+  """
+  logging.debug('start')
+  side = 0
+  logging.debug("shape info %s", geompy.ShapeInfo(obj))
+  nbEdges = geompy.NbShapes(obj, geompy.ShapeType["EDGE"]) # --- attention ! pour une seule edge presente, renvoie 2
+  logging.debug("   nbEdges %s", nbEdges)
+  vertices = geompy.ExtractShapes(obj, geompy.ShapeType["VERTEX"], False)
+  if nbEdges > 0 : # --- edges
+    if nbEdges <= 2:
+      point = geompy.MakeVertexOnCurve(obj, 0.5)
+      vertices.append(point)
+    else:
+      edges = geompy.ExtractShapes(obj, geompy.ShapeType["EDGE"], False)
+      for anEdge in edges:
+        point = geompy.MakeVertexOnCurve(anEdge, 0.5)
+        vertices.append(point)
+  else: # --- vertices
+    vertices = [obj]
+  nbOnRef = 0
+  nbOnOther = 0
+  for vertex in vertices:
+    nbMiss = 0
+    for i, face in enumerate(facerefs):
+      distance = geompy.MinDistance(vertex, face)
+      logging.debug("    distance %s", distance)
+      if distance > tol:
+        if geompy.MinDistance(vertex, centre) > tol:
+          line = geompy.MakeLineTwoPnt(vertex, centre)
+        else :
+          side = 1       # le centre est inside...
+          break
+        part = geompy.MakePartition([line], [face], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+        nbpts = geompy.NbShapes(part,geompy.ShapeType["VERTEX"])
+        if nbpts > 2:
+          side = -1      # outside
+          break
+        else:
+          nbMiss += 1
+          pass           # peut-être inside, tester les autres faces
+      else:
+        if i == ifil:
+          nbOnRef +=1    # le point est sur la face de référence, on continue avec les autres points
+          break
+        else:
+          nbOnOther += 1 # le point est sur une autre face, mais il peut aussi être sur la face de référence...
+          pass           # on peut tester les autres faces
+    if nbMiss == len(facerefs):
+      side = 1 # inside
+    if side != 0:
+      break
+  if side == 0 and nbOnRef < len(vertices):
+    side = 1   # inside  
+  logging.debug("  side %s", side)
+  return side
+
diff --git a/src/Tools/blocFissure/gmu/whichSideVertex.py b/src/Tools/blocFissure/gmu/whichSideVertex.py
new file mode 100644 (file)
index 0000000..13a29c4
--- /dev/null
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from geomsmesh import geompy
+
+# -----------------------------------------------------------------------------
+# --- calcul de la position d'une shape par rapport à une face (dessus, dessous, sur la surface même)
+
+def whichSideVertex(face, vertex, tol = 1.e-3):
+  """
+  Position d'un vertex par rapport a une face (non nécessairement plane).
+  renvoie 1 si le vertex est du coté de la normale à la face,
+  -1 de l'autre coté, 0 si il est sur la face
+  """
+  #logging.info('start')
+  side = 0
+  distance = geompy.MinDistance(vertex, face)
+  #logging.debug("    distance %s", distance)
+  if distance > tol:
+    projection = geompy.MakeProjection(vertex, face)
+    normal = geompy.GetNormal(face, projection)
+    vect = geompy.MakeVector(projection, vertex)
+    angle = geompy.GetAngle(normal, vect)
+    #logging.debug("  angle %s", angle)
+    side = 1
+    if abs(angle) > 10:
+      side = -1
+  logging.debug("side %s distance %s", side, distance)
+  return side
+
diff --git a/src/Tools/blocFissure/ihm/CMakeLists.txt b/src/Tools/blocFissure/ihm/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ab8e80b
--- /dev/null
@@ -0,0 +1,46 @@
+# Copyright (C) 2012-2014  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, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+INCLUDE(UsePyQt4)
+
+# --- scripts ---
+
+# scripts / static
+SET(plugin_SCRIPTS
+  __init__.py
+  fissureCoude_ihm.py
+  fissureCoude_plugin.py
+)
+
+# --- resources ---
+
+# uic files / to be processed by pyuic
+SET(_pyuic_files
+  fissureCoude.ui
+  fissureGenerale.ui
+)
+
+# scripts / pyuic wrappings
+PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+
+# --- rules ---
+
+SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/blocFissure/ihm)
+
+SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/blocFissure/ihm)
\ No newline at end of file
diff --git a/src/Tools/blocFissure/ihm/__init__.py b/src/Tools/blocFissure/ihm/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/Tools/blocFissure/ihm/dialogFissureCoude.dic b/src/Tools/blocFissure/ihm/dialogFissureCoude.dic
new file mode 100644 (file)
index 0000000..8587899
--- /dev/null
@@ -0,0 +1 @@
+{'nbAxeTubeP2': 12, 'orientation': 90.0, 'nbAxeTubeP1': 16, 'posiAngul': 20.0, 'influence': 50.0, 'nbCirconf': 20, 'azimut': 160.0, 'longueur': 400.0, 'rbFissExt': True, 'cbForceEllipse': False, 'cbOptDiscrFiss': True, 'lTubeP2': 1200.0, 'dext': 760.0, 'angle': 60.0, 'cbOptDiscrSain': True, 'nbAxeCoude': 15, 'epais': 40.0, 'nbSecteurs': 6, 'aretesFaceFissure': 5.0, 'rCintr': 1200.0, 'rayonTore': 2.5, 'nbEpaisseur': 3, 'nbTranches': 176, 'rbPosiAngul': True, 'lenSegPipe': 2.4511363636363637, 'absCurv': 0.0, 'profondeur': 10.0, 'lTubeP1': 1600.0, 'nbCouronnes': 5}
\ No newline at end of file
diff --git a/src/Tools/blocFissure/ihm/fissureCoude.ui b/src/Tools/blocFissure/ihm/fissureCoude.ui
new file mode 100644 (file)
index 0000000..2fc5575
--- /dev/null
@@ -0,0 +1,1116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>826</width>
+    <height>540</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_8">
+   <item row="0" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout_5">
+     <item>
+      <layout class="QVBoxLayout" name="verticalLayout_2">
+       <item>
+        <widget class="QGroupBox" name="groupBox">
+         <property name="title">
+          <string>Coude Sain</string>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout_3">
+          <item>
+           <widget class="QGroupBox" name="groupBox_3">
+            <property name="title">
+             <string>Géométrie</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout_2">
+             <item row="0" column="0">
+              <layout class="QGridLayout" name="gridLayout">
+               <item row="2" column="0">
+                <widget class="QLabel" name="label_3">
+                 <property name="text">
+                  <string>L_TUBE_P1</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="0" column="1">
+                <widget class="QDoubleSpinBox" name="dsb_angle">
+                 <property name="toolTip">
+                  <string>Valeur de l'angle du coude en degrés</string>
+                 </property>
+                 <property name="decimals">
+                  <number>5</number>
+                 </property>
+                 <property name="minimum">
+                  <double>-181.000000000000000</double>
+                 </property>
+                 <property name="maximum">
+                  <double>180.000000000000000</double>
+                 </property>
+                 <property name="value">
+                  <double>-181.000000000000000</double>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="0">
+                <widget class="QLabel" name="label_2">
+                 <property name="text">
+                  <string>R_CINTR</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="4" column="0">
+                <widget class="QLabel" name="label_5">
+                 <property name="text">
+                  <string>EPAIS</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="4" column="1">
+                <widget class="QDoubleSpinBox" name="dsb_epais">
+                 <property name="toolTip">
+                  <string>Valeur de l’épaisseur du coude et des embouts</string>
+                 </property>
+                 <property name="decimals">
+                  <number>5</number>
+                 </property>
+                 <property name="maximum">
+                  <double>1000000.000000000000000</double>
+                 </property>
+                </widget>
+               </item>
+               <item row="3" column="0">
+                <widget class="QLabel" name="label_4">
+                 <property name="text">
+                  <string>L_TUBE_P2</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="3" column="1">
+                <widget class="QDoubleSpinBox" name="dsb_lTubeP2">
+                 <property name="toolTip">
+                  <string>Valeur de la longueur de l’embout P2 à l’extrémité duquel seront appliqués les chargements</string>
+                 </property>
+                 <property name="decimals">
+                  <number>5</number>
+                 </property>
+                 <property name="maximum">
+                  <double>1000000.000000000000000</double>
+                 </property>
+                </widget>
+               </item>
+               <item row="5" column="0">
+                <widget class="QLabel" name="label_6">
+                 <property name="text">
+                  <string>DEXT</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="0" column="0">
+                <widget class="QLabel" name="label">
+                 <property name="text">
+                  <string>ANGLE</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="5" column="1">
+                <widget class="QDoubleSpinBox" name="dsb_dext">
+                 <property name="toolTip">
+                  <string>Valeur du diamètre externe du coude et des embouts droits</string>
+                 </property>
+                 <property name="decimals">
+                  <number>5</number>
+                 </property>
+                 <property name="maximum">
+                  <double>1000000.000000000000000</double>
+                 </property>
+                </widget>
+               </item>
+               <item row="2" column="1">
+                <widget class="QDoubleSpinBox" name="dsb_lTubeP1">
+                 <property name="toolTip">
+                  <string>Valeur de la longueur de l’embout P1 à l’extrémité duquel seront appliqués les chargements</string>
+                 </property>
+                 <property name="decimals">
+                  <number>5</number>
+                 </property>
+                 <property name="maximum">
+                  <double>1000000.000000000000000</double>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="1">
+                <widget class="QDoubleSpinBox" name="dsb_rCintr">
+                 <property name="toolTip">
+                  <string>Valeur du rayon de cintrage du coude</string>
+                 </property>
+                 <property name="decimals">
+                  <number>5</number>
+                 </property>
+                 <property name="maximum">
+                  <double>1000000.000000000000000</double>
+                 </property>
+                </widget>
+               </item>
+              </layout>
+             </item>
+            </layout>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <widget class="QCheckBox" name="cb_optDiscrSain">
+         <property name="toolTip">
+          <string>Paramètres optionnels de discretisation</string>
+         </property>
+         <property name="text">
+          <string>Options de discretisation</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="gb_discrSain">
+         <property name="title">
+          <string>Maillage</string>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_4">
+          <item row="0" column="0">
+           <layout class="QVBoxLayout" name="verticalLayout">
+            <item>
+             <widget class="QLabel" name="label_7">
+              <property name="text">
+               <string>Nombres de segments</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <layout class="QGridLayout" name="gridLayout_3">
+              <item row="0" column="0">
+               <widget class="QLabel" name="label_8">
+                <property name="text">
+                 <string>NB_AXE_TUBE_P1</string>
+                </property>
+               </widget>
+              </item>
+              <item row="0" column="1">
+               <widget class="QSpinBox" name="sb_nbAxeTubeP1">
+                <property name="toolTip">
+                 <string>Nombre d’éléments le long de l’embout P1</string>
+                </property>
+                <property name="maximum">
+                 <number>10000</number>
+                </property>
+                <property name="value">
+                 <number>15</number>
+                </property>
+               </widget>
+              </item>
+              <item row="1" column="0">
+               <widget class="QLabel" name="label_9">
+                <property name="text">
+                 <string>NB_AXE_TUBE_P2</string>
+                </property>
+               </widget>
+              </item>
+              <item row="1" column="1">
+               <widget class="QSpinBox" name="sb_nbAxeTubeP2">
+                <property name="toolTip">
+                 <string>Nombre d’éléments le long de l’embout P2</string>
+                </property>
+                <property name="maximum">
+                 <number>10000</number>
+                </property>
+                <property name="value">
+                 <number>15</number>
+                </property>
+               </widget>
+              </item>
+              <item row="2" column="0">
+               <widget class="QLabel" name="label_10">
+                <property name="text">
+                 <string>NB_AXE_COUDE</string>
+                </property>
+               </widget>
+              </item>
+              <item row="2" column="1">
+               <widget class="QSpinBox" name="sb_nbAxeCoude">
+                <property name="toolTip">
+                 <string>Nombre d’éléments le long de l’axe du coude</string>
+                </property>
+                <property name="maximum">
+                 <number>10000</number>
+                </property>
+                <property name="value">
+                 <number>10</number>
+                </property>
+               </widget>
+              </item>
+              <item row="3" column="0">
+               <widget class="QLabel" name="label_11">
+                <property name="text">
+                 <string>NB_CIRCONF</string>
+                </property>
+               </widget>
+              </item>
+              <item row="3" column="1">
+               <widget class="QSpinBox" name="sb_nbCirconf">
+                <property name="toolTip">
+                 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Nombre d’éléments le long de la circonférence&lt;/p&gt;&lt;p&gt;(nombre pair)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                </property>
+                <property name="maximum">
+                 <number>10000</number>
+                </property>
+                <property name="value">
+                 <number>20</number>
+                </property>
+               </widget>
+              </item>
+              <item row="4" column="0">
+               <widget class="QLabel" name="label_13">
+                <property name="text">
+                 <string>NB_EPAISSEUR</string>
+                </property>
+               </widget>
+              </item>
+              <item row="4" column="1">
+               <widget class="QSpinBox" name="sb_nbEpaisseur">
+                <property name="toolTip">
+                 <string>Nombre d'éléments dans l'épaisseur</string>
+                </property>
+                <property name="maximum">
+                 <number>10000</number>
+                </property>
+                <property name="value">
+                 <number>3</number>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer_6">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QGroupBox" name="groupBox_2">
+       <property name="title">
+        <string>Fissure</string>
+       </property>
+       <layout class="QHBoxLayout" name="horizontalLayout_2">
+        <item>
+         <layout class="QVBoxLayout" name="verticalLayout_4">
+          <item>
+           <widget class="QGroupBox" name="groupBox_5">
+            <property name="title">
+             <string>Géométrie fissure</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout_12">
+             <item row="0" column="0">
+              <layout class="QGridLayout" name="gridLayout_10">
+               <item row="0" column="0">
+                <widget class="QGroupBox" name="groupBox_4">
+                 <property name="title">
+                  <string>position</string>
+                 </property>
+                 <layout class="QVBoxLayout" name="verticalLayout_7">
+                  <item>
+                   <widget class="QRadioButton" name="rb_fissInt">
+                    <property name="toolTip">
+                     <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Fissure positionnée sur la face interne&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                    </property>
+                    <property name="text">
+                     <string>fissure interne</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <widget class="QRadioButton" name="rb_fissExt">
+                    <property name="toolTip">
+                     <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Fissure positionnée sur la face externe&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                    </property>
+                    <property name="text">
+                     <string>fissure externe</string>
+                    </property>
+                   </widget>
+                  </item>
+                 </layout>
+                </widget>
+               </item>
+               <item row="0" column="1">
+                <spacer name="horizontalSpacer_3">
+                 <property name="orientation">
+                  <enum>Qt::Horizontal</enum>
+                 </property>
+                 <property name="sizeHint" stdset="0">
+                  <size>
+                   <width>40</width>
+                   <height>20</height>
+                  </size>
+                 </property>
+                </spacer>
+               </item>
+               <item row="1" column="0">
+                <widget class="QCheckBox" name="cb_forceEllipse">
+                 <property name="toolTip">
+                  <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Forcer une fissure de forme elliptique, même si elle est longue&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                 </property>
+                 <property name="accessibleDescription">
+                  <string/>
+                 </property>
+                 <property name="text">
+                  <string>forcer elliptique</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="1">
+                <spacer name="horizontalSpacer_2">
+                 <property name="orientation">
+                  <enum>Qt::Horizontal</enum>
+                 </property>
+                 <property name="sizeHint" stdset="0">
+                  <size>
+                   <width>40</width>
+                   <height>20</height>
+                  </size>
+                 </property>
+                </spacer>
+               </item>
+              </layout>
+             </item>
+             <item row="1" column="0">
+              <layout class="QGridLayout" name="gridLayout_5">
+               <item row="2" column="1">
+                <widget class="QDoubleSpinBox" name="dsb_azimut">
+                 <property name="toolTip">
+                  <string>Valeur de la position circonférentielle du centre de la fissure comptée positivement en degrés à partir de l’extrados jusqu’à l’intrados en passant par le flanc gauche</string>
+                 </property>
+                 <property name="decimals">
+                  <number>5</number>
+                 </property>
+                 <property name="minimum">
+                  <double>-181.000000000000000</double>
+                 </property>
+                 <property name="maximum">
+                  <double>180.000000000000000</double>
+                 </property>
+                 <property name="value">
+                  <double>-181.000000000000000</double>
+                 </property>
+                </widget>
+               </item>
+               <item row="0" column="0">
+                <widget class="QLabel" name="label_18">
+                 <property name="text">
+                  <string>PROFONDEUR</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="0" column="1">
+                <widget class="QDoubleSpinBox" name="dsb_profondeur">
+                 <property name="toolTip">
+                  <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Profondeur de la fissure :&lt;/p&gt;&lt;p&gt;distance maximale entre le fond de fissure et la peau interne ou externe sur laquelle débouche la fissure&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                 </property>
+                 <property name="decimals">
+                  <number>5</number>
+                 </property>
+                 <property name="maximum">
+                  <double>1000000.000000000000000</double>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="0">
+                <widget class="QLabel" name="label_19">
+                 <property name="text">
+                  <string>LONGUEUR</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="2" column="0">
+                <widget class="QLabel" name="label_14">
+                 <property name="text">
+                  <string>AZIMUT</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="3" column="0">
+                <widget class="QLabel" name="label_15">
+                 <property name="text">
+                  <string>ORIEN</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="3" column="1">
+                <widget class="QDoubleSpinBox" name="dsb_orientation">
+                 <property name="toolTip">
+                  <string>Valeur de l’angle en degrés formé par le grand axe de la fissure et la génératrice du coude donnant ainsi l’orientation du défaut</string>
+                 </property>
+                 <property name="decimals">
+                  <number>5</number>
+                 </property>
+                 <property name="minimum">
+                  <double>-1.000000000000000</double>
+                 </property>
+                 <property name="maximum">
+                  <double>90.000000000000000</double>
+                 </property>
+                 <property name="value">
+                  <double>-1.000000000000000</double>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="1">
+                <widget class="QDoubleSpinBox" name="dsb_longueur">
+                 <property name="toolTip">
+                  <string>Longueur du grand axe de la fissure mesurée sur le coude en peau interne ou externe, suivant la peau sur laquelle se trouve la fissure</string>
+                 </property>
+                 <property name="decimals">
+                  <number>5</number>
+                 </property>
+                 <property name="maximum">
+                  <double>1000000.000000000000000</double>
+                 </property>
+                </widget>
+               </item>
+              </layout>
+             </item>
+             <item row="2" column="0">
+              <widget class="QGroupBox" name="groupBox_11">
+               <property name="title">
+                <string>position longitudinale</string>
+               </property>
+               <layout class="QGridLayout" name="gridLayout_11">
+                <item row="0" column="0">
+                 <widget class="QRadioButton" name="rb_absCurv">
+                  <property name="toolTip">
+                   <string>Définition de la position longitudinale par une abscisse curiviligne</string>
+                  </property>
+                  <property name="text">
+                   <string>ABS_CURV</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="0">
+                 <widget class="QRadioButton" name="rb_posiAngul">
+                  <property name="toolTip">
+                   <string>Définition de la position longitudinale par un angle</string>
+                  </property>
+                  <property name="text">
+                   <string>POSI_ANGUL</string>
+                  </property>
+                 </widget>
+                </item>
+                <item row="0" column="1">
+                 <widget class="QDoubleSpinBox" name="dsb_absCurv">
+                  <property name="toolTip">
+                   <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Valeur de la position longitudinale du centre de la fissure définie par rapport à l'interface de l'embout P1 :&lt;/p&gt;&lt;p&gt;Abcisse curviligne le long de l'axe du coude, sur la peau interne ou externe, selon la position de la fissure.&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                  </property>
+                  <property name="decimals">
+                   <number>5</number>
+                  </property>
+                  <property name="maximum">
+                   <double>1000000.000000000000000</double>
+                  </property>
+                 </widget>
+                </item>
+                <item row="1" column="1">
+                 <widget class="QDoubleSpinBox" name="dsb_posiAngul">
+                  <property name="toolTip">
+                   <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Valeur de la position longitudinale du centre de la fissure définie par rapport à l'interface de l'embout P1 :&lt;/p&gt;&lt;p&gt;Angle en degrés formé par la section contenant le centre de la fissure et l'interface de l'embout P1.&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                  </property>
+                  <property name="decimals">
+                   <number>5</number>
+                  </property>
+                  <property name="minimum">
+                   <double>-181.000000000000000</double>
+                  </property>
+                  <property name="maximum">
+                   <double>180.000000000000000</double>
+                  </property>
+                  <property name="value">
+                   <double>-181.000000000000000</double>
+                  </property>
+                 </widget>
+                </item>
+               </layout>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <spacer name="verticalSpacer_3">
+            <property name="orientation">
+             <enum>Qt::Vertical</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>20</width>
+              <height>40</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <layout class="QVBoxLayout" name="verticalLayout_6">
+          <item>
+           <widget class="QGroupBox" name="groupBox_6">
+            <property name="title">
+             <string>Maillage fissure</string>
+            </property>
+            <layout class="QGridLayout" name="gridLayout_7">
+             <item row="1" column="0" colspan="2">
+              <widget class="QGroupBox" name="groupBox_8">
+               <property name="title">
+                <string>maillage zone de fissure</string>
+               </property>
+               <layout class="QVBoxLayout" name="verticalLayout_5">
+                <item>
+                 <widget class="QGroupBox" name="groupBox_9">
+                  <property name="title">
+                   <string>pipe rayonnant</string>
+                  </property>
+                  <layout class="QHBoxLayout" name="horizontalLayout_4">
+                   <item>
+                    <layout class="QGridLayout" name="gridLayout_6">
+                     <item row="1" column="0">
+                      <widget class="QLabel" name="label_21">
+                       <property name="text">
+                        <string>NB_TRANCHES</string>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="2" column="0">
+                      <widget class="QLabel" name="label_22">
+                       <property name="text">
+                        <string>NB_COURONNE</string>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="2" column="1">
+                      <widget class="QSpinBox" name="sb_nbCouronne">
+                       <property name="toolTip">
+                        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pipe rayonnant construit sur le fond de fissure :&lt;/p&gt;&lt;p&gt;nombre de couronnes du maillage rayonnant autour de la ligne de fond de fissure, y compris la couronne centrale formée de prismes.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                       </property>
+                       <property name="minimum">
+                        <number>1</number>
+                       </property>
+                       <property name="maximum">
+                        <number>10000</number>
+                       </property>
+                       <property name="value">
+                        <number>1</number>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="3" column="0">
+                      <widget class="QLabel" name="label_23">
+                       <property name="text">
+                        <string>NB_SECTEUR</string>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="3" column="1">
+                      <widget class="QSpinBox" name="sb_nbSecteur">
+                       <property name="toolTip">
+                        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pipe rayonnant construit sur le fond de fissure :&lt;/p&gt;&lt;p&gt;nombre de secteurs selon un cercle normal au fond de fissure.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                       </property>
+                       <property name="minimum">
+                        <number>3</number>
+                       </property>
+                       <property name="maximum">
+                        <number>10000</number>
+                       </property>
+                       <property name="value">
+                        <number>3</number>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="1" column="1">
+                      <widget class="QSpinBox" name="sb_nbTranches">
+                       <property name="toolTip">
+                        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pipe rayonnant construit sur le fond de fissure :&lt;/p&gt;&lt;p&gt;Nombre de mailles (approximatif) le long de la ligne de fond de fissure.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                       </property>
+                       <property name="minimum">
+                        <number>7</number>
+                       </property>
+                       <property name="maximum">
+                        <number>100000</number>
+                       </property>
+                       <property name="value">
+                        <number>7</number>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="4" column="0">
+                      <widget class="QLabel" name="label_20">
+                       <property name="text">
+                        <string>RAYON_TORE</string>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="4" column="1">
+                      <widget class="QDoubleSpinBox" name="dsb_rayonTore">
+                       <property name="enabled">
+                        <bool>false</bool>
+                       </property>
+                       <property name="toolTip">
+                        <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pipe rayonnant construit sur le fond de fissure :&lt;/p&gt;&lt;p&gt;Rayon du pipe.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                       </property>
+                       <property name="decimals">
+                        <number>5</number>
+                       </property>
+                       <property name="maximum">
+                        <double>1000000.000000000000000</double>
+                       </property>
+                       <property name="value">
+                        <double>2.000000000000000</double>
+                       </property>
+                      </widget>
+                     </item>
+                    </layout>
+                   </item>
+                   <item>
+                    <spacer name="horizontalSpacer_4">
+                     <property name="orientation">
+                      <enum>Qt::Horizontal</enum>
+                     </property>
+                     <property name="sizeHint" stdset="0">
+                      <size>
+                       <width>6</width>
+                       <height>20</height>
+                      </size>
+                     </property>
+                    </spacer>
+                   </item>
+                  </layout>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="QCheckBox" name="cb_optDiscrFiss">
+                  <property name="toolTip">
+                   <string>Paramètres optionnels de discrétisation</string>
+                  </property>
+                  <property name="text">
+                   <string>Options de discretisation</string>
+                  </property>
+                 </widget>
+                </item>
+                <item>
+                 <widget class="QGroupBox" name="gb_discrFacesExternes">
+                  <property name="enabled">
+                   <bool>true</bool>
+                  </property>
+                  <property name="title">
+                   <string>faces externes</string>
+                  </property>
+                  <layout class="QHBoxLayout" name="horizontalLayout_3">
+                   <item>
+                    <widget class="QLabel" name="label_24">
+                     <property name="text">
+                      <string>aretes face fissure</string>
+                     </property>
+                    </widget>
+                   </item>
+                   <item>
+                    <widget class="QDoubleSpinBox" name="dsb_aretesFaceFissure">
+                     <property name="toolTip">
+                      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Faces externes de la zone à remailler.&lt;/p&gt;&lt;p&gt;Mailage en triangles : valeur cible des arêtes.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                     </property>
+                     <property name="decimals">
+                      <number>5</number>
+                     </property>
+                     <property name="maximum">
+                      <double>1000000.000000000000000</double>
+                     </property>
+                    </widget>
+                   </item>
+                   <item>
+                    <spacer name="horizontalSpacer_5">
+                     <property name="orientation">
+                      <enum>Qt::Horizontal</enum>
+                     </property>
+                     <property name="sizeHint" stdset="0">
+                      <size>
+                       <width>1</width>
+                       <height>20</height>
+                      </size>
+                     </property>
+                    </spacer>
+                   </item>
+                  </layout>
+                 </widget>
+                </item>
+               </layout>
+              </widget>
+             </item>
+             <item row="2" column="0">
+              <widget class="QGroupBox" name="gb_zoneRemail">
+               <property name="enabled">
+                <bool>true</bool>
+               </property>
+               <property name="title">
+                <string>identification zone à remailler</string>
+               </property>
+               <layout class="QGridLayout" name="gridLayout_16">
+                <item row="0" column="0">
+                 <layout class="QGridLayout" name="gridLayout_17">
+                  <item row="1" column="1">
+                   <widget class="QDoubleSpinBox" name="dsb_influence">
+                    <property name="toolTip">
+                     <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;La zone remaillée contiendra toutes les mailles du maillage sain à une distance de la face de fissure inférieure à cette valeur.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                    </property>
+                    <property name="decimals">
+                     <number>5</number>
+                    </property>
+                    <property name="maximum">
+                     <double>1000000.000000000000000</double>
+                    </property>
+                   </widget>
+                  </item>
+                  <item row="1" column="0">
+                   <widget class="QLabel" name="label_25">
+                    <property name="text">
+                     <string>distance influence</string>
+                    </property>
+                   </widget>
+                  </item>
+                 </layout>
+                </item>
+                <item row="0" column="1">
+                 <spacer name="horizontalSpacer_8">
+                  <property name="orientation">
+                   <enum>Qt::Horizontal</enum>
+                  </property>
+                  <property name="sizeHint" stdset="0">
+                   <size>
+                    <width>47</width>
+                    <height>20</height>
+                   </size>
+                  </property>
+                 </spacer>
+                </item>
+               </layout>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <spacer name="verticalSpacer_4">
+            <property name="orientation">
+             <enum>Qt::Vertical</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>20</width>
+              <height>40</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+       </layout>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout_6">
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QLabel" name="lb_calcul">
+       <property name="font">
+        <font>
+         <pointsize>24</pointsize>
+        </font>
+       </property>
+       <property name="text">
+        <string>--- Calcul en cours ---</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer_9">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item row="2" column="0">
+    <spacer name="verticalSpacer_2">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>4</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="3" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QPushButton" name="pb_reset">
+       <property name="toolTip">
+        <string>réinitialisation de tous les paramètres à leur valeur par défaut</string>
+       </property>
+       <property name="text">
+        <string>Reset</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pb_valPrec">
+       <property name="toolTip">
+        <string>réinitialisation de tous les paramètres à leur valeur de la précédente éxécution</string>
+       </property>
+       <property name="text">
+        <string>Précédent</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pb_recharger">
+       <property name="toolTip">
+        <string>réinitialisation des paramètres à partir d'un fichier préalablement sauvegardé</string>
+       </property>
+       <property name="text">
+        <string>Recharger</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pb_sauver">
+       <property name="toolTip">
+        <string>sauvegarde des paramètres dans un fichier à choisir</string>
+       </property>
+       <property name="text">
+        <string>Sauver</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer_7">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QDialogButtonBox" name="buttonBox">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="standardButtons">
+        <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+  <zorder>verticalSpacer_2</zorder>
+  <zorder>horizontalSpacer</zorder>
+  <zorder>lb_calcul</zorder>
+  <zorder>horizontalSpacer_9</zorder>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>1055</x>
+     <y>594</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>1055</x>
+     <y>594</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_optDiscrSain</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>gb_discrSain</receiver>
+   <slot>setShown(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>69</x>
+     <y>312</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>70</x>
+     <y>549</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_optDiscrFiss</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>gb_discrFacesExternes</receiver>
+   <slot>setShown(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>1033</x>
+     <y>311</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>1033</x>
+     <y>387</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_optDiscrFiss</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>gb_zoneRemail</receiver>
+   <slot>setShown(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>1033</x>
+     <y>311</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>1036</x>
+     <y>472</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_optDiscrFiss</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>dsb_rayonTore</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>1033</x>
+     <y>311</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>1005</x>
+     <y>278</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb_absCurv</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>dsb_absCurv</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>477</x>
+     <y>392</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>649</x>
+     <y>396</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rb_posiAngul</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>dsb_posiAngul</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>477</x>
+     <y>425</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>649</x>
+     <y>429</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/Tools/blocFissure/ihm/fissureCoude_ihm.py b/src/Tools/blocFissure/ihm/fissureCoude_ihm.py
new file mode 100644 (file)
index 0000000..1167c55
--- /dev/null
@@ -0,0 +1,96 @@
+# -*- coding: utf-8 -*-
+
+from blocFissure.gmu.fissureCoude  import fissureCoude
+
+class fissureCoude_ihm(fissureCoude):
+  """
+  problème de fissure du Coude :
+  pour version IHM graphique
+  """
+
+# ---------------------------------------------------------------------------
+  def setDicoParams(self,dico):
+    self.dico = dico
+
+# ---------------------------------------------------------------------------
+  def setParamGeometrieSaine(self):
+    """
+    Paramètres géométriques du tuyau coudé sain:
+    angleCoude
+    r_cintr
+    l_tube_p1
+    l_tube_p2
+    epais
+    de
+    """
+    self.geomParams = dict(angleCoude = self.dico['angle'],
+                           r_cintr    = self.dico['rCintr'],
+                           l_tube_p1  = self.dico['lTubeP1'],
+                           l_tube_p2  = self.dico['lTubeP2'],
+                           epais      = self.dico['epais'],
+                           de         = self.dico['dext'])
+
+  # ---------------------------------------------------------------------------
+  def setParamMaillageSain(self):
+    self.meshParams = dict(n_long_p1    = self.dico['nbAxeTubeP1'],
+                           n_ep         = self.dico['nbEpaisseur'],
+                           n_long_coude = self.dico['nbAxeCoude'],
+                           n_circ_g     = self.dico['nbCirconf'],
+                           n_circ_d     = self.dico['nbCirconf'],
+                           n_long_p2    = self.dico['nbAxeTubeP2'])
+
+# ---------------------------------------------------------------------------
+  def setParamShapeFissure(self):
+    """
+    paramètres de la fissure pour le tuyau coude
+    profondeur  : 0 < profondeur <= épaisseur
+    rayonPipe   : rayon du pipe correspondant au maillage rayonnant
+    lenSegPipe  : longueur des mailles rayonnantes le long du fond de fissure (= rayonPipe par défaut)
+    azimut      : entre 0 et 360°
+    alpha       : 0 < alpha < angleCoude
+    longueur    : <=2*profondeur ==> force une fissure elliptique (longueur/profondeur = grand axe/petit axe).
+    orientation : 0° : longitudinale, 90° : circonférentielle, autre : uniquement fissures elliptiques
+    lgInfluence : distance autour de la shape de fissure a remailler (si 0, pris égal à profondeur. A ajuster selon le maillage)
+    elliptique  : True : fissure elliptique (longueur/profondeur = grand axe/petit axe); False : fissure longue (fond de fissure de profondeur constante, demi-cercles aux extrémites)
+    pointIn_x   : optionnel coordonnées x d'un point dans le solide, pas trop loin du centre du fond de fissure (idem y,z)
+    externe     : True : fissure face externe, False : fissure face interne
+    """
+    print "setParamShapeFissure", self.nomCas
+    self.shapeFissureParams = dict(profondeur  = self.dico['profondeur'],
+                                   rayonPipe   = self.dico['rayonTore'],
+                                   lenSegPipe  = self.dico['lenSegPipe'],
+                                   azimut      = self.dico['azimut'],
+                                   alpha       = self.dico['posiAngul'],
+                                   longueur    = self.dico['longueur'],
+                                   orientation = self.dico['orientation'],
+                                   lgInfluence = self.dico['influence'],
+                                   elliptique  = self.dico['cbForceEllipse'],
+                                   externe     = self.dico['rbFissExt'])
+
+# ---------------------------------------------------------------------------
+  def setParamMaillageFissure(self):
+    """
+    Paramètres du maillage de la fissure pour le tuyau coudé
+    Voir également setParamShapeFissure, paramètres rayonPipe et lenSegPipe.
+    nbSegRad = nombre de couronnes
+    nbSegCercle = nombre de secteurs
+    areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
+    """
+    self.maillageFissureParams = dict(nomRep        = '.',
+                                      nomFicSain    = self.nomCas,
+                                      nomFicFissure = 'fissure_' + self.nomCas,
+                                      nbsegRad      = self.dico['nbCouronnes'],
+                                      nbsegCercle   = self.dico['nbSecteurs'],
+                                      areteFaceFissure = self.dico['aretesFaceFissure'])
+
+  # ---------------------------------------------------------------------------
+  def setReferencesMaillageFissure(self):
+    self.referencesMaillageFissure = dict(Entity_Node            = 0,
+                                          Entity_Quad_Edge       = 0,
+                                          Entity_Quad_Triangle   = 0,
+                                          Entity_Quad_Quadrangle = 0,
+                                          Entity_Quad_Tetra      = 0,
+                                          Entity_Quad_Hexa       = 0,
+                                          Entity_Quad_Penta      = 0,
+                                          Entity_Quad_Pyramid    = 0)
+
diff --git a/src/Tools/blocFissure/ihm/fissureCoude_plugin.py b/src/Tools/blocFissure/ihm/fissureCoude_plugin.py
new file mode 100644 (file)
index 0000000..9771d6c
--- /dev/null
@@ -0,0 +1,417 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (C) 2006-2014  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, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# if you already have plugins defined in a salome_plugins.py file, add this file at the end.
+# if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
+
+import sys, traceback
+import math
+from blocFissure import gmu
+from blocFissure.gmu import initLog
+#initLog.setDebug()
+initLog.setVerbose()
+
+from blocFissure.gmu import geomsmesh
+from blocFissure.casStandard import casStandard
+
+from blocFissure.ihm.fissureCoude_ihm import fissureCoude_ihm
+
+def fissureCoudeDlg(context):
+  # get context study, studyId, salomeGui
+  study = context.study
+  studyId = context.studyId
+  sg = context.sg
+  
+  import os
+  #import subprocess
+  #import tempfile
+  from PyQt4 import QtCore
+  from PyQt4 import QtGui
+  from PyQt4.QtGui import QFileDialog
+  from PyQt4.QtGui import QMessageBox
+  from PyQt4.QtGui import QPalette
+  from PyQt4.QtGui import QColor
+  from fissureCoude_ui import Ui_Dialog
+  
+  class fissureCoudeDialog(QtGui.QDialog):
+    
+    def __init__(self):
+      QtGui.QDialog.__init__(self)
+      # Set up the user interface from Designer.
+      self.ui = Ui_Dialog()
+      self.ui.setupUi(self)
+      
+      self.blackPalette = self.ui.dsb_angle.palette()
+      self.redPalette = QPalette()
+      self.redPalette.setColor(QPalette.Text, QColor(255,0,0))
+      self.NOK = False
+      
+      self.initDefaut()
+      self.initDialog(self.defaut)
+      self.ui.dsb_angle.setSpecialValueText("saisie_obligatoire")
+      self.ui.dsb_rCintr.setSpecialValueText("saisie_obligatoire")
+      self.ui.dsb_lTubeP1.setSpecialValueText("saisie_obligatoire")
+      self.ui.dsb_lTubeP2.setSpecialValueText("saisie_obligatoire")
+      self.ui.dsb_epais.setSpecialValueText("saisie_obligatoire")
+      self.ui.dsb_dext.setSpecialValueText("saisie_obligatoire")
+      self.ui.dsb_profondeur.setSpecialValueText("saisie_obligatoire")
+      self.ui.dsb_longueur.setSpecialValueText("saisie_obligatoire")
+      self.ui.dsb_azimut.setSpecialValueText("saisie_obligatoire")
+      self.ui.dsb_orientation.setSpecialValueText("saisie_obligatoire")
+      self.ui.dsb_posiAngul.setSpecialValueText("saisie_obligatoire")
+      self.ui.dsb_absCurv.setSpecialValueText("saisie_obligatoire")
+      self.ui.sb_nbTranches.setSpecialValueText("saisie_obligatoire")
+      self.ui.sb_nbCouronne.setSpecialValueText("saisie_obligatoire")
+      self.ui.sb_nbSecteur.setSpecialValueText("saisie_obligatoire")
+      self.ui.dsb_aretesFaceFissure.setSpecialValueText("automatique")
+      self.ui.dsb_influence.setSpecialValueText("automatique")
+      self.ui.lb_calcul.hide()
+      
+      # Connect up the buttons.
+      self.connect(self.ui.pb_valPrec, QtCore.SIGNAL("clicked()"),
+                   self.readValPrec)
+      self.connect(self.ui.pb_reset, QtCore.SIGNAL("clicked()"),
+                   self.resetVal)
+      self.connect(self.ui.pb_recharger, QtCore.SIGNAL("clicked()"),
+                   self.recharger)
+      self.connect(self.ui.pb_sauver, QtCore.SIGNAL("clicked()"),
+                   self.sauver)
+      self.disconnect(self.ui.buttonBox, QtCore.SIGNAL("accepted()"), self.accept)
+      self.connect(self.ui.buttonBox, QtCore.SIGNAL("accepted()"),
+                   self.execute)
+    
+    def initDefaut(self):
+      self.defaut = dict(
+        angle             = -181.0,
+        rCintr            = 0.0,
+        lTubeP1           = 0.0,
+        lTubeP2           = 0.0,
+        epais             = 0.0,
+        dext              = 0.0,
+        profondeur        = 0.0,
+        longueur          = 0.0,
+        azimut            = -181.0,
+        orientation       = -1.0,
+        posiAngul         = -181.0,
+        absCurv           = 0.0,
+        nbTranches        = 7,
+        nbCouronnes       = 1,
+        nbSecteurs        = 3,
+        cbOptDiscrSain    = False,
+        cbOptDiscrFiss    = False,
+        rbPosiAngul       = True,
+        rbFissExt         = True,
+        cbForceEllipse    = False,
+        nbAxeTubeP1       = 15,
+        nbAxeTubeP2       = 15,
+        nbAxeCoude        = 10,
+        nbCirconf         = 20,
+        nbEpaisseur       = 3,
+        rayonTore         = 2.0,
+        aretesFaceFissure = 0.0,
+        influence         = 0.0,
+        )
+      
+    def initDialog(self, dico):
+      self.ui.dsb_angle.setValue(dico['angle'])
+      self.ui.dsb_rCintr.setValue(dico['rCintr'])
+      self.ui.dsb_lTubeP1.setValue(dico['lTubeP1'])
+      self.ui.dsb_lTubeP2.setValue(dico['lTubeP2'])
+      self.ui.dsb_epais.setValue(dico['epais'])
+      self.ui.dsb_dext.setValue(dico['dext'])
+      self.ui.dsb_profondeur.setValue(dico['profondeur'])
+      self.ui.dsb_longueur.setValue(dico['longueur'])
+      self.ui.dsb_azimut.setValue(dico['azimut'])
+      self.ui.dsb_orientation.setValue(dico['orientation'])
+      self.ui.dsb_posiAngul.setValue(dico['posiAngul'])
+      self.ui.dsb_absCurv.setValue(dico['absCurv'])
+      self.ui.sb_nbTranches.setValue(dico['nbTranches'])
+      self.ui.sb_nbCouronne.setValue(dico['nbCouronnes'])
+      self.ui.sb_nbSecteur.setValue(dico['nbSecteurs'])
+      self.ui.dsb_aretesFaceFissure.setValue(dico['aretesFaceFissure'])
+      self.ui.dsb_influence.setValue(dico['influence'])
+      self.ui.sb_nbAxeTubeP1.setValue(dico['nbAxeTubeP1'])
+      self.ui.sb_nbAxeTubeP2.setValue(dico['nbAxeTubeP2'])
+      self.ui.sb_nbAxeCoude.setValue(dico['nbAxeCoude'])
+      self.ui.sb_nbCirconf.setValue(dico['nbCirconf'])
+      self.ui.sb_nbEpaisseur.setValue(dico['nbEpaisseur'])
+      self.ui.dsb_rayonTore.setValue(dico['rayonTore'])
+      #self.ui.cb_optDiscrSain.setChecked(False)
+      #self.ui.gb_discrSain.setShown(False)
+      self.ui.cb_optDiscrSain.setChecked(not(dico['cbOptDiscrSain']))
+      self.ui.cb_optDiscrSain.click()
+      self.ui.cb_optDiscrFiss.setChecked(not(dico['cbOptDiscrFiss']))
+      self.ui.cb_optDiscrFiss.click()
+      if dico['rbPosiAngul']:
+        self.ui.dsb_absCurv.setEnabled(False)
+        self.ui.dsb_posiAngul.setEnabled(True)
+        self.ui.rb_posiAngul.setChecked(True)
+        #self.ui.rb_posiAngul.click()
+      else:
+        self.ui.dsb_absCurv.setEnabled(True)
+        self.ui.dsb_posiAngul.setEnabled(False)
+        self.ui.rb_absCurv.setChecked(True)
+        #self.ui.rb_absCurv.click()
+      self.ui.rb_fissExt.setChecked(dico['rbFissExt'])
+      self.ui.cb_forceEllipse.setChecked(dico['cbForceEllipse'])
+      incomplet = self.testval(dico)
+      pass
+    
+    def testval(self, dico):
+      incomplet = False
+      if dico['angle'] < -180.0:
+        self.ui.dsb_angle.setPalette(self.redPalette)
+        incomplet = True
+      else:
+        self.ui.dsb_angle.setPalette(self.blackPalette)
+        
+      if dico['rCintr'] == 0.0:
+        self.ui.dsb_rCintr.setPalette(self.redPalette)
+        incomplet = True
+      else:
+        self.ui.dsb_rCintr.setPalette(self.blackPalette)
+        
+      if dico['lTubeP1'] == 0.0:  
+        self.ui.dsb_lTubeP1.setPalette(self.redPalette)
+        incomplet = True
+      else:
+        self.ui.dsb_lTubeP1.setPalette(self.blackPalette)
+        
+      if dico['lTubeP2'] == 0.0:  
+        self.ui.dsb_lTubeP2.setPalette(self.redPalette)
+        incomplet = True
+      else:
+        self.ui.dsb_lTubeP2.setPalette(self.blackPalette)
+        
+      if dico['epais'] == 0.0:  
+        self.ui.dsb_epais.setPalette(self.redPalette)
+        incomplet = True
+      else:
+        self.ui.dsb_epais.setPalette(self.blackPalette)
+        
+      if dico['dext'] == 0.0:  
+        self.ui.dsb_dext.setPalette(self.redPalette)
+        incomplet = True
+      else:
+        self.ui.dsb_dext.setPalette(self.blackPalette)
+        
+      if dico['profondeur'] == 0.0:  
+        self.ui.dsb_profondeur.setPalette(self.redPalette)
+        incomplet = True
+      else:
+        self.ui.dsb_profondeur.setPalette(self.blackPalette)
+        
+      if dico['longueur'] == 0.0:  
+        self.ui.dsb_longueur.setPalette(self.redPalette)
+        incomplet = True
+      else:
+        self.ui.dsb_longueur.setPalette(self.blackPalette)
+        
+      if dico['azimut'] < -180.0:  
+        self.ui.dsb_azimut.setPalette(self.redPalette)
+        incomplet = True
+      else:
+        self.ui.dsb_azimut.setPalette(self.blackPalette)
+        
+      if dico['orientation'] < 0.0:  
+        self.ui.dsb_orientation.setPalette(self.redPalette)
+        incomplet = True
+      else:
+        self.ui.dsb_orientation.setPalette(self.blackPalette)
+        
+      if dico['posiAngul'] < -180.0 and dico['rbPosiAngul'] == True:  
+        self.ui.dsb_posiAngul.setPalette(self.redPalette)
+        incomplet = True
+      else:
+        self.ui.dsb_posiAngul.setPalette(self.blackPalette)
+        
+      if dico['absCurv'] == 0.0 and dico['rbPosiAngul'] == False:  
+        self.ui.dsb_absCurv.setPalette(self.redPalette)
+        incomplet = True
+      else:
+        self.ui.dsb_absCurv.setPalette(self.blackPalette)
+        
+      if dico['nbTranches'] == 7:  
+        self.ui.sb_nbTranches.setPalette(self.redPalette)
+        incomplet = True
+      else:
+        self.ui.sb_nbTranches.setPalette(self.blackPalette)
+        
+      if dico['nbCouronnes'] == 1:  
+        self.ui.sb_nbCouronne.setPalette(self.redPalette)
+        incomplet = True
+      else:
+        self.ui.sb_nbCouronne.setPalette(self.blackPalette)
+        
+      if dico['nbSecteurs'] == 3:  
+        self.ui.sb_nbSecteur.setPalette(self.redPalette)
+        incomplet = True
+      else:
+        self.ui.sb_nbSecteur.setPalette(self.blackPalette)
+        
+      print "incomplet: ", incomplet
+      return incomplet
+    
+    def fileDefault(self):
+      filedef = os.path.expanduser("~/.config/salome/dialogFissureCoude.dic")
+      print filedef
+      return filedef
+    
+    def writeDefault(self, dico):
+      filedef = self.fileDefault()
+      f = open(filedef, 'w')
+      f.write(str(dico))
+      f.close()
+    
+    def readValPrec(self):
+      filedef = self.fileDefault()
+      if os.path.exists(filedef):
+        f = open(filedef, 'r')
+        txt = f.read()
+        dico = eval(txt)
+        print dico
+        self.initDialog(dico)
+
+    def resetVal(self):
+      #self.initDefaut()
+      self.initDialog(self.defaut)
+      
+    def sauver(self):
+      print "sauver"
+      fileDiag = QFileDialog(self)
+      fileDiag.setFileMode(QFileDialog.AnyFile)
+      fileDiag.setNameFilter("Parametres *.dic (*.dic)")
+      fileDiag.setViewMode(QFileDialog.List)
+      if fileDiag.exec_() :
+        fileNames = fileDiag.selectedFiles()
+        filedef = fileNames[0]
+        dico = self.creeDico()
+        f = open(filedef, 'w')
+        f.write(str(dico))
+        f.close()
+        
+    def recharger(self):
+      print "recharger"
+      fileDiag = QFileDialog(self)
+      fileDiag.setFileMode(QFileDialog.ExistingFile)
+      fileDiag.setNameFilter("Parametres *.dic (*.dic)")
+      fileDiag.setViewMode(QFileDialog.Detail)
+      if fileDiag.exec_() :
+        fileNames = fileDiag.selectedFiles()
+        filedef = fileNames[0]
+        print filedef
+        if os.path.exists(filedef):
+          f = open(filedef, 'r')
+          txt = f.read()
+          dico = eval(txt)
+          print dico
+          self.initDialog(dico)
+         
+    def creeDico(self):
+      dico = dict(
+        angle             = self.ui.dsb_angle.value(),
+        rCintr            = self.ui.dsb_rCintr.value(),
+        lTubeP1           = self.ui.dsb_lTubeP1.value(),
+        lTubeP2           = self.ui.dsb_lTubeP2.value(),
+        epais             = self.ui.dsb_epais.value(),
+        dext              = self.ui.dsb_dext.value(),
+        profondeur        = self.ui.dsb_profondeur.value(),
+        longueur          = self.ui.dsb_longueur.value(),
+        azimut            = self.ui.dsb_azimut.value(),
+        orientation       = self.ui.dsb_orientation.value(),
+        posiAngul         = self.ui.dsb_posiAngul.value(),
+        absCurv           = self.ui.dsb_absCurv.value(),
+        nbTranches        = self.ui.sb_nbTranches.value(),
+        nbCouronnes       = self.ui.sb_nbCouronne.value(),
+        nbSecteurs        = self.ui.sb_nbSecteur.value(),
+        cbOptDiscrSain    = self.ui.cb_optDiscrSain.isChecked(),
+        cbOptDiscrFiss    = self.ui.cb_optDiscrFiss.isChecked(),
+        rbPosiAngul       = self.ui.rb_posiAngul.isChecked(),
+        rbFissExt         = self.ui.rb_fissExt.isChecked(),
+        cbForceEllipse    = self.ui.cb_forceEllipse.isChecked(),
+        nbAxeTubeP1       = self.ui.sb_nbAxeTubeP1.value(),
+        nbAxeTubeP2       = self.ui.sb_nbAxeTubeP2.value(),
+        nbAxeCoude        = self.ui.sb_nbAxeCoude.value(),
+        nbCirconf         = self.ui.sb_nbCirconf.value(),
+        nbEpaisseur       = self.ui.sb_nbEpaisseur.value(),
+        rayonTore         = self.ui.dsb_rayonTore.value(),
+        aretesFaceFissure = self.ui.dsb_aretesFaceFissure.value(),
+        influence         = self.ui.dsb_influence.value(),
+        )
+      print dico
+      return dico
+      
+    def checkValues(self):
+      return self.NOK
+
+    def execute(self):
+      dico = self.creeDico()
+      NOK = self.testval(dico)
+      if not(NOK):
+        dico['lenSegPipe'] = (dico['longueur'] + math.pi*dico['profondeur'])/dico['nbTranches']
+        print 'lenSegPipe', dico['lenSegPipe']
+        areteMinAngle = (dico['rCintr'] -dico['dext']/2.0)*(dico['angle']*math.pi/180.0)/dico['nbAxeCoude']
+        print'areteMinAngle', areteMinAngle
+        areteMinCirco = dico['dext']*math.pi/(2*dico['nbCirconf'])
+        print'areteMinCirco', areteMinCirco
+        areteMinEpais = dico['epais']/dico['nbEpaisseur']
+        print'areteMinEpais', areteMinEpais
+        if dico['influence'] == 0:
+          dico['influence'] = max(areteMinAngle, areteMinCirco, areteMinEpais)
+          print 'influence', dico['influence']
+        if dico['aretesFaceFissure'] == 0:
+          dico['aretesFaceFissure'] = (areteMinAngle + areteMinCirco)/2.0
+          print 'aretesFaceFissure', dico['aretesFaceFissure']
+        if dico['rbPosiAngul'] == False:
+          rmoy = (dico['dext'] - dico['epais'])/2.0
+          eta = 1
+          if dico['rbFissExt'] == False:
+            eta = -1
+          dico['posiAngul'] = (180.0/math.pi)*dico['absCurv']/(dico['rCintr']+(rmoy+eta*dico['epais']/2.0)*math.cos(math.pi*dico['azimut']/180.))
+          print 'posiAngul' , dico['posiAngul']
+        
+        self.writeDefault(dico)
+        self.ui.lb_calcul.show()
+        probleme = fissureCoude_ihm(0)
+        probleme.setDicoParams(dico)
+        probleme.executeProbleme()
+      self.NOK = NOK
+      self.accept()
+    
+    pass 
+
+# ----------------------------------------------------------------------------
+                     
+  window = fissureCoudeDialog()
+#  window.ui.dsb_tolerance.setValue(0.01)
+  retry = True
+  while(retry):
+    retry = False
+    window.exec_()
+    result = window.result()
+    if result:
+      # dialog accepted
+      print "dialog accepted, check"
+      retry = window.checkValues()
+    else:
+      print "dialog rejected, exit"
+  pass
+  
diff --git a/src/Tools/blocFissure/ihm/fissureGenerale.ui b/src/Tools/blocFissure/ihm/fissureGenerale.ui
new file mode 100644 (file)
index 0000000..c18b3c1
--- /dev/null
@@ -0,0 +1,448 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>631</width>
+    <height>490</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <property name="toolTip">
+   <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Insertion d'un maillage de fissure dans un maillage hexaédrique sain.&lt;/p&gt;&lt;p&gt;Le maillage sain est fourni sous forme de fichier Med.&lt;/p&gt;&lt;p&gt;La face de fissure est décrite par une géométrie dans un fichier brep.&lt;/p&gt;&lt;p&gt;La ou les arêtes de fond de fissure sont données par leurs index dans la face de fissure.&lt;/p&gt;&lt;p&gt;La procédure identfie des mailles saines à enlever et remailler, construit un maillage régulier rayonnant autour de la ligne de fond de fissure, reconstitue les faces externes en triangles, complète la zone à remailler en tétraèdres.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_11">
+   <item row="0" column="0" colspan="2">
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>maillage sain et géometries de fissure</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_4">
+      <item row="0" column="0">
+       <layout class="QGridLayout" name="gridLayout">
+        <item row="0" column="0">
+         <widget class="QPushButton" name="pb_maillage">
+          <property name="toolTip">
+           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;sélection du fichier med du maillage sain (hexaèdres)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          </property>
+          <property name="text">
+           <string>maillage sain</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1">
+         <widget class="QLineEdit" name="le_maillage">
+          <property name="toolTip">
+           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;fichier med du maillage sain (hexaèdres)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0">
+         <widget class="QPushButton" name="pb_facefiss">
+          <property name="toolTip">
+           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;sélection du fichier brep (géométrie) décrivant la face de fissure.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          </property>
+          <property name="text">
+           <string>face fissure</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1">
+         <widget class="QLineEdit" name="le_facefiss">
+          <property name="toolTip">
+           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;fichier brep (géométrie) décrivant la face de fissure.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item row="1" column="0">
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <widget class="QLabel" name="label">
+          <property name="text">
+           <string>index edges fond fissure</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="le_fondfiss">
+          <property name="toolTip">
+           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Index des edges décrivant le fond de fissure, dans la face de fissure.&lt;/p&gt;&lt;p&gt;Sous forme d'une liste Python.&lt;/p&gt;&lt;p&gt;Exemples :&lt;span style=&quot; color:#00ffff;&quot;/&gt;&lt;span style=&quot; font-style:italic; color:#00ffff;&quot;&gt;[5,9]&lt;/span&gt; ou &lt;span style=&quot; font-style:italic; color:#00ffff;&quot;&gt;[3]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;(on peut récupérer ces valeurs à l'aide du dialogue de création de groupes d'edges, dans GEOM)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer name="horizontalSpacer">
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>40</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </item>
+     </layout>
+     <zorder></zorder>
+     <zorder></zorder>
+    </widget>
+   </item>
+   <item row="1" column="0" colspan="2">
+    <layout class="QGridLayout" name="gridLayout_10">
+     <item row="0" column="0">
+      <widget class="QGroupBox" name="groupBox_2">
+       <property name="title">
+        <string>identification zone à remailler</string>
+       </property>
+       <layout class="QGridLayout" name="gridLayout_12">
+        <item row="0" column="0">
+         <layout class="QGridLayout" name="gridLayout_6">
+          <item row="0" column="0">
+           <widget class="QLabel" name="label_2">
+            <property name="text">
+             <string>distance influence</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1">
+           <widget class="QDoubleSpinBox" name="dsb_influence">
+            <property name="toolTip">
+             <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;La zone remaillée contiendra toutes les mailles du maillage sain à une distance de la face de fissure inférieure à cette valeur.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+        <item row="0" column="1">
+         <spacer name="horizontalSpacer_6">
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>0</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item row="1" column="0" colspan="2">
+         <widget class="QGroupBox" name="groupBox_3">
+          <property name="title">
+           <string>prémaillage face fissure</string>
+          </property>
+          <layout class="QGridLayout" name="gridLayout_5">
+           <item row="0" column="0">
+            <layout class="QGridLayout" name="gridLayout_2">
+             <item row="0" column="0">
+              <widget class="QLabel" name="label_3">
+               <property name="text">
+                <string>min</string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="QDoubleSpinBox" name="dsb_meshBrepMin">
+               <property name="toolTip">
+                <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pour faciliter la détermination de la zone à remailler, il faut des points sur la face de fissure, suffisament resserrés, en relation avec la taille des mailles du maillage sain.&lt;/p&gt;&lt;p&gt;Ces points sont obtenus par pré maillage de la face de fissure, en triangles. On donne la taille min et max des triangles.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+               </property>
+               <property name="maximum">
+                <double>1000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QLabel" name="label_4">
+               <property name="text">
+                <string>max</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QDoubleSpinBox" name="dsb_meshBrepMax">
+               <property name="toolTip">
+                <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pour faciliter la détermination de la zone à remailler, il faut des points sur la face de fissure, suffisament resserrés, en relation avec la taille des mailles du maillage sain.&lt;/p&gt;&lt;p&gt;Ces points sont obtenus par pré maillage de la face de fissure, en triangles. On donne la taille min et max des triangles.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+               </property>
+               <property name="maximum">
+                <double>1000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </item>
+           <item row="0" column="1">
+            <spacer name="horizontalSpacer_3">
+             <property name="orientation">
+              <enum>Qt::Horizontal</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>34</width>
+               <height>20</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+          </layout>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+     </item>
+     <item row="0" column="1" rowspan="2">
+      <widget class="QGroupBox" name="groupBox_4">
+       <property name="title">
+        <string>maillage zone de fissure</string>
+       </property>
+       <layout class="QGridLayout" name="gridLayout_9">
+        <item row="0" column="0">
+         <widget class="QGroupBox" name="groupBox_5">
+          <property name="title">
+           <string>pipe rayonnant</string>
+          </property>
+          <layout class="QGridLayout" name="gridLayout_7">
+           <item row="0" column="0">
+            <layout class="QGridLayout" name="gridLayout_3">
+             <item row="0" column="0">
+              <widget class="QLabel" name="label_5">
+               <property name="text">
+                <string>rayon pipe</string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="QDoubleSpinBox" name="dsb_rayonPipe">
+               <property name="toolTip">
+                <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pipe rayonnant construit sur le fond de fissure :&lt;/p&gt;&lt;p&gt;Rayon du pipe.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+               </property>
+               <property name="maximum">
+                <double>1000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="0">
+              <widget class="QLabel" name="label_6">
+               <property name="text">
+                <string>longueur mailles</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QDoubleSpinBox" name="dsb_lenSegPipe">
+               <property name="toolTip">
+                <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pipe rayonnant construit sur le fond de fissure :&lt;/p&gt;&lt;p&gt;Longueur des mailles le long de la ligne de fond de fissure.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+               </property>
+               <property name="maximum">
+                <double>1000000.000000000000000</double>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="0">
+              <widget class="QLabel" name="label_7">
+               <property name="text">
+                <string>couronnes</string>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="1">
+              <widget class="QSpinBox" name="sb_couronnes">
+               <property name="toolTip">
+                <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pipe rayonnant construit sur le fond de fissure :&lt;/p&gt;&lt;p&gt;nombre de couronnes de mailles autour de la ligne de fond de fissure.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+               </property>
+               <property name="minimum">
+                <number>2</number>
+               </property>
+               <property name="maximum">
+                <number>10000</number>
+               </property>
+               <property name="value">
+                <number>4</number>
+               </property>
+              </widget>
+             </item>
+             <item row="3" column="0">
+              <widget class="QLabel" name="label_8">
+               <property name="text">
+                <string>secteurs</string>
+               </property>
+              </widget>
+             </item>
+             <item row="3" column="1">
+              <widget class="QSpinBox" name="sb_secteurs">
+               <property name="toolTip">
+                <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pipe rayonnant construit sur le fond de fissure :&lt;/p&gt;&lt;p&gt;nombre de secteurs selon un cercle normal au fond de fissure.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+               </property>
+               <property name="minimum">
+                <number>4</number>
+               </property>
+               <property name="maximum">
+                <number>10000</number>
+               </property>
+               <property name="value">
+                <number>8</number>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </item>
+           <item row="0" column="1">
+            <spacer name="horizontalSpacer_4">
+             <property name="orientation">
+              <enum>Qt::Horizontal</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>6</width>
+               <height>20</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+          </layout>
+         </widget>
+        </item>
+        <item row="1" column="0">
+         <widget class="QGroupBox" name="groupBox_6">
+          <property name="title">
+           <string>faces externes</string>
+          </property>
+          <layout class="QGridLayout" name="gridLayout_8">
+           <item row="0" column="0">
+            <widget class="QLabel" name="label_9">
+             <property name="text">
+              <string>aretes face fissure</string>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="1">
+            <widget class="QDoubleSpinBox" name="dsb_areteFaceFissure">
+             <property name="toolTip">
+              <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Faces externes de la zone à remailler.&lt;/p&gt;&lt;p&gt;Mailage en triangles : valeur cible des arêtes.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+             </property>
+             <property name="maximum">
+              <double>1000000.000000000000000</double>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="2">
+            <spacer name="horizontalSpacer_5">
+             <property name="orientation">
+              <enum>Qt::Horizontal</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>1</width>
+               <height>20</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+          </layout>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+     </item>
+     <item row="1" column="0">
+      <spacer name="verticalSpacer">
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>112</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item row="2" column="1">
+    <spacer name="verticalSpacer_2">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>13</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="3" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout_5">
+     <item>
+      <spacer name="horizontalSpacer_2">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QDialogButtonBox" name="bb_OkCancel">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="standardButtons">
+        <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>bb_OkCancel</sender>
+   <signal>accepted()</signal>
+   <receiver>Dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>bb_OkCancel</sender>
+   <signal>rejected()</signal>
+   <receiver>Dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/Tools/blocFissure/materielCasTests/CMakeLists.txt b/src/Tools/blocFissure/materielCasTests/CMakeLists.txt
new file mode 100644 (file)
index 0000000..094f30a
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright (C) 2012-2014  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, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# --- scripts ---
+
+# scripts / static
+SET(plugin_SCRIPTS
+  __init__.py
+  cubeAngle.py
+  decoupeCylindre.py
+  disque_perce.py
+  ellipse_disque.py
+  ellipse_probleme.py
+  ellipse.py
+  eprouvetteCourbe.py
+  eprouvetteDroite.py
+  fissureGauche2.py
+  fissureGauche.py
+  genereMateriel.py
+  vis.py
+)
+
+# --- rules ---
+
+SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/blocFissure/materielCasTests)
diff --git a/src/Tools/blocFissure/materielCasTests/__init__.py b/src/Tools/blocFissure/materielCasTests/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/Tools/blocFissure/materielCasTests/cubeAngle.py b/src/Tools/blocFissure/materielCasTests/cubeAngle.py
new file mode 100644 (file)
index 0000000..e596663
--- /dev/null
@@ -0,0 +1,78 @@
+# -*- coding: iso-8859-1 -*-
+
+import sys
+import salome
+
+salome.salome_init()
+theStudy = salome.myStudy
+
+import salome_notebook
+notebook = salome_notebook.NoteBook(theStudy)
+
+import os
+from blocFissure import gmu
+
+###
+### GEOM component
+###
+
+import GEOM
+from salome.geom import geomBuilder
+import math
+import SALOMEDS
+
+
+geompy = geomBuilder.New(theStudy)
+
+O = geompy.MakeVertex(0, 0, 0)
+OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
+OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
+OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
+Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
+Vertex_1 = geompy.MakeVertex(0, 0, 100)
+Disk_1 = geompy.MakeDiskPntVecR(Vertex_1, OZ, 60)
+Vertex_2 = geompy.MakeVertex(-5, -5, 90)
+Vertex_3 = geompy.MakeVertex(65, 65, 110)
+Box_2 = geompy.MakeBoxTwoPnt(Vertex_3, Vertex_2)
+Common_1 = geompy.MakeCommon(Disk_1, Box_2)
+geompy.Export(Common_1, os.path.join(gmu.pathBloc, "materielCasTests/CubeAngleFiss.brep"), "BREP")
+geompy.addToStudy( O, 'O' )
+geompy.addToStudy( OX, 'OX' )
+geompy.addToStudy( OY, 'OY' )
+geompy.addToStudy( OZ, 'OZ' )
+geompy.addToStudy( Box_1, 'Box_1' )
+geompy.addToStudy( Vertex_1, 'Vertex_1' )
+geompy.addToStudy( Disk_1, 'Disk_1' )
+geompy.addToStudy( Vertex_2, 'Vertex_2' )
+geompy.addToStudy( Vertex_3, 'Vertex_3' )
+geompy.addToStudy( Box_2, 'Box_2' )
+geompy.addToStudy( Common_1, 'Common_1' )
+
+###
+### SMESH component
+###
+
+import  SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+
+smesh = smeshBuilder.New(theStudy)
+from salome.StdMeshers import StdMeshersBuilder
+Mesh_1 = smesh.Mesh(Box_1)
+Regular_1D = Mesh_1.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(15)
+Nb_Segments_1.SetDistrType( 0 )
+Quadrangle_2D = Mesh_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
+Hexa_3D = Mesh_1.Hexahedron(algo=smeshBuilder.Hexa)
+isDone = Mesh_1.Compute()
+smesh.SetName(Mesh_1, 'Mesh_1')
+Mesh_1.ExportMED(  os.path.join(gmu.pathBloc, "materielCasTests/CubeAngle.med"), 0, SMESH.MED_V2_2, 1 )
+
+## set object names
+smesh.SetName(Mesh_1.GetMesh(), 'Mesh_1')
+smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
+smesh.SetName(Nb_Segments_1, 'Nb. Segments_1')
+smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
+smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D')
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/src/Tools/blocFissure/materielCasTests/decoupeCylindre.py b/src/Tools/blocFissure/materielCasTests/decoupeCylindre.py
new file mode 100644 (file)
index 0000000..b650fb2
--- /dev/null
@@ -0,0 +1,167 @@
+# -*- coding: iso-8859-1 -*-
+
+import sys
+import salome
+
+salome.salome_init()
+theStudy = salome.myStudy
+
+import salome_notebook
+notebook = salome_notebook.notebook
+
+import os
+from blocFissure import gmu
+
+###
+### GEOM component
+###
+
+import GEOM
+from salome.geom import geomBuilder
+import math
+import SALOMEDS
+
+
+geompy = geomBuilder.New(theStudy)
+
+O = geompy.MakeVertex(0, 0, 0)
+OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
+OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
+OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
+O_1 = geompy.MakeVertex(0, 0, 0)
+OX_1 = geompy.MakeVectorDXDYDZ(1, 0, 0)
+OY_1 = geompy.MakeVectorDXDYDZ(0, 1, 0)
+OZ_1 = geompy.MakeVectorDXDYDZ(0, 0, 1)
+Vertex_1 = geompy.MakeVertex(0, 0, 500)
+Vertex_2 = geompy.MakeVertex(100, 0, 500)
+Vertex_3 = geompy.MakeVertex(110, 0, 500)
+Vertex_4 = geompy.MakeVertex(117.071068, -2.928932, 500)
+Vertex_5 = geompy.MakeVertex(120, -10, 500)
+Vertex_6 = geompy.MakeVertex(120, -30, 500)
+Vertex_7 = geompy.MakeVertex(122.928932, -37.071068, 500)
+Vertex_8 = geompy.MakeVertex(130, -40, 500)
+Vertex_9 = geompy.MakeVertex(135, -40, 500)
+Vertex_10 = geompy.MakeVertex(160, -40, 500)
+Plane_1 = geompy.MakePlaneLCS(None, 2000, 2)
+Mirror_1_1 = geompy.MakeMirrorByPlane(Vertex_2, Plane_1)
+Mirror_1_2 = geompy.MakeMirrorByPlane(Vertex_3, Plane_1)
+Mirror_1_3 = geompy.MakeMirrorByPlane(Vertex_4, Plane_1)
+Mirror_1_4 = geompy.MakeMirrorByPlane(Vertex_5, Plane_1)
+Mirror_1_5 = geompy.MakeMirrorByPlane(Vertex_6, Plane_1)
+Mirror_1_6 = geompy.MakeMirrorByPlane(Vertex_7, Plane_1)
+Mirror_1_7 = geompy.MakeMirrorByPlane(Vertex_8, Plane_1)
+Mirror_1_8 = geompy.MakeMirrorByPlane(Vertex_9, Plane_1)
+Mirror_1_9 = geompy.MakeMirrorByPlane(Vertex_10, Plane_1)
+Curve_2 = geompy.MakeInterpol([Mirror_1_9, Mirror_1_8, Mirror_1_7, Mirror_1_6, Mirror_1_5, Mirror_1_4, Mirror_1_3, Mirror_1_2, Mirror_1_1, Vertex_1, Vertex_2, Vertex_3, Vertex_4, Vertex_5, Vertex_6, Vertex_7, Vertex_8, Vertex_9, Vertex_10], False, False)
+Circle_1 = geompy.MakeCircle(Vertex_1, None, 145)
+Vertex_11 = geompy.MakeVertex(0, -165, 500)
+Curve_2_vertex_2 = geompy.GetSubShape(Curve_2, [2])
+Curve_2_vertex_3 = geompy.GetSubShape(Curve_2, [3])
+Arc_1 = geompy.MakeArc(Curve_2_vertex_2, Vertex_11, Curve_2_vertex_3)
+FissInCylindre = geompy.MakeFaceWires([Curve_2, Arc_1], 1)
+Divided_Cylinder_1 = geompy.MakeDividedCylinder(145, 800, GEOM.SQUARE)
+CylindreSain = geompy.MakeRotation(Divided_Cylinder_1, OZ, 45*math.pi/180.0)
+[Compound_1, vertical, radial, Compound_4] = geompy.Propagate(CylindreSain)
+geompy.Export(FissInCylindre, os.path.join(gmu.pathBloc, "materielCasTests/FissInCylindre.brep"), "BREP")
+Vertex_12 = geompy.MakeVertex(0, -145, 500)
+Circle_2 = geompy.MakeCircle(Vertex_12, None, 145)
+Face_1 = geompy.MakeFaceWires([Circle_2], 1)
+Vertex_13 = geompy.MakeVertex(0, 0, 500)
+Disk_1 = geompy.MakeDiskPntVecR(Vertex_13, OZ_1, 170)
+FissInCylindre2 = geompy.MakeCommon(Face_1, Disk_1)
+geompy.Export(FissInCylindre2, os.path.join(gmu.pathBloc, "materielCasTests/FissInCylindre2.brep"), "BREP")
+geompy.addToStudy( O, 'O' )
+geompy.addToStudy( OX, 'OX' )
+geompy.addToStudy( OY, 'OY' )
+geompy.addToStudy( OZ, 'OZ' )
+geompy.addToStudy( O_1, 'O' )
+geompy.addToStudy( OX_1, 'OX' )
+geompy.addToStudy( OY_1, 'OY' )
+geompy.addToStudy( OZ_1, 'OZ' )
+geompy.addToStudy( Vertex_1, 'Vertex_1' )
+geompy.addToStudy( Vertex_2, 'Vertex_2' )
+geompy.addToStudy( Vertex_3, 'Vertex_3' )
+geompy.addToStudy( Vertex_4, 'Vertex_4' )
+geompy.addToStudy( Vertex_5, 'Vertex_5' )
+geompy.addToStudy( Vertex_6, 'Vertex_6' )
+geompy.addToStudy( Vertex_7, 'Vertex_7' )
+geompy.addToStudy( Vertex_8, 'Vertex_8' )
+geompy.addToStudy( Vertex_9, 'Vertex_9' )
+geompy.addToStudy( Vertex_10, 'Vertex_10' )
+geompy.addToStudy( Plane_1, 'Plane_1' )
+geompy.addToStudy( Mirror_1_1, 'Mirror_1_1' )
+geompy.addToStudy( Mirror_1_2, 'Mirror_1_2' )
+geompy.addToStudy( Mirror_1_3, 'Mirror_1_3' )
+geompy.addToStudy( Mirror_1_4, 'Mirror_1_4' )
+geompy.addToStudy( Mirror_1_5, 'Mirror_1_5' )
+geompy.addToStudy( Mirror_1_6, 'Mirror_1_6' )
+geompy.addToStudy( Mirror_1_7, 'Mirror_1_7' )
+geompy.addToStudy( Mirror_1_8, 'Mirror_1_8' )
+geompy.addToStudy( Mirror_1_9, 'Mirror_1_9' )
+geompy.addToStudy( Curve_2, 'Curve_2' )
+geompy.addToStudy( Circle_1, 'Circle_1' )
+geompy.addToStudy( Vertex_11, 'Vertex_11' )
+geompy.addToStudyInFather( Curve_2, Curve_2_vertex_2, 'Curve_2:vertex_2' )
+geompy.addToStudyInFather( Curve_2, Curve_2_vertex_3, 'Curve_2:vertex_3' )
+geompy.addToStudy( Arc_1, 'Arc_1' )
+geompy.addToStudy( FissInCylindre, 'FissInCylindre' )
+geompy.addToStudy( Divided_Cylinder_1, 'Divided Cylinder_1' )
+geompy.addToStudy( CylindreSain, 'CylindreSain' )
+geompy.addToStudyInFather( CylindreSain, Compound_1, 'Compound_1' )
+geompy.addToStudyInFather( CylindreSain, vertical, 'vertical' )
+geompy.addToStudyInFather( CylindreSain, radial, 'radial' )
+geompy.addToStudyInFather( CylindreSain, Compound_4, 'Compound_4' )
+geompy.addToStudy( Vertex_12, 'Vertex_12' )
+geompy.addToStudy( Circle_2, 'Circle_2' )
+geompy.addToStudy( Face_1, 'Face_1' )
+geompy.addToStudy( Vertex_13, 'Vertex_13' )
+geompy.addToStudy( Disk_1, 'Disk_1' )
+geompy.addToStudy( FissInCylindre2, 'FissInCylindre2' )
+
+###
+### SMESH component
+###
+
+import  SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+
+smesh = smeshBuilder.New(theStudy)
+from salome.StdMeshers import StdMeshersBuilder
+smeshObj_1 = smesh.CreateHypothesis('NumberOfSegments')
+smeshObj_1.SetNumberOfSegments( 5 )
+smeshObj_1.SetDistrType( 0 )
+CylindreSain_1 = smesh.Mesh(CylindreSain)
+Regular_1D = CylindreSain_1.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(15,[],[  ])
+Nb_Segments_1.SetDistrType( 0 )
+Quadrangle_2D = CylindreSain_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
+Hexa_3D = CylindreSain_1.Hexahedron(algo=smeshBuilder.Hexa)
+Regular_1D_1 = CylindreSain_1.Segment(geom=vertical)
+Nb_Segments_2 = Regular_1D_1.NumberOfSegments(30,[],[  ])
+Nb_Segments_2.SetDistrType( 0 )
+Regular_1D_2 = CylindreSain_1.Segment(geom=radial)
+Nb_Segments_3 = Regular_1D_2.NumberOfSegments(6,[],[  ])
+Nb_Segments_3.SetDistrType( 0 )
+isDone = CylindreSain_1.Compute()
+smesh.SetName(CylindreSain_1, 'CylindreSain')
+CylindreSain_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests//CylindreSain.med"), 0, SMESH.MED_V2_2, 1 )
+SubMesh_1 = Regular_1D_1.GetSubMesh()
+SubMesh_2 = Regular_1D_2.GetSubMesh()
+
+## some objects were removed
+aStudyBuilder = theStudy.NewBuilder()
+SO = theStudy.FindObjectIOR(theStudy.ConvertObjectToIOR(smeshObj_1))
+if SO is not None: aStudyBuilder.RemoveObjectWithChildren(SO)
+## set object names
+smesh.SetName(CylindreSain_1.GetMesh(), 'CylindreSain')
+smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
+smesh.SetName(Nb_Segments_1, 'Nb. Segments_1')
+smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
+smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D')
+smesh.SetName(Nb_Segments_2, 'Nb. Segments_2')
+smesh.SetName(Nb_Segments_3, 'Nb. Segments_3')
+smesh.SetName(SubMesh_1, 'SubMesh_1')
+smesh.SetName(SubMesh_2, 'SubMesh_2')
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/src/Tools/blocFissure/materielCasTests/disque_perce.py b/src/Tools/blocFissure/materielCasTests/disque_perce.py
new file mode 100644 (file)
index 0000000..2f2730d
--- /dev/null
@@ -0,0 +1,89 @@
+# -*- coding: iso-8859-1 -*-
+
+import sys
+import salome
+
+salome.salome_init()
+theStudy = salome.myStudy
+
+import salome_notebook
+notebook = salome_notebook.notebook
+
+import os
+from blocFissure import gmu
+
+
+###
+### GEOM component
+###
+
+import GEOM
+from salome.geom import geomBuilder
+import math
+import SALOMEDS
+
+
+geompy = geomBuilder.New(theStudy)
+
+O = geompy.MakeVertex(0, 0, 0)
+OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
+OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
+OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
+Cylinder_1 = geompy.MakeCylinderRH(100, 300)
+Cylinder_2 = geompy.MakeCylinderRH(600, 200)
+Cut_1 = geompy.MakeCut(Cylinder_2, Cylinder_1)
+Face_1 = geompy.MakeFaceHW(500, 1500, 3)
+Disque = geompy.MakePartition([Cut_1], [Face_1], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
+[Compound_1, Compound_2, Compound_3, Compound_4] = geompy.Propagate(Disque)
+geompy.addToStudy( O, 'O' )
+geompy.addToStudy( OX, 'OX' )
+geompy.addToStudy( OY, 'OY' )
+geompy.addToStudy( OZ, 'OZ' )
+geompy.addToStudy( Cylinder_1, 'Cylinder_1' )
+geompy.addToStudy( Cylinder_2, 'Cylinder_2' )
+geompy.addToStudy( Cut_1, 'Cut_1' )
+geompy.addToStudy( Face_1, 'Face_1' )
+geompy.addToStudy( Disque, 'Disque' )
+geompy.addToStudyInFather( Disque, Compound_1, 'Compound_1' )
+geompy.addToStudyInFather( Disque, Compound_2, 'Compound_2' )
+geompy.addToStudyInFather( Disque, Compound_3, 'Compound_3' )
+geompy.addToStudyInFather( Disque, Compound_4, 'Compound_4' )
+
+###
+### SMESH component
+###
+
+import  SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+
+smesh = smeshBuilder.New(theStudy)
+from salome.StdMeshers import StdMeshersBuilder
+Disque_1 = smesh.Mesh(Disque)
+Regular_1D = Disque_1.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
+Nb_Segments_1.SetDistrType( 0 )
+Hexa_3D = Disque_1.Hexahedron(algo=smeshBuilder.Hexa)
+Regular_1D_1 = Disque_1.Segment(geom=Compound_3)
+Nb_Segments_2 = Regular_1D_1.NumberOfSegments(20)
+Nb_Segments_2.SetDistrType( 0 )
+Regular_1D_2 = Disque_1.Segment(geom=Compound_4)
+status = Disque_1.AddHypothesis(Nb_Segments_2,Compound_4)
+Quadrangle_2D = Disque_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
+isDone = Disque_1.Compute()
+smesh.SetName(Disque_1, 'Disque')
+Disque_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/disque.med"), 0, SMESH.MED_V2_2, 1 )
+SubMesh_1 = Regular_1D_1.GetSubMesh()
+SubMesh_2 = Regular_1D_2.GetSubMesh()
+
+## set object names
+smesh.SetName(Disque_1.GetMesh(), 'Disque')
+smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
+smesh.SetName(Nb_Segments_1, 'Nb. Segments_1')
+smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D')
+smesh.SetName(Nb_Segments_2, 'Nb. Segments_2')
+smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
+smesh.SetName(SubMesh_1, 'SubMesh_1')
+smesh.SetName(SubMesh_2, 'SubMesh_2')
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/src/Tools/blocFissure/materielCasTests/ellipse.py b/src/Tools/blocFissure/materielCasTests/ellipse.py
new file mode 100644 (file)
index 0000000..8cf26ab
--- /dev/null
@@ -0,0 +1,61 @@
+# -*- coding: iso-8859-1 -*-
+
+import sys
+import salome
+
+salome.salome_init()
+theStudy = salome.myStudy
+
+import salome_notebook
+notebook = salome_notebook.notebook
+
+import os
+from blocFissure import gmu
+
+###
+### GEOM component
+###
+
+import GEOM
+from salome.geom import geomBuilder
+import math
+import SALOMEDS
+
+
+geompy = geomBuilder.New(theStudy)
+
+O = geompy.MakeVertex(0, 0, 0)
+OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
+OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
+OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
+Vertex_1 = geompy.MakeVertex(400, 0, 400)
+Vertex_2 = geompy.MakeVertex(400, 0, 500)
+Vector_1 = geompy.MakeVector(Vertex_1, Vertex_2)
+Disk_1 = geompy.MakeDiskPntVecR(Vertex_1, Vector_1, 50)
+Rotation_1 = geompy.MakeRotation(Disk_1, Vector_1, 180*math.pi/180.0)
+Scale_1 = geompy.MakeScaleAlongAxes(Rotation_1, Vertex_1, 1, 1.5, 1)
+Vertex_3 = geompy.MakeVertex(420, -400, 300)
+Vertex_4 = geompy.MakeVertex(500, 400, 500)
+Box_1 = geompy.MakeBoxTwoPnt(Vertex_4, Vertex_3)
+ellipse1 = geompy.MakeCut(Scale_1, Box_1)
+[fondFiss] = geompy.SubShapes(ellipse1, [4])
+geompy.addToStudy( O, 'O' )
+geompy.addToStudy( OX, 'OX' )
+geompy.addToStudy( OY, 'OY' )
+geompy.addToStudy( OZ, 'OZ' )
+geompy.addToStudy( Vertex_1, 'Vertex_1' )
+geompy.addToStudy( Vertex_2, 'Vertex_2' )
+geompy.addToStudy( Vector_1, 'Vector_1' )
+geompy.addToStudy( Disk_1, 'Disk_1' )
+geompy.addToStudy( Rotation_1, 'Rotation_1' )
+geompy.addToStudy( Scale_1, 'Scale_1' )
+geompy.addToStudy( Vertex_3, 'Vertex_3' )
+geompy.addToStudy( Vertex_4, 'Vertex_4' )
+geompy.addToStudy( Box_1, 'Box_1' )
+geompy.addToStudy( ellipse1, 'ellipse1' )
+geompy.addToStudyInFather( ellipse1, fondFiss, 'fondFiss' )
+geompy.Export(ellipse1, os.path.join(gmu.pathBloc, "materielCasTests/ellipse1.brep"), "BREP")
+
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/src/Tools/blocFissure/materielCasTests/ellipse_disque.py b/src/Tools/blocFissure/materielCasTests/ellipse_disque.py
new file mode 100644 (file)
index 0000000..9e74ff0
--- /dev/null
@@ -0,0 +1,53 @@
+# -*- coding: iso-8859-1 -*-
+
+import sys
+import salome
+
+salome.salome_init()
+theStudy = salome.myStudy
+
+import salome_notebook
+notebook = salome_notebook.NoteBook(theStudy)
+
+import os
+from blocFissure import gmu
+
+###
+### GEOM component
+###
+
+import GEOM
+from salome.geom import geomBuilder
+import math
+import SALOMEDS
+
+
+geompy = geomBuilder.New(theStudy)
+
+O = geompy.MakeVertex(0, 0, 0)
+OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
+OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
+OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
+Vertex_1 = geompy.MakeVertex(100, 0, 0)
+Disk_1 = geompy.MakeDiskPntVecR(Vertex_1, OY, 12.5)
+Scale_1 = geompy.MakeScaleAlongAxes(Disk_1, Vertex_1, 1, 1, 4.1)
+Vertex_2 = geompy.MakeVertex(98, -2, -2)
+Vertex_3 = geompy.MakeVertex(120, 2, 60)
+Box_1 = geompy.MakeBoxTwoPnt(Vertex_3, Vertex_2)
+Ellipse_disque = geompy.MakeCommon(Box_1, Scale_1)
+geompy.Export(Ellipse_disque, os.path.join(gmu.pathBloc, "materielCasTests/ellipse_disque.brep"), "BREP")
+geompy.addToStudy( O, 'O' )
+geompy.addToStudy( OX, 'OX' )
+geompy.addToStudy( OY, 'OY' )
+geompy.addToStudy( OZ, 'OZ' )
+geompy.addToStudy( Vertex_1, 'Vertex_1' )
+geompy.addToStudy( Disk_1, 'Disk_1' )
+geompy.addToStudy( Vertex_2, 'Vertex_2' )
+geompy.addToStudy( Scale_1, 'Scale_1' )
+geompy.addToStudy( Vertex_3, 'Vertex_3' )
+geompy.addToStudy( Box_1, 'Box_1' )
+geompy.addToStudy( Ellipse_disque, 'Ellipse_disque' )
+
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/src/Tools/blocFissure/materielCasTests/ellipse_probleme.py b/src/Tools/blocFissure/materielCasTests/ellipse_probleme.py
new file mode 100644 (file)
index 0000000..742197e
--- /dev/null
@@ -0,0 +1,59 @@
+# -*- coding: iso-8859-1 -*-
+
+import sys
+import salome
+
+salome.salome_init()
+theStudy = salome.myStudy
+
+import salome_notebook
+notebook = salome_notebook.notebook
+
+import os
+from blocFissure import gmu
+
+###
+### GEOM component
+###
+
+
+import GEOM
+from salome.geom import geomBuilder
+import math
+import SALOMEDS
+
+geompy = geomBuilder.New(theStudy)
+
+Disk_1 = geompy.MakeDiskR(100, 1)
+O = geompy.MakeVertex(0, 0, 0)
+OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
+OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
+OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
+Scale_1 = geompy.MakeScaleAlongAxes(Disk_1, None, 0.4, 0.75, 1)
+[Vertex_1] = geompy.ExtractShapes(Scale_1, geompy.ShapeType["VERTEX"], True)
+Rotation_1 = geompy.MakeRotation(Scale_1, OY, 190*math.pi/180.0)
+Rotation_2 = geompy.MakeRotation(Rotation_1, OZ, 10*math.pi/180.0)
+Vertex_2 = geompy.MakeVertex(20, -100, -50)
+Vertex_4 = geompy.MakeVertex(100, 100, 50)
+Box_1 = geompy.MakeBoxTwoPnt(Vertex_2, Vertex_4)
+Cut_1 = geompy.MakeCut(Rotation_1, Box_1)
+ellipse1 = geompy.MakeTranslation(Cut_1, 400, 0, 400)
+geompy.addToStudy( Disk_1, 'Disk_1' )
+geompy.addToStudy( O, 'O' )
+geompy.addToStudy( OX, 'OX' )
+geompy.addToStudy( OY, 'OY' )
+geompy.addToStudy( OZ, 'OZ' )
+geompy.addToStudy( Scale_1, 'Scale_1' )
+geompy.addToStudyInFather( Scale_1, Vertex_1, 'Vertex_1' )
+geompy.addToStudy( Rotation_1, 'Rotation_1' )
+geompy.addToStudy( Rotation_2, 'Rotation_2' )
+geompy.addToStudy( Vertex_2, 'Vertex_2' )
+geompy.addToStudy( Box_1, 'Box_1' )
+geompy.addToStudy( Vertex_4, 'Vertex_4' )
+geompy.addToStudy( Cut_1, 'Cut_1' )
+geompy.addToStudy( ellipse1, 'ellipse1_pb' )
+geompy.Export(ellipse1, os.path.join(gmu.pathBloc, "materielCasTests/ellipse1_pb.brep"), "BREP")
+
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py b/src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py
new file mode 100644 (file)
index 0000000..7cbff06
--- /dev/null
@@ -0,0 +1,107 @@
+# -*- coding: iso-8859-1 -*-
+
+import sys
+import salome
+
+salome.salome_init()
+theStudy = salome.myStudy
+
+import salome_notebook
+notebook = salome_notebook.notebook
+
+import os
+from blocFissure import gmu
+
+###
+### GEOM component
+###
+
+import GEOM
+from salome.geom import geomBuilder
+import math
+import SALOMEDS
+
+
+geompy = geomBuilder.New(theStudy)
+
+O = geompy.MakeVertex(0, 0, 0)
+OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
+OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
+OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
+Vertex_1 = geompy.MakeVertex(-2000, 0, 0)
+Cylinder_1 = geompy.MakeCylinder(Vertex_1, OY, 1900, 300)
+Cylinder_2 = geompy.MakeCylinder(Vertex_1, OY, 2100, 300)
+Cut_1 = geompy.MakeCut(Cylinder_2, Cylinder_1)
+Vertex_2 = geompy.MakeVertex(-500, -100, -300)
+Vertex_3 = geompy.MakeVertex(500, 400, 300)
+Box_1 = geompy.MakeBoxTwoPnt(Vertex_3, Vertex_2)
+Common_1 = geompy.MakeCommon(Box_1, Cut_1)
+Vertex_4 = geompy.MakeVertex(-300, -1000, 0)
+Cylinder_3 = geompy.MakeCylinder(Vertex_4, OX, 1100, 600)
+EprouvetteCourbe = geompy.MakeCut(Common_1, Cylinder_3)
+[Compound_y, Compound_z, Compound_x] = geompy.Propagate(EprouvetteCourbe)
+geomObj_1 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0)
+Sketch_1 = geompy.MakeSketcherOnPlane("Sketcher:F -110.000000 85.000000:T 220.000000 0.000000:T 0.000000 75.000000:T -220.000000 0.000000:WW", geomObj_1 )
+SectionDroite = geompy.MakeFaceWires([Sketch_1], 1)
+geompy.Export(SectionDroite, os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteCourbeFiss.brep"), "BREP")
+geompy.addToStudy( O, 'O' )
+geompy.addToStudy( OX, 'OX' )
+geompy.addToStudy( OY, 'OY' )
+geompy.addToStudy( OZ, 'OZ' )
+geompy.addToStudy( Vertex_1, 'Vertex_1' )
+geompy.addToStudy( Cylinder_1, 'Cylinder_1' )
+geompy.addToStudy( Cylinder_2, 'Cylinder_2' )
+geompy.addToStudy( Cut_1, 'Cut_1' )
+geompy.addToStudy( Vertex_2, 'Vertex_2' )
+geompy.addToStudy( Vertex_3, 'Vertex_3' )
+geompy.addToStudy( Box_1, 'Box_1' )
+geompy.addToStudy( Common_1, 'Common_1' )
+geompy.addToStudy( Cylinder_3, 'Cylinder_3' )
+geompy.addToStudy( Vertex_4, 'Vertex_4' )
+geompy.addToStudy( EprouvetteCourbe, 'EprouvetteCourbe' )
+geompy.addToStudy( Sketch_1, 'Sketch_1' )
+geompy.addToStudy( SectionDroite, 'SectionDroite' )
+geompy.addToStudyInFather( EprouvetteCourbe, Compound_y, 'Compound_y' )
+geompy.addToStudyInFather( EprouvetteCourbe, Compound_z, 'Compound_z' )
+geompy.addToStudyInFather( EprouvetteCourbe, Compound_x, 'Compound_x' )
+
+###
+### SMESH component
+###
+
+import  SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+
+smesh = smeshBuilder.New(theStudy)
+from salome.StdMeshers import StdMeshersBuilder
+EprouvetteCourbe_1 = smesh.Mesh(EprouvetteCourbe)
+Regular_1D = EprouvetteCourbe_1.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(50)
+Nb_Segments_1.SetDistrType( 0 )
+Quadrangle_2D = EprouvetteCourbe_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
+Hexa_3D = EprouvetteCourbe_1.Hexahedron(algo=smeshBuilder.Hexa)
+Regular_1D_1 = EprouvetteCourbe_1.Segment(geom=Compound_x)
+Nb_Segments_2 = Regular_1D_1.NumberOfSegments(15)
+Nb_Segments_2.SetDistrType( 0 )
+Regular_1D_2 = EprouvetteCourbe_1.Segment(geom=Compound_y)
+Nb_Segments_3 = Regular_1D_2.NumberOfSegments(25)
+Nb_Segments_3.SetDistrType( 0 )
+isDone = EprouvetteCourbe_1.Compute()
+smesh.SetName(EprouvetteCourbe_1, 'EprouvetteCourbe')
+EprouvetteCourbe_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteCourbe.med"), 0, SMESH.MED_V2_2, 1 )
+SubMesh_1 = Regular_1D_1.GetSubMesh()
+SubMesh_2 = Regular_1D_2.GetSubMesh()
+
+## set object names
+smesh.SetName(EprouvetteCourbe_1.GetMesh(), 'EprouvetteCourbe')
+smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
+smesh.SetName(Nb_Segments_1, 'Nb. Segments_1')
+smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
+smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D')
+smesh.SetName(Nb_Segments_2, 'Nb. Segments_2')
+smesh.SetName(Nb_Segments_3, 'Nb. Segments_3')
+smesh.SetName(SubMesh_1, 'SubMesh_1')
+smesh.SetName(SubMesh_2, 'SubMesh_2')
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/src/Tools/blocFissure/materielCasTests/eprouvetteDroite.py b/src/Tools/blocFissure/materielCasTests/eprouvetteDroite.py
new file mode 100644 (file)
index 0000000..0a70a26
--- /dev/null
@@ -0,0 +1,142 @@
+# -*- coding: iso-8859-1 -*-
+
+import sys
+import salome
+
+salome.salome_init()
+theStudy = salome.myStudy
+
+import salome_notebook
+notebook = salome_notebook.NoteBook(theStudy)
+
+import os
+from blocFissure import gmu
+
+###
+### GEOM component
+###
+
+import GEOM
+from salome.geom import geomBuilder
+import math
+import SALOMEDS
+
+
+geompy = geomBuilder.New(theStudy)
+
+O = geompy.MakeVertex(0, 0, 0)
+OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
+OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
+OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
+eprouvetteDroite = geompy.MakeBoxDXDYDZ(100, 200, 500)
+[Compound_z, Compound_y, Compound_x] = geompy.Propagate(eprouvetteDroite)
+
+Vertex_1 = geompy.MakeVertex(-10, -10, 200)
+geomObj_1 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0)
+Plane_1 = geompy.MakePlane(Vertex_1, OZ, 2000)
+geomObj_2 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0)
+Sketch_1 = geompy.MakeSketcherOnPlane("Sketcher:F 0.000000 0.000000:TT 120.000000 0.000000:T 0.000000 100.000000:T -120.000000 0.000000:WW", Plane_1 )
+sectionDroite = geompy.MakeFaceWires([Sketch_1], 1)
+Box_1_vertex_7 = geompy.GetSubShape(eprouvetteDroite, [7])
+Box_1_vertex_16 = geompy.GetSubShape(eprouvetteDroite, [16])
+Line_1 = geompy.MakeLineTwoPnt(Box_1_vertex_7, Box_1_vertex_16)
+geomObj_3 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0)
+Plane_2 = geompy.MakePlane(Vertex_1, Line_1, 2000)
+geomObj_4 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0)
+Sketch_2 = geompy.MakeSketcherOnPlane("Sketcher:F 0.000000 0.000000:T 120.000000 0.000000:T 0.000000 100.000000:T -120.000000 20.000000:WW", Plane_2 )
+SectionInclinee = geompy.MakeFaceWires([Sketch_2], 1)
+geompy.Export(sectionDroite, os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFissPb1.brep"), "BREP")
+geompy.Export(SectionInclinee, os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFiss2.brep"), "BREP")
+Vertex_2 = geompy.MakeVertex(110, -10, 200)
+Vertex_3 = geompy.MakeVertex(110, 80, 200)
+Vertex_4 = geompy.MakeVertex(-10, 80, 200)
+Line_2 = geompy.MakeLineTwoPnt(Vertex_1, Vertex_2)
+Line_3 = geompy.MakeLineTwoPnt(Vertex_2, Vertex_3)
+Line_4 = geompy.MakeLineTwoPnt(Vertex_3, Vertex_4)
+Line_5 = geompy.MakeLineTwoPnt(Vertex_4, Vertex_1)
+Face_1 = geompy.MakeFaceWires([Line_2, Line_3, Line_4, Line_5], 1)
+Vertex_5 = geompy.MakeVertex(110, -10, 180)
+Vertex_6 = geompy.MakeVertex(110, 70, 180)
+Face_1_vertex_4 = geompy.GetSubShape(Face_1, [4])
+Line_6 = geompy.MakeLineTwoPnt(Face_1_vertex_4, Vertex_5)
+Line_7 = geompy.MakeLineTwoPnt(Vertex_5, Vertex_6)
+Face_1_vertex_9 = geompy.GetSubShape(Face_1, [9])
+Line_8 = geompy.MakeLineTwoPnt(Vertex_6, Face_1_vertex_9)
+Face_2 = geompy.MakeFaceWires([Line_5, Line_6, Line_7, Line_8], 1)
+geompy.Export(Face_1, os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFiss_1.brep"), "BREP")
+geompy.Export(Face_2, os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFiss_2.brep"), "BREP")
+geompy.addToStudy( O, 'O' )
+geompy.addToStudy( OX, 'OX' )
+geompy.addToStudy( OY, 'OY' )
+geompy.addToStudy( OZ, 'OZ' )
+geompy.addToStudy( eprouvetteDroite, 'eprouvetteDroite' )
+geompy.addToStudyInFather( eprouvetteDroite, Compound_z, 'Compound_z' )
+geompy.addToStudyInFather( eprouvetteDroite, Compound_y, 'Compound_y' )
+geompy.addToStudyInFather( eprouvetteDroite, Compound_x, 'Compound_x' )
+geompy.addToStudy( Vertex_1, 'Vertex_1' )
+geompy.addToStudy( Plane_1, 'Plane_1' )
+geompy.addToStudy( Sketch_1, 'Sketch_1' )
+geompy.addToStudy( sectionDroite, 'sectionDroite' )
+geompy.addToStudyInFather( eprouvetteDroite, Box_1_vertex_7, 'Box_1:vertex_7' )
+geompy.addToStudyInFather( eprouvetteDroite, Box_1_vertex_16, 'Box_1:vertex_16' )
+geompy.addToStudy( Line_1, 'Line_1' )
+geompy.addToStudy( Plane_2, 'Plane_2' )
+geompy.addToStudy( Sketch_2, 'Sketch_2' )
+geompy.addToStudy( SectionInclinee, 'SectionInclinee' )
+geompy.addToStudy( Vertex_2, 'Vertex_2' )
+geompy.addToStudy( Vertex_3, 'Vertex_3' )
+geompy.addToStudy( Vertex_4, 'Vertex_4' )
+geompy.addToStudy( Line_2, 'Line_2' )
+geompy.addToStudy( Line_3, 'Line_3' )
+geompy.addToStudy( Line_4, 'Line_4' )
+geompy.addToStudy( Line_5, 'Line_5' )
+geompy.addToStudy( Face_1, 'Face_1' )
+geompy.addToStudy( Vertex_5, 'Vertex_5' )
+geompy.addToStudy( Vertex_6, 'Vertex_6' )
+geompy.addToStudyInFather( Face_1, Face_1_vertex_4, 'Face_1:vertex_4' )
+geompy.addToStudy( Line_6, 'Line_6' )
+geompy.addToStudy( Line_7, 'Line_7' )
+geompy.addToStudyInFather( Face_1, Face_1_vertex_9, 'Face_1:vertex_9' )
+geompy.addToStudy( Line_8, 'Line_8' )
+geompy.addToStudy( Face_2, 'Face_2' )
+
+###
+### SMESH component
+###
+
+import  SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+
+smesh = smeshBuilder.New(theStudy)
+from salome.StdMeshers import StdMeshersBuilder
+eprouvetteDroite_1 = smesh.Mesh(eprouvetteDroite)
+Regular_1D = eprouvetteDroite_1.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(50,[],[  ])
+Nb_Segments_1.SetDistrType( 0 )
+Quadrangle_2D = eprouvetteDroite_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
+Hexa_3D = eprouvetteDroite_1.Hexahedron(algo=smeshBuilder.Hexa)
+Regular_1D_1 = eprouvetteDroite_1.Segment(geom=Compound_y)
+Nb_Segments_2 = Regular_1D_1.NumberOfSegments(20,[],[  ])
+Nb_Segments_2.SetDistrType( 0 )
+Regular_1D_2 = eprouvetteDroite_1.Segment(geom=Compound_x)
+Nb_Segments_3 = Regular_1D_2.NumberOfSegments(10,[],[  ])
+Nb_Segments_3.SetDistrType( 0 )
+isDone = eprouvetteDroite_1.Compute()
+smesh.SetName(eprouvetteDroite_1, 'eprouvetteDroite')
+eprouvetteDroite_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/eprouvetteDroite.med"), 0, SMESH.MED_V2_2, 1 )
+SubMesh_1 = Regular_1D_1.GetSubMesh()
+SubMesh_2 = Regular_1D_2.GetSubMesh()
+
+## set object names
+smesh.SetName(eprouvetteDroite_1.GetMesh(), 'eprouvetteDroite')
+smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
+smesh.SetName(Nb_Segments_1, 'Nb. Segments_1')
+smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
+smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D')
+smesh.SetName(Nb_Segments_2, 'Nb. Segments_2')
+smesh.SetName(Nb_Segments_3, 'Nb. Segments_3')
+smesh.SetName(SubMesh_1, 'SubMesh_1')
+smesh.SetName(SubMesh_2, 'SubMesh_2')
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/src/Tools/blocFissure/materielCasTests/fissureGauche.py b/src/Tools/blocFissure/materielCasTests/fissureGauche.py
new file mode 100644 (file)
index 0000000..b378fa5
--- /dev/null
@@ -0,0 +1,136 @@
+# -*- coding: iso-8859-1 -*-
+
+import sys
+import salome
+
+salome.salome_init()
+theStudy = salome.myStudy
+
+import salome_notebook
+notebook = salome_notebook.notebook
+
+import os
+from blocFissure import gmu
+
+###
+### GEOM component
+###
+
+import GEOM
+from salome.geom import geomBuilder
+import math
+import SALOMEDS
+
+
+geompy = geomBuilder.New(theStudy)
+
+O = geompy.MakeVertex(0, 0, 0)
+OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
+OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
+OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
+geomObj_1 = geompy.MakeCylinderRH(1000, 3000)
+Cylinder_1 = geompy.MakeRotation(geomObj_1, OZ, 180*math.pi/180.0)
+geomObj_2 = geompy.MakeCylinder(O, OX, 2000, 5000)
+Cylinder_2 = geompy.MakeRotation(geomObj_2, OX, 180*math.pi/180.0)
+Translation_1 = geompy.MakeTranslation(Cylinder_2, -2000, 0, 0)
+Fuse_1 = geompy.MakeFuse(Cylinder_1, Translation_1)
+Fillet_1 = geompy.MakeFillet(Fuse_1, 800, geompy.ShapeType["EDGE"], [11])
+Vertex_1 = geompy.MakeVertex(0, -3000, -3000)
+Vertex_2 = geompy.MakeVertex(2500, 3000, 3000)
+Box_1 = geompy.MakeBoxTwoPnt(Vertex_2, Vertex_1)
+Partition_1 = geompy.MakePartition([Box_1], [Fillet_1], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
+geomObj_3 = geompy.MakeCylinderRH(1450, 8000)
+Cylinder_3 = geompy.MakeRotation(geomObj_3, OZ, 180*math.pi/180.0)
+Cut_1 = geompy.MakeCut(Partition_1, Cylinder_3)
+[faceFiss1] = geompy.SubShapes(Cut_1, [61])
+[Vertex_3,geomObj_4] = geompy.SubShapes(faceFiss1, [4, 5])
+Cylinder_4 = geompy.MakeCylinderRH(2000, 4000)
+Cylinder_5 = geompy.MakeCylinderRH(1500, 4000)
+Cut_2 = geompy.MakeCut(Cylinder_4, Cylinder_5)
+Plane_1 = geompy.MakePlaneLCS(None, 10000, 3)
+Vertex_5 = geompy.MakeVertex(0, 0, 100)
+Plane_2 = geompy.MakePlaneThreePnt(O, Vertex_5, Vertex_3, 10000)
+Plane_3 = geompy.MakePlaneThreePnt(O, Vertex_5, geomObj_4, 10000)
+Vertex_6 = geompy.MakeVertex(0, -5000, -5000)
+Vertex_7 = geompy.MakeVertex(5000, 5000, 5000)
+Box_2 = geompy.MakeBoxTwoPnt(Vertex_7, Vertex_6)
+Common_1 = geompy.MakeCommon(Box_2, Cut_2)
+objetSain = geompy.MakePartition([Common_1], [Plane_1, Plane_2, Plane_3], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
+[hauteurs, epaisseurs, Compound_3, Compound_4, Compound_5, Compound_6] = geompy.Propagate(objetSain)
+geompy.Export(faceFiss1, os.path.join(gmu.pathBloc, "materielCasTests/faceGaucheFiss.brep"), "BREP")
+geompy.addToStudy( O, 'O' )
+geompy.addToStudy( OX, 'OX' )
+geompy.addToStudy( OY, 'OY' )
+geompy.addToStudy( OZ, 'OZ' )
+geompy.addToStudy( Cylinder_1, 'Cylinder_1' )
+geompy.addToStudy( Cylinder_2, 'Cylinder_2' )
+geompy.addToStudy( Translation_1, 'Translation_1' )
+geompy.addToStudy( Fuse_1, 'Fuse_1' )
+geompy.addToStudy( Fillet_1, 'Fillet_1' )
+geompy.addToStudy( Vertex_1, 'Vertex_1' )
+geompy.addToStudy( Vertex_2, 'Vertex_2' )
+geompy.addToStudy( Box_1, 'Box_1' )
+geompy.addToStudy( Partition_1, 'Partition_1' )
+geompy.addToStudy( Cylinder_3, 'Cylinder_3' )
+geompy.addToStudy( Cut_1, 'Cut_1' )
+geompy.addToStudyInFather( Cut_1, faceFiss1, 'faceFiss1' )
+geompy.addToStudyInFather( faceFiss1, Vertex_3, 'Vertex_3' )
+geompy.addToStudy( Cylinder_4, 'Cylinder_4' )
+geompy.addToStudy( Cylinder_5, 'Cylinder_5' )
+geompy.addToStudy( Cut_2, 'Cut_2' )
+geompy.addToStudy( Plane_1, 'Plane_1' )
+geompy.addToStudy( Vertex_5, 'Vertex_5' )
+geompy.addToStudy( Plane_2, 'Plane_2' )
+geompy.addToStudy( Plane_3, 'Plane_3' )
+geompy.addToStudy( Vertex_6, 'Vertex_6' )
+geompy.addToStudy( Vertex_7, 'Vertex_7' )
+geompy.addToStudy( Box_2, 'Box_2' )
+geompy.addToStudy( Common_1, 'Common_1' )
+geompy.addToStudy( objetSain, 'objetSain' )
+geompy.addToStudyInFather( objetSain, hauteurs, 'hauteurs' )
+geompy.addToStudyInFather( objetSain, epaisseurs, 'epaisseurs' )
+geompy.addToStudyInFather( objetSain, Compound_3, 'Compound_3' )
+geompy.addToStudyInFather( objetSain, Compound_4, 'Compound_4' )
+geompy.addToStudyInFather( objetSain, Compound_5, 'Compound_5' )
+geompy.addToStudyInFather( objetSain, Compound_6, 'Compound_6' )
+
+###
+### SMESH component
+###
+
+import  SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+
+smesh = smeshBuilder.New(theStudy)
+from salome.StdMeshers import StdMeshersBuilder
+objetSain_1 = smesh.Mesh(objetSain)
+Regular_1D = objetSain_1.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(10,[],[  ])
+Nb_Segments_1.SetDistrType( 0 )
+Quadrangle_2D = objetSain_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
+Hexa_3D = objetSain_1.Hexahedron(algo=smeshBuilder.Hexa)
+Regular_1D_1 = objetSain_1.Segment(geom=hauteurs)
+Nb_Segments_2 = Regular_1D_1.NumberOfSegments(15,[],[  ])
+Nb_Segments_2.SetDistrType( 0 )
+Regular_1D_2 = objetSain_1.Segment(geom=epaisseurs)
+Nb_Segments_3 = Regular_1D_2.NumberOfSegments(5,[],[  ])
+Nb_Segments_3.SetDistrType( 0 )
+isDone = objetSain_1.Compute()
+smesh.SetName(objetSain_1, 'objetSain')
+objetSain_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/faceGaucheSain.med"), 0, SMESH.MED_V2_2, 1 )
+SubMesh_1 = Regular_1D_1.GetSubMesh()
+SubMesh_2 = Regular_1D_2.GetSubMesh()
+
+## set object names
+smesh.SetName(objetSain_1.GetMesh(), 'objetSain')
+smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
+smesh.SetName(Nb_Segments_1, 'Nb. Segments_1')
+smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
+smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D')
+smesh.SetName(Nb_Segments_2, 'Nb. Segments_2')
+smesh.SetName(Nb_Segments_3, 'Nb. Segments_3')
+smesh.SetName(SubMesh_1, 'SubMesh_1')
+smesh.SetName(SubMesh_2, 'SubMesh_2')
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/src/Tools/blocFissure/materielCasTests/fissureGauche2.py b/src/Tools/blocFissure/materielCasTests/fissureGauche2.py
new file mode 100644 (file)
index 0000000..4316681
--- /dev/null
@@ -0,0 +1,98 @@
+# -*- coding: iso-8859-1 -*-
+
+import sys
+import salome
+
+salome.salome_init()
+theStudy = salome.myStudy
+
+import salome_notebook
+notebook = salome_notebook.notebook
+
+import os
+from blocFissure import gmu
+
+###
+### GEOM component
+###
+
+import GEOM
+from salome.geom import geomBuilder
+import math
+import SALOMEDS
+
+
+geompy = geomBuilder.New(theStudy)
+
+O = geompy.MakeVertex(0, 0, 0)
+OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
+OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
+OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
+Circle_1 = geompy.MakeCircle(O, OX, 500)
+Extrusion_1 = geompy.MakePrismVecH2Ways(Circle_1, OX, 500)
+Vertex_1 = geompy.MakeVertex(500, 0, 0)
+Circle_3 = geompy.MakeCircle(Vertex_1, OZ, 300)
+Extrusion_2 = geompy.MakePrismVecH(Circle_3, OZ, 1000)
+Partition_1 = geompy.MakePartition([Extrusion_1], [Extrusion_2], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+[Face_1,Face_2] = geompy.SubShapes(Partition_1, [18, 13])
+FaceFissExt = geompy.MakeFuse(Face_2, Face_1)
+geompy.Export(FaceFissExt, os.path.join(gmu.pathBloc, "materielCasTests/faceGauche2Fiss.brep"), "BREP")
+Vertex_2 = geompy.MakeVertex(0, -500, 0)
+Vertex_3 = geompy.MakeVertex(400, 500, 800)
+objetSain = geompy.MakeBoxTwoPnt(Vertex_3, Vertex_2)
+Rotation_1 = geompy.MakeRotation(Extrusion_1, OX, 180*math.pi/180.0)
+Partition_2 = geompy.MakePartition([Rotation_1], [Extrusion_2], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+[FaceFissExtSimple] = geompy.SubShapes(Partition_2, [13])
+Plane_1 = geompy.MakePlaneLCS(None, 2000, 3)
+FaceFissExtCoupe = geompy.MakePartition([FaceFissExtSimple], [Plane_1], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+geompy.Export(FaceFissExtCoupe, os.path.join(gmu.pathBloc, "materielCasTests/faceGauche2FissCoupe.brep"), "BREP")
+geompy.addToStudy( O, 'O' )
+geompy.addToStudy( OX, 'OX' )
+geompy.addToStudy( OY, 'OY' )
+geompy.addToStudy( OZ, 'OZ' )
+geompy.addToStudy( Circle_1, 'Circle_1' )
+geompy.addToStudy( Extrusion_1, 'Extrusion_1' )
+geompy.addToStudy( Vertex_1, 'Vertex_1' )
+geompy.addToStudy( Circle_3, 'Circle_3' )
+geompy.addToStudy( Extrusion_2, 'Extrusion_2' )
+geompy.addToStudy( Partition_1, 'Partition_1' )
+geompy.addToStudyInFather( Partition_1, Face_1, 'Face_1' )
+geompy.addToStudyInFather( Partition_1, Face_2, 'Face_2' )
+geompy.addToStudy( FaceFissExt, 'FaceFissExt' )
+geompy.addToStudy( Vertex_2, 'Vertex_2' )
+geompy.addToStudy( Vertex_3, 'Vertex_3' )
+geompy.addToStudy( objetSain, 'objetSain' )
+geompy.addToStudy( Rotation_1, 'Rotation_1' )
+geompy.addToStudy( Partition_2, 'Partition_2' )
+geompy.addToStudyInFather( Partition_2, FaceFissExtSimple, 'FaceFissExtSimple' )
+geompy.addToStudy( Plane_1, 'Plane_1' )
+geompy.addToStudy( FaceFissExtCoupe, 'FaceFissExtCoupe' )
+
+###
+### SMESH component
+###
+
+import  SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+
+smesh = smeshBuilder.New(theStudy)
+from salome.StdMeshers import StdMeshersBuilder
+Mesh_1 = smesh.Mesh(objetSain)
+Regular_1D = Mesh_1.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(15,[],[  ])
+Nb_Segments_1.SetDistrType( 0 )
+Quadrangle_2D = Mesh_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
+Hexa_3D = Mesh_1.Hexahedron(algo=smeshBuilder.Hexa)
+isDone = Mesh_1.Compute()
+smesh.SetName(Mesh_1, 'Mesh_1')
+Mesh_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/boiteSaine.med"), 0, SMESH.MED_V2_2, 1 )
+
+## set object names
+smesh.SetName(Mesh_1.GetMesh(), 'Mesh_1')
+smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
+smesh.SetName(Nb_Segments_1, 'Nb. Segments_1')
+smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
+smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D')
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
diff --git a/src/Tools/blocFissure/materielCasTests/genereMateriel.py b/src/Tools/blocFissure/materielCasTests/genereMateriel.py
new file mode 100644 (file)
index 0000000..919b2a1
--- /dev/null
@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+
+from blocFissure.materielCasTests import cubeAngle
+from blocFissure.materielCasTests import decoupeCylindre
+from blocFissure.materielCasTests import eprouvetteCourbe
+from blocFissure.materielCasTests import eprouvetteDroite
+from blocFissure.materielCasTests import fissureGauche
+from blocFissure.materielCasTests import fissureGauche2
+from blocFissure.materielCasTests import ellipse
+from blocFissure.materielCasTests import ellipse_probleme
+from blocFissure.materielCasTests import disque_perce
+from blocFissure.materielCasTests import ellipse_disque
+from blocFissure.materielCasTests import vis
diff --git a/src/Tools/blocFissure/materielCasTests/vis.py b/src/Tools/blocFissure/materielCasTests/vis.py
new file mode 100644 (file)
index 0000000..1819a56
--- /dev/null
@@ -0,0 +1,273 @@
+# -*- coding: iso-8859-1 -*-
+
+import sys
+import salome
+
+salome.salome_init()
+theStudy = salome.myStudy
+
+import salome_notebook
+notebook = salome_notebook.notebook
+
+import os
+from blocFissure import gmu
+
+###
+### GEOM component
+###
+
+import GEOM
+from salome.geom import geomBuilder
+import math
+import SALOMEDS
+
+
+geompy = geomBuilder.New(theStudy)
+O = geompy.MakeVertex(0, 0, 0)
+OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
+OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
+OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
+geomObj_1 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0)
+geomObj_2 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0)
+sk = geompy.Sketcher2D()
+sk.addPoint(0.000000, 0.000000)
+sk.addSegmentAbsolute(10.000000, 0.000000)
+sk.addSegmentAbsolute(10.000000, 98.750000)
+sk.addArcAngleRadiusLength(0, -1.250000, 90.000000)
+sk.addSegmentAbsolute(15.000000, 100.000000)
+sk.addSegmentAbsolute(15.000000, 120.000000)
+sk.addSegmentAbsolute(9.945000, 120.000000)
+sk.addSegmentAbsolute(9.945000, 108.000000)
+sk.addSegmentAbsolute(0.000000, 105.000000)
+sk.close()
+Sketch_1 = sk.wire(geomObj_2)
+Face_1 = geompy.MakeFaceWires([Sketch_1], 1)
+Vertex_1 = geompy.MakeVertex(15, 108, 0)
+Vertex_2 = geompy.MakeVertex(0, 94, 0)
+Vertex_3 = geompy.MakeVertex(10, 94, 0)
+Face_1_vertex_17 = geompy.GetSubShape(Face_1, [17])
+Line_1 = geompy.MakeLineTwoPnt(Vertex_1, Face_1_vertex_17)
+Face_1_vertex_9 = geompy.GetSubShape(Face_1, [9])
+Line_2 = geompy.MakeLineTwoPnt(Face_1_vertex_17, Face_1_vertex_9)
+Face_1_vertex_19 = geompy.GetSubShape(Face_1, [19])
+Face_1_vertex_7 = geompy.GetSubShape(Face_1, [7])
+Line_3 = geompy.MakeLineTwoPnt(Face_1_vertex_19, Face_1_vertex_7)
+Line_4 = geompy.MakeLineTwoPnt(Vertex_2, Vertex_3)
+coupe_vis = geompy.MakePartition([Face_1], [Line_1, Line_2, Line_3, Line_4], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+[tige, section, tige_haute, rond, tete, section_tete] = geompy.Propagate(coupe_vis)
+conge = geompy.CreateGroup(coupe_vis, geompy.ShapeType["EDGE"])
+geompy.UnionIDs(conge, [21])
+appui = geompy.CreateGroup(coupe_vis, geompy.ShapeType["EDGE"])
+geompy.UnionIDs(appui, [37])
+p_imp = geompy.CreateGroup(coupe_vis, geompy.ShapeType["EDGE"])
+geompy.UnionIDs(p_imp, [4])
+
+Vertex_4 = geompy.MakeVertex(11.25, 98.75, 0)
+Vertex_5 = geompy.MakeVertexWithRef(Vertex_4, -0.5, 0.5, 0)
+Vertex_6 = geompy.MakeVertexWithRef(Vertex_4, -5, 5, 0)
+Line_5 = geompy.MakeLineTwoPnt(Vertex_5, Vertex_6)
+Partition_1 = geompy.MakePartition([Line_5], [conge], [], [], geompy.ShapeType["EDGE"], 0, [], 1)
+[Vertex_7] = geompy.SubShapes(Partition_1, [4])
+Vertex_8 = geompy.MakeVertexWithRef(Vertex_7, -1.1, 1.1, 0)
+generatrice = geompy.MakeLineTwoPnt(Vertex_5, Vertex_8)
+Revolution_1 = geompy.MakeRevolution2Ways(generatrice, OY, 60*math.pi/180.0)
+Partition_2 = geompy.MakePartition([Revolution_1], [conge], [], [], geompy.ShapeType["FACE"], 0, [], 1)
+Partition_2_vertex_11 = geompy.GetSubShape(Partition_2, [11])
+Plane_1 = geompy.MakePlane(Partition_2_vertex_11, OY, 2000)
+Partition_3 = geompy.MakePartition([Revolution_1], [Plane_1], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+Vertex_9 = geompy.MakeVertex(0, 99.633883, 8.977320000000001)
+Vertex_10 = geompy.MakeVertex(0, 99.633883, -8.977320000000001)
+Vertex_11 = geompy.MakeVertexWithRef(Vertex_9, 0, 0, -1)
+Vertex11x = geompy.MakeVertexWithRef(Vertex_11, 1, 0, 0)
+Line_11x = geompy.MakeLineTwoPnt(Vertex_11, Vertex11x)
+Vertex_12 = geompy.MakeVertexWithRef(Vertex_10, 0, 0, 1)
+Vertex12x = geompy.MakeVertexWithRef(Vertex_12, 1, 0, 0)
+Line_12x = geompy.MakeLineTwoPnt(Vertex_12, Vertex12x)
+Vertex_13 = geompy.MakeVertexWithRef(Vertex_11, 0, 1, 0)
+Vertex_14 = geompy.MakeVertexWithRef(Vertex_12, 0, 1, 0)
+Vertex_15 = geompy.MakeRotation(Vertex_9, Line_11x, 30*math.pi/180.0)
+Vertex_16 = geompy.MakeRotation(Vertex_10, Line_12x, -30*math.pi/180.0)
+Arc_1 = geompy.MakeArc(Vertex_15, Vertex_9, Vertex_13,False)
+Arc_2 = geompy.MakeArc(Vertex_14, Vertex_10, Vertex_16,False)
+Line_6 = geompy.MakeLineTwoPnt(Vertex_13, Vertex_14)
+Line_8 = geompy.MakeLineTwoPnt(Vertex_16, Vertex_15)
+Wire_1 = geompy.MakeWire([Arc_1, Arc_2, Line_6, Line_8], 1e-07)
+Face_2 = geompy.MakeFaceWires([Wire_1], 1)
+Extrusion_1 = geompy.MakePrismVecH(Face_2, OX, 15)
+Revolution_2 = geompy.MakeRevolution2Ways(generatrice, OY, 65*math.pi/180.0)
+Fissure = geompy.MakeCommonList([Extrusion_1, Revolution_2], True)
+fondFiss = geompy.CreateGroup(Fissure, geompy.ShapeType["EDGE"])
+geompy.UnionIDs(fondFiss, [9, 7, 4])
+geompy.Export(Fissure, os.path.join(gmu.pathBloc, "materielCasTests/visFiss.brep"), "BREP")
+
+geompy.addToStudy( O, 'O' )
+geompy.addToStudy( OX, 'OX' )
+geompy.addToStudy( OY, 'OY' )
+geompy.addToStudy( OZ, 'OZ' )
+geompy.addToStudy( Sketch_1, 'Sketch_1' )
+geompy.addToStudy( Face_1, 'Face_1' )
+geompy.addToStudy( Vertex_1, 'Vertex_1' )
+geompy.addToStudy( Vertex_2, 'Vertex_2' )
+geompy.addToStudy( Vertex_3, 'Vertex_3' )
+geompy.addToStudyInFather( Face_1, Face_1_vertex_17, 'Face_1:vertex_17' )
+geompy.addToStudy( Line_1, 'Line_1' )
+geompy.addToStudyInFather( Face_1, Face_1_vertex_9, 'Face_1:vertex_9' )
+geompy.addToStudy( Line_2, 'Line_2' )
+geompy.addToStudyInFather( Face_1, Face_1_vertex_19, 'Face_1:vertex_19' )
+geompy.addToStudyInFather( Face_1, Face_1_vertex_7, 'Face_1:vertex_7' )
+geompy.addToStudy( Line_3, 'Line_3' )
+geompy.addToStudy( Line_4, 'Line_4' )
+geompy.addToStudy( coupe_vis, 'coupe_vis' )
+geompy.addToStudyInFather( coupe_vis, tige, 'tige' )
+geompy.addToStudyInFather( coupe_vis, section, 'section' )
+geompy.addToStudyInFather( coupe_vis, tige_haute, 'tige_haute' )
+geompy.addToStudyInFather( coupe_vis, rond, 'rond' )
+geompy.addToStudyInFather( coupe_vis, tete, 'tete' )
+geompy.addToStudyInFather( coupe_vis, section_tete, 'section_tete' )
+geompy.addToStudyInFather( coupe_vis, conge, 'conge' )
+geompy.addToStudyInFather( coupe_vis, appui, 'appui' )
+geompy.addToStudyInFather( coupe_vis, p_imp, 'p_imp' )
+
+geompy.addToStudy( Vertex_4, 'Vertex_4' )
+geompy.addToStudy( Vertex_6, 'Vertex_6' )
+geompy.addToStudy( Vertex_5, 'Vertex_5' )
+geompy.addToStudy( Line_5, 'Line_5' )
+geompy.addToStudy( Partition_1, 'Partition_1' )
+geompy.addToStudyInFather( Partition_1, Vertex_7, 'Vertex_7' )
+geompy.addToStudy( Vertex_8, 'Vertex_8' )
+geompy.addToStudy( generatrice, 'generatrice' )
+geompy.addToStudy( Revolution_1, 'Revolution_1' )
+geompy.addToStudy( Partition_2, 'Partition_2' )
+geompy.addToStudyInFather( Partition_2, Partition_2_vertex_11, 'Partition_2:vertex_11' )
+geompy.addToStudy( Plane_1, 'Plane_1' )
+geompy.addToStudy( Partition_3, 'Partition_3' )
+geompy.addToStudy( Vertex_9, 'Vertex_9' )
+geompy.addToStudy( Vertex_10, 'Vertex_10' )
+geompy.addToStudy( Vertex_11, 'Vertex_11' )
+geompy.addToStudy( Vertex_12, 'Vertex_12' )
+geompy.addToStudy( Vertex_13, 'Vertex_13' )
+geompy.addToStudy( Vertex_14, 'Vertex_14' )
+geompy.addToStudy( Vertex_15, 'Vertex_15' )
+geompy.addToStudy( Vertex_16, 'Vertex_16' )
+geompy.addToStudy( Arc_1, 'Arc_1' )
+geompy.addToStudy( Arc_2, 'Arc_2' )
+geompy.addToStudy( Line_6, 'Line_6' )
+geompy.addToStudy( Line_8, 'Line_8' )
+geompy.addToStudy( Wire_1, 'Wire_1' )
+geompy.addToStudy( Face_2, 'Face_2' )
+geompy.addToStudy( Extrusion_1, 'Extrusion_1' )
+geompy.addToStudy( Revolution_2, 'Revolution_2' )
+geompy.addToStudy( Fissure, 'Fissure' )
+geompy.addToStudyInFather( Fissure, fondFiss, 'fondFiss' )
+
+###
+### SMESH component
+###
+
+import  SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+
+smesh = smeshBuilder.New(theStudy)
+coupe_vis_1 = smesh.Mesh(coupe_vis)
+Regular_1D = coupe_vis_1.Segment()
+Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
+Nb_Segments_1.SetDistrType( 0 )
+Quadrangle_2D = coupe_vis_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
+isDone = coupe_vis_1.Compute()
+Nb_Segments_2 = smesh.CreateHypothesis('NumberOfSegments')
+Nb_Segments_2.SetNumberOfSegments( 30 )
+Nb_Segments_2.SetDistrType( 0 )
+status = coupe_vis_1.AddHypothesis(Regular_1D,tige)
+status = coupe_vis_1.AddHypothesis(Nb_Segments_2,tige)
+isDone = coupe_vis_1.Compute()
+Nb_Segments_3 = smesh.CreateHypothesis('NumberOfSegments')
+Nb_Segments_3.SetNumberOfSegments( 10 )
+Nb_Segments_3.SetScaleFactor( 3 )
+Nb_Segments_3.SetReversedEdges( [  ] )
+Nb_Segments_3.SetObjectEntry( "0:1:1:14" )
+status = coupe_vis_1.AddHypothesis(Regular_1D,section)
+status = coupe_vis_1.AddHypothesis(Nb_Segments_3,section)
+coupe_vis_1.Clear()
+isDone = coupe_vis_1.Compute()
+coupe_vis_1.Clear()
+Nb_Segments_3.SetNumberOfSegments( 10 )
+Nb_Segments_3.SetDistrType( 1 )
+Nb_Segments_3.SetScaleFactor( 3 )
+Nb_Segments_3.SetReversedEdges( [ 23, 4, 9, 16 ] )
+Nb_Segments_3.SetObjectEntry( "0:1:1:14" )
+isDone = coupe_vis_1.Compute()
+tige_1 = coupe_vis_1.GroupOnGeom(tige,'tige',SMESH.EDGE)
+section_1 = coupe_vis_1.GroupOnGeom(section,'section',SMESH.EDGE)
+tige_haute_1 = coupe_vis_1.GroupOnGeom(tige_haute,'tige_haute',SMESH.EDGE)
+rond_1 = coupe_vis_1.GroupOnGeom(rond,'rond',SMESH.EDGE)
+tete_1 = coupe_vis_1.GroupOnGeom(tete,'tete',SMESH.EDGE)
+section_tete_1 = coupe_vis_1.GroupOnGeom(section_tete,'section_tete',SMESH.EDGE)
+conge_1 = coupe_vis_1.GroupOnGeom(conge,'conge',SMESH.EDGE)
+appui_1 = coupe_vis_1.GroupOnGeom(appui,'appui',SMESH.EDGE)
+p_imp_1 = coupe_vis_1.GroupOnGeom(p_imp,'p_imp',SMESH.EDGE)
+isDone = coupe_vis_1.SplitQuad( [ 691 ], 1 )
+visHex80 = smesh.CopyMesh( coupe_vis_1, 'visHex80', 1, 0)
+[ tige_2, section_2, tige_haute_2, rond_2, tete_2, section_tete_2, conge_2, appui_2, p_imp_2 ] = visHex80.GetGroups()
+[ tige_rotated, section_rotated, tige_haute_rotated, rond_rotated, tete_rotated, section_tete_rotated, conge_rotated, appui_rotated, p_imp_rotated, tige_top, section_top, tige_haute_top, rond_top, tete_top, section_tete_top, conge_top, appui_top, p_imp_top ] = visHex80.RotationSweepObject2D( visHex80, SMESH.AxisStruct( 0, 0, 0, 0, 10, 0 ), math.pi/40, 40, 1e-05 ,True)
+[ tige_2, section_2, tige_haute_2, rond_2, tete_2, section_tete_2, conge_2, appui_2, p_imp_2, tige_rotated, tige_top, section_rotated, section_top, tige_haute_rotated, tige_haute_top, rond_rotated, rond_top, tete_rotated, tete_top, section_tete_rotated, section_tete_top, conge_rotated, conge_top, appui_rotated, appui_top, p_imp_rotated, p_imp_top ] = visHex80.GetGroups()
+[ tige_mirrored, section_mirrored, tige_haute_mirrored, rond_mirrored, tete_mirrored, section_tete_mirrored, conge_mirrored, appui_mirrored, p_imp_mirrored, tige_rotated_mirrored, tige_top_mirrored, section_rotated_mirrored, section_top_mirrored, tige_haute_rotated_mirrored, tige_haute_top_mirrored, rond_rotated_mirrored, rond_top_mirrored, tete_rotated_mirrored, tete_top_mirrored, section_tete_rotated_mirrored, section_tete_top_mirrored, conge_rotated_mirrored, conge_top_mirrored, appui_rotated_mirrored, appui_top_mirrored, p_imp_rotated_mirrored, p_imp_top_mirrored ] = visHex80.MirrorObject( visHex80, SMESH.AxisStruct( 0, 0, 0, 0, 0, 10 ), SMESH.SMESH_MeshEditor.PLANE ,True,True)
+[ tige_2, section_2, tige_haute_2, rond_2, tete_2, section_tete_2, conge_2, appui_2, p_imp_2, tige_rotated, tige_top, section_rotated, section_top, tige_haute_rotated, tige_haute_top, rond_rotated, rond_top, tete_rotated, tete_top, section_tete_rotated, section_tete_top, conge_rotated, conge_top, appui_rotated, appui_top, p_imp_rotated, p_imp_top, tige_mirrored, section_mirrored, tige_haute_mirrored, rond_mirrored, tete_mirrored, section_tete_mirrored, conge_mirrored, appui_mirrored, p_imp_mirrored, tige_rotated_mirrored, tige_top_mirrored, section_rotated_mirrored, section_top_mirrored, tige_haute_rotated_mirrored, tige_haute_top_mirrored, rond_rotated_mirrored, rond_top_mirrored, tete_rotated_mirrored, tete_top_mirrored, section_tete_rotated_mirrored, section_tete_top_mirrored, conge_rotated_mirrored, conge_top_mirrored, appui_rotated_mirrored, appui_top_mirrored, p_imp_rotated_mirrored, p_imp_top_mirrored ] = visHex80.GetGroups()
+coincident_nodes_on_part = visHex80.FindCoincidentNodesOnPart( visHex80, 1e-05, [  ] )
+visHex80.MergeNodes(coincident_nodes_on_part)
+equal_elements = visHex80.FindEqualElements( visHex80 )
+visHex80.MergeElements(equal_elements)
+[ tige_2, section_2, tige_haute_2, rond_2, tete_2, section_tete_2, conge_2, appui_2, p_imp_2, tige_rotated, tige_top, section_rotated, section_top, tige_haute_rotated, tige_haute_top, rond_rotated, rond_top, tete_rotated, tete_top, section_tete_rotated, section_tete_top, conge_rotated, conge_top, appui_rotated, appui_top, p_imp_rotated, p_imp_top, tige_mirrored, section_mirrored, tige_haute_mirrored, rond_mirrored, tete_mirrored, section_tete_mirrored, conge_mirrored, appui_mirrored, p_imp_mirrored, tige_rotated_mirrored, tige_top_mirrored, section_rotated_mirrored, section_top_mirrored, tige_haute_rotated_mirrored, tige_haute_top_mirrored, rond_rotated_mirrored, rond_top_mirrored, tete_rotated_mirrored, tete_top_mirrored, section_tete_rotated_mirrored, section_tete_top_mirrored, conge_rotated_mirrored, conge_top_mirrored, appui_rotated_mirrored, appui_top_mirrored, p_imp_rotated_mirrored, p_imp_top_mirrored ] = visHex80.GetGroups()
+SubMesh_1 = coupe_vis_1.GetSubMesh( tige, 'SubMesh_1' )
+SubMesh_2 = coupe_vis_1.GetSubMesh( section, 'SubMesh_2' )
+visHex80.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/visSain.med"), 0, SMESH.MED_V2_2, 1 )
+
+
+## Set names of Mesh objects
+smesh.SetName(appui_rotated, 'appui_rotated')
+smesh.SetName(p_imp_rotated, 'p_imp_rotated')
+smesh.SetName(section_tete_rotated, 'section_tete_rotated')
+smesh.SetName(conge_rotated, 'conge_rotated')
+smesh.SetName(rond_rotated, 'rond_rotated')
+smesh.SetName(tete_rotated, 'tete_rotated')
+smesh.SetName(section_rotated, 'section_rotated')
+smesh.SetName(tige_haute_rotated, 'tige_haute_rotated')
+smesh.SetName(tige_rotated, 'tige_rotated')
+smesh.SetName(SubMesh_2, 'SubMesh_2')
+smesh.SetName(SubMesh_1, 'SubMesh_1')
+smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
+smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
+smesh.SetName(appui_1, 'appui')
+smesh.SetName(p_imp_1, 'p_imp')
+smesh.SetName(coupe_vis_1.GetMesh(), 'coupe_vis')
+smesh.SetName(visHex80.GetMesh(), 'visHex80')
+smesh.SetName(tige_1, 'tige')
+smesh.SetName(p_imp_2, 'p_imp')
+smesh.SetName(section_1, 'section')
+smesh.SetName(appui_2, 'appui')
+smesh.SetName(tige_haute_1, 'tige_haute')
+smesh.SetName(conge_2, 'conge')
+smesh.SetName(rond_1, 'rond')
+smesh.SetName(section_tete_2, 'section_tete')
+smesh.SetName(tete_1, 'tete')
+smesh.SetName(tete_2, 'tete')
+smesh.SetName(section_tete_1, 'section_tete')
+smesh.SetName(rond_2, 'rond')
+smesh.SetName(conge_1, 'conge')
+smesh.SetName(tige_haute_2, 'tige_haute')
+smesh.SetName(section_2, 'section')
+smesh.SetName(tige_2, 'tige')
+smesh.SetName(p_imp_top, 'p_imp_top')
+smesh.SetName(Nb_Segments_3, 'Nb. Segments_3')
+smesh.SetName(conge_top, 'conge_top')
+smesh.SetName(Nb_Segments_2, 'Nb. Segments_2')
+smesh.SetName(appui_top, 'appui_top')
+smesh.SetName(Nb_Segments_1, 'Nb. Segments_1')
+smesh.SetName(tete_top, 'tete_top')
+smesh.SetName(section_tete_top, 'section_tete_top')
+smesh.SetName(tige_haute_top, 'tige_haute_top')
+smesh.SetName(rond_top, 'rond_top')
+smesh.SetName(tige_top, 'tige_top')
+smesh.SetName(section_top, 'section_top')
+
+if salome.sg.hasDesktop():
+  salome.sg.updateObjBrowser(1)
index 50c6f288b886e132d272dacfc5fcd38df4bed9b3..55b2d8c19181da8b1f02d7b1cf131ffbdf597826 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2012-201 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index b745473d5d4ba98ccce4b0df2dc4ec1779721378..e9c34837ed58e3c52fddbb8526fc44d86eecde39 100755 (executable)
@@ -1,12 +1,9 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&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-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index ffe51fc0d69a3be3ec7c2374a52d95275dec003d..6180b0aecaede64e6d950e958dbf7d2bea0dfabb 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2007-2013  EDF R&D
+# Copyright (C) 2007-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index e01960314bddf060523121819c362dac7e008f80..3f08166051469a0bb3fb0d0ca9c05593d093e3ba 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2012-201 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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index ab73887fd4bad6c2da2ae3af3969d3320e1b2270..a5af8ea1902b2eb70d6326027748e8299bb35df0 100755 (executable)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 92a87d986b22c2ec82f2bd9922bbf19fee87deb4..d4dfcada7304beb55b87ee3f7937996f8b358886 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2011-2013  EDF R&D
+// Copyright (C) 2011-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index ff9231b991ce58a170f92779a266e493cdafc7d5..d59708bcb2834cc40309e01f6be76155040fd01f 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2011-2013  EDF R&D
+// Copyright (C) 2011-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8933c4fc5a2a31a33e73c1114af2776ab2376921..aac67087bf1835dcf764d7633a73f386cdc2d4ba 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8f5a39b1d8f4900ee6d5fb3f7e487fe5f058b072..2e6587594c0de63f3866239241d5813de7b94c81 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2011-2013  EDF R&D
+// Copyright (C) 2011-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f522c360411e689e690408f51157574d12602ca4..d590565c6ae5af670d0f4e30989f1c9effd508e9 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2011-2013  EDF R&D
+// Copyright (C) 2011-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 83565540c93b3f42a2fef05332b052f911f41b61..467e69d63740e943fa86ac789bb1a6eae7b7360a 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2011-2013  EDF R&D
+// Copyright (C) 2011-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index 027685b0642fc39207579399f8e94d2f946e9880..10c2053ae073cfd89f23aacc38d7e4935183430a 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2011-2013  EDF R&D
+// Copyright (C) 2011-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index c2bd2ebc1554a031e2a9e4f81d59de34fc595b9f..6bedcb1f29ffd9cc76290629c7753639f9dea069 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2011-2013  EDF R&D
+// Copyright (C) 2011-2014  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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
index f79353f3d7d59ad3c77bfa07f69af940066cfcb3..7d8d8e7b42b441e3e4d1a46e8bc2ff9d29f40ee8 100755 (executable)
@@ -1,12 +1,9 @@
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&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-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index b8d40dc029947c23d454fe78d50e6d2ece022a68..657e4e4a7fef9ead325ff7e970022e93eb72f6c2 100755 (executable)
@@ -1,10 +1,10 @@
 #!/usr/bin/env python
-# Copyright (C) 2011-2013  EDF R&D
+# Copyright (C) 2011-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index e4965385520c793f0162aafb9010211bca23b32c..0c73c5f1ef1202d0c44f736b7da052488b387af8 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 025dfe4efab909a0d4831da5cf5207826a3bcb1a..57d022fd1f8a2f66a647c84a4cbe7ea68650a180 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2011-2013  EDF R&D
+# Copyright (C) 2011-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index b79e4f73d175f06819929d03df4290c507e52b94..02e5188f7207ea17dabbbac38e7b9968b93c5ff6 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011-2013  EDF R&D
+# Copyright (C) 2011-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 00b9f990d5773d1099e5d431f55d68d7726b43a7..3a1c02a51eb36bf36b478601a2441a1152c5bfd6 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 4699f271974227d16f6d043358b266fb6699792e..27164b3adff4e3b51a3fe9cc8d1365deb94741c0 100644 (file)
@@ -1,4 +1,4 @@
-#  Copyright (C) 2011-2013 EDF R&D
+#  Copyright (C) 2011-2014 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
index 278d2626e7ec905cfb6ff5a50d21ca3afd15a6cb..2a16876838424ec6b9b1f8947aca523b9a46dc5a 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011-2013  EDF R&D
+# Copyright (C) 2011-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 6920b43d5c8b77fc7faf1a74881c9416dcb010b8..d51d5c7ba989f91768041833989521876442c45b 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011-2013  EDF R&D
+# Copyright (C) 2011-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index ab6869288a0edcfea3f88603839d865deadb8204..e2aa0f84edf322bbe9eb3f69edd70009a26be494 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011-2013  EDF R&D
+# Copyright (C) 2011-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -211,7 +211,7 @@ class PluginDialog(QDialog):
         name. This returns the filename.
         '''
         filename=str("/tmp/padder_inputfile_"+meshName+".med")
-        meshObject.ExportToMEDX( filename, 0, SMESH.MED_V2_2, 1 )
+        meshObject.ExportToMEDX( filename, 0, SMESH.MED_V2_2, 1, 1 )
         return filename
 
     def clear(self):
index e7c481bf25d13acded39753310fbb46ca3392473..d84588d3ce2587b9cae3d15fc0696a2fbb9af0ec 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8f68aa70361bb00f9c90451b30c51a0a21558577..0b533f6bd1edfcfb376d983fd1bccc8e7e087a20 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2011-2013  EDF R&D
+# Copyright (C) 2011-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 8c0c2d5a86f13fe8db90474949da3e1ad63ff9d1..3902ab4fb882a4dc2d1b0a2ef9adfe03afaf57fe 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011-2013  EDF R&D
+# Copyright (C) 2011-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index a351ad048ed678e5de888770bfbc8d39933c2c91..44c84025e85f2fede92eab74c0de19041f247ddf 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index ab477c5ecde0895d5c128973d8500fc4cad0a858..0d8e495bac746389cd398a023ea799878649158a 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2011-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2011-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 19ed5fee4bdf4c9828b35c8084aa5ed50fd8b1cf..e4130283b23d72c3360ed827fc1983791dc46324 100644 (file)
@@ -1,10 +1,10 @@
 #!/bin/bash
-# Copyright (C) 2010-2013  EDF R&D
+# Copyright (C) 2010-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 6ad9f6e88924542fcd2c9890a3966a574d8ae036..5402747c3fda03e815add780f2c077439fc1d22d 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011-2013  EDF R&D
+# Copyright (C) 2011-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index 68d853521986f36a8ad48eae101df7edb8d9acc8..132577d0acae083fec8940be7cd8257d745cb22e 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011-2013  EDF R&D
+# Copyright (C) 2011-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
index f7ac148f450dc424b106d9fcebd50cff126c92e1..b043ec69271194e080f689e505396f9da4347f41 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011-2013  EDF R&D
+# Copyright (C) 2011-2014  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.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -25,6 +25,7 @@ from spadderPlugin import runSpadderPlugin
 from meshcut_plugin import MeshCut
 from yamsplug_plugin import YamsLct
 from MGCleanerplug_plugin import MGCleanerLct
+from blocFissure.ihm.fissureCoude_plugin import fissureCoudeDlg
 
 salome_pluginsmanager.AddFunction('PADDER mesher',
                                   'Create a mesh with PADDER',
@@ -42,3 +43,21 @@ salome_pluginsmanager.AddFunction('ReMesh with MGCleaner',
                                   'Run MGCleaner',
                                   MGCleanerLct)
 
+salome_pluginsmanager.AddFunction('Meshed Pipe with a crack',
+                                  'Create a mesh with blocFissure tool',
+                                  fissureCoudeDlg)
+
+# ZCracks plugin requires the module EFICAS to be installed
+# thus it is first tested if this module is available before
+# adding the plugin to salome_pluginsmanager
+enable_zcracks = True
+try:
+  import eficasSalome
+except:
+  enable_zcracks = False
+
+if enable_zcracks:
+  from zcracks_plugin import ZcracksLct
+  salome_pluginsmanager.AddFunction('Run Zcrack',
+                                    'Run Zcrack',
+                                    ZcracksLct)