Salome HOME
Remove obsolete conditionals
authorvsr <vsr@opencascade.com>
Wed, 24 Sep 2014 12:48:36 +0000 (16:48 +0400)
committervsr <vsr@opencascade.com>
Wed, 24 Sep 2014 12:48:36 +0000 (16:48 +0400)
372 files changed:
CMakeLists.txt
SalomeGEOMConfig.cmake.in
adm_local/cmake_files/FindGEOM.cmake
bin/geom_setenv.py
doc/salome/examples/import_export.py
doc/salome/examples/primitives_ex02.py
doc/salome/examples/viewing_geom_objs_ex01.py
doc/salome/gui/GEOM/CMakeLists.txt
doc/salome/gui/GEOM/collect_geom_methods.py [new file with mode: 0644]
doc/salome/gui/GEOM/doxyfile_py.in
doc/salome/gui/GEOM/images/cylinder1.png
doc/salome/gui/GEOM/images/cylinder2.png
doc/salome/gui/GEOM/images/cylinders.png
doc/salome/gui/GEOM/images/exportxao_dlg.png
doc/salome/gui/GEOM/images/geomexport.png
doc/salome/gui/GEOM/images/geomimport.png
doc/salome/gui/GEOM/images/importxao_dlg.png [new file with mode: 0644]
doc/salome/gui/GEOM/images/sat_named_shapes.png [deleted file]
doc/salome/gui/GEOM/images/vertices_mode.png [new file with mode: 0644]
doc/salome/gui/GEOM/input/creating_cylinder.doc
doc/salome/gui/GEOM/input/display_mode.doc
doc/salome/gui/GEOM/input/geometry_preferences.doc
doc/salome/gui/GEOM/input/import_export.doc
doc/salome/gui/GEOM/input/index.doc
doc/salome/gui/GEOM/input/tui_importexport_geom_objs.doc
doc/salome/gui/GEOM/input/xao_format.doc [deleted file]
idl/AdvancedGEOM.idl [new file with mode: 0644]
idl/BREPPlugin.idl [new file with mode: 0644]
idl/CMakeLists.txt
idl/GEOM_Gen.idl
idl/GEOM_Superv.idl
idl/IGESPlugin.idl [new file with mode: 0644]
idl/STEPPlugin.idl [new file with mode: 0644]
idl/STLPlugin.idl [new file with mode: 0644]
idl/VTKPlugin.idl [new file with mode: 0644]
idl/XAOPlugin.idl [new file with mode: 0644]
resources/AdvancedGEOM.xml [new file with mode: 0644]
resources/BREPPlugin.xml [new file with mode: 0644]
resources/CMakeLists.txt
resources/GEOMActions.xml [deleted file]
resources/GEOMCatalog.xml.in
resources/IGESPlugin.xml [new file with mode: 0644]
resources/ImportExport [deleted file]
resources/STEPPlugin.xml [new file with mode: 0644]
resources/STLPlugin.xml [new file with mode: 0644]
resources/SalomeApp.xml.in
resources/VTKPlugin.xml [new file with mode: 0644]
resources/XAOPlugin.xml [new file with mode: 0644]
src/AdvancedEngine/AdvancedEngine.cxx
src/AdvancedEngine/AdvancedEngine.hxx [new file with mode: 0755]
src/AdvancedEngine/AdvancedEngine_DividedDiskDriver.cxx [new file with mode: 0644]
src/AdvancedEngine/AdvancedEngine_DividedDiskDriver.hxx [new file with mode: 0644]
src/AdvancedEngine/AdvancedEngine_IDividedDisk.hxx [new file with mode: 0644]
src/AdvancedEngine/AdvancedEngine_IOperations.cxx [new file with mode: 0644]
src/AdvancedEngine/AdvancedEngine_IOperations.hxx [new file with mode: 0644]
src/AdvancedEngine/AdvancedEngine_IOperations_i.cc [new file with mode: 0644]
src/AdvancedEngine/AdvancedEngine_IOperations_i.hh [new file with mode: 0644]
src/AdvancedEngine/AdvancedEngine_IPipeTShape.hxx [new file with mode: 0644]
src/AdvancedEngine/AdvancedEngine_ISmoothingSurface.hxx [new file with mode: 0644]
src/AdvancedEngine/AdvancedEngine_OperationsCreator.cc [deleted file]
src/AdvancedEngine/AdvancedEngine_OperationsCreator.cxx [new file with mode: 0644]
src/AdvancedEngine/AdvancedEngine_OperationsCreator.hh [deleted file]
src/AdvancedEngine/AdvancedEngine_OperationsCreator.hxx [new file with mode: 0755]
src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.cxx [new file with mode: 0644]
src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.hxx [new file with mode: 0644]
src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.cxx [new file with mode: 0644]
src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.hxx [new file with mode: 0644]
src/AdvancedEngine/AdvancedEngine_Types.hxx
src/AdvancedEngine/CMakeLists.txt
src/AdvancedEngine/GEOMImpl_DividedDiskDriver.cxx [deleted file]
src/AdvancedEngine/GEOMImpl_DividedDiskDriver.hxx [deleted file]
src/AdvancedEngine/GEOMImpl_IAdvancedOperations.cxx [deleted file]
src/AdvancedEngine/GEOMImpl_IAdvancedOperations.hxx [deleted file]
src/AdvancedEngine/GEOMImpl_IDividedDisk.hxx [deleted file]
src/AdvancedEngine/GEOMImpl_IPipeTShape.hxx [deleted file]
src/AdvancedEngine/GEOMImpl_ISmoothingSurface.hxx [deleted file]
src/AdvancedEngine/GEOMImpl_PipeTShapeDriver.cxx [deleted file]
src/AdvancedEngine/GEOMImpl_PipeTShapeDriver.hxx [deleted file]
src/AdvancedEngine/GEOMImpl_SmoothingSurfaceDriver.cxx [deleted file]
src/AdvancedEngine/GEOMImpl_SmoothingSurfaceDriver.hxx [deleted file]
src/AdvancedEngine/GEOM_AdvancedEngine.hxx [deleted file]
src/AdvancedEngine/GEOM_IAdvancedOperations_i.cc [deleted file]
src/AdvancedEngine/GEOM_IAdvancedOperations_i.hh [deleted file]
src/AdvancedGUI/AdvancedGEOM_images.ts [new file with mode: 0644]
src/AdvancedGUI/AdvancedGEOM_msg_en.ts [new file with mode: 0644]
src/AdvancedGUI/AdvancedGEOM_msg_fr.ts [new file with mode: 0644]
src/AdvancedGUI/AdvancedGEOM_msg_ja.ts [new file with mode: 0644]
src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.cxx
src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.h
src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.cxx
src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.h
src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx
src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx
src/AdvancedGUI/AdvancedGUI_images.ts [deleted file]
src/AdvancedGUI/AdvancedGUI_msg_en.ts [deleted file]
src/AdvancedGUI/AdvancedGUI_msg_fr.ts [deleted file]
src/AdvancedGUI/AdvancedGUI_msg_ja.ts [deleted file]
src/AdvancedGUI/CMakeLists.txt
src/BREPExport/BREPExport.cxx [deleted file]
src/BREPExport/CMakeLists.txt [deleted file]
src/BREPImport/BREPImport.cxx [deleted file]
src/BREPImport/CMakeLists.txt [deleted file]
src/BREPPlugin/BREPPlugin_Engine.cxx [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_Engine.hxx [new file with mode: 0755]
src/BREPPlugin/BREPPlugin_ExportDriver.cxx [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_ExportDriver.hxx [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_GUI.cxx [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_GUI.h [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_IECallBack.cxx [new file with mode: 0755]
src/BREPPlugin/BREPPlugin_IECallBack.hxx [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_IExport.hxx [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_IImport.hxx [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_IOperations.cxx [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_IOperations.hxx [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_IOperations_i.cc [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_IOperations_i.hh [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_ImportDriver.cxx [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_ImportDriver.hxx [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_OperationsCreator.cxx [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_OperationsCreator.hxx [new file with mode: 0755]
src/BREPPlugin/BREPPlugin_msg_en.ts [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_msg_fr.ts [new file with mode: 0644]
src/BREPPlugin/BREPPlugin_msg_ja.ts [new file with mode: 0644]
src/BREPPlugin/CMakeLists.txt [new file with mode: 0644]
src/BlockFix/BlockFix_UnionEdges.cxx
src/CMakeLists.txt
src/DisplayGUI/DisplayGUI.cxx
src/DisplayGUI/DisplayGUI.h
src/DlgRef/CMakeLists.txt
src/DlgRef/DlgRef.cxx
src/DlgRef/DlgRef.h
src/DlgRef/DlgRef_2Sel3Spin1Check_QTD.ui [new file with mode: 0644]
src/DlgRef/DlgRef_3Spin1CheckCyl_QTD.ui [new file with mode: 0644]
src/EntityGUI/EntityGUI.cxx
src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx
src/GEOM/CMakeLists.txt
src/GEOM/GEOM_BaseDriver.cxx
src/GEOM/GEOM_BaseDriver.hxx
src/GEOMBase/CMakeLists.txt
src/GEOMBase/GEOMBase_DlgSkeleton.cxx [new file with mode: 0644]
src/GEOMBase/GEOMBase_DlgSkeleton.h [new file with mode: 0644]
src/GEOMBase/GEOMBase_Skeleton.cxx
src/GEOMBase/GEOMBase_Skeleton.h
src/GEOMBase/GEOM_GenericObjPtr.h
src/GEOMGUI/CMakeLists.txt
src/GEOMGUI/GEOMGUI_CreationInfoWdg.cxx
src/GEOMGUI/GEOMGUI_Selection.cxx
src/GEOMGUI/GEOMGUI_Selection.h
src/GEOMGUI/GEOMGUI_XmlHandler.cxx [deleted file]
src/GEOMGUI/GEOMGUI_XmlHandler.h [deleted file]
src/GEOMGUI/GEOM_Displayer.cxx
src/GEOMGUI/GEOM_images.ts
src/GEOMGUI/GEOM_msg_en.ts
src/GEOMGUI/GEOM_msg_fr.ts
src/GEOMGUI/GEOM_msg_ja.ts
src/GEOMGUI/GeometryGUI.cxx
src/GEOMGUI/GeometryGUI_Operations.h
src/GEOMImpl/CMakeLists.txt
src/GEOMImpl/GEOMImpl_CylinderDriver.cxx
src/GEOMImpl/GEOMImpl_ExportDriver.cxx
src/GEOMImpl/GEOMImpl_ExportDriver.hxx
src/GEOMImpl/GEOMImpl_Gen.cxx
src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx
src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx
src/GEOMImpl/GEOMImpl_IBaseIEOperations.cxx [new file with mode: 0755]
src/GEOMImpl/GEOMImpl_IBaseIEOperations.hxx [new file with mode: 0644]
src/GEOMImpl/GEOMImpl_ICylinder.hxx
src/GEOMImpl/GEOMImpl_IECallBack.cxx [new file with mode: 0755]
src/GEOMImpl/GEOMImpl_IECallBack.hxx [new file with mode: 0644]
src/GEOMImpl/GEOMImpl_IImportExportXAO.hxx [deleted file]
src/GEOMImpl/GEOMImpl_IInsertOperations.cxx
src/GEOMImpl/GEOMImpl_IInsertOperations.hxx
src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx
src/GEOMImpl/GEOMImpl_IShapesOperations.cxx
src/GEOMImpl/GEOMImpl_IShapesOperations.hxx
src/GEOMImpl/GEOMImpl_ImportDriver.cxx
src/GEOMImpl/GEOMImpl_ImportDriver.hxx
src/GEOMImpl/GEOMImpl_PipeDriver.cxx
src/GEOMImpl/GEOMImpl_ShapeDriver.cxx
src/GEOMImpl/GEOMImpl_Types.hxx
src/GEOMImpl/GEOMImpl_XAODriver.cxx [deleted file]
src/GEOMImpl/GEOMImpl_XAODriver.hxx [deleted file]
src/GEOMImpl/GUID.txt
src/GEOMToolsGUI/GEOMToolsGUI.cxx
src/GEOMToolsGUI/GEOMToolsGUI.h
src/GEOMUtils/CMakeLists.txt
src/GEOMUtils/GEOMUtils.cxx
src/GEOMUtils/GEOMUtils.hxx
src/GEOMUtils/GEOMUtils_Hatcher.cxx
src/GEOMUtils/GEOMUtils_Hatcher.hxx
src/GEOMUtils/GEOMUtils_XmlHandler.cxx [new file with mode: 0644]
src/GEOMUtils/GEOMUtils_XmlHandler.hxx [new file with mode: 0644]
src/GEOM_I/CMakeLists.txt
src/GEOM_I/GEOM_Gen_i.cc
src/GEOM_I/GEOM_Gen_i.hh
src/GEOM_I/GEOM_I3DPrimOperations_i.cc
src/GEOM_I/GEOM_I3DPrimOperations_i.hh
src/GEOM_I/GEOM_IInsertOperations_i.cc
src/GEOM_I/GEOM_IInsertOperations_i.hh
src/GEOM_I/GEOM_wrap.hxx
src/GEOM_I_Superv/CMakeLists.txt
src/GEOM_I_Superv/GEOM_Superv_i.cc
src/GEOM_I_Superv/GEOM_Superv_i.hh
src/GEOM_SWIG/AdvancedGEOMBuilder.py [new file with mode: 0644]
src/GEOM_SWIG/BREPPluginBuilder.py [new file with mode: 0644]
src/GEOM_SWIG/CMakeLists.txt
src/GEOM_SWIG/GEOM_TestAll.py
src/GEOM_SWIG/GEOM_example3.py
src/GEOM_SWIG/IGESPluginBuilder.py [new file with mode: 0644]
src/GEOM_SWIG/STEPPluginBuilder.py [new file with mode: 0644]
src/GEOM_SWIG/STLPluginBuilder.py [new file with mode: 0644]
src/GEOM_SWIG/VTKPluginBuilder.py [new file with mode: 0644]
src/GEOM_SWIG/XAOPluginBuilder.py [new file with mode: 0644]
src/GEOM_SWIG/geomBuilder.py
src/GEOM_SWIG_WITHIHM/libGEOM_Swig.cxx
src/GEOM_SWIG_WITHIHM/libGEOM_Swig.h
src/GEOM_SWIG_WITHIHM/libGEOM_Swig.i
src/GenerationGUI/GenerationGUI_PipeDlg.cxx
src/IGESExport/CMakeLists.txt [deleted file]
src/IGESExport/IGESExport.cxx [deleted file]
src/IGESImport/CMakeLists.txt [deleted file]
src/IGESImport/IGESImport.cxx [deleted file]
src/IGESPlugin/CMakeLists.txt [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_Engine.cxx [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_Engine.hxx [new file with mode: 0755]
src/IGESPlugin/IGESPlugin_ExportDlg.cxx [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_ExportDlg.h [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_ExportDriver.cxx [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_ExportDriver.hxx [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_GUI.cxx [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_GUI.h [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_IECallBack.cxx [new file with mode: 0755]
src/IGESPlugin/IGESPlugin_IECallBack.hxx [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_IExport.hxx [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_IImport.hxx [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_IOperations.cxx [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_IOperations.hxx [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_IOperations_i.cc [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_IOperations_i.hh [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_ImportDriver.cxx [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_ImportDriver.hxx [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_OperationsCreator.cxx [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_OperationsCreator.hxx [new file with mode: 0755]
src/IGESPlugin/IGESPlugin_msg_en.ts [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_msg_fr.ts [new file with mode: 0644]
src/IGESPlugin/IGESPlugin_msg_ja.ts [new file with mode: 0644]
src/ImportExportGUI/CMakeLists.txt [deleted file]
src/ImportExportGUI/ImportExportGUI.cxx [deleted file]
src/ImportExportGUI/ImportExportGUI.h [deleted file]
src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx [deleted file]
src/ImportExportGUI/ImportExportGUI_ExportXAODlg.h [deleted file]
src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx [deleted file]
src/ImportExportGUI/ImportExportGUI_ImportXAODlg.h [deleted file]
src/OBJECT/GEOM_AISShape.cxx
src/OBJECT/GEOM_AISShape.hxx
src/OBJECT/GEOM_Actor.cxx
src/OBJECT/GEOM_Actor.h
src/OBJECT/GEOM_Constants.cxx
src/OBJECT/GEOM_Constants.h
src/OBJECT/GEOM_OCCReader.cxx
src/OBJECT/GEOM_OCCReader.h
src/OBJECT/GEOM_TopWireframeShape.cxx
src/OCC2VTK/GEOM_FaceSource.h
src/OCC2VTK/GEOM_WireframeFace.cxx
src/OCC2VTK/GEOM_WireframeFace.h
src/OCC2VTK/OCC2VTK_Tools.cxx
src/OCC2VTK/OCC2VTK_Tools.h
src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.h
src/STEPExport/CMakeLists.txt [deleted file]
src/STEPExport/STEPExport.cxx [deleted file]
src/STEPImport/CMakeLists.txt [deleted file]
src/STEPImport/STEPImport.cxx [deleted file]
src/STEPPlugin/CMakeLists.txt [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_Engine.cxx [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_Engine.hxx [new file with mode: 0755]
src/STEPPlugin/STEPPlugin_ExportDriver.cxx [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_ExportDriver.hxx [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_GUI.cxx [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_GUI.h [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_IECallBack.cxx [new file with mode: 0755]
src/STEPPlugin/STEPPlugin_IECallBack.hxx [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_IExport.hxx [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_IImport.hxx [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_IOperations.cxx [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_IOperations.hxx [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_IOperations_i.cc [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_IOperations_i.hh [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_ImportDriver.cxx [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_ImportDriver.hxx [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_OperationsCreator.cxx [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_OperationsCreator.hxx [new file with mode: 0755]
src/STEPPlugin/STEPPlugin_msg_en.ts [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_msg_fr.ts [new file with mode: 0644]
src/STEPPlugin/STEPPlugin_msg_ja.ts [new file with mode: 0644]
src/STLExport/CMakeLists.txt [deleted file]
src/STLExport/STLExport.cxx [deleted file]
src/STLImport/CMakeLists.txt [deleted file]
src/STLImport/STLImport.cxx [deleted file]
src/STLPlugin/CMakeLists.txt [new file with mode: 0644]
src/STLPlugin/STLPlugin_Engine.cxx [new file with mode: 0644]
src/STLPlugin/STLPlugin_Engine.hxx [new file with mode: 0755]
src/STLPlugin/STLPlugin_ExportDlg.cxx [new file with mode: 0644]
src/STLPlugin/STLPlugin_ExportDlg.h [new file with mode: 0644]
src/STLPlugin/STLPlugin_ExportDriver.cxx [new file with mode: 0644]
src/STLPlugin/STLPlugin_ExportDriver.hxx [new file with mode: 0644]
src/STLPlugin/STLPlugin_GUI.cxx [new file with mode: 0644]
src/STLPlugin/STLPlugin_GUI.h [new file with mode: 0644]
src/STLPlugin/STLPlugin_IECallBack.cxx [new file with mode: 0755]
src/STLPlugin/STLPlugin_IECallBack.hxx [new file with mode: 0644]
src/STLPlugin/STLPlugin_IExport.hxx [new file with mode: 0644]
src/STLPlugin/STLPlugin_IImport.hxx [new file with mode: 0644]
src/STLPlugin/STLPlugin_IOperations.cxx [new file with mode: 0644]
src/STLPlugin/STLPlugin_IOperations.hxx [new file with mode: 0644]
src/STLPlugin/STLPlugin_IOperations_i.cc [new file with mode: 0644]
src/STLPlugin/STLPlugin_IOperations_i.hh [new file with mode: 0644]
src/STLPlugin/STLPlugin_ImportDriver.cxx [new file with mode: 0644]
src/STLPlugin/STLPlugin_ImportDriver.hxx [new file with mode: 0644]
src/STLPlugin/STLPlugin_OperationsCreator.cxx [new file with mode: 0644]
src/STLPlugin/STLPlugin_OperationsCreator.hxx [new file with mode: 0755]
src/STLPlugin/STLPlugin_msg_en.ts [new file with mode: 0644]
src/STLPlugin/STLPlugin_msg_fr.ts [new file with mode: 0644]
src/STLPlugin/STLPlugin_msg_ja.ts [new file with mode: 0644]
src/ShapeRecognition/ShapeRec_FeatureDetector.hxx
src/VTKExport/CMakeLists.txt [deleted file]
src/VTKExport/VTKExport.cxx [deleted file]
src/VTKPlugin/CMakeLists.txt [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_Engine.cxx [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_Engine.hxx [new file with mode: 0755]
src/VTKPlugin/VTKPlugin_ExportDlg.cxx [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_ExportDlg.h [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_ExportDriver.cxx [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_ExportDriver.hxx [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_GUI.cxx [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_GUI.h [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_IECallBack.cxx [new file with mode: 0755]
src/VTKPlugin/VTKPlugin_IECallBack.hxx [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_IExport.hxx [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_IOperations.cxx [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_IOperations.hxx [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_IOperations_i.cc [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_IOperations_i.hh [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_OperationsCreator.cxx [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_OperationsCreator.hxx [new file with mode: 0755]
src/VTKPlugin/VTKPlugin_msg_en.ts [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_msg_fr.ts [new file with mode: 0644]
src/VTKPlugin/VTKPlugin_msg_ja.ts [new file with mode: 0644]
src/XAO/XAO_XaoExporter.cxx
src/XAOPlugin/CMakeLists.txt [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_Driver.cxx [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_Driver.hxx [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_Engine.cxx [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_Engine.hxx [new file with mode: 0755]
src/XAOPlugin/XAOPlugin_ExportDlg.cxx [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_ExportDlg.h [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_GUI.cxx [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_GUI.h [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_IECallBack.cxx [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_IECallBack.hxx [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_IImportExport.hxx [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_IOperations.cxx [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_IOperations.hxx [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_IOperations_i.cc [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_IOperations_i.hh [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_ImportDlg.cxx [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_ImportDlg.h [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_OperationsCreator.cxx [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_OperationsCreator.hxx [new file with mode: 0755]
src/XAOPlugin/XAOPlugin_images.ts [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_msg_en.ts [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_msg_fr.ts [new file with mode: 0644]
src/XAOPlugin/XAOPlugin_msg_ja.ts [new file with mode: 0644]

index 111061ef829f58df1736750d56536fe5eec1fd75..d741a55cc0bd61c08c3a90b1c5bb990493f904ba 100755 (executable)
@@ -31,10 +31,10 @@ STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
 
 SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
 SET(${PROJECT_NAME_UC}_MINOR_VERSION 4)
-SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
+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
 # ===========
@@ -234,16 +234,18 @@ INCLUDE(CMakePackageConfigHelpers)
 # List of targets in this project we want to make visible to the rest of the world.
 # They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
 SET(_${PROJECT_NAME}_exposed_targets 
-  GEOMArchimede BREPExport BREPImport BlockFix GEOMbasic GEOMAlgo GEOMClient GEOMImpl
-  GEOMUtils GEOMEngine GEOM_SupervEngine IGESExport IGESImport GEOMSketcher
-  SalomeIDLGEOM STEPExport STEPImport STLExport STLImport ShHealOper XAO AdvancedEngine OCC2VTK
-  VTKExport
+  GEOMArchimede BlockFix GEOMbasic GEOMAlgo GEOMClient GEOMImpl
+  GEOMUtils GEOMEngine GEOM_SupervEngine GEOMSketcher
+  SalomeIDLGEOM SalomeIDLGEOMSuperv SalomeIDLAdvancedGEOM ShHealOper XAO AdvancedEngine OCC2VTK
+  SalomeIDLSTLPlugin SalomeIDLBREPPlugin SalomeIDLSTEPPlugin SalomeIDLIGESPlugin SalomeIDLXAOPlugin SalomeIDLVTKPlugin
+  STLPluginEngine BREPPluginEngine STEPPluginEngine IGESPluginEngine XAOPluginEngine VTKPluginEngine
 )
 IF(SALOME_BUILD_GUI)
   LIST(APPEND _${PROJECT_NAME}_exposed_targets 
     AdvancedGUI BasicGUI BlocksGUI BooleanGUI BuildGUI DisplayGUI DlgRef EntityGUI GEOMBase
     GEOMFiltersSelection GEOM GEOMToolsGUI GenerationGUI GroupGUI Material MeasureGUI GEOMObject
-    OperationGUI PrimitiveGUI RepairGUI TransformationGUI ImportExportGUI DependencyTree
+    OperationGUI PrimitiveGUI RepairGUI TransformationGUI DependencyTree
+    STLPluginGUI BREPPluginGUI STEPPluginGUI IGESPluginGUI XAOPluginGUI VTKPluginGUI
     )
 ENDIF(SALOME_BUILD_GUI)
 
index c72af1a38266e582d1235aec33c935bb0593aa46..43660c4f821a6b3e882f6fa7572b788ff6602bb2 100644 (file)
@@ -129,8 +129,6 @@ ENDIF(SALOME_GEOM_BUILD_GUI)
 
 # Exposed GEOM targets:
 SET(GEOM_GEOMArchimede GEOMArchimede)
-SET(GEOM_BREPExport BREPExport)
-SET(GEOM_BREPImport BREPImport)
 SET(GEOM_BlockFix BlockFix)
 SET(GEOM_GEOMbasic GEOMbasic)
 SET(GEOM_GEOMAlgo GEOMAlgo)
@@ -139,14 +137,16 @@ SET(GEOM_GEOMImpl GEOMImpl)
 SET(GEOM_GEOMUtils GEOMUtils)
 SET(GEOM_GEOMEngine GEOMEngine)
 SET(GEOM_GEOM_SupervEngine GEOM_SupervEngine)
-SET(GEOM_IGESExport IGESExport)
-SET(GEOM_IGESImport IGESImport)
 SET(GEOM_GEOMSketcher GEOMSketcher)
 SET(GEOM_SalomeIDLGEOM SalomeIDLGEOM)
-SET(GEOM_STEPExport STEPExport)
-SET(GEOM_STEPImport STEPImport)
-SET(GEOM_STLExport STLExport)
-SET(GEOM_STLImport STLImport)
+SET(GEOM_SalomeIDLGEOMSuperv SalomeIDLGEOMSuperv)
+SET(GEOM_SalomeIDLAdvancedGEOM SalomeIDLAdvancedGEOM)
+SET(GEOM_SalomeIDLSTLPlugin SalomeIDLSTLPlugin)
+SET(GEOM_SalomeIDLBREPPlugin SalomeIDLBREPPlugin)
+SET(GEOM_SalomeIDLSTEPPlugin SalomeIDLSTEPPlugin)
+SET(GEOM_SalomeIDLIGESPlugin SalomeIDLIGESPlugin)
+SET(GEOM_SalomeIDLXAOPlugin SalomeIDLXAOPlugin)
+SET(GEOM_SalomeIDLVTKPlugin SalomeIDLVTKPlugin)
 SET(GEOM_ShHealOper ShHealOper)
 SET(GEOM_XAO XAO)
 SET(GEOM_AdvancedEngine AdvancedEngine)
@@ -169,11 +169,21 @@ SET(GEOM_Material Material)
 SET(GEOM_MeasureGUI MeasureGUI)
 SET(GEOM_GEOMObject GEOMObject)
 SET(GEOM_OCC2VTK OCC2VTK)
-SET(GEOM_VTKExport VTKExport)
 SET(GEOM_OperationGUI OperationGUI)
 SET(GEOM_PrimitiveGUI PrimitiveGUI)
 SET(GEOM_RepairGUI RepairGUI)
 SET(GEOM_TransformationGUI TransformationGUI)
-SET(GEOM_ImportExportGUI ImportExportGUI)
+SET(GEOM_STLPluginGUI STLPluginGUI)
+SET(GEOM_STLPluginEngine STLPluginEngine)
+SET(GEOM_BREPPluginGUI BREPPluginGUI)
+SET(GEOM_BREPPluginEngine BREPPluginEngine)
+SET(GEOM_STEPPluginGUI STEPPluginGUI)
+SET(GEOM_STEPPluginEngine STEPPluginEngine)
+SET(GEOM_IGESPluginGUI IGESPluginGUI)
+SET(GEOM_IGESPluginEngine IGESPluginEngine)
+SET(GEOM_XAOPluginGUI XAOPluginGUI)
+SET(GEOM_XAOPluginEngine XAOPluginEngine)
+SET(GEOM_VTKPluginGUI VTKPluginGUI)
+SET(GEOM_VTKPluginEngine VTKPluginEngine)
 SET(GEOM_GEOMShapeRec GEOMShapeRec)
 SET(GEOM_CurveCreator CurveCreator)
index 69722aa4e15735f88f885346002ba898e834b787..1c99fe09f70d5593d2a92cf202f103c509a85cad 100644 (file)
@@ -21,8 +21,6 @@ SET(GEOM_CXXFLAGS -I${GEOM_ROOT_DIR}/include/salome) # to be removed
 SET(GEOM_INCLUDE_DIRS ${GEOM_ROOT_DIR}/include/salome)
 
 FIND_LIBRARY(GEOM_GEOMArchimede GEOMArchimede ${GEOM_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(GEOM_BREPExport BREPExport ${GEOM_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(GEOM_BREPImport BREPImport ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_BlockFix BlockFix ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_GEOMbasic GEOMbasic ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_GEOMAlgo GEOMAlgo ${GEOM_ROOT_DIR}/lib/salome)
@@ -31,14 +29,15 @@ FIND_LIBRARY(GEOM_GEOMimpl GEOMimpl ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_GEOMUtils GEOMUtils ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_GEOMEngine GEOMEngine ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_SupervEngine GEOM_SupervEngine ${GEOM_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(GEOM_IGESExport IGESExport ${GEOM_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(GEOM_IGESImport IGESImport ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_GEOMSketcher GEOMSketcher ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_SalomeIDLGEOM SalomeIDLGEOM ${GEOM_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(GEOM_STEPExport STEPExport ${GEOM_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(GEOM_STEPImport STEPImport ${GEOM_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(GEOM_STLExport STLExport ${GEOM_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(GEOM_STLImport STLImport ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_SalomeIDLGEOMSuperv SalomeIDLGEOMSuperv ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_SalomeIDLSTLPlugin SalomeIDLSTLPlugin ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_SalomeIDLBREPPlugin SalomeIDLBREPPlugin ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_SalomeIDLSTEPPlugin SalomeIDLSTEPPlugin ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_SalomeIDLIGESPlugin SalomeIDLIGESPlugin ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_SalomeIDLVTKPlugin SalomeIDLVTKPlugin ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_SalomeIDLXAOPlugin SalomeIDLXAOPlugin ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_ShHealOper ShHealOper ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_XAO XAO ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_AdvancedEngine AdvancedEngine ${GEOM_ROOT_DIR}/lib/salome)
@@ -61,11 +60,21 @@ FIND_LIBRARY(GEOM_Material Material ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_MeasureGUI MeasureGUI ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_GEOMObject GEOMObject ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_OCC2VTK OCC2VTK ${GEOM_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(GEOM_VTKExport VTKExport ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_OperationGUI OperationGUI ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_PrimitiveGUI PrimitiveGUI ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_RepairGUI RepairGUI ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_TransformationGUI TransformationGUI ${GEOM_ROOT_DIR}/lib/salome)
-FIND_LIBRARY(GEOM_ImportExportGUI ImportExportGUI ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_STLPluginGUI STLPluginGUI ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_STLPluginEngine STLPluginEngine ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_BREPPluginGUI BREPPluginGUI ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_BREPPluginEngine BREPPluginEngine ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_STEPPluginGUI STEPPluginGUI ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_STEPPluginEngine STEPPluginEngine ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_IGESPluginGUI IGESPluginGUI ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_IGESPluginEngine IGESPluginEngine ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_XAOPluginGUI XAOPluginGUI ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_XAOPluginEngine XAOPluginEngine ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_VTKPluginGUI VTKPluginGUI ${GEOM_ROOT_DIR}/lib/salome)
+FIND_LIBRARY(GEOM_VTKPluginEngine VTKPluginEngine ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_GEOMShapeRec GEOMShapeRec ${GEOM_ROOT_DIR}/lib/salome)
 FIND_LIBRARY(GEOM_CurveCreator CurveCreator ${GEOM_ROOT_DIR}/lib/salome)
index 35f9a0ef1e08b5c11f875d55aeb68623c2b7d95d..b4e8b747ac00edcb2b359775d1d33c49353fd8a9 100644 (file)
@@ -36,28 +36,28 @@ def set_env( args ):
 
     csf_list = ["Plugin", "GEOMDS_Resources", "ShHealing"]
 
-    for csf_file in csf_list:
-       uniteFiles( os.path.join( res_dir, csf_file ), os.path.join( env_dir, csf_file ) )
-       pass
-
-    for csf_string in csf_list:
-        csf_var = "CSF_" + csf_string + "Defaults"
+    for csf in csf_list:
+        uniteFiles( os.path.join( res_dir, csf ), os.path.join( env_dir, csf ) )
+        csf_var = "CSF_%sDefaults" % csf
         if not os.getenv( csf_var ):
             os.environ[ csf_var ] = env_dir
             pass
         pass
 
-    # find plugins
+    # collect plugins
     plugin_list = []
     resource_path_list = []
-    plugins_dir_var = "GEOM_ENGINE_RESOURCES_DIR"
-    if os.environ.has_key(plugins_dir_var):
-        # reverse the user's paths list, because the used 'add_path' prepends a new path,
-        # but we want to append it: [a, b, c] => [c, b, a]
-        plugins_dirs = os.environ[plugins_dir_var].split(os.pathsep)
-        plugins_dirs.reverse()
-        os.environ[plugins_dir_var] = string.join(plugins_dirs, os.pathsep)
-        pass
+
+    # standard plugins
+    plugin_list.append("BREPPlugin")
+    plugin_list.append("STEPPlugin")
+    plugin_list.append("IGESPlugin")
+    plugin_list.append("STLPlugin")
+    plugin_list.append("XAOPlugin")
+    plugin_list.append("VTKPlugin")
+    plugin_list.append("AdvancedGEOM")
+
+    # find additional plugins
     for env_var in os.environ.keys():
         value = os.environ[env_var]
         if env_var[-9:] == "_ROOT_DIR" and value:
@@ -65,61 +65,48 @@ def set_env( args ):
             plugin = env_var[:-9] # plugin name may have wrong case
 
             # look for NAMEOFPlugin.xml file among resource files
-            resource_dir = os.path.join(plugin_root,"share",salome_subdir,"resources",plugin.lower())
-            if not os.access( resource_dir, os.F_OK ): continue
-            for resource_file in os.listdir( resource_dir ):
-                if resource_file.endswith( ".xml") and \
+            resource_dir = os.path.join(plugin_root, "share", salome_subdir, "resources", plugin.lower())
+            if not os.access(resource_dir, os.F_OK): continue
+
+            for resource_file in os.listdir(resource_dir):
+                if resource_file.endswith(".xml") and \
                    resource_file.lower() == plugin.lower() + ".xml":
                     # use "name" attribute of "geom-plugin" as name of plugin in a right case
-                    from xml.dom.minidom import parse
                     try:
-                        xml_doc = parse( os.path.join( resource_dir, resource_file ))
+                        from xml.dom.minidom import parse
+                        xml_doc = parse(os.path.join(resource_dir, resource_file))
                         plugin_nodes = xml_doc.getElementsByTagName("geom-plugin")
-                    except:
-                        continue
-                    if not plugin_nodes or not plugin_nodes[0].hasAttribute("name"): continue
-                    plugin = plugin_nodes[0].getAttribute("name")
-                    if plugin in plugin_list: continue
+                        if not plugin_nodes or not plugin_nodes[0].hasAttribute("name"): continue
 
-                    # add paths of plugin
-                    plugin_list.append(plugin)
-                    if not os.environ.has_key("SALOME_"+plugin+"Resources"):
-                        resource_path = os.path.join(plugin_root,"share",salome_subdir,"resources",plugin.lower())
-                        os.environ["SALOME_"+plugin+"Resources"] = resource_path
-                        resource_path_list.append( resource_path )
-                        add_path(os.path.join(plugin_root,get_lib_dir(),python_version, "site-packages",salome_subdir), "PYTHONPATH")
-                        add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "PYTHONPATH")
+                        plugin = plugin_nodes[0].getAttribute("name")
+                        if plugin in plugin_list: continue
 
-                        if sys.platform == "win32":
-                            add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "PATH")
-                            add_path(os.path.join(plugin_root,"bin",salome_subdir), "PYTHONPATH")
-                        else:
-                            add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "LD_LIBRARY_PATH")
-                            add_path(os.path.join(plugin_root,"bin",salome_subdir), "PYTHONPATH")
-                            add_path(os.path.join(plugin_root,"bin",salome_subdir), "PATH")
+                        plugin_list.append(plugin)
+
+                        # add paths of plugin
+                        if not os.environ.has_key("SALOME_"+plugin+"Resources"):
+                            resource_path = os.path.join(plugin_root, "share", salome_subdir, "resources", plugin.lower())
+                            os.environ["SALOME_"+plugin+"Resources"] = resource_path
+                            resource_path_list.append(resource_path)
+                            add_path(os.path.join(plugin_root, get_lib_dir(), python_version, "site-packages", salome_subdir), "PYTHONPATH")
+                            add_path(os.path.join(plugin_root, get_lib_dir(), salome_subdir), "PYTHONPATH")
+                            if sys.platform == "win32":
+                                add_path(os.path.join(plugin_root, get_lib_dir(), salome_subdir), "PATH")
+                                add_path(os.path.join(plugin_root, "bin", salome_subdir), "PYTHONPATH")
+                            else:
+                                add_path(os.path.join(plugin_root, get_lib_dir(), salome_subdir), "LD_LIBRARY_PATH")
+                                add_path(os.path.join(plugin_root, "bin", salome_subdir), "PYTHONPATH")
+                                add_path(os.path.join(plugin_root, "bin", salome_subdir), "PATH")
+                                pass
                             pass
                         pass
-                    pass
-                elif resource_file == "ImportExport" and plugin.upper() != "GEOM":
-                    # add 'ImportExport' plugin file path into variable
-                    add_path(resource_dir, plugins_dir_var)
-                    # add plugin's library path into environment
-                    if sys.platform == "win32":
-                        add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "PATH")
-                    else:
-                        add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "LD_LIBRARY_PATH")
-                        pass
+                    except:
+                        continue
                     pass
                 pass
-    plugin_list.append("GEOMActions")
+            pass
+        pass
+
     os.environ["GEOM_PluginsList"] = ":".join(plugin_list)
     os.environ["SalomeAppConfig"] = os.environ["SalomeAppConfig"] + psep + psep.join(resource_path_list)
-
-    if os.environ.has_key(plugins_dir_var):
-        # reverse back the plugin paths:
-        # [f, e, d, c, b, a] => [a, b, c, d, e, f]
-        plugins_dirs = os.environ[plugins_dir_var].split(os.pathsep)
-        plugins_dirs.reverse()
-        os.environ[plugins_dir_var] = string.join(plugins_dirs, os.pathsep)
-        pass
     pass
index 158fc637553af3832a061c2001ae70a8c1fa160d..3b5f7df60a753f1ae4c6bec0749b41bdc3cce37a 100644 (file)
@@ -25,7 +25,7 @@ print "UnitName2 = ", UnitName2
 # import shapes
 Shape1 = geompy.ImportIGES(theFileName1)
 Shape2 = geompy.ImportIGES(theFileName2)
-Shape3 = geompy.ImportFile(theFileName2,"IGES_SCALE")
+Shape3 = geompy.ImportIGES(theFileName2, True)
 [Xmin1,Xmax1, Ymin1,Ymax1, Zmin1,Zmax1] = geompy.BoundingBox(Shape1)
 [Xmin2,Xmax2, Ymin2,Ymax2, Zmin2,Zmax2] = geompy.BoundingBox(Shape2)
 [Xmin3,Xmax3, Ymin3,Ymax3, Zmin3,Zmax3] = geompy.BoundingBox(Shape3)
index d55d6510fdeb7b50fee463ab4ca1bd1775b0cc9a..82cf5e4490459ffc5c6b81230eb00143b44ecc49 100644 (file)
@@ -1,5 +1,7 @@
 # Creation of a Cylinder
 
+import math
+
 import salome
 salome.salome_init()
 import GEOM
@@ -11,23 +13,37 @@ gg = salome.ImportComponentGUI("GEOM")
 # create a vertex and a vector
 p1 = geompy.MakeVertex(25, 35, 45)
 p2 = geompy.MakeVertex(70, 70, 70)
-v = geompy.MakeVector(p1, p2)
+v  = geompy.MakeVector(p1, p2)
 
 # create cylinders
-height = 40
-
+height  = 40
 radius1 = 15
+radius2 = 30
+angle1  = 45.  * math.pi / 180.
+angle2  = 210. * math.pi / 180.
+
 cylinder1 = geompy.MakeCylinder(p1, v, radius1, height)
 
-radius2 = 30
 cylinder2 = geompy.MakeCylinderRH(radius2, height)
 
+cylinder3 = geompy.MakeCylinderA(p1, v, radius1, height, angle1)
+geompy.TranslateDXDYDZ(cylinder3, 80., 0., 0.)
+
+cylinder4 = geompy.MakeCylinderRHA(radius2, height, angle2)
+geompy.TranslateDXDYDZ(cylinder4, 80., 0., 0.)
+
 # add objects in the study
 id_cylinder1 = geompy.addToStudy(cylinder1,"Cylinder1")
 id_cylinder2 = geompy.addToStudy(cylinder2,"Cylinder2")
+id_cylinder3 = geompy.addToStudy(cylinder3,"Cylinder3")
+id_cylinder4 = geompy.addToStudy(cylinder4,"Cylinder4")
 
 # display the cylinders
 gg.createAndDisplayGO(id_cylinder1)
 gg.setDisplayMode(id_cylinder1,1)
 gg.createAndDisplayGO(id_cylinder2)
 gg.setDisplayMode(id_cylinder2,1)
+gg.createAndDisplayGO(id_cylinder3)
+gg.setDisplayMode(id_cylinder3,1)
+gg.createAndDisplayGO(id_cylinder4)
+gg.setDisplayMode(id_cylinder4,1)
index 0458d42bf38001c72ce42d0ee862d6dd99b1f90d..17387b7247c37a9710f31c3b3957dd1fd586d912 100644 (file)
@@ -11,10 +11,9 @@ box2 = geompy.MakeBox(-50,-50,-50, 0,0,0)
 sphere = geompy.MakeSphere(50,50,50, 30)
 fuse = geompy.MakeBoolean(box,sphere,3)
 fuse_id = geompy.addToStudy(fuse,"Fuse")
-box_id = geompy.addToStudy(box2, "Box")
 
 gg = salome.ImportComponentGUI("GEOM")
 gg.createAndDisplayGO(fuse_id)
 gg.setDisplayMode(fuse_id,1)
-gg.createAndDisplayGO(box_id)
-gg.setVectorsMode(box_id, 1)
+gg.setVectorsMode(fuse_id, 1)
+gg.setVerticesMode(fuse_id, 1)
index 1b8fbf299c443ab30b79f8bf5b90e5baaf39b9e5..3584bc193e58f2a779c99e130589a12496f5e1e0 100644 (file)
@@ -25,12 +25,23 @@ SALOME_CONFIGURE_FILE(doxyfile_tui.in doxyfile_tui)
 SALOME_CONFIGURE_FILE(static/header.html.in ${CMAKE_CURRENT_BINARY_DIR}/static/header.html)
 SALOME_CONFIGURE_FILE(static/header_py.html.in ${CMAKE_CURRENT_BINARY_DIR}/static/header_py.html)
 
+# Generate a temporary python file, needed for the genaration of the documentation
+# of the built-in Geometry plugins.
+SET(DOC_GEOM_PluginsList AdvancedGEOM STLPlugin BREPPlugin STEPPlugin IGESPlugin XAOPlugin VTKPlugin)
+SALOME_ACCUMULATE_ENVIRONMENT(GEOM_PluginsList NOCHECK ${DOC_GEOM_PluginsList})
+SET(geom_file "${CMAKE_CURRENT_SOURCE_DIR}/collect_geom_methods.py")
+SET(plugins_cmd_options ${geom_file} -o tmp1/geomBuilder.py ${DOC_GEOM_PluginsList})
+SALOME_GENERATE_ENVIRONMENT_SCRIPT(plugins_cmd env_script "${PYTHON_EXECUTABLE}" "${plugins_cmd_options}")
+# Install a script
+SALOME_INSTALL_SCRIPTS(collect_geom_methods.py ${SALOME_INSTALL_BINS})
+
 SET(f "$ENV{KERNEL_ROOT_DIR}/bin/salome/prepare_generating_doc.py")
 IF(WIN32)
   STRING(REPLACE "/" "\\" f ${f})
 ENDIF(WIN32)
 
 ADD_CUSTOM_TARGET(usr_docs ${CMAKE_COMMAND} -E make_directory tmp
+  COMMAND ${CMAKE_COMMAND} -E make_directory tmp1
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/geomBuilder.py ${CMAKE_SOURCE_DIR}/src/GEOM_SWIG/geomBuilder.py
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/gsketcher.py   ${CMAKE_SOURCE_DIR}/src/GEOM_SWIG/gsketcher.py
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/geomtools.py   ${CMAKE_SOURCE_DIR}/src/GEOM_PY/geomtools.py
@@ -38,12 +49,14 @@ ADD_CUSTOM_TARGET(usr_docs ${CMAKE_COMMAND} -E make_directory tmp
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/structelem.py  ${CMAKE_SOURCE_DIR}/src/GEOM_PY/structelem/__init__.py
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/parts.py       ${CMAKE_SOURCE_DIR}/src/GEOM_PY/structelem/parts.py
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/orientation.py ${CMAKE_SOURCE_DIR}/src/GEOM_PY/structelem/orientation.py
+  COMMAND ${plugins_cmd}
   COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_tui 
   COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py
   COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
   COMMAND  ${CMAKE_COMMAND} -E remove_directory tmp
+  COMMAND  ${CMAKE_COMMAND} -E remove_directory tmp1
   VERBATIM 
-  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}             
+  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
 
 ADD_DEPENDENCIES(usr_docs html_docs)
diff --git a/doc/salome/gui/GEOM/collect_geom_methods.py b/doc/salome/gui/GEOM/collect_geom_methods.py
new file mode 100644 (file)
index 0000000..482f5f3
--- /dev/null
@@ -0,0 +1,148 @@
+#!/usr/bin/env python
+#  -*- coding: utf-8 -*-
+# 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, or (at your option) any 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:   collect_geom_methods.py
+# Author: Roman NIKOLAEV, Open CASCADE S.A.S (roman.nikolaev@opencascade.com)
+#
+#################################################################################
+#
+# Extraction of the methods dynamically added by the Geometry 
+# module plug-in(s) to the geomBuilder class.
+# 
+# This script is intended for internal usage - only
+# for generatation of the extra developer documentation for
+# the Geometry module plug-in(s).
+# 
+# Usage:
+#       collect_geom_methods.py <plugin_name>
+# where
+#   <plugin_name> is a name of the plug-in module
+#
+# Notes:
+# - the script is supposed to be run in correct environment
+# i.e. PYTHONPATH, GEOM_PluginsList and other important
+# variables are set properly; otherwise the script will fail.
+#
+################################################################################
+
+import sys
+import inspect
+
+def generate(plugin_name, output):
+    plugin_module_name  = plugin_name + "Builder"
+    plugin_module       = "salome.%s.%s" % (plugin_name, plugin_module_name)
+    import_str          = "from salome.%s import %s" % (plugin_name, plugin_module_name)
+    exec( import_str )
+    exec( "import %s" % plugin_module )
+    exec( "mod = %s" % plugin_module )
+    functions = []
+    for attr in dir( mod ):
+        if attr.startswith( '_' ): continue # skip an internal methods 
+        item = getattr( mod, attr )
+        if type( item ).__name__ == 'function':
+            if item not in functions: 
+                functions.append( item )
+                pass
+            pass
+        pass
+    if functions:
+        for function in functions:
+            comments = inspect.getcomments(function)
+            if comments:
+                comments = comments.strip().split("\n")
+                comments = "\t" + "\n\t".join(comments)
+                output.append(comments)
+                pass                
+            sources = inspect.getsource(function)
+            if sources is not None:
+                sources_list = sources.split("\n")
+                sources_new_list = []
+                found = False
+                for item in sources_list:
+                    if '"""' in item:
+                        if found == True:
+                            found = False                                
+                            continue
+                        else:
+                            found = True
+                            continue
+                            pass
+                        pass                
+                    if found == False :
+                        sources_new_list.append(item)
+                        pass
+                    pass
+                sources = "\n".join(sources_new_list)
+                sources = "\t" + sources.replace("\n", "\n\t")
+                output.append(sources)
+                pass
+            pass
+        pass
+    pass
+
+if __name__ == "__main__":
+    import optparse
+    parser = optparse.OptionParser(usage="%prog [options] plugin")
+    h  = "Output file (geomBuilder.py by default)"
+    parser.add_option("-o", "--output", dest="output",
+                      action="store", default=None, metavar="file",
+                      help=h)
+    h  = "If this option is True, dummy help for geomBuiler class is added. "
+    h += "This option should be False (default) when building documentation for Geometry module "
+    h += "and True when building documentation for Geometry module plug-ins."
+    parser.add_option("-d", "--dummy-geom-help", dest="dummygeomhelp",
+                      action="store_true", default=False,
+                      help=h)
+    (options, args) = parser.parse_args()
+    if len( args ) < 1: sys.exit("Plugin name is not specified")
+
+    f = open(options.output, "w")
+    
+    output = []
+    if options.dummygeomhelp:
+        output.append( "## @package geomBuilder" )
+        output.append( "#  Documentation of the methods dynamically added by the " + plugin_name + " Geometry plug-in to the geomBuilder class." )
+        # Add dummy Geometry help
+        # This is supposed to be done when generating documentation for Geometry module plug-ins
+        output.append( "#  @note The documentation below does not provide complete description of class @b %geomBuilder" )
+        output.append( "#  from @b geomBuilder package. This documentation provides only information about" )
+        output.append( "#  the methods dynamically added to the %geomBuilder class by the " + plugin_name + " plugin" )
+        output.append( "#  For more details on the %geomBuilder class, please refer to the SALOME %Geometry module" )
+        output.append( "#  documentation." )
+        pass
+    else:
+        # Extend documentation for geomBuilder class with information about dynamically added methods.
+        # This is supposed to be done only when building documentation for Geometry module
+        output.append( "## @package geomBuilder" )
+        output.append( "#  @note Some methods are dynamically added to the @b %geomBuilder class in runtime by the" )
+        output.append( "#  plug-in modules. If you fail to find help on some methods in the documentation of Geometry module, " )
+        output.append( "#  try to look into the documentation for the Geometry module plug-ins." )
+        pass
+    output.append("class geomBuilder():")
+    
+    for arg in args:
+       generate( arg, output )
+    pass
+
+    for line in output: f.write( line + "\n" )
+    f.close()    
index 493b7c65c1b14211e7866d7157e02f532da99dd3..f3ad682982f28dd733ae9247788e3a57c2ffc74e 100755 (executable)
@@ -99,7 +99,14 @@ EXAMPLE_RECURSIVE      = NO
 #---------------------------------------------------------------------------
 #Input related options
 #---------------------------------------------------------------------------
-INPUT             = tmp @CMAKE_SOURCE_DIR@/idl/GEOM_Gen.idl
+INPUT             = tmp tmp1 @CMAKE_SOURCE_DIR@/idl/GEOM_Gen.idl \ 
+                    @CMAKE_SOURCE_DIR@/idl/AdvancedGEOM_Gen.idl \
+                    @CMAKE_SOURCE_DIR@/idl/STLPlugin.idl \
+                    @CMAKE_SOURCE_DIR@/idl/BREPPlugin.idl \
+                    @CMAKE_SOURCE_DIR@/idl/STEPPlugin.idl \
+                    @CMAKE_SOURCE_DIR@/idl/IGESPlugin.idl \
+                    @CMAKE_SOURCE_DIR@/idl/XAOPlugin.idl \
+                    @CMAKE_SOURCE_DIR@/idl/VTKPlugin.idl
 FILE_PATTERNS     = 
 IMAGE_PATH        = @CMAKE_CURRENT_SOURCE_DIR@/images
 EXAMPLE_PATH      = @CMAKE_SOURCE_DIR@/src/GEOM_SWIG
index 089dac2824f1261ff7d6fb63291984d564f11ee1..6dc21ce5146d7948c6ba3e7218ecc26b37d0d699 100755 (executable)
Binary files a/doc/salome/gui/GEOM/images/cylinder1.png and b/doc/salome/gui/GEOM/images/cylinder1.png differ
index ad6af2947a922418cdeb744e616fc81066dbf83f..b9ed9cd82066f3c7a9aaf011042e65ab7802b86c 100755 (executable)
Binary files a/doc/salome/gui/GEOM/images/cylinder2.png and b/doc/salome/gui/GEOM/images/cylinder2.png differ
index fc0d43276724ce5471d27a56249ac7bae4f22478..b9a2608a703853087a65e631c83271b8b18c0557 100755 (executable)
Binary files a/doc/salome/gui/GEOM/images/cylinders.png and b/doc/salome/gui/GEOM/images/cylinders.png differ
index a7171c748f9dd15e590580136760a2fe9116901a..d273b9d7813f84277ae841f0385a0177bc6fbc64 100644 (file)
Binary files a/doc/salome/gui/GEOM/images/exportxao_dlg.png and b/doc/salome/gui/GEOM/images/exportxao_dlg.png differ
index 4d4d3fb33f2fe4764a890952fd2b58159067525b..b8c181e7332e68e877fa4f688f365b4019b9d658 100755 (executable)
Binary files a/doc/salome/gui/GEOM/images/geomexport.png and b/doc/salome/gui/GEOM/images/geomexport.png differ
index d194ec5b6aa426ddbc996f9d6949df5258a558d0..c25ded6104e78dc9fdfd0aca08be14f47e9d54a4 100755 (executable)
Binary files a/doc/salome/gui/GEOM/images/geomimport.png and b/doc/salome/gui/GEOM/images/geomimport.png differ
diff --git a/doc/salome/gui/GEOM/images/importxao_dlg.png b/doc/salome/gui/GEOM/images/importxao_dlg.png
new file mode 100644 (file)
index 0000000..0ffda51
Binary files /dev/null and b/doc/salome/gui/GEOM/images/importxao_dlg.png differ
diff --git a/doc/salome/gui/GEOM/images/sat_named_shapes.png b/doc/salome/gui/GEOM/images/sat_named_shapes.png
deleted file mode 100644 (file)
index cb3bca6..0000000
Binary files a/doc/salome/gui/GEOM/images/sat_named_shapes.png and /dev/null differ
diff --git a/doc/salome/gui/GEOM/images/vertices_mode.png b/doc/salome/gui/GEOM/images/vertices_mode.png
new file mode 100644 (file)
index 0000000..deee2b8
Binary files /dev/null and b/doc/salome/gui/GEOM/images/vertices_mode.png differ
index 1e1cbc16d289a88770d0ca89d19e1243ce93eaed..d2c9f78e3829ffa84ac96077af346606cfe1776b 100644 (file)
@@ -10,20 +10,33 @@ Entity - > Primitives - > Cylinder</b>
 
 \n Firstly, you can define a \b Cylinder by the <b>Base Point</b> (the central
 point of the cylinder base), the \b Vector (the axis of the cylinder),
-and its dimensions: the Radius and the Height.
+and its dimensions: the \b Radius and the \b Height. Also, you can optionally specify
+the \b Angle in order to create a portion of cylinder.
+
 \n <b>TUI Command:</b> <em>geompy.MakeCylinder(Point, Axis, Radius, Height)</em>
 \n <b>Arguments:</b>  Name + 1 vertex + 1 vector + 2 values
 (Dimensions: radius and height).
 
+\n <b>TUI Command:</b> <em>geompy.MakeCylinderA(Point, Axis, Radius, Height, Angle)</em>
+\n <b>Arguments:</b>  Name + 1 vertex + 1 vector + 3 values
+(Dimensions: radius, height and angle).
+
 \image html cylinder1.png
 
-\n Secondly, you can define a \b Cylinder by the given radius and the
-height at  the origin of coordinate system. The axis of the cylinder
-will be collinear to the OZ axis of the coordinate system.
+\n Secondly, you can define a \b Cylinder by the given \b Radius and
+\b Height at the origin of coordinate system. The axis of the cylinder
+will be collinear to the OZ axis of the coordinate system. 
+Similarly to first constructor, you can optionally specify the \b Angle
+in order to create a portion of cylinder.
+
 \n <b>TUI Command:</b> <em>geompy.MakeCylinderRH(Radius, Height)</em>
 \n <b>Arguments:</b> Name + 2 values (Dimensions at origin: radius and
 height).
 
+\n <b>TUI Command:</b> <em>geompy.MakeCylinderRHA(Radius, Height, Angle)</em>
+\n <b>Arguments:</b>  Name + 3 values
+(Dimensions at origin: radius, height and angle).
+
 \image html cylinder2.png
 
 <b>Example:</b>
index f8eaeccf018879859c2e0436f76e863faa3fc548..f8f2184e7d00e7a18e297a6c3de8f2a8c45e304c 100644 (file)
@@ -29,6 +29,17 @@ functionality for all objects in the current view via the main menu
 
 \n <b>TUI Command:</b> <em>gg.setVectorsMode(ID, Bool)</em>
 
+\n Also it is possible to show the vertices of the selected
+shape. For this, choose in the context menu of the shape
+<b>Display mode -> Show Vertices</b>, or apply this
+functionality for all objects in the current view via the main menu
+<b> View -> Display Mode -> Show/Hide Vertices.</b>
+
+\image html vertices_mode.png
+<center><em>Vertices Mode (Show Vertices)</em></center>
+
+\n <b>TUI Command:</b> <em>gg.setVerticesMode(ID, Bool)</em>
+
 Our <b>TUI Scripts</b> provide you with useful examples of 
 \ref tui_change_disp_mode "Changing Display Parameters".
 
index 6c1f7d03b73d8fc86f6bbc4c63ae3f67eb5710f2..5e9e94e7d69859a5e6d7ebfe81ae93187af5e3ba 100644 (file)
@@ -33,6 +33,20 @@ default color for edges, vectors and wires (isolated lines).</li>
 vertices.</li>
 <li><b>Color of isolines</b> - allows to select default color for
 isolines.</li>
+<li><b>Top level color</b> - allows to select default color for objects which 
+were brought to the viewer foreground.</li>
+<li><b>Top level display mode</b> - allows to select default top level display mode between:</li>
+<ul>
+<li><b>Show additional wireframe actor</b> - allows to have the shading actor at its usual 
+place (in the back) and add the additional wireframe actor in the viewer foreground.</li>
+<li><b>Keep current display mode</b> - allows to use current display mode of object.</li>
+<li><b>Wireframe</b> - allows to switch display mode to wireframe mode after 
+"top-level" operation.</li>
+<li><b>Shading</b> - allows to switch display mode to shading mode after 
+"top-level" operation.</li>
+<li><b>Shading With Edges</b> - allows to switch display mode to shading with edges mode after 
+"top-level" operation.</li>
+</ul>
 <li><b>Transparency</b> - allows to define default transparency value.</li>
 <li><b>Deflection coefficient</b> - allows to define default deflection
 coefficient for lines and surfaces. A smaller coefficient provides
index 50b79203064ef34c7ac81faabc61c7d22e630ddb..93ddcc3846ce5dfcfd62ced333dabe2817de5fc5 100644 (file)
@@ -2,34 +2,44 @@
 
 \page import_export_geom_obj_page Importing/exporting geometrical objects
 
-In Geometry module you can import and export geometrical objects
-from/into BREP, IGES, STEP, ACIS and STL files. The mechanisms of import and export
-are implemented via plug-ins, which gives the opportunity to
-expand the range of available formats by adding more plug-ins (for
-example, CATIA 5).
+\tableofcontents
+
+\section io_general General information
 
-The \subpage xao_format_page "import and export of shapes in XAO format" is implemented differently.
+In Geometry module you can import and export geometrical objects
+from/into \b BREP, \b IGES, \b STEP, \b STL, \b XAO, \b VTK (only export)
+and others files. 
+The mechanisms of import and export are implemented via plugins, 
+which gives the opportunity to expand the range of available formats 
+by adding more plugins (for example, CATIA 5 or ACIS).
 
 \note If a plugin supports import of materials associated with shapes, these
 shapes are grouped corresponding to the imported materials. For the moment STEP
 import is the only plugin that supports this feature.
 
-<em>To import geometrical objects from a BREP, IGES, STEP, ACIS or STL file:</em>
+Our <b>TUI Scripts</b> provide you with useful examples of the use of
+\ref tui_import_export_page
+
+\section io_import Import file
+
+<em>To import geometrical objects from a BREP, IGES, STEP or STL file:</em>
 
 \par
-From the \b File menu choose \b Import. In the opening dialog box \b Import
-select the required format of the file for importation and search for
-a *.brep, *.iges, *.step, *.sat or *.stl file.
+From the \b File menu choose <b>Import/<FormatName></b>, where <b><FormatName></b> is a name
+of desirable format. In the <b>Import <FormatName></b> dialog box select the file to import
+and press \b Open. The file will be imported in the module and its contents (geometrical object)
+will be displayed in the <b>Object Browser</b>.
+
+The dialog box to import the file can provide additional parameters.
+
+For example, dialog box for importing files in STL format:
 
 \image html geomimport.png
 
-\par 
-Select the required file and click \b Open. Your file will be imported in
-the module and its contents (geometrical object) will be displayed in
-the <b>Object Browser</b>.
+\par
 
-\note If the selected file is in IGES or STEP format and the length
-is not expressed in meters, it will be asked whether to take or not these
+\note If the selected file is in IGES or STEP format and the model size
+is not expressed in meters, the user will be asked whether to take or not the
 units into account (see the picture below). This feature can be
 helpful if some wrong units have been written to the IGES or STEP file by a
 3rd-party software.
@@ -38,15 +48,6 @@ helpful if some wrong units have been written to the IGES or STEP file by a
 
 \par
 
-\note If the selected file is in ACIS format (the use of this format
-requires licensing) and the file contains names for some shapes, it
-will be suggested to create groups by types (solid, face, edge and
-vertex) for all named shapes:
-
-\image html sat_named_shapes.png
-
-\par
-
 \note It is possible to re-open from the initial file a previously imported shape if
 the file has been changed on disk. For this, select
 <b>Reload From Disk</b> in the context menu of the imported
@@ -55,21 +56,52 @@ as before this operation.
 
 \image html geomimport_reopen.png
 
-\n <em>To export geometrical objects into a BREP, IGES, STEP, ACIS or STL
+\section io_export Export file
+
+\n <em>To export geometrical objects into a BREP, IGES, STEP, STL or VTK
 file:</em>
 
 \par
 Select the object you wish to export, then from the \b File menu choose
-\b Export. In the opening dialog box \b Export define the required format,
-the name and the location of the file for exportation.
+<b>Export/<FormatName></b>, where <b><FormatName></b> is a name of desirable format.
+In the <b>Export <FormatName></b> dialog box define the name and the location 
+of the file to export and press \b Save.
+
+The dialog box to export the file can provide additional advanced parameters.
+
+For example, dialog box for exporting files in STL format:
 
 \image html geomexport.png
 
 \par
-Click \b Save to confirm your exportation.
 
-Our <b>TUI Scripts</b> provide you with useful examples of the use of
-\ref tui_import_export_page
+\section io_xao Import and export of shapes in XAO format
 
-*/
+XAO is a file format which describes a shape with its topology, groups and fields.
+
+<em>To import a shape in the \b XAO format:</em>
+
+\par
+In the \b File menu select <b>Import/XAO</b>.
+
+\image html importxao_dlg.png 
+
+\par
+
+<em>To export a shape in the \b XAO format:</em>
+
+\par
+In the \b File menu select <b>Export/XAO</b>.
 
+\image html exportxao_dlg.png 
+
+In this dialog:
+- Click the arrow button and select in the Object Browser or in the Viewer the <b>Shape</b> to be exported.
+- Input the <b>File name</b> to create a new file or click browse button to save in an existing file.
+- Select the \b Groups of the chosen shape to be exported.
+- Select the \b Fields of the chosen shape to be exported.
+- Press "Apply" or "Apply & Close" button to get the result.
+
+It also possible to export a shape using the TUI Command: <em>geompy.ExportXAO(Shape, FileName, Groups, Fields)</em>
+
+*/
index b3e02ee68531ee823760a7c596c7a6a409c9e384..df3131feb77435d18761ee6e0a7f00a1f6872b36 100644 (file)
@@ -6,7 +6,7 @@
 
 \b Geometry module of SALOME is destined for:
 - \subpage import_export_geom_obj_page "import and export of geometrical models"
-  in IGES, BREP, STEP, ACIS and STL formats;
+  in IGES, BREP, STEP, STL, XAO and VTK formats;
 - \subpage create_geom_obj_page "construction of geometrical objects"
   using a wide range of functions;
 - \subpage view_geom_obj_page "viewing geometrical objects" in the OCC
index b4dc9afa0cd11dbaa6f03a02dd0ed894e560774b..59587b82583a711693e1b02a45cae2ce246f5e64 100644 (file)
@@ -10,7 +10,7 @@ geompy = geomBuilder.New(salome.myStudy)
 gg = salome.ImportComponentGUI("GEOM")
 
 # create ExportXAO object
-exportxao = geompy.MakeExportXAO([value], [value], [value], [value])
+exportxao = geompy.ExportXAO([value], [value], [value], [value])
 
 # add object in the study
 id_exportxao = geompy.addToStudy(exportxao,"ExportXAO")
diff --git a/doc/salome/gui/GEOM/input/xao_format.doc b/doc/salome/gui/GEOM/input/xao_format.doc
deleted file mode 100644 (file)
index 00d8109..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*!
-
-\page xao_format_page Import and export of shapes in XAO format
-
-XAO is a file format which describes a shape with its topology, groups and fields.
-
-To import a shape in the \b XAO format, in the <b>Main Menu</b> select <b>New Entity ->
-Import / Export -> Import XAO. </b> 
-
-To export a shape in the \b XAO format, in the <b>Main Menu</b> select <b>New Entity ->
-Import / Export -> Export XAO. </b>
-
-\image html exportxao_dlg.png 
-
-In this dialog:
-- Click the arrow button and select in the Object Browser or in the Viewer the <b>Shape</b> to be exported.
-- Input the <b>File name</b> to create a new file or click browse button to save in an existing file.
-- Select the \b Groups of the chosen shape to be exported.
-- Select the \b Fields of the chosen shape to be exported.
-- Press "Apply" or "Apply & Close" button to get the result.
-
-It also possible to export a shape using the TUI Command: <em>geompy.MakeExportXAO(Shape, FileName, Groups, Fields)</em>
-
-*/
diff --git a/idl/AdvancedGEOM.idl b/idl/AdvancedGEOM.idl
new file mode 100644 (file)
index 0000000..c82edf1
--- /dev/null
@@ -0,0 +1,479 @@
+// 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, or (at your option) any 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   : AdvancedGEOM.idl
+//  Author : Roman NIKOLAEV
+
+#ifndef __AdvancedGEOM_IDL__
+#define __AdvancedGEOM_IDL__
+
+#include "GEOM_Gen.idl"
+
+module GEOM
+{
+ /*!
+   * \brief Pattern for block division of the disk
+   */
+  enum pattern {
+    /*! Square */
+    SQUARE,
+    /*! Hexagon */
+    HEXAGON
+  };
+
+  /*!
+   *  \brief Interface for advanced modeling functions.
+   */
+  interface IAdvancedOperations : GEOM::GEOM_IOperations
+  {
+    // T-Shape WITHOUT Thickness reduction
+
+    /*!
+     *  \brief Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length).
+     *
+     *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+     *  \return List of GEOM_Object, containing the created shape and propagation groups.
+     */
+    GEOM::ListOfGO MakePipeTShape (in double theR1, in double theW1, in double theL1,
+                                  in double theR2, in double theW2, in double theL2,
+                                  in boolean theHexMesh);
+    /*!
+     *  \brief Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length).
+     *
+     *  The extremities of the main pipe are located on junctions points P1 and P2.
+     *  The extremity of the incident pipe is located on junction point P3.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+     *  \param theP1 1st junction point of main pipe
+     *  \param theP2 2nd junction point of main pipe
+     *  \param theP3 Junction point of incident pipe
+     *  \return List of GEOM_Object, containing the created shape and propagation groups.
+     */
+    GEOM::ListOfGO MakePipeTShapeWithPosition (in double theR1, in double theW1, in double theL1,
+                                              in double theR2, in double theW2, in double theL2,
+                                              in boolean theHexMesh,
+                                              in GEOM::GEOM_Object theP1, in GEOM::GEOM_Object theP2, 
+                                              in GEOM::GEOM_Object theP3);
+    /*!
+     *  \brief Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length). A chamfer is created
+     *  on the junction of the pipes.
+     *  
+     *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *  \param theH Height of the chamfer.
+     *  \param theW Width of the chamfer.
+     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+     *  \return List of GEOM_Object, containing the created shape and propagation groups.
+     */
+    GEOM::ListOfGO MakePipeTShapeChamfer (in double theR1, in double theW1, in double theL1,
+                                         in double theR2, in double theW2, in double theL2,
+                                         in double theH, in double theW, in boolean theHexMesh);
+    /*!
+     *  \brief Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length). 
+     * 
+     *  A chamfer is created on the junction of the pipes.
+     *  The extremities of the main pipe are located on junctions points P1 and P2.
+     *  The extremity of the incident pipe is located on junction point P3.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *  \param theH Height of the chamfer.
+     *  \param theW Width of the chamfer.
+     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+     *  \param theP1 1st junction point of main pipe
+     *  \param theP2 2nd junction point of main pipe
+     *  \param theP3 Junction point of incident pipe
+     *  \return List of GEOM_Object, containing the created shape and propagation groups.
+     */
+    GEOM::ListOfGO MakePipeTShapeChamferWithPosition (in double theR1, in double theW1, in double theL1,
+                                                     in double theR2, in double theW2, in double theL2,
+                                                     in double theH, in double theW, in boolean theHexMesh,
+                                                     in GEOM::GEOM_Object theP1, in GEOM::GEOM_Object theP2, 
+                                                     in GEOM::GEOM_Object theP3);
+    /*!
+     *  \brief Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length). 
+     *
+     *  A fillet is created on the junction of the pipes.
+     *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *  \param theRF Radius of curvature of fillet.
+     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+     *  \return List of GEOM_Object, containing the created shape and propagation groups.
+     */
+    GEOM::ListOfGO MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1,
+                                        in double theR2, in double theW2, in double theL2,
+                                        in double theRF, in boolean theHexMesh);
+    /*!
+     *  \brief Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length).
+     *
+     *  A fillet is created on the junction of the pipes.
+     *  The extremities of the main pipe are located on junctions points P1 and P2.
+     *  The extremity of the incident pipe is located on junction point P3.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *  \param theRF Radius of curvature of fillet.
+     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+     *  \param theP1 1st junction point of main pipe
+     *  \param theP2 2nd junction point of main pipe
+     *  \param theP3 Junction point of incident pipe
+     *  \return List of GEOM_Object, containing the created shape and propagation groups.
+     */
+    GEOM::ListOfGO MakePipeTShapeFilletWithPosition (in double theR1, in double theW1, in double theL1,
+                                                    in double theR2, in double theW2, in double theL2,
+                                                    in double theRF, in boolean theHexMesh,
+                                                    in GEOM::GEOM_Object theP1, in GEOM::GEOM_Object theP2, 
+                                                    in GEOM::GEOM_Object theP3);
+
+    // T-Shape WITH Thickness reduction
+
+    /*!
+     *  \brief Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length).
+     *
+     *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *
+     *  \param theRL Internal radius of left thickness reduction
+     *  \param theWL Width of left thickness reduction
+     *  \param theLtransL Length of left transition part
+     *  \param theLthinL Length of left thin part
+     *
+     *  \param theRR Internal radius of right thickness reduction
+     *  \param theWR Width of right thickness reduction
+     *  \param theLtransR Length of right transition part
+     *  \param theLthinR Length of right thin part
+     *
+     *  \param theRI Internal radius of incident thickness reduction
+     *  \param theWI Width of incident thickness reduction
+     *  \param theLtransI Length of incident transition part
+     *  \param theLthinI Length of incident thin part
+     *
+     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+     *  \return List of GEOM_Object, containing the created shape and propagation groups.
+     */
+    GEOM::ListOfGO MakePipeTShapeTR (in double theR1, in double theW1, in double theL1,
+                                    in double theR2, in double theW2, in double theL2,
+                                    in double theRL, in double theWL, in double theLtransL, in double theLthinL,
+                                    in double theRR, in double theWR, in double theLtransR, in double theLthinR,
+                                    in double theRI, in double theWI, in double theLtransI, in double theLthinI,
+                                    in boolean theHexMesh);
+    /*!
+     *  \brief Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length).
+     *
+     *  The extremities of the main pipe are located on junctions points P1 and P2.
+     *  The extremity of the incident pipe is located on junction point P3.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *
+     *  \param theRL Internal radius of left thickness reduction
+     *  \param theWL Width of left thickness reduction
+     *  \param theLtransL Length of left transition part
+     *  \param theLthinL Length of left thin part
+     *
+     *  \param theRR Internal radius of right thickness reduction
+     *  \param theWR Width of right thickness reduction
+     *  \param theLtransR Length of right transition part
+     *  \param theLthinR Length of right thin part
+     *
+     *  \param theRI Internal radius of incident thickness reduction
+     *  \param theWI Width of incident thickness reduction
+     *  \param theLtransI Length of incident transition part
+     *  \param theLthinI Length of incident thin part
+     *
+     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+     *  \param theP1 1st junction point of main pipe
+     *  \param theP2 2nd junction point of main pipe
+     *  \param theP3 Junction point of incident pipe
+     *  \return List of GEOM_Object, containing the created shape and propagation groups.
+     */
+    GEOM::ListOfGO MakePipeTShapeTRWithPosition(in double theR1, in double theW1, in double theL1,
+                                               in double theR2, in double theW2, in double theL2,
+                                               in double theRL, in double theWL, in double theLtransL, in double theLthinL,
+                                               in double theRR, in double theWR, in double theLtransR, in double theLthinR,
+                                               in double theRI, in double theWI, in double theLtransI, in double theLthinI,
+                                               in boolean theHexMesh,
+                                               in GEOM::GEOM_Object theP1, in GEOM::GEOM_Object theP2, in GEOM::GEOM_Object theP3);
+    /*!
+     *  \brief Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length). A chamfer is created
+     *  on the junction of the pipes.
+     *  
+     *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *
+     *  \param theRL Internal radius of left thickness reduction
+     *  \param theWL Width of left thickness reduction
+     *  \param theLtransL Length of left transition part
+     *  \param theLthinL Length of left thin part
+     *
+     *  \param theRR Internal radius of right thickness reduction
+     *  \param theWR Width of right thickness reduction
+     *  \param theLtransR Length of right transition part
+     *  \param theLthinR Length of right thin part
+     *
+     *  \param theRI Internal radius of incident thickness reduction
+     *  \param theWI Width of incident thickness reduction
+     *  \param theLtransI Length of incident transition part
+     *  \param theLthinI Length of incident thin part
+     *
+     *  \param theH Height of the chamfer.
+     *  \param theW Width of the chamfer.
+     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+     *  \return List of GEOM_Object, containing the created shape and propagation groups.
+     */
+    GEOM::ListOfGO MakePipeTShapeTRChamfer(in double theR1, in double theW1, in double theL1,
+                                          in double theR2, in double theW2, in double theL2,
+                                          in double theRL, in double theWL, in double theLtransL, in double theLthinL,
+                                          in double theRR, in double theWR, in double theLtransR, in double theLthinR,
+                                          in double theRI, in double theWI, in double theLtransI, in double theLthinI,
+                                          in double theH, in double theW, in boolean theHexMesh);
+    /*!
+     *  \brief Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length). 
+     * 
+     *  A chamfer is created on the junction of the pipes.
+     *  The extremities of the main pipe are located on junctions points P1 and P2.
+     *  The extremity of the incident pipe is located on junction point P3.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *
+     *  \param theRL Internal radius of left thickness reduction
+     *  \param theWL Width of left thickness reduction
+     *  \param theLtransL Length of left transition part
+     *  \param theLthinL Length of left thin part
+     *
+     *  \param theRR Internal radius of right thickness reduction
+     *  \param theWR Width of right thickness reduction
+     *  \param theLtransR Length of right transition part
+     *  \param theLthinR Length of right thin part
+     *
+     *  \param theRI Internal radius of incident thickness reduction
+     *  \param theWI Width of incident thickness reduction
+     *  \param theLtransI Length of incident transition part
+     *  \param theLthinI Length of incident thin part
+     *
+     *  \param theH Height of the chamfer.
+     *  \param theW Width of the chamfer.
+     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+     *  \param theP1 1st junction point of main pipe
+     *  \param theP2 2nd junction point of main pipe
+     *  \param theP3 Junction point of incident pipe
+     *  \return List of GEOM_Object, containing the created shape and propagation groups.
+     */
+    GEOM::ListOfGO MakePipeTShapeTRChamferWithPosition(in double theR1, in double theW1, in double theL1,
+                                                      in double theR2, in double theW2, in double theL2,
+                                                      in double theRL, in double theWL, in double theLtransL, in double theLthinL,
+                                                      in double theRR, in double theWR, in double theLtransR, in double theLthinR,
+                                                      in double theRI, in double theWI, in double theLtransI, in double theLthinI,
+                                                      in double theH, in double theW, in boolean theHexMesh,
+                                                      in GEOM::GEOM_Object theP1, in GEOM::GEOM_Object theP2, in GEOM::GEOM_Object theP3);
+    /*!
+     *  \brief Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length). 
+     *
+     *  A fillet is created on the junction of the pipes.
+     *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *
+     *  \param theRL Internal radius of left thickness reduction
+     *  \param theWL Width of left thickness reduction
+     *  \param theLtransL Length of left transition part
+     *  \param theLthinL Length of left thin part
+     *
+     *  \param theRR Internal radius of right thickness reduction
+     *  \param theWR Width of right thickness reduction
+     *  \param theLtransR Length of right transition part
+     *  \param theLthinR Length of right thin part
+     *
+     *  \param theRI Internal radius of incident thickness reduction
+     *  \param theWI Width of incident thickness reduction
+     *  \param theLtransI Length of incident transition part
+     *  \param theLthinI Length of incident thin part
+     *
+     *  \param theRF Radius of curvature of fillet.
+     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+     *  \return List of GEOM_Object, containing the created shape and propagation groups.
+     */
+    GEOM::ListOfGO MakePipeTShapeTRFillet(in double theR1, in double theW1, in double theL1,
+                                         in double theR2, in double theW2, in double theL2,
+                                         in double theRL, in double theWL, in double theLtransL, in double theLthinL,
+                                         in double theRR, in double theWR, in double theLtransR, in double theLthinR,
+                                         in double theRI, in double theWI, in double theLtransI, in double theLthinI,
+                                         in double theRF, in boolean theHexMesh);
+    /*!
+     *  \brief Create a T-shape object with specified caracteristics for the main and
+     *  the incident pipes (radius, width, half-length).
+     *
+     *  A fillet is created on the junction of the pipes.
+     *  The extremities of the main pipe are located on junctions points P1 and P2.
+     *  The extremity of the incident pipe is located on junction point P3.
+     *  \param theR1 Internal radius of main pipe
+     *  \param theW1 Width of main pipe
+     *  \param theL1 Half-length of main pipe
+     *  \param theR2 Internal radius of incident pipe (R2 < R1)
+     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+     *  \param theL2 Half-length of incident pipe
+     *
+     *  \param theRL Internal radius of left thickness reduction
+     *  \param theWL Width of left thickness reduction
+     *  \param theLtransL Length of left transition part
+     *  \param theLthinL Length of left thin part
+     *
+     *  \param theRR Internal radius of right thickness reduction
+     *  \param theWR Width of right thickness reduction
+     *  \param theLtransR Length of right transition part
+     *  \param theLthinR Length of right thin part
+     *
+     *  \param theRI Internal radius of incident thickness reduction
+     *  \param theWI Width of incident thickness reduction
+     *  \param theLtransI Length of incident transition part
+     *  \param theLthinI Length of incident thin part
+     *
+     *  \param theRF Radius of curvature of fillet.
+     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
+     *  \param theP1 1st junction point of main pipe
+     *  \param theP2 2nd junction point of main pipe
+     *  \param theP3 Junction point of incident pipe
+     *  \return List of GEOM_Object, containing the created shape and propagation groups.
+     */
+    GEOM::ListOfGO MakePipeTShapeTRFilletWithPosition(in double theR1, in double theW1, in double theL1,
+                                                     in double theR2, in double theW2, in double theL2,
+                                                     in double theRL, in double theWL, in double theLtransL, in double theLthinL,
+                                                     in double theRR, in double theWR, in double theLtransR, in double theLthinR,
+                                                     in double theRI, in double theWI, in double theLtransI, in double theLthinI,
+                                                     in double theRF, in boolean theHexMesh,
+                                                     in GEOM::GEOM_Object theP1, in GEOM::GEOM_Object theP2, 
+                                                     in GEOM::GEOM_Object theP3);
+
+    /*!
+     *  This function allows to create a disk already divided into blocks. It
+     *  can be use to create divided pipes for later meshing in hexaedra.
+     *  \param theR Radius of the disk
+     *  \param theRatio Relative size of the central square diagonal against the disk diameter
+     *  \param theOrientation Plane on which the disk will be built
+     *  \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
+     *  \return New GEOM_Object, containing the created shape.
+     */
+    GEOM::GEOM_Object MakeDividedDisk (in double theR, 
+                                      in double theRatio, 
+                                      in short theOrientation,
+                                      in GEOM::pattern thePattern);
+
+    /*!
+     *  \brief Create a Disk prepared for hexa meshing with given center, normal vector and radius.
+     *  \param thePnt disk center.
+     *  \param theVec Vector, normal to the plane of the disk.
+     *  \param theR Disk radius.
+     *  \param theRatio Relative size of the central square diagonal against the disk diameter
+     *  \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
+     *  \return New GEOM_Object, containing the created disk.
+     */
+    GEOM::GEOM_Object MakeDividedDiskPntVecR ( in GEOM::GEOM_Object thePnt,
+                                              in GEOM::GEOM_Object theVec,
+                                              in double theR, 
+                                              in double theRatio,
+                                              in GEOM::pattern thePattern);
+
+    /*!
+     *  Builds a cylinder prepared for hexa meshes
+     *  \param theR Radius of the cylinder
+     *  \param theH Height of the cylinder
+     *  \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
+     *  \return New GEOM_Object, containing the created shape.
+     */
+    GEOM::GEOM_Object MakeDividedCylinder (in double theR, 
+                                          in double theH,
+                                          in GEOM::pattern thePattern );
+    /*!
+     *  
+     *  Create a smoothing surface from a set of points
+     *  \param thelPoints list of points. Compounds of ggpoints are accepted as well.
+     *  \param theNbMax maximum number of Bezier pieces in the resulting surface.
+     *  \param theDegMax maximum degree of the resulting BSpline surface
+     *  \param theDMax specifies maximum value of the GeomPlate_PlateG0Criterion criterion.
+     *  \return New GEOM_Object, containing the created shape.
+     */
+    GEOM::GEOM_Object MakeSmoothingSurface (in GEOM::ListOfGO thelPoints,
+                                      in long           theNbMax,
+                                      in long           theDegMax,
+                                      in double         theDMax);
+
+    /*@@ insert new functions before this line @@ do not remove this line @@*/
+  };
+};
+
+#endif // __AdvancedGEOM_IDL__
diff --git a/idl/BREPPlugin.idl b/idl/BREPPlugin.idl
new file mode 100644 (file)
index 0000000..c5e5971
--- /dev/null
@@ -0,0 +1,51 @@
+// Copyright (C) 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, or (at your option) any 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 __BREPPlugin_IDL__
+#define __BREPPlugin_IDL__
+
+#include "GEOM_Gen.idl"
+
+module GEOM
+{
+  /*!
+   *  \brief Interface for BREPPlugin modeling functions.
+   */
+  interface IBREPOperations : GEOM::GEOM_IOperations
+  {
+    /*!
+     *  \brief Export the given shape into a file with given name in BREP format.
+     *
+     *  \param theObject Shape to be stored in the file.
+     *  \param theFileName Name of the file to store the given shape in.
+     */
+    void ExportBREP( in GEOM::GEOM_Object theObject, 
+                     in string            theFileName );
+      
+    /*!
+     *  \brief Import a shape from the BREP file.
+     *
+     *  \param theFileName The file, containing the shape.
+     *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+     */              
+    GEOM::ListOfGO ImportBREP( in string theFileName );
+  };
+};
+
+#endif // __BREPPlugin_IDL__
index bdc32d9cf67f5c78ce1e7f82d5426ecc060ed700..e8ebb6082eb96e5d24d3e35e6336134ca63df8bc 100755 (executable)
@@ -32,9 +32,40 @@ ENDIF(WIN32)
 
 SET(SalomeIDLGEOM_IDLSOURCES
   GEOM_Gen.idl
+)
+
+SET(SalomeIDLGEOMSuperv_IDLSOURCES
   GEOM_Superv.idl
 )
 
+SET(SalomeIDLAdvancedGEOM_IDLSOURCES
+  AdvancedGEOM.idl
+)
+
+SET(SalomeIDLSTLPlugin_IDLSOURCES
+  STLPlugin.idl
+)
+
+SET(SalomeIDLBREPPlugin_IDLSOURCES
+  BREPPlugin.idl
+)
+
+SET(SalomeIDLSTEPPlugin_IDLSOURCES
+  STEPPlugin.idl
+)
+
+SET(SalomeIDLIGESPlugin_IDLSOURCES
+  IGESPlugin.idl
+)
+
+SET(SalomeIDLXAOPlugin_IDLSOURCES
+  XAOPlugin.idl
+)
+
+SET(SalomeIDLVTKPlugin_IDLSOURCES
+  VTKPlugin.idl
+)
+
 SET(IDL_INCLUDE_DIRS
   ${KERNEL_ROOT_DIR}/idl/salome
   ${CMAKE_CURRENT_SOURCE_DIR}
@@ -45,3 +76,35 @@ SET(IDL_LINK_FLAGS
 
 OMNIORB_ADD_MODULE(SalomeIDLGEOM "${SalomeIDLGEOM_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
 INSTALL(TARGETS SalomeIDLGEOM EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+OMNIORB_ADD_MODULE(SalomeIDLAdvancedGEOM "${SalomeIDLAdvancedGEOM_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
+ADD_DEPENDENCIES(SalomeIDLAdvancedGEOM SalomeIDLGEOM)
+INSTALL(TARGETS SalomeIDLAdvancedGEOM EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+OMNIORB_ADD_MODULE(SalomeIDLSTLPlugin "${SalomeIDLSTLPlugin_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
+ADD_DEPENDENCIES(SalomeIDLSTLPlugin SalomeIDLGEOM)
+INSTALL(TARGETS SalomeIDLSTLPlugin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+OMNIORB_ADD_MODULE(SalomeIDLBREPPlugin "${SalomeIDLBREPPlugin_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
+ADD_DEPENDENCIES(SalomeIDLBREPPlugin SalomeIDLGEOM)
+INSTALL(TARGETS SalomeIDLBREPPlugin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+OMNIORB_ADD_MODULE(SalomeIDLSTEPPlugin "${SalomeIDLSTEPPlugin_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
+ADD_DEPENDENCIES(SalomeIDLSTEPPlugin SalomeIDLGEOM)
+INSTALL(TARGETS SalomeIDLSTEPPlugin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+OMNIORB_ADD_MODULE(SalomeIDLIGESPlugin "${SalomeIDLIGESPlugin_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
+ADD_DEPENDENCIES(SalomeIDLIGESPlugin SalomeIDLGEOM)
+INSTALL(TARGETS SalomeIDLIGESPlugin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+OMNIORB_ADD_MODULE(SalomeIDLXAOPlugin "${SalomeIDLXAOPlugin_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
+ADD_DEPENDENCIES(SalomeIDLXAOPlugin SalomeIDLGEOM)
+INSTALL(TARGETS SalomeIDLXAOPlugin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+OMNIORB_ADD_MODULE(SalomeIDLVTKPlugin "${SalomeIDLVTKPlugin_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
+ADD_DEPENDENCIES(SalomeIDLVTKPlugin SalomeIDLGEOM)
+INSTALL(TARGETS SalomeIDLVTKPlugin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+OMNIORB_ADD_MODULE(SalomeIDLGEOMSuperv "${SalomeIDLGEOMSuperv_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
+ADD_DEPENDENCIES(SalomeIDLGEOMSuperv SalomeIDLGEOM SalomeIDLAdvancedGEOM)
+INSTALL(TARGETS SalomeIDLGEOMSuperv EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
index bbaafca6b54fd00f8758ad997505abe4ccae0e1f..076f4fed4ce7cbf245c0547fc5105345d7af742d 100644 (file)
@@ -177,19 +177,6 @@ module GEOM
     Interpolation
   };
 
- /*!
-   * \brief Pattern for block division of the disk
-   *
-   * Used in the functions GEOM_IAdvancedOperations.MakeDividedDisk(), GEOM_ICurvesOperations.MakeDividedDiskPntVecR()
-   */
-  enum pattern {
-    /*! Square */
-    SQUARE,
-    
-    /*! Hexagon */
-    HEXAGON
-  };
-
  /*!
    * \brief Type of field data
    */
@@ -1481,6 +1468,18 @@ module GEOM
      */
     GEOM_Object MakeCylinderRH (in double theR, in double theH);
 
+    /*!
+     *  \brief Create a portion of cylinder with given radius, height and angle at
+     *  the origin of coordinate system.
+     *
+     *  Axis of the cylinder will be collinear to the OZ axis of the coordinate system.
+     *  \param theR Cylinder radius.
+     *  \param theH Cylinder height.
+     *  \param theA Cylinder angle.
+     *  \return New GEOM_Object, containing the created cylinder.
+     */
+    GEOM_Object MakeCylinderRHA (in double theR, in double theH, in double theA);
+
     /*!
      *  \brief Create a cylinder with given base point, axis, radius and height.
      *  \param thePnt Central point of cylinder base.
@@ -1493,6 +1492,20 @@ module GEOM
                                       in GEOM_Object theAxis,
                                       in double      theR,
                                       in double      theH);
+    /*!
+     *  \brief Create a portion of cylinder with given base point, axis, radius, height and angle.
+     *  \param thePnt Central point of cylinder base.
+     *  \param theAxis Cylinder axis.
+     *  \param theR Cylinder radius.
+     *  \param theH Cylinder height.
+     *  \param theA Cylinder angle.
+     *  \return New GEOM_Object, containing the created cylinder.
+     */
+    GEOM_Object MakeCylinderPntVecRHA (in GEOM_Object thePnt,
+                                      in GEOM_Object theAxis,
+                                      in double      theR,
+                                      in double      theH,
+                                      in double      theA);
 
     /*!
      *  \brief Create a cone with given height and radiuses at
@@ -3684,56 +3697,43 @@ module GEOM
     GEOM_Object MakeCopy (in GEOM_Object theOriginal);
 
     /*!
+     *  \brief Deprecated method. Use Export<FormatName> (from the
+     *  corresponding plugin) instead; here <FormatName> is a name of format.
+     *
      *  \brief Export the given shape into a file with given name.
      *  \param theObject Shape to be stored in the file.
      *  \param theFileName Name of the file to store the given shape in.
      *  \param theFormatName Specify format for the shape storage.
-     *         Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
      */
     void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName);
 
     /*!
-     *  \brief Import a shape from the BRep or IGES or STEP file
+     *  \brief Deprecated method. Use Import<FormatName> (from the
+     *  corresponding plugin) instead; here <FormatName> is a name of format.
+     *
+     *  \brief Import a shape from the STL, BREP, IGES or STEP file
      *  (depends on given format) with given name.
      *  \param theFileName The file, containing the shape.
      *  \param theFormatName Specify format for the file reading.
-     *         Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
      *         If format 'IGES_SCALE' is used instead of 'IGES' or
      *            format 'STEP_SCALE' is used instead of 'STEP',
      *            file length unit will be ignored (set to 'meter') and result model will be scaled.
      *  \return List of GEOM_Object, containing the created shape and groups of materials.
      */
-    ListOfGO ImportFile (in string theFileName, in string theFormatName);
+    ListOfGBO ImportFile (in string theFileName, in string theFormatName);
 
     /*!
+     *  \brief Deprecated method. Use ReadValue (from the corresponding plugin) instead.
+     *
      *  \brief Read a value of parameter from a file, containing a shape.
      *  \param theFileName The file, containing the shape.
      *  \param theFormatName Specify format for the file reading.
-     *         Available formats can be obtained with <VAR>ImportTranslators()</VAR> method.
      *  \param theParameterName Specify the parameter. For example, pass "LEN_UNITS"
      *                          to obtain length units, in which the file is written.
      *  \return Value of requested parameter in form of text string.
      */
     string ReadValue (in string theFileName, in string theFormatName, in string theParameterName);
 
-    /*!
-     *  \brief Get the supported import formats and corresponding patterns for File dialog.
-     *  \param theFormats Output. List of formats, available for import.
-     *  \param thePatterns Output. List of file patterns, corresponding to available formats.
-     *  \return Returns available formats and patterns through the arguments.
-     */
-    void ImportTranslators (out string_array theFormats,
-                            out string_array thePatterns);
-
-    /*!
-     *  \brief Get the supported export formats and corresponding patterns for File dialog.
-     *  \param theFormats Output. List of formats, available for export.
-     *  \param thePatterns Output. List of file patterns, corresponding to available formats.
-     *  \return Returns available formats and patterns through the arguments.
-     */
-    void ExportTranslators (out string_array theFormats,
-                            out string_array thePatterns);
-
     /*!
      *  \brief Read a shape from the binary stream, containing its bounding representation (BRep).
      *  \note GEOM_Object::GetShapeStream() method can be used to obtain the shape's BRep stream.
@@ -3772,31 +3772,7 @@ module GEOM
      * \return list of all texture IDs avaiable for the current study
      */
     ListOfLong GetAllTextures();
-
-    /*!
-     *  Export a shape to XAO format
-     *  \param shape The shape to export
-     *  \param groups The list of groups to export
-     *  \param fields The list of fields to export
-     *  \param author The author of the export
-     *  \param fileName The name of the file to export
-     *  \return boolean indicating if export was successful.
-     */
-    boolean ExportXAO(in GEOM_Object shape,
-                     in ListOfGO groups, in ListOfFields fields,
-                     in string author, in string fileName);
     
-    /*!
-     *  Import a shape from XAO format
-     *  \param fileName The name of the file to import
-     *  \param shape The imported shape
-     *  \param subShapes The list of imported subShapes
-     *  \param groups The list of imported groups
-     *  \param fields The list of imported fields
-     *  \return boolean indicating if import was successful.
-     */
-    boolean ImportXAO(in string fileName, out GEOM_Object shape,
-                     out ListOfGO subShapes, out ListOfGO groups, out ListOfFields fields);
   };
 
  // # GEOM_IKindOfShape:
@@ -4365,448 +4341,7 @@ module GEOM
     ListOfLong GetObjects (in GEOM_Object theGroup);
   };
 
- // # GEOM_IAdvancedOperations:
-  /*!
-   *  \brief Interface for advanced modeling functions.
-   */
-  interface GEOM_IAdvancedOperations : GEOM_IOperations
-  {
-    // T-Shape WITHOUT Thickness reduction
-
-    /*!
-     *  \brief Create a T-shape object with specified caracteristics for the main and
-     *  the incident pipes (radius, width, half-length).
-     *
-     *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
-     *  \param theR1 Internal radius of main pipe
-     *  \param theW1 Width of main pipe
-     *  \param theL1 Half-length of main pipe
-     *  \param theR2 Internal radius of incident pipe (R2 < R1)
-     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
-     *  \param theL2 Half-length of incident pipe
-     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
-     *  \return List of GEOM_Object, containing the created shape and propagation groups.
-     */
-    ListOfGO MakePipeTShape (in double theR1, in double theW1, in double theL1,
-                             in double theR2, in double theW2, in double theL2,
-                             in boolean theHexMesh);
-    /*!
-     *  \brief Create a T-shape object with specified caracteristics for the main and
-     *  the incident pipes (radius, width, half-length).
-     *
-     *  The extremities of the main pipe are located on junctions points P1 and P2.
-     *  The extremity of the incident pipe is located on junction point P3.
-     *  \param theR1 Internal radius of main pipe
-     *  \param theW1 Width of main pipe
-     *  \param theL1 Half-length of main pipe
-     *  \param theR2 Internal radius of incident pipe (R2 < R1)
-     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
-     *  \param theL2 Half-length of incident pipe
-     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
-     *  \param theP1 1st junction point of main pipe
-     *  \param theP2 2nd junction point of main pipe
-     *  \param theP3 Junction point of incident pipe
-     *  \return List of GEOM_Object, containing the created shape and propagation groups.
-     */
-    ListOfGO MakePipeTShapeWithPosition (in double theR1, in double theW1, in double theL1,
-                                         in double theR2, in double theW2, in double theL2,
-                                         in boolean theHexMesh,
-                                         in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
-    /*!
-     *  \brief Create a T-shape object with specified caracteristics for the main and
-     *  the incident pipes (radius, width, half-length). A chamfer is created
-     *  on the junction of the pipes.
-     *  
-     *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
-     *  \param theR1 Internal radius of main pipe
-     *  \param theW1 Width of main pipe
-     *  \param theL1 Half-length of main pipe
-     *  \param theR2 Internal radius of incident pipe (R2 < R1)
-     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
-     *  \param theL2 Half-length of incident pipe
-     *  \param theH Height of the chamfer.
-     *  \param theW Width of the chamfer.
-     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
-     *  \return List of GEOM_Object, containing the created shape and propagation groups.
-     */
-    ListOfGO MakePipeTShapeChamfer (in double theR1, in double theW1, in double theL1,
-                                    in double theR2, in double theW2, in double theL2,
-                                    in double theH, in double theW, in boolean theHexMesh);
-    /*!
-     *  \brief Create a T-shape object with specified caracteristics for the main and
-     *  the incident pipes (radius, width, half-length). 
-     * 
-     *  A chamfer is created on the junction of the pipes.
-     *  The extremities of the main pipe are located on junctions points P1 and P2.
-     *  The extremity of the incident pipe is located on junction point P3.
-     *  \param theR1 Internal radius of main pipe
-     *  \param theW1 Width of main pipe
-     *  \param theL1 Half-length of main pipe
-     *  \param theR2 Internal radius of incident pipe (R2 < R1)
-     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
-     *  \param theL2 Half-length of incident pipe
-     *  \param theH Height of the chamfer.
-     *  \param theW Width of the chamfer.
-     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
-     *  \param theP1 1st junction point of main pipe
-     *  \param theP2 2nd junction point of main pipe
-     *  \param theP3 Junction point of incident pipe
-     *  \return List of GEOM_Object, containing the created shape and propagation groups.
-     */
-    ListOfGO MakePipeTShapeChamferWithPosition (in double theR1, in double theW1, in double theL1,
-                                                in double theR2, in double theW2, in double theL2,
-                                                in double theH, in double theW, in boolean theHexMesh,
-                                                in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
-    /*!
-     *  \brief Create a T-shape object with specified caracteristics for the main and
-     *  the incident pipes (radius, width, half-length). 
-     *
-     *  A fillet is created on the junction of the pipes.
-     *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
-     *  \param theR1 Internal radius of main pipe
-     *  \param theW1 Width of main pipe
-     *  \param theL1 Half-length of main pipe
-     *  \param theR2 Internal radius of incident pipe (R2 < R1)
-     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
-     *  \param theL2 Half-length of incident pipe
-     *  \param theRF Radius of curvature of fillet.
-     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
-     *  \return List of GEOM_Object, containing the created shape and propagation groups.
-     */
-    ListOfGO MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1,
-                                   in double theR2, in double theW2, in double theL2,
-                                   in double theRF, in boolean theHexMesh);
-    /*!
-     *  \brief Create a T-shape object with specified caracteristics for the main and
-     *  the incident pipes (radius, width, half-length).
-     *
-     *  A fillet is created on the junction of the pipes.
-     *  The extremities of the main pipe are located on junctions points P1 and P2.
-     *  The extremity of the incident pipe is located on junction point P3.
-     *  \param theR1 Internal radius of main pipe
-     *  \param theW1 Width of main pipe
-     *  \param theL1 Half-length of main pipe
-     *  \param theR2 Internal radius of incident pipe (R2 < R1)
-     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
-     *  \param theL2 Half-length of incident pipe
-     *  \param theRF Radius of curvature of fillet.
-     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
-     *  \param theP1 1st junction point of main pipe
-     *  \param theP2 2nd junction point of main pipe
-     *  \param theP3 Junction point of incident pipe
-     *  \return List of GEOM_Object, containing the created shape and propagation groups.
-     */
-    ListOfGO MakePipeTShapeFilletWithPosition (in double theR1, in double theW1, in double theL1,
-                                               in double theR2, in double theW2, in double theL2,
-                                               in double theRF, in boolean theHexMesh,
-                                               in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
-
-    // T-Shape WITH Thickness reduction
-
-    /*!
-     *  \brief Create a T-shape object with specified caracteristics for the main and
-     *  the incident pipes (radius, width, half-length).
-     *
-     *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
-     *  \param theR1 Internal radius of main pipe
-     *  \param theW1 Width of main pipe
-     *  \param theL1 Half-length of main pipe
-     *  \param theR2 Internal radius of incident pipe (R2 < R1)
-     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
-     *  \param theL2 Half-length of incident pipe
-     *
-     *  \param theRL Internal radius of left thickness reduction
-     *  \param theWL Width of left thickness reduction
-     *  \param theLtransL Length of left transition part
-     *  \param theLthinL Length of left thin part
-     *
-     *  \param theRR Internal radius of right thickness reduction
-     *  \param theWR Width of right thickness reduction
-     *  \param theLtransR Length of right transition part
-     *  \param theLthinR Length of right thin part
-     *
-     *  \param theRI Internal radius of incident thickness reduction
-     *  \param theWI Width of incident thickness reduction
-     *  \param theLtransI Length of incident transition part
-     *  \param theLthinI Length of incident thin part
-     *
-     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
-     *  \return List of GEOM_Object, containing the created shape and propagation groups.
-     */
-    ListOfGO MakePipeTShapeTR (in double theR1, in double theW1, in double theL1,
-                               in double theR2, in double theW2, in double theL2,
-                               in double theRL, in double theWL, in double theLtransL, in double theLthinL,
-                               in double theRR, in double theWR, in double theLtransR, in double theLthinR,
-                               in double theRI, in double theWI, in double theLtransI, in double theLthinI,
-                               in boolean theHexMesh);
-    /*!
-     *  \brief Create a T-shape object with specified caracteristics for the main and
-     *  the incident pipes (radius, width, half-length).
-     *
-     *  The extremities of the main pipe are located on junctions points P1 and P2.
-     *  The extremity of the incident pipe is located on junction point P3.
-     *  \param theR1 Internal radius of main pipe
-     *  \param theW1 Width of main pipe
-     *  \param theL1 Half-length of main pipe
-     *  \param theR2 Internal radius of incident pipe (R2 < R1)
-     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
-     *  \param theL2 Half-length of incident pipe
-     *
-     *  \param theRL Internal radius of left thickness reduction
-     *  \param theWL Width of left thickness reduction
-     *  \param theLtransL Length of left transition part
-     *  \param theLthinL Length of left thin part
-     *
-     *  \param theRR Internal radius of right thickness reduction
-     *  \param theWR Width of right thickness reduction
-     *  \param theLtransR Length of right transition part
-     *  \param theLthinR Length of right thin part
-     *
-     *  \param theRI Internal radius of incident thickness reduction
-     *  \param theWI Width of incident thickness reduction
-     *  \param theLtransI Length of incident transition part
-     *  \param theLthinI Length of incident thin part
-     *
-     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
-     *  \param theP1 1st junction point of main pipe
-     *  \param theP2 2nd junction point of main pipe
-     *  \param theP3 Junction point of incident pipe
-     *  \return List of GEOM_Object, containing the created shape and propagation groups.
-     */
-    ListOfGO MakePipeTShapeTRWithPosition
-                 (in double theR1, in double theW1, in double theL1,
-                  in double theR2, in double theW2, in double theL2,
-                  in double theRL, in double theWL, in double theLtransL, in double theLthinL,
-                  in double theRR, in double theWR, in double theLtransR, in double theLthinR,
-                  in double theRI, in double theWI, in double theLtransI, in double theLthinI,
-                  in boolean theHexMesh,
-                  in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
-    /*!
-     *  \brief Create a T-shape object with specified caracteristics for the main and
-     *  the incident pipes (radius, width, half-length). A chamfer is created
-     *  on the junction of the pipes.
-     *  
-     *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
-     *  \param theR1 Internal radius of main pipe
-     *  \param theW1 Width of main pipe
-     *  \param theL1 Half-length of main pipe
-     *  \param theR2 Internal radius of incident pipe (R2 < R1)
-     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
-     *  \param theL2 Half-length of incident pipe
-     *
-     *  \param theRL Internal radius of left thickness reduction
-     *  \param theWL Width of left thickness reduction
-     *  \param theLtransL Length of left transition part
-     *  \param theLthinL Length of left thin part
-     *
-     *  \param theRR Internal radius of right thickness reduction
-     *  \param theWR Width of right thickness reduction
-     *  \param theLtransR Length of right transition part
-     *  \param theLthinR Length of right thin part
-     *
-     *  \param theRI Internal radius of incident thickness reduction
-     *  \param theWI Width of incident thickness reduction
-     *  \param theLtransI Length of incident transition part
-     *  \param theLthinI Length of incident thin part
-     *
-     *  \param theH Height of the chamfer.
-     *  \param theW Width of the chamfer.
-     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
-     *  \return List of GEOM_Object, containing the created shape and propagation groups.
-     */
-    ListOfGO MakePipeTShapeTRChamfer
-                 (in double theR1, in double theW1, in double theL1,
-                  in double theR2, in double theW2, in double theL2,
-                  in double theRL, in double theWL, in double theLtransL, in double theLthinL,
-                  in double theRR, in double theWR, in double theLtransR, in double theLthinR,
-                  in double theRI, in double theWI, in double theLtransI, in double theLthinI,
-                  in double theH, in double theW, in boolean theHexMesh);
-    /*!
-     *  \brief Create a T-shape object with specified caracteristics for the main and
-     *  the incident pipes (radius, width, half-length). 
-     * 
-     *  A chamfer is created on the junction of the pipes.
-     *  The extremities of the main pipe are located on junctions points P1 and P2.
-     *  The extremity of the incident pipe is located on junction point P3.
-     *  \param theR1 Internal radius of main pipe
-     *  \param theW1 Width of main pipe
-     *  \param theL1 Half-length of main pipe
-     *  \param theR2 Internal radius of incident pipe (R2 < R1)
-     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
-     *  \param theL2 Half-length of incident pipe
-     *
-     *  \param theRL Internal radius of left thickness reduction
-     *  \param theWL Width of left thickness reduction
-     *  \param theLtransL Length of left transition part
-     *  \param theLthinL Length of left thin part
-     *
-     *  \param theRR Internal radius of right thickness reduction
-     *  \param theWR Width of right thickness reduction
-     *  \param theLtransR Length of right transition part
-     *  \param theLthinR Length of right thin part
-     *
-     *  \param theRI Internal radius of incident thickness reduction
-     *  \param theWI Width of incident thickness reduction
-     *  \param theLtransI Length of incident transition part
-     *  \param theLthinI Length of incident thin part
-     *
-     *  \param theH Height of the chamfer.
-     *  \param theW Width of the chamfer.
-     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
-     *  \param theP1 1st junction point of main pipe
-     *  \param theP2 2nd junction point of main pipe
-     *  \param theP3 Junction point of incident pipe
-     *  \return List of GEOM_Object, containing the created shape and propagation groups.
-     */
-    ListOfGO MakePipeTShapeTRChamferWithPosition
-                 (in double theR1, in double theW1, in double theL1,
-                  in double theR2, in double theW2, in double theL2,
-                  in double theRL, in double theWL, in double theLtransL, in double theLthinL,
-                  in double theRR, in double theWR, in double theLtransR, in double theLthinR,
-                  in double theRI, in double theWI, in double theLtransI, in double theLthinI,
-                  in double theH, in double theW, in boolean theHexMesh,
-                  in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
-    /*!
-     *  \brief Create a T-shape object with specified caracteristics for the main and
-     *  the incident pipes (radius, width, half-length). 
-     *
-     *  A fillet is created on the junction of the pipes.
-     *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
-     *  \param theR1 Internal radius of main pipe
-     *  \param theW1 Width of main pipe
-     *  \param theL1 Half-length of main pipe
-     *  \param theR2 Internal radius of incident pipe (R2 < R1)
-     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
-     *  \param theL2 Half-length of incident pipe
-     *
-     *  \param theRL Internal radius of left thickness reduction
-     *  \param theWL Width of left thickness reduction
-     *  \param theLtransL Length of left transition part
-     *  \param theLthinL Length of left thin part
-     *
-     *  \param theRR Internal radius of right thickness reduction
-     *  \param theWR Width of right thickness reduction
-     *  \param theLtransR Length of right transition part
-     *  \param theLthinR Length of right thin part
-     *
-     *  \param theRI Internal radius of incident thickness reduction
-     *  \param theWI Width of incident thickness reduction
-     *  \param theLtransI Length of incident transition part
-     *  \param theLthinI Length of incident thin part
-     *
-     *  \param theRF Radius of curvature of fillet.
-     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
-     *  \return List of GEOM_Object, containing the created shape and propagation groups.
-     */
-    ListOfGO MakePipeTShapeTRFillet
-                 (in double theR1, in double theW1, in double theL1,
-                  in double theR2, in double theW2, in double theL2,
-                  in double theRL, in double theWL, in double theLtransL, in double theLthinL,
-                  in double theRR, in double theWR, in double theLtransR, in double theLthinR,
-                  in double theRI, in double theWI, in double theLtransI, in double theLthinI,
-                  in double theRF, in boolean theHexMesh);
-    /*!
-     *  \brief Create a T-shape object with specified caracteristics for the main and
-     *  the incident pipes (radius, width, half-length).
-     *
-     *  A fillet is created on the junction of the pipes.
-     *  The extremities of the main pipe are located on junctions points P1 and P2.
-     *  The extremity of the incident pipe is located on junction point P3.
-     *  \param theR1 Internal radius of main pipe
-     *  \param theW1 Width of main pipe
-     *  \param theL1 Half-length of main pipe
-     *  \param theR2 Internal radius of incident pipe (R2 < R1)
-     *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
-     *  \param theL2 Half-length of incident pipe
-     *
-     *  \param theRL Internal radius of left thickness reduction
-     *  \param theWL Width of left thickness reduction
-     *  \param theLtransL Length of left transition part
-     *  \param theLthinL Length of left thin part
-     *
-     *  \param theRR Internal radius of right thickness reduction
-     *  \param theWR Width of right thickness reduction
-     *  \param theLtransR Length of right transition part
-     *  \param theLthinR Length of right thin part
-     *
-     *  \param theRI Internal radius of incident thickness reduction
-     *  \param theWI Width of incident thickness reduction
-     *  \param theLtransI Length of incident transition part
-     *  \param theLthinI Length of incident thin part
-     *
-     *  \param theRF Radius of curvature of fillet.
-     *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
-     *  \param theP1 1st junction point of main pipe
-     *  \param theP2 2nd junction point of main pipe
-     *  \param theP3 Junction point of incident pipe
-     *  \return List of GEOM_Object, containing the created shape and propagation groups.
-     */
-    ListOfGO MakePipeTShapeTRFilletWithPosition
-                 (in double theR1, in double theW1, in double theL1,
-                  in double theR2, in double theW2, in double theL2,
-                  in double theRL, in double theWL, in double theLtransL, in double theLthinL,
-                  in double theRR, in double theWR, in double theLtransR, in double theLthinR,
-                  in double theRI, in double theWI, in double theLtransI, in double theLthinI,
-                  in double theRF, in boolean theHexMesh,
-                  in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
-
-    /*!
-     *  This function allows to create a disk already divided into blocks. It
-     *  can be use to create divided pipes for later meshing in hexaedra.
-     *  \param theR Radius of the disk
-     *  \param theRatio Relative size of the central square diagonal against the disk diameter
-     *  \param theOrientation Plane on which the disk will be built
-     *  \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
-     *  \return New GEOM_Object, containing the created shape.
-     */
-    GEOM_Object MakeDividedDisk (in double theR, 
-                                 in double theRatio, 
-                                 in short theOrientation,
-                                 in pattern thePattern);
-
-    /*!
-     *  \brief Create a Disk prepared for hexa meshing with given center, normal vector and radius.
-     *  \param thePnt disk center.
-     *  \param theVec Vector, normal to the plane of the disk.
-     *  \param theR Disk radius.
-     *  \param theRatio Relative size of the central square diagonal against the disk diameter
-     *  \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
-     *  \return New GEOM_Object, containing the created disk.
-     */
-    GEOM_Object MakeDividedDiskPntVecR ( in GEOM_Object thePnt,
-                                         in GEOM_Object theVec,
-                                         in double theR, 
-                                         in double theRatio,
-                                         in pattern thePattern);
-
-    /*!
-     *  Builds a cylinder prepared for hexa meshes
-     *  \param theR Radius of the cylinder
-     *  \param theH Height of the cylinder
-     *  \param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
-     *  \return New GEOM_Object, containing the created shape.
-     */
-    GEOM_Object MakeDividedCylinder (in double theR, 
-                                     in double theH,
-                                     in pattern thePattern );
-    /*!
-     *  
-     *  Create a smoothing surface from a set of points
-     *  \param thelPoints list of points. Compounds of points are accepted as well.
-     *  \param theNbMax maximum number of Bezier pieces in the resulting surface.
-     *  \param theDegMax maximum degree of the resulting BSpline surface
-     *  \param theDMax specifies maximum value of the GeomPlate_PlateG0Criterion criterion.
-     *  \return New GEOM_Object, containing the created shape.
-     */
-    GEOM_Object MakeSmoothingSurface (in ListOfGO thelPoints,
-                                      in long     theNbMax,
-                                      in long     theDegMax,
-                                      in double   theDMax);
-
-    /*@@ insert new functions before this line @@ do not remove this line @@*/
-  };
-
- // # GEOM_IFieldOperations:
+  // # GEOM_IFieldOperations:
   /*!
    *  \brief Interface for field operation.
    */
index 07f7fe92fe7e74af9614f9fd5d46648644e3c182..3bf0fea3f9cdd9dfba6259fbe70ea820bfc4bb35 100644 (file)
@@ -26,6 +26,7 @@
 #define __GEOM_SUPERV__
 
 #include "GEOM_Gen.idl"
+#include "AdvancedGEOM.idl"
 
 module GEOM
 {
@@ -161,6 +162,14 @@ module GEOM
                                       in double      theHeight) ;
     GEOM_Object MakeCylinderRH (in double theR,
                                 in double theH) ;
+    GEOM_Object MakeCylinderPntVecRHA (in GEOM_Object thePnt,
+                                      in GEOM_Object theAxis,
+                                      in double      theRadius,
+                                      in double      theHeight,
+                                      in double      theAngle) ;
+    GEOM_Object MakeCylinderRHA (in double theR,
+                                in double theH,
+                                in double theA) ;
     GEOM_Object MakeSphere (in double theX,
                             in double theY,
                             in double theZ,
@@ -264,15 +273,6 @@ module GEOM
     GEOM_Object MakeCopy (in GEOM_Object theOriginal) ;
     void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName) ;
     GEOM_Object ImportFile (in string theFileName, in string theFormatName) ;
-    void ImportTranslators (out string_array theFormats,
-                            out string_array thePatterns) ;
-    void ExportTranslators (out string_array theFormats,
-                            out string_array thePatterns) ;
-    boolean ExportXAO(in GEOM_Object shape,
-                      in ListOfGO groups, in ListOfFields fields,
-                      in string author, in string fileName);
-    boolean ImportXAO(in string fileName, out GEOM_Object shape,
-                      out ListOfGO subShapes, out ListOfGO groups, out ListOfFields fields);
 
     //-----------------------------------------------------------//
     // TransformOperations                                       //
@@ -635,6 +635,46 @@ module GEOM
                                      in pattern thePattern);
 
     GEOM_Object MakeSmoothingSurface (in GEOM_List thelPoints);
+    
+    //-----------------------------------------------------------//
+    // Import/Export Operations                                  //
+    //-----------------------------------------------------------//
+    void        ExportSTL( in GEOM::GEOM_Object theObject, 
+                           in string            theFileName,
+                           in boolean           theIsASCII,    
+                           in double            theDeflection,
+                           in boolean           theIsRelative );
+    GEOM_Object ImportSTL( in string theFileName );
+    
+    void        ExportBREP( in GEOM::GEOM_Object theObject, 
+                            in string            theFileName );
+    GEOM_Object ImportBREP( in string theFileName );
+    
+    void        ExportSTEP( in GEOM::GEOM_Object theObject, 
+                            in string            theFileName );
+    GEOM_Object ImportSTEP( in string  theFileName,
+                            in boolean theIsIgnoreUnits );
+                            
+    void        ExportIGES( in GEOM::GEOM_Object theObject, 
+                            in string            theFileName,
+                            in string            theVersion );
+    GEOM_Object ImportIGES( in string  theFileName,
+                            in boolean theIsIgnoreUnits );
+                            
+    boolean     ExportXAO( in GEOM_Object shape,
+                           in ListOfGO groups, 
+                           in ListOfFields fields,
+                           in string author, 
+                           in string fileName );
+    boolean     ImportXAO( in string fileName, 
+                           out GEOM_Object shape,
+                           out ListOfGO subShapes, 
+                           out ListOfGO groups, 
+                           out ListOfFields fields );
+
+    void        ExportVTK( in GEOM::GEOM_Object theObject, 
+                           in string            theFileName,
+                           in double            theDeflection );
 
     /*@@ insert new functions before this line @@ do not remove this line @@*/
  };
diff --git a/idl/IGESPlugin.idl b/idl/IGESPlugin.idl
new file mode 100644 (file)
index 0000000..e7d858b
--- /dev/null
@@ -0,0 +1,67 @@
+// Copyright (C) 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, or (at your option) any 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 __IGESPlugin_IDL__
+#define __IGESPlugin_IDL__
+
+#include "GEOM_Gen.idl"
+
+module GEOM
+{
+  /*!
+   *  \brief Interface for IGESPlugin modeling functions.
+   */
+  interface IIGESOperations : GEOM::GEOM_IOperations
+  {
+    /*!
+     *  \brief Export the given shape into a file with given name in IGES format.
+     *
+     *  \param theObject Shape to be stored in the file.
+     *  \param theFileName Name of the file to store the given shape in.
+     *  \param theVersion Version of IGES format which defines, whether to write 
+     *         only faces (5.1 IGES format) or shells and solids also (5.3 IGES format).
+     */
+    void ExportIGES( in GEOM::GEOM_Object theObject, 
+                     in string            theFileName,
+                     in string            theVersion );
+      
+    /*!
+     *  \brief Import a shape from the IGES file.
+     *
+     *  \param theFileName The file, containing the shape.
+     *  \param theIsIgnoreUnits If True, file length units will be ignored (set to 'meter')
+     *                          and result model will be scaled, if its units are not meters.
+     *                          If False (default), file length units will be taken into account.
+     *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+     */              
+    GEOM::ListOfGO ImportIGES( in string  theFileName,
+                               in boolean theIsIgnoreUnits );
+                               
+    /*!
+     *  \brief Read a value of parameter from a file, containing a shape.
+     *  \param theFileName The file, containing the shape.
+     *  \param theParameterName Specify the parameter. For example, pass "LEN_UNITS"
+     *                          to obtain length units, in which the file is written.
+     *  \return Value of requested parameter in form of text string.
+     */
+    string ReadValue( in string theFileName, in string theParameterName);
+  };
+};
+
+#endif // __IGESPlugin_IDL__
diff --git a/idl/STEPPlugin.idl b/idl/STEPPlugin.idl
new file mode 100644 (file)
index 0000000..8021e66
--- /dev/null
@@ -0,0 +1,66 @@
+// Copyright (C) 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, or (at your option) any 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 __STEPPlugin_IDL__
+#define __STEPPlugin_IDL__
+
+#include "GEOM_Gen.idl"
+
+module GEOM
+{
+  /*!
+   *  \brief Interface for STEPPlugin modeling functions.
+   */
+  interface ISTEPOperations : GEOM::GEOM_IOperations
+  {
+    /*!
+     *  \brief Export the given shape into a file with given name in STEP format.
+     *
+     *  \param theObject Shape to be stored in the file.
+     *  \param theFileName Name of the file to store the given shape in.
+     */
+    void ExportSTEP( in GEOM::GEOM_Object theObject, 
+                     in string            theFileName );
+      
+    /*!
+     *  \brief Import a shape from the STEP file.
+     *
+     *  \param theFileName The file, containing the shape.
+     *  \param theIsIgnoreUnits If True, file length units will be ignored (set to 'meter')
+     *                          and result model will be scaled, if its units are not meters.
+     *                          If False (default), file length units will be taken into account.
+     *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+     */              
+    GEOM::ListOfGO ImportSTEP( in string  theFileName,
+                               in boolean theIsIgnoreUnits );
+                               
+    /*!
+     *  \brief Read a value of parameter from a file, containing a shape.
+     *  \param theFileName The file, containing the shape.
+     *  \param theParameterName Specify the parameter. For example, pass "LEN_UNITS"
+     *                          to obtain length units, in which the file is written.
+     *  \return Value of requested parameter in form of text string.
+     */
+    string ReadValue( in string theFileName, 
+                      in string theParameterName );
+    
+  };
+};
+
+#endif // __STEPPlugin_IDL__
diff --git a/idl/STLPlugin.idl b/idl/STLPlugin.idl
new file mode 100644 (file)
index 0000000..7c8f825
--- /dev/null
@@ -0,0 +1,59 @@
+// Copyright (C) 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, or (at your option) any 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 __STLPlugin_IDL__
+#define __STLPlugin_IDL__
+
+#include "GEOM_Gen.idl"
+
+module GEOM
+{
+  /*!
+   *  \brief Interface for STLPlugin modeling functions.
+   */
+  interface ISTLOperations : GEOM::GEOM_IOperations
+  {
+    /*!
+     *  \brief Export the given shape into a file with given name in STL format.
+     *
+     *  \param theObject Shape to be stored in the file.
+     *  \param theFileName Name of the file to store the given shape in.
+     *  \param theIsASCII The format of the exported file (ASCII or Binary).
+     *  \param theDeflection Deflection of the given shape.
+     *  \param theIsRelative Mode for writing the file. If True (default value), the 
+     *         deflection is calculated from the relative size of the 
+     *         shape; if False, the user defined deflection is used.
+     */
+    void ExportSTL( in GEOM::GEOM_Object theObject, 
+                    in string            theFileName,
+                    in boolean           theIsASCII,
+                    in double            theDeflection,
+                    in boolean           theIsRelative );
+      
+    /*!
+     *  \brief Import a shape from the STL file.
+     *
+     *  \param theFileName The file, containing the shape.
+     *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+     */              
+    GEOM::ListOfGO ImportSTL( in string theFileName );
+  };
+};
+
+#endif // __STLPlugin_IDL__
diff --git a/idl/VTKPlugin.idl b/idl/VTKPlugin.idl
new file mode 100644 (file)
index 0000000..2b5aa47
--- /dev/null
@@ -0,0 +1,45 @@
+// Copyright (C) 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, or (at your option) any 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 __VTKPlugin_IDL__
+#define __VTKPlugin_IDL__
+
+#include "GEOM_Gen.idl"
+
+module GEOM
+{
+  /*!
+   *  \brief Interface for VTKPlugin modeling functions.
+   */
+  interface IVTKOperations : GEOM::GEOM_IOperations
+  {
+    /*!
+     *  \brief Export the given shape into a file with given name in VTK format.
+     *
+     *  \param theObject Shape to be stored in the file.
+     *  \param theFileName Name of the file to store the given shape in.
+     *  \param theDeflection Deflection of the given shape.
+     */
+    void ExportVTK( in GEOM::GEOM_Object theObject, 
+                    in string            theFileName,
+                    in double            theDeflection );
+  };
+};
+
+#endif // __VTKPlugin_IDL__
diff --git a/idl/XAOPlugin.idl b/idl/XAOPlugin.idl
new file mode 100644 (file)
index 0000000..c382fd3
--- /dev/null
@@ -0,0 +1,64 @@
+// Copyright (C) 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, or (at your option) any 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 __XAOPlugin_IDL__
+#define __XAOPlugin_IDL__
+
+#include "GEOM_Gen.idl"
+
+module GEOM
+{
+  /*!
+   *  \brief Interface for XAOPlugin modeling functions.
+   */
+  interface IXAOOperations : GEOM::GEOM_IOperations
+  {
+    /*!
+     *  Export a shape to XAO format
+     *  \param shape The shape to export
+     *  \param groups The list of groups to export
+     *  \param fields The list of fields to export
+     *  \param author The author of the export
+     *  \param fileName The name of the file to export
+     *  \return boolean indicating if export was successful.
+     */
+    boolean ExportXAO( in GEOM::GEOM_Object shape,
+                       in GEOM::ListOfGO groups, 
+                       in GEOM::ListOfFields fields,
+                       in string author, 
+                       in string fileName );
+    
+    /*!
+     *  Import a shape from XAO format
+     *  \param fileName The name of the file to import
+     *  \param shape The imported shape
+     *  \param subShapes The list of imported subShapes
+     *  \param groups The list of imported groups
+     *  \param fields The list of imported fields
+     *  \return boolean indicating if import was successful.
+     */
+    boolean ImportXAO( in string fileName, 
+                       out GEOM::GEOM_Object shape,
+                       out GEOM::ListOfGO subShapes, 
+                       out GEOM::ListOfGO groups, 
+                       out GEOM::ListOfFields fields );
+  };
+};
+
+#endif // __XAOPlugin_IDL__
diff --git a/resources/AdvancedGEOM.xml b/resources/AdvancedGEOM.xml
new file mode 100644 (file)
index 0000000..1d6fda9
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version='1.0' encoding='us-ascii'?>
+<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
+<!--
+  Copyright (C) 2007-2014  CEA/DEN, EDF R&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
+
+-->
+
+<!--  GUI customization for GEOM component  -->
+
+<geom-plugins>
+
+  <geom-plugin name="AdvancedGEOM"
+               server-lib="AdvancedEngine"
+               gui-lib="AdvancedGUI">
+    <actions>
+      <action label="TShape_Basic"
+              icon="pipetshape.png"
+              menu="NEW_ENTITY/PRIMITIVES/PIPETSHAPE"
+              tooltip="PRIMITIVES/PIPETSHAPE"
+              status-bar="PIPETSHAPE">
+      </action>
+      <action label="DividedDisk"
+              icon="divided_disk.png"
+              menu="NEW_ENTITY/BLOCKS/DIVIDEDDISK"
+              tooltip="BLOCKS/DIVIDEDDISK"
+              status-bar="DIVIDEDDISK">
+      </action>
+      <action label="DividedCylinder"
+              icon="dividedcylinder.png"
+              menu="NEW_ENTITY/BLOCKS/DIVIDEDCYLINDER"
+              tooltip="BLOCKS/DIVIDEDCYLINDER"
+              status-bar="DIVIDEDCYLINDER">
+      </action>
+      <action label="SmoothingSurface"
+              icon="smoothingsurface.png"
+              menu="NEW_ENTITY/ADVANCED/SMOOTHINGSURFACE"
+              tooltip="ADVANCED/SMOOTHINGSURFACE"
+              status-bar="SMOOTHINGSURFACE">
+      </action>
+    </actions>
+  </geom-plugin>
+
+</geom-plugins>
diff --git a/resources/BREPPlugin.xml b/resources/BREPPlugin.xml
new file mode 100644 (file)
index 0000000..5b7c971
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version='1.0' encoding='us-ascii'?>
+<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
+<!--
+  Copyright (C) 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, or (at your option) any 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
+
+-->
+
+<!--  GUI customization for GEOM component  -->
+
+<geom-plugins>
+
+  <geom-plugin name="BREPPlugin"
+               server-lib="BREPPluginEngine"
+               gui-lib="BREPPluginGUI">
+    <actions>
+      <action label="Import_BREP"
+              menu="FILE/IMPORT:10/IMPORTBREP"
+              status-bar="IMPORTBREP"
+             accel="Ctrl+I">
+      </action>
+      <action label="Export_BREP"
+              menu="FILE/EXPORT:10/EXPORTBREP"
+              status-bar="EXPORTBREP"
+             accel="Ctrl+E">
+      </action>
+    </actions>
+  </geom-plugin>
+
+</geom-plugins>
index 6097008d8ee2a47b8a81e5e4aaeb881c21d7e724..1fa4e9d9dcab40900dd344f3d5a0ce551ba0ed3b 100755 (executable)
 
 # These files are data, module or lib files
 SET( _res_files
-  GEOMActions.xml
+  AdvancedGEOM.xml
+  STLPlugin.xml
+  BREPPlugin.xml
+  STEPPlugin.xml
+  IGESPlugin.xml
+  XAOPlugin.xml
+  VTKPlugin.xml
   GEOM_en.xml
   GEOM_fr.xml
   GEOM.config
   GEOMDS_Resources
-  ImportExport
   ShHealing
   3dsketch.png
   isoline.png
diff --git a/resources/GEOMActions.xml b/resources/GEOMActions.xml
deleted file mode 100644 (file)
index 7dc5ade..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version='1.0' encoding='us-ascii'?>
-<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
-<!--
-  Copyright (C) 2007-2014  CEA/DEN, EDF R&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
-
--->
-
-<!--  GUI customization for GEOM component  -->
-
-<geom-plugins>
-
-  <geom-plugin name="AdvancedGUI"
-               server-lib="AdvancedEngine"
-               gui-lib="AdvancedGUI">
-    <actions>
-      <action label="TShape_Basic"
-              icon="pipetshape.png"
-              menu="NEW_ENTITY/PRIMITIVES/PIPETSHAPE"
-              tooltip="PRIMITIVES/PIPETSHAPE"
-              status-bar="PIPETSHAPE">
-      </action>
-      <action label="DividedDisk"
-              icon="divided_disk.png"
-              menu="NEW_ENTITY/BLOCKS/DIVIDEDDISK"
-              tooltip="BLOCKS/DIVIDEDDISK"
-              status-bar="DIVIDEDDISK">
-      </action>
-      <action label="DividedCylinder"
-              icon="dividedcylinder.png"
-              menu="NEW_ENTITY/BLOCKS/DIVIDEDCYLINDER"
-              tooltip="BLOCKS/DIVIDEDCYLINDER"
-              status-bar="DIVIDEDCYLINDER">
-      </action>
-      <action label="SmoothingSurface"
-              icon="smoothingsurface.png"
-              menu="NEW_ENTITY/ADVANCED/SMOOTHINGSURFACE"
-              tooltip="ADVANCED/SMOOTHINGSURFACE"
-              status-bar="SMOOTHINGSURFACE">
-      </action>
-    </actions>
-  </geom-plugin>
-
-</geom-plugins>
index e9d665cd23c53d1ebe3cdcfac86fc4eff53f0677..bb07e4de7bc0efa9f4374a75348db0da0a32c8e3 100644 (file)
 <!-- XML component catalog -->
 <begin-catalog>
 
-<!-- Path prefix information -->
+  <!-- Path prefix information -->
+  <path-prefix-list>
+  </path-prefix-list>
 
-<path-prefix-list>
-</path-prefix-list>
+  <!-- Geom data types  -->
+  <type-list>
+    <!-- From GEOM_Gen.idl -->
+    <objref name="GEOM/GEOM_Gen" id="IDL:GEOM/GEOM_Gen:1.0" />
+    <objref name="GEOM/GEOM_BaseObject" id="IDL:GEOM/GEOM_BaseObject:1.0" />
+    <objref name="GEOM/GEOM_Object" id="IDL:GEOM/GEOM_Object:1.0">
+      <base>GEOM/GEOM_BaseObject</base>
+    </objref>
+    <objref name="GEOM/GEOM_Field" id="IDL:GEOM/GEOM_Field:1.0">
+      <base>GEOM/GEOM_BaseObject</base>
+    </objref>
+    <objref name="GEOM/GEOM_FieldStep" id="IDL:GEOM/GEOM_FieldStep:1.0">
+      <base>GEOM/GEOM_BaseObject</base>
+    </objref>
+    <objref name="GEOM/GEOM_BoolFieldStep" id="IDL:GEOM/GEOM_BoolFieldStep:1.0">
+      <base>GEOM/GEOM_FieldStep</base>
+    </objref>
+    <objref name="GEOM/GEOM_IntFieldStep" id="IDL:GEOM/GEOM_IntFieldStep:1.0">
+      <base>GEOM/GEOM_FieldStep</base>
+    </objref>
+    <objref name="GEOM/GEOM_DoubleFieldStep" id="IDL:GEOM/GEOM_DoubleFieldStep:1.0">
+      <base>GEOM/GEOM_FieldStep</base>
+    </objref>
+    <objref name="GEOM/GEOM_StringFieldStep" id="IDL:GEOM/GEOM_StringFieldStep:1.0">
+      <base>GEOM/GEOM_FieldStep</base>
+    </objref>
+    <objref name="GEOM/GEOM_IOperations" id="IDL:GEOM/GEOM_IOperations:1.0" />
+    <objref name="GEOM/GEOM_IBasicOperations" id="IDL:GEOM/GEOM_IBasicOperations:1.0">
+      <base>GEOM/GEOM_IOperations</base>
+    </objref>
+    <objref name="GEOM/GEOM_ITransformOperations" id="IDL:GEOM/GEOM_ITransformOperations:1.0">
+      <base>GEOM/GEOM_IOperations</base>
+    </objref>
+    <objref name="GEOM/GEOM_I3DPrimOperations" id="IDL:GEOM/GEOM_I3DPrimOperations:1.0">
+      <base>GEOM/GEOM_IOperations</base>
+    </objref>
+    <objref name="GEOM/GEOM_IShapesOperations" id="IDL:GEOM/GEOM_IShapesOperations:1.0">
+      <base>GEOM/GEOM_IOperations</base>
+    </objref>
+    <objref name="GEOM/GEOM_IBlocksOperations" id="IDL:GEOM/GEOM_IBlocksOperations:1.0">
+      <base>GEOM/GEOM_IOperations</base>
+    </objref>
+    <objref name="GEOM/GEOM_IBooleanOperations" id="IDL:GEOM/GEOM_IBooleanOperations:1.0">
+      <base>GEOM/GEOM_IOperations</base>
+    </objref>
+    <objref name="GEOM/GEOM_ICurvesOperations" id="IDL:GEOM/GEOM_ICurvesOperations:1.0">
+      <base>GEOM/GEOM_IOperations</base>
+    </objref>
+    <objref name="GEOM/GEOM_ILocalOperations" id="IDL:GEOM/GEOM_ILocalOperations:1.0">
+      <base>GEOM/GEOM_IOperations</base>
+    </objref>
+    <objref name="GEOM/GEOM_IHealingOperations" id="IDL:GEOM/GEOM_IHealingOperations:1.0">
+      <base>GEOM/GEOM_IOperations</base>
+    </objref>
+    <objref name="GEOM/GEOM_IInsertOperations" id="IDL:GEOM/GEOM_IInsertOperations:1.0">
+      <base>GEOM/GEOM_IOperations</base>
+    </objref>
+    <objref name="GEOM/GEOM_IMeasureOperations" id="IDL:GEOM/GEOM_IMeasureOperations:1.0">
+      <base>GEOM/GEOM_IOperations</base>
+    </objref>
+    <objref name="GEOM/GEOM_IGroupOperations" id="IDL:GEOM/GEOM_IGroupOperations:1.0">
+      <base>GEOM/GEOM_IOperations</base>
+    </objref>
+    <objref name="GEOM/GEOM_IFieldOperations" id="IDL:GEOM/GEOM_IFieldOperations:1.0">
+      <base>GEOM/GEOM_IOperations</base>
+    </objref>
+    <objref name="GEOM/GEOM_IKindOfShape" id="IDL:GEOM/GEOM_IKindOfShape:1.0" />
+    <type name="GEOM/shape_type" kind="int" />
+    <type name="GEOM/marker_type" kind="int" />
+    <type name="GEOM/marker_size" kind="int" />
+    <type name="GEOM/shape_state" kind="int" />
+    <type name="GEOM/find_shape_method" kind="int" />
+    <type name="GEOM/filling_oper_method" kind="int" />
+    <type name="GEOM/curve_type" kind="int" />
+    <type name="GEOM/field_data_type" kind="int" />
+    <struct name="GEOM/Parameter">
+      <member name="name" type="string" />
+      <member name="value" type="string" />
+    </struct>
+    <sequence name="GEOM/Parameters" content="GEOM/Parameter" />
+    <struct name="GEOM/CreationInformation">
+      <member name="operationName" type="string" />
+      <member name="params" type="GEOM/Parameters" />
+    </struct>
+    <sequence name="GEOM/string_array" content="string" />
+    <sequence name="GEOM/short_array"  content="short" />
+    <sequence name="GEOM/ListOfBool"   content="boolean" />
+    <sequence name="GEOM/ListOfLong"   content="long" />
+    <sequence name="GEOM/ListOfDouble" content="double" />
+    <sequence name="GEOM/ListOfGO"     content="GEOM/GEOM_Object" />
+    <sequence name="GEOM/ListOfGBO"    content="GEOM/GEOM_BaseObject" />
+    <sequence name="GEOM/ListOfFields" content="GEOM/GEOM_Field" />
+    <sequence name="GEOM/object_list"  content="SObject" />
+    <type name="GEOM/BCErrorType" kind="int" />
+    <struct name="GEOM/BCError" >
+      <member name="error" type="GEOM/BCErrorType" />
+      <member name="incriminated" type="GEOM/ListOfLong" />
+    </struct>
+    <sequence name="GEOM/BCErrors"  content="GEOM/BCError" />
+    <type name="GEOM/shape_kind" kind="int" />
+    <type name="GEOM/ShapeErrorType" kind="int" />
+    <struct name="GEOM/ShapeError">
+      <member name="error" type="GEOM/ShapeErrorType" />
+      <member name="incriminated" type="GEOM/ListOfLong" />
+    </struct>
+    <sequence name="GEOM/ShapeError"  content="GEOM/ShapeErrors" />
 
-<!-- Geom data types  -->
-<type-list>
-  <type name="BCErrorType" kind="int"/>
-  <objref name="GEOM_Object" id="IDL:GEOM/GEOM_Object:1.0" />
-  <objref name="GEOM_List"  id="IDL:GEOM/GEOM_List:1.0" />
-  <objref name="GEOM_Gen"  id="IDL:GEOM/GEOM_Gen:1.0" />
-  <objref name="GEOM_Shape"  id="IDL:GEOM/GEOM_Object:1.0" />
-  <objref name="GEOM_Superv"  id="IDL:GEOM/GEOM_Superv:1.0" />
-  <objref name="GEOM_IBasicOperations"  id="IDL:GEOM/GEOM_IBasicOperations:1.0" />
-  <objref name="GEOM_ITransformOperations"  id="IDL:GEOM/GEOM_ITransformOperations:1.0" />
-  <objref name="GEOM_I3DPrimOperations"  id="IDL:GEOM/GEOM_I3DPrimOperations:1.0" />
-  <objref name="GEOM_IShapesOperations"  id="IDL:GEOM/GEOM_IShapesOperations:1.0" />
-  <objref name="GEOM_IBooleanOperations"  id="IDL:GEOM/GEOM_IBooleanOperations:1.0" />
-  <objref name="GEOM_ICurvesOperations"  id="IDL:GEOM/GEOM_ICurvesOperations:1.0" />
-  <objref name="GEOM_ILocalOperations"  id="IDL:GEOM/GEOM_ILocalOperations:1.0" />
-  <objref name="GEOM_IHealingOperations"  id="IDL:GEOM/GEOM_IHealingOperations:1.0" />
-  <objref name="GEOM_IInsertOperations"  id="IDL:GEOM/GEOM_IInsertOperations:1.0" />
-  <objref name="GEOM_IMeasureOperations"  id="IDL:GEOM/GEOM_IMeasureOperations:1.0" />
-  <objref name="GEOM_IBlocksOperations"  id="IDL:GEOM/GEOM_IBlocksOperations:1.0" />
-  <objref name="GEOM_IGroupOperations"  id="IDL:GEOM/GEOM_IGroupOperations:1.0" />
-  <objref name="GEOM_IAdvancedOperations"  id="IDL:GEOM/GEOM_IAdvancedOperations:1.0" />
-  <sequence name="ListOfLong" content="int"  />
-  <sequence name="ListOfGO" content="GEOM_Object"  />
-  <sequence name="ListOfBool" content="boolean"  />
-  <sequence name="string_array" content="string"  />
-  <struct name="BCError" >
-    <member name="incriminated" type="ListOfLong"/>
-  </struct>
-  <sequence name="BCErrors" content="BCError"  />
-</type-list>
+    <!-- From GEOM_Superv.idl -->
+    <objref name="GEOM/GEOM_Superv"  id="IDL:GEOM/GEOM_Superv:1.0" />
+    <objref name="GEOM/GEOM_List"  id="IDL:GEOM/GEOM_List:1.0" />
 
-<!-- Component list -->
-<component-list>
-    <component>
-        <!-- Component identification -->
-        <component-name>GEOM</component-name>
-        <component-username>Geometry</component-username>
-        <component-type>Geom</component-type>
-        <component-author>NRI</component-author>
-        <component-version>@SALOMEGEOM_VERSION@</component-version>
-        <component-comment>Geometry component</component-comment>
-        <component-multistudy>1</component-multistudy>
-        <component-icone>ModuleGeom.png</component-icone>
-        <component-impltype>1</component-impltype>
+    <!-- From AdvancedGEOM.idl -->
+    <type name="GEOM/pattern" kind="int" />
+    <objref name="GEOM/IAdvancedOperations" id="IDL:GEOM/IAdvancedOperations:1.0" />
+
+    <!-- From BREPPlugin.idl -->
+    <objref name="GEOM/IBREPOperations" id="IDL:GEOM/IBREPOperations:1.0" />
+
+    <!-- From IGESPlugin.idl -->
+    <objref name="GEOM/IIGESOperations" id="IDL:GEOM/IIGESOperations:1.0" />
+
+    <!-- From STEPPlugin.idl -->
+    <objref name="GEOM/ISTEPOperations" id="IDL:GEOM/ISTEPOperations:1.0" />
 
-        <!-- component interface list -->
-        <component-interface-list>
-            <!-- component interface identification -->
-            <component-interface-name>GEOM</component-interface-name>
-            <component-interface-comment>No comment</component-interface-comment>
+    <!-- From STLPlugin.idl -->
+    <objref name="GEOM/ISTLOperations" id="IDL:GEOM/ISTLOperations:1.0" />
 
-            <!-- Component service list-->
-            <component-service-list>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>Undo</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list></outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>Redo</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list></outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>AddInStudy</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudy</inParameter-name>
-                            <inParameter-type>Study</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                        <inParameter>
-                            <inParameter-name>theObject</inParameter-name>
-                            <inParameter-type>GEOM_Object</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                        <inParameter>
-                            <inParameter-name>theName</inParameter-name>
-                            <inParameter-type>string</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                        <inParameter>
-                            <inParameter-name>theFather</inParameter-name>
-                            <inParameter-type>GEOM_Object</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>SObject</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetIBasicOperations</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_IBasicOperations</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetITransformOperations</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_ITransformOperations</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetI3DPrimOperations</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_I3DPrimOperations</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetIShapesOperations</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_IShapesOperations</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetIBooleanOperations</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_IBooleanOperations</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetICurvesOperations</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_ICurvesOperations</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetILocalOperations</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_ILocalOperations</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetIHealingOperations</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_IHealingOperations</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetIInsertOperations</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_IInsertOperations</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetIMeasureOperations</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_IMeasureOperations</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetIBlocksOperations</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_IBlocksOperations</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetIGroupOperations</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_IGroupOperations</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetIAdvancedOperations</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_IAdvancedOperations</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>RemoveObject</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theObject</inParameter-name>
-                            <inParameter-type>GEOM_Object</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list></outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetObject</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyID</inParameter-name>
-                            <inParameter-type>long</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                        <inParameter>
-                            <inParameter-name>theEntry</inParameter-name>
-                            <inParameter-type>string</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_Object</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>AddSubShape</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theMainShape</inParameter-name>
-                            <inParameter-type>GEOM_Object</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                        <inParameter>
-                            <inParameter-name>theIndices</inParameter-name>
-                            <inParameter-type>ListOfLong</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_Object</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetIORFromString</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>ior</inParameter-name>
-                            <inParameter-type>string</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>GEOM_Object</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <!-- service-identification -->
-                    <service-name>GetStringFromIOR</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment></service-comment>
-                    <service-by-default>1</service-by-default>
-                    <!-- service-connexion -->
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theObject</inParameter-name>
-                            <inParameter-type>GEOM_Object</inParameter-type>
-                            <inParameter-comment></inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>string</outParameter-type>
-                            <outParameter-comment></outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <service-name>GetDumpName</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment>unknown</service-comment>
-                    <service-by-default>0</service-by-default>
-                    <inParameter-list>
-                        <inParameter>
-                            <inParameter-name>theStudyEntry</inParameter-name>
-                            <inParameter-type>string</inParameter-type>
-                            <inParameter-comment>unknown</inParameter-comment>
-                        </inParameter>
-                    </inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>string</outParameter-type>
-                            <outParameter-comment>unknown</outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-                <component-service>
-                    <service-name>GetAllDumpNames</service-name>
-                    <service-author></service-author>
-                    <service-version></service-version>
-                    <service-comment>unknown</service-comment>
-                    <service-by-default>0</service-by-default>
-                    <inParameter-list></inParameter-list>
-                    <outParameter-list>
-                        <outParameter>
-                            <outParameter-name>return</outParameter-name>
-                            <outParameter-type>string_array</outParameter-type>
-                            <outParameter-comment>unknown</outParameter-comment>
-                        </outParameter>
-                    </outParameter-list>
-                    <DataStream-list></DataStream-list>
-                </component-service>
-            </component-service-list>
-        </component-interface-list>
-    <constraint>hostname = localhost</constraint>
+    <!-- From BTKPlugin.idl -->
+    <objref name="GEOM/IVTKOperations" id="IDL:GEOM/IVTKOperations:1.0" />
+
+    <!-- From XAOPlugin.idl -->
+    <objref name="GEOM/IXAOOperations" id="IDL:GEOM/IXAOOperations:1.0" />
+  </type-list>
+
+  <!-- Component list -->
+  <component-list>
+    <component>
+      <!-- Component: GEOM -->
+      <!-- Component identification -->
+      <component-name>GEOM</component-name>
+      <component-username>Geometry</component-username>
+      <component-type>GEOM</component-type>
+      <component-author>SALOME team</component-author>
+      <component-version>@SALOMEGEOM_VERSION@</component-version>
+      <component-comment>CAD modeler</component-comment>
+      <component-multistudy>1</component-multistudy>
+      <component-icone>ModuleGeom.png</component-icone>
+      <component-impltype>1</component-impltype>
+      <constraint></constraint>
+      <!-- component interface list -->
+      <component-interface-list>
+        <!-- component interface identification -->
+        <component-interface-name>GEOM/GEOM_Gen</component-interface-name>
+        <component-interface-comment>GEOM module engine</component-interface-comment>
+       <!-- interface services list -->
+        <component-service-list>
+          <component-service>
+            <service-name>Undo</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list></outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>Redo</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list></outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>AddInStudy</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudy</inParameter-name>
+                <inParameter-type>Study</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_BaseObject</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFather</inParameter-name>
+                <inParameter-type>GEOM/GEOM_BaseObject</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+                            </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>SObject</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>RestoreSubShapesO</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudy</inParameter-name>
+                <inParameter-type>Study</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theArgs</inParameter-name>
+                <inParameter-type>GEOM/ListOfGO</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFindMethod</inParameter-name>
+                <inParameter-type>GEOM/find_shape_method</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theInheritFirstArg</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAddPrefix</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/ListOfGO</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>RestoreGivenSubShapesO</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudy</inParameter-name>
+                <inParameter-type>Study</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theArgs</inParameter-name>
+                <inParameter-type>GEOM/ListOfGO</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFindMethod</inParameter-name>
+                <inParameter-type>GEOM/find_shape_method</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theInheritFirstArg</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAddPrefix</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/ListOfGO</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>RestoreSubShapesSO</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudy</inParameter-name>
+                <inParameter-type>Study</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theSObject</inParameter-name>
+                <inParameter-type>SObject</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theArgs</inParameter-name>
+                <inParameter-type>GEOM/ListOfGO</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFindMethod</inParameter-name>
+                <inParameter-type>GEOM/find_shape_method</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theInheritFirstArg</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAddPrefix</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/ListOfGO</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetIBasicOperations</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_IBasicOperations</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetITransformOperations</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_ITransformOperations</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetI3DPrimOperations</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_I3DPrimOperations</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetIShapesOperations</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_IShapesOperations</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetIBooleanOperations</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_IBooleanOperations</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetICurvesOperations</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_ICurvesOperations</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetILocalOperations</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_ILocalOperations</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetIHealingOperations</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_IHealingOperations</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetIInsertOperations</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_IInsertOperations</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetIMeasureOperations</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_IMeasureOperations</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetIBlocksOperations</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_IBlocksOperations</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetIGroupOperations</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_IGroupOperations</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetIFieldOperations</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_IFieldOperations</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetPluginOperations</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theLibName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_IOperations</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>RemoveObject</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_BaseObject</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list></outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetObject</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theEntry</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_BaseObject</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>AddSubShape</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theMainShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theIndices</inParameter-name>
+                <inParameter-type>GEOM/ListOfLong</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetIORFromString</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theIOR</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetStringFromIOR</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>string</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetDumpName</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyEntry</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>string</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetAllDumpNames</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list></inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/string_array</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>PublishNamedShapesInStudy</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudy</inParameter-name>
+                <inParameter-type>Study</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/ListOfGO</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>CreateFolder</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFather</inParameter-name>
+                <inParameter-type>SObject</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>SObject</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MoveToFolder</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFolder</inParameter-name>
+                <inParameter-type>SObject</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list></outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MoveListToFolder</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theListOfGO</inParameter-name>
+                <inParameter-type>GEOM/ListOfGO</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFolder</inParameter-name>
+                <inParameter-type>SObject</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list></outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>Move</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>what</inParameter-name>
+                <inParameter-type>GEOM/object_list</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>where</inParameter-name>
+                <inParameter-type>SObject</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>row</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list></outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+        </component-service-list>
+      </component-interface-list>
     </component>
-     
+
     <component>
-            <component-name>GEOM_Superv</component-name>
-            <component-username>GEOM_Superv</component-username>
-            <component-type>OTHER</component-type>
-            <component-author></component-author>
-            <component-version>@SALOMEGEOM_VERSION@</component-version>
-            <component-comment>Supervision wrapper for Geometry component</component-comment>
-            <component-multistudy>1</component-multistudy>
-            <component-impltype>1</component-impltype>
-            <component-icone></component-icone>
-            <constraint></constraint>
-            <component-interface-list>
-                <component-interface-name>GEOM_Superv</component-interface-name>
-                <component-interface-comment>unknown</component-interface-comment>
-                <component-service-list>
-                    <component-service>
-                        <service-name>SetStudyID</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theStudyID</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list></outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>CreateListOfGO</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list></inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>AddItemToListOfGO</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theList</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>theList</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>CreateListOfLong</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list></inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>AddItemToListOfLong</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theList</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>theList</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>CreateListOfDouble</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list></inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>AddItemToListOfDouble</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theList</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>theList</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePointXYZ</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theX</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theY</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theZ</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePointWithReference</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theReference</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theX</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theY</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theZ</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePointOnCurve</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theRefCurve</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theParameter</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeTangentOnCurve</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theRefCurve</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theParameter</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeVectorDXDYDZ</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theDX</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDY</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDZ</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeVectorTwoPnt</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeLineTwoPnt</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePlaneThreePnt</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt3</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theTrimSize</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePlanePntVec</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theVec</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theTrimSize</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePlaneFace</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theFace</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theTrimSize</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeMarker</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theOX</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theOY</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theOZ</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theXDX</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theXDY</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theXDZ</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theYDX</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theYDY</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theYDZ</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeTangentPlaneOnFace</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theFace</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theParameterU</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theParameterV</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theTrimSize</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeBox</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theX1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theY1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theZ1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theX2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theY2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theZ2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeBoxDXDYDZ</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theDX</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDY</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDZ</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeBoxTwoPnt</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeCylinderPntVecRH</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theAxis</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theRadius</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theHeight</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeCylinderRH</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theR</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theH</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeSphere</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theX</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theY</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theZ</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theRadius</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeSphereR</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theR</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeSpherePntR</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeTorusPntVecRR</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theVec</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theRMajor</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theRMinor</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeTorusRR</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theRMajor</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theRMinor</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeConePntVecR1R2H</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theAxis</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theHeight</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeConeR1R2H</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theR1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theHeight</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePrismVecH</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theBase</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theVec</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theH</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePrismTwoPnt</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theBase</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePipe</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theBase</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePath</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeRevolutionAxisAngle</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theBase</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theAxis</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theAngle</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeFilling</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theMinDeg</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theMaxDeg</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theTol2D</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theTol3D</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theNbIter</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeThruSections</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theSeqSections</inParameter-name>
-                                <inParameter-type>ListOfGO</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theModeSolid</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePreci</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theRuled</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePipeWithDifferentSections</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theSeqBases</inParameter-name>
-                                <inParameter-type>ListOfGO</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theLocations</inParameter-name>
-                                <inParameter-type>ListOfGO</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePath</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theWithContact</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theWithCorrection</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePipeWithShellSections</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theSeqBases</inParameter-name>
-                                <inParameter-type>ListOfGO</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theSeqSubBases</inParameter-name>
-                                <inParameter-type>ListOfGO</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theLocations</inParameter-name>
-                                <inParameter-type>ListOfGO</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePath</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theWithContact</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theWithCorrection</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeBoolean</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theShape2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theOperation</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeFuse</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theShape2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeCut</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theShape2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeCommon</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theShape2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeSection</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theShape2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePartition</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShapes</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theTools</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theKeepInside</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theRemoveInside</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theLimit</inParameter-name>
-                                <inParameter-type>short</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theRemoveWebs</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theMaterials</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theKeepNonlimitShapes</inParameter-name>
-                                <inParameter-type>short</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeHalfPartition</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePlane</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeCopy</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theOriginal</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>Export</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFileName</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFormatName</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list></outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>Import</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theFileName</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFormatName</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>ImportTranslators</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list></inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>theFormats</outParameter-name>
-                                <outParameter-type>string_array</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                            <outParameter>
-                                <outParameter-name>thePatterns</outParameter-name>
-                                <outParameter-type>string_array</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>ExportTranslators</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list></inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>theFormats</outParameter-name>
-                                <outParameter-type>string_array</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                            <outParameter>
-                                <outParameter-name>thePatterns</outParameter-name>
-                                <outParameter-type>string_array</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>TranslateTwoPoints</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>TranslateTwoPointsCopy</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>TranslateDXDYDZ</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDX</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDY</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDZ</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>TranslateDXDYDZCopy</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDX</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDY</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDZ</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>TranslateVector</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theVector</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>TranslateVectorCopy</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theVector</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MultiTranslate1D</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theVector</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theStep</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theNbTimes</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MultiTranslate2D</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theVector1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theStep1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theNbTimes1</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theVector2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theStep2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theNbTimes2</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>Rotate</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theAxis</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theAngle</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>RotateCopy</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theAxis</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theAngle</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>RotateThreePoints</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theCentPoint</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>RotateThreePointsCopy</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theCentPoint</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MultiRotate1D</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theAxis</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theNbTimes</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MultiRotate2D</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theAxis</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theAngle</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theNbTimes1</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theStep</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theNbTimes2</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MirrorPlane</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePlane</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MirrorPlaneCopy</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePlane</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MirrorAxis</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theAxis</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MirrorAxisCopy</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theAxis</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MirrorPoint</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MirrorPointCopy</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>OffsetShape</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theOffset</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>OffsetShapeCopy</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theOffset</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>ScaleShape</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFactor</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>ScaleShapeCopy</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFactor</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>PositionShape</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theStartLCS</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theEndLCS</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>PositionShapeCopy</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theObject</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theStartLCS</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theEndLCS</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeEdge</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeWire</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theEdgesAndWires</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeFace</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theWire</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>isPlanarWanted</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeFaceWires</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theWires</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>isPlanarWanted</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeShell</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theFacesAndShells</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeSolidShell</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShell</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeSolidShells</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShells</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeCompound</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShapes</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeGlueFaces</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theTolerance</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>doKeepNonSolids</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetGlueFaces</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theTolerance</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeGlueFacesByList</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theTolerance</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFaces</inParameter-name>
-                                <inParameter-type>ListOfGO</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>doKeepNonSolids</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeExplode</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theShapeType</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>isSorted</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>NumberOfFaces</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>long</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>NumberOfEdges</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>long</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>ChangeOrientation</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeQuad4Vertices</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt3</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt4</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeQuad</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theEdge1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theEdge2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theEdge3</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theEdge4</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeQuad2Edges</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theEdge1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theEdge2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeHexa</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theFace1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFace2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFace3</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFace4</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFace5</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFace6</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeHexa2Faces</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theFace1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFace2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetPoint</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theX</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theY</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theZ</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theEpsilon</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetEdge</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetEdgeNearPoint</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetFaceByPoints</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint3</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint4</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetFaceByEdges</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theEdge1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theEdge2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetOppositeFace</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theBlock</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFace</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetFaceNearPoint</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetFaceByNormale</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theBlock</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theVector</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>IsCompoundOfBlocks</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theCompound</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theMinNbFaces</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theMaxNbFaces</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>boolean</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                            <outParameter>
-                                <outParameter-name>theNbBlocks</outParameter-name>
-                                <outParameter-type>long</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>CheckCompoundOfBlocks</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theCompound</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>boolean</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                            <outParameter>
-                                <outParameter-name>theErrors</outParameter-name>
-                                <outParameter-type>BCErrors</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>PrintBCErrors</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theCompound</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theErrors</inParameter-name>
-                                <inParameter-type>BCErrors</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>string</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>ExplodeCompoundOfBlocks</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theCompound</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theMinNbFaces</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theMaxNbFaces</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetBlockNearPoint</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theCompound</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePoint</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetBlockByParts</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theCompound</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theParts</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetBlocksByParts</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theCompound</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theParts</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeMultiTransformation1D</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theBlock</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDirFace1</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDirFace2</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theNbTimes</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeMultiTransformation2D</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theBlock</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDirFace1U</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDirFace2U</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theNbTimesU</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDirFace1V</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theDirFace2V</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theNbTimesV</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeCirclePntVecR</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theVec</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeCircleThreePnt</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt3</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeEllipse</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theVec</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theRMajor</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theRMinor</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeEllipseVec</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theVec</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theRMajor</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theRMinor</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theVecMaj</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeArc</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt3</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeArcCenter</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theCenter</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theSense</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeArcOfEllipse</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePnt1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thePnt3</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePolyline</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePoints</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeSplineBezier</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePoints</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeSplineInterpolation</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thePoints</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeSketcher</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theCommand</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theWorkingPlane</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeFilletAll</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeFilletEdges</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theEdges</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeFilletFaces</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFaces</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeChamferAll</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theD</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeChamferEdge</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theD1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theD2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFace1</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFace2</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeChamferFaces</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theD1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theD2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theFaces</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeArchimede</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theWeight</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theWaterDensity</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theMeshDeflection</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetSubShapeIndex</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theSubShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>long</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>CreateGroup</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theMainShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theShapeType</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>AddObject</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theGroup</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theSubShapeId</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list></outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>RemoveObject</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theGroup</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theSubShapeId</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list></outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetType</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theGroup</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>long</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetMainShape</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theGroup</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetObjects</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theGroup</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    
-                    <component-service>
-                        <service-name>MakePipeTShape</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theR1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theW1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theL1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theW2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theL2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theHewMesh</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePipeTShapeWithPosition</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theR1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theW1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theL1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theW2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theL2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theHewMesh</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theP1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theP2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theP3</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePipeTShapeChamfer</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theR1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theW1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theL1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theW2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theL2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theH</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theHewMesh</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePipeTShapeChamferWithPosition</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theR1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theW1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theL1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theW2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theL2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theH</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theHewMesh</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theP1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theP2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theP3</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    
-                    
-                    <component-service>
-                        <service-name>MakePipeTShapeFillet</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theR1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theW1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theL1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theW2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theL2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theRF</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theHewMesh</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakePipeTShapeFilletWithPosition</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theR1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theW1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theL1</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theR2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theW2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theL2</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theRF</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theHewMesh</inParameter-name>
-                                <inParameter-type>boolean</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theP1</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theP2</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theP3</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_List</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeDividedDisk</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theR</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>Radius of the disk</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theRatio</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>Relative size of the central square diagonal against the disk diameter</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>Result object</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeDividedCylinder</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theR</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>Radius of the cylinder</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theH</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>Height of the cylinder</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>Result object</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeSmoothingSurface</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>thelPoints</inParameter-name>
-                                <inParameter-type>double</inParameter-type>
-                                <inParameter-comment>list of  points</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>GEOM_Object</outParameter-type>
-                                <outParameter-comment>Result object</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>MakeExportXAO</service-name>
-                        <service-author></service-author>
-                        <service-version></service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theFileName</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>The name of the exported file</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>theExportingShape</inParameter-name>
-                                <inParameter-type>GEOM_Object</inParameter-type>
-                                <inParameter-comment>Shape to export</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thelGroups</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>List of groups to export</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>thelFields</inParameter-name>
-                                <inParameter-type>GEOM_List</inParameter-type>
-                                <inParameter-comment>List of fields to export</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>bool</outParameter-type>
-                                <outParameter-comment>Result object</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <!-- @@ insert new functions before this line @@ do not remove this line @@ -->
-                </component-service-list>
-            </component-interface-list>
+      <!-- Component: GEOM_Superv -->
+      <!-- Component identification -->
+      <component-name>GEOM_Superv</component-name>
+      <component-username>GEOM_Superv</component-username>
+      <component-type>GEOM</component-type>
+      <component-author></component-author>
+      <component-version>@SALOMEGEOM_VERSION@</component-version>
+      <component-comment>Supervision helper for Geometry component</component-comment>
+      <component-multistudy>1</component-multistudy>
+      <component-impltype>1</component-impltype>
+      <component-icone></component-icone>
+      <constraint></constraint>
+      <!-- component interface list -->
+      <component-interface-list>
+        <!-- component interface identification -->
+        <component-interface-name>GEOM/GEOM_Superv</component-interface-name>
+        <component-interface-comment>unknown</component-interface-comment>
+       <!-- interface services list -->
+        <component-service-list>
+          <component-service>
+            <service-name>SetStudyID</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theStudyID</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list></outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>CreateListOfGO</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list></inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>AddItemToListOfGO</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theList</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>theList</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>CreateListOfLong</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list></inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>AddItemToListOfLong</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theList</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>theList</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>CreateListOfDouble</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list></inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>AddItemToListOfDouble</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theList</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>theList</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePointXYZ</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theX</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theY</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theZ</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePointWithReference</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theReference</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theX</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theY</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theZ</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePointOnCurve</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theRefCurve</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theParameter</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePointOnCurveByLength</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theRefCurve</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theLength</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theStartPoint</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeTangentOnCurve</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theRefCurve</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theParameter</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeVectorDXDYDZ</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theDX</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDY</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDZ</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeVectorTwoPnt</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeLineTwoPnt</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeLineTwoFaces</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theFace1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFace2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePlaneThreePnt</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt3</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theTrimSize</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePlanePntVec</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVec</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theTrimSize</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePlaneFace</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theFace</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theTrimSize</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePlane2Vec</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theVec1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVec2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theTrimSize</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePlaneLCS</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theLCS</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theTrimSize</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theOrientation</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeMarker</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theOX</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theOY</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theOZ</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theXDX</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theXDY</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theXDZ</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theYDX</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theYDY</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theYDZ</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeMarkerFromShape</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeMarkerPntTwoVec</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theOrigin</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theXVec</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theYVec</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeTangentPlaneOnFace</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theFace</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theParameterU</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theParameterV</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theTrimSize</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeBox</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theX1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theY1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theZ1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theX2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theY2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theZ2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeBoxDXDYDZ</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theDX</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDY</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDZ</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeBoxTwoPnt</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeFaceHW</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theH</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theOrientation</inParameter-name>
+                <inParameter-type>short</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeFaceObjHW</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObj</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theH</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeDiskPntVecR</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVec</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeDiskThreePnt</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt3</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeDiskR</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theR</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theOrientation</inParameter-name>
+                <inParameter-type>short</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeCylinderPntVecRH</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAxis</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRadius</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theHeight</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeCylinderRH</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theR</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theH</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeCylinderPntVecRHA</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAxis</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRadius</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theHeight</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAngle</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeCylinderRHA</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theR</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theH</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theA</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeSphere</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theX</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theY</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theZ</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRadius</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeSphereR</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theR</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeSpherePntR</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeTorusPntVecRR</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVec</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRMajor</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRMinor</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeTorusRR</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theRMajor</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRMinor</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeConePntVecR1R2H</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAxis</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theHeight</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeConeR1R2H</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theR1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theHeight</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePrismVecH</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theBase</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVec</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theH</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePrismVecH2Ways</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theBase</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVec</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theH</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePrismTwoPnt</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theBase</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePrismTwoPnt2Ways</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theBase</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePipe</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theBase</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePath</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeRevolutionAxisAngle</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theBase</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAxis</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAngle</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeRevolutionAxisAngle2Ways</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theBase</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAxis</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAngle</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeFilling</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theMinDeg</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theMaxDeg</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theTol2D</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theTol3D</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theNbIter</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theMethod</inParameter-name>
+                <inParameter-type>GEOM/filling_oper_method</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theApprox</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeThruSections</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theSeqSections</inParameter-name>
+                <inParameter-type>GEOM/ListOfGO</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theModeSolid</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePreci</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRuled</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePipeWithDifferentSections</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theSeqBases</inParameter-name>
+                <inParameter-type>GEOM/ListOfGO</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theLocations</inParameter-name>
+                <inParameter-type>GEOM/ListOfGO</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePath</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theWithContact</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theWithCorrection</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePipeWithShellSections</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theSeqBases</inParameter-name>
+                <inParameter-type>GEOM/ListOfGO</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theSeqSubBases</inParameter-name>
+                <inParameter-type>GEOM/ListOfGO</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theLocations</inParameter-name>
+                <inParameter-type>GEOM/ListOfGO</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePath</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theWithContact</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theWithCorrection</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePipeShellsWithoutPath</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theSeqBases</inParameter-name>
+                <inParameter-type>GEOM/ListOfGO</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theLocations</inParameter-name>
+                <inParameter-type>GEOM/ListOfGO</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePipeBiNormalAlongVector</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theBase</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePath</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVec</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeBoolean</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theShape2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theOperation</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeFuse</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theShape2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeCommon</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theShape2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeCut</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theShape2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeSection</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theShape2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePartition</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShapes</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theTools</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theKeepInside</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRemoveInside</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theLimit</inParameter-name>
+                <inParameter-type>short</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRemoveWebs</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theMaterials</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theKeepNonlimitShapes</inParameter-name>
+                <inParameter-type>short</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeHalfPartition</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePlane</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeCopy</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theOriginal</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>Export</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFileName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFormatName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list></outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ImportFile</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theFileName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFormatName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>TranslateTwoPoints</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>TranslateTwoPointsCopy</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>TranslateDXDYDZ</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDX</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDY</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDZ</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>TranslateDXDYDZCopy</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDX</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDY</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDZ</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>TranslateVector</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVector</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>TranslateVectorCopy</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVector</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>TranslateVectorDistance</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVector</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDistance</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theCopy</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MultiTranslate1D</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVector</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theStep</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theNbTimes</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MultiTranslate2D</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVector1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theStep1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theNbTimes1</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVector2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theStep2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theNbTimes2</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>Rotate</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAxis</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAngle</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>RotateCopy</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAxis</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAngle</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>RotateThreePoints</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theCentPoint</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>RotateThreePointsCopy</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theCentPoint</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MultiRotate1D</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAxis</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theNbTimes</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MultiRotate2D</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAxis</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAngle</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theNbTimes1</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theStep</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theNbTimes2</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MirrorPlane</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePlane</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MirrorPlaneCopy</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePlane</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MirrorAxis</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAxis</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MirrorAxisCopy</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAxis</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MirrorPoint</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MirrorPointCopy</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>OffsetShape</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theOffset</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>OffsetShapeCopy</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theOffset</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ScaleShape</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFactor</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ScaleShapeCopy</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFactor</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ScaleShapeAlongAxes</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFactorX</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFactorY</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFactorZ</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ScaleShapeAlongAxesCopy</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFactorX</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFactorY</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFactorZ</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>PositionShape</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theStartLCS</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theEndLCS</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>PositionShapeCopy</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theStartLCS</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theEndLCS</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>PositionAlongPath</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePath</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDistance</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theCopy</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theReverse</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeEdge</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeEdgeOnCurveByLength</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theRefCurve</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theLength</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theStartPoint</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeWire</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theEdgesAndWires</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theTolerance</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeFace</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theWire</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>isPlanarWanted</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeFaceWires</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theWires</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>isPlanarWanted</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeShell</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theFacesAndShells</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeSolidShell</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShell</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeSolidShells</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShells</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeCompound</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShapes</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeGlueFaces</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theTolerance</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>doKeepNonSolids</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetGlueFaces</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theTolerance</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeGlueFacesByList</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theTolerance</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFaces</inParameter-name>
+                <inParameter-type>GEOM/ListOfGO</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>doKeepNonSolids</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>doGlueAllEdges</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeExplode</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theShapeType</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>isSorted</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>NumberOfFaces</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>long</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>NumberOfEdges</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>long</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ChangeOrientation</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetShapesOnShape</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theCheckShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theShapeType</inParameter-name>
+                <inParameter-type>short</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theState</inParameter-name>
+                <inParameter-type>GEOM/shape_state</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetShapesOnShapeAsCompound</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theCheckShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theShapeType</inParameter-name>
+                <inParameter-type>short</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theState</inParameter-name>
+                <inParameter-type>GEOM/shape_state</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeQuad4Vertices</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt3</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt4</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeQuad</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theEdge1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theEdge2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theEdge3</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theEdge4</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeQuad2Edges</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theEdge1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theEdge2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeHexa</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theFace1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFace2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFace3</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFace4</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFace5</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFace6</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeHexa2Faces</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theFace1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFace2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetPoint</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theX</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theY</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theZ</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theEpsilon</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetEdge</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetEdgeNearPoint</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetFaceByPoints</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint3</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint4</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetFaceByEdges</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theEdge1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theEdge2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetOppositeFace</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theBlock</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFace</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetFaceNearPoint</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetFaceByNormale</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theBlock</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVector</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>IsCompoundOfBlocks</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theCompound</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theMinNbFaces</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theMaxNbFaces</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>boolean</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+              <outParameter>
+                <outParameter-name>theNbBlocks</outParameter-name>
+                <outParameter-type>long</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>CheckCompoundOfBlocks</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theCompound</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>boolean</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+              <outParameter>
+                <outParameter-name>theErrors</outParameter-name>
+                <outParameter-type>GEOM/BCErrors</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>PrintBCErrors</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theCompound</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theErrors</inParameter-name>
+                <inParameter-type>GEOM/BCErrors</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>string</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ExplodeCompoundOfBlocks</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theCompound</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theMinNbFaces</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theMaxNbFaces</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetBlockNearPoint</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theCompound</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePoint</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetBlockByParts</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theCompound</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theParts</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetBlocksByParts</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theCompound</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theParts</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeMultiTransformation1D</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theBlock</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDirFace1</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDirFace2</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theNbTimes</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeMultiTransformation2D</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theBlock</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDirFace1U</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDirFace2U</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theNbTimesU</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDirFace1V</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDirFace2V</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theNbTimesV</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeCirclePntVecR</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVec</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeCircleThreePnt</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt3</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeCircleCenter2Pnt</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt3</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeEllipse</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVec</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRMajor</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRMinor</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeEllipseVec</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVec</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRMajor</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRMinor</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVecMaj</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeArc</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePnt1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt3</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeArcCenter</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theCenter</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theSense</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeArcOfEllipse</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theCenter</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePnt2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePolyline</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePoints</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theIsClosed</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeSplineBezier</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePoints</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theIsClosed</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeSplineInterpolation</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thePoints</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theIsClosed</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDoReordering</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeSketcher</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theCommand</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theWorkingPlane</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeFilletAll</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeFilletEdges</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theEdges</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeFilletEdgesR1R2</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theEdges</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeFilletFaces</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFaces</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeFilletFacesR1R2</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFaces</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeFillet2D</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVertexes</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeChamferAll</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theD</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeChamferEdge</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theD1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theD2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFace1</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFace2</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeChamferEdgeAD</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theD</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAngle</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFace1</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFace2</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeChamferFaces</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theD1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theD2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFaces</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeChamferFacesAD</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theD</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAngle</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFaces</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeChamferEdges</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theD1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theD2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theEdges</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeChamferEdgesAD</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theD</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theAngle</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theEdges</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeArchimede</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theWeight</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theWaterDensity</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theMeshDeflection</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetSubShapeIndex</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theSubShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>long</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>CreateGroup</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theMainShape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theShapeType</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>AddObject</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theGroup</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theSubShapeId</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list></outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>RemoveObject</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theGroup</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theSubShapeId</inParameter-name>
+                <inParameter-type>long</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list></outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetType</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theGroup</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>long</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetMainShape</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theGroup</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>GetObjects</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theGroup</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePipeTShape</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theR1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theL1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theL2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theHexMesh</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePipeTShapeWithPosition</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theR1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theL1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theL2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theHexMesh</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theP1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theP2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theP3</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePipeTShapeChamfer</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theR1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theL1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theL2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theH</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theHexMesh</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePipeTShapeChamferWithPosition</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theR1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theL1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theL2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theH</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theHexMesh</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theP1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theP2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theP3</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePipeTShapeFillet</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theR1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theL1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theL2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRF</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theHexMesh</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakePipeTShapeFilletWithPosition</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theR1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theL1</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theR2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theW2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theL2</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRF</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theHexMesh</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theP1</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theP2</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theP3</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_List</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeDividedDisk</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theR</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theRatio</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theOrientation</inParameter-name>
+                <inParameter-type>short</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePattern</inParameter-name>
+                <inParameter-type>GEOM/pattern</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeDividedCylinder</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theR</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theH</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>thePattern</inParameter-name>
+                <inParameter-type>GEOM/pattern</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>MakeSmoothingSurface</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>thelPoints</inParameter-name>
+                <inParameter-type>GEOM/GEOM_List</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ExportSTL</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFileName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theIsASCII</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDeflection</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theIsRelative</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list></outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ImportSTL</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theFileName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ExportBREP</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFileName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list></outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ImportBREP</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theFileName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ExportSTEP</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFileName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list></outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ImportSTEP</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theFileName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theIsIgnoreUnits</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ExportIGES</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFileName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theVersion</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list></outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ImportIGES</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theFileName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theIsIgnoreUnits</inParameter-name>
+                <inParameter-type>boolean</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ExportXAO</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>shape</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>groups</inParameter-name>
+                <inParameter-type>GEOM/ListOfGO</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>fields</inParameter-name>
+                <inParameter-type>GEOM/ListOfFields</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>author</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>fileName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>boolean</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ImportXAO</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>fileName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list>
+              <outParameter>
+                <outParameter-name>return</outParameter-name>
+                <outParameter-type>boolean</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+              <outParameter>
+                <outParameter-name>shape</outParameter-name>
+                <outParameter-type>GEOM/GEOM_Object</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+              <outParameter>
+                <outParameter-name>subShapes</outParameter-name>
+                <outParameter-type>GEOM/ListOfGO</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+              <outParameter>
+                <outParameter-name>groups</outParameter-name>
+                <outParameter-type>GEOM/ListOfGO</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+              <outParameter>
+                <outParameter-name>fields</outParameter-name>
+                <outParameter-type>GEOM/ListOfFields</outParameter-type>
+                <outParameter-comment>unknown</outParameter-comment>
+              </outParameter>
+            </outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+          <component-service>
+            <service-name>ExportVTK</service-name>
+            <service-author>SALOME team</service-author>
+            <service-version>@SALOMEGEOM_VERSION@</service-version>
+            <service-comment>unknown</service-comment>
+            <service-by-default>0</service-by-default>
+            <inParameter-list>
+              <inParameter>
+                <inParameter-name>theObject</inParameter-name>
+                <inParameter-type>GEOM/GEOM_Object</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theFileName</inParameter-name>
+                <inParameter-type>string</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+              <inParameter>
+                <inParameter-name>theDeflection</inParameter-name>
+                <inParameter-type>double</inParameter-type>
+                <inParameter-comment>unknown</inParameter-comment>
+              </inParameter>
+            </inParameter-list>
+            <outParameter-list></outParameter-list>
+            <DataStream-list></DataStream-list>
+          </component-service>
+         <!-- @@ insert new functions before this line @@ do not remove this line @@ -->
+       </component-service-list>
+      </component-interface-list>
     </component>
-</component-list>
+  </component-list>
+
 </begin-catalog>
diff --git a/resources/IGESPlugin.xml b/resources/IGESPlugin.xml
new file mode 100644 (file)
index 0000000..0810a4a
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version='1.0' encoding='us-ascii'?>
+<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
+<!--
+  Copyright (C) 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, or (at your option) any 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
+
+-->
+
+<!--  GUI customization for GEOM component  -->
+
+<geom-plugins>
+
+  <geom-plugin name="IGESPlugin"
+               server-lib="IGESPluginEngine"
+               gui-lib="IGESPluginGUI">
+    <actions>
+      <action label="Import_IGES"
+              menu="FILE/IMPORT:10/IMPORTIGES"
+              status-bar="IMPORTIGES">
+      </action>
+      <action label="Export_IGES"
+              menu="FILE/EXPORT:10/EXPORTIGES"
+              status-bar="EXPORTIGES">
+      </action>
+    </actions>
+  </geom-plugin>
+
+</geom-plugins>
diff --git a/resources/ImportExport b/resources/ImportExport
deleted file mode 100644 (file)
index fae46da..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-Import: BREP|IGES|STEP|STL
-Export: BREP|IGES|IGES_5_3|STEP|STL_Bin|STL_ASCII|VTK
-
-BREP.Import: BREPImport
-BREP.Export: BREPExport
-BREP.Pattern: BREP Files ( *.brep )
-
-IGES.Import: IGESImport
-IGES.Export: IGESExport
-IGES.Pattern: IGES Files ( *.iges *.igs )
-IGES.ExportPattern: IGES 5.1 Files ( *.iges *.igs )
-
-IGES_5_3.Export: IGESExport
-IGES_5_3.Pattern: IGES 5.3 Files ( *.iges *.igs )
-
-STEP.Import: STEPImport
-STEP.Export: STEPExport
-STEP.Pattern: STEP Files ( *.step *.stp )
-
-STL.Import: STLImport
-STL.Pattern: STL Files ( *.stl )
-
-STL_Bin.Export: STLExport
-STL_Bin.Pattern: STL Binary Files ( *.stl )
-
-STL_ASCII.Export: STLExport
-STL_ASCII.Pattern: STL ASCII Files ( *.stl )
-
-VTK.Export: VTKExport
-VTK.Pattern: VTK Files ( *.vtk )
diff --git a/resources/STEPPlugin.xml b/resources/STEPPlugin.xml
new file mode 100644 (file)
index 0000000..0af9399
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version='1.0' encoding='us-ascii'?>
+<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
+<!--
+  Copyright (C) 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, or (at your option) any 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
+
+-->
+
+<!--  GUI customization for GEOM component  -->
+
+<geom-plugins>
+
+  <geom-plugin name="STEPPlugin"
+               server-lib="STEPPluginEngine"
+               gui-lib="STEPPluginGUI">
+    <actions>
+      <action label="Import_STEP"
+              menu="FILE/IMPORT:10/IMPORTSTEP"
+              status-bar="IMPORTSTEP">
+      </action>
+      <action label="Export_STEP"
+              menu="FILE/EXPORT:10/EXPORTSTEP"
+              status-bar="EXPORTSTEP">
+      </action>
+    </actions>
+  </geom-plugin>
+
+</geom-plugins>
diff --git a/resources/STLPlugin.xml b/resources/STLPlugin.xml
new file mode 100644 (file)
index 0000000..81dd11b
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version='1.0' encoding='us-ascii'?>
+<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
+<!--
+  Copyright (C) 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, or (at your option) any 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
+
+-->
+
+<!--  GUI customization for GEOM component  -->
+
+<geom-plugins>
+
+  <geom-plugin name="STLPlugin"
+               server-lib="STLPluginEngine"
+               gui-lib="STLPluginGUI">
+    <actions>
+      <action label="Import_STL"
+              menu="FILE/IMPORT:10/IMPORTSTL"
+              status-bar="IMPORTSTL">
+      </action>
+      <action label="Export_STL"
+              menu="FILE/EXPORT:10/EXPORTSTL"
+              status-bar="EXPORTSTL">
+      </action>
+    </actions>
+  </geom-plugin>
+
+</geom-plugins>
index 47fa423d23212a19e783e92f99e16537e5cdccfd..82a6f2b6c4a57ff1fc012dbcfe5c03749c07e7ca 100644 (file)
   <section name="resources">
     <!-- Module resources -->
     <parameter name="GEOM" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
-    <parameter name="AdvancedGUI" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
     <parameter name="DependencyTree" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
+    <parameter name="AdvancedGEOM" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
+    <parameter name="STLPlugin" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
+    <parameter name="BREPPlugin" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
+    <parameter name="STEPPlugin" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
+    <parameter name="IGESPlugin" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
+    <parameter name="XAOPlugin" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
+    <parameter name="VTKPlugin" value="%GEOM_ROOT_DIR%/share/salome/resources/geom"/>
   </section>
   <section name="Geometry" >
     <!-- Other module preferences -->
   </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 #12 #00 #00 #02 #44 #FC #02 #00 #00 #00 #02 #FC #00 #00 #00 #7B #00 #00 #01 #A2 #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 #12 #00 #00 #00 #C0 #00 #FF #FF #FF #FB #00 #00 #00 #12 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #00 #31 #01 #00 #00 #02 #25 #00 #00 #00 #9A #00 #00 #00 #9A #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 #26 #00 #00 #02 #44 #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #08 #00 #00 #00 #08 #FC #00 #00 #00 #04 #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 #08 #00 #00 #00 #0A #00 #42 #00 #61 #00 #73 #00 #69 #00 #63 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #14 #00 #50 #00 #72 #00 #69 #00 #6D #00 #69 #00 #74 #00 #69 #00 #76 #00 #65 #00 #73 #01 #00 #00 #01 #82 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #24 #00 #42 #00 #6F #00 #6F #00 #6C #00 #65 #00 #61 #00 #6E #00 #20 #00 #6F #00 #70 #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #73 #01 #00 #00 #02 #88 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #0C #00 #42 #00 #6C #00 #6F #00 #63 #00 #6B #00 #73 #01 #00 #00 #03 #12 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #10 #00 #50 #00 #69 #00 #63 #00 #74 #00 #75 #00 #72 #00 #65 #00 #73 #01 #00 #00 #03 #5E #00 #00 #00 #48 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #10 #00 #41 #00 #64 #00 #76 #00 #61 #00 #6E #00 #63 #00 #65 #00 #64 #01 #00 #00 #03 #A6 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1E #00 #49 #00 #6D #00 #70 #00 #6F #00 #72 #00 #74 #00 #20 #00 #2F #00 #20 #00 #45 #00 #78 #00 #70 #00 #6F #00 #72 #00 #74 #01 #00 #00 #03 #D3 #00 #00 #00 #53 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #10 #00 #4D #00 #65 #00 #61 #00 #73 #00 #75 #00 #72 #00 #65 #00 #73 #00 #00 #00 #04 #B3 #00 #00 #00 #8D #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #00 #02 #00 #00 #00 #05 #00 #00 #00 #1C #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 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #14 #00 #4F #00 #70 #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #73 #01 #00 #00 #01 #2B #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #14 #00 #47 #00 #65 #00 #6E #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #01 #00 #00 #01 #D4 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #0A #00 #42 #00 #75 #00 #69 #00 #6C #00 #64 #01 #00 #00 #02 #7D #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #18 #00 #4D #00 #6F #00 #64 #00 #69 #00 #66 #00 #69 #00 #63 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #01 #00 #00 #03 #45 #00 #00 #01 #FB #00 #00 #00 #00 #00 #00 #00 #00" name="GEOM"/>
+  <parameter name="GEOM" 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 #49 #FC #02 #00 #00 #00 #02 #FC #00 #00 #00 #7B #00 #00 #01 #A7 #00 #00 #00 #97 #01 #00 #00 #14 #FA #00 #00 #00 #00 #01 #00 #00 #00 #02 #FB #00 #00 #00 #22 #00 #6F #00 #62 #00 #6A #00 #65 #00 #63 #00 #74 #00 #42 #00 #72 #00 #6F #00 #77 #00 #73 #00 #65 #00 #72 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #46 #00 #FF #FF #FF #FB #00 #00 #00 #18 #00 #6E #00 #6F #00 #74 #00 #65 #00 #42 #00 #6F #00 #6F #00 #6B #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #00 #C0 #00 #FF #FF #FF #FB #00 #00 #00 #36 #00 #67 #00 #65 #00 #6F #00 #6D #00 #43 #00 #72 #00 #65 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #49 #00 #6E #00 #66 #00 #6F #00 #72 #00 #6D #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #02 #2A #00 #00 #00 #9A #00 #00 #00 #9A #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 #22 #00 #70 #00 #79 #00 #74 #00 #68 #00 #6F #00 #6E #00 #43 #00 #6F #00 #6E #00 #73 #00 #6F #00 #6C #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #00 #00 #00 #05 #40 #00 #00 #00 #46 #00 #FF #FF #FF #00 #00 #04 #38 #00 #00 #02 #49 #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #08 #00 #00 #00 #08 #FC #00 #00 #00 #04 #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #1C #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #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 #1A #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #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 #12 #00 #47 #00 #45 #00 #4F #00 #4D #00 #42 #00 #61 #00 #73 #00 #69 #00 #63 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1C #00 #47 #00 #45 #00 #4F #00 #4D #00 #50 #00 #72 #00 #69 #00 #6D #00 #69 #00 #74 #00 #69 #00 #76 #00 #65 #00 #73 #01 #00 #00 #01 #A1 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #2A #00 #47 #00 #45 #00 #4F #00 #4D #00 #42 #00 #6F #00 #6F #00 #6C #00 #65 #00 #61 #00 #6E #00 #4F #00 #70 #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #73 #01 #00 #00 #02 #A7 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #16 #00 #54 #00 #4F #00 #4F #00 #4C #00 #5F #00 #42 #00 #4C #00 #4F #00 #43 #00 #4B #00 #53 #01 #00 #00 #03 #31 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #18 #00 #47 #00 #45 #00 #4F #00 #4D #00 #50 #00 #69 #00 #63 #00 #74 #00 #75 #00 #72 #00 #65 #00 #73 #01 #00 #00 #03 #7D #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1A #00 #54 #00 #4F #00 #4F #00 #4C #00 #5F #00 #41 #00 #44 #00 #56 #00 #41 #00 #4E #00 #43 #00 #45 #00 #44 #01 #00 #00 #03 #AA #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #26 #00 #47 #00 #45 #00 #4F #00 #4D #00 #49 #00 #6D #00 #70 #00 #6F #00 #72 #00 #74 #00 #45 #00 #78 #00 #70 #00 #6F #00 #72 #00 #74 #00 #58 #00 #41 #00 #4F #01 #00 #00 #03 #D7 #00 #00 #01 #69 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #02 #00 #00 #00 #05 #00 #00 #00 #24 #00 #47 #00 #45 #00 #4F #00 #4D #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 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1C #00 #47 #00 #45 #00 #4F #00 #4D #00 #4F #00 #70 #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #73 #01 #00 #00 #01 #2B #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1C #00 #47 #00 #45 #00 #4F #00 #4D #00 #47 #00 #65 #00 #6E #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #01 #00 #00 #01 #D4 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #12 #00 #47 #00 #45 #00 #4F #00 #4D #00 #42 #00 #75 #00 #69 #00 #6C #00 #64 #01 #00 #00 #02 #7D #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #20 #00 #47 #00 #45 #00 #4F #00 #4D #00 #4D #00 #6F #00 #64 #00 #69 #00 #66 #00 #69 #00 #63 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #01 #00 #00 #03 #45 #00 #00 #01 #FB #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #02 #00 #00 #00 #01 #00 #00 #00 #18 #00 #47 #00 #45 #00 #4F #00 #4D #00 #4D #00 #65 #00 #61 #00 #73 #00 #75 #00 #72 #00 #65 #00 #73 #00 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00"/>
  </section>
  <section name="windows_visibility">
-  <parameter value="#00 #00 #00 #00 #10 #00 #00 #00 #24 #00 #33 #00 #44 #00 #20 #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 #10 #00 #41 #00 #64 #00 #76 #00 #61 #00 #6E #00 #63 #00 #65 #00 #64 #01 #00 #00 #00 #0A #00 #42 #00 #61 #00 #73 #00 #69 #00 #63 #01 #00 #00 #00 #0C #00 #42 #00 #6C #00 #6F #00 #63 #00 #6B #00 #73 #01 #00 #00 #00 #24 #00 #42 #00 #6F #00 #6F #00 #6C #00 #65 #00 #61 #00 #6E #00 #20 #00 #6F #00 #70 #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #73 #01 #00 #00 #00 #0A #00 #42 #00 #75 #00 #69 #00 #6C #00 #64 #01 #00 #00 #00 #14 #00 #47 #00 #65 #00 #6E #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #01 #00 #00 #00 #1E #00 #49 #00 #6D #00 #70 #00 #6F #00 #72 #00 #74 #00 #20 #00 #2F #00 #20 #00 #45 #00 #78 #00 #70 #00 #6F #00 #72 #00 #74 #01 #00 #00 #00 #10 #00 #4D #00 #65 #00 #61 #00 #73 #00 #75 #00 #72 #00 #65 #00 #73 #00 #00 #00 #00 #18 #00 #4D #00 #6F #00 #64 #00 #69 #00 #66 #00 #69 #00 #63 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #01 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #14 #00 #4F #00 #70 #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #73 #01 #00 #00 #00 #10 #00 #50 #00 #69 #00 #63 #00 #74 #00 #75 #00 #72 #00 #65 #00 #73 #01 #00 #00 #00 #14 #00 #50 #00 #72 #00 #69 #00 #6D #00 #69 #00 #74 #00 #69 #00 #76 #00 #65 #00 #73 #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 #1C #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 #01 #01 #00 #00 #00 #04 #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 #12 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #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="GEOM"/>
+  <parameter name="GEOM" value="#00 #00 #00 #00 #21 #00 #00 #00 #24 #00 #33 #00 #44 #00 #20 #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 #10 #00 #41 #00 #64 #00 #76 #00 #61 #00 #6E #00 #63 #00 #65 #00 #64 #01 #00 #00 #00 #0A #00 #42 #00 #61 #00 #73 #00 #69 #00 #63 #01 #00 #00 #00 #0C #00 #42 #00 #6C #00 #6F #00 #63 #00 #6B #00 #73 #01 #00 #00 #00 #24 #00 #42 #00 #6F #00 #6F #00 #6C #00 #65 #00 #61 #00 #6E #00 #20 #00 #6F #00 #70 #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #73 #01 #00 #00 #00 #0A #00 #42 #00 #75 #00 #69 #00 #6C #00 #64 #01 #00 #00 #00 #12 #00 #47 #00 #45 #00 #4F #00 #4D #00 #42 #00 #61 #00 #73 #00 #69 #00 #63 #01 #00 #00 #00 #2A #00 #47 #00 #45 #00 #4F #00 #4D #00 #42 #00 #6F #00 #6F #00 #6C #00 #65 #00 #61 #00 #6E #00 #4F #00 #70 #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #73 #01 #00 #00 #00 #12 #00 #47 #00 #45 #00 #4F #00 #4D #00 #42 #00 #75 #00 #69 #00 #6C #00 #64 #01 #00 #00 #00 #1C #00 #47 #00 #45 #00 #4F #00 #4D #00 #47 #00 #65 #00 #6E #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #01 #00 #00 #00 #26 #00 #47 #00 #45 #00 #4F #00 #4D #00 #49 #00 #6D #00 #70 #00 #6F #00 #72 #00 #74 #00 #45 #00 #78 #00 #70 #00 #6F #00 #72 #00 #74 #00 #58 #00 #41 #00 #4F #01 #00 #00 #00 #18 #00 #47 #00 #45 #00 #4F #00 #4D #00 #4D #00 #65 #00 #61 #00 #73 #00 #75 #00 #72 #00 #65 #00 #73 #00 #00 #00 #00 #20 #00 #47 #00 #45 #00 #4F #00 #4D #00 #4D #00 #6F #00 #64 #00 #69 #00 #66 #00 #69 #00 #63 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #01 #00 #00 #00 #1C #00 #47 #00 #45 #00 #4F #00 #4D #00 #4F #00 #70 #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #73 #01 #00 #00 #00 #18 #00 #47 #00 #45 #00 #4F #00 #4D #00 #50 #00 #69 #00 #63 #00 #74 #00 #75 #00 #72 #00 #65 #00 #73 #01 #00 #00 #00 #1C #00 #47 #00 #45 #00 #4F #00 #4D #00 #50 #00 #72 #00 #69 #00 #6D #00 #69 #00 #74 #00 #69 #00 #76 #00 #65 #00 #73 #01 #00 #00 #00 #24 #00 #47 #00 #45 #00 #4F #00 #4D #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 #01 #00 #00 #00 #14 #00 #47 #00 #65 #00 #6E #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #01 #00 #00 #00 #1E #00 #49 #00 #6D #00 #70 #00 #6F #00 #72 #00 #74 #00 #20 #00 #2F #00 #20 #00 #45 #00 #78 #00 #70 #00 #6F #00 #72 #00 #74 #01 #00 #00 #00 #26 #00 #49 #00 #6D #00 #70 #00 #6F #00 #72 #00 #74 #00 #20 #00 #2F #00 #20 #00 #45 #00 #78 #00 #70 #00 #6F #00 #72 #00 #74 #00 #20 #00 #58 #00 #41 #00 #4F #01 #00 #00 #00 #10 #00 #4D #00 #65 #00 #61 #00 #73 #00 #75 #00 #72 #00 #65 #00 #73 #00 #00 #00 #00 #18 #00 #4D #00 #6F #00 #64 #00 #69 #00 #66 #00 #69 #00 #63 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #01 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #32 #00 #4F #00 #43 #00 #43 #00 #56 #00 #69 #00 #65 #00 #77 #00 #65 #00 #72 #00 #33 #00 #44 #00 #56 #00 #69 #00 #65 #00 #77 #00 #4F #00 #70 #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #73 #01 #00 #00 #00 #14 #00 #4F #00 #70 #00 #65 #00 #72 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #73 #01 #00 #00 #00 #10 #00 #50 #00 #69 #00 #63 #00 #74 #00 #75 #00 #72 #00 #65 #00 #73 #01 #00 #00 #00 #14 #00 #50 #00 #72 #00 #69 #00 #6D #00 #69 #00 #74 #00 #69 #00 #76 #00 #65 #00 #73 #01 #00 #00 #00 #1A #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #1C #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #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 #1A #00 #54 #00 #4F #00 #4F #00 #4C #00 #5F #00 #41 #00 #44 #00 #56 #00 #41 #00 #4E #00 #43 #00 #45 #00 #44 #01 #00 #00 #00 #16 #00 #54 #00 #4F #00 #4F #00 #4C #00 #5F #00 #42 #00 #4C #00 #4F #00 #43 #00 #4B #00 #53 #01 #00 #00 #00 #1C #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 #01 #01 #00 #00 #00 #08 #00 #00 #00 #36 #00 #67 #00 #65 #00 #6F #00 #6D #00 #43 #00 #72 #00 #65 #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #49 #00 #6E #00 #66 #00 #6F #00 #72 #00 #6D #00 #61 #00 #74 #00 #69 #00 #6F #00 #6E #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #18 #00 #6E #00 #6F #00 #74 #00 #65 #00 #42 #00 #6F #00 #6F #00 #6B #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #22 #00 #6F #00 #62 #00 #6A #00 #65 #00 #63 #00 #74 #00 #42 #00 #72 #00 #6F #00 #77 #00 #73 #00 #65 #00 #72 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #22 #00 #70 #00 #79 #00 #74 #00 #68 #00 #6F #00 #6E #00 #43 #00 #6F #00 #6E #00 #73 #00 #6F #00 #6C #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #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 #12 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #00 #31 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01"/>
  </section>
 </document>
diff --git a/resources/VTKPlugin.xml b/resources/VTKPlugin.xml
new file mode 100644 (file)
index 0000000..de58fd0
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version='1.0' encoding='us-ascii'?>
+<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
+<!--
+  Copyright (C) 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, or (at your option) any 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
+
+-->
+
+<!--  GUI customization for GEOM component  -->
+
+<geom-plugins>
+
+  <geom-plugin name="VTKPlugin"
+               server-lib="VTKPluginEngine"
+               gui-lib="VTKPluginGUI">
+    <actions>
+      <action label="Export_VTK"
+              menu="FILE/EXPORT:10/EXPORTVTK"
+              status-bar="EXPORTVTK">
+      </action>
+    </actions>
+  </geom-plugin>
+
+</geom-plugins>
diff --git a/resources/XAOPlugin.xml b/resources/XAOPlugin.xml
new file mode 100644 (file)
index 0000000..c001371
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version='1.0' encoding='us-ascii'?>
+<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
+<!--
+  Copyright (C) 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, or (at your option) any 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
+
+-->
+
+<!--  GUI customization for GEOM component  -->
+
+<geom-plugins>
+
+  <geom-plugin name="XAOPlugin"
+               server-lib="XAOPluginEngine"
+               gui-lib="XAOPluginGUI">
+    <actions>
+      <action label="Import_XAO"
+              menu="FILE/IMPORT:10/IMPORTXAO"
+              status-bar="IMPORTXAO">
+      </action>
+      <action label="Export_XAO"
+              menu="FILE/EXPORT:10/EXPORTXAO"
+              status-bar="EXPORTXAO">
+      </action>
+    </actions>
+  </geom-plugin>
+
+</geom-plugins>
index 270b1e60dfbe83732f371011e41e93d178255836..8745b3c3e4738655c5957761068cf084cf4194a2 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-#include "GEOM_AdvancedEngine.hxx"
-
-#include "AdvancedEngine_OperationsCreator.hh"
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
+#include "AdvancedEngine.hxx"
+#include "AdvancedEngine_OperationsCreator.hxx"
 
 extern "C"
 {
-ADVANCEDENGINE_EXPORT
+  ADVANCEDENGINE_EXPORT
   GEOM_GenericOperationsCreator* GetOperationsCreator()
   {
-    //MESSAGE("GetOperationsCreator");
-
-    AdvancedEngine_OperationsCreator* aCreator = new AdvancedEngine_OperationsCreator();
-
-    return aCreator;
+    return new AdvancedEngine_OperationsCreator();
   }
 }
diff --git a/src/AdvancedEngine/AdvancedEngine.hxx b/src/AdvancedEngine/AdvancedEngine.hxx
new file mode 100755 (executable)
index 0000000..b73287b
--- /dev/null
@@ -0,0 +1,36 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&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 _GEOM_ADVANCEDENGINE_HXX_
+#define _GEOM_ADVANCEDENGINE_HXX_
+
+#ifdef WIN32
+ #if defined ADVANCEDENGINE_EXPORTS || defined AdvancedEngine_EXPORTS
+   #define ADVANCEDENGINE_EXPORT __declspec( dllexport )
+ #else
+   #define ADVANCEDENGINE_EXPORT __declspec( dllimport )
+ #endif 
+#else
+   #define ADVANCEDENGINE_EXPORT
+#endif
+
+#endif
\ No newline at end of file
diff --git a/src/AdvancedEngine/AdvancedEngine_DividedDiskDriver.cxx b/src/AdvancedEngine/AdvancedEngine_DividedDiskDriver.cxx
new file mode 100644 (file)
index 0000000..d1391bc
--- /dev/null
@@ -0,0 +1,528 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&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 <Standard_Stream.hxx>
+
+#include "AdvancedEngine_DividedDiskDriver.hxx"
+#include "AdvancedEngine_IDividedDisk.hxx"
+#include "AdvancedEngine_Types.hxx"
+
+#include "GEOM_Function.hxx"
+
+// OCCT includes
+#include <gp_Pnt.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Lin.hxx>
+#include <gp_Circ.hxx>
+#include <gp_Ax1.hxx>
+#include <gp_Ax2.hxx>
+
+#include <BRep_Builder.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
+#include <BRepBuilderAPI_MakeEdge.hxx>
+#include <BRepBuilderAPI_MakeVertex.hxx>
+#include <BRepBuilderAPI_MakeWire.hxx>
+#include <BRepBuilderAPI_Transform.hxx>
+
+#include <Geom_Plane.hxx>
+
+#include <TopoDS.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Edge.hxx>
+
+#include <TFunction_Logbook.hxx>
+#include <StdFail_NotDone.hxx>
+
+#include <TopExp.hxx>
+
+#include <utilities.h>
+
+enum
+{
+  SQUARE,
+  HEXAGON
+};
+
+//=======================================================================
+//function : GetID
+//purpose  :
+//=======================================================================
+const Standard_GUID& AdvancedEngine_DividedDiskDriver::GetID()
+{
+  static Standard_GUID aGUID("0b01da9a-c5da-11e1-8d80-78e7d1879630");
+  return aGUID;
+}
+
+//=======================================================================
+//function : AdvancedEngine_DividedDiskDriver
+//purpose  :
+//=======================================================================
+AdvancedEngine_DividedDiskDriver::AdvancedEngine_DividedDiskDriver()
+{
+}
+
+//=======================================================================
+//function : Execute
+//purpose  :
+//=======================================================================
+Standard_Integer AdvancedEngine_DividedDiskDriver::Execute(TFunction_Logbook& log) const
+{
+  if (Label().IsNull()) return 0;
+  Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
+
+  AdvancedEngine_IDividedDisk aData (aFunction);
+  Standard_Integer aType = aFunction->GetType();
+
+  TopoDS_Shape aShape;
+
+  // Getting data
+  double R       = aData.GetR();
+  double Ratio   = aData.GetRatio();
+  int    Pattern = aData.GetType();
+  
+  // Build reference disk (in the global coordinate system)
+  TopoDS_Shape aDisk;
+  
+  if (Pattern == SQUARE)
+    aDisk = MakeDiskSquare( R, Ratio );
+  else if (Pattern == HEXAGON)
+    aDisk = MakeDiskHexagon( R, Ratio );
+  
+  if (aType == DIVIDEDDISK_R_RATIO) 
+  { 
+    int theOrientation = aData.GetOrientation();        
+    aShape = TransformShape(aDisk, theOrientation);   
+  }
+  else if (aType == DIVIDEDDISK_R_VECTOR_PNT)
+  {
+    Handle(GEOM_Function) aRefPoint  = aData.GetCenter();
+    Handle(GEOM_Function) aRefVector = aData.GetVector();
+    TopoDS_Shape aShapePnt = aRefPoint->GetValue();
+    TopoDS_Shape aShapeVec = aRefVector->GetValue();
+    
+    if (aShapePnt.ShapeType() == TopAbs_VERTEX &&
+        aShapeVec.ShapeType() == TopAbs_EDGE) 
+    {
+      gp_Pnt aPnt = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt));
+      TopoDS_Edge anE = TopoDS::Edge(aShapeVec);
+      TopoDS_Vertex V1, V2;
+      TopExp::Vertices(anE, V1, V2, Standard_True);
+      if (!V1.IsNull() && !V2.IsNull()) 
+      {
+        gp_Vec aVec (BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2));
+        gp_Dir aDir(aVec);
+        aShape = TransformShape(aDisk, aPnt, aDir); 
+      }
+    }   
+  }
+
+  if (aShape.IsNull()) return 0;
+
+  aFunction->SetValue(aShape);
+
+  log.SetTouched(Label());
+
+  return 1;
+}
+
+
+//=======================================================================
+//function : MakeDiskHexagon
+//purpose  :
+//=======================================================================
+TopoDS_Shell AdvancedEngine_DividedDiskDriver::MakeDiskHexagon(double R, double Ratio) const
+{
+  // Geometry
+  gp_Dir ZDir(0,0,1);
+  gp_Dir XDir(1,0,0);
+  gp_Pnt Orig(0,0,0);
+  
+  // Circle
+  gp_Ax1 Ax1(Orig,ZDir);
+  gp_Ax2 Ax(Orig,ZDir,XDir);
+  gp_Circ aCircle(Ax, R);
+  
+  // Points
+//   gp_Pnt P4(0.01*Ratio*R,0,0); 
+//   gp_Pnt P3(R,0,0);
+//   gp_Pnt P2 = P3.Rotated(Ax1,-M_PI/6.0);
+//   gp_Pnt P1(P4.X(), 
+//             P4.X()/sqrt(3.0),0);
+  gp_Pnt P1(0.01*Ratio*R*sqrt(3.0)/2,0,0);
+  gp_Pnt P2(R,0,0);
+  gp_Pnt P3 = P2.Rotated(Ax1,M_PI/6.0);
+  gp_Pnt P4(P1.X(), 
+            P1.X()/sqrt(3.0),0);
+
+  
+  //surfaces
+  gp_Ax2 anAx (gp::XOY());
+  Handle(Geom_Plane) aPlane = new Geom_Plane (anAx);
+  
+  // Topology
+  
+  // Vertices
+  TopoDS_Vertex O  = BRepBuilderAPI_MakeVertex(Orig);
+  TopoDS_Vertex V1_init = BRepBuilderAPI_MakeVertex(P1);
+  TopoDS_Vertex V2_init = BRepBuilderAPI_MakeVertex(P2);
+  TopoDS_Vertex V3 = BRepBuilderAPI_MakeVertex(P3);
+  TopoDS_Vertex V4 = BRepBuilderAPI_MakeVertex(P4);
+  
+  TopoDS_Vertex V1 = V1_init;
+  TopoDS_Vertex V2 = V2_init;
+  
+  //Rotation
+  gp_Trsf myTrsf;
+  myTrsf.SetRotation(Ax1, M_PI/3.0);
+  
+  BRepBuilderAPI_Transform xform(myTrsf);
+  xform.Perform(V1,Standard_True);
+  TopoDS_Vertex V1_60 = TopoDS::Vertex(xform.Shape()); 
+  xform.Perform(V2,Standard_True);
+  TopoDS_Vertex V2_60 = TopoDS::Vertex(xform.Shape());
+  
+  // Declaration of shapes (used in the loop) 
+  TopoDS_Edge E1, E2, E3, E4, E5, E6, E7, E8, E9;
+  TopoDS_Wire W1, W2, W3;
+  TopoDS_Face F1, F2, F3;   
+  TopoDS_Shell S;
+  
+  BRep_Builder aBuilder;
+  aBuilder.MakeShell(S);
+  
+  // Initialisation of edges
+  TopoDS_Edge E1_init = BRepBuilderAPI_MakeEdge(V1,TopoDS::Vertex(V2.Reversed()));
+  E1 = E1_init;
+  TopoDS_Edge E8_init = BRepBuilderAPI_MakeEdge(O,TopoDS::Vertex(V1.Reversed()));
+  E8 = E8_init;
+  
+  for (int i=1;i<=6;i++)
+  { 
+    // Edges
+    
+    // for Face1
+    E2 = BRepBuilderAPI_MakeEdge(aCircle, V2, TopoDS::Vertex(V3.Reversed())); 
+    E3 = BRepBuilderAPI_MakeEdge(V3,TopoDS::Vertex(V4.Reversed()));
+    E4 = BRepBuilderAPI_MakeEdge(V4,TopoDS::Vertex(V1.Reversed()));
+      
+    // for Face2
+    if (i==6)
+    {
+      E5 = BRepBuilderAPI_MakeEdge(aCircle, V3, TopoDS::Vertex(V2_init.Reversed()));
+      E7 = BRepBuilderAPI_MakeEdge(V1_init,TopoDS::Vertex(V4.Reversed()));
+    }
+    else
+    {
+      E5 = BRepBuilderAPI_MakeEdge(aCircle, V3, TopoDS::Vertex(V2_60.Reversed()));
+      E7 = BRepBuilderAPI_MakeEdge(V1_60,TopoDS::Vertex(V4.Reversed()));
+    }    
+    E6 = BRepBuilderAPI_MakeEdge(V2_60,TopoDS::Vertex(V1_60.Reversed()));
+    
+    // for Face3
+    E9 = BRepBuilderAPI_MakeEdge(V1_60,TopoDS::Vertex(O.Reversed()));
+    
+    
+    // Wires
+    
+    //Wire1
+    aBuilder.MakeWire(W1);
+    if (i==1)
+      aBuilder.Add(W1,E1);
+    else
+      aBuilder.Add(W1,TopoDS::Edge(E1.Reversed()));
+    aBuilder.Add(W1,E2);
+    aBuilder.Add(W1,E3);
+    aBuilder.Add(W1,E4);
+    
+    // Wire 2
+    aBuilder.MakeWire(W2);
+    aBuilder.Add(W2,TopoDS::Edge(E3.Reversed()));
+    aBuilder.Add(W2,E5);
+    if (i==6)
+      aBuilder.Add(W2,TopoDS::Edge(E1_init.Reversed()));
+    else
+      aBuilder.Add(W2,E6);
+    aBuilder.Add(W2,E7);
+    
+    // Wire3
+    aBuilder.MakeWire(W3);
+    if (i==1)
+      aBuilder.Add(W3,E8);
+    else 
+      aBuilder.Add(W3,TopoDS::Edge(E8.Reversed()));    
+    aBuilder.Add(W3,TopoDS::Edge(E4.Reversed()));
+    aBuilder.Add(W3,TopoDS::Edge(E7.Reversed()));
+    if (i==6)
+      aBuilder.Add(W3,TopoDS::Edge(E8_init.Reversed()));
+    else
+      aBuilder.Add(W3,E9);
+      
+    // Faces creation
+    F1 = BRepBuilderAPI_MakeFace(aPlane,W1);
+    F2 = BRepBuilderAPI_MakeFace(aPlane,W2);
+    F3 = BRepBuilderAPI_MakeFace(aPlane,W3);
+    
+    //Shell
+    aBuilder.Add(S, F1);
+    aBuilder.Add(S, F2);
+    aBuilder.Add(S, F3);
+          
+    // rotation
+    V1=V1_60;
+    V2=V2_60;
+    
+    xform.Perform(V1_60,Standard_True);
+    V1_60 = TopoDS::Vertex(xform.Shape());
+    xform.Perform(V2_60,Standard_True);
+    V2_60 = TopoDS::Vertex(xform.Shape());
+    xform.Perform(V3,Standard_True);
+    V3    = TopoDS::Vertex(xform.Shape());
+    xform.Perform(V4,Standard_True);
+    V4    = TopoDS::Vertex(xform.Shape());
+    
+    // "Increment" of edges
+    E1=E6;
+    E8=E9;         
+  }
+  
+  return S;
+}
+
+//=======================================================================
+//function : MakeDiskSquare
+//purpose  :
+//=======================================================================
+TopoDS_Shape AdvancedEngine_DividedDiskDriver::MakeDiskSquare(double R, double Ratio) const
+{
+  // Geometry
+  gp_Dir ZDir(0,0,1);
+  gp_Dir XDir(1,0,0);
+  gp_Pnt Orig(0,0,0);
+  
+  // Circle
+  gp_Ax1 Ax1(Orig,ZDir);
+  gp_Ax2 Ax(Orig,ZDir,XDir);
+  gp_Circ aCircle(Ax, R);
+  
+  // Points
+  gp_Pnt P1(0.01*Ratio*R,0,0);
+  gp_Pnt P2(R,0,0);
+  
+  //surfaces
+  gp_Ax2 anAx (gp::XOY());
+  Handle(Geom_Plane) aPlane = new Geom_Plane (anAx);
+  
+  // Topology
+  
+  // Vertices
+  TopoDS_Vertex V1_init = BRepBuilderAPI_MakeVertex(P1);
+  TopoDS_Vertex V2_init = BRepBuilderAPI_MakeVertex(P2);
+  
+  TopoDS_Vertex V1 = V1_init;
+  TopoDS_Vertex V2 = V2_init;
+  
+  //Rotation
+  gp_Trsf myTrsf;
+  myTrsf.SetRotation(Ax1, M_PI/2);
+  
+  BRepBuilderAPI_Transform xform(myTrsf);
+  xform.Perform(V1,Standard_True);
+  TopoDS_Vertex V1_rotated = TopoDS::Vertex(xform.Shape()); 
+  xform.Perform(V2,Standard_True);
+  TopoDS_Vertex V2_rotated = TopoDS::Vertex(xform.Shape());
+  
+  // Declaration of shapes (used in the loop) 
+  TopoDS_Edge E1, E2, E3, E4;
+  TopoDS_Wire W1, W2;
+  TopoDS_Face F1, F2;   
+  TopoDS_Shell S;
+  
+  BRep_Builder aBuilder;
+  aBuilder.MakeWire(W2);  // Central Wire
+  aBuilder.MakeShell(S);  // Shell
+  
+  // Initialisation of edges
+  TopoDS_Edge E1_init = BRepBuilderAPI_MakeEdge(V1,TopoDS::Vertex(V2.Reversed()));
+  E1 = E1_init;
+  
+  for (int i=1;i<=4;i++)
+  { 
+    // Edges
+    // for Face1
+   
+    E3 = BRepBuilderAPI_MakeEdge(V2_rotated,TopoDS::Vertex(V1_rotated.Reversed()));
+    if (i == 4)
+    {
+      E2 = BRepBuilderAPI_MakeEdge(aCircle, V2, TopoDS::Vertex(V2_init.Reversed())); 
+      E4 = BRepBuilderAPI_MakeEdge(V1_init,TopoDS::Vertex(V1.Reversed()));
+    }
+    else
+    {
+      E2 = BRepBuilderAPI_MakeEdge(aCircle, V2, TopoDS::Vertex(V2_rotated.Reversed())); 
+      E4 = BRepBuilderAPI_MakeEdge(V1_rotated,TopoDS::Vertex(V1.Reversed()));
+    }
+    
+    // Wires
+    //Wire1
+    aBuilder.MakeWire(W1);
+    if (i==1)
+      aBuilder.Add(W1,E1);
+    else
+      aBuilder.Add(W1,TopoDS::Edge(E1.Reversed()));
+    aBuilder.Add(W1,E2);
+    if (i==4)
+      aBuilder.Add(W1,TopoDS::Edge(E1_init.Reversed()));
+    else
+      aBuilder.Add(W1,E3);
+    aBuilder.Add(W1,E4);
+    
+    // Wire central
+    aBuilder.Add(W2,TopoDS::Edge(E4.Reversed()));
+    
+    // Faces creation
+    F1 = BRepBuilderAPI_MakeFace(aPlane,W1);
+    
+    //Shell
+    aBuilder.Add(S, F1);
+    
+    // rotation
+    V1=V1_rotated;
+    V2=V2_rotated;
+    
+    xform.Perform(V1_rotated,Standard_True);
+    V1_rotated = TopoDS::Vertex(xform.Shape());
+    xform.Perform(V2_rotated,Standard_True);
+    V2_rotated = TopoDS::Vertex(xform.Shape());
+    
+    // "Increment" of edges
+    E1=E3;        
+  }
+  // Central square Face 
+  F2 = BRepBuilderAPI_MakeFace(aPlane,W2);
+  aBuilder.Add(S, F2);
+  
+  return S;
+}
+
+
+//=======================================================================
+//function :  TrasformShape(TopoDS_Shape aShape,int theOrientation)
+//purpose  :  Perform shape transformation accordingly with specified
+//            orientation
+//=======================================================================
+TopoDS_Shape AdvancedEngine_DividedDiskDriver::TransformShape(TopoDS_Shape theShape, int theOrientation) const
+{
+  gp_Dir N, Vx;
+  gp_Pnt theOrigin = gp::Origin();
+  
+  switch(theOrientation)
+  {
+    case 1:
+    {
+      N = gp::DZ();
+      Vx = gp::DX();
+      break;
+    }
+    case 2:
+    {
+      N = gp::DX();
+      Vx = gp::DY();
+      break;
+    }
+    case 3:
+    {
+      N = gp::DY();
+      Vx = gp::DZ();
+      break;
+    }
+  }
+    
+  gp_Ax3 aWPlane = gp_Ax3(theOrigin, N, Vx);
+  
+  return WPlaneTransform(theShape, aWPlane);
+}
+
+//=======================================================================
+//function :  TrasformShape(TopoDS_Shape aShape, gp_Dir V, gp_Pnt P)
+//purpose  :  Perform shape transformation accordingly with specified
+//            pnt and direction
+//=======================================================================
+TopoDS_Shape AdvancedEngine_DividedDiskDriver::TransformShape(TopoDS_Shape theShape, gp_Pnt P, gp_Dir V) const
+{
+  gp_Ax3 aWPlane( P, V );
+  return WPlaneTransform(theShape, aWPlane);
+}
+
+//=======================================================================
+//function :  WPlaneTransform
+//purpose  :  Perform shape transformation accordingly with the given 
+//            Working Plane  
+//=======================================================================
+TopoDS_Shape AdvancedEngine_DividedDiskDriver::WPlaneTransform(TopoDS_Shape theShape, gp_Ax3 theWPlane) const
+{
+  gp_Trsf aTrans;
+  aTrans.SetTransformation(theWPlane);
+  aTrans.Invert();
+  BRepBuilderAPI_Transform aTransformation (theShape, aTrans, Standard_False);
+  return aTransformation.Shape();
+}
+
+//================================================================================
+/*!
+ * \brief Returns a name of creation operation and names and values of creation parameters
+ */
+//================================================================================
+
+bool AdvancedEngine_DividedDiskDriver::
+GetCreationInformation(std::string&             theOperationName,
+                       std::vector<GEOM_Param>& theParams)
+{
+  if (Label().IsNull()) return 0;
+  Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
+
+  AdvancedEngine_IDividedDisk aCI( function );
+  Standard_Integer aType = function->GetType();
+
+  theOperationName = "DIVIDEDDISK";
+
+  switch ( aType ) {
+  case DIVIDEDDISK_R_RATIO:
+    AddParam( theParams, "Radius", aCI.GetR() );
+    AddParam( theParams, "Ratio", aCI.GetRatio() );
+    AddParam( theParams, "Orientation", aCI.GetOrientation() );
+    AddParam( theParams, "Division pattern", aCI.GetType() );
+    break;
+  case DIVIDEDDISK_R_VECTOR_PNT:
+    AddParam( theParams, "Center Point", aCI.GetCenter() );
+    AddParam( theParams, "Vector", aCI.GetVector() );
+    AddParam( theParams, "Radius", aCI.GetR() );
+    AddParam( theParams, "Division pattern", aCI.GetType() );
+    break;
+  default:
+    return false;
+  }
+  
+  return true;
+}
+
+IMPLEMENT_STANDARD_HANDLE (AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver);
diff --git a/src/AdvancedEngine/AdvancedEngine_DividedDiskDriver.hxx b/src/AdvancedEngine/AdvancedEngine_DividedDiskDriver.hxx
new file mode 100644 (file)
index 0000000..9bda25f
--- /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
+//
+
+#ifndef _AdvancedEngine_DividedDiskDriver_HXX
+#define _AdvancedEngine_DividedDiskDriver_HXX
+
+#include "GEOM_BaseDriver.hxx"
+
+#include <TFunction_Driver.hxx>
+
+class TopoDS_Shape;
+class TopoDS_Shell;
+class gp_Pnt;
+class gp_Dir;
+class gp_Ax3;
+
+DEFINE_STANDARD_HANDLE( AdvancedEngine_DividedDiskDriver, GEOM_BaseDriver );
+
+class AdvancedEngine_DividedDiskDriver : public GEOM_BaseDriver
+{
+public:
+ // Methods PUBLIC
+  // 
+  AdvancedEngine_DividedDiskDriver();
+  virtual  Standard_Integer Execute(TFunction_Logbook& log) const; 
+  virtual void Validate(TFunction_Logbook&) const {}
+  Standard_Boolean MustExecute(const TFunction_Logbook&) const
+  {
+    return Standard_True;
+  }
+  static const Standard_GUID& GetID();
+  ~AdvancedEngine_DividedDiskDriver() {};
+  virtual bool GetCreationInformation(std::string&             theOperationName,
+                                     std::vector<GEOM_Param>& params);
+private:
+  TopoDS_Shape TransformShape  (TopoDS_Shape aShape, int theOrientation) const;
+  TopoDS_Shape TransformShape  (TopoDS_Shape aShape, gp_Pnt P, gp_Dir V) const;
+  TopoDS_Shape WPlaneTransform (TopoDS_Shape aShape, gp_Ax3 theWPlane) const;
+  TopoDS_Shell MakeDiskHexagon (double R, double Ratio) const;
+  TopoDS_Shape MakeDiskSquare  (double R, double Ratio) const;
+
+  DEFINE_STANDARD_RTTI( AdvancedEngine_DividedDiskDriver )
+};
+
+#endif // _AdvancedEngine_DividedDiskDriver_HXX
diff --git a/src/AdvancedEngine/AdvancedEngine_IDividedDisk.hxx b/src/AdvancedEngine/AdvancedEngine_IDividedDisk.hxx
new file mode 100644 (file)
index 0000000..c0f7e9c
--- /dev/null
@@ -0,0 +1,64 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&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 _AdvancedEngine_IDividedDisk_HXX_
+#define _AdvancedEngine_IDividedDisk_HXX_
+
+#include "GEOM_Function.hxx"
+
+#define DIVIDEDDISK_ARG_R      1
+#define DIVIDEDDISK_ARG_RATIO  2
+#define DIVIDEDDISK_ARG_ORIENT 3
+
+#define DIVIDEDDISK_ARG_CENTER 4
+#define DIVIDEDDISK_ARG_VECTOR 5
+
+#define DIVIDEDDISK_ARG_TYPE 6
+
+class AdvancedEngine_IDividedDisk
+{
+public:
+  AdvancedEngine_IDividedDisk(Handle(GEOM_Function) theFunction): _func(theFunction) {}
+
+  void SetR(double theR) { _func->SetReal(DIVIDEDDISK_ARG_R, theR); }
+  double GetR() { return _func->GetReal(DIVIDEDDISK_ARG_R); }
+
+  void SetRatio(double theRatio) { _func->SetReal(DIVIDEDDISK_ARG_RATIO, theRatio); }
+  double GetRatio() { return _func->GetReal(DIVIDEDDISK_ARG_RATIO); }
+  
+  void SetOrientation(int theOrientation) { _func->SetInteger(DIVIDEDDISK_ARG_ORIENT, theOrientation); }
+  int GetOrientation() { return _func->GetInteger(DIVIDEDDISK_ARG_ORIENT); }
+  
+  void SetType(int theType) { _func->SetInteger(DIVIDEDDISK_ARG_TYPE, theType); }
+  int GetType() { return _func->GetInteger(DIVIDEDDISK_ARG_TYPE); }
+  
+  void SetCenter(Handle(GEOM_Function) theP) { _func->SetReference(DIVIDEDDISK_ARG_CENTER, theP); }
+  void SetVector(Handle(GEOM_Function) theV) { _func->SetReference(DIVIDEDDISK_ARG_VECTOR, theV); }
+  
+  Handle(GEOM_Function) GetCenter() { return _func->GetReference(DIVIDEDDISK_ARG_CENTER); }
+  Handle(GEOM_Function) GetVector() { return _func->GetReference(DIVIDEDDISK_ARG_VECTOR); }
+
+private:
+  Handle(GEOM_Function) _func;
+};
+
+#endif // _AdvancedEngine_IDividedDisk_HXX_
diff --git a/src/AdvancedEngine/AdvancedEngine_IOperations.cxx b/src/AdvancedEngine/AdvancedEngine_IOperations.cxx
new file mode 100644 (file)
index 0000000..e713e00
--- /dev/null
@@ -0,0 +1,3477 @@
+// 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, or (at your option) any 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   : AdvancedEngine_IOperations.cxx
+//  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
+
+#include "AdvancedEngine_IOperations.hxx"
+#include "AdvancedEngine_PipeTShapeDriver.hxx"
+#include "AdvancedEngine_IPipeTShape.hxx"
+#include "AdvancedEngine_DividedDiskDriver.hxx"
+#include "AdvancedEngine_IDividedDisk.hxx"
+#include "AdvancedEngine_SmoothingSurfaceDriver.hxx"
+#include "AdvancedEngine_ISmoothingSurface.hxx"
+
+#include <Basics_OCCTVersion.hxx>
+
+#include <utilities.h>
+#include <OpUtil.hxx>
+#include <Utils_ExceptHandlers.hxx>
+
+#include "GEOM_Function.hxx"
+#include "GEOM_PythonDump.hxx"
+#include "GEOMUtils.hxx"
+#include "GEOMAlgo_Splitter.hxx"
+#include "GEOMAlgo_FinderShapeOn1.hxx"
+
+#include "GEOMImpl_Gen.hxx"
+#include "GEOMImpl_Types.hxx"
+
+#include "GEOMImpl_IBasicOperations.hxx"
+#include "GEOMImpl_IBooleanOperations.hxx"
+#include "GEOMImpl_IShapesOperations.hxx"
+#include "GEOMImpl_ITransformOperations.hxx"
+#include "GEOMImpl_IBlocksOperations.hxx"
+#include "GEOMImpl_I3DPrimOperations.hxx"
+#include "GEOMImpl_ILocalOperations.hxx"
+#include "GEOMImpl_IHealingOperations.hxx"
+#include "GEOMImpl_IGroupOperations.hxx"
+#include "GEOMImpl_GlueDriver.hxx"
+
+#include <TDF_Tool.hxx>
+#include <TFunction_DriverTable.hxx>
+#include <TFunction_Driver.hxx>
+#include <TFunction_Logbook.hxx>
+#include <TNaming_CopyShape.hxx>
+
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TColStd_IndexedDataMapOfTransientTransient.hxx>
+
+#include <BRep_Builder.hxx>
+#include <BRep_Tool.hxx>
+
+#include <BRepAdaptor_Surface.hxx>
+#include <BRepAlgoAPI_Cut.hxx>
+#include <BRepAlgoAPI_Fuse.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
+#include <BRepBuilderAPI_MakeVertex.hxx>
+#include <BRepBuilderAPI_Transform.hxx>
+#include <BRepPrimAPI_MakeCone.hxx>
+#include <BRepPrimAPI_MakeCylinder.hxx>
+
+#include <gp_Ax3.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Vec.hxx>
+#include <GC_MakeConicalSurface.hxx>
+#include <Geom_CylindricalSurface.hxx>
+
+#include <ShapeAnalysis_Edge.hxx>
+
+#include <cmath>
+
+#include "AdvancedEngine_Types.hxx"
+
+#include <Standard_Stream.hxx>
+#include <Standard_Failure.hxx>
+#include <StdFail_NotDone.hxx>
+#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
+
+#define HALF_LENGTH_MAIN_PIPE     "Main pipe half length" //"Tuyau principal - demi longueur"
+#define HALF_LENGTH_INCIDENT_PIPE "Incident pipe half length" //"Tuyau incident - demi longueur"
+#define CIRCULAR_QUARTER_PIPE     "Circular quarter of pipe" //"Circulaire - quart de tuyau"
+#define THICKNESS                 "Thickness" //"Epaisseur"
+#define FLANGE                    "Flange" // "Collerette"
+#define CHAMFER_OR_FILLET         "Chamfer or fillet" //"Chanfrein ou Raccord"
+#define JUNCTION_FACE_1           "Junction 1" //"Face de jonction 1"
+#define JUNCTION_FACE_2           "Junction 2" //"Face de jonction 2"
+#define JUNCTION_FACE_3           "Junction 3" //"Face de jonction 3"
+
+#define FIND_GROUPS_BY_POINTS 1
+
+//=============================================================================
+/*!
+ *  Constructor
+ */
+//=============================================================================
+AdvancedEngine_IOperations::AdvancedEngine_IOperations(GEOM_Engine* theEngine, int theDocID) :
+  GEOM_IOperations(theEngine, theDocID)
+{
+  MESSAGE("AdvancedEngine_IOperations::AdvancedEngine_IOperations");
+  myBasicOperations     = new GEOMImpl_IBasicOperations(GetEngine(), GetDocID());
+  myBooleanOperations   = new GEOMImpl_IBooleanOperations(GetEngine(), GetDocID());
+  myShapesOperations    = new GEOMImpl_IShapesOperations(GetEngine(), GetDocID());
+  myTransformOperations = new GEOMImpl_ITransformOperations(GetEngine(), GetDocID());
+  myBlocksOperations    = new GEOMImpl_IBlocksOperations(GetEngine(), GetDocID());
+  my3DPrimOperations    = new GEOMImpl_I3DPrimOperations(GetEngine(), GetDocID());
+  myLocalOperations     = new GEOMImpl_ILocalOperations(GetEngine(), GetDocID());
+  myHealingOperations   = new GEOMImpl_IHealingOperations(GetEngine(), GetDocID());
+  myGroupOperations     = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
+}
+
+//=============================================================================
+/*!
+ *  Destructor
+ */
+//=============================================================================
+AdvancedEngine_IOperations::~AdvancedEngine_IOperations()
+{
+  MESSAGE("AdvancedEngine_IOperations::~AdvancedEngine_IOperations");
+  delete myBasicOperations;
+  delete myBooleanOperations;
+  delete myShapesOperations;
+  delete myTransformOperations;
+  delete myBlocksOperations;
+  delete my3DPrimOperations;
+  delete myLocalOperations;
+  delete myHealingOperations;
+  delete myGroupOperations;
+}
+
+//=============================================================================
+/*!
+ *  SetPosition
+ */
+//=============================================================================
+gp_Trsf AdvancedEngine_IOperations::GetPositionTrsf(double theL1, double theL2,
+                                                   Handle(GEOM_Object) theP1,
+                                                   Handle(GEOM_Object) theP2,
+                                                   Handle(GEOM_Object) theP3)
+{
+  // Old Local Coordinates System oldLCS
+  gp_Pnt P0(0, 0, 0);
+  gp_Pnt P1(-theL1, 0, 0);
+  gp_Pnt P2(theL1, 0, 0);
+  gp_Pnt P3(0, 0, theL2);
+
+  gp_Dir oldX(gp_Vec(P1, P2));
+  gp_Dir oldZ(gp_Vec(P0, P3));
+  gp_Ax3 oldLCS(P0, oldZ, oldX);
+
+  // New Local Coordinates System newLCS
+  double LocX, LocY, LocZ;
+  gp_Pnt newP1 = BRep_Tool::Pnt(TopoDS::Vertex(theP1->GetValue()));
+  gp_Pnt newP2 = BRep_Tool::Pnt(TopoDS::Vertex(theP2->GetValue()));
+  gp_Pnt newP3 = BRep_Tool::Pnt(TopoDS::Vertex(theP3->GetValue()));
+  LocX = (newP1.X() + newP2.X()) / 2.;
+  LocY = (newP1.Y() + newP2.Y()) / 2.;
+  LocZ = (newP1.Z() + newP2.Z()) / 2.;
+  gp_Pnt newO(LocX, LocY, LocZ);
+
+  gp_Dir newX(gp_Vec(newP1, newP2)); // P1P2 Vector
+  gp_Dir newZ(gp_Vec(newO, newP3)); // OP3 Vector
+  gp_Ax3 newLCS = gp_Ax3(newO, newZ, newX);
+
+  gp_Trsf aTrsf;
+  aTrsf.SetDisplacement(oldLCS, newLCS);
+
+  return aTrsf;
+}
+
+//=============================================================================
+/*!
+ *  CheckCompatiblePosition
+ *
+ */
+//=============================================================================
+bool AdvancedEngine_IOperations::CheckCompatiblePosition(double& theL1, double& theL2,
+                                                        Handle(GEOM_Object) theP1,
+                                                        Handle(GEOM_Object) theP2,
+                                                        Handle(GEOM_Object) theP3,
+                                                        double theTolerance)
+{
+  SetErrorCode(KO);
+  gp_Pnt P1 = BRep_Tool::Pnt(TopoDS::Vertex(theP1->GetValue()));
+  gp_Pnt P2 = BRep_Tool::Pnt(TopoDS::Vertex(theP2->GetValue()));
+  gp_Pnt P3 = BRep_Tool::Pnt(TopoDS::Vertex(theP3->GetValue()));
+
+  double d12 = P1.Distance(P2);
+  double d13 = P1.Distance(P3);
+  double d23 = P2.Distance(P3);
+  //    double d2 = newO.Distance(P3);
+
+  if (Abs(d12) <= Precision::Confusion()) {
+    SetErrorCode("Junctions points P1 and P2 are identical");
+    return false;
+  }
+  if (Abs(d13) <= Precision::Confusion()) {
+    SetErrorCode("Junctions points P1 and P3 are identical");
+    return false;
+  }
+  if (Abs(d23) <= Precision::Confusion()) {
+    SetErrorCode("Junctions points P2 and P3 are identical");
+    return false;
+  }
+
+
+  double newL1 = 0.5 * d12;
+  double newL2 = sqrt(pow(d13,2)-pow(newL1,2));
+  //
+  // theL1*(1-theTolerance) <= newL1 <= theL1*(1+theTolerance)
+  //
+  if (fabs(newL1 - theL1) > Precision::Approximation()) {
+    if ( (newL1 * (1 - theTolerance) -theL1 <= Precision::Approximation()) &&
+         (newL1 * (1 + theTolerance) -theL1 >= Precision::Approximation()) ) {
+      //            std::cerr << "theL1 = newL1" << std::endl;
+      theL1 = newL1;
+    } else {
+      theL1 = -1;
+      SetErrorCode("Dimension for main pipe (L1) is incompatible with new position");
+      return false;
+    }
+  }
+
+  //
+  // theL2*(1-theTolerance) <= newL2  <= theL2*(1+theTolerance)
+  //
+  if (fabs(newL2 - theL2) > Precision::Approximation()) {
+    if ( (newL2 * (1 - theTolerance) -theL2 <= Precision::Approximation()) &&
+         (newL2 * (1 + theTolerance) -theL2 >= Precision::Approximation()) ) {
+      theL2 = newL2;
+    } else {
+      theL2 = -1;
+      SetErrorCode("Dimension for incident pipe (L2) is incompatible with new position");
+      return false;
+    }
+  }
+
+  SetErrorCode(OK);
+  return true;
+
+}
+
+//=============================================================================
+/*!
+ *  Generate the propagation groups of a Pipe T-Shape used for hexa mesh
+ */
+//=============================================================================
+bool AdvancedEngine_IOperations::MakeGroups(Handle(GEOM_Object) theShape, int shapeType,
+                                           double theR1, double theW1, double theL1,
+                                           double theR2, double theW2, double theL2,
+                                           double theH, double theW, double theRF,
+                                           Handle(TColStd_HSequenceOfTransient) theSeq,
+                                           gp_Trsf aTrsf)
+{
+  SetErrorCode(KO);
+
+  if (theShape.IsNull()) return false;
+
+  TopoDS_Shape aShape = theShape->GetValue();
+  if (aShape.IsNull()) {
+    SetErrorCode("Shape is not defined");
+    return false;
+  }
+
+  gp_Trsf aTrsfInv = aTrsf.Inverted();
+
+//   int expectedGroups = 0;
+//   if (shapeType == TSHAPE_BASIC)
+//     if (Abs(theR2+theW2-theR1-theW1) <= Precision::Approximation())
+//       expectedGroups = 10;
+//     else
+//       expectedGroups = 11;
+//   else if (shapeType == TSHAPE_CHAMFER || shapeType == TSHAPE_FILLET)
+//     expectedGroups = 12;
+
+  double aR1Ext = theR1 + theW1;
+  double aR2Ext = theR2 + theW2;
+
+  /////////////////////////
+  //// Groups of Faces ////
+  /////////////////////////
+
+  //
+  // Comment the following lines when GetInPlace bug is solved
+  // == BEGIN
+  // Workaround of GetInPlace bug
+  // Create a bounding box that fits the shape
+  Handle(GEOM_Object) aBox = my3DPrimOperations->MakeBoxDXDYDZ(2*theL1, 2*aR1Ext, aR1Ext+theL2);
+  aBox->GetLastFunction()->SetDescription("");
+  myTransformOperations->TranslateDXDYDZ(aBox, -theL1, -aR1Ext, -aR1Ext);
+  aBox->GetLastFunction()->SetDescription("");
+  // Apply transformation to box
+  BRepBuilderAPI_Transform aTransformationBox(aBox->GetValue(), aTrsf, Standard_False);
+  TopoDS_Shape aBoxShapeTrsf = aTransformationBox.Shape();
+  aBox->GetLastFunction()->SetValue(aBoxShapeTrsf);
+
+  // Get the shell of the box
+  Handle(GEOM_Object) aShell = Handle(GEOM_Object)::DownCast
+    (myShapesOperations->MakeExplode(aBox, TopAbs_SHELL, true)->Value(1));
+  aBox->GetLastFunction()->SetDescription("");
+  aShell->GetLastFunction()->SetDescription("");
+  // Get the common shapes between shell and shape
+  Handle(GEOM_Object) aCommonCompound = myBooleanOperations->MakeBoolean
+                            (theShape, aShell, 1, Standard_False); // MakeCommon
+  if (aCommonCompound.IsNull()) {
+    SetErrorCode(myBooleanOperations->GetErrorCode());
+    return false;
+  }
+  aCommonCompound->GetLastFunction()->SetDescription("");
+  // Explode the faces of common shapes => 3 faces
+  Handle(TColStd_HSequenceOfTransient) aCommonFaces =
+    myShapesOperations->MakeExplode(aCommonCompound, TopAbs_FACE, true);
+  aCommonCompound->GetLastFunction()->SetDescription("");
+  std::list<Handle(GEOM_Object)> aCompoundOfFacesList;
+
+  for (int i=0 ; i<= aCommonFaces->Length()-4 ; i+=4) {
+    std::list<Handle(GEOM_Object)> aFacesList;
+    for (int j = 1 ; j <= 4 ; j++) {
+      Handle(GEOM_Object) aFace = Handle(GEOM_Object)::DownCast(aCommonFaces->Value(i+j)); // Junction faces
+      if (!aFace.IsNull()) {
+        aFace->GetLastFunction()->SetDescription("");
+        aFacesList.push_back(aFace);
+      }
+    }
+    Handle(GEOM_Object) aCompoundOfFaces = myShapesOperations->MakeCompound(aFacesList);
+    if (!aCompoundOfFaces.IsNull()) {
+      aCompoundOfFaces->GetLastFunction()->SetDescription("");
+      aCompoundOfFacesList.push_back(aCompoundOfFaces);
+    }
+  }
+
+  if (aCompoundOfFacesList.size() == 3) {
+    Handle(GEOM_Object) aPln1 = aCompoundOfFacesList.front();
+    aCompoundOfFacesList.pop_front();
+    Handle(GEOM_Object) aPln2 = aCompoundOfFacesList.front();
+    aCompoundOfFacesList.pop_front();
+    Handle(GEOM_Object) aPln3 = aCompoundOfFacesList.front();
+    aCompoundOfFacesList.pop_front();
+    // == END
+    //
+
+
+    //     Uncomment the following lines when GetInPlace bug is solved
+    //     == BEGIN
+//     Handle(GEOM_Object) aP1 = myBasicOperations->MakePointXYZ(-theL1, 0, 0);
+//     Handle(GEOM_Object) aP2 = myBasicOperations->MakePointXYZ(-0, 0, theL2);
+//     Handle(GEOM_Object) aP3 = myBasicOperations->MakePointXYZ(theL1, 0, 0);
+//     aP1->GetLastFunction()->SetDescription("");
+//     aP2->GetLastFunction()->SetDescription("");
+//     aP3->GetLastFunction()->SetDescription("");
+//     Handle(GEOM_Object) aV1 = myBasicOperations->MakeVectorDXDYDZ(-1, 0, 0);
+//     Handle(GEOM_Object) aV2 = myBasicOperations->MakeVectorDXDYDZ(0, 0, 1);
+//     Handle(GEOM_Object) aV3 = myBasicOperations->MakeVectorDXDYDZ(1, 0, 0);
+//     aV1->GetLastFunction()->SetDescription("");
+//     aV2->GetLastFunction()->SetDescription("");
+//     aV3->GetLastFunction()->SetDescription("");
+//     Handle(GEOM_Object) aPln1 = myBasicOperations->MakePlanePntVec(aP1, aV1, 2*(aR1Ext+theL2));
+//     Handle(GEOM_Object) aPln2 = myBasicOperations->MakePlanePntVec(aP2, aV2, 2*(aR2Ext));
+//     Handle(GEOM_Object) aPln3 = myBasicOperations->MakePlanePntVec(aP3, aV3, 2*(aR1Ext+theL2));
+//     aPln1->GetLastFunction()->SetDescription("");
+//     aPln2->GetLastFunction()->SetDescription("");
+//     aPln3->GetLastFunction()->SetDescription("");
+//
+//     BRepBuilderAPI_Transform aTransformation1(aPln1->GetValue(), aTrsf, Standard_False);
+//     TopoDS_Shape aTrsf_Shape1 = aTransformation1.Shape();
+//     aPln1->GetLastFunction()->SetValue(aTrsf_Shape1);
+//     BRepBuilderAPI_Transform aTransformation2(aPln2->GetValue(), aTrsf, Standard_False);
+//     TopoDS_Shape aTrsf_Shape2 = aTransformation2.Shape();
+//     aPln2->GetLastFunction()->SetValue(aTrsf_Shape2);
+//     BRepBuilderAPI_Transform aTransformation3(aPln3->GetValue(), aTrsf, Standard_False);
+//     TopoDS_Shape aTrsf_Shape3 = aTransformation3.Shape();
+//     aPln3->GetLastFunction()->SetValue(aTrsf_Shape3);
+    //     == END
+    //
+
+    Handle(GEOM_Object) junctionFaces1 = myShapesOperations->GetInPlace(theShape, aPln1);
+    if (junctionFaces1.IsNull())
+      junctionFaces1 = myShapesOperations->GetShapesOnShapeAsCompound
+        (aPln1, theShape, TopAbs_FACE,  GEOMAlgo_ST_ONIN);
+    if (!junctionFaces1.IsNull()) {
+      junctionFaces1->GetLastFunction()->SetDescription("");
+      junctionFaces1->SetName("JUNCTION_FACE_1");
+      theSeq->Append(junctionFaces1);
+    }
+    else {
+      SetErrorCode("Junction face 1 not found");
+      //        theSeq->Append(aPln1);
+      //        return false;
+    }
+    Handle(GEOM_Object) junctionFaces2 = myShapesOperations->GetInPlace(theShape, aPln2);
+    if (junctionFaces2.IsNull())
+      junctionFaces2 = myShapesOperations->GetShapesOnShapeAsCompound
+        (aPln2, theShape, TopAbs_FACE,  GEOMAlgo_ST_ONIN);
+    if (!junctionFaces2.IsNull()) {
+      junctionFaces2->GetLastFunction()->SetDescription("");
+      junctionFaces2->SetName("JUNCTION_FACE_2");
+      theSeq->Append(junctionFaces2);
+    }
+    else {
+      SetErrorCode("Junction face 2 not found");
+      //        theSeq->Append(aPln2);
+      //        return false;
+    }
+    Handle(GEOM_Object) junctionFaces3 = myShapesOperations->GetInPlace(theShape, aPln3);
+    if (junctionFaces3.IsNull())
+      junctionFaces3 = myShapesOperations->GetShapesOnShapeAsCompound
+        (aPln3, theShape, TopAbs_FACE,  GEOMAlgo_ST_ONIN);
+    if (!junctionFaces3.IsNull()) {
+      junctionFaces3->GetLastFunction()->SetDescription("");
+      junctionFaces3->SetName("JUNCTION_FACE_3");
+      theSeq->Append(junctionFaces3);
+    }
+    else {
+      SetErrorCode("Junction face 3 not found");
+      //        theSeq->Append(aPln3);
+      //        return false;
+    }
+  // Comment the following lines when GetInPlace bug is solved
+  // == BEGIN
+  }
+  //     == END
+
+  /////////////////////////
+  //// Groups of Edges ////
+  /////////////////////////
+  // Result of propagate
+
+  Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
+
+  TCollection_AsciiString theDesc = aFunction->GetDescription();
+  Handle(TColStd_HSequenceOfTransient) aSeqPropagate = myBlocksOperations->Propagate(theShape);
+  if (aSeqPropagate.IsNull() || aSeqPropagate->Length() == 0) {
+    SetErrorCode("Propagation groups not found");
+    return false;
+  }
+  Standard_Integer aNbGroups = aSeqPropagate->Length();
+  // Recover previous description to get rid of Propagate dump
+  aFunction->SetDescription(theDesc);
+
+#ifdef FIND_GROUPS_BY_POINTS
+  // BEGIN: new groups search
+
+  //              W2  R2
+  //            .----.-----.----.
+  //           e|    |  |  |    |
+  //            |    |  |  |    |
+  //            .    |  |  |    .
+  //         g / ''..|  |  |..'' \
+  //       f  /      '''''''      \
+  //  .---.--'..     |  |  |     ..'--.---.
+  //  |a    \   '''...........'''   /     |
+  //  |-------\------'  |  '------/-------.
+  //  |         \       |       /         |
+  // c|           \     |     /           |
+  //  |    R1       \   |   /             |
+  //  |               \ | /               |
+  //  ._________________|_________________.
+  //  |       L1        |                 |
+  //  |                 |                 |
+  //  |                 |                 |
+  // b|                 |                 |
+  //  |                 |                 |
+  //  |-----------------|-----------------|
+  //  |    W1           |                 |
+  //  '-----------------'-----------------'
+  //          d
+
+  // "Thickness" group (a)
+  gp_Pnt aPntA (-theL1, 0, theR1 + theW1/2.);
+  aPntA.Transform(aTrsf);
+  BRepBuilderAPI_MakeVertex mkVertexA (aPntA);
+  TopoDS_Vertex aVertA = TopoDS::Vertex(mkVertexA.Shape());
+  TopoDS_Shape anEdgeA = GEOMUtils::GetEdgeNearPoint(aShape, aVertA);
+
+  // "Circular quarter of pipe" group (b)
+  gp_Pnt aPntB (-theL1, -aR1Ext * sin(M_PI/4.), -aR1Ext * sin(M_PI/4.));
+  aPntB.Transform(aTrsf);
+  BRepBuilderAPI_MakeVertex mkVertexB (aPntB);
+  TopoDS_Vertex aVertB = TopoDS::Vertex(mkVertexB.Shape());
+  TopoDS_Shape anEdgeB = GEOMUtils::GetEdgeNearPoint(aShape, aVertB);
+
+  // "Circular quarter of pipe" group (c)
+  gp_Pnt aPntC (-theL1, -aR1Ext * sin(M_PI/4.), aR1Ext * sin(M_PI/4.));
+  aPntC.Transform(aTrsf);
+  BRepBuilderAPI_MakeVertex mkVertexC (aPntC);
+  TopoDS_Vertex aVertC = TopoDS::Vertex(mkVertexC.Shape());
+  TopoDS_Shape anEdgeC = GEOMUtils::GetEdgeNearPoint(aShape, aVertC);
+
+  // "Main pipe half length" group (d)
+  gp_Pnt aPntD (-theL1/2., 0, -aR1Ext);
+  aPntD.Transform(aTrsf);
+  BRepBuilderAPI_MakeVertex mkVertexD (aPntD);
+  TopoDS_Vertex aVertD = TopoDS::Vertex(mkVertexD.Shape());
+  TopoDS_Shape anEdgeD = GEOMUtils::GetEdgeNearPoint(aShape, aVertD);
+
+  // "Incident pipe half length" group (e)
+  double aTol10 = Precision::Confusion() * 10.;
+  gp_Pnt aPntE (-aR2Ext, 0, theL2 - aTol10);
+  aPntE.Transform(aTrsf);
+  BRepBuilderAPI_MakeVertex mkVertexE (aPntE);
+  TopoDS_Vertex aVertE = TopoDS::Vertex(mkVertexE.Shape());
+  TopoDS_Shape anEdgeE = GEOMUtils::GetEdgeNearPoint(aShape, aVertE);
+
+  // "Flange" group (f)
+  double aFx = - aR2Ext - aTol10;
+  if (shapeType == TSHAPE_CHAMFER)
+    aFx -= theW;
+  else if (shapeType == TSHAPE_FILLET)
+    aFx -= theRF;
+  gp_Pnt aPntF (aFx, 0, aR1Ext);
+  aPntF.Transform(aTrsf);
+  BRepBuilderAPI_MakeVertex mkVertexF (aPntF);
+  TopoDS_Vertex aVertF = TopoDS::Vertex(mkVertexF.Shape());
+  TopoDS_Shape anEdgeF = GEOMUtils::GetEdgeNearPoint(aShape, aVertF);
+
+  // "Chamfer or Fillet" group (g)
+  TopoDS_Shape anEdgeG;
+  if (shapeType == TSHAPE_CHAMFER) {
+    gp_Pnt aPntG (-aR2Ext - theW/2., 0, aR1Ext + theH/2.);
+    aPntG.Transform(aTrsf);
+    BRepBuilderAPI_MakeVertex mkVertexG (aPntG);
+    TopoDS_Vertex aVertG = TopoDS::Vertex(mkVertexG.Shape());
+    anEdgeG = GEOMUtils::GetEdgeNearPoint(aShape, aVertG);
+  }
+  else if (shapeType == TSHAPE_FILLET) {
+    gp_Pnt aPntG (-aR2Ext - theRF/2., 0, aR1Ext + theRF/2.);
+    aPntG.Transform(aTrsf);
+    BRepBuilderAPI_MakeVertex mkVertexG (aPntG);
+    TopoDS_Vertex aVertG = TopoDS::Vertex(mkVertexG.Shape());
+    anEdgeG = GEOMUtils::GetEdgeNearPoint(aShape, aVertG);
+  }
+
+  for (int i = 1 ; i <= aNbGroups; i++) {
+    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(i));
+    if (aGroup.IsNull())
+      continue;
+
+    TopoDS_Shape aGroupShape = aGroup->GetValue();
+    TopTools_IndexedMapOfShape anEdgesMap;
+    TopExp::MapShapes(aGroupShape, TopAbs_EDGE, anEdgesMap);
+
+    if (anEdgesMap.Contains(anEdgeA)) { // a
+      aGroup->SetName("THICKNESS");
+      theSeq->Append(aGroup);
+    }
+    else if (anEdgesMap.Contains(anEdgeB)) { // b
+      aGroup->SetName("CIRCULAR_QUARTER_PIPE");
+      theSeq->Append(aGroup);
+    }
+    else if (anEdgesMap.Contains(anEdgeC)) { // c
+      aGroup->SetName("CIRCULAR_QUARTER_PIPE");
+      theSeq->Append(aGroup);
+    }
+    else if (anEdgesMap.Contains(anEdgeD)) { // d
+      aGroup->SetName("HALF_LENGTH_MAIN_PIPE");
+      theSeq->Append(aGroup);
+    }
+    else if (anEdgesMap.Contains(anEdgeE)) { // e
+      aGroup->SetName("HALF_LENGTH_INCIDENT_PIPE");
+      theSeq->Append(aGroup);
+    }
+    else if (anEdgesMap.Contains(anEdgeF)) { // f
+      aGroup->SetName("FLANGE");
+      theSeq->Append(aGroup);
+    }
+    else if (shapeType == TSHAPE_CHAMFER) { // g
+      if (anEdgesMap.Contains(anEdgeG)) {
+        aGroup->SetName("CHAMFER");
+        theSeq->Append(aGroup);
+      }
+    }
+    else if (shapeType == TSHAPE_FILLET) { // g
+      if (anEdgesMap.Contains(anEdgeG)) {
+        aGroup->SetName("FILLET");
+        theSeq->Append(aGroup);
+      }
+    }
+    else {
+    }
+  }
+  // END: new groups search
+#else
+  bool addGroup;
+  bool circularFoundAndAdded = false;
+  bool circularFound10 = false;
+  bool incidentPipeFound = false;
+  bool mainPipeFound = false;
+  bool mainPipeFoundAndAdded = false;
+  bool radialFound =false;
+  bool flangeFound = false;
+  bool flangeFoundAndAdded = false;
+  bool chamferOrFilletFound = false;
+
+  for (int i = 1 ; i <= aNbGroups; i++) {
+    addGroup = false;
+
+    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(i));
+    if (aGroup.IsNull())
+      continue;
+
+    TopoDS_Shape aGroupShape = aGroup->GetValue();
+    BRepBuilderAPI_Transform aTransformationShapeInv (aGroupShape, aTrsfInv, Standard_False);
+    TopoDS_Shape aGroupShapeTrsfInv = aTransformationShapeInv.Shape();
+
+    TopTools_IndexedMapOfShape anEdgesMap;
+    TopExp::MapShapes(aGroupShapeTrsfInv,TopAbs_EDGE, anEdgesMap);
+    Standard_Integer nbEdges = anEdgesMap.Extent();
+
+    if (shapeType == TSHAPE_BASIC) {
+      if ((nbEdges >= 21) || /*R1Ext = R2Ext*/(nbEdges == 17)) { // 17, 17+8*{1,2,3}, 21, 21+8*{1,2,3}
+        addGroup = true;
+        aGroup->SetName("THICKNESS");
+      }
+      else if (nbEdges == 6) {
+        if (!circularFoundAndAdded) {
+          circularFoundAndAdded = true;
+          addGroup = true;
+          aGroup->SetName("CIRCULAR_QUARTER_PIPE");
+        }
+      }
+      else if (nbEdges == 8) {
+        incidentPipeFound = true;
+        mainPipeFound = false;
+        radialFound = false;
+        flangeFound = false;
+
+        TopExp_Explorer Ex(aGroupShapeTrsfInv,TopAbs_VERTEX);
+        while (Ex.More()) {
+          gp_Pnt aP =  BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
+          double x=aP.X(), y=aP.Y(), z=aP.Z();
+
+
+          if ((Abs(x) > aR2Ext + Precision::Confusion()) ||
+              (Abs(y) > aR2Ext + Precision::Confusion())) {
+            incidentPipeFound = false;
+          }
+
+          if ( z < -Precision::Confusion()) {
+            // length of main pipe
+            mainPipeFound = true;
+            if (!mainPipeFoundAndAdded) {
+              mainPipeFoundAndAdded = true;
+              addGroup = true;
+              aGroup->SetName("HALF_LENGTH_MAIN_PIPE");
+            }
+          }
+
+          else if (Abs(x) > (theL1-Precision::Confusion())) {
+            // discretisation circulaire
+            radialFound = true;
+            if (!circularFoundAndAdded) {
+              circularFoundAndAdded = true;
+              addGroup = true;
+              aGroup->SetName("CIRCULAR_QUARTER_PIPE");
+            }
+          }
+          Ex.Next();
+        }
+        if (incidentPipeFound) {
+          addGroup = true;
+          aGroup->SetName("HALF_LENGTH_INCIDENT_PIPE");
+        }
+        if (!addGroup && (!incidentPipeFound &&
+                          !radialFound &&
+                          !mainPipeFound &&
+                          !flangeFound)) {
+          // Flange (collerette)
+          flangeFound = true;
+          addGroup = true;
+          aGroup->SetName("FLANGE");
+        }
+      }
+      else
+        continue;
+    }
+    else if (shapeType == TSHAPE_CHAMFER || shapeType == TSHAPE_FILLET) {
+      if (nbEdges >= 25) { // 25, 25+8, 25+16, 25+24
+        addGroup = true;
+        aGroup->SetName("THICKNESS");
+      }
+      else if ((nbEdges == 10) || (nbEdges == 6)) {
+        if (!circularFoundAndAdded) {
+          addGroup = true;
+          circularFoundAndAdded = true;
+          aGroup->SetName("CIRCULAR_QUARTER_PIPE");
+          if (nbEdges == 10) {
+            circularFound10 = true;
+          }
+        }
+        else if (!circularFound10 && nbEdges == 10) {
+          circularFound10 = true;
+          addGroup = true;
+          aGroup->SetName("CIRCULAR_QUARTER_PIPE");
+        }
+      }
+      else if (nbEdges == 8) {
+        incidentPipeFound = true;
+        mainPipeFound = true;
+        flangeFound = false;
+
+        bool isNearZ0 = false;
+        bool isBelowZ0 = false;
+
+        TopExp_Explorer Ex (aGroupShapeTrsfInv,TopAbs_VERTEX);
+        while (Ex.More()) {
+          gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
+          double x=aP.X(), y=aP.Y(), z=aP.Z();
+
+          // tuy_princ_long_avant & tuy_princ_long_apres
+          //bool isMain = (((z < Precision::Confusion()) || (x < Precision::Confusion())) &&
+          //               ((y <= aR1Ext + Precision::Confusion()) ||
+          //                (y <= -(aR1Ext + Precision::Confusion())) ||
+          //                (y <= theR1 + Precision::Confusion()) ||
+          //                (y == -(theR1 + Precision::Confusion()))));
+          bool isMain = ((z < Precision::Confusion() || x < Precision::Confusion()) &&
+                         (fabs(y) > theR1 - Precision::Confusion() ||
+                          fabs(y) < Precision::Confusion()));
+
+          if (!isMain) {
+            mainPipeFound = false;
+          }
+
+          // collerette
+          //if (z < Precision::Confusion() && !isMain) {
+          //  flangeFound = true;
+          //  if (!flangeFoundAndAdded) {
+          //    flangeFoundAndAdded = true;
+          //    addGroup = true;
+          //    aGroup->SetName("FLANGE");
+          //  }
+          //}
+          if (fabs(z) < Precision::Confusion()) isNearZ0 = true;
+          if (z < - Precision::Confusion()) isBelowZ0 = true;
+
+          // tuyau incident
+          if ((Abs(x) > aR2Ext + Precision::Confusion()) ||
+              (Abs(y) > aR2Ext + Precision::Confusion())) {
+            incidentPipeFound = false;
+          }
+          Ex.Next();
+        }
+        if (mainPipeFound) {
+          addGroup = true;
+          aGroup->SetName("HALF_LENGTH_MAIN_PIPE");
+        }
+        if (incidentPipeFound) {
+          addGroup = true;
+          aGroup->SetName("HALF_LENGTH_INCIDENT_PIPE");
+        }
+        if (isNearZ0 && !isBelowZ0) {
+          flangeFound = true;
+          if (!flangeFoundAndAdded) {
+            flangeFoundAndAdded = true;
+            addGroup = true;
+            aGroup->SetName("FLANGE");
+          }
+        }
+        if (!addGroup && (!incidentPipeFound &&
+                          !mainPipeFound &&
+                          !flangeFound &&
+                          !chamferOrFilletFound)) {
+          addGroup = true;
+          chamferOrFilletFound = true;
+          if (shapeType == TSHAPE_CHAMFER)
+            aGroup->SetName("CHAMFER");
+          else
+            aGroup->SetName("FILLET");
+        }
+      }
+      else
+        continue;
+    }
+    // Add group to the list
+    if (addGroup)
+      theSeq->Append(aGroup);
+  }
+#endif
+
+  SetErrorCode(OK);
+  return true;
+}
+
+//=============================================================================
+/*!
+ *  Return faces that are laying on surface.
+ */
+//=============================================================================
+bool AdvancedEngine_IOperations::GetFacesOnSurf
+                     (const TopoDS_Shape &theShape,
+                      const Handle_Geom_Surface& theSurface,
+                      const Standard_Real theTolerance,
+                      TopTools_ListOfShape &theFaces)
+{
+  GEOMAlgo_FinderShapeOn1 aFinder;
+
+  aFinder.SetShape(theShape);
+  aFinder.SetTolerance(theTolerance);
+  aFinder.SetSurface(theSurface);
+  aFinder.SetShapeType(TopAbs_FACE);
+  aFinder.SetState(GEOMAlgo_ST_ON);
+
+  // Sets the minimal number of inner points for the faces that do not have own
+  // inner points at all (for e.g. rectangular planar faces have just 2 triangles).
+  // Default value=3
+  aFinder.SetNbPntsMin(3);
+  // Sets the maximal number of inner points for edges or faces.
+  // It is usefull for the cases when this number is very big (e.g =2000) to improve
+  // the performance. If this value =0, all inner points will be taken into account.
+  // Default value=0
+  aFinder.SetNbPntsMax(100);
+  aFinder.Perform();
+
+  // Interprete results
+  Standard_Integer iErr = aFinder.ErrorStatus();
+  // the detailed description of error codes is in GEOMAlgo_FinderShapeOn1.cxx
+  if (iErr) {
+    MESSAGE(" iErr : " << iErr);
+    TCollection_AsciiString aMsg (" iErr : ");
+    aMsg += TCollection_AsciiString(iErr);
+    SetErrorCode(aMsg);
+    return false;
+  }
+  Standard_Integer iWrn = aFinder.WarningStatus();
+  // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn1.cxx
+  if (iWrn) {
+    MESSAGE(" *** iWrn : " << iWrn);
+  }
+
+  const TopTools_ListOfShape &aListRes = aFinder.Shapes(); // the result
+  TopTools_ListIteratorOfListOfShape anIter (aListRes);
+
+  for (; anIter.More(); anIter.Next()) {
+    theFaces.Append(anIter.Value());
+  }
+
+  return true;
+}
+
+//=============================================================================
+/*!
+ *  Creates and returns conical face.
+ */
+//=============================================================================
+TopoDS_Shape AdvancedEngine_IOperations::MakeConicalFace
+                                  (const gp_Ax2 &theAxis,
+                                   const double theRadius,
+                                   const double theRadiusThin,
+                                   const double theHeight,
+                                   const gp_Trsf &theTrsf)
+{
+  BRepPrimAPI_MakeCone aMkCone (theAxis, theRadius, theRadiusThin, theHeight);
+  TopoDS_Shape aResult;
+  
+  aMkCone.Build();
+  if (aMkCone.IsDone()) {
+    TopExp_Explorer anExp(aMkCone.Shape(), TopAbs_FACE);
+
+    for (; anExp.More(); anExp.Next()) {
+      TopoDS_Face aFace = TopoDS::Face(anExp.Current());
+
+      if (aFace.IsNull() == Standard_False) {
+        BRepAdaptor_Surface anAdaptor(aFace, Standard_False);
+
+        if (anAdaptor.GetType() == GeomAbs_Cone) {
+          // This is a conical face. Transform and return it.
+          BRepBuilderAPI_Transform aTransf(aFace, theTrsf, Standard_False);
+          
+          aResult = aTransf.Shape();
+          break;
+        }
+      }
+    }
+  }
+
+  return aResult;
+}
+
+//=============================================================================
+/*!
+ *  Generate the internal group of a Pipe T-Shape
+ */
+//=============================================================================
+bool AdvancedEngine_IOperations::MakeInternalGroup
+                      (const Handle(GEOM_Object) &theShape,
+                       const double theR1, const double theLen1,
+                       const double theR2, const double theLen2,
+                       const double theRL, double theTransLenL,
+                       const double theRR, double theTransLenR,
+                       const double theRI, double theTransLenI,
+                       const Handle(TColStd_HSequenceOfTransient) &theSeq,
+                       const gp_Trsf &theTrsf)
+{
+  SetErrorCode(KO);
+
+  if (theShape.IsNull()) {
+    return false;
+  }
+
+  TopoDS_Shape aShape = theShape->GetValue();
+
+  if (aShape.IsNull()) {
+    SetErrorCode("Shape is not defined");
+    return false;
+  }
+
+  // Compute tolerance
+  Standard_Real aMaxTol = -RealLast();
+  TopExp_Explorer anExp(aShape, TopAbs_VERTEX);
+
+  for (; anExp.More(); anExp.Next()) {
+    TopoDS_Vertex aVertex = TopoDS::Vertex(anExp.Current());
+
+    if (aVertex.IsNull() == Standard_False) {
+      const Standard_Real aTol = BRep_Tool::Tolerance(aVertex);
+
+      if (aTol > aMaxTol) {
+        aMaxTol = aTol;
+      }
+    }
+  }
+
+  // Construct internal surfaces.
+  Standard_Integer i = 0;
+  const Standard_Integer aMaxNbSurf = 5;
+  Handle(Geom_Surface) aSurface[aMaxNbSurf];
+  TopTools_ListOfShape aConicalFaces;
+  Standard_Real aTolConf = Precision::Confusion();
+
+  // 1. Construct the internal surface of main pipe.
+  gp_Ax2 anAxis1 (gp::Origin(), gp::DX(), gp::DZ());
+  gp_Ax2 anAxis2 (gp::Origin(), gp::DZ(), gp::DX());
+
+  aSurface[i++] = new Geom_CylindricalSurface(anAxis1, theR1);
+
+  // 2. Construct the internal surface of incident pipe.
+  aSurface[i++] = new Geom_CylindricalSurface(anAxis2, theR2);
+
+  // 3. Construct the internal surface of left reduction pipe.
+  if (theRL > aTolConf) {
+    aSurface[i++] = new Geom_CylindricalSurface(anAxis1, theRL);
+
+    if (theTransLenL > aTolConf) {
+      // 3.1. Construct the internal surface of left transition pipe.
+      gp_Pnt aPLeft (-theLen1, 0., 0.);
+      gp_Ax2 anAxisLeft (aPLeft, -gp::DX(), gp::DZ());
+      TopoDS_Shape aConeLeft =
+        MakeConicalFace(anAxisLeft, theR1, theRL, theTransLenL, theTrsf);
+
+      if (aConeLeft.IsNull() == Standard_False) {
+        aConicalFaces.Append(aConeLeft);
+      }
+    }
+  }
+
+  // 4. Construct the internal surface of right reduction pipe.
+  if (theRR > aTolConf) {
+    // There is no need to construct another cylinder of the same radius. Skip it.
+    if (Abs(theRR - theRL) > aTolConf) {
+      aSurface[i++] = new Geom_CylindricalSurface(anAxis1, theRR);
+    }
+
+    if (theTransLenL > aTolConf) {
+      // 4.1. Construct the internal surface of right transition pipe.
+      gp_Pnt aPRight (theLen1, 0., 0.);
+      gp_Ax2 anAxisRight (aPRight, gp::DX(), gp::DZ());
+      TopoDS_Shape aConeRight =
+        MakeConicalFace(anAxisRight, theR1, theRR, theTransLenR, theTrsf);
+
+      if (aConeRight.IsNull() == Standard_False) {
+        aConicalFaces.Append(aConeRight);
+      }
+    }
+  }
+
+  // 5. Construct the internal surface of incident reduction pipe.
+  if (theRI > aTolConf) {
+    aSurface[i++] = new Geom_CylindricalSurface(anAxis2, theRI);
+
+    if (theTransLenI > aTolConf) {
+      // 5.1. Construct the internal surface of incident transition pipe.
+      gp_Pnt aPInci (0., 0., theLen2);
+      gp_Ax2 anAxisInci (aPInci, gp::DZ(), gp::DX());
+      TopoDS_Shape aConeInci =
+        MakeConicalFace(anAxisInci, theR2, theRI, theTransLenI, theTrsf);
+
+      if (aConeInci.IsNull() == Standard_False) {
+        aConicalFaces.Append(aConeInci);
+      }
+    }
+  }
+
+  // Get faces that are laying on cylindrical surfaces.
+  TopTools_ListOfShape aFaces;
+  gp_Trsf anInvTrsf = theTrsf.Inverted();
+
+  for (i = 0; i < aMaxNbSurf; i++) {
+    if (aSurface[i].IsNull()) {
+      break;
+    }
+
+    aSurface[i]->Transform(theTrsf);
+
+    TopTools_ListOfShape aLocalFaces;
+
+    if (!GetFacesOnSurf(aShape, aSurface[i], aMaxTol, aLocalFaces)) {
+      return false;
+    }
+
+    if (i < 2) {
+      // Check if the result contains outer cylinders.
+      // It is required for main and incident pipes.
+      TopTools_ListIteratorOfListOfShape anIter(aLocalFaces);
+
+      while (anIter.More()) {
+        TopExp_Explorer anExp(anIter.Value(), TopAbs_VERTEX);
+        Standard_Boolean isInside = Standard_False;
+
+        // Get a vertex from this shape
+        if (anExp.More()) {
+          TopoDS_Vertex aVtx = TopoDS::Vertex(anExp.Current());
+
+          if (aVtx.IsNull() == Standard_False) {
+            gp_Pnt aPnt = BRep_Tool::Pnt(aVtx);
+
+            aPnt.Transform(anInvTrsf);
+
+            if (i == 0) {
+              // Check if the point is inside the main pipe.
+              isInside = (Abs(aPnt.X()) <= theLen1);
+            } else { // i == 1
+              // Check if the point is inside the incident pipe.
+              isInside = (aPnt.Z() <= theLen2);
+            }
+          }
+        }
+
+        if (isInside) {
+          // Keep this face.
+          anIter.Next();
+        } else {
+          // Remove this face.
+          aLocalFaces.Remove(anIter);
+        }
+      }
+    }
+
+    aFaces.Append(aLocalFaces);
+  }
+
+  // Get faces that are laying on conical faces.
+  if (aConicalFaces.IsEmpty() == Standard_False) {
+    Handle(GEOM_Object) aCone =
+      GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+    Handle(GEOM_Function) aFunction =
+      aCone->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
+    TopTools_ListIteratorOfListOfShape aFIter(aConicalFaces);
+    Handle(GEOM_Object) aConeFromShape;
+
+    for (; aFIter.More(); aFIter.Next()) {
+      aFunction->SetValue(aFIter.Value());
+      aConeFromShape = myShapesOperations->GetInPlace(theShape, aCone);
+
+      if (aConeFromShape.IsNull() == Standard_False) {
+        aConeFromShape->GetLastFunction()->SetDescription("");
+        TopoDS_Shape aConeFaces = aConeFromShape->GetValue();
+        TopExp_Explorer anExp(aConeFaces, TopAbs_FACE);
+
+        for (; anExp.More(); anExp.Next()) {
+          TopoDS_Face aConeFace = TopoDS::Face(anExp.Current());
+
+          if (aConeFace.IsNull() == Standard_False) {
+            aFaces.Append(aConeFace);
+          }
+        }
+      }
+    }
+  }
+
+  // Create a group of internal faces.
+  if (aFaces.IsEmpty() == Standard_False) {
+    Handle(GEOM_Object) aGroup = myGroupOperations->CreateGroup(theShape, TopAbs_FACE);
+
+    if (aGroup.IsNull() == Standard_False) {
+      aGroup->GetLastFunction()->SetDescription("");
+      aGroup->SetName("INTERNAL_FACES");
+
+      TopTools_IndexedMapOfShape anIndices;
+      Handle(TColStd_HSequenceOfInteger) aSeqIDs = new TColStd_HSequenceOfInteger;
+
+      TopExp::MapShapes(aShape, anIndices);
+
+      TopTools_ListIteratorOfListOfShape anIter(aFaces);
+
+      for (; anIter.More(); anIter.Next()) {
+        const TopoDS_Shape &aFace = anIter.Value();
+        const Standard_Integer anIndex = anIndices.FindIndex(aFace);
+
+        if (anIndex > 0) {
+          aSeqIDs->Append(anIndex);
+        }
+      }
+
+      myGroupOperations->UnionIDs(aGroup, aSeqIDs);
+      aGroup->GetLastFunction()->SetDescription("");
+      theSeq->Append(aGroup);
+    }
+  }
+
+  SetErrorCode(OK);
+
+  return true;
+}
+
+bool AdvancedEngine_IOperations::MakePipeTShapePartition(Handle(GEOM_Object) theShape,
+                                                        double theR1, double theW1, double theL1,
+                                                        double theR2, double theW2, double theL2,
+                                                        double theH, double theW,
+                                                        double theRF, bool isNormal)
+{
+  SetErrorCode(KO);
+
+  // Build tools for partition operation:
+  // 1 face and 2 planes
+  // Face
+  Handle(GEOM_Object) arete_intersect_int, arete_intersect_ext;
+  Handle(GEOM_Object) wire_t, wire_t2, face_t, face_t2;
+  Handle(GEOM_Object) chan_racc;
+  Handle(GEOM_Object) vi1, vi2;
+  Handle(GEOM_Object) Te3;
+
+  try {
+    OCC_CATCH_SIGNALS;
+    Handle(GEOM_Object) Vector_Z = myBasicOperations->MakeVectorDXDYDZ(0, 0, 1);
+    Vector_Z->GetLastFunction()->SetDescription("");
+
+    // Useful values
+    double aSize = 2*(theL1 + theL2);
+    double aR1Ext = theR1 + theW1;
+    double aR2Ext = theR2 + theW2;
+    double theVertCylinderRadius = aR2Ext + theW + theRF;
+    double theHoriCylinderRadius = aR1Ext + theH + theRF;
+
+    // Common edges on internal cylinder
+    Handle(GEOM_Object) box_i = my3DPrimOperations->MakeBoxDXDYDZ(theR2, theR2, theR1);
+    box_i->GetLastFunction()->SetDescription("");
+    box_i = myTransformOperations->TranslateDXDYDZ(box_i, -theR2, -theR2, 0);
+    box_i->GetLastFunction()->SetDescription("");
+
+    Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
+    TCollection_AsciiString theDesc = aFunction->GetDescription();
+    Handle(TColStd_HSequenceOfTransient) edges_i =
+      myShapesOperations->GetShapesOnBox(box_i, theShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
+    // Recover previous description to get rid of Propagate dump
+    aFunction->SetDescription(theDesc);
+    if (edges_i.IsNull() || edges_i->Length() == 0) {
+      SetErrorCode("Internal edges not found");
+      return false;
+    }
+    for (int i=1; i<=edges_i->Length();i++) {
+      Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(edges_i->Value(i));
+      anObj->GetLastFunction()->SetDescription("");
+    }
+    arete_intersect_int = Handle(GEOM_Object)::DownCast(edges_i->Value(1));
+
+    // search for vertices located on both internal pipes
+    aFunction = theShape->GetLastFunction();
+    theDesc = aFunction->GetDescription();
+    Handle(TColStd_HSequenceOfTransient) vertices_i =
+      myShapesOperations->GetShapesOnBox(box_i, theShape, TopAbs_VERTEX, GEOMAlgo_ST_ONIN);
+    // Recover previous description to get rid of Propagate dump
+    aFunction->SetDescription(theDesc);
+    if (vertices_i.IsNull() || vertices_i->Length() == 0) {
+      SetErrorCode("Internal vertices not found");
+      return false;
+    }
+
+    double d1min = theR2+theW2, d2min=theR2+theW2;
+    for (int i = 1; i <= vertices_i->Length(); i++) {
+      Handle(GEOM_Object) v = Handle(GEOM_Object)::DownCast(vertices_i->Value(i));
+      v->GetLastFunction()->SetDescription("");
+      TopoDS_Vertex aVertex = TopoDS::Vertex(v->GetValue());
+      gp_Pnt aP = BRep_Tool::Pnt(aVertex);
+      if (Abs(aP.X()) <= Precision::Confusion()) {
+        if (Abs(aP.Y()) < d1min) {
+          vi1 = v;
+         d1min = Abs(aP.Y());
+       }
+      } else if (Abs(aP.Y()) <= Precision::Confusion()) {
+       if (Abs(aP.X()) < d2min) {
+         vi2 = v;
+         d2min = Abs(aP.X());
+        }
+      }
+    }
+    if (vi1.IsNull() || vi2.IsNull()) {
+      SetErrorCode("Cannot find internal intersection vertices");
+      return false;
+    }
+
+    std::list<Handle(GEOM_Object)> theShapes;
+
+    if (isNormal) {
+      Handle(GEOM_Object) ve1, ve2;
+      TopoDS_Vertex vertex1, vertex2;
+
+      Handle(GEOM_Object) box_e = my3DPrimOperations->MakeBoxDXDYDZ(aR2Ext, aR2Ext, aR1Ext);
+      box_e->GetLastFunction()->SetDescription("");
+      box_e = myTransformOperations->TranslateDXDYDZ(box_e, -aR2Ext, -aR2Ext, 0);
+      box_e->GetLastFunction()->SetDescription("");
+
+      // search for vertices located on both external pipes
+      aFunction = theShape->GetLastFunction();
+      theDesc = aFunction->GetDescription();
+      Handle(TColStd_HSequenceOfTransient) vertices_e =
+        myShapesOperations->GetShapesOnBox(box_e, theShape, TopAbs_VERTEX, GEOMAlgo_ST_ONIN);
+      // Recover previous description to get rid of Propagate dump
+      aFunction->SetDescription(theDesc);
+      if (vertices_e.IsNull() || vertices_e->Length() == 0) {
+        SetErrorCode("External vertices not found");
+        return false;
+      }
+
+      double d1max = 0, d2max = 0;
+      for (int i = 1; i <= vertices_e->Length(); i++) {
+        Handle(GEOM_Object) v = Handle(GEOM_Object)::DownCast(vertices_e->Value(i));
+        v->GetLastFunction()->SetDescription("");
+        TopoDS_Vertex aVertex = TopoDS::Vertex(v->GetValue());
+        gp_Pnt aP = BRep_Tool::Pnt(aVertex);
+        if (Abs(aP.X()) <= Precision::Confusion()) {
+          if (Abs(aP.Y()) > d1max) {
+            ve1 = v;
+           vertex1 = aVertex;
+           d1max = Abs(aP.Y());
+          }
+        } else if (Abs(aP.Y()) <= Precision::Confusion()) {
+          if (Abs(aP.X()) > d2max) {
+            ve2 = v;
+           vertex2 = aVertex;
+           d2max = Abs(aP.X());
+          }
+        }
+      }
+      if (ve1.IsNull() || ve2.IsNull()) {
+        SetErrorCode("Cannot find external intersection vertices");
+        return false;
+      }
+      Handle(GEOM_Object) edge_e1, edge_e2;
+
+      // Common edges on external cylinder
+      aFunction = theShape->GetLastFunction();
+      theDesc = aFunction->GetDescription();
+      Handle(TColStd_HSequenceOfTransient) edges_e =
+        myShapesOperations->GetShapesOnBox(box_e, theShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
+      // Recover previous description to get rid of Propagate dump
+      aFunction->SetDescription(theDesc);
+      if (edges_e.IsNull() || edges_e->Length() == 0) {
+        SetErrorCode("External edges not found");
+        return false;
+      }
+      ShapeAnalysis_Edge sae;
+      for (int i=1; i<=edges_e->Length();i++) {
+        Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(edges_e->Value(i));
+        anObj->GetLastFunction()->SetDescription("");
+       TopoDS_Edge anEdge = TopoDS::Edge(anObj->GetValue());
+       if ( !anEdge.IsNull() && 
+            (sae.FirstVertex(anEdge).IsSame(vertex1) || sae.LastVertex(anEdge).IsSame(vertex1)) && 
+            (sae.FirstVertex(anEdge).IsSame(vertex2) || sae.LastVertex(anEdge).IsSame(vertex2))) {
+         arete_intersect_ext = anObj;
+       }
+      }
+
+      edge_e1 = myBasicOperations->MakeLineTwoPnt(ve1, vi1);
+      if (edge_e1.IsNull()) {
+        SetErrorCode("Edge 1 could not be built");
+        return false;
+      }
+
+      edge_e2 = myBasicOperations->MakeLineTwoPnt(ve2, vi2);
+      if (edge_e2.IsNull()) {
+        SetErrorCode("Edge 2 could not be built");
+        return false;
+      }
+
+      edge_e1->GetLastFunction()->SetDescription("");
+      edge_e2->GetLastFunction()->SetDescription("");
+
+      std::list<Handle(GEOM_Object)> edge_e_elist;
+      edge_e_elist.push_back(arete_intersect_int);
+      edge_e_elist.push_back(edge_e1);
+      edge_e_elist.push_back(arete_intersect_ext);
+      edge_e_elist.push_back(edge_e2);
+      wire_t = myShapesOperations->MakeWire(edge_e_elist, 1e-7);
+      if (wire_t.IsNull()) {
+        SetErrorCode("Impossible to build wire");
+        return false;
+      }
+      wire_t->GetLastFunction()->SetDescription("");
+      face_t = myShapesOperations->MakeFace(wire_t, false);
+      if (face_t.IsNull()) {
+        SetErrorCode("Impossible to build face");
+        return false;
+      }
+      face_t->GetLastFunction()->SetDescription("");
+
+      theShapes.push_back(theShape);
+      theShapes.push_back(vi1);
+      theShapes.push_back(vi2);
+      theShapes.push_back(ve1);
+      theShapes.push_back(ve2);
+      theShapes.push_back(edge_e1);
+      theShapes.push_back(edge_e2);
+      theShapes.push_back(wire_t);
+      theShapes.push_back(face_t);
+    }
+    else {
+      Handle(GEOM_Object) P1, P2, P3, P4, P5, P6;
+      int idP1, idP2, idP3, idP4;
+      int PZX, PZY;
+      double ZX=0, ZY=0;
+      std::vector<int> LX;
+      std::vector<int> LY;
+      Handle(GEOM_Object) box_e = my3DPrimOperations->MakeBoxDXDYDZ
+        (theVertCylinderRadius, theVertCylinderRadius, theHoriCylinderRadius);
+      box_e->GetLastFunction()->SetDescription("");
+      box_e = myTransformOperations->TranslateDXDYDZ
+        (box_e, -theVertCylinderRadius, -theVertCylinderRadius, 0);
+      box_e->GetLastFunction()->SetDescription("");
+
+      aFunction = theShape->GetLastFunction();
+      theDesc = aFunction->GetDescription();
+      Handle(TColStd_HSequenceOfTransient) extremVertices =
+        myShapesOperations->GetShapesOnBox(box_e, theShape, TopAbs_VERTEX, GEOMAlgo_ST_ONIN);
+      // Recover previous description to get rid of Propagate dump
+      aFunction->SetDescription(theDesc);
+
+      if (extremVertices.IsNull() || extremVertices->Length() == 0) {
+        if (theRF == 0)
+          SetErrorCode("Vertices on chamfer not found");
+        else
+          SetErrorCode("Vertices on fillet not found");
+        return false;
+      }
+
+      theShapes.push_back(theShape);
+      theShapes.push_back(box_e);
+      if (extremVertices->Length() != 6) {
+        //           for (int i=1; i<=extremVertices->Length(); i++){
+        //             theShapes.push_back(Handle(GEOM_Object)::DownCast(extremVertices->Value(i)));
+        //           }
+        //           Handle(GEOM_Object) aCompound = myShapesOperations->MakeCompound(theShapes);
+        //           TopoDS_Shape aCompoundShape = aCompound->GetValue();
+        //           theShape->GetLastFunction()->SetValue(aCompoundShape);
+        SetErrorCode("Bad number of vertices on chamfer found");
+        return false;
+      }
+
+      for (int i=1; i<=extremVertices->Length(); i++){
+        Handle(GEOM_Object) aV = Handle(GEOM_Object)::DownCast(extremVertices->Value(i));
+        aV->GetLastFunction()->SetDescription("");
+        gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(aV->GetValue()));
+
+        if (Abs(aP.X()) <= Precision::Confusion()) {
+          if (Abs(aP.Y()) - theR2 > Precision::Confusion()) {
+            LX.push_back(i);
+            if  (aP.Z()-ZX > Precision::Confusion()) {
+              ZX = aP.Z();
+              PZX = i;
+            }
+          }
+        }
+        else {
+          if (Abs(aP.X()) - theR2 > Precision::Confusion()) {
+            LY.push_back(i);
+            if (aP.Z() - ZY > Precision::Confusion()) {
+              ZY = aP.Z();
+              PZY = i;
+            }
+          }
+        }
+      }
+
+      idP2 = PZX;
+      idP4 = PZY;
+      idP1 = LX.at(0);
+      if (LX.at(0) == PZX)
+        idP1 = LX.at(1);
+      idP3 = LY.at(0);
+      if (LY.at(0) == PZY)
+        idP3 = LY.at(1);
+
+      P1 = Handle(GEOM_Object)::DownCast(extremVertices->Value(idP1));
+      P2 = Handle(GEOM_Object)::DownCast(extremVertices->Value(idP2));
+      P3 = Handle(GEOM_Object)::DownCast(extremVertices->Value(idP3));
+      P4 = Handle(GEOM_Object)::DownCast(extremVertices->Value(idP4));
+
+      Handle(GEOM_Object) Cote_1 = myBasicOperations->MakeLineTwoPnt(P1, vi1);
+      if (Cote_1.IsNull()) {
+        SetErrorCode("Impossible to build edge in thickness");
+        return false;
+      }
+      Cote_1->GetLastFunction()->SetDescription("");
+
+      Handle(GEOM_Object) Cote_2 = myBasicOperations->MakeLineTwoPnt(vi2, P3);
+      if (Cote_2.IsNull()) {
+        SetErrorCode("Impossible to build edge in thickness");
+        return false;
+      }
+      Cote_2->GetLastFunction()->SetDescription("");
+
+      // edge_chan_princ = arete du chanfrein (ou raccord) sur le tuyau principal
+      // edge_chan_inc = arete du chanfrein (ou raccord) sur le tuyau incident
+      //         std::cerr << "Getting chamfer edge on main pipe" << std::endl;
+      Handle(GEOM_Object) edge_chan_princ = myBlocksOperations->GetEdge(theShape, P1, P3);
+      if (edge_chan_princ.IsNull()) {
+        SetErrorCode("Impossible to find edge on main pipe");
+        return false;
+      }
+      edge_chan_princ->GetLastFunction()->SetDescription("");
+
+      Handle(GEOM_Object) edge_chan_inc = myBlocksOperations->GetEdge(theShape, P2, P4);
+      if (edge_chan_inc.IsNull()) {
+        SetErrorCode("Impossible to find edge on incident pipe");
+        return false;
+      }
+      edge_chan_inc->GetLastFunction()->SetDescription("");
+
+      std::list<Handle(GEOM_Object)> edgeList1;
+      edgeList1.push_back(edge_chan_princ);
+      edgeList1.push_back(Cote_1);
+      edgeList1.push_back(arete_intersect_int);
+      edgeList1.push_back(Cote_2);
+
+      //         std::cerr << "Creating wire 1" << std::endl;
+      wire_t = myShapesOperations->MakeWire(edgeList1, 1e-7);
+      if (wire_t.IsNull()) {
+        SetErrorCode("Impossible to build wire");
+        return false;
+      }
+      wire_t->GetLastFunction()->SetDescription("");
+
+      //         std::cerr << "Creating face 1" << std::endl;
+      face_t = myShapesOperations->MakeFace(wire_t, false);
+      if (face_t.IsNull()) {
+        SetErrorCode("Impossible to build face");
+        return false;
+      }
+      face_t->GetLastFunction()->SetDescription("");
+      theShapes.push_back(face_t);
+
+      gp_Pnt aP2 = BRep_Tool::Pnt(TopoDS::Vertex(P2->GetValue()));
+      gp_Pnt aP5 = BRep_Tool::Pnt(TopoDS::Vertex(vi1->GetValue()));
+      double deltaZ = aP2.Z() - aP5.Z();
+      //         std::cerr << "Creating new point from vi1 with deltaZ = " << deltaZ << std::endl;
+      Handle(GEOM_Object) P5bis = myTransformOperations->TranslateDXDYDZCopy(vi1, 0, 0, deltaZ);
+      if (P5bis.IsNull()) {
+        SetErrorCode("Impossible to translate vertex");
+        return false;
+      }
+      P5bis->GetLastFunction()->SetDescription("");
+
+      gp_Pnt aP4 = BRep_Tool::Pnt(TopoDS::Vertex(P4->GetValue()));
+      gp_Pnt aP6 = BRep_Tool::Pnt(TopoDS::Vertex(vi2->GetValue()));
+      deltaZ = aP4.Z() - aP6.Z();
+      //         std::cerr << "Creating new point from vi2 with deltaZ = " << deltaZ << std::endl;
+      Handle(GEOM_Object) P6bis = myTransformOperations->TranslateDXDYDZCopy(vi2, 0, 0, deltaZ);
+      if (P6bis.IsNull()) {
+        SetErrorCode("Impossible to translate vertex");
+        return false;
+      }
+      P6bis->GetLastFunction()->SetDescription("");
+
+      //         std::cerr << "Creating new line 1 from 2 previous points" << std::endl;
+      Handle(GEOM_Object) Cote_3 = myBasicOperations->MakeLineTwoPnt(P5bis, P2);
+      if (Cote_3.IsNull()) {
+        SetErrorCode("Impossible to build edge in thickness");
+        return false;
+      }
+      Cote_3->GetLastFunction()->SetDescription("");
+
+      //         std::cerr << "Creating new line 2 from 2 previous points" << std::endl;
+      Handle(GEOM_Object) Cote_4 = myBasicOperations->MakeLineTwoPnt(P6bis, P4);
+      if (Cote_4.IsNull()) {
+        SetErrorCode("Impossible to build edge in thickness");
+        return false;
+      }
+      Cote_4->GetLastFunction()->SetDescription("");
+
+      //         std::cerr << "Creating new line 3 from 2 previous points" << std::endl;
+      Handle(GEOM_Object) Cote_5 = myBasicOperations->MakeLineTwoPnt(P5bis, P6bis);
+      if (Cote_4.IsNull()) {
+        SetErrorCode("Impossible to build edge in thickness");
+        return false;
+      }
+      Cote_5->GetLastFunction()->SetDescription("");
+
+      //std::list<Handle(GEOM_Object)> edgeList2;
+      //edgeList2.push_back(edge_chan_inc);
+      //edgeList2.push_back(Cote_3);
+      //edgeList2.push_back(Cote_5);
+      //edgeList2.push_back(Cote_4);
+      //         std::cerr << "Creating wire 2" << std::endl;
+      //wire_t2 = myShapesOperations->MakeWire(edgeList2, 1e-7);
+      //if (wire_t2.IsNull()) {
+      //  SetErrorCode("Impossible to build wire");
+      //  return false;
+      //}
+      //wire_t2->GetLastFunction()->SetDescription("");
+      //         std::cerr << "Creating face 2" << std::endl;
+      //face_t2 = myShapesOperations->MakeFace(wire_t2, false);
+
+      // Mantis issue 0021682
+      face_t2 = my3DPrimOperations->MakePrismVecH(edge_chan_inc, Cote_4, - (theR2 + theW2));
+      //face_t2 = my3DPrimOperations->MakePrismVecH(edge_chan_inc, Cote_4, - 2.0*theR2);
+      if (face_t2.IsNull()) {
+        SetErrorCode("Impossible to build face");
+        return false;
+      }
+      face_t2->GetLastFunction()->SetDescription("");
+      theShapes.push_back(face_t2);
+    }
+
+    // Planes
+    Handle(GEOM_Object) aP0 = myBasicOperations->MakePointXYZ(0, 0, 0);
+    Handle(GEOM_Object) aVZ = myBasicOperations->MakeVectorDXDYDZ(0, 0, 1);
+    Handle(GEOM_Object) aVXZ = myBasicOperations->MakeVectorDXDYDZ(aR1Ext, 0, 0.5*(theL1+theVertCylinderRadius));
+    Handle(GEOM_Object) aPlnOZ = myBasicOperations->MakePlanePntVec(aP0, aVZ, aSize);
+    Handle(GEOM_Object) aPlnOXZ = myBasicOperations->MakePlanePntVec(aP0, aVXZ, aSize);
+    aP0->GetLastFunction()->SetDescription("");
+    aVZ->GetLastFunction()->SetDescription("");
+    aVXZ->GetLastFunction()->SetDescription("");
+    aPlnOZ->GetLastFunction()->SetDescription("");
+    aPlnOXZ->GetLastFunction()->SetDescription("");
+    theShapes.push_back(aPlnOZ);
+    theShapes.push_back(aPlnOXZ);
+
+    // Partition
+    Handle(TColStd_HSequenceOfTransient) partitionShapes = new TColStd_HSequenceOfTransient;
+    Handle(TColStd_HSequenceOfTransient) theTools = new TColStd_HSequenceOfTransient;
+    Handle(TColStd_HSequenceOfTransient) theKeepInside = new TColStd_HSequenceOfTransient;
+    Handle(TColStd_HSequenceOfTransient) theRemoveInside = new TColStd_HSequenceOfTransient;
+    Handle(TColStd_HArray1OfInteger) theMaterials;
+
+    partitionShapes->Append(theShape);
+    theTools->Append(aPlnOZ);
+    if (Abs(aR1Ext - aR2Ext) > Precision::Confusion())
+      theTools->Append(aPlnOXZ);
+    theTools->Append(face_t);
+    if (!isNormal)
+      theTools->Append(face_t2);
+
+    Te3 = myBooleanOperations->MakePartition
+              (partitionShapes, theTools, theKeepInside, theRemoveInside,
+              TopAbs_SOLID, false, theMaterials, 0, false, Standard_False);
+    if (Te3.IsNull()) {
+      SetErrorCode("Impossible to build partition of TShape");
+      return false;
+    }
+    Te3->GetLastFunction()->SetDescription("");
+
+    // Last verification: result should be a block
+    std::list<GEOMImpl_IBlocksOperations::BCError> errList;
+    if (!myBlocksOperations->CheckCompoundOfBlocks(Te3,errList)) {
+      SetErrorCode("TShape is not a compound of block");
+      return false;
+    }
+
+//     // BEGIN Compound of created shapes - Only for debug purpose
+//     theShapes.clear();
+//     theShapes.push_back(theShape);
+//     theShapes.push_back(aPlnOZ);
+//     if (Abs(aR1Ext - aR2Ext) > Precision::Confusion() )
+//       theShapes.push_back(aPlnOXZ);
+//     theShapes.push_back(face_t);
+//     if (!isNormal)
+//       theShapes.push_back(face_t2);
+//
+//     Handle(GEOM_Object) aCompound = myShapesOperations->MakeCompound(theShapes);
+//     TopoDS_Shape aCompoundShape = aCompound->GetValue();
+//     theShape->GetLastFunction()->SetValue(aCompoundShape);
+//     // END Compound of created shapes - Only for debug purpose
+
+    TopoDS_Shape aShape = Te3->GetValue();
+    theShape->GetLastFunction()->SetValue(aShape);
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return false;
+  }
+
+  SetErrorCode(OK);
+  return true;
+}
+
+// Mirror and glue faces
+bool AdvancedEngine_IOperations::MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
+                                                            double theR1, double theW1, double theL1,
+                                                            double theR2, double theW2, double theL2)
+{
+  SetErrorCode(KO);
+
+  // Useful values
+  double aSize = 2*(theL1 + theL2);
+  double aR1Ext = theR1 + theW1;
+
+  // Planes
+  Handle(GEOM_Object) aP0 = myBasicOperations->MakePointXYZ(0, 0, 0);
+  aP0->GetLastFunction()->SetDescription("");
+  Handle(GEOM_Object) aVX = myBasicOperations->MakeVectorDXDYDZ(1, 0, 0);
+  Handle(GEOM_Object) aVY = myBasicOperations->MakeVectorDXDYDZ(0, 1, 0);
+  aVX->GetLastFunction()->SetDescription("");
+  aVY->GetLastFunction()->SetDescription("");
+  Handle(GEOM_Object) aPlane_OX = myBasicOperations->MakePlanePntVec(aP0, aVX, 2*(aR1Ext + theL2));
+  Handle(GEOM_Object) aPlane_OY = myBasicOperations->MakePlanePntVec(aP0, aVY, aSize);
+  aPlane_OX->GetLastFunction()->SetDescription("");
+  aPlane_OY->GetLastFunction()->SetDescription("");
+
+  Handle(GEOM_Object) Te4 = myTransformOperations->MirrorPlaneCopy(theShape, aPlane_OX);
+  if (Te4.IsNull()) {
+    SetErrorCode("Impossible to build mirror of quarter TShape");
+    return false;
+  }
+
+  Handle(GEOM_Object) Te5 = myTransformOperations->MirrorPlaneCopy(theShape, aPlane_OY);
+  if (Te5.IsNull()) {
+    SetErrorCode("Impossible to build mirror of half TShape");
+    return false;
+  }
+
+  Handle(GEOM_Object) Te6 = myTransformOperations->MirrorPlaneCopy(Te4, aPlane_OY);
+  if (Te6.IsNull()) {
+    SetErrorCode("Impossible to build mirror of half TShape");
+    return false;
+  }
+
+  std::list<Handle(GEOM_Object)> aShapesList;
+  aShapesList.push_back(theShape);
+  aShapesList.push_back(Te4);
+  aShapesList.push_back(Te5);
+  aShapesList.push_back(Te6);
+  Handle(GEOM_Object) Te7 = myShapesOperations->MakeCompound(aShapesList);
+  if (Te7.IsNull()) {
+    SetErrorCode("Impossible to build compound");
+    return false;
+  }
+
+  // Copy source shape
+  TopoDS_Shape aShapeCopy;
+  TColStd_IndexedDataMapOfTransientTransient aMapTShapes;
+  TNaming_CopyShape::CopyTool(Te7->GetValue(), aMapTShapes, aShapeCopy);
+
+  Handle(GEOM_Object) Te8 = myShapesOperations->MakeGlueFaces(Te7, 1e-7, true);
+  if (Te8.IsNull()) {
+    SetErrorCode("Impossible to glue faces of TShape");
+    return false;
+  }
+
+  TopoDS_Shape aShape = Te8->GetValue();
+  BRepCheck_Analyzer anAna (aShape, Standard_True);
+
+  if (!anAna.IsValid()) {
+    // Try to do gluing with the tolerance equal to maximal
+    // tolerance of vertices of the source shape.
+    Standard_Real aTolMax = -RealLast();
+
+    for (TopExp_Explorer ExV (aShapeCopy, TopAbs_VERTEX); ExV.More(); ExV.Next()) {
+      TopoDS_Vertex aVertex = TopoDS::Vertex(ExV.Current());
+      Standard_Real aTol = BRep_Tool::Tolerance(aVertex);
+
+      if (aTol > aTolMax) {
+        aTolMax = aTol;
+      }
+    }
+
+    // Perform gluing
+    Te7->GetLastFunction()->SetValue(aShapeCopy);
+    Te8 = myShapesOperations->MakeGlueFaces(Te7, aTolMax, true);
+
+    if (Te8.IsNull()) {
+      SetErrorCode("Impossible to glue faces of TShape");
+      return false;
+    }
+
+    aShape = Te8->GetValue();
+  }
+
+
+  theShape->GetLastFunction()->SetValue(aShape);
+
+  Te4->GetLastFunction()->SetDescription("");
+  Te5->GetLastFunction()->SetDescription("");
+  Te6->GetLastFunction()->SetDescription("");
+  Te7->GetLastFunction()->SetDescription("");
+  Te8->GetLastFunction()->SetDescription("");
+
+  SetErrorCode(OK);
+  return true;
+}
+
+//=======================================================================
+//function : MakePipeTShapeThicknessReduction
+//purpose  : Static method. Add thiskness reduction elements at the three
+//                          open ends of the T-Shape.
+//=======================================================================
+TopoDS_Shape AdvancedEngine_IOperations::MakePipeTShapeThicknessReduction
+                                  (TopoDS_Shape theShape,
+                                   double r1, double w1, double l1,
+                                   double r2, double w2, double l2,
+                                   double rL, double wL, double ltransL, double lthinL,
+                                   double rR, double wR, double ltransR, double lthinR,
+                                   double rI, double wI, double ltransI, double lthinI,
+                                   bool fuseReductions)
+{
+  // Add thickness reduction elements
+  // at the three extremities: Left, Right and Incident
+  //
+  // ---------------------.
+  //   W                   \
+  // ---------------------. \
+  //   ^                   \ '-----------------.
+  //   |R                   \        Wthin     |
+  //   |                     '-----------------'
+  //   v                             Rthin
+  // --.--.--.--.--.--.--.--.--.--.--.--.--.--.--
+  //                     Ltrans    Lthin
+
+  TopoDS_Shape aResult = theShape;
+  double aTol = Precision::Confusion();
+
+  gp_Vec aVX = gp::DX(), aVZ = gp::DZ();
+
+  // Left reduction (rL, wL, ltransL, lthinL)
+  if (rL > aTol && wL > aTol && ltransL > aTol) {
+    gp_Pnt aPLeft (-l1, 0, 0);
+    gp_Ax2 anAxesLeft (aPLeft, -aVX, aVZ);
+    TopoDS_Shape aReductionLeft = AdvancedEngine_IOperations::MakeThicknessReduction
+      (anAxesLeft, r1, w1, rL, wL, ltransL, lthinL, fuseReductions);
+
+    if (fuseReductions) {
+      BRepAlgoAPI_Fuse fuseL (aResult, aReductionLeft);
+      if (!fuseL.IsDone())
+        StdFail_NotDone::Raise("Cannot fuse Te with left reduction");
+      aResult = fuseL.Shape();
+    }
+    else {
+      BRep_Builder B;
+      TopoDS_Compound C;
+      B.MakeCompound(C);
+      B.Add(C, aResult);
+      B.Add(C, aReductionLeft);
+      aResult = C;
+    }
+  }
+
+  // Right reduction
+  if (rR > aTol && wR > aTol && ltransR > aTol) {
+    gp_Pnt aPRight (l1, 0, 0);
+    gp_Ax2 anAxesRight (aPRight, aVX, aVZ);
+    TopoDS_Shape aReductionRight = AdvancedEngine_IOperations::MakeThicknessReduction
+      (anAxesRight, r1, w1, rR, wR, ltransR, lthinR, fuseReductions);
+
+    if (fuseReductions) {
+      BRepAlgoAPI_Fuse fuseR (aResult, aReductionRight);
+      if (!fuseR.IsDone())
+        StdFail_NotDone::Raise("Cannot fuse Te with right reduction");
+      aResult = fuseR.Shape();
+    }
+    else {
+      BRep_Builder B;
+      TopoDS_Compound C;
+      B.MakeCompound(C);
+      B.Add(C, aResult);
+      B.Add(C, aReductionRight);
+      aResult = C;
+    }
+  }
+
+  // Incident reduction
+  if (rI > aTol && wI > aTol && ltransI > aTol) {
+    gp_Pnt aPInci (0, 0, l2);
+    gp_Ax2 anAxesInci (aPInci, aVZ, aVX);
+    TopoDS_Shape aReductionInci = AdvancedEngine_IOperations::MakeThicknessReduction
+      (anAxesInci, r2, w2, rI, wI, ltransI, lthinI, fuseReductions);
+
+    if (fuseReductions) {
+      BRepAlgoAPI_Fuse fuseInci (aResult, aReductionInci);
+      if (!fuseInci.IsDone())
+        StdFail_NotDone::Raise("Cannot fuse Te with incident reduction");
+      aResult = fuseInci.Shape();
+    }
+    else {
+      BRep_Builder B;
+      TopoDS_Compound C;
+      B.MakeCompound(C);
+      B.Add(C, aResult);
+      B.Add(C, aReductionInci);
+      aResult = C;
+    }
+  }
+
+  // Get rid of extra compounds
+  TopTools_ListOfShape listShapeRes;
+  GEOMUtils::AddSimpleShapes(aResult, listShapeRes);
+  aResult = listShapeRes.First(); // useful for the case "fuseReductions == true"
+
+  if (!fuseReductions && listShapeRes.Extent() > 1) {
+    // Simplify T-Shape compound (get rid of sub-compounds) and glue duplicated faces
+    BRep_Builder B;
+    TopoDS_Compound C;
+    B.MakeCompound(C);
+
+    TopTools_ListIteratorOfListOfShape itSub (listShapeRes);
+    for (; itSub.More(); itSub.Next())
+      B.Add(C, itSub.Value());
+
+    // GlueFaces
+    aResult = GEOMImpl_GlueDriver::GlueFaces(C, Precision::Confusion(), Standard_True);
+  }
+
+  return aResult;
+}
+
+//=======================================================================
+//function : MakeThicknessReduction
+//purpose  : Static method. Create one thickness reduction element.
+//=======================================================================
+TopoDS_Shape AdvancedEngine_IOperations::MakeThicknessReduction (gp_Ax2 theAxes,
+                                                                const double R, const double W,
+                                                                const double Rthin, const double Wthin,
+                                                                const double Ltrans, const double Lthin,
+                                                                bool fuse)
+{
+  double aTol = Precision::Confusion();
+  if (Rthin < aTol || Wthin < aTol || Ltrans < aTol) {
+    StdFail_NotDone::Raise("Cannot build thickness reduction: too small values");
+  }
+  bool isThinPart = (Lthin > aTol);
+
+  //     .
+  //   W |\
+  //     . \
+  //   ^  \ '-----------------.
+  //   |R  \|                 | Wthin
+  //   |    '-----------------'
+  //   v                        Rthin
+  // --.--.--.--.--.--.--.--.--.--.--.--.--> theAxes.Direction()
+  //     Ltrans     Lthin
+
+  double RExt = R + W;
+  double RthinExt = Rthin + Wthin;
+
+  gp_Dir aNormal = theAxes.Direction();
+  gp_Dir anXDir  = theAxes.XDirection();
+  gp_Pnt aPntCyl (theAxes.Location().XYZ() + aNormal.XYZ()*Ltrans);
+  gp_Ax2 anAxesCyl (aPntCyl, aNormal, anXDir);
+
+  // Build the transition part
+  BRepPrimAPI_MakeCone ConeExt (theAxes, RExt, RthinExt, Ltrans);
+  BRepPrimAPI_MakeCone ConeInt (theAxes, R, Rthin, Ltrans);
+  ConeExt.Build();
+  ConeInt.Build();
+  if (!ConeExt.IsDone() || !ConeInt.IsDone())
+    StdFail_NotDone::Raise("Cannot build cones of thickness reduction");
+  BRepAlgoAPI_Cut cut1 (ConeExt.Shape(), ConeInt.Shape());
+  if (!cut1.IsDone())
+    StdFail_NotDone::Raise("Coudn't build transition part of thickness reduction");
+  TopoDS_Shape aReduction = cut1.Shape();
+
+  // Build the thin part, if required
+  TopoDS_Shape aThinPart;
+  if (isThinPart) {
+    BRepPrimAPI_MakeCylinder CExt (anAxesCyl, RthinExt, Lthin);
+    BRepPrimAPI_MakeCylinder CInt (anAxesCyl, Rthin, Lthin);
+    CExt.Build();
+    CInt.Build();
+    if (!CExt.IsDone() || !CInt.IsDone())
+      StdFail_NotDone::Raise("Cannot build cylinders of thickness reduction");
+    BRepAlgoAPI_Cut cut2 (CExt.Shape(), CInt.Shape());
+    if (!cut2.IsDone())
+      StdFail_NotDone::Raise("Coudn't build thin part of thickness reduction");
+    aThinPart = cut2.Shape();
+  }
+
+  // Join parts
+  if (fuse) {
+    if (isThinPart) {
+      BRepAlgoAPI_Fuse fuse1 (aReduction, aThinPart);
+      if (!fuse1.IsDone())
+        StdFail_NotDone::Raise("Cannot fuse parts of thickness reduction");
+      aReduction = fuse1.Shape();
+    }
+  }
+  else {
+    // Partition the reduction on blocks
+    gp_Ax3 anAxesPln1 (aPntCyl, theAxes.XDirection(), aNormal);
+    gp_Ax3 anAxesPln2 (aPntCyl, theAxes.YDirection(), aNormal);
+    gp_Pln aPln1 (anAxesPln1);
+    gp_Pln aPln2 (anAxesPln2);
+    double aSize = Ltrans + Lthin + R + Rthin + Wthin; // to guarantee enough size in all directions
+    TopoDS_Shape aTool1 = BRepBuilderAPI_MakeFace(aPln1, -aSize, +aSize, -aSize, +aSize).Shape();
+    TopoDS_Shape aTool2 = BRepBuilderAPI_MakeFace(aPln2, -aSize, +aSize, -aSize, +aSize).Shape();
+
+    GEOMAlgo_Splitter PS;
+    PS.AddArgument(aReduction);
+    if (isThinPart)
+      PS.AddArgument(aThinPart);
+    PS.AddTool(aTool1);
+    PS.AddTool(aTool2);
+    PS.SetLimit(TopAbs_SOLID);
+    PS.Perform();
+
+    aReduction = PS.Shape();
+  }
+
+  return aReduction;
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShape
+ *  \brief Create a T-shape object with specified caracteristics for the main and
+ *         the incident pipes (radius, width, half-length).
+ *         Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+  AdvancedEngine_IOperations::MakePipeTShape(double theR1, double theW1, double theL1,
+                                            double theR2, double theW2, double theL2,
+                                            double theRL, double theWL, double theLtransL, double theLthinL,
+                                            double theRR, double theWR, double theLtransR, double theLthinR,
+                                            double theRI, double theWI, double theLtransI, double theLthinI,
+                                            bool theHexMesh)
+{
+  MESSAGE("AdvancedEngine_IOperations::MakePipeTShape");
+  SetErrorCode(KO);
+  //Add a new object
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+
+  //Add a new shape function with parameters
+  Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL;
+
+  AdvancedEngine_IPipeTShape aData (aFunction);
+
+  aData.SetR1(theR1);
+  aData.SetW1(theW1);
+  aData.SetL1(theL1);
+  aData.SetR2(theR2);
+  aData.SetW2(theW2);
+  aData.SetL2(theL2);
+  aData.SetHexMesh(theHexMesh);
+
+  bool isTRL = (theRL + theWL + theLtransL + theLthinL) > Precision::Confusion();
+  bool isTRR = (theRR + theWR + theLtransR + theLthinR) > Precision::Confusion();
+  bool isTRI = (theRI + theWI + theLtransI + theLthinI) > Precision::Confusion();
+
+  //Compute the resulting value
+  try {
+    OCC_CATCH_SIGNALS;
+    if (!GetSolver()->ComputeFunction(aFunction)) {
+      SetErrorCode("TShape driver failed");
+      return NULL;
+    }
+
+    if (theHexMesh) {
+      if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
+        return NULL;
+      if (!MakePipeTShapeMirrorAndGlue(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
+        return NULL;
+    }
+
+    if (isTRL || isTRR || isTRI) {
+      // Add thickness reduction elements
+      // at the three extremities: Left, Right and Incident
+      TopoDS_Shape aResShape =
+        MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
+                                         theRL, theWL, theLtransL, theLthinL,
+                                         theRR, theWR, theLtransR, theLthinR,
+                                         theRI, theWI, theLtransI, theLthinI,
+                                         !theHexMesh);
+      aFunction->SetValue(aResShape);
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
+  aSeq->Append(aShape);
+
+  try {
+    if (theHexMesh) {
+      // Get the groups
+      if (!MakeGroups(aShape, TSHAPE_BASIC, theR1, theW1, theL1, theR2, theW2, theL2,
+                      0., 0., 0., aSeq, gp_Trsf()))
+        return NULL;
+    }
+
+    // Get internal group.
+    if (!MakeInternalGroup(aShape, theR1, theL1, theR2, theL2, theRL, theLtransL,
+                           theRR, theLtransR, theRI, theLtransI,
+                           aSeq, gp_Trsf())) {
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  //Make a Python command
+  TCollection_AsciiString anEntry, aListRes("[");
+  // Iterate over the sequence aSeq
+  Standard_Integer aNbGroups = aSeq->Length();
+  Standard_Integer i = 1;
+  for (; i <= aNbGroups; i++) {
+    Handle(Standard_Transient) anItem = aSeq->Value(i);
+    if (anItem.IsNull()) continue;
+    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(anItem);
+    if (aGroup.IsNull()) continue;
+    //Make a Python command
+    TDF_Tool::Entry(aGroup->GetEntry(), anEntry);
+    aListRes += anEntry + ", ";
+  }
+  aListRes.Trunc(aListRes.Length() - 2);
+
+  GEOM::TPythonDump pd (aFunction);
+
+  pd << aListRes.ToCString() << "] = geompy.MakePipeTShape("
+     << theR1 << ", " << theW1 << ", " << theL1 << ", "
+     << theR2 << ", " << theW2 << ", " << theL2 << ", "
+     << theHexMesh;
+
+  // thickness reduction
+  if (isTRL)
+    pd << ", theRL=" << theRL << ", theWL=" << theWL
+       << ", theLtransL=" << theLtransL << ", theLthinL=" << theLthinL;
+  if (isTRR)
+    pd << ", theRR=" << theRR << ", theWR=" << theWR
+       << ", theLtransR=" << theLtransR << ", theLthinR=" << theLthinR;
+  if (isTRI)
+    pd << ", theRI=" << theRI << ", theWI=" << theWI
+       << ", theLtransI=" << theLtransI << ", theLthinI=" << theLthinI;
+
+  pd << ")";
+
+  SetErrorCode(OK);
+
+  return aSeq;
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeWithPosition
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length).
+ *  The extremities of the main pipe are located on junctions points P1 and P2.
+ *  The extremity of the incident pipe is located on junction point P3.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \param theP1 1st junction point of main pipe
+ *  \param theP2 2nd junction point of main pipe
+ *  \param theP3 Junction point of incident pipe
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups..
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+AdvancedEngine_IOperations::MakePipeTShapeWithPosition
+                             (double theR1, double theW1, double theL1,
+                              double theR2, double theW2, double theL2,
+                              double theRL, double theWL, double theLtransL, double theLthinL,
+                              double theRR, double theWR, double theLtransR, double theLthinR,
+                              double theRI, double theWI, double theLtransI, double theLthinI,
+                              bool theHexMesh,
+                              Handle(GEOM_Object) theP1,
+                              Handle(GEOM_Object) theP2,
+                              Handle(GEOM_Object) theP3)
+{
+  SetErrorCode(KO);
+  //Add a new object
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  /////////////////
+  // TSHAPE CODE
+  /////////////////
+  //Add a new shape function with parameters
+  Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL;
+
+  // Check new position
+  if (!CheckCompatiblePosition(theL1, theL2, theP1, theP2, theP3, 0.01)) {
+    return NULL;
+  }
+
+  AdvancedEngine_IPipeTShape aData(aFunction);
+
+  aData.SetR1(theR1);
+  aData.SetW1(theW1);
+  aData.SetL1(theL1);
+  aData.SetR2(theR2);
+  aData.SetW2(theW2);
+  aData.SetL2(theL2);
+  aData.SetHexMesh(theHexMesh);
+
+  bool isTRL = (theRL + theWL + theLtransL + theLthinL) > Precision::Confusion();
+  bool isTRR = (theRR + theWR + theLtransR + theLthinR) > Precision::Confusion();
+  bool isTRI = (theRI + theWI + theLtransI + theLthinI) > Precision::Confusion();
+
+  //Compute the resulting value
+  try {
+    OCC_CATCH_SIGNALS;
+    if (!GetSolver()->ComputeFunction(aFunction)) {
+      SetErrorCode("TShape driver failed");
+      return NULL;
+    }
+
+    if (theHexMesh) {
+      if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
+        return NULL;
+      if (!MakePipeTShapeMirrorAndGlue(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
+        return NULL;
+    }
+
+    if (isTRL || isTRR || isTRI) {
+      // Add thickness reduction elements
+      // at the three extremities: Left, Right and Incident
+      TopoDS_Shape aResShape =
+        MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
+                                         theRL, theWL, theLtransL, theLthinL,
+                                         theRR, theWR, theLtransR, theLthinR,
+                                         theRI, theWI, theLtransI, theLthinI,
+                                         !theHexMesh);
+      aFunction->SetValue(aResShape);
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  TopoDS_Shape Te = aShape->GetValue();
+
+  // Set Position
+  gp_Trsf aTrsf = GetPositionTrsf(theL1, theL2, theP1, theP2, theP3);
+  BRepBuilderAPI_Transform aTransformation(Te, aTrsf, Standard_False);
+  TopoDS_Shape aTrsf_Shape = aTransformation.Shape();
+  aFunction->SetValue(aTrsf_Shape);
+
+  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
+  aSeq->Append(aShape);
+
+  try {
+    if (theHexMesh) {
+      // Get the groups
+      if (!MakeGroups(aShape,TSHAPE_BASIC, theR1, theW1, theL1, theR2, theW2, theL2,
+                      0., 0., 0., aSeq, aTrsf)) {
+        return NULL;
+      }
+    }
+
+    // Get internal group.
+    if (!MakeInternalGroup(aShape, theR1, theL1, theR2, theL2, theRL, theLtransL,
+                           theRR, theLtransR, theRI, theLtransI,
+                           aSeq, aTrsf)) {
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  //Make a Python command
+  TCollection_AsciiString anEntry, aListRes("[");
+  // Iterate over the sequence aSeq
+  Standard_Integer aNbGroups = aSeq->Length();
+  Standard_Integer i = 1;
+  for (; i <= aNbGroups; i++) {
+    Handle(Standard_Transient) anItem = aSeq->Value(i);
+    if (anItem.IsNull()) continue;
+    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(anItem);
+    if (aGroup.IsNull()) continue;
+    //Make a Python command
+    TDF_Tool::Entry(aGroup->GetEntry(), anEntry);
+    aListRes += anEntry + ", ";
+  }
+  aListRes.Trunc(aListRes.Length() - 2);
+
+  GEOM::TPythonDump pd (aFunction);
+
+  pd << aListRes.ToCString() << "] = geompy.MakePipeTShape("
+     << theR1 << ", " << theW1 << ", " << theL1 << ", "
+     << theR2 << ", " << theW2 << ", " << theL2 << ", "
+     << theHexMesh << ", " << theP1 << ", " << theP2 << ", " << theP3;
+
+  // thickness reduction
+  if (isTRL)
+    pd << ", theRL=" << theRL << ", theWL=" << theWL
+       << ", theLtransL=" << theLtransL << ", theLthinL=" << theLthinL;
+  if (isTRR)
+    pd << ", theRR=" << theRR << ", theWR=" << theWR
+       << ", theLtransR=" << theLtransR << ", theLthinR=" << theLthinR;
+  if (isTRI)
+    pd << ", theRI=" << theRI << ", theWI=" << theWI
+       << ", theLtransI=" << theLtransI << ", theLthinI=" << theLthinI;
+
+  pd << ")";
+
+  SetErrorCode(OK);
+
+  return aSeq;
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeChamfer
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length). A chamfer is created
+ *  on the junction of the pipes.
+ *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theH Height of chamfer.
+ *  \param theW Width of chamfer.
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+AdvancedEngine_IOperations::MakePipeTShapeChamfer
+                             (double theR1, double theW1, double theL1,
+                              double theR2, double theW2, double theL2,
+                              double theRL, double theWL, double theLtransL, double theLthinL,
+                              double theRR, double theWR, double theLtransR, double theLthinR,
+                              double theRI, double theWI, double theLtransI, double theLthinI,
+                              double theH, double theW,
+                              bool theHexMesh)
+{
+  SetErrorCode(KO);
+  //Add a new object
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  //Add a new shape function with parameters
+  Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL;
+
+  AdvancedEngine_IPipeTShape aData(aFunction);
+
+  aData.SetR1(theR1);
+  aData.SetW1(theW1);
+  aData.SetL1(theL1);
+  aData.SetR2(theR2);
+  aData.SetW2(theW2);
+  aData.SetL2(theL2);
+  aData.SetH(theH);
+  aData.SetW(theW);
+  aData.SetHexMesh(theHexMesh);
+
+  bool isTRL = (theRL + theWL + theLtransL + theLthinL) > Precision::Confusion();
+  bool isTRR = (theRR + theWR + theLtransR + theLthinR) > Precision::Confusion();
+  bool isTRI = (theRI + theWI + theLtransI + theLthinI) > Precision::Confusion();
+
+  //Compute the resulting value
+  try {
+    OCC_CATCH_SIGNALS;
+    if (!GetSolver()->ComputeFunction(aFunction)) {
+      SetErrorCode("TShape driver failed");
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  // BEGIN of chamfer
+  TopoDS_Shape aShapeShape = aShape->GetValue();
+  TopTools_IndexedMapOfShape anEdgesIndices;
+  TopExp::MapShapes(aShapeShape, anEdgesIndices);
+  // Common edges on external cylinders
+  Handle(GEOM_Object) box_e;
+  if (theHexMesh) {
+    box_e = my3DPrimOperations->MakeBoxDXDYDZ(theR2+theW2, theR2+theW2, theR1+theW1);
+  }
+  else {
+    box_e = my3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
+  }
+  box_e->GetLastFunction()->SetDescription("");
+  box_e = myTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
+  box_e->GetLastFunction()->SetDescription("");
+
+  Handle(TColStd_HSequenceOfInteger) edges_e =
+    myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
+  box_e->GetLastFunction()->SetDescription("");
+
+  if (edges_e.IsNull() || edges_e->Length() == 0) {
+    SetErrorCode("External edges not found");
+    return NULL;
+  }
+  int nbEdgesInChamfer = 0;
+  std::list<int> theEdges;
+  for (int i=1; i<=edges_e->Length();i++) {
+    int edgeID = edges_e->Value(i);
+    TopoDS_Shape theEdge = anEdgesIndices.FindKey(edgeID);
+    TopExp_Explorer Ex(theEdge,TopAbs_VERTEX);
+    int iv=0;
+    while (Ex.More()) {
+      iv ++;
+      gp_Pnt aPt = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
+      if (Abs(aPt.Z() - (theR1+theW1)) <= Precision::Confusion()) {
+        nbEdgesInChamfer ++;
+        theEdges.push_back(edgeID);
+      }
+      Ex.Next();
+    }
+    if (theHexMesh && nbEdgesInChamfer == 1)
+      break;
+  }
+  Handle(GEOM_Object) aChamfer;
+  try {
+    aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+  if (aChamfer.IsNull()) {
+    SetErrorCode("Chamfer can not be computed on the given shape with the given parameters");
+    return NULL;
+  }
+  aChamfer->GetLastFunction()->SetDescription("");
+
+  TopoDS_Shape aChamferShape = aChamfer->GetValue();
+  aFunction->SetValue(aChamferShape);
+  // END of chamfer
+
+  if (theHexMesh) {
+    if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, 0, false))
+      return NULL;
+    if (!MakePipeTShapeMirrorAndGlue(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
+      return NULL;
+  }
+
+  // Add thickness reduction elements
+  // at the three extremities: Left, Right and Incident
+  try {
+    OCC_CATCH_SIGNALS;
+    if (isTRL || isTRR || isTRI) {
+      TopoDS_Shape aResShape =
+        MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
+                                         theRL, theWL, theLtransL, theLthinL,
+                                         theRR, theWR, theLtransR, theLthinR,
+                                         theRI, theWI, theLtransI, theLthinI,
+                                         !theHexMesh);
+      aFunction->SetValue(aResShape);
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
+  aSeq->Append(aShape);
+
+  try {
+    if (theHexMesh) {
+      // Get the groups
+      if (!MakeGroups(aShape, TSHAPE_CHAMFER, theR1, theW1, theL1, theR2, theW2, theL2,
+                      theH, theW, 0., aSeq, gp_Trsf()))
+        return NULL;
+    }
+
+    // Get internal group.
+    if (!MakeInternalGroup(aShape, theR1, theL1, theR2, theL2, theRL, theLtransL,
+                           theRR, theLtransR, theRI, theLtransI,
+                           aSeq, gp_Trsf())) {
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  //Make a Python command
+  TCollection_AsciiString anEntry, aListRes("[");
+  // Iterate over the sequence aSeq
+  Standard_Integer aNbGroups = aSeq->Length();
+  Standard_Integer i = 1;
+  for (; i <= aNbGroups; i++) {
+    Handle(Standard_Transient) anItem = aSeq->Value(i);
+    if (anItem.IsNull()) continue;
+    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(anItem);
+    if (aGroup.IsNull()) continue;
+    //Make a Python command
+    TDF_Tool::Entry(aGroup->GetEntry(), anEntry);
+    aListRes += anEntry + ", ";
+  }
+  aListRes.Trunc(aListRes.Length() - 2);
+
+  GEOM::TPythonDump pd (aFunction);
+
+  pd << aListRes.ToCString() << "] = geompy.MakePipeTShapeChamfer("
+     << theR1 << ", " << theW1 << ", " << theL1 << ", "
+     << theR2 << ", " << theW2 << ", " << theL2 << ", "
+     << theH << ", " << theW << ", " << theHexMesh;
+
+  // thickness reduction
+  if (isTRL)
+    pd << ", theRL=" << theRL << ", theWL=" << theWL
+       << ", theLtransL=" << theLtransL << ", theLthinL=" << theLthinL;
+  if (isTRR)
+    pd << ", theRR=" << theRR << ", theWR=" << theWR
+       << ", theLtransR=" << theLtransR << ", theLthinR=" << theLthinR;
+  if (isTRI)
+    pd << ", theRI=" << theRI << ", theWI=" << theWI
+       << ", theLtransI=" << theLtransI << ", theLthinI=" << theLthinI;
+
+  pd << ")";
+
+  SetErrorCode(OK);
+
+  return aSeq;
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeChamferWithPosition
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length). A chamfer is created
+ *  on the junction of the pipes.
+ *  The extremities of the main pipe are located on junctions points P1 and P2.
+ *  The extremity of the incident pipe is located on junction point P3.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theH Height of chamfer.
+ *  \param theW Width of chamfer.
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \param theP1 1st junction point of main pipe
+ *  \param theP2 2nd junction point of main pipe
+ *  \param theP3 Junction point of incident pipe
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+AdvancedEngine_IOperations::MakePipeTShapeChamferWithPosition
+                             (double theR1, double theW1, double theL1,
+                              double theR2, double theW2, double theL2,
+                              double theRL, double theWL, double theLtransL, double theLthinL,
+                              double theRR, double theWR, double theLtransR, double theLthinR,
+                              double theRI, double theWI, double theLtransI, double theLthinI,
+                              double theH, double theW,
+                              bool theHexMesh,
+                              Handle(GEOM_Object) theP1,
+                              Handle(GEOM_Object) theP2,
+                              Handle(GEOM_Object) theP3)
+{
+  SetErrorCode(KO);
+  //Add a new object
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  //Add a new shape function with parameters
+  Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL;
+
+  // Check new position
+  if (!CheckCompatiblePosition(theL1, theL2, theP1, theP2, theP3, 0.01)) {
+    return NULL;
+  }
+
+  AdvancedEngine_IPipeTShape aData(aFunction);
+
+  aData.SetR1(theR1);
+  aData.SetW1(theW1);
+  aData.SetL1(theL1);
+  aData.SetR2(theR2);
+  aData.SetW2(theW2);
+  aData.SetL2(theL2);
+  aData.SetH(theH);
+  aData.SetW(theW);
+  aData.SetHexMesh(theHexMesh);
+
+  bool isTRL = (theRL + theWL + theLtransL + theLthinL) > Precision::Confusion();
+  bool isTRR = (theRR + theWR + theLtransR + theLthinR) > Precision::Confusion();
+  bool isTRI = (theRI + theWI + theLtransI + theLthinI) > Precision::Confusion();
+
+  //Compute the resulting value
+  try {
+    OCC_CATCH_SIGNALS;
+    if (!GetSolver()->ComputeFunction(aFunction)) {
+      SetErrorCode("TShape driver failed");
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  // BEGIN of chamfer
+  TopoDS_Shape aShapeShape = aShape->GetValue();
+  TopTools_IndexedMapOfShape anEdgesIndices;
+  TopExp::MapShapes(aShapeShape, anEdgesIndices);
+  // Common edges on external cylinders
+  Handle(GEOM_Object) box_e;
+  if (theHexMesh) {
+    box_e = my3DPrimOperations->MakeBoxDXDYDZ(theR2+theW2, theR2+theW2, theR1+theW1);
+  }
+  else {
+    box_e = my3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
+  }
+  box_e->GetLastFunction()->SetDescription("");
+  box_e = myTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
+  box_e->GetLastFunction()->SetDescription("");
+
+  Handle(TColStd_HSequenceOfInteger) edges_e =
+    myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
+  box_e->GetLastFunction()->SetDescription("");
+
+  if (edges_e.IsNull() || edges_e->Length() == 0) {
+    SetErrorCode("External edges not found");
+    return NULL;
+  }
+  int nbEdgesInChamfer = 0;
+  std::list<int> theEdges;
+  for (int i=1; i<=edges_e->Length();i++) {
+    int edgeID = edges_e->Value(i);
+    TopoDS_Shape theEdge = anEdgesIndices.FindKey(edgeID);
+    TopExp_Explorer Ex(theEdge,TopAbs_VERTEX);
+    while (Ex.More()) {
+      gp_Pnt aPt = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
+      if (Abs(aPt.Z() - (theR1+theW1)) <= Precision::Confusion()) {
+        nbEdgesInChamfer ++;
+        theEdges.push_back(edgeID);
+      }
+      Ex.Next();
+    }
+    if (theHexMesh && nbEdgesInChamfer == 1)
+      break;
+  }
+  Handle(GEOM_Object) aChamfer;
+  try {
+    aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+  if (aChamfer.IsNull()) {
+    SetErrorCode("Chamfer can not be computed on the given shape with the given parameters");
+    return NULL;
+  }
+  aChamfer->GetLastFunction()->SetDescription("");
+
+  TopoDS_Shape aChamferShape = aChamfer->GetValue();
+  aFunction->SetValue(aChamferShape);
+  // END of chamfer
+
+  if (theHexMesh) {
+    if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, 0, false))
+      return NULL;
+    if (!MakePipeTShapeMirrorAndGlue(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
+      return NULL;
+  }
+
+  // Add thickness reduction elements
+  // at the three extremities: Left, Right and Incident
+  try {
+    OCC_CATCH_SIGNALS;
+    if (isTRL || isTRR || isTRI) {
+      TopoDS_Shape aResShape =
+        MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
+                                         theRL, theWL, theLtransL, theLthinL,
+                                         theRR, theWR, theLtransR, theLthinR,
+                                         theRI, theWI, theLtransI, theLthinI,
+                                         !theHexMesh);
+      aFunction->SetValue(aResShape);
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  // Set Position
+  gp_Trsf aTrsf = GetPositionTrsf(theL1, theL2, theP1, theP2, theP3);
+  BRepBuilderAPI_Transform aTransformation (aShape->GetValue(), aTrsf, Standard_False);
+  TopoDS_Shape aTrsf_Shape = aTransformation.Shape();
+  aFunction->SetValue(aTrsf_Shape);
+
+  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
+  aSeq->Append(aShape);
+
+  try {
+    if (theHexMesh) {
+      // Get the groups
+      if (!MakeGroups(aShape, TSHAPE_CHAMFER, theR1, theW1, theL1, theR2, theW2, theL2,
+                      theH, theW, 0., aSeq, aTrsf))
+        return NULL;
+    }
+
+    // Get internal group.
+    if (!MakeInternalGroup(aShape, theR1, theL1, theR2, theL2, theRL, theLtransL,
+                           theRR, theLtransR, theRI, theLtransI,
+                           aSeq, aTrsf)) {
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  //Make a Python command
+  TCollection_AsciiString anEntry, aListRes("[");
+  // Iterate over the sequence aSeq
+  Standard_Integer aNbGroups = aSeq->Length();
+  Standard_Integer i = 1;
+  for (; i <= aNbGroups; i++) {
+    Handle(Standard_Transient) anItem = aSeq->Value(i);
+    if (anItem.IsNull()) continue;
+    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(anItem);
+    if (aGroup.IsNull()) continue;
+    //Make a Python command
+    TDF_Tool::Entry(aGroup->GetEntry(), anEntry);
+    aListRes += anEntry + ", ";
+  }
+  aListRes.Trunc(aListRes.Length() - 2);
+
+  GEOM::TPythonDump pd (aFunction);
+
+  pd << aListRes.ToCString() << "] = geompy.MakePipeTShapeChamfer("
+     << theR1 << ", " << theW1 << ", " << theL1 << ", "
+     << theR2 << ", " << theW2 << ", " << theL2 << ", "
+     << theH << ", " << theW << ", " << theHexMesh << ", "
+     << theP1 << ", " << theP2 << ", " << theP3;
+
+  // thickness reduction
+  if (isTRL)
+    pd << ", theRL=" << theRL << ", theWL=" << theWL
+       << ", theLtransL=" << theLtransL << ", theLthinL=" << theLthinL;
+  if (isTRR)
+    pd << ", theRR=" << theRR << ", theWR=" << theWR
+       << ", theLtransR=" << theLtransR << ", theLthinR=" << theLthinR;
+  if (isTRI)
+    pd << ", theRI=" << theRI << ", theWI=" << theWI
+       << ", theLtransI=" << theLtransI << ", theLthinI=" << theLthinI;
+
+  pd << ")";
+
+  SetErrorCode(OK);
+
+  return aSeq;
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeFillet
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length). A fillet is created
+ *  on the junction of the pipes.
+ *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theRF Radius of curvature of fillet.
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+AdvancedEngine_IOperations::MakePipeTShapeFillet
+                             (double theR1, double theW1, double theL1,
+                              double theR2, double theW2, double theL2,
+                              double theRL, double theWL, double theLtransL, double theLthinL,
+                              double theRR, double theWR, double theLtransR, double theLthinR,
+                              double theRI, double theWI, double theLtransI, double theLthinI,
+                              double theRF, bool theHexMesh)
+{
+  SetErrorCode(KO);
+  //Add a new object
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  //Add a new shape function with parameters
+  Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL;
+
+  AdvancedEngine_IPipeTShape aData(aFunction);
+
+  aData.SetR1(theR1);
+  aData.SetW1(theW1);
+  aData.SetL1(theL1);
+  aData.SetR2(theR2);
+  aData.SetW2(theW2);
+  aData.SetL2(theL2);
+  aData.SetRF(theRF);
+  aData.SetHexMesh(theHexMesh);
+
+  bool isTRL = (theRL + theWL + theLtransL + theLthinL) > Precision::Confusion();
+  bool isTRR = (theRR + theWR + theLtransR + theLthinR) > Precision::Confusion();
+  bool isTRI = (theRI + theWI + theLtransI + theLthinI) > Precision::Confusion();
+
+  //Compute the resulting value
+  try {
+    OCC_CATCH_SIGNALS;
+    if (!GetSolver()->ComputeFunction(aFunction)) {
+      SetErrorCode("TShape driver failed");
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  // BEGIN of fillet
+  TopoDS_Shape aShapeShape = aShape->GetValue();
+  TopTools_IndexedMapOfShape anEdgesIndices;
+  TopExp::MapShapes(aShapeShape, anEdgesIndices);
+  // Common edges on external cylinders
+  Handle(GEOM_Object) box_e;
+  if (theHexMesh) {
+    box_e = my3DPrimOperations->MakeBoxDXDYDZ(theR2+theW2, theR2+theW2, theR1+theW1);
+  }
+  else {
+    box_e = my3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
+  }
+  box_e->GetLastFunction()->SetDescription("");
+  box_e = myTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
+  box_e->GetLastFunction()->SetDescription("");
+
+  Handle(TColStd_HSequenceOfInteger) edges_e =
+    myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
+  box_e->GetLastFunction()->SetDescription("");
+
+  if (edges_e.IsNull() || edges_e->Length() == 0) {
+    SetErrorCode("External edges not found");
+    return NULL;
+  }
+  int nbEdgesInFillet = 0;
+  std::list<int> theEdges;
+  for (int i=1; i<=edges_e->Length();i++) {
+    int edgeID = edges_e->Value(i);
+    TopoDS_Shape theEdge = anEdgesIndices.FindKey(edgeID);
+    TopExp_Explorer Ex(theEdge,TopAbs_VERTEX);
+    while (Ex.More()) {
+      gp_Pnt aPt = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
+      if (Abs(aPt.Z() - (theR1+theW1)) <= Precision::Confusion()) {
+        nbEdgesInFillet ++;
+        theEdges.push_back(edgeID);
+      }
+      Ex.Next();
+    }
+    if (theHexMesh && nbEdgesInFillet == 1)
+      break;
+  }
+
+  Handle(GEOM_Object) aFillet;
+  try {
+    aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+  if (aFillet.IsNull()) {
+    //SetErrorCode("Fillet can not be computed on the given shape with the given parameters");
+    SetErrorCode(myLocalOperations->GetErrorCode());
+    return NULL;
+  }
+  aFillet->GetLastFunction()->SetDescription("");
+
+  TopoDS_Shape aFilletShape = aFillet->GetValue();
+  aFunction->SetValue(aFilletShape);
+  // END of fillet
+
+// VSR: debug issues 0021568 and 0021550 (15/05/2012) - BEGIN (1)
+// the following block, when enabled, leads to partitioning problems
+#if 0
+// VSR: debug issues 0021568 and 0021550 (15/05/2012) - END (1)
+  // BEGIN: Limit tolerances (debug)
+  Handle(GEOM_Object) aCorr1 = myHealingOperations->LimitTolerance(aShape, 1e-07);
+  TopoDS_Shape aCorr1Shape = aCorr1->GetValue();
+  aShape->GetLastFunction()->SetValue(aCorr1Shape);
+  aCorr1->GetLastFunction()->SetDescription("");
+  // END: Limit tolerances (debug)
+// VSR: debug issues 0021568 and 0021550 (15/05/2012) - BEGIN (2)
+#endif
+// VSR: debug issues 0021568 and 0021550 (15/05/2012) - END (2)
+
+  if (theHexMesh) {
+    if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2, 0, 0, theRF, false))
+      return NULL;
+    if (!MakePipeTShapeMirrorAndGlue(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
+      return NULL;
+  }
+
+  // Add thickness reduction elements
+  // at the three extremities: Left, Right and Incident
+  try {
+    OCC_CATCH_SIGNALS;
+    if (isTRL || isTRR || isTRI) {
+      TopoDS_Shape aResShape =
+        MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
+                                         theRL, theWL, theLtransL, theLthinL,
+                                         theRR, theWR, theLtransR, theLthinR,
+                                         theRI, theWI, theLtransI, theLthinI,
+                                         !theHexMesh);
+      aFunction->SetValue(aResShape);
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
+  aSeq->Append(aShape);
+
+  try {
+    if (theHexMesh) {
+      // Get the groups
+      if (!MakeGroups(aShape, TSHAPE_FILLET, theR1, theW1, theL1, theR2, theW2, theL2,
+                      0., 0., theRF, aSeq, gp_Trsf()))
+        return NULL;
+    }
+
+    // Get internal group.
+    if (!MakeInternalGroup(aShape, theR1, theL1, theR2, theL2, theRL, theLtransL,
+                           theRR, theLtransR, theRI, theLtransI,
+                           aSeq, gp_Trsf())) {
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  //Make a Python command
+  TCollection_AsciiString anEntry, aListRes("[");
+  // Iterate over the sequence aSeq
+  Standard_Integer aNbGroups = aSeq->Length();
+  Standard_Integer i = 1;
+  for (; i <= aNbGroups; i++) {
+    Handle(Standard_Transient) anItem = aSeq->Value(i);
+    if (anItem.IsNull()) continue;
+    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(anItem);
+    if (aGroup.IsNull()) continue;
+    //Make a Python command
+    TDF_Tool::Entry(aGroup->GetEntry(), anEntry);
+    aListRes += anEntry + ", ";
+  }
+  aListRes.Trunc(aListRes.Length() - 2);
+
+  GEOM::TPythonDump pd (aFunction);
+
+  pd << aListRes.ToCString() << "] = geompy.MakePipeTShapeFillet("
+     << theR1 << ", " << theW1 << ", " << theL1 << ", "
+     << theR2 << ", " << theW2 << ", " << theL2 << ", "
+     << theRF << ", " << theHexMesh;
+
+  // thickness reduction
+  if (isTRL)
+    pd << ", theRL=" << theRL << ", theWL=" << theWL
+       << ", theLtransL=" << theLtransL << ", theLthinL=" << theLthinL;
+  if (isTRR)
+    pd << ", theRR=" << theRR << ", theWR=" << theWR
+       << ", theLtransR=" << theLtransR << ", theLthinR=" << theLthinR;
+  if (isTRI)
+    pd << ", theRI=" << theRI << ", theWI=" << theWI
+       << ", theLtransI=" << theLtransI << ", theLthinI=" << theLthinI;
+
+  pd << ")";
+
+  SetErrorCode(OK);
+
+  return aSeq;
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeFilletWithPosition
+ *  \brief Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length). A fillet is created
+ *  on the junction of the pipes.
+ *  The extremities of the main pipe are located on junctions points P1 and P2.
+ *  The extremity of the incident pipe is located on junction point P3.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theRF Radius of curvature of fillet
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \param theP1 1st junction point of main pipe
+ *  \param theP2 2nd junction point of main pipe
+ *  \param theP3 Junction point of incident pipe
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition
+                             (double theR1, double theW1, double theL1,
+                              double theR2, double theW2, double theL2,
+                              double theRL, double theWL, double theLtransL, double theLthinL,
+                              double theRR, double theWR, double theLtransR, double theLthinR,
+                              double theRI, double theWI, double theLtransI, double theLthinI,
+                              double theRF, bool theHexMesh,
+                              Handle(GEOM_Object) theP1,
+                              Handle(GEOM_Object) theP2,
+                              Handle(GEOM_Object) theP3)
+{
+  SetErrorCode(KO);
+  //Add a new object
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  //Add a new shape function with parameters
+  Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL;
+
+  // Check new position
+  if (!CheckCompatiblePosition(theL1, theL2, theP1, theP2, theP3, 0.01)) {
+    return NULL;
+  }
+
+  AdvancedEngine_IPipeTShape aData(aFunction);
+
+  aData.SetR1(theR1);
+  aData.SetW1(theW1);
+  aData.SetL1(theL1);
+  aData.SetR2(theR2);
+  aData.SetW2(theW2);
+  aData.SetL2(theL2);
+  aData.SetRF(theRF);
+  aData.SetHexMesh(theHexMesh);
+
+  bool isTRL = (theRL + theWL + theLtransL + theLthinL) > Precision::Confusion();
+  bool isTRR = (theRR + theWR + theLtransR + theLthinR) > Precision::Confusion();
+  bool isTRI = (theRI + theWI + theLtransI + theLthinI) > Precision::Confusion();
+
+  //Compute the resulting value
+  try {
+    OCC_CATCH_SIGNALS;
+    if (!GetSolver()->ComputeFunction(aFunction)) {
+      SetErrorCode("TShape driver failed");
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  // BEGIN of fillet
+  TopoDS_Shape aShapeShape = aShape->GetValue();
+  TopTools_IndexedMapOfShape anEdgesIndices;
+  TopExp::MapShapes(aShapeShape, anEdgesIndices);
+  // Common edges on external cylinders
+  Handle(GEOM_Object) box_e;
+  if (theHexMesh) {
+    box_e = my3DPrimOperations->MakeBoxDXDYDZ(theR2+theW2, theR2+theW2, theR1+theW1);
+  }
+  else {
+    box_e = my3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
+  }
+  box_e->GetLastFunction()->SetDescription("");
+  box_e = myTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
+  box_e->GetLastFunction()->SetDescription("");
+
+  Handle(TColStd_HSequenceOfInteger) edges_e =
+    myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
+  box_e->GetLastFunction()->SetDescription("");
+
+  if (edges_e.IsNull() || edges_e->Length() == 0) {
+    SetErrorCode("External edges not found");
+    return NULL;
+  }
+  int nbEdgesInFillet = 0;
+  std::list<int> theEdges;
+  for (int i=1; i<=edges_e->Length();i++) {
+    int edgeID = edges_e->Value(i);
+    TopoDS_Shape theEdge = anEdgesIndices.FindKey(edgeID);
+    TopExp_Explorer Ex(theEdge,TopAbs_VERTEX);
+    while (Ex.More()) {
+      gp_Pnt aPt = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
+      if (Abs(aPt.Z() - (theR1+theW1)) <= Precision::Confusion()) {
+        nbEdgesInFillet ++;
+        theEdges.push_back(edgeID);
+      }
+      Ex.Next();
+    }
+    if (theHexMesh && nbEdgesInFillet == 1)
+      break;
+  }
+
+  Handle(GEOM_Object) aFillet;
+  try {
+    aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+  if (aFillet.IsNull()) {
+    SetErrorCode("Fillet can not be computed on the given shape with the given parameters");
+    return NULL;
+  }
+  aFillet->GetLastFunction()->SetDescription("");
+
+  TopoDS_Shape aFilletShape = aFillet->GetValue();
+  aFunction->SetValue(aFilletShape);
+  // END of fillet
+
+// VSR: debug issues 0021568 and 0021550 (15/05/2012) - BEGIN (3)
+// the following block, when enabled, leads to partitioning problems
+#if 0
+// VSR: debug issues 0021568 and 0021550 (15/05/2012) - END (3)
+  // BEGIN: Limit tolerances (debug)
+  Handle(GEOM_Object) aCorr1 = myHealingOperations->LimitTolerance(aShape, 1e-07);
+  TopoDS_Shape aCorr1Shape = aCorr1->GetValue();
+  aShape->GetLastFunction()->SetValue(aCorr1Shape);
+  aCorr1->GetLastFunction()->SetDescription("");
+  // END: Limit tolerances (debug)
+// VSR: debug issues 0021568 and 0021550 (15/05/2012) - BEGIN (4)
+#endif
+// VSR: debug issues 0021568 and 0021550 (15/05/2012) - END (4)
+
+  if (theHexMesh) {
+    if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2, 0, 0, theRF, false))
+      return NULL;
+    if (!MakePipeTShapeMirrorAndGlue(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
+      return NULL;
+  }
+
+  // Add thickness reduction elements
+  // at the three extremities: Left, Right and Incident
+  try {
+    OCC_CATCH_SIGNALS;
+    if (isTRL || isTRR || isTRI) {
+      TopoDS_Shape aResShape =
+        MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
+                                         theRL, theWL, theLtransL, theLthinL,
+                                         theRR, theWR, theLtransR, theLthinR,
+                                         theRI, theWI, theLtransI, theLthinI,
+                                         !theHexMesh);
+      aFunction->SetValue(aResShape);
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  // Set Position
+  gp_Trsf aTrsf = GetPositionTrsf(theL1, theL2, theP1, theP2, theP3);
+  BRepBuilderAPI_Transform aTransformation (aShape->GetValue(), aTrsf, Standard_False);
+  TopoDS_Shape aTrsf_Shape = aTransformation.Shape();
+  aFunction->SetValue(aTrsf_Shape);
+
+  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
+  aSeq->Append(aShape);
+
+  try {
+    if (theHexMesh) {
+      // Get the groups
+      if (!MakeGroups(aShape, TSHAPE_FILLET, theR1, theW1, theL1, theR2, theW2, theL2,
+                      0., 0., theRF, aSeq, aTrsf))
+        return NULL;
+    }
+
+    // Get internal group.
+    if (!MakeInternalGroup(aShape, theR1, theL1, theR2, theL2, theRL, theLtransL,
+                           theRR, theLtransR, theRI, theLtransI,
+                           aSeq, aTrsf)) {
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  //Make a Python command
+  TCollection_AsciiString anEntry, aListRes("[");
+  // Iterate over the sequence aSeq
+  Standard_Integer aNbGroups = aSeq->Length();
+  Standard_Integer i = 1;
+  for (; i <= aNbGroups; i++) {
+    Handle(Standard_Transient) anItem = aSeq->Value(i);
+    if (anItem.IsNull()) continue;
+    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(anItem);
+    if (aGroup.IsNull()) continue;
+    //Make a Python command
+    TDF_Tool::Entry(aGroup->GetEntry(), anEntry);
+    aListRes += anEntry + ", ";
+  }
+  aListRes.Trunc(aListRes.Length() - 2);
+
+  GEOM::TPythonDump pd (aFunction);
+
+  pd << aListRes.ToCString() << "] = geompy.MakePipeTShapeFillet("
+     << theR1 << ", " << theW1 << ", " << theL1 << ", "
+     << theR2  << ", " << theW2 << ", " << theL2 << ", "
+     << theRF << ", " << theHexMesh << ", "
+     << theP1 << ", " << theP2 << ", " << theP3;
+
+  // thickness reduction
+  if (isTRL)
+    pd << ", theRL=" << theRL << ", theWL=" << theWL
+       << ", theLtransL=" << theLtransL << ", theLthinL=" << theLthinL;
+  if (isTRR)
+    pd << ", theRR=" << theRR << ", theWR=" << theWR
+       << ", theLtransR=" << theLtransR << ", theLthinR=" << theLthinR;
+  if (isTRI)
+    pd << ", theRI=" << theRI << ", theWI=" << theWI
+       << ", theLtransI=" << theLtransI << ", theLthinI=" << theLthinI;
+
+  pd << ")";
+
+  SetErrorCode(OK);
+
+  return aSeq;
+}
+
+//=============================================================================
+/*!
+ *  This function allows to create a disk already divided into blocks. It can be
+ *  used to create divided pipes for later meshing in hexaedra.
+ *  \param theR Radius of the disk
+ *  \param theRatio Relative size of the central square diagonal against the disk diameter
+ *  \param theOrientation Plane on which the disk will be built
+ *  \param thePattern The division pattern of the disk (hexagon or square in the center)
+ *  \return New GEOM_Object, containing the created shape.
+ */
+//=============================================================================
+Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDisk (double theR, double theRatio, 
+                                                                int theOrientation, int thePattern)
+{
+  SetErrorCode(KO);
+  
+  if (theOrientation != 1 &&
+      theOrientation != 2 &&
+      theOrientation != 3)
+  {
+    SetErrorCode("theOrientation must be 1(=OXY), 2(=OYZ) or 3(=OZX)");
+    return NULL;
+  }
+  //Add a new object
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
+
+  //Add a new shape function with parameters
+  Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_RATIO);
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != AdvancedEngine_DividedDiskDriver::GetID()) return NULL;
+
+  AdvancedEngine_IDividedDisk aData (aFunction);
+
+  aData.SetR(theR);
+  aData.SetRatio(theRatio);
+  aData.SetOrientation(theOrientation);
+  aData.SetType(thePattern);
+
+  //Compute the resulting value
+  try {
+    OCC_CATCH_SIGNALS;
+    if (!GetSolver()->ComputeFunction(aFunction)) {
+      SetErrorCode("DividedDisk driver failed");
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+  
+  std::string aPatternStr;
+  
+  switch(thePattern)
+  {
+    case 0:
+      aPatternStr = "GEOM.SQUARE";
+      break;
+    case 1:
+      aPatternStr = "GEOM.HEXAGON";
+      break;
+  }
+  
+  //Make a Python command
+  GEOM::TPythonDump(aFunction) << aShape << " = geompy.MakeDividedDisk(" << theR << ", " << theOrientation << ", " << aPatternStr.c_str() << ")";
+
+  SetErrorCode(OK);
+
+  return aShape;
+}
+
+//=============================================================================
+/*!
+ *  This function allows to create a disk already divided into blocks. It can be
+ *  used to create divided pipes for later meshing in hexaedra.
+ *  \param theR Radius of the disk
+ *  \param theRatio Relative size of the central square diagonal against the disk diameter
+ *  \return New GEOM_Object, containing the created shape.
+ */
+//=============================================================================
+Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDiskPntVecR (Handle(GEOM_Object) thePnt, 
+                                                                       Handle(GEOM_Object) theVec, 
+                                                                       double theR, 
+                                                                       double theRatio,
+                                                                       int    thePattern)
+{
+  SetErrorCode(KO);
+
+  //Add a new object
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
+
+  //Add a new shape function with parameters
+  Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_VECTOR_PNT);
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != AdvancedEngine_DividedDiskDriver::GetID()) return NULL;
+
+  AdvancedEngine_IDividedDisk aData (aFunction);
+  
+  Handle(GEOM_Function) aRefPnt = thePnt->GetLastFunction();
+  Handle(GEOM_Function) aRefVec = theVec->GetLastFunction();
+
+  if (aRefPnt.IsNull() || aRefVec.IsNull()) return NULL;
+
+  aData.SetCenter(aRefPnt);
+  aData.SetVector(aRefVec);
+
+  aData.SetR(theR);
+  aData.SetRatio(theRatio);
+  aData.SetType(thePattern);
+
+  //Compute the resulting value
+  try {
+    OCC_CATCH_SIGNALS;
+    if (!GetSolver()->ComputeFunction(aFunction)) {
+      SetErrorCode("DividedDisk driver failed");
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+  
+  std::string aPatternStr;
+  
+  switch(thePattern)
+  {
+    case 0:
+      aPatternStr = "GEOM.SQUARE";
+      break;
+    case 1:
+      aPatternStr = "GEOM.HEXAGON";
+      break;
+  }
+  
+
+  //Make a Python command
+  GEOM::TPythonDump(aFunction) << aShape << " = geompy.MakeDividedDiskPntVecR(" << thePnt << ", " << theVec << ", " << theR << ", " << aPatternStr.c_str() << ")";
+
+  SetErrorCode(OK);
+
+  return aShape;
+}
+
+//=============================================================================
+/*!
+ *  Builds a cylinder prepared for hexa meshes
+ *  \param theR Radius of the cylinder
+ *  \param theH Height of the cylinder
+ *  \return New GEOM_Object, containing the created shape.
+ */
+//=============================================================================
+Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedCylinder (double theR, 
+                                                                    double theH,
+                                                                    int    thePattern)
+{
+  SetErrorCode(KO);
+  
+  //Add a new object
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDCYLINDER);
+
+  Handle(GEOM_Object) aBaseShape = MakeDividedDisk(theR, 67.0, 1, thePattern);
+  aBaseShape->GetLastFunction()->SetDescription("");   // Erase dump of MakeDividedDisk
+  
+  aShape = my3DPrimOperations->MakePrismDXDYDZ(aBaseShape,0.0,0.0,theH, -1.0);
+        
+  Handle(GEOM_Function) aFunction =  aShape->GetLastFunction();
+  aFunction->SetDescription("");   // Erase dump of MakePrismDXDYDZ
+  aShape->SetType(GEOM_DIVIDEDCYLINDER);
+  
+  std::string aPatternStr;
+  
+  switch(thePattern)
+  {
+    case 0:
+      aPatternStr = "GEOM.SQUARE";
+      break;
+    case 1:
+      aPatternStr = "GEOM.HEXAGON";
+      break;
+  }
+  
+  //Make a Python command
+  GEOM::TPythonDump(aFunction) << aShape << " = geompy.MakeDividedCylinder(" << theR << ", " << theH << ", " << aPatternStr.c_str() << ")";
+
+  SetErrorCode(OK);
+
+  return aShape;
+}
+//=============================================================================
+/*!
+ *  Create a smoothing surface from a set of points
+ *  \param thelPoints list of points or compounds of points
+ *  \param theNbMax maximum number of Bezier pieces in the resulting surface.
+ *  \param theDegMax maximum degree of the resulting BSpline surface
+ *  \param theDMax specifies maximum value of the GeomPlate_PlateG0Criterion criterion.
+ *  \return New GEOM_Object, containing the created shape.
+ */
+//=============================================================================
+Handle(GEOM_Object) AdvancedEngine_IOperations::MakeSmoothingSurface (std::list<Handle(GEOM_Object)> thelPoints, 
+                                                                     int                            theNbMax,
+                                                                     int                            theDegMax,
+                                                                     double                         theDMax)
+{
+  SetErrorCode(KO);
+
+  //Add a new object
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_SMOOTHINGSURFACE);
+
+  //Add a new shape function with parameters
+  Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_SmoothingSurfaceDriver::GetID(), SMOOTHINGSURFACE_LPOINTS);
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != AdvancedEngine_SmoothingSurfaceDriver::GetID()) return NULL;
+
+  AdvancedEngine_ISmoothingSurface aData (aFunction);
+
+  int aLen = thelPoints.size();
+  aData.SetLength(aLen);
+  int ind = 1;
+  std::list<Handle(GEOM_Object)>::iterator it = thelPoints.begin();
+  for (; it != thelPoints.end(); it++, ind++) {
+    Handle(GEOM_Function) aRefObj = (*it)->GetLastFunction();
+    if (aRefObj.IsNull()) {
+      SetErrorCode("NULL point or compound for bSplineFaceShape");
+      return NULL;
+    }
+    aData.SetPntOrComp(ind, aRefObj);
+  }
+
+  aData.SetNbMax(theNbMax);
+  aData.SetDegMax(theDegMax);
+  aData.SetDMax(theDMax);
+
+  //Compute the resulting value
+  try {
+    OCC_CATCH_SIGNALS;
+    if (!GetSolver()->ComputeFunction(aFunction)) {
+      SetErrorCode("SmoothingSurface driver failed");
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  //Make a Python command
+  GEOM::TPythonDump pd (aFunction);
+  pd << aShape << " = geompy.MakeSmoothingSurface([";
+  it = thelPoints.begin();
+  pd << (*it++);
+  while (it != thelPoints.end()) {
+    pd << ", " << (*it++);
+  }
+  pd << "], "
+     << theNbMax << ", "
+     << theDegMax << ", "
+     << theDMax <<")";
+
+  SetErrorCode(OK);
+
+  return aShape;
+}
diff --git a/src/AdvancedEngine/AdvancedEngine_IOperations.hxx b/src/AdvancedEngine/AdvancedEngine_IOperations.hxx
new file mode 100644 (file)
index 0000000..939dd01
--- /dev/null
@@ -0,0 +1,247 @@
+// 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, or (at your option) any 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   : AdvancedEngine_IOperations.hxx
+//  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
+
+#ifndef _AdvancedEngine_IOperations_HXX_
+#define _AdvancedEngine_IOperations_HXX_
+
+#include "AdvancedEngine.hxx"
+
+#include "GEOM_IOperations.hxx"
+#include "GEOM_Engine.hxx"
+#include "GEOM_Object.hxx"
+
+#include <list>
+#include <gp_Ax2.hxx>
+
+class GEOMImpl_IBasicOperations;
+class GEOMImpl_IBooleanOperations;
+class GEOMImpl_IShapesOperations;
+class GEOMImpl_ITransformOperations;
+class GEOMImpl_IBlocksOperations;
+class GEOMImpl_I3DPrimOperations;
+class GEOMImpl_ILocalOperations;
+class GEOMImpl_IHealingOperations;
+class GEOMImpl_IGroupOperations;
+class Handle_Geom_Surface;
+class TopTools_ListOfShape;
+
+class ADVANCEDENGINE_EXPORT AdvancedEngine_IOperations: public GEOM_IOperations
+{
+private:
+  bool MakePipeTShapePartition(Handle(GEOM_Object) theShape,
+                               double theR1, double theW1, double theL1,
+                               double theR2, double theW2, double theL2,
+                               double theH = 0, double theW = 0,
+                               double theRF = 0, bool isNormal = true);
+
+  bool MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
+                                   double theR1, double theW1, double theL1,
+                                   double theR2, double theW2, double theL2);
+
+  bool MakePipeTShapeThicknessReduction (Handle(GEOM_Object) theShape,
+                                         double theR1, double theW1, double theL1,
+                                         double theR2, double theW2, double theL2,
+                                         double theRL, double theWL, double theLtransL, double theLthinL,
+                                         double theRR, double theWR, double theLtransR, double theLthinR,
+                                         double theRI, double theWI, double theLtransI, double theLthinI);
+
+  bool MakeGroups(Handle(GEOM_Object) theShape, int shapType,
+                  double theR1, double theW1, double theL1,
+                  double theR2, double theW2, double theL2,
+                  double theH, double theW, double theRF,
+                  Handle(TColStd_HSequenceOfTransient) theSeq,
+                  gp_Trsf aTrsf);
+
+  bool GetFacesOnSurf(const TopoDS_Shape &theShape,
+                      const Handle_Geom_Surface& theSurface,
+                      const Standard_Real theTolerance,
+                      TopTools_ListOfShape &theFaces);
+
+  TopoDS_Shape MakeConicalFace(const gp_Ax2 &theAxis,
+                               const double theRadius,
+                               const double theRadiusThin,
+                               const double theHeight,
+                               const gp_Trsf &theTrsf);
+
+  bool MakeInternalGroup(const Handle(GEOM_Object) &theShape,
+                         const double theR1, const double theLen1,
+                         const double theR2, const double theLen2,
+                         const double theRL, const double theTransLenL,
+                         const double theRR, const double theTransLenR,
+                         const double theRI, const double theTransLenI,
+                         const Handle(TColStd_HSequenceOfTransient) &theSeq,
+                         const gp_Trsf &theTrsf);
+
+  gp_Trsf GetPositionTrsf(double theL1, double theL2,
+                          Handle(GEOM_Object) P1 = 0,
+                          Handle(GEOM_Object) P2 = 0,
+                          Handle(GEOM_Object) P3 = 0);
+
+  bool CheckCompatiblePosition(double& theL1, double& theL2, 
+                               Handle(GEOM_Object) theP1, 
+                               Handle(GEOM_Object) theP2,
+                               Handle(GEOM_Object) theP3,
+                               double theTolerance);
+
+private:
+  GEOMImpl_IBasicOperations*     myBasicOperations;
+  GEOMImpl_IBooleanOperations*   myBooleanOperations;
+  GEOMImpl_IShapesOperations*    myShapesOperations;
+  GEOMImpl_ITransformOperations* myTransformOperations;
+  GEOMImpl_IBlocksOperations*    myBlocksOperations;
+  GEOMImpl_I3DPrimOperations*    my3DPrimOperations;
+  GEOMImpl_ILocalOperations*     myLocalOperations;
+  GEOMImpl_IHealingOperations*   myHealingOperations;
+  GEOMImpl_IGroupOperations*     myGroupOperations;
+
+public:
+
+  /*!
+   * \brief Add three thickness reductions at the open ends of the pipe T-Shape
+   *
+   * \param theShape - the pipe T-Shape
+   * \param r1 - the internal radius of main pipe
+   * \param w1 - the thickness of main pipe
+   * \param l1 - the half-length of main pipe
+   * \param r2 - the internal radius of incident pipe
+   * \param w2 - the thickness of incident pipe
+   * \param l2 - the half-length of main pipe
+   * \param r*, w*, ltrans* and lthin* - internal radius, thickness, length of transition part
+   *                                     and length of thin part of left(L), right(R) and
+   *                                     incident(I) thickness reduction correspondingly
+   * \param fuseReductions - boolean flag (use true to generate single solid,
+   *                         false to obtain parts, useful for hexameshing)
+   * \retval TopoDS_Shape - Resulting shape
+   */
+  static TopoDS_Shape MakePipeTShapeThicknessReduction
+                                     (TopoDS_Shape theShape,
+                                      double r1, double w1, double l1,
+                                      double r2, double w2, double l2,
+                                      double rL, double wL, double ltransL, double lthinL,
+                                      double rR, double wR, double ltransR, double lthinR,
+                                      double rI, double wI, double ltransI, double lthinI,
+                                      bool fuseReductions);
+
+  /*!
+   * \brief Create one thickness reduction element
+   *
+   * This method is called three times from MakePipeTShapeThicknessReduction
+   * to create three thickness reductions (one per each open end of a pipe T-Shape)
+   *
+   * \param theAxes - the position
+   * \param R - the internal radius of main pipe
+   * \param W - the thickness of main pipe
+   * \param Rthin - the internal radius of thin part
+   * \param Wthin - the thickness of thin part
+   * \param Ltrans - the length of transition part
+   * \param Lthin - the length of thin part
+   * \param fuse - boolean flag (use true to generate single solid,
+   *               false to obtain parts, useful for hexameshing)
+   * \retval TopoDS_Shape - Resulting shape
+   */
+  static TopoDS_Shape MakeThicknessReduction (gp_Ax2 theAxes,
+                                             const double R, const double W,
+                                             const double Rthin, const double Wthin,
+                                             const double Ltrans, const double Lthin,
+                                             bool fuse);
+  
+public:
+  AdvancedEngine_IOperations(GEOM_Engine* theEngine, int theDocID);
+  ~AdvancedEngine_IOperations();
+
+  Handle(TColStd_HSequenceOfTransient) 
+                  MakePipeTShape(double theR1, double theW1, double theL1,
+                                 double theR2, double theW2, double theL2,
+                                 double theRL, double theWL, double theLtransL, double theLthinL,
+                                 double theRR, double theWR, double theLtransR, double theLthinR,
+                                 double theRI, double theWI, double theLtransI, double theLthinI,
+                                 bool theHexMesh = true);
+
+  Handle(TColStd_HSequenceOfTransient)
+                  MakePipeTShapeWithPosition(double theR1, double theW1, double theL1,
+                                             double theR2, double theW2, double theL2,
+                                             double theRL, double theWL, double theLtransL, double theLthinL,
+                                             double theRR, double theWR, double theLtransR, double theLthinR,
+                                             double theRI, double theWI, double theLtransI, double theLthinI,
+                                             bool theHexMesh = true,
+                                             Handle(GEOM_Object) P1 = 0,
+                                             Handle(GEOM_Object) P2 = 0,
+                                             Handle(GEOM_Object) P3 = 0);
+
+  Handle(TColStd_HSequenceOfTransient)
+                  MakePipeTShapeChamfer(double theR1, double theW1, double theL1,
+                                        double theR2, double theW2, double theL2,
+                                        double theRL, double theWL, double theLtransL, double theLthinL,
+                                        double theRR, double theWR, double theLtransR, double theLthinR,
+                                        double theRI, double theWI, double theLtransI, double theLthinI,
+                                        double theH,  double theW, 
+                                        bool theHexMesh = true);
+
+  Handle(TColStd_HSequenceOfTransient)
+                  MakePipeTShapeChamferWithPosition(double theR1, double theW1, double theL1,
+                                                    double theR2, double theW2, double theL2,
+                                                    double theH, double theW,
+                                                    double theRL, double theWL, double theLtransL, double theLthinL,
+                                                    double theRR, double theWR, double theLtransR, double theLthinR,
+                                                    double theRI, double theWI, double theLtransI, double theLthinI,
+                                                    bool theHexMesh = true,
+                                                    Handle(GEOM_Object) P1 = 0,
+                                                    Handle(GEOM_Object) P2 = 0,
+                                                    Handle(GEOM_Object) P3 = 0);
+
+  Handle(TColStd_HSequenceOfTransient)
+                  MakePipeTShapeFillet(double theR1, double theW1, double theL1,
+                                       double theR2, double theW2, double theL2,
+                                       double theRL, double theWL, double theLtransL, double theLthinL,
+                                       double theRR, double theWR, double theLtransR, double theLthinR,
+                                       double theRI, double theWI, double theLtransI, double theLthinI,
+                                       double theRF, bool theHexMesh = true);
+
+  Handle(TColStd_HSequenceOfTransient)
+                  MakePipeTShapeFilletWithPosition(double theR1, double theW1, double theL1,
+                                                   double theR2, double theW2, double theL2,
+                                                   double theRL, double theWL, double theLtransL, double theLthinL,
+                                                   double theRR, double theWR, double theLtransR, double theLthinR,
+                                                   double theRI, double theWI, double theLtransI, double theLthinI,
+                                                   double theRF, bool theHexMesh = true,
+                                                   Handle(GEOM_Object) P1 = 0,
+                                                   Handle(GEOM_Object) P2 = 0,
+                                                   Handle(GEOM_Object) P3 = 0);
+                  
+  Handle(GEOM_Object) MakeDividedDisk (double theR, double theRatio, 
+                                      int theOrientation, int thePattern);
+  Handle(GEOM_Object) MakeDividedDiskPntVecR (Handle(GEOM_Object) thePnt, 
+                                             Handle(GEOM_Object) theVec, 
+                                             double theR, 
+                                             double theRatio,
+                                             int    thePattern);
+  
+  Handle(GEOM_Object) MakeDividedCylinder (double theR, 
+                                          double theH,
+                                          int thePattern);
+  
+  Handle(GEOM_Object) MakeSmoothingSurface (std::list<Handle(GEOM_Object)> thelPoints, 
+                                           int                            theNbMax,
+                                           int                            theDegMax,
+                                           double                         theDMax);
+};
+
+#endif
diff --git a/src/AdvancedEngine/AdvancedEngine_IOperations_i.cc b/src/AdvancedEngine/AdvancedEngine_IOperations_i.cc
new file mode 100644 (file)
index 0000000..5afb75b
--- /dev/null
@@ -0,0 +1,797 @@
+// 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, or (at your option) any 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   : GEOM_IAdvancedOperations.cc
+//  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
+
+#include <Standard_Stream.hxx>
+
+#include "AdvancedEngine_IOperations_i.hh"
+#include "AdvancedEngine_IOperations.hxx"
+
+#include <utilities.h>
+#include <OpUtil.hxx>
+#include <Utils_ExceptHandlers.hxx>
+
+#include "GEOM_Engine.hxx"
+#include "GEOM_Object.hxx"
+
+//=============================================================================
+/*!
+ *   constructor:
+ */
+//=============================================================================
+AdvancedEngine_IOperations_i::AdvancedEngine_IOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, AdvancedEngine_IOperations* theImpl)
+:GEOM_IOperations_i(thePOA, theEngine, theImpl)
+{
+  MESSAGE("AdvancedEngine_IOperations_i::AdvancedEngine_IOperations_i");
+}
+
+//=============================================================================
+/*!
+ *  destructor
+ */
+//=============================================================================
+AdvancedEngine_IOperations_i::~AdvancedEngine_IOperations_i()
+{
+  MESSAGE("AdvancedEngine_IOperations_i::~AdvancedEngine_IOperations_i");
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShape
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length).
+ *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShape
+                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                      CORBA::Boolean theHexMesh)
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Create the TShape
+  Handle(TColStd_HSequenceOfTransient) aHSeq =
+    GetOperations()->MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2,
+                                    0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
+                                    theHexMesh);
+  if (!GetOperations()->IsDone() || aHSeq.IsNull())
+    return aSeq._retn();
+
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length(aLength);
+  for (Standard_Integer i = 1; i <= aLength; i++)
+    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+  return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeWithPosition
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length).
+ *  The extremities of the main pipe are located on junctions points P1 and P2.
+ *  The extremity of the incident pipe is located on junction point P3.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \param theP1 1st junction point of main pipe
+ *  \param theP2 2nd junction point of main pipe
+ *  \param theP3 Junction point of incident pipe
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeWithPosition
+                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                      CORBA::Boolean theHexMesh,
+                      GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference vertices
+  Handle(GEOM_Object) aP1 = GetObjectImpl(theP1);
+  Handle(GEOM_Object) aP2 = GetObjectImpl(theP2);
+  Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
+  if (aP1.IsNull() || aP2.IsNull() || aP3.IsNull())return aSeq._retn();
+
+  //Create the TShape
+  Handle(TColStd_HSequenceOfTransient) aHSeq =
+    GetOperations()->MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
+                                                0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
+                                                theHexMesh, aP1, aP2, aP3);
+  if (!GetOperations()->IsDone() || aHSeq.IsNull())
+    return aSeq._retn();
+
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length(aLength);
+  for (Standard_Integer i = 1; i <= aLength; i++)
+    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+  return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeChamfer
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length). A chamfer is created
+ *  on the junction of the pipes.
+ *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theH Height of chamfer.
+ *  \param theW Width of chamfer.
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeChamfer
+                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                      CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh)
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Create the TShape
+  Handle(TColStd_HSequenceOfTransient) aHSeq =
+    GetOperations()->MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
+                                           0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
+                                           theH, theW, theHexMesh);
+  if (!GetOperations()->IsDone() || aHSeq.IsNull())
+    return aSeq._retn();
+
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length(aLength);
+  for (Standard_Integer i = 1; i <= aLength; i++)
+    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+  return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeChamferWithPosition
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length). A chamfer is created
+ *  on the junction of the pipes.
+ *  The extremities of the main pipe are located on junctions points P1 and P2.
+ *  The extremity of the incident pipe is located on junction point P3.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theH Height of the chamfer.
+ *  \param theW Width of the chamfer.
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \param theP1 1st junction point of main pipe
+ *  \param theP2 2nd junction point of main pipe
+ *  \param theP3 Junction point of incident pipe
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeChamferWithPosition
+                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                      CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
+                      GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference vertices
+  Handle(GEOM_Object) aP1 = GetObjectImpl(theP1);
+  Handle(GEOM_Object) aP2 = GetObjectImpl(theP2);
+  Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
+
+  //Create the TShape
+  Handle(TColStd_HSequenceOfTransient) aHSeq =
+    GetOperations()->MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
+                                                       0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
+                                                       theH, theW, theHexMesh, aP1, aP2, aP3);
+  if (!GetOperations()->IsDone() || aHSeq.IsNull())
+    return aSeq._retn();
+
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length(aLength);
+  for (Standard_Integer i = 1; i <= aLength; i++)
+    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+  return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeFillet
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length). A fillet is created
+ *  on the junction of the pipes.
+ *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theRF Radius of curvature of fillet.
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeFillet
+                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                      CORBA::Double theRF, CORBA::Boolean theHexMesh)
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Create the TShape
+  Handle(TColStd_HSequenceOfTransient) aHSeq =
+    GetOperations()->MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2,
+                                          0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
+                                          theRF, theHexMesh);
+  if (!GetOperations()->IsDone() || aHSeq.IsNull())
+    return aSeq._retn();
+
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length(aLength);
+  for (Standard_Integer i = 1; i <= aLength; i++)
+    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+  return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeFilletWithPosition
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length). A fillet is created
+ *  on the junction of the pipes.
+ *  The extremities of the main pipe are located on junctions points P1 and P2.
+ *  The extremity of the incident pipe is located on junction point P3.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theRF Radius of curvature of fillet
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \param theP1 1st junction point of main pipe
+ *  \param theP2 2nd junction point of main pipe
+ *  \param theP3 Junction point of incident pipe
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeFilletWithPosition
+                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                      CORBA::Double theRF, CORBA::Boolean theHexMesh,
+                      GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference vertices
+  Handle(GEOM_Object) aP1 = GetObjectImpl(theP1);
+  Handle(GEOM_Object) aP2 = GetObjectImpl(theP2);
+  Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
+
+  //Create the TShape
+  Handle(TColStd_HSequenceOfTransient) aHSeq =
+    GetOperations()->MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
+                                                      0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
+                                                      theRF, theHexMesh, aP1, aP2, aP3);
+  if (!GetOperations()->IsDone() || aHSeq.IsNull())
+    return aSeq._retn();
+
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length(aLength);
+  for (Standard_Integer i = 1; i <= aLength; i++)
+    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+  return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeTR
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length).
+ *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeTR
+                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                      CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
+                      CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
+                      CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
+                      CORBA::Boolean theHexMesh)
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Create the TShape
+  Handle(TColStd_HSequenceOfTransient) aHSeq =
+    GetOperations()->MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2,
+                                    theRL, theWL, theLtransL, theLthinL,
+                                    theRR, theWR, theLtransR, theLthinR,
+                                    theRI, theWI, theLtransI, theLthinI,
+                                    theHexMesh);
+  if (!GetOperations()->IsDone() || aHSeq.IsNull())
+    return aSeq._retn();
+
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length(aLength);
+  for (Standard_Integer i = 1; i <= aLength; i++)
+    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+  return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeTRWithPosition
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length).
+ *  The extremities of the main pipe are located on junctions points P1 and P2.
+ *  The extremity of the incident pipe is located on junction point P3.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \param theP1 1st junction point of main pipe
+ *  \param theP2 2nd junction point of main pipe
+ *  \param theP3 Junction point of incident pipe
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeTRWithPosition
+                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                      CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
+                      CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
+                      CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
+                      CORBA::Boolean theHexMesh,
+                      GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference vertices
+  Handle(GEOM_Object) aP1 = GetObjectImpl(theP1);
+  Handle(GEOM_Object) aP2 = GetObjectImpl(theP2);
+  Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
+  if (aP1.IsNull() || aP2.IsNull() || aP3.IsNull()) return aSeq._retn();
+
+  //Create the TShape
+  Handle(TColStd_HSequenceOfTransient) aHSeq =
+    GetOperations()->MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
+                                                theRL, theWL, theLtransL, theLthinL,
+                                                theRR, theWR, theLtransR, theLthinR,
+                                                theRI, theWI, theLtransI, theLthinI,
+                                                theHexMesh, aP1, aP2, aP3);
+  if (!GetOperations()->IsDone() || aHSeq.IsNull())
+    return aSeq._retn();
+
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length(aLength);
+  for (Standard_Integer i = 1; i <= aLength; i++)
+    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+  return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeTRChamfer
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length). A chamfer is created
+ *  on the junction of the pipes.
+ *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theH Height of chamfer.
+ *  \param theW Width of chamfer.
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeTRChamfer
+                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                      CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
+                      CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
+                      CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
+                      CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh)
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Create the TShape
+  Handle(TColStd_HSequenceOfTransient) aHSeq =
+    GetOperations()->MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
+                                           theRL, theWL, theLtransL, theLthinL,
+                                           theRR, theWR, theLtransR, theLthinR,
+                                           theRI, theWI, theLtransI, theLthinI,
+                                           theH, theW, theHexMesh);
+  if (!GetOperations()->IsDone() || aHSeq.IsNull())
+    return aSeq._retn();
+
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length(aLength);
+  for (Standard_Integer i = 1; i <= aLength; i++)
+    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+  return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeTRChamferWithPosition
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length). A chamfer is created
+ *  on the junction of the pipes.
+ *  The extremities of the main pipe are located on junctions points P1 and P2.
+ *  The extremity of the incident pipe is located on junction point P3.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theH Height of the chamfer.
+ *  \param theW Width of the chamfer.
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \param theP1 1st junction point of main pipe
+ *  \param theP2 2nd junction point of main pipe
+ *  \param theP3 Junction point of incident pipe
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeTRChamferWithPosition
+                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                      CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
+                      CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
+                      CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
+                      CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
+                      GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference vertices
+  Handle(GEOM_Object) aP1 = GetObjectImpl(theP1);
+  Handle(GEOM_Object) aP2 = GetObjectImpl(theP2);
+  Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
+
+  //Create the TShape
+  Handle(TColStd_HSequenceOfTransient) aHSeq =
+    GetOperations()->MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
+                                                       theRL, theWL, theLtransL, theLthinL,
+                                                       theRR, theWR, theLtransR, theLthinR,
+                                                       theRI, theWI, theLtransI, theLthinI,
+                                                       theH, theW, theHexMesh, aP1, aP2, aP3);
+  if (!GetOperations()->IsDone() || aHSeq.IsNull())
+    return aSeq._retn();
+
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length(aLength);
+  for (Standard_Integer i = 1; i <= aLength; i++)
+    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+  return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeTRFillet
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length). A fillet is created
+ *  on the junction of the pipes.
+ *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theRF Radius of curvature of fillet.
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeTRFillet
+                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                      CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
+                      CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
+                      CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
+                      CORBA::Double theRF, CORBA::Boolean theHexMesh)
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Create the TShape
+  Handle(TColStd_HSequenceOfTransient) aHSeq =
+    GetOperations()->MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2,
+                                          theRL, theWL, theLtransL, theLthinL,
+                                          theRR, theWR, theLtransR, theLthinR,
+                                          theRI, theWI, theLtransI, theLthinI,
+                                          theRF, theHexMesh);
+  if (!GetOperations()->IsDone() || aHSeq.IsNull())
+    return aSeq._retn();
+
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length(aLength);
+  for (Standard_Integer i = 1; i <= aLength; i++)
+    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+  return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ *  MakePipeTShapeTRFilletWithPosition
+ *  Create a T-shape object with specified caracteristics for the main and
+ *  the incident pipes (radius, width, half-length). A fillet is created
+ *  on the junction of the pipes.
+ *  The extremities of the main pipe are located on junctions points P1 and P2.
+ *  The extremity of the incident pipe is located on junction point P3.
+ *  \param theR1 Internal radius of main pipe
+ *  \param theW1 Width of main pipe
+ *  \param theL1 Half-length of main pipe
+ *  \param theR2 Internal radius of incident pipe (R2 < R1)
+ *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
+ *  \param theL2 Half-length of incident pipe
+ *  \param theRF Radius of curvature of fillet
+ *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
+ *  \param theP1 1st junction point of main pipe
+ *  \param theP2 2nd junction point of main pipe
+ *  \param theP3 Junction point of incident pipe
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* AdvancedEngine_IOperations_i::MakePipeTShapeTRFilletWithPosition
+                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                      CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
+                      CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
+                      CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
+                      CORBA::Double theRF, CORBA::Boolean theHexMesh,
+                      GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference vertices
+  Handle(GEOM_Object) aP1 = GetObjectImpl(theP1);
+  Handle(GEOM_Object) aP2 = GetObjectImpl(theP2);
+  Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
+
+  //Create the TShape
+  Handle(TColStd_HSequenceOfTransient) aHSeq =
+    GetOperations()->MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
+                                                      theRL, theWL, theLtransL, theLthinL,
+                                                      theRR, theWR, theLtransR, theLthinR,
+                                                      theRI, theWI, theLtransI, theLthinI,
+                                                      theRF, theHexMesh, aP1, aP2, aP3);
+  if (!GetOperations()->IsDone() || aHSeq.IsNull())
+    return aSeq._retn();
+
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length(aLength);
+  for (Standard_Integer i = 1; i <= aLength; i++)
+    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
+
+  return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ *  This function allows to create a disk already divided into blocks. It can be
+ *  use to create divided pipes for later meshing in hexaedra.
+ *  \param theR Radius of the disk
+ *  \param theRatio Relative size of the central square diagonal against the disk diameter
+ *  \return New GEOM_Object, containing the created shape.
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr AdvancedEngine_IOperations_i::MakeDividedDisk (CORBA::Double theR,
+                                                                    CORBA::Double theRatio,
+                                                                    CORBA::Short theOrientation,
+                                                                    GEOM::pattern thePattern)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Create the DividedDisk
+  Handle(GEOM_Object) anObject = GetOperations()->MakeDividedDisk(theR, theRatio, theOrientation, thePattern);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ *  MakeDividedDiskPntVecR
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr AdvancedEngine_IOperations_i::MakeDividedDiskPntVecR (GEOM::GEOM_Object_ptr thePnt,
+                                                                           GEOM::GEOM_Object_ptr theVec,
+                                                                           CORBA::Double theR,
+                                                                           CORBA::Double theRatio,
+                                                                           GEOM::pattern thePattern)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference points
+  Handle(GEOM_Object) aPnt = GetObjectImpl(thePnt);
+  Handle(GEOM_Object) aVec = GetObjectImpl(theVec);
+
+  if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
+
+  // Make DividedDisk
+  Handle(GEOM_Object) anObject =
+    GetOperations()->MakeDividedDiskPntVecR(aPnt, aVec, theR, theRatio, thePattern);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ *  Builds a cylinder prepared for hexa meshes
+ *  \param theR Radius of the cylinder
+ *  \param theH Height of the cylinder
+ *  \return New GEOM_Object, containing the created shape.
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr AdvancedEngine_IOperations_i::MakeDividedCylinder (CORBA::Double theR,
+                                                                        CORBA::Double theH,
+                                                                        GEOM::pattern thePattern)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Create the DividedCylinder
+  Handle(GEOM_Object) anObject = GetOperations()->MakeDividedCylinder(theR, theH, thePattern);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ *  
+ *  \param thelPoints list of  points
+ *  \param theNbMax maximum number of Bezier pieces in the resulting surface.
+ *  \param theDegMax maximum degree of the resulting BSpline surface
+ *  \param theDMax specifies maximum value of the GeomPlate_PlateG0Criterion criterion.
+ *  \return New GEOM_Object, containing the created shape.
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr AdvancedEngine_IOperations_i::MakeSmoothingSurface (const GEOM::ListOfGO& thelPoints,
+                                                                         CORBA::Long           theNbMax,
+                                                                         CORBA::Long           theDegMax,
+                                                                         CORBA::Double         theDMax)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference point
+  int ind = 0;
+  int aLen = thelPoints.length();
+  std::list<Handle(GEOM_Object)> aPoints;
+  for (; ind < aLen; ind++) {
+    Handle(GEOM_Object) aPnt = GetObjectImpl(thelPoints[ind]);
+    if (aPnt.IsNull()) return aGEOMObject._retn();
+    aPoints.push_back(aPnt);
+  }
+  //Create the SmoothingSurface
+  Handle(GEOM_Object) anObject = GetOperations()->MakeSmoothingSurface
+        (aPoints, theNbMax, theDegMax, theDMax);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+AdvancedEngine_IOperations* AdvancedEngine_IOperations_i::GetOperations()
+{
+  return (AdvancedEngine_IOperations*)GetImpl();
+}
+
diff --git a/src/AdvancedEngine/AdvancedEngine_IOperations_i.hh b/src/AdvancedEngine/AdvancedEngine_IOperations_i.hh
new file mode 100644 (file)
index 0000000..0711b6a
--- /dev/null
@@ -0,0 +1,138 @@
+// 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, or (at your option) any 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   : AdvancedEngine_IOperations_i.hh
+//  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
+
+#ifndef _AdvancedEngine_IOperations_i_HeaderFile
+#define _AdvancedEngine_IOperations_i_HeaderFile
+
+#include "AdvancedEngine.hxx"
+
+#include "GEOM_IOperations_i.hh"
+#include "GEOM_Object_i.hh"
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(GEOM_Gen)
+#include CORBA_SERVER_HEADER(AdvancedGEOM)
+
+class AdvancedEngine_IOperations;
+
+class ADVANCEDENGINE_EXPORT AdvancedEngine_IOperations_i :
+    public virtual POA_GEOM::IAdvancedOperations,
+    public virtual GEOM_IOperations_i
+{
+ public:
+  AdvancedEngine_IOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine,
+                               AdvancedEngine_IOperations* theImpl);
+  ~AdvancedEngine_IOperations_i();
+
+  // PipeTShape without thickness reduction
+  GEOM::ListOfGO* MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                                  CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                                  CORBA::Boolean theHexMesh);
+  GEOM::ListOfGO* MakePipeTShapeWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                                              CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                                              CORBA::Boolean theHexMesh,
+                                              GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
+  GEOM::ListOfGO* MakePipeTShapeChamfer (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                                         CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                                         CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh);
+  GEOM::ListOfGO* MakePipeTShapeChamferWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                                                     CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                                                     CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
+                                                     GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
+  GEOM::ListOfGO* MakePipeTShapeFillet (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                                        CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                                        CORBA::Double theRF, CORBA::Boolean theHexMesh);
+  GEOM::ListOfGO* MakePipeTShapeFilletWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+                                                    CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+                                                    CORBA::Double theRF, CORBA::Boolean theHexMesh,
+                                                    GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
+
+  // PipeTShape with thickness reduction
+  GEOM::ListOfGO* MakePipeTShapeTR
+    (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+     CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+     CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
+     CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
+     CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
+     CORBA::Boolean theHexMesh);
+  GEOM::ListOfGO* MakePipeTShapeTRWithPosition
+    (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+     CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+     CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
+     CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
+     CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
+     CORBA::Boolean theHexMesh,
+     GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
+  GEOM::ListOfGO* MakePipeTShapeTRChamfer
+    (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+     CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+     CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
+     CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
+     CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
+     CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh);
+  GEOM::ListOfGO* MakePipeTShapeTRChamferWithPosition
+    (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+     CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+     CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
+     CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
+     CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
+     CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
+     GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
+  GEOM::ListOfGO* MakePipeTShapeTRFillet
+    (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+     CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+     CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
+     CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
+     CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
+     CORBA::Double theRF, CORBA::Boolean theHexMesh);
+  GEOM::ListOfGO* MakePipeTShapeTRFilletWithPosition
+    (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
+     CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
+     CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
+     CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
+     CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
+     CORBA::Double theRF, CORBA::Boolean theHexMesh,
+     GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
+
+  GEOM::GEOM_Object_ptr MakeDividedDisk        (CORBA::Double theR,
+                                                CORBA::Double theRatio,
+                                                CORBA::Short theOrientation,
+                                                GEOM::pattern thePattern);
+
+  GEOM::GEOM_Object_ptr MakeDividedDiskPntVecR (GEOM::GEOM_Object_ptr theCenter,
+                                                GEOM::GEOM_Object_ptr theVector,
+                                                CORBA::Double theR,
+                                                CORBA::Double theRatio,
+                                                GEOM::pattern thePattern);
+
+  GEOM::GEOM_Object_ptr MakeDividedCylinder (CORBA::Double theR,
+                                             CORBA::Double theH,
+                                             GEOM::pattern thePattern);
+  GEOM::GEOM_Object_ptr MakeSmoothingSurface (const GEOM::ListOfGO& thelPoints,
+                                              CORBA::Long           theNbMax,
+                                              CORBA::Long           theDegMax,
+                                              CORBA::Double         theDMax);
+
+  AdvancedEngine_IOperations* GetOperations();
+};
+
+#endif
diff --git a/src/AdvancedEngine/AdvancedEngine_IPipeTShape.hxx b/src/AdvancedEngine/AdvancedEngine_IPipeTShape.hxx
new file mode 100644 (file)
index 0000000..b4a26fe
--- /dev/null
@@ -0,0 +1,103 @@
+// 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, or (at your option) any 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 _AdvancedEngine_IPipeTShape_HXX_
+#define _AdvancedEngine_IPipeTShape_HXX_
+
+#include "GEOM_Function.hxx"
+
+#include <TColStd_HArray1OfReal.hxx>
+
+class AdvancedEngine_IPipeTShape
+{
+public:
+  AdvancedEngine_IPipeTShape(Handle(GEOM_Function) theFunction): _func(theFunction) {}
+
+  void SetR1(double theR1) { _func->SetReal(TSHAPE_ARG_R1, theR1); }
+  double GetR1() { return _func->GetReal(TSHAPE_ARG_R1); }
+
+  void SetW1(double theW1) { _func->SetReal(TSHAPE_ARG_W1, theW1); }
+  double GetW1() { return _func->GetReal(TSHAPE_ARG_W1); }
+
+  void SetL1(double theL1) { _func->SetReal(TSHAPE_ARG_L1, theL1); }
+  double GetL1() { return _func->GetReal(TSHAPE_ARG_L1); }
+
+  void SetR2(double theR2) { _func->SetReal(TSHAPE_ARG_R2, theR2); }
+  double GetR2() { return _func->GetReal(TSHAPE_ARG_R2); }
+
+  void SetW2(double theW2) { _func->SetReal(TSHAPE_ARG_W2, theW2); }
+  double GetW2() { return _func->GetReal(TSHAPE_ARG_W2); }
+
+  void SetL2(double theL2) { _func->SetReal(TSHAPE_ARG_L2, theL2); }
+  double GetL2() { return _func->GetReal(TSHAPE_ARG_L2); }
+
+  void SetH(double theH) { _func->SetReal(TSHAPE_ARG_H, theH); }
+  double GetH() { return _func->GetReal(TSHAPE_ARG_H); }
+
+  void SetW(double theW) { _func->SetReal(TSHAPE_ARG_W, theW); }
+  double GetW() { return _func->GetReal(TSHAPE_ARG_W); }
+
+  void SetRF(double theRF) { _func->SetReal(TSHAPE_ARG_RF, theRF); }
+  double GetRF() { return _func->GetReal(TSHAPE_ARG_RF); }
+
+  void SetHexMesh(int theHexMesh) { _func->SetInteger(TSHAPE_ARG_HEXMESH, theHexMesh); }
+  int GetHexMesh() { return _func->GetInteger(TSHAPE_ARG_HEXMESH); }
+
+  void SetP1(const Handle(GEOM_Function)& theP1){_func->SetReference(TSHAPE_ARG_P1, theP1); }
+  Handle(GEOM_Function) GetP1() { return _func->GetReference(TSHAPE_ARG_P1); }
+
+  void SetP2(const Handle(GEOM_Function)& theP2){_func->SetReference(TSHAPE_ARG_P2, theP2); }
+  Handle(GEOM_Function) GetP2() { return _func->GetReference(TSHAPE_ARG_P2); }
+
+  void SetP3(const Handle(GEOM_Function)& theP3){_func->SetReference(TSHAPE_ARG_P3, theP3); }
+  Handle(GEOM_Function) GetP3() { return _func->GetReference(TSHAPE_ARG_P3); }
+
+private:
+  enum {
+    // main pipe
+    TSHAPE_ARG_R1 = 1,
+    TSHAPE_ARG_W1 = 2,
+    TSHAPE_ARG_L1 = 3,
+
+    // incident pipe
+    TSHAPE_ARG_R2 = 4,
+    TSHAPE_ARG_W2 = 5,
+    TSHAPE_ARG_L2 = 6,
+
+    // chamfer
+    TSHAPE_ARG_H  = 7,
+    TSHAPE_ARG_W  = 8,
+
+    // fillet
+    TSHAPE_ARG_RF = 9,
+
+    // partition
+    TSHAPE_ARG_HEXMESH = 10,
+
+    // junction points
+    TSHAPE_ARG_P1 = 11,
+    TSHAPE_ARG_P2 = 12,
+    TSHAPE_ARG_P3 = 13
+  };
+
+private:
+  Handle(GEOM_Function) _func;
+};
+
+#endif // _AdvancedEngine_IPipeTShape_HXX_
diff --git a/src/AdvancedEngine/AdvancedEngine_ISmoothingSurface.hxx b/src/AdvancedEngine/AdvancedEngine_ISmoothingSurface.hxx
new file mode 100644 (file)
index 0000000..3ee9bde
--- /dev/null
@@ -0,0 +1,58 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&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 _AdvancedEngine_ISmoothingSurface_HXX_
+#define _AdvancedEngine_ISmoothingSurface_HXX_
+
+#include "GEOM_Function.hxx"
+
+#define SMOOTHINGSURFACE_ARG_LENG        1
+#define SMOOTHINGSURFACE_ARG_LAST        2
+#define SMOOTHINGSURFACE_ARG_NB_MAX      3
+#define SMOOTHINGSURFACE_ARG_DEG_MAX     4
+#define SMOOTHINGSURFACE_ARG_D_MAX       5
+
+class AdvancedEngine_ISmoothingSurface
+{
+public:
+  AdvancedEngine_ISmoothingSurface(Handle(GEOM_Function) theFunction): _func(theFunction) {}
+
+  void SetLength(int theLen) { _func->SetInteger(SMOOTHINGSURFACE_ARG_LENG, theLen); }
+  int GetLength() { return _func->GetInteger(SMOOTHINGSURFACE_ARG_LENG); }
+
+  void SetPntOrComp(int theId, Handle(GEOM_Function) theP) { _func->SetReference(SMOOTHINGSURFACE_ARG_LAST + theId, theP); }
+  Handle(GEOM_Function) GetPntOrComp(int theId) { return _func->GetReference(SMOOTHINGSURFACE_ARG_LAST + theId); }
+
+  void SetNbMax(int theNbMax) { _func->SetInteger(SMOOTHINGSURFACE_ARG_NB_MAX, theNbMax); }
+  int GetNbMax() { return _func->GetInteger(SMOOTHINGSURFACE_ARG_NB_MAX); }
+
+  void SetDegMax(int theDegMax) { _func->SetInteger(SMOOTHINGSURFACE_ARG_DEG_MAX, theDegMax); }
+  int GetDegMax() { return _func->GetInteger(SMOOTHINGSURFACE_ARG_DEG_MAX); }
+
+  void SetDMax(double theDMax) { _func->SetReal(SMOOTHINGSURFACE_ARG_D_MAX, theDMax); }
+  double GetDMax() { return _func->GetReal(SMOOTHINGSURFACE_ARG_D_MAX); }
+
+private:
+  Handle(GEOM_Function) _func;
+};
+
+#endif // _AdvancedEngine_ISmoothingSurface_HXX_
diff --git a/src/AdvancedEngine/AdvancedEngine_OperationsCreator.cc b/src/AdvancedEngine/AdvancedEngine_OperationsCreator.cc
deleted file mode 100644 (file)
index cf9bf8c..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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 "GEOM_AdvancedEngine.hxx"
-
-#include "AdvancedEngine_OperationsCreator.hh"
-
-#include "GEOM_IAdvancedOperations_i.hh"
-
-// Operations
-#include <GEOMImpl_PipeTShapeDriver.hxx>
-#include <GEOMImpl_DividedDiskDriver.hxx>
-// #include <GEOMImpl_DividedCylinderDriver.hxx>
-#include <GEOMImpl_SmoothingSurfaceDriver.hxx>
-/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
-
-#include <TFunction_Driver.hxx>
-#include <TFunction_DriverTable.hxx>
-
-#include "Utils_ExceptHandlers.hxx"
-#include "utilities.h"
-
-//============================================================================
-// function : Create
-// purpose  :
-//============================================================================
-GEOM_IOperations_i* AdvancedEngine_OperationsCreator::Create (PortableServer::POA_ptr thePOA,
-                                                              int                     theStudyId,
-                                                              GEOM::GEOM_Gen_ptr      theEngine,
-                                                              ::GEOMImpl_Gen*         theGenImpl)
-{
-  Unexpect aCatch(SALOME_SalomeException);
-  MESSAGE( "AdvancedEngine_OperationsCreator::Create" );
-
-  if (_mapOfOperations.find(theStudyId) == _mapOfOperations.end()) {
-    _mapOfOperations[theStudyId] = new GEOMImpl_IAdvancedOperations (theGenImpl, theStudyId);
-
-    // Advanced operations
-    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PipeTShapeDriver::GetID(),
-                                            new GEOMImpl_PipeTShapeDriver());
-    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_DividedDiskDriver::GetID(),
-                                            new GEOMImpl_DividedDiskDriver());
-    //TFunction_DriverTable::Get()->AddDriver(GEOMImpl_DividedCylinderDriver::GetID(),
-    //                                        new GEOMImpl_DividedCylinderDriver());
-    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_SmoothingSurfaceDriver::GetID(),
-                                            new GEOMImpl_SmoothingSurfaceDriver());
-    /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
-  }
-
-  GEOM_IAdvancedOperations_i* aServant =
-    new GEOM_IAdvancedOperations_i (thePOA, theEngine, _mapOfOperations[theStudyId]);
-
-  return aServant;
-}
diff --git a/src/AdvancedEngine/AdvancedEngine_OperationsCreator.cxx b/src/AdvancedEngine/AdvancedEngine_OperationsCreator.cxx
new file mode 100644 (file)
index 0000000..4ca0a05
--- /dev/null
@@ -0,0 +1,69 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&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 "AdvancedEngine_OperationsCreator.hxx"
+#include "AdvancedEngine_IOperations_i.hh"
+#include "AdvancedEngine_IOperations.hxx"
+#include <AdvancedEngine_PipeTShapeDriver.hxx>
+#include <AdvancedEngine_DividedDiskDriver.hxx>
+#include <AdvancedEngine_SmoothingSurfaceDriver.hxx>
+
+#include <TFunction_Driver.hxx>
+#include <TFunction_DriverTable.hxx>
+
+#include "Utils_ExceptHandlers.hxx"
+#include "utilities.h"
+
+std::map <int, AdvancedEngine_IOperations*>  AdvancedEngine_OperationsCreator::_mapOfOperations;
+
+AdvancedEngine_OperationsCreator::AdvancedEngine_OperationsCreator()
+{
+  // Register drivers
+  TFunction_DriverTable::Get()->AddDriver(AdvancedEngine_PipeTShapeDriver::GetID(),
+                                         new AdvancedEngine_PipeTShapeDriver());
+  TFunction_DriverTable::Get()->AddDriver(AdvancedEngine_DividedDiskDriver::GetID(),
+                                         new AdvancedEngine_DividedDiskDriver());
+  TFunction_DriverTable::Get()->AddDriver(AdvancedEngine_SmoothingSurfaceDriver::GetID(),
+                                         new AdvancedEngine_SmoothingSurfaceDriver());
+}
+
+AdvancedEngine_OperationsCreator::~AdvancedEngine_OperationsCreator()
+{
+}
+
+GEOM_IOperations_i* AdvancedEngine_OperationsCreator::Create (PortableServer::POA_ptr thePOA,
+                                                              int                     theStudyId,
+                                                              GEOM::GEOM_Gen_ptr      theEngine,
+                                                              ::GEOMImpl_Gen*         theGenImpl)
+{
+  Unexpect aCatch(SALOME_SalomeException);
+  MESSAGE( "AdvancedEngine_OperationsCreator::Create" );
+  return new AdvancedEngine_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+}
+
+AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
+                                                                  int             theStudyId )
+{
+  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
+    _mapOfOperations[theStudyId] = new AdvancedEngine_IOperations( theGenImpl, theStudyId );
+  return _mapOfOperations[theStudyId];
+}
diff --git a/src/AdvancedEngine/AdvancedEngine_OperationsCreator.hh b/src/AdvancedEngine/AdvancedEngine_OperationsCreator.hh
deleted file mode 100755 (executable)
index 261721e..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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 _GEOM_ADVANCEDENGINE_OPERATIONSCREATOR_HXX_
-#define _GEOM_ADVANCEDENGINE_OPERATIONSCREATOR_HXX_
-
-#include "GEOM_AdvancedEngine.hxx"
-
-#include "GEOM_Gen_i.hh"
-
-#include "GEOMImpl_IAdvancedOperations.hxx"
-
-#include <map>
-
-//=====================================================================
-// Operations creator
-//=====================================================================
-class ADVANCEDENGINE_EXPORT AdvancedEngine_OperationsCreator : public GEOM_GenericOperationsCreator
-{
- public:
-  // Create operations
-  virtual GEOM_IOperations_i* Create (PortableServer::POA_ptr thePOA,
-                                      int                     theStudyId,
-                                      GEOM::GEOM_Gen_ptr      theEngine,
-                                      ::GEOMImpl_Gen*         theGenImpl);
-  // return the name of IDL module
-  //virtual std::string GetModuleName();
-
- private:
-  std::map <int, GEOMImpl_IAdvancedOperations*>  _mapOfOperations;
-};
-
-#endif
diff --git a/src/AdvancedEngine/AdvancedEngine_OperationsCreator.hxx b/src/AdvancedEngine/AdvancedEngine_OperationsCreator.hxx
new file mode 100755 (executable)
index 0000000..1264035
--- /dev/null
@@ -0,0 +1,55 @@
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&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 _GEOM_ADVANCEDENGINE_OPERATIONSCREATOR_HXX_
+#define _GEOM_ADVANCEDENGINE_OPERATIONSCREATOR_HXX_
+
+#include "AdvancedEngine.hxx"
+
+#include "GEOM_Gen_i.hh"
+
+#include <map>
+
+class AdvancedEngine_IOperations;
+
+//=====================================================================
+// Operations creator
+//=====================================================================
+class ADVANCEDENGINE_EXPORT AdvancedEngine_OperationsCreator : public GEOM_GenericOperationsCreator
+{
+public:
+  AdvancedEngine_OperationsCreator();
+  ~AdvancedEngine_OperationsCreator();
+
+  GEOM_IOperations_i* Create (PortableServer::POA_ptr thePOA,
+                             int                     theStudyId,
+                             GEOM::GEOM_Gen_ptr      theEngine,
+                             ::GEOMImpl_Gen*         theGenImpl);
+
+private:
+  static AdvancedEngine_IOperations* get( ::GEOMImpl_Gen* theGenImpl,
+                                         int             theStudyId );
+private:
+  static std::map <int, AdvancedEngine_IOperations*>  _mapOfOperations;
+};
+
+#endif
diff --git a/src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.cxx b/src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.cxx
new file mode 100644 (file)
index 0000000..7551b43
--- /dev/null
@@ -0,0 +1,668 @@
+// 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, or (at your option) any 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 "AdvancedEngine_PipeTShapeDriver.hxx"
+#include "AdvancedEngine_IPipeTShape.hxx"
+#include "AdvancedEngine_Types.hxx"
+#include "AdvancedEngine_IOperations.hxx"
+
+#include "GEOMImpl_Block6Explorer.hxx"
+#include "GEOM_Function.hxx"
+#include "GEOM_IOperations.hxx"
+#include "GEOMUtils.hxx"
+#include "GEOMAlgo_FinderShapeOn1.hxx"
+#include "GEOMAlgo_FinderShapeOn2.hxx"
+#include "GEOMAlgo_ClsfBox.hxx"
+#include "GEOMAlgo_Splitter.hxx"
+
+#include "Geom_CylindricalSurface.hxx"
+#include <gp_Pnt.hxx>
+#include <gp_Vec.hxx>
+#include <gp_Ax2.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Trsf.hxx>
+#include <TFunction_Logbook.hxx>
+#include <StdFail_NotDone.hxx>
+#include <BRepPrimAPI_MakeCone.hxx>
+#include <BRepPrimAPI_MakeCylinder.hxx>
+#include <BRepAlgoAPI_Fuse.hxx>
+#include <BRepAlgoAPI_Cut.hxx>
+#include <BRepPrimAPI_MakeBox.hxx>
+#include <BRepBuilderAPI_MakeEdge.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
+#include <BRepBuilderAPI_MakeWire.hxx>
+#include <BRepBuilderAPI_Transform.hxx>
+#include <BRepFilletAPI_MakeFillet.hxx>
+#include <BRepFilletAPI_MakeChamfer.hxx>
+#include <BRep_Builder.hxx>
+#include <TopoDS_Compound.hxx>
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepTools.hxx>
+#include <TopoDS.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
+
+#include <vector>
+
+//=======================================================================
+//function : GetID
+//purpose  :
+//=======================================================================
+const Standard_GUID& AdvancedEngine_PipeTShapeDriver::GetID()
+{
+  static Standard_GUID aGUID("1C3A0F3F-729D-4E83-8232-78E74FC5637C");
+  return aGUID;
+}
+
+//=======================================================================
+//function : AdvancedEngine_PipeTShapeDriver
+//purpose  :
+//=======================================================================
+AdvancedEngine_PipeTShapeDriver::AdvancedEngine_PipeTShapeDriver()
+{
+}
+
+//=======================================================================
+//function : getShapesOnBoxIDs
+  /*!
+   * \brief Find IDs of sub-shapes complying with given status about surface
+    * \param theBox - the box to check state of sub-shapes against
+    * \param theShape - the shape to explore
+    * \param theShapeType - type of sub-shape of theShape
+    * \param theState - required state
+    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
+   */
+//=======================================================================
+Handle(TColStd_HSequenceOfInteger)
+AdvancedEngine_PipeTShapeDriver::GetShapesOnBoxIDs(const TopoDS_Shape& aBox,
+                    const TopoDS_Shape& aShape,
+                    const Standard_Integer theShapeType,
+                    GEOMAlgo_State theState) const
+{
+  Handle(TColStd_HSequenceOfInteger) aSeqOfIDs;
+
+  // Check presence of triangulation, build if need
+  if (!GEOMUtils::CheckTriangulation(aShape)) {
+    StdFail_NotDone::Raise("Cannot build triangulation on the shape");
+    return aSeqOfIDs;
+  }
+
+  // Call algo
+  GEOMAlgo_FinderShapeOn2 aFinder;
+  Standard_Real aTol = 0.0001; // default value
+
+  Handle(GEOMAlgo_ClsfBox) aClsfBox = new GEOMAlgo_ClsfBox;
+  aClsfBox->SetBox(aBox);
+
+  aFinder.SetShape(aShape);
+  aFinder.SetTolerance(aTol);
+  aFinder.SetClsf(aClsfBox);
+  aFinder.SetShapeType( (TopAbs_ShapeEnum)theShapeType );
+  aFinder.SetState(theState);
+  aFinder.Perform();
+
+  // Interprete results
+  Standard_Integer iErr = aFinder.ErrorStatus();
+  // the detailed description of error codes is in GEOMAlgo_FinderShapeOn1.cxx
+  if (iErr) {
+    TCollection_AsciiString aMsg (" iErr : ");
+    aMsg += TCollection_AsciiString(iErr);
+    StdFail_NotDone::Raise(aMsg.ToCString());
+    return aSeqOfIDs;
+  }
+
+
+  const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result
+
+  if (listSS.Extent() < 1) {
+    StdFail_NotDone::Raise(NOT_FOUND_ANY); // NPAL18017
+    return aSeqOfIDs;
+  }
+
+  // Fill sequence of object IDs
+  aSeqOfIDs = new TColStd_HSequenceOfInteger;
+
+  TopTools_IndexedMapOfShape anIndices;
+  TopExp::MapShapes(aShape, anIndices);
+
+  TopTools_ListIteratorOfListOfShape itSub (listSS);
+  for (int index = 1; itSub.More(); itSub.Next(), ++index) {
+    int id = anIndices.FindIndex(itSub.Value());
+//    std::cerr << "Shape with ID " << id << " found" << std::endl;
+    aSeqOfIDs->Append(id);
+  }
+
+  return aSeqOfIDs;
+}
+
+//=======================================================================
+//function : GetShapesOnSurfaceIDs
+  /*!
+   * \brief Find IDs of sub-shapes complying with given status about surface
+    * \param theSurface - the surface to check state of sub-shapes against
+    * \param theShape - the shape to explore
+    * \param theShapeType - type of sub-shape of theShape
+    * \param theState - required state
+    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
+   */
+//=======================================================================
+Handle(TColStd_HSequenceOfInteger)
+  AdvancedEngine_PipeTShapeDriver::GetShapesOnSurfaceIDs(const Handle(Geom_Surface)& theSurface,
+                                                    const TopoDS_Shape&         theShape,
+                                                    TopAbs_ShapeEnum            theShapeType,
+                                                    GEOMAlgo_State              theState) const
+{
+  Handle(TColStd_HSequenceOfInteger) aSeqOfIDs;
+
+  // Check presence of triangulation, build if need
+  if (!GEOMUtils::CheckTriangulation(theShape)) {
+    StdFail_NotDone::Raise("Cannot build triangulation on the shape");
+    return aSeqOfIDs;
+  }
+
+  // Call algo
+  GEOMAlgo_FinderShapeOn1 aFinder;
+  Standard_Real aTol = 1e-6;
+
+  aFinder.SetShape(theShape);
+  aFinder.SetTolerance(aTol);
+  aFinder.SetSurface(theSurface);
+  aFinder.SetShapeType(theShapeType);
+  aFinder.SetState(theState);
+
+  // Sets the minimal number of inner points for the faces that do not have own
+  // inner points at all (for e.g. rectangular planar faces have just 2 triangles).
+  // Default value=3
+  aFinder.SetNbPntsMin(3);
+  // Sets the maximal number of inner points for edges or faces.
+  // It is usefull for the cases when this number is very big (e.g =2000) to improve
+  // the performance. If this value =0, all inner points will be taken into account.
+  // Default value=0
+  aFinder.SetNbPntsMax(0);
+
+  aFinder.Perform();
+
+  // Interprete results
+  Standard_Integer iErr = aFinder.ErrorStatus();
+  // the detailed description of error codes is in GEOMAlgo_FinderShapeOn1.cxx
+  if (iErr) {
+//    MESSAGE(" iErr : " << iErr);
+    TCollection_AsciiString aMsg (" iErr : ");
+    aMsg += TCollection_AsciiString(iErr);
+    StdFail_NotDone::Raise(aMsg.ToCString());
+    return aSeqOfIDs;
+  }
+//  Standard_Integer iWrn = aFinder.WarningStatus();
+  // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn1.cxx
+//  if (iWrn) {
+//    MESSAGE(" *** iWrn : " << iWrn);
+//  }
+
+  const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result
+
+  if (listSS.Extent() < 1) {
+    //StdFail_NotDone::Raise("Not a single sub-shape of the requested type found on the given surface");
+    StdFail_NotDone::Raise(NOT_FOUND_ANY); // NPAL18017
+    return aSeqOfIDs;
+  }
+
+  // Fill sequence of object IDs
+  aSeqOfIDs = new TColStd_HSequenceOfInteger;
+
+  TopTools_IndexedMapOfShape anIndices;
+  TopExp::MapShapes(theShape, anIndices);
+
+  TopTools_ListIteratorOfListOfShape itSub (listSS);
+  for (int index = 1; itSub.More(); itSub.Next(), ++index) {
+    int id = anIndices.FindIndex(itSub.Value());
+    aSeqOfIDs->Append(id);
+  }
+
+  return aSeqOfIDs;
+}
+
+//=======================================================================
+//function : GetCommonShapesOnCylinders
+//purpose  : return the common shapes between 2 cylindrical surfaces
+//           along OX and OZ
+//=======================================================================
+void AdvancedEngine_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& theShape,
+                                                           TopAbs_ShapeEnum theShapeType,
+                                                           double r1,
+                                                           double r2,
+                                                           Handle(TopTools_HSequenceOfShape)& commonShapes) const
+{
+  gp_Pnt aP0 (0, 0, 0);
+  gp_Vec aVX = gp::DX(), aVZ = gp::DZ();
+  gp_Ax3 anAxis1 (aP0, aVX, aVZ), anAxis2 (aP0, aVZ, aVX);
+
+  TopTools_IndexedMapOfShape aMapOfShapes;
+  aMapOfShapes.Clear();
+  TopExp::MapShapes(theShape, aMapOfShapes);
+
+  commonShapes->Clear();
+
+  int myID;
+  bool found = false;
+
+  // Create a cylinder surface
+  Handle(Geom_Surface) aC1Ext = new Geom_CylindricalSurface(anAxis1, r1);
+  if ( aC1Ext.IsNull() )
+    StdFail_NotDone::Raise("Couldn't build main cylindrical surface");
+  // Find object IDs
+  Handle(TColStd_HSequenceOfInteger) aSeqExt1 = GetShapesOnSurfaceIDs( aC1Ext, theShape, theShapeType, GEOMAlgo_ST_ON );
+  // Create a cylinder surface
+  Handle(Geom_Surface) aC2Ext = new Geom_CylindricalSurface(anAxis2, r2);
+  if ( aC2Ext.IsNull() )
+    StdFail_NotDone::Raise("Couldn't build incident cylindrical surface");
+  // Find object IDs
+  Handle(TColStd_HSequenceOfInteger) aSeqExt2 = GetShapesOnSurfaceIDs( aC2Ext, theShape, theShapeType, GEOMAlgo_ST_ON );
+  // # Recherche (dans le quart de Te) de l'arete d'intersection des 2 cylindres
+  // # Search in theShape for common shape of type theShapeType on the intersection of 2 pipes
+  found = false;
+  for (int i=1; i<=aSeqExt2->Length();i++) {
+//    std::cerr << "aSeqExt2->Value(i): " << aSeqExt2->Value(i) << std::endl;
+    for (int j=1; j<=aSeqExt1->Length();j++) {
+//      std::cerr << "aSeqExt1->Value(j): " << aSeqExt1->Value(j) << std::endl;
+      if (aSeqExt1->Value(j) == aSeqExt2->Value(i)) {
+        myID = aSeqExt1->Value(j);
+        commonShapes->Append(aMapOfShapes.FindKey(myID));
+        found = true;
+      }
+    }
+  }
+  if (!found)
+    StdFail_NotDone::Raise("Common shapes couldn't be found");
+}
+
+//=======================================================================
+//function : MakePipeTShape
+//purpose  :
+//=======================================================================
+TopoDS_Shape AdvancedEngine_PipeTShapeDriver::MakePipeTShape (const double r1, const double w1, const double l1,
+                                                        const double r2, const double w2, const double l2) const
+{
+  double r1Ext = r1 + w1;
+  double r2Ext = r2 + w2;
+
+  gp_Pnt aP0 (0, 0, 0);
+  gp_Pnt aP1 (-l1, 0, 0);
+  gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ();
+  gp_Ax2 anAxes1 (aP1, aVX, aVZ);
+  gp_Ax2 anAxes2 (aP0, aVZ, aVX);
+
+  // Build the initial pipes
+  BRepPrimAPI_MakeCylinder C1Int (anAxes1, r1, Abs(2 * l1));
+  BRepPrimAPI_MakeCylinder C1Ext (anAxes1, r1Ext, Abs(2 * l1));
+  BRepPrimAPI_MakeCylinder C2Int (anAxes2, r2, Abs(l2));
+  BRepPrimAPI_MakeCylinder C2Ext (anAxes2, r2Ext, Abs(l2));
+  C1Int.Build();
+  C1Ext.Build();
+  C2Int.Build();
+  C2Ext.Build();
+  if (!C1Int.IsDone() || !C1Ext.IsDone() || !C2Int.IsDone() || !C2Ext.IsDone()) {
+    StdFail_NotDone::Raise("Cannot build cylinders");
+  }
+
+  // Fuse the 2 pipes
+  BRepAlgoAPI_Fuse fuse1 (C1Ext.Shape(), C2Ext.Shape());
+  if (!fuse1.IsDone()) {
+    StdFail_NotDone::Raise("Cannot fuse cylinders");
+  }
+
+  // Remove small radius main pipe
+  BRepAlgoAPI_Cut cut1 (fuse1.Shape(), C1Int.Shape());
+  if (!cut1.IsDone()) {
+    StdFail_NotDone::Raise("Coudn't cut cylinders");
+  }
+
+  // Remove small radius incident pipe => Te
+  BRepAlgoAPI_Cut Te (cut1.Shape(), C2Int.Shape());
+  if (!Te.IsDone()) {
+    StdFail_NotDone::Raise("Coudn't cut cylinders");
+  }
+
+  return Te.Shape();
+}
+
+//=======================================================================
+//function : MakeQuarterPipeTShape
+//purpose  :
+//=======================================================================
+TopoDS_Shape AdvancedEngine_PipeTShapeDriver::MakeQuarterPipeTShape (const double r1, const double w1, const double l1,
+                                                               const double r2, const double w2, const double l2) const
+{
+  TopoDS_Shape Te = MakePipeTShape(r1, w1, l1, r2, w2, l2);
+  if (Te.IsNull())
+    StdFail_NotDone::Raise("Couldn't build Pipe TShape");
+
+  // Get a quarter of shape => Te2
+  double r1Ext = r1 + w1;
+  BRepPrimAPI_MakeBox box1 (gp_Pnt(0, -2*r1Ext, -2*r1Ext), gp_Pnt( Abs(2 * l1), 2*r1Ext, Abs(2*l2)));
+  BRepPrimAPI_MakeBox box2 (gp_Pnt(0,  2*r1Ext, -2*r1Ext), gp_Pnt(-Abs(2 * l1), 0,       Abs(2*l2)));
+  box1.Build();
+  box2.Build();
+  if (!box1.IsDone() || !box2.IsDone()) {
+    StdFail_NotDone::Raise("Couldn't build boxes");
+  }
+  BRepAlgoAPI_Cut cut3 (Te, box1.Shape());
+  if (!cut3.IsDone()) {
+    StdFail_NotDone::Raise("Couldn't cut Pipe Tshape with box");
+  }
+  BRepAlgoAPI_Cut Te4 (cut3.Shape(), box2.Shape());
+  if (!Te4.IsDone()) {
+    StdFail_NotDone::Raise("Couldn't cut Pipe Tshape with box");
+  }
+
+  return Te4.Shape();
+}
+
+//=======================================================================
+//function : Execute
+//purpose  :
+//=======================================================================
+Standard_Integer AdvancedEngine_PipeTShapeDriver::Execute (TFunction_Logbook& log) const
+{
+  if (Label().IsNull()) return 0;
+  Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
+
+  AdvancedEngine_IPipeTShape aData (aFunction);
+  Standard_Integer aType = aFunction->GetType();
+
+  TopoDS_Shape aShape, Te4, Te4Part;
+  //TopoDS_Edge arete_intersect_int;
+  //Handle(TopTools_HSequenceOfShape) edges_e = new TopTools_HSequenceOfShape;
+  Handle(TColStd_HSequenceOfInteger) edges_e;
+  //Handle(TopTools_HSequenceOfShape) edges_i = new TopTools_HSequenceOfShape;
+  //gp_Pnt aP0 (0, 0, 0);
+  //gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ();
+  bool hexMesh = (bool) aData.GetHexMesh();
+
+  // Useful values
+  //double aSize = 2*(aData.GetL1() + aData.GetL2());
+  double epsilon = Precision::Approximation();
+  double aR1Ext = aData.GetR1() + aData.GetW1();
+  double aR2Ext = aData.GetR2() + aData.GetW2();
+
+  if (aData.GetR2() > aData.GetR1() + epsilon) {
+    StdFail_NotDone::Raise("TShape cannot be computed if R2 > R1");
+  }
+
+  if (aR2Ext > aR1Ext + epsilon) {
+    StdFail_NotDone::Raise("TShape cannot be computed if R2+W2 > R1+W1");
+  }
+
+  // external radius are equal
+  if (fabs(aR2Ext - aR1Ext) < epsilon) {
+    if (aType == TSHAPE_CHAMFER)
+      StdFail_NotDone::Raise("TShape with chamfer cannot be computed if R2+W2 = R1+W1");
+    if (aType == TSHAPE_FILLET)
+      StdFail_NotDone::Raise("TShape with fillet cannot be computed if R2+W2 = R1+W1");
+    // internal radius are different => not possible
+    if (fabs(aData.GetR2() - aData.GetR1()) > epsilon) {
+      StdFail_NotDone::Raise("TShape cannot be computed if R2+W2 = R1+W1 and R2 != R1");
+    }
+  }
+
+  if (aR1Ext >= aData.GetL2() + epsilon) {
+    StdFail_NotDone::Raise("TShape cannot be computed if R1+W1 >= L2");
+  }
+  if (aR2Ext >= aData.GetL1() + epsilon) {
+    StdFail_NotDone::Raise("TShape cannot be computed if R2+W2 >= L1");
+  }
+
+  if (aType == TSHAPE_CHAMFER) {
+    if (aData.GetH() >= (aData.GetL2() - aR1Ext + epsilon)) {
+      StdFail_NotDone::Raise("TShape cannot be computed: height of chamfer is too high");
+    }
+
+    if (aData.GetW() >= (aData.GetL1() - aR2Ext + epsilon))
+      StdFail_NotDone::Raise("TShape cannot be computed: width of chamfer is too high");
+  }
+
+  if (aType == TSHAPE_FILLET) {
+    if (aData.GetRF() >= (aData.GetL2() - aR1Ext + epsilon) ||
+        aData.GetRF() >= (aData.GetL1() - aR2Ext + epsilon))
+      StdFail_NotDone::Raise("TShape cannot be computed: radius of fillet is too high");
+  }
+
+  if (hexMesh) {
+    // Create a quarter of a basic T-Shape pipe
+    //std::cerr << "Create a quarter of a basic T-Shape pipe" << std::endl;
+    Te4 = MakeQuarterPipeTShape(aData.GetR1(), aData.GetW1(), aData.GetL1(),
+                                aData.GetR2(), aData.GetW2(), aData.GetL2());
+  }
+  else {
+    // No need to cut pipe t-shape
+    //std::cerr << "Create a basic T-Shape pipe" << std::endl;
+    Te4 = MakePipeTShape(aData.GetR1(), aData.GetW1(), aData.GetL1(),
+                         aData.GetR2(), aData.GetW2(), aData.GetL2());
+  }
+  aShape = Te4;
+/*
+  if (aType == TSHAPE_BASIC) {
+      aShape = Te4;
+//       aShape = MakeQuarterPipeTShape(aData.GetR1(), aData.GetW1(), aData.GetL1(),
+//       aData.GetR2(), aData.GetW2(), aData.GetL2());
+  }
+  else if (aType == TSHAPE_CHAMFER) {
+    // TShape with chamfer
+//     BRep_Builder BB;
+//     TopoDS_Compound CC;
+//     BB.MakeCompound(CC);
+    // Create chamfer on the edges edges_e
+    BRepFilletAPI_MakeChamfer chamfer (Te4);
+    TopTools_IndexedMapOfShape anEdgesIndices;
+    TopExp::MapShapes(Te4, anEdgesIndices);
+
+    TopoDS_Shape theBox;
+    if (hexMesh) {
+      BRepPrimAPI_MakeBox aBox (gp_Pnt(0,0,0),gp_Pnt(-aR2Ext, -aR2Ext, aR1Ext));
+      aBox.Build();
+      if (!aBox.IsDone()) {
+        StdFail_NotDone::Raise("Couldn't build box");
+      }
+      theBox = aBox.Shape();
+    }
+    else {
+      BRepPrimAPI_MakeBox aBox (gp_Pnt(aR2Ext,aR2Ext,0),gp_Pnt(-aR2Ext, -aR2Ext, aR1Ext));
+      aBox.Build();
+      if (!aBox.IsDone()) {
+        StdFail_NotDone::Raise("Couldn't build box");
+      }
+      theBox = aBox.Shape();
+    }
+    Handle(TColStd_HSequenceOfInteger) edges_e = new TColStd_HSequenceOfInteger;
+    edges_e = GetShapesOnBoxIDs(theBox, Te4, TopAbs_EDGE, GEOMAlgo_ST_IN);
+    if (edges_e.IsNull() || edges_e->Length() == 0) {
+      StdFail_NotDone::Raise("Common edges not found");
+    }
+
+    TopTools_IndexedDataMapOfShapeListOfShape M;
+    GEOMImpl_Block6Explorer::MapShapesAndAncestors(Te4, TopAbs_EDGE, TopAbs_FACE, M);
+//     std::cerr << "Number of IDs: " << edges_e->Length() << std::endl;
+    int nbEdgesInChamfer = 0;
+    for (int i=1;i<=edges_e->Length();i++) {
+//       std::cerr << "Get Edge with ID #" << i << std::endl;
+      int theId = edges_e->Value(i);
+//       std::cerr << "ID #" << i << "= " << theId << std::endl;
+//       std::cerr << "Search for edge in shape" << std::endl;
+      TopoDS_Edge theEdge = TopoDS::Edge(anEdgesIndices.FindKey(theId));
+//       std::cerr << "Found" << std::endl;
+//       std::cerr << "Keep only edges with a vertex on (x, x, re1)" << std::endl;
+      TopExp_Explorer ExVertices;
+      for (ExVertices.Init(theEdge,TopAbs_VERTEX); ExVertices.More(); ExVertices.Next()) {
+        gp_Pnt aPt = BRep_Tool::Pnt(TopoDS::Vertex(ExVertices.Current()));
+        if (aPt.Z() - aR1Ext <= epsilon) {
+//           std::cerr << "aPt.Z() = aR1Ext => keep this edge" << std::endl;
+          nbEdgesInChamfer ++;
+          const TopTools_ListOfShape& aFL = M.FindFromKey(theEdge);
+          TopoDS_Face F = TopoDS::Face( aFL.First() );
+          if (hexMesh)
+            chamfer.Add(aData.GetH(), aData.GetW(), theEdge, F);
+          else
+            chamfer.Add(aData.GetW(), aData.GetH(), theEdge, F);
+          break;
+        }
+      }
+//       std::cerr << "Test if hexMesh: ";
+      if (hexMesh && nbEdgesInChamfer == 1) {
+//         std::cerr << "Yes => stop after 1 edge" << std::endl;
+        break;
+      }
+//       std::cerr << "No => continue for other edges" << std::endl;
+  //  BB.Add(CC, edges_e->Value(i));
+  //  const TopTools_ListOfShape& aFL = M.FindFromKey(TopoDS::Edge(edges_e->Value(i)));
+  //  chamfer.Add(aData.GetW(), aData.GetH(), TopoDS::Edge(edges_e->Value(i)), F);
+    }
+//     std::cerr << "Build chamfer with " << nbEdgesInChamfer << " edges" << std::endl;
+//     }
+    chamfer.Build();
+    if (!chamfer.IsDone()) {
+      StdFail_NotDone::Raise("Chamfer can not be computed on the given shape with the given parameters");
+    }
+
+//     BB.Add(CC, chamfer.Shape());
+
+//     aShape = CC;
+    aShape = chamfer.Shape();
+  }
+  else if (aType == TSHAPE_FILLET) {
+    // TShape with fillet
+    // Create fillet on the edge arete_intersect_ext
+    BRepFilletAPI_MakeFillet fill (Te4);
+
+    TopTools_IndexedMapOfShape anIndices;
+    TopExp::MapShapes(Te4, anIndices);
+
+    TopoDS_Shape theBox;
+    if (hexMesh) {
+      BRepPrimAPI_MakeBox aBox (gp_Pnt(0,0,0),gp_Pnt(-aR2Ext, -aR2Ext, aR1Ext));
+      aBox.Build();
+      if (!aBox.IsDone()) {
+        StdFail_NotDone::Raise("Couldn't build box");
+      }
+      theBox = aBox.Shape();
+    }
+    else {
+      BRepPrimAPI_MakeBox aBox (gp_Pnt(aR2Ext,aR2Ext,0),gp_Pnt(-aR2Ext, -aR2Ext, aR1Ext));
+      aBox.Build();
+      if (!aBox.IsDone()) {
+        StdFail_NotDone::Raise("Couldn't build box");
+      }
+      theBox = aBox.Shape();
+    }
+    Handle(TColStd_HSequenceOfInteger) edges_e = new TColStd_HSequenceOfInteger;
+    edges_e = GetShapesOnBoxIDs(theBox, Te4, TopAbs_EDGE, GEOMAlgo_ST_IN);
+    if (edges_e.IsNull() || edges_e->Length() == 0) {
+      StdFail_NotDone::Raise("Common edges not found");
+    }
+
+//     fill.Add(TopoDS::Edge(edges_e->Value(1)));
+//     if (!hexMesh) {
+    for (int i=1;i<=edges_e->Length();i++) {
+      if (hexMesh && (i > 1))
+        break;
+      TopoDS_Edge theEdge = TopoDS::Edge(anIndices.FindKey(edges_e->Value(i)));
+      fill.Add(theEdge);
+//             fill.Add(TopoDS::Edge(edges_e->Value(i)));
+    }
+//     }
+    fill.SetRadius(aData.GetRF(), 1, 1);
+    fill.Build();
+    if (!fill.IsDone()) {
+      StdFail_NotDone::Raise("Fillet can't be computed on the given shape with the given radius");
+    }
+
+    aShape = fill.Shape();
+  }
+  else {
+    // other construction modes here
+  }
+*/
+  if (aShape.IsNull()) return 0;
+
+  aFunction->SetValue(aShape);
+
+  log.SetTouched(Label());
+
+  return 1;
+}
+
+//================================================================================
+/*!
+ * \brief Returns a name of creation operation and names and values of creation parameters
+ */
+//================================================================================
+
+bool AdvancedEngine_PipeTShapeDriver::
+GetCreationInformation(std::string&             theOperationName,
+                       std::vector<GEOM_Param>& theParams)
+{
+  if (Label().IsNull()) return 0;
+  Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
+
+  AdvancedEngine_IPipeTShape aCI( function );
+  Standard_Integer aType = function->GetType();
+
+  theOperationName = "PIPETSHAPE";
+
+  switch ( aType ) {
+  case TSHAPE_BASIC:
+    AddParam( theParams, "Main radius", aCI.GetR1() );
+    AddParam( theParams, "Main width", aCI.GetW1() );
+    AddParam( theParams, "Main half-length", aCI.GetL1() );
+    AddParam( theParams, "Incident pipe radius", aCI.GetR2() );
+    AddParam( theParams, "Incident pipe width", aCI.GetW2() );
+    AddParam( theParams, "Incident pipe half-length", aCI.GetL2() );
+    AddParam( theParams, "For hex mesh", aCI.GetHexMesh() );
+    break;
+  case TSHAPE_CHAMFER:
+    AddParam( theParams, "Main radius", aCI.GetR1() );
+    AddParam( theParams, "Main width", aCI.GetW1() );
+    AddParam( theParams, "Main half-length", aCI.GetL1() );
+    AddParam( theParams, "Incident pipe radius", aCI.GetR2() );
+    AddParam( theParams, "Incident pipe width", aCI.GetW2() );
+    AddParam( theParams, "Incident pipe half-length", aCI.GetL2() );
+    AddParam( theParams, "Chamfer height", aCI.GetH() );
+    AddParam( theParams, "Chamfer width", aCI.GetW() );
+    AddParam( theParams, "For hex mesh", aCI.GetHexMesh() );
+    break;
+  case TSHAPE_FILLET:
+    AddParam( theParams, "Main radius", aCI.GetR1() );
+    AddParam( theParams, "Main width", aCI.GetW1() );
+    AddParam( theParams, "Main half-length", aCI.GetL1() );
+    AddParam( theParams, "Incident pipe radius", aCI.GetR2() );
+    AddParam( theParams, "Incident pipe width", aCI.GetW2() );
+    AddParam( theParams, "Incident pipe half-length", aCI.GetL2() );
+    AddParam( theParams, "Fillet radius", aCI.GetRF() );
+    AddParam( theParams, "For hex mesh", aCI.GetHexMesh() );
+    break;
+  default:
+    return false;
+  }
+  
+  return true;
+}
+
+IMPLEMENT_STANDARD_HANDLE (AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver);
diff --git a/src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.hxx b/src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.hxx
new file mode 100644 (file)
index 0000000..68e6c25
--- /dev/null
@@ -0,0 +1,122 @@
+// 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, or (at your option) any 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 _AdvancedEngine_PipeTShapeDriver_HXX
+#define _AdvancedEngine_PipeTShapeDriver_HXX
+
+#include "GEOM_BaseDriver.hxx"
+#include "GEOMAlgo_State.hxx"
+
+#include <TopAbs_ShapeEnum.hxx>
+#include <TopTools_HSequenceOfShape.hxx>
+#include <TColStd_HSequenceOfInteger.hxx>
+#include <Geom_Surface.hxx>
+
+DEFINE_STANDARD_HANDLE( AdvancedEngine_PipeTShapeDriver, GEOM_BaseDriver );
+
+class AdvancedEngine_PipeTShapeDriver : public GEOM_BaseDriver
+{
+public:
+ // Methods PUBLIC
+  // 
+  AdvancedEngine_PipeTShapeDriver();
+  virtual  Standard_Integer Execute(TFunction_Logbook& log) const; 
+  virtual void Validate(TFunction_Logbook&) const {}
+  Standard_Boolean MustExecute(const TFunction_Logbook&) const
+  {
+    return Standard_True;
+  }
+  static const Standard_GUID& GetID();
+  ~AdvancedEngine_PipeTShapeDriver() {};
+  
+  virtual bool GetCreationInformation(std::string&             theOperationName,
+                                     std::vector<GEOM_Param>& params);
+  // Type management
+  //
+DEFINE_STANDARD_RTTI( AdvancedEngine_PipeTShapeDriver )
+
+private:
+
+  /*!
+   * \brief Create a T-Shape based on pipes
+   * \param r1 - the internal radius of main pipe
+   * \param w1 - the thickness of main pipe
+   * \param l1 - the half-length of main pipe
+   * \param r2 - the internal radius of incident pipe
+   * \param w2 - the thickness of incident pipe
+   * \param l2 - the half-length of main pipe
+   * \retval TopoDS_Shape - Resulting shape
+   */
+  TopoDS_Shape MakePipeTShape(double r1, double w1, double l1,
+                              double r2, double w2, double l2) const;
+
+  /*!
+   * \brief Create a quarter of a T-Shape based on pipes
+   * \param r1 - the internal radius of main pipe
+   * \param w1 - the thickness of main pipe
+   * \param l1 - the half-length of main pipe
+   * \param r2 - the internal radius of incident pipe
+   * \param w2 - the thickness of incident pipe
+   * \param l2 - the half-length of main pipe
+   * \retval TopoDS_Shape - Resulting shape
+   */
+  TopoDS_Shape MakeQuarterPipeTShape(double r1, double w1, double l1,
+                                     double r2, double w2, double l2) const;
+
+  /*!
+   * \brief Find IDs of sub-shapes complying with given status about surface
+   * \param theSurface - the surface to check state of sub-shapes against
+   * \param theShape - the shape to explore
+   * \param theShapeType - type of sub-shape of theShape
+   * \param theState - required state
+   * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
+   */
+  Handle(TColStd_HSequenceOfInteger)
+    GetShapesOnSurfaceIDs(const Handle(Geom_Surface)& theSurface,
+                          const TopoDS_Shape&         theShape,
+                          TopAbs_ShapeEnum            theShapeType,
+                          GEOMAlgo_State              theState) const;
+
+  /*!
+   * \brief Find IDs of sub-shapes complying with given status about surface
+    * \param theBox - the box to check state of sub-shapes against
+    * \param theShape - the shape to explore
+    * \param theShapeType - type of sub-shape of theShape
+    * \param theState - required state
+    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
+   */
+  Handle(TColStd_HSequenceOfInteger)
+  GetShapesOnBoxIDs(const TopoDS_Shape& aBox,
+                 const TopoDS_Shape& aShape,
+                 const Standard_Integer theShapeType,
+                 GEOMAlgo_State theState) const;
+
+  //=======================================================================
+  //function : getCommonShapesOnCylinders
+  //purpose  : return the common edge between 2 cylindrical surfaces
+  //           along OX and OZ
+  //=======================================================================
+  void GetCommonShapesOnCylinders(const TopoDS_Shape& theShape,
+                                  TopAbs_ShapeEnum theShapeType,
+                                  double r, double r2,
+                                  Handle(TopTools_HSequenceOfShape)& commonShapes) const;
+
+};
+
+#endif // _AdvancedEngine_PipeTShapeDriver_HXX
diff --git a/src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.cxx b/src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.cxx
new file mode 100644 (file)
index 0000000..19fef9c
--- /dev/null
@@ -0,0 +1,275 @@
+// 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, or (at your option) any 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 <Standard_Stream.hxx>
+
+#include "AdvancedEngine_SmoothingSurfaceDriver.hxx"
+#include "AdvancedEngine_ISmoothingSurface.hxx"
+#include "AdvancedEngine_Types.hxx"
+
+#include "GEOM_Function.hxx"
+
+#include <TFunction_Logbook.hxx>
+#include <StdFail_NotDone.hxx>
+
+#include <TopoDS_Vertex.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Compound.hxx>
+#include <TopoDS.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_MapIteratorOfMapOfShape.hxx>
+#include <TopExp_Explorer.hxx>
+
+#include <TColgp_SequenceOfPnt.hxx>
+#include <TColgp_Array2OfPnt.hxx>
+#include <TColgp_SequenceOfXY.hxx>
+#include <TColgp_SequenceOfXYZ.hxx>
+#include <TColStd_Array1OfInteger.hxx>
+
+#include <BRepAdaptor_HSurface.hxx>
+
+#include <BRep_Builder.hxx>
+#include <BRepGProp.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepPrimAPI_MakeSphere.hxx>
+#include <BRepPrimAPI_MakeBox.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
+#include <BRepAlgoAPI_Cut.hxx>
+
+#include <GeomPlate_Surface.hxx>
+#include <GeomPlate_BuildPlateSurface.hxx>
+#include <GeomPlate_PointConstraint.hxx>
+#include <GeomPlate_MakeApprox.hxx>
+#include <GeomPlate_PlateG0Criterion.hxx>
+#include <GeomPlate_BuildAveragePlane.hxx>
+
+#include <Geom_BSplineSurface.hxx>
+#include <Geom_Surface.hxx>
+#include <Geom_Plane.hxx>
+
+#include <GProp_GProps.hxx>
+#include <Bnd_Box.hxx>
+#include <BRepBndLib.hxx>
+
+#include <gp_Pnt.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Ax3.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Vec.hxx>
+
+#include <GC_MakePlane.hxx>
+
+//=======================================================================
+//function : GetID
+//purpose  :
+//=======================================================================
+const Standard_GUID& AdvancedEngine_SmoothingSurfaceDriver::GetID()
+{
+  static Standard_GUID aGUID("1C3A0F30-729D-4E83-8232-78E74FC5637C");
+  return aGUID;
+}
+
+//=======================================================================
+//function : AdvancedEngine_SmoothingSurfaceDriver
+//purpose  :
+//=======================================================================
+AdvancedEngine_SmoothingSurfaceDriver::AdvancedEngine_SmoothingSurfaceDriver()
+{
+}
+
+//=======================================================================
+//function : MakeSmoothingSurfaceUnClosed
+//purpose  :
+//=======================================================================
+TopoDS_Shape AdvancedEngine_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed
+                          (const Handle_TColgp_HArray1OfPnt &theListOfPoints,
+                           const Standard_Integer            theNbMax,
+                           const Standard_Integer            theDegMax,
+                           const Standard_Real               theDMax) const
+{
+  TopoDS_Face aInitShape;
+  
+  // Create an average Plane
+  //Handle(TColgp_HArray1OfPnt) HAP = new TColgp_HArray1OfPnt(1,theListOfPoints.Length())
+  GeomPlate_BuildAveragePlane gpbap(theListOfPoints,theListOfPoints->Length(),Precision::Confusion(),1,1);
+  Handle(Geom_Plane) plane(gpbap.Plane());
+  Standard_Real Umin, Umax, Vmin, Vmax;
+  gpbap.MinMaxBox(Umin,Umax,Vmin,Vmax);
+  // cout << "Vals : " << Umin << ", " << Umax << ", " << Vmin << ", " << Vmax << endl;
+  BRepBuilderAPI_MakeFace mf(plane,Umin,Umax,Vmin,Vmax,Precision::Confusion());
+  aInitShape =  mf.Face();
+  //return aInitShape;
+
+  GeomPlate_BuildPlateSurface aBuilder(3,10);
+  // ** Initialization of surface
+  Handle(BRepAdaptor_HSurface) HSI = new BRepAdaptor_HSurface();
+  HSI->ChangeSurface().Initialize(aInitShape);
+  aBuilder.LoadInitSurface( BRep_Tool::Surface(HSI->ChangeSurface().Face()));
+
+  Standard_Integer j, j1, j2;
+  // cout << "Init surface" << endl;
+  j1 = theListOfPoints->Lower();
+  j2 = theListOfPoints->Upper();
+  for (j=j1; j<=j2 ; j++)
+  {
+    gp_Pnt aPnt = theListOfPoints->Value(j); 
+    Handle(GeomPlate_PointConstraint) PCont = new GeomPlate_PointConstraint(aPnt,0);
+    aBuilder.Add(PCont);
+  }
+  // cout << "avant Perform surface" << endl;
+  aBuilder.Perform();
+  // cout << "Perform surface" << endl;
+
+  // A ce niveau : surface algo
+  Handle(GeomPlate_Surface) gpPlate = aBuilder.Surface();
+  
+  Standard_Integer nbcarreau = (theNbMax > 0 ? theNbMax : 2);
+  Standard_Integer degmax = (theDegMax > 0 ? theDegMax : 8);
+  Standard_Real seuil = theDMax;
+
+  if (seuil <= 0.) {
+    seuil = Max(0.0001,10*aBuilder.G0Error());
+  }
+
+  GeomPlate_MakeApprox Mapp(gpPlate,0.0001,nbcarreau,degmax,seuil);
+  // cout << "Approx surface" << endl;
+
+  Handle (Geom_Surface) Surf (Mapp.Surface());
+  aBuilder.Surface()->Bounds( Umin, Umax, Vmin, Vmax);
+  
+  BRepBuilderAPI_MakeFace MF(Surf,Umin, Umax, Vmin, Vmax, Precision::Confusion());
+  TopoDS_Shape aShape = MF.Shape();
+  
+  return aShape;
+}
+
+
+//=======================================================================
+//function : Execute
+//purpose  :
+//=======================================================================
+Standard_Integer AdvancedEngine_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log) const
+{
+  if (Label().IsNull()) return 0;
+  Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
+  if (aFunction.IsNull()) return 0;
+
+  Standard_Integer aType = aFunction->GetType();
+
+  if (aType != SMOOTHINGSURFACE_LPOINTS) return 0;
+  // cout << "Youhou : " << aType << endl;
+
+  AdvancedEngine_ISmoothingSurface aData (aFunction);
+
+  // Fill the map of vertices.
+  Standard_Integer    aNbShapes = aData.GetLength();
+  TopTools_MapOfShape aMapPoints;
+  Standard_Integer    i;
+
+  for (i = 1; i <= aNbShapes; i++) {
+    Handle(GEOM_Function) aFShape = aData.GetPntOrComp(i);
+    TopoDS_Shape aShape = aFShape->GetValue();
+
+    if (aShape.ShapeType() == TopAbs_VERTEX) {
+      aMapPoints.Add(aShape);
+    } else {
+      TopExp_Explorer anExp(aShape, TopAbs_VERTEX);
+
+      for (; anExp.More(); anExp.Next()) {
+        aMapPoints.Add(anExp.Current());
+      }
+    }
+  }
+
+  // Add points to the array of points.
+  const Standard_Integer      aNbPoints    = aMapPoints.Extent();
+  Handle(TColgp_HArray1OfPnt) anArrayofPnt =
+      new TColgp_HArray1OfPnt(1, aNbPoints);
+  TopTools_MapIteratorOfMapOfShape anIter(aMapPoints);
+
+  for (i = 1; anIter.More(); anIter.Next(), i++) {
+    TopoDS_Vertex aPoint = TopoDS::Vertex(anIter.Key());
+    gp_Pnt aPnt = BRep_Tool::Pnt(aPoint);
+
+    anArrayofPnt->SetValue(i, aPnt);
+  }
+
+  const Standard_Integer aNbMax  = aData.GetNbMax();
+  const Standard_Integer aDegMax = aData.GetDegMax();
+  const Standard_Real    aDMax   = aData.GetDMax();
+
+  // Make smoothing surface.
+  TopoDS_Shape aShape = AdvancedEngine_SmoothingSurfaceDriver::
+    MakeSmoothingSurfaceUnClosed(anArrayofPnt, aNbMax, aDegMax, aDMax);
+
+  if (aShape.IsNull()) return 0;
+
+  aFunction->SetValue(aShape);
+
+  log.SetTouched(Label());
+
+  return 1;
+}
+
+//================================================================================
+/*!
+ * \brief Returns a name of creation operation and names and values of creation parameters
+ */
+//================================================================================
+
+bool AdvancedEngine_SmoothingSurfaceDriver::
+GetCreationInformation(std::string&             theOperationName,
+                       std::vector<GEOM_Param>& theParams)
+{
+  if (Label().IsNull()) return 0;
+  Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
+
+  AdvancedEngine_ISmoothingSurface aCI( function );
+  Standard_Integer aType = function->GetType();
+
+  theOperationName = "SMOOTHINGSURFACE";
+
+  switch ( aType ) {
+  case SMOOTHINGSURFACE_LPOINTS:
+    {
+      AddParam( theParams, "Points" );
+      if ( aCI.GetLength() > 1 )
+        theParams[0] << aCI.GetLength() << " points: ";
+      for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
+        theParams[0] << aCI.GetPntOrComp( i ) << " ";
+
+      const Standard_Integer aNbMax  = aCI.GetNbMax();
+      const Standard_Integer aDegMax = aCI.GetDegMax();
+      const Standard_Real    aDMax   = aCI.GetDMax();
+
+      AddParam(theParams, "Max nbr of Bezier pieces", aCI.GetNbMax());
+      AddParam(theParams, "Max BSpline surface degree", aCI.GetDegMax());
+      AddParam(theParams, "3D tolerance of initial approximation", aCI.GetDMax());
+    }
+    break;
+  default:
+    return false;
+  }
+  
+  return true;
+}
+
+IMPLEMENT_STANDARD_HANDLE (AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver);
diff --git a/src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.hxx b/src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.hxx
new file mode 100644 (file)
index 0000000..2e2015f
--- /dev/null
@@ -0,0 +1,60 @@
+// 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, or (at your option) any 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 _AdvancedEngine_SmoothingSurfaceDriver_HXX
+#define _AdvancedEngine_SmoothingSurfaceDriver_HXX
+
+#include "GEOM_BaseDriver.hxx"
+
+#include <TFunction_Logbook.hxx>
+#include <TColgp_HArray1OfPnt.hxx>
+#include <TopoDS_Shape.hxx>
+
+DEFINE_STANDARD_HANDLE( AdvancedEngine_SmoothingSurfaceDriver, GEOM_BaseDriver );
+
+class AdvancedEngine_SmoothingSurfaceDriver : public GEOM_BaseDriver
+{
+public:
+ // Methods PUBLIC
+  // 
+  AdvancedEngine_SmoothingSurfaceDriver();
+  virtual  Standard_Integer Execute(TFunction_Logbook& log) const; 
+  virtual void Validate(TFunction_Logbook&) const {}
+  Standard_Boolean MustExecute(const TFunction_Logbook&) const
+  {
+    return Standard_True;
+  }
+  static const Standard_GUID& GetID();
+  ~AdvancedEngine_SmoothingSurfaceDriver() {};
+  
+  virtual bool GetCreationInformation(std::string&             theOperationName,
+                                     std::vector<GEOM_Param>& params);
+  // Type management
+  //
+DEFINE_STANDARD_RTTI( AdvancedEngine_SmoothingSurfaceDriver )
+
+private:
+  TopoDS_Shape MakeSmoothingSurfaceUnClosed
+                    (const Handle_TColgp_HArray1OfPnt &theListOfPoints,
+                     const Standard_Integer            theNbMax,
+                     const Standard_Integer            theDegMax,
+                     const Standard_Real               theDMax) const;
+};
+
+#endif // _AdvancedEngine_SmoothingSurfaceDriver_HXX
index aa552a15d66f6b3ff2518b15ad24f67c0e90f923..63ee5b5cadb0da934eace033e1dcfc9fbfa07596 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+#include "GEOMImpl_Types.hxx"
+
 // Advanced functions (base = 200)
-#define ADVANCED_BASE 200  // NO OPERATION (advanced operations base)
-#define GEOM_TSHAPE 201
-#define GEOM_DIVIDEDDISK 202
-#define GEOM_DIVIDEDCYLINDER 203
-#define GEOM_SMOOTHINGSURFACE 204
-/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
+#define GEOM_TSHAPE            ( USER_TYPE + 1 )
+#define GEOM_DIVIDEDDISK       ( USER_TYPE + 2 )
+#define GEOM_DIVIDEDCYLINDER   ( USER_TYPE + 3 )
+#define GEOM_SMOOTHINGSURFACE  ( USER_TYPE + 4 )
+
 // Advanced functions sub-operations codes
 #define TSHAPE_BASIC 1
 #define TSHAPE_CHAMFER 2
@@ -35,4 +36,3 @@
 #define DIVIDEDDISK_R_VECTOR_PNT 2
 #define DIVIDEDCYLINDER_R_H 1
 #define SMOOTHINGSURFACE_LPOINTS 1
-/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
index b6073f353e077a5d1ad5b188f28cc3405375f207..7a2c8e13a40cd0d1c82907347f7019dce14b5b80 100755 (executable)
@@ -45,6 +45,7 @@ ADD_DEFINITIONS(
 SET(_link_LIBRARIES
   GEOMEngine
   SalomeIDLGEOM
+  SalomeIDLAdvancedGEOM
   ${KERNEL_SALOMELocalTrace}
   ${KERNEL_SalomeGenericObj}
   ${KERNEL_TOOLSDS}
@@ -55,30 +56,28 @@ SET(_link_LIBRARIES
 # --- headers ---
 
 SET(AdvancedEngine_HEADERS
+  AdvancedEngine.hxx
   AdvancedEngine_Types.hxx
-  # AdvancedEngine_OperationsCreator.hh
-  # GEOM_AdvancedEngine.hxx
-  # GEOMImpl_IAdvancedOperations.hxx
-  # GEOM_IAdvancedOperations_i.hh
-  # #ADVANCED_INCLUDES:
-  # GEOMImpl_IPipeTShape.hxx GEOMImpl_PipeTShapeDriver.hxx
-  # GEOMImpl_IDividedDisk.hxx GEOMImpl_DividedDiskDriver.hxx
-  # GEOMImpl_IDividedCylinder.hxx GEOMImpl_DividedCylinderDriver.hxx
-  # GEOMImpl_ISmoothingSurface.hxx GEOMImpl_SmoothingSurfaceDriver.hxx
+  AdvancedEngine_DividedDiskDriver.hxx
+  AdvancedEngine_PipeTShapeDriver.hxx
+  AdvancedEngine_SmoothingSurfaceDriver.hxx
+  AdvancedEngine_IPipeTShape.hxx
+  AdvancedEngine_ISmoothingSurface.hxx
+  AdvancedEngine_IDividedDisk.hxx
+  AdvancedEngine_IOperations.hxx
+  AdvancedEngine_IOperations_i.hh
+  AdvancedEngine_OperationsCreator.hxx
   )
 # --- sources ---
 
 SET(AdvancedEngine_SOURCES
   AdvancedEngine.cxx
-  AdvancedEngine_OperationsCreator.cc
-  GEOMImpl_IAdvancedOperations.cxx
-  GEOM_IAdvancedOperations_i.cc
-  # ADVANCED_SOURCES:
-  GEOMImpl_PipeTShapeDriver.cxx
-  GEOMImpl_DividedDiskDriver.cxx
-  #GEOMImpl_DividedCylinderDriver.cxx
-  GEOMImpl_SmoothingSurfaceDriver.cxx
-  ##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@##
+  AdvancedEngine_DividedDiskDriver.cxx
+  AdvancedEngine_PipeTShapeDriver.cxx
+  AdvancedEngine_SmoothingSurfaceDriver.cxx
+  AdvancedEngine_IOperations.cxx
+  AdvancedEngine_IOperations_i.cc
+  AdvancedEngine_OperationsCreator.cxx
   )
 
 # --- rules ---
@@ -87,4 +86,4 @@ ADD_LIBRARY(AdvancedEngine ${AdvancedEngine_SOURCES})
 TARGET_LINK_LIBRARIES(AdvancedEngine ${_link_LIBRARIES})
 INSTALL(TARGETS AdvancedEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
 
-INSTALL(FILES ${AdvancedEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
\ No newline at end of file
+INSTALL(FILES ${AdvancedEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
diff --git a/src/AdvancedEngine/GEOMImpl_DividedDiskDriver.cxx b/src/AdvancedEngine/GEOMImpl_DividedDiskDriver.cxx
deleted file mode 100644 (file)
index 24876c4..0000000
+++ /dev/null
@@ -1,529 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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 <Standard_Stream.hxx>
-
-#include "AdvancedEngine_Types.hxx"
-
-#include <GEOMImpl_DividedDiskDriver.hxx>
-#include <GEOMImpl_IDividedDisk.hxx>
-#include <GEOMImpl_Types.hxx>
-#include <GEOM_Function.hxx>
-
-// OCCT includes
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Lin.hxx>
-#include <gp_Circ.hxx>
-#include <gp_Ax1.hxx>
-#include <gp_Ax2.hxx>
-
-#include <BRep_Builder.hxx>
-#include <BRepBuilderAPI_MakeFace.hxx>
-#include <BRepBuilderAPI_MakeEdge.hxx>
-#include <BRepBuilderAPI_MakeVertex.hxx>
-#include <BRepBuilderAPI_MakeWire.hxx>
-#include <BRepBuilderAPI_Transform.hxx>
-
-#include <Geom_Plane.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Edge.hxx>
-
-#include <TFunction_Logbook.hxx>
-#include <StdFail_NotDone.hxx>
-
-#include <TopExp.hxx>
-
-#include <utilities.h>
-//@@ include required header files here @@//
-
-enum
-{
-  SQUARE,
-  HEXAGON
-};
-//=======================================================================
-//function : GetID
-//purpose  :
-//=======================================================================
-const Standard_GUID& GEOMImpl_DividedDiskDriver::GetID()
-{
-  static Standard_GUID aGUID("0b01da9a-c5da-11e1-8d80-78e7d1879630");
-  return aGUID;
-}
-
-//=======================================================================
-//function : GEOMImpl_DividedDiskDriver
-//purpose  :
-//=======================================================================
-GEOMImpl_DividedDiskDriver::GEOMImpl_DividedDiskDriver()
-{
-}
-
-//=======================================================================
-//function : Execute
-//purpose  :
-//=======================================================================
-Standard_Integer GEOMImpl_DividedDiskDriver::Execute(TFunction_Logbook& log) const
-{
-  if (Label().IsNull()) return 0;
-  Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
-
-  GEOMImpl_IDividedDisk aData (aFunction);
-  Standard_Integer aType = aFunction->GetType();
-
-  TopoDS_Shape aShape;
-
-  // Getting data
-  double R       = aData.GetR();
-  double Ratio   = aData.GetRatio();
-  int    Pattern = aData.GetType();
-  
-  // Build reference disk (in the global coordinate system)
-  TopoDS_Shape aDisk;
-  
-  if (Pattern == SQUARE)
-    aDisk = MakeDiskSquare( R, Ratio );
-  else if (Pattern == HEXAGON)
-    aDisk = MakeDiskHexagon( R, Ratio );
-  
-  if (aType == DIVIDEDDISK_R_RATIO) 
-  { 
-    int theOrientation = aData.GetOrientation();        
-    aShape = TransformShape(aDisk, theOrientation);   
-  }
-  else if (aType == DIVIDEDDISK_R_VECTOR_PNT)
-  {
-    Handle(GEOM_Function) aRefPoint  = aData.GetCenter();
-    Handle(GEOM_Function) aRefVector = aData.GetVector();
-    TopoDS_Shape aShapePnt = aRefPoint->GetValue();
-    TopoDS_Shape aShapeVec = aRefVector->GetValue();
-    
-    if (aShapePnt.ShapeType() == TopAbs_VERTEX &&
-        aShapeVec.ShapeType() == TopAbs_EDGE) 
-    {
-      gp_Pnt aPnt = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt));
-      TopoDS_Edge anE = TopoDS::Edge(aShapeVec);
-      TopoDS_Vertex V1, V2;
-      TopExp::Vertices(anE, V1, V2, Standard_True);
-      if (!V1.IsNull() && !V2.IsNull()) 
-      {
-        gp_Vec aVec (BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2));
-        gp_Dir aDir(aVec);
-        aShape = TransformShape(aDisk, aPnt, aDir); 
-      }
-    }   
-  }
-
-  if (aShape.IsNull()) return 0;
-
-  aFunction->SetValue(aShape);
-
-  log.SetTouched(Label());
-
-  return 1;
-}
-
-
-//=======================================================================
-//function : MakeDiskHexagon
-//purpose  :
-//=======================================================================
-TopoDS_Shell GEOMImpl_DividedDiskDriver::MakeDiskHexagon(double R, double Ratio) const
-{
-  // Geometry
-  gp_Dir ZDir(0,0,1);
-  gp_Dir XDir(1,0,0);
-  gp_Pnt Orig(0,0,0);
-  
-  // Circle
-  gp_Ax1 Ax1(Orig,ZDir);
-  gp_Ax2 Ax(Orig,ZDir,XDir);
-  gp_Circ aCircle(Ax, R);
-  
-  // Points
-//   gp_Pnt P4(0.01*Ratio*R,0,0); 
-//   gp_Pnt P3(R,0,0);
-//   gp_Pnt P2 = P3.Rotated(Ax1,-M_PI/6.0);
-//   gp_Pnt P1(P4.X(), 
-//             P4.X()/sqrt(3.0),0);
-  gp_Pnt P1(0.01*Ratio*R*sqrt(3.0)/2,0,0);
-  gp_Pnt P2(R,0,0);
-  gp_Pnt P3 = P2.Rotated(Ax1,M_PI/6.0);
-  gp_Pnt P4(P1.X(), 
-            P1.X()/sqrt(3.0),0);
-
-  
-  //surfaces
-  gp_Ax2 anAx (gp::XOY());
-  Handle(Geom_Plane) aPlane = new Geom_Plane (anAx);
-  
-  // Topology
-  
-  // Vertices
-  TopoDS_Vertex O  = BRepBuilderAPI_MakeVertex(Orig);
-  TopoDS_Vertex V1_init = BRepBuilderAPI_MakeVertex(P1);
-  TopoDS_Vertex V2_init = BRepBuilderAPI_MakeVertex(P2);
-  TopoDS_Vertex V3 = BRepBuilderAPI_MakeVertex(P3);
-  TopoDS_Vertex V4 = BRepBuilderAPI_MakeVertex(P4);
-  
-  TopoDS_Vertex V1 = V1_init;
-  TopoDS_Vertex V2 = V2_init;
-  
-  //Rotation
-  gp_Trsf myTrsf;
-  myTrsf.SetRotation(Ax1, M_PI/3.0);
-  
-  BRepBuilderAPI_Transform xform(myTrsf);
-  xform.Perform(V1,Standard_True);
-  TopoDS_Vertex V1_60 = TopoDS::Vertex(xform.Shape()); 
-  xform.Perform(V2,Standard_True);
-  TopoDS_Vertex V2_60 = TopoDS::Vertex(xform.Shape());
-  
-  // Declaration of shapes (used in the loop) 
-  TopoDS_Edge E1, E2, E3, E4, E5, E6, E7, E8, E9;
-  TopoDS_Wire W1, W2, W3;
-  TopoDS_Face F1, F2, F3;   
-  TopoDS_Shell S;
-  
-  BRep_Builder aBuilder;
-  aBuilder.MakeShell(S);
-  
-  // Initialisation of edges
-  TopoDS_Edge E1_init = BRepBuilderAPI_MakeEdge(V1,TopoDS::Vertex(V2.Reversed()));
-  E1 = E1_init;
-  TopoDS_Edge E8_init = BRepBuilderAPI_MakeEdge(O,TopoDS::Vertex(V1.Reversed()));
-  E8 = E8_init;
-  
-  for (int i=1;i<=6;i++)
-  { 
-    // Edges
-    
-    // for Face1
-    E2 = BRepBuilderAPI_MakeEdge(aCircle, V2, TopoDS::Vertex(V3.Reversed())); 
-    E3 = BRepBuilderAPI_MakeEdge(V3,TopoDS::Vertex(V4.Reversed()));
-    E4 = BRepBuilderAPI_MakeEdge(V4,TopoDS::Vertex(V1.Reversed()));
-      
-    // for Face2
-    if (i==6)
-    {
-      E5 = BRepBuilderAPI_MakeEdge(aCircle, V3, TopoDS::Vertex(V2_init.Reversed()));
-      E7 = BRepBuilderAPI_MakeEdge(V1_init,TopoDS::Vertex(V4.Reversed()));
-    }
-    else
-    {
-      E5 = BRepBuilderAPI_MakeEdge(aCircle, V3, TopoDS::Vertex(V2_60.Reversed()));
-      E7 = BRepBuilderAPI_MakeEdge(V1_60,TopoDS::Vertex(V4.Reversed()));
-    }    
-    E6 = BRepBuilderAPI_MakeEdge(V2_60,TopoDS::Vertex(V1_60.Reversed()));
-    
-    // for Face3
-    E9 = BRepBuilderAPI_MakeEdge(V1_60,TopoDS::Vertex(O.Reversed()));
-    
-    
-    // Wires
-    
-    //Wire1
-    aBuilder.MakeWire(W1);
-    if (i==1)
-      aBuilder.Add(W1,E1);
-    else
-      aBuilder.Add(W1,TopoDS::Edge(E1.Reversed()));
-    aBuilder.Add(W1,E2);
-    aBuilder.Add(W1,E3);
-    aBuilder.Add(W1,E4);
-    
-    // Wire 2
-    aBuilder.MakeWire(W2);
-    aBuilder.Add(W2,TopoDS::Edge(E3.Reversed()));
-    aBuilder.Add(W2,E5);
-    if (i==6)
-      aBuilder.Add(W2,TopoDS::Edge(E1_init.Reversed()));
-    else
-      aBuilder.Add(W2,E6);
-    aBuilder.Add(W2,E7);
-    
-    // Wire3
-    aBuilder.MakeWire(W3);
-    if (i==1)
-      aBuilder.Add(W3,E8);
-    else 
-      aBuilder.Add(W3,TopoDS::Edge(E8.Reversed()));    
-    aBuilder.Add(W3,TopoDS::Edge(E4.Reversed()));
-    aBuilder.Add(W3,TopoDS::Edge(E7.Reversed()));
-    if (i==6)
-      aBuilder.Add(W3,TopoDS::Edge(E8_init.Reversed()));
-    else
-      aBuilder.Add(W3,E9);
-      
-    // Faces creation
-    F1 = BRepBuilderAPI_MakeFace(aPlane,W1);
-    F2 = BRepBuilderAPI_MakeFace(aPlane,W2);
-    F3 = BRepBuilderAPI_MakeFace(aPlane,W3);
-    
-    //Shell
-    aBuilder.Add(S, F1);
-    aBuilder.Add(S, F2);
-    aBuilder.Add(S, F3);
-          
-    // rotation
-    V1=V1_60;
-    V2=V2_60;
-    
-    xform.Perform(V1_60,Standard_True);
-    V1_60 = TopoDS::Vertex(xform.Shape());
-    xform.Perform(V2_60,Standard_True);
-    V2_60 = TopoDS::Vertex(xform.Shape());
-    xform.Perform(V3,Standard_True);
-    V3    = TopoDS::Vertex(xform.Shape());
-    xform.Perform(V4,Standard_True);
-    V4    = TopoDS::Vertex(xform.Shape());
-    
-    // "Increment" of edges
-    E1=E6;
-    E8=E9;         
-  }
-  
-  return S;
-}
-
-//=======================================================================
-//function : MakeDiskSquare
-//purpose  :
-//=======================================================================
-TopoDS_Shape GEOMImpl_DividedDiskDriver::MakeDiskSquare(double R, double Ratio) const
-{
-  // Geometry
-  gp_Dir ZDir(0,0,1);
-  gp_Dir XDir(1,0,0);
-  gp_Pnt Orig(0,0,0);
-  
-  // Circle
-  gp_Ax1 Ax1(Orig,ZDir);
-  gp_Ax2 Ax(Orig,ZDir,XDir);
-  gp_Circ aCircle(Ax, R);
-  
-  // Points
-  gp_Pnt P1(0.01*Ratio*R,0,0);
-  gp_Pnt P2(R,0,0);
-  
-  //surfaces
-  gp_Ax2 anAx (gp::XOY());
-  Handle(Geom_Plane) aPlane = new Geom_Plane (anAx);
-  
-  // Topology
-  
-  // Vertices
-  TopoDS_Vertex V1_init = BRepBuilderAPI_MakeVertex(P1);
-  TopoDS_Vertex V2_init = BRepBuilderAPI_MakeVertex(P2);
-  
-  TopoDS_Vertex V1 = V1_init;
-  TopoDS_Vertex V2 = V2_init;
-  
-  //Rotation
-  gp_Trsf myTrsf;
-  myTrsf.SetRotation(Ax1, M_PI/2);
-  
-  BRepBuilderAPI_Transform xform(myTrsf);
-  xform.Perform(V1,Standard_True);
-  TopoDS_Vertex V1_rotated = TopoDS::Vertex(xform.Shape()); 
-  xform.Perform(V2,Standard_True);
-  TopoDS_Vertex V2_rotated = TopoDS::Vertex(xform.Shape());
-  
-  // Declaration of shapes (used in the loop) 
-  TopoDS_Edge E1, E2, E3, E4;
-  TopoDS_Wire W1, W2;
-  TopoDS_Face F1, F2;   
-  TopoDS_Shell S;
-  
-  BRep_Builder aBuilder;
-  aBuilder.MakeWire(W2);  // Central Wire
-  aBuilder.MakeShell(S);  // Shell
-  
-  // Initialisation of edges
-  TopoDS_Edge E1_init = BRepBuilderAPI_MakeEdge(V1,TopoDS::Vertex(V2.Reversed()));
-  E1 = E1_init;
-  
-  for (int i=1;i<=4;i++)
-  { 
-    // Edges
-    // for Face1
-   
-    E3 = BRepBuilderAPI_MakeEdge(V2_rotated,TopoDS::Vertex(V1_rotated.Reversed()));
-    if (i == 4)
-    {
-      E2 = BRepBuilderAPI_MakeEdge(aCircle, V2, TopoDS::Vertex(V2_init.Reversed())); 
-      E4 = BRepBuilderAPI_MakeEdge(V1_init,TopoDS::Vertex(V1.Reversed()));
-    }
-    else
-    {
-      E2 = BRepBuilderAPI_MakeEdge(aCircle, V2, TopoDS::Vertex(V2_rotated.Reversed())); 
-      E4 = BRepBuilderAPI_MakeEdge(V1_rotated,TopoDS::Vertex(V1.Reversed()));
-    }
-    
-    // Wires
-    //Wire1
-    aBuilder.MakeWire(W1);
-    if (i==1)
-      aBuilder.Add(W1,E1);
-    else
-      aBuilder.Add(W1,TopoDS::Edge(E1.Reversed()));
-    aBuilder.Add(W1,E2);
-    if (i==4)
-      aBuilder.Add(W1,TopoDS::Edge(E1_init.Reversed()));
-    else
-      aBuilder.Add(W1,E3);
-    aBuilder.Add(W1,E4);
-    
-    // Wire central
-    aBuilder.Add(W2,TopoDS::Edge(E4.Reversed()));
-    
-    // Faces creation
-    F1 = BRepBuilderAPI_MakeFace(aPlane,W1);
-    
-    //Shell
-    aBuilder.Add(S, F1);
-    
-    // rotation
-    V1=V1_rotated;
-    V2=V2_rotated;
-    
-    xform.Perform(V1_rotated,Standard_True);
-    V1_rotated = TopoDS::Vertex(xform.Shape());
-    xform.Perform(V2_rotated,Standard_True);
-    V2_rotated = TopoDS::Vertex(xform.Shape());
-    
-    // "Increment" of edges
-    E1=E3;        
-  }
-  // Central square Face 
-  F2 = BRepBuilderAPI_MakeFace(aPlane,W2);
-  aBuilder.Add(S, F2);
-  
-  return S;
-}
-
-
-//=======================================================================
-//function :  TrasformShape(TopoDS_Shape aShape,int theOrientation)
-//purpose  :  Perform shape transformation accordingly with specified
-//            orientation
-//=======================================================================
-TopoDS_Shape GEOMImpl_DividedDiskDriver::TransformShape(TopoDS_Shape theShape, int theOrientation) const
-{
-  gp_Dir N, Vx;
-  gp_Pnt theOrigin = gp::Origin();
-  
-  switch(theOrientation)
-  {
-    case 1:
-    {
-      N = gp::DZ();
-      Vx = gp::DX();
-      break;
-    }
-    case 2:
-    {
-      N = gp::DX();
-      Vx = gp::DY();
-      break;
-    }
-    case 3:
-    {
-      N = gp::DY();
-      Vx = gp::DZ();
-      break;
-    }
-  }
-    
-  gp_Ax3 aWPlane = gp_Ax3(theOrigin, N, Vx);
-  
-  return WPlaneTransform(theShape, aWPlane);
-}
-
-//=======================================================================
-//function :  TrasformShape(TopoDS_Shape aShape, gp_Dir V, gp_Pnt P)
-//purpose  :  Perform shape transformation accordingly with specified
-//            pnt and direction
-//=======================================================================
-TopoDS_Shape GEOMImpl_DividedDiskDriver::TransformShape(TopoDS_Shape theShape, gp_Pnt P, gp_Dir V) const
-{
-  gp_Ax3 aWPlane( P, V );
-  return WPlaneTransform(theShape, aWPlane);
-}
-
-//=======================================================================
-//function :  WPlaneTransform
-//purpose  :  Perform shape transformation accordingly with the given 
-//            Working Plane  
-//=======================================================================
-TopoDS_Shape GEOMImpl_DividedDiskDriver::WPlaneTransform(TopoDS_Shape theShape, gp_Ax3 theWPlane) const
-{
-  gp_Trsf aTrans;
-  aTrans.SetTransformation(theWPlane);
-  aTrans.Invert();
-  BRepBuilderAPI_Transform aTransformation (theShape, aTrans, Standard_False);
-  return aTransformation.Shape();
-}
-
-//================================================================================
-/*!
- * \brief Returns a name of creation operation and names and values of creation parameters
- */
-//================================================================================
-
-bool GEOMImpl_DividedDiskDriver::
-GetCreationInformation(std::string&             theOperationName,
-                       std::vector<GEOM_Param>& theParams)
-{
-  if (Label().IsNull()) return 0;
-  Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
-
-  GEOMImpl_IDividedDisk aCI( function );
-  Standard_Integer aType = function->GetType();
-
-  theOperationName = "DIVIDEDDISK";
-
-  switch ( aType ) {
-  case DIVIDEDDISK_R_RATIO:
-    AddParam( theParams, "Radius", aCI.GetR() );
-    AddParam( theParams, "Ratio", aCI.GetRatio() );
-    AddParam( theParams, "Orientation", aCI.GetOrientation() );
-    AddParam( theParams, "Division pattern", aCI.GetType() );
-    break;
-  case DIVIDEDDISK_R_VECTOR_PNT:
-    AddParam( theParams, "Center Point", aCI.GetCenter() );
-    AddParam( theParams, "Vector", aCI.GetVector() );
-    AddParam( theParams, "Radius", aCI.GetR() );
-    AddParam( theParams, "Division pattern", aCI.GetType() );
-    break;
-  default:
-    return false;
-  }
-  
-  return true;
-}
-
-IMPLEMENT_STANDARD_HANDLE (GEOMImpl_DividedDiskDriver,GEOM_BaseDriver);
-IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_DividedDiskDriver,GEOM_BaseDriver);
diff --git a/src/AdvancedEngine/GEOMImpl_DividedDiskDriver.hxx b/src/AdvancedEngine/GEOMImpl_DividedDiskDriver.hxx
deleted file mode 100644 (file)
index 9b774c5..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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 _GEOMImpl_DividedDiskDriver_HXX
-#define _GEOMImpl_DividedDiskDriver_HXX
-
-#include <TFunction_Driver.hxx>
-
-class Handle_Standard_Type;
-class GEOMImpl_DividedDiskDriver;
-class TopoDS_Shape;
-class TopoDS_Shell;
-class gp_Pnt;
-class gp_Dir;
-class gp_Ax3;
-
-#include "GEOM_BaseDriver.hxx"
-
-DEFINE_STANDARD_HANDLE( GEOMImpl_DividedDiskDriver, GEOM_BaseDriver );
-
-class GEOMImpl_DividedDiskDriver : public GEOM_BaseDriver {
-public:
- // Methods PUBLIC
-  // 
-  Standard_EXPORT GEOMImpl_DividedDiskDriver();
-  Standard_EXPORT virtual  Standard_Integer Execute(TFunction_Logbook& log) const; 
-  Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {}
-  Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const
-  {
-    return Standard_True;
-  }
-  Standard_EXPORT static const Standard_GUID& GetID();
-  Standard_EXPORT ~GEOMImpl_DividedDiskDriver() {};
-  Standard_EXPORT virtual
-  bool GetCreationInformation(std::string&             theOperationName,
-                              std::vector<GEOM_Param>& params);
-private:
-  TopoDS_Shape TransformShape  (TopoDS_Shape aShape, int theOrientation) const;
-  TopoDS_Shape TransformShape  (TopoDS_Shape aShape, gp_Pnt P, gp_Dir V) const;
-  TopoDS_Shape WPlaneTransform (TopoDS_Shape aShape, gp_Ax3 theWPlane) const;
-  TopoDS_Shell MakeDiskHexagon (double R, double Ratio) const;
-  TopoDS_Shape MakeDiskSquare  (double R, double Ratio) const;
-
-  DEFINE_STANDARD_RTTI( GEOMImpl_DividedDiskDriver )
-};
-
-#endif // _GEOMImpl_DividedDiskDriver_HXX
diff --git a/src/AdvancedEngine/GEOMImpl_IAdvancedOperations.cxx b/src/AdvancedEngine/GEOMImpl_IAdvancedOperations.cxx
deleted file mode 100644 (file)
index a4b828c..0000000
+++ /dev/null
@@ -1,3486 +0,0 @@
-// 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, or (at your option) any 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   : GEOMImpl_IAdvancedOperations.cxx
-//  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
-
-#include "GEOMImpl_IAdvancedOperations.hxx"
-
-#include <Basics_OCCTVersion.hxx>
-
-#include <utilities.h>
-#include <OpUtil.hxx>
-#include <Utils_ExceptHandlers.hxx>
-
-#include "GEOM_Function.hxx"
-#include "GEOM_PythonDump.hxx"
-#include "GEOMUtils.hxx"
-#include "GEOMAlgo_Splitter.hxx"
-#include "GEOMAlgo_FinderShapeOn1.hxx"
-
-#include "GEOMImpl_Gen.hxx"
-#include "GEOMImpl_Types.hxx"
-
-#include "GEOMImpl_IBasicOperations.hxx"
-#include "GEOMImpl_IBooleanOperations.hxx"
-#include "GEOMImpl_IShapesOperations.hxx"
-#include "GEOMImpl_ITransformOperations.hxx"
-#include "GEOMImpl_IBlocksOperations.hxx"
-#include "GEOMImpl_I3DPrimOperations.hxx"
-#include "GEOMImpl_ILocalOperations.hxx"
-#include "GEOMImpl_IHealingOperations.hxx"
-#include "GEOMImpl_IGroupOperations.hxx"
-
-#include "GEOMImpl_GlueDriver.hxx"
-#include "GEOMImpl_PipeTShapeDriver.hxx"
-#include "GEOMImpl_IPipeTShape.hxx"
-#include "GEOMImpl_DividedDiskDriver.hxx"
-#include "GEOMImpl_IDividedDisk.hxx"
-#include <GEOMImpl_SmoothingSurfaceDriver.hxx>
-#include <GEOMImpl_ISmoothingSurface.hxx>
-/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
-
-#include <TDF_Tool.hxx>
-#include <TFunction_DriverTable.hxx>
-#include <TFunction_Driver.hxx>
-#include <TFunction_Logbook.hxx>
-#include <TNaming_CopyShape.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-#include <TopoDS.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TColStd_IndexedDataMapOfTransientTransient.hxx>
-
-#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
-
-#include <BRepAdaptor_Surface.hxx>
-#include <BRepAlgoAPI_Cut.hxx>
-#include <BRepAlgoAPI_Fuse.hxx>
-#include <BRepBuilderAPI_MakeFace.hxx>
-#include <BRepBuilderAPI_MakeVertex.hxx>
-#include <BRepBuilderAPI_Transform.hxx>
-#include <BRepPrimAPI_MakeCone.hxx>
-#include <BRepPrimAPI_MakeCylinder.hxx>
-
-#include <gp_Ax3.hxx>
-#include <gp_Pln.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Vec.hxx>
-#include <GC_MakeConicalSurface.hxx>
-#include <Geom_CylindricalSurface.hxx>
-
-#include <ShapeAnalysis_Edge.hxx>
-
-#include <cmath>
-
-#include "AdvancedEngine_Types.hxx"
-
-#include <Standard_Stream.hxx>
-#include <Standard_Failure.hxx>
-#include <StdFail_NotDone.hxx>
-#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
-
-#define HALF_LENGTH_MAIN_PIPE     "Main pipe half length" //"Tuyau principal - demi longueur"
-#define HALF_LENGTH_INCIDENT_PIPE "Incident pipe half length" //"Tuyau incident - demi longueur"
-#define CIRCULAR_QUARTER_PIPE     "Circular quarter of pipe" //"Circulaire - quart de tuyau"
-#define THICKNESS                 "Thickness" //"Epaisseur"
-#define FLANGE                    "Flange" // "Collerette"
-#define CHAMFER_OR_FILLET         "Chamfer or fillet" //"Chanfrein ou Raccord"
-#define JUNCTION_FACE_1           "Junction 1" //"Face de jonction 1"
-#define JUNCTION_FACE_2           "Junction 2" //"Face de jonction 2"
-#define JUNCTION_FACE_3           "Junction 3" //"Face de jonction 3"
-
-#define FIND_GROUPS_BY_POINTS 1
-
-//=============================================================================
-/*!
- *  Constructor
- */
-//=============================================================================
-GEOMImpl_IAdvancedOperations::GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID) :
-  GEOM_IOperations(theEngine, theDocID)
-{
-  MESSAGE("GEOMImpl_IAdvancedOperations::GEOMImpl_IAdvancedOperations");
-  myBasicOperations     = new GEOMImpl_IBasicOperations(GetEngine(), GetDocID());
-  myBooleanOperations   = new GEOMImpl_IBooleanOperations(GetEngine(), GetDocID());
-  myShapesOperations    = new GEOMImpl_IShapesOperations(GetEngine(), GetDocID());
-  myTransformOperations = new GEOMImpl_ITransformOperations(GetEngine(), GetDocID());
-  myBlocksOperations    = new GEOMImpl_IBlocksOperations(GetEngine(), GetDocID());
-  my3DPrimOperations    = new GEOMImpl_I3DPrimOperations(GetEngine(), GetDocID());
-  myLocalOperations     = new GEOMImpl_ILocalOperations(GetEngine(), GetDocID());
-  myHealingOperations   = new GEOMImpl_IHealingOperations(GetEngine(), GetDocID());
-  myGroupOperations     = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
-}
-
-//=============================================================================
-/*!
- *  Destructor
- */
-//=============================================================================
-GEOMImpl_IAdvancedOperations::~GEOMImpl_IAdvancedOperations()
-{
-  MESSAGE("GEOMImpl_IAdvancedOperations::~GEOMImpl_IAdvancedOperations");
-  delete myBasicOperations;
-  delete myBooleanOperations;
-  delete myShapesOperations;
-  delete myTransformOperations;
-  delete myBlocksOperations;
-  delete my3DPrimOperations;
-  delete myLocalOperations;
-  delete myHealingOperations;
-  delete myGroupOperations;
-}
-
-//=============================================================================
-/*!
- *  SetPosition
- */
-//=============================================================================
-gp_Trsf GEOMImpl_IAdvancedOperations::GetPositionTrsf(double theL1, double theL2,
-                                                      Handle(GEOM_Object) theP1,
-                                                      Handle(GEOM_Object) theP2,
-                                                      Handle(GEOM_Object) theP3)
-{
-  // Old Local Coordinates System oldLCS
-  gp_Pnt P0(0, 0, 0);
-  gp_Pnt P1(-theL1, 0, 0);
-  gp_Pnt P2(theL1, 0, 0);
-  gp_Pnt P3(0, 0, theL2);
-
-  gp_Dir oldX(gp_Vec(P1, P2));
-  gp_Dir oldZ(gp_Vec(P0, P3));
-  gp_Ax3 oldLCS(P0, oldZ, oldX);
-
-  // New Local Coordinates System newLCS
-  double LocX, LocY, LocZ;
-  gp_Pnt newP1 = BRep_Tool::Pnt(TopoDS::Vertex(theP1->GetValue()));
-  gp_Pnt newP2 = BRep_Tool::Pnt(TopoDS::Vertex(theP2->GetValue()));
-  gp_Pnt newP3 = BRep_Tool::Pnt(TopoDS::Vertex(theP3->GetValue()));
-  LocX = (newP1.X() + newP2.X()) / 2.;
-  LocY = (newP1.Y() + newP2.Y()) / 2.;
-  LocZ = (newP1.Z() + newP2.Z()) / 2.;
-  gp_Pnt newO(LocX, LocY, LocZ);
-
-  gp_Dir newX(gp_Vec(newP1, newP2)); // P1P2 Vector
-  gp_Dir newZ(gp_Vec(newO, newP3)); // OP3 Vector
-  gp_Ax3 newLCS = gp_Ax3(newO, newZ, newX);
-
-  gp_Trsf aTrsf;
-  aTrsf.SetDisplacement(oldLCS, newLCS);
-
-  return aTrsf;
-}
-
-//=============================================================================
-/*!
- *  CheckCompatiblePosition
- *
- */
-//=============================================================================
-bool GEOMImpl_IAdvancedOperations::CheckCompatiblePosition(double& theL1, double& theL2,
-                                                           Handle(GEOM_Object) theP1,
-                                                           Handle(GEOM_Object) theP2,
-                                                           Handle(GEOM_Object) theP3,
-                                                           double theTolerance)
-{
-  SetErrorCode(KO);
-  gp_Pnt P1 = BRep_Tool::Pnt(TopoDS::Vertex(theP1->GetValue()));
-  gp_Pnt P2 = BRep_Tool::Pnt(TopoDS::Vertex(theP2->GetValue()));
-  gp_Pnt P3 = BRep_Tool::Pnt(TopoDS::Vertex(theP3->GetValue()));
-
-  double d12 = P1.Distance(P2);
-  double d13 = P1.Distance(P3);
-  double d23 = P2.Distance(P3);
-  //    double d2 = newO.Distance(P3);
-
-  if (Abs(d12) <= Precision::Confusion()) {
-    SetErrorCode("Junctions points P1 and P2 are identical");
-    return false;
-  }
-  if (Abs(d13) <= Precision::Confusion()) {
-    SetErrorCode("Junctions points P1 and P3 are identical");
-    return false;
-  }
-  if (Abs(d23) <= Precision::Confusion()) {
-    SetErrorCode("Junctions points P2 and P3 are identical");
-    return false;
-  }
-
-
-  double newL1 = 0.5 * d12;
-  double newL2 = sqrt(pow(d13,2)-pow(newL1,2));
-  //
-  // theL1*(1-theTolerance) <= newL1 <= theL1*(1+theTolerance)
-  //
-  if (fabs(newL1 - theL1) > Precision::Approximation()) {
-    if ( (newL1 * (1 - theTolerance) -theL1 <= Precision::Approximation()) &&
-         (newL1 * (1 + theTolerance) -theL1 >= Precision::Approximation()) ) {
-      //            std::cerr << "theL1 = newL1" << std::endl;
-      theL1 = newL1;
-    } else {
-      theL1 = -1;
-      SetErrorCode("Dimension for main pipe (L1) is incompatible with new position");
-      return false;
-    }
-  }
-
-  //
-  // theL2*(1-theTolerance) <= newL2  <= theL2*(1+theTolerance)
-  //
-  if (fabs(newL2 - theL2) > Precision::Approximation()) {
-    if ( (newL2 * (1 - theTolerance) -theL2 <= Precision::Approximation()) &&
-         (newL2 * (1 + theTolerance) -theL2 >= Precision::Approximation()) ) {
-      theL2 = newL2;
-    } else {
-      theL2 = -1;
-      SetErrorCode("Dimension for incident pipe (L2) is incompatible with new position");
-      return false;
-    }
-  }
-
-  SetErrorCode(OK);
-  return true;
-
-}
-
-//=============================================================================
-/*!
- *  Generate the propagation groups of a Pipe T-Shape used for hexa mesh
- */
-//=============================================================================
-bool GEOMImpl_IAdvancedOperations::MakeGroups(Handle(GEOM_Object) theShape, int shapeType,
-                                              double theR1, double theW1, double theL1,
-                                              double theR2, double theW2, double theL2,
-                                              double theH, double theW, double theRF,
-                                              Handle(TColStd_HSequenceOfTransient) theSeq,
-                                              gp_Trsf aTrsf)
-{
-  SetErrorCode(KO);
-
-  if (theShape.IsNull()) return false;
-
-  TopoDS_Shape aShape = theShape->GetValue();
-  if (aShape.IsNull()) {
-    SetErrorCode("Shape is not defined");
-    return false;
-  }
-
-  gp_Trsf aTrsfInv = aTrsf.Inverted();
-
-//   int expectedGroups = 0;
-//   if (shapeType == TSHAPE_BASIC)
-//     if (Abs(theR2+theW2-theR1-theW1) <= Precision::Approximation())
-//       expectedGroups = 10;
-//     else
-//       expectedGroups = 11;
-//   else if (shapeType == TSHAPE_CHAMFER || shapeType == TSHAPE_FILLET)
-//     expectedGroups = 12;
-
-  double aR1Ext = theR1 + theW1;
-  double aR2Ext = theR2 + theW2;
-
-  /////////////////////////
-  //// Groups of Faces ////
-  /////////////////////////
-
-  //
-  // Comment the following lines when GetInPlace bug is solved
-  // == BEGIN
-  // Workaround of GetInPlace bug
-  // Create a bounding box that fits the shape
-  Handle(GEOM_Object) aBox = my3DPrimOperations->MakeBoxDXDYDZ(2*theL1, 2*aR1Ext, aR1Ext+theL2);
-  aBox->GetLastFunction()->SetDescription("");
-  myTransformOperations->TranslateDXDYDZ(aBox, -theL1, -aR1Ext, -aR1Ext);
-  aBox->GetLastFunction()->SetDescription("");
-  // Apply transformation to box
-  BRepBuilderAPI_Transform aTransformationBox(aBox->GetValue(), aTrsf, Standard_False);
-  TopoDS_Shape aBoxShapeTrsf = aTransformationBox.Shape();
-  aBox->GetLastFunction()->SetValue(aBoxShapeTrsf);
-
-  // Get the shell of the box
-  Handle(GEOM_Object) aShell = Handle(GEOM_Object)::DownCast
-    (myShapesOperations->MakeExplode(aBox, TopAbs_SHELL, true)->Value(1));
-  aBox->GetLastFunction()->SetDescription("");
-  aShell->GetLastFunction()->SetDescription("");
-  // Get the common shapes between shell and shape
-  Handle(GEOM_Object) aCommonCompound = myBooleanOperations->MakeBoolean
-                            (theShape, aShell, 1, Standard_False); // MakeCommon
-  if (aCommonCompound.IsNull()) {
-    SetErrorCode(myBooleanOperations->GetErrorCode());
-    return false;
-  }
-  aCommonCompound->GetLastFunction()->SetDescription("");
-  // Explode the faces of common shapes => 3 faces
-  Handle(TColStd_HSequenceOfTransient) aCommonFaces =
-    myShapesOperations->MakeExplode(aCommonCompound, TopAbs_FACE, true);
-  aCommonCompound->GetLastFunction()->SetDescription("");
-  std::list<Handle(GEOM_Object)> aCompoundOfFacesList;
-
-  for (int i=0 ; i<= aCommonFaces->Length()-4 ; i+=4) {
-    std::list<Handle(GEOM_Object)> aFacesList;
-    for (int j = 1 ; j <= 4 ; j++) {
-      Handle(GEOM_Object) aFace = Handle(GEOM_Object)::DownCast(aCommonFaces->Value(i+j)); // Junction faces
-      if (!aFace.IsNull()) {
-        aFace->GetLastFunction()->SetDescription("");
-        aFacesList.push_back(aFace);
-      }
-    }
-    Handle(GEOM_Object) aCompoundOfFaces = myShapesOperations->MakeCompound(aFacesList);
-    if (!aCompoundOfFaces.IsNull()) {
-      aCompoundOfFaces->GetLastFunction()->SetDescription("");
-      aCompoundOfFacesList.push_back(aCompoundOfFaces);
-    }
-  }
-
-  if (aCompoundOfFacesList.size() == 3) {
-    Handle(GEOM_Object) aPln1 = aCompoundOfFacesList.front();
-    aCompoundOfFacesList.pop_front();
-    Handle(GEOM_Object) aPln2 = aCompoundOfFacesList.front();
-    aCompoundOfFacesList.pop_front();
-    Handle(GEOM_Object) aPln3 = aCompoundOfFacesList.front();
-    aCompoundOfFacesList.pop_front();
-    // == END
-    //
-
-
-    //     Uncomment the following lines when GetInPlace bug is solved
-    //     == BEGIN
-//     Handle(GEOM_Object) aP1 = myBasicOperations->MakePointXYZ(-theL1, 0, 0);
-//     Handle(GEOM_Object) aP2 = myBasicOperations->MakePointXYZ(-0, 0, theL2);
-//     Handle(GEOM_Object) aP3 = myBasicOperations->MakePointXYZ(theL1, 0, 0);
-//     aP1->GetLastFunction()->SetDescription("");
-//     aP2->GetLastFunction()->SetDescription("");
-//     aP3->GetLastFunction()->SetDescription("");
-//     Handle(GEOM_Object) aV1 = myBasicOperations->MakeVectorDXDYDZ(-1, 0, 0);
-//     Handle(GEOM_Object) aV2 = myBasicOperations->MakeVectorDXDYDZ(0, 0, 1);
-//     Handle(GEOM_Object) aV3 = myBasicOperations->MakeVectorDXDYDZ(1, 0, 0);
-//     aV1->GetLastFunction()->SetDescription("");
-//     aV2->GetLastFunction()->SetDescription("");
-//     aV3->GetLastFunction()->SetDescription("");
-//     Handle(GEOM_Object) aPln1 = myBasicOperations->MakePlanePntVec(aP1, aV1, 2*(aR1Ext+theL2));
-//     Handle(GEOM_Object) aPln2 = myBasicOperations->MakePlanePntVec(aP2, aV2, 2*(aR2Ext));
-//     Handle(GEOM_Object) aPln3 = myBasicOperations->MakePlanePntVec(aP3, aV3, 2*(aR1Ext+theL2));
-//     aPln1->GetLastFunction()->SetDescription("");
-//     aPln2->GetLastFunction()->SetDescription("");
-//     aPln3->GetLastFunction()->SetDescription("");
-//
-//     BRepBuilderAPI_Transform aTransformation1(aPln1->GetValue(), aTrsf, Standard_False);
-//     TopoDS_Shape aTrsf_Shape1 = aTransformation1.Shape();
-//     aPln1->GetLastFunction()->SetValue(aTrsf_Shape1);
-//     BRepBuilderAPI_Transform aTransformation2(aPln2->GetValue(), aTrsf, Standard_False);
-//     TopoDS_Shape aTrsf_Shape2 = aTransformation2.Shape();
-//     aPln2->GetLastFunction()->SetValue(aTrsf_Shape2);
-//     BRepBuilderAPI_Transform aTransformation3(aPln3->GetValue(), aTrsf, Standard_False);
-//     TopoDS_Shape aTrsf_Shape3 = aTransformation3.Shape();
-//     aPln3->GetLastFunction()->SetValue(aTrsf_Shape3);
-    //     == END
-    //
-
-    Handle(GEOM_Object) junctionFaces1 = myShapesOperations->GetInPlace(theShape, aPln1);
-    if (junctionFaces1.IsNull())
-      junctionFaces1 = myShapesOperations->GetShapesOnShapeAsCompound
-        (aPln1, theShape, TopAbs_FACE,  GEOMAlgo_ST_ONIN);
-    if (!junctionFaces1.IsNull()) {
-      junctionFaces1->GetLastFunction()->SetDescription("");
-      junctionFaces1->SetName("JUNCTION_FACE_1");
-      theSeq->Append(junctionFaces1);
-    }
-    else {
-      SetErrorCode("Junction face 1 not found");
-      //        theSeq->Append(aPln1);
-      //        return false;
-    }
-    Handle(GEOM_Object) junctionFaces2 = myShapesOperations->GetInPlace(theShape, aPln2);
-    if (junctionFaces2.IsNull())
-      junctionFaces2 = myShapesOperations->GetShapesOnShapeAsCompound
-        (aPln2, theShape, TopAbs_FACE,  GEOMAlgo_ST_ONIN);
-    if (!junctionFaces2.IsNull()) {
-      junctionFaces2->GetLastFunction()->SetDescription("");
-      junctionFaces2->SetName("JUNCTION_FACE_2");
-      theSeq->Append(junctionFaces2);
-    }
-    else {
-      SetErrorCode("Junction face 2 not found");
-      //        theSeq->Append(aPln2);
-      //        return false;
-    }
-    Handle(GEOM_Object) junctionFaces3 = myShapesOperations->GetInPlace(theShape, aPln3);
-    if (junctionFaces3.IsNull())
-      junctionFaces3 = myShapesOperations->GetShapesOnShapeAsCompound
-        (aPln3, theShape, TopAbs_FACE,  GEOMAlgo_ST_ONIN);
-    if (!junctionFaces3.IsNull()) {
-      junctionFaces3->GetLastFunction()->SetDescription("");
-      junctionFaces3->SetName("JUNCTION_FACE_3");
-      theSeq->Append(junctionFaces3);
-    }
-    else {
-      SetErrorCode("Junction face 3 not found");
-      //        theSeq->Append(aPln3);
-      //        return false;
-    }
-  // Comment the following lines when GetInPlace bug is solved
-  // == BEGIN
-  }
-  //     == END
-
-  /////////////////////////
-  //// Groups of Edges ////
-  /////////////////////////
-  // Result of propagate
-
-  Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
-
-  TCollection_AsciiString theDesc = aFunction->GetDescription();
-  Handle(TColStd_HSequenceOfTransient) aSeqPropagate = myBlocksOperations->Propagate(theShape);
-  if (aSeqPropagate.IsNull() || aSeqPropagate->Length() == 0) {
-    SetErrorCode("Propagation groups not found");
-    return false;
-  }
-  Standard_Integer aNbGroups = aSeqPropagate->Length();
-  // Recover previous description to get rid of Propagate dump
-  aFunction->SetDescription(theDesc);
-
-#ifdef FIND_GROUPS_BY_POINTS
-  // BEGIN: new groups search
-
-  //              W2  R2
-  //            .----.-----.----.
-  //           e|    |  |  |    |
-  //            |    |  |  |    |
-  //            .    |  |  |    .
-  //         g / ''..|  |  |..'' \
-  //       f  /      '''''''      \
-  //  .---.--'..     |  |  |     ..'--.---.
-  //  |a    \   '''...........'''   /     |
-  //  |-------\------'  |  '------/-------.
-  //  |         \       |       /         |
-  // c|           \     |     /           |
-  //  |    R1       \   |   /             |
-  //  |               \ | /               |
-  //  ._________________|_________________.
-  //  |       L1        |                 |
-  //  |                 |                 |
-  //  |                 |                 |
-  // b|                 |                 |
-  //  |                 |                 |
-  //  |-----------------|-----------------|
-  //  |    W1           |                 |
-  //  '-----------------'-----------------'
-  //          d
-
-  // "Thickness" group (a)
-  gp_Pnt aPntA (-theL1, 0, theR1 + theW1/2.);
-  aPntA.Transform(aTrsf);
-  BRepBuilderAPI_MakeVertex mkVertexA (aPntA);
-  TopoDS_Vertex aVertA = TopoDS::Vertex(mkVertexA.Shape());
-  TopoDS_Shape anEdgeA = GEOMUtils::GetEdgeNearPoint(aShape, aVertA);
-
-  // "Circular quarter of pipe" group (b)
-  gp_Pnt aPntB (-theL1, -aR1Ext * sin(M_PI/4.), -aR1Ext * sin(M_PI/4.));
-  aPntB.Transform(aTrsf);
-  BRepBuilderAPI_MakeVertex mkVertexB (aPntB);
-  TopoDS_Vertex aVertB = TopoDS::Vertex(mkVertexB.Shape());
-  TopoDS_Shape anEdgeB = GEOMUtils::GetEdgeNearPoint(aShape, aVertB);
-
-  // "Circular quarter of pipe" group (c)
-  gp_Pnt aPntC (-theL1, -aR1Ext * sin(M_PI/4.), aR1Ext * sin(M_PI/4.));
-  aPntC.Transform(aTrsf);
-  BRepBuilderAPI_MakeVertex mkVertexC (aPntC);
-  TopoDS_Vertex aVertC = TopoDS::Vertex(mkVertexC.Shape());
-  TopoDS_Shape anEdgeC = GEOMUtils::GetEdgeNearPoint(aShape, aVertC);
-
-  // "Main pipe half length" group (d)
-  gp_Pnt aPntD (-theL1/2., 0, -aR1Ext);
-  aPntD.Transform(aTrsf);
-  BRepBuilderAPI_MakeVertex mkVertexD (aPntD);
-  TopoDS_Vertex aVertD = TopoDS::Vertex(mkVertexD.Shape());
-  TopoDS_Shape anEdgeD = GEOMUtils::GetEdgeNearPoint(aShape, aVertD);
-
-  // "Incident pipe half length" group (e)
-  double aTol10 = Precision::Confusion() * 10.;
-  gp_Pnt aPntE (-aR2Ext, 0, theL2 - aTol10);
-  aPntE.Transform(aTrsf);
-  BRepBuilderAPI_MakeVertex mkVertexE (aPntE);
-  TopoDS_Vertex aVertE = TopoDS::Vertex(mkVertexE.Shape());
-  TopoDS_Shape anEdgeE = GEOMUtils::GetEdgeNearPoint(aShape, aVertE);
-
-  // "Flange" group (f)
-  double aFx = - aR2Ext - aTol10;
-  if (shapeType == TSHAPE_CHAMFER)
-    aFx -= theW;
-  else if (shapeType == TSHAPE_FILLET)
-    aFx -= theRF;
-  gp_Pnt aPntF (aFx, 0, aR1Ext);
-  aPntF.Transform(aTrsf);
-  BRepBuilderAPI_MakeVertex mkVertexF (aPntF);
-  TopoDS_Vertex aVertF = TopoDS::Vertex(mkVertexF.Shape());
-  TopoDS_Shape anEdgeF = GEOMUtils::GetEdgeNearPoint(aShape, aVertF);
-
-  // "Chamfer or Fillet" group (g)
-  TopoDS_Shape anEdgeG;
-  if (shapeType == TSHAPE_CHAMFER) {
-    gp_Pnt aPntG (-aR2Ext - theW/2., 0, aR1Ext + theH/2.);
-    aPntG.Transform(aTrsf);
-    BRepBuilderAPI_MakeVertex mkVertexG (aPntG);
-    TopoDS_Vertex aVertG = TopoDS::Vertex(mkVertexG.Shape());
-    anEdgeG = GEOMUtils::GetEdgeNearPoint(aShape, aVertG);
-  }
-  else if (shapeType == TSHAPE_FILLET) {
-    gp_Pnt aPntG (-aR2Ext - theRF/2., 0, aR1Ext + theRF/2.);
-    aPntG.Transform(aTrsf);
-    BRepBuilderAPI_MakeVertex mkVertexG (aPntG);
-    TopoDS_Vertex aVertG = TopoDS::Vertex(mkVertexG.Shape());
-    anEdgeG = GEOMUtils::GetEdgeNearPoint(aShape, aVertG);
-  }
-
-  for (int i = 1 ; i <= aNbGroups; i++) {
-    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(i));
-    if (aGroup.IsNull())
-      continue;
-
-    TopoDS_Shape aGroupShape = aGroup->GetValue();
-    TopTools_IndexedMapOfShape anEdgesMap;
-    TopExp::MapShapes(aGroupShape, TopAbs_EDGE, anEdgesMap);
-
-    if (anEdgesMap.Contains(anEdgeA)) { // a
-      aGroup->SetName("THICKNESS");
-      theSeq->Append(aGroup);
-    }
-    else if (anEdgesMap.Contains(anEdgeB)) { // b
-      aGroup->SetName("CIRCULAR_QUARTER_PIPE");
-      theSeq->Append(aGroup);
-    }
-    else if (anEdgesMap.Contains(anEdgeC)) { // c
-      aGroup->SetName("CIRCULAR_QUARTER_PIPE");
-      theSeq->Append(aGroup);
-    }
-    else if (anEdgesMap.Contains(anEdgeD)) { // d
-      aGroup->SetName("HALF_LENGTH_MAIN_PIPE");
-      theSeq->Append(aGroup);
-    }
-    else if (anEdgesMap.Contains(anEdgeE)) { // e
-      aGroup->SetName("HALF_LENGTH_INCIDENT_PIPE");
-      theSeq->Append(aGroup);
-    }
-    else if (anEdgesMap.Contains(anEdgeF)) { // f
-      aGroup->SetName("FLANGE");
-      theSeq->Append(aGroup);
-    }
-    else if (shapeType == TSHAPE_CHAMFER) { // g
-      if (anEdgesMap.Contains(anEdgeG)) {
-        aGroup->SetName("CHAMFER");
-        theSeq->Append(aGroup);
-      }
-    }
-    else if (shapeType == TSHAPE_FILLET) { // g
-      if (anEdgesMap.Contains(anEdgeG)) {
-        aGroup->SetName("FILLET");
-        theSeq->Append(aGroup);
-      }
-    }
-    else {
-    }
-  }
-  // END: new groups search
-#else
-  bool addGroup;
-  bool circularFoundAndAdded = false;
-  bool circularFound10 = false;
-  bool incidentPipeFound = false;
-  bool mainPipeFound = false;
-  bool mainPipeFoundAndAdded = false;
-  bool radialFound =false;
-  bool flangeFound = false;
-  bool flangeFoundAndAdded = false;
-  bool chamferOrFilletFound = false;
-
-  for (int i = 1 ; i <= aNbGroups; i++) {
-    addGroup = false;
-
-    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(i));
-    if (aGroup.IsNull())
-      continue;
-
-    TopoDS_Shape aGroupShape = aGroup->GetValue();
-    BRepBuilderAPI_Transform aTransformationShapeInv (aGroupShape, aTrsfInv, Standard_False);
-    TopoDS_Shape aGroupShapeTrsfInv = aTransformationShapeInv.Shape();
-
-    TopTools_IndexedMapOfShape anEdgesMap;
-    TopExp::MapShapes(aGroupShapeTrsfInv,TopAbs_EDGE, anEdgesMap);
-    Standard_Integer nbEdges = anEdgesMap.Extent();
-
-    if (shapeType == TSHAPE_BASIC) {
-      if ((nbEdges >= 21) || /*R1Ext = R2Ext*/(nbEdges == 17)) { // 17, 17+8*{1,2,3}, 21, 21+8*{1,2,3}
-        addGroup = true;
-        aGroup->SetName("THICKNESS");
-      }
-      else if (nbEdges == 6) {
-        if (!circularFoundAndAdded) {
-          circularFoundAndAdded = true;
-          addGroup = true;
-          aGroup->SetName("CIRCULAR_QUARTER_PIPE");
-        }
-      }
-      else if (nbEdges == 8) {
-        incidentPipeFound = true;
-        mainPipeFound = false;
-        radialFound = false;
-        flangeFound = false;
-
-        TopExp_Explorer Ex(aGroupShapeTrsfInv,TopAbs_VERTEX);
-        while (Ex.More()) {
-          gp_Pnt aP =  BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
-          double x=aP.X(), y=aP.Y(), z=aP.Z();
-
-
-          if ((Abs(x) > aR2Ext + Precision::Confusion()) ||
-              (Abs(y) > aR2Ext + Precision::Confusion())) {
-            incidentPipeFound = false;
-          }
-
-          if ( z < -Precision::Confusion()) {
-            // length of main pipe
-            mainPipeFound = true;
-            if (!mainPipeFoundAndAdded) {
-              mainPipeFoundAndAdded = true;
-              addGroup = true;
-              aGroup->SetName("HALF_LENGTH_MAIN_PIPE");
-            }
-          }
-
-          else if (Abs(x) > (theL1-Precision::Confusion())) {
-            // discretisation circulaire
-            radialFound = true;
-            if (!circularFoundAndAdded) {
-              circularFoundAndAdded = true;
-              addGroup = true;
-              aGroup->SetName("CIRCULAR_QUARTER_PIPE");
-            }
-          }
-          Ex.Next();
-        }
-        if (incidentPipeFound) {
-          addGroup = true;
-          aGroup->SetName("HALF_LENGTH_INCIDENT_PIPE");
-        }
-        if (!addGroup && (!incidentPipeFound &&
-                          !radialFound &&
-                          !mainPipeFound &&
-                          !flangeFound)) {
-          // Flange (collerette)
-          flangeFound = true;
-          addGroup = true;
-          aGroup->SetName("FLANGE");
-        }
-      }
-      else
-        continue;
-    }
-    else if (shapeType == TSHAPE_CHAMFER || shapeType == TSHAPE_FILLET) {
-      if (nbEdges >= 25) { // 25, 25+8, 25+16, 25+24
-        addGroup = true;
-        aGroup->SetName("THICKNESS");
-      }
-      else if ((nbEdges == 10) || (nbEdges == 6)) {
-        if (!circularFoundAndAdded) {
-          addGroup = true;
-          circularFoundAndAdded = true;
-          aGroup->SetName("CIRCULAR_QUARTER_PIPE");
-          if (nbEdges == 10) {
-            circularFound10 = true;
-          }
-        }
-        else if (!circularFound10 && nbEdges == 10) {
-          circularFound10 = true;
-          addGroup = true;
-          aGroup->SetName("CIRCULAR_QUARTER_PIPE");
-        }
-      }
-      else if (nbEdges == 8) {
-        incidentPipeFound = true;
-        mainPipeFound = true;
-        flangeFound = false;
-
-        bool isNearZ0 = false;
-        bool isBelowZ0 = false;
-
-        TopExp_Explorer Ex (aGroupShapeTrsfInv,TopAbs_VERTEX);
-        while (Ex.More()) {
-          gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
-          double x=aP.X(), y=aP.Y(), z=aP.Z();
-
-          // tuy_princ_long_avant & tuy_princ_long_apres
-          //bool isMain = (((z < Precision::Confusion()) || (x < Precision::Confusion())) &&
-          //               ((y <= aR1Ext + Precision::Confusion()) ||
-          //                (y <= -(aR1Ext + Precision::Confusion())) ||
-          //                (y <= theR1 + Precision::Confusion()) ||
-          //                (y == -(theR1 + Precision::Confusion()))));
-          bool isMain = ((z < Precision::Confusion() || x < Precision::Confusion()) &&
-                         (fabs(y) > theR1 - Precision::Confusion() ||
-                          fabs(y) < Precision::Confusion()));
-
-          if (!isMain) {
-            mainPipeFound = false;
-          }
-
-          // collerette
-          //if (z < Precision::Confusion() && !isMain) {
-          //  flangeFound = true;
-          //  if (!flangeFoundAndAdded) {
-          //    flangeFoundAndAdded = true;
-          //    addGroup = true;
-          //    aGroup->SetName("FLANGE");
-          //  }
-          //}
-          if (fabs(z) < Precision::Confusion()) isNearZ0 = true;
-          if (z < - Precision::Confusion()) isBelowZ0 = true;
-
-          // tuyau incident
-          if ((Abs(x) > aR2Ext + Precision::Confusion()) ||
-              (Abs(y) > aR2Ext + Precision::Confusion())) {
-            incidentPipeFound = false;
-          }
-          Ex.Next();
-        }
-        if (mainPipeFound) {
-          addGroup = true;
-          aGroup->SetName("HALF_LENGTH_MAIN_PIPE");
-        }
-        if (incidentPipeFound) {
-          addGroup = true;
-          aGroup->SetName("HALF_LENGTH_INCIDENT_PIPE");
-        }
-        if (isNearZ0 && !isBelowZ0) {
-          flangeFound = true;
-          if (!flangeFoundAndAdded) {
-            flangeFoundAndAdded = true;
-            addGroup = true;
-            aGroup->SetName("FLANGE");
-          }
-        }
-        if (!addGroup && (!incidentPipeFound &&
-                          !mainPipeFound &&
-                          !flangeFound &&
-                          !chamferOrFilletFound)) {
-          addGroup = true;
-          chamferOrFilletFound = true;
-          if (shapeType == TSHAPE_CHAMFER)
-            aGroup->SetName("CHAMFER");
-          else
-            aGroup->SetName("FILLET");
-        }
-      }
-      else
-        continue;
-    }
-    // Add group to the list
-    if (addGroup)
-      theSeq->Append(aGroup);
-  }
-#endif
-
-  SetErrorCode(OK);
-  return true;
-}
-
-//=============================================================================
-/*!
- *  Return faces that are laying on surface.
- */
-//=============================================================================
-bool GEOMImpl_IAdvancedOperations::GetFacesOnSurf
-                     (const TopoDS_Shape &theShape,
-                      const Handle_Geom_Surface& theSurface,
-                      const Standard_Real theTolerance,
-                      TopTools_ListOfShape &theFaces)
-{
-  GEOMAlgo_FinderShapeOn1 aFinder;
-
-  aFinder.SetShape(theShape);
-  aFinder.SetTolerance(theTolerance);
-  aFinder.SetSurface(theSurface);
-  aFinder.SetShapeType(TopAbs_FACE);
-  aFinder.SetState(GEOMAlgo_ST_ON);
-
-  // Sets the minimal number of inner points for the faces that do not have own
-  // inner points at all (for e.g. rectangular planar faces have just 2 triangles).
-  // Default value=3
-  aFinder.SetNbPntsMin(3);
-  // Sets the maximal number of inner points for edges or faces.
-  // It is usefull for the cases when this number is very big (e.g =2000) to improve
-  // the performance. If this value =0, all inner points will be taken into account.
-  // Default value=0
-  aFinder.SetNbPntsMax(100);
-  aFinder.Perform();
-
-  // Interprete results
-  Standard_Integer iErr = aFinder.ErrorStatus();
-  // the detailed description of error codes is in GEOMAlgo_FinderShapeOn1.cxx
-  if (iErr) {
-    MESSAGE(" iErr : " << iErr);
-    TCollection_AsciiString aMsg (" iErr : ");
-    aMsg += TCollection_AsciiString(iErr);
-    SetErrorCode(aMsg);
-    return false;
-  }
-  Standard_Integer iWrn = aFinder.WarningStatus();
-  // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn1.cxx
-  if (iWrn) {
-    MESSAGE(" *** iWrn : " << iWrn);
-  }
-
-  const TopTools_ListOfShape &aListRes = aFinder.Shapes(); // the result
-  TopTools_ListIteratorOfListOfShape anIter (aListRes);
-
-  for (; anIter.More(); anIter.Next()) {
-    theFaces.Append(anIter.Value());
-  }
-
-  return true;
-}
-
-//=============================================================================
-/*!
- *  Creates and returns conical face.
- */
-//=============================================================================
-TopoDS_Shape GEOMImpl_IAdvancedOperations::MakeConicalFace
-                                  (const gp_Ax2 &theAxis,
-                                   const double theRadius,
-                                   const double theRadiusThin,
-                                   const double theHeight,
-                                   const gp_Trsf &theTrsf)
-{
-  BRepPrimAPI_MakeCone aMkCone (theAxis, theRadius, theRadiusThin, theHeight);
-  TopoDS_Shape aResult;
-  
-  aMkCone.Build();
-  if (aMkCone.IsDone()) {
-    TopExp_Explorer anExp(aMkCone.Shape(), TopAbs_FACE);
-
-    for (; anExp.More(); anExp.Next()) {
-      TopoDS_Face aFace = TopoDS::Face(anExp.Current());
-
-      if (aFace.IsNull() == Standard_False) {
-        BRepAdaptor_Surface anAdaptor(aFace, Standard_False);
-
-        if (anAdaptor.GetType() == GeomAbs_Cone) {
-          // This is a conical face. Transform and return it.
-          BRepBuilderAPI_Transform aTransf(aFace, theTrsf, Standard_False);
-          
-          aResult = aTransf.Shape();
-          break;
-        }
-      }
-    }
-  }
-
-  return aResult;
-}
-
-//=============================================================================
-/*!
- *  Generate the internal group of a Pipe T-Shape
- */
-//=============================================================================
-bool GEOMImpl_IAdvancedOperations::MakeInternalGroup
-                      (const Handle(GEOM_Object) &theShape,
-                       const double theR1, const double theLen1,
-                       const double theR2, const double theLen2,
-                       const double theRL, double theTransLenL,
-                       const double theRR, double theTransLenR,
-                       const double theRI, double theTransLenI,
-                       const Handle(TColStd_HSequenceOfTransient) &theSeq,
-                       const gp_Trsf &theTrsf)
-{
-  SetErrorCode(KO);
-
-  if (theShape.IsNull()) {
-    return false;
-  }
-
-  TopoDS_Shape aShape = theShape->GetValue();
-
-  if (aShape.IsNull()) {
-    SetErrorCode("Shape is not defined");
-    return false;
-  }
-
-  // Compute tolerance
-  Standard_Real aMaxTol = -RealLast();
-  TopExp_Explorer anExp(aShape, TopAbs_VERTEX);
-
-  for (; anExp.More(); anExp.Next()) {
-    TopoDS_Vertex aVertex = TopoDS::Vertex(anExp.Current());
-
-    if (aVertex.IsNull() == Standard_False) {
-      const Standard_Real aTol = BRep_Tool::Tolerance(aVertex);
-
-      if (aTol > aMaxTol) {
-        aMaxTol = aTol;
-      }
-    }
-  }
-
-  // Construct internal surfaces.
-  Standard_Integer i = 0;
-  const Standard_Integer aMaxNbSurf = 5;
-  Handle(Geom_Surface) aSurface[aMaxNbSurf];
-  TopTools_ListOfShape aConicalFaces;
-  Standard_Real aTolConf = Precision::Confusion();
-
-  // 1. Construct the internal surface of main pipe.
-  gp_Ax2 anAxis1 (gp::Origin(), gp::DX(), gp::DZ());
-  gp_Ax2 anAxis2 (gp::Origin(), gp::DZ(), gp::DX());
-
-  aSurface[i++] = new Geom_CylindricalSurface(anAxis1, theR1);
-
-  // 2. Construct the internal surface of incident pipe.
-  aSurface[i++] = new Geom_CylindricalSurface(anAxis2, theR2);
-
-  // 3. Construct the internal surface of left reduction pipe.
-  if (theRL > aTolConf) {
-    aSurface[i++] = new Geom_CylindricalSurface(anAxis1, theRL);
-
-    if (theTransLenL > aTolConf) {
-      // 3.1. Construct the internal surface of left transition pipe.
-      gp_Pnt aPLeft (-theLen1, 0., 0.);
-      gp_Ax2 anAxisLeft (aPLeft, -gp::DX(), gp::DZ());
-      TopoDS_Shape aConeLeft =
-        MakeConicalFace(anAxisLeft, theR1, theRL, theTransLenL, theTrsf);
-
-      if (aConeLeft.IsNull() == Standard_False) {
-        aConicalFaces.Append(aConeLeft);
-      }
-    }
-  }
-
-  // 4. Construct the internal surface of right reduction pipe.
-  if (theRR > aTolConf) {
-    // There is no need to construct another cylinder of the same radius. Skip it.
-    if (Abs(theRR - theRL) > aTolConf) {
-      aSurface[i++] = new Geom_CylindricalSurface(anAxis1, theRR);
-    }
-
-    if (theTransLenL > aTolConf) {
-      // 4.1. Construct the internal surface of right transition pipe.
-      gp_Pnt aPRight (theLen1, 0., 0.);
-      gp_Ax2 anAxisRight (aPRight, gp::DX(), gp::DZ());
-      TopoDS_Shape aConeRight =
-        MakeConicalFace(anAxisRight, theR1, theRR, theTransLenR, theTrsf);
-
-      if (aConeRight.IsNull() == Standard_False) {
-        aConicalFaces.Append(aConeRight);
-      }
-    }
-  }
-
-  // 5. Construct the internal surface of incident reduction pipe.
-  if (theRI > aTolConf) {
-    aSurface[i++] = new Geom_CylindricalSurface(anAxis2, theRI);
-
-    if (theTransLenI > aTolConf) {
-      // 5.1. Construct the internal surface of incident transition pipe.
-      gp_Pnt aPInci (0., 0., theLen2);
-      gp_Ax2 anAxisInci (aPInci, gp::DZ(), gp::DX());
-      TopoDS_Shape aConeInci =
-        MakeConicalFace(anAxisInci, theR2, theRI, theTransLenI, theTrsf);
-
-      if (aConeInci.IsNull() == Standard_False) {
-        aConicalFaces.Append(aConeInci);
-      }
-    }
-  }
-
-  // Get faces that are laying on cylindrical surfaces.
-  TopTools_ListOfShape aFaces;
-  gp_Trsf anInvTrsf = theTrsf.Inverted();
-
-  for (i = 0; i < aMaxNbSurf; i++) {
-    if (aSurface[i].IsNull()) {
-      break;
-    }
-
-    aSurface[i]->Transform(theTrsf);
-
-    TopTools_ListOfShape aLocalFaces;
-
-    if (!GetFacesOnSurf(aShape, aSurface[i], aMaxTol, aLocalFaces)) {
-      return false;
-    }
-
-    if (i < 2) {
-      // Check if the result contains outer cylinders.
-      // It is required for main and incident pipes.
-      TopTools_ListIteratorOfListOfShape anIter(aLocalFaces);
-
-      while (anIter.More()) {
-        TopExp_Explorer anExp(anIter.Value(), TopAbs_VERTEX);
-        Standard_Boolean isInside = Standard_False;
-
-        // Get a vertex from this shape
-        if (anExp.More()) {
-          TopoDS_Vertex aVtx = TopoDS::Vertex(anExp.Current());
-
-          if (aVtx.IsNull() == Standard_False) {
-            gp_Pnt aPnt = BRep_Tool::Pnt(aVtx);
-
-            aPnt.Transform(anInvTrsf);
-
-            if (i == 0) {
-              // Check if the point is inside the main pipe.
-              isInside = (Abs(aPnt.X()) <= theLen1);
-            } else { // i == 1
-              // Check if the point is inside the incident pipe.
-              isInside = (aPnt.Z() <= theLen2);
-            }
-          }
-        }
-
-        if (isInside) {
-          // Keep this face.
-          anIter.Next();
-        } else {
-          // Remove this face.
-          aLocalFaces.Remove(anIter);
-        }
-      }
-    }
-
-    aFaces.Append(aLocalFaces);
-  }
-
-  // Get faces that are laying on conical faces.
-  if (aConicalFaces.IsEmpty() == Standard_False) {
-    Handle(GEOM_Object) aCone =
-      GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
-    Handle(GEOM_Function) aFunction =
-      aCone->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
-    TopTools_ListIteratorOfListOfShape aFIter(aConicalFaces);
-    Handle(GEOM_Object) aConeFromShape;
-
-    for (; aFIter.More(); aFIter.Next()) {
-      aFunction->SetValue(aFIter.Value());
-      aConeFromShape = myShapesOperations->GetInPlace(theShape, aCone);
-
-      if (aConeFromShape.IsNull() == Standard_False) {
-        aConeFromShape->GetLastFunction()->SetDescription("");
-        TopoDS_Shape aConeFaces = aConeFromShape->GetValue();
-        TopExp_Explorer anExp(aConeFaces, TopAbs_FACE);
-
-        for (; anExp.More(); anExp.Next()) {
-          TopoDS_Face aConeFace = TopoDS::Face(anExp.Current());
-
-          if (aConeFace.IsNull() == Standard_False) {
-            aFaces.Append(aConeFace);
-          }
-        }
-      }
-    }
-  }
-
-  // Create a group of internal faces.
-  if (aFaces.IsEmpty() == Standard_False) {
-    Handle(GEOM_Object) aGroup = myGroupOperations->CreateGroup(theShape, TopAbs_FACE);
-
-    if (aGroup.IsNull() == Standard_False) {
-      aGroup->GetLastFunction()->SetDescription("");
-      aGroup->SetName("INTERNAL_FACES");
-
-      TopTools_IndexedMapOfShape anIndices;
-      Handle(TColStd_HSequenceOfInteger) aSeqIDs = new TColStd_HSequenceOfInteger;
-
-      TopExp::MapShapes(aShape, anIndices);
-
-      TopTools_ListIteratorOfListOfShape anIter(aFaces);
-
-      for (; anIter.More(); anIter.Next()) {
-        const TopoDS_Shape &aFace = anIter.Value();
-        const Standard_Integer anIndex = anIndices.FindIndex(aFace);
-
-        if (anIndex > 0) {
-          aSeqIDs->Append(anIndex);
-        }
-      }
-
-      myGroupOperations->UnionIDs(aGroup, aSeqIDs);
-      aGroup->GetLastFunction()->SetDescription("");
-      theSeq->Append(aGroup);
-    }
-  }
-
-  SetErrorCode(OK);
-
-  return true;
-}
-
-bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(Handle(GEOM_Object) theShape,
-                                                           double theR1, double theW1, double theL1,
-                                                           double theR2, double theW2, double theL2,
-                                                           double theH, double theW,
-                                                           double theRF, bool isNormal)
-{
-  SetErrorCode(KO);
-
-  // Build tools for partition operation:
-  // 1 face and 2 planes
-  // Face
-  Handle(GEOM_Object) arete_intersect_int, arete_intersect_ext;
-  Handle(GEOM_Object) wire_t, wire_t2, face_t, face_t2;
-  Handle(GEOM_Object) chan_racc;
-  Handle(GEOM_Object) vi1, vi2;
-  Handle(GEOM_Object) Te3;
-
-  try {
-    OCC_CATCH_SIGNALS;
-    Handle(GEOM_Object) Vector_Z = myBasicOperations->MakeVectorDXDYDZ(0, 0, 1);
-    Vector_Z->GetLastFunction()->SetDescription("");
-
-    // Useful values
-    double aSize = 2*(theL1 + theL2);
-    double aR1Ext = theR1 + theW1;
-    double aR2Ext = theR2 + theW2;
-    double theVertCylinderRadius = aR2Ext + theW + theRF;
-    double theHoriCylinderRadius = aR1Ext + theH + theRF;
-
-    // Common edges on internal cylinder
-    Handle(GEOM_Object) box_i = my3DPrimOperations->MakeBoxDXDYDZ(theR2, theR2, theR1);
-    box_i->GetLastFunction()->SetDescription("");
-    box_i = myTransformOperations->TranslateDXDYDZ(box_i, -theR2, -theR2, 0);
-    box_i->GetLastFunction()->SetDescription("");
-
-    Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
-    TCollection_AsciiString theDesc = aFunction->GetDescription();
-    Handle(TColStd_HSequenceOfTransient) edges_i =
-      myShapesOperations->GetShapesOnBox(box_i, theShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
-    // Recover previous description to get rid of Propagate dump
-    aFunction->SetDescription(theDesc);
-    if (edges_i.IsNull() || edges_i->Length() == 0) {
-      SetErrorCode("Internal edges not found");
-      return false;
-    }
-    for (int i=1; i<=edges_i->Length();i++) {
-      Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(edges_i->Value(i));
-      anObj->GetLastFunction()->SetDescription("");
-    }
-    arete_intersect_int = Handle(GEOM_Object)::DownCast(edges_i->Value(1));
-
-    // search for vertices located on both internal pipes
-    aFunction = theShape->GetLastFunction();
-    theDesc = aFunction->GetDescription();
-    Handle(TColStd_HSequenceOfTransient) vertices_i =
-      myShapesOperations->GetShapesOnBox(box_i, theShape, TopAbs_VERTEX, GEOMAlgo_ST_ONIN);
-    // Recover previous description to get rid of Propagate dump
-    aFunction->SetDescription(theDesc);
-    if (vertices_i.IsNull() || vertices_i->Length() == 0) {
-      SetErrorCode("Internal vertices not found");
-      return false;
-    }
-
-    double d1min = theR2+theW2, d2min=theR2+theW2;
-    for (int i = 1; i <= vertices_i->Length(); i++) {
-      Handle(GEOM_Object) v = Handle(GEOM_Object)::DownCast(vertices_i->Value(i));
-      v->GetLastFunction()->SetDescription("");
-      TopoDS_Vertex aVertex = TopoDS::Vertex(v->GetValue());
-      gp_Pnt aP = BRep_Tool::Pnt(aVertex);
-      if (Abs(aP.X()) <= Precision::Confusion()) {
-        if (Abs(aP.Y()) < d1min) {
-          vi1 = v;
-         d1min = Abs(aP.Y());
-       }
-      } else if (Abs(aP.Y()) <= Precision::Confusion()) {
-       if (Abs(aP.X()) < d2min) {
-         vi2 = v;
-         d2min = Abs(aP.X());
-        }
-      }
-    }
-    if (vi1.IsNull() || vi2.IsNull()) {
-      SetErrorCode("Cannot find internal intersection vertices");
-      return false;
-    }
-
-    std::list<Handle(GEOM_Object)> theShapes;
-
-    if (isNormal) {
-      Handle(GEOM_Object) ve1, ve2;
-      TopoDS_Vertex vertex1, vertex2;
-
-      Handle(GEOM_Object) box_e = my3DPrimOperations->MakeBoxDXDYDZ(aR2Ext, aR2Ext, aR1Ext);
-      box_e->GetLastFunction()->SetDescription("");
-      box_e = myTransformOperations->TranslateDXDYDZ(box_e, -aR2Ext, -aR2Ext, 0);
-      box_e->GetLastFunction()->SetDescription("");
-
-      // search for vertices located on both external pipes
-      aFunction = theShape->GetLastFunction();
-      theDesc = aFunction->GetDescription();
-      Handle(TColStd_HSequenceOfTransient) vertices_e =
-        myShapesOperations->GetShapesOnBox(box_e, theShape, TopAbs_VERTEX, GEOMAlgo_ST_ONIN);
-      // Recover previous description to get rid of Propagate dump
-      aFunction->SetDescription(theDesc);
-      if (vertices_e.IsNull() || vertices_e->Length() == 0) {
-        SetErrorCode("External vertices not found");
-        return false;
-      }
-
-      double d1max = 0, d2max = 0;
-      for (int i = 1; i <= vertices_e->Length(); i++) {
-        Handle(GEOM_Object) v = Handle(GEOM_Object)::DownCast(vertices_e->Value(i));
-        v->GetLastFunction()->SetDescription("");
-        TopoDS_Vertex aVertex = TopoDS::Vertex(v->GetValue());
-        gp_Pnt aP = BRep_Tool::Pnt(aVertex);
-        if (Abs(aP.X()) <= Precision::Confusion()) {
-          if (Abs(aP.Y()) > d1max) {
-            ve1 = v;
-           vertex1 = aVertex;
-           d1max = Abs(aP.Y());
-          }
-        } else if (Abs(aP.Y()) <= Precision::Confusion()) {
-          if (Abs(aP.X()) > d2max) {
-            ve2 = v;
-           vertex2 = aVertex;
-           d2max = Abs(aP.X());
-          }
-        }
-      }
-      if (ve1.IsNull() || ve2.IsNull()) {
-        SetErrorCode("Cannot find external intersection vertices");
-        return false;
-      }
-      Handle(GEOM_Object) edge_e1, edge_e2;
-
-      // Common edges on external cylinder
-      aFunction = theShape->GetLastFunction();
-      theDesc = aFunction->GetDescription();
-      Handle(TColStd_HSequenceOfTransient) edges_e =
-        myShapesOperations->GetShapesOnBox(box_e, theShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
-      // Recover previous description to get rid of Propagate dump
-      aFunction->SetDescription(theDesc);
-      if (edges_e.IsNull() || edges_e->Length() == 0) {
-        SetErrorCode("External edges not found");
-        return false;
-      }
-      ShapeAnalysis_Edge sae;
-      for (int i=1; i<=edges_e->Length();i++) {
-        Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(edges_e->Value(i));
-        anObj->GetLastFunction()->SetDescription("");
-       TopoDS_Edge anEdge = TopoDS::Edge(anObj->GetValue());
-       if ( !anEdge.IsNull() && 
-            (sae.FirstVertex(anEdge).IsSame(vertex1) || sae.LastVertex(anEdge).IsSame(vertex1)) && 
-            (sae.FirstVertex(anEdge).IsSame(vertex2) || sae.LastVertex(anEdge).IsSame(vertex2))) {
-         arete_intersect_ext = anObj;
-       }
-      }
-
-      edge_e1 = myBasicOperations->MakeLineTwoPnt(ve1, vi1);
-      if (edge_e1.IsNull()) {
-        SetErrorCode("Edge 1 could not be built");
-        return false;
-      }
-
-      edge_e2 = myBasicOperations->MakeLineTwoPnt(ve2, vi2);
-      if (edge_e2.IsNull()) {
-        SetErrorCode("Edge 2 could not be built");
-        return false;
-      }
-
-      edge_e1->GetLastFunction()->SetDescription("");
-      edge_e2->GetLastFunction()->SetDescription("");
-
-      std::list<Handle(GEOM_Object)> edge_e_elist;
-      edge_e_elist.push_back(arete_intersect_int);
-      edge_e_elist.push_back(edge_e1);
-      edge_e_elist.push_back(arete_intersect_ext);
-      edge_e_elist.push_back(edge_e2);
-      wire_t = myShapesOperations->MakeWire(edge_e_elist, 1e-7);
-      if (wire_t.IsNull()) {
-        SetErrorCode("Impossible to build wire");
-        return false;
-      }
-      wire_t->GetLastFunction()->SetDescription("");
-      face_t = myShapesOperations->MakeFace(wire_t, false);
-      if (face_t.IsNull()) {
-        SetErrorCode("Impossible to build face");
-        return false;
-      }
-      face_t->GetLastFunction()->SetDescription("");
-
-      theShapes.push_back(theShape);
-      theShapes.push_back(vi1);
-      theShapes.push_back(vi2);
-      theShapes.push_back(ve1);
-      theShapes.push_back(ve2);
-      theShapes.push_back(edge_e1);
-      theShapes.push_back(edge_e2);
-      theShapes.push_back(wire_t);
-      theShapes.push_back(face_t);
-    }
-    else {
-      Handle(GEOM_Object) P1, P2, P3, P4, P5, P6;
-      int idP1, idP2, idP3, idP4;
-      int PZX, PZY;
-      double ZX=0, ZY=0;
-      std::vector<int> LX;
-      std::vector<int> LY;
-      Handle(GEOM_Object) box_e = my3DPrimOperations->MakeBoxDXDYDZ
-        (theVertCylinderRadius, theVertCylinderRadius, theHoriCylinderRadius);
-      box_e->GetLastFunction()->SetDescription("");
-      box_e = myTransformOperations->TranslateDXDYDZ
-        (box_e, -theVertCylinderRadius, -theVertCylinderRadius, 0);
-      box_e->GetLastFunction()->SetDescription("");
-
-      aFunction = theShape->GetLastFunction();
-      theDesc = aFunction->GetDescription();
-      Handle(TColStd_HSequenceOfTransient) extremVertices =
-        myShapesOperations->GetShapesOnBox(box_e, theShape, TopAbs_VERTEX, GEOMAlgo_ST_ONIN);
-      // Recover previous description to get rid of Propagate dump
-      aFunction->SetDescription(theDesc);
-
-      if (extremVertices.IsNull() || extremVertices->Length() == 0) {
-        if (theRF == 0)
-          SetErrorCode("Vertices on chamfer not found");
-        else
-          SetErrorCode("Vertices on fillet not found");
-        return false;
-      }
-
-      theShapes.push_back(theShape);
-      theShapes.push_back(box_e);
-      if (extremVertices->Length() != 6) {
-        //           for (int i=1; i<=extremVertices->Length(); i++){
-        //             theShapes.push_back(Handle(GEOM_Object)::DownCast(extremVertices->Value(i)));
-        //           }
-        //           Handle(GEOM_Object) aCompound = myShapesOperations->MakeCompound(theShapes);
-        //           TopoDS_Shape aCompoundShape = aCompound->GetValue();
-        //           theShape->GetLastFunction()->SetValue(aCompoundShape);
-        SetErrorCode("Bad number of vertices on chamfer found");
-        return false;
-      }
-
-      for (int i=1; i<=extremVertices->Length(); i++){
-        Handle(GEOM_Object) aV = Handle(GEOM_Object)::DownCast(extremVertices->Value(i));
-        aV->GetLastFunction()->SetDescription("");
-        gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(aV->GetValue()));
-
-        if (Abs(aP.X()) <= Precision::Confusion()) {
-          if (Abs(aP.Y()) - theR2 > Precision::Confusion()) {
-            LX.push_back(i);
-            if  (aP.Z()-ZX > Precision::Confusion()) {
-              ZX = aP.Z();
-              PZX = i;
-            }
-          }
-        }
-        else {
-          if (Abs(aP.X()) - theR2 > Precision::Confusion()) {
-            LY.push_back(i);
-            if (aP.Z() - ZY > Precision::Confusion()) {
-              ZY = aP.Z();
-              PZY = i;
-            }
-          }
-        }
-      }
-
-      idP2 = PZX;
-      idP4 = PZY;
-      idP1 = LX.at(0);
-      if (LX.at(0) == PZX)
-        idP1 = LX.at(1);
-      idP3 = LY.at(0);
-      if (LY.at(0) == PZY)
-        idP3 = LY.at(1);
-
-      P1 = Handle(GEOM_Object)::DownCast(extremVertices->Value(idP1));
-      P2 = Handle(GEOM_Object)::DownCast(extremVertices->Value(idP2));
-      P3 = Handle(GEOM_Object)::DownCast(extremVertices->Value(idP3));
-      P4 = Handle(GEOM_Object)::DownCast(extremVertices->Value(idP4));
-
-      Handle(GEOM_Object) Cote_1 = myBasicOperations->MakeLineTwoPnt(P1, vi1);
-      if (Cote_1.IsNull()) {
-        SetErrorCode("Impossible to build edge in thickness");
-        return false;
-      }
-      Cote_1->GetLastFunction()->SetDescription("");
-
-      Handle(GEOM_Object) Cote_2 = myBasicOperations->MakeLineTwoPnt(vi2, P3);
-      if (Cote_2.IsNull()) {
-        SetErrorCode("Impossible to build edge in thickness");
-        return false;
-      }
-      Cote_2->GetLastFunction()->SetDescription("");
-
-      // edge_chan_princ = arete du chanfrein (ou raccord) sur le tuyau principal
-      // edge_chan_inc = arete du chanfrein (ou raccord) sur le tuyau incident
-      //         std::cerr << "Getting chamfer edge on main pipe" << std::endl;
-      Handle(GEOM_Object) edge_chan_princ = myBlocksOperations->GetEdge(theShape, P1, P3);
-      if (edge_chan_princ.IsNull()) {
-        SetErrorCode("Impossible to find edge on main pipe");
-        return false;
-      }
-      edge_chan_princ->GetLastFunction()->SetDescription("");
-
-      Handle(GEOM_Object) edge_chan_inc = myBlocksOperations->GetEdge(theShape, P2, P4);
-      if (edge_chan_inc.IsNull()) {
-        SetErrorCode("Impossible to find edge on incident pipe");
-        return false;
-      }
-      edge_chan_inc->GetLastFunction()->SetDescription("");
-
-      std::list<Handle(GEOM_Object)> edgeList1;
-      edgeList1.push_back(edge_chan_princ);
-      edgeList1.push_back(Cote_1);
-      edgeList1.push_back(arete_intersect_int);
-      edgeList1.push_back(Cote_2);
-
-      //         std::cerr << "Creating wire 1" << std::endl;
-      wire_t = myShapesOperations->MakeWire(edgeList1, 1e-7);
-      if (wire_t.IsNull()) {
-        SetErrorCode("Impossible to build wire");
-        return false;
-      }
-      wire_t->GetLastFunction()->SetDescription("");
-
-      //         std::cerr << "Creating face 1" << std::endl;
-      face_t = myShapesOperations->MakeFace(wire_t, false);
-      if (face_t.IsNull()) {
-        SetErrorCode("Impossible to build face");
-        return false;
-      }
-      face_t->GetLastFunction()->SetDescription("");
-      theShapes.push_back(face_t);
-
-      gp_Pnt aP2 = BRep_Tool::Pnt(TopoDS::Vertex(P2->GetValue()));
-      gp_Pnt aP5 = BRep_Tool::Pnt(TopoDS::Vertex(vi1->GetValue()));
-      double deltaZ = aP2.Z() - aP5.Z();
-      //         std::cerr << "Creating new point from vi1 with deltaZ = " << deltaZ << std::endl;
-      Handle(GEOM_Object) P5bis = myTransformOperations->TranslateDXDYDZCopy(vi1, 0, 0, deltaZ);
-      if (P5bis.IsNull()) {
-        SetErrorCode("Impossible to translate vertex");
-        return false;
-      }
-      P5bis->GetLastFunction()->SetDescription("");
-
-      gp_Pnt aP4 = BRep_Tool::Pnt(TopoDS::Vertex(P4->GetValue()));
-      gp_Pnt aP6 = BRep_Tool::Pnt(TopoDS::Vertex(vi2->GetValue()));
-      deltaZ = aP4.Z() - aP6.Z();
-      //         std::cerr << "Creating new point from vi2 with deltaZ = " << deltaZ << std::endl;
-      Handle(GEOM_Object) P6bis = myTransformOperations->TranslateDXDYDZCopy(vi2, 0, 0, deltaZ);
-      if (P6bis.IsNull()) {
-        SetErrorCode("Impossible to translate vertex");
-        return false;
-      }
-      P6bis->GetLastFunction()->SetDescription("");
-
-      //         std::cerr << "Creating new line 1 from 2 previous points" << std::endl;
-      Handle(GEOM_Object) Cote_3 = myBasicOperations->MakeLineTwoPnt(P5bis, P2);
-      if (Cote_3.IsNull()) {
-        SetErrorCode("Impossible to build edge in thickness");
-        return false;
-      }
-      Cote_3->GetLastFunction()->SetDescription("");
-
-      //         std::cerr << "Creating new line 2 from 2 previous points" << std::endl;
-      Handle(GEOM_Object) Cote_4 = myBasicOperations->MakeLineTwoPnt(P6bis, P4);
-      if (Cote_4.IsNull()) {
-        SetErrorCode("Impossible to build edge in thickness");
-        return false;
-      }
-      Cote_4->GetLastFunction()->SetDescription("");
-
-      //         std::cerr << "Creating new line 3 from 2 previous points" << std::endl;
-      Handle(GEOM_Object) Cote_5 = myBasicOperations->MakeLineTwoPnt(P5bis, P6bis);
-      if (Cote_4.IsNull()) {
-        SetErrorCode("Impossible to build edge in thickness");
-        return false;
-      }
-      Cote_5->GetLastFunction()->SetDescription("");
-
-      //std::list<Handle(GEOM_Object)> edgeList2;
-      //edgeList2.push_back(edge_chan_inc);
-      //edgeList2.push_back(Cote_3);
-      //edgeList2.push_back(Cote_5);
-      //edgeList2.push_back(Cote_4);
-      //         std::cerr << "Creating wire 2" << std::endl;
-      //wire_t2 = myShapesOperations->MakeWire(edgeList2, 1e-7);
-      //if (wire_t2.IsNull()) {
-      //  SetErrorCode("Impossible to build wire");
-      //  return false;
-      //}
-      //wire_t2->GetLastFunction()->SetDescription("");
-      //         std::cerr << "Creating face 2" << std::endl;
-      //face_t2 = myShapesOperations->MakeFace(wire_t2, false);
-
-      // Mantis issue 0021682
-      face_t2 = my3DPrimOperations->MakePrismVecH(edge_chan_inc, Cote_4, - (theR2 + theW2));
-      //face_t2 = my3DPrimOperations->MakePrismVecH(edge_chan_inc, Cote_4, - 2.0*theR2);
-      if (face_t2.IsNull()) {
-        SetErrorCode("Impossible to build face");
-        return false;
-      }
-      face_t2->GetLastFunction()->SetDescription("");
-      theShapes.push_back(face_t2);
-    }
-
-    // Planes
-    Handle(GEOM_Object) aP0 = myBasicOperations->MakePointXYZ(0, 0, 0);
-    Handle(GEOM_Object) aVZ = myBasicOperations->MakeVectorDXDYDZ(0, 0, 1);
-    Handle(GEOM_Object) aVXZ = myBasicOperations->MakeVectorDXDYDZ(aR1Ext, 0, 0.5*(theL1+theVertCylinderRadius));
-    Handle(GEOM_Object) aPlnOZ = myBasicOperations->MakePlanePntVec(aP0, aVZ, aSize);
-    Handle(GEOM_Object) aPlnOXZ = myBasicOperations->MakePlanePntVec(aP0, aVXZ, aSize);
-    aP0->GetLastFunction()->SetDescription("");
-    aVZ->GetLastFunction()->SetDescription("");
-    aVXZ->GetLastFunction()->SetDescription("");
-    aPlnOZ->GetLastFunction()->SetDescription("");
-    aPlnOXZ->GetLastFunction()->SetDescription("");
-    theShapes.push_back(aPlnOZ);
-    theShapes.push_back(aPlnOXZ);
-
-    // Partition
-    Handle(TColStd_HSequenceOfTransient) partitionShapes = new TColStd_HSequenceOfTransient;
-    Handle(TColStd_HSequenceOfTransient) theTools = new TColStd_HSequenceOfTransient;
-    Handle(TColStd_HSequenceOfTransient) theKeepInside = new TColStd_HSequenceOfTransient;
-    Handle(TColStd_HSequenceOfTransient) theRemoveInside = new TColStd_HSequenceOfTransient;
-    Handle(TColStd_HArray1OfInteger) theMaterials;
-
-    partitionShapes->Append(theShape);
-    theTools->Append(aPlnOZ);
-    if (Abs(aR1Ext - aR2Ext) > Precision::Confusion())
-      theTools->Append(aPlnOXZ);
-    theTools->Append(face_t);
-    if (!isNormal)
-      theTools->Append(face_t2);
-
-    Te3 = myBooleanOperations->MakePartition
-              (partitionShapes, theTools, theKeepInside, theRemoveInside,
-              TopAbs_SOLID, false, theMaterials, 0, false, Standard_False);
-    if (Te3.IsNull()) {
-      SetErrorCode("Impossible to build partition of TShape");
-      return false;
-    }
-    Te3->GetLastFunction()->SetDescription("");
-
-    // Last verification: result should be a block
-    std::list<GEOMImpl_IBlocksOperations::BCError> errList;
-    if (!myBlocksOperations->CheckCompoundOfBlocks(Te3,errList)) {
-      SetErrorCode("TShape is not a compound of block");
-      return false;
-    }
-
-//     // BEGIN Compound of created shapes - Only for debug purpose
-//     theShapes.clear();
-//     theShapes.push_back(theShape);
-//     theShapes.push_back(aPlnOZ);
-//     if (Abs(aR1Ext - aR2Ext) > Precision::Confusion() )
-//       theShapes.push_back(aPlnOXZ);
-//     theShapes.push_back(face_t);
-//     if (!isNormal)
-//       theShapes.push_back(face_t2);
-//
-//     Handle(GEOM_Object) aCompound = myShapesOperations->MakeCompound(theShapes);
-//     TopoDS_Shape aCompoundShape = aCompound->GetValue();
-//     theShape->GetLastFunction()->SetValue(aCompoundShape);
-//     // END Compound of created shapes - Only for debug purpose
-
-    TopoDS_Shape aShape = Te3->GetValue();
-    theShape->GetLastFunction()->SetValue(aShape);
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return false;
-  }
-
-  SetErrorCode(OK);
-  return true;
-}
-
-// Mirror and glue faces
-bool GEOMImpl_IAdvancedOperations::MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
-                                                               double theR1, double theW1, double theL1,
-                                                               double theR2, double theW2, double theL2)
-{
-  SetErrorCode(KO);
-
-  // Useful values
-  double aSize = 2*(theL1 + theL2);
-  double aR1Ext = theR1 + theW1;
-
-  // Planes
-  Handle(GEOM_Object) aP0 = myBasicOperations->MakePointXYZ(0, 0, 0);
-  aP0->GetLastFunction()->SetDescription("");
-  Handle(GEOM_Object) aVX = myBasicOperations->MakeVectorDXDYDZ(1, 0, 0);
-  Handle(GEOM_Object) aVY = myBasicOperations->MakeVectorDXDYDZ(0, 1, 0);
-  aVX->GetLastFunction()->SetDescription("");
-  aVY->GetLastFunction()->SetDescription("");
-  Handle(GEOM_Object) aPlane_OX = myBasicOperations->MakePlanePntVec(aP0, aVX, 2*(aR1Ext + theL2));
-  Handle(GEOM_Object) aPlane_OY = myBasicOperations->MakePlanePntVec(aP0, aVY, aSize);
-  aPlane_OX->GetLastFunction()->SetDescription("");
-  aPlane_OY->GetLastFunction()->SetDescription("");
-
-  Handle(GEOM_Object) Te4 = myTransformOperations->MirrorPlaneCopy(theShape, aPlane_OX);
-  if (Te4.IsNull()) {
-    SetErrorCode("Impossible to build mirror of quarter TShape");
-    return false;
-  }
-
-  Handle(GEOM_Object) Te5 = myTransformOperations->MirrorPlaneCopy(theShape, aPlane_OY);
-  if (Te5.IsNull()) {
-    SetErrorCode("Impossible to build mirror of half TShape");
-    return false;
-  }
-
-  Handle(GEOM_Object) Te6 = myTransformOperations->MirrorPlaneCopy(Te4, aPlane_OY);
-  if (Te6.IsNull()) {
-    SetErrorCode("Impossible to build mirror of half TShape");
-    return false;
-  }
-
-  std::list<Handle(GEOM_Object)> aShapesList;
-  aShapesList.push_back(theShape);
-  aShapesList.push_back(Te4);
-  aShapesList.push_back(Te5);
-  aShapesList.push_back(Te6);
-  Handle(GEOM_Object) Te7 = myShapesOperations->MakeCompound(aShapesList);
-  if (Te7.IsNull()) {
-    SetErrorCode("Impossible to build compound");
-    return false;
-  }
-
-  // Copy source shape
-  TopoDS_Shape aShapeCopy;
-  TColStd_IndexedDataMapOfTransientTransient aMapTShapes;
-  TNaming_CopyShape::CopyTool(Te7->GetValue(), aMapTShapes, aShapeCopy);
-
-  Handle(GEOM_Object) Te8 = myShapesOperations->MakeGlueFaces(Te7, 1e-7, true);
-  if (Te8.IsNull()) {
-    SetErrorCode("Impossible to glue faces of TShape");
-    return false;
-  }
-
-  TopoDS_Shape aShape = Te8->GetValue();
-  BRepCheck_Analyzer anAna (aShape, Standard_True);
-
-  if (!anAna.IsValid()) {
-    // Try to do gluing with the tolerance equal to maximal
-    // tolerance of vertices of the source shape.
-    Standard_Real aTolMax = -RealLast();
-
-    for (TopExp_Explorer ExV (aShapeCopy, TopAbs_VERTEX); ExV.More(); ExV.Next()) {
-      TopoDS_Vertex aVertex = TopoDS::Vertex(ExV.Current());
-      Standard_Real aTol = BRep_Tool::Tolerance(aVertex);
-
-      if (aTol > aTolMax) {
-        aTolMax = aTol;
-      }
-    }
-
-    // Perform gluing
-    Te7->GetLastFunction()->SetValue(aShapeCopy);
-    Te8 = myShapesOperations->MakeGlueFaces(Te7, aTolMax, true);
-
-    if (Te8.IsNull()) {
-      SetErrorCode("Impossible to glue faces of TShape");
-      return false;
-    }
-
-    aShape = Te8->GetValue();
-  }
-
-
-  theShape->GetLastFunction()->SetValue(aShape);
-
-  Te4->GetLastFunction()->SetDescription("");
-  Te5->GetLastFunction()->SetDescription("");
-  Te6->GetLastFunction()->SetDescription("");
-  Te7->GetLastFunction()->SetDescription("");
-  Te8->GetLastFunction()->SetDescription("");
-
-  SetErrorCode(OK);
-  return true;
-}
-
-//=======================================================================
-//function : MakePipeTShapeThicknessReduction
-//purpose  : Static method. Add thiskness reduction elements at the three
-//                          open ends of the T-Shape.
-//=======================================================================
-TopoDS_Shape GEOMImpl_IAdvancedOperations::MakePipeTShapeThicknessReduction
-                                  (TopoDS_Shape theShape,
-                                   double r1, double w1, double l1,
-                                   double r2, double w2, double l2,
-                                   double rL, double wL, double ltransL, double lthinL,
-                                   double rR, double wR, double ltransR, double lthinR,
-                                   double rI, double wI, double ltransI, double lthinI,
-                                   bool fuseReductions)
-{
-  // Add thickness reduction elements
-  // at the three extremities: Left, Right and Incident
-  //
-  // ---------------------.
-  //   W                   \
-  // ---------------------. \
-  //   ^                   \ '-----------------.
-  //   |R                   \        Wthin     |
-  //   |                     '-----------------'
-  //   v                             Rthin
-  // --.--.--.--.--.--.--.--.--.--.--.--.--.--.--
-  //                     Ltrans    Lthin
-
-  TopoDS_Shape aResult = theShape;
-  double aTol = Precision::Confusion();
-
-  gp_Vec aVX = gp::DX(), aVZ = gp::DZ();
-
-  // Left reduction (rL, wL, ltransL, lthinL)
-  if (rL > aTol && wL > aTol && ltransL > aTol) {
-    gp_Pnt aPLeft (-l1, 0, 0);
-    gp_Ax2 anAxesLeft (aPLeft, -aVX, aVZ);
-    TopoDS_Shape aReductionLeft = GEOMImpl_IAdvancedOperations::MakeThicknessReduction
-      (anAxesLeft, r1, w1, rL, wL, ltransL, lthinL, fuseReductions);
-
-    if (fuseReductions) {
-      BRepAlgoAPI_Fuse fuseL (aResult, aReductionLeft);
-      if (!fuseL.IsDone())
-        StdFail_NotDone::Raise("Cannot fuse Te with left reduction");
-      aResult = fuseL.Shape();
-    }
-    else {
-      BRep_Builder B;
-      TopoDS_Compound C;
-      B.MakeCompound(C);
-      B.Add(C, aResult);
-      B.Add(C, aReductionLeft);
-      aResult = C;
-    }
-  }
-
-  // Right reduction
-  if (rR > aTol && wR > aTol && ltransR > aTol) {
-    gp_Pnt aPRight (l1, 0, 0);
-    gp_Ax2 anAxesRight (aPRight, aVX, aVZ);
-    TopoDS_Shape aReductionRight = GEOMImpl_IAdvancedOperations::MakeThicknessReduction
-      (anAxesRight, r1, w1, rR, wR, ltransR, lthinR, fuseReductions);
-
-    if (fuseReductions) {
-      BRepAlgoAPI_Fuse fuseR (aResult, aReductionRight);
-      if (!fuseR.IsDone())
-        StdFail_NotDone::Raise("Cannot fuse Te with right reduction");
-      aResult = fuseR.Shape();
-    }
-    else {
-      BRep_Builder B;
-      TopoDS_Compound C;
-      B.MakeCompound(C);
-      B.Add(C, aResult);
-      B.Add(C, aReductionRight);
-      aResult = C;
-    }
-  }
-
-  // Incident reduction
-  if (rI > aTol && wI > aTol && ltransI > aTol) {
-    gp_Pnt aPInci (0, 0, l2);
-    gp_Ax2 anAxesInci (aPInci, aVZ, aVX);
-    TopoDS_Shape aReductionInci = GEOMImpl_IAdvancedOperations::MakeThicknessReduction
-      (anAxesInci, r2, w2, rI, wI, ltransI, lthinI, fuseReductions);
-
-    if (fuseReductions) {
-      BRepAlgoAPI_Fuse fuseInci (aResult, aReductionInci);
-      if (!fuseInci.IsDone())
-        StdFail_NotDone::Raise("Cannot fuse Te with incident reduction");
-      aResult = fuseInci.Shape();
-    }
-    else {
-      BRep_Builder B;
-      TopoDS_Compound C;
-      B.MakeCompound(C);
-      B.Add(C, aResult);
-      B.Add(C, aReductionInci);
-      aResult = C;
-    }
-  }
-
-  // Get rid of extra compounds
-  TopTools_ListOfShape listShapeRes;
-  GEOMUtils::AddSimpleShapes(aResult, listShapeRes);
-  aResult = listShapeRes.First(); // useful for the case "fuseReductions == true"
-
-  if (!fuseReductions && listShapeRes.Extent() > 1) {
-    // Simplify T-Shape compound (get rid of sub-compounds) and glue duplicated faces
-    BRep_Builder B;
-    TopoDS_Compound C;
-    B.MakeCompound(C);
-
-    TopTools_ListIteratorOfListOfShape itSub (listShapeRes);
-    for (; itSub.More(); itSub.Next())
-      B.Add(C, itSub.Value());
-
-    // GlueFaces
-    aResult = GEOMImpl_GlueDriver::GlueFaces(C, Precision::Confusion(), Standard_True);
-  }
-
-  return aResult;
-}
-
-//=======================================================================
-//function : MakeThicknessReduction
-//purpose  : Static method. Create one thickness reduction element.
-//=======================================================================
-TopoDS_Shape GEOMImpl_IAdvancedOperations::MakeThicknessReduction (gp_Ax2 theAxes,
-                                                                   const double R, const double W,
-                                                                   const double Rthin, const double Wthin,
-                                                                   const double Ltrans, const double Lthin,
-                                                                   bool fuse)
-{
-  double aTol = Precision::Confusion();
-  if (Rthin < aTol || Wthin < aTol || Ltrans < aTol) {
-    StdFail_NotDone::Raise("Cannot build thickness reduction: too small values");
-  }
-  bool isThinPart = (Lthin > aTol);
-
-  //     .
-  //   W |\
-  //     . \
-  //   ^  \ '-----------------.
-  //   |R  \|                 | Wthin
-  //   |    '-----------------'
-  //   v                        Rthin
-  // --.--.--.--.--.--.--.--.--.--.--.--.--> theAxes.Direction()
-  //     Ltrans     Lthin
-
-  double RExt = R + W;
-  double RthinExt = Rthin + Wthin;
-
-  gp_Dir aNormal = theAxes.Direction();
-  gp_Dir anXDir  = theAxes.XDirection();
-  gp_Pnt aPntCyl (theAxes.Location().XYZ() + aNormal.XYZ()*Ltrans);
-  gp_Ax2 anAxesCyl (aPntCyl, aNormal, anXDir);
-
-  // Build the transition part
-  BRepPrimAPI_MakeCone ConeExt (theAxes, RExt, RthinExt, Ltrans);
-  BRepPrimAPI_MakeCone ConeInt (theAxes, R, Rthin, Ltrans);
-  ConeExt.Build();
-  ConeInt.Build();
-  if (!ConeExt.IsDone() || !ConeInt.IsDone())
-    StdFail_NotDone::Raise("Cannot build cones of thickness reduction");
-  BRepAlgoAPI_Cut cut1 (ConeExt.Shape(), ConeInt.Shape());
-  if (!cut1.IsDone())
-    StdFail_NotDone::Raise("Coudn't build transition part of thickness reduction");
-  TopoDS_Shape aReduction = cut1.Shape();
-
-  // Build the thin part, if required
-  TopoDS_Shape aThinPart;
-  if (isThinPart) {
-    BRepPrimAPI_MakeCylinder CExt (anAxesCyl, RthinExt, Lthin);
-    BRepPrimAPI_MakeCylinder CInt (anAxesCyl, Rthin, Lthin);
-    CExt.Build();
-    CInt.Build();
-    if (!CExt.IsDone() || !CInt.IsDone())
-      StdFail_NotDone::Raise("Cannot build cylinders of thickness reduction");
-    BRepAlgoAPI_Cut cut2 (CExt.Shape(), CInt.Shape());
-    if (!cut2.IsDone())
-      StdFail_NotDone::Raise("Coudn't build thin part of thickness reduction");
-    aThinPart = cut2.Shape();
-  }
-
-  // Join parts
-  if (fuse) {
-    if (isThinPart) {
-      BRepAlgoAPI_Fuse fuse1 (aReduction, aThinPart);
-      if (!fuse1.IsDone())
-        StdFail_NotDone::Raise("Cannot fuse parts of thickness reduction");
-      aReduction = fuse1.Shape();
-    }
-  }
-  else {
-    // Partition the reduction on blocks
-    gp_Ax3 anAxesPln1 (aPntCyl, theAxes.XDirection(), aNormal);
-    gp_Ax3 anAxesPln2 (aPntCyl, theAxes.YDirection(), aNormal);
-    gp_Pln aPln1 (anAxesPln1);
-    gp_Pln aPln2 (anAxesPln2);
-    double aSize = Ltrans + Lthin + R + Rthin + Wthin; // to guarantee enough size in all directions
-    TopoDS_Shape aTool1 = BRepBuilderAPI_MakeFace(aPln1, -aSize, +aSize, -aSize, +aSize).Shape();
-    TopoDS_Shape aTool2 = BRepBuilderAPI_MakeFace(aPln2, -aSize, +aSize, -aSize, +aSize).Shape();
-
-    GEOMAlgo_Splitter PS;
-    PS.AddArgument(aReduction);
-    if (isThinPart)
-      PS.AddArgument(aThinPart);
-    PS.AddTool(aTool1);
-    PS.AddTool(aTool2);
-    PS.SetLimit(TopAbs_SOLID);
-    PS.Perform();
-
-    aReduction = PS.Shape();
-  }
-
-  return aReduction;
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShape
- *  \brief Create a T-shape object with specified caracteristics for the main and
- *         the incident pipes (radius, width, half-length).
- *         Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-Handle(TColStd_HSequenceOfTransient)
-  GEOMImpl_IAdvancedOperations::MakePipeTShape(double theR1, double theW1, double theL1,
-                                               double theR2, double theW2, double theL2,
-                                               double theRL, double theWL, double theLtransL, double theLthinL,
-                                               double theRR, double theWR, double theLtransR, double theLthinR,
-                                               double theRI, double theWI, double theLtransI, double theLthinI,
-                                               bool theHexMesh)
-{
-  MESSAGE("GEOMImpl_IAdvancedOperations::MakePipeTShape");
-  SetErrorCode(KO);
-  //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
-
-  //Add a new shape function with parameters
-  Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
-  if (aFunction.IsNull()) return NULL;
-
-  //Check if the function is set correctly
-  if (aFunction->GetDriverGUID() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL;
-
-  GEOMImpl_IPipeTShape aData (aFunction);
-
-  aData.SetR1(theR1);
-  aData.SetW1(theW1);
-  aData.SetL1(theL1);
-  aData.SetR2(theR2);
-  aData.SetW2(theW2);
-  aData.SetL2(theL2);
-  aData.SetHexMesh(theHexMesh);
-
-  bool isTRL = (theRL + theWL + theLtransL + theLthinL) > Precision::Confusion();
-  bool isTRR = (theRR + theWR + theLtransR + theLthinR) > Precision::Confusion();
-  bool isTRI = (theRI + theWI + theLtransI + theLthinI) > Precision::Confusion();
-
-  //Compute the resulting value
-  try {
-    OCC_CATCH_SIGNALS;
-    if (!GetSolver()->ComputeFunction(aFunction)) {
-      SetErrorCode("TShape driver failed");
-      return NULL;
-    }
-
-    if (theHexMesh) {
-      if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
-        return NULL;
-      if (!MakePipeTShapeMirrorAndGlue(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
-        return NULL;
-    }
-
-    if (isTRL || isTRR || isTRI) {
-      // Add thickness reduction elements
-      // at the three extremities: Left, Right and Incident
-      TopoDS_Shape aResShape =
-        MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
-                                         theRL, theWL, theLtransL, theLthinL,
-                                         theRR, theWR, theLtransR, theLthinR,
-                                         theRI, theWI, theLtransI, theLthinI,
-                                         !theHexMesh);
-      aFunction->SetValue(aResShape);
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
-  aSeq->Append(aShape);
-
-  try {
-    if (theHexMesh) {
-      // Get the groups
-      if (!MakeGroups(aShape, TSHAPE_BASIC, theR1, theW1, theL1, theR2, theW2, theL2,
-                      0., 0., 0., aSeq, gp_Trsf()))
-        return NULL;
-    }
-
-    // Get internal group.
-    if (!MakeInternalGroup(aShape, theR1, theL1, theR2, theL2, theRL, theLtransL,
-                           theRR, theLtransR, theRI, theLtransI,
-                           aSeq, gp_Trsf())) {
-      return NULL;
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  //Make a Python command
-  TCollection_AsciiString anEntry, aListRes("[");
-  // Iterate over the sequence aSeq
-  Standard_Integer aNbGroups = aSeq->Length();
-  Standard_Integer i = 1;
-  for (; i <= aNbGroups; i++) {
-    Handle(Standard_Transient) anItem = aSeq->Value(i);
-    if (anItem.IsNull()) continue;
-    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(anItem);
-    if (aGroup.IsNull()) continue;
-    //Make a Python command
-    TDF_Tool::Entry(aGroup->GetEntry(), anEntry);
-    aListRes += anEntry + ", ";
-  }
-  aListRes.Trunc(aListRes.Length() - 2);
-
-  GEOM::TPythonDump pd (aFunction);
-
-  pd << aListRes.ToCString() << "] = geompy.MakePipeTShape("
-     << theR1 << ", " << theW1 << ", " << theL1 << ", "
-     << theR2 << ", " << theW2 << ", " << theL2 << ", "
-     << theHexMesh;
-
-  // thickness reduction
-  if (isTRL)
-    pd << ", theRL=" << theRL << ", theWL=" << theWL
-       << ", theLtransL=" << theLtransL << ", theLthinL=" << theLthinL;
-  if (isTRR)
-    pd << ", theRR=" << theRR << ", theWR=" << theWR
-       << ", theLtransR=" << theLtransR << ", theLthinR=" << theLthinR;
-  if (isTRI)
-    pd << ", theRI=" << theRI << ", theWI=" << theWI
-       << ", theLtransI=" << theLtransI << ", theLthinI=" << theLthinI;
-
-  pd << ")";
-
-  SetErrorCode(OK);
-
-  return aSeq;
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeWithPosition
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length).
- *  The extremities of the main pipe are located on junctions points P1 and P2.
- *  The extremity of the incident pipe is located on junction point P3.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \param theP1 1st junction point of main pipe
- *  \param theP2 2nd junction point of main pipe
- *  \param theP3 Junction point of incident pipe
- *  \return List of GEOM_Objects, containing the created shape and propagation groups..
- */
-//=============================================================================
-Handle(TColStd_HSequenceOfTransient)
-GEOMImpl_IAdvancedOperations::MakePipeTShapeWithPosition
-                             (double theR1, double theW1, double theL1,
-                              double theR2, double theW2, double theL2,
-                              double theRL, double theWL, double theLtransL, double theLthinL,
-                              double theRR, double theWR, double theLtransR, double theLthinR,
-                              double theRI, double theWI, double theLtransI, double theLthinI,
-                              bool theHexMesh,
-                              Handle(GEOM_Object) theP1,
-                              Handle(GEOM_Object) theP2,
-                              Handle(GEOM_Object) theP3)
-{
-  SetErrorCode(KO);
-  //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
-  /////////////////
-  // TSHAPE CODE
-  /////////////////
-  //Add a new shape function with parameters
-  Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
-  if (aFunction.IsNull()) return NULL;
-
-  //Check if the function is set correctly
-  if (aFunction->GetDriverGUID() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL;
-
-  // Check new position
-  if (!CheckCompatiblePosition(theL1, theL2, theP1, theP2, theP3, 0.01)) {
-    return NULL;
-  }
-
-  GEOMImpl_IPipeTShape aData(aFunction);
-
-  aData.SetR1(theR1);
-  aData.SetW1(theW1);
-  aData.SetL1(theL1);
-  aData.SetR2(theR2);
-  aData.SetW2(theW2);
-  aData.SetL2(theL2);
-  aData.SetHexMesh(theHexMesh);
-
-  bool isTRL = (theRL + theWL + theLtransL + theLthinL) > Precision::Confusion();
-  bool isTRR = (theRR + theWR + theLtransR + theLthinR) > Precision::Confusion();
-  bool isTRI = (theRI + theWI + theLtransI + theLthinI) > Precision::Confusion();
-
-  //Compute the resulting value
-  try {
-    OCC_CATCH_SIGNALS;
-    if (!GetSolver()->ComputeFunction(aFunction)) {
-      SetErrorCode("TShape driver failed");
-      return NULL;
-    }
-
-    if (theHexMesh) {
-      if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
-        return NULL;
-      if (!MakePipeTShapeMirrorAndGlue(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
-        return NULL;
-    }
-
-    if (isTRL || isTRR || isTRI) {
-      // Add thickness reduction elements
-      // at the three extremities: Left, Right and Incident
-      TopoDS_Shape aResShape =
-        MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
-                                         theRL, theWL, theLtransL, theLthinL,
-                                         theRR, theWR, theLtransR, theLthinR,
-                                         theRI, theWI, theLtransI, theLthinI,
-                                         !theHexMesh);
-      aFunction->SetValue(aResShape);
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  TopoDS_Shape Te = aShape->GetValue();
-
-  // Set Position
-  gp_Trsf aTrsf = GetPositionTrsf(theL1, theL2, theP1, theP2, theP3);
-  BRepBuilderAPI_Transform aTransformation(Te, aTrsf, Standard_False);
-  TopoDS_Shape aTrsf_Shape = aTransformation.Shape();
-  aFunction->SetValue(aTrsf_Shape);
-
-  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
-  aSeq->Append(aShape);
-
-  try {
-    if (theHexMesh) {
-      // Get the groups
-      if (!MakeGroups(aShape,TSHAPE_BASIC, theR1, theW1, theL1, theR2, theW2, theL2,
-                      0., 0., 0., aSeq, aTrsf)) {
-        return NULL;
-      }
-    }
-
-    // Get internal group.
-    if (!MakeInternalGroup(aShape, theR1, theL1, theR2, theL2, theRL, theLtransL,
-                           theRR, theLtransR, theRI, theLtransI,
-                           aSeq, aTrsf)) {
-      return NULL;
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  //Make a Python command
-  TCollection_AsciiString anEntry, aListRes("[");
-  // Iterate over the sequence aSeq
-  Standard_Integer aNbGroups = aSeq->Length();
-  Standard_Integer i = 1;
-  for (; i <= aNbGroups; i++) {
-    Handle(Standard_Transient) anItem = aSeq->Value(i);
-    if (anItem.IsNull()) continue;
-    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(anItem);
-    if (aGroup.IsNull()) continue;
-    //Make a Python command
-    TDF_Tool::Entry(aGroup->GetEntry(), anEntry);
-    aListRes += anEntry + ", ";
-  }
-  aListRes.Trunc(aListRes.Length() - 2);
-
-  GEOM::TPythonDump pd (aFunction);
-
-  pd << aListRes.ToCString() << "] = geompy.MakePipeTShape("
-     << theR1 << ", " << theW1 << ", " << theL1 << ", "
-     << theR2 << ", " << theW2 << ", " << theL2 << ", "
-     << theHexMesh << ", " << theP1 << ", " << theP2 << ", " << theP3;
-
-  // thickness reduction
-  if (isTRL)
-    pd << ", theRL=" << theRL << ", theWL=" << theWL
-       << ", theLtransL=" << theLtransL << ", theLthinL=" << theLthinL;
-  if (isTRR)
-    pd << ", theRR=" << theRR << ", theWR=" << theWR
-       << ", theLtransR=" << theLtransR << ", theLthinR=" << theLthinR;
-  if (isTRI)
-    pd << ", theRI=" << theRI << ", theWI=" << theWI
-       << ", theLtransI=" << theLtransI << ", theLthinI=" << theLthinI;
-
-  pd << ")";
-
-  SetErrorCode(OK);
-
-  return aSeq;
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeChamfer
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length). A chamfer is created
- *  on the junction of the pipes.
- *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theH Height of chamfer.
- *  \param theW Width of chamfer.
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-Handle(TColStd_HSequenceOfTransient)
-GEOMImpl_IAdvancedOperations::MakePipeTShapeChamfer
-                             (double theR1, double theW1, double theL1,
-                              double theR2, double theW2, double theL2,
-                              double theRL, double theWL, double theLtransL, double theLthinL,
-                              double theRR, double theWR, double theLtransR, double theLthinR,
-                              double theRI, double theWI, double theLtransI, double theLthinI,
-                              double theH, double theW,
-                              bool theHexMesh)
-{
-  SetErrorCode(KO);
-  //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
-  //Add a new shape function with parameters
-  Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
-  if (aFunction.IsNull()) return NULL;
-
-  //Check if the function is set correctly
-  if (aFunction->GetDriverGUID() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL;
-
-  GEOMImpl_IPipeTShape aData(aFunction);
-
-  aData.SetR1(theR1);
-  aData.SetW1(theW1);
-  aData.SetL1(theL1);
-  aData.SetR2(theR2);
-  aData.SetW2(theW2);
-  aData.SetL2(theL2);
-  aData.SetH(theH);
-  aData.SetW(theW);
-  aData.SetHexMesh(theHexMesh);
-
-  bool isTRL = (theRL + theWL + theLtransL + theLthinL) > Precision::Confusion();
-  bool isTRR = (theRR + theWR + theLtransR + theLthinR) > Precision::Confusion();
-  bool isTRI = (theRI + theWI + theLtransI + theLthinI) > Precision::Confusion();
-
-  //Compute the resulting value
-  try {
-    OCC_CATCH_SIGNALS;
-    if (!GetSolver()->ComputeFunction(aFunction)) {
-      SetErrorCode("TShape driver failed");
-      return NULL;
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  // BEGIN of chamfer
-  TopoDS_Shape aShapeShape = aShape->GetValue();
-  TopTools_IndexedMapOfShape anEdgesIndices;
-  TopExp::MapShapes(aShapeShape, anEdgesIndices);
-  // Common edges on external cylinders
-  Handle(GEOM_Object) box_e;
-  if (theHexMesh) {
-    box_e = my3DPrimOperations->MakeBoxDXDYDZ(theR2+theW2, theR2+theW2, theR1+theW1);
-  }
-  else {
-    box_e = my3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
-  }
-  box_e->GetLastFunction()->SetDescription("");
-  box_e = myTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
-  box_e->GetLastFunction()->SetDescription("");
-
-  Handle(TColStd_HSequenceOfInteger) edges_e =
-    myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
-  box_e->GetLastFunction()->SetDescription("");
-
-  if (edges_e.IsNull() || edges_e->Length() == 0) {
-    SetErrorCode("External edges not found");
-    return NULL;
-  }
-  int nbEdgesInChamfer = 0;
-  std::list<int> theEdges;
-  for (int i=1; i<=edges_e->Length();i++) {
-    int edgeID = edges_e->Value(i);
-    TopoDS_Shape theEdge = anEdgesIndices.FindKey(edgeID);
-    TopExp_Explorer Ex(theEdge,TopAbs_VERTEX);
-    int iv=0;
-    while (Ex.More()) {
-      iv ++;
-      gp_Pnt aPt = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
-      if (Abs(aPt.Z() - (theR1+theW1)) <= Precision::Confusion()) {
-        nbEdgesInChamfer ++;
-        theEdges.push_back(edgeID);
-      }
-      Ex.Next();
-    }
-    if (theHexMesh && nbEdgesInChamfer == 1)
-      break;
-  }
-  Handle(GEOM_Object) aChamfer;
-  try {
-    aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-  if (aChamfer.IsNull()) {
-    SetErrorCode("Chamfer can not be computed on the given shape with the given parameters");
-    return NULL;
-  }
-  aChamfer->GetLastFunction()->SetDescription("");
-
-  TopoDS_Shape aChamferShape = aChamfer->GetValue();
-  aFunction->SetValue(aChamferShape);
-  // END of chamfer
-
-  if (theHexMesh) {
-    if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, 0, false))
-      return NULL;
-    if (!MakePipeTShapeMirrorAndGlue(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
-      return NULL;
-  }
-
-  // Add thickness reduction elements
-  // at the three extremities: Left, Right and Incident
-  try {
-    OCC_CATCH_SIGNALS;
-    if (isTRL || isTRR || isTRI) {
-      TopoDS_Shape aResShape =
-        MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
-                                         theRL, theWL, theLtransL, theLthinL,
-                                         theRR, theWR, theLtransR, theLthinR,
-                                         theRI, theWI, theLtransI, theLthinI,
-                                         !theHexMesh);
-      aFunction->SetValue(aResShape);
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
-  aSeq->Append(aShape);
-
-  try {
-    if (theHexMesh) {
-      // Get the groups
-      if (!MakeGroups(aShape, TSHAPE_CHAMFER, theR1, theW1, theL1, theR2, theW2, theL2,
-                      theH, theW, 0., aSeq, gp_Trsf()))
-        return NULL;
-    }
-
-    // Get internal group.
-    if (!MakeInternalGroup(aShape, theR1, theL1, theR2, theL2, theRL, theLtransL,
-                           theRR, theLtransR, theRI, theLtransI,
-                           aSeq, gp_Trsf())) {
-      return NULL;
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  //Make a Python command
-  TCollection_AsciiString anEntry, aListRes("[");
-  // Iterate over the sequence aSeq
-  Standard_Integer aNbGroups = aSeq->Length();
-  Standard_Integer i = 1;
-  for (; i <= aNbGroups; i++) {
-    Handle(Standard_Transient) anItem = aSeq->Value(i);
-    if (anItem.IsNull()) continue;
-    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(anItem);
-    if (aGroup.IsNull()) continue;
-    //Make a Python command
-    TDF_Tool::Entry(aGroup->GetEntry(), anEntry);
-    aListRes += anEntry + ", ";
-  }
-  aListRes.Trunc(aListRes.Length() - 2);
-
-  GEOM::TPythonDump pd (aFunction);
-
-  pd << aListRes.ToCString() << "] = geompy.MakePipeTShapeChamfer("
-     << theR1 << ", " << theW1 << ", " << theL1 << ", "
-     << theR2 << ", " << theW2 << ", " << theL2 << ", "
-     << theH << ", " << theW << ", " << theHexMesh;
-
-  // thickness reduction
-  if (isTRL)
-    pd << ", theRL=" << theRL << ", theWL=" << theWL
-       << ", theLtransL=" << theLtransL << ", theLthinL=" << theLthinL;
-  if (isTRR)
-    pd << ", theRR=" << theRR << ", theWR=" << theWR
-       << ", theLtransR=" << theLtransR << ", theLthinR=" << theLthinR;
-  if (isTRI)
-    pd << ", theRI=" << theRI << ", theWI=" << theWI
-       << ", theLtransI=" << theLtransI << ", theLthinI=" << theLthinI;
-
-  pd << ")";
-
-  SetErrorCode(OK);
-
-  return aSeq;
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeChamferWithPosition
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length). A chamfer is created
- *  on the junction of the pipes.
- *  The extremities of the main pipe are located on junctions points P1 and P2.
- *  The extremity of the incident pipe is located on junction point P3.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theH Height of chamfer.
- *  \param theW Width of chamfer.
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \param theP1 1st junction point of main pipe
- *  \param theP2 2nd junction point of main pipe
- *  \param theP3 Junction point of incident pipe
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-Handle(TColStd_HSequenceOfTransient)
-GEOMImpl_IAdvancedOperations::MakePipeTShapeChamferWithPosition
-                             (double theR1, double theW1, double theL1,
-                              double theR2, double theW2, double theL2,
-                              double theRL, double theWL, double theLtransL, double theLthinL,
-                              double theRR, double theWR, double theLtransR, double theLthinR,
-                              double theRI, double theWI, double theLtransI, double theLthinI,
-                              double theH, double theW,
-                              bool theHexMesh,
-                              Handle(GEOM_Object) theP1,
-                              Handle(GEOM_Object) theP2,
-                              Handle(GEOM_Object) theP3)
-{
-  SetErrorCode(KO);
-  //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
-  //Add a new shape function with parameters
-  Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
-  if (aFunction.IsNull()) return NULL;
-
-  //Check if the function is set correctly
-  if (aFunction->GetDriverGUID() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL;
-
-  // Check new position
-  if (!CheckCompatiblePosition(theL1, theL2, theP1, theP2, theP3, 0.01)) {
-    return NULL;
-  }
-
-  GEOMImpl_IPipeTShape aData(aFunction);
-
-  aData.SetR1(theR1);
-  aData.SetW1(theW1);
-  aData.SetL1(theL1);
-  aData.SetR2(theR2);
-  aData.SetW2(theW2);
-  aData.SetL2(theL2);
-  aData.SetH(theH);
-  aData.SetW(theW);
-  aData.SetHexMesh(theHexMesh);
-
-  bool isTRL = (theRL + theWL + theLtransL + theLthinL) > Precision::Confusion();
-  bool isTRR = (theRR + theWR + theLtransR + theLthinR) > Precision::Confusion();
-  bool isTRI = (theRI + theWI + theLtransI + theLthinI) > Precision::Confusion();
-
-  //Compute the resulting value
-  try {
-    OCC_CATCH_SIGNALS;
-    if (!GetSolver()->ComputeFunction(aFunction)) {
-      SetErrorCode("TShape driver failed");
-      return NULL;
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  // BEGIN of chamfer
-  TopoDS_Shape aShapeShape = aShape->GetValue();
-  TopTools_IndexedMapOfShape anEdgesIndices;
-  TopExp::MapShapes(aShapeShape, anEdgesIndices);
-  // Common edges on external cylinders
-  Handle(GEOM_Object) box_e;
-  if (theHexMesh) {
-    box_e = my3DPrimOperations->MakeBoxDXDYDZ(theR2+theW2, theR2+theW2, theR1+theW1);
-  }
-  else {
-    box_e = my3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
-  }
-  box_e->GetLastFunction()->SetDescription("");
-  box_e = myTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
-  box_e->GetLastFunction()->SetDescription("");
-
-  Handle(TColStd_HSequenceOfInteger) edges_e =
-    myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
-  box_e->GetLastFunction()->SetDescription("");
-
-  if (edges_e.IsNull() || edges_e->Length() == 0) {
-    SetErrorCode("External edges not found");
-    return NULL;
-  }
-  int nbEdgesInChamfer = 0;
-  std::list<int> theEdges;
-  for (int i=1; i<=edges_e->Length();i++) {
-    int edgeID = edges_e->Value(i);
-    TopoDS_Shape theEdge = anEdgesIndices.FindKey(edgeID);
-    TopExp_Explorer Ex(theEdge,TopAbs_VERTEX);
-    while (Ex.More()) {
-      gp_Pnt aPt = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
-      if (Abs(aPt.Z() - (theR1+theW1)) <= Precision::Confusion()) {
-        nbEdgesInChamfer ++;
-        theEdges.push_back(edgeID);
-      }
-      Ex.Next();
-    }
-    if (theHexMesh && nbEdgesInChamfer == 1)
-      break;
-  }
-  Handle(GEOM_Object) aChamfer;
-  try {
-    aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-  if (aChamfer.IsNull()) {
-    SetErrorCode("Chamfer can not be computed on the given shape with the given parameters");
-    return NULL;
-  }
-  aChamfer->GetLastFunction()->SetDescription("");
-
-  TopoDS_Shape aChamferShape = aChamfer->GetValue();
-  aFunction->SetValue(aChamferShape);
-  // END of chamfer
-
-  if (theHexMesh) {
-    if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, 0, false))
-      return NULL;
-    if (!MakePipeTShapeMirrorAndGlue(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
-      return NULL;
-  }
-
-  // Add thickness reduction elements
-  // at the three extremities: Left, Right and Incident
-  try {
-    OCC_CATCH_SIGNALS;
-    if (isTRL || isTRR || isTRI) {
-      TopoDS_Shape aResShape =
-        MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
-                                         theRL, theWL, theLtransL, theLthinL,
-                                         theRR, theWR, theLtransR, theLthinR,
-                                         theRI, theWI, theLtransI, theLthinI,
-                                         !theHexMesh);
-      aFunction->SetValue(aResShape);
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  // Set Position
-  gp_Trsf aTrsf = GetPositionTrsf(theL1, theL2, theP1, theP2, theP3);
-  BRepBuilderAPI_Transform aTransformation (aShape->GetValue(), aTrsf, Standard_False);
-  TopoDS_Shape aTrsf_Shape = aTransformation.Shape();
-  aFunction->SetValue(aTrsf_Shape);
-
-  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
-  aSeq->Append(aShape);
-
-  try {
-    if (theHexMesh) {
-      // Get the groups
-      if (!MakeGroups(aShape, TSHAPE_CHAMFER, theR1, theW1, theL1, theR2, theW2, theL2,
-                      theH, theW, 0., aSeq, aTrsf))
-        return NULL;
-    }
-
-    // Get internal group.
-    if (!MakeInternalGroup(aShape, theR1, theL1, theR2, theL2, theRL, theLtransL,
-                           theRR, theLtransR, theRI, theLtransI,
-                           aSeq, aTrsf)) {
-      return NULL;
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  //Make a Python command
-  TCollection_AsciiString anEntry, aListRes("[");
-  // Iterate over the sequence aSeq
-  Standard_Integer aNbGroups = aSeq->Length();
-  Standard_Integer i = 1;
-  for (; i <= aNbGroups; i++) {
-    Handle(Standard_Transient) anItem = aSeq->Value(i);
-    if (anItem.IsNull()) continue;
-    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(anItem);
-    if (aGroup.IsNull()) continue;
-    //Make a Python command
-    TDF_Tool::Entry(aGroup->GetEntry(), anEntry);
-    aListRes += anEntry + ", ";
-  }
-  aListRes.Trunc(aListRes.Length() - 2);
-
-  GEOM::TPythonDump pd (aFunction);
-
-  pd << aListRes.ToCString() << "] = geompy.MakePipeTShapeChamfer("
-     << theR1 << ", " << theW1 << ", " << theL1 << ", "
-     << theR2 << ", " << theW2 << ", " << theL2 << ", "
-     << theH << ", " << theW << ", " << theHexMesh << ", "
-     << theP1 << ", " << theP2 << ", " << theP3;
-
-  // thickness reduction
-  if (isTRL)
-    pd << ", theRL=" << theRL << ", theWL=" << theWL
-       << ", theLtransL=" << theLtransL << ", theLthinL=" << theLthinL;
-  if (isTRR)
-    pd << ", theRR=" << theRR << ", theWR=" << theWR
-       << ", theLtransR=" << theLtransR << ", theLthinR=" << theLthinR;
-  if (isTRI)
-    pd << ", theRI=" << theRI << ", theWI=" << theWI
-       << ", theLtransI=" << theLtransI << ", theLthinI=" << theLthinI;
-
-  pd << ")";
-
-  SetErrorCode(OK);
-
-  return aSeq;
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeFillet
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length). A fillet is created
- *  on the junction of the pipes.
- *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theRF Radius of curvature of fillet.
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-Handle(TColStd_HSequenceOfTransient)
-GEOMImpl_IAdvancedOperations::MakePipeTShapeFillet
-                             (double theR1, double theW1, double theL1,
-                              double theR2, double theW2, double theL2,
-                              double theRL, double theWL, double theLtransL, double theLthinL,
-                              double theRR, double theWR, double theLtransR, double theLthinR,
-                              double theRI, double theWI, double theLtransI, double theLthinI,
-                              double theRF, bool theHexMesh)
-{
-  SetErrorCode(KO);
-  //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
-  //Add a new shape function with parameters
-  Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
-  if (aFunction.IsNull()) return NULL;
-
-  //Check if the function is set correctly
-  if (aFunction->GetDriverGUID() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL;
-
-  GEOMImpl_IPipeTShape aData(aFunction);
-
-  aData.SetR1(theR1);
-  aData.SetW1(theW1);
-  aData.SetL1(theL1);
-  aData.SetR2(theR2);
-  aData.SetW2(theW2);
-  aData.SetL2(theL2);
-  aData.SetRF(theRF);
-  aData.SetHexMesh(theHexMesh);
-
-  bool isTRL = (theRL + theWL + theLtransL + theLthinL) > Precision::Confusion();
-  bool isTRR = (theRR + theWR + theLtransR + theLthinR) > Precision::Confusion();
-  bool isTRI = (theRI + theWI + theLtransI + theLthinI) > Precision::Confusion();
-
-  //Compute the resulting value
-  try {
-    OCC_CATCH_SIGNALS;
-    if (!GetSolver()->ComputeFunction(aFunction)) {
-      SetErrorCode("TShape driver failed");
-      return NULL;
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  // BEGIN of fillet
-  TopoDS_Shape aShapeShape = aShape->GetValue();
-  TopTools_IndexedMapOfShape anEdgesIndices;
-  TopExp::MapShapes(aShapeShape, anEdgesIndices);
-  // Common edges on external cylinders
-  Handle(GEOM_Object) box_e;
-  if (theHexMesh) {
-    box_e = my3DPrimOperations->MakeBoxDXDYDZ(theR2+theW2, theR2+theW2, theR1+theW1);
-  }
-  else {
-    box_e = my3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
-  }
-  box_e->GetLastFunction()->SetDescription("");
-  box_e = myTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
-  box_e->GetLastFunction()->SetDescription("");
-
-  Handle(TColStd_HSequenceOfInteger) edges_e =
-    myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
-  box_e->GetLastFunction()->SetDescription("");
-
-  if (edges_e.IsNull() || edges_e->Length() == 0) {
-    SetErrorCode("External edges not found");
-    return NULL;
-  }
-  int nbEdgesInFillet = 0;
-  std::list<int> theEdges;
-  for (int i=1; i<=edges_e->Length();i++) {
-    int edgeID = edges_e->Value(i);
-    TopoDS_Shape theEdge = anEdgesIndices.FindKey(edgeID);
-    TopExp_Explorer Ex(theEdge,TopAbs_VERTEX);
-    while (Ex.More()) {
-      gp_Pnt aPt = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
-      if (Abs(aPt.Z() - (theR1+theW1)) <= Precision::Confusion()) {
-        nbEdgesInFillet ++;
-        theEdges.push_back(edgeID);
-      }
-      Ex.Next();
-    }
-    if (theHexMesh && nbEdgesInFillet == 1)
-      break;
-  }
-
-  Handle(GEOM_Object) aFillet;
-  try {
-    aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-  if (aFillet.IsNull()) {
-    //SetErrorCode("Fillet can not be computed on the given shape with the given parameters");
-    SetErrorCode(myLocalOperations->GetErrorCode());
-    return NULL;
-  }
-  aFillet->GetLastFunction()->SetDescription("");
-
-  TopoDS_Shape aFilletShape = aFillet->GetValue();
-  aFunction->SetValue(aFilletShape);
-  // END of fillet
-
-// VSR: debug issues 0021568 and 0021550 (15/05/2012) - BEGIN (1)
-// the following block, when enabled, leads to partitioning problems
-#if 0
-// VSR: debug issues 0021568 and 0021550 (15/05/2012) - END (1)
-  // BEGIN: Limit tolerances (debug)
-  Handle(GEOM_Object) aCorr1 = myHealingOperations->LimitTolerance(aShape, 1e-07);
-  TopoDS_Shape aCorr1Shape = aCorr1->GetValue();
-  aShape->GetLastFunction()->SetValue(aCorr1Shape);
-  aCorr1->GetLastFunction()->SetDescription("");
-  // END: Limit tolerances (debug)
-// VSR: debug issues 0021568 and 0021550 (15/05/2012) - BEGIN (2)
-#endif
-// VSR: debug issues 0021568 and 0021550 (15/05/2012) - END (2)
-
-  if (theHexMesh) {
-    if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2, 0, 0, theRF, false))
-      return NULL;
-    if (!MakePipeTShapeMirrorAndGlue(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
-      return NULL;
-  }
-
-  // Add thickness reduction elements
-  // at the three extremities: Left, Right and Incident
-  try {
-    OCC_CATCH_SIGNALS;
-    if (isTRL || isTRR || isTRI) {
-      TopoDS_Shape aResShape =
-        MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
-                                         theRL, theWL, theLtransL, theLthinL,
-                                         theRR, theWR, theLtransR, theLthinR,
-                                         theRI, theWI, theLtransI, theLthinI,
-                                         !theHexMesh);
-      aFunction->SetValue(aResShape);
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
-  aSeq->Append(aShape);
-
-  try {
-    if (theHexMesh) {
-      // Get the groups
-      if (!MakeGroups(aShape, TSHAPE_FILLET, theR1, theW1, theL1, theR2, theW2, theL2,
-                      0., 0., theRF, aSeq, gp_Trsf()))
-        return NULL;
-    }
-
-    // Get internal group.
-    if (!MakeInternalGroup(aShape, theR1, theL1, theR2, theL2, theRL, theLtransL,
-                           theRR, theLtransR, theRI, theLtransI,
-                           aSeq, gp_Trsf())) {
-      return NULL;
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  //Make a Python command
-  TCollection_AsciiString anEntry, aListRes("[");
-  // Iterate over the sequence aSeq
-  Standard_Integer aNbGroups = aSeq->Length();
-  Standard_Integer i = 1;
-  for (; i <= aNbGroups; i++) {
-    Handle(Standard_Transient) anItem = aSeq->Value(i);
-    if (anItem.IsNull()) continue;
-    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(anItem);
-    if (aGroup.IsNull()) continue;
-    //Make a Python command
-    TDF_Tool::Entry(aGroup->GetEntry(), anEntry);
-    aListRes += anEntry + ", ";
-  }
-  aListRes.Trunc(aListRes.Length() - 2);
-
-  GEOM::TPythonDump pd (aFunction);
-
-  pd << aListRes.ToCString() << "] = geompy.MakePipeTShapeFillet("
-     << theR1 << ", " << theW1 << ", " << theL1 << ", "
-     << theR2 << ", " << theW2 << ", " << theL2 << ", "
-     << theRF << ", " << theHexMesh;
-
-  // thickness reduction
-  if (isTRL)
-    pd << ", theRL=" << theRL << ", theWL=" << theWL
-       << ", theLtransL=" << theLtransL << ", theLthinL=" << theLthinL;
-  if (isTRR)
-    pd << ", theRR=" << theRR << ", theWR=" << theWR
-       << ", theLtransR=" << theLtransR << ", theLthinR=" << theLthinR;
-  if (isTRI)
-    pd << ", theRI=" << theRI << ", theWI=" << theWI
-       << ", theLtransI=" << theLtransI << ", theLthinI=" << theLthinI;
-
-  pd << ")";
-
-  SetErrorCode(OK);
-
-  return aSeq;
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeFilletWithPosition
- *  \brief Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length). A fillet is created
- *  on the junction of the pipes.
- *  The extremities of the main pipe are located on junctions points P1 and P2.
- *  The extremity of the incident pipe is located on junction point P3.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theRF Radius of curvature of fillet
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \param theP1 1st junction point of main pipe
- *  \param theP2 2nd junction point of main pipe
- *  \param theP3 Junction point of incident pipe
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-Handle(TColStd_HSequenceOfTransient)
-GEOMImpl_IAdvancedOperations::MakePipeTShapeFilletWithPosition
-                             (double theR1, double theW1, double theL1,
-                              double theR2, double theW2, double theL2,
-                              double theRL, double theWL, double theLtransL, double theLthinL,
-                              double theRR, double theWR, double theLtransR, double theLthinR,
-                              double theRI, double theWI, double theLtransI, double theLthinI,
-                              double theRF, bool theHexMesh,
-                              Handle(GEOM_Object) theP1,
-                              Handle(GEOM_Object) theP2,
-                              Handle(GEOM_Object) theP3)
-{
-  SetErrorCode(KO);
-  //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
-  //Add a new shape function with parameters
-  Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
-  if (aFunction.IsNull()) return NULL;
-
-  //Check if the function is set correctly
-  if (aFunction->GetDriverGUID() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL;
-
-  // Check new position
-  if (!CheckCompatiblePosition(theL1, theL2, theP1, theP2, theP3, 0.01)) {
-    return NULL;
-  }
-
-  GEOMImpl_IPipeTShape aData(aFunction);
-
-  aData.SetR1(theR1);
-  aData.SetW1(theW1);
-  aData.SetL1(theL1);
-  aData.SetR2(theR2);
-  aData.SetW2(theW2);
-  aData.SetL2(theL2);
-  aData.SetRF(theRF);
-  aData.SetHexMesh(theHexMesh);
-
-  bool isTRL = (theRL + theWL + theLtransL + theLthinL) > Precision::Confusion();
-  bool isTRR = (theRR + theWR + theLtransR + theLthinR) > Precision::Confusion();
-  bool isTRI = (theRI + theWI + theLtransI + theLthinI) > Precision::Confusion();
-
-  //Compute the resulting value
-  try {
-    OCC_CATCH_SIGNALS;
-    if (!GetSolver()->ComputeFunction(aFunction)) {
-      SetErrorCode("TShape driver failed");
-      return NULL;
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  // BEGIN of fillet
-  TopoDS_Shape aShapeShape = aShape->GetValue();
-  TopTools_IndexedMapOfShape anEdgesIndices;
-  TopExp::MapShapes(aShapeShape, anEdgesIndices);
-  // Common edges on external cylinders
-  Handle(GEOM_Object) box_e;
-  if (theHexMesh) {
-    box_e = my3DPrimOperations->MakeBoxDXDYDZ(theR2+theW2, theR2+theW2, theR1+theW1);
-  }
-  else {
-    box_e = my3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
-  }
-  box_e->GetLastFunction()->SetDescription("");
-  box_e = myTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
-  box_e->GetLastFunction()->SetDescription("");
-
-  Handle(TColStd_HSequenceOfInteger) edges_e =
-    myShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
-  box_e->GetLastFunction()->SetDescription("");
-
-  if (edges_e.IsNull() || edges_e->Length() == 0) {
-    SetErrorCode("External edges not found");
-    return NULL;
-  }
-  int nbEdgesInFillet = 0;
-  std::list<int> theEdges;
-  for (int i=1; i<=edges_e->Length();i++) {
-    int edgeID = edges_e->Value(i);
-    TopoDS_Shape theEdge = anEdgesIndices.FindKey(edgeID);
-    TopExp_Explorer Ex(theEdge,TopAbs_VERTEX);
-    while (Ex.More()) {
-      gp_Pnt aPt = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
-      if (Abs(aPt.Z() - (theR1+theW1)) <= Precision::Confusion()) {
-        nbEdgesInFillet ++;
-        theEdges.push_back(edgeID);
-      }
-      Ex.Next();
-    }
-    if (theHexMesh && nbEdgesInFillet == 1)
-      break;
-  }
-
-  Handle(GEOM_Object) aFillet;
-  try {
-    aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-  if (aFillet.IsNull()) {
-    SetErrorCode("Fillet can not be computed on the given shape with the given parameters");
-    return NULL;
-  }
-  aFillet->GetLastFunction()->SetDescription("");
-
-  TopoDS_Shape aFilletShape = aFillet->GetValue();
-  aFunction->SetValue(aFilletShape);
-  // END of fillet
-
-// VSR: debug issues 0021568 and 0021550 (15/05/2012) - BEGIN (3)
-// the following block, when enabled, leads to partitioning problems
-#if 0
-// VSR: debug issues 0021568 and 0021550 (15/05/2012) - END (3)
-  // BEGIN: Limit tolerances (debug)
-  Handle(GEOM_Object) aCorr1 = myHealingOperations->LimitTolerance(aShape, 1e-07);
-  TopoDS_Shape aCorr1Shape = aCorr1->GetValue();
-  aShape->GetLastFunction()->SetValue(aCorr1Shape);
-  aCorr1->GetLastFunction()->SetDescription("");
-  // END: Limit tolerances (debug)
-// VSR: debug issues 0021568 and 0021550 (15/05/2012) - BEGIN (4)
-#endif
-// VSR: debug issues 0021568 and 0021550 (15/05/2012) - END (4)
-
-  if (theHexMesh) {
-    if (!MakePipeTShapePartition(aShape, theR1, theW1, theL1, theR2, theW2, theL2, 0, 0, theRF, false))
-      return NULL;
-    if (!MakePipeTShapeMirrorAndGlue(aShape, theR1, theW1, theL1, theR2, theW2, theL2))
-      return NULL;
-  }
-
-  // Add thickness reduction elements
-  // at the three extremities: Left, Right and Incident
-  try {
-    OCC_CATCH_SIGNALS;
-    if (isTRL || isTRR || isTRI) {
-      TopoDS_Shape aResShape =
-        MakePipeTShapeThicknessReduction(aShape->GetValue(), theR1, theW1, theL1, theR2, theW2, theL2,
-                                         theRL, theWL, theLtransL, theLthinL,
-                                         theRR, theWR, theLtransR, theLthinR,
-                                         theRI, theWI, theLtransI, theLthinI,
-                                         !theHexMesh);
-      aFunction->SetValue(aResShape);
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  // Set Position
-  gp_Trsf aTrsf = GetPositionTrsf(theL1, theL2, theP1, theP2, theP3);
-  BRepBuilderAPI_Transform aTransformation (aShape->GetValue(), aTrsf, Standard_False);
-  TopoDS_Shape aTrsf_Shape = aTransformation.Shape();
-  aFunction->SetValue(aTrsf_Shape);
-
-  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
-  aSeq->Append(aShape);
-
-  try {
-    if (theHexMesh) {
-      // Get the groups
-      if (!MakeGroups(aShape, TSHAPE_FILLET, theR1, theW1, theL1, theR2, theW2, theL2,
-                      0., 0., theRF, aSeq, aTrsf))
-        return NULL;
-    }
-
-    // Get internal group.
-    if (!MakeInternalGroup(aShape, theR1, theL1, theR2, theL2, theRL, theLtransL,
-                           theRR, theLtransR, theRI, theLtransI,
-                           aSeq, aTrsf)) {
-      return NULL;
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  //Make a Python command
-  TCollection_AsciiString anEntry, aListRes("[");
-  // Iterate over the sequence aSeq
-  Standard_Integer aNbGroups = aSeq->Length();
-  Standard_Integer i = 1;
-  for (; i <= aNbGroups; i++) {
-    Handle(Standard_Transient) anItem = aSeq->Value(i);
-    if (anItem.IsNull()) continue;
-    Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(anItem);
-    if (aGroup.IsNull()) continue;
-    //Make a Python command
-    TDF_Tool::Entry(aGroup->GetEntry(), anEntry);
-    aListRes += anEntry + ", ";
-  }
-  aListRes.Trunc(aListRes.Length() - 2);
-
-  GEOM::TPythonDump pd (aFunction);
-
-  pd << aListRes.ToCString() << "] = geompy.MakePipeTShapeFillet("
-     << theR1 << ", " << theW1 << ", " << theL1 << ", "
-     << theR2  << ", " << theW2 << ", " << theL2 << ", "
-     << theRF << ", " << theHexMesh << ", "
-     << theP1 << ", " << theP2 << ", " << theP3;
-
-  // thickness reduction
-  if (isTRL)
-    pd << ", theRL=" << theRL << ", theWL=" << theWL
-       << ", theLtransL=" << theLtransL << ", theLthinL=" << theLthinL;
-  if (isTRR)
-    pd << ", theRR=" << theRR << ", theWR=" << theWR
-       << ", theLtransR=" << theLtransR << ", theLthinR=" << theLthinR;
-  if (isTRI)
-    pd << ", theRI=" << theRI << ", theWI=" << theWI
-       << ", theLtransI=" << theLtransI << ", theLthinI=" << theLthinI;
-
-  pd << ")";
-
-  SetErrorCode(OK);
-
-  return aSeq;
-}
-
-//=============================================================================
-/*!
- *  This function allows to create a disk already divided into blocks. It can be
- *  used to create divided pipes for later meshing in hexaedra.
- *  \param theR Radius of the disk
- *  \param theRatio Relative size of the central square diagonal against the disk diameter
- *  \param theOrientation Plane on which the disk will be built
- *  \param thePattern The division pattern of the disk (hexagon or square in the center)
- *  \return New GEOM_Object, containing the created shape.
- */
-//=============================================================================
-Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDisk (double theR, double theRatio, 
-                                                                   int theOrientation, int thePattern)
-{
-  SetErrorCode(KO);
-  
-  if (theOrientation != 1 &&
-      theOrientation != 2 &&
-      theOrientation != 3)
-  {
-    SetErrorCode("theOrientation must be 1(=OXY), 2(=OYZ) or 3(=OZX)");
-    return NULL;
-  }
-  //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
-
-  //Add a new shape function with parameters
-  Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_DividedDiskDriver::GetID(), DIVIDEDDISK_R_RATIO);
-  if (aFunction.IsNull()) return NULL;
-
-  //Check if the function is set correctly
-  if (aFunction->GetDriverGUID() != GEOMImpl_DividedDiskDriver::GetID()) return NULL;
-
-  GEOMImpl_IDividedDisk aData (aFunction);
-
-  aData.SetR(theR);
-  aData.SetRatio(theRatio);
-  aData.SetOrientation(theOrientation);
-  aData.SetType(thePattern);
-
-  //Compute the resulting value
-  try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
-    OCC_CATCH_SIGNALS;
-#endif
-    if (!GetSolver()->ComputeFunction(aFunction)) {
-      SetErrorCode("DividedDisk driver failed");
-      return NULL;
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-  
-  std::string aPatternStr;
-  
-  switch(thePattern)
-  {
-    case 0:
-      aPatternStr = "GEOM.SQUARE";
-      break;
-    case 1:
-      aPatternStr = "GEOM.HEXAGON";
-      break;
-  }
-  
-  //Make a Python command
-  GEOM::TPythonDump(aFunction) << aShape << " = geompy.MakeDividedDisk(" << theR << ", " << theOrientation << ", " << aPatternStr.c_str() << ")";
-
-  SetErrorCode(OK);
-
-  return aShape;
-}
-
-//=============================================================================
-/*!
- *  This function allows to create a disk already divided into blocks. It can be
- *  used to create divided pipes for later meshing in hexaedra.
- *  \param theR Radius of the disk
- *  \param theRatio Relative size of the central square diagonal against the disk diameter
- *  \return New GEOM_Object, containing the created shape.
- */
-//=============================================================================
-Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDiskPntVecR (Handle(GEOM_Object) thePnt, 
-                                                                          Handle(GEOM_Object) theVec, 
-                                                                          double theR, 
-                                                                          double theRatio,
-                                                                          int    thePattern)
-{
-  SetErrorCode(KO);
-
-  //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
-
-  //Add a new shape function with parameters
-  Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_DividedDiskDriver::GetID(), DIVIDEDDISK_R_VECTOR_PNT);
-  if (aFunction.IsNull()) return NULL;
-
-  //Check if the function is set correctly
-  if (aFunction->GetDriverGUID() != GEOMImpl_DividedDiskDriver::GetID()) return NULL;
-
-  GEOMImpl_IDividedDisk aData (aFunction);
-  
-  Handle(GEOM_Function) aRefPnt = thePnt->GetLastFunction();
-  Handle(GEOM_Function) aRefVec = theVec->GetLastFunction();
-
-  if (aRefPnt.IsNull() || aRefVec.IsNull()) return NULL;
-
-  aData.SetCenter(aRefPnt);
-  aData.SetVector(aRefVec);
-
-  aData.SetR(theR);
-  aData.SetRatio(theRatio);
-  aData.SetType(thePattern);
-
-  //Compute the resulting value
-  try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
-    OCC_CATCH_SIGNALS;
-#endif
-    if (!GetSolver()->ComputeFunction(aFunction)) {
-      SetErrorCode("DividedDisk driver failed");
-      return NULL;
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-  
-  std::string aPatternStr;
-  
-  switch(thePattern)
-  {
-    case 0:
-      aPatternStr = "GEOM.SQUARE";
-      break;
-    case 1:
-      aPatternStr = "GEOM.HEXAGON";
-      break;
-  }
-  
-
-  //Make a Python command
-  GEOM::TPythonDump(aFunction) << aShape << " = geompy.MakeDividedDiskPntVecR(" << thePnt << ", " << theVec << ", " << theR << ", " << aPatternStr.c_str() << ")";
-
-  SetErrorCode(OK);
-
-  return aShape;
-}
-
-//=============================================================================
-/*!
- *  Builds a cylinder prepared for hexa meshes
- *  \param theR Radius of the cylinder
- *  \param theH Height of the cylinder
- *  \return New GEOM_Object, containing the created shape.
- */
-//=============================================================================
-Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedCylinder (double theR, 
-                                                                       double theH,
-                                                                       int    thePattern)
-{
-  SetErrorCode(KO);
-  
-  //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDCYLINDER);
-
-  Handle(GEOM_Object) aBaseShape = MakeDividedDisk(theR, 67.0, 1, thePattern);
-  aBaseShape->GetLastFunction()->SetDescription("");   // Erase dump of MakeDividedDisk
-  
-  aShape = my3DPrimOperations->MakePrismDXDYDZ(aBaseShape,0.0,0.0,theH, -1.0);
-        
-  Handle(GEOM_Function) aFunction =  aShape->GetLastFunction();
-  aFunction->SetDescription("");   // Erase dump of MakePrismDXDYDZ
-  aShape->SetType(GEOM_DIVIDEDCYLINDER);
-  
-  std::string aPatternStr;
-  
-  switch(thePattern)
-  {
-    case 0:
-      aPatternStr = "GEOM.SQUARE";
-      break;
-    case 1:
-      aPatternStr = "GEOM.HEXAGON";
-      break;
-  }
-  
-  //Make a Python command
-  GEOM::TPythonDump(aFunction) << aShape << " = geompy.MakeDividedCylinder(" << theR << ", " << theH << ", " << aPatternStr.c_str() << ")";
-
-  SetErrorCode(OK);
-
-  return aShape;
-}
-//=============================================================================
-/*!
- *  Create a smoothing surface from a set of points
- *  \param thelPoints list of points or compounds of points
- *  \param theNbMax maximum number of Bezier pieces in the resulting surface.
- *  \param theDegMax maximum degree of the resulting BSpline surface
- *  \param theDMax specifies maximum value of the GeomPlate_PlateG0Criterion criterion.
- *  \return New GEOM_Object, containing the created shape.
- */
-//=============================================================================
-Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeSmoothingSurface (std::list<Handle(GEOM_Object)> thelPoints, 
-                                                                        int                            theNbMax,
-                                                                        int                            theDegMax,
-                                                                        double                         theDMax)
-{
-  SetErrorCode(KO);
-
-  //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_SMOOTHINGSURFACE);
-
-  //Add a new shape function with parameters
-  Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_SmoothingSurfaceDriver::GetID(), SMOOTHINGSURFACE_LPOINTS);
-  if (aFunction.IsNull()) return NULL;
-
-  //Check if the function is set correctly
-  if (aFunction->GetDriverGUID() != GEOMImpl_SmoothingSurfaceDriver::GetID()) return NULL;
-
-  GEOMImpl_ISmoothingSurface aData (aFunction);
-
-  int aLen = thelPoints.size();
-  aData.SetLength(aLen);
-  int ind = 1;
-  std::list<Handle(GEOM_Object)>::iterator it = thelPoints.begin();
-  for (; it != thelPoints.end(); it++, ind++) {
-    Handle(GEOM_Function) aRefObj = (*it)->GetLastFunction();
-    if (aRefObj.IsNull()) {
-      SetErrorCode("NULL point or compound for bSplineFaceShape");
-      return NULL;
-    }
-    aData.SetPntOrComp(ind, aRefObj);
-  }
-
-  aData.SetNbMax(theNbMax);
-  aData.SetDegMax(theDegMax);
-  aData.SetDMax(theDMax);
-
-  //Compute the resulting value
-  try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
-    OCC_CATCH_SIGNALS;
-#endif
-    if (!GetSolver()->ComputeFunction(aFunction)) {
-      SetErrorCode("SmoothingSurface driver failed");
-      return NULL;
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  //Make a Python command
-  GEOM::TPythonDump pd (aFunction);
-  pd << aShape << " = geompy.MakeSmoothingSurface([";
-  it = thelPoints.begin();
-  pd << (*it++);
-  while (it != thelPoints.end()) {
-    pd << ", " << (*it++);
-  }
-  pd << "], "
-     << theNbMax << ", "
-     << theDegMax << ", "
-     << theDMax <<")";
-
-  SetErrorCode(OK);
-
-  return aShape;
-}
-/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
diff --git a/src/AdvancedEngine/GEOMImpl_IAdvancedOperations.hxx b/src/AdvancedEngine/GEOMImpl_IAdvancedOperations.hxx
deleted file mode 100644 (file)
index 8f59a95..0000000
+++ /dev/null
@@ -1,245 +0,0 @@
-// 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, or (at your option) any 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   : GEOMImpl_IAdvancedOperations.hxx
-//  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
-
-#ifndef _GEOMImpl_IAdvancedOperations_HXX_
-#define _GEOMImpl_IAdvancedOperations_HXX_
-
-#include <Utils_SALOME_Exception.hxx>
-#include "GEOM_IOperations.hxx"
-#include "GEOM_Engine.hxx"
-#include "GEOM_Object.hxx"
-
-#include <list>
-#include <gp_Ax2.hxx>
-
-class GEOMImpl_IBasicOperations;
-class GEOMImpl_IBooleanOperations;
-class GEOMImpl_IShapesOperations;
-class GEOMImpl_ITransformOperations;
-class GEOMImpl_IBlocksOperations;
-class GEOMImpl_I3DPrimOperations;
-class GEOMImpl_ILocalOperations;
-class GEOMImpl_IHealingOperations;
-class GEOMImpl_IGroupOperations;
-class Handle_Geom_Surface;
-class TopTools_ListOfShape;
-
-class GEOMImpl_IAdvancedOperations: public GEOM_IOperations {
-private:
-  bool MakePipeTShapePartition(Handle(GEOM_Object) theShape,
-                               double theR1, double theW1, double theL1,
-                               double theR2, double theW2, double theL2,
-                               double theH = 0, double theW = 0,
-                               double theRF = 0, bool isNormal = true);
-
-  bool MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
-                                   double theR1, double theW1, double theL1,
-                                   double theR2, double theW2, double theL2);
-
-  bool MakePipeTShapeThicknessReduction (Handle(GEOM_Object) theShape,
-                                         double theR1, double theW1, double theL1,
-                                         double theR2, double theW2, double theL2,
-                                         double theRL, double theWL, double theLtransL, double theLthinL,
-                                         double theRR, double theWR, double theLtransR, double theLthinR,
-                                         double theRI, double theWI, double theLtransI, double theLthinI);
-
-  bool MakeGroups(Handle(GEOM_Object) theShape, int shapType,
-                  double theR1, double theW1, double theL1,
-                  double theR2, double theW2, double theL2,
-                  double theH, double theW, double theRF,
-                  Handle(TColStd_HSequenceOfTransient) theSeq,
-                  gp_Trsf aTrsf);
-
-  bool GetFacesOnSurf(const TopoDS_Shape &theShape,
-                      const Handle_Geom_Surface& theSurface,
-                      const Standard_Real theTolerance,
-                      TopTools_ListOfShape &theFaces);
-
-  TopoDS_Shape MakeConicalFace(const gp_Ax2 &theAxis,
-                               const double theRadius,
-                               const double theRadiusThin,
-                               const double theHeight,
-                               const gp_Trsf &theTrsf);
-
-  bool MakeInternalGroup(const Handle(GEOM_Object) &theShape,
-                         const double theR1, const double theLen1,
-                         const double theR2, const double theLen2,
-                         const double theRL, const double theTransLenL,
-                         const double theRR, const double theTransLenR,
-                         const double theRI, const double theTransLenI,
-                         const Handle(TColStd_HSequenceOfTransient) &theSeq,
-                         const gp_Trsf &theTrsf);
-
-  gp_Trsf GetPositionTrsf(double theL1, double theL2,
-                          Handle(GEOM_Object) P1 = 0,
-                          Handle(GEOM_Object) P2 = 0,
-                          Handle(GEOM_Object) P3 = 0);
-
-  bool CheckCompatiblePosition(double& theL1, double& theL2, 
-                               Handle(GEOM_Object) theP1, 
-                               Handle(GEOM_Object) theP2,
-                               Handle(GEOM_Object) theP3,
-                               double theTolerance);
-
-private:
-  GEOMImpl_IBasicOperations*     myBasicOperations;
-  GEOMImpl_IBooleanOperations*   myBooleanOperations;
-  GEOMImpl_IShapesOperations*    myShapesOperations;
-  GEOMImpl_ITransformOperations* myTransformOperations;
-  GEOMImpl_IBlocksOperations*    myBlocksOperations;
-  GEOMImpl_I3DPrimOperations*    my3DPrimOperations;
-  GEOMImpl_ILocalOperations*     myLocalOperations;
-  GEOMImpl_IHealingOperations*   myHealingOperations;
-  GEOMImpl_IGroupOperations*     myGroupOperations;
-
-public:
-
-  /*!
-   * \brief Add three thickness reductions at the open ends of the pipe T-Shape
-   *
-   * \param theShape - the pipe T-Shape
-   * \param r1 - the internal radius of main pipe
-   * \param w1 - the thickness of main pipe
-   * \param l1 - the half-length of main pipe
-   * \param r2 - the internal radius of incident pipe
-   * \param w2 - the thickness of incident pipe
-   * \param l2 - the half-length of main pipe
-   * \param r*, w*, ltrans* and lthin* - internal radius, thickness, length of transition part
-   *                                     and length of thin part of left(L), right(R) and
-   *                                     incident(I) thickness reduction correspondingly
-   * \param fuseReductions - boolean flag (use true to generate single solid,
-   *                         false to obtain parts, useful for hexameshing)
-   * \retval TopoDS_Shape - Resulting shape
-   */
-  Standard_EXPORT static TopoDS_Shape MakePipeTShapeThicknessReduction
-                                     (TopoDS_Shape theShape,
-                                      double r1, double w1, double l1,
-                                      double r2, double w2, double l2,
-                                      double rL, double wL, double ltransL, double lthinL,
-                                      double rR, double wR, double ltransR, double lthinR,
-                                      double rI, double wI, double ltransI, double lthinI,
-                                      bool fuseReductions);
-
-  /*!
-   * \brief Create one thickness reduction element
-   *
-   * This method is called three times from MakePipeTShapeThicknessReduction
-   * to create three thickness reductions (one per each open end of a pipe T-Shape)
-   *
-   * \param theAxes - the position
-   * \param R - the internal radius of main pipe
-   * \param W - the thickness of main pipe
-   * \param Rthin - the internal radius of thin part
-   * \param Wthin - the thickness of thin part
-   * \param Ltrans - the length of transition part
-   * \param Lthin - the length of thin part
-   * \param fuse - boolean flag (use true to generate single solid,
-   *               false to obtain parts, useful for hexameshing)
-   * \retval TopoDS_Shape - Resulting shape
-   */
-  Standard_EXPORT static TopoDS_Shape MakeThicknessReduction (gp_Ax2 theAxes,
-                                                              const double R, const double W,
-                                                              const double Rthin, const double Wthin,
-                                                              const double Ltrans, const double Lthin,
-                                                              bool fuse);
-
-public:
-  Standard_EXPORT GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID);
-  Standard_EXPORT ~GEOMImpl_IAdvancedOperations();
-
-  Standard_EXPORT Handle(TColStd_HSequenceOfTransient) 
-                  MakePipeTShape(double theR1, double theW1, double theL1,
-                                 double theR2, double theW2, double theL2,
-                                 double theRL, double theWL, double theLtransL, double theLthinL,
-                                 double theRR, double theWR, double theLtransR, double theLthinR,
-                                 double theRI, double theWI, double theLtransI, double theLthinI,
-                                 bool theHexMesh = true);
-
-  Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
-                  MakePipeTShapeWithPosition(double theR1, double theW1, double theL1,
-                                             double theR2, double theW2, double theL2,
-                                             double theRL, double theWL, double theLtransL, double theLthinL,
-                                             double theRR, double theWR, double theLtransR, double theLthinR,
-                                             double theRI, double theWI, double theLtransI, double theLthinI,
-                                             bool theHexMesh = true,
-                                             Handle(GEOM_Object) P1 = 0,
-                                             Handle(GEOM_Object) P2 = 0,
-                                             Handle(GEOM_Object) P3 = 0);
-
-  Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
-                  MakePipeTShapeChamfer(double theR1, double theW1, double theL1,
-                                        double theR2, double theW2, double theL2,
-                                        double theRL, double theWL, double theLtransL, double theLthinL,
-                                        double theRR, double theWR, double theLtransR, double theLthinR,
-                                        double theRI, double theWI, double theLtransI, double theLthinI,
-                                        double theH,  double theW, 
-                                        bool theHexMesh = true);
-
-  Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
-                  MakePipeTShapeChamferWithPosition(double theR1, double theW1, double theL1,
-                                                    double theR2, double theW2, double theL2,
-                                                    double theH, double theW,
-                                                    double theRL, double theWL, double theLtransL, double theLthinL,
-                                                    double theRR, double theWR, double theLtransR, double theLthinR,
-                                                    double theRI, double theWI, double theLtransI, double theLthinI,
-                                                    bool theHexMesh = true,
-                                                    Handle(GEOM_Object) P1 = 0,
-                                                    Handle(GEOM_Object) P2 = 0,
-                                                    Handle(GEOM_Object) P3 = 0);
-
-  Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
-                  MakePipeTShapeFillet(double theR1, double theW1, double theL1,
-                                       double theR2, double theW2, double theL2,
-                                       double theRL, double theWL, double theLtransL, double theLthinL,
-                                       double theRR, double theWR, double theLtransR, double theLthinR,
-                                       double theRI, double theWI, double theLtransI, double theLthinI,
-                                       double theRF, bool theHexMesh = true);
-
-  Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
-                  MakePipeTShapeFilletWithPosition(double theR1, double theW1, double theL1,
-                                                   double theR2, double theW2, double theL2,
-                                                   double theRL, double theWL, double theLtransL, double theLthinL,
-                                                   double theRR, double theWR, double theLtransR, double theLthinR,
-                                                   double theRI, double theWI, double theLtransI, double theLthinI,
-                                                   double theRF, bool theHexMesh = true,
-                                                   Handle(GEOM_Object) P1 = 0,
-                                                   Handle(GEOM_Object) P2 = 0,
-                                                   Handle(GEOM_Object) P3 = 0);
-                  
-  Standard_EXPORT Handle(GEOM_Object) MakeDividedDisk (double theR, double theRatio, 
-                                                       int theOrientation, int thePattern);
-  Standard_EXPORT Handle(GEOM_Object) MakeDividedDiskPntVecR (Handle(GEOM_Object) thePnt, 
-                                                              Handle(GEOM_Object) theVec, 
-                                                              double theR, 
-                                                              double theRatio,
-                                                              int    thePattern);
-  
-  Standard_EXPORT Handle(GEOM_Object) MakeDividedCylinder (double theR, 
-                                                           double theH,
-                                                           int thePattern);
-  
-  Standard_EXPORT Handle(GEOM_Object) MakeSmoothingSurface (std::list<Handle(GEOM_Object)> thelPoints, 
-                                                            int                            theNbMax,
-                                                            int                            theDegMax,
-                                                            double                         theDMax);
-  /*@@ insert new functions before this line @@ do not remove this line @@*/
-};
-#endif
diff --git a/src/AdvancedEngine/GEOMImpl_IDividedDisk.hxx b/src/AdvancedEngine/GEOMImpl_IDividedDisk.hxx
deleted file mode 100644 (file)
index 88a9944..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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 _GEOMImpl_IDividedDisk_HXX_
-#define _GEOMImpl_IDividedDisk_HXX_
-
-#include "GEOM_Function.hxx"
-
-#define DIVIDEDDISK_ARG_R      1
-#define DIVIDEDDISK_ARG_RATIO  2
-#define DIVIDEDDISK_ARG_ORIENT 3
-
-#define DIVIDEDDISK_ARG_CENTER 4
-#define DIVIDEDDISK_ARG_VECTOR 5
-
-#define DIVIDEDDISK_ARG_TYPE 6
-
-class GEOMImpl_IDividedDisk
-{
-public:
-  GEOMImpl_IDividedDisk(Handle(GEOM_Function) theFunction): _func(theFunction) {}
-
-  void SetR(double theR) { _func->SetReal(DIVIDEDDISK_ARG_R, theR); }
-  double GetR() { return _func->GetReal(DIVIDEDDISK_ARG_R); }
-
-  void SetRatio(double theRatio) { _func->SetReal(DIVIDEDDISK_ARG_RATIO, theRatio); }
-  double GetRatio() { return _func->GetReal(DIVIDEDDISK_ARG_RATIO); }
-  
-  void SetOrientation(int theOrientation) { _func->SetInteger(DIVIDEDDISK_ARG_ORIENT, theOrientation); }
-  int GetOrientation() { return _func->GetInteger(DIVIDEDDISK_ARG_ORIENT); }
-  
-  void SetType(int theType) { _func->SetInteger(DIVIDEDDISK_ARG_TYPE, theType); }
-  int GetType() { return _func->GetInteger(DIVIDEDDISK_ARG_TYPE); }
-  
-  void SetCenter(Handle(GEOM_Function) theP) { _func->SetReference(DIVIDEDDISK_ARG_CENTER, theP); }
-  void SetVector(Handle(GEOM_Function) theV) { _func->SetReference(DIVIDEDDISK_ARG_VECTOR, theV); }
-  
-  Handle(GEOM_Function) GetCenter() { return _func->GetReference(DIVIDEDDISK_ARG_CENTER); }
-  Handle(GEOM_Function) GetVector() { return _func->GetReference(DIVIDEDDISK_ARG_VECTOR); }
-
-private:
-  Handle(GEOM_Function) _func;
-};
-
-#endif // _GEOMImpl_IDividedDisk_HXX_
diff --git a/src/AdvancedEngine/GEOMImpl_IPipeTShape.hxx b/src/AdvancedEngine/GEOMImpl_IPipeTShape.hxx
deleted file mode 100644 (file)
index 4308569..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-// 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, or (at your option) any 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 _GEOMImpl_IPipeTShape_HXX_
-#define _GEOMImpl_IPipeTShape_HXX_
-
-#include "GEOM_Function.hxx"
-
-#include <TColStd_HArray1OfReal.hxx>
-
-class GEOMImpl_IPipeTShape
-{
-public:
-  GEOMImpl_IPipeTShape(Handle(GEOM_Function) theFunction): _func(theFunction) {}
-
-  void SetR1(double theR1) { _func->SetReal(TSHAPE_ARG_R1, theR1); }
-  double GetR1() { return _func->GetReal(TSHAPE_ARG_R1); }
-
-  void SetW1(double theW1) { _func->SetReal(TSHAPE_ARG_W1, theW1); }
-  double GetW1() { return _func->GetReal(TSHAPE_ARG_W1); }
-
-  void SetL1(double theL1) { _func->SetReal(TSHAPE_ARG_L1, theL1); }
-  double GetL1() { return _func->GetReal(TSHAPE_ARG_L1); }
-
-  void SetR2(double theR2) { _func->SetReal(TSHAPE_ARG_R2, theR2); }
-  double GetR2() { return _func->GetReal(TSHAPE_ARG_R2); }
-
-  void SetW2(double theW2) { _func->SetReal(TSHAPE_ARG_W2, theW2); }
-  double GetW2() { return _func->GetReal(TSHAPE_ARG_W2); }
-
-  void SetL2(double theL2) { _func->SetReal(TSHAPE_ARG_L2, theL2); }
-  double GetL2() { return _func->GetReal(TSHAPE_ARG_L2); }
-
-  void SetH(double theH) { _func->SetReal(TSHAPE_ARG_H, theH); }
-  double GetH() { return _func->GetReal(TSHAPE_ARG_H); }
-
-  void SetW(double theW) { _func->SetReal(TSHAPE_ARG_W, theW); }
-  double GetW() { return _func->GetReal(TSHAPE_ARG_W); }
-
-  void SetRF(double theRF) { _func->SetReal(TSHAPE_ARG_RF, theRF); }
-  double GetRF() { return _func->GetReal(TSHAPE_ARG_RF); }
-
-  void SetHexMesh(int theHexMesh) { _func->SetInteger(TSHAPE_ARG_HEXMESH, theHexMesh); }
-  int GetHexMesh() { return _func->GetInteger(TSHAPE_ARG_HEXMESH); }
-
-  void SetP1(const Handle(GEOM_Function)& theP1){_func->SetReference(TSHAPE_ARG_P1, theP1); }
-  Handle(GEOM_Function) GetP1() { return _func->GetReference(TSHAPE_ARG_P1); }
-
-  void SetP2(const Handle(GEOM_Function)& theP2){_func->SetReference(TSHAPE_ARG_P2, theP2); }
-  Handle(GEOM_Function) GetP2() { return _func->GetReference(TSHAPE_ARG_P2); }
-
-  void SetP3(const Handle(GEOM_Function)& theP3){_func->SetReference(TSHAPE_ARG_P3, theP3); }
-  Handle(GEOM_Function) GetP3() { return _func->GetReference(TSHAPE_ARG_P3); }
-
-private:
-  enum {
-    // main pipe
-    TSHAPE_ARG_R1 = 1,
-    TSHAPE_ARG_W1 = 2,
-    TSHAPE_ARG_L1 = 3,
-
-    // incident pipe
-    TSHAPE_ARG_R2 = 4,
-    TSHAPE_ARG_W2 = 5,
-    TSHAPE_ARG_L2 = 6,
-
-    // chamfer
-    TSHAPE_ARG_H  = 7,
-    TSHAPE_ARG_W  = 8,
-
-    // fillet
-    TSHAPE_ARG_RF = 9,
-
-    // partition
-    TSHAPE_ARG_HEXMESH = 10,
-
-    // junction points
-    TSHAPE_ARG_P1 = 11,
-    TSHAPE_ARG_P2 = 12,
-    TSHAPE_ARG_P3 = 13
-  };
-
-private:
-  Handle(GEOM_Function) _func;
-};
-
-#endif // _GEOMImpl_IPipeTShape_HXX_
diff --git a/src/AdvancedEngine/GEOMImpl_ISmoothingSurface.hxx b/src/AdvancedEngine/GEOMImpl_ISmoothingSurface.hxx
deleted file mode 100644 (file)
index ec3cf1a..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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 _GEOMImpl_ISmoothingSurface_HXX_
-#define _GEOMImpl_ISmoothingSurface_HXX_
-
-#include "GEOM_Function.hxx"
-
-#define SMOOTHINGSURFACE_ARG_LENG        1
-#define SMOOTHINGSURFACE_ARG_LAST        2
-#define SMOOTHINGSURFACE_ARG_NB_MAX      3
-#define SMOOTHINGSURFACE_ARG_DEG_MAX     4
-#define SMOOTHINGSURFACE_ARG_D_MAX       5
-
-class GEOMImpl_ISmoothingSurface
-{
-public:
-  GEOMImpl_ISmoothingSurface(Handle(GEOM_Function) theFunction): _func(theFunction) {}
-
-  void SetLength(int theLen) { _func->SetInteger(SMOOTHINGSURFACE_ARG_LENG, theLen); }
-  int GetLength() { return _func->GetInteger(SMOOTHINGSURFACE_ARG_LENG); }
-
-  void SetPntOrComp(int theId, Handle(GEOM_Function) theP) { _func->SetReference(SMOOTHINGSURFACE_ARG_LAST + theId, theP); }
-  Handle(GEOM_Function) GetPntOrComp(int theId) { return _func->GetReference(SMOOTHINGSURFACE_ARG_LAST + theId); }
-
-  void SetNbMax(int theNbMax) { _func->SetInteger(SMOOTHINGSURFACE_ARG_NB_MAX, theNbMax); }
-  int GetNbMax() { return _func->GetInteger(SMOOTHINGSURFACE_ARG_NB_MAX); }
-
-  void SetDegMax(int theDegMax) { _func->SetInteger(SMOOTHINGSURFACE_ARG_DEG_MAX, theDegMax); }
-  int GetDegMax() { return _func->GetInteger(SMOOTHINGSURFACE_ARG_DEG_MAX); }
-
-  void SetDMax(double theDMax) { _func->SetReal(SMOOTHINGSURFACE_ARG_D_MAX, theDMax); }
-  double GetDMax() { return _func->GetReal(SMOOTHINGSURFACE_ARG_D_MAX); }
-
-private:
-  Handle(GEOM_Function) _func;
-};
-
-#endif // _GEOMImpl_ISmoothingSurface_HXX_
diff --git a/src/AdvancedEngine/GEOMImpl_PipeTShapeDriver.cxx b/src/AdvancedEngine/GEOMImpl_PipeTShapeDriver.cxx
deleted file mode 100644 (file)
index 613806b..0000000
+++ /dev/null
@@ -1,678 +0,0 @@
-// 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, or (at your option) any 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 <GEOMImpl_PipeTShapeDriver.hxx>
-
-#include <GEOMImpl_IPipeTShape.hxx>
-#include <GEOMImpl_Types.hxx>
-#include <GEOMImpl_Block6Explorer.hxx>
-#include <GEOMImpl_IAdvancedOperations.hxx>
-
-#include <GEOM_Function.hxx>
-#include <GEOM_IOperations.hxx>
-
-#include <GEOMUtils.hxx>
-
-#include <GEOMAlgo_FinderShapeOn1.hxx>
-#include <GEOMAlgo_FinderShapeOn2.hxx>
-#include <GEOMAlgo_ClsfBox.hxx>
-
-#include <TFunction_Logbook.hxx>
-#include <StdFail_NotDone.hxx>
-
-// Partition includes
-#include <GEOMAlgo_Splitter.hxx>
-#include <Geom_CylindricalSurface.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_Vec.hxx>
-#include <gp_Ax2.hxx>
-#include <gp_Pln.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Trsf.hxx>
-
-#include <BRepPrimAPI_MakeCone.hxx>
-#include <BRepPrimAPI_MakeCylinder.hxx>
-#include <BRepAlgoAPI_Fuse.hxx>
-#include <BRepAlgoAPI_Cut.hxx>
-#include <BRepPrimAPI_MakeBox.hxx>
-#include <BRepBuilderAPI_MakeEdge.hxx>
-#include <BRepBuilderAPI_MakeFace.hxx>
-#include <BRepBuilderAPI_MakeWire.hxx>
-#include <BRepBuilderAPI_Transform.hxx>
-#include <BRepFilletAPI_MakeFillet.hxx>
-#include <BRepFilletAPI_MakeChamfer.hxx>
-#include <BRep_Builder.hxx>
-#include <TopoDS_Compound.hxx>
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepTools.hxx>
-#include <TopoDS.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-
-#include <vector>
-//@@ include required header files here @@//
-
-#include "AdvancedEngine_Types.hxx"
-
-//=======================================================================
-//function : GetID
-//purpose  :
-//=======================================================================
-const Standard_GUID& GEOMImpl_PipeTShapeDriver::GetID()
-{
-  static Standard_GUID aGUID("1C3A0F3F-729D-4E83-8232-78E74FC5637C");
-  return aGUID;
-}
-
-//=======================================================================
-//function : GEOMImpl_PipeTShapeDriver
-//purpose  :
-//=======================================================================
-GEOMImpl_PipeTShapeDriver::GEOMImpl_PipeTShapeDriver()
-{
-}
-
-//=======================================================================
-//function : getShapesOnBoxIDs
-  /*!
-   * \brief Find IDs of sub-shapes complying with given status about surface
-    * \param theBox - the box to check state of sub-shapes against
-    * \param theShape - the shape to explore
-    * \param theShapeType - type of sub-shape of theShape
-    * \param theState - required state
-    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
-   */
-//=======================================================================
-Handle(TColStd_HSequenceOfInteger)
-GEOMImpl_PipeTShapeDriver::GetShapesOnBoxIDs(const TopoDS_Shape& aBox,
-                    const TopoDS_Shape& aShape,
-                    const Standard_Integer theShapeType,
-                    GEOMAlgo_State theState) const
-{
-  Handle(TColStd_HSequenceOfInteger) aSeqOfIDs;
-
-  // Check presence of triangulation, build if need
-  if (!GEOMUtils::CheckTriangulation(aShape)) {
-    StdFail_NotDone::Raise("Cannot build triangulation on the shape");
-    return aSeqOfIDs;
-  }
-
-  // Call algo
-  GEOMAlgo_FinderShapeOn2 aFinder;
-  Standard_Real aTol = 0.0001; // default value
-
-  Handle(GEOMAlgo_ClsfBox) aClsfBox = new GEOMAlgo_ClsfBox;
-  aClsfBox->SetBox(aBox);
-
-  aFinder.SetShape(aShape);
-  aFinder.SetTolerance(aTol);
-  aFinder.SetClsf(aClsfBox);
-  aFinder.SetShapeType( (TopAbs_ShapeEnum)theShapeType );
-  aFinder.SetState(theState);
-  aFinder.Perform();
-
-  // Interprete results
-  Standard_Integer iErr = aFinder.ErrorStatus();
-  // the detailed description of error codes is in GEOMAlgo_FinderShapeOn1.cxx
-  if (iErr) {
-    TCollection_AsciiString aMsg (" iErr : ");
-    aMsg += TCollection_AsciiString(iErr);
-    StdFail_NotDone::Raise(aMsg.ToCString());
-    return aSeqOfIDs;
-  }
-
-
-  const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result
-
-  if (listSS.Extent() < 1) {
-    StdFail_NotDone::Raise(NOT_FOUND_ANY); // NPAL18017
-    return aSeqOfIDs;
-  }
-
-  // Fill sequence of object IDs
-  aSeqOfIDs = new TColStd_HSequenceOfInteger;
-
-  TopTools_IndexedMapOfShape anIndices;
-  TopExp::MapShapes(aShape, anIndices);
-
-  TopTools_ListIteratorOfListOfShape itSub (listSS);
-  for (int index = 1; itSub.More(); itSub.Next(), ++index) {
-    int id = anIndices.FindIndex(itSub.Value());
-//    std::cerr << "Shape with ID " << id << " found" << std::endl;
-    aSeqOfIDs->Append(id);
-  }
-
-  return aSeqOfIDs;
-}
-
-//=======================================================================
-//function : GetShapesOnSurfaceIDs
-  /*!
-   * \brief Find IDs of sub-shapes complying with given status about surface
-    * \param theSurface - the surface to check state of sub-shapes against
-    * \param theShape - the shape to explore
-    * \param theShapeType - type of sub-shape of theShape
-    * \param theState - required state
-    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
-   */
-//=======================================================================
-Handle(TColStd_HSequenceOfInteger)
-  GEOMImpl_PipeTShapeDriver::GetShapesOnSurfaceIDs(const Handle(Geom_Surface)& theSurface,
-                                                    const TopoDS_Shape&         theShape,
-                                                    TopAbs_ShapeEnum            theShapeType,
-                                                    GEOMAlgo_State              theState) const
-{
-  Handle(TColStd_HSequenceOfInteger) aSeqOfIDs;
-
-  // Check presence of triangulation, build if need
-  if (!GEOMUtils::CheckTriangulation(theShape)) {
-    StdFail_NotDone::Raise("Cannot build triangulation on the shape");
-    return aSeqOfIDs;
-  }
-
-  // Call algo
-  GEOMAlgo_FinderShapeOn1 aFinder;
-  Standard_Real aTol = 1e-6;
-
-  aFinder.SetShape(theShape);
-  aFinder.SetTolerance(aTol);
-  aFinder.SetSurface(theSurface);
-  aFinder.SetShapeType(theShapeType);
-  aFinder.SetState(theState);
-
-  // Sets the minimal number of inner points for the faces that do not have own
-  // inner points at all (for e.g. rectangular planar faces have just 2 triangles).
-  // Default value=3
-  aFinder.SetNbPntsMin(3);
-  // Sets the maximal number of inner points for edges or faces.
-  // It is usefull for the cases when this number is very big (e.g =2000) to improve
-  // the performance. If this value =0, all inner points will be taken into account.
-  // Default value=0
-  aFinder.SetNbPntsMax(0);
-
-  aFinder.Perform();
-
-  // Interprete results
-  Standard_Integer iErr = aFinder.ErrorStatus();
-  // the detailed description of error codes is in GEOMAlgo_FinderShapeOn1.cxx
-  if (iErr) {
-//    MESSAGE(" iErr : " << iErr);
-    TCollection_AsciiString aMsg (" iErr : ");
-    aMsg += TCollection_AsciiString(iErr);
-    StdFail_NotDone::Raise(aMsg.ToCString());
-    return aSeqOfIDs;
-  }
-//  Standard_Integer iWrn = aFinder.WarningStatus();
-  // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn1.cxx
-//  if (iWrn) {
-//    MESSAGE(" *** iWrn : " << iWrn);
-//  }
-
-  const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result
-
-  if (listSS.Extent() < 1) {
-    //StdFail_NotDone::Raise("Not a single sub-shape of the requested type found on the given surface");
-    StdFail_NotDone::Raise(NOT_FOUND_ANY); // NPAL18017
-    return aSeqOfIDs;
-  }
-
-  // Fill sequence of object IDs
-  aSeqOfIDs = new TColStd_HSequenceOfInteger;
-
-  TopTools_IndexedMapOfShape anIndices;
-  TopExp::MapShapes(theShape, anIndices);
-
-  TopTools_ListIteratorOfListOfShape itSub (listSS);
-  for (int index = 1; itSub.More(); itSub.Next(), ++index) {
-    int id = anIndices.FindIndex(itSub.Value());
-    aSeqOfIDs->Append(id);
-  }
-
-  return aSeqOfIDs;
-}
-
-//=======================================================================
-//function : GetCommonShapesOnCylinders
-//purpose  : return the common shapes between 2 cylindrical surfaces
-//           along OX and OZ
-//=======================================================================
-void GEOMImpl_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& theShape,
-                                                           TopAbs_ShapeEnum theShapeType,
-                                                           double r1,
-                                                           double r2,
-                                                           Handle(TopTools_HSequenceOfShape)& commonShapes) const
-{
-  gp_Pnt aP0 (0, 0, 0);
-  gp_Vec aVX = gp::DX(), aVZ = gp::DZ();
-  gp_Ax3 anAxis1 (aP0, aVX, aVZ), anAxis2 (aP0, aVZ, aVX);
-
-  TopTools_IndexedMapOfShape aMapOfShapes;
-  aMapOfShapes.Clear();
-  TopExp::MapShapes(theShape, aMapOfShapes);
-
-  commonShapes->Clear();
-
-  int myID;
-  bool found = false;
-
-  // Create a cylinder surface
-  Handle(Geom_Surface) aC1Ext = new Geom_CylindricalSurface(anAxis1, r1);
-  if ( aC1Ext.IsNull() )
-    StdFail_NotDone::Raise("Couldn't build main cylindrical surface");
-  // Find object IDs
-  Handle(TColStd_HSequenceOfInteger) aSeqExt1 = GetShapesOnSurfaceIDs( aC1Ext, theShape, theShapeType, GEOMAlgo_ST_ON );
-  // Create a cylinder surface
-  Handle(Geom_Surface) aC2Ext = new Geom_CylindricalSurface(anAxis2, r2);
-  if ( aC2Ext.IsNull() )
-    StdFail_NotDone::Raise("Couldn't build incident cylindrical surface");
-  // Find object IDs
-  Handle(TColStd_HSequenceOfInteger) aSeqExt2 = GetShapesOnSurfaceIDs( aC2Ext, theShape, theShapeType, GEOMAlgo_ST_ON );
-  // # Recherche (dans le quart de Te) de l'arete d'intersection des 2 cylindres
-  // # Search in theShape for common shape of type theShapeType on the intersection of 2 pipes
-  found = false;
-  for (int i=1; i<=aSeqExt2->Length();i++) {
-//    std::cerr << "aSeqExt2->Value(i): " << aSeqExt2->Value(i) << std::endl;
-    for (int j=1; j<=aSeqExt1->Length();j++) {
-//      std::cerr << "aSeqExt1->Value(j): " << aSeqExt1->Value(j) << std::endl;
-      if (aSeqExt1->Value(j) == aSeqExt2->Value(i)) {
-        myID = aSeqExt1->Value(j);
-        commonShapes->Append(aMapOfShapes.FindKey(myID));
-        found = true;
-      }
-    }
-  }
-  if (!found)
-    StdFail_NotDone::Raise("Common shapes couldn't be found");
-}
-
-//=======================================================================
-//function : MakePipeTShape
-//purpose  :
-//=======================================================================
-TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape (const double r1, const double w1, const double l1,
-                                                        const double r2, const double w2, const double l2) const
-{
-  double r1Ext = r1 + w1;
-  double r2Ext = r2 + w2;
-
-  gp_Pnt aP0 (0, 0, 0);
-  gp_Pnt aP1 (-l1, 0, 0);
-  gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ();
-  gp_Ax2 anAxes1 (aP1, aVX, aVZ);
-  gp_Ax2 anAxes2 (aP0, aVZ, aVX);
-
-  // Build the initial pipes
-  BRepPrimAPI_MakeCylinder C1Int (anAxes1, r1, Abs(2 * l1));
-  BRepPrimAPI_MakeCylinder C1Ext (anAxes1, r1Ext, Abs(2 * l1));
-  BRepPrimAPI_MakeCylinder C2Int (anAxes2, r2, Abs(l2));
-  BRepPrimAPI_MakeCylinder C2Ext (anAxes2, r2Ext, Abs(l2));
-  C1Int.Build();
-  C1Ext.Build();
-  C2Int.Build();
-  C2Ext.Build();
-  if (!C1Int.IsDone() || !C1Ext.IsDone() || !C2Int.IsDone() || !C2Ext.IsDone()) {
-    StdFail_NotDone::Raise("Cannot build cylinders");
-  }
-
-  // Fuse the 2 pipes
-  BRepAlgoAPI_Fuse fuse1 (C1Ext.Shape(), C2Ext.Shape());
-  if (!fuse1.IsDone()) {
-    StdFail_NotDone::Raise("Cannot fuse cylinders");
-  }
-
-  // Remove small radius main pipe
-  BRepAlgoAPI_Cut cut1 (fuse1.Shape(), C1Int.Shape());
-  if (!cut1.IsDone()) {
-    StdFail_NotDone::Raise("Coudn't cut cylinders");
-  }
-
-  // Remove small radius incident pipe => Te
-  BRepAlgoAPI_Cut Te (cut1.Shape(), C2Int.Shape());
-  if (!Te.IsDone()) {
-    StdFail_NotDone::Raise("Coudn't cut cylinders");
-  }
-
-  return Te.Shape();
-}
-
-//=======================================================================
-//function : MakeQuarterPipeTShape
-//purpose  :
-//=======================================================================
-TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakeQuarterPipeTShape (const double r1, const double w1, const double l1,
-                                                               const double r2, const double w2, const double l2) const
-{
-  TopoDS_Shape Te = MakePipeTShape(r1, w1, l1, r2, w2, l2);
-  if (Te.IsNull())
-    StdFail_NotDone::Raise("Couldn't build Pipe TShape");
-
-  // Get a quarter of shape => Te2
-  double r1Ext = r1 + w1;
-  BRepPrimAPI_MakeBox box1 (gp_Pnt(0, -2*r1Ext, -2*r1Ext), gp_Pnt( Abs(2 * l1), 2*r1Ext, Abs(2*l2)));
-  BRepPrimAPI_MakeBox box2 (gp_Pnt(0,  2*r1Ext, -2*r1Ext), gp_Pnt(-Abs(2 * l1), 0,       Abs(2*l2)));
-  box1.Build();
-  box2.Build();
-  if (!box1.IsDone() || !box2.IsDone()) {
-    StdFail_NotDone::Raise("Couldn't build boxes");
-  }
-  BRepAlgoAPI_Cut cut3 (Te, box1.Shape());
-  if (!cut3.IsDone()) {
-    StdFail_NotDone::Raise("Couldn't cut Pipe Tshape with box");
-  }
-  BRepAlgoAPI_Cut Te4 (cut3.Shape(), box2.Shape());
-  if (!Te4.IsDone()) {
-    StdFail_NotDone::Raise("Couldn't cut Pipe Tshape with box");
-  }
-
-  return Te4.Shape();
-}
-
-//=======================================================================
-//function : Execute
-//purpose  :
-//=======================================================================
-Standard_Integer GEOMImpl_PipeTShapeDriver::Execute (TFunction_Logbook& log) const
-{
-  if (Label().IsNull()) return 0;
-  Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
-
-  GEOMImpl_IPipeTShape aData (aFunction);
-  Standard_Integer aType = aFunction->GetType();
-
-  TopoDS_Shape aShape, Te4, Te4Part;
-  //TopoDS_Edge arete_intersect_int;
-  //Handle(TopTools_HSequenceOfShape) edges_e = new TopTools_HSequenceOfShape;
-  Handle(TColStd_HSequenceOfInteger) edges_e;
-  //Handle(TopTools_HSequenceOfShape) edges_i = new TopTools_HSequenceOfShape;
-  //gp_Pnt aP0 (0, 0, 0);
-  //gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ();
-  bool hexMesh = (bool) aData.GetHexMesh();
-
-  // Useful values
-  //double aSize = 2*(aData.GetL1() + aData.GetL2());
-  double epsilon = Precision::Approximation();
-  double aR1Ext = aData.GetR1() + aData.GetW1();
-  double aR2Ext = aData.GetR2() + aData.GetW2();
-
-  if (aData.GetR2() > aData.GetR1() + epsilon) {
-    StdFail_NotDone::Raise("TShape cannot be computed if R2 > R1");
-  }
-
-  if (aR2Ext > aR1Ext + epsilon) {
-    StdFail_NotDone::Raise("TShape cannot be computed if R2+W2 > R1+W1");
-  }
-
-  // external radius are equal
-  if (fabs(aR2Ext - aR1Ext) < epsilon) {
-    if (aType == TSHAPE_CHAMFER)
-      StdFail_NotDone::Raise("TShape with chamfer cannot be computed if R2+W2 = R1+W1");
-    if (aType == TSHAPE_FILLET)
-      StdFail_NotDone::Raise("TShape with fillet cannot be computed if R2+W2 = R1+W1");
-    // internal radius are different => not possible
-    if (fabs(aData.GetR2() - aData.GetR1()) > epsilon) {
-      StdFail_NotDone::Raise("TShape cannot be computed if R2+W2 = R1+W1 and R2 != R1");
-    }
-  }
-
-  if (aR1Ext >= aData.GetL2() + epsilon) {
-    StdFail_NotDone::Raise("TShape cannot be computed if R1+W1 >= L2");
-  }
-  if (aR2Ext >= aData.GetL1() + epsilon) {
-    StdFail_NotDone::Raise("TShape cannot be computed if R2+W2 >= L1");
-  }
-
-  if (aType == TSHAPE_CHAMFER) {
-    if (aData.GetH() >= (aData.GetL2() - aR1Ext + epsilon)) {
-      StdFail_NotDone::Raise("TShape cannot be computed: height of chamfer is too high");
-    }
-
-    if (aData.GetW() >= (aData.GetL1() - aR2Ext + epsilon))
-      StdFail_NotDone::Raise("TShape cannot be computed: width of chamfer is too high");
-  }
-
-  if (aType == TSHAPE_FILLET) {
-    if (aData.GetRF() >= (aData.GetL2() - aR1Ext + epsilon) ||
-        aData.GetRF() >= (aData.GetL1() - aR2Ext + epsilon))
-      StdFail_NotDone::Raise("TShape cannot be computed: radius of fillet is too high");
-  }
-
-  if (hexMesh) {
-    // Create a quarter of a basic T-Shape pipe
-    //std::cerr << "Create a quarter of a basic T-Shape pipe" << std::endl;
-    Te4 = MakeQuarterPipeTShape(aData.GetR1(), aData.GetW1(), aData.GetL1(),
-                                aData.GetR2(), aData.GetW2(), aData.GetL2());
-  }
-  else {
-    // No need to cut pipe t-shape
-    //std::cerr << "Create a basic T-Shape pipe" << std::endl;
-    Te4 = MakePipeTShape(aData.GetR1(), aData.GetW1(), aData.GetL1(),
-                         aData.GetR2(), aData.GetW2(), aData.GetL2());
-  }
-  aShape = Te4;
-/*
-  if (aType == TSHAPE_BASIC) {
-      aShape = Te4;
-//       aShape = MakeQuarterPipeTShape(aData.GetR1(), aData.GetW1(), aData.GetL1(),
-//       aData.GetR2(), aData.GetW2(), aData.GetL2());
-  }
-  else if (aType == TSHAPE_CHAMFER) {
-    // TShape with chamfer
-//     BRep_Builder BB;
-//     TopoDS_Compound CC;
-//     BB.MakeCompound(CC);
-    // Create chamfer on the edges edges_e
-    BRepFilletAPI_MakeChamfer chamfer (Te4);
-    TopTools_IndexedMapOfShape anEdgesIndices;
-    TopExp::MapShapes(Te4, anEdgesIndices);
-
-    TopoDS_Shape theBox;
-    if (hexMesh) {
-      BRepPrimAPI_MakeBox aBox (gp_Pnt(0,0,0),gp_Pnt(-aR2Ext, -aR2Ext, aR1Ext));
-      aBox.Build();
-      if (!aBox.IsDone()) {
-        StdFail_NotDone::Raise("Couldn't build box");
-      }
-      theBox = aBox.Shape();
-    }
-    else {
-      BRepPrimAPI_MakeBox aBox (gp_Pnt(aR2Ext,aR2Ext,0),gp_Pnt(-aR2Ext, -aR2Ext, aR1Ext));
-      aBox.Build();
-      if (!aBox.IsDone()) {
-        StdFail_NotDone::Raise("Couldn't build box");
-      }
-      theBox = aBox.Shape();
-    }
-    Handle(TColStd_HSequenceOfInteger) edges_e = new TColStd_HSequenceOfInteger;
-    edges_e = GetShapesOnBoxIDs(theBox, Te4, TopAbs_EDGE, GEOMAlgo_ST_IN);
-    if (edges_e.IsNull() || edges_e->Length() == 0) {
-      StdFail_NotDone::Raise("Common edges not found");
-    }
-
-    TopTools_IndexedDataMapOfShapeListOfShape M;
-    GEOMImpl_Block6Explorer::MapShapesAndAncestors(Te4, TopAbs_EDGE, TopAbs_FACE, M);
-//     std::cerr << "Number of IDs: " << edges_e->Length() << std::endl;
-    int nbEdgesInChamfer = 0;
-    for (int i=1;i<=edges_e->Length();i++) {
-//       std::cerr << "Get Edge with ID #" << i << std::endl;
-      int theId = edges_e->Value(i);
-//       std::cerr << "ID #" << i << "= " << theId << std::endl;
-//       std::cerr << "Search for edge in shape" << std::endl;
-      TopoDS_Edge theEdge = TopoDS::Edge(anEdgesIndices.FindKey(theId));
-//       std::cerr << "Found" << std::endl;
-//       std::cerr << "Keep only edges with a vertex on (x, x, re1)" << std::endl;
-      TopExp_Explorer ExVertices;
-      for (ExVertices.Init(theEdge,TopAbs_VERTEX); ExVertices.More(); ExVertices.Next()) {
-        gp_Pnt aPt = BRep_Tool::Pnt(TopoDS::Vertex(ExVertices.Current()));
-        if (aPt.Z() - aR1Ext <= epsilon) {
-//           std::cerr << "aPt.Z() = aR1Ext => keep this edge" << std::endl;
-          nbEdgesInChamfer ++;
-          const TopTools_ListOfShape& aFL = M.FindFromKey(theEdge);
-          TopoDS_Face F = TopoDS::Face( aFL.First() );
-          if (hexMesh)
-            chamfer.Add(aData.GetH(), aData.GetW(), theEdge, F);
-          else
-            chamfer.Add(aData.GetW(), aData.GetH(), theEdge, F);
-          break;
-        }
-      }
-//       std::cerr << "Test if hexMesh: ";
-      if (hexMesh && nbEdgesInChamfer == 1) {
-//         std::cerr << "Yes => stop after 1 edge" << std::endl;
-        break;
-      }
-//       std::cerr << "No => continue for other edges" << std::endl;
-  //  BB.Add(CC, edges_e->Value(i));
-  //  const TopTools_ListOfShape& aFL = M.FindFromKey(TopoDS::Edge(edges_e->Value(i)));
-  //  chamfer.Add(aData.GetW(), aData.GetH(), TopoDS::Edge(edges_e->Value(i)), F);
-    }
-//     std::cerr << "Build chamfer with " << nbEdgesInChamfer << " edges" << std::endl;
-//     }
-    chamfer.Build();
-    if (!chamfer.IsDone()) {
-      StdFail_NotDone::Raise("Chamfer can not be computed on the given shape with the given parameters");
-    }
-
-//     BB.Add(CC, chamfer.Shape());
-
-//     aShape = CC;
-    aShape = chamfer.Shape();
-  }
-  else if (aType == TSHAPE_FILLET) {
-    // TShape with fillet
-    // Create fillet on the edge arete_intersect_ext
-    BRepFilletAPI_MakeFillet fill (Te4);
-
-    TopTools_IndexedMapOfShape anIndices;
-    TopExp::MapShapes(Te4, anIndices);
-
-    TopoDS_Shape theBox;
-    if (hexMesh) {
-      BRepPrimAPI_MakeBox aBox (gp_Pnt(0,0,0),gp_Pnt(-aR2Ext, -aR2Ext, aR1Ext));
-      aBox.Build();
-      if (!aBox.IsDone()) {
-        StdFail_NotDone::Raise("Couldn't build box");
-      }
-      theBox = aBox.Shape();
-    }
-    else {
-      BRepPrimAPI_MakeBox aBox (gp_Pnt(aR2Ext,aR2Ext,0),gp_Pnt(-aR2Ext, -aR2Ext, aR1Ext));
-      aBox.Build();
-      if (!aBox.IsDone()) {
-        StdFail_NotDone::Raise("Couldn't build box");
-      }
-      theBox = aBox.Shape();
-    }
-    Handle(TColStd_HSequenceOfInteger) edges_e = new TColStd_HSequenceOfInteger;
-    edges_e = GetShapesOnBoxIDs(theBox, Te4, TopAbs_EDGE, GEOMAlgo_ST_IN);
-    if (edges_e.IsNull() || edges_e->Length() == 0) {
-      StdFail_NotDone::Raise("Common edges not found");
-    }
-
-//     fill.Add(TopoDS::Edge(edges_e->Value(1)));
-//     if (!hexMesh) {
-    for (int i=1;i<=edges_e->Length();i++) {
-      if (hexMesh && (i > 1))
-        break;
-      TopoDS_Edge theEdge = TopoDS::Edge(anIndices.FindKey(edges_e->Value(i)));
-      fill.Add(theEdge);
-//             fill.Add(TopoDS::Edge(edges_e->Value(i)));
-    }
-//     }
-    fill.SetRadius(aData.GetRF(), 1, 1);
-    fill.Build();
-    if (!fill.IsDone()) {
-      StdFail_NotDone::Raise("Fillet can't be computed on the given shape with the given radius");
-    }
-
-    aShape = fill.Shape();
-  }
-  else {
-    // other construction modes here
-  }
-*/
-  if (aShape.IsNull()) return 0;
-
-  aFunction->SetValue(aShape);
-
-  log.SetTouched(Label());
-
-  return 1;
-}
-
-//================================================================================
-/*!
- * \brief Returns a name of creation operation and names and values of creation parameters
- */
-//================================================================================
-
-bool GEOMImpl_PipeTShapeDriver::
-GetCreationInformation(std::string&             theOperationName,
-                       std::vector<GEOM_Param>& theParams)
-{
-  if (Label().IsNull()) return 0;
-  Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
-
-  GEOMImpl_IPipeTShape aCI( function );
-  Standard_Integer aType = function->GetType();
-
-  theOperationName = "PIPETSHAPE";
-
-  switch ( aType ) {
-  case TSHAPE_BASIC:
-    AddParam( theParams, "Main radius", aCI.GetR1() );
-    AddParam( theParams, "Main width", aCI.GetW1() );
-    AddParam( theParams, "Main half-length", aCI.GetL1() );
-    AddParam( theParams, "Incident pipe radius", aCI.GetR2() );
-    AddParam( theParams, "Incident pipe width", aCI.GetW2() );
-    AddParam( theParams, "Incident pipe half-length", aCI.GetL2() );
-    AddParam( theParams, "For hex mesh", aCI.GetHexMesh() );
-    break;
-  case TSHAPE_CHAMFER:
-    AddParam( theParams, "Main radius", aCI.GetR1() );
-    AddParam( theParams, "Main width", aCI.GetW1() );
-    AddParam( theParams, "Main half-length", aCI.GetL1() );
-    AddParam( theParams, "Incident pipe radius", aCI.GetR2() );
-    AddParam( theParams, "Incident pipe width", aCI.GetW2() );
-    AddParam( theParams, "Incident pipe half-length", aCI.GetL2() );
-    AddParam( theParams, "Chamfer height", aCI.GetH() );
-    AddParam( theParams, "Chamfer width", aCI.GetW() );
-    AddParam( theParams, "For hex mesh", aCI.GetHexMesh() );
-    break;
-  case TSHAPE_FILLET:
-    AddParam( theParams, "Main radius", aCI.GetR1() );
-    AddParam( theParams, "Main width", aCI.GetW1() );
-    AddParam( theParams, "Main half-length", aCI.GetL1() );
-    AddParam( theParams, "Incident pipe radius", aCI.GetR2() );
-    AddParam( theParams, "Incident pipe width", aCI.GetW2() );
-    AddParam( theParams, "Incident pipe half-length", aCI.GetL2() );
-    AddParam( theParams, "Fillet radius", aCI.GetRF() );
-    AddParam( theParams, "For hex mesh", aCI.GetHexMesh() );
-    break;
-  default:
-    return false;
-  }
-  
-  return true;
-}
-
-IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PipeTShapeDriver,GEOM_BaseDriver);
-IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PipeTShapeDriver,GEOM_BaseDriver);
diff --git a/src/AdvancedEngine/GEOMImpl_PipeTShapeDriver.hxx b/src/AdvancedEngine/GEOMImpl_PipeTShapeDriver.hxx
deleted file mode 100644 (file)
index 3bcdd55..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-// 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, or (at your option) any 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 _GEOMImpl_PipeTShapeDriver_HXX
-#define _GEOMImpl_PipeTShapeDriver_HXX
-
-#include <TFunction_Driver.hxx>
-
-#include "GEOMAlgo_State.hxx"
-
-#include <TopAbs_ShapeEnum.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_HSequenceOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TColStd_HSequenceOfInteger.hxx>
-#include <gp_Ax2.hxx>
-
-#include <Handle_Geom_Surface.hxx>
-
-class Handle_Standard_Type;
-class GEOMImpl_PipeTShapeDriver;
-
-
-
-#include "GEOM_BaseDriver.hxx"
-
-DEFINE_STANDARD_HANDLE( GEOMImpl_PipeTShapeDriver, GEOM_BaseDriver );
-
-class GEOMImpl_PipeTShapeDriver : public GEOM_BaseDriver {
-public:
- // Methods PUBLIC
-  // 
-  Standard_EXPORT GEOMImpl_PipeTShapeDriver();
-  Standard_EXPORT virtual  Standard_Integer Execute(TFunction_Logbook& log) const; 
-  Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {}
-  Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const
-  {
-    return Standard_True;
-  }
-  Standard_EXPORT static const Standard_GUID& GetID();
-  Standard_EXPORT ~GEOMImpl_PipeTShapeDriver() {};
-  
-  Standard_EXPORT virtual
-  bool GetCreationInformation(std::string&             theOperationName,
-                              std::vector<GEOM_Param>& params);
-  // Type management
-  //
-DEFINE_STANDARD_RTTI( GEOMImpl_PipeTShapeDriver )
-
-private:
-
-  /*!
-   * \brief Create a T-Shape based on pipes
-   * \param r1 - the internal radius of main pipe
-   * \param w1 - the thickness of main pipe
-   * \param l1 - the half-length of main pipe
-   * \param r2 - the internal radius of incident pipe
-   * \param w2 - the thickness of incident pipe
-   * \param l2 - the half-length of main pipe
-   * \retval TopoDS_Shape - Resulting shape
-   */
-  TopoDS_Shape MakePipeTShape(double r1, double w1, double l1,
-                              double r2, double w2, double l2) const;
-
-  /*!
-   * \brief Create a quarter of a T-Shape based on pipes
-   * \param r1 - the internal radius of main pipe
-   * \param w1 - the thickness of main pipe
-   * \param l1 - the half-length of main pipe
-   * \param r2 - the internal radius of incident pipe
-   * \param w2 - the thickness of incident pipe
-   * \param l2 - the half-length of main pipe
-   * \retval TopoDS_Shape - Resulting shape
-   */
-  TopoDS_Shape MakeQuarterPipeTShape(double r1, double w1, double l1,
-                                     double r2, double w2, double l2) const;
-
-  /*!
-   * \brief Find IDs of sub-shapes complying with given status about surface
-   * \param theSurface - the surface to check state of sub-shapes against
-   * \param theShape - the shape to explore
-   * \param theShapeType - type of sub-shape of theShape
-   * \param theState - required state
-   * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
-   */
-  Handle(TColStd_HSequenceOfInteger)
-    GetShapesOnSurfaceIDs(const Handle(Geom_Surface)& theSurface,
-                          const TopoDS_Shape&         theShape,
-                          TopAbs_ShapeEnum            theShapeType,
-                          GEOMAlgo_State              theState) const;
-
-  /*!
-   * \brief Find IDs of sub-shapes complying with given status about surface
-    * \param theBox - the box to check state of sub-shapes against
-    * \param theShape - the shape to explore
-    * \param theShapeType - type of sub-shape of theShape
-    * \param theState - required state
-    * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
-   */
-  Handle(TColStd_HSequenceOfInteger)
-  GetShapesOnBoxIDs(const TopoDS_Shape& aBox,
-                 const TopoDS_Shape& aShape,
-                 const Standard_Integer theShapeType,
-                 GEOMAlgo_State theState) const;
-
-  //=======================================================================
-  //function : getCommonShapesOnCylinders
-  //purpose  : return the common edge between 2 cylindrical surfaces
-  //           along OX and OZ
-  //=======================================================================
-  void GetCommonShapesOnCylinders(const TopoDS_Shape& theShape,
-                                  TopAbs_ShapeEnum theShapeType,
-                                  double r, double r2,
-                                  Handle(TopTools_HSequenceOfShape)& commonShapes) const;
-
-};
-
-#endif // _GEOMImpl_PipeTShapeDriver_HXX
diff --git a/src/AdvancedEngine/GEOMImpl_SmoothingSurfaceDriver.cxx b/src/AdvancedEngine/GEOMImpl_SmoothingSurfaceDriver.cxx
deleted file mode 100644 (file)
index 2b03455..0000000
+++ /dev/null
@@ -1,276 +0,0 @@
-// 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, or (at your option) any 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 <Standard_Stream.hxx>
-
-#include "AdvancedEngine_Types.hxx"
-
-#include <GEOMImpl_SmoothingSurfaceDriver.hxx>
-#include <GEOMImpl_ISmoothingSurface.hxx>
-#include <GEOMImpl_Types.hxx>
-#include <GEOM_Function.hxx>
-
-#include <TFunction_Logbook.hxx>
-#include <StdFail_NotDone.hxx>
-
-//@@ include required header files here @@//
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Compound.hxx>
-#include <TopoDS.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <TColgp_SequenceOfPnt.hxx>
-#include <TColgp_Array2OfPnt.hxx>
-#include <TColgp_SequenceOfXY.hxx>
-#include <TColgp_SequenceOfXYZ.hxx>
-#include <TColStd_Array1OfInteger.hxx>
-
-#include <BRepAdaptor_HSurface.hxx>
-
-#include <BRep_Builder.hxx>
-#include <BRepGProp.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepPrimAPI_MakeSphere.hxx>
-#include <BRepPrimAPI_MakeBox.hxx>
-#include <BRepBuilderAPI_MakeFace.hxx>
-#include <BRepAlgoAPI_Cut.hxx>
-
-#include <GeomPlate_Surface.hxx>
-#include <GeomPlate_BuildPlateSurface.hxx>
-#include <GeomPlate_PointConstraint.hxx>
-#include <GeomPlate_MakeApprox.hxx>
-#include <GeomPlate_PlateG0Criterion.hxx>
-#include <GeomPlate_BuildAveragePlane.hxx>
-
-#include <Geom_BSplineSurface.hxx>
-#include <Geom_Surface.hxx>
-#include <Geom_Plane.hxx>
-
-#include <GProp_GProps.hxx>
-#include <Bnd_Box.hxx>
-#include <BRepBndLib.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_Pln.hxx>
-#include <gp_Ax3.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Vec.hxx>
-
-#include <GC_MakePlane.hxx>
-//=======================================================================
-//function : GetID
-//purpose  :
-//=======================================================================
-const Standard_GUID& GEOMImpl_SmoothingSurfaceDriver::GetID()
-{
-  static Standard_GUID aGUID("1C3A0F30-729D-4E83-8232-78E74FC5637C");
-  return aGUID;
-}
-
-//=======================================================================
-//function : GEOMImpl_SmoothingSurfaceDriver
-//purpose  :
-//=======================================================================
-GEOMImpl_SmoothingSurfaceDriver::GEOMImpl_SmoothingSurfaceDriver()
-{
-}
-
-//=======================================================================
-//function : MakeSmoothingSurfaceUnClosed
-//purpose  :
-//=======================================================================
-TopoDS_Shape GEOMImpl_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed
-                          (const Handle_TColgp_HArray1OfPnt &theListOfPoints,
-                           const Standard_Integer            theNbMax,
-                           const Standard_Integer            theDegMax,
-                           const Standard_Real               theDMax) const
-{
-  TopoDS_Face aInitShape;
-  
-  // Create an average Plane
-  //Handle(TColgp_HArray1OfPnt) HAP = new TColgp_HArray1OfPnt(1,theListOfPoints.Length())
-  GeomPlate_BuildAveragePlane gpbap(theListOfPoints,theListOfPoints->Length(),Precision::Confusion(),1,1);
-  Handle(Geom_Plane) plane(gpbap.Plane());
-  Standard_Real Umin, Umax, Vmin, Vmax;
-  gpbap.MinMaxBox(Umin,Umax,Vmin,Vmax);
-  // cout << "Vals : " << Umin << ", " << Umax << ", " << Vmin << ", " << Vmax << endl;
-  BRepBuilderAPI_MakeFace mf(plane,Umin,Umax,Vmin,Vmax,Precision::Confusion());
-  aInitShape =  mf.Face();
-  //return aInitShape;
-
-  GeomPlate_BuildPlateSurface aBuilder(3,10);
-  // ** Initialization of surface
-  Handle(BRepAdaptor_HSurface) HSI = new BRepAdaptor_HSurface();
-  HSI->ChangeSurface().Initialize(aInitShape);
-  aBuilder.LoadInitSurface( BRep_Tool::Surface(HSI->ChangeSurface().Face()));
-
-  Standard_Integer j, j1, j2;
-  // cout << "Init surface" << endl;
-  j1 = theListOfPoints->Lower();
-  j2 = theListOfPoints->Upper();
-  for (j=j1; j<=j2 ; j++)
-  {
-    gp_Pnt aPnt = theListOfPoints->Value(j); 
-    Handle(GeomPlate_PointConstraint) PCont = new GeomPlate_PointConstraint(aPnt,0);
-    aBuilder.Add(PCont);
-  }
-  // cout << "avant Perform surface" << endl;
-  aBuilder.Perform();
-  // cout << "Perform surface" << endl;
-
-  // A ce niveau : surface algo
-  Handle(GeomPlate_Surface) gpPlate = aBuilder.Surface();
-  
-  Standard_Integer nbcarreau = (theNbMax > 0 ? theNbMax : 2);
-  Standard_Integer degmax = (theDegMax > 0 ? theDegMax : 8);
-  Standard_Real seuil = theDMax;
-
-  if (seuil <= 0.) {
-    seuil = Max(0.0001,10*aBuilder.G0Error());
-  }
-
-  GeomPlate_MakeApprox Mapp(gpPlate,0.0001,nbcarreau,degmax,seuil);
-  // cout << "Approx surface" << endl;
-
-  Handle (Geom_Surface) Surf (Mapp.Surface());
-  aBuilder.Surface()->Bounds( Umin, Umax, Vmin, Vmax);
-  
-  BRepBuilderAPI_MakeFace MF(Surf,Umin, Umax, Vmin, Vmax, Precision::Confusion());
-  TopoDS_Shape aShape = MF.Shape();
-  
-  return aShape;
-}
-
-
-//=======================================================================
-//function : Execute
-//purpose  :
-//=======================================================================
-Standard_Integer GEOMImpl_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log) const
-{
-  if (Label().IsNull()) return 0;
-  Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
-  if (aFunction.IsNull()) return 0;
-
-  Standard_Integer aType = aFunction->GetType();
-
-  if (aType != SMOOTHINGSURFACE_LPOINTS) return 0;
-  // cout << "Youhou : " << aType << endl;
-
-  GEOMImpl_ISmoothingSurface aData (aFunction);
-
-  // Fill the map of vertices.
-  Standard_Integer    aNbShapes = aData.GetLength();
-  TopTools_MapOfShape aMapPoints;
-  Standard_Integer    i;
-
-  for (i = 1; i <= aNbShapes; i++) {
-    Handle(GEOM_Function) aFShape = aData.GetPntOrComp(i);
-    TopoDS_Shape aShape = aFShape->GetValue();
-
-    if (aShape.ShapeType() == TopAbs_VERTEX) {
-      aMapPoints.Add(aShape);
-    } else {
-      TopExp_Explorer anExp(aShape, TopAbs_VERTEX);
-
-      for (; anExp.More(); anExp.Next()) {
-        aMapPoints.Add(anExp.Current());
-      }
-    }
-  }
-
-  // Add points to the array of points.
-  const Standard_Integer      aNbPoints    = aMapPoints.Extent();
-  Handle(TColgp_HArray1OfPnt) anArrayofPnt =
-      new TColgp_HArray1OfPnt(1, aNbPoints);
-  TopTools_MapIteratorOfMapOfShape anIter(aMapPoints);
-
-  for (i = 1; anIter.More(); anIter.Next(), i++) {
-    TopoDS_Vertex aPoint = TopoDS::Vertex(anIter.Key());
-    gp_Pnt aPnt = BRep_Tool::Pnt(aPoint);
-
-    anArrayofPnt->SetValue(i, aPnt);
-  }
-
-  const Standard_Integer aNbMax  = aData.GetNbMax();
-  const Standard_Integer aDegMax = aData.GetDegMax();
-  const Standard_Real    aDMax   = aData.GetDMax();
-
-  // Make smoothing surface.
-  TopoDS_Shape aShape = GEOMImpl_SmoothingSurfaceDriver::
-    MakeSmoothingSurfaceUnClosed(anArrayofPnt, aNbMax, aDegMax, aDMax);
-
-  if (aShape.IsNull()) return 0;
-
-  aFunction->SetValue(aShape);
-
-  log.SetTouched(Label());
-
-  return 1;
-}
-
-//================================================================================
-/*!
- * \brief Returns a name of creation operation and names and values of creation parameters
- */
-//================================================================================
-
-bool GEOMImpl_SmoothingSurfaceDriver::
-GetCreationInformation(std::string&             theOperationName,
-                       std::vector<GEOM_Param>& theParams)
-{
-  if (Label().IsNull()) return 0;
-  Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
-
-  GEOMImpl_ISmoothingSurface aCI( function );
-  Standard_Integer aType = function->GetType();
-
-  theOperationName = "SMOOTHINGSURFACE";
-
-  switch ( aType ) {
-  case SMOOTHINGSURFACE_LPOINTS:
-    {
-      AddParam( theParams, "Points" );
-      if ( aCI.GetLength() > 1 )
-        theParams[0] << aCI.GetLength() << " points: ";
-      for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
-        theParams[0] << aCI.GetPntOrComp( i ) << " ";
-
-      const Standard_Integer aNbMax  = aCI.GetNbMax();
-      const Standard_Integer aDegMax = aCI.GetDegMax();
-      const Standard_Real    aDMax   = aCI.GetDMax();
-
-      AddParam(theParams, "Max nbr of Bezier pieces", aCI.GetNbMax());
-      AddParam(theParams, "Max BSpline surface degree", aCI.GetDegMax());
-      AddParam(theParams, "3D tolerance of initial approximation", aCI.GetDMax());
-    }
-    break;
-  default:
-    return false;
-  }
-  
-  return true;
-}
-
-IMPLEMENT_STANDARD_HANDLE (GEOMImpl_SmoothingSurfaceDriver,GEOM_BaseDriver);
-IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SmoothingSurfaceDriver,GEOM_BaseDriver);
diff --git a/src/AdvancedEngine/GEOMImpl_SmoothingSurfaceDriver.hxx b/src/AdvancedEngine/GEOMImpl_SmoothingSurfaceDriver.hxx
deleted file mode 100644 (file)
index 6a22f65..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-// 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, or (at your option) any 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 _GEOMImpl_SmoothingSurfaceDriver_HXX
-#define _GEOMImpl_SmoothingSurfaceDriver_HXX
-
-#ifndef _TFunction_Driver_HeaderFile
-#include <TFunction_Driver.hxx>
-#endif
-#ifndef _TFunction_Logbook_HeaderFile
-#include <TFunction_Logbook.hxx>
-#endif
-#ifndef _Standard_CString_HeaderFile
-#include <Standard_CString.hxx>
-#endif
-#include <TColgp_HArray1OfPnt.hxx>
-#include <TopoDS_Shape.hxx>
-
-class Handle_Standard_Type;
-class GEOMImpl_SmoothingSurfaceDriver;
-
-
-
-#include "GEOM_BaseDriver.hxx"
-
-DEFINE_STANDARD_HANDLE( GEOMImpl_SmoothingSurfaceDriver, GEOM_BaseDriver );
-
-class GEOMImpl_SmoothingSurfaceDriver : public GEOM_BaseDriver {
-public:
- // Methods PUBLIC
-  // 
-  Standard_EXPORT GEOMImpl_SmoothingSurfaceDriver();
-  Standard_EXPORT virtual  Standard_Integer Execute(TFunction_Logbook& log) const; 
-  Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {}
-  Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const
-  {
-    return Standard_True;
-  }
-  Standard_EXPORT static const Standard_GUID& GetID();
-  Standard_EXPORT ~GEOMImpl_SmoothingSurfaceDriver() {};
-  
-  Standard_EXPORT virtual
-  bool GetCreationInformation(std::string&             theOperationName,
-                              std::vector<GEOM_Param>& params);
-  // Type management
-  //
-DEFINE_STANDARD_RTTI( GEOMImpl_SmoothingSurfaceDriver )
-
-private:
-  TopoDS_Shape MakeSmoothingSurfaceUnClosed
-                    (const Handle_TColgp_HArray1OfPnt &theListOfPoints,
-                     const Standard_Integer            theNbMax,
-                     const Standard_Integer            theDegMax,
-                     const Standard_Real               theDMax) const;
-};
-
-#endif // _GEOMImpl_SmoothingSurfaceDriver_HXX
diff --git a/src/AdvancedEngine/GEOM_AdvancedEngine.hxx b/src/AdvancedEngine/GEOM_AdvancedEngine.hxx
deleted file mode 100755 (executable)
index b73287b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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 _GEOM_ADVANCEDENGINE_HXX_
-#define _GEOM_ADVANCEDENGINE_HXX_
-
-#ifdef WIN32
- #if defined ADVANCEDENGINE_EXPORTS || defined AdvancedEngine_EXPORTS
-   #define ADVANCEDENGINE_EXPORT __declspec( dllexport )
- #else
-   #define ADVANCEDENGINE_EXPORT __declspec( dllimport )
- #endif 
-#else
-   #define ADVANCEDENGINE_EXPORT
-#endif
-
-#endif
\ No newline at end of file
diff --git a/src/AdvancedEngine/GEOM_IAdvancedOperations_i.cc b/src/AdvancedEngine/GEOM_IAdvancedOperations_i.cc
deleted file mode 100644 (file)
index 7ff12c3..0000000
+++ /dev/null
@@ -1,792 +0,0 @@
-// 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, or (at your option) any 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   : GEOM_IAdvancedOperations.cc
-//  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
-
-#include <Standard_Stream.hxx>
-
-#include "GEOM_IAdvancedOperations_i.hh"
-
-#include <utilities.h>
-#include <OpUtil.hxx>
-#include <Utils_ExceptHandlers.hxx>
-
-#include "GEOM_Engine.hxx"
-#include "GEOM_Object.hxx"
-
-//=============================================================================
-/*!
- *   constructor:
- */
-//=============================================================================
-GEOM_IAdvancedOperations_i::GEOM_IAdvancedOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOMImpl_IAdvancedOperations* theImpl)
-:GEOM_IOperations_i(thePOA, theEngine, theImpl)
-{
-  MESSAGE("GEOM_IAdvancedOperations_i::GEOM_IAdvancedOperations_i");
-}
-
-//=============================================================================
-/*!
- *  destructor
- */
-//=============================================================================
-GEOM_IAdvancedOperations_i::~GEOM_IAdvancedOperations_i()
-{
-  MESSAGE("GEOM_IAdvancedOperations_i::~GEOM_IAdvancedOperations_i");
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShape
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length).
- *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape
-                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                      CORBA::Boolean theHexMesh)
-{
-  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Create the TShape
-  Handle(TColStd_HSequenceOfTransient) aHSeq =
-    GetOperations()->MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2,
-                                    0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
-                                    theHexMesh);
-  if (!GetOperations()->IsDone() || aHSeq.IsNull())
-    return aSeq._retn();
-
-  Standard_Integer aLength = aHSeq->Length();
-  aSeq->length(aLength);
-  for (Standard_Integer i = 1; i <= aLength; i++)
-    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
-
-  return aSeq._retn();
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeWithPosition
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length).
- *  The extremities of the main pipe are located on junctions points P1 and P2.
- *  The extremity of the incident pipe is located on junction point P3.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \param theP1 1st junction point of main pipe
- *  \param theP2 2nd junction point of main pipe
- *  \param theP3 Junction point of incident pipe
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition
-                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                      CORBA::Boolean theHexMesh,
-                      GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
-{
-  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Get the reference vertices
-  Handle(GEOM_Object) aP1 = GetObjectImpl(theP1);
-  Handle(GEOM_Object) aP2 = GetObjectImpl(theP2);
-  Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
-  if (aP1.IsNull() || aP2.IsNull() || aP3.IsNull())return aSeq._retn();
-
-  //Create the TShape
-  Handle(TColStd_HSequenceOfTransient) aHSeq =
-    GetOperations()->MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
-                                                0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
-                                                theHexMesh, aP1, aP2, aP3);
-  if (!GetOperations()->IsDone() || aHSeq.IsNull())
-    return aSeq._retn();
-
-  Standard_Integer aLength = aHSeq->Length();
-  aSeq->length(aLength);
-  for (Standard_Integer i = 1; i <= aLength; i++)
-    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
-
-  return aSeq._retn();
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeChamfer
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length). A chamfer is created
- *  on the junction of the pipes.
- *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theH Height of chamfer.
- *  \param theW Width of chamfer.
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer
-                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                      CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh)
-{
-  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Create the TShape
-  Handle(TColStd_HSequenceOfTransient) aHSeq =
-    GetOperations()->MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
-                                           0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
-                                           theH, theW, theHexMesh);
-  if (!GetOperations()->IsDone() || aHSeq.IsNull())
-    return aSeq._retn();
-
-  Standard_Integer aLength = aHSeq->Length();
-  aSeq->length(aLength);
-  for (Standard_Integer i = 1; i <= aLength; i++)
-    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
-
-  return aSeq._retn();
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeChamferWithPosition
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length). A chamfer is created
- *  on the junction of the pipes.
- *  The extremities of the main pipe are located on junctions points P1 and P2.
- *  The extremity of the incident pipe is located on junction point P3.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theH Height of the chamfer.
- *  \param theW Width of the chamfer.
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \param theP1 1st junction point of main pipe
- *  \param theP2 2nd junction point of main pipe
- *  \param theP3 Junction point of incident pipe
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition
-                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                      CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
-                      GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
-{
-  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Get the reference vertices
-  Handle(GEOM_Object) aP1 = GetObjectImpl(theP1);
-  Handle(GEOM_Object) aP2 = GetObjectImpl(theP2);
-  Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
-
-  //Create the TShape
-  Handle(TColStd_HSequenceOfTransient) aHSeq =
-    GetOperations()->MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
-                                                       0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
-                                                       theH, theW, theHexMesh, aP1, aP2, aP3);
-  if (!GetOperations()->IsDone() || aHSeq.IsNull())
-    return aSeq._retn();
-
-  Standard_Integer aLength = aHSeq->Length();
-  aSeq->length(aLength);
-  for (Standard_Integer i = 1; i <= aLength; i++)
-    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
-
-  return aSeq._retn();
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeFillet
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length). A fillet is created
- *  on the junction of the pipes.
- *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theRF Radius of curvature of fillet.
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet
-                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                      CORBA::Double theRF, CORBA::Boolean theHexMesh)
-{
-  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Create the TShape
-  Handle(TColStd_HSequenceOfTransient) aHSeq =
-    GetOperations()->MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2,
-                                          0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
-                                          theRF, theHexMesh);
-  if (!GetOperations()->IsDone() || aHSeq.IsNull())
-    return aSeq._retn();
-
-  Standard_Integer aLength = aHSeq->Length();
-  aSeq->length(aLength);
-  for (Standard_Integer i = 1; i <= aLength; i++)
-    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
-
-  return aSeq._retn();
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeFilletWithPosition
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length). A fillet is created
- *  on the junction of the pipes.
- *  The extremities of the main pipe are located on junctions points P1 and P2.
- *  The extremity of the incident pipe is located on junction point P3.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theRF Radius of curvature of fillet
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \param theP1 1st junction point of main pipe
- *  \param theP2 2nd junction point of main pipe
- *  \param theP3 Junction point of incident pipe
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition
-                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                      CORBA::Double theRF, CORBA::Boolean theHexMesh,
-                      GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
-{
-  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Get the reference vertices
-  Handle(GEOM_Object) aP1 = GetObjectImpl(theP1);
-  Handle(GEOM_Object) aP2 = GetObjectImpl(theP2);
-  Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
-
-  //Create the TShape
-  Handle(TColStd_HSequenceOfTransient) aHSeq =
-    GetOperations()->MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
-                                                      0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
-                                                      theRF, theHexMesh, aP1, aP2, aP3);
-  if (!GetOperations()->IsDone() || aHSeq.IsNull())
-    return aSeq._retn();
-
-  Standard_Integer aLength = aHSeq->Length();
-  aSeq->length(aLength);
-  for (Standard_Integer i = 1; i <= aLength; i++)
-    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
-
-  return aSeq._retn();
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeTR
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length).
- *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTR
-                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                      CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
-                      CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
-                      CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
-                      CORBA::Boolean theHexMesh)
-{
-  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Create the TShape
-  Handle(TColStd_HSequenceOfTransient) aHSeq =
-    GetOperations()->MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2,
-                                    theRL, theWL, theLtransL, theLthinL,
-                                    theRR, theWR, theLtransR, theLthinR,
-                                    theRI, theWI, theLtransI, theLthinI,
-                                    theHexMesh);
-  if (!GetOperations()->IsDone() || aHSeq.IsNull())
-    return aSeq._retn();
-
-  Standard_Integer aLength = aHSeq->Length();
-  aSeq->length(aLength);
-  for (Standard_Integer i = 1; i <= aLength; i++)
-    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
-
-  return aSeq._retn();
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeTRWithPosition
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length).
- *  The extremities of the main pipe are located on junctions points P1 and P2.
- *  The extremity of the incident pipe is located on junction point P3.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \param theP1 1st junction point of main pipe
- *  \param theP2 2nd junction point of main pipe
- *  \param theP3 Junction point of incident pipe
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRWithPosition
-                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                      CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
-                      CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
-                      CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
-                      CORBA::Boolean theHexMesh,
-                      GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
-{
-  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Get the reference vertices
-  Handle(GEOM_Object) aP1 = GetObjectImpl(theP1);
-  Handle(GEOM_Object) aP2 = GetObjectImpl(theP2);
-  Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
-  if (aP1.IsNull() || aP2.IsNull() || aP3.IsNull()) return aSeq._retn();
-
-  //Create the TShape
-  Handle(TColStd_HSequenceOfTransient) aHSeq =
-    GetOperations()->MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
-                                                theRL, theWL, theLtransL, theLthinL,
-                                                theRR, theWR, theLtransR, theLthinR,
-                                                theRI, theWI, theLtransI, theLthinI,
-                                                theHexMesh, aP1, aP2, aP3);
-  if (!GetOperations()->IsDone() || aHSeq.IsNull())
-    return aSeq._retn();
-
-  Standard_Integer aLength = aHSeq->Length();
-  aSeq->length(aLength);
-  for (Standard_Integer i = 1; i <= aLength; i++)
-    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
-
-  return aSeq._retn();
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeTRChamfer
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length). A chamfer is created
- *  on the junction of the pipes.
- *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theH Height of chamfer.
- *  \param theW Width of chamfer.
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRChamfer
-                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                      CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
-                      CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
-                      CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
-                      CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh)
-{
-  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Create the TShape
-  Handle(TColStd_HSequenceOfTransient) aHSeq =
-    GetOperations()->MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
-                                           theRL, theWL, theLtransL, theLthinL,
-                                           theRR, theWR, theLtransR, theLthinR,
-                                           theRI, theWI, theLtransI, theLthinI,
-                                           theH, theW, theHexMesh);
-  if (!GetOperations()->IsDone() || aHSeq.IsNull())
-    return aSeq._retn();
-
-  Standard_Integer aLength = aHSeq->Length();
-  aSeq->length(aLength);
-  for (Standard_Integer i = 1; i <= aLength; i++)
-    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
-
-  return aSeq._retn();
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeTRChamferWithPosition
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length). A chamfer is created
- *  on the junction of the pipes.
- *  The extremities of the main pipe are located on junctions points P1 and P2.
- *  The extremity of the incident pipe is located on junction point P3.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theH Height of the chamfer.
- *  \param theW Width of the chamfer.
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \param theP1 1st junction point of main pipe
- *  \param theP2 2nd junction point of main pipe
- *  \param theP3 Junction point of incident pipe
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRChamferWithPosition
-                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                      CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
-                      CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
-                      CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
-                      CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
-                      GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
-{
-  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Get the reference vertices
-  Handle(GEOM_Object) aP1 = GetObjectImpl(theP1);
-  Handle(GEOM_Object) aP2 = GetObjectImpl(theP2);
-  Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
-
-  //Create the TShape
-  Handle(TColStd_HSequenceOfTransient) aHSeq =
-    GetOperations()->MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
-                                                       theRL, theWL, theLtransL, theLthinL,
-                                                       theRR, theWR, theLtransR, theLthinR,
-                                                       theRI, theWI, theLtransI, theLthinI,
-                                                       theH, theW, theHexMesh, aP1, aP2, aP3);
-  if (!GetOperations()->IsDone() || aHSeq.IsNull())
-    return aSeq._retn();
-
-  Standard_Integer aLength = aHSeq->Length();
-  aSeq->length(aLength);
-  for (Standard_Integer i = 1; i <= aLength; i++)
-    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
-
-  return aSeq._retn();
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeTRFillet
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length). A fillet is created
- *  on the junction of the pipes.
- *  Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theRF Radius of curvature of fillet.
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRFillet
-                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                      CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
-                      CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
-                      CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
-                      CORBA::Double theRF, CORBA::Boolean theHexMesh)
-{
-  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Create the TShape
-  Handle(TColStd_HSequenceOfTransient) aHSeq =
-    GetOperations()->MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2,
-                                          theRL, theWL, theLtransL, theLthinL,
-                                          theRR, theWR, theLtransR, theLthinR,
-                                          theRI, theWI, theLtransI, theLthinI,
-                                          theRF, theHexMesh);
-  if (!GetOperations()->IsDone() || aHSeq.IsNull())
-    return aSeq._retn();
-
-  Standard_Integer aLength = aHSeq->Length();
-  aSeq->length(aLength);
-  for (Standard_Integer i = 1; i <= aLength; i++)
-    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
-
-  return aSeq._retn();
-}
-
-//=============================================================================
-/*!
- *  MakePipeTShapeTRFilletWithPosition
- *  Create a T-shape object with specified caracteristics for the main and
- *  the incident pipes (radius, width, half-length). A fillet is created
- *  on the junction of the pipes.
- *  The extremities of the main pipe are located on junctions points P1 and P2.
- *  The extremity of the incident pipe is located on junction point P3.
- *  \param theR1 Internal radius of main pipe
- *  \param theW1 Width of main pipe
- *  \param theL1 Half-length of main pipe
- *  \param theR2 Internal radius of incident pipe (R2 < R1)
- *  \param theW2 Width of incident pipe (R2+W2 < R1+W1)
- *  \param theL2 Half-length of incident pipe
- *  \param theRF Radius of curvature of fillet
- *  \param theHexMesh Boolean indicating if shape is prepared for hex mesh
- *  \param theP1 1st junction point of main pipe
- *  \param theP2 2nd junction point of main pipe
- *  \param theP3 Junction point of incident pipe
- *  \return List of GEOM_Objects, containing the created shape and propagation groups.
- */
-//=============================================================================
-GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRFilletWithPosition
-                     (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                      CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                      CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
-                      CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
-                      CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
-                      CORBA::Double theRF, CORBA::Boolean theHexMesh,
-                      GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
-{
-  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Get the reference vertices
-  Handle(GEOM_Object) aP1 = GetObjectImpl(theP1);
-  Handle(GEOM_Object) aP2 = GetObjectImpl(theP2);
-  Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
-
-  //Create the TShape
-  Handle(TColStd_HSequenceOfTransient) aHSeq =
-    GetOperations()->MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
-                                                      theRL, theWL, theLtransL, theLthinL,
-                                                      theRR, theWR, theLtransR, theLthinR,
-                                                      theRI, theWI, theLtransI, theLthinI,
-                                                      theRF, theHexMesh, aP1, aP2, aP3);
-  if (!GetOperations()->IsDone() || aHSeq.IsNull())
-    return aSeq._retn();
-
-  Standard_Integer aLength = aHSeq->Length();
-  aSeq->length(aLength);
-  for (Standard_Integer i = 1; i <= aLength; i++)
-    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
-
-  return aSeq._retn();
-}
-
-//=============================================================================
-/*!
- *  This function allows to create a disk already divided into blocks. It can be
- *  use to create divided pipes for later meshing in hexaedra.
- *  \param theR Radius of the disk
- *  \param theRatio Relative size of the central square diagonal against the disk diameter
- *  \return New GEOM_Object, containing the created shape.
- */
-//=============================================================================
-GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDisk (CORBA::Double theR,
-                                                                   CORBA::Double theRatio,
-                                                                   CORBA::Short theOrientation,
-                                                                   GEOM::pattern thePattern)
-{
-  GEOM::GEOM_Object_var aGEOMObject;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Create the DividedDisk
-  Handle(GEOM_Object) anObject = GetOperations()->MakeDividedDisk(theR, theRatio, theOrientation, thePattern);
-  if (!GetOperations()->IsDone() || anObject.IsNull())
-    return aGEOMObject._retn();
-
-  return GetObject(anObject);
-}
-
-//=============================================================================
-/*!
- *  MakeDividedDiskPntVecR
- */
-//=============================================================================
-GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDiskPntVecR (GEOM::GEOM_Object_ptr thePnt,
-                                                                          GEOM::GEOM_Object_ptr theVec,
-                                                                          CORBA::Double theR,
-                                                                          CORBA::Double theRatio,
-                                                                          GEOM::pattern thePattern)
-{
-  GEOM::GEOM_Object_var aGEOMObject;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Get the reference points
-  Handle(GEOM_Object) aPnt = GetObjectImpl(thePnt);
-  Handle(GEOM_Object) aVec = GetObjectImpl(theVec);
-
-  if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
-
-  // Make DividedDisk
-  Handle(GEOM_Object) anObject =
-    GetOperations()->MakeDividedDiskPntVecR(aPnt, aVec, theR, theRatio, thePattern);
-  if (!GetOperations()->IsDone() || anObject.IsNull())
-    return aGEOMObject._retn();
-
-  return GetObject(anObject);
-}
-
-//=============================================================================
-/*!
- *  Builds a cylinder prepared for hexa meshes
- *  \param theR Radius of the cylinder
- *  \param theH Height of the cylinder
- *  \return New GEOM_Object, containing the created shape.
- */
-//=============================================================================
-GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedCylinder (CORBA::Double theR,
-                                                                       CORBA::Double theH,
-                                                                       GEOM::pattern thePattern)
-{
-  GEOM::GEOM_Object_var aGEOMObject;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Create the DividedCylinder
-  Handle(GEOM_Object) anObject = GetOperations()->MakeDividedCylinder(theR, theH, thePattern);
-  if (!GetOperations()->IsDone() || anObject.IsNull())
-    return aGEOMObject._retn();
-
-  return GetObject(anObject);
-}
-
-//=============================================================================
-/*!
- *  
- *  \param thelPoints list of  points
- *  \param theNbMax maximum number of Bezier pieces in the resulting surface.
- *  \param theDegMax maximum degree of the resulting BSpline surface
- *  \param theDMax specifies maximum value of the GeomPlate_PlateG0Criterion criterion.
- *  \return New GEOM_Object, containing the created shape.
- */
-//=============================================================================
-GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeSmoothingSurface (const GEOM::ListOfGO& thelPoints,
-                                                                        CORBA::Long           theNbMax,
-                                                                        CORBA::Long           theDegMax,
-                                                                        CORBA::Double         theDMax)
-{
-  GEOM::GEOM_Object_var aGEOMObject;
-
-  //Set a not done flag
-  GetOperations()->SetNotDone();
-
-  //Get the reference point
-  int ind = 0;
-  int aLen = thelPoints.length();
-  std::list<Handle(GEOM_Object)> aPoints;
-  for (; ind < aLen; ind++) {
-    Handle(GEOM_Object) aPnt = GetObjectImpl(thelPoints[ind]);
-    if (aPnt.IsNull()) return aGEOMObject._retn();
-    aPoints.push_back(aPnt);
-  }
-  //Create the SmoothingSurface
-  Handle(GEOM_Object) anObject = GetOperations()->MakeSmoothingSurface
-        (aPoints, theNbMax, theDegMax, theDMax);
-  if (!GetOperations()->IsDone() || anObject.IsNull())
-    return aGEOMObject._retn();
-
-  return GetObject(anObject);
-}
-
-/*@@ insert new functions before this line @@ do not remove this line @@*/
diff --git a/src/AdvancedEngine/GEOM_IAdvancedOperations_i.hh b/src/AdvancedEngine/GEOM_IAdvancedOperations_i.hh
deleted file mode 100644 (file)
index 7f70013..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-// 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, or (at your option) any 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   : GEOM_IAdvancedOperations.hh
-//  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
-
-#ifndef _GEOM_IAdvancedOperations_i_HeaderFile
-#define _GEOM_IAdvancedOperations_i_HeaderFile
-
-#include "GEOMImpl_Gen.hxx"
-
-#include <SALOMEconfig.h>
-
-#include CORBA_SERVER_HEADER(GEOM_Gen)
-#include "GEOM_IOperations_i.hh"
-#include "GEOM_Object_i.hh"
-#include "GEOM_AdvancedEngine.hxx"
-
-#include "GEOMImpl_IAdvancedOperations.hxx"
-
-class ADVANCEDENGINE_EXPORT GEOM_IAdvancedOperations_i :
-    public virtual POA_GEOM::GEOM_IAdvancedOperations,
-    public virtual GEOM_IOperations_i
-{
- public:
-  GEOM_IAdvancedOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine,
-                            ::GEOMImpl_IAdvancedOperations* theImpl);
-  ~GEOM_IAdvancedOperations_i();
-
-  // PipeTShape without thickness reduction
-  GEOM::ListOfGO* MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                                  CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                                  CORBA::Boolean theHexMesh);
-  GEOM::ListOfGO* MakePipeTShapeWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                                              CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                                              CORBA::Boolean theHexMesh,
-                                              GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
-  GEOM::ListOfGO* MakePipeTShapeChamfer (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                                         CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                                         CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh);
-  GEOM::ListOfGO* MakePipeTShapeChamferWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                                                     CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                                                     CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
-                                                     GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
-  GEOM::ListOfGO* MakePipeTShapeFillet (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                                        CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                                        CORBA::Double theRF, CORBA::Boolean theHexMesh);
-  GEOM::ListOfGO* MakePipeTShapeFilletWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-                                                    CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-                                                    CORBA::Double theRF, CORBA::Boolean theHexMesh,
-                                                    GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
-
-  // PipeTShape with thickness reduction
-  GEOM::ListOfGO* MakePipeTShapeTR
-    (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-     CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-     CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
-     CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
-     CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
-     CORBA::Boolean theHexMesh);
-  GEOM::ListOfGO* MakePipeTShapeTRWithPosition
-    (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-     CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-     CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
-     CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
-     CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
-     CORBA::Boolean theHexMesh,
-     GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
-  GEOM::ListOfGO* MakePipeTShapeTRChamfer
-    (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-     CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-     CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
-     CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
-     CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
-     CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh);
-  GEOM::ListOfGO* MakePipeTShapeTRChamferWithPosition
-    (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-     CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-     CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
-     CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
-     CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
-     CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
-     GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
-  GEOM::ListOfGO* MakePipeTShapeTRFillet
-    (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-     CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-     CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
-     CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
-     CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
-     CORBA::Double theRF, CORBA::Boolean theHexMesh);
-  GEOM::ListOfGO* MakePipeTShapeTRFilletWithPosition
-    (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
-     CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
-     CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
-     CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
-     CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
-     CORBA::Double theRF, CORBA::Boolean theHexMesh,
-     GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
-
-  GEOM::GEOM_Object_ptr MakeDividedDisk        (CORBA::Double theR,
-                                                CORBA::Double theRatio,
-                                                CORBA::Short theOrientation,
-                                                GEOM::pattern thePattern);
-
-  GEOM::GEOM_Object_ptr MakeDividedDiskPntVecR (GEOM::GEOM_Object_ptr theCenter,
-                                                GEOM::GEOM_Object_ptr theVector,
-                                                CORBA::Double theR,
-                                                CORBA::Double theRatio,
-                                                GEOM::pattern thePattern);
-
-  GEOM::GEOM_Object_ptr MakeDividedCylinder (CORBA::Double theR,
-                                             CORBA::Double theH,
-                                             GEOM::pattern thePattern);
-  GEOM::GEOM_Object_ptr MakeSmoothingSurface (const GEOM::ListOfGO& thelPoints,
-                                              CORBA::Long           theNbMax,
-                                              CORBA::Long           theDegMax,
-                                              CORBA::Double         theDMax);
-  /*@@ insert new functions before this line @@ do not remove this line @@*/
-
-  ::GEOMImpl_IAdvancedOperations* GetOperations()
-  { return (::GEOMImpl_IAdvancedOperations*)GetImpl(); }
-};
-
-#endif
diff --git a/src/AdvancedGUI/AdvancedGEOM_images.ts b/src/AdvancedGUI/AdvancedGEOM_images.ts
new file mode 100644 (file)
index 0000000..3dd602c
--- /dev/null
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+    <context>
+        <name>@default</name>
+        <message>
+            <source>ICON_OBJBROWSER_ADVANCED_201</source>
+            <translation>tree_pipetshape.png</translation>
+       </message>
+        <message>
+            <source>ICON_OBJBROWSER_ADVANCED_202</source>
+            <translation>divided_disk.png</translation>
+        </message>
+        <message>
+            <source>ICON_OBJBROWSER_ADVANCED_203</source>
+            <translation>dividedcylinder.png</translation>
+        </message>
+        <message>
+            <source>ICON_OBJBROWSER_ADVANCED_204</source>
+            <translation>tree_smoothingsurface.png</translation>
+        </message>
+
+        <message>
+            <source>ICON_DLG_PIPETSHAPE</source>
+            <translation>pipetshape.png</translation>
+        </message>
+        <message>
+            <source>ICO_PIPETSHAPE</source>
+            <translation>pipetshape.png</translation>
+        </message>
+        <message>
+            <source>ICO_PIPETSHAPE_IMPORT</source>
+            <translation>pipetshape_import_icon.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE</source>
+            <translation>dlg_pipetshape.png</translation>
+        </message>
+        <message>
+            <source>IMG_PIPETSHAPE_SECT</source>
+            <translation>pipetshape_section.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_L1</source>
+            <translation>dlg_pipetshapel1.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_R1</source>
+            <translation>dlg_pipetshaper1.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_W1</source>
+            <translation>dlg_pipetshapew1.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_L2</source>
+            <translation>dlg_pipetshapel2.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_R2</source>
+            <translation>dlg_pipetshaper2.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_W2</source>
+            <translation>dlg_pipetshapew2.png</translation>
+        </message>
+        
+        <message>
+            <source>DLG_PIPETSHAPE_FILLET</source>
+            <translation>dlg_pipetshapefillet.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_FILLET_L1</source>
+            <translation>dlg_pipetshapefilletl1.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_FILLET_R1</source>
+            <translation>dlg_pipetshapefilletr1.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_FILLET_W1</source>
+            <translation>dlg_pipetshapefilletw1.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_FILLET_L2</source>
+            <translation>dlg_pipetshapefilletl2.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_FILLET_R2</source>
+            <translation>dlg_pipetshapefilletr2.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_FILLET_W2</source>
+            <translation>dlg_pipetshapefilletw2.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_FILLET_RF</source>
+            <translation>dlg_pipetshapefilletrf.png</translation>
+        </message>
+        
+        <message>
+            <source>DLG_PIPETSHAPE_CHAMFER</source>
+            <translation>dlg_pipetshapechamfer.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_CHAMFER_L1</source>
+            <translation>dlg_pipetshapechamferl1.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_CHAMFER_R1</source>
+            <translation>dlg_pipetshapechamferr1.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_CHAMFER_W1</source>
+            <translation>dlg_pipetshapechamferw1.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_CHAMFER_L2</source>
+            <translation>dlg_pipetshapechamferl2.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_CHAMFER_R2</source>
+            <translation>dlg_pipetshapechamferr2.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_CHAMFER_W2</source>
+            <translation>dlg_pipetshapechamferw2.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_CHAMFER_H</source>
+            <translation>dlg_pipetshapechamferh.png</translation>
+        </message>
+        <message>
+            <source>DLG_PIPETSHAPE_CHAMFER_W</source>
+            <translation>dlg_pipetshapechamferw.png</translation>
+        </message>
+        
+<!--
+       <message>
+            <source>ICON_DLG_PIPETSHAPEGROUPS</source>
+            <translation>pipetshapegroups.png</translation>
+        </message>
+        <message>
+            <source>ICO_PIPETSHAPEGROUPS</source>
+            <translation>pipetshapegroups.png</translation>
+        </message>
+-->
+
+        <message>
+            <source>ICON_DLG_DIVIDEDDISK_R_RATIO</source>
+            <translation>divided_disk.png</translation>
+        </message>
+        <message>
+            <source>ICO_DIVIDEDDISK</source>
+            <translation>divided_disk.png</translation>
+        </message>
+
+        <message>
+            <source>ICON_DLG_DIVIDEDCYLINDER_R_H</source>
+            <translation>dividedcylinder_r_h.png</translation>
+        </message>
+        <message>
+            <source>ICO_DIVIDEDCYLINDER</source>
+            <translation>dividedcylinder.png</translation>
+        </message>
+
+        <message>
+            <source>ICON_DLG_SMOOTHINGSURFACE_LPOINTS</source>
+            <translation>smoothingsurface_lpoints.png</translation>
+        </message>
+        <message>
+            <source>ICO_SMOOTHINGSURFACE</source>
+            <translation>smoothingsurface.png</translation>
+        </message>
+       <!-- @@ insert new functions before this line @@ do not remove this line @@ -->
+    </context>
+</TS>
diff --git a/src/AdvancedGUI/AdvancedGEOM_msg_en.ts b/src/AdvancedGUI/AdvancedGEOM_msg_en.ts
new file mode 100644 (file)
index 0000000..06ab043
--- /dev/null
@@ -0,0 +1,313 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source>GEOM_ADVANCED</source>
+        <translation>Advanced shape: type %1</translation>
+    </message>
+    <message>
+        <source>GEOM_ADVANCED_201</source>
+        <translation>Pipe TShape</translation>
+    </message>
+    <message>
+        <source>GEOM_ADVANCED_202</source>
+        <translation>Divided Disk</translation>
+    </message>
+    <message>
+        <source>GEOM_ADVANCED_203</source>
+        <translation>Divided Cylinder</translation>
+    </message>
+    <message>
+        <source>GEOM_DIVIDEDDISK</source>
+        <translation>Divided Disk</translation>
+    </message>
+    <message>
+        <source>GEOM_DIVIDEDDISK_TITLE</source>
+        <translation>Divided Disk construction</translation>
+    </message>
+    <message>
+        <source>GEOM_DIVIDEDCYLINDER</source>
+        <translation>Divided Cylinder</translation>
+    </message>
+    <message>
+        <source>GEOM_DIVIDEDCYLINDER_TITLE</source>
+        <translation>Divided Cylinder construction</translation>
+    </message>
+    <message>
+        <source>MEN_DIVIDEDCYLINDER</source>
+        <translation>Divided Cylinder</translation>
+    </message>
+    <message>
+        <source>TOP_DIVIDEDCYLINDER</source>
+        <translation>Divided Cylinder</translation>
+    </message>
+    <message>
+        <source>STB_DIVIDEDCYLINDER</source>
+        <translation>Divided Cylinder</translation>
+    </message>
+    <message>
+        <source>MEN_DIVIDEDDISK</source>
+        <translation>Divided Disk</translation>
+    </message>
+    <message>
+        <source>TOP_DIVIDEDDISK</source>
+        <translation>Divided Disk</translation>
+    </message>
+    <message>
+        <source>STB_DIVIDEDDISK</source>
+        <translation>Divided Disk</translation>
+    </message>
+    <message>
+        <source>TOP_PIPETSHAPE</source>
+        <translation>Create Pipe TShape</translation>
+    </message>
+    <message>
+        <source>MEN_PIPETSHAPE</source>
+        <translation>Pipe TShape</translation>
+    </message>
+    <message>
+        <source>STB_PIPETSHAPE</source>
+        <translation>Create new Pipe TShape object</translation>
+    </message>
+    <message>
+        <source>TOP_SMOOTHINGSURFACE</source>
+        <translation>Smoothing Surface</translation>
+    </message>
+    <message>
+        <source>MEN_SMOOTHINGSURFACE</source>
+        <translation>Smoothing Surface</translation>
+    </message>
+    <message>
+        <source>STB_SMOOTHINGSURFACE</source>
+        <translation>Smoothing Surface</translation>
+    </message>
+    <message>
+        <source>HALF_LENGTH_MAIN_PIPE</source>
+        <translation>Main pipe half length</translation>
+    </message>
+    <message>
+        <source>HALF_LENGTH_INCIDENT_PIPE</source>
+        <translation>Incident pipe half length</translation>
+    </message>
+    <message>
+        <source>CIRCULAR_QUARTER_PIPE</source>
+        <translation>Circular quarter of pipe</translation>
+    </message>
+    <message>
+        <source>THICKNESS</source>
+        <translation>Thickness</translation>
+    </message>
+    <message>
+        <source>FLANGE</source>
+        <translation>Flange</translation>
+    </message>
+    <message>
+        <source>CHAMFER_OR_FILLET</source>
+        <translation>Chamfer or fillet</translation>
+    </message>
+    <message>
+        <source>CHAMFER</source>
+        <translation>Chamfer</translation>
+    </message>
+    <message>
+        <source>FILLET</source>
+        <translation>Fillet</translation>
+    </message>
+    <message>
+        <source>JUNCTION_FACE_1</source>
+        <translation>Junction 1</translation>
+    </message>
+    <message>
+        <source>JUNCTION_FACE_2</source>
+        <translation>Junction 2</translation>
+    </message>
+    <message>
+        <source>JUNCTION_FACE_3</source>
+        <translation>Junction 3</translation>
+    </message>
+    <message>
+        <source>INTERNAL_FACES</source>
+        <translation>Internal faces</translation>
+    </message>
+</context>
+<context>
+    <name>AdvancedGUI_PipeTShapeDlg</name>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_TITLE</source>
+        <translation>Pipe TShape Construction</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE</source>
+        <translation>PipeTShape</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_MPIPE</source>
+        <translation>Main pipe</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_R</source>
+        <translation>Radius</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_W</source>
+        <translation>Width</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_L</source>
+        <translation>Half-length</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_IPIPE</source>
+        <translation>Incident pipe</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_CHAMFER</source>
+        <translation>Chamfer</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_CHAMFER_H</source>
+        <translation>Height</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_CHAMFER_W</source>
+        <translation>Width</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_FILLET</source>
+        <translation>Fillet</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_HEX</source>
+        <translation>Prepare for hex mesh</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_POSITION</source>
+        <translation>Set position</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_POSITION_P1</source>
+        <translation>Junction P1</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_POSITION_P2</source>
+        <translation>Junction P2</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_POSITION_P3</source>
+        <translation>Junction P3</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_POSITION_LBL_L1</source>
+        <translation>New L1</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
+        <translation>New L2</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_LEFT_TR</source>
+        <translation>Left thickness reduction</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_RIGHT_TR</source>
+        <translation>Right thickness reduction</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_INCI_TR</source>
+        <translation>Incident pipe thickness reduction</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_TR_R</source>
+        <translation>Radius (r%1)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_TR_W</source>
+        <translation>Width (w%1)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_TR_L_TRANS</source>
+        <translation>Transition length (ltrans%1)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_TR_L_THIN</source>
+        <translation>Thin part length (lthin%1)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_GROUPMAIN</source>
+        <translation>Main parameters</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_GROUPREDUCT</source>
+        <translation>Thickness reduction</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_GROUPPOS</source>
+        <translation>Position</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_L</source>
+        <translation>The main pipe radius can&apos;t be equal to the left thickness reduction radius (rL)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_L</source>
+        <translation>The main pipe external radius (Radius + Width) can&apos;t be equal to the left thickness reduction external radius (rL + wL)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_R</source>
+        <translation>The main pipe radius can&apos;t be equal to the right thickness reduction radius (rR)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_R</source>
+        <translation>The main pipe external radius (Radius + Width) can&apos;t be equal to the right thickness reduction external radius (rR + wR)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_I</source>
+        <translation>The incident pipe radius can&apos;t be equal to the incident pipe thickness reduction radius (rI)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_I</source>
+        <translation>The incident pipe external radius (Radius + Width) can&apos;t be equal to the incident pipe thickness reduction external radius (rI + wI)</translation>
+    </message>
+</context>
+<context>
+    <name>AdvancedGUI_SmoothingSurfaceDlg</name>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_TITLE</source>
+        <translation>Smoothing surface Construction</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE</source>
+        <translation>Smoothing surface</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_RESULT</source>
+        <translation>Result name</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_ARG</source>
+        <translation>Arguments</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_ARG_POINTS</source>
+        <translation>Points</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_ARG_NB_MAX</source>
+        <translation>Max nbr of Bezier pieces</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_ARG_DEG_MAX</source>
+        <translation>Max BSpline surface degree</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_ARG_D_MAX</source>
+        <translation>3D tolerance of initial approximation</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_NO_POINTS</source>
+        <translation>No points selected</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/AdvancedGUI/AdvancedGEOM_msg_fr.ts b/src/AdvancedGUI/AdvancedGEOM_msg_fr.ts
new file mode 100644 (file)
index 0000000..912a300
--- /dev/null
@@ -0,0 +1,313 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_FR">
+<context>
+    <name>@default</name>
+    <message>
+        <source>GEOM_ADVANCED</source>
+        <translation>Objet géométrique avancé : type %1</translation>
+    </message>
+    <message>
+        <source>GEOM_ADVANCED_201</source>
+        <translation>Tuyau en T</translation>
+    </message>
+    <message>
+        <source>GEOM_ADVANCED_202</source>
+        <translation>Disque prédécoupé</translation>
+    </message>
+    <message>
+        <source>GEOM_ADVANCED_203</source>
+        <translation>Cylindre prédécoupé</translation>
+    </message>
+    <message>
+        <source>GEOM_DIVIDEDDISK</source>
+        <translation>Disque prédécoupé</translation>
+    </message>
+    <message>
+        <source>GEOM_DIVIDEDDISK_TITLE</source>
+        <translation>Construction d&apos;un disque prédécoupé</translation>
+    </message>
+    <message>
+        <source>GEOM_DIVIDEDCYLINDER</source>
+        <translation>Cylinder prédécoupé</translation>
+    </message>
+    <message>
+        <source>GEOM_DIVIDEDCYLINDER_TITLE</source>
+        <translation>Construction d&apos;un cylindre prédécoupé</translation>
+    </message>
+    <message>
+        <source>MEN_DIVIDEDCYLINDER</source>
+        <translation>Cylinder prédécoupé</translation>
+    </message>
+    <message>
+        <source>TOP_DIVIDEDCYLINDER</source>
+        <translation>Cylinder prédécoupé</translation>
+    </message>
+    <message>
+        <source>STB_DIVIDEDCYLINDER</source>
+        <translation>Cylinder prédécoupé</translation>
+    </message>
+    <message>
+        <source>MEN_DIVIDEDDISK</source>
+        <translation>Disque prédécoupé</translation>
+    </message>
+    <message>
+        <source>TOP_DIVIDEDDISK</source>
+        <translation>Disque prédécoupé</translation>
+    </message>
+    <message>
+        <source>STB_DIVIDEDDISK</source>
+        <translation>Disque prédécoupé</translation>
+    </message>
+    <message>
+        <source>TOP_PIPETSHAPE</source>
+        <translation>Créer un tuyau en T</translation>
+    </message>
+    <message>
+        <source>MEN_PIPETSHAPE</source>
+        <translation>Tuyau en T</translation>
+    </message>
+    <message>
+        <source>STB_PIPETSHAPE</source>
+        <translation>Créer un tuyau en T</translation>
+    </message>
+    <message>
+        <source>TOP_SMOOTHINGSURFACE</source>
+        <translation> Ajustement de surface</translation>
+    </message>
+    <message>
+        <source>MEN_SMOOTHINGSURFACE</source>
+        <translation> Ajustement de surface</translation>
+    </message>
+    <message>
+        <source>STB_SMOOTHINGSURFACE</source>
+        <translation> Ajustement de surface</translation>
+    </message>
+    <message>
+        <source>HALF_LENGTH_MAIN_PIPE</source>
+        <translation>Demi-longueur du tuyau principal </translation>
+    </message>
+    <message>
+        <source>HALF_LENGTH_INCIDENT_PIPE</source>
+        <translation>Demi-longueur du tuyau incident</translation>
+    </message>
+    <message>
+        <source>CIRCULAR_QUARTER_PIPE</source>
+        <translation>Un quart circulaire du tuyau</translation>
+    </message>
+    <message>
+        <source>THICKNESS</source>
+        <translation>Epaisseur</translation>
+    </message>
+    <message>
+        <source>FLANGE</source>
+        <translation>Collerette</translation>
+    </message>
+    <message>
+        <source>CHAMFER_OR_FILLET</source>
+        <translation>Chanfrein ou congé</translation>
+    </message>
+    <message>
+        <source>CHAMFER</source>
+        <translation>Chanfrein</translation>
+    </message>
+    <message>
+        <source>FILLET</source>
+        <translation>Congé</translation>
+    </message>
+    <message>
+        <source>JUNCTION_FACE_1</source>
+        <translation>Jonction 1</translation>
+    </message>
+    <message>
+        <source>JUNCTION_FACE_2</source>
+        <translation>Jonction 2</translation>
+    </message>
+    <message>
+        <source>JUNCTION_FACE_3</source>
+        <translation>Jonction 3</translation>
+    </message>
+    <message>
+        <source>INTERNAL_FACES</source>
+        <translation>Faces internes</translation>
+    </message>
+</context>
+<context>
+    <name>AdvancedGUI_PipeTShapeDlg</name>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_TITLE</source>
+        <translation>Construction d&apos;un tuyau en T</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE</source>
+        <translation>Tuyau en T</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_MPIPE</source>
+        <translation>Tuyau principal</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_R</source>
+        <translation>Rayon</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_W</source>
+        <translation>Largeur</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_L</source>
+        <translation>Demi-longueur</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_IPIPE</source>
+        <translation>Tuyau incident</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_CHAMFER</source>
+        <translation>Chanfrein</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_CHAMFER_H</source>
+        <translation>Hauteur</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_CHAMFER_W</source>
+        <translation>Largeur</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_FILLET</source>
+        <translation>Congé</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_HEX</source>
+        <translation>Préparer pour un maillage hexaédrique</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_POSITION</source>
+        <translation>Définir la position</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_POSITION_P1</source>
+        <translation>Jonction P1</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_POSITION_P2</source>
+        <translation>Jonction P2</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_POSITION_P3</source>
+        <translation>Jonction P3</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_POSITION_LBL_L1</source>
+        <translation>Nouvelle L1</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
+        <translation>Nouvelle L2</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_LEFT_TR</source>
+        <translation>Réduction d&apos;épaisseur à gauche</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_RIGHT_TR</source>
+        <translation>Réduction d&apos;épaisseur à droite</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_INCI_TR</source>
+        <translation>Réduction d&apos;épaisseur du tuyau incident</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_TR_R</source>
+        <translation>Rayon (r%1)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_TR_W</source>
+        <translation>Epaisseur (w%1)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_TR_L_TRANS</source>
+        <translation>Longueur de transition (ltrans%1)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPE_TSHAPE_TR_L_THIN</source>
+        <translation>Longueur de la partie étroite (lthin%1)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_GROUPMAIN</source>
+        <translation>Paramètres principaux</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_GROUPREDUCT</source>
+        <translation>Réduction d&apos;épaisseur</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_GROUPPOS</source>
+        <translation>Position</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_L</source>
+        <translation>Le rayon du tuyau principal ne peut pas être égal à la réduction d&apos;épaisseur à gauche (rL)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_L</source>
+        <translation>Le rayon extérieur du tuyau principal (Rayon + épaisseur) ne peut pas être égal au rayon externe de la réduction d&apos;épaisseur à gauche (rL + wL)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_R</source>
+        <translation>Le rayon du tuyau principal ne peut pas être égal au rayon de la réduction d&apos;épaisseur à droite (rR)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_R</source>
+        <translation>Le rayon extérieur du tuyau principal (Rayon + épaisseur) ne peut pas être égal au rayon externe de la réduction d&apos;épaisseur à droite (rL + wL)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_I</source>
+        <translation>Le rayon du tuyau incident ne peut pas être égal au rayon de la réduction d&apos;épaisseur du tuyau incident (rI)</translation>
+    </message>
+    <message>
+        <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_I</source>
+        <translation>Le rayon externe du tuyau incident (Rayon + Epaisseur) ne peut pas être égal au rayon extérieur de la réduction du tuyau incident (rI + wI)</translation>
+    </message>
+</context>
+<context>
+    <name>AdvancedGUI_SmoothingSurfaceDlg</name>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_TITLE</source>
+        <translation>Ajustement de surface sur des points</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE</source>
+        <translation>Ajustement de surface</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_RESULT</source>
+        <translation>Nom du résultat</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_ARG</source>
+        <translation>Noeuds</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_ARG_POINTS</source>
+        <translation>Points</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_ARG_NB_MAX</source>
+        <translation>Nombre max de patchs Bezier</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_ARG_DEG_MAX</source>
+        <translation>Degré max de la surface</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_ARG_D_MAX</source>
+        <translation>Tolerance 3D de l&apos;approximation initiale</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_NO_POINTS</source>
+        <translation>Aucun point sélectionné</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/AdvancedGUI/AdvancedGEOM_msg_ja.ts b/src/AdvancedGUI/AdvancedGEOM_msg_ja.ts
new file mode 100644 (file)
index 0000000..a5e5e08
--- /dev/null
@@ -0,0 +1,313 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ja" sourcelanguage="en">
+  <context>
+    <name>@default</name>
+    <message>
+      <source>GEOM_ADVANCED</source>
+      <translation>高度な形状: タイプ %1</translation>
+    </message>
+    <message>
+      <source>GEOM_ADVANCED_201</source>
+      <translation>T型パイプ</translation>
+    </message>
+    <message>
+      <source>GEOM_ADVANCED_202</source>
+      <translation>カット済みディスク</translation>
+    </message>
+    <message>
+      <source>GEOM_ADVANCED_203</source>
+      <translation>カット シリンダー</translation>
+    </message>
+    <message>
+      <source>GEOM_DIVIDEDDISK</source>
+      <translation>Divided_Disk</translation>
+    </message>
+    <message>
+      <source>GEOM_DIVIDEDDISK_TITLE</source>
+      <translation>分割ディスクの構築</translation>
+    </message>
+    <message>
+      <source>GEOM_DIVIDEDCYLINDER</source>
+      <translation>Divided_Cylinder</translation>
+    </message>
+    <message>
+      <source>GEOM_DIVIDEDCYLINDER_TITLE</source>
+      <translation>分割シリンダの構築</translation>
+    </message>
+    <message>
+      <source>MEN_DIVIDEDCYLINDER</source>
+      <translation>分割シリンダ</translation>
+    </message>
+    <message>
+      <source>TOP_DIVIDEDCYLINDER</source>
+      <translation>分割シリンダ</translation>
+    </message>
+    <message>
+      <source>STB_DIVIDEDCYLINDER</source>
+      <translation>分割シリンダ</translation>
+    </message>
+    <message>
+      <source>MEN_DIVIDEDDISK</source>
+      <translation>分割ディスク</translation>
+    </message>
+    <message>
+      <source>TOP_DIVIDEDDISK</source>
+      <translation>分割ディスク</translation>
+    </message>
+    <message>
+      <source>STB_DIVIDEDDISK</source>
+      <translation>分割ディスク</translation>
+    </message>
+    <message>
+      <source>TOP_PIPETSHAPE</source>
+      <translation>T型パイプを作成</translation>
+    </message>
+    <message>
+      <source>MEN_PIPETSHAPE</source>
+      <translation>T型パイプを作成</translation>
+    </message>
+    <message>
+      <source>STB_PIPETSHAPE</source>
+      <translation>T型パイプを作成</translation>
+    </message>
+    <message>
+      <source>TOP_SMOOTHINGSURFACE</source>
+      <translation>表面のスムージング</translation>
+    </message>
+    <message>
+      <source>MEN_SMOOTHINGSURFACE</source>
+      <translation>表面の平滑化</translation>
+    </message>
+    <message>
+      <source>STB_SMOOTHINGSURFACE</source>
+      <translation>表面のスムージング</translation>
+    </message>
+    <message>
+      <source>HALF_LENGTH_MAIN_PIPE</source>
+      <translation>半分の長さのパイプを作成</translation>
+    </message>
+    <message>
+      <source>HALF_LENGTH_INCIDENT_PIPE</source>
+      <translation>入射管長さ半分</translation>
+    </message>
+    <message>
+      <source>CIRCULAR_QUARTER_PIPE</source>
+      <translation>パイプの1/4形状</translation>
+    </message>
+    <message>
+      <source>THICKNESS</source>
+      <translation>厚み</translation>
+    </message>
+    <message>
+      <source>FLANGE</source>
+      <translation>フランジ</translation>
+    </message>
+    <message>
+      <source>CHAMFER_OR_FILLET</source>
+      <translation>面取り 又は フィレット</translation>
+    </message>
+    <message>
+      <source>CHAMFER</source>
+      <translation>面取り</translation>
+    </message>
+    <message>
+      <source>FILLET</source>
+      <translation>フィレット</translation>
+    </message>
+    <message>
+      <source>JUNCTION_FACE_1</source>
+      <translation>Junction 1</translation>
+    </message>
+    <message>
+      <source>JUNCTION_FACE_2</source>
+      <translation>Junction 2</translation>
+    </message>
+    <message>
+      <source>JUNCTION_FACE_3</source>
+      <translation>Junction 3</translation>
+    </message>
+    <message>
+      <source>INTERNAL_FACES</source>
+      <translation>内部の顔</translation>
+    </message>
+  </context>
+  <context>
+    <name>AdvancedGUI_PipeTShapeDlg</name>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_TITLE</source>
+      <translation>T型パイプの作成</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE</source>
+      <translation>PipeTShape</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_MPIPE</source>
+      <translation>メインパイプ</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_R</source>
+      <translation>半径</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_W</source>
+      <translation>幅</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_L</source>
+      <translation>半分の長さ</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_IPIPE</source>
+      <translation>付随パイプ</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_CHAMFER</source>
+      <translation>面取り</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_CHAMFER_H</source>
+      <translation>高さ</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_CHAMFER_W</source>
+      <translation>幅</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_FILLET</source>
+      <translation>フィレット</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_HEX</source>
+      <translation>六面体メッシュの準備</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_POSITION</source>
+      <translation>位置を設定</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_POSITION_P1</source>
+      <translation>接続部 P1</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_POSITION_P2</source>
+      <translation>接続部 P2</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_POSITION_P3</source>
+      <translation>接続部 P3</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_POSITION_LBL_L1</source>
+      <translation>New L1</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
+      <translation>New L2</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_LEFT_TR</source>
+      <translation>左側肉厚変更</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_RIGHT_TR</source>
+      <translation>右側肉厚変更</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_INCI_TR</source>
+      <translation>付随パイプ肉厚変更</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_TR_R</source>
+      <translation>半径 (r%1)</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_TR_W</source>
+      <translation>厚み (w%1)</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_TR_L_TRANS</source>
+      <translation>拡張部長さ (ltrans %1)</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPE_TSHAPE_TR_L_THIN</source>
+      <translation>接続部長さ (lthin %1)</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPETSHAPE_GROUPMAIN</source>
+      <translation>メインの設定</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPETSHAPE_GROUPREDUCT</source>
+      <translation>接続部詳細設定</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPETSHAPE_GROUPPOS</source>
+      <translation>位置による設定</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_L</source>
+      <translation type="unfinished">メインパイプの半径は、左側薄型化(rL)と等しくすることはできません!</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_L</source>
+      <translation type="unfinished">メインパイプの外半径(半径+幅)は、左側薄型化外半径(rL+wL)と等しくすることはできません!</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_R</source>
+      <translation type="unfinished">メインパイプの半径は、右側薄型化半径(rR)と同じにすることはできません!</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_R</source>
+      <translation type="unfinished">メインパイプの外半径(半径+幅)は、右側薄型化外半径(rR+wR)と等しくすることはできません!</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_I</source>
+      <translation type="unfinished">インシデントパイプの半径は、インシデントパイプ薄肉化半径(rl)と等しくすることはできません!</translation>
+    </message>
+    <message>
+      <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_I</source>
+      <translation type="unfinished">インシデントパイプの外半径(半径+厚さ)は、インシデントパイプの薄肉化外半径(rI+wI)と等しくすることはできません!</translation>
+    </message>
+  </context>
+  <context>
+    <name>AdvancedGUI_SmoothingSurfaceDlg</name>
+    <message>
+      <source>GEOM_SMOOTHINGSURFACE_TITLE</source>
+      <translation>滑らかな表面の構造</translation>
+    </message>
+    <message>
+      <source>GEOM_SMOOTHINGSURFACE</source>
+      <translation>表面 lissee</translation>
+    </message>
+    <message>
+      <source>GEOM_SMOOTHINGSURFACE_RESULT</source>
+      <translation>結果の名前</translation>
+    </message>
+    <message>
+      <source>GEOM_SMOOTHINGSURFACE_ARG</source>
+      <translation>節点</translation>
+    </message>
+    <message>
+      <source>GEOM_SMOOTHINGSURFACE_ARG_POINTS</source>
+      <translation>ポイント</translation>
+    </message>
+    <message>
+      <source>GEOM_SMOOTHINGSURFACE_ARG_NB_MAX</source>
+      <translation>ベジェパッチの最大数</translation>
+    </message>
+    <message>
+      <source>GEOM_SMOOTHINGSURFACE_ARG_DEG_MAX</source>
+      <translation>Bスプライン面の最大自由度</translation>
+    </message>
+    <message>
+      <source>GEOM_SMOOTHINGSURFACE_ARG_D_MAX</source>
+      <translation>初期近似の3次元公差</translation>
+    </message>
+    <message>
+      <source>GEOM_SMOOTHINGSURFACE_NO_POINTS</source>
+      <translation>点が選択されていない</translation>
+    </message>
+  </context>
+</TS>
index 4b1a9f28883bda08195d58d26165ead657fe715e..7216672062462d3aa8a3e586cf6a01989f60bfa7 100644 (file)
@@ -216,7 +216,6 @@ void AdvancedGUI_DividedCylinderDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr AdvancedGUI_DividedCylinderDlg::createOperation()
 {
-  //return getGeomEngine()->GetIAdvancedOperations(getStudyId());
   return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
 }
 
@@ -243,7 +242,7 @@ bool AdvancedGUI_DividedCylinderDlg::execute (ObjectList& objects)
 
   GEOM::GEOM_Object_var anObj;
 
-  GEOM::GEOM_IAdvancedOperations_var anOper = GEOM::GEOM_IAdvancedOperations::_narrow(getOperation());
+  GEOM::IAdvancedOperations_var anOper = GEOM::IAdvancedOperations::_narrow(getOperation());
 
   //@@ retrieve input values from the widgets here @@//
   CORBA::Double theR = GroupParams->SpinBox_DX->value();
index 3fef245e902a5b2933d6f8231d462b19403c4c4a..bc1760cae8adebf7c6b76722f34c8119dca69ad1 100644 (file)
@@ -25,6 +25,9 @@
 
 #include <GEOMBase_Skeleton.h>
 
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(AdvancedGEOM)
+
 class DlgRef_2Spin;
 class DlgRef_3Radio;
 
index 974a66a89e1824e5213014507b6ad8c79589da34..2b409e91fbe7ed85c8d7076ae345588e00180f29 100644 (file)
@@ -392,7 +392,6 @@ void AdvancedGUI_DividedDiskDlg::ValueChangedInSpinBox()
 //=================================================================================
 GEOM::GEOM_IOperations_ptr AdvancedGUI_DividedDiskDlg::createOperation()
 {
-  //return getGeomEngine()->GetIAdvancedOperations(getStudyId());
   return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
 }
 
@@ -419,7 +418,8 @@ bool AdvancedGUI_DividedDiskDlg::execute (ObjectList& objects)
 
   GEOM::GEOM_Object_var anObj;
 
-  GEOM::GEOM_IAdvancedOperations_var anOper = GEOM::GEOM_IAdvancedOperations::_narrow(getOperation());
+  GEOM::IAdvancedOperations_var anOper = GEOM::IAdvancedOperations::_narrow(getOperation());
+
   CORBA::Double theRatio = 67; // About  2/3  
   CORBA::Double theR = 0;
   
index aac6532cbc52b9983b559ee288091371108ac3e3..60ce1fc070b1032dfc4261d8c7aed687901c3ead 100644 (file)
@@ -25,6 +25,9 @@
 
 #include <GEOMBase_Skeleton.h>
 
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(AdvancedGEOM)
+
 class DlgRef_1Spin;
 class DlgRef_3Radio;
 class DlgRef_2Sel1Spin;
index 1eac6f55f9bdff6a30acd368d60cb90240501bcc..ee07a99cdcec2663479f4c2295344e6ac0b7f67c 100644 (file)
@@ -19,6 +19,9 @@
 
 #include "AdvancedGUI_PipeTShapeDlg.h"
 
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(AdvancedGEOM)
+
 #include <DlgRef.h>
 #include <GeometryGUI.h>
 #include <GEOMBase.h>
@@ -844,7 +847,6 @@ void AdvancedGUI_PipeTShapeDlg::DisplayPreview (const bool activate, const bool
 //=================================================================================
 GEOM::GEOM_IOperations_ptr AdvancedGUI_PipeTShapeDlg::createOperation()
 {
-  //return getGeomEngine()->GetIAdvancedOperations(getStudyId());
   return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
 }
 
@@ -1059,7 +1061,7 @@ bool AdvancedGUI_PipeTShapeDlg::executeNoCheck (ObjectList& objects)
   //   GEOM::GEOM_Object_var anObj;
   GEOM::ListOfGO_var anObj;
 
-  GEOM::GEOM_IAdvancedOperations_var anOper = GEOM::GEOM_IAdvancedOperations::_narrow(getOperation());
+  GEOM::IAdvancedOperations_var anOper = GEOM::IAdvancedOperations::_narrow(getOperation());
 
   //@@ retrieve input values from the widgets here @@//
   CORBA::Double theR1 = MainTubeGroupParams->SpinBox_DX->value();
index 151af634847d6ff77adad792919e81e4a0027b68..89c5f68ce9ccf3934dfdd5524d6d5d493d170f36 100644 (file)
@@ -19,6 +19,9 @@
 
 #include "AdvancedGUI_SmoothingSurfaceDlg.h"
 
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(AdvancedGEOM)
+
 #include <DlgRef.h>
 #include <GeometryGUI.h>
 #include <GEOMBase.h>
@@ -187,7 +190,6 @@ void AdvancedGUI_SmoothingSurfaceDlg::enterEvent (QEvent*)
 //=================================================================================
 GEOM::GEOM_IOperations_ptr AdvancedGUI_SmoothingSurfaceDlg::createOperation()
 {
-  //return getGeomEngine()->GetIAdvancedOperations(getStudyId());
   return getGeomEngine()->GetPluginOperations(getStudyId(), "AdvancedEngine");
 }
 
@@ -219,7 +221,7 @@ bool AdvancedGUI_SmoothingSurfaceDlg::execute (ObjectList& objects)
 
   GEOM::GEOM_Object_var anObj;
 
-  GEOM::GEOM_IAdvancedOperations_var anOper = GEOM::GEOM_IAdvancedOperations::_narrow(getOperation());
+  GEOM::IAdvancedOperations_var anOper = GEOM::IAdvancedOperations::_narrow(getOperation());
 
   //@@ retrieve input values from the widgets here @@//
   GEOM::ListOfGO_var points = new GEOM::ListOfGO();
diff --git a/src/AdvancedGUI/AdvancedGUI_images.ts b/src/AdvancedGUI/AdvancedGUI_images.ts
deleted file mode 100644 (file)
index 3dd602c..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="en_US">
-    <context>
-        <name>@default</name>
-        <message>
-            <source>ICON_OBJBROWSER_ADVANCED_201</source>
-            <translation>tree_pipetshape.png</translation>
-       </message>
-        <message>
-            <source>ICON_OBJBROWSER_ADVANCED_202</source>
-            <translation>divided_disk.png</translation>
-        </message>
-        <message>
-            <source>ICON_OBJBROWSER_ADVANCED_203</source>
-            <translation>dividedcylinder.png</translation>
-        </message>
-        <message>
-            <source>ICON_OBJBROWSER_ADVANCED_204</source>
-            <translation>tree_smoothingsurface.png</translation>
-        </message>
-
-        <message>
-            <source>ICON_DLG_PIPETSHAPE</source>
-            <translation>pipetshape.png</translation>
-        </message>
-        <message>
-            <source>ICO_PIPETSHAPE</source>
-            <translation>pipetshape.png</translation>
-        </message>
-        <message>
-            <source>ICO_PIPETSHAPE_IMPORT</source>
-            <translation>pipetshape_import_icon.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE</source>
-            <translation>dlg_pipetshape.png</translation>
-        </message>
-        <message>
-            <source>IMG_PIPETSHAPE_SECT</source>
-            <translation>pipetshape_section.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_L1</source>
-            <translation>dlg_pipetshapel1.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_R1</source>
-            <translation>dlg_pipetshaper1.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_W1</source>
-            <translation>dlg_pipetshapew1.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_L2</source>
-            <translation>dlg_pipetshapel2.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_R2</source>
-            <translation>dlg_pipetshaper2.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_W2</source>
-            <translation>dlg_pipetshapew2.png</translation>
-        </message>
-        
-        <message>
-            <source>DLG_PIPETSHAPE_FILLET</source>
-            <translation>dlg_pipetshapefillet.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_FILLET_L1</source>
-            <translation>dlg_pipetshapefilletl1.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_FILLET_R1</source>
-            <translation>dlg_pipetshapefilletr1.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_FILLET_W1</source>
-            <translation>dlg_pipetshapefilletw1.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_FILLET_L2</source>
-            <translation>dlg_pipetshapefilletl2.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_FILLET_R2</source>
-            <translation>dlg_pipetshapefilletr2.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_FILLET_W2</source>
-            <translation>dlg_pipetshapefilletw2.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_FILLET_RF</source>
-            <translation>dlg_pipetshapefilletrf.png</translation>
-        </message>
-        
-        <message>
-            <source>DLG_PIPETSHAPE_CHAMFER</source>
-            <translation>dlg_pipetshapechamfer.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_CHAMFER_L1</source>
-            <translation>dlg_pipetshapechamferl1.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_CHAMFER_R1</source>
-            <translation>dlg_pipetshapechamferr1.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_CHAMFER_W1</source>
-            <translation>dlg_pipetshapechamferw1.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_CHAMFER_L2</source>
-            <translation>dlg_pipetshapechamferl2.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_CHAMFER_R2</source>
-            <translation>dlg_pipetshapechamferr2.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_CHAMFER_W2</source>
-            <translation>dlg_pipetshapechamferw2.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_CHAMFER_H</source>
-            <translation>dlg_pipetshapechamferh.png</translation>
-        </message>
-        <message>
-            <source>DLG_PIPETSHAPE_CHAMFER_W</source>
-            <translation>dlg_pipetshapechamferw.png</translation>
-        </message>
-        
-<!--
-       <message>
-            <source>ICON_DLG_PIPETSHAPEGROUPS</source>
-            <translation>pipetshapegroups.png</translation>
-        </message>
-        <message>
-            <source>ICO_PIPETSHAPEGROUPS</source>
-            <translation>pipetshapegroups.png</translation>
-        </message>
--->
-
-        <message>
-            <source>ICON_DLG_DIVIDEDDISK_R_RATIO</source>
-            <translation>divided_disk.png</translation>
-        </message>
-        <message>
-            <source>ICO_DIVIDEDDISK</source>
-            <translation>divided_disk.png</translation>
-        </message>
-
-        <message>
-            <source>ICON_DLG_DIVIDEDCYLINDER_R_H</source>
-            <translation>dividedcylinder_r_h.png</translation>
-        </message>
-        <message>
-            <source>ICO_DIVIDEDCYLINDER</source>
-            <translation>dividedcylinder.png</translation>
-        </message>
-
-        <message>
-            <source>ICON_DLG_SMOOTHINGSURFACE_LPOINTS</source>
-            <translation>smoothingsurface_lpoints.png</translation>
-        </message>
-        <message>
-            <source>ICO_SMOOTHINGSURFACE</source>
-            <translation>smoothingsurface.png</translation>
-        </message>
-       <!-- @@ insert new functions before this line @@ do not remove this line @@ -->
-    </context>
-</TS>
diff --git a/src/AdvancedGUI/AdvancedGUI_msg_en.ts b/src/AdvancedGUI/AdvancedGUI_msg_en.ts
deleted file mode 100644 (file)
index 06ab043..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="en_US">
-<context>
-    <name>@default</name>
-    <message>
-        <source>GEOM_ADVANCED</source>
-        <translation>Advanced shape: type %1</translation>
-    </message>
-    <message>
-        <source>GEOM_ADVANCED_201</source>
-        <translation>Pipe TShape</translation>
-    </message>
-    <message>
-        <source>GEOM_ADVANCED_202</source>
-        <translation>Divided Disk</translation>
-    </message>
-    <message>
-        <source>GEOM_ADVANCED_203</source>
-        <translation>Divided Cylinder</translation>
-    </message>
-    <message>
-        <source>GEOM_DIVIDEDDISK</source>
-        <translation>Divided Disk</translation>
-    </message>
-    <message>
-        <source>GEOM_DIVIDEDDISK_TITLE</source>
-        <translation>Divided Disk construction</translation>
-    </message>
-    <message>
-        <source>GEOM_DIVIDEDCYLINDER</source>
-        <translation>Divided Cylinder</translation>
-    </message>
-    <message>
-        <source>GEOM_DIVIDEDCYLINDER_TITLE</source>
-        <translation>Divided Cylinder construction</translation>
-    </message>
-    <message>
-        <source>MEN_DIVIDEDCYLINDER</source>
-        <translation>Divided Cylinder</translation>
-    </message>
-    <message>
-        <source>TOP_DIVIDEDCYLINDER</source>
-        <translation>Divided Cylinder</translation>
-    </message>
-    <message>
-        <source>STB_DIVIDEDCYLINDER</source>
-        <translation>Divided Cylinder</translation>
-    </message>
-    <message>
-        <source>MEN_DIVIDEDDISK</source>
-        <translation>Divided Disk</translation>
-    </message>
-    <message>
-        <source>TOP_DIVIDEDDISK</source>
-        <translation>Divided Disk</translation>
-    </message>
-    <message>
-        <source>STB_DIVIDEDDISK</source>
-        <translation>Divided Disk</translation>
-    </message>
-    <message>
-        <source>TOP_PIPETSHAPE</source>
-        <translation>Create Pipe TShape</translation>
-    </message>
-    <message>
-        <source>MEN_PIPETSHAPE</source>
-        <translation>Pipe TShape</translation>
-    </message>
-    <message>
-        <source>STB_PIPETSHAPE</source>
-        <translation>Create new Pipe TShape object</translation>
-    </message>
-    <message>
-        <source>TOP_SMOOTHINGSURFACE</source>
-        <translation>Smoothing Surface</translation>
-    </message>
-    <message>
-        <source>MEN_SMOOTHINGSURFACE</source>
-        <translation>Smoothing Surface</translation>
-    </message>
-    <message>
-        <source>STB_SMOOTHINGSURFACE</source>
-        <translation>Smoothing Surface</translation>
-    </message>
-    <message>
-        <source>HALF_LENGTH_MAIN_PIPE</source>
-        <translation>Main pipe half length</translation>
-    </message>
-    <message>
-        <source>HALF_LENGTH_INCIDENT_PIPE</source>
-        <translation>Incident pipe half length</translation>
-    </message>
-    <message>
-        <source>CIRCULAR_QUARTER_PIPE</source>
-        <translation>Circular quarter of pipe</translation>
-    </message>
-    <message>
-        <source>THICKNESS</source>
-        <translation>Thickness</translation>
-    </message>
-    <message>
-        <source>FLANGE</source>
-        <translation>Flange</translation>
-    </message>
-    <message>
-        <source>CHAMFER_OR_FILLET</source>
-        <translation>Chamfer or fillet</translation>
-    </message>
-    <message>
-        <source>CHAMFER</source>
-        <translation>Chamfer</translation>
-    </message>
-    <message>
-        <source>FILLET</source>
-        <translation>Fillet</translation>
-    </message>
-    <message>
-        <source>JUNCTION_FACE_1</source>
-        <translation>Junction 1</translation>
-    </message>
-    <message>
-        <source>JUNCTION_FACE_2</source>
-        <translation>Junction 2</translation>
-    </message>
-    <message>
-        <source>JUNCTION_FACE_3</source>
-        <translation>Junction 3</translation>
-    </message>
-    <message>
-        <source>INTERNAL_FACES</source>
-        <translation>Internal faces</translation>
-    </message>
-</context>
-<context>
-    <name>AdvancedGUI_PipeTShapeDlg</name>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_TITLE</source>
-        <translation>Pipe TShape Construction</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE</source>
-        <translation>PipeTShape</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_MPIPE</source>
-        <translation>Main pipe</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_R</source>
-        <translation>Radius</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_W</source>
-        <translation>Width</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_L</source>
-        <translation>Half-length</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_IPIPE</source>
-        <translation>Incident pipe</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_CHAMFER</source>
-        <translation>Chamfer</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_CHAMFER_H</source>
-        <translation>Height</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_CHAMFER_W</source>
-        <translation>Width</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_FILLET</source>
-        <translation>Fillet</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_HEX</source>
-        <translation>Prepare for hex mesh</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_POSITION</source>
-        <translation>Set position</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_POSITION_P1</source>
-        <translation>Junction P1</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_POSITION_P2</source>
-        <translation>Junction P2</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_POSITION_P3</source>
-        <translation>Junction P3</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_POSITION_LBL_L1</source>
-        <translation>New L1</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
-        <translation>New L2</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_LEFT_TR</source>
-        <translation>Left thickness reduction</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_RIGHT_TR</source>
-        <translation>Right thickness reduction</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_INCI_TR</source>
-        <translation>Incident pipe thickness reduction</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_TR_R</source>
-        <translation>Radius (r%1)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_TR_W</source>
-        <translation>Width (w%1)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_TR_L_TRANS</source>
-        <translation>Transition length (ltrans%1)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_TR_L_THIN</source>
-        <translation>Thin part length (lthin%1)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_GROUPMAIN</source>
-        <translation>Main parameters</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_GROUPREDUCT</source>
-        <translation>Thickness reduction</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_GROUPPOS</source>
-        <translation>Position</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_L</source>
-        <translation>The main pipe radius can&apos;t be equal to the left thickness reduction radius (rL)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_L</source>
-        <translation>The main pipe external radius (Radius + Width) can&apos;t be equal to the left thickness reduction external radius (rL + wL)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_R</source>
-        <translation>The main pipe radius can&apos;t be equal to the right thickness reduction radius (rR)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_R</source>
-        <translation>The main pipe external radius (Radius + Width) can&apos;t be equal to the right thickness reduction external radius (rR + wR)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_I</source>
-        <translation>The incident pipe radius can&apos;t be equal to the incident pipe thickness reduction radius (rI)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_I</source>
-        <translation>The incident pipe external radius (Radius + Width) can&apos;t be equal to the incident pipe thickness reduction external radius (rI + wI)</translation>
-    </message>
-</context>
-<context>
-    <name>AdvancedGUI_SmoothingSurfaceDlg</name>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_TITLE</source>
-        <translation>Smoothing surface Construction</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE</source>
-        <translation>Smoothing surface</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_RESULT</source>
-        <translation>Result name</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_ARG</source>
-        <translation>Arguments</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_ARG_POINTS</source>
-        <translation>Points</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_ARG_NB_MAX</source>
-        <translation>Max nbr of Bezier pieces</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_ARG_DEG_MAX</source>
-        <translation>Max BSpline surface degree</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_ARG_D_MAX</source>
-        <translation>3D tolerance of initial approximation</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_NO_POINTS</source>
-        <translation>No points selected</translation>
-    </message>
-</context>
-</TS>
diff --git a/src/AdvancedGUI/AdvancedGUI_msg_fr.ts b/src/AdvancedGUI/AdvancedGUI_msg_fr.ts
deleted file mode 100644 (file)
index 912a300..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="fr_FR">
-<context>
-    <name>@default</name>
-    <message>
-        <source>GEOM_ADVANCED</source>
-        <translation>Objet géométrique avancé : type %1</translation>
-    </message>
-    <message>
-        <source>GEOM_ADVANCED_201</source>
-        <translation>Tuyau en T</translation>
-    </message>
-    <message>
-        <source>GEOM_ADVANCED_202</source>
-        <translation>Disque prédécoupé</translation>
-    </message>
-    <message>
-        <source>GEOM_ADVANCED_203</source>
-        <translation>Cylindre prédécoupé</translation>
-    </message>
-    <message>
-        <source>GEOM_DIVIDEDDISK</source>
-        <translation>Disque prédécoupé</translation>
-    </message>
-    <message>
-        <source>GEOM_DIVIDEDDISK_TITLE</source>
-        <translation>Construction d&apos;un disque prédécoupé</translation>
-    </message>
-    <message>
-        <source>GEOM_DIVIDEDCYLINDER</source>
-        <translation>Cylinder prédécoupé</translation>
-    </message>
-    <message>
-        <source>GEOM_DIVIDEDCYLINDER_TITLE</source>
-        <translation>Construction d&apos;un cylindre prédécoupé</translation>
-    </message>
-    <message>
-        <source>MEN_DIVIDEDCYLINDER</source>
-        <translation>Cylinder prédécoupé</translation>
-    </message>
-    <message>
-        <source>TOP_DIVIDEDCYLINDER</source>
-        <translation>Cylinder prédécoupé</translation>
-    </message>
-    <message>
-        <source>STB_DIVIDEDCYLINDER</source>
-        <translation>Cylinder prédécoupé</translation>
-    </message>
-    <message>
-        <source>MEN_DIVIDEDDISK</source>
-        <translation>Disque prédécoupé</translation>
-    </message>
-    <message>
-        <source>TOP_DIVIDEDDISK</source>
-        <translation>Disque prédécoupé</translation>
-    </message>
-    <message>
-        <source>STB_DIVIDEDDISK</source>
-        <translation>Disque prédécoupé</translation>
-    </message>
-    <message>
-        <source>TOP_PIPETSHAPE</source>
-        <translation>Créer un tuyau en T</translation>
-    </message>
-    <message>
-        <source>MEN_PIPETSHAPE</source>
-        <translation>Tuyau en T</translation>
-    </message>
-    <message>
-        <source>STB_PIPETSHAPE</source>
-        <translation>Créer un tuyau en T</translation>
-    </message>
-    <message>
-        <source>TOP_SMOOTHINGSURFACE</source>
-        <translation> Ajustement de surface</translation>
-    </message>
-    <message>
-        <source>MEN_SMOOTHINGSURFACE</source>
-        <translation> Ajustement de surface</translation>
-    </message>
-    <message>
-        <source>STB_SMOOTHINGSURFACE</source>
-        <translation> Ajustement de surface</translation>
-    </message>
-    <message>
-        <source>HALF_LENGTH_MAIN_PIPE</source>
-        <translation>Demi-longueur du tuyau principal </translation>
-    </message>
-    <message>
-        <source>HALF_LENGTH_INCIDENT_PIPE</source>
-        <translation>Demi-longueur du tuyau incident</translation>
-    </message>
-    <message>
-        <source>CIRCULAR_QUARTER_PIPE</source>
-        <translation>Un quart circulaire du tuyau</translation>
-    </message>
-    <message>
-        <source>THICKNESS</source>
-        <translation>Epaisseur</translation>
-    </message>
-    <message>
-        <source>FLANGE</source>
-        <translation>Collerette</translation>
-    </message>
-    <message>
-        <source>CHAMFER_OR_FILLET</source>
-        <translation>Chanfrein ou congé</translation>
-    </message>
-    <message>
-        <source>CHAMFER</source>
-        <translation>Chanfrein</translation>
-    </message>
-    <message>
-        <source>FILLET</source>
-        <translation>Congé</translation>
-    </message>
-    <message>
-        <source>JUNCTION_FACE_1</source>
-        <translation>Jonction 1</translation>
-    </message>
-    <message>
-        <source>JUNCTION_FACE_2</source>
-        <translation>Jonction 2</translation>
-    </message>
-    <message>
-        <source>JUNCTION_FACE_3</source>
-        <translation>Jonction 3</translation>
-    </message>
-    <message>
-        <source>INTERNAL_FACES</source>
-        <translation>Faces internes</translation>
-    </message>
-</context>
-<context>
-    <name>AdvancedGUI_PipeTShapeDlg</name>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_TITLE</source>
-        <translation>Construction d&apos;un tuyau en T</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE</source>
-        <translation>Tuyau en T</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_MPIPE</source>
-        <translation>Tuyau principal</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_R</source>
-        <translation>Rayon</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_W</source>
-        <translation>Largeur</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_L</source>
-        <translation>Demi-longueur</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_IPIPE</source>
-        <translation>Tuyau incident</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_CHAMFER</source>
-        <translation>Chanfrein</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_CHAMFER_H</source>
-        <translation>Hauteur</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_CHAMFER_W</source>
-        <translation>Largeur</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_FILLET</source>
-        <translation>Congé</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_HEX</source>
-        <translation>Préparer pour un maillage hexaédrique</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_POSITION</source>
-        <translation>Définir la position</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_POSITION_P1</source>
-        <translation>Jonction P1</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_POSITION_P2</source>
-        <translation>Jonction P2</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_POSITION_P3</source>
-        <translation>Jonction P3</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_POSITION_LBL_L1</source>
-        <translation>Nouvelle L1</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
-        <translation>Nouvelle L2</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_LEFT_TR</source>
-        <translation>Réduction d&apos;épaisseur à gauche</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_RIGHT_TR</source>
-        <translation>Réduction d&apos;épaisseur à droite</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_INCI_TR</source>
-        <translation>Réduction d&apos;épaisseur du tuyau incident</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_TR_R</source>
-        <translation>Rayon (r%1)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_TR_W</source>
-        <translation>Epaisseur (w%1)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_TR_L_TRANS</source>
-        <translation>Longueur de transition (ltrans%1)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPE_TSHAPE_TR_L_THIN</source>
-        <translation>Longueur de la partie étroite (lthin%1)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_GROUPMAIN</source>
-        <translation>Paramètres principaux</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_GROUPREDUCT</source>
-        <translation>Réduction d&apos;épaisseur</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_GROUPPOS</source>
-        <translation>Position</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_L</source>
-        <translation>Le rayon du tuyau principal ne peut pas être égal à la réduction d&apos;épaisseur à gauche (rL)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_L</source>
-        <translation>Le rayon extérieur du tuyau principal (Rayon + épaisseur) ne peut pas être égal au rayon externe de la réduction d&apos;épaisseur à gauche (rL + wL)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_R</source>
-        <translation>Le rayon du tuyau principal ne peut pas être égal au rayon de la réduction d&apos;épaisseur à droite (rR)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_R</source>
-        <translation>Le rayon extérieur du tuyau principal (Rayon + épaisseur) ne peut pas être égal au rayon externe de la réduction d&apos;épaisseur à droite (rL + wL)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_I</source>
-        <translation>Le rayon du tuyau incident ne peut pas être égal au rayon de la réduction d&apos;épaisseur du tuyau incident (rI)</translation>
-    </message>
-    <message>
-        <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_I</source>
-        <translation>Le rayon externe du tuyau incident (Rayon + Epaisseur) ne peut pas être égal au rayon extérieur de la réduction du tuyau incident (rI + wI)</translation>
-    </message>
-</context>
-<context>
-    <name>AdvancedGUI_SmoothingSurfaceDlg</name>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_TITLE</source>
-        <translation>Ajustement de surface sur des points</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE</source>
-        <translation>Ajustement de surface</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_RESULT</source>
-        <translation>Nom du résultat</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_ARG</source>
-        <translation>Noeuds</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_ARG_POINTS</source>
-        <translation>Points</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_ARG_NB_MAX</source>
-        <translation>Nombre max de patchs Bezier</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_ARG_DEG_MAX</source>
-        <translation>Degré max de la surface</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_ARG_D_MAX</source>
-        <translation>Tolerance 3D de l&apos;approximation initiale</translation>
-    </message>
-    <message>
-        <source>GEOM_SMOOTHINGSURFACE_NO_POINTS</source>
-        <translation>Aucun point sélectionné</translation>
-    </message>
-</context>
-</TS>
diff --git a/src/AdvancedGUI/AdvancedGUI_msg_ja.ts b/src/AdvancedGUI/AdvancedGUI_msg_ja.ts
deleted file mode 100644 (file)
index a5e5e08..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="ja" sourcelanguage="en">
-  <context>
-    <name>@default</name>
-    <message>
-      <source>GEOM_ADVANCED</source>
-      <translation>高度な形状: タイプ %1</translation>
-    </message>
-    <message>
-      <source>GEOM_ADVANCED_201</source>
-      <translation>T型パイプ</translation>
-    </message>
-    <message>
-      <source>GEOM_ADVANCED_202</source>
-      <translation>カット済みディスク</translation>
-    </message>
-    <message>
-      <source>GEOM_ADVANCED_203</source>
-      <translation>カット シリンダー</translation>
-    </message>
-    <message>
-      <source>GEOM_DIVIDEDDISK</source>
-      <translation>Divided_Disk</translation>
-    </message>
-    <message>
-      <source>GEOM_DIVIDEDDISK_TITLE</source>
-      <translation>分割ディスクの構築</translation>
-    </message>
-    <message>
-      <source>GEOM_DIVIDEDCYLINDER</source>
-      <translation>Divided_Cylinder</translation>
-    </message>
-    <message>
-      <source>GEOM_DIVIDEDCYLINDER_TITLE</source>
-      <translation>分割シリンダの構築</translation>
-    </message>
-    <message>
-      <source>MEN_DIVIDEDCYLINDER</source>
-      <translation>分割シリンダ</translation>
-    </message>
-    <message>
-      <source>TOP_DIVIDEDCYLINDER</source>
-      <translation>分割シリンダ</translation>
-    </message>
-    <message>
-      <source>STB_DIVIDEDCYLINDER</source>
-      <translation>分割シリンダ</translation>
-    </message>
-    <message>
-      <source>MEN_DIVIDEDDISK</source>
-      <translation>分割ディスク</translation>
-    </message>
-    <message>
-      <source>TOP_DIVIDEDDISK</source>
-      <translation>分割ディスク</translation>
-    </message>
-    <message>
-      <source>STB_DIVIDEDDISK</source>
-      <translation>分割ディスク</translation>
-    </message>
-    <message>
-      <source>TOP_PIPETSHAPE</source>
-      <translation>T型パイプを作成</translation>
-    </message>
-    <message>
-      <source>MEN_PIPETSHAPE</source>
-      <translation>T型パイプを作成</translation>
-    </message>
-    <message>
-      <source>STB_PIPETSHAPE</source>
-      <translation>T型パイプを作成</translation>
-    </message>
-    <message>
-      <source>TOP_SMOOTHINGSURFACE</source>
-      <translation>表面のスムージング</translation>
-    </message>
-    <message>
-      <source>MEN_SMOOTHINGSURFACE</source>
-      <translation>表面の平滑化</translation>
-    </message>
-    <message>
-      <source>STB_SMOOTHINGSURFACE</source>
-      <translation>表面のスムージング</translation>
-    </message>
-    <message>
-      <source>HALF_LENGTH_MAIN_PIPE</source>
-      <translation>半分の長さのパイプを作成</translation>
-    </message>
-    <message>
-      <source>HALF_LENGTH_INCIDENT_PIPE</source>
-      <translation>入射管長さ半分</translation>
-    </message>
-    <message>
-      <source>CIRCULAR_QUARTER_PIPE</source>
-      <translation>パイプの1/4形状</translation>
-    </message>
-    <message>
-      <source>THICKNESS</source>
-      <translation>厚み</translation>
-    </message>
-    <message>
-      <source>FLANGE</source>
-      <translation>フランジ</translation>
-    </message>
-    <message>
-      <source>CHAMFER_OR_FILLET</source>
-      <translation>面取り 又は フィレット</translation>
-    </message>
-    <message>
-      <source>CHAMFER</source>
-      <translation>面取り</translation>
-    </message>
-    <message>
-      <source>FILLET</source>
-      <translation>フィレット</translation>
-    </message>
-    <message>
-      <source>JUNCTION_FACE_1</source>
-      <translation>Junction 1</translation>
-    </message>
-    <message>
-      <source>JUNCTION_FACE_2</source>
-      <translation>Junction 2</translation>
-    </message>
-    <message>
-      <source>JUNCTION_FACE_3</source>
-      <translation>Junction 3</translation>
-    </message>
-    <message>
-      <source>INTERNAL_FACES</source>
-      <translation>内部の顔</translation>
-    </message>
-  </context>
-  <context>
-    <name>AdvancedGUI_PipeTShapeDlg</name>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_TITLE</source>
-      <translation>T型パイプの作成</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE</source>
-      <translation>PipeTShape</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_MPIPE</source>
-      <translation>メインパイプ</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_R</source>
-      <translation>半径</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_W</source>
-      <translation>幅</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_L</source>
-      <translation>半分の長さ</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_IPIPE</source>
-      <translation>付随パイプ</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_CHAMFER</source>
-      <translation>面取り</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_CHAMFER_H</source>
-      <translation>高さ</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_CHAMFER_W</source>
-      <translation>幅</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_FILLET</source>
-      <translation>フィレット</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_HEX</source>
-      <translation>六面体メッシュの準備</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_POSITION</source>
-      <translation>位置を設定</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_POSITION_P1</source>
-      <translation>接続部 P1</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_POSITION_P2</source>
-      <translation>接続部 P2</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_POSITION_P3</source>
-      <translation>接続部 P3</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_POSITION_LBL_L1</source>
-      <translation>New L1</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
-      <translation>New L2</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_LEFT_TR</source>
-      <translation>左側肉厚変更</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_RIGHT_TR</source>
-      <translation>右側肉厚変更</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_INCI_TR</source>
-      <translation>付随パイプ肉厚変更</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_TR_R</source>
-      <translation>半径 (r%1)</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_TR_W</source>
-      <translation>厚み (w%1)</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_TR_L_TRANS</source>
-      <translation>拡張部長さ (ltrans %1)</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPE_TSHAPE_TR_L_THIN</source>
-      <translation>接続部長さ (lthin %1)</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPETSHAPE_GROUPMAIN</source>
-      <translation>メインの設定</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPETSHAPE_GROUPREDUCT</source>
-      <translation>接続部詳細設定</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPETSHAPE_GROUPPOS</source>
-      <translation>位置による設定</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_L</source>
-      <translation type="unfinished">メインパイプの半径は、左側薄型化(rL)と等しくすることはできません!</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_L</source>
-      <translation type="unfinished">メインパイプの外半径(半径+幅)は、左側薄型化外半径(rL+wL)と等しくすることはできません!</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_R</source>
-      <translation type="unfinished">メインパイプの半径は、右側薄型化半径(rR)と同じにすることはできません!</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_R</source>
-      <translation type="unfinished">メインパイプの外半径(半径+幅)は、右側薄型化外半径(rR+wR)と等しくすることはできません!</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPETSHAPE_ERR_EQUAL_RADII_I</source>
-      <translation type="unfinished">インシデントパイプの半径は、インシデントパイプ薄肉化半径(rl)と等しくすることはできません!</translation>
-    </message>
-    <message>
-      <source>GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_I</source>
-      <translation type="unfinished">インシデントパイプの外半径(半径+厚さ)は、インシデントパイプの薄肉化外半径(rI+wI)と等しくすることはできません!</translation>
-    </message>
-  </context>
-  <context>
-    <name>AdvancedGUI_SmoothingSurfaceDlg</name>
-    <message>
-      <source>GEOM_SMOOTHINGSURFACE_TITLE</source>
-      <translation>滑らかな表面の構造</translation>
-    </message>
-    <message>
-      <source>GEOM_SMOOTHINGSURFACE</source>
-      <translation>表面 lissee</translation>
-    </message>
-    <message>
-      <source>GEOM_SMOOTHINGSURFACE_RESULT</source>
-      <translation>結果の名前</translation>
-    </message>
-    <message>
-      <source>GEOM_SMOOTHINGSURFACE_ARG</source>
-      <translation>節点</translation>
-    </message>
-    <message>
-      <source>GEOM_SMOOTHINGSURFACE_ARG_POINTS</source>
-      <translation>ポイント</translation>
-    </message>
-    <message>
-      <source>GEOM_SMOOTHINGSURFACE_ARG_NB_MAX</source>
-      <translation>ベジェパッチの最大数</translation>
-    </message>
-    <message>
-      <source>GEOM_SMOOTHINGSURFACE_ARG_DEG_MAX</source>
-      <translation>Bスプライン面の最大自由度</translation>
-    </message>
-    <message>
-      <source>GEOM_SMOOTHINGSURFACE_ARG_D_MAX</source>
-      <translation>初期近似の3次元公差</translation>
-    </message>
-    <message>
-      <source>GEOM_SMOOTHINGSURFACE_NO_POINTS</source>
-      <translation>点が選択されていない</translation>
-    </message>
-  </context>
-</TS>
index 74fe3dc94b204f1552c39ada91798b4501306e0b..1051f2b1998174123d1d01a7182ac48dcd903691 100755 (executable)
@@ -38,7 +38,11 @@ INCLUDE_DIRECTORIES(
   ${PROJECT_SOURCE_DIR}/src/GEOMImpl
   ${PROJECT_SOURCE_DIR}/src/GEOMGUI
   ${PROJECT_SOURCE_DIR}/src/GEOMBase
+  ${PROJECT_SOURCE_DIR}/src/GEOM
+  ${PROJECT_SOURCE_DIR}/src/GEOMAlgo
   ${PROJECT_SOURCE_DIR}/src/DlgRef
+  ${PROJECT_SOURCE_DIR}/src/AdvancedEngine
+  ${PROJECT_SOURCE_DIR}/src/GEOM_I
   ${PROJECT_BINARY_DIR}/src/DlgRef
   ${CMAKE_CURRENT_SOURCE_DIR}
   ${CMAKE_CURRENT_BINARY_DIR}
@@ -54,6 +58,7 @@ ADD_DEFINITIONS(
 # libraries to link to
 SET(_link_LIBRARIES
   GEOMBase
+  SalomeIDLAdvancedGEOM
   )
 
 # --- resources ---
@@ -64,10 +69,10 @@ SET(_uic_files
 
 # resource files / to be processed by lrelease
 SET(AdvancedGUI_RESOURCES
-  AdvancedGUI_images.ts
-  AdvancedGUI_msg_en.ts
-  AdvancedGUI_msg_fr.ts
-  AdvancedGUI_msg_ja.ts
+  AdvancedGEOM_images.ts
+  AdvancedGEOM_msg_en.ts
+  AdvancedGEOM_msg_fr.ts
+  AdvancedGEOM_msg_ja.ts
   )
 
 # --- headers ---
diff --git a/src/BREPExport/BREPExport.cxx b/src/BREPExport/BREPExport.cxx
deleted file mode 100644 (file)
index 2d46839..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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:        BREPExport.cxx
-// Created:     Wed May 19 13:10:05 2004
-// Author:      Pavel TELKOV
-//              <ptv@mutex.nnov.opencascade.com>
-//
-#include "utilities.h"
-
-#include <BRepTools.hxx>
-
-#include <TCollection_AsciiString.hxx>
-#include <TopoDS_Shape.hxx>
-
-#ifdef WIN32
-  #if defined BREPEXPORT_EXPORTS || defined BREPExport_EXPORTS
-    #define BREPEXPORT_EXPORT __declspec( dllexport )
-  #else
-    #define BREPEXPORT_EXPORT __declspec( dllimport )
-  #endif
-#else
-   #define BREPEXPORT_EXPORT
-#endif
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-extern "C"
-{
-  BREPEXPORT_EXPORT int Export (const TopoDS_Shape& theShape,
-                                const TCollection_AsciiString& theFileName,
-                                const TCollection_AsciiString& /*theFormatName*/)
-  {
-    MESSAGE("Export BREP into file " << theFileName.ToCString());
-
-    if ( !BRepTools::Write( theShape, theFileName.ToCString() ) )
-      return 0;
-
-    return 1;
-  }
-}
diff --git a/src/BREPExport/CMakeLists.txt b/src/BREPExport/CMakeLists.txt
deleted file mode 100755 (executable)
index 2dbaeda..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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, or (at your option) any 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
-#
-
-# --- options ---
-
-# additional include directories
-INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
-  ${PTHREAD_INCLUDE_DIR}
-  ${KERNEL_INCLUDE_DIRS}
-  )
-
-# additional preprocessor / compiler flags
-ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
-  )
-
-# libraries to link to
-SET(_link_LIBRARIES
-  ${CAS_TKBRep}
-  ${KERNEL_SALOMELocalTrace}
-  )
-
-# --- sources ---
-
-SET(BREPExport_SOURCES
-  BREPExport.cxx
-  )
-
-# --- rules ---
-
-ADD_LIBRARY(BREPExport ${BREPExport_SOURCES})
-TARGET_LINK_LIBRARIES(BREPExport ${_link_LIBRARIES})
-INSTALL(TARGETS BREPExport EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-
-
diff --git a/src/BREPImport/BREPImport.cxx b/src/BREPImport/BREPImport.cxx
deleted file mode 100644 (file)
index 4d25451..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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:        BREPImport.cxx
-// Created:     Wed May 19 14:29:52 2004
-// Author:      Pavel TELKOV
-//              <ptv@mutex.nnov.opencascade.com>
-//
-#include "utilities.h"
-
-#include <BRepTools.hxx>
-#include <BRep_Builder.hxx>
-
-#include <TCollection_AsciiString.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TDF_Label.hxx>
-
-#ifdef WIN32
-  #if defined BREPIMPORT_EXPORTS || defined BREPImport_EXPORTS
-    #define BREPIMPORT_EXPORT __declspec( dllexport )
-  #else
-    #define BREPIMPORT_EXPORT __declspec( dllimport )
-  #endif
-#else
-  #define BREPIMPORT_EXPORT
-#endif
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-extern "C"
-{
-BREPIMPORT_EXPORT
-  TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
-                       const TCollection_AsciiString& /*theFormatName*/,
-                       TCollection_AsciiString&       theError,
-                       const TDF_Label&)
-  {
-    MESSAGE("Import BREP from file " << theFileName);
-    TopoDS_Shape aShape;
-    BRep_Builder B;
-    BRepTools::Read(aShape, theFileName.ToCString(), B);
-    if (aShape.IsNull()) {
-      theError = "BREP Import failed";
-    }
-    return aShape;
-  }
-}
diff --git a/src/BREPImport/CMakeLists.txt b/src/BREPImport/CMakeLists.txt
deleted file mode 100755 (executable)
index 459deb5..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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, or (at your option) any 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
-#
-
-# --- options ---
-
-# additional include directories
-INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
-  ${PTHREAD_INCLUDE_DIR}
-  ${KERNEL_INCLUDE_DIRS}
-  )
-
-# additional preprocessor / compiler flags
-ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
-  )
-
-# libraries to link to
-SET(_link_LIBRARIES
-  ${CAS_TKBRep}
-  ${KERNEL_SALOMELocalTrace}
-  )
-
-# --- sources ---
-
-SET(BREPImport_SOURCES
-  BREPImport.cxx
-  )
-
-# --- rules ---
-
-ADD_LIBRARY(BREPImport ${BREPImport_SOURCES})
-TARGET_LINK_LIBRARIES(BREPImport ${_link_LIBRARIES})
-INSTALL(TARGETS BREPImport EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-
-
diff --git a/src/BREPPlugin/BREPPlugin_Engine.cxx b/src/BREPPlugin/BREPPlugin_Engine.cxx
new file mode 100644 (file)
index 0000000..03f57d6
--- /dev/null
@@ -0,0 +1,31 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "BREPPlugin_Engine.hxx"
+#include "BREPPlugin_OperationsCreator.hxx"
+
+extern "C"
+{
+  BREPPLUGINENGINE_EXPORT
+  GEOM_GenericOperationsCreator* GetOperationsCreator()
+  {
+    return new BREPPlugin_OperationsCreator();
+  }
+}
diff --git a/src/BREPPlugin/BREPPlugin_Engine.hxx b/src/BREPPlugin/BREPPlugin_Engine.hxx
new file mode 100755 (executable)
index 0000000..3dde5d5
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 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, or (at your option) any 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 _BREPPLUGIN_ENGINE_HXX_
+#define _BREPPLUGIN_ENGINE_HXX_
+
+#ifdef WIN32
+ #if defined BREPPluginEngine_EXPORTS
+   #define BREPPLUGINENGINE_EXPORT __declspec( dllexport )
+ #else
+   #define BREPPLUGINENGINE_EXPORT __declspec( dllimport )
+ #endif 
+#else
+   #define BREPPLUGINENGINE_EXPORT
+#endif
+
+#endif
diff --git a/src/BREPPlugin/BREPPlugin_ExportDriver.cxx b/src/BREPPlugin/BREPPlugin_ExportDriver.cxx
new file mode 100644 (file)
index 0000000..2af1fbb
--- /dev/null
@@ -0,0 +1,108 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "BREPPlugin_ExportDriver.hxx"
+#include "BREPPlugin_IExport.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+#include <Basics_Utils.hxx>
+
+// GEOM includes
+#include "GEOM_Function.hxx"
+
+// OOCT includes
+#include <BRepTools.hxx>
+#include <TopoDS_Shape.hxx>
+
+//=======================================================================
+//function : GetID
+//purpose  :
+//=======================================================================
+const Standard_GUID& BREPPlugin_ExportDriver::GetID()
+{
+  static Standard_GUID aGUID("4c1fd92e-bcf3-4695-89b7-a8353038174f");
+  return aGUID;
+}
+
+//=======================================================================
+//function : BREPPlugin_ExportDriver
+//purpose  :
+//=======================================================================
+BREPPlugin_ExportDriver::BREPPlugin_ExportDriver()
+{
+}
+
+//=======================================================================
+//function : Execute
+//purpose  :
+//=======================================================================
+Standard_Integer BREPPlugin_ExportDriver::Execute( TFunction_Logbook& log ) const
+{
+  if (Label().IsNull()) return 0;
+  Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
+
+  BREPPlugin_IExport aData (aFunction);
+
+  // retrieve the being exported shape
+  TopoDS_Shape aShape;
+  Handle(GEOM_Function) aRefFunction = aData.GetOriginal();
+  if( aRefFunction.IsNull() ) return 0;
+  aShape = aRefFunction->GetValue();
+  if( aShape.IsNull() ) return 0;
+  // set the result of function to be used by next operations
+  aFunction->SetValue( aShape );
+
+  TCollection_AsciiString aFileName = aData.GetFileName();
+
+  MESSAGE("Export BREP into file " << aFileName.ToCString());
+
+  // Set "C" numeric locale to save numbers correctly
+  Kernel_Utils::Localizer loc;
+
+  if ( !BRepTools::Write( aShape, aFileName.ToCString() ) )
+    return 0;
+
+  return 1;
+}
+
+//=======================================================================
+//function : MustExecute
+//purpose  :
+//=======================================================================
+Standard_Boolean BREPPlugin_ExportDriver::MustExecute( const TFunction_Logbook& ) const
+{
+  return Standard_True;
+}
+
+//================================================================================
+/*!
+ * \brief Returns a name of creation operation and names and values of creation parameters
+ */
+//================================================================================
+bool BREPPlugin_ExportDriver::
+GetCreationInformation( std::string&             theOperationName,
+                        std::vector<GEOM_Param>& theParams )
+{
+  return false;
+}
+
+IMPLEMENT_STANDARD_HANDLE( BREPPlugin_ExportDriver,GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ExportDriver,GEOM_BaseDriver );
diff --git a/src/BREPPlugin/BREPPlugin_ExportDriver.hxx b/src/BREPPlugin/BREPPlugin_ExportDriver.hxx
new file mode 100644 (file)
index 0000000..00c6dbd
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 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, or (at your option) any 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 _BREPPlugin_ExportDriver_HXX
+#define _BREPPlugin_ExportDriver_HXX
+
+// GEOM includes
+#include "GEOM_BaseDriver.hxx"
+
+// OCCT includes
+#include <TFunction_Logbook.hxx>
+
+DEFINE_STANDARD_HANDLE( BREPPlugin_ExportDriver, GEOM_BaseDriver );
+
+class BREPPlugin_ExportDriver : public GEOM_BaseDriver
+{
+public:
+  BREPPlugin_ExportDriver();
+  ~BREPPlugin_ExportDriver() {};
+
+  static const Standard_GUID& GetID();
+  virtual Standard_Integer    Execute( TFunction_Logbook& log ) const;
+  Standard_Boolean            MustExecute( const TFunction_Logbook& ) const;
+  virtual void                Validate( TFunction_Logbook& ) const {}
+
+  virtual bool                 GetCreationInformation( std::string& theOperationName,
+                                                      std::vector<GEOM_Param>& params );
+
+DEFINE_STANDARD_RTTI( BREPPlugin_ExportDriver )
+};
+
+#endif // _BREPPlugin_ExportDriver_HXX
diff --git a/src/BREPPlugin/BREPPlugin_GUI.cxx b/src/BREPPlugin/BREPPlugin_GUI.cxx
new file mode 100644 (file)
index 0000000..e643094
--- /dev/null
@@ -0,0 +1,266 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "BREPPlugin_GUI.h"
+
+// GUI includes
+#include <SUIT_Desktop.h>
+#include <SUIT_FileDlg.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_OverrideCursor.h>
+#include <SUIT_Tools.h>
+#include <LightApp_SelectionMgr.h>
+#include <SalomeApp_Application.h>
+#include <SalomeApp_Study.h>
+#include <SALOME_ListIteratorOfListIO.hxx>
+
+// GEOM includes
+#include "GeometryGUI.h"
+#include "GEOM_Operation.h"
+#include "GEOMBase.h"
+#include "GEOM_Displayer.h"
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(BREPPlugin)
+
+//=======================================================================
+// function : BREPPlugin_GUI()
+// purpose  : Constructor
+//=======================================================================
+BREPPlugin_GUI::BREPPlugin_GUI( GeometryGUI* parent ) : GEOMPluginGUI( parent )
+{
+}
+
+//=======================================================================
+// function : ~BREPPlugin_GUI
+// purpose  : Destructor
+//=======================================================================
+BREPPlugin_GUI::~BREPPlugin_GUI()
+{
+}
+
+//=======================================================================
+// function : OnGUIEvent()
+// purpose  : 
+//=======================================================================
+bool BREPPlugin_GUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
+{
+  QString cmd;
+  switch ( theCommandID ) {
+  case 1:
+    cmd = "Export_BREP"; break;
+  case 2:
+    cmd = "Import_BREP"; break;
+  default:
+    break;
+  }
+  return OnGUIEvent( cmd, parent );
+}
+
+//=======================================================================
+// function : OnGUIEvent()
+// purpose  :
+//=======================================================================
+bool BREPPlugin_GUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* parent )
+{
+  bool result = false;
+  
+  if ( theCommandID == "Export_BREP" )
+  {
+    result = exportBREP( parent );
+  }
+  else if ( theCommandID == "Import_BREP" )
+  {
+    result = importBREP( parent );
+  }
+  else
+  {
+    getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
+  }
+
+  return result;
+}
+
+//=======================================================================
+// function : importBREP
+// purpose  :
+//=======================================================================
+bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
+{
+  SalomeApp_Application* app = getGeometryGUI()->getApp();
+  if ( !app ) return false;
+  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
+  if ( !study ) return false;
+
+  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
+  GEOM::IBREPOperations_var brepOp = GEOM::IBREPOperations::_narrow( op );
+  if ( CORBA::is_nil( brepOp ) ) return false;
+  
+  QStringList fileNames = app->getOpenFileNames( SUIT_FileDlg::getLastVisitedPath().isEmpty() ? QDir::currentPath() : QString(""),
+                                                tr( "BREP_FILES" ),
+                                                tr( "IMPORT_TITLE" ),
+                                                parent );
+  if ( fileNames.count() > 0 )
+  {
+    QStringList entryList;
+    QStringList errors;
+    
+    foreach( QString fileName, fileNames )
+    {
+      SUIT_OverrideCursor wc;
+      GEOM_Operation transaction( app, brepOp.in() );
+      
+      try
+      {
+       app->putInfo( tr( "GEOM_PRP_LOADING" ).arg( fileName ) );
+       transaction.start();
+       GEOM::ListOfGO_var result = brepOp->ImportBREP( fileName.toUtf8().constData() );
+       if ( result->length() > 0 && brepOp->IsDone() )
+       {
+         GEOM::GEOM_Object_var main = result[0];
+         QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
+         SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( dsStudy,
+                                                                               SALOMEDS::SObject::_nil(),
+                                                                               main.in(),
+                                                                               publishName.toUtf8().constData() );
+         
+         entryList.append( so->GetID() );
+         transaction.commit();
+         GEOM_Displayer( study ).Display( main.in() );
+       }
+       else
+       {
+         transaction.abort();
+         errors.append( QString( "%1 : %2" ).arg( fileName ).arg( brepOp->GetErrorCode() ) );
+       }
+      }
+      catch( const SALOME::SALOME_Exception& e )
+      {
+       transaction.abort();
+      }
+    }
+    getGeometryGUI()->updateObjBrowser( true );
+    app->browseObjects( entryList );
+    
+    if ( errors.count() > 0 )
+    {
+      SUIT_MessageBox::critical( parent,
+                                tr( "GEOM_ERROR" ),
+                                tr( "GEOM_IMPORT_ERRORS" ) + "\n" + errors.join( "\n" ) );
+    }
+  }
+  return fileNames.count() > 0;
+}
+
+//=======================================================================
+// function : exportBREP
+// purpose  :
+//=======================================================================
+bool BREPPlugin_GUI::exportBREP( SUIT_Desktop* parent )
+{
+  SalomeApp_Application* app = getGeometryGUI()->getApp();
+  if ( !app ) return false;
+  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
+  if ( !study ) return false;
+
+  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "BREPPluginEngine" );
+  GEOM::IBREPOperations_var brepOp = GEOM::IBREPOperations::_narrow( op );
+  if ( CORBA::is_nil( brepOp ) ) return false;
+
+  LightApp_SelectionMgr* sm = app->selectionMgr();
+  if ( !sm ) return false;
+  
+  SALOME_ListIO selectedObjects;
+  sm->selectedObjects( selectedObjects );
+  bool ok = false;
+  
+  SALOME_ListIteratorOfListIO it( selectedObjects );
+  for ( ; it.More(); it.Next() )
+  {
+    Handle(SALOME_InteractiveObject) io = it.Value();
+    GEOM::GEOM_Object_var obj = GEOMBase::ConvertIOinGEOMObject( io );
+    
+    if ( CORBA::is_nil( obj ) ) continue;
+    
+    QString fileName = app->getFileName( false,
+                                        QString( io->getName() ),
+                                        tr( "BREP_FILES" ),
+                                        tr( "EXPORT_TITLE" ),
+                                        parent );
+    
+    if ( fileName.isEmpty() )
+      return false;
+    
+    SUIT_OverrideCursor wc;
+    
+    GEOM_Operation transaction( app, brepOp.in() );
+    
+    try
+    {
+      app->putInfo( tr( "GEOM_PRP_EXPORT" ).arg( fileName ) );
+      transaction.start();
+      
+      brepOp->ExportBREP( obj, fileName.toUtf8().constData() );
+      
+      if ( brepOp->IsDone() )
+      {
+       transaction.commit();
+      }
+      else
+      {
+       transaction.abort();
+       SUIT_MessageBox::critical( parent,
+                                  tr( "GEOM_ERROR" ),
+                                  tr( "GEOM_PRP_ABORT" ) + "\n" + tr( brepOp->GetErrorCode() ) );
+       return false;
+      }
+    }
+    catch ( const SALOME::SALOME_Exception& e )
+    {
+      transaction.abort();
+      return false;
+    }
+    ok = true;
+  }
+  
+  if ( !ok )
+  {
+    SUIT_MessageBox::warning( parent,
+                             tr( "WRN_WARNING" ),
+                             tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) );
+  }
+  return ok;
+}
+
+//=====================================================================================
+// EXPORTED METHODS
+//=====================================================================================
+extern "C"
+{
+#ifdef WIN32
+  __declspec( dllexport )
+#endif
+  GEOMGUI* GetLibGUI( GeometryGUI* parent )
+  {
+    return new BREPPlugin_GUI( parent );
+  }
+}
diff --git a/src/BREPPlugin/BREPPlugin_GUI.h b/src/BREPPlugin/BREPPlugin_GUI.h
new file mode 100644 (file)
index 0000000..89ec7eb
--- /dev/null
@@ -0,0 +1,40 @@
+// Copyright (C) 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, or (at your option) any 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 BREPPlugin_GUI_H
+#define BREPPlugin_GUI_H
+
+#include "GEOMPluginGUI.h"
+
+class BREPPlugin_GUI: public GEOMPluginGUI
+{
+  Q_OBJECT
+public:
+  BREPPlugin_GUI( GeometryGUI* parent );
+  ~BREPPlugin_GUI();
+
+  bool OnGUIEvent( int commandId, SUIT_Desktop* );
+  bool OnGUIEvent( const QString&, SUIT_Desktop* );
+
+private:
+  bool importBREP( SUIT_Desktop* );
+  bool exportBREP( SUIT_Desktop* );
+};
+
+#endif // BREPPlugin_GUI_H
diff --git a/src/BREPPlugin/BREPPlugin_IECallBack.cxx b/src/BREPPlugin/BREPPlugin_IECallBack.cxx
new file mode 100755 (executable)
index 0000000..83e1cbb
--- /dev/null
@@ -0,0 +1,72 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "BREPPlugin_IECallBack.hxx"
+#include "BREPPlugin_IOperations.hxx"
+#include "BREPPlugin_OperationsCreator.hxx"
+
+//=============================================================================
+/*!
+ *  constructor
+ */
+//=============================================================================
+BREPPlugin_IECallBack::BREPPlugin_IECallBack()
+{
+}
+
+//=============================================================================
+/*!
+ *  destructor
+ */
+//=============================================================================
+BREPPlugin_IECallBack::~BREPPlugin_IECallBack()
+{
+}
+
+//=============================================================================
+/*!
+ *  Export
+ */
+//=============================================================================
+bool 
+BREPPlugin_IECallBack::Export( int                            theDocId,
+                              const Handle(GEOM_Object)      theOriginal,
+                              const TCollection_AsciiString& theFileName,
+                              const TCollection_AsciiString& theFormatName )
+{
+  BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  aPluginOperations->ExportBREP( theOriginal, theFileName );
+  return true;
+}
+
+//=============================================================================
+/*!
+ *  Import
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+BREPPlugin_IECallBack::Import( int                            theDocId,
+                              const TCollection_AsciiString& theFormatName,
+                              const TCollection_AsciiString& theFileName )
+{
+  BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  return aPluginOperations->ImportBREP( theFileName );
+}
+
diff --git a/src/BREPPlugin/BREPPlugin_IECallBack.hxx b/src/BREPPlugin/BREPPlugin_IECallBack.hxx
new file mode 100644 (file)
index 0000000..dfa66b0
--- /dev/null
@@ -0,0 +1,49 @@
+// Copyright (C) 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, or (at your option) any 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 _BREPPlugin_IECallBack_HXX_
+#define _BREPPlugin_IECallBack_HXX_
+
+// internal includes
+#include "BREPPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_Object.hxx"
+#include "GEOMImpl_IECallBack.hxx"
+
+// OCC includes
+#include <TCollection_AsciiString.hxx>
+
+class BREPPLUGINENGINE_EXPORT BREPPlugin_IECallBack : public GEOMImpl_IECallBack
+{
+public:
+  BREPPlugin_IECallBack();
+  ~BREPPlugin_IECallBack();
+  
+  bool Export( int                            theDocId,
+              const Handle(GEOM_Object)      theOriginal,
+              const TCollection_AsciiString& theFileName,
+              const TCollection_AsciiString& theFormatName );
+
+  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
+                                              const TCollection_AsciiString& theFormatName,
+                                              const TCollection_AsciiString& theFileName );
+};
+
+#endif
diff --git a/src/BREPPlugin/BREPPlugin_IExport.hxx b/src/BREPPlugin/BREPPlugin_IExport.hxx
new file mode 100644 (file)
index 0000000..28b00e7
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 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, or (at your option) any 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 _BREPPlugin_IExport_HXX_
+#define _BREPPlugin_IExport_HXX_
+
+#include "GEOM_Function.hxx"
+
+#define EXPORTBREP_ARG_ORIGINAL   1
+#define EXPORTBREP_ARG_FILENAME   2
+
+class BREPPlugin_IExport
+{
+public:
+  BREPPlugin_IExport( Handle(GEOM_Function) theFunction )
+    : _func(theFunction) {}
+
+  void SetOriginal( Handle( GEOM_Function ) theOriginal)
+    { _func->SetReference( EXPORTBREP_ARG_ORIGINAL, theOriginal ); }
+  Handle( GEOM_Function ) GetOriginal()
+    { return _func->GetReference( EXPORTBREP_ARG_ORIGINAL ); }
+
+  void SetFileName( const TCollection_AsciiString& theFileName )
+    { _func->SetString( EXPORTBREP_ARG_FILENAME, theFileName ); }
+  TCollection_AsciiString GetFileName()
+    { return _func->GetString( EXPORTBREP_ARG_FILENAME ); }
+  
+private:
+  Handle(GEOM_Function) _func;
+};
+
+#endif // _BREPPlugin_IExport_HXX_
diff --git a/src/BREPPlugin/BREPPlugin_IImport.hxx b/src/BREPPlugin/BREPPlugin_IImport.hxx
new file mode 100644 (file)
index 0000000..1eac3d4
--- /dev/null
@@ -0,0 +1,42 @@
+// Copyright (C) 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, or (at your option) any 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 _BREPPlugin_IImport_HXX_
+#define _BREPPlugin_IImport_HXX_
+
+#include "GEOM_Function.hxx"
+
+#define IMPORTBREP_ARG_FILENAME 1
+
+class BREPPlugin_IImport
+{
+public:
+  BREPPlugin_IImport( Handle(GEOM_Function) theFunction)
+    : _func(theFunction) {}
+
+  void SetFileName( const TCollection_AsciiString& theFileName )
+    { _func->SetString( IMPORTBREP_ARG_FILENAME, theFileName ); }
+  TCollection_AsciiString GetFileName()
+    { return _func->GetString( IMPORTBREP_ARG_FILENAME ); }
+  
+private:
+  Handle(GEOM_Function) _func;
+};
+
+#endif // _BREPPlugin_IImport_HXX_
diff --git a/src/BREPPlugin/BREPPlugin_IOperations.cxx b/src/BREPPlugin/BREPPlugin_IOperations.cxx
new file mode 100644 (file)
index 0000000..d929407
--- /dev/null
@@ -0,0 +1,167 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "BREPPlugin_IOperations.hxx"
+#include "BREPPlugin_ExportDriver.hxx"
+#include "BREPPlugin_ImportDriver.hxx"
+#include "BREPPlugin_IExport.hxx"
+#include "BREPPlugin_IImport.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+
+// GEOM includes
+#include "GEOM_PythonDump.hxx"
+#include "GEOMImpl_Types.hxx"
+
+#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
+
+//=============================================================================
+/*!
+ *  Constructor
+ */
+//=============================================================================
+BREPPlugin_IOperations::BREPPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
+: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+{
+  MESSAGE( "BREPPlugin_IOperations::BREPPlugin_IOperations" );
+}
+
+//=============================================================================
+/*!
+ *  Destructor
+ */
+//=============================================================================
+BREPPlugin_IOperations::~BREPPlugin_IOperations()
+{
+  MESSAGE( "BREPPlugin_IOperations::~BREPPlugin_IOperations" );
+}
+
+//=============================================================================
+/*!
+ *  ExportBREP
+ *  Export a shape to BREP format
+ *  \param theOriginal The shape to export
+ *  \param theFileName The name of the file to exported
+ *  \param theIsASCII The format of the exported file (ASCII or Binary)
+ *  \param theDeflection The deflection of the shape to exported
+ */
+//=============================================================================
+void BREPPlugin_IOperations::ExportBREP( const Handle(GEOM_Object)      theOriginal,
+                                        const TCollection_AsciiString& theFileName )
+{
+  SetErrorCode(KO);
+  if( theOriginal.IsNull() ) return;
+
+  Handle(GEOM_Function) aRefFunction = theOriginal->GetLastFunction();
+  if( aRefFunction.IsNull() ) return;  //There is no function which creates an object to be exported
+
+  //Add a new result object
+  Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
+
+  //Add an Export function
+  Handle(GEOM_Function) aFunction = result->AddFunction( BREPPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
+  if( aFunction.IsNull() ) return;
+
+  //Check if the function is set correctly
+  if( aFunction->GetDriverGUID() != BREPPlugin_ExportDriver::GetID() ) return;
+
+  //Set parameters
+  BREPPlugin_IExport aCI( aFunction );
+  aCI.SetOriginal( aRefFunction );
+  aCI.SetFileName( theFileName );
+
+  //Perform the Export
+  try {
+    OCC_CATCH_SIGNALS;
+    if( !GetSolver()->ComputeFunction( aFunction ) ) {
+      SetErrorCode( "Not enough space on disk, or you haven't permissions to write this directory" );
+      return;
+    }
+  }
+  catch( Standard_Failure ) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode( aFail->GetMessageString() );
+    return;
+  }
+
+  //Make a Python command
+  GEOM::TPythonDump(aFunction) << "geompy.ExportBREP(" << theOriginal << ", \""
+    << theFileName.ToCString() << "\" )";
+
+  SetErrorCode(OK);
+}
+
+//=============================================================================
+/*!
+ *  ImportBREP
+ *  Import a shape from BREP format
+ *  \param theFileName The name of the file to import
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+BREPPlugin_IOperations::ImportBREP( const TCollection_AsciiString& theFileName )
+{
+  SetErrorCode(KO);
+  if( theFileName.IsEmpty() ) return NULL;
+
+  //Add a new result object
+  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
+
+  //Add an Import function
+  Handle(GEOM_Function) aFunction =
+    anImported->AddFunction( BREPPlugin_ImportDriver::GetID(), IMPORT_SHAPE);
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != BREPPlugin_ImportDriver::GetID()) return NULL;
+
+  //Set parameters
+  BREPPlugin_IImport aCI( aFunction );
+  aCI.SetFileName( theFileName );
+
+  //Perform the Import
+  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
+
+  try {
+    OCC_CATCH_SIGNALS;
+    if( !GetSolver()->ComputeFunction( aFunction ) ) {
+      SetErrorCode( "Import driver failed" );
+      return NULL;
+    }
+    aSeq->Append(anImported);
+
+    // Greate material groups.
+    // MakeMaterialGroups( anImported, aSeq );
+  }
+  catch( Standard_Failure ) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode( aFail->GetMessageString() );
+    return NULL;
+  }
+
+  //Make a Python command
+  GEOM::TPythonDump pd (aFunction);
+  pd << aSeq << " = geompy.ImportBREP(\"" << theFileName.ToCString() << "\" )";
+  SetErrorCode(OK);
+
+  return aSeq;
+}
diff --git a/src/BREPPlugin/BREPPlugin_IOperations.hxx b/src/BREPPlugin/BREPPlugin_IOperations.hxx
new file mode 100644 (file)
index 0000000..b5950e7
--- /dev/null
@@ -0,0 +1,42 @@
+// Copyright (C) 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, or (at your option) any 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 : BREPPlugin_IOperations.hxx
+
+#ifndef _BREPPlugin_IOperations_HXX_
+#define _BREPPlugin_IOperations_HXX_
+
+// internal includes
+#include "BREPPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOMImpl_IBaseIEOperations.hxx"
+
+class BREPPLUGINENGINE_EXPORT BREPPlugin_IOperations: public GEOMImpl_IBaseIEOperations
+{
+public:
+  BREPPlugin_IOperations( GEOM_Engine*, int );
+  ~BREPPlugin_IOperations();
+
+  void ExportBREP( const Handle(GEOM_Object),
+                  const TCollection_AsciiString& );
+  
+  Handle(TColStd_HSequenceOfTransient) ImportBREP( const TCollection_AsciiString& );
+};
+
+#endif
diff --git a/src/BREPPlugin/BREPPlugin_IOperations_i.cc b/src/BREPPlugin/BREPPlugin_IOperations_i.cc
new file mode 100644 (file)
index 0000000..aee5e9e
--- /dev/null
@@ -0,0 +1,108 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "BREPPlugin_IOperations_i.hh"
+#include "BREPPlugin_IOperations.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+
+//=============================================================================
+/*!
+ *   constructor:
+ */
+//=============================================================================
+BREPPlugin_IOperations_i::BREPPlugin_IOperations_i( PortableServer::POA_ptr thePOA,
+                                                   GEOM::GEOM_Gen_ptr theEngine,
+                                                   BREPPlugin_IOperations* theImpl )
+:GEOM_IOperations_i( thePOA, theEngine, theImpl )
+{
+  MESSAGE( "BREPPlugin_IOperations_i::BREPPlugin_IOperations_i" );
+}
+
+//=============================================================================
+/*!
+ *  destructor
+ */
+//=============================================================================
+BREPPlugin_IOperations_i::~BREPPlugin_IOperations_i()
+{
+  MESSAGE( "BREPPlugin_IOperations_i::~BREPPlugin_IOperations_i" );
+}
+
+//=============================================================================
+/*!
+ *  ExportBREP
+ *  Export a shape to BREP format
+ *  \param theOriginal The shape to export
+ *  \param theFileName The name of the exported file
+ */
+//=============================================================================
+void BREPPlugin_IOperations_i::ExportBREP( GEOM::GEOM_Object_ptr theOriginal,
+                                          const char*           theFileName )
+{
+  // duplicate the original shape
+  GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate( theOriginal );
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference shape
+  Handle(GEOM_Object) anOriginal = GetObjectImpl( theOriginal );
+  if (anOriginal.IsNull()) return;
+
+  //Export the shape to the file
+  GetOperations()->ExportBREP( anOriginal, theFileName );
+}
+
+//=============================================================================
+/*!
+ *  ImportBREP
+ *  Import a shape from BREP format
+ *  \param theFileName The name of the file to import
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* BREPPlugin_IOperations_i::ImportBREP( const char* theFileName )
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Import the shape from the file
+  Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->ImportBREP( theFileName );
+
+  if( !GetOperations()->IsDone() || aHSeq.IsNull() )
+    return aSeq._retn();
+
+  // Copy created objects.
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length( aLength );
+  for( Standard_Integer i = 1; i <= aLength; i++ )
+    aSeq[i-1] = GetObject( Handle(GEOM_Object)::DownCast( aHSeq->Value(i) ) );
+
+  return aSeq._retn();
+}
+
+BREPPlugin_IOperations* BREPPlugin_IOperations_i::GetOperations()
+{
+  return (BREPPlugin_IOperations*)GetImpl();
+}
diff --git a/src/BREPPlugin/BREPPlugin_IOperations_i.hh b/src/BREPPlugin/BREPPlugin_IOperations_i.hh
new file mode 100644 (file)
index 0000000..02f9d81
--- /dev/null
@@ -0,0 +1,52 @@
+// Copyright (C) 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, or (at your option) any 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 _BREPPlugin_IOperations_i_HeaderFile
+#define _BREPPlugin_IOperations_i_HeaderFile
+
+// idl includes
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER( GEOM_Gen )
+#include CORBA_SERVER_HEADER( BREPPlugin )
+
+// internal includes
+#include "BREPPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_IOperations_i.hh"
+
+class BREPPlugin_IOperations;
+
+class BREPPLUGINENGINE_EXPORT BREPPlugin_IOperations_i :
+      public virtual POA_GEOM::IBREPOperations,
+      public virtual GEOM_IOperations_i
+{
+public:
+  BREPPlugin_IOperations_i( PortableServer::POA_ptr thePOA,
+                           GEOM::GEOM_Gen_ptr theEngine,
+                           BREPPlugin_IOperations* theImpl );
+  ~BREPPlugin_IOperations_i();
+
+  void            ExportBREP( GEOM::GEOM_Object_ptr, const char* );
+  GEOM::ListOfGO* ImportBREP( const char* );
+
+  BREPPlugin_IOperations* GetOperations();
+};
+
+#endif // _BREPPlugin_IOperations_i_HeaderFile
diff --git a/src/BREPPlugin/BREPPlugin_ImportDriver.cxx b/src/BREPPlugin/BREPPlugin_ImportDriver.cxx
new file mode 100644 (file)
index 0000000..3f24fea
--- /dev/null
@@ -0,0 +1,122 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "BREPPlugin_ImportDriver.hxx"
+#include "BREPPlugin_IImport.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+#include <Basics_Utils.hxx>
+
+// GEOM includes
+#include "GEOM_Function.hxx"
+#include "GEOMImpl_Types.hxx"
+
+// OOCT includes
+#include <BRepTools.hxx>
+#include <BRep_Builder.hxx>
+
+//=======================================================================
+//function : GetID
+//purpose  :
+//=======================================================================
+const Standard_GUID& BREPPlugin_ImportDriver::GetID()
+{
+  static Standard_GUID aGUID("7e1b28ec-8513-4217-b09c-7652fbe8149e");
+  return aGUID;
+}
+
+//=======================================================================
+//function : BREPPlugin_ImportDriver
+//purpose  :
+//=======================================================================
+BREPPlugin_ImportDriver::BREPPlugin_ImportDriver()
+{
+}
+
+//=======================================================================
+//function : Execute
+//purpose  :
+//=======================================================================
+Standard_Integer BREPPlugin_ImportDriver::Execute( TFunction_Logbook& log ) const
+{
+  if( Label().IsNull() ) return 0;
+  Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
+
+  BREPPlugin_IImport aData( aFunction );
+
+  TCollection_AsciiString aFileName = aData.GetFileName().ToCString();
+
+  MESSAGE("Import BREP from file " << aFileName);
+
+  // Set "C" numeric locale to save numbers correctly
+  Kernel_Utils::Localizer loc;
+
+  TopoDS_Shape aShape;
+  BRep_Builder B;
+  BRepTools::Read(aShape, aFileName.ToCString(), B);
+  if( aShape.IsNull() ) return 0;
+
+  aFunction->SetValue( aShape );
+
+  log.SetTouched( Label() );
+
+  return 1;
+}
+
+//=======================================================================
+//function : MustExecute
+//purpose  :
+//=======================================================================
+Standard_Boolean BREPPlugin_ImportDriver::MustExecute( const TFunction_Logbook& ) const
+{
+  return Standard_True;
+}
+
+//================================================================================
+/*!
+ * \brief Returns a name of creation operation and names and values of creation parameters
+ */
+//================================================================================
+
+bool BREPPlugin_ImportDriver::
+GetCreationInformation( std::string&             theOperationName,
+                        std::vector<GEOM_Param>& theParams )
+{
+  if( Label().IsNull() ) return 0;
+  Handle(GEOM_Function) function = GEOM_Function::GetFunction( Label() );
+
+  BREPPlugin_IImport aCI( function );
+  Standard_Integer aType = function->GetType();
+
+  theOperationName = "ImportBREP";
+
+  switch ( aType ) {
+  case IMPORT_SHAPE:
+    AddParam( theParams, "File name", aCI.GetFileName() );
+    break;
+  default:
+    return false;
+  }
+  return true;
+}
+
+IMPLEMENT_STANDARD_HANDLE( BREPPlugin_ImportDriver, GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ImportDriver, GEOM_BaseDriver );
diff --git a/src/BREPPlugin/BREPPlugin_ImportDriver.hxx b/src/BREPPlugin/BREPPlugin_ImportDriver.hxx
new file mode 100644 (file)
index 0000000..e6a2940
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 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, or (at your option) any 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 _BREPPlugin_ImportDriver_HXX
+#define _BREPPlugin_ImportDriver_HXX
+
+// GEOM includes
+#include "GEOM_BaseDriver.hxx"
+
+// OCCT includes
+#include <TFunction_Logbook.hxx>
+
+DEFINE_STANDARD_HANDLE( BREPPlugin_ImportDriver, GEOM_BaseDriver );
+
+class BREPPlugin_ImportDriver : public GEOM_BaseDriver
+{
+public:
+  BREPPlugin_ImportDriver();
+  ~BREPPlugin_ImportDriver() {};
+
+  static const Standard_GUID& GetID();
+  virtual Standard_Integer    Execute( TFunction_Logbook& log ) const;
+  Standard_Boolean            MustExecute( const TFunction_Logbook& ) const;
+  virtual void                Validate( TFunction_Logbook& ) const {}
+  virtual bool                GetCreationInformation( std::string&             theOperationName,
+                                                     std::vector<GEOM_Param>& params );
+
+DEFINE_STANDARD_RTTI( BREPPlugin_ImportDriver )
+};
+
+#endif // _BREPPlugin_ImportDriver_HXX
diff --git a/src/BREPPlugin/BREPPlugin_OperationsCreator.cxx b/src/BREPPlugin/BREPPlugin_OperationsCreator.cxx
new file mode 100644 (file)
index 0000000..27808c7
--- /dev/null
@@ -0,0 +1,69 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "BREPPlugin_OperationsCreator.hxx"
+#include "BREPPlugin_IOperations_i.hh"
+#include "BREPPlugin_IOperations.hxx"
+#include "BREPPlugin_ExportDriver.hxx"
+#include "BREPPlugin_ImportDriver.hxx"
+#include "BREPPlugin_IECallBack.hxx"
+
+// KERNEL includes
+#include <Utils_ExceptHandlers.hxx>
+#include <utilities.h>
+
+// OCCT includes
+#include <TFunction_DriverTable.hxx>
+
+std::map <int, BREPPlugin_IOperations*> BREPPlugin_OperationsCreator::_mapOfOperations;
+
+BREPPlugin_OperationsCreator::BREPPlugin_OperationsCreator()
+{
+  // Register drivers
+  TFunction_DriverTable::Get()->AddDriver( BREPPlugin_ExportDriver::GetID(),
+                                          new BREPPlugin_ExportDriver() );
+  TFunction_DriverTable::Get()->AddDriver( BREPPlugin_ImportDriver::GetID(),
+                                          new BREPPlugin_ImportDriver() );
+  // Register callback
+  BREPPlugin_IECallBack* callback = new BREPPlugin_IECallBack();
+  GEOMImpl_IECallBack::Register( "BREP", callback );
+}
+
+BREPPlugin_OperationsCreator::~BREPPlugin_OperationsCreator()
+{
+}
+
+GEOM_IOperations_i* BREPPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
+                                                          int                     theStudyId,
+                                                          GEOM::GEOM_Gen_ptr      theEngine,
+                                                          ::GEOMImpl_Gen*         theGenImpl )
+{
+  Unexpect aCatch( SALOME_SalomeException );
+  MESSAGE( "BREPPlugin_OperationsCreator::Create" );
+  return new BREPPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+}
+
+BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
+                                                          int             theStudyId )
+{
+  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
+    _mapOfOperations[theStudyId] = new BREPPlugin_IOperations( theGenImpl, theStudyId );
+  return _mapOfOperations[theStudyId];
+}
diff --git a/src/BREPPlugin/BREPPlugin_OperationsCreator.hxx b/src/BREPPlugin/BREPPlugin_OperationsCreator.hxx
new file mode 100755 (executable)
index 0000000..6870144
--- /dev/null
@@ -0,0 +1,57 @@
+// Copyright (C) 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, or (at your option) any 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 _GEOM_BREPPlugin_OperationsCreator_HXX_
+#define _GEOM_BREPPlugin_OperationsCreator_HXX_
+
+// internal includes
+#include "BREPPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_Gen_i.hh"
+
+// C++ includes
+#include <map>
+
+class BREPPlugin_IOperations;
+
+//=====================================================================
+// Operations creator
+//=====================================================================
+class BREPPLUGINENGINE_EXPORT BREPPlugin_OperationsCreator : public GEOM_GenericOperationsCreator
+{
+public:
+  BREPPlugin_OperationsCreator();
+  ~BREPPlugin_OperationsCreator();
+
+  GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
+                             int                     theStudyId,
+                             GEOM::GEOM_Gen_ptr      theEngine,
+                             ::GEOMImpl_Gen*         theGenImpl );
+private:
+  static BREPPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
+                                     int                     theStudyId );
+
+private:
+  static std::map <int, BREPPlugin_IOperations*>  _mapOfOperations;
+
+  friend class BREPPlugin_IECallBack;
+};
+
+#endif
diff --git a/src/BREPPlugin/BREPPlugin_msg_en.ts b/src/BREPPlugin/BREPPlugin_msg_en.ts
new file mode 100644 (file)
index 0000000..6ca54d1
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTBREP</source>
+        <translation>BREP</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTBREP</source>
+        <translation>Export BREP</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTBREP</source>
+        <translation>Export BREP</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTBREP</source>
+        <translation>BREP</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTBREP</source>
+        <translation>Import BREP</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTBREP</source>
+        <translation>Import BREP</translation>
+    </message>
+</context>
+<context>
+    <name>BREPPlugin_GUI</name>
+    <message>
+        <source>BREP_FILES</source>
+        <translation>BREP files( *.brep )</translation>
+    </message>
+    <message>
+        <source>EXPORT_TITLE</source>
+        <translation>Export BREP</translation>
+    </message>
+    <message>
+        <source>IMPORT_TITLE</source>
+        <translation>Import BREP</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/BREPPlugin/BREPPlugin_msg_fr.ts b/src/BREPPlugin/BREPPlugin_msg_fr.ts
new file mode 100644 (file)
index 0000000..ff0cd50
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTBREP</source>
+        <translation>BREP</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTBREP</source>
+        <translation>Exporter BREP</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTBREP</source>
+        <translation>Exporter BREP</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTBREP</source>
+        <translation>BREP</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTBREP</source>
+        <translation>Importer BREP</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTBREP</source>
+        <translation>Importer BREP</translation>
+    </message>
+</context>
+<context>
+    <name>BREPPlugin_GUI</name>
+    <message>
+        <source>BREP_FILES</source>
+        <translation>BREP Fichiers( *.brep )</translation>
+    </message>
+    <message>
+        <source>EXPORT_TITLE</source>
+        <translation>Exporter BREP</translation>
+    </message>
+    <message>
+        <source>IMPORT_TITLE</source>
+        <translation>Importer BREP</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/BREPPlugin/BREPPlugin_msg_ja.ts b/src/BREPPlugin/BREPPlugin_msg_ja.ts
new file mode 100644 (file)
index 0000000..4a23773
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ja" sourcelanguage="en">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTBREP</source>
+        <translation type="unfinished">BREP</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTBREP</source>
+        <translation type="unfinished">Export BREP</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTBREP</source>
+        <translation type="unfinished">Export BREP</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTBREP</source>
+        <translation type="unfinished">BREP</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTBREP</source>
+        <translation type="unfinished">Import BREP</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTBREP</source>
+        <translation type="unfinished">Import BREP</translation>
+    </message>
+</context>
+<context>
+    <name>BREPPlugin_GUI</name>
+    <message>
+        <source>BREP_FILES</source>
+        <translation type="unfinished">BREP files( *.brep )</translation>
+    </message>
+    <message>
+        <source>EXPORT_TITLE</source>
+        <translation type="unfinished">Export BREP</translation>
+    </message>
+    <message>
+        <source>IMPORT_TITLE</source>
+        <translation type="unfinished">Import BREP</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/BREPPlugin/CMakeLists.txt b/src/BREPPlugin/CMakeLists.txt
new file mode 100644 (file)
index 0000000..34a8804
--- /dev/null
@@ -0,0 +1,152 @@
+# Copyright (C) 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, or (at your option) any 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(SALOME_BUILD_GUI)
+  INCLUDE(UseQt4Ext)
+  INCLUDE(${QT_USE_FILE})
+ENDIF()
+
+# --- options ---
+
+# additional include directories
+INCLUDE_DIRECTORIES(
+  ${CAS_INCLUDE_DIRS}
+  ${KERNEL_INCLUDE_DIRS}
+  ${PROJECT_BINARY_DIR}/idl
+  ${PROJECT_SOURCE_DIR}/src/GEOMAlgo
+  ${PROJECT_SOURCE_DIR}/src/GEOM
+  ${PROJECT_SOURCE_DIR}/src/GEOMImpl
+  ${PROJECT_SOURCE_DIR}/src/GEOM_I
+  ${PROJECT_SOURCE_DIR}/src/GEOMClient
+  ${PROJECT_SOURCE_DIR}/src/GEOMUtils
+  )
+  
+IF(SALOME_BUILD_GUI)
+  INCLUDE_DIRECTORIES(
+    ${QT_INCLUDE_DIRS}
+    ${GUI_INCLUDE_DIRS}
+    ${PROJECT_SOURCE_DIR}/src/OBJECT
+    ${PROJECT_SOURCE_DIR}/src/GEOMGUI
+    ${PROJECT_SOURCE_DIR}/src/GEOMBase
+    )
+ENDIF()
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(
+  ${CAS_DEFINITIONS}
+  ${OMNIORB_DEFINITIONS}
+  )
+  
+IF(WIN32)
+  ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
+  
+IF(SALOME_BUILD_GUI)
+ADD_DEFINITIONS(
+  ${QT_DEFINITIONS}
+  )
+ENDIF()
+
+# libraries to link to
+SET(_link_engine_LIBRARIES
+  ${CAS_TKBREP}
+  ${KERNEL_SALOMELocalTrace}
+  ${KERNEL_OpUtil}
+  SalomeIDLGEOM
+  SalomeIDLBREPPlugin
+  GEOMEngine
+  GEOMClient
+  )
+  
+IF(SALOME_BUILD_GUI)
+  SET(_link_gui_LIBRARIES
+    SalomeIDLBREPPlugin
+    GEOMObject
+    GEOM
+    GEOMBase
+    )
+ENDIF()
+
+
+# --- headers ---
+
+SET(BREPPluginEngine_HEADERS
+  BREPPlugin_IOperations_i.hh
+  BREPPlugin_Engine.hxx
+  BREPPlugin_OperationsCreator.hxx
+  BREPPlugin_IOperations.hxx
+  BREPPlugin_IExport.hxx 
+  BREPPlugin_IImport.hxx
+  BREPPlugin_ImportDriver.hxx 
+  BREPPlugin_ExportDriver.hxx
+  BREPPlugin_IECallBack.hxx
+  )
+
+IF(SALOME_BUILD_GUI)  
+  # header files / to be processed by moc
+  SET(_moc_HEADERS
+    BREPPlugin_GUI.h
+    )
+ENDIF()
+
+# --- sources ---
+
+IF(SALOME_BUILD_GUI)
+  # sources / moc wrappings
+  QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+
+  SET(BREPPluginGUI_SOURCES
+    BREPPlugin_GUI.cxx
+    ${_moc_SOURCES}
+    )
+ENDIF()
+  
+SET(BREPPluginEngine_SOURCES
+  BREPPlugin_Engine.cxx
+  BREPPlugin_OperationsCreator.cxx
+  BREPPlugin_IOperations_i.cc
+  BREPPlugin_IOperations.cxx
+  BREPPlugin_ExportDriver.cxx
+  BREPPlugin_ImportDriver.cxx
+  BREPPlugin_IECallBack.cxx
+  )
+  
+# resource files / to be processed by lrelease
+SET(BREPPlugin_RESOURCES
+  BREPPlugin_msg_en.ts
+  BREPPlugin_msg_fr.ts
+  BREPPlugin_msg_ja.ts
+  )
+
+# --- rules ---
+
+ADD_LIBRARY(BREPPluginEngine ${BREPPluginEngine_SOURCES})
+TARGET_LINK_LIBRARIES(BREPPluginEngine ${_link_engine_LIBRARIES})
+INSTALL(TARGETS BREPPluginEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+IF(SALOME_BUILD_GUI)
+  ADD_LIBRARY(BREPPluginGUI ${BREPPluginGUI_SOURCES})
+  TARGET_LINK_LIBRARIES(BREPPluginGUI ${_link_gui_LIBRARIES})
+  INSTALL(TARGETS BREPPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+  
+  QT4_INSTALL_TS_RESOURCES("${BREPPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
+ENDIF()
+
+
+INSTALL(FILES ${BREPPluginEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
index eff6eda75cc47950bca7823db003078f97ba89f0..09c2caf0d398e37180a1237b26299645f02b43a6 100644 (file)
@@ -30,7 +30,6 @@
 
 #include <ShapeBuild_ReShape.hxx>
 
-#include <ShapeFix_Edge.hxx>
 #include <ShapeFix_Face.hxx>
 #include <ShapeFix_Shell.hxx>
 
 #include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
 #include <BRep_TEdge.hxx>
 #include <BRep_Tool.hxx>
-#include <BRepAdaptor_HCompCurve.hxx>
 #include <BRepLib.hxx>
 #include <BRepLib_MakeEdge.hxx>
+#include <BRepTools_WireExplorer.hxx>
 
 #include <TopExp.hxx>
 #include <TopExp_Explorer.hxx>
 
 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
 #include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapIteratorOfMapOfShape.hxx>
 #include <TopTools_MapOfShape.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <TopTools_SequenceOfShape.hxx>
 #include <TopoDS_Edge.hxx>
 #include <TopoDS_Face.hxx>
 #include <TopoDS_Shell.hxx>
-#include <TopoDS_Solid.hxx>
 #include <TopoDS_Vertex.hxx>
-#include <TopoDS_Iterator.hxx>
 #include <TopoDS_Shape.hxx>
 
-#include <Approx_Curve3d.hxx>
-
 #include <GC_MakeCircle.hxx>
 
+#include <Geom_BezierCurve.hxx>
 #include <Geom_BSplineCurve.hxx>
 #include <Geom_Circle.hxx>
 #include <Geom_Curve.hxx>
 #include <TColGeom2d_Array1OfBSplineCurve.hxx>
 #include <TColGeom2d_HArray1OfBSplineCurve.hxx>
 #include <TColGeom2d_SequenceOfBoundedCurve.hxx>
-#include <TColgp_SequenceOfPnt.hxx>
 #include <TColStd_Array1OfReal.hxx>
+#include <TColStd_ListIteratorOfListOfInteger.hxx>
+#include <TColStd_ListOfInteger.hxx>
 #include <TColStd_MapOfInteger.hxx>
 
 #include "utilities.h"
 
+
+//=======================================================================
+//function : IsToMerge
+//purpose  : This method return Standard_True if two consequent edges can
+//           be merged. The edges can be merged if:
+//             1. They belong to same faces.
+//             2. They either both seam or both not seam on each face.
+//             3. They are based on coincident lines, or:
+//             4. They are based on coincident circles, or:
+//             5. They are based on either Bezier of BSplines.
+//=======================================================================
+static Standard_Boolean IsToMerge
+    (const TopoDS_Edge                               &theEdge1,
+     const TopoDS_Edge                               &theEdge2,
+     const TopTools_IndexedDataMapOfShapeListOfShape &theMapEdgeFaces,
+     const Standard_Real                              theTolerance)
+{
+  Standard_Boolean aResult  = Standard_False;
+  Standard_Boolean isDegen1 = BRep_Tool::Degenerated(theEdge1);
+  Standard_Boolean isDegen2 = BRep_Tool::Degenerated(theEdge2);
+  Standard_Boolean isCompareGeom = Standard_False;
+
+  if (isDegen1 && isDegen2) {
+    // Both of edges are degenerated.
+    aResult = Standard_True;
+  } else if (!isDegen1 && !isDegen2) {
+    // Both of edges are not degenerated.
+    // Check if they belong to the same faces.
+    Standard_Boolean isSame = Standard_False;
+    Standard_Boolean has1   = theMapEdgeFaces.Contains(theEdge1);
+    Standard_Boolean has2   = theMapEdgeFaces.Contains(theEdge1);
+
+    if (has1 && has2) {
+      const TopTools_ListOfShape &aLst1 = theMapEdgeFaces.FindFromKey(theEdge1);
+      const TopTools_ListOfShape &aLst2 = theMapEdgeFaces.FindFromKey(theEdge2);
+
+      if (aLst1.Extent() == aLst2.Extent()) {
+        TopTools_ListIteratorOfListOfShape anIter1(aLst1);
+
+        isSame = Standard_True;
+
+        for (; anIter1.More(); anIter1.Next()) {
+          TopoDS_Face aFace1 = TopoDS::Face(anIter1.Value());
+          TopTools_ListIteratorOfListOfShape  anIter2(aLst2);
+
+          for (; anIter2.More(); anIter2.Next()) {
+            if (aFace1.IsSame(anIter2.Value())) {
+              // Same face is detected. Break the loop.
+              // Check if edges either both seam or both not seam on this face.
+              Standard_Boolean isSeam1 = BRep_Tool::IsClosed(theEdge1, aFace1);
+              Standard_Boolean isSeam2 = BRep_Tool::IsClosed(theEdge2, aFace1);
+
+              isSame = (isSeam1 && isSeam2) || (isSeam1 == isSeam2);
+              break;
+            }
+          }
+
+          if (isSame && !anIter2.More()) {
+            // No same face is detected. Break the loop.
+            isSame = Standard_False;
+            break;
+          }
+        }
+      }
+    } else {
+      isSame = (has1 == has2); // True if the both of has are negative.
+    }
+
+    if (isSame) {
+      // Check edges geometry.
+      Standard_Real aFP1;
+      Standard_Real aFP2;
+      Standard_Real aLP1;
+      Standard_Real aLP2;
+      Handle(Geom_Curve) aC3d1 = BRep_Tool::Curve(theEdge1, aFP1, aLP1);
+      Handle(Geom_Curve) aC3d2 = BRep_Tool::Curve(theEdge2, aFP2, aLP2);
+
+      if (aC3d1.IsNull() == Standard_False &&
+          aC3d2.IsNull() == Standard_False) {
+        // Get the basis curves.
+        while(aC3d1->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
+          Handle(Geom_TrimmedCurve) aTc =
+            Handle(Geom_TrimmedCurve)::DownCast(aC3d1);
+          aC3d1 = aTc->BasisCurve();
+        }
+
+        while(aC3d2->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
+          Handle(Geom_TrimmedCurve) aTc =
+            Handle(Geom_TrimmedCurve)::DownCast(aC3d2);
+          aC3d2 = aTc->BasisCurve();
+        }
+
+        if(aC3d1->IsKind(STANDARD_TYPE(Geom_Line)) &&
+           aC3d2->IsKind(STANDARD_TYPE(Geom_Line))) {
+          // Two curves are lines.
+          Handle(Geom_Line) aL1 = Handle(Geom_Line)::DownCast(aC3d1);
+          Handle(Geom_Line) aL2 = Handle(Geom_Line)::DownCast(aC3d2);
+          gp_Dir aDir1 = aL1->Position().Direction();
+          gp_Dir aDir2 = aL2->Position().Direction();
+    
+          if(aDir1.IsParallel(aDir2, theTolerance)) {
+            // Two coincident lines.
+            aResult = Standard_True;
+          }
+        } else if(aC3d1->IsKind(STANDARD_TYPE(Geom_Circle)) &&
+                  aC3d2->IsKind(STANDARD_TYPE(Geom_Circle))) {
+          // Two curves are circles.
+          Handle(Geom_Circle) aC1 = Handle(Geom_Circle)::DownCast(aC3d1);
+          Handle(Geom_Circle) aC2 = Handle(Geom_Circle)::DownCast(aC3d2);
+          gp_Pnt aP01 = aC1->Location();
+          gp_Pnt aP02 = aC2->Location();
+
+          if (aP01.Distance(aP02) <= Precision::Confusion()) {
+            // Two coincident circles.
+            aResult = Standard_True;
+          }
+        } else if (aC3d1->IsKind(STANDARD_TYPE(Geom_BSplineCurve)) ||
+                   aC3d1->IsKind(STANDARD_TYPE(Geom_BezierCurve))) {
+          if (aC3d2->IsKind(STANDARD_TYPE(Geom_BSplineCurve)) ||
+              aC3d2->IsKind(STANDARD_TYPE(Geom_BezierCurve))) {
+            // Both of the curves are either bezier or BSplines.
+            aResult = Standard_True;
+          }
+        }
+      }
+    }
+  }
+
+  return aResult;
+}
+
 //=======================================================================
 //function : BlockFix_UnionEdges()
 //purpose  : Constructor
@@ -263,55 +391,11 @@ static TopoDS_Edge GlueEdgesWithPCurves(const TopTools_SequenceOfShape& aChain,
   return ResEdge;
 }
 
-//=======================================================================
-//function : IsFixed
-//purpose  : Returns true if this vertex should be kept in the result.
-//=======================================================================
-static Standard_Boolean IsFixed
-         (const TopoDS_Vertex &theVtx,
-          const TopoDS_Face   &theFace,
-          const TopTools_IndexedDataMapOfShapeListOfShape &theMapVtxEdgeOnFace)
-{
-  Standard_Boolean aResult = Standard_False;
-
-  if (theMapVtxEdgeOnFace.Contains(theVtx)) {
-    const TopTools_ListOfShape& aList = theMapVtxEdgeOnFace.FindFromKey(theVtx);
-    TopTools_ListIteratorOfListOfShape anIter(aList);
-    Standard_Boolean isFirst = Standard_True;
-    Standard_Boolean isSeam  = Standard_False;
-        
-    for ( ; anIter.More(); anIter.Next()) {
-      TopoDS_Edge anEdge = TopoDS::Edge(anIter.Value());
-
-      if (isFirst) {
-        // This is the first treated edge.
-        isFirst = Standard_False;
-        isSeam  = BRep_Tool::IsClosed(anEdge, theFace);
-      } else if (BRep_Tool::IsClosed(anEdge, theFace)) {
-        // Seam edge.
-        if (!isSeam) {
-          // The previous one was not seam.
-          aResult = Standard_True;
-          break;
-        }
-      } else if (isSeam) {
-        // This is not a seam edge however the previous one was seam.
-        aResult = Standard_True;
-        break;
-      }
-    }
-  }
-
-  return aResult;
-}
-
 //=======================================================================
 //function : MergeEdges
 //purpose  : auxilary
 //=======================================================================
 static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
-                                   const TopoDS_Face& theFace1,
-                                   const TopoDS_Face& theFace2,
                                    const Standard_Real Tol,
                                    TopoDS_Edge& anEdge)
 {
@@ -352,61 +436,6 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
     return Standard_False;
   }
 
-  // Check if there are vertices that should be kept in the result.
-  const Standard_Boolean isClosed = VF.IsSame(VL);
-  TopTools_IndexedDataMapOfShapeListOfShape theMapVtxEdge1;
-  TopTools_IndexedDataMapOfShapeListOfShape theMapVtxEdge2;
-  Standard_Integer jSplit = -1;
-
-  TopExp::MapShapesAndAncestors(theFace1, TopAbs_VERTEX, TopAbs_EDGE, theMapVtxEdge1);
-  TopExp::MapShapesAndAncestors(theFace2, TopAbs_VERTEX, TopAbs_EDGE, theMapVtxEdge2);
-
-  // Check if intermediate vertices should be in the result.
-  for(j = 1; j < aChain.Length(); j++) {
-    TopoDS_Edge   anEdge = TopoDS::Edge(aChain.Value(j));
-    TopoDS_Vertex aVtx   = sae.LastVertex(anEdge);
-
-    if (IsFixed(aVtx, theFace1, theMapVtxEdge1) ||
-        IsFixed(aVtx, theFace2, theMapVtxEdge2)) {
-      // This vertex should be kept.
-      if (jSplit > 0) {
-        // There is already split vertex detected.
-        // It means that these edges can't be merged.
-        MESSAGE ("Two edges on closed contour can't be merged.");
-        return Standard_False;
-      } else if (isClosed) {
-        // This is a closed contour.
-        // It is possible to merge it starting from the next edge.
-        jSplit = j;
-      } else {
-        // The contour is not closed, this vertex sould be kept.
-        // It means that these edges can't be merged.
-        MESSAGE ("Two edges on not closed contour can't be merged.");
-        return Standard_False;
-      }
-    }
-  }
-
-  if (jSplit > 0) {
-    // This is closed contour. Check the last (it is first as well) vertex,
-    // as it becomes intermediate after reordering.
-    TopoDS_Edge   anEdge = TopoDS::Edge(aChain.Last());
-    TopoDS_Vertex aVtx   = sae.LastVertex(anEdge);
-
-    if (IsFixed(aVtx, theFace1, theMapVtxEdge1) ||
-        IsFixed(aVtx, theFace2, theMapVtxEdge2)) {
-      // This vertex should be kept. So we can't merge this contour.
-      MESSAGE ("Two edges on closed contour can't be merged.");
-      return Standard_False;
-    }
-
-    // Reorder edges in the sequence to have jSplit-th edge last.
-    for(j = 1; j <= jSplit; j++) {
-      aChain.Append(aChain.First());
-      aChain.Remove(1);
-    }
-  }
-
   // union edges in chain
   // first step: union lines and circles
   TopLoc_Location Loc;
@@ -453,9 +482,6 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
       B.Add (E,V1);  B.Add (E,V2);
       B.UpdateVertex(V1, 0., E, 0.);
       B.UpdateVertex(V2, dist, E, 0.);
-      //ShapeFix_Edge sfe;
-      //sfe.FixAddPCurve(E,aFace,Standard_False);
-      //sfe.FixSameParameter(E);
       aChain.Remove(j);
       aChain.SetValue(j,E);
       j--;
@@ -555,21 +581,6 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
     if(NeedUnion) {
       MESSAGE ("can not make analitical union => make approximation");
       TopoDS_Edge E = GlueEdgesWithPCurves(aChain, VF, VL);
-      /*
-      TopoDS_Wire W;
-      B.MakeWire(W);
-      for(j=1; j<=aChain.Length(); j++) {
-        TopoDS_Edge edge = TopoDS::Edge(aChain.Value(j));
-        B.Add(W,edge);
-      }
-      Handle(BRepAdaptor_HCompCurve) Adapt = new BRepAdaptor_HCompCurve(W);
-      Approx_Curve3d Conv(Adapt,Tol,GeomAbs_C1,9,1000);
-      Handle(Geom_BSplineCurve) bc = Conv.Curve();
-      TopoDS_Edge E;
-      B.MakeEdge (E,bc,Precision::Confusion());
-      B.Add (E,VF);
-      B.Add (E,VL);
-      */
       aChain.SetValue(1,E);
     }
     else {
@@ -586,120 +597,186 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges,
 //function : Perform
 //purpose  :
 //=======================================================================
-TopoDS_Shape BlockFix_UnionEdges::Perform(const TopoDS_Shape& Shape,
-                                          const Standard_Real Tol)
+TopoDS_Shape BlockFix_UnionEdges::Perform(const TopoDS_Shape& theShape,
+                                          const Standard_Real theTol)
 {
-  myContext = new ShapeBuild_ReShape;
-  myTolerance = Tol;
-  TopoDS_Shape aResult = myContext->Apply(Shape);
-
-  // processing each solid
-  TopAbs_ShapeEnum aType = TopAbs_SOLID;
-  TopExp_Explorer exps (Shape, aType);
-  if (!exps.More()) {
-    aType = TopAbs_SHELL;
-    exps.Init(Shape, aType);
-  }
-  for (; exps.More(); exps.Next()) {
-    //TopoDS_Solid aSolid = TopoDS::Solid(exps.Current());
-    TopoDS_Shape aSolid = exps.Current();
-
-    TopTools_IndexedMapOfShape ChangedFaces;
-
-    // creating map of edge faces
-    TopTools_IndexedDataMapOfShapeListOfShape aMapEdgeFaces;
-    TopExp::MapShapesAndAncestors(aSolid, TopAbs_EDGE, TopAbs_FACE, aMapEdgeFaces);
-
-    Handle(ShapeBuild_ReShape) aContext = new ShapeBuild_ReShape;
-    TopoDS_Shape aRes = aSolid;
-    aRes = aContext->Apply(aSolid);
-
-    // processing each face
-    TopExp_Explorer exp;
-    for (exp.Init(aRes, TopAbs_FACE); exp.More(); exp.Next()) {
-      TopoDS_Face aFace =
-        TopoDS::Face(aContext->Apply(exp.Current().Oriented(TopAbs_FORWARD)));
-      TopTools_IndexedDataMapOfShapeListOfShape aMapFacesEdges;
-
-      for (TopExp_Explorer expe(aFace,TopAbs_EDGE); expe.More(); expe.Next()) {
-        TopoDS_Edge edge = TopoDS::Edge(expe.Current());
-        if (!aMapEdgeFaces.Contains(edge)) continue;
-        const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge);
-        TopTools_ListIteratorOfListOfShape anIter(aList);
-        for ( ; anIter.More(); anIter.Next()) {
-          TopoDS_Face face = TopoDS::Face(anIter.Value());
-          TopoDS_Face face1 = TopoDS::Face(aContext->Apply(anIter.Value()));
-          if (face1.IsSame(aFace)) continue;
-          if (aMapFacesEdges.Contains(face)) {
-            aMapFacesEdges.ChangeFromKey(face).Append(edge);
-          }
-          else {
-            TopTools_ListOfShape ListEdges;
-            ListEdges.Append(edge);
-            aMapFacesEdges.Add(face,ListEdges);
-          }
+  // Fill Map of edges as keys and list of faces as items.
+  TopTools_IndexedDataMapOfShapeListOfShape aMapEdgeFaces;
+  Standard_Boolean isModified = Standard_False;
+
+  TopExp::MapShapesAndAncestors
+    (theShape, TopAbs_EDGE, TopAbs_FACE, aMapEdgeFaces);
+
+  // processing each face
+  Handle(ShapeBuild_ReShape) aContext = new ShapeBuild_ReShape;
+  TopTools_MapOfShape        aProcessed;
+  TopTools_MapOfShape        aModifiedFaces;
+  TopExp_Explorer            anExpF(theShape, TopAbs_FACE);
+
+  for (; anExpF.More(); anExpF.Next()) {
+    // Processing of each wire of the face
+    TopoDS_Face aFace = TopoDS::Face(anExpF.Current());
+
+    if (!aProcessed.Add(aFace)) {
+      continue;
+    }
+
+    TopExp_Explorer anExpW(aFace, TopAbs_WIRE);
+
+    for (; anExpW.More(); anExpW.Next()) {
+      // Get the ordered list of edges in the wire.
+      TopoDS_Wire            aWire = TopoDS::Wire(anExpW.Current());
+      BRepTools_WireExplorer aWExp(aWire, aFace);
+      TopTools_ListOfShape   aChainEdges;
+      Standard_Integer       aNbEdges = 0;
+
+      for (; aWExp.More(); aWExp.Next(), aNbEdges++) {
+        aChainEdges.Append(aWExp.Current());
+      }
+
+      if (aNbEdges < 2) {
+        // Nothing to merge.
+        continue;
+      }
+
+      // Fill the list of flags that neighbour edges can be merged.
+      TColStd_ListOfInteger aChainCanMerged;
+      TopoDS_Edge           anEdge1 = TopoDS::Edge(aChainEdges.Last());
+      TopoDS_Edge           anEdge2;
+      Standard_Boolean      isToMerge;
+      TopTools_ListIteratorOfListOfShape anIter(aChainEdges);
+      Standard_Boolean      isFirstMerge = Standard_False;
+      Standard_Boolean      isFirst = Standard_True;
+      Standard_Boolean      isReorder = Standard_False;
+
+      // The first element is the flag between last and first edges.
+      for (; anIter.More(); anIter.Next()) {
+        anEdge2 = TopoDS::Edge(anIter.Value());
+        if (aProcessed.Contains(anEdge1) || aProcessed.Contains(anEdge2)) {
+          // No need to merge already processed edges.
+          isToMerge = Standard_False;
+        } else {
+          isToMerge = IsToMerge(anEdge1, anEdge2, aMapEdgeFaces, theTol);
+        }
+
+        aChainCanMerged.Append(isToMerge);
+        anEdge1 = anEdge2;
+
+        if (isFirst) {
+          isFirstMerge = isToMerge;
+          isFirst      = Standard_False;
+        } else if (isFirstMerge && !isToMerge) {
+          isReorder = Standard_True;
+        }
+      }
+
+      // Fill the map of processed shape by the edges.
+      for (anIter.Initialize(aChainEdges); anIter.More(); anIter.Next()) {
+        aProcessed.Add(anIter.Value());
+      }
+
+      // Reorder edges in the chain.
+      if (isReorder) {
+        // Find the first edge that can't be merged.
+        while (aChainCanMerged.First()) {
+          TopoDS_Shape aTmpShape = aChainEdges.First();
+
+          isToMerge = aChainCanMerged.First();
+          aChainCanMerged.RemoveFirst();
+          aChainCanMerged.Append(isToMerge);
+          aChainEdges.RemoveFirst();
+          aChainEdges.Append(aTmpShape);
         }
       }
 
-      for (Standard_Integer i=1; i<=aMapFacesEdges.Extent(); i++) {
-        const TopTools_ListOfShape& ListEdges = aMapFacesEdges.FindFromIndex(i);
-        TopTools_SequenceOfShape SeqEdges;
-        TopTools_ListIteratorOfListOfShape anIter(ListEdges);
-        for ( ; anIter.More(); anIter.Next()) {
-          SeqEdges.Append(anIter.Value());
+      // Merge parts of chain to be merged.
+      TColStd_ListIteratorOfListOfInteger aFlagIter(aChainCanMerged);
+      anIter.Initialize(aChainEdges);
+
+      while (anIter.More()) {
+        TopTools_SequenceOfShape aSeqEdges;
+
+        aSeqEdges.Append(anIter.Value());
+        aFlagIter.Next();
+        anIter.Next();
+
+        for (; anIter.More(); anIter.Next(), aFlagIter.Next()) {
+          if (aFlagIter.Value()) {
+            // Continue the chain.
+            aSeqEdges.Append(anIter.Value());
+          } else {
+            // Stop the chain.
+            break;
+          }
         }
-        if (SeqEdges.Length()==1) continue;
-
-        TopoDS_Face aFace2 =
-          TopoDS::Face(aContext->Apply(aMapFacesEdges.FindKey(i)));
-        TopoDS_Edge E;
-        if ( MergeEdges(SeqEdges,aFace,aFace2,Tol,E) ) {
-          // now we have only one edge - aChain.Value(1)
-          // we have to replace old ListEdges with this new edge
-          aContext->Replace(SeqEdges(1),E);
-          for (Standard_Integer j=2; j<=SeqEdges.Length(); j++) {
-            aContext->Remove(SeqEdges(j));
+
+        const Standard_Integer aNbEdges = aSeqEdges.Length();
+
+        if (aNbEdges > 1) {
+          // There are several edges to be merged.
+          TopoDS_Edge aMergedEdge;
+
+          if (MergeEdges(aSeqEdges, theTol, aMergedEdge)) {
+            isModified = Standard_True;
+            // now we have only one edge - aMergedEdge.
+            // we have to replace old ListEdges with this new edge
+            const TopoDS_Shape &anEdge = aSeqEdges.Value(1);
+
+            aContext->Replace(anEdge, aMergedEdge);
+
+            for (Standard_Integer j = 2; j <= aNbEdges; j++) {
+              aContext->Remove(aSeqEdges(j));
+            }
+
+            // Fix affected faces.
+            if (aMapEdgeFaces.Contains(anEdge)) {
+              const TopTools_ListOfShape &aList =
+                aMapEdgeFaces.FindFromKey(anEdge);
+              TopTools_ListIteratorOfListOfShape anIter(aList);
+
+              for (; anIter.More(); anIter.Next()) {
+                aModifiedFaces.Add(anIter.Value());
+              }
+            }
           }
-          TopoDS_Face tmpF = TopoDS::Face(exp.Current());
-          if ( !ChangedFaces.Contains(tmpF) )
-            ChangedFaces.Add(tmpF);
-          tmpF = TopoDS::Face(aMapFacesEdges.FindKey(i));
-          if ( !ChangedFaces.Contains(tmpF) )
-            ChangedFaces.Add(tmpF);
         }
       }
+    }
+  }
 
-    } // end processing each face
-
-    // fix changed faces and replace them in the local context
-    for (Standard_Integer i=1; i<=ChangedFaces.Extent(); i++) {
-      TopoDS_Face aFace = TopoDS::Face(aContext->Apply(ChangedFaces.FindKey(i)));
-      Handle(ShapeFix_Face) sff = new ShapeFix_Face(aFace);
-      sff->SetContext(myContext);
-      sff->SetPrecision(myTolerance);
-      sff->SetMinTolerance(myTolerance);
-      sff->SetMaxTolerance(Max(1.,myTolerance*1000.));
-      sff->Perform();
-      aContext->Replace(aFace,sff->Face());
+  if (isModified) {
+    // Fix modified faces.
+    TopTools_MapIteratorOfMapOfShape aModifIt(aModifiedFaces);
+
+    for (; aModifIt.More(); aModifIt.Next()) {
+      TopoDS_Face aModifiedFace =
+        TopoDS::Face(aContext->Apply(aModifIt.Key()));
+      Handle(ShapeFix_Face) aSff = new ShapeFix_Face(aModifiedFace);
+
+      aSff->SetContext(aContext);
+      aSff->SetPrecision(theTol);
+      aSff->SetMinTolerance(theTol);
+      aSff->SetMaxTolerance(Max(1., theTol*1000.));
+      aSff->Perform();
+      aContext->Replace(aModifiedFace, aSff->Face());
     }
 
-    if (ChangedFaces.Extent() > 0) {
-      // fix changed shell and replace it in the local context
-      TopoDS_Shape aRes1 = aContext->Apply(aRes);
-      TopExp_Explorer expsh;
-      for (expsh.Init(aRes1, TopAbs_SHELL); expsh.More(); expsh.Next()) {
-        TopoDS_Shell aShell = TopoDS::Shell(expsh.Current());
-        Handle(ShapeFix_Shell) sfsh = new ShapeFix_Shell;
-        sfsh->FixFaceOrientation(aShell);
-        aContext->Replace(aShell,sfsh->Shell());
-      }
-      TopoDS_Shape aRes2 = aContext->Apply(aRes1);
-      // put new solid into global context
-      myContext->Replace(aSolid,aRes2);
+    // Check if the result shape contains shells.
+    // If yes, fix the faces orientation in the shell.
+    TopoDS_Shape    aModifShape = aContext->Apply(theShape);
+    TopExp_Explorer anExpSh(aModifShape, TopAbs_SHELL);
+
+    for (; anExpSh.More(); anExpSh.Next()) {
+      TopoDS_Shell           aShell = TopoDS::Shell(anExpSh.Current());
+      Handle(ShapeFix_Shell) aSfsh = new ShapeFix_Shell;
+
+      aSfsh->FixFaceOrientation(aShell);
+      aContext->Replace(aShell, aSfsh->Shell());
     }
+  }
 
-  } // end processing each solid
+  const TopoDS_Shape aResult = aContext->Apply(theShape);
 
-  aResult = myContext->Apply(Shape);
   return aResult;
 }
index 641853c220b7f97fb1da10a9c54cce72948d5e73..7c10ef0d46bf1359159233c34ceed3ec97d18a8d 100755 (executable)
 # Common packages
 ##
 SET(SUBDIRS_COMMON
-  ARCHIMEDE BlockFix GEOMAlgo SKETCHER GEOM BREPExport
-  BREPImport IGESExport IGESImport STEPExport STEPImport STLExport STLImport
-  ShHealOper GEOMUtils XAO XAO_Swig GEOMImpl GEOM_I GEOMClient GEOM_I_Superv GEOM_SWIG GEOM_PY
-  AdvancedEngine OCC2VTK VTKExport
+  ARCHIMEDE BlockFix GEOMAlgo SKETCHER GEOM ShHealOper GEOMUtils XAO XAO_Swig 
+  GEOMImpl GEOM_I GEOMClient GEOM_I_Superv GEOM_SWIG GEOM_PY
+  AdvancedEngine OCC2VTK
+  STLPlugin BREPPlugin STEPPlugin IGESPlugin XAOPlugin VTKPlugin
   )
 
 ##
@@ -53,7 +53,7 @@ IF(SALOME_BUILD_GUI)
     OBJECT DlgRef GEOMFiltersSelection Material GEOMGUI
     GEOMBase DependencyTree GEOMToolsGUI DisplayGUI BasicGUI PrimitiveGUI GenerationGUI
     EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI
-    RepairGUI MeasureGUI GroupGUI BlocksGUI AdvancedGUI ImportExportGUI
+    RepairGUI MeasureGUI GroupGUI BlocksGUI AdvancedGUI
     GEOM_SWIG_WITHIHM
     )
 ENDIF()
index fcd23e99797a11fd9d4fe7e70e98bbe6fd94d3a7..3f407fd344dd7c04d7d3dee3cdfc723d5214e2e6 100644 (file)
@@ -136,6 +136,12 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
       ( GetVectorMode() ? tr("MEN_VECTOR_MODE_ON") : tr( "MEN_VECTOR_MODE_OFF" ) );
     getGeometryGUI()->menuMgr()->update();
     break;
+  case GEOMOp::OpSwitchVertices:  // MENU VIEW - DISPLAY MODE - SHOW/HIDE VERTICES
+    SetVerticesMode(!GetVerticesMode());
+    getGeometryGUI()->action( GEOMOp::OpSwitchVertices )->setText
+      ( GetVerticesMode() ? tr("MEN_VERTICES_MODE_ON") : tr( "MEN_VERTICES_MODE_OFF" ) );
+    getGeometryGUI()->menuMgr()->update();
+    break;
   case GEOMOp::OpWireframe:      // POPUP MENU - DISPLAY MODE - WIREFRAME
     ChangeDisplayMode( 0 );
     break;
@@ -151,6 +157,9 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
     case GEOMOp::OpVectors:        // POPUP MENU - DISPLAY MODE - SHOW EDGE DIRECTION
     ChangeDisplayMode( 4 );
     break;
+    case GEOMOp::OpVertices:       // POPUP MENU - DISPLAY MODE - SHOW VERTICES
+    ChangeDisplayMode( 5 );
+    break;
   default:
     app->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
     break;
@@ -485,6 +494,52 @@ int DisplayGUI::GetVectorMode( SUIT_ViewWindow* viewWindow )
   return viewWindow->property( "VectorsMode" ).toBool();
 }
 
+//=====================================================================================
+// function : DisplayGUI::SetVerticesMode()
+// purpose  : Set vertices mode for the viewer
+//=====================================================================================
+void DisplayGUI::SetVerticesMode( const bool mode, SUIT_ViewWindow* viewWindow )
+{
+  SUIT_OverrideCursor();
+
+  SalomeApp_Application* app = getGeometryGUI()->getApp();
+  if ( !app ) return;
+
+  SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
+  if ( !aStudy ) return;
+
+  if ( !viewWindow ) 
+    viewWindow = app->desktop()->activeWindow();
+
+  GEOM_Displayer displayer( aStudy );
+
+  viewWindow->setProperty( "VerticesMode", mode );
+
+  int aMgrId = viewWindow->getViewManager()->getGlobalId();
+
+  SALOME_ListIO anIOlst;
+  displayer.GetActiveView()->GetVisible( anIOlst );
+
+  for ( SALOME_ListIteratorOfListIO It( anIOlst ); It.More(); It.Next() ) {
+    Handle( SALOME_InteractiveObject ) io = It.Value();
+    aStudy->setObjectProperty( aMgrId, io->getEntry(), GEOM::propertyName( GEOM::Vertices ), mode );
+    displayer.Redisplay( io, false );
+  }
+  displayer.UpdateViewer();
+  GeometryGUI::Modified();
+}
+
+//=====================================================================================
+// function : DisplayGUI::GetVerticesMode()
+// purpose  : Get the "show vertices" mode of the viewer
+//=====================================================================================
+int DisplayGUI::GetVerticesMode( SUIT_ViewWindow* viewWindow )
+{
+  if ( !viewWindow ) 
+    viewWindow = getGeometryGUI()->getApp()->desktop()->activeWindow();
+  return viewWindow->property( "VerticesMode" ).toBool();
+}
+
 //=====================================================================================
 // function : DisplayGUI::ChangeDisplayMode()
 // purpose  : Set display mode for selected objects in the viewer given
@@ -516,6 +571,8 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
 
   QVariant v = aStudy->getObjectProperty( mgrId, selected.First()->getEntry(), GEOM::propertyName( GEOM::EdgesDirection ), QVariant() );
   bool vectorMode =  v.isValid() ? !v.toBool() : false;
+  v = aStudy->getObjectProperty( mgrId, selected.First()->getEntry(), GEOM::propertyName( GEOM::Vertices ), QVariant() );
+  bool verticesMode =  v.isValid() ? !v.toBool() : false;
 
   for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
     Handle( SALOME_InteractiveObject ) io = It.Value();
@@ -525,6 +582,9 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
     else if ( mode == 4 ) {
       aStudy->setObjectProperty( mgrId, io->getEntry(), GEOM::propertyName( GEOM::EdgesDirection ), vectorMode );
     }
+    else if ( mode == 5 ) {
+      aStudy->setObjectProperty( mgrId, io->getEntry(), GEOM::propertyName( GEOM::Vertices ), verticesMode );
+    }
     displayer.Redisplay( io, false );
   }
   displayer.UpdateViewer();
index 64207c5577f10d6bc45de10db09b4e3c8cb6019f..5ad5933c7fc5e4ca82a8723a498d51d4baf6d114 100644 (file)
@@ -69,6 +69,12 @@ public:
   int  GetVectorMode( SUIT_ViewWindow* = 0 );
   // Invert vector mode ( shadin <-> wireframe ) for the viewer 
 
+  // VERTICES MODE methods
+  // Set vertices mode for the viewer
+  void SetVerticesMode( const bool, SUIT_ViewWindow* = 0 );
+  // Get vertices mode of the viewer
+  int  GetVerticesMode( SUIT_ViewWindow* = 0 );
+  
   // Set display mode for selected objects in the viewer given
   // (current viewer if <viewWindow> = 0 )
   void ChangeDisplayMode( const int, SUIT_ViewWindow* = 0 );
index 3c365438f6f9717b0bad7d76d4ecf2415b37ba94..29874d83cc7814dd46f3a02777ea78f992ca9fd8 100755 (executable)
@@ -77,6 +77,7 @@ SET(_uic_files
   DlgRef_2Sel2Spin_QTD.ui
   DlgRef_2Sel3Spin2Rb_QTD.ui
   DlgRef_2Sel3Spin_QTD.ui
+  DlgRef_2Sel3Spin1Check_QTD.ui
   DlgRef_2SelExt_QTD.ui
   DlgRef_2Sel_QTD.ui
   DlgRef_2Spin_QTD.ui
@@ -92,6 +93,7 @@ SET(_uic_files
   DlgRef_3Sel4Spin2Check_QTD.ui
   DlgRef_3Sel_QTD.ui
   DlgRef_3Spin1Check_QTD.ui
+  DlgRef_3Spin1CheckCyl_QTD.ui
   DlgRef_3Spin_QTD.ui
   DlgRef_4Sel1List1Check_QTD.ui
   DlgRef_4Sel1List_QTD.ui
@@ -99,7 +101,6 @@ SET(_uic_files
   DlgRef_4Sel1Spin3Check_QTD.ui
   DlgRef_4Spin_QTD.ui
   DlgRef_6Sel_QTD.ui
-  DlgRef_Skeleton_QTD.ui
   )
 
 # --- headers ---
index 9a6efd71826305ca8810eae61630c69f67151f7e..1e242cb950ecc1e03f71fe2e67620f571f6bbef2 100644 (file)
@@ -470,6 +470,20 @@ DlgRef_2Sel2Spin2Push::~DlgRef_2Sel2Spin2Push()
 {
 }
 
+//////////////////////////////////////////
+// DlgRef_2Sel3Spin1Check
+//////////////////////////////////////////
+
+DlgRef_2Sel3Spin1Check::DlgRef_2Sel3Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_2Sel3Spin1Check::~DlgRef_2Sel3Spin1Check()
+{
+}
+
 //////////////////////////////////////////
 // DlgRef_2Sel3Spin2Rb
 //////////////////////////////////////////
@@ -756,6 +770,20 @@ DlgRef_3Spin1Check::~DlgRef_3Spin1Check()
 {
 }
 
+//////////////////////////////////////////
+// DlgRef_3Spin1CheckCyl
+//////////////////////////////////////////
+
+DlgRef_3Spin1CheckCyl::DlgRef_3Spin1CheckCyl( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_3Spin1CheckCyl::~DlgRef_3Spin1CheckCyl()
+{
+}
+
 //////////////////////////////////////////
 // DlgRef_3Spin
 //////////////////////////////////////////
@@ -870,20 +898,6 @@ DlgRef_6Sel::~DlgRef_6Sel()
 {
 }
 
-//////////////////////////////////////////
-// DlgRef_Skeleton
-//////////////////////////////////////////
-
-DlgRef_Skeleton::DlgRef_Skeleton( QWidget* parent, Qt::WindowFlags f )
-: QWidget( parent, f )
-{
-  setupUi( this );
-}
-
-DlgRef_Skeleton::~DlgRef_Skeleton()
-{
-}
-
 //////////////////////////////////////////
 // Utility functions
 //////////////////////////////////////////
index c68358d1115cbcb49195ca9d83b727fed0766b11..918183677b154574dbf55f7df73b5345eeba51d2 100644 (file)
@@ -548,6 +548,22 @@ public:
   ~DlgRef_2Sel2Spin2Push();
 };
 
+//////////////////////////////////////////
+// DlgRef_2Sel3Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_2Sel3Spin1Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_2Sel3Spin1Check : public QWidget, 
+                                       public Ui::DlgRef_2Sel3Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_2Sel3Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_2Sel3Spin1Check();
+};
+
 //////////////////////////////////////////
 // DlgRef_2Sel3Spin2Rb
 //////////////////////////////////////////
@@ -826,6 +842,22 @@ public:
   ~DlgRef_3Spin1Check();
 };
 
+//////////////////////////////////////////
+// DlgRef_3Spin1CheckCyl
+//////////////////////////////////////////
+
+#include "ui_DlgRef_3Spin1CheckCyl_QTD.h"
+
+class DLGREF_EXPORT DlgRef_3Spin1CheckCyl : public QWidget, 
+                                         public Ui::DlgRef_3Spin1CheckCyl_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_3Spin1CheckCyl( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_3Spin1CheckCyl();
+};
+
 //////////////////////////////////////////
 // DlgRef_3Spin
 //////////////////////////////////////////
@@ -940,22 +972,6 @@ public:
   ~DlgRef_6Sel();
 };
 
-//////////////////////////////////////////
-// DlgRef_Skeleton
-//////////////////////////////////////////
-
-#include "ui_DlgRef_Skeleton_QTD.h"
-
-class DLGREF_EXPORT DlgRef_Skeleton : public QWidget, 
-                                      public Ui::DlgRef_Skeleton_QTD
-{
-  Q_OBJECT
-
-public:
-  DlgRef_Skeleton( QWidget* = 0, Qt::WindowFlags = 0 );
-  ~DlgRef_Skeleton();
-};
-
 //////////////////////////////////////////
 // Utility functions
 //////////////////////////////////////////
diff --git a/src/DlgRef/DlgRef_2Sel3Spin1Check_QTD.ui b/src/DlgRef/DlgRef_2Sel3Spin1Check_QTD.ui
new file mode 100644 (file)
index 0000000..0748910
--- /dev/null
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_2Sel3Spin1Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_2Sel3Spin1Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>323</width>
+    <height>223</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>6</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="5" column="1">
+       <widget class="QLabel" name="TextLabel4">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL4</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="3">
+       <widget class="QLineEdit" name="LineEdit1"/>
+      </item>
+      <item row="2" column="1">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QPushButton" name="PushButton1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="3">
+       <widget class="QLineEdit" name="LineEdit2"/>
+      </item>
+      <item row="2" column="2">
+       <widget class="QPushButton" name="PushButton2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="2" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX"/>
+      </item>
+      <item row="6" column="2" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DZ"/>
+      </item>
+      <item row="5" column="2" colspan="2">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY"/>
+      </item>
+      <item row="6" column="1">
+       <widget class="QLabel" name="TextLabel5">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL5</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="6" column="0">
+       <widget class="QCheckBox" name="checkBox">
+        <property name="text">
+         <string>CB</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>PushButton2</tabstop>
+  <tabstop>LineEdit2</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+  <tabstop>SpinBox_DZ</tabstop>
+  <tabstop>checkBox</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/DlgRef/DlgRef_3Spin1CheckCyl_QTD.ui b/src/DlgRef/DlgRef_3Spin1CheckCyl_QTD.ui
new file mode 100644 (file)
index 0000000..7307c92
--- /dev/null
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_3Spin1CheckCyl_QTD</class>
+ <widget class="QWidget" name="DlgRef_3Spin1CheckCyl_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>611</width>
+    <height>154</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="enabled">
+      <bool>true</bool>
+     </property>
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout" columnstretch="0,0,0,0" columnminimumwidth="0,0,0,280">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="2" column="1">
+       <widget class="QLabel" name="TextLabel3">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL3</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QLabel" name="TextLabel2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL2</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="3">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX"/>
+      </item>
+      <item row="1" column="3">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DY"/>
+      </item>
+      <item row="2" column="3">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DZ"/>
+      </item>
+      <item row="2" column="0">
+       <widget class="QCheckBox" name="checkBox">
+        <property name="text">
+         <string>CB</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+  <tabstop>SpinBox_DZ</tabstop>
+  <tabstop>checkBox</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
index ea4281cbd6358d6fe77d800766441b24bc23398c..b6f36c8ad524ded52e3d0bd396bdb798db117fdc 100644 (file)
@@ -354,11 +354,7 @@ void EntityGUI::DisplaySimulationShape( const TopoDS_Shape& S1, const TopoDS_Sha
   try {
     if ( !S1.IsNull() ) {
       /* erase any previous */
-#if OCC_VERSION_LARGE <= 0x06060000
-      ic->Erase( mySimulationShape1, Standard_True, Standard_False );
-#else
       ic->Erase( mySimulationShape1, Standard_True );
-#endif
       ic->ClearPrs( mySimulationShape1 );
 
       mySimulationShape1 = new AIS_Shape( TopoDS_Shape() );
index 9ac38a334261302c175db431c53848e9138fb270..1f7ff49d5936c75726bcec415461b81a46c556d1 100644 (file)
@@ -83,12 +83,6 @@ enum{
   LINES
 };
 
-enum {
-  RADIO_BUTTONS,
-  MSG,
-  PUSH_BUTTON,
-};
-
 enum {
   KERNEL_SIZE,
   FIND_CONTOURS_METHOD,
@@ -859,11 +853,11 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects )
                 double u_v_det = (it->x - it_previous->x) * (it_next->y - it->y) - 
                                  (it->y - it_previous->y) * (it_next->x - it->x);
                                           
-                double norme_u = sqrt ( (it->x - it_previous->x)*(it->x - it_previous->x) +
-                                        (it->y - it_previous->y)*(it->y - it_previous->y) );
+                double norme_u = sqrt ( double(it->x - it_previous->x) * double(it->x - it_previous->x) +
+                                        double(it->y - it_previous->y) * double(it->y - it_previous->y) );
                 
-                double norme_v = sqrt ( (it->x - it_next->x)*(it->x - it_next->x) +
-                                        (it->y - it_next->y)*(it->y - it_next->y) );
+                double norme_v = sqrt ( double(it->x - it_next->x) * double(it->x - it_next->x) +
+                                        double(it->y - it_next->y) * double(it->y - it_next->y) );
                                                                                                 
                 double u_v_sinus = u_v_det / (norme_u * norme_v);
                 
index 0670561524dfee55d09eb803c1da6a31411c286d..92dd5f5c418a39b371fae3c98f4664474e05c6c1 100755 (executable)
@@ -65,6 +65,7 @@ SET(GEOM_HEADERS
   GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx
   GEOM_DataMapOfAsciiStringTransient.hxx
   Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx
+  GEOM_BaseObject.hxx
   )
 
 # --- sources ---
index 2097da59306d017d74dcc558ad3d2f45beed8c4e..2ace1ce544e4ce1240bd0639c6153e450ff1ebdb 100644 (file)
 
 #include "GEOM_Function.hxx"
 #include "GEOM_Object.hxx"
+#include "GEOM_Engine.hxx"
 
 #include <TColStd_HArray1OfInteger.hxx>
 #include <TDataStd_Name.hxx>
+#include <TDocStd_Owner.hxx>
 
 IMPLEMENT_STANDARD_HANDLE (GEOM_BaseDriver,TFunction_Driver);
 IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver);
 
+//================================================================================
+/*!
+ * Returns document id
+ */
+//================================================================================
+int GEOM_BaseDriver::GetDocID() const
+{
+  int docId = 0;
+  if (!Label().IsNull()) {
+    Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(Label().Data());
+    docId = GEOM_Engine::GetEngine()->GetDocID(aDoc);
+  }
+  return docId;
+}
 
 //================================================================================
 /*!
index a90dd6813a48ceedd1c3403da14a010bbc85ccc3..7313ea6024f9207785cbad2985839902b45ab165 100644 (file)
@@ -67,7 +67,9 @@ struct GEOM_Param
 class GEOM_BaseDriver : public TFunction_Driver
 {
 public:
-
+  // Returns document id
+  Standard_EXPORT int GetDocID() const;
+  
   // Returns a name of creation operation and names and values of creation parameters
   // (Use AddParam() methods declared below to fill params vector while implementing
   // this method in derived drivers)
index b29c2204bc7b69b7d484a60c46789a599610ace0..5c5f3c885e39e65e1612466a8c5082588ba7abd2 100755 (executable)
@@ -64,6 +64,7 @@ SET(_link_LIBRARIES
 SET(GEOMBase_HEADERS
   GEOMBase.h
   GEOMBase_Skeleton.h
+  GEOMBase_DlgSkeleton.h
   GEOMBase_Helper.h
   GEOM_Operation.h
   GEOM_GEOMBase.hxx
@@ -73,6 +74,7 @@ SET(GEOMBase_HEADERS
 # header files / to be processed by moc
 SET(_moc_HEADERS
   GEOMBase_Skeleton.h
+  GEOMBase_DlgSkeleton.h
   )
 
 # --- sources ---
@@ -86,6 +88,7 @@ SET(GEOMBase_SOURCES
   GEOMBase_Helper.cxx
   GEOM_Operation.cxx
   GEOM_GenericObjPtr.cxx
+  GEOMBase_DlgSkeleton.cxx
   ${_moc_SOURCES}
   )
 
diff --git a/src/GEOMBase/GEOMBase_DlgSkeleton.cxx b/src/GEOMBase/GEOMBase_DlgSkeleton.cxx
new file mode 100644 (file)
index 0000000..ab46427
--- /dev/null
@@ -0,0 +1,168 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// GEOM GEOMGUI : GUI for Geometry component
+// File   : GEOMBase_DlgSkeleton.cxx
+// Author : Roman NIKOLAEV, Open CASCADE S.A.S.
+
+#include "GEOMBase_DlgSkeleton.h"
+
+//Qt includes
+#include <QGridLayout>
+#include <QGroupBox>
+#include <QRadioButton>
+#include <QLabel>
+#include <QLineEdit>
+#include <QCheckBox>
+#include <QPushButton>
+
+
+/*!
+  Constructor.
+*/
+GEOMBase_DlgSkeleton::GEOMBase_DlgSkeleton( QWidget* parent, Qt::WindowFlags flags ) :
+  QWidget(parent,flags)
+{
+  init();
+}
+
+/*!
+  Destructor.
+*/
+GEOMBase_DlgSkeleton::~GEOMBase_DlgSkeleton( ) {
+
+}
+
+/*!
+  Initialize the widget
+*/
+void GEOMBase_DlgSkeleton::init( ) {
+  // Main layout
+  gridLayout = new QGridLayout(this);
+
+  //Constructors group
+  GroupConstructors = new QGroupBox(this);
+  GroupConstructors->setObjectName(QString::fromUtf8("GroupConstructors"));
+  QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+  sizePolicy.setHorizontalStretch(0);
+  sizePolicy.setVerticalStretch(0);
+  sizePolicy.setHeightForWidth(GroupConstructors->sizePolicy().hasHeightForWidth());
+  GroupConstructors->setSizePolicy(sizePolicy);
+  hboxLayout = new QHBoxLayout(GroupConstructors);
+
+  RadioButton1 = new QRadioButton(GroupConstructors);
+  hboxLayout->addWidget(RadioButton1);
+
+  RadioButton2 = new QRadioButton(GroupConstructors);
+  hboxLayout->addWidget(RadioButton2);
+  
+  RadioButton3 = new QRadioButton(GroupConstructors);
+  hboxLayout->addWidget(RadioButton3);
+
+  RadioButton4 = new QRadioButton(GroupConstructors);
+  hboxLayout->addWidget(RadioButton4);
+
+  RadioButton5 = new QRadioButton(GroupConstructors);
+  hboxLayout->addWidget(RadioButton5);
+  gridLayout->addWidget(GroupConstructors, 0, 0, 1, 1);
+
+  //Name group
+  GroupBoxName = new QGroupBox(this);
+  sizePolicy.setHeightForWidth(GroupBoxName->sizePolicy().hasHeightForWidth());
+  GroupBoxName->setSizePolicy(sizePolicy);
+  hboxLayout1 = new QHBoxLayout(GroupBoxName);
+  hboxLayout1->setContentsMargins(9, 9, 9, 9);
+
+  NameLabel = new QLabel(GroupBoxName);
+  NameLabel->setWordWrap(false);
+  hboxLayout1->addWidget(NameLabel);
+
+  ResultName = new QLineEdit(GroupBoxName);
+  hboxLayout1->addWidget(ResultName);
+  gridLayout->addWidget(GroupBoxName, 1, 0, 1, 1);
+
+  //Group box with the check-boxes
+  GroupMedium = new QWidget(this);
+  QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding);
+  sizePolicy1.setHorizontalStretch(0);
+  sizePolicy1.setVerticalStretch(0);
+  sizePolicy1.setHeightForWidth(GroupMedium->sizePolicy().hasHeightForWidth());
+  GroupMedium->setSizePolicy(sizePolicy1);
+
+  gridLayout->addWidget(GroupMedium, 2, 0, 1, 1);
+  GroupBoxPublish = new QGroupBox(this);
+  vboxLayout = new QVBoxLayout(GroupBoxPublish);
+
+  CheckBoxRestoreSS = new QCheckBox(GroupBoxPublish);
+  vboxLayout->addWidget(CheckBoxRestoreSS);
+
+  CheckBoxAddPrefix = new QCheckBox(GroupBoxPublish);
+  vboxLayout->addWidget(CheckBoxAddPrefix);
+
+  CheckBoxPreview = new QCheckBox(GroupBoxPublish);
+  vboxLayout->addWidget(CheckBoxPreview);
+  gridLayout->addWidget(GroupBoxPublish, 3, 0, 1, 1);
+
+  //Group with buttons
+  GroupButtons = new QGroupBox(this);
+
+  QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Fixed);
+  sizePolicy2.setHorizontalStretch(0);
+  sizePolicy2.setVerticalStretch(0);
+  sizePolicy2.setHeightForWidth(GroupButtons->sizePolicy().hasHeightForWidth());
+  GroupButtons->setSizePolicy(sizePolicy2);
+
+  hboxLayout2 = new QHBoxLayout(GroupButtons);
+  hboxLayout2->setContentsMargins(9, 9, 9, 9);
+  buttonOk = new QPushButton(GroupButtons);
+  hboxLayout2->addWidget(buttonOk);
+
+  buttonApply = new QPushButton(GroupButtons);
+  hboxLayout2->addWidget(buttonApply);
+  
+  QSpacerItem* spacerItem = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
+  hboxLayout2->addItem(spacerItem);
+  
+  buttonCancel = new QPushButton(GroupButtons);
+  hboxLayout2->addWidget(buttonCancel);
+  
+  buttonHelp = new QPushButton(GroupButtons);
+  
+  hboxLayout2->addWidget(buttonHelp);
+  
+  gridLayout->addWidget(GroupButtons, 4, 0, 1, 1);
+  
+  setTabOrder(CheckBoxRestoreSS, CheckBoxAddPrefix);
+  setTabOrder(CheckBoxAddPrefix, CheckBoxPreview);
+  setTabOrder(CheckBoxPreview, buttonOk);
+  setTabOrder(buttonOk, buttonApply);
+  setTabOrder(buttonApply, buttonCancel);
+  setTabOrder(buttonCancel, buttonHelp);
+  setTabOrder(buttonHelp, RadioButton1);
+  setTabOrder(RadioButton1, RadioButton2);
+  setTabOrder(RadioButton2, RadioButton3);
+  setTabOrder(RadioButton3, RadioButton4);
+  setTabOrder(RadioButton4, RadioButton5);
+  setTabOrder(RadioButton5, ResultName);
+
+  buttonOk->setText(tr("A&pply and Close"));
+  buttonApply->setText("&Apply");
+  buttonCancel->setText("&Close");
+  buttonHelp->setText("&Help");
+}
diff --git a/src/GEOMBase/GEOMBase_DlgSkeleton.h b/src/GEOMBase/GEOMBase_DlgSkeleton.h
new file mode 100644 (file)
index 0000000..2b4db80
--- /dev/null
@@ -0,0 +1,75 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// GEOM GEOMGUI : GUI for Geometry component
+// File   : GEOMBase_DlgSkeleton.h
+// Author : Roman NIKOLAEV, Open CASCADE S.A.S.
+
+#ifndef GEOMBASE_DLGSKELETON_N
+#define GEOMBASE_DLGSKELETON_N
+
+#include <QWidget>
+#include "GEOM_GEOMBase.hxx"
+
+class QGridLayout;
+class QGroupBox;
+class QHBoxLayout;
+class QVBoxLayout;
+class QRadioButton;
+class QLabel;
+class QLineEdit;
+class QCheckBox;
+class QPushButton;
+
+class GEOMBASE_EXPORT GEOMBase_DlgSkeleton : public QWidget
+{
+  Q_OBJECT
+ public:
+  GEOMBase_DlgSkeleton( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~GEOMBase_DlgSkeleton();
+ private: 
+  void init();
+ public:
+  QGridLayout *gridLayout;
+  QGroupBox *GroupConstructors;
+  QHBoxLayout *hboxLayout;
+  QRadioButton *RadioButton1;
+  QRadioButton *RadioButton2;
+  QRadioButton *RadioButton3;
+  QRadioButton *RadioButton4;
+  QRadioButton *RadioButton5;
+  QGroupBox *GroupBoxName;
+  QHBoxLayout *hboxLayout1;
+  QLabel *NameLabel;
+  QLineEdit *ResultName;
+  QWidget *GroupMedium;
+  QGroupBox *GroupBoxPublish;
+  QVBoxLayout *vboxLayout;
+  QCheckBox *CheckBoxRestoreSS;
+  QCheckBox *CheckBoxAddPrefix;
+  QCheckBox *CheckBoxPreview;
+  QGroupBox *GroupButtons;
+  QHBoxLayout *hboxLayout2;
+  QPushButton *buttonOk;
+  QPushButton *buttonApply;
+  QPushButton *buttonCancel;
+  QPushButton *buttonHelp;
+};
+
+#endif //GEOMBASE_DLGSKELETON_N
index b496494474e5cf58de895ba84c229a2e488b3e4a..7ed88f0b0221d6d657b74fbf154bf15e56c72173 100644 (file)
@@ -25,6 +25,7 @@
 // Author : Damien COQUERET, Open CASCADE S.A.S.
 
 #include "GEOMBase_Skeleton.h"
+#include "GEOMBase_DlgSkeleton.h"
 #include "GEOMBase.h"
 
 #include <DlgRef.h>
@@ -62,7 +63,7 @@ GEOMBase_Skeleton::GEOMBase_Skeleton( GeometryGUI* theGeometryGUI, QWidget* pare
 
   setModal( modal );
 
-  myMainFrame = new DlgRef_Skeleton( this );
+  myMainFrame = new GEOMBase_DlgSkeleton( this );
   QVBoxLayout* topLayout = new QVBoxLayout( this );
   topLayout->setMargin( 0 ); topLayout->setSpacing( 0 );
   topLayout->addWidget( myMainFrame );
@@ -347,8 +348,15 @@ void GEOMBase_Skeleton::unsetConstructorId()
 void GEOMBase_Skeleton::ClickOnHelp()
 {
   LightApp_Application* app = (LightApp_Application*)( SUIT_Session::session()->activeApplication() );
+
+  QString context;
+  if(myHelpContext.isEmpty()) {
+    context = myGeomGUI ? app->moduleName( myGeomGUI->moduleName() ) : QString("");
+  } else {
+    context = myHelpContext;
+  }
   if ( app ) 
-    app->onHelpContextModule( myGeomGUI ? app->moduleName( myGeomGUI->moduleName() ) : QString(""), myHelpFileName );
+    app->onHelpContextModule( context , myHelpFileName );
   else {
     QString platform;
 #ifdef WIN32
@@ -372,7 +380,7 @@ void GEOMBase_Skeleton::setHelpFileName( const QString& theName )
   myHelpFileName = theName;
 }
 
-DlgRef_Skeleton* GEOMBase_Skeleton::mainFrame()
+GEOMBase_DlgSkeleton* GEOMBase_Skeleton::mainFrame()
 {
   return myMainFrame;
 }
index e4f5f4d94645c7126193c77f031e063d828d8221..b41b5d8758c10f247095dcf3e5ad60dbb7f38415 100644 (file)
 #define GEOMBASE_SKELETON_H
 
 #include "GEOM_GEOMBase.hxx"
+#include "GEOMBase_DlgSkeleton.h"
 #include "GEOMBase_Helper.h"
 
 #include <QDialog>
 
 class SalomeApp_DoubleSpinBox;
 class GeometryGUI;
-class DlgRef_Skeleton;
+class GEOMBase_DlgSkeleton;
 class QSpinBox;
 class QDoubleSpinBox;
 class QLineEdit;
@@ -90,7 +91,7 @@ protected:
     
     void                setHelpFileName( const QString& );
 
-    DlgRef_Skeleton*    mainFrame();
+    GEOMBase_DlgSkeleton* mainFrame();
     QWidget*            centralWidget();
     QPushButton*        buttonCancel() const;
     QPushButton*        buttonOk() const;
@@ -103,7 +104,9 @@ protected:
     QString             myHelpFileName;        //!< Associated HTML help file name
     
     QButtonGroup*       myRBGroup;             //!< radio button group
-    DlgRef_Skeleton*    myMainFrame;           //!< dialog box's mainframe widgetx
+    GEOMBase_DlgSkeleton*    myMainFrame;      //!< dialog box's mainframe widget
+    QString             myHelpContext;         //!< Help context, needed for the customization 
+                                               //!< path where located plugins help HTML pages
 
 protected slots:
     virtual void        ClickOnCancel();
@@ -111,7 +114,7 @@ protected slots:
     void                LineEditReturnPressed();
     void                DeactivateActiveDialog();
     void                ActivateThisDialog();
-    void                ClickOnHelp();
+    virtual void        ClickOnHelp();
 
 signals:
     void                constructorsClicked( int );
index 552e3143dd8f8ba73cd70e599b685a5dce8fd3d2..ce5fb31bf514526c60c40d287eb25a432d281ef6 100644 (file)
@@ -229,7 +229,6 @@ namespace GEOM
   typedef GenericObjPtr<GEOM::GEOM_IInsertOperations>    InsertOpPtr;
   typedef GenericObjPtr<GEOM::GEOM_IMeasureOperations>   MeasureOpPtr;
   typedef GenericObjPtr<GEOM::GEOM_IGroupOperations>     GroupOpPtr;
-  typedef GenericObjPtr<GEOM::GEOM_IAdvancedOperations>  AdvancedOpPtr;
 
   template<> bool GEOMBASE_EXPORT GenericObjPtr<GEOM::GEOM_Object>::isSame( GEOM::GEOM_Object_ptr theLeft, GEOM::GEOM_Object_ptr theRight );
 }
index c5dc25f8a481b9ede31d8a151be6027d2015735e..74e2f4f0f71a946560f65e97a186c59b0128a9e4 100755 (executable)
@@ -62,7 +62,6 @@ SET(_link_LIBRARIES
   ${KERNEL_SalomeDS}
   ${KERNEL_SalomeDSClient}
   ${GUI_SalomeApp}
-  ${QT_QTXML_LIBRARY}
   )
 
 # --- headers ---
@@ -72,7 +71,6 @@ SET(GEOMGUI_HEADERS
   GeometryGUI_Operations.h
   GEOMGUI.h
   GEOMPluginGUI.h
-  GEOMGUI_XmlHandler.h
   GEOM_Displayer.h
   GEOMGUI_OCCSelector.h
   GEOMGUI_Selection.h
@@ -112,7 +110,6 @@ SET(GEOMGUI_SOURCES
   GeometryGUI.cxx
   GEOMGUI.cxx
   GEOMPluginGUI.cxx
-  GEOMGUI_XmlHandler.cxx
   GEOM_Displayer.cxx
   GEOMGUI_OCCSelector.cxx
   GEOMGUI_Selection.cxx
index 0429e9be5abec419a0dc5ee09d93af0bc818a381..bd319bfab525a79d6ac6d2dd0a42ff626a8ac1d1 100644 (file)
@@ -37,7 +37,8 @@
 GEOMGUI_CreationInfoWdg::GEOMGUI_CreationInfoWdg( SalomeApp_Application* app )
 //:QWidget( app->desktop() )
 {
-  setWindowTitle(tr("CREATION_INFO_TITLE"));
+  setWindowTitle( tr( "CREATION_INFO_TITLE" ) );
+  setObjectName( "geomCreationInformation" );
 
   QFrame* frame = new QFrame( this );
 
@@ -76,7 +77,6 @@ void GEOMGUI_CreationInfoWdg::setOperation(const QPixmap& icon, const QString& n
 {
   myIconLbl->setPixmap( icon );
   myOperaionLnEd->setText( name );
-  myParamsTreeWd->clear();
 
   if ( name.isEmpty() )
     myOperaionLnEd->setText( tr("NO_INFO"));
index 3e6f31a31f2221e11a5bb059c2ae20f8ec3371c9..583a730789d52ebb572eac19e342fa8f79f0577b 100644 (file)
@@ -171,6 +171,8 @@ QVariant GEOMGUI_Selection::parameter( const int idx, const QString& p ) const
     v = isAutoColor( idx );
   else if ( p == "isVectorsMode" )
     v = isVectorsMode( idx );
+  else if ( p == "isVerticesMode" )
+    v = isVerticesMode( idx );
   else if ( p == "topLevel" )
     v = topLevel( idx );
   else if ( p == "autoBringToFront" )
@@ -428,6 +430,53 @@ bool GEOMGUI_Selection::isVectorsMode( const int index ) const
   return res;
 }
 
+bool GEOMGUI_Selection::isVerticesMode( const int index ) const
+{
+#ifdef USE_VISUAL_PROP_MAP
+  QVariant v = visibleProperty( entry( index ), GEOM::propertyName( GEOM::Vertices ) );
+  if ( v.canConvert( QVariant::Bool ) )
+    return v.toBool();
+#endif
+
+  bool res = false;
+  
+  SALOME_View* view = GEOM_Displayer::GetActiveView();
+  QString viewType = activeViewType();
+  if ( view && ( viewType == OCCViewer_Viewer::Type() || viewType == SVTK_Viewer::Type() ) ) {
+    SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
+    if ( prs ) {
+      if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
+        SOCC_Prs* occPrs = (SOCC_Prs*) prs;
+        AIS_ListOfInteractive lst;
+        occPrs->GetObjects( lst );
+        if ( lst.Extent() ) {
+          Handle(AIS_InteractiveObject) io = lst.First();
+          if ( !io.IsNull() ) {
+            Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
+            if ( !aSh.IsNull() )
+              res = aSh->isShowVertices();
+          }
+        }
+      }
+      else if ( viewType == SVTK_Viewer::Type() ) { // assuming VTK
+        SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
+        vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0;
+        if ( lst ) {
+          lst->InitTraversal();
+          vtkActor* actor = lst->GetNextActor();
+          if ( actor ) {
+            GEOM_Actor* aGeomActor = GEOM_Actor::SafeDownCast(actor);
+            if ( aGeomActor )
+              res = aGeomActor->GetVerticesMode();
+            }
+        }
+      }
+    }
+  }
+
+  return res;
+}
+
 bool GEOMGUI_Selection::hasChildren( const _PTR(SObject)& obj )
 {
   if ( obj ) {
@@ -672,7 +721,8 @@ bool GEOMGUI_Selection::isPhysicalMaterial( const int idx ) const
             GEOM_Actor* aGeomGActor = GEOM_Actor::SafeDownCast( actor );
             if ( aGeomGActor ) {
               GEOM_VTKPropertyMaterial* mat  = GEOM_VTKPropertyMaterial::SafeDownCast(aGeomGActor->GetProperty());
-              res = mat->GetPhysical();
+              if ( mat )
+                res = mat->GetPhysical();
             } // if ( salome actor )
           } // if ( actor )
         } // if ( lst == vtkPrs->GetObjects() )
index be21acfb4c578686f4773d586e9dd154d1dd3684..d7b69260962cf7993ce89fa76013f3d054cb890c 100644 (file)
@@ -67,6 +67,7 @@ private:
   QString               displayMode( const int ) const;
   QString               selectionMode() const;
   bool                  isVectorsMode( const int ) const;
+  bool                  isVerticesMode( const int ) const;
   bool                  hasChildren( const int ) const;
   int                   nbChildren( const int ) const;
   bool                  hasConcealedChildren( const int ) const;
diff --git a/src/GEOMGUI/GEOMGUI_XmlHandler.cxx b/src/GEOMGUI/GEOMGUI_XmlHandler.cxx
deleted file mode 100644 (file)
index db66695..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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
-//
-
-// GEOM GEOMGUI : reading of xml file with list of available plugin actions
-// File   : GEOMGUI_XmlHandler.cxx
-// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
-
-#include "GEOMGUI_XmlHandler.h"
-
-#include "GEOMGUI.h"
-
-// SALOME KERNEL includes
-#include <utilities.h>
-
-/*!
- * Constructor
- */
-GEOMGUI_XmlHandler::GEOMGUI_XmlHandler()
-{
-}
-
-/*!
- * Destructor
- */
-GEOMGUI_XmlHandler::~GEOMGUI_XmlHandler()
-{
-}
-
-/*!
- * Starts parsing of document. Does some initialization
- *
- * Reimplemented from QXmlDefaultHandler.
- */
-bool GEOMGUI_XmlHandler::startDocument()
-{
-  myErrorProt = "";
-  return true;
-}
-
-/*!
- * Does different actions depending on the name of the tag and the
- * state you are in document.
- *
- * Reimplemented from QXmlDefaultHandler.
- */
-bool GEOMGUI_XmlHandler::startElement (const QString&, const QString&,
-                                       const QString& qName,
-                                       const QXmlAttributes& atts)
-{
-  if (qName == "geom-plugins") { // set of plugins
-    //myHypothesesMap.clear();
-    //myAlgorithmsMap.clear();
-  }
-  else if (qName == "geom-plugin") { // group of actions
-    myPluginData.myName      = atts.value("name");
-    myPluginData.myServerLib = atts.value("server-lib");
-    myPluginData.myClientLib = atts.value("gui-lib");
-
-    //QString aResName = atts.value("resources");
-    //if (aResName != "") {
-    //  SUIT_ResourceMgr* resMgr = GEOMGUI::resourceMgr();
-    //  QString lang = resMgr->stringValue( resMgr->langSection(), "language", "en" );
-    //  resMgr->loadTranslator( "resources", QString( "%1_msg_%2.qm" ).arg( aResName, lang ) );
-    //  resMgr->loadTranslator( "resources", QString( "%1_images.qm" ).arg( aResName, lang ) );
-    //}
-  }
-  else if (qName == "actions") { // group of actions
-  }
-  else if (qName == "action") { // an action
-    GEOMGUI_ActionData aData;
-    aData.myLabel     = atts.value("label");
-    aData.myIcon      = atts.value("icon");
-    aData.myMenu      = atts.value("menu");
-    aData.myTooltip   = atts.value("tooltip");
-    aData.myStatusBar = atts.value("status-bar");
-
-    myPluginData.myListOfActions.append(aData);
-  }
-  else {
-    // error
-    return false;
-  }
-  return true;
-}
-
-/*!
- * Reimplemented from QXmlDefaultHandler.
- */
-bool GEOMGUI_XmlHandler::endElement (const QString&, const QString&, const QString&)
-{
-  return true;
-}
-
-/*!
- * Reimplemented from QXmlDefaultHandler.
- */
-bool GEOMGUI_XmlHandler::characters (const QString& ch)
-{
-  // we are not interested in whitespaces
-  //QString ch_simplified = ch.simplified();
-  //if ( ch_simplified.isEmpty() )
-  //  return true;
-  return true;
-}
-
-/*!
- * Returns the default error string.
- *
- * Reimplemented from QXmlDefaultHandler.
- */
-QString GEOMGUI_XmlHandler::errorString()
-{
-  return "the document is not in the quote file format";
-}
-
-/*!
- * Returns the error protocol if parsing failed
- *
- * Reimplemented from QXmlDefaultHandler.
- */
-QString GEOMGUI_XmlHandler::errorProtocol()
-{
-  return myErrorProt;
-}
-
-/*!
- * Returns exception
- *
- * Reimplemented from QXmlDefaultHandler.
- */
-bool GEOMGUI_XmlHandler::fatalError (const QXmlParseException& exception)
-{
-  myErrorProt += QString("fatal parsing error: %1 in line %2, column %3\n")
-    .arg(exception.message())
-    .arg(exception.lineNumber())
-    .arg(exception.columnNumber());
-
-  return QXmlDefaultHandler::fatalError( exception );
-}
diff --git a/src/GEOMGUI/GEOMGUI_XmlHandler.h b/src/GEOMGUI/GEOMGUI_XmlHandler.h
deleted file mode 100644 (file)
index dc1b64d..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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
-//
-
-// GEOM GEOMGUI : reading of xml file with list of available plugin actions
-// File   : GEOMGUI_XmlHandler.h
-// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
-
-#ifndef GEOMGUI_XMLHANDLER_H
-#define GEOMGUI_XMLHANDLER_H
-
-// GEOM includes
-#include "GEOMGUI.h"
-
-// Qt includes
-#include <QXmlDefaultHandler>
-#include <QMap>
-#include <QList>
-
-//GUI includes
-#include <QtxMap.h>
-
-//class HypothesisData;
-//class HypothesesSet;
-
-struct GEOMGUI_ActionData
-{
-  QString myLabel; // unique ID
-  QString myIcon;
-  QString myMenu;
-  QString myTooltip;
-  QString myStatusBar;
-
-  //int     myAccel;
-  //bool    myToggle;
-  //QString myShortcut;
-};
-
-struct GEOMGUI_PluginData
-{
-  QString myName;
-  QString myServerLib;
-  QString myClientLib;
-
-  //QList<GEOMGUI_ActionData*> myListOfActions;
-  QList<GEOMGUI_ActionData> myListOfActions;
-};
-
-class GEOMGUI_EXPORT GEOMGUI_XmlHandler : public QXmlDefaultHandler
-{
-public:
-  GEOMGUI_XmlHandler();
-  virtual ~GEOMGUI_XmlHandler();
-
-  bool     startDocument();
-  bool     startElement( const QString&, const QString&, 
-                         const QString&, const QXmlAttributes& );
-  bool     endElement( const QString&, const QString&, const QString& );
-  bool     characters( const QString& ); 
-
-  QString  errorString();
-  QString  errorProtocol();
-  bool     fatalError( const QXmlParseException& );
-
-public:
-  GEOMGUI_PluginData       myPluginData;
-
-private:
-  QString                  myErrorProt;
-};
-
-#endif // GEOMGUI_XMLHANDLER_H
index 5968c06c0f5abf993e2bfdb60045a0c99dd982dd..b8551a6910b7958369fed45ae17e26ccc605bb22 100644 (file)
@@ -77,6 +77,7 @@
 
 #include <OCCViewer_ViewWindow.h>
 #include <OCCViewer_ViewPort3d.h>
+#include <OCCViewer_Utilities.h>
 
 // OCCT Includes
 #include <AIS_Drawer.hxx>
@@ -153,47 +154,6 @@ namespace
     return aMap;
   }
 
-  //===========================================================================
-  // Function : imageToPixmap
-  // Purpose  : Concert QImage to OCCT pixmap
-  //===========================================================================
-  static inline Handle(Image_PixMap) imageToPixmap( const QImage& anImage )
-  { 
-    Handle(Image_PixMap) aPixmap = new Image_PixMap();
-    if ( !anImage.isNull() ) {
-      aPixmap->InitTrash( Image_PixMap::ImgBGRA, anImage.width(), anImage.height() );
-      aPixmap->SetTopDown( Standard_True );
-      
-      const uchar* aImageBytes = anImage.bits();
-      
-      for ( int aLine = anImage.height() - 1; aLine >= 0; --aLine ) {
-#if OCC_VERSION_LARGE > 0x06070100
-       // convert pixels from ARGB to renderer-compatible RGBA
-       for ( int aByte = 0; aByte < anImage.width(); ++aByte ) {
-         Image_ColorBGRA& aPixmapBytes = aPixmap->ChangeValue<Image_ColorBGRA>(aLine, aByte);
-       
-         aPixmapBytes.b() = (Standard_Byte) *aImageBytes++;
-         aPixmapBytes.g() = (Standard_Byte) *aImageBytes++;
-         aPixmapBytes.r() = (Standard_Byte) *aImageBytes++;
-         aPixmapBytes.a() = (Standard_Byte) *aImageBytes++;
-       }
-#else
-       Image_ColorBGRA* aPixmapBytes = aPixmap->EditData<Image_ColorBGRA>().ChangeRow(aLine);
-       
-        // convert pixels from ARGB to renderer-compatible RGBA
-        for ( int aByte = 0; aByte < anImage.width(); ++aByte ) {
-         aPixmapBytes->b() = (Standard_Byte) *aImageBytes++;
-         aPixmapBytes->g() = (Standard_Byte) *aImageBytes++;
-         aPixmapBytes->r() = (Standard_Byte) *aImageBytes++;
-         aPixmapBytes->a() = (Standard_Byte) *aImageBytes++;
-         aPixmapBytes++;
-        }
-#endif
-      }
-    }
-    return aPixmap;
-  }
-  
   //===========================================================================
   // Function : getDefaultTexture
   // Purpose  : Get default texture
@@ -863,6 +823,10 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
   // set display vectors flag
   AISShape->SetDisplayVectors( propMap.value( GEOM::propertyName( GEOM::EdgesDirection ) ).toBool() );
 
+  // set display vertices flag
+  bool isVerticesMode = propMap.value( GEOM::propertyName( GEOM::Vertices ) ).toBool();
+  AISShape->SetDisplayVertices( isVerticesMode );
+
   // set transparency
   if( HasTransparency() ) {
     AISShape->SetTransparency( GetTransparency() );
@@ -939,7 +903,7 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
   AISShape->setTopLevel( propMap.value( GEOM::propertyName( GEOM::TopLevel ) ).toBool() );
 
   // set point marker (for vertex / compound of vertices only)
-  if ( onlyVertex ) {
+  if ( onlyVertex || isVerticesMode ) {
     QStringList aList = propMap.value( GEOM::propertyName( GEOM::PointMarker ) ).toString().split( GEOM::subSectionSeparator() );
     if ( aList.size() == 2 ) {
       // standard marker string contains "TypeOfMarker:ScaleOfMarker"
@@ -1111,6 +1075,9 @@ void GEOM_Displayer::updateActorProperties( GEOM_Actor* actor, bool create )
   // set display vectors flag
   actor->SetVectorMode( propMap.value( GEOM::propertyName( GEOM::EdgesDirection ) ).toBool() );
 
+  // set display vertices flag
+  actor->SetVerticesMode( propMap.value( GEOM::propertyName( GEOM::Vertices ) ).toBool() );
+
   // set display mode
   int displayMode = HasDisplayMode() ? 
     // predefined display mode, manually set to displayer via GEOM_Displayer::SetDisplayMode() function 
@@ -2463,6 +2430,9 @@ PropMap GEOM_Displayer::getDefaultPropertyMap()
   // - show edges direction flag (false by default)
   propMap.insert( GEOM::propertyName( GEOM::EdgesDirection ), false );
 
+  // - show vertices flag (false by default)
+  propMap.insert( GEOM::propertyName( GEOM::Vertices ), false );
+
   // - shading color (take default value from preferences)
   propMap.insert( GEOM::propertyName( GEOM::ShadingColor ),
                   colorFromResources( "shading_color", QColor( 255, 255, 0 ) ) );
index 467cc55de488a8b12bf93038c412367362d6be3b..115e51e67bf40a4ac764b069bc639d7aa86b34a2 100644 (file)
             <source>ICON_DLG_SCALE_ALONG_AXES</source>
             <translation>scale_along_axes.png</translation>
         </message>
-        <message>
-            <source>ICON_DLG_EXPORTXAO</source>
-            <translation>exportxao.png</translation>
-        </message>
-        <message>
-            <source>ICO_EXPORTXAO</source>
-            <translation>exportxao.png</translation>
-        </message>
-        <message>
-            <source>ICON_DLG_IMPORTXAO</source>
-            <translation>importxao.png</translation>
-        </message>
-        <message>
-            <source>ICO_IMPORTXAO</source>
-            <translation>importxao.png</translation>
-        </message>
-        <message>
-            <source>ICON_OBJBROWSER_IMPORTEXPORT_204</source>
-            <translation>tree_exportxao.png</translation>
-        </message>
        <!-- @@ insert new functions before this line @@ do not remove this line @@ -->
     </context>
 </TS>
index 04e9f9d6b3d0f216b01330e36b8353dd3f745367..89480676be4adacfa972228531fcec5c51cccff2 100644 (file)
@@ -535,6 +535,10 @@ Please, select face, shell or solid and try again</translation>
         <source>GEOM_CYLINDER_TITLE</source>
         <translation>Cylinder Construction</translation>
     </message>
+    <message>
+        <source>GEOM_CYLINDER_ANGLE_ERR</source>
+        <translation>Angle values 0 and 360 are unsafe to build proper volumes. Please uncheck the "Angle" box to use the regular cylinder constructor.</translation>
+    </message>
     <message>
         <source>GEOM_D1</source>
         <translation>D1 :</translation>
@@ -1008,14 +1012,6 @@ Please, select face, shell or solid and try again</translation>
         <source>GEOM_MEN_ENTER_ANGLE</source>
         <translation>Enter An Angle In Degrees</translation>
     </message>
-    <message>
-        <source>GEOM_MEN_EXPORT</source>
-        <translation>Export</translation>
-    </message>
-    <message>
-        <source>GEOM_MEN_IMPORT</source>
-        <translation>Import</translation>
-    </message>
     <message>
         <source>GEOM_MEN_ISOS</source>
         <translation>Select Number Of Isos</translation>
@@ -2590,7 +2586,7 @@ Please, select face, shell or solid and try again</translation>
     </message>
     <message>
         <source>MEN_EXPORT</source>
-        <translation>Export...</translation>
+        <translation>Export</translation>
     </message>
     <message>
         <source>MEN_EXTRUSION</source>
@@ -2698,7 +2694,7 @@ Please, select face, shell or solid and try again</translation>
     </message>
     <message>
         <source>MEN_IMPORT</source>
-        <translation>Import...</translation>
+        <translation>Import</translation>
     </message>
     <message>
         <source>MEN_INERTIA</source>
@@ -2896,6 +2892,10 @@ Please, select face, shell or solid and try again</translation>
         <source>MEN_POP_VECTORS</source>
         <translation>Show Edge Direction</translation>
     </message>
+    <message>
+        <source>MEN_POP_VERTICES</source>
+        <translation>Show Vertices</translation>
+    </message>
     <message>
         <source>MEN_PREFERENCES</source>
         <translation>Preferences</translation>
@@ -3068,6 +3068,14 @@ Please, select face, shell or solid and try again</translation>
         <source>MEN_VECTOR_MODE_OFF</source>
         <translation>Hide Edge Direction</translation>
     </message>
+    <message>
+        <source>MEN_VERTICES_MODE_ON</source>
+        <translation>Show Vertices</translation>
+    </message>
+    <message>
+        <source>MEN_VERTICES_MODE_OFF</source>
+        <translation>Hide Vertices</translation>
+    </message>
     <message>
         <source>MEN_WIREFRAME</source>
         <translation>Wireframe</translation>
@@ -3528,10 +3536,6 @@ Please, select face, shell or solid and try again</translation>
         <source>STB_EXPLODE_BLOCKS</source>
         <translation>Explode on Blocks</translation>
     </message>
-    <message>
-        <source>STB_EXPORT</source>
-        <translation>Export geometry to BREP file</translation>
-    </message>
     <message>
         <source>STB_EXTRUSION</source>
         <translation>Create an extrusion</translation>
@@ -3616,10 +3620,6 @@ Please, select face, shell or solid and try again</translation>
         <source>STB_HEX_SOLID</source>
         <translation>Hexahedral Solid</translation>
     </message>
-    <message>
-        <source>STB_IMPORT</source>
-        <translation>Import geometry from BREP file</translation>
-    </message>
     <message>
         <source>STB_INERTIA</source>
         <translation>Compute moments of intertia of the shape</translation>
@@ -3764,6 +3764,10 @@ Please, select face, shell or solid and try again</translation>
         <source>STB_POP_VECTORS</source>
         <translation>Show Edge Direction</translation>
     </message>
+    <message>
+        <source>STB_POP_VERTICES</source>
+        <translation>Show Vertices</translation>
+    </message>
     <message>
         <source>STB_POP_SETTEXTURE</source>
         <translation>Add a texture</translation>
@@ -3988,54 +3992,6 @@ Please, select face, shell or solid and try again</translation>
         <source>TOM_X</source>
         <translation>X</translation>
     </message>
-    <message>
-        <source>TOOL_BASIC</source>
-        <translation>Basic</translation>
-    </message>
-    <message>
-        <source>TOOL_BLOCKS</source>
-        <translation>Blocks</translation>
-    </message>
-    <message>
-        <source>TOOL_BOOLEAN</source>
-        <translation>Boolean operations</translation>
-    </message>
-    <message>
-        <source>TOOL_FEATURES</source>
-        <translation>Modification</translation>
-    </message>
-    <message>
-        <source>TOOL_GENERATION</source>
-        <translation>Generation</translation>
-    </message>
-    <message>
-        <source>TOOL_PRIMITIVES</source>
-        <translation>Primitives</translation>
-    </message>
-    <message>
-        <source>TOOL_TRANSFORMATION</source>
-        <translation>Transformation</translation>
-    </message>
-    <message>
-        <source>TOOL_BUILD</source>
-        <translation>Build</translation>
-    </message>
-    <message>
-        <source>TOOL_OPERATIONS</source>
-        <translation>Operations</translation>
-    </message>
-    <message>
-        <source>TOOL_PICTURES</source>
-        <translation>Pictures</translation>
-    </message>
-    <message>
-        <source>TOOL_ADVANCED</source>
-        <translation>Advanced</translation>
-    </message>
-    <message>
-        <source>TOOL_MEASURES</source>
-        <translation>Measures</translation>
-    </message>
     <message>
         <source>TOP_ARC</source>
         <translation>Create an arc</translation>
@@ -4180,10 +4136,6 @@ Please, select face, shell or solid and try again</translation>
         <source>TOP_EXPLODE_BLOCKS</source>
         <translation>Explode on Blocks</translation>
     </message>
-    <message>
-        <source>TOP_EXPORT</source>
-        <translation>Export geometry to BREP file</translation>
-    </message>
     <message>
         <source>TOP_EXTRUSION</source>
         <translation>Create an extrusion</translation>
@@ -4260,10 +4212,6 @@ Please, select face, shell or solid and try again</translation>
         <source>TOP_HEX_SOLID</source>
         <translation>Hexahedral Solid</translation>
     </message>
-    <message>
-        <source>TOP_IMPORT</source>
-        <translation>Import geometry from BREP file</translation>
-    </message>
     <message>
         <source>TOP_INERTIA</source>
         <translation>Moments of intertia</translation>
@@ -5123,11 +5071,6 @@ shells and solids on the other hand.</translation>
         <source>GEOM_PUBLISH_NAMED_SHAPES</source>
         <translation>Create groups for named shapes (if there are any)?</translation>
     </message>
-    <message>
-        <source>GEOM_SCALE_DIMENSIONS</source>
-        <translation>Take into account the units (%1) embedded to the file?
-Ignoring units will cause model scaling (as dimensions are supposed to be specified in meters).</translation>
-    </message>
     <message>
         <source>GEOM_PRECISION_HINT</source>
         <translation>Input value precision can be adjusted using
@@ -5158,64 +5101,67 @@ Ignoring units will cause model scaling (as dimensions are supposed to be specif
         <translation>Select image...</translation>
     </message>
     <message>
-        <source>MEN_IMPORTEXPORT</source>
-        <translation>Import / Export XAO</translation>
+        <source>CC_PNT_ITEM_X_Y</source>
+        <translation>X=%1, Y=%2</translation>
     </message>
     <message>
-        <source>TOOL_IMPORTEXPORT</source>
-        <translation>Import / Export XAO</translation>
+        <source>CC_PNT_ITEM_X_Y_Z</source>
+        <translation>X=%1, Y=%2, Z=%3</translation>
     </message>
+</context>
+<context>
+    <name>GeometryGUI</name>
     <message>
-        <source>TOP_EXPORTXAO</source>
-        <translation>Export to XAO</translation>
+        <source>TOOL_BASIC</source>
+        <translation>Basic</translation>
     </message>
     <message>
-        <source>MEN_EXPORTXAO</source>
-        <translation>Export XAO</translation>
+        <source>TOOL_BLOCKS</source>
+        <translation>Blocks</translation>
     </message>
     <message>
-        <source>STB_EXPORTXAO</source>
-        <translation>Export shape to XAO format</translation>
+        <source>TOOL_BOOLEAN</source>
+        <translation>Boolean operations</translation>
     </message>
     <message>
-        <source>TOP_IMPORTXAO</source>
-        <translation>Import from XAO</translation>
+        <source>TOOL_FEATURES</source>
+        <translation>Modification</translation>
     </message>
     <message>
-        <source>MEN_IMPORTXAO</source>
-        <translation>Import XAO</translation>
+        <source>TOOL_GENERATION</source>
+        <translation>Generation</translation>
     </message>
     <message>
-        <source>STB_IMPORTXAO</source>
-        <translation>Import shape from XAO format</translation>
+        <source>TOOL_PRIMITIVES</source>
+        <translation>Primitives</translation>
     </message>
     <message>
-        <source>GEOM_IMPORTEXPORT_204</source>
-        <translation>Export XAO</translation>
+        <source>TOOL_TRANSFORMATION</source>
+        <translation>Transformation</translation>
     </message>
     <message>
-        <source>GEOM_SELECT_IMPORT_XAO</source>
-        <translation>Import from XAO</translation>
+        <source>TOOL_BUILD</source>
+        <translation>Build</translation>
     </message>
     <message>
-        <source>GEOM_SELECT_EXPORT_XAO</source>
-        <translation>Export to XAO</translation>
+        <source>TOOL_OPERATIONS</source>
+        <translation>Operations</translation>
     </message>
     <message>
-        <source>XAO_FILES</source>
-        <translation>XAO files (*.xao)</translation>
+        <source>TOOL_PICTURES</source>
+        <translation>Pictures</translation>
     </message>
     <message>
-        <source>TOOLS_IMPORTEXPORT</source>
-        <translation>Import / Export</translation>
+        <source>TOOL_ADVANCED</source>
+        <translation>Advanced</translation>
     </message>
     <message>
-        <source>CC_PNT_ITEM_X_Y</source>
-        <translation>X=%1, Y=%2</translation>
+        <source>TOOL_MEASURES</source>
+        <translation>Measures</translation>
     </message>
     <message>
-        <source>CC_PNT_ITEM_X_Y_Z</source>
-        <translation>X=%1, Y=%2, Z=%3</translation>
+        <source>TOOL_IMPORTEXPORT</source>
+        <translation>Import / Export XAO</translation>
     </message>
 </context>
 <context>
@@ -6986,72 +6932,6 @@ Do you want to create new material?</translation>
         <translation>(No info available)</translation>
     </message>
 </context>
-<context>
-    <name>ImportExportGUI_ExportXAODlg</name>
-    <message>
-        <source>GEOM_EXPORTXAO_TITLE</source>
-        <translation>Export XAO</translation>
-    </message>
-    <message>
-        <source>GEOM_EXPORTXAO</source>
-        <translation>Export XAO</translation>
-    </message>
-    <message>
-        <source>GEOM_EXPORTXAO_EXPORTINGSHAPE</source>
-        <translation>Shape</translation>
-    </message>
-    <message>
-        <source>GEOM_EXPORTXAO_FILENAME</source>
-        <translation>File Name</translation>
-    </message>
-    <message>
-        <source>GEOM_EXPORTXAO_AUTHOR</source>
-        <translation>Author</translation>
-    </message>
-    <message>
-        <source>GEOM_EXPORTXAO_LGROUPS</source>
-        <translation>Groups</translation>
-    </message>
-    <message>
-        <source>GEOM_EXPORTXAO_LFIELDS</source>
-        <translation>Fields</translation>
-    </message>
-    <message>
-        <source>EXPORT_DLG_ACCEPT</source>
-        <translation>OK</translation>
-    </message>
-</context>
-<context>
-    <name>ImportExportGUI_ImportXAODlg</name>
-    <message>
-        <source>GEOM_IMPORTXAO_TITLE</source>
-        <translation>Import XAO</translation>
-    </message>
-    <message>
-        <source>GEOM_IMPORTXAO</source>
-        <translation>Import XAO</translation>
-    </message>
-    <message>
-        <source>GEOM_IMPORTXAO_IMPORTINGSHAPE</source>
-        <translation>Shape</translation>
-    </message>
-    <message>
-        <source>GEOM_IMPORTXAO_FILENAME</source>
-        <translation>File Name</translation>
-    </message>
-    <message>
-        <source>GEOM_IMPORTXAO_LGROUPS</source>
-        <translation>Groups</translation>
-    </message>
-    <message>
-        <source>GEOM_IMPORTXAO_LFIELDS</source>
-        <translation>Fields</translation>
-    </message>
-    <message>
-        <source>STEP</source>
-        <translation>Step</translation>
-    </message>
-</context>
 <context>
     <name>EntityGUI_IsolineDlg</name>
     <message>
index 20d5ebe4edf192e07e6e38197c2af9d8c924826e..07c02e244f0447bf8b36bd807ce435336f2c6d88 100644 (file)
@@ -547,6 +547,10 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
         <source>GEOM_CYLINDER_TITLE</source>
         <translation>Construction d&apos;un cylindre </translation>
     </message>
+    <message>
+        <source>GEOM_CYLINDER_ANGLE_ERR</source>
+        <translation>Les valeurs de l'angle 0 et 360 sont à éviter pour construire des volumes sains. Veuillez décocher la case "Angle" pour utiliser le constructeur de cylindre complet.</translation>
+    </message>
     <message>
         <source>GEOM_D1</source>
         <translation>D1 :</translation>
@@ -1020,14 +1024,6 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
         <source>GEOM_MEN_ENTER_ANGLE</source>
         <translation>Indiquez l&apos;angle en degrés</translation>
     </message>
-    <message>
-        <source>GEOM_MEN_EXPORT</source>
-        <translation>Exporter</translation>
-    </message>
-    <message>
-        <source>GEOM_MEN_IMPORT</source>
-        <translation>Importer</translation>
-    </message>
     <message>
         <source>GEOM_MEN_ISOS</source>
         <translation>Choisir le nombre d&apos;isolignes</translation>
@@ -2598,7 +2594,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
     </message>
     <message>
         <source>MEN_EXPORT</source>
-        <translation>Exporter...</translation>
+        <translation>Exporter</translation>
     </message>
     <message>
         <source>MEN_EXTRUSION</source>
@@ -2706,7 +2702,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
     </message>
     <message>
         <source>MEN_IMPORT</source>
-        <translation>Importer...</translation>
+        <translation>Importer</translation>
     </message>
     <message>
         <source>MEN_INERTIA</source>
@@ -2904,6 +2900,10 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
         <source>MEN_POP_VECTORS</source>
         <translation>Afficher l&apos;orientation des arêtes</translation>
     </message>
+    <message>
+        <source>MEN_POP_VERTICES</source>
+        <translation type="unfinished">Show Vertices</translation>
+    </message>
     <message>
         <source>MEN_PREFERENCES</source>
         <translation>Préférences</translation>
@@ -3072,6 +3072,14 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
         <source>MEN_VECTOR_MODE_OFF</source>
         <translation>Cacher l&apos;orientation de l&apos;arête</translation>
     </message>
+    <message>
+        <source>MEN_VERTICES_MODE_ON</source>
+        <translation type="unfinished">Show Vertices</translation>
+    </message>
+    <message>
+        <source>MEN_VERTICES_MODE_OFF</source>
+        <translation type="unfinished">Hide Vertices</translation>
+    </message>
     <message>
         <source>MEN_WIREFRAME</source>
         <translation>Filaire</translation>
@@ -3532,10 +3540,6 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
         <source>STB_EXPLODE_BLOCKS</source>
         <translation>Eclater en blocs</translation>
     </message>
-    <message>
-        <source>STB_EXPORT</source>
-        <translation>Exporter la géométrie au fichier BREP</translation>
-    </message>
     <message>
         <source>STB_EXTRUSION</source>
         <translation>Créer une extrusion</translation>
@@ -3620,10 +3624,6 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
         <source>STB_HEX_SOLID</source>
         <translation>Solide hexaédrique</translation>
     </message>
-    <message>
-        <source>STB_IMPORT</source>
-        <translation>Importer une géométrie d&apos;un fichier BREP</translation>
-    </message>
     <message>
         <source>STB_INERTIA</source>
         <translation>Calculer les moments d&apos;inertie de l&apos;objet</translation>
@@ -3768,6 +3768,10 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
         <source>STB_POP_VECTORS</source>
         <translation>Afficher l&apos;orientation des arêtes</translation>
     </message>
+    <message>
+        <source>STB_POP_VERTICES</source>
+        <translation type="unfinished">Show Vertices</translation>
+    </message>
     <message>
         <source>STB_POP_SETTEXTURE</source>
         <translation>Ajoute une texture</translation>
@@ -3992,54 +3996,6 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
         <source>TOM_X</source>
         <translation>X</translation>
     </message>
-    <message>
-        <source>TOOL_BASIC</source>
-        <translation>Objets de base</translation>
-    </message>
-    <message>
-        <source>TOOL_BLOCKS</source>
-        <translation>Blocs</translation>
-    </message>
-    <message>
-        <source>TOOL_BOOLEAN</source>
-        <translation>Opérations booléennes </translation>
-    </message>
-    <message>
-        <source>TOOL_FEATURES</source>
-        <translation>Modification</translation>
-    </message>
-    <message>
-        <source>TOOL_GENERATION</source>
-        <translation>Génération</translation>
-    </message>
-    <message>
-        <source>TOOL_PRIMITIVES</source>
-        <translation>Primitives</translation>
-    </message>
-    <message>
-        <source>TOOL_TRANSFORMATION</source>
-        <translation>Transformation</translation>
-    </message>
-    <message>
-        <source>TOOL_BUILD</source>
-        <translation>Construire</translation>
-    </message>
-    <message>
-        <source>TOOL_OPERATIONS</source>
-        <translation>Opérations</translation>
-    </message>
-    <message>
-        <source>TOOL_PICTURES</source>
-        <translation>Images</translation>
-    </message>
-    <message>
-        <source>TOOL_ADVANCED</source>
-        <translation>Avancé</translation>
-    </message>
-    <message>
-        <source>TOOL_MEASURES</source>
-        <translation>Informations</translation>
-    </message>
     <message>
         <source>TOP_ARC</source>
         <translation>Créer un arc</translation>
@@ -4184,10 +4140,6 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
         <source>TOP_EXPLODE_BLOCKS</source>
         <translation>Eclater en blocs</translation>
     </message>
-    <message>
-        <source>TOP_EXPORT</source>
-        <translation>Exporter une géométrie au format BREP</translation>
-    </message>
     <message>
         <source>TOP_EXTRUSION</source>
         <translation>Créer une extrusion</translation>
@@ -4264,10 +4216,6 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
         <source>TOP_HEX_SOLID</source>
         <translation>Solide hexaédrique</translation>
     </message>
-    <message>
-        <source>TOP_IMPORT</source>
-        <translation>Importer une géométrie d&apos;un fichier BREP</translation>
-    </message>
     <message>
         <source>TOP_INERTIA</source>
         <translation>Moments d&apos;inertie</translation>
@@ -5123,11 +5071,6 @@ les coques et solides d&apos;un autre.</translation>
         <source>GEOM_PUBLISH_NAMED_SHAPES</source>
         <translation>Créer des groupes pour les objets indiqués (s&apos;ils existent)?</translation>
     </message>
-    <message>
-        <source>GEOM_SCALE_DIMENSIONS</source>
-        <translation>Voulez-vous prendre les unités du fichier (%1) en considération?
-Sinon le modèle sera mis à l&apos;échelle GEOM (unités interprétées comme des mètres).</translation>
-    </message>
     <message>
         <source>GEOM_PRECISION_HINT</source>
         <translation>Il est possible d&apos;ajuster la précision de la valeur d&apos;entrée avec 
@@ -5158,64 +5101,67 @@ le paramètre &apos;%1&apos; aux préférences du module Géométrie.</translati
         <translation>Sélectionner une image...</translation>
     </message>
     <message>
-        <source>MEN_IMPORTEXPORT</source>
-        <translation>Import / Export XAO</translation>
+        <source>CC_PNT_ITEM_X_Y</source>
+        <translation>X=%1, Y=%2</translation>
     </message>
     <message>
-        <source>TOOL_IMPORTEXPORT</source>
-        <translation>Import / Export XAO</translation>
+        <source>CC_PNT_ITEM_X_Y_Z</source>
+        <translation>X=%1, Y=%2, Z=%3</translation>
     </message>
+</context>
+<context>
+    <name>GeometryGUI</name>
     <message>
-        <source>TOP_EXPORTXAO</source>
-        <translation>Export XAO</translation>
+        <source>TOOL_BASIC</source>
+        <translation>Objets de base</translation>
     </message>
     <message>
-        <source>MEN_EXPORTXAO</source>
-        <translation>Export XAO</translation>
+        <source>TOOL_BLOCKS</source>
+        <translation>Blocs</translation>
     </message>
     <message>
-        <source>STB_EXPORTXAO</source>
-        <translation>Exporter une forme au format XAO</translation>
+        <source>TOOL_BOOLEAN</source>
+        <translation>Opérations booléennes </translation>
     </message>
     <message>
-        <source>TOP_IMPORTXAO</source>
-        <translation>Import XAO</translation>
+        <source>TOOL_FEATURES</source>
+        <translation>Modification</translation>
     </message>
     <message>
-        <source>MEN_IMPORTXAO</source>
-        <translation>Import XAO</translation>
+        <source>TOOL_GENERATION</source>
+        <translation>Génération</translation>
     </message>
     <message>
-        <source>STB_IMPORTXAO</source>
-        <translation>Importer une forme au format XAO</translation>
+        <source>TOOL_PRIMITIVES</source>
+        <translation>Primitives</translation>
     </message>
     <message>
-        <source>GEOM_IMPORTEXPORT_204</source>
-        <translation>Export XAO</translation>
+        <source>TOOL_TRANSFORMATION</source>
+        <translation>Transformation</translation>
     </message>
     <message>
-        <source>GEOM_SELECT_IMPORT_XAO</source>
-        <translation>Import XAO</translation>
+        <source>TOOL_BUILD</source>
+        <translation>Construire</translation>
     </message>
     <message>
-        <source>GEOM_SELECT_EXPORT_XAO</source>
-        <translation>Export XAO</translation>
+        <source>TOOL_OPERATIONS</source>
+        <translation>Opérations</translation>
     </message>
     <message>
-        <source>XAO_FILES</source>
-        <translation>Fichiers XAO (*.xao)</translation>
+        <source>TOOL_PICTURES</source>
+        <translation>Images</translation>
     </message>
     <message>
-        <source>TOOLS_IMPORTEXPORT</source>
-        <translation>Import / Export XAO</translation>
+        <source>TOOL_ADVANCED</source>
+        <translation>Avancé</translation>
     </message>
     <message>
-        <source>CC_PNT_ITEM_X_Y</source>
-        <translation>X=%1, Y=%2</translation>
+        <source>TOOL_MEASURES</source>
+        <translation>Informations</translation>
     </message>
     <message>
-        <source>CC_PNT_ITEM_X_Y_Z</source>
-        <translation>X=%1, Y=%2, Z=%3</translation>
+        <source>TOOL_IMPORTEXPORT</source>
+        <translation>Import / Export XAO</translation>
     </message>
 </context>
 <context>
@@ -6986,72 +6932,6 @@ Voulez-vous en créer un nouveau ?</translation>
         <translation>(aucune information disponible)</translation>
     </message>
 </context>
-<context>
-    <name>ImportExportGUI_ExportXAODlg</name>
-    <message>
-        <source>GEOM_EXPORTXAO_TITLE</source>
-        <translation>Export XAO</translation>
-    </message>
-    <message>
-        <source>GEOM_EXPORTXAO</source>
-        <translation>Export XAO</translation>
-    </message>
-    <message>
-        <source>GEOM_EXPORTXAO_EXPORTINGSHAPE</source>
-        <translation>Objet</translation>
-    </message>
-    <message>
-        <source>GEOM_EXPORTXAO_FILENAME</source>
-        <translation>Fichier</translation>
-    </message>
-    <message>
-        <source>GEOM_EXPORTXAO_AUTHOR</source>
-        <translation>Auteur</translation>
-    </message>
-    <message>
-        <source>GEOM_EXPORTXAO_LGROUPS</source>
-        <translation>Groupes</translation>
-    </message>
-    <message>
-        <source>GEOM_EXPORTXAO_LFIELDS</source>
-        <translation>Champs</translation>
-    </message>
-    <message>
-        <source>EXPORT_DLG_ACCEPT</source>
-        <translation>OK</translation>
-    </message>
-</context>
-<context>
-    <name>ImportExportGUI_ImportXAODlg</name>
-    <message>
-        <source>GEOM_IMPORTXAO_TITLE</source>
-        <translation>Import XAO</translation>
-    </message>
-    <message>
-        <source>GEOM_IMPORTXAO</source>
-        <translation>Import XAO</translation>
-    </message>
-    <message>
-        <source>GEOM_IMPORTXAO_IMPORTINGSHAPE</source>
-        <translation>Objet</translation>
-    </message>
-    <message>
-        <source>GEOM_IMPORTXAO_FILENAME</source>
-        <translation>Fichier</translation>
-    </message>
-    <message>
-        <source>GEOM_IMPORTXAO_LGROUPS</source>
-        <translation>Groupes</translation>
-    </message>
-    <message>
-        <source>GEOM_IMPORTXAO_LFIELDS</source>
-        <translation>Champs</translation>
-    </message>
-    <message>
-        <source>STEP</source>
-        <translation>Pas</translation>
-    </message>
-</context>
 <context>
     <name>EntityGUI_IsolineDlg</name>
     <message>
index 2d39d9f4df73d3730c63606779249dcd32a51bcd..8d7cd8e2df49428bd40eb2fea3a1e5d1ac19f0be 100644 (file)
       <source>GEOM_MEN_ENTER_ANGLE</source>
       <translation>角度を度数で指定します</translation>
     </message>
-    <message>
-      <source>GEOM_MEN_EXPORT</source>
-      <translation>エクスポート</translation>
-    </message>
-    <message>
-      <source>GEOM_MEN_IMPORT</source>
-      <translation>インポート</translation>
-    </message>
     <message>
       <source>GEOM_MEN_ISOS</source>
       <translation>輪郭線の数を選択します。</translation>
     </message>
     <message>
       <source>GEOM_PRP_EXPORT</source>
-      <translation>ジオメトリを %1 にエクスポート...</translation>
+      <translation>ジオメトリを %1 にエクスポート</translation>
     </message>
     <message>
       <source>GEOM_PRP_LOADING</source>
     </message>
     <message>
       <source>MEN_IMPORT</source>
-      <translation>インポート...</translation>
+      <translation>インポート</translation>
     </message>
     <message>
       <source>MEN_INERTIA</source>
       <source>MEN_POP_VECTORS</source>
       <translation>ベクトル方向表示</translation>
     </message>
+    <message>
+      <source>MEN_POP_VERTICES</source>
+      <translation type="unfinished">Show Vertices</translation>
+    </message>
     <message>
       <source>MEN_PREFERENCES</source>
       <translation>設定</translation>
       <source>MEN_VECTOR_MODE_OFF</source>
       <translation>エッジの方向を非表示</translation>
     </message>
+    <message>
+      <source>MEN_VERTICES_MODE_ON</source>
+      <translation type="unfinished">Show Vertices</translation>
+    </message>
+    <message>
+      <source>MEN_VERTICES_MODE_OFF</source>
+      <translation type="unfinished">Hide Vertices</translation>
+    </message>
     <message>
       <source>MEN_WIREFRAME</source>
       <translation>ワイヤ フレーム</translation>
       <source>STB_EXPLODE_BLOCKS</source>
       <translation>ブロックで展開</translation>
     </message>
-    <message>
-      <source>STB_EXPORT</source>
-      <translation>ジオメトリをBREPファイルにエクスポート</translation>
-    </message>
     <message>
       <source>STB_EXTRUSION</source>
       <translation>押し出しを作成</translation>
       <source>STB_HEX_SOLID</source>
       <translation>Hexahedral_Solid</translation>
     </message>
-    <message>
-      <source>STB_IMPORT</source>
-      <translation>BREPファイルをジオメトリにインポート</translation>
-    </message>
     <message>
       <source>STB_INERTIA</source>
       <translation>オブジェクトの慣性モーメントを計算します。</translation>
       <source>STB_POP_VECTORS</source>
       <translation>エッジの方向を表示します。</translation>
     </message>
+    <message>
+      <source>STB_POP_VERTICES</source>
+      <translation type="unfinished">Show Vertices</translation>
+    </message>
     <message>
       <source>STB_POP_SETTEXTURE</source>
       <translation>テクスチャを追加します。</translation>
       <source>TOM_X</source>
       <translation>X</translation>
     </message>
-    <message>
-      <source>TOOL_BASIC</source>
-      <translation>基礎オブジェクト</translation>
-    </message>
-    <message>
-      <source>TOOL_BLOCKS</source>
-      <translation>ブロック分割</translation>
-    </message>
-    <message>
-      <source>TOOL_BOOLEAN</source>
-      <translation>ブーリアン操作</translation>
-    </message>
-    <message>
-      <source>TOOL_FEATURES</source>
-      <translation>フィーチャー</translation>
-    </message>
-    <message>
-      <source>TOOL_GENERATION</source>
-      <translation>押し出し/回転</translation>
-    </message>
-    <message>
-      <source>TOOL_PRIMITIVES</source>
-      <translation>基本図形</translation>
-    </message>
-    <message>
-      <source>TOOL_TRANSFORMATION</source>
-      <translation>変形/移動/回転</translation>
-    </message>
-    <message>
-      <source>TOOL_BUILD</source>
-      <translation>構築</translation>
-    </message>
-    <message>
-      <source>TOOL_OPERATIONS</source>
-      <translation>操作</translation>
-    </message>
-    <message>
-      <source>TOOL_PICTURES</source>
-      <translation>画像</translation>
-    </message>
-    <message>
-      <source>TOOL_ADVANCED</source>
-      <translation>高度なツール</translation>
-    </message>
-    <message>
-      <source>TOOL_MEASURES</source>
-      <translation>情報/測定</translation>
-    </message>
     <message>
       <source>TOP_ARC</source>
       <translation>円弧を作成</translation>
       <source>TOP_EXPLODE_BLOCKS</source>
       <translation>ブロックで展開</translation>
     </message>
-    <message>
-      <source>TOP_EXPORT</source>
-      <translation>ジオメトリをBREPファイルでエクスポート</translation>
-    </message>
     <message>
       <source>TOP_EXTRUSION</source>
       <translation>押し出しを作成</translation>
       <source>TOP_HEX_SOLID</source>
       <translation>Hexahedral_Solid</translation>
     </message>
-    <message>
-      <source>TOP_IMPORT</source>
-      <translation>BREPファイルをジオメトリにインポート</translation>
-    </message>
     <message>
       <source>TOP_INERTIA</source>
       <translation>慣性モーメント</translation>
       <source>GEOM_PUBLISH_NAMED_SHAPES</source>
       <translation>指定したオブジェクトのグループ(存在する場合)を作成しますか?</translation>
     </message>
-    <message>
-      <source>GEOM_SCALE_DIMENSIONS</source>
-      <translation>インポートしたファイルの単位をミリメートルからメートルに変換しますか?いいえを選んだ場合、メートル単位として解釈します。</translation>
-    </message>
     <message>
       <source>GEOM_PRECISION_HINT</source>
       <translation>パラメーターの入力値の精度を調整することは '%1' の好みにジオメトリ モジュールの。</translation>
       <translation>イメージの選択.</translation>
     </message>
     <message>
-      <source>MEN_IMPORTEXPORT</source>
-      <translation>インポート/エクスポート</translation>
+      <source>CC_PNT_ITEM_X_Y</source>
+      <translation>X=%1, Y=%2</translation>
     </message>
     <message>
-      <source>TOOL_IMPORTEXPORT</source>
-      <translation>インポート/エクスポート</translation>
+      <source>CC_PNT_ITEM_X_Y_Z</source>
+      <translation>X=%1, Y=%2, Z=%3</translation>
     </message>
+  </context>
+  <context>
+    <name>GeometryGUI</name>
     <message>
-      <source>TOP_EXPORTXAO</source>
-      <translation>エクスポートしました。</translation>
+      <source>TOOL_BASIC</source>
+      <translation>基礎オブジェクト</translation>
     </message>
     <message>
-      <source>MEN_EXPORTXAO</source>
-      <translation>ã\82¨ã\82¯ã\82¹ã\83\9dã\83¼ã\83\88ã\81\97ã\81¾ã\81\97ã\81\9fã\80\82</translation>
+      <source>TOOL_BLOCKS</source>
+      <translation>ã\83\96ã\83­ã\83\83ã\82¯å\88\86å\89²</translation>
     </message>
     <message>
-      <source>STB_EXPORTXAO</source>
-      <translation>ã\82½ã\83\86ã\83¼ã\81\97ã\81\9få½¢å¼\8fã\81§ã\83\95ã\82©ã\83¼ã\83 ã\82\92ã\82¨ã\82¯ã\82¹ã\83\9dã\83¼ã\83\88ã\81\97ã\81¾ã\81\99ã\80\82</translation>
+      <source>TOOL_BOOLEAN</source>
+      <translation>ã\83\96ã\83¼ã\83ªã\82¢ã\83³æ\93\8dä½\9c</translation>
     </message>
     <message>
-      <source>TOP_IMPORTXAO</source>
-      <translation>ã\82¤ã\83³ã\83\9dã\83¼ã\83\88ã\81\97ã\81¾ã\81\97ã\81\9fã\80\82</translation>
+      <source>TOOL_FEATURES</source>
+      <translation>ã\83\95ã\82£ã\83¼ã\83\81ã\83£ã\83¼</translation>
     </message>
     <message>
-      <source>MEN_IMPORTXAO</source>
-      <translation>インポートしました。</translation>
+      <source>TOOL_GENERATION</source>
+      <translation>押し出し/回転</translation>
     </message>
     <message>
-      <source>STB_IMPORTXAO</source>
-      <translation>ソテーしたフォームをインポートします。</translation>
+      <source>TOOL_PRIMITIVES</source>
+      <translation>基本図形</translation>
     </message>
     <message>
-      <source>GEOM_IMPORTEXPORT_204</source>
-      <translation>エクスポートしました。</translation>
+      <source>TOOL_TRANSFORMATION</source>
+      <translation>変形/移動/回転</translation>
     </message>
     <message>
-      <source>GEOM_SELECT_IMPORT_XAO</source>
-      <translation>XAOからインポート</translation>
+      <source>TOOL_BUILD</source>
+      <translation>構築</translation>
     </message>
     <message>
-      <source>GEOM_SELECT_EXPORT_XAO</source>
-      <translation>エクスポートしました。</translation>
+      <source>TOOL_OPERATIONS</source>
+      <translation>操作</translation>
     </message>
     <message>
-      <source>XAO_FILES</source>
-      <translation>ファイルした (*.xao)</translation>
+      <source>TOOL_PICTURES</source>
+      <translation>画像</translation>
     </message>
     <message>
-      <source>TOOLS_IMPORTEXPORT</source>
-      <translation>インポート/エクスポート</translation>
+      <source>TOOL_ADVANCED</source>
+      <translation>高度なツール</translation>
     </message>
     <message>
-      <source>CC_PNT_ITEM_X_Y</source>
-      <translation>X=%1, Y=%2</translation>
+      <source>TOOL_MEASURES</source>
+      <translation>情報/測定</translation>
     </message>
     <message>
-      <source>CC_PNT_ITEM_X_Y_Z</source>
-      <translation>X=%1, Y=%2, Z=%3</translation>
+      <source>TOOL_IMPORTEXPORT</source>
+      <translation>インポート/エクスポート</translation>
     </message>
   </context>
   <context>
       <translation>(有効情報なし)</translation>
     </message>
   </context>
-  <context>
-    <name>ImportExportGUI_ExportXAODlg</name>
-    <message>
-      <source>GEOM_EXPORTXAO_TITLE</source>
-      <translation>エクスポートしました。</translation>
-    </message>
-    <message>
-      <source>GEOM_EXPORTXAO</source>
-      <translation>エクスポートしました。</translation>
-    </message>
-    <message>
-      <source>GEOM_EXPORTXAO_EXPORTINGSHAPE</source>
-      <translation>オブジェクト</translation>
-    </message>
-    <message>
-      <source>GEOM_EXPORTXAO_FILENAME</source>
-      <translation>ファイル</translation>
-    </message>
-    <message>
-      <source>GEOM_EXPORTXAO_AUTHOR</source>
-      <translation>作成者</translation>
-    </message>
-    <message>
-      <source>GEOM_EXPORTXAO_LGROUPS</source>
-      <translation>グループ</translation>
-    </message>
-    <message>
-      <source>GEOM_EXPORTXAO_LFIELDS</source>
-      <translation>フィールド</translation>
-    </message>
-    <message>
-      <source>EXPORT_DLG_ACCEPT</source>
-      <translation>OK</translation>
-    </message>
-  </context>
-  <context>
-    <name>ImportExportGUI_ImportXAODlg</name>
-    <message>
-      <source>GEOM_IMPORTXAO_TITLE</source>
-      <translation>インポートしました。</translation>
-    </message>
-    <message>
-      <source>GEOM_IMPORTXAO</source>
-      <translation>インポートしました。</translation>
-    </message>
-    <message>
-      <source>GEOM_IMPORTXAO_IMPORTINGSHAPE</source>
-      <translation>オブジェクト</translation>
-    </message>
-    <message>
-      <source>GEOM_IMPORTXAO_FILENAME</source>
-      <translation>ファイル</translation>
-    </message>
-    <message>
-      <source>GEOM_IMPORTXAO_LGROUPS</source>
-      <translation>グループ</translation>
-    </message>
-    <message>
-      <source>GEOM_IMPORTXAO_LFIELDS</source>
-      <translation>フィールド</translation>
-    </message>
-    <message>
-      <source>STEP</source>
-      <translation>Step</translation>
-    </message>
-  </context>
   <context>
     <name>EntityGUI_IsolineDlg</name>
     <message>
index 3cfa790ea466dc49ea04cf88f103caee75098b3b..2b3b7ca836fa5a19382539d9d43d024d5f98d55a 100644 (file)
@@ -30,7 +30,6 @@
 #include "GeometryGUI.h"
 #include "GeometryGUI_Operations.h"
 #include "GEOMPluginGUI.h"
-#include "GEOMGUI_XmlHandler.h"
 #include "GEOMGUI_OCCSelector.h"
 #include "GEOMGUI_Selection.h"
 #include "GEOMGUI_CreationInfoWdg.h"
@@ -38,6 +37,7 @@
 #include "GEOM_Constants.h"
 #include "GEOM_Displayer.h"
 #include "GEOM_AISShape.hxx"
+#include "GEOMUtils_XmlHandler.hxx"
 
 #include "GEOM_Actor.h"
 
@@ -463,8 +463,6 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
   case GEOMOp::OpOriginAndVectors:   // MENU BASIC - ORIGIN AND BASE VECTORS
     createOriginAndBaseVectors(); // internal operation
     return;
-  case GEOMOp::OpImport:             // MENU FILE - IMPORT
-  case GEOMOp::OpExport:             // MENU FILE - EXPORT
   case GEOMOp::OpSelectVertex:       // POPUP MENU - SELECT ONLY - VERTEX
   case GEOMOp::OpSelectEdge:         // POPUP MENU - SELECT ONLY - EDGE
   case GEOMOp::OpSelectWire:         // POPUP MENU - SELECT ONLY - WIRE
@@ -516,11 +514,13 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
   case GEOMOp::OpHide:               // MENU VIEW - ERASE
   case GEOMOp::OpShow:               // MENU VIEW - DISPLAY
   case GEOMOp::OpSwitchVectors:      // MENU VIEW - VECTOR MODE
+  case GEOMOp::OpSwitchVertices:     // MENU VIEW - VERTICES MODE
   case GEOMOp::OpWireframe:          // POPUP MENU - WIREFRAME
   case GEOMOp::OpShading:            // POPUP MENU - SHADING
   case GEOMOp::OpShadingWithEdges:   // POPUP MENU - SHADING WITH EDGES
   case GEOMOp::OpTexture:            // POPUP MENU - TEXTURE
   case GEOMOp::OpVectors:            // POPUP MENU - VECTORS
+  case GEOMOp::OpVertices:           // POPUP MENU - VERTICES
     libName = "DisplayGUI";
     break;
   case GEOMOp::OpPoint:              // MENU BASIC - POINT
@@ -659,10 +659,6 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam )
   case GEOMOp::OpExplodeBlock:       // MENU BLOCKS - EXPLODE ON BLOCKS
     libName = "BlocksGUI";
     break;
-  case GEOMOp::OpExportXAO:          // MENU NEW ENTITY - IMPORTEXPORT - EXPORTXAO
-  case GEOMOp::OpImportXAO:          // MENU NEW ENTITY - IMPORTEXPORT - IMPORTXAO
-    libName = "ImportExportGUI";
-    break;
   //case GEOMOp::OpAdvancedNoOp:       // NO OPERATION (advanced operations base)
   //case GEOMOp::OpPipeTShape:         // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE
   //case GEOMOp::OpPipeTShapeGroups:     // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE GROUPS
@@ -895,9 +891,6 @@ void GeometryGUI::initialize( CAM_Application* app )
 
   // ----- create actions --------------
 
-  createGeomAction( GEOMOp::OpImport,     "IMPORT", "", Qt::ControlModifier + Qt::Key_I );
-  createGeomAction( GEOMOp::OpExport,     "EXPORT", "", Qt::ControlModifier + Qt::Key_E );
-
   createGeomAction( GEOMOp::OpDelete,     "DELETE", "", Qt::Key_Delete );
 
   createGeomAction( GEOMOp::OpPoint,      "POINT" );
@@ -1039,6 +1032,7 @@ void GeometryGUI::initialize( CAM_Application* app )
   createGeomAction( GEOMOp::OpHideAll,          "ERASE_ALL" );
   createGeomAction( GEOMOp::OpShow,             "DISPLAY" );
   createGeomAction( GEOMOp::OpSwitchVectors,    "VECTOR_MODE");
+  createGeomAction( GEOMOp::OpSwitchVertices,   "VERTICES_MODE");
   createGeomAction( GEOMOp::OpSelectVertex,     "VERTEX_SEL_ONLY" ,"", 0, true );
   createGeomAction( GEOMOp::OpSelectEdge,       "EDGE_SEL_ONLY", "", 0, true );
   createGeomAction( GEOMOp::OpSelectWire,       "WIRE_SEL_ONLY", "",  0, true );
@@ -1060,6 +1054,7 @@ void GeometryGUI::initialize( CAM_Application* app )
   createGeomAction( GEOMOp::OpEdgeWidth,        "EDGE_WIDTH");
   createGeomAction( GEOMOp::OpIsosWidth,        "ISOS_WIDTH");
   createGeomAction( GEOMOp::OpVectors,          "POP_VECTORS", "", 0, true );
+  createGeomAction( GEOMOp::OpVertices,         "POP_VERTICES", "", 0, true );
   createGeomAction( GEOMOp::OpDeflection,       "POP_DEFLECTION" );
   createGeomAction( GEOMOp::OpColor,            "POP_COLOR" );
   createGeomAction( GEOMOp::OpSetTexture,       "POP_SETTEXTURE" );
@@ -1095,10 +1090,6 @@ void GeometryGUI::initialize( CAM_Application* app )
   createGeomAction( GEOMOp::OpDecrNbIsos, "", "", 0, false,
                     "Geometry:Decrease number of isolines");
 
-  // Import/Export XAO
-  createGeomAction( GEOMOp::OpExportXAO, "EXPORTXAO" );
-  createGeomAction( GEOMOp::OpImportXAO, "IMPORTXAO" );
-
   //createGeomAction( GEOMOp::OpPipeTShape, "PIPETSHAPE" );
   //createGeomAction( GEOMOp::OpDividedDisk, "DIVIDEDDISK" );
   //createGeomAction( GEOMOp::OpDividedCylinder, "DIVIDEDCYLINDER" );
@@ -1108,13 +1099,6 @@ void GeometryGUI::initialize( CAM_Application* app )
   // ---- create menus --------------------------
 
   int fileId = createMenu( tr( "MEN_FILE" ), -1, -1 );
-  createMenu( separator(),      fileId, 10 );
-  createMenu( GEOMOp::OpImport, fileId, 10 );
-  createMenu( GEOMOp::OpExport, fileId, 10 );
-  int impexpId = createMenu( tr( "MEN_IMPORTEXPORT" ), fileId, -1, 10 );
-  createMenu( GEOMOp::OpExportXAO, impexpId, -1 );
-  createMenu( GEOMOp::OpImportXAO, impexpId, -1 );
-  createMenu( separator(),      fileId, -1 );
 
   int editId = createMenu( tr( "MEN_EDIT" ), -1, -1 );
   createMenu( GEOMOp::OpDelete, editId, -1 );
@@ -1313,6 +1297,7 @@ void GeometryGUI::initialize( CAM_Application* app )
   createMenu( GEOMOp::OpDMTexture,          dispmodeId, -1 );
   createMenu( separator(),                  dispmodeId, -1 );
   createMenu( GEOMOp::OpSwitchVectors,      dispmodeId, -1 );
+  createMenu( GEOMOp::OpSwitchVertices,     dispmodeId, -1 );
 
   createMenu( separator(),       viewId, -1 );
   createMenu( GEOMOp::OpShowAll, viewId, -1 );
@@ -1333,7 +1318,7 @@ void GeometryGUI::initialize( CAM_Application* app )
 
   // ---- create toolbars --------------------------
 
-  int basicTbId = createTool( tr( "TOOL_BASIC" ) );
+  int basicTbId = createTool( tr( "TOOL_BASIC" ), QString( "GEOMBasic" ) );
   createTool( GEOMOp::OpPoint,      basicTbId );
   createTool( GEOMOp::OpLine,       basicTbId );
   createTool( GEOMOp::OpCircle,     basicTbId );
@@ -1348,11 +1333,11 @@ void GeometryGUI::initialize( CAM_Application* app )
   createTool( GEOMOp::OpLCS,        basicTbId );
   createTool( GEOMOp::OpOriginAndVectors, basicTbId );
 
-//   int sketchTbId = createTool( tr( "TOOL_SKETCH" ) );
+//   int sketchTbId = createTool( tr( "TOOL_SKETCH" ), QString( "GEOMSketch" ) );
 //   createTool( GEOMOp::Op2dSketcher,  sketchTbId );
 //   createTool( GEOMOp::Op3dSketcher,  sketchTbId );
 
-  int primTbId = createTool( tr( "TOOL_PRIMITIVES" ) );
+  int primTbId = createTool( tr( "TOOL_PRIMITIVES" ), QString( "GEOMPrimitives" ) );
   createTool( GEOMOp::OpBox,        primTbId );
   createTool( GEOMOp::OpCylinder,   primTbId );
   createTool( GEOMOp::OpSphere,     primTbId );
@@ -1362,24 +1347,24 @@ void GeometryGUI::initialize( CAM_Application* app )
   createTool( GEOMOp::OpDisk,       primTbId );
   //createTool( GEOMOp::OpPipeTShape, primTbId ); //rnc
 
-  //int blocksTbId = createTool( tr( "TOOL_BLOCKS" ) );
+  //int blocksTbId = createTool( tr( "TOOL_BLOCKS" ), QString( "GEOMBlocks" ) );
   //createTool( GEOMOp::OpDividedDisk, blocksTbId );
   //createTool( GEOMOp::OpDividedCylinder, blocksTbId );
 
-  int boolTbId = createTool( tr( "TOOL_BOOLEAN" ) );
+  int boolTbId = createTool( tr( "TOOL_BOOLEAN" ), QString( "GEOMBooleanOperations" ) );
   createTool( GEOMOp::OpFuse,       boolTbId );
   createTool( GEOMOp::OpCommon,     boolTbId );
   createTool( GEOMOp::OpCut,        boolTbId );
   createTool( GEOMOp::OpSection,    boolTbId );
 
-  int genTbId = createTool( tr( "TOOL_GENERATION" ) );
+  int genTbId = createTool( tr( "TOOL_GENERATION" ), QString( "GEOMGeneration" ) );
   createTool( GEOMOp::OpPrism,      genTbId );
   createTool( GEOMOp::OpRevolution, genTbId );
   createTool( GEOMOp::OpFilling,    genTbId );
   createTool( GEOMOp::OpPipe,       genTbId );
   createTool( GEOMOp::OpPipePath,   genTbId );
 
-  int transTbId = createTool( tr( "TOOL_TRANSFORMATION" ) );
+  int transTbId = createTool( tr( "TOOL_TRANSFORMATION" ), QString( "GEOMTransformation" ) );
   createTool( GEOMOp::OpTranslate,      transTbId );
   createTool( GEOMOp::OpRotate,         transTbId );
   createTool( GEOMOp::OpChangeLoc,      transTbId );
@@ -1391,14 +1376,14 @@ void GeometryGUI::initialize( CAM_Application* app )
   createTool( GEOMOp::OpMultiTranslate, transTbId );
   createTool( GEOMOp::OpMultiRotate,    transTbId );
 
-  int operTbId = createTool( tr( "TOOL_OPERATIONS" ) );
+  int operTbId = createTool( tr( "TOOL_OPERATIONS" ), QString( "GEOMOperations" ) );
   createTool( GEOMOp::OpExplode,         operTbId );
   createTool( GEOMOp::OpPartition,       operTbId );
   createTool( GEOMOp::OpArchimede,       operTbId );
   createTool( GEOMOp::OpShapesOnShape,   operTbId );
   createTool( GEOMOp::OpSharedShapes,    operTbId );
 
-  int featTbId = createTool( tr( "TOOL_FEATURES" ) );
+  int featTbId = createTool( tr( "TOOL_FEATURES" ), QString( "GEOMModification" ) );
   createTool( GEOMOp::OpFillet1d,        featTbId );
   createTool( GEOMOp::OpFillet2d,        featTbId );
   createTool( GEOMOp::OpFillet3d,        featTbId );
@@ -1410,7 +1395,7 @@ void GeometryGUI::initialize( CAM_Application* app )
   createTool( GEOMOp::OpCurveCreator,    featTbId ); 
 #endif
 
-  int buildTbId = createTool( tr( "TOOL_BUILD" ) );
+  int buildTbId = createTool( tr( "TOOL_BUILD" ), QString( "GEOMBuild" ) );
   createTool( GEOMOp::OpEdge,     buildTbId );
   createTool( GEOMOp::OpWire,     buildTbId );
   createTool( GEOMOp::OpFace,     buildTbId );
@@ -1418,7 +1403,7 @@ void GeometryGUI::initialize( CAM_Application* app )
   createTool( GEOMOp::OpSolid,    buildTbId );
   createTool( GEOMOp::OpCompound, buildTbId );
 
-  int measureTbId = createTool( tr( "TOOL_MEASURES" ) );
+  int measureTbId = createTool( tr( "TOOL_MEASURES" ), QString( "GEOMMeasures" ) );
   createTool( GEOMOp::OpPointCoordinates, measureTbId );
   createTool( GEOMOp::OpProperties,       measureTbId );
   createTool( GEOMOp::OpCenterMass,       measureTbId );
@@ -1439,16 +1424,12 @@ void GeometryGUI::initialize( CAM_Application* app )
   createTool( GEOMOp::OpGetNonBlocks,     measureTbId );
   createTool( GEOMOp::OpCheckSelfInters,  measureTbId );
 
-  int picturesTbId = createTool( tr( "TOOL_PICTURES" ) );
+  int picturesTbId = createTool( tr( "TOOL_PICTURES" ), QString( "GEOMPictures" ) );
   createTool( GEOMOp::OpPictureImport,    picturesTbId );
 #ifdef WITH_OPENCV
   createTool( GEOMOp::OpFeatureDetect,  picturesTbId );
 #endif
 
-   int impexpTbId = createTool( tr( "TOOL_IMPORTEXPORT" ) );
-   createTool( GEOMOp::OpExportXAO, impexpTbId );
-   createTool( GEOMOp::OpImportXAO, impexpTbId );
-
   //int advancedTbId = createTool( tr( "TOOL_ADVANCED" ) );
   //createTool( GEOMOp::OpSmoothingSurface, advancedTbId );
   //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@//
@@ -1510,6 +1491,9 @@ void GeometryGUI::initialize( CAM_Application* app )
   mgr->insert( action(  GEOMOp::OpVectors ), dispmodeId, -1 ); // vectors
   mgr->setRule( action( GEOMOp::OpVectors ), clientOCCorVTK_AndSomeVisible  + " and ($component={'GEOM'})", QtxPopupMgr::VisibleRule );
   mgr->setRule( action( GEOMOp::OpVectors ), clientOCCorVTK + " and isVectorsMode", QtxPopupMgr::ToggleRule );
+  mgr->insert( action(  GEOMOp::OpVertices ), dispmodeId, -1 ); // vertices
+  mgr->setRule( action( GEOMOp::OpVertices ), clientOCCorVTK_AndSomeVisible  + " and ($component={'GEOM'})", QtxPopupMgr::VisibleRule );
+  mgr->setRule( action( GEOMOp::OpVertices ), clientOCCorVTK + " and isVerticesMode", QtxPopupMgr::ToggleRule );
   mgr->insert( separator(), -1, -1 );     // -----------
 
   mgr->insert( action(  GEOMOp::OpColor ), -1, -1 ); // color
@@ -1521,8 +1505,7 @@ void GeometryGUI::initialize( CAM_Application* app )
   mgr->insert( action(  GEOMOp::OpDeflection ), -1, -1 ); // deflection
   mgr->setRule( action( GEOMOp::OpDeflection ), clientOCCorVTK_AndSomeVisible + " and selcount>0 and isVisible" + " and ($component={'GEOM'})", QtxPopupMgr::VisibleRule );
   mgr->insert( action(  GEOMOp::OpPointMarker ), -1, -1 ); // point marker
-  //mgr->setRule( action( GEOMOp::OpPointMarker ), QString( "selcount>0 and $typeid in {%1}" ).arg(GEOM_POINT ), QtxPopupMgr::VisibleRule );
-  mgr->setRule( action( GEOMOp::OpPointMarker ), QString( "selcount>0 and ( $typeid in {%1} or compoundOfVertices=true ) " ).arg(GEOM::VERTEX).arg(GEOM::COMPOUND), QtxPopupMgr::VisibleRule );
+  mgr->setRule( action( GEOMOp::OpPointMarker ), clientOCCorOB + " and $type in {'Shape' 'Group' 'Field' 'FieldStep'} and selcount>0 and isOCC=true", QtxPopupMgr::VisibleRule );
 
   // material properties
   mgr->insert( action(  GEOMOp::OpMaterialProperties ), -1, -1 );
@@ -1650,131 +1633,77 @@ void GeometryGUI::addPluginActions()
   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
   if (!resMgr) return;
 
-  // Find names of a resource XML files ("GEOMActions.xml" and others);
-  QString PluginsXml;
-  char* cenv = getenv("GEOM_PluginsList");
-  if (cenv)
-    PluginsXml.sprintf("%s", cenv);
-
-  QStringList PluginsXmlList = PluginsXml.split(":", QString::SkipEmptyParts);
-  if (PluginsXmlList.count() == 0) return;
-
-  // get full names of xml files from PluginsXmlList
-  QStringList xmlFiles;
-  xmlFiles.append(QDir::home().filePath("CustomGeomPlugins.xml")); // may be inexistent
-  for (int i = 0; i < PluginsXmlList.count(); i++) {
-    PluginsXml = PluginsXmlList[ i ];
-
-    // Find full path to the resource XML file
-    QString xmlFile = resMgr->path("resources", "GEOM", PluginsXml + ".xml");
-    if ( xmlFile.isEmpty() ) // try PLUGIN resources
-      xmlFile = resMgr->path("resources", PluginsXml, PluginsXml + ".xml");
-    if ( !xmlFile.isEmpty() )
-      xmlFiles.append( xmlFile );
-  }
-
-  // create "Advanced Operations" menu and corresponding toolbar
-  //int advancedMenuId = createMenu(tr("MEN_ADVANCED"), -1, -1, 10);
-  //int advancedTbarId = createTool(tr("TOOL_ADVANCED"));
-  int id = GEOMOp::OpLastOperationID; // TODO?
+  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( application()->activeStudy() );
+  if (!appStudy) return;
 
-  // loop on xmlFiles
-  QString aNoAccessFiles;
-  for (int i = 0; i < xmlFiles.count(); i++) {
-    QString xmlFile = xmlFiles[ i ];
-
-    QFile file (xmlFile);
-    if (file.exists() && file.open(QIODevice::ReadOnly)) {
-      file.close();
-
-      GEOMGUI_XmlHandler* aXmlHandler = new GEOMGUI_XmlHandler();
-      ASSERT(aXmlHandler);
-
-      QXmlInputSource source (&file);
-      QXmlSimpleReader reader;
-      reader.setContentHandler(aXmlHandler);
-      reader.setErrorHandler(aXmlHandler);
-      bool ok = reader.parse(source);
-      file.close();
-
-      if (ok) {
-        // bind action lib and label to its ID for activateOperation() method proper work
-        myPluginLibs[aXmlHandler->myPluginData.myName] = aXmlHandler->myPluginData.myClientLib;
-
-        QListIterator<GEOMGUI_ActionData> anActionsIter (aXmlHandler->myPluginData.myListOfActions);
-        while (anActionsIter.hasNext()) {
-          GEOMGUI_ActionData anActionData = anActionsIter.next();
-
-          //QPixmap icon = resMgr->loadPixmap("GEOM", tr(anActionData.myIcon.toLatin1().constData()));
-          QPixmap icon = resMgr->loadPixmap(aXmlHandler->myPluginData.myName,
-                                            anActionData.myIcon.toLatin1().constData());
-
-          // path to action in menu
-          QStringList smenus = anActionData.myMenu.split( "/" );
-          QString actionName = smenus.last();
-          actionName = actionName.toUpper().prepend("MEN_");
-          smenus.removeLast();
-
-          // path to action in toolbar
-          QStringList stools = anActionData.myTooltip.split( "/" );
-          QString actionTool = stools.last();
-          actionTool = actionTool.toUpper().prepend("TOP_");
-          stools.removeLast();
-
-          QString actionStat = anActionData.myStatusBar;
-          actionStat = actionStat.toUpper().prepend("STB_");
-
-          createAction(id, // ~ anActionData.myLabel
-                       tr(actionTool.toLatin1().constData()),
-                       icon,
-                       tr(actionName.toLatin1().constData()),
-                       tr(actionStat.toLatin1().constData()),
-                       0 /*accel*/,
-                       application()->desktop(),
-                       false /*toggle*/,
-                       this, SLOT(OnGUIEvent()),
-                       QString() /*shortcutAction*/);
-
-          int menuId = -1;
-          foreach (QString subMenu, smenus) {
-            subMenu = subMenu.toUpper().prepend("MEN_");
-            menuId = createMenu(tr(subMenu.toLatin1().constData()), menuId, -1);
-          }
-          //createMenu(id, pluginMenuId, -1);
-          createMenu(id, menuId, -1);
+  // Find names of a resource XML files ("AdvancedGEOM.xml" and others);
 
-          QString subTool = stools[0];
-          subTool = subTool.toUpper().prepend("TOOL_");
-          int toolId = createTool(tr(subTool.toLatin1().constData()));
-          //createTool(id, advancedTbarId);
-          createTool(id, toolId);
+  GEOMUtils::PluginInfo plugins = GEOMUtils::ReadPluginInfo();
 
-          // add action id to map
-          PluginAction anAction (aXmlHandler->myPluginData.myClientLib, anActionData.myLabel);
-          myPluginActions[id] = anAction;
+  int id = GEOMOp::OpLastOperationID; // TODO?
 
-          id++;
-        }
+  // loop on plugins
+  GEOMUtils::PluginInfo::const_iterator it;
+  for ( it = plugins.begin(); it != plugins.end(); ++it ) {
+    // bind action lib and label to its ID for activateOperation() method proper work
+    GEOMUtils::PluginData pdata = (*it);
+    myPluginLibs[pdata.name.c_str()] = pdata.clientLib.c_str();
+    std::list<GEOMUtils::ActionData> actions = (*it).actions;
+    std::list<GEOMUtils::ActionData>::const_iterator ait;
+    for ( ait = actions.begin(); ait != actions.end(); ++ait ) {
+      GEOMUtils::ActionData adata = (*ait);
+      // icon
+      QPixmap icon;
+      if ( !adata.icon.empty() )
+       icon = resMgr->loadPixmap( pdata.name.c_str(), adata.icon.c_str() );
+      // menu text (path)
+      QStringList smenus = QString( adata.menuText.c_str() ).split( "/" );
+      QString actionName = smenus.last();
+      actionName = actionName.toUpper().prepend( "MEN_" );
+      smenus.removeLast();
+
+      // path to action in toolbar
+      QStringList stools = QString( adata.toolTip.c_str() ).split( "/" );
+      QString actionTool = stools.last();
+      actionTool = actionTool.toUpper().prepend( "TOP_" );
+      stools.removeLast();
+      
+      QString actionStat = adata.statusText.c_str();
+      actionStat = actionStat.toUpper().prepend( "STB_" );
+
+      createAction( id, // ~ adata.label
+                   tr( actionTool.toLatin1().constData() ),
+                   icon,
+                   tr( actionName.toLatin1().constData() ),
+                   tr( actionStat.toLatin1().constData() ),
+                   QKeySequence( tr( adata.accel.c_str() ) ),
+                   application()->desktop(),
+                   false /*toggle*/,
+                   this, SLOT( OnGUIEvent() ),
+                   QString() /*shortcutAction*/ );
+      
+      int menuId = -1;
+      foreach ( QString subMenu, smenus ) {
+       QStringList subMenuList = subMenu.split( ":" );
+       QString subMenuName = subMenuList[0].toUpper().prepend( "MEN_" );
+       int subMenuGroup = subMenuList.size() > 1 ? subMenuList[1].toInt() : -1;
+       menuId = createMenu( tr( subMenuName.toLatin1().constData() ), menuId, -1, subMenuGroup );
       }
-      else {
-        SUIT_MessageBox::critical(application()->desktop(),
-                                  tr("INF_PARSE_ERROR"),
-                                  tr(aXmlHandler->errorProtocol().toLatin1().data()));
+      createMenu( id, menuId, -1 );
+      
+      if ( !stools.isEmpty() ) {
+       QString subTool = stools[0];
+       subTool = subTool.toUpper().prepend( "TOOL_" );
+       int toolId = createTool( tr( subTool.toLatin1().constData() ) );
+       createTool(id, toolId);
       }
-      delete aXmlHandler;
-    }
-    else if ( i > 0 ) { // 1st is ~/CustomGeomPlugins.xml
-      if (aNoAccessFiles.isEmpty())
-        aNoAccessFiles = xmlFile;
-      else
-        aNoAccessFiles += ", " + xmlFile;
-    }
-  } // end loop on xmlFiles
 
-  if (!aNoAccessFiles.isEmpty()) {
-    QString aMess = QObject::tr("PLUGIN_FILE_CANT_OPEN") + " " + aNoAccessFiles + "\n";
-    aMess += QObject::tr("PLUGIN_FILE_CHECK_VARIABLE");
-    SUIT_MessageBox::warning(application()->desktop(), tr("GEOM_WRN_WARNING"), aMess);
+      // add action id to map
+      PluginAction anAction( pdata.clientLib.c_str(), adata.label.c_str() );
+      myPluginActions[id] = anAction;
+      
+      id++;
+    }
   }
 }
 
@@ -1815,8 +1744,6 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
           this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) );
 
   // Reset actions accelerator keys
-  action(GEOMOp::OpImport)->setEnabled( true ); // Import: CTRL + Key_I
-  action(GEOMOp::OpExport)->setEnabled( true ); // Export: CTRL + Key_E
   action(GEOMOp::OpDelete)->setEnabled( true ); // Delete: Key_Delete
 
   GUIMap::Iterator it;
@@ -1905,8 +1832,6 @@ bool GeometryGUI::deactivateModule( SUIT_Study* study )
     it.value()->deactivate();
 
   // Unset actions accelerator keys
-  action(GEOMOp::OpImport)->setEnabled( false ); // Import: CTRL + Key_I
-  action(GEOMOp::OpExport)->setEnabled( false ); // Export: CTRL + Key_E
   action(GEOMOp::OpDelete)->setEnabled( false ); // Delete: Key_Delete
 
   qDeleteAll(myOCCSelectors);
@@ -2082,15 +2007,22 @@ void GeometryGUI::updateCreationInfo()
         SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
         QString name = info->operationName.in();
         if ( !name.isEmpty() ) {
-          icon = resMgr->loadPixmap( "GEOM", tr( ("ICO_"+name).toLatin1().constData() ), false );
+         
+         QString plugin_name;
+          for ( size_t i = 0; i < info->params.length(); ++i ) {
+            myCreationInfoWdg->addParam( info->params[i].name.in(),
+                                         info->params[i].value.in() );
+            QString value = info->params[i].name.in();
+           if( value == PLUGIN_NAME ) {
+             plugin_name = info->params[i].value.in();
+           }
+         }
+         QString prefix = plugin_name.isEmpty() ? "GEOM" : plugin_name;
+          icon = resMgr->loadPixmap( prefix, tr( ("ICO_"+name).toLatin1().constData() ), false );
           operationName = tr( ("MEN_"+name).toLatin1().constData() );
           if ( operationName.startsWith( "MEN_" ))
             operationName = name; // no translation
           myCreationInfoWdg->setOperation( icon, operationName );
-
-          for ( size_t i = 0; i < info->params.length(); ++i )
-            myCreationInfoWdg->addParam( info->params[i].name.in(),
-                                         info->params[i].value.in() );
         }
       }
     }
@@ -2866,6 +2798,11 @@ void GeometryGUI::storeVisualParameters (int savePoint)
           ip->setParameter(entry, param.toStdString(), aProps.value(GEOM::propertyName( GEOM::EdgesDirection )).toString().toStdString());
         }
 
+        if (aProps.contains(GEOM::propertyName( GEOM::Vertices ))) {
+          param = occParam + GEOM::propertyName( GEOM::Vertices );
+          ip->setParameter(entry, param.toStdString(), aProps.value(GEOM::propertyName( GEOM::Vertices )).toString().toStdString());
+        }
+
         if (aProps.contains(GEOM::propertyName( GEOM::Deflection ))) {
           param = occParam + GEOM::propertyName( GEOM::Deflection );
           ip->setParameter(entry, param.toStdString(), aProps.value(GEOM::propertyName( GEOM::Deflection )).toString().toStdString());
@@ -3036,6 +2973,8 @@ void GeometryGUI::restoreVisualParameters (int savePoint)
         aListOfMap[viewIndex].insert( GEOM::propertyName( GEOM::Texture ), val );
       } else if (paramNameStr == GEOM::propertyName( GEOM::EdgesDirection )) {
         aListOfMap[viewIndex].insert( GEOM::propertyName( GEOM::EdgesDirection ), val == "true" || val == "1");
+      } else if (paramNameStr == GEOM::propertyName( GEOM::Vertices )) {
+        aListOfMap[viewIndex].insert( GEOM::propertyName( GEOM::Vertices ), val == "true" || val == "1");
       } else if (paramNameStr == GEOM::propertyName( GEOM::Deflection )) {
         aListOfMap[viewIndex].insert( GEOM::propertyName( GEOM::Deflection ), val.toDouble());
       } else if (paramNameStr == GEOM::propertyName( GEOM::PointMarker )) {
@@ -3089,13 +3028,19 @@ void GeometryGUI::onViewAboutToShow()
 {
   SUIT_ViewWindow* window = application()->desktop()->activeWindow();
   QAction* a = action( GEOMOp::OpSwitchVectors );
+  QAction* aVerticesAction = action( GEOMOp::OpSwitchVertices );
   if ( window ) {
     a->setEnabled(true);
     bool vmode = window->property("VectorsMode").toBool();
     a->setText ( vmode == 1 ? tr( "MEN_VECTOR_MODE_OFF" ) : tr("MEN_VECTOR_MODE_ON") );
+    aVerticesAction->setEnabled(true);
+    vmode = window->property("VerticesMode").toBool();
+    aVerticesAction->setText ( vmode == 1 ? tr( "MEN_VERTICES_MODE_OFF" ) : tr("MEN_VERTICES_MODE_ON") );
   } else {
     a->setText ( tr("MEN_VECTOR_MODE_ON") );
     a->setEnabled(false);
+    aVerticesAction->setText ( tr("MEN_VERTICES_MODE_ON") );
+    aVerticesAction->setEnabled(false);
   }
 }
 
index 5a33af0dce9a1b41aae1edd607c0b883cab09878..f392e4df669595e11429f838113352c57e549a50 100644 (file)
@@ -25,8 +25,6 @@
 namespace GEOMOp {
   enum {
     // ToolsGUI --------------------//--------------------------------
-    OpImport              = 1000,   // MENU FILE  - IMPORT
-    OpExport              = 1001,   // MENU FILE  - EXPORT
     OpDelete              = 1020,   // MENU EDIT  - DELETE
     OpCheckGeom           = 1030,   // MENU TOOLS - CHECK GEOMETRY
     OpMaterialsLibrary    = 1040,   // MENU TOOLS - MATERIALS LIBRARY
@@ -71,6 +69,7 @@ namespace GEOMOp {
     OpDMShading           = 2011,   // MENU VIEW  - DISPLAY MODE - SHADING
     OpDMShadingWithEdges  = 2012,   // MENU VIEW  - DISPLAY MODE - SHADING WITH EDGES
     OpDMTexture           = 2013,   // MENU VIEW  - DISPLAY MODE - TEXTURE
+    OpSwitchVertices      = 2014,   // MENU VIEW  - DISPLAY MODE - SHOW/HIDE VERTICES
     OpShow                = 2100,   // POPUP MENU - SHOW
     OpShowOnly            = 2101,   // POPUP MENU - SHOW ONLY
     OpHide                = 2102,   // POPUP MENU - HIDE
@@ -82,6 +81,7 @@ namespace GEOMOp {
     OpTexture             = 2204,   // POPUP MENU - DISPLAY MODE - TEXTURE
     OpBringToFront        = 2205,   // POPUP MENU - BRING TO FRONT
     OpClsBringToFront     = 2206,
+    OpVertices            = 2208,   // POPUP MENU - DISPLAY MODE - SHOW VERTICES
     // BasicGUI --------------------//--------------------------------
     OpPoint               = 3000,   // MENU NEW ENTITY - BASIC - POINT
     OpLine                = 3001,   // MENU NEW ENTITY - BASIC - LINE
@@ -207,9 +207,6 @@ namespace GEOMOp {
     OpQuadFace            = 6102,   // MENU BLOCKS - QUADRANGLE FACE
     OpPropagate           = 6103,   // MENU BLOCKS - PROPAGATE
     OpExplodeBlock        = 6104,   // MENU BLOCKS - EXPLODE ON BLOCKS
-    // ImportExport ----------------//--------------------------------
-    OpExportXAO           = 6200,   // MENU NEW ENTITY - IMPORTEXPORT - EXPORTXAO
-    OpImportXAO           = 6201,   // MENU NEW ENTITY - IMPORTEXPORT - IMPORTXAO
     // AdvancedGUI -----------------//--------------------------------
     OpAdvancedNoOp        = 10000,  // NO OPERATION (advanced operations base)
     //OpPipeTShape          = 10001,  // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE
index 854c547558ed05a09507acfdfbb81c2e59178154..0fb1459313a5cae281c4f04e8daa3340fe39603a 100755 (executable)
@@ -65,9 +65,11 @@ SET(GEOMImpl_HEADERS
   GEOMImpl_ICurvesOperations.hxx
   GEOMImpl_ILocalOperations.hxx
   GEOMImpl_IInsertOperations.hxx
+  GEOMImpl_IECallBack.hxx
   GEOMImpl_IMeasureOperations.hxx
   GEOMImpl_IGroupOperations.hxx
   GEOMImpl_IFieldOperations.hxx
+  GEOMImpl_IBaseIEOperations.hxx
   GEOMImpl_IGlue.hxx
   GEOMImpl_PointDriver.hxx
   GEOMImpl_IPoint.hxx
@@ -171,8 +173,6 @@ SET(GEOMImpl_HEADERS
   GEOMImpl_GlueDriver.hxx
   GEOMImpl_Types.hxx
   GEOM_GEOMImpl.hxx
-  GEOMImpl_IImportExportXAO.hxx
-  GEOMImpl_XAODriver.hxx
   )
 # --- sources ---
 
@@ -187,9 +187,11 @@ SET(GEOMImpl_SOURCES
   GEOMImpl_ICurvesOperations.cxx
   GEOMImpl_ILocalOperations.cxx
   GEOMImpl_IInsertOperations.cxx
+  GEOMImpl_IECallBack.cxx
   GEOMImpl_IMeasureOperations.cxx
   GEOMImpl_IGroupOperations.cxx
   GEOMImpl_IFieldOperations.cxx
+  GEOMImpl_IBaseIEOperations.cxx
   GEOMImpl_Gen.cxx
   GEOMImpl_PointDriver.cxx
   GEOMImpl_VectorDriver.cxx
@@ -241,7 +243,6 @@ SET(GEOMImpl_SOURCES
   GEOMImpl_FillingDriver.cxx
   GEOMImpl_GlueDriver.cxx
   GEOMImpl_FieldDriver.cxx
-  GEOMImpl_XAODriver.cxx
   )
 
 # --- rules ---
index 9f2d816ab533661ff8a216cc9747c9a22de16e0f..3c91625b3440790a4358348d62a19c79447fafae 100644 (file)
@@ -76,11 +76,11 @@ Standard_Integer GEOMImpl_CylinderDriver::Execute(TFunction_Logbook& log) const
   gp_Pnt aP;
   gp_Vec aV;
 
-  if (aType == CYLINDER_R_H) {
+  if (aType == CYLINDER_R_H || aType == CYLINDER_R_H_A) {
     aP = gp::Origin();
     aV = gp::DZ();
   }
-  else if (aType == CYLINDER_PNT_VEC_R_H) {
+  else if (aType == CYLINDER_PNT_VEC_R_H || aType == CYLINDER_PNT_VEC_R_H_A) {
     Handle(GEOM_Function) aRefPoint  = aCI.GetPoint();
     Handle(GEOM_Function) aRefVector = aCI.GetVector();
     TopoDS_Shape aShapePnt = aRefPoint->GetValue();
@@ -110,19 +110,39 @@ Standard_Integer GEOMImpl_CylinderDriver::Execute(TFunction_Logbook& log) const
   if (aCI.GetH() < 0.0) aV.Reverse();
   gp_Ax2 anAxes (aP, aV);
 
-  BRepPrimAPI_MakeCylinder MC (anAxes, aCI.GetR(), Abs(aCI.GetH()));
-  MC.Build();
-  if (!MC.IsDone()) {
-    StdFail_NotDone::Raise("Cylinder can't be computed from the given parameters");
+  TopoDS_Shape aShape;
+  
+  switch (aType) {
+  case CYLINDER_R_H:
+  case CYLINDER_PNT_VEC_R_H:
+    {
+      BRepPrimAPI_MakeCylinder MC (anAxes, aCI.GetR(), Abs(aCI.GetH()));
+      MC.Build();
+      if (!MC.IsDone()) {
+       StdFail_NotDone::Raise("Cylinder can't be computed from the given parameters");
+      }
+      aShape = MC.Shape();
+      break;
+    }
+  case CYLINDER_R_H_A:
+  case CYLINDER_PNT_VEC_R_H_A:
+    {
+      BRepPrimAPI_MakeCylinder MC (anAxes, aCI.GetR(), Abs(aCI.GetH()), aCI.GetA());
+      MC.Build();
+      if (!MC.IsDone()) {
+       StdFail_NotDone::Raise("Cylinder can't be computed from the given parameters. Failure.");
+      }
+      aShape = MC.Shape();
+      break;
+    }
+  default:
+    break;
   }
-
-  TopoDS_Shape aShape = MC.Shape();
+  
   if (aShape.IsNull()) return 0;
-
   aFunction->SetValue(aShape);
 
   log.SetTouched(Label());
-
   return 1;
 }
 
index 84ad697e440066b707bba73ced46fe2fa9a69532..8e177e9a686f6d175b15b12bab1e802ec0f8d31c 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-#include <Standard_Stream.hxx>
+// internal includes
+#include "GEOMImpl_ExportDriver.hxx"
+#include "GEOMImpl_IImportExport.hxx"
+#include "GEOMImpl_IECallBack.hxx"
+#include "GEOMImpl_Types.hxx"
 
-#include <GEOMImpl_ExportDriver.hxx>
-#include <GEOMImpl_IImportExport.hxx>
-#include <GEOMImpl_Types.hxx>
+// GEOM includes
 #include <GEOM_Function.hxx>
 
+// OCC includes
+#include <Standard_Stream.hxx>
 #include <TopoDS_Shape.hxx>
-#include <TCollection_AsciiString.hxx>
-
-#include <Standard_Failure.hxx>
-
-#ifdef WIN32
-#include <windows.h>
-#else
-#include <dlfcn.h>
-#endif
-
-#ifdef WIN32
-#define LibHandle HMODULE
-#define LoadLib( name ) LoadLibrary( name )
-#define GetProc GetProcAddress
-#define UnLoadLib( handle ) FreeLibrary( handle );
-#else
-#define LibHandle void*
-#define LoadLib( name ) dlopen( name, RTLD_LAZY )
-#define GetProc dlsym
-#define UnLoadLib( handle ) dlclose( handle );
-#endif
-
-typedef int (*funcPoint)(const TopoDS_Shape&,
-                         const TCollection_AsciiString&,
-                         const TCollection_AsciiString&);
+
 
 //=======================================================================
 //function : GetID
@@ -93,6 +73,11 @@ Standard_Integer GEOMImpl_ExportDriver::Execute(TFunction_Logbook& log) const
   // !!! set the result of function to be used by next operations
   aFunction->SetValue(aShape);
 
+  TDF_Label aLabel = aRefFunction->GetOwnerEntry();
+  if (aLabel.IsRoot()) return 0;
+  Handle(GEOM_Object) obj = GEOM_Object::GetObject( aLabel );
+  if ( obj.IsNull() ) return 0;
+
   // retrieve the file and format names
   TCollection_AsciiString aFileName   = aCI.GetFileName();
   TCollection_AsciiString aFormatName = aCI.GetFormatName();
@@ -100,30 +85,12 @@ Standard_Integer GEOMImpl_ExportDriver::Execute(TFunction_Logbook& log) const
   if (aFileName.IsEmpty() || aFormatName.IsEmpty() || aLibName.IsEmpty())
     return 0;
 
-  // load plugin library
-  LibHandle anExportLib = LoadLib( aLibName.ToCString() ); //This is workaround of BUG OCC13051
-  funcPoint fp = 0;
-  if ( anExportLib )
-    fp = (funcPoint)GetProc( anExportLib, "Export" );
-
-  if ( !fp ) {
-    TCollection_AsciiString aMsg = aFormatName;
-    aMsg += " plugin was not installed";
-    Standard_Failure::Raise(aMsg.ToCString());
-  }
-
-  // perform the export
-  int res = fp( aShape, aFileName, aFormatName );
-
-  // unload plugin library
-  // commented by enk:
-  // the bug was occured: using ACIS Import/Export plugin
-  // UnLoadLib( anExportLib );
+  if( !GEOMImpl_IECallBack::GetCallBack( aFormatName )->Export( GetDocID(), obj, aFileName, aFormatName ) );
+    return 0;
 
-  if ( res )
-    log.SetTouched(Label()); 
+  log.SetTouched(Label());
 
-  return res;
+  return 1;
 }
 
 //================================================================================
index d14f51be299137cf952a62146606deb704e6d903..62933b053d1be48a864ac90cd59c93e68e4951ef 100644 (file)
 #ifndef _GEOMImpl_ExportDriver_HeaderFile
 #define _GEOMImpl_ExportDriver_HeaderFile
 
-#ifndef _TColStd_SequenceOfExtendedString_HeaderFile
-#include <TColStd_SequenceOfExtendedString.hxx>
-#endif
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
 #ifndef _Standard_GUID_HeaderFile
 #include <Standard_GUID.hxx>
 #endif 
index ae1418e2744148d179608ff3d7effdace1a75b1c..081bf21255d9beff033d080d1dcee6b5f2bc0e74 100644 (file)
@@ -83,7 +83,6 @@
 #include <GEOMImpl_GlueDriver.hxx>
 #include <GEOMImpl_MeasureDriver.hxx>
 #include <GEOMImpl_FieldDriver.hxx>
-#include <GEOMImpl_XAODriver.hxx>
 
 //=============================================================================
 /*!
@@ -168,9 +167,6 @@ GEOMImpl_Gen::GEOMImpl_Gen()
    // Field
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_FieldDriver::GetID(), new GEOMImpl_FieldDriver());
 
-   // XAO operations
-   TFunction_DriverTable::Get()->AddDriver(GEOMImpl_XAODriver::GetID(), new GEOMImpl_XAODriver());
-
    /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
 
    SetEngine(this);
index a1e3ca5c8b19f9875c46fbd5b09e0c88ea584d2a..27c366d8e01dbff2140a0177ecf9409613845c3a 100644 (file)
@@ -515,6 +515,52 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderRH (double theR, dou
   return aCylinder;
 }
 
+//=============================================================================
+/*!
+ *  MakeCylinderRHA
+ */
+//=============================================================================
+Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderRHA (double theR, double theH, double theA)
+{
+  SetErrorCode(KO);
+
+  //Add a new Cylinder object
+  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
+
+  //Add a new Cylinder function with R and H parameters
+  Handle(GEOM_Function) aFunction = aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_R_H_A);
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != GEOMImpl_CylinderDriver::GetID()) return NULL;
+
+  GEOMImpl_ICylinder aCI (aFunction);
+
+  aCI.SetR(theR);
+  aCI.SetH(theH);
+  aCI.SetA(theA);
+
+  //Compute the Cylinder value
+  try {
+    OCC_CATCH_SIGNALS;
+    if (!GetSolver()->ComputeFunction(aFunction)) {
+      SetErrorCode("Cylinder driver failed");
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  //Make a Python command
+  GEOM::TPythonDump(aFunction) << aCylinder
+    << " = geompy.MakeCylinderRHA(" << theR << ", " << theH << ", " << theA*180./M_PI << "*math.pi/180.)";
+
+  SetErrorCode(OK);
+  return aCylinder;
+}
 
 //=============================================================================
 /*!
@@ -574,6 +620,65 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderPntVecRH (Handle(GEO
   return aCylinder;
 }
 
+//=============================================================================
+/*!
+ *  MakeCylinderPntVecRHA
+ */
+//=============================================================================
+Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderPntVecRHA (Handle(GEOM_Object) thePnt,
+                                                                      Handle(GEOM_Object) theVec,
+                                                                      double theR, double theH, double theA)
+{
+  SetErrorCode(KO);
+
+  if (thePnt.IsNull() || theVec.IsNull()) return NULL;
+
+  //Add a new Cylinder object
+  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
+
+  //Add a new Cylinder function for creation a cylinder relatively to point and vector
+  Handle(GEOM_Function) aFunction =
+    aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_PNT_VEC_R_H_A);
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != GEOMImpl_CylinderDriver::GetID()) return NULL;
+
+  GEOMImpl_ICylinder aCI (aFunction);
+
+  Handle(GEOM_Function) aRefPnt = thePnt->GetLastFunction();
+  Handle(GEOM_Function) aRefVec = theVec->GetLastFunction();
+
+  if (aRefPnt.IsNull() || aRefVec.IsNull()) return NULL;
+
+  aCI.SetPoint(aRefPnt);
+  aCI.SetVector(aRefVec);
+  aCI.SetR(theR);
+  aCI.SetH(theH);
+  aCI.SetA(theA);
+
+  //Compute the Cylinder value
+  try {
+    OCC_CATCH_SIGNALS;
+    if (!GetSolver()->ComputeFunction(aFunction)) {
+      SetErrorCode("Cylinder driver failed");
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  //Make a Python command
+  GEOM::TPythonDump(aFunction) << aCylinder << " = geompy.MakeCylinderA("
+    << thePnt << ", " << theVec << ", " << theR << ", " << theH << ", " << theA*180./M_PI << "*math.pi/180.)";
+
+  SetErrorCode(OK);
+  return aCylinder;
+}
+
 
 //=============================================================================
 /*!
index 36d0ac6b21121b969fd5d2f3cfab00aa7f644317..de227452e41f7cfe88d56403c14b66fa9f5f1a58 100644 (file)
@@ -50,13 +50,17 @@ class GEOMImpl_I3DPrimOperations : public GEOM_IOperations {
   Standard_EXPORT Handle(GEOM_Object) MakeDiskR (double theR, int theOrientation);
   Standard_EXPORT Handle(GEOM_Object) MakeCylinderRH       (double theR, double theH);
   Standard_EXPORT Handle(GEOM_Object) MakeCylinderPntVecRH (Handle(GEOM_Object) thePnt,
-                                            Handle(GEOM_Object) theVec,
-                                            double theR, double theH);
+                                                           Handle(GEOM_Object) theVec,
+                                                           double theR, double theH);
+  Standard_EXPORT Handle(GEOM_Object) MakeCylinderRHA       (double theR, double theH, double theA);
+  Standard_EXPORT Handle(GEOM_Object) MakeCylinderPntVecRHA (Handle(GEOM_Object) thePnt,
+                                                            Handle(GEOM_Object) theVec,
+                                                            double theR, double theH, double theA);                                        
 
   Standard_EXPORT Handle(GEOM_Object) MakeConeR1R2H       (double theR1, double theR2, double theH);
   Standard_EXPORT Handle(GEOM_Object) MakeConePntVecR1R2H (Handle(GEOM_Object) thePnt,
-                                           Handle(GEOM_Object) theVec,
-                                           double theR1, double theR2, double theH);
+                                                          Handle(GEOM_Object) theVec,
+                                                          double theR1, double theR2, double theH);
 
   Standard_EXPORT Handle(GEOM_Object) MakeSphereR    (double theR);
   Standard_EXPORT Handle(GEOM_Object) MakeSpherePntR (Handle(GEOM_Object) thePnt, double theR);
@@ -64,8 +68,8 @@ class GEOMImpl_I3DPrimOperations : public GEOM_IOperations {
   Standard_EXPORT Handle(GEOM_Object) MakeTorusRR (double theRMajor, double theRMinor);
 
   Standard_EXPORT Handle(GEOM_Object) MakeTorusPntVecRR (Handle(GEOM_Object) thePnt,
-                                         Handle(GEOM_Object) theVec,
-                                         double theRMajor, double theRMinor);
+                                                        Handle(GEOM_Object) theVec,
+                                                        double theRMajor, double theRMinor);
 
   Standard_EXPORT Handle(GEOM_Object) MakePrismVecH (Handle(GEOM_Object) theBase,
                                                      Handle(GEOM_Object) theVec,
diff --git a/src/GEOMImpl/GEOMImpl_IBaseIEOperations.cxx b/src/GEOMImpl/GEOMImpl_IBaseIEOperations.cxx
new file mode 100755 (executable)
index 0000000..0f49431
--- /dev/null
@@ -0,0 +1,230 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "GEOMImpl_IBaseIEOperations.hxx"
+#include "GEOMImpl_IGroupOperations.hxx"
+#include "GEOMImpl_IFieldOperations.hxx"
+#include "GEOMImpl_IShapesOperations.hxx"
+
+// OCC includes
+#include <NCollection_DataMap.hxx>
+#include <TDF_ChildIDIterator.hxx>
+#include <TNaming_NamedShape.hxx>
+#include <TDataStd_Comment.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopExp.hxx>
+
+typedef NCollection_DataMap< TCollection_ExtendedString, NCollection_List<TopoDS_Shape> >
+        DataMapOfStringListOfShape;
+
+//=============================================================================
+/*!
+ *  constructor
+ */
+//=============================================================================
+GEOMImpl_IBaseIEOperations::GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine, int theDocID)
+: GEOM_IOperations(theEngine, theDocID)
+{
+  myGroupOperations = new GEOMImpl_IGroupOperations( GetEngine(), GetDocID() );
+  myFieldOperations = new GEOMImpl_IFieldOperations( GetEngine(), GetDocID() );
+  myShapesOperations = new GEOMImpl_IShapesOperations( GetEngine(), GetDocID() );
+}
+
+//=============================================================================
+/*!
+ *  destructor
+ */
+//=============================================================================
+GEOMImpl_IBaseIEOperations::~GEOMImpl_IBaseIEOperations()
+{
+  delete myGroupOperations;
+  delete myFieldOperations;
+  delete myShapesOperations;
+}
+
+//=============================================================================
+/*!
+ *  This method creates material groups for an imported object.
+ *  \param theObject the imported object.
+ */
+//=============================================================================
+void GEOMImpl_IBaseIEOperations::MakeMaterialGroups
+                        (const Handle(GEOM_Object) &theObject,
+                         const Handle(TColStd_HSequenceOfTransient) &theSeq)
+{
+  TopoDS_Shape aResShape = theObject->GetValue();
+
+  if (aResShape.IsNull() == Standard_False) {
+    // Group shapes by material names.
+    Handle(GEOM_Function)      aFunction = theObject->GetLastFunction();
+    DataMapOfStringListOfShape aMapMaterialShapes;
+
+    // check all named shapes using iterator
+    TDF_ChildIDIterator anIt (aFunction->GetNamingEntry(),
+        TNaming_NamedShape::GetID(), Standard_True);
+
+    for (; anIt.More(); anIt.Next()) {
+      Handle(TNaming_NamedShape) anAttr =
+          Handle(TNaming_NamedShape)::DownCast(anIt.Value());
+
+      if (anAttr.IsNull() == Standard_False) {
+        TDF_Label                aLabel = anAttr->Label();
+        Handle(TDataStd_Comment) aComment;
+
+        if (aLabel.FindAttribute(TDataStd_Comment::GetID(), aComment)) {
+          TCollection_ExtendedString aMatName = aComment->Get();
+          TopoDS_Shape               aShape   = anAttr->Get();
+
+          if (aMapMaterialShapes.IsBound(aMatName) == Standard_False) {
+            NCollection_List<TopoDS_Shape> anEmptyList;
+
+            aMapMaterialShapes.Bind(aMatName, anEmptyList);
+          }
+
+          aMapMaterialShapes(aMatName).Append(aShape);
+        }
+      }
+    }
+
+    if (aMapMaterialShapes.IsEmpty() == Standard_False) {
+      // Construct groups.
+      TopAbs_ShapeEnum aType = aResShape.ShapeType();
+      Standard_Integer i;
+      DataMapOfStringListOfShape::Iterator aMapIter;
+
+      // Check each shape type.
+      for(i = aType; i <= TopAbs_VERTEX; i++) {
+        DataMapOfStringListOfShape::Iterator aMapIter(aMapMaterialShapes);
+
+        for (; aMapIter.More(); aMapIter.Next()) {
+          NCollection_List<TopoDS_Shape> &aShList = aMapIter.ChangeValue();
+          NCollection_List<TopoDS_Shape>::Iterator aShIter(aShList);
+          NCollection_List<TopoDS_Shape>  aShListSameType;
+
+          while (aShIter.More()) {
+            const TopoDS_Shape &aShape = aShIter.Value();
+
+            if (i == aShape.ShapeType()) {
+              // Treat this element.
+              aShListSameType.Append(aShape);
+              aShList.Remove(aShIter);
+            } else {
+              // Go to the next element.
+              aShIter.Next();
+            }
+          }
+
+          if (aShListSameType.IsEmpty() == Standard_False) {
+            // Construct a group.
+            Handle(GEOM_Object) aGroup =
+              MakeGroup(theObject, aMapIter.Key(), aShListSameType);
+
+            if (aGroup.IsNull() == Standard_False) {
+              theSeq->Append(aGroup);
+            }
+          }
+        }
+      }
+    }
+  }
+}
+
+
+//=============================================================================
+/*!
+ *  This method creates a group of shapes of certain type.
+ *  \param theObject the imported object.
+ *  \param theName the material name.
+ *  \param theShapes the list of shapes to be added to this group.
+ *  \return the created group.
+ */
+//=============================================================================
+Handle(GEOM_Object) GEOMImpl_IBaseIEOperations::MakeGroup
+                  (const Handle(GEOM_Object)            &theObject,
+                   const TCollection_ExtendedString     &theName,
+                   const NCollection_List<TopoDS_Shape> &theShapes)
+{
+  Handle(GEOM_Object)                aGroup;
+  TopTools_IndexedMapOfShape         anIndices;
+  Handle(TColStd_HSequenceOfInteger) aSeqIDs = new TColStd_HSequenceOfInteger;
+  NCollection_List<TopoDS_Shape>::Iterator anIter(theShapes);
+
+  TopExp::MapShapes(theObject->GetValue(), anIndices);
+
+  // Compose shape IDs.
+  for (; anIter.More(); anIter.Next()) {
+    const TopoDS_Shape &aShape = anIter.Value();
+    const Standard_Integer anIndex = anIndices.FindIndex(aShape);
+
+    if (anIndex > 0) {
+      aSeqIDs->Append(anIndex);
+    }
+  }
+
+  if (aSeqIDs->IsEmpty() == Standard_False) {
+    // Create a group.
+    const TopAbs_ShapeEnum aType  = theShapes.First().ShapeType();
+
+    aGroup = myGroupOperations->CreateGroup(theObject, aType);
+
+    if (aGroup.IsNull() == Standard_False) {
+      aGroup->GetLastFunction()->SetDescription("");
+      myGroupOperations->UnionIDs(aGroup, aSeqIDs);
+      aGroup->GetLastFunction()->SetDescription("");
+
+      // Compose the group name.
+      TCollection_AsciiString aGroupName(theName);
+
+      switch(aType) {
+        case TopAbs_VERTEX:
+          aGroupName += "_VERTEX";
+          break;
+        case TopAbs_EDGE:
+          aGroupName += "_EDGE";
+          break;
+        case TopAbs_WIRE:
+          aGroupName += "_WIRE";
+          break;
+        case TopAbs_FACE:
+          aGroupName += "_FACE";
+          break;
+        case TopAbs_SHELL:
+          aGroupName += "_SHELL";
+          break;
+        case TopAbs_SOLID:
+          aGroupName += "_SOLID";
+          break;
+        case TopAbs_COMPSOLID:
+          aGroupName += "_COMPSOLID";
+          break;
+        case TopAbs_COMPOUND:
+          aGroupName += "_COMPOUND";
+          break;
+        default:
+          aGroupName += "_SHAPE";
+          break;
+      }
+
+      aGroup->SetName(aGroupName.ToCString());
+    }
+  }
+
+  return aGroup;
+}
diff --git a/src/GEOMImpl/GEOMImpl_IBaseIEOperations.hxx b/src/GEOMImpl/GEOMImpl_IBaseIEOperations.hxx
new file mode 100644 (file)
index 0000000..e547cb3
--- /dev/null
@@ -0,0 +1,53 @@
+// Copyright (C) 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, or (at your option) any 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 _GEOMImpl_IBaseIEOperations_HXX_
+#define _GEOMImpl_IBaseIEOperations_HXX_
+
+// GEOM includes
+#include <GEOM_IOperations.hxx>
+
+// OCC includes
+#include <NCollection_List.hxx>
+
+class GEOMImpl_IGroupOperations;
+class GEOMImpl_IFieldOperations;
+class GEOMImpl_IShapesOperations;
+
+class GEOMImpl_IBaseIEOperations : public GEOM_IOperations
+{
+public:
+  Standard_EXPORT GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT ~GEOMImpl_IBaseIEOperations();
+  
+protected:
+  Standard_EXPORT void MakeMaterialGroups(const Handle(GEOM_Object)                  &theObject,
+                          const Handle(TColStd_HSequenceOfTransient) &theSeq);
+
+  Handle(GEOM_Object) MakeGroup
+                         (const Handle(GEOM_Object)            &theObject,
+                          const TCollection_ExtendedString     &theName,
+                          const NCollection_List<TopoDS_Shape> &theShapes);
+protected:
+  GEOMImpl_IGroupOperations*  myGroupOperations;
+  GEOMImpl_IFieldOperations*  myFieldOperations;
+  GEOMImpl_IShapesOperations* myShapesOperations;
+};
+
+#endif
index f13ac776075c8d7de17eacc8cec8a941b5dcb7d5..c092c950eea5f4c4c02642c0aff56ba14197603e 100644 (file)
@@ -28,6 +28,7 @@
 #define CYL_ARG_H   2
 #define CYL_ARG_PNT 3
 #define CYL_ARG_VEC 4
+#define CYL_ARG_A   5
 
 class GEOMImpl_ICylinder
 {
@@ -50,6 +51,10 @@ class GEOMImpl_ICylinder
   void SetVector(Handle(GEOM_Function) theRefVector) { _func->SetReference(CYL_ARG_VEC, theRefVector); }
 
   Handle(GEOM_Function) GetVector() { return _func->GetReference(CYL_ARG_VEC); }
+  
+  void SetA(double theA) { _func->SetReal(CYL_ARG_A, theA); }
+
+  double GetA() { return _func->GetReal(CYL_ARG_A); }
 
  private:
 
diff --git a/src/GEOMImpl/GEOMImpl_IECallBack.cxx b/src/GEOMImpl/GEOMImpl_IECallBack.cxx
new file mode 100755 (executable)
index 0000000..1cd65c1
--- /dev/null
@@ -0,0 +1,115 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "GEOMImpl_IECallBack.hxx"
+#include "GEOMImpl_Gen.hxx"
+
+std::map<TCollection_AsciiString, GEOMImpl_IECallBack*> GEOMImpl_IECallBack::myCallBacks;
+
+//=============================================================================
+/*!
+ *  constructor
+ */
+//=============================================================================
+GEOMImpl_IECallBack::GEOMImpl_IECallBack()
+{
+}
+
+//=============================================================================
+/*!
+ *  destructor
+ */
+//=============================================================================
+GEOMImpl_IECallBack::~GEOMImpl_IECallBack()
+{
+}
+
+//=============================================================================
+/*!
+ *  GetEngine
+ */
+//=============================================================================
+GEOMImpl_Gen* GEOMImpl_IECallBack::GetEngine()
+{
+  return dynamic_cast<GEOMImpl_Gen*>( GEOM_Engine::GetEngine() );
+}
+
+//=============================================================================
+/*!
+ *  Export
+ */
+//=============================================================================
+bool GEOMImpl_IECallBack::Export( int                            /*theDocId*/,
+                                 const Handle(GEOM_Object)      /*theOriginal*/,
+                                  const TCollection_AsciiString& /*theFileName*/,
+                                  const TCollection_AsciiString& /*theFormatName*/ )
+{
+  return false;
+}
+
+//=============================================================================
+/*!
+ *  Import
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+GEOMImpl_IECallBack::Import( int                            /*theDocId*/,
+                            const TCollection_AsciiString& /*theFormatName*/,
+                             const TCollection_AsciiString& /*theFileName*/ )
+{
+  return NULL;
+}
+
+//=============================================================================
+/*!
+ *  ReadValue
+ */
+//=============================================================================
+TCollection_AsciiString
+GEOMImpl_IECallBack::ReadValue( int                            /*theDocId*/,
+                               const TCollection_AsciiString& /*theFileName*/,
+                                const TCollection_AsciiString& /*theFormatName*/,
+                                const TCollection_AsciiString& /*theParameterName*/ )
+{
+  return "";
+}
+
+//=============================================================================
+/*!
+ *  Register
+ */
+//=============================================================================
+void GEOMImpl_IECallBack::Register( const TCollection_AsciiString& theFormatName,
+                                    GEOMImpl_IECallBack* theCallBack )
+{
+  myCallBacks[theFormatName] = theCallBack;
+}
+
+//=============================================================================
+/*!
+ *  GetCallBack
+ */
+//=============================================================================
+GEOMImpl_IECallBack* GEOMImpl_IECallBack::GetCallBack( const TCollection_AsciiString& theFormatName )
+{
+  return myCallBacks.find(theFormatName) == myCallBacks.end() ?
+    new GEOMImpl_IECallBack() : myCallBacks[theFormatName];
+}
+
diff --git a/src/GEOMImpl/GEOMImpl_IECallBack.hxx b/src/GEOMImpl/GEOMImpl_IECallBack.hxx
new file mode 100644 (file)
index 0000000..a6c26b7
--- /dev/null
@@ -0,0 +1,67 @@
+// Copyright (C) 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, or (at your option) any 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 _GEOMImpl_IECallBack_HXX_
+#define _GEOMImpl_IECallBack_HXX_
+
+// GEOM includes
+#include "GEOM_Object.hxx"
+
+// OCC includes
+#include <TCollection_AsciiString.hxx>
+
+// C++ includes
+#include <map>
+
+class GEOMImpl_Gen;
+
+class GEOMImpl_IECallBack
+{
+ public:
+  Standard_EXPORT GEOMImpl_IECallBack();
+  Standard_EXPORT ~GEOMImpl_IECallBack();
+  
+  Standard_EXPORT virtual bool Export( int                            theDocId,
+                                      const Handle(GEOM_Object)      theOriginal,
+                                       const TCollection_AsciiString& theFileName,
+                                       const TCollection_AsciiString& theFormatName );
+
+  Standard_EXPORT virtual
+  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
+                                              const TCollection_AsciiString& theFormatName,
+                                              const TCollection_AsciiString& theFileName );
+
+  Standard_EXPORT virtual
+  TCollection_AsciiString  ReadValue( int                            theDocId,
+                                     const TCollection_AsciiString& theFileName,
+                                     const TCollection_AsciiString& theFormatName,
+                                     const TCollection_AsciiString& theParameterName );
+
+  Standard_EXPORT static void Register( const TCollection_AsciiString& theFormatName, GEOMImpl_IECallBack* theCallBack );
+
+  static GEOMImpl_IECallBack* GetCallBack( const TCollection_AsciiString& theFormatName );
+
+protected:
+  Standard_EXPORT GEOMImpl_Gen* GetEngine();
+
+private:
+  static std::map<TCollection_AsciiString, GEOMImpl_IECallBack*> myCallBacks;
+};
+
+#endif
diff --git a/src/GEOMImpl/GEOMImpl_IImportExportXAO.hxx b/src/GEOMImpl/GEOMImpl_IImportExportXAO.hxx
deleted file mode 100644 (file)
index bcbd4de..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// 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, or (at your option) any 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 _GEOMImpl_IImportExportXAO_HXX_
-#define _GEOMImpl_IImportExportXAO_HXX_
-
-#include "GEOM_Function.hxx"
-
-#define IMPORTEXPORTXAO_ARG_DATA   1
-
-class GEOMImpl_IImportExportXAO
-{
-public:
-  GEOMImpl_IImportExportXAO(Handle(GEOM_Function) theFunction): _func(theFunction) {}
-
-  void SetData(const TCollection_AsciiString& data) { _func->SetString(IMPORTEXPORTXAO_ARG_DATA, data); }
-  const TCollection_AsciiString GetData() { return _func->GetString(IMPORTEXPORTXAO_ARG_DATA); }
-
-private:
-  Handle(GEOM_Function) _func;
-};
-
-#endif // _GEOMImpl_IExportXAO_HXX_
index 14b53ded0ea926cd48e813ae9f6bae977121500e..e5f5a1f946c276046cdc0fed7405f5975045a033 100755 (executable)
 #include "GEOMImpl_IShapesOperations.hxx"
 #include "GEOMImpl_IGroupOperations.hxx"
 #include "GEOMImpl_IFieldOperations.hxx"
-#include "GEOMImpl_XAODriver.hxx"
-#include "GEOMImpl_IImportExportXAO.hxx"
+#include "GEOMImpl_IECallBack.hxx"
 
 #include <GEOM_Function.hxx>
 #include <GEOM_PythonDump.hxx>
 #include "GEOM_ISubShape.hxx"
 
-#include <XAO_Xao.hxx>
-#include <XAO_Geometry.hxx>
-#include <XAO_BrepGeometry.hxx>
-#include <XAO_Group.hxx>
-#include <XAO_Field.hxx>
-#include <XAO_XaoUtils.hxx>
-#include <XAO_BooleanField.hxx>
-#include <XAO_IntegerField.hxx>
-#include <XAO_DoubleField.hxx>
-#include <XAO_StringField.hxx>
-#include <XAO_BooleanStep.hxx>
-#include <XAO_IntegerStep.hxx>
-#include <XAO_DoubleStep.hxx>
-#include <XAO_StringStep.hxx>
-
 #include <Basics_OCCTVersion.hxx>
 
 #include "utilities.h"
 #include <Standard_Failure.hxx>
 #include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
 
-/**
- * This function returns the input format name from the original format name.
- */
-static TCollection_AsciiString GetImportFormatName
-        (const TCollection_AsciiString& theFormatName)
-{
-  return theFormatName.Token("_");
-}
-
 //=============================================================================
 /*!
  *  constructor
@@ -183,50 +158,8 @@ void GEOMImpl_IInsertOperations::Export
 
   if (theOriginal.IsNull()) return;
 
-  Handle(GEOM_Function) aRefFunction = theOriginal->GetLastFunction();
-  if (aRefFunction.IsNull()) return;  //There is no function which creates an object to be exported
-
-  //Add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject(GetDocID(), GEOM_IMPORT);
-
-  //Add an Export function
-  Handle(GEOM_Function) aFunction = result->AddFunction(GEOMImpl_ExportDriver::GetID(), EXPORT_SHAPE);
-  if (aFunction.IsNull()) return;
-
-  //Check if the function is set correctly
-  if (aFunction->GetDriverGUID() != GEOMImpl_ExportDriver::GetID()) return;
-
-  Handle(TCollection_HAsciiString) aHLibName;
-  if (!IsSupported(Standard_False, theFormatName, aHLibName)) {
+  if ( !GEOMImpl_IECallBack::GetCallBack( theFormatName )->Export( GetDocID(), theOriginal, theFileName, theFormatName ) )
     return;
-  }
-  TCollection_AsciiString aLibName = aHLibName->String();
-
-  //Set parameters
-  GEOMImpl_IImportExport aCI (aFunction);
-  aCI.SetOriginal(aRefFunction);
-  aCI.SetFileName(theFileName);
-  aCI.SetFormatName(theFormatName);
-  aCI.SetPluginName(aLibName);
-
-  //Perform the Export
-  try {
-    OCC_CATCH_SIGNALS;
-    if (!GetSolver()->ComputeFunction(aFunction)) {
-      SetErrorCode("Not enough space on disk, or you haven't permissions to write this directory");
-      return;
-    }
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return;
-  }
-
-  //Make a Python command
-  GEOM::TPythonDump(aFunction) << "geompy.Export(" << theOriginal << ", \""
-    << theFileName.ToCString() << "\", \"" << theFormatName.ToCString() << "\")";
-
   SetErrorCode(OK);
 }
 
@@ -243,89 +176,9 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IInsertOperations::Import
 
   if (theFileName.IsEmpty() || theFormatName.IsEmpty()) return NULL;
 
-  //Add a new result object
-  Handle(GEOM_Object) anImported = GetEngine()->AddObject(GetDocID(), GEOM_IMPORT);
-
-  //Add an Import function
-  Handle(GEOM_Function) aFunction =
-    anImported->AddFunction(GEOMImpl_ImportDriver::GetID(), IMPORT_SHAPE);
-
-  if (aFunction.IsNull()) return NULL;
-
-  //Check if the function is set correctly
-  if (aFunction->GetDriverGUID() != GEOMImpl_ImportDriver::GetID()) return NULL;
-
-  Handle(TCollection_HAsciiString) aHLibName;
-  if (!IsSupported
-          (Standard_True, GetImportFormatName(theFormatName), aHLibName)) {
-    return NULL;
-  }
-  TCollection_AsciiString aLibName = aHLibName->String();
-
-  //Set parameters
-  GEOMImpl_IImportExport aCI (aFunction);
-  aCI.SetFileName(theFileName);
-  aCI.SetFormatName(theFormatName);
-  aCI.SetPluginName(aLibName);
-
-  //Perform the Import
-  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
-
-  try {
-    OCC_CATCH_SIGNALS;
-    if (!GetSolver()->ComputeFunction(aFunction)) {
-      SetErrorCode("Import driver failed");
-      return NULL;
-    }
-
-    aSeq->Append(anImported);
-
-    // Greate material groups.
-    MakeMaterialGroups(anImported, aSeq);
-  }
-  catch (Standard_Failure) {
-    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    SetErrorCode(aFail->GetMessageString());
-    return NULL;
-  }
-
-  //Make a Python command
-  if (theFormatName != "IGES_UNIT") {
-    GEOM::TPythonDump pd (aFunction);
-    if (theFormatName == "BREP")
-      pd << aSeq << " = geompy.ImportBREP(\"" << theFileName.ToCString() << "\")";
-    else if (theFormatName == "IGES")
-      pd << aSeq << " = geompy.ImportIGES(\"" << theFileName.ToCString() << "\")";
-    else if (theFormatName == "IGES_SCALE")
-      pd << aSeq << " = geompy.ImportIGES(\"" << theFileName.ToCString() << "\", True)";
-    else if (theFormatName == "STEP")
-      pd << aSeq << " = geompy.ImportSTEP(\"" << theFileName.ToCString() << "\")";
-    else if (theFormatName == "STEP_SCALE")
-      pd << aSeq << " = geompy.ImportSTEP(\"" << theFileName.ToCString() << "\", True)";
-    else {
-      pd << aSeq << " = geompy.ImportFile(\""
-         << theFileName.ToCString() << "\", \"" << theFormatName.ToCString() << "\")";
-    }
-  }
-
+  Handle(TColStd_HSequenceOfTransient) aSeq =
+    GEOMImpl_IECallBack::GetCallBack( theFormatName )->Import( GetDocID(), theFormatName, theFileName );
   SetErrorCode(OK);
-
-  // OLD CODE: begin
-  if (theFormatName == "IGES_UNIT") {
-    TopoDS_Shape S = aFunction->GetValue();
-    TopoDS_Vertex V = TopoDS::Vertex(S);
-    gp_Pnt P = BRep_Tool::Pnt(V);
-    double scale = P.X();
-    TCollection_AsciiString aUnitName = "UNIT_M";
-    if (fabs(scale-0.01) < 1.e-6)
-      aUnitName = "UNIT_CM";
-    else if (fabs(scale-0.001) < 1.e-6)
-      aUnitName = "UNIT_MM";
-    //cout<<"IIO: aUnitName = "<<aUnitName.ToCString()<<endl;
-    SetErrorCode(aUnitName);
-  }
-  // OLD CODE: end
-
   return aSeq;
 }
 
@@ -340,267 +193,15 @@ TCollection_AsciiString GEOMImpl_IInsertOperations::ReadValue
                                   const TCollection_AsciiString& theParameterName)
 {
   SetErrorCode(KO);
-
-  TCollection_AsciiString aValue, anError;
-
+  TCollection_AsciiString aValue;
   if (theFileName.IsEmpty() || theFormatName.IsEmpty() || theParameterName.IsEmpty()) return aValue;
 
-  Handle(TCollection_HAsciiString) aHLibName;
-  if (!IsSupported
-          (Standard_True, GetImportFormatName(theFormatName), aHLibName)) {
-    return aValue;
-  }
-  TCollection_AsciiString aLibName = aHLibName->String();
-
-  aValue = GEOMImpl_ImportDriver::ReadValue(theFileName, aLibName, theParameterName, anError);
-  if (anError.IsEmpty())
-    SetErrorCode(OK);
-  else
-    SetErrorCode(anError.ToCString());
+  aValue = GEOMImpl_IECallBack::GetCallBack( theFormatName )->ReadValue( GetDocID(), theFileName, theFormatName, theParameterName );
 
+  SetErrorCode(OK);
   return aValue;
 }
 
-//=============================================================================
-/*!
- *  ImportTranslators
- */
-//=============================================================================
-Standard_Boolean GEOMImpl_IInsertOperations::ImportTranslators
-                     (Handle(TColStd_HSequenceOfAsciiString)& theFormats,
-                      Handle(TColStd_HSequenceOfAsciiString)& thePatterns)
-{
-  if (theFormats.IsNull())
-    theFormats = new TColStd_HSequenceOfAsciiString;
-  else
-    theFormats->Clear();
-
-  if (thePatterns.IsNull())
-    thePatterns = new TColStd_HSequenceOfAsciiString;
-  else
-    thePatterns->Clear();
-
-  if (!InitResMgr()) return Standard_False;
-
-  // Read Import formats from directories
-  Handle(Resource_Manager) aResMgr;
-  Handle(TColStd_HSequenceOfAsciiString) aFormatsToAdd;
-  for(int index = 0; index < myResMgrList.size(); index++) {
-    int anOldLen = theFormats->Length();
-    aResMgr = myResMgrList.at(index);
-    if (aResMgr->Find("Import")) {
-      TCollection_AsciiString aFormats (aResMgr->Value("Import"));
-      TCollection_AsciiString aToken = aFormats.Token("| \t", 1);
-      for (int i = 1; !aToken.IsEmpty(); aToken = aFormats.Token("| \t", ++i)) {
-        int aLenFormats = theFormats->Length();
-        bool isFound = false;
-        for(int aInd=1;aInd<=aLenFormats;aInd++){
-          if( theFormats->Value(aInd) == aToken ){
-            isFound = true;
-            break;
-          }
-        }
-        if(!isFound)
-          theFormats->Append(aToken);
-      }
-    }
-
-    // Read Patterns for each supported format
-    for (int j = anOldLen+1; j <= theFormats->Length(); j++) {
-      TCollection_AsciiString aKey, aPattern;
-      aKey = theFormats->Value(j) + ".ImportPattern";
-      if (aResMgr->Find(aKey.ToCString()))
-        aPattern = aResMgr->Value(aKey.ToCString());
-      else {
-        aKey = theFormats->Value(j) + ".Pattern";
-        if (aResMgr->Find(aKey.ToCString()))
-          aPattern = aResMgr->Value(aKey.ToCString());
-        else {
-          aPattern = theFormats->Value(j);
-          aPattern += " Files ( *.* )";
-        }
-      }
-      thePatterns->Append(aPattern);
-    }
-  }
-
-  return (!theFormats->IsEmpty());
-}
-
-//=============================================================================
-/*!
- *  ExportTranslators
- */
-//=============================================================================
-Standard_Boolean GEOMImpl_IInsertOperations::ExportTranslators
-                     (Handle(TColStd_HSequenceOfAsciiString)& theFormats,
-                      Handle(TColStd_HSequenceOfAsciiString)& thePatterns)
-{
-  if (theFormats.IsNull())
-    theFormats = new TColStd_HSequenceOfAsciiString;
-  else
-    theFormats->Clear();
-
-  if (thePatterns.IsNull())
-    thePatterns = new TColStd_HSequenceOfAsciiString;
-  else
-    thePatterns->Clear();
-
-  if (!InitResMgr()) return Standard_False;
-
-  // Read Export formats list from directories
-  Handle(Resource_Manager) aResMgr;
-  for(int index=0; index < myResMgrList.size(); index++) {
-    int anOldLen = theFormats->Length();
-    aResMgr = myResMgrList.at(index);
-    if (aResMgr->Find("Export")) {
-      TCollection_AsciiString aFormats (aResMgr->Value("Export"));
-      TCollection_AsciiString aToken = aFormats.Token("| \t", 1);
-      for (int i = 1; !aToken.IsEmpty(); aToken = aFormats.Token("| \t", ++i)) {
-        int aLenFormats = theFormats->Length();
-        bool isFound = false;
-        for(int aInd=1;aInd<=aLenFormats;aInd++){
-          if( theFormats->Value(aInd) == aToken){
-            isFound = true;
-            break;
-          }
-        }
-        if(!isFound)
-          theFormats->Append(aToken);
-      }
-    }
-
-    // Read Patterns for each supported format
-    for (int j = anOldLen+1; j <= theFormats->Length(); j++) {
-      TCollection_AsciiString aKey, aPattern;
-      aKey = theFormats->Value(j) + ".ExportPattern";
-      if (aResMgr->Find(aKey.ToCString()))
-        aPattern = aResMgr->Value(aKey.ToCString());
-      else {
-        aKey = theFormats->Value(j) + ".Pattern";
-        if (aResMgr->Find(aKey.ToCString()))
-          aPattern = aResMgr->Value(aKey.ToCString());
-        else {
-          aPattern = theFormats->Value(j);
-          aPattern += " Files ( *.* )";
-        }
-      }
-      thePatterns->Append(aPattern);
-    }
-  }
-
-  return (!theFormats->IsEmpty());
-}
-
-//=============================================================================
-/*!
- *  IsSupported
- */
-//=============================================================================
-Standard_Boolean GEOMImpl_IInsertOperations::IsSupported
-                            (const Standard_Boolean isImport,
-                             const TCollection_AsciiString& theFormat,
-                             Handle(TCollection_HAsciiString)& theLibName)
-{
-  if (!InitResMgr()) return Standard_False;
-
-  // Import/Export mode
-  TCollection_AsciiString aMode;
-  //Standard_CString aMode;
-  if (isImport) aMode = "Import";
-  else aMode = "Export";
-
-  // Read supported formats for the certain mode from user directory
-  Handle(Resource_Manager) aResMgr;
-  for(int index=0; index < myResMgrList.size(); index++) {
-    aResMgr = myResMgrList.at(index);
-    if (aResMgr->Find(aMode.ToCString())) {
-      TCollection_AsciiString aFormats (aResMgr->Value(aMode.ToCString()));
-      if (aFormats.Search(theFormat) > -1) {
-        // Read library name for the supported format
-        TCollection_AsciiString aKey (theFormat);
-        aKey += ".";
-        aKey += aMode;
-        if (aResMgr->Find(aKey.ToCString())) {
-          TCollection_AsciiString aLibName (aResMgr->Value(aKey.ToCString()));
-  #ifndef WIN32
-         if ( aLibName.Length() > 3 && aLibName.SubString(1,3) != "lib" )
-           aLibName.Prepend("lib");
-          aLibName += ".so";
-  #else
-          aLibName += ".dll";
-  #endif
-          theLibName = new TCollection_HAsciiString (aLibName);
-          return Standard_True;
-        }
-      }
-    }
-  }
-  
-  return Standard_False;
-}
-
-//=============================================================================
-/*!
- *  InitResMgr
- */
-//=============================================================================
-Standard_Boolean GEOMImpl_IInsertOperations::InitResMgr()
-{
-  bool isResourceFound = false;
-  TCollection_AsciiString aNull;
-  
-  myResMgrList.clear();
-
-  // Initialize the GEOM Resource Manager
-  TCollection_AsciiString aResDir;
-  aResDir = getenv("GEOM_ROOT_DIR");
-#ifdef WIN32
-  aResDir += "\\share\\salome\\resources\\geom";
-#else
-  aResDir += "/share/salome/resources/geom";
-#endif
-  Handle(Resource_Manager) aGeomResMgr = new Resource_Manager ("ImportExport", aResDir, aNull, Standard_False);
-  if ( aGeomResMgr->Find("Import") || aGeomResMgr->Find("Export") ) {
-    myResMgrList.push_back( aGeomResMgr );
-    isResourceFound = true;
-  }
-
-  // Initialize the user's Resource Manager
-  TCollection_AsciiString aResDirsStr;
-  aResDirsStr = getenv("GEOM_ENGINE_RESOURCES_DIR");
-  if ( !aResDirsStr.IsEmpty() )
-  {
-    std::string aSep = ":";
-#ifdef WIN32
-    aSep = ";";
-#endif
-    aResDir = aResDirsStr.Token(aSep.c_str(), 1);
-    for (int i = 1; !aResDir.IsEmpty(); aResDir = aResDirsStr.Token(aSep.c_str(), ++i)) {
-      Handle(Resource_Manager) anUserResMgr = new Resource_Manager ("ImportExport", aNull, aResDir, Standard_False);
-      if (anUserResMgr->Find("Import") || anUserResMgr->Find("Export")) {
-        myResMgrList.push_back( anUserResMgr );
-        isResourceFound = true;
-      }
-    }
-  }
-  else
-  {
-    aResDir = getenv("HOME");
-#ifdef WIN32
-    aResDir += "\\.config\\salome";
-#else
-    aResDir += "/.config/salome";
-#endif
-    Handle(Resource_Manager) anUserResMgr = new Resource_Manager ("ImportExport", aNull, aResDir, Standard_False);
-    if (anUserResMgr->Find("Import") || anUserResMgr->Find("Export")) {
-      myResMgrList.push_back( anUserResMgr );
-      isResourceFound = true;
-    }
-  }
-  return isResourceFound;
-}
-
 //=============================================================================
 /*!
  *  RestoreShape
@@ -739,763 +340,3 @@ std::list<int> GEOMImpl_IInsertOperations::GetAllTextures()
   SetErrorCode(OK);
   return id_list;
 }
-
-TopAbs_ShapeEnum getGroupDimension(XAO::Group* group)
-{
-  XAO::Dimension dim = group->getDimension();
-  TopAbs_ShapeEnum rdim;
-  switch ( dim )
-  {
-  case XAO::VERTEX:
-    rdim = TopAbs_VERTEX; break;
-  case XAO::EDGE:
-    rdim = TopAbs_EDGE; break;
-  case XAO::FACE:
-    rdim = TopAbs_FACE; break;
-  case XAO::SOLID:
-    rdim = TopAbs_SOLID; break;
-  default:
-    rdim = TopAbs_COMPOUND; break;
-  }
-  return rdim;
-}
-
-XAO::Dimension shapeEnumToDimension(const TopAbs_ShapeEnum& shape)
-{
-  XAO::Dimension dim;
-  switch( shape ) {
-  case TopAbs_VERTEX:
-    dim = XAO::VERTEX; break;
-  case TopAbs_EDGE:
-    dim = XAO::EDGE; break;
-  case TopAbs_FACE:
-    dim = XAO::FACE; break;
-  case TopAbs_SOLID:
-    dim = XAO::SOLID; break;
-  default:
-    throw SALOME_Exception("Bad type"); // TODO
-  }
-  return dim;
-}
-
-void GEOMImpl_IInsertOperations::exportGroups(std::list<Handle(GEOM_Object)> groupList,
-                                              XAO::Xao* xaoObject,
-                                              XAO::BrepGeometry* geometry)
-{
-  // add the groups
-  std::list<Handle(GEOM_Object)>::iterator groupIterator = groupList.begin();
-  while (groupIterator != groupList.end())
-  {
-    Handle(GEOM_Object) currGroup = (*groupIterator++);
-    Handle(TColStd_HArray1OfInteger) groupIds = myGroupOperations->GetObjects(currGroup);
-    
-    TopAbs_ShapeEnum shapeGroup = myGroupOperations->GetType(currGroup);
-    XAO::Dimension dim = shapeEnumToDimension(shapeGroup);
-    XAO::Group* group = xaoObject->addGroup(dim, currGroup->GetName().ToCString());
-    
-    switch (shapeGroup)
-    {
-    case TopAbs_VERTEX:
-      for (int i = 1; i <= groupIds->Length(); i++)
-      {
-        std::string ref = XAO::XaoUtils::intToString(groupIds->Value(i));
-        int index = geometry->getVertexIndexByReference(ref);
-        group->add(index);
-      }
-      break;
-    case TopAbs_EDGE:
-      for (int i = 1; i <= groupIds->Length(); i++)
-      {
-        std::string ref = XAO::XaoUtils::intToString(groupIds->Value(i));
-        int index = geometry->getEdgeIndexByReference(ref);
-        group->add(index);
-      }
-      break;
-    case TopAbs_FACE:
-      for (int i = 1; i <= groupIds->Length(); i++)
-      {
-        std::string ref = XAO::XaoUtils::intToString(groupIds->Value(i));
-        int index = geometry->getFaceIndexByReference(ref);
-        group->add(index);
-      }
-      break;
-    case TopAbs_SOLID:
-      for (int i = 1; i <= groupIds->Length(); i++)
-      {
-        std::string ref = XAO::XaoUtils::intToString(groupIds->Value(i));
-        int index = geometry->getSolidIndexByReference(ref);
-        group->add(index);
-      }
-      break;
-    }
-  }
-}
-
-void GEOMImpl_IInsertOperations::exportFields(std::list<Handle(GEOM_Field)> fieldList,
-                                              XAO::Xao* xaoObject,
-                                              XAO::BrepGeometry* geometry)
-{
-    std::list<Handle(GEOM_Field)>::iterator fieldIterator = fieldList.begin();
-    while (fieldIterator != fieldList.end())
-    {
-        Handle(GEOM_Field) currField = (*fieldIterator++);
-
-        int fdim = currField->GetDimension();
-        int ftype = currField->GetDataType();
-        int nbComponents = currField->GetNbComponents();
-        std::string name = currField->GetName().ToCString();
-
-        XAO::Field* field = xaoObject->addField((XAO::Type)ftype, (XAO::Dimension)fdim, nbComponents, name);
-
-        Handle(TColStd_HArray1OfExtendedString) components = currField->GetComponents();
-        for (int i = components->Lower(), j = 0; i <= components->Upper(); ++i, ++j)
-        {
-            field->setComponentName(j, TCollection_AsciiString(components->Value(i)).ToCString());
-        }
-
-        std::list< Handle(GEOM_FieldStep)> steps = currField->GetSteps();
-        std::list<Handle(GEOM_FieldStep)>::iterator stepIterator = steps.begin();
-        while (stepIterator != steps.end())
-        {
-            Handle(GEOM_FieldStep) currStep = (*stepIterator++);
-
-            XAO::Step* step = field->addNewStep(currStep->GetID());
-            step->setStamp(currStep->GetStamp());
-
-            switch (ftype)
-            {
-                case 0: // bool
-                {
-                    XAO::BooleanStep* bs = (XAO::BooleanStep*)step;
-                    Handle(TColStd_HArray1OfInteger) bvalues = currStep->GetIntValues();
-                    std::vector<bool> bv;
-                    bv.reserve(bvalues->Upper());
-                    for ( int i = bvalues->Lower(), nb = bvalues->Upper(); i <= nb; ++i )
-                    {
-                        bv.push_back(bvalues->Value(i) != 0);
-                    }
-                    bs->setValues(bv);
-                    break;
-                }
-                case 1: // integer
-                {
-                    XAO::IntegerStep* is = (XAO::IntegerStep*)step;
-                    Handle(TColStd_HArray1OfInteger) ivalues = currStep->GetIntValues();
-                    std::vector<int> iv;
-                    iv.reserve(ivalues->Upper());
-                    for ( int i = ivalues->Lower(), nb = ivalues->Upper(); i <= nb; ++i )
-                    {
-                        iv.push_back(ivalues->Value(i));
-                    }
-                    is->setValues(iv);
-                    break;
-                }
-                case 2: // double
-                {
-                    XAO::DoubleStep* ds = (XAO::DoubleStep*)step;
-                    Handle(TColStd_HArray1OfReal) dvalues = currStep->GetDoubleValues();
-                    std::vector<double> dv;
-                    dv.reserve(dvalues->Upper());
-                    for ( int i = dvalues->Lower(), nb = dvalues->Upper(); i <= nb; ++i )
-                    {
-                        dv.push_back(dvalues->Value(i));
-                    }
-                    ds->setValues(dv);
-                    break;
-                }
-                case 3: // string
-                {
-                    XAO::StringStep* ss = (XAO::StringStep*)step;
-                    Handle(TColStd_HArray1OfExtendedString) svalues = currStep->GetStringValues();
-                    std::vector<std::string> sv;
-                    sv.reserve(svalues->Upper());
-                    for ( int i = svalues->Lower(), nb = svalues->Upper(); i <= nb; ++i )
-                    {
-                        sv.push_back(TCollection_AsciiString(svalues->Value(i)).ToCString());
-                    }
-                    ss->setValues(sv);
-                    break;
-                }
-            }
-        }
-    }
-}
-
-void GEOMImpl_IInsertOperations::exportSubshapes(const Handle(GEOM_Object)& shape, XAO::BrepGeometry* geometry)
-{
-  Handle(TColStd_HSequenceOfTransient) subObjects = myShapesOperations->GetExistingSubObjects(shape, false);
-  int nbSubObjects = subObjects->Length();
-  // set the names of the sub shapes
-  for (int i = 1; i <= nbSubObjects; i++)
-  {
-    Handle(Standard_Transient) transientSubObject = subObjects->Value(i);
-    if (transientSubObject.IsNull())
-      continue;
-    
-    Handle(GEOM_Object) subObject = Handle(GEOM_Object)::DownCast(transientSubObject);
-    if (subObject->GetType() != GEOM_GROUP)
-    {
-      int subIndex = myShapesOperations->GetSubShapeIndex(shape, subObject);
-      switch (subObject->GetValue().ShapeType())
-      {
-      case TopAbs_VERTEX:
-        geometry->changeVertexName(subIndex, subObject->GetName().ToCString());
-        break;
-      case TopAbs_EDGE:
-        geometry->changeEdgeName(subIndex, subObject->GetName().ToCString());
-        break;
-      case TopAbs_FACE:
-        geometry->changeFaceName(subIndex, subObject->GetName().ToCString());
-        break;
-      case TopAbs_SOLID:
-        geometry->changeSolidName(subIndex, subObject->GetName().ToCString());
-        break;
-      }
-    }
-  }
-}
-
-//=============================================================================
-/*!
- *  Export a shape to XAO format
- *  \param shape The shape to export
- *  \param groups The list of groups to export
- *  \param fields The list of fields to export
- *  \param fileName The name of the file to exported
- *  \return boolean indicating if export was succeful.
- */
-//=============================================================================
-bool GEOMImpl_IInsertOperations::ExportXAO(Handle(GEOM_Object) shape,
-                                           std::list<Handle(GEOM_Object)> groupList,
-                                           std::list<Handle(GEOM_Field)> fieldList,
-                                           const char* author,
-                                           const char* fileName)
-{
-  SetErrorCode(KO);
-
-  if (shape.IsNull()) return false;
-  
-  // add a new shape function with parameters
-  Handle(GEOM_Function) lastFunction = shape->GetLastFunction();
-  if (lastFunction.IsNull()) return false;
-  
-  // add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject(GetDocID(), GEOM_IMPORT);
-  
-  // add an Export function
-  Handle(GEOM_Function) exportFunction = result->AddFunction(GEOMImpl_XAODriver::GetID(), IMPORTEXPORT_EXPORTXAO);
-  if (exportFunction.IsNull()) return false;
-  if (exportFunction->GetDriverGUID() != GEOMImpl_XAODriver::GetID()) return false;
-  
-  // create the XAO object
-  XAO::Xao* xaoObject = new XAO::Xao();
-  xaoObject->setAuthor(author);
-  
-  // add the geometry
-  XAO::BrepGeometry* geometry = (XAO::BrepGeometry*)XAO::Geometry::createGeometry(XAO::BREP);
-  TopoDS_Shape topoShape = shape->GetValue();
-  exportFunction->SetValue(topoShape);
-  XAO::BrepGeometry* brep = (XAO::BrepGeometry*)geometry;
-  brep->setTopoDS_Shape(topoShape);
-  
-  geometry->setName(shape->GetName().ToCString());
-  exportSubshapes(shape, geometry);
-  xaoObject->setGeometry(geometry);
-  
-  exportGroups(groupList, xaoObject, geometry);
-  exportFields(fieldList, xaoObject, geometry);
-  
-  // export the XAO to the file
-  xaoObject->exportXAO(fileName);
-  
-  // make a Python command
-  GEOM::TPythonDump pd(exportFunction);
-  pd << "exported = geompy.ExportXAO(" << shape;
-  
-  // list of groups
-  pd << ", [";
-  if (groupList.size() > 0)
-  {
-    std::list<Handle(GEOM_Object)>::iterator itGroup = groupList.begin();
-    pd << (*itGroup++);
-    while (itGroup != groupList.end())
-    {
-      pd << ", " << (*itGroup++);
-    }
-  }
-
-  // list of fields
-  pd << "], [";
-  if (fieldList.size() > 0)
-  {
-    std::list<Handle(GEOM_Field)>::iterator itField = fieldList.begin();
-    pd << (*itField++);
-    while (itField != fieldList.end())
-    {
-      pd << ", " << (*itField++);
-    }
-  }
-  pd << "], ";
-  pd << "\"" << author << "\", \"" << fileName << "\")";
-  
-  SetErrorCode(OK);
-  delete xaoObject;
-  
-  return true;
-}
-
-void GEOMImpl_IInsertOperations::importSubShapes(XAO::Geometry* xaoGeometry,
-                                                 Handle(GEOM_Function) function, int shapeType, int dim,
-                                                 Handle(TColStd_HSequenceOfTransient)& subShapeList)
-{
-  Handle(GEOM_Object) subShape;
-  Handle(GEOM_Function) aFunction;
-  Handle(TColStd_HArray1OfInteger) anArray;
-  
-  XAO::GeometricElementList::iterator elementIterator = xaoGeometry->begin((XAO::Dimension)dim);
-  for (; elementIterator != xaoGeometry->end((XAO::Dimension)dim); elementIterator++)
-  {
-    XAO::GeometricElement element = elementIterator->second;
-    if (!element.hasName())
-      continue;
-    
-    std::string name = element.getName();
-    std::string ref = element.getReference();
-    int iref = XAO::XaoUtils::stringToInt(ref);
-    
-    anArray = new TColStd_HArray1OfInteger(1, 1);
-    anArray->SetValue(1, iref);
-    
-    subShape = GetEngine()->AddObject(GetDocID(), GEOM_SUBSHAPE);
-    Handle(GEOM_Function) aFunction = subShape->AddFunction(GEOM_Object::GetSubShapeID(), 1);
-    if (aFunction.IsNull())
-      return;
-    
-    subShape->SetName(name.c_str());
-    subShape->SetType(shapeType);
-    
-    GEOM_ISubShape aSSI(aFunction);
-    aSSI.SetMainShape(function);
-    aSSI.SetIndices(anArray);
-    
-    //aFunction->SetValue(aValue);
-    subShapeList->Append(subShape);
-    
-    // Put this subshape in the list of sub-shapes of theMainShape
-    function->AddSubShapeReference(aFunction);
-  }
-}
-
-//=============================================================================
-/*!
- *  Import a shape from XAO format
- *  \param fileName The name of the file to import
- *  \param shape The imported shape
- *  \param subShapes The list of imported groups
- *  \param groups The list of imported groups
- *  \param fields The list of imported fields
- *  \return boolean indicating if import was succeful.
- */
-//=============================================================================
-bool GEOMImpl_IInsertOperations::ImportXAO(const char* fileName,
-                                           Handle(GEOM_Object)& shape,
-                                           Handle(TColStd_HSequenceOfTransient)& subShapes,
-                                           Handle(TColStd_HSequenceOfTransient)& groups,
-                                           Handle(TColStd_HSequenceOfTransient)& fields)
-{
-  SetErrorCode(KO);
-  
-  if (fileName == NULL || groups.IsNull() || fields.IsNull())
-    return false;
-  
-  // Read the XAO
-  XAO::Xao* xaoObject = new XAO::Xao();
-  try
-  {
-    xaoObject->importXAO(fileName);
-  }
-  catch (XAO::XAO_Exception& exc)
-  {
-    delete xaoObject;
-    SetErrorCode(exc.what());
-    return false;
-  }
-  
-  XAO::Geometry* xaoGeometry = xaoObject->getGeometry();
-  if (xaoGeometry == NULL)
-  {
-    delete xaoObject;
-    SetErrorCode("Cannot import XAO: geometry format not supported.");
-    return false;
-  }
-  
-  // create the shape
-  shape = GetEngine()->AddObject(GetDocID(), GEOM_IMPORT);
-  Handle(GEOM_Function) function = shape->AddFunction(GEOMImpl_XAODriver::GetID(), IMPORTEXPORT_EXPORTXAO);
-  if (function.IsNull()) return false;
-  if (function->GetDriverGUID() != GEOMImpl_XAODriver::GetID()) return false;
-  
-  // set the geometry
-  if (xaoGeometry->getFormat() == XAO::BREP)
-  {
-    XAO::BrepGeometry* brep = (XAO::BrepGeometry*)xaoGeometry;
-    TopoDS_Shape geomShape = brep->getTopoDS_Shape();
-    function->SetValue(geomShape);
-    shape->SetName(xaoGeometry->getName().c_str());
-  }
-  else
-  {
-    delete xaoObject;
-    SetErrorCode("Cannot import XAO: geometry format not supported.");
-    return false;
-  }
-  
-  // create sub shapes with names
-  importSubShapes(xaoGeometry, function, GEOM_POINT, XAO::VERTEX, subShapes);
-  importSubShapes(xaoGeometry, function, GEOM_EDGE, XAO::EDGE, subShapes);
-  importSubShapes(xaoGeometry, function, GEOM_FACE, XAO::FACE, subShapes);
-  importSubShapes(xaoGeometry, function, GEOM_SOLID, XAO::SOLID, subShapes);
-  
-  // create groups
-  int nbGroups = xaoObject->countGroups();
-  for (int i = 0; i < nbGroups; ++i)
-  {
-    XAO::Group* xaoGroup = xaoObject->getGroup(i);
-    
-    // build an array with the indexes of the sub shapes
-    int nbElt = xaoGroup->count();
-    Handle(TColStd_HArray1OfInteger) array = new TColStd_HArray1OfInteger(1, nbElt);
-    int j = 0;
-    for (std::set<int>::iterator it = xaoGroup->begin(); it != xaoGroup->end(); ++it)
-    {
-      int index = (*it);
-      std::string ref = xaoGeometry->getElementReference(xaoGroup->getDimension(), index);
-      array->SetValue(++j, XAO::XaoUtils::stringToInt(ref));
-    }
-    
-    // create the group with the array of sub shapes indexes
-    Handle(GEOM_Object) group = GetEngine()->AddSubShape(shape, array);
-    group->SetType(GEOM_GROUP);
-    group->SetName(xaoGroup->getName().c_str());
-    
-    // Set a sub-shape type
-    TDF_Label freeLabel = group->GetFreeLabel();
-    TDataStd_Integer::Set(freeLabel, (Standard_Integer) getGroupDimension(xaoGroup));
-    groups->Append(group);
-    
-    function = group->GetLastFunction();
-  }
-  
-  // create the fields
-  int nbFields = xaoObject->countFields();
-  for (int i = 0; i < nbFields; ++i)
-  {
-    XAO::Field* xaoField = xaoObject->getField(i);
-
-    Handle(TColStd_HArray1OfExtendedString) components = new TColStd_HArray1OfExtendedString(0, xaoField->countComponents()-1);
-    for (int j = 0; j < xaoField->countComponents(); ++j)
-    {
-        components->SetValue(j, (TCollection_ExtendedString)xaoField->getComponentName(j).c_str());
-    }
-
-    Handle(GEOM_Field) field = myFieldOperations->CreateField(shape,
-                 xaoField->getName().c_str(),
-                 (int)xaoField->getType(),
-                 (int)xaoField->getDimension(),
-                 components);
-
-    switch (xaoField->getType())
-    {
-        case XAO::BOOLEAN:
-        {
-            XAO::BooleanField* bfield = (XAO::BooleanField*)xaoField;
-            for (int j = 0; j < xaoField->countSteps(); ++j)
-            {
-                XAO::BooleanStep* bstep = bfield->getStep(j);
-                Handle(GEOM_FieldStep) step = field->AddStep(bstep->getStep(), bstep->getStamp());
-
-                Handle(TColStd_HArray1OfInteger) values = new TColStd_HArray1OfInteger(0, bstep->countValues()-1);
-                std::vector<bool> bvalues = bstep->getValues();
-                for (int k = 0; k < bstep->countValues(); ++k)
-                {
-                    values->SetValue(k, bvalues[k] ? 1 : 0);
-                }
-                step->SetValues(values);
-            }
-            break;
-        }
-        case XAO::INTEGER:
-        {
-            XAO::IntegerField* ifield = (XAO::IntegerField*)xaoField;
-            for (int j = 0; j < xaoField->countSteps(); ++j)
-            {
-                XAO::IntegerStep* istep = ifield->getStep(j);
-                Handle(GEOM_FieldStep) step = field->AddStep(istep->getStep(), istep->getStamp());
-
-                Handle(TColStd_HArray1OfInteger) values = new TColStd_HArray1OfInteger(0, istep->countValues()-1);
-                std::vector<int> ivalues = istep->getValues();
-                for (int k = 0; k < istep->countValues(); ++k)
-                {
-                    values->SetValue(k, ivalues[k]);
-                }
-                step->SetValues(values);
-            }
-            break;
-        }
-        case XAO::DOUBLE:
-        {
-            XAO::DoubleField* dfield = (XAO::DoubleField*)xaoField;
-            for (int j = 0; j < xaoField->countSteps(); ++j)
-            {
-                XAO::DoubleStep* dstep = dfield->getStep(j);
-                Handle(GEOM_FieldStep) step = field->AddStep(dstep->getStep(), dstep->getStamp());
-
-                Handle(TColStd_HArray1OfReal) values = new TColStd_HArray1OfReal(0, dstep->countValues()-1);
-                std::vector<double> dvalues = dstep->getValues();
-                for (int k = 0; k < dstep->countValues(); ++k)
-                {
-                    values->SetValue(k, dvalues[k]);
-                }
-                step->SetValues(values);
-            }
-            break;
-        }
-        case XAO::STRING:
-        {
-            XAO::StringField* sfield = (XAO::StringField*)xaoField;
-            for (int j = 0; j < xaoField->countSteps(); ++j)
-            {
-                XAO::StringStep* sstep = sfield->getStep(j);
-                Handle(GEOM_FieldStep) step = field->AddStep(sstep->getStep(), sstep->getStamp());
-
-                Handle(TColStd_HArray1OfExtendedString) values = new TColStd_HArray1OfExtendedString(0, sstep->countValues()-1);
-                std::vector<std::string> svalues = sstep->getValues();
-                for (int k = 0; k < sstep->countValues(); ++k)
-                {
-                    values->SetValue(k, TCollection_ExtendedString(svalues[k].c_str()));
-                }
-                step->SetValues(values);
-            }
-            break;
-        }
-    }
-
-    fields->Append(field);
-  }
-  
-  // make a Python command
-  GEOM::TPythonDump pd(function);
-  pd << "(imported, " << shape << ", ";
-  
-  // list of sub shapes
-  pd << "[";
-  int nbSubshapes = subShapes->Length();
-  if (nbSubshapes > 0)
-  {
-    for (int i = 1; i <= nbSubshapes; i++)
-    {
-      Handle(GEOM_Object) obj = Handle(GEOM_Object)::DownCast(subShapes->Value(i));
-      pd << obj << ((i < nbSubshapes) ? ", " : "");
-    }
-  }
-  pd << "], [";
-  
-  // list of groups
-  if (nbGroups > 0)
-  {
-    for (int i = 1; i <= nbGroups; i++)
-    {
-      Handle(GEOM_Object) obj = Handle(GEOM_Object)::DownCast(groups->Value(i));
-      pd << obj << ((i < nbGroups) ? ", " : "");
-    }
-  }
-  
-  pd << "], [";
-  
-  // list of fields
-  if (nbFields > 0)
-  {
-    for (int i = 1; i <= nbFields; i++)
-    {
-      Handle(GEOM_Field) obj = Handle(GEOM_Field)::DownCast(fields->Value(i));
-      pd << obj << ((i < nbFields) ? ", " : "");
-    }
-  }
-  pd << "]";
-  pd << ") = geompy.ImportXAO(\"" << fileName << "\")";
-  
-  delete xaoObject;
-  SetErrorCode(OK);
-  
-  return true;
-}
-
-//=============================================================================
-/*!
- *  This method creates material groups for an imported object.
- *  \param theObject the imported object.
- */
-//=============================================================================
-void GEOMImpl_IInsertOperations::MakeMaterialGroups
-                        (const Handle(GEOM_Object) &theObject,
-                         const Handle(TColStd_HSequenceOfTransient) &theSeq)
-{
-  TopoDS_Shape aResShape = theObject->GetValue();
-
-  if (aResShape.IsNull() == Standard_False) {
-    // Group shapes by material names.
-    Handle(GEOM_Function)      aFunction = theObject->GetLastFunction();
-    DataMapOfStringListOfShape aMapMaterialShapes;
-
-    // check all named shapes using iterator
-    TDF_ChildIDIterator anIt (aFunction->GetNamingEntry(),
-        TNaming_NamedShape::GetID(), Standard_True);
-
-    for (; anIt.More(); anIt.Next()) {
-      Handle(TNaming_NamedShape) anAttr =
-          Handle(TNaming_NamedShape)::DownCast(anIt.Value());
-
-      if (anAttr.IsNull() == Standard_False) {
-        TDF_Label                aLabel = anAttr->Label();
-        Handle(TDataStd_Comment) aComment;
-
-        if (aLabel.FindAttribute(TDataStd_Comment::GetID(), aComment)) {
-          TCollection_ExtendedString aMatName = aComment->Get();
-          TopoDS_Shape               aShape   = anAttr->Get();
-
-          if (aMapMaterialShapes.IsBound(aMatName) == Standard_False) {
-            NCollection_List<TopoDS_Shape> anEmptyList;
-
-            aMapMaterialShapes.Bind(aMatName, anEmptyList);
-          }
-
-          aMapMaterialShapes(aMatName).Append(aShape);
-        }
-      }
-    }
-
-    if (aMapMaterialShapes.IsEmpty() == Standard_False) {
-      // Construct groups.
-      TopAbs_ShapeEnum aType = aResShape.ShapeType();
-      Standard_Integer i;
-      DataMapOfStringListOfShape::Iterator aMapIter;
-
-      // Check each shape type.
-      for(i = aType; i <= TopAbs_VERTEX; i++) {
-        DataMapOfStringListOfShape::Iterator aMapIter(aMapMaterialShapes);
-
-        for (; aMapIter.More(); aMapIter.Next()) {
-          NCollection_List<TopoDS_Shape> &aShList = aMapIter.ChangeValue();
-          NCollection_List<TopoDS_Shape>::Iterator aShIter(aShList);
-          NCollection_List<TopoDS_Shape>  aShListSameType;
-
-          while (aShIter.More()) {
-            const TopoDS_Shape &aShape = aShIter.Value();
-
-            if (i == aShape.ShapeType()) {
-              // Treat this element.
-              aShListSameType.Append(aShape);
-              aShList.Remove(aShIter);
-            } else {
-              // Go to the next element.
-              aShIter.Next();
-            }
-          }
-
-          if (aShListSameType.IsEmpty() == Standard_False) {
-            // Construct a group.
-            Handle(GEOM_Object) aGroup =
-              MakeGroup(theObject, aMapIter.Key(), aShListSameType);
-
-            if (aGroup.IsNull() == Standard_False) {
-              theSeq->Append(aGroup);
-            }
-          }
-        }
-      }
-    }
-  }
-}
-
-
-//=============================================================================
-/*!
- *  This method creates a group of shapes of certain type.
- *  \param theObject the imported object.
- *  \param theName the material name.
- *  \param theShapes the list of shapes to be added to this group.
- *  \return the created group.
- */
-//=============================================================================
-Handle(GEOM_Object) GEOMImpl_IInsertOperations::MakeGroup
-                  (const Handle(GEOM_Object)            &theObject,
-                   const TCollection_ExtendedString     &theName,
-                   const NCollection_List<TopoDS_Shape> &theShapes)
-{
-  Handle(GEOM_Object)                aGroup;
-  TopTools_IndexedMapOfShape         anIndices;
-  Handle(TColStd_HSequenceOfInteger) aSeqIDs = new TColStd_HSequenceOfInteger;
-  NCollection_List<TopoDS_Shape>::Iterator anIter(theShapes);
-
-  TopExp::MapShapes(theObject->GetValue(), anIndices);
-
-  // Compose shape IDs.
-  for (; anIter.More(); anIter.Next()) {
-    const TopoDS_Shape &aShape = anIter.Value();
-    const Standard_Integer anIndex = anIndices.FindIndex(aShape);
-
-    if (anIndex > 0) {
-      aSeqIDs->Append(anIndex);
-    }
-  }
-
-  if (aSeqIDs->IsEmpty() == Standard_False) {
-    // Create a group.
-    const TopAbs_ShapeEnum aType  = theShapes.First().ShapeType();
-
-    aGroup = myGroupOperations->CreateGroup(theObject, aType);
-
-    if (aGroup.IsNull() == Standard_False) {
-      aGroup->GetLastFunction()->SetDescription("");
-      myGroupOperations->UnionIDs(aGroup, aSeqIDs);
-      aGroup->GetLastFunction()->SetDescription("");
-
-      // Compose the group name.
-      TCollection_AsciiString aGroupName(theName);
-
-      switch(aType) {
-        case TopAbs_VERTEX:
-          aGroupName += "_VERTEX";
-          break;
-        case TopAbs_EDGE:
-          aGroupName += "_EDGE";
-          break;
-        case TopAbs_WIRE:
-          aGroupName += "_WIRE";
-          break;
-        case TopAbs_FACE:
-          aGroupName += "_FACE";
-          break;
-        case TopAbs_SHELL:
-          aGroupName += "_SHELL";
-          break;
-        case TopAbs_SOLID:
-          aGroupName += "_SOLID";
-          break;
-        case TopAbs_COMPSOLID:
-          aGroupName += "_COMPSOLID";
-          break;
-        case TopAbs_COMPOUND:
-          aGroupName += "_COMPOUND";
-          break;
-        default:
-          aGroupName += "_SHAPE";
-          break;
-      }
-
-      aGroup->SetName(aGroupName.ToCString());
-    }
-  }
-
-  return aGroup;
-}
index 93a147a389abc9eda3a203b59c218c3b8cd2cfe4..9341c2b8da8a4edf542cb3feb123b85e79bea207 100644 (file)
@@ -47,15 +47,6 @@ class GEOMImpl_IFieldOperations;
 
 class Handle_TColStd_HArray1OfByte;
 
-namespace XAO {
-  class Geometry;
-  class BrepGeometry;
-  class Xao;
-}
-
-typedef NCollection_DataMap<TCollection_ExtendedString, NCollection_List<TopoDS_Shape> >
-        DataMapOfStringListOfShape;
-
 class GEOMImpl_IInsertOperations : public GEOM_IOperations {
  public:
   Standard_EXPORT GEOMImpl_IInsertOperations(GEOM_Engine* theEngine, int theDocID);
@@ -76,16 +67,6 @@ class GEOMImpl_IInsertOperations : public GEOM_IOperations {
                                const TCollection_AsciiString& theFileName,
                                const TCollection_AsciiString& theFormatType);
   
-  Standard_EXPORT Standard_Boolean ImportTranslators (Handle(TColStd_HSequenceOfAsciiString)& theFormats,
-                                                      Handle(TColStd_HSequenceOfAsciiString)& thePatterns);
-  
-  Standard_EXPORT Standard_Boolean ExportTranslators (Handle(TColStd_HSequenceOfAsciiString)& theFormats,
-                                                      Handle(TColStd_HSequenceOfAsciiString)& thePatterns);
-  
-  Standard_EXPORT Standard_Boolean IsSupported (const Standard_Boolean isImport,
-                                                const TCollection_AsciiString& theFormat,
-                                                Handle(TCollection_HAsciiString)& theLibName);
-  
   Standard_EXPORT Handle(GEOM_Object) RestoreShape (std::istringstream& theStream);
   
   Standard_EXPORT int LoadTexture(const TCollection_AsciiString& theTextureFile);
@@ -98,38 +79,6 @@ class GEOMImpl_IInsertOperations : public GEOM_IOperations {
 
   Standard_EXPORT std::list<int> GetAllTextures();
 
-  Standard_EXPORT bool ExportXAO(Handle(GEOM_Object) shape,
-                                 std::list<Handle(GEOM_Object)> groupList,
-                                 std::list<Handle(GEOM_Field)> fieldList,
-                                 const char* author,
-                                 const char* fileName);
-
-  Standard_EXPORT bool ImportXAO(const char* fileName,
-                                 Handle(GEOM_Object)& shape,
-                                 Handle(TColStd_HSequenceOfTransient)& subShapes,
-                                 Handle(TColStd_HSequenceOfTransient)& groups,
-                                 Handle(TColStd_HSequenceOfTransient)& fields);
-
- private:
-  Standard_Boolean InitResMgr ();
-
-  void importSubShapes(XAO::Geometry* xaoGeometry, Handle(GEOM_Function) function,
-                       int shapeType, int dim,
-                       Handle(TColStd_HSequenceOfTransient)& subshapeList);
-  void exportSubshapes(const Handle(GEOM_Object)& shape, XAO::BrepGeometry* geometry);
-  void exportFields(std::list<Handle(GEOM_Field)> fieldList, XAO::Xao* xaoObject,
-                    XAO::BrepGeometry* geometry);
-  void exportGroups(std::list<Handle(GEOM_Object)> groupList, XAO::Xao* xaoObject,
-                    XAO::BrepGeometry* geometry);
-
-  void MakeMaterialGroups(const Handle(GEOM_Object)                  &theObject,
-                          const Handle(TColStd_HSequenceOfTransient) &theSeq);
-
-  Handle(GEOM_Object) MakeGroup
-                         (const Handle(GEOM_Object)            &theObject,
-                          const TCollection_ExtendedString     &theName,
-                          const NCollection_List<TopoDS_Shape> &theShapes);
-
  private:
   std::vector<Handle(Resource_Manager)> myResMgrList;
   GEOMImpl_IShapesOperations* myShapesOperations;
index 8bc4768d5ebada6c1cb66eb26fddccf5c7ba178c..0cf9dd339f55ad7e1832c97600e10b5826e43e0c 100644 (file)
@@ -121,7 +121,7 @@ GEOMImpl_IMeasureOperations::ShapeKind GEOMImpl_IMeasureOperations::KindOfShape
   int geom_type = theShape->GetType();
 
   // check if it's advanced shape
-  if ( geom_type > ADVANCED_BASE ) {
+  if ( geom_type > USER_TYPE ) {
     SetErrorCode(OK);
     return SK_ADVANCED;
   }
index ba9b6470f2e1cd9ddf8145fded5bb45bd6e1fd2c..fab086b96478dc14abaa44e28393963fee2c8b3b 100644 (file)
@@ -1129,9 +1129,38 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeGlueEdgesByList
  *  GetExistingSubObjects
  */
 //=============================================================================
-Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetExistingSubObjects
-                                          (Handle(GEOM_Object)    theShape,
-                                           const Standard_Boolean theGroupsOnly)
+Handle(TColStd_HSequenceOfTransient)
+GEOMImpl_IShapesOperations::GetExistingSubObjects(Handle(GEOM_Object)    theShape,
+                                                 const Standard_Boolean theGroupsOnly)
+{
+  // note: this method does not return fields
+
+  Standard_Integer types = theGroupsOnly ? Groups : Groups|SubShapes;
+  Handle(TColStd_HSequenceOfTransient) results = GetExistingSubObjects(theShape, types);
+
+  if (results->Length() > 0) {
+    //Make a Python command
+    TCollection_AsciiString anAsciiList;
+    for (int i = 1; i <= results->Length(); i++)
+    {
+      Handle(GEOM_BaseObject) obj = Handle(GEOM_BaseObject)::DownCast( results->Value(i));
+      obj->GetEntryString();
+      if ( i < results->Length() )
+       anAsciiList += ",";
+    }
+    
+    GEOM::TPythonDump pd (theShape->GetLastFunction(), /*append=*/true);
+    pd << "[" << anAsciiList.ToCString();
+    pd << "] = geompy.GetExistingSubObjects(";
+    pd << theShape << ", " << (bool)theGroupsOnly << ")";
+  }
+
+  return results;
+}
+
+Handle(TColStd_HSequenceOfTransient)
+GEOMImpl_IShapesOperations::GetExistingSubObjects(Handle(GEOM_Object)    theShape,
+                                                 const Standard_Integer theTypes)
 {
   SetErrorCode(KO);
 
@@ -1149,8 +1178,6 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetExistingSubO
 
   SetErrorCode(KO);
 
-  TCollection_AsciiString anAsciiList;
-
   TDataStd_ListIteratorOfListOfExtendedString anIt (aListEntries);
   for (; anIt.More(); anIt.Next()) {
     TCollection_ExtendedString anEntry = anIt.Value();
@@ -1158,13 +1185,14 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetExistingSubO
     char* anEntryStr = new char[aStrLen+1];
     anEntry.ToUTF8CString(anEntryStr);
     Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(GetDocID(), anEntryStr, false);
-    if (!anObj.IsNull() && anObj->IsKind(STANDARD_TYPE(GEOM_Object))) {
-      if (!theGroupsOnly || anObj->GetType() == GEOM_GROUP) {
+    if (!anObj.IsNull() ) {
+      bool isGroup    = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() == GEOM_GROUP;
+      bool isSubShape = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() != GEOM_GROUP;
+      bool isField    = anObj->IsKind(STANDARD_TYPE(GEOM_Field));
+      if (theTypes & Groups    && isGroup ||
+         theTypes & SubShapes && isSubShape ||
+         theTypes & Fields    && isField) {
         aSeq->Append(anObj);
-
-        // for python command
-        anAsciiList += anEntryStr;
-        anAsciiList += ",";
       }
     }
     delete [] anEntryStr;
@@ -1175,14 +1203,6 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetExistingSubO
     return aSeq;
   }
 
-  //Make a Python command
-  anAsciiList.Trunc(anAsciiList.Length() - 1);
-
-  GEOM::TPythonDump pd (aMainShape, /*append=*/true);
-  pd << "[" << anAsciiList.ToCString();
-  pd << "] = geompy.GetExistingSubObjects(";
-  pd << theShape << ", " << (bool)theGroupsOnly << ")";
-
   SetErrorCode(OK);
 
   return aSeq;
index e620817feaf4f3a5ad3538d399c11f2b741557e2..d12642a36ed980a532aedc92e631867acd4d69a6 100644 (file)
@@ -54,6 +54,15 @@ class Handle(TColStd_HArray1OfInteger);
 class GEOMImpl_IShapesOperations : public GEOM_IOperations
 {
  public:
+
+  enum SubShapeType {
+    None      = 0x00,
+    Groups    = 0x01,
+    Fields    = 0x02,
+    SubShapes = 0x04,
+    All       = Groups | Fields | SubShapes,
+  };
+
   Standard_EXPORT GEOMImpl_IShapesOperations(GEOM_Engine* theEngine, int theDocID);
   Standard_EXPORT ~GEOMImpl_IShapesOperations();
 
@@ -106,10 +115,11 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations
                                                            const Standard_Real theTolerance,
                                                            std::list<Handle(GEOM_Object)> theEdges);
 
-  Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects
-    (Handle(GEOM_Object)    theShape,
-     const Standard_Boolean theGroupsOnly);
-
+  Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects(Handle(GEOM_Object)    theShape,
+                                                                            const Standard_Boolean theGroupsOnly);
+  Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetExistingSubObjects(Handle(GEOM_Object)    theShape,
+                                                                            const Standard_Integer theTypes = All);
+  
   enum ExplodeType {
     EXPLODE_OLD_INCLUDE_MAIN,
     EXPLODE_NEW_INCLUDE_MAIN,
index 768690584d2a2a35c07457719f4bbfa7a4721f6c..86b3f32e64d9539fe9a5d8a903b3446d9da2d877 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-#include <Standard_Stream.hxx>
+// internal includes
+#include "GEOMImpl_ImportDriver.hxx"
+#include "GEOMImpl_IImportExport.hxx"
+#include "GEOMImpl_IECallBack.hxx"
+#include "GEOMImpl_Types.hxx"
 
-#include <GEOMImpl_ImportDriver.hxx>
-#include <GEOMImpl_IImportExport.hxx>
-#include <GEOMImpl_Types.hxx>
+// GEOM includes
 #include <GEOM_Function.hxx>
 
+// OCC includes
+#include <Standard_Stream.hxx>
 #include <TopoDS_Shape.hxx>
 
-#include <TCollection_HAsciiString.hxx>
-
-#include "utilities.h"
-
-#include <Standard_Failure.hxx>
-#include <StdFail_NotDone.hxx>
-
-#ifdef WIN32
-#include <windows.h>
-#else
-#include <dlfcn.h>
-#endif
-
-#ifdef WIN32
-#define LibHandle HMODULE
-#define LoadLib( name ) LoadLibrary( name )
-#define GetProc GetProcAddress
-#define UnLoadLib( handle ) FreeLibrary( handle );
-#else
-#define LibHandle void*
-#define LoadLib( name ) dlopen( name, RTLD_LAZY )
-#define GetProc dlsym
-#define UnLoadLib( handle ) dlclose( handle );
-#endif
-
-typedef TopoDS_Shape (*funcPoint)(const TCollection_AsciiString&,
-                                  const TCollection_AsciiString&,
-                                  TCollection_AsciiString&,
-                                  const TDF_Label&);
-
-typedef Handle(TCollection_HAsciiString) (*pGetValue)(const TCollection_AsciiString&,
-                                                      const TCollection_AsciiString&,
-                                                      TCollection_AsciiString&);
-
 //=======================================================================
 //function : GetID
 //purpose  :
@@ -91,104 +61,26 @@ Standard_Integer GEOMImpl_ImportDriver::Execute(TFunction_Logbook& log) const
   Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
 
   GEOMImpl_IImportExport aCI (aFunction);
-  //Standard_Integer aType = aFunction->GetType();
 
   // retrieve the file and plugin library names
   TCollection_AsciiString aFileName   = aCI.GetFileName();
   TCollection_AsciiString aFormatName = aCI.GetFormatName();
-  TCollection_AsciiString aLibName    = aCI.GetPluginName();
-  if (aFileName.IsEmpty() || aFormatName.IsEmpty() || aLibName.IsEmpty())
+  if (aFileName.IsEmpty() || aFormatName.IsEmpty() )
     return 0;
 
-  // load plugin library
-  LibHandle anImportLib = LoadLib( aLibName.ToCString() ); //This is workaround of BUG OCC13051
-
-  // Get Import method
-  funcPoint fp = 0;
-  if ( anImportLib )
-    fp = (funcPoint)GetProc( anImportLib, "Import" );
-
-  if ( !fp ) {
-    TCollection_AsciiString aMsg = aFormatName.SubString(1,4);
-    aMsg += " plugin was not installed";
-    Standard_Failure::Raise(aMsg.ToCString());
-  }
-
-  // perform the import
-  TCollection_AsciiString anError;
-  TopoDS_Shape aShape = fp(aFileName, aFormatName, anError, aFunction->GetNamingEntry());
-
-  // unload plugin library
-  // commented by enk:
-  // the bug was occured: using ACIS Import/Export plugin
-  //UnLoadLib( anImportLib ); //This is workaround of BUG OCC13051
-
-  if ( aShape.IsNull() ) {
-    StdFail_NotDone::Raise(anError.ToCString());
+  Handle(TColStd_HSequenceOfTransient) aSeq =
+    GEOMImpl_IECallBack::GetCallBack( aFormatName )->Import( GetDocID(), aFormatName, aFileName );
+  if( aSeq.IsNull() )
     return 0;
-  }
-
-  // set the function result
-  aFunction->SetValue(aShape);
 
+  Handle(GEOM_Object) anImported = Handle(GEOM_Object)::DownCast( aSeq->Value(1) );
+  TopoDS_Shape aShape = anImported->GetValue();
+  aFunction->SetValue( aShape );
   log.SetTouched(Label());
 
   return 1;
 }
 
-//=======================================================================
-//function : ReadValue
-//purpose  :
-//=======================================================================
-TCollection_AsciiString GEOMImpl_ImportDriver::ReadValue(const TCollection_AsciiString& theFileName,
-                                                         const TCollection_AsciiString& theLibName,
-                                                         const TCollection_AsciiString& theParameterName,
-                                                         TCollection_AsciiString& theError)
-{
-  TCollection_AsciiString aValue;
-
-  if (theFileName.IsEmpty() || theLibName.IsEmpty() || theParameterName.IsEmpty())
-    return aValue;
-
-  // load plugin library
-  LibHandle anImportLib = LoadLib(theLibName.ToCString()); //This is workaround of BUG OCC13051
-  if (!anImportLib) {
-    theError = theLibName + " library was not installed";
-    return aValue;
-  }
-
-  // Get GetValue method
-  pGetValue pGV = (pGetValue)GetProc(anImportLib, "GetValue");
-
-  if (!pGV) {
-    theError = theLibName + " library doesn't support GetValue method";
-    return aValue;
-  }
-
-  Handle(TCollection_HAsciiString) aHValue = pGV(theFileName, theParameterName, theError);
-
-  if (aHValue.IsNull()) {
-    if (theError.IsEmpty())
-      theError = theFileName + " doesn't contain requested parameter";
-    return aValue;
-  }
-
-  aValue = aHValue->String();
-
-  // unload plugin library
-  // commented by enk:
-  // the bug was occured: using ACIS Import/Export plugin
-  //UnLoadLib( anImportLib ); //This is workaround of BUG OCC13051
-
-  return aValue;
-}
-
-//================================================================================
-/*!
- * \brief Returns a name of creation operation and names and values of creation parameters
- */
-//================================================================================
-
 bool GEOMImpl_ImportDriver::
 GetCreationInformation(std::string&             theOperationName,
                        std::vector<GEOM_Param>& theParams)
index 47dbb356ffac416b77e8dc5c7b1419ba6097f312..c6e4b7b6845747109afb4ce436d542c65f4cd111 100644 (file)
 #ifndef _GEOMImpl_ImportDriver_HeaderFile
 #define _GEOMImpl_ImportDriver_HeaderFile
 
-#ifndef _TColStd_SequenceOfExtendedString_HeaderFile
-#include <TColStd_SequenceOfExtendedString.hxx>
-#endif
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
 
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
 #ifndef _Standard_GUID_HeaderFile
 #include <Standard_GUID.hxx>
 #endif 
@@ -82,13 +66,6 @@ Standard_EXPORT ~GEOMImpl_ImportDriver() {};
   Standard_EXPORT virtual
   bool GetCreationInformation(std::string&             theOperationName,
                               std::vector<GEOM_Param>& params);
-
-  // Static method
-  Standard_EXPORT static TCollection_AsciiString ReadValue (const TCollection_AsciiString& theFileName,
-                                                            const TCollection_AsciiString& theLibName,
-                                                            const TCollection_AsciiString& theParameterName,
-                                                            TCollection_AsciiString& theError);
-
 DEFINE_STANDARD_RTTI( GEOMImpl_ImportDriver )
 };
 
index 3f0f0c986af127b8973e557244905f380c18849c..5f580ddb95ef9f38a6fdeb56811dbe0045affe50 100644 (file)
@@ -152,6 +152,26 @@ static GeomFill_Trihedron EvaluateBestSweepMode(const TopoDS_Shape& Spine)
   return theMode;
 }
 
+//=======================================================================
+//function : BuildPipeShell
+//purpose  : Builds a pipe shell. If failed, try to build in Descrete Trihedron
+//           mode. Returns Standard_True if the building is done successfully.
+//=======================================================================
+static Standard_Boolean BuildPipeShell(BRepOffsetAPI_MakePipeShell &theBuilder)
+{
+  theBuilder.Build();
+
+  Standard_Boolean isDone = theBuilder.IsDone();
+
+  if (!isDone) {
+    // Try to use Descrete Trihedron mode.
+    theBuilder.SetDiscreteMode();
+    theBuilder.Build();
+    isDone = theBuilder.IsDone();
+  }
+
+  return isDone;
+}
 
 //=======================================================================
 //function : FillForOtherEdges
@@ -256,7 +276,9 @@ static bool FillCorrespondingEdges(const TopoDS_Shape& FS1,
   if (!aBuilder.IsReady()) {
     return false;
   }
-  aBuilder.Build();
+
+  BuildPipeShell(aBuilder);
+
   TopoDS_Shape aShape = aBuilder.Shape();
   /*
   TopoDS_Compound C;
@@ -930,7 +952,9 @@ TopoDS_Shape GEOMImpl_PipeDriver::CreatePipeWithDifferentSections
         if (!aBuilder.IsReady()) {
           Standard_ConstructionError::Raise("Invalid input data for building PIPE: bases are invalid");
         }
-        aBuilder.Build();
+
+        BuildPipeShell(aBuilder);
+
         TopoDS_Shape resShape = aBuilder.Shape();
         aSeqRes.Append(resShape);
       }
@@ -961,7 +985,9 @@ TopoDS_Shape GEOMImpl_PipeDriver::CreatePipeWithDifferentSections
       if (!aBuilder.IsReady()) {
         Standard_ConstructionError::Raise("Invalid input data for building PIPE: bases are invalid");
       }
-      aBuilder.Build();
+
+      BuildPipeShell(aBuilder);
+
       TopoDS_Shape resShape = aBuilder.Shape();
       aSeqRes.Append(resShape);
       // make sewing for result
@@ -1014,9 +1040,7 @@ TopoDS_Shape GEOMImpl_PipeDriver::CreatePipeWithDifferentSections
       
         aBuilder.SetTolerance(aTolConf, aTolConf, aTolAng);
 
-        aBuilder.Build();
-
-        Standard_Boolean isDone = aBuilder.IsDone();
+        Standard_Boolean isDone = BuildPipeShell(aBuilder);
 
         if (isDone && NeedCreateSolid) {
           isDone = aBuilder.MakeSolid();
@@ -1512,7 +1536,9 @@ static TopoDS_Shape CreatePipeForShellSections(const TopoDS_Wire& aWirePath,
           if (aCI) delete aCI;
           Standard_ConstructionError::Raise("Invalid input data for building PIPE: bases are invalid");
         }
-        aBuilder.Build();
+
+        BuildPipeShell(aBuilder);
+
         TopoDS_Shape aShape = aBuilder.Shape();
         TopoDS_Shell aShell;
         B.MakeShell(aShell);
@@ -1750,7 +1776,9 @@ static TopoDS_Shape CreatePipeForShellSections(const TopoDS_Wire& aWirePath,
             if (aCI) delete aCI;
             Standard_ConstructionError::Raise("Invalid input data for building PIPE: bases are invalid");
           }
-          aBuilder.Build();
+
+          BuildPipeShell(aBuilder);
+
           TopoDS_Shape aShape = aBuilder.Shape();
           TopoDS_Shell aShell;
           B.MakeShell(aShell);
@@ -2333,8 +2361,10 @@ static TopoDS_Shape CreatePipeBiNormalAlongVector(const TopoDS_Wire& aWirePath,
   gp_Vec aVec(BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2));
   gp_Dir BiNormal(aVec);
   PipeBuilder.SetMode(BiNormal);
-  PipeBuilder.Build();
-  if (aShapeBase.ShapeType() == TopAbs_FACE) {
+
+  Standard_Boolean isDone = BuildPipeShell(PipeBuilder);
+
+  if (isDone && aShapeBase.ShapeType() == TopAbs_FACE) {
       PipeBuilder.MakeSolid();
   }
 
@@ -2444,9 +2474,10 @@ Standard_Integer GEOMImpl_PipeDriver::Execute (TFunction_Logbook& log) const
       if (FaceBuilder.IsDone())
         Sweep.SetMode(FaceBuilder.Face());
       Sweep.Add(Profile);
-      Sweep.Build();
-      
-      if (!Sweep.IsDone())
+
+      Standard_Boolean isDone = BuildPipeShell(Sweep);
+
+      if (!isDone)
       {
         if (aCI) delete aCI;
         Standard_ConstructionError::Raise("MakePipeShell failed");
@@ -2458,7 +2489,19 @@ Standard_Integer GEOMImpl_PipeDriver::Execute (TFunction_Logbook& log) const
     else
     {
       GeomFill_Trihedron theBestMode = EvaluateBestSweepMode(aWirePath);
-      aShape = BRepOffsetAPI_MakePipe(aWirePath, aShapeBase, theBestMode);
+      BRepOffsetAPI_MakePipe aMkPipe(aWirePath, aShapeBase, theBestMode);
+
+      if (aMkPipe.IsDone()) {
+        aShape = aMkPipe.Shape();
+      } else if (theBestMode != GeomFill_IsDiscreteTrihedron) {
+        // Try to use Descrete Trihedron mode.
+        BRepOffsetAPI_MakePipe aMkPipeDescrete
+          (aWirePath, aShapeBase, GeomFill_IsDiscreteTrihedron);
+
+        if (aMkPipeDescrete.IsDone()) {
+          aShape = aMkPipeDescrete.Shape();
+        }
+      }
     }
   }
 
index 96f0bb6c69673b70da933c6c208e96d666c832fc..037e6290005ccdc7adc7d9dd14689d903605c213 100644 (file)
@@ -44,6 +44,7 @@
 #include <BRepBuilderAPI_Sewing.hxx>
 #include <BRepBuilderAPI_MakeWire.hxx>
 #include <BRepBuilderAPI_MakeEdge.hxx>
+#include <BRepBuilderAPI_MakeSolid.hxx>
 #include <BRepCheck.hxx>
 #include <BRepCheck_Analyzer.hxx>
 #include <BRepCheck_Shell.hxx>
 #include <Standard_TypeMismatch.hxx>
 #include <Standard_ConstructionError.hxx>
 
+// Uncomment this definition to check if type of created shape is the same
+// as expected. For further details please see the Mantis issue
+// http://salome.mantis.opencascade.com/view.php?id=22674 
+//#define RESULT_TYPE_CHECK
+
 //modified by NIZNHY-PKV Wed Dec 28 13:48:20 2011f
 //static
 //  void KeepEdgesOrder(const Handle(TopTools_HSequenceOfShape)& aEdges,
@@ -133,10 +139,17 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
 
   TopoDS_Shape aShape;
   TCollection_AsciiString aWarning;
+#ifdef RESULT_TYPE_CHECK
+  TopAbs_ShapeEnum anExpectedType = TopAbs_SHAPE;
+#endif
 
   BRep_Builder B;
 
   if (aType == WIRE_EDGES) {
+#ifdef RESULT_TYPE_CHECK
+    anExpectedType = TopAbs_WIRE;
+#endif
+
     Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes();
 
     Standard_Real aTolerance = aCI.GetTolerance();
@@ -146,6 +159,10 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
     aShape = MakeWireFromEdges(aShapes, aTolerance);
   }
   else if (aType == FACE_WIRE) {
+#ifdef RESULT_TYPE_CHECK
+    anExpectedType = TopAbs_FACE;
+#endif
+
     Handle(GEOM_Function) aRefBase = aCI.GetBase();
     TopoDS_Shape aShapeBase = aRefBase->GetValue();
     if (aShapeBase.IsNull()) Standard_NullObject::Raise("Argument Shape is null");
@@ -179,6 +196,10 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
     }
   }
   else if (aType == FACE_WIRES) {
+#ifdef RESULT_TYPE_CHECK
+    anExpectedType = TopAbs_FACE;
+#endif
+
     // Try to build a face from a set of wires and edges
     int ind;
 
@@ -295,6 +316,10 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
     }
   }
   else if (aType == SHELL_FACES) {
+#ifdef RESULT_TYPE_CHECK
+    anExpectedType = TopAbs_SHELL;
+#endif
+
     Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes();
     unsigned int ind, nbshapes = aShapes->Length();
 
@@ -352,6 +377,10 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
 
   }
   else if (aType == SOLID_SHELL) {
+#ifdef RESULT_TYPE_CHECK
+    anExpectedType = TopAbs_SOLID;
+#endif
+
     Handle(GEOM_Function) aRefShell = aCI.GetBase();
     TopoDS_Shape aShapeShell = aRefShell->GetValue();
     if (!aShapeShell.IsNull() && aShapeShell.ShapeType() == TopAbs_COMPOUND) {
@@ -379,11 +408,14 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
 
   }
   else if (aType == SOLID_SHELLS) {
+#ifdef RESULT_TYPE_CHECK
+    anExpectedType = TopAbs_SOLID;
+#endif
+
     Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes();
     unsigned int ind, nbshapes = aShapes->Length();
     Standard_Integer ish = 0;
-    TopoDS_Solid Sol;
-    B.MakeSolid(Sol);
+    BRepBuilderAPI_MakeSolid aMkSolid;
 
     // add shapes
     for (ind = 1; ind <= nbshapes; ind++) {
@@ -397,11 +429,13 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
         if (It.More()) aShapeShell = It.Value();
       }
       if (aShapeShell.ShapeType() == TopAbs_SHELL) {
-        B.Add(Sol, aShapeShell);
+        aMkSolid.Add(TopoDS::Shell(aShapeShell));
         ish++;
       }
     }
-    if (ish == 0) return 0;
+    if (ish == 0 || !aMkSolid.IsDone()) return 0;
+
+    TopoDS_Solid Sol = aMkSolid.Solid();
     BRepClass3d_SolidClassifier SC (Sol);
     SC.PerformInfinitePoint(Precision::Confusion());
     if (SC.State() == TopAbs_IN)
@@ -410,6 +444,10 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
       aShape = Sol;
   }
   else if (aType == COMPOUND_SHAPES) {
+#ifdef RESULT_TYPE_CHECK
+    anExpectedType = TopAbs_COMPOUND;
+#endif
+
     Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes();
     unsigned int ind, nbshapes = aShapes->Length();
 
@@ -453,6 +491,10 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
   }
   */
   else if (aType == EDGE_WIRE) {
+#ifdef RESULT_TYPE_CHECK
+    anExpectedType = TopAbs_EDGE;
+#endif
+
     Handle(GEOM_Function) aRefBase = aCI.GetBase();
     TopoDS_Shape aWire = aRefBase->GetValue();
     Standard_Real LinTol = aCI.GetTolerance();
@@ -462,6 +504,10 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
     aShape = MakeEdgeFromWire(aWire, LinTol, AngTol);
   }
   else if (aType == EDGE_CURVE_LENGTH) {
+#ifdef RESULT_TYPE_CHECK
+    anExpectedType = TopAbs_EDGE;
+#endif
+
     GEOMImpl_IVector aVI (aFunction);
 
     // RefCurve
@@ -536,6 +582,10 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
     if (aME.IsDone())
       aShape = aME.Shape();
   } else if (aType == SHAPE_ISOLINE) {
+#ifdef RESULT_TYPE_CHECK
+    anExpectedType = TopAbs_EDGE;
+#endif
+
     GEOMImpl_IIsoline     aII (aFunction);
     Handle(GEOM_Function) aRefFace = aII.GetFace();
     TopoDS_Shape          aShapeFace = aRefFace->GetValue();
@@ -577,6 +627,35 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
     aShape = aSfs->Shape();
   }
 
+#ifdef RESULT_TYPE_CHECK
+  // Check if the result shape type is compatible with the expected.
+  const TopAbs_ShapeEnum aShType = aShape.ShapeType();
+
+  if (anExpectedType != TopAbs_SHAPE && anExpectedType != aShType) {
+    if (aShType == TopAbs_COMPOUND) {
+      // The result is compound. Check its sub-shapes.
+      TopoDS_Iterator anIter(aShape);
+
+      if (!anIter.More()) {
+        // The result is an empty compound.
+        Standard_ConstructionError::Raise("Result type check failed");
+      }
+
+      for (; anIter.More(); anIter.Next()) {
+        const TopAbs_ShapeEnum aSubType = anIter.Value().ShapeType();
+
+        if (anExpectedType != aSubType) {
+          // There is an incompatible type.
+          Standard_ConstructionError::Raise("Result type check failed");
+        }
+      }
+    } else {
+      // There is an incompatible type.
+      Standard_ConstructionError::Raise("Result type check failed");
+    }
+  }
+#endif
+
   aFunction->SetValue(aShape);
 
   log.SetTouched(Label());
@@ -1074,7 +1153,7 @@ TopoDS_Shape GEOMImpl_ShapeDriver::MakeIsoline
                              const double       theParameter) const
 {
   TopoDS_Shape          aResult;
-  GEOMUtils_Hatcher     aHatcher(theFace);
+  GEOMUtils::Hatcher    aHatcher(theFace);
   const GeomAbs_IsoType aType = (IsUIso ? GeomAbs_IsoU : GeomAbs_IsoV);
 
   aHatcher.Init(aType, theParameter);
index 4f4792448326a6f9410d396c2aede5ff41b419d0..0bc7505c1a64361bdc7a92fe695ce8ffdf29d465 100755 (executable)
 #define GEOM_FIELD      52  // == GEOM_FIELD_OBJTYPE constant
 #define GEOM_FIELD_STEP 53  // == GEOM_FIELD_STEP_OBJTYPE constant
 
-#define GEOM_EXPORTXAO 54
-
 #define GEOM_ISOLINE   55
 
 //GEOM_Function types
 #define COPY_WITH_REF    1
 #define COPY_WITHOUT_REF 2
 
-#define EXPORT_SHAPE 1
 #define IMPORT_SHAPE 1
+#define EXPORT_SHAPE 2
 
 #define POINT_XYZ                1
 #define POINT_XYZ_REF            2
 #define DISK_THREE_PNT    2
 #define DISK_R            3
 
-#define CYLINDER_R_H         1
-#define CYLINDER_PNT_VEC_R_H 2
+#define CYLINDER_R_H           1
+#define CYLINDER_PNT_VEC_R_H   2
+#define CYLINDER_R_H_A         3
+#define CYLINDER_PNT_VEC_R_H_A         4
 
 #define CONE_R1_R2_H         1
 #define CONE_PNT_VEC_R1_R2_H 2
 #define MARKER_SHAPE   2
 #define MARKER_PNT2VEC 3
 
-// import/export XAO
-#define IMPORTEXPORT_EXPORTXAO 1
-#define IMPORTEXPORT_IMPORTXAO 2
+// Advanced functions
+#define USER_TYPE 200     // Base type for GEOM advanced shapes
+#define USER_TYPE_EX 1000 // Base type for GEOM plugins
+
 
-// Advanced functions (base = 200)
-#define ADVANCED_BASE 200  // NO OPERATION (advanced operations base)
+//Plugins specified constants
+#define PLUGIN_NAME "Plugin Name"
diff --git a/src/GEOMImpl/GEOMImpl_XAODriver.cxx b/src/GEOMImpl/GEOMImpl_XAODriver.cxx
deleted file mode 100644 (file)
index 4a7e7df..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-// 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, or (at your option) any 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 <Standard_Stream.hxx>
-
-#include <GEOMImpl_XAODriver.hxx>
-#include <GEOMImpl_IImportExportXAO.hxx>
-#include <GEOMImpl_Types.hxx>
-#include <GEOM_Function.hxx>
-
-#include <TFunction_Logbook.hxx>
-#include <StdFail_NotDone.hxx>
-
-#include "XAO_Xao.hxx"
-#include "XAO_Geometry.hxx"
-#include "XAO_Group.hxx"
-#include "XAO_XaoUtils.hxx"
-//@@ include required header files here @@//
-
-//=======================================================================
-//function : GetID
-//purpose  :
-//=======================================================================
-const Standard_GUID& GEOMImpl_XAODriver::GetID()
-{
-    static Standard_GUID aGUID("FF1BBB71-5D14-4df2-980B-3A668264EA16");
-    return aGUID;
-}
-
-//=======================================================================
-//function : GEOMImpl_XAODriver
-//purpose  :
-//=======================================================================
-GEOMImpl_XAODriver::GEOMImpl_XAODriver()
-{
-}
-
-//=======================================================================
-//function : Execute
-//purpose  :
-//=======================================================================
-Standard_Integer GEOMImpl_XAODriver::Execute(TFunction_Logbook& log) const
-{
-    if (Label().IsNull()) return 0;
-    Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
-
-    GEOMImpl_IImportExportXAO iexao(function);
-    TCollection_AsciiString xao   = iexao.GetData();
-
-    TopoDS_Shape shape;
-
-    Standard_Integer functionType = function->GetType();
-    if (functionType == IMPORTEXPORT_EXPORTXAO)
-    {
-    }
-    else if (functionType == IMPORTEXPORT_IMPORTXAO)
-    {
-    }
-    else
-    {
-        // other construction modes here
-    }
-
-    if (shape.IsNull()) return 0;
-
-    function->SetValue(shape);
-
-    log.SetTouched(Label());
-
-    return 1;
-}
-
-//=======================================================================
-//function :  GEOMImpl_XAODriver_Type_
-//purpose  :
-//=======================================================================
-Standard_EXPORT Handle_Standard_Type& GEOMImpl_XAODriver_Type_()
-{
-    static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver);
-    if (aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver);
-    static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
-    if (aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
-    static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
-    if (aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-    static Handle_Standard_Transient _Ancestors[] = { aType1, aType2, aType3, NULL };
-    static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_XAODriver",
-            sizeof(GEOMImpl_XAODriver),
-            1,
-            (Standard_Address) _Ancestors,
-            (Standard_Address) NULL);
-    return _aType;
-}
-
-//=======================================================================
-//function : DownCast
-//purpose  :
-//=======================================================================
-const Handle(GEOMImpl_XAODriver) Handle(GEOMImpl_XAODriver)::DownCast(
-        const Handle(Standard_Transient)& AnObject)
-{
-    Handle(GEOMImpl_XAODriver) _anOtherObject;
-
-    if (!AnObject.IsNull())
-    {
-        if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_XAODriver)))
-        {
-            _anOtherObject = Handle(GEOMImpl_XAODriver)((Handle(GEOMImpl_XAODriver)&) AnObject);
-        }
-    }
-
-    return _anOtherObject;
-}
diff --git a/src/GEOMImpl/GEOMImpl_XAODriver.hxx b/src/GEOMImpl/GEOMImpl_XAODriver.hxx
deleted file mode 100644 (file)
index c67b690..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-// Copyright (C) 2013-2014  CEA/DEN, EDF R&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 _GEOMImpl_XAODriver_HXX
-#define _GEOMImpl_XAODriver_HXX
-
-#include <TFunction_Driver.hxx>
-
-class Handle_Standard_Type;
-class GEOMImpl_XAODriver;
-
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_XAODriver);
-
-class Handle(GEOMImpl_XAODriver): public Handle(TFunction_Driver)
-{
-public:
-    inline void* operator new(size_t, void* anAddress)
-    {
-        return anAddress;
-    }
-    inline void* operator new(size_t size)
-    {
-        return Standard::Allocate(size);
-    }
-    inline void operator delete(void *anAddress)
-    {
-        if (anAddress) Standard::Free((Standard_Address&) anAddress);
-    }
-
-    Handle(GEOMImpl_XAODriver) () :
-            Handle(TFunction_Driver)()
-    {
-    }
-    Handle(GEOMImpl_XAODriver) (const Handle(GEOMImpl_XAODriver)& aHandle) :
-            Handle(TFunction_Driver)(aHandle)
-    {
-    }
-
-    Handle(GEOMImpl_XAODriver) (const GEOMImpl_XAODriver* anItem) :
-            Handle(TFunction_Driver)((TFunction_Driver *) anItem)
-    {
-    }
-
-    Handle(GEOMImpl_XAODriver)& operator=(const Handle(GEOMImpl_XAODriver)& aHandle)
-    {
-        Assign(aHandle.Access());
-        return *this;
-    }
-
-    Handle(GEOMImpl_XAODriver)& operator=(const GEOMImpl_XAODriver* anItem)
-    {
-        Assign((Standard_Transient *) anItem);
-        return *this;
-    }
-
-    GEOMImpl_XAODriver* operator->()
-    {
-        return (GEOMImpl_XAODriver *) ControlAccess();
-    }
-
-    GEOMImpl_XAODriver* operator->() const
-    {
-        return (GEOMImpl_XAODriver *) ControlAccess();
-    }
-
-    Standard_EXPORT
-    ~Handle(GEOMImpl_XAODriver)()
-    {
-    }
-
-    Standard_EXPORT
-    static const Handle(GEOMImpl_XAODriver) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-
-class GEOMImpl_XAODriver: public TFunction_Driver
-{
-public:
-    inline void* operator new(size_t, void* anAddress)
-    {
-        return anAddress;
-    }
-    inline void* operator new(size_t size)
-    {
-        return Standard::Allocate(size);
-    }
-    inline void operator delete(void *anAddress)
-    {
-        if (anAddress) Standard::Free((Standard_Address&) anAddress);
-    }
-
-    // Methods PUBLIC
-    //
-    Standard_EXPORT
-    GEOMImpl_XAODriver();
-    Standard_EXPORT
-    virtual Standard_Integer Execute(TFunction_Logbook& log) const;
-    Standard_EXPORT
-    virtual void Validate(TFunction_Logbook&) const
-    {
-    }
-    Standard_EXPORT
-    Standard_Boolean MustExecute(const TFunction_Logbook&) const
-    {
-        return Standard_True;
-    }
-    Standard_EXPORT
-    static const Standard_GUID& GetID();
-    Standard_EXPORT
-    ~GEOMImpl_XAODriver()
-    {
-    }
-
-    // Type management
-    //
-    Standard_EXPORT
-    friend Handle_Standard_Type& GEOMImpl_ExportXAODriver_Type_();
-    Standard_EXPORT
-    const Handle(Standard_Type)& DynamicType() const
-    {
-        return STANDARD_TYPE(GEOMImpl_XAODriver);
-    }
-    Standard_EXPORT
-    Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
-    {
-        return (STANDARD_TYPE(GEOMImpl_XAODriver) == AType || TFunction_Driver::IsKind(AType));
-    }
-};
-
-#endif // _GEOMImpl_XAODriver_HXX
index 34a83e707533cb9a9fdd2fee20519f13a19222e1..d11591d0f04d23511e7fa803623bce12ec936d7a 100755 (executable)
@@ -71,8 +71,6 @@ FF1BBB69-5D14-4df2-980B-3A668264EA16 // Modify the Location
 
 FF1BBB70-5D14-4df2-980B-3A668264EA16 // Projection
 
-FF1BBB71-5D14-4df2-980B-3A668264EA16 // Export XAO
-
 1C3A0F3F-729D-4E83-8232-78E74FC5637C // Pipe T-Shape
 
 1C3A0F30-729D-4E83-8232-78E74FC5637C // Smoothing Surface
index 0c514cb7864da2afbdf64c4d635cae9cdd7afde0..950b181c5e9fe1d08c0373c1068bb35ce1c4983c 100644 (file)
 typedef QMap<QString, QString> FilterMap;
 static QString lastUsedFilter;
 
-//=======================================================================
-// function : getFileName
-// purpose  : Selection of a file name for Import/Export. Returns also
-//            the selected file type code through <filter> argument.
-//=======================================================================
-static QString getFileName( QWidget*           parent,
-                            const QString&     initial,
-                            const FilterMap&   filterMap,
-                            const QStringList& filters,
-                            const QString&     caption,
-                            bool               open,
-                            QString&           format,
-                            bool               showCurrentDirInitially = false )
-{
-  //QStringList filters;
-  QString aBrepFilter;
-  for (FilterMap::const_iterator it = filterMap.begin(); it != filterMap.end(); ++it) {
-    //filters.push_back( it.key() );
-    if (it.key().contains( "BREP", Qt::CaseInsensitive ))
-      aBrepFilter = it.key();
-  }
-
-  SUIT_FileDlg* fd = new SUIT_FileDlg( parent, open, true, true );
-  if ( !caption.isEmpty() )
-    fd->setWindowTitle( caption );
-
-  if ( !initial.isEmpty() )
-    fd->selectFile( initial );
-
-  if ( showCurrentDirInitially && SUIT_FileDlg::getLastVisitedPath().isEmpty() )
-    fd->setDirectory( QDir::currentPath() );
-
-  fd->setFilters( filters );
-
-  if ( !lastUsedFilter.isEmpty() && filterMap.contains( lastUsedFilter ) ) {
-    fd->selectFilter( lastUsedFilter );
-  }
-  else if ( !aBrepFilter.isEmpty() ) {
-    fd->selectFilter( aBrepFilter );
-  }
-
-  QString filename;
-  if ( fd->exec() == QDialog::Accepted ) {
-    filename = fd->selectedFile();
-    format = filterMap[fd->selectedFilter()];
-    lastUsedFilter = fd->selectedFilter();
-  }
-
-  delete fd;
-  qApp->processEvents();
-  return filename;
-}
-
-//=======================================================================
-// function : getFileNames
-// purpose  : Select list of files for Import operation. Returns also
-//            the selected file type code through <format> argument.
-//=======================================================================
-static QStringList getFileNames( QWidget*           parent,
-                                 const QString&     initial,
-                                 const FilterMap&   filterMap,
-                                 const QString&     caption,
-                                 QString&           format,
-                                 bool               showCurrentDirInitially = false)
-{
-  QString aBrepFilter;
-  QStringList allFilters;
-  QStringList filters;
-  QRegExp re( "\\((.*)\\)" );
-  re.setMinimal( true );
-  for ( FilterMap::const_iterator it = filterMap.begin(); it != filterMap.end(); ++it ) {
-    if ( it.value().contains( "BREP", Qt::CaseInsensitive ) && aBrepFilter.isEmpty() )
-      aBrepFilter = it.key();
-    filters.append( it.key() );
-    int pos = 0;
-    while ( re.indexIn( it.key(), pos ) >= 0 ) {
-      QString f = re.cap(1);
-      pos = re.pos() + f.length() + 2;
-      allFilters.append( f.simplified() );
-    }
-  }
-  filters.append( QObject::tr( "GEOM_ALL_IMPORT_FILES" ).arg( allFilters.join( " " ) ) );
-
-  SUIT_FileDlg fd( parent, true, true, true );
-  fd.setFileMode( SUIT_FileDlg::ExistingFiles );
-  if ( !caption.isEmpty() )
-    fd.setWindowTitle( caption );
-  if ( !initial.isEmpty() )
-    fd.selectFile( initial );
-
-  if ( showCurrentDirInitially && SUIT_FileDlg::getLastVisitedPath().isEmpty() )
-    fd.setDirectory( QDir::currentPath() );
-
-  fd.setFilters( filters );
-
-  if ( !lastUsedFilter.isEmpty() && filterMap.contains( lastUsedFilter ) )
-    fd.selectFilter( lastUsedFilter );
-  else if ( !aBrepFilter.isEmpty() )
-    fd.selectFilter( aBrepFilter );
-
-  QStringList filenames;
-  if ( fd.exec() ) {
-    filenames = fd.selectedFiles();
-    format = filterMap.contains( fd.selectedFilter() ) ? filterMap[ fd.selectedFilter() ] : QString();
-    lastUsedFilter = fd.selectedFilter();
-  }
-  qApp->processEvents();
-  return filenames;
-}
-
 //=======================================================================
 // function : getParentComponent
 // purpose  : Get object's parent component entry
@@ -317,12 +207,6 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
   case GEOMOp::OpDelete:         // EDIT - DELETE
     OnEditDelete();
     break;
-  case GEOMOp::OpImport:         // FILE - IMPORT
-    Import();
-    break;
-  case GEOMOp::OpExport:         // FILE - EXPORT
-    Export();
-    break;
   case GEOMOp::OpCheckGeom:      // TOOLS - CHECK GEOMETRY
     OnCheckGeometry();
     break;
@@ -628,365 +512,6 @@ void GEOMToolsGUI::OnEditDelete()
   app->updateActions(); //SRN: To update a Save button in the toolbar
 }
 
-//=====================================================================================
-// function : Import
-// purpose  : BRep, Iges, Step, ...
-//=====================================================================================
-bool GEOMToolsGUI::Import()
-{
-  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( getGeometryGUI()->getApp() );
-  if ( !app ) return false;
-
-  SalomeApp_Study* stud = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !stud ) {
-    MESSAGE ( "FAILED to cast active study to SalomeApp_Study" );
-    return false;
-  }
-  _PTR(Study) aStudy = stud->studyDS();
-
-  // check if study is locked
-  bool aLocked = (_PTR(AttributeStudyProperties)(aStudy->GetProperties()))->IsLocked();
-  if ( aLocked ) {
-    SUIT_MessageBox::warning( app->desktop(),
-                              QObject::tr("WRN_WARNING"),
-                              QObject::tr("WRN_STUDY_LOCKED") );
-    return false;
-  }
-
-  // check if GEOM engine is available
-  GEOM::GEOM_Gen_var eng = GeometryGUI::GetGeomGen();
-  if ( CORBA::is_nil( eng ) ) {
-    SUIT_MessageBox::critical( app->desktop(),
-                               QObject::tr("WRN_WARNING"),
-                               QObject::tr( "GEOM Engine is not started" ) );
-    return false;
-  }
-
-  GEOM::GEOM_IInsertOperations_var aInsOp = eng->GetIInsertOperations( aStudy->StudyId() );
-  if ( aInsOp->_is_nil() )
-    return false;
-
-  // obtain a list of available import formats
-  FilterMap aMap;
-  GEOM::string_array_var aFormats, aPatterns;
-  aInsOp->ImportTranslators( aFormats, aPatterns );
-
-  for ( int i = 0, n = aFormats->length(); i < n; i++ )
-    aMap.insert( (char*)aPatterns[i], (char*)aFormats[i] );
-
-  // select files to be imported
-  QString fileType;
-  QStringList fileNames = getFileNames( app->desktop(), "", aMap,
-                                        tr( "GEOM_MEN_IMPORT" ), fileType, true );
-
-  // set Wait cursor
-  SUIT_OverrideCursor wc;
-
-  if ( fileNames.count() == 0 )
-    return false; // nothing selected, return
-
-  QStringList errors;
-
-  QList< GEOM::GEOM_Object_var > objsForDisplay;
-
-  QStringList anEntryList;
-
-  // iterate through all selected files
-
-  SUIT_MessageBox::StandardButton igesAnswer = SUIT_MessageBox::NoButton;
-  SUIT_MessageBox::StandardButton acisAnswer = SUIT_MessageBox::NoButton;
-
-  for ( int i = 0; i < fileNames.count(); i++ ) {
-    QString fileName = fileNames[i];
-
-    if ( fileName.isEmpty() )
-      continue;
-
-    QString aCurrentType;
-    if ( fileType.isEmpty() ) {
-      // file type is not defined, try to detect
-      QString ext = QFileInfo( fileName ).suffix().toUpper();
-      QRegExp re( "\\*\\.(\\w+)" );
-      for ( FilterMap::const_iterator it = aMap.begin();
-            it != aMap.end() && aCurrentType.isEmpty(); ++it ) {
-        int pos = 0;
-        while ( re.indexIn( it.key(), pos ) >= 0 ) {
-          QString f = re.cap(1).trimmed().toUpper();
-          if ( ext == f ) { aCurrentType = it.value(); break; }
-          pos = re.pos() + re.cap(1).length() + 2;
-        }
-      }
-    }
-    else {
-      aCurrentType = fileType;
-    }
-
-    if ( aCurrentType.isEmpty() ) {
-      errors.append( QString( "%1 : %2" ).arg( fileName ).arg( tr( "GEOM_UNSUPPORTED_TYPE" ) ) );
-      continue;
-    }
-
-    GEOM_Operation* anOp = new GEOM_Operation( app, aInsOp.in() );
-    try {
-      app->putInfo( tr( "GEOM_PRP_LOADING" ).arg( SUIT_Tools::file( fileName, /*withExten=*/true ) ) );
-      anOp->start();
-
-      CORBA::String_var fileN = fileName.toUtf8().constData();
-      CORBA::String_var fileT = aCurrentType.toUtf8().constData();
-
-      // jfa 21.08.2012 for mantis issue 21511 (STEP file units)
-      CORBA::String_var aUnits = aInsOp->ReadValue(fileN, fileT, "LEN_UNITS");
-      QString aUnitsStr (aUnits.in());
-      bool needConvert = true;
-      if (aUnitsStr.isEmpty() || aUnitsStr == "M" || aUnitsStr.toLower() == "metre")
-        needConvert = false;
-
-      if (needConvert) {
-        if (igesAnswer == SUIT_MessageBox::NoToAll) {
-          // converting for all files is already approved
-          fileT = (aCurrentType + "_SCALE").toLatin1().constData();
-        }
-        else if (igesAnswer != SUIT_MessageBox::YesToAll) {
-          SUIT_MessageBox::StandardButtons btns = SUIT_MessageBox::Yes | SUIT_MessageBox::No;
-          if (i < fileNames.count() - 1) btns = btns | SUIT_MessageBox::YesToAll | SUIT_MessageBox::NoToAll;
-          igesAnswer = SUIT_MessageBox::question(app->desktop(),
-                                                 "Question",//tr("WRN_WARNING"),
-                                                 tr("GEOM_SCALE_DIMENSIONS").arg(aUnitsStr),
-                                                 btns | SUIT_MessageBox::Cancel,
-                                                 SUIT_MessageBox::No);
-          switch (igesAnswer) {
-          case SUIT_MessageBox::Cancel:
-            return false;                // cancel (break) import operation
-          case SUIT_MessageBox::Yes:
-          case SUIT_MessageBox::YesToAll:
-            break;                       // scaling is confirmed
-          case SUIT_MessageBox::No:
-          case SUIT_MessageBox::NoAll:
-            fileT = (aCurrentType + "_SCALE").toLatin1().constData();
-          default:
-            break;                       // scaling is rejected
-          } // switch ( igesAnswer )
-        } // if ( igeAnswer != NoToAll )
-      } // if ( needConvert )
-
-      /*
-      // skl 29.05.2009
-      if ( aCurrentType == "IGES" ) {
-        GEOM::GEOM_Object_var anObj = aInsOp->ImportFile( fileN, "IGES_UNIT" );
-        bool needConvert = false;
-        TCollection_AsciiString aUnitName = aInsOp->GetErrorCode();
-        if ( aUnitName.SubString( 1, 4 ) == "UNIT" )
-          needConvert = aUnitName.SubString( 6, aUnitName.Length() ) != "M";
-
-        if ( needConvert ) {
-          if ( igesAnswer == SUIT_MessageBox::NoToAll ) {
-            // converting for all files is already approved
-            fileT = "IGES_SCALE";
-          }
-          else if ( igesAnswer != SUIT_MessageBox::YesToAll ) {
-            SUIT_MessageBox::StandardButtons btns = SUIT_MessageBox::Yes | SUIT_MessageBox::No;
-            if ( i < fileNames.count()-1 ) btns = btns | SUIT_MessageBox::YesToAll | SUIT_MessageBox::NoToAll;
-            igesAnswer = SUIT_MessageBox::question( app->desktop(),
-                                                    "Question",//tr("WRN_WARNING"),
-                                                    tr("GEOM_SCALE_DIMENSIONS"),
-                                                    btns | SUIT_MessageBox::Cancel,
-                                                    SUIT_MessageBox::No );
-            switch ( igesAnswer ) {
-            case SUIT_MessageBox::Cancel:
-              return false;                // cancel (break) import operation
-            case SUIT_MessageBox::Yes:
-            case SUIT_MessageBox::YesToAll:
-              break;                       // scaling is confirmed
-            case SUIT_MessageBox::No:
-            case SUIT_MessageBox::NoAll:
-              fileT = "IGES_SCALE";
-            default:
-              break;                       // scaling is rejected
-            } // switch ( igesAnswer )
-          } // if ( igeAnswer != NoToAll )
-        } // if ( needConvert )
-      } // if ( aCurrentType == "IGES" )
-      else if ( aCurrentType == "ACIS" ) {
-      */
-
-      if ( aCurrentType == "ACIS" ) {
-        if ( acisAnswer != SUIT_MessageBox::YesToAll && acisAnswer != SUIT_MessageBox::NoToAll ) {
-          SUIT_MessageBox::StandardButtons btns = SUIT_MessageBox::Yes | SUIT_MessageBox::No;
-          if ( i < fileNames.count()-1 ) btns = btns | SUIT_MessageBox::YesToAll | SUIT_MessageBox::NoToAll;
-          acisAnswer = SUIT_MessageBox::question( app->desktop(),
-                                                  "Question",//tr("WRN_WARNING"),
-                                                  tr("GEOM_PUBLISH_NAMED_SHAPES"),
-                                                  btns | SUIT_MessageBox::Cancel,
-                                                  SUIT_MessageBox::No );
-          if ( acisAnswer == SUIT_MessageBox::Cancel )
-            return false; // cancel (break) import operation
-        } // if ( acisAnswer != YesToAll && acisAnswer != NoToAll )
-      } // else if ( aCurrentType == "ACIS" )
-
-      // IMPORT
-      GEOM::ListOfGO_var anObj = aInsOp->ImportFile( fileN, fileT );
-
-      if ( anObj->length() > 0 && aInsOp->IsDone() ) {
-        GEOM::GEOM_Object_ptr aFather = anObj[0]._retn();
-        QString aPublishObjName =
-          GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, /*withExten=*/true ) );
-
-        SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy( aStudy );
-        SALOMEDS::SObject_var aSO =
-          GeometryGUI::GetGeomGen()->PublishInStudy( aDSStudy,
-                                                     SALOMEDS::SObject::_nil(),
-                                                     aFather,
-                                                     aPublishObjName.toLatin1().constData() );
-        if ( ( !aSO->_is_nil() ) )
-          anEntryList.append( aSO->GetID() );
-
-        objsForDisplay.append( aFather );
-
-        if ( aCurrentType == "ACIS" ) {
-          if ( acisAnswer == SUIT_MessageBox::Yes || acisAnswer == SUIT_MessageBox::YesToAll )
-            GeometryGUI::GetGeomGen()->PublishNamedShapesInStudy( aDSStudy, aFather );
-        }
-
-        anOp->commit();
-
-        // Treat group objects.
-        for (int i = 1, n = anObj->length(); i < n; i++) {
-          GEOM::GEOM_Object_ptr anObject = anObj[i]._retn();
-          GeometryGUI::GetGeomGen()->AddInStudy(aDSStudy,
-            anObject, tr(anObject->GetName()).toStdString().c_str(), aFather);
-        }
-      }
-      else {
-        anOp->abort();
-        errors.append( QString( "%1 : %2" ).arg( fileName ).arg( aInsOp->GetErrorCode() ) );
-      }
-    }
-    catch( const SALOME::SALOME_Exception& S_ex ) {
-      anOp->abort();
-      errors.append( QString( "%1 : %2" ).arg( fileName ).arg( tr( "GEOM_UNKNOWN_IMPORT_ERROR" ) ) );
-    }
-  }
-
-  // update object browser
-  getGeometryGUI()->updateObjBrowser( true );
-
-  // browse published objects
-  app->browseObjects( anEntryList );
-
-  // display imported model (if only one file is selected)
-  if ( objsForDisplay.count() == 1 )
-    GEOM_Displayer( stud ).Display( objsForDisplay[0].in() );
-
-  if ( errors.count() > 0 ) {
-    SUIT_MessageBox::critical( app->desktop(),
-                               QObject::tr( "GEOM_ERROR" ),
-                               QObject::tr( "GEOM_IMPORT_ERRORS" ) + "\n" + errors.join( "\n" ) );
-  }
-
-  app->updateActions(); //SRN: To update a Save button in the toolbar
-
-  return objsForDisplay.count() > 0;
-}
-
-//=====================================================================================
-// function : Export
-// purpose  : BRep, Iges, Step
-//=====================================================================================
-bool GEOMToolsGUI::Export()
-{
-  SalomeApp_Application* app = getGeometryGUI()->getApp();
-  if (!app) return false;
-
-  SalomeApp_Study* stud = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !stud ) {
-    MESSAGE ( "FAILED to cast active study to SalomeApp_Study" );
-    return false;
-  }
-  _PTR(Study) aStudy = stud->studyDS();
-
-  GEOM::GEOM_Gen_var eng = GeometryGUI::GetGeomGen();
-  if ( CORBA::is_nil( eng ) ) {
-    SUIT_MessageBox::critical( app->desktop(),
-                               QObject::tr("WRN_WARNING"),
-                               QObject::tr( "GEOM Engine is not started" ) );
-    return false;
-  }
-
-  GEOM::GEOM_IInsertOperations_var aInsOp = eng->GetIInsertOperations( aStudy->StudyId() );
-  if ( aInsOp->_is_nil() )
-    return false;
-
-  // Obtain a list of available export formats
-  FilterMap aMap;
-  QStringList filters;
-  GEOM::string_array_var aFormats, aPatterns;
-  aInsOp->ExportTranslators( aFormats, aPatterns );
-  for ( int i = 0, n = aFormats->length(); i < n; i++ ) {
-    aMap.insert( (char*)aPatterns[i], (char*)aFormats[i] );
-    filters.push_back( (char*)aPatterns[i] );
-  }
-
-  // Get selected objects
-  LightApp_SelectionMgr* sm = app->selectionMgr();
-  if ( !sm )
-    return false;
-
-  SALOME_ListIO selectedObjects;
-  sm->selectedObjects( selectedObjects );
-  bool appropriateObj = false;
-
-  SALOME_ListIteratorOfListIO It( selectedObjects );
-  for (; It.More(); It.Next()) {
-    Handle(SALOME_InteractiveObject) IObject = It.Value();
-    GEOM::GEOM_Object_var anObj = GEOMBase::ConvertIOinGEOMObject( IObject );
-
-    if ( anObj->_is_nil() )
-      continue;
-
-    QString fileType;
-    QString file = getFileName(app->desktop(), QString( IObject->getName() ), aMap, filters,
-                               tr("GEOM_MEN_EXPORT"), false, fileType, true);
-
-    // User has pressed "Cancel" --> stop the operation
-    if ( file.isEmpty() || fileType.isEmpty() )
-      return false;
-
-    GEOM_Operation* anOp = new GEOM_Operation( app, aInsOp.in() );
-    try {
-      SUIT_OverrideCursor wc;
-
-      app->putInfo( tr("GEOM_PRP_EXPORT").arg(SUIT_Tools::file( file, /*withExten=*/true )) );
-
-      anOp->start();
-
-      aInsOp->Export( anObj, file.toUtf8().constData(), fileType.toUtf8().constData() );
-
-      if (aInsOp->IsDone())
-        anOp->commit();
-      else {
-        anOp->abort();
-        wc.suspend();
-        SUIT_MessageBox::critical(app->desktop(),
-                                  QObject::tr("GEOM_ERROR"),
-                                  QObject::tr("GEOM_PRP_ABORT") + "\n" + QObject::tr(aInsOp->GetErrorCode()));
-        return false;
-      }
-    }
-    catch (const SALOME::SALOME_Exception& S_ex) {
-      //QtCatchCorbaException(S_ex);
-      anOp->abort();
-      return false;
-    }
-    appropriateObj = true;
-  }
-
-  if ( !appropriateObj )
-    SUIT_MessageBox::warning( app->desktop(),
-                              QObject::tr("WRN_WARNING"),
-                              QObject::tr("GEOM_WRN_NO_APPROPRIATE_SELECTION") );
-  return true;
-}
-
 //=====================================================================================
 // function : RemoveObjectWithChildren
 // purpose  : used by OnEditDelete() method
index 4ed7f949504a375e6cfe58583819e1d8d1902171..a79c7d30c110abdd8ee8474c867b909595f6441a 100644 (file)
@@ -61,9 +61,6 @@ public:
   enum ActionType { SHOWDLG, INCR, DECR };
 
 private:
-  // Import and export topology methods
-  bool         Import();
-  bool         Export();
 
   void         OnEditDelete();
   void         OnCheckGeometry();
index b4969f0d91c6c3e341ac48722cf075c331284a8d..fdd98a68658728819c5b6b482b088f0603749a53 100755 (executable)
@@ -23,6 +23,7 @@
 INCLUDE_DIRECTORIES(
   ${CAS_INCLUDE_DIRS}
   ${PTHREAD_INCLUDE_DIR}
+  ${LIBXML2_INCLUDE_DIR}
   ${KERNEL_INCLUDE_DIRS}
   ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -30,6 +31,7 @@ INCLUDE_DIRECTORIES(
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(
   ${CAS_DEFINITIONS}
+  ${LIBXML2_DEFINITIONS}
   )
 
 # libraries to link to
@@ -40,6 +42,7 @@ SET(_link_LIBRARIES
   ${CAS_TKG3d}
   ${CAS_TKV3d}
   ${CAS_TKGeomBase}
+  ${LIBXML2_LIBRARIES}
   ${KERNEL_SALOMELocalTrace}
   )
 
@@ -48,12 +51,14 @@ SET(_link_LIBRARIES
 SET(GEOMUtils_HEADERS
   GEOMUtils.hxx
   GEOMUtils_Hatcher.hxx
+  GEOMUtils_XmlHandler.hxx
   )
 # --- sources ---
 
 SET(GEOMUtils_SOURCES
   GEOMUtils.cxx
   GEOMUtils_Hatcher.cxx
+  GEOMUtils_XmlHandler.cxx
   )
 
 # --- rules ---
index 89b13d96b7a6e85f536be92c25498eada9b37e80..aa8c3d7a369d85d7c343586e47e0723c309ee837 100644 (file)
 
 #define STD_SORT_ALGO 1
 
-namespace GEOMUtils {
+namespace
+{
+  /**
+   * This function constructs and returns modified shape from the original one
+   * for singular cases. It is used for the method GetMinDistanceSingular.
+   *
+   * \param theShape the original shape
+   * \param theModifiedShape output parameter. The modified shape.
+   * \param theAddDist output parameter. The added distance for modified shape.
+   * \retval true if the shape is modified; false otherwise.
+   *
+   * \internal
+   */
+  Standard_Boolean ModifyShape(const TopoDS_Shape  &theShape,
+                              TopoDS_Shape  &theModifiedShape,
+                              Standard_Real &theAddDist)
+  {
+    Standard_Boolean isModified = Standard_False;
+    TopExp_Explorer anExp;
+    int nbf = 0;
+
+    theAddDist = 0.;
+    theModifiedShape.Nullify();
+
+    for ( anExp.Init( theShape, TopAbs_FACE ); anExp.More(); anExp.Next() ) {
+      nbf++;
+      theModifiedShape = anExp.Current();
+    }
+    if(nbf==1) {
+      TopoDS_Shape sh = theShape;
+      while(sh.ShapeType()==TopAbs_COMPOUND) {
+       TopoDS_Iterator it(sh);
+       sh = it.Value();
+      }
+      Handle(Geom_Surface) S = BRep_Tool::Surface(TopoDS::Face(theModifiedShape));
+      if( S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ||
+         S->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)) ||
+         S->IsUPeriodic()) {
+       const Standard_Boolean isShell =
+         (sh.ShapeType()==TopAbs_SHELL || sh.ShapeType()==TopAbs_FACE);
+
+       if( isShell || S->IsUPeriodic() ) {
+         // non solid case or any periodic surface (Mantis 22454).
+         double U1,U2,V1,V2;
+         // changes for 0020677: EDF 1219 GEOM: MinDistance gives 0 instead of 20.88
+         //S->Bounds(U1,U2,V1,V2); changed by
+         ShapeAnalysis::GetFaceUVBounds(TopoDS::Face(theModifiedShape),U1,U2,V1,V2);
+         // end of changes for 020677 (dmv)
+         Handle(Geom_RectangularTrimmedSurface) TrS1 =
+           new Geom_RectangularTrimmedSurface(S,U1,(U1+U2)/2.,V1,V2);
+         Handle(Geom_RectangularTrimmedSurface) TrS2 =
+           new Geom_RectangularTrimmedSurface(S,(U1+U2)/2.,U2,V1,V2);
+         BRep_Builder B;
+         TopoDS_Face F1,F2;
+         TopoDS_Shape aMShape;
+
+         if (isShell) {
+           B.MakeCompound(TopoDS::Compound(aMShape));
+         } else {
+           B.MakeShell(TopoDS::Shell(aMShape));
+         }
+
+         B.MakeFace(F1,TrS1,1.e-7);
+         B.Add(aMShape,F1);
+         B.MakeFace(F2,TrS2,1.e-7);
+         B.Add(aMShape,F2);
+         Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape;
+
+         if (!isShell) {
+           // The original shape is a solid.
+           TopoDS_Solid aSolid;
+
+           B.MakeSolid(aSolid);
+           B.Add(aSolid, aMShape);
+           aMShape = aSolid;
+         }
+
+         sfs->Init(aMShape);
+         sfs->SetPrecision(1.e-6);
+         sfs->SetMaxTolerance(1.0);
+         sfs->Perform();
+         theModifiedShape = sfs->Shape();
+         isModified = Standard_True;
+       }
+       else {
+         if( S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ) {
+           Handle(Geom_SphericalSurface) SS = Handle(Geom_SphericalSurface)::DownCast(S);
+           gp_Pnt PC = SS->Location();
+           BRep_Builder B;
+           TopoDS_Vertex V;
+           B.MakeVertex(V,PC,1.e-7);
+           theModifiedShape = V;
+           theAddDist = SS->Radius();
+           isModified = Standard_True;
+         }
+         else {
+           Handle(Geom_ToroidalSurface) TS = Handle(Geom_ToroidalSurface)::DownCast(S);
+           gp_Ax3 ax3 = TS->Position();
+           Handle(Geom_Circle) C = new Geom_Circle(ax3.Ax2(),TS->MajorRadius());
+           BRep_Builder B;
+           TopoDS_Edge E;
+           B.MakeEdge(E,C,1.e-7);
+           theModifiedShape = E;
+           theAddDist = TS->MinorRadius();
+           isModified = Standard_True;
+         }
+       }
+      } else {
+       theModifiedShape = theShape;
+      }
+    }
+    else
+      theModifiedShape = theShape;
+
+    return isModified;
+  }
+
+  //=======================================================================
+  //function : ShapeToDouble
+  //purpose  : used by CompareShapes::operator()
+  //=======================================================================
+  std::pair<double, double> ShapeToDouble (const TopoDS_Shape& S, bool isOldSorting)
+  {
+    // Computing of CentreOfMass
+    gp_Pnt GPoint;
+    double Len;
+
+    if (S.ShapeType() == TopAbs_VERTEX) {
+      GPoint = BRep_Tool::Pnt(TopoDS::Vertex(S));
+      Len = (double)S.Orientation();
+    }
+    else {
+      GProp_GProps GPr;
+      // BEGIN: fix for Mantis issue 0020842
+      if (isOldSorting) {
+       BRepGProp::LinearProperties(S, GPr);
+      }
+      else {
+       if (S.ShapeType() == TopAbs_EDGE || S.ShapeType() == TopAbs_WIRE) {
+         BRepGProp::LinearProperties(S, GPr);
+       }
+       else if (S.ShapeType() == TopAbs_FACE || S.ShapeType() == TopAbs_SHELL) {
+         BRepGProp::SurfaceProperties(S, GPr);
+       }
+       else {
+         BRepGProp::VolumeProperties(S, GPr);
+       }
+      }
+      // END: fix for Mantis issue 0020842
+      GPoint = GPr.CentreOfMass();
+      Len = GPr.Mass();
+    }
+
+    double dMidXYZ = GPoint.X() * 999.0 + GPoint.Y() * 99.0 + GPoint.Z() * 0.9;
+    return std::make_pair(dMidXYZ, Len);
+  }
+
+  void parseWard( const GEOMUtils::LevelsList &theLevelList, std::string &treeStr )
+  {
+    treeStr.append( "{" );
+    for( GEOMUtils::LevelsList::const_iterator j = theLevelList.begin(); 
+        j != theLevelList.end(); ++j ) {
+      if ( j != theLevelList.begin() ) {
+       treeStr.append( ";" );
+      }
+      GEOMUtils::LevelInfo level = (*j);
+      GEOMUtils::LevelInfo::iterator upIter;
+      for ( upIter = level.begin(); upIter != level.end(); ++upIter ) {
+       if ( upIter != level.begin() ) {
+         treeStr.append( "," );
+       }
+       treeStr.append( upIter->first );
+       for ( std::vector<std::string>::iterator k = upIter->second.begin(); k != upIter->second.end(); ++k ) {
+         treeStr.append( "_" );
+         treeStr.append( *k );
+       }
+      }
+    }
+    treeStr.append( "}" );
+  }
+
+  GEOMUtils::LevelsList parseWard( const std::string& theData, std::size_t& theCursor )
+  {
+    std::size_t indexStart = theData.find( "{", theCursor ) + 1;
+    std::size_t indexEnd = theData.find( "}", indexStart );
+
+    std::string ward = theData.substr( indexStart, indexEnd - indexStart );
+    std::stringstream ss(ward);
+    std::string substr;
+    std::vector<std::string> levelsListStr;
+    while ( std::getline( ss, substr, ';' ) ) {
+      if ( !substr.empty() )
+       levelsListStr.push_back( substr );
+    }
+    GEOMUtils::LevelsList levelsListData;
+    for( int level = 0; level < levelsListStr.size(); level++ ) {
+      std::vector<std::string> namesListStr;
+      std::stringstream ss1( levelsListStr[level] );
+      while ( std::getline( ss1, substr, ',' ) ) {
+       if ( !substr.empty() )
+         namesListStr.push_back( substr );
+      }
+      GEOMUtils::LevelInfo levelInfoData;
+      for( int node = 0; node < namesListStr.size(); node++ ) {
+       std::vector<std::string> linksListStr;
+       std::stringstream ss2( namesListStr[node] );
+       while ( std::getline( ss2, substr, '_' ) ) {
+         if ( !substr.empty() )
+           linksListStr.push_back( substr );
+       }
+       std::string nodeItem = linksListStr[0];
+       if( !nodeItem.empty() ) {
+         GEOMUtils::NodeLinks linksListData;
+         for( int link = 1; link < linksListStr.size(); link++ ) {
+           std::string linkItem = linksListStr[link];
+           linksListData.push_back( linkItem );
+         }// Links
+         levelInfoData[nodeItem] = linksListData;
+       }
+      }// Level's objects
+      levelsListData.push_back(levelInfoData);
+    }// Levels
+
+    theCursor = indexEnd + 1;
+    return levelsListData;
+  }
+
+}
 
 //=======================================================================
 //function : GetPosition
 //purpose  :
 //=======================================================================
-gp_Ax3 GetPosition (const TopoDS_Shape& theShape)
+gp_Ax3 GEOMUtils::GetPosition (const TopoDS_Shape& theShape)
 {
   gp_Ax3 aResult;
 
@@ -161,7 +388,7 @@ gp_Ax3 GetPosition (const TopoDS_Shape& theShape)
 //function : GetVector
 //purpose  :
 //=======================================================================
-gp_Vec GetVector (const TopoDS_Shape& theShape,
+gp_Vec GEOMUtils::GetVector (const TopoDS_Shape& theShape,
                              Standard_Boolean doConsiderOrientation)
 {
   if (theShape.IsNull())
@@ -186,51 +413,11 @@ gp_Vec GetVector (const TopoDS_Shape& theShape,
   return aV;
 }
 
-//=======================================================================
-//function : ShapeToDouble
-//purpose  : used by CompareShapes::operator()
-//=======================================================================
-std::pair<double, double> ShapeToDouble (const TopoDS_Shape& S, bool isOldSorting)
-{
-  // Computing of CentreOfMass
-  gp_Pnt GPoint;
-  double Len;
-
-  if (S.ShapeType() == TopAbs_VERTEX) {
-    GPoint = BRep_Tool::Pnt(TopoDS::Vertex(S));
-    Len = (double)S.Orientation();
-  }
-  else {
-    GProp_GProps GPr;
-    // BEGIN: fix for Mantis issue 0020842
-    if (isOldSorting) {
-      BRepGProp::LinearProperties(S, GPr);
-    }
-    else {
-      if (S.ShapeType() == TopAbs_EDGE || S.ShapeType() == TopAbs_WIRE) {
-        BRepGProp::LinearProperties(S, GPr);
-      }
-      else if (S.ShapeType() == TopAbs_FACE || S.ShapeType() == TopAbs_SHELL) {
-        BRepGProp::SurfaceProperties(S, GPr);
-      }
-      else {
-        BRepGProp::VolumeProperties(S, GPr);
-      }
-    }
-    // END: fix for Mantis issue 0020842
-    GPoint = GPr.CentreOfMass();
-    Len = GPr.Mass();
-  }
-
-  double dMidXYZ = GPoint.X() * 999.0 + GPoint.Y() * 99.0 + GPoint.Z() * 0.9;
-  return std::make_pair(dMidXYZ, Len);
-}
-
 //=======================================================================
 //function : CompareShapes::operator()
 //purpose  : used by std::sort(), called from SortShapes()
 //=======================================================================
-bool CompareShapes::operator() (const TopoDS_Shape& theShape1,
+bool GEOMUtils::CompareShapes::operator() (const TopoDS_Shape& theShape1,
                                            const TopoDS_Shape& theShape2)
 {
   if (!myMap.IsBound(theShape1)) {
@@ -290,7 +477,7 @@ bool CompareShapes::operator() (const TopoDS_Shape& theShape1,
 //function : SortShapes
 //purpose  :
 //=======================================================================
-void SortShapes (TopTools_ListOfShape& SL,
+void GEOMUtils::SortShapes (TopTools_ListOfShape& SL,
                             const Standard_Boolean isOldSorting)
 {
 #ifdef STD_SORT_ALGO
@@ -428,7 +615,7 @@ void SortShapes (TopTools_ListOfShape& SL,
 //function : CompsolidToCompound
 //purpose  :
 //=======================================================================
-TopoDS_Shape CompsolidToCompound (const TopoDS_Shape& theCompsolid)
+TopoDS_Shape GEOMUtils::CompsolidToCompound (const TopoDS_Shape& theCompsolid)
 {
   if (theCompsolid.ShapeType() != TopAbs_COMPSOLID) {
     return theCompsolid;
@@ -455,7 +642,7 @@ TopoDS_Shape CompsolidToCompound (const TopoDS_Shape& theCompsolid)
 //function : AddSimpleShapes
 //purpose  :
 //=======================================================================
-void AddSimpleShapes (const TopoDS_Shape& theShape, TopTools_ListOfShape& theList)
+void GEOMUtils::AddSimpleShapes (const TopoDS_Shape& theShape, TopTools_ListOfShape& theList)
 {
   if (theShape.ShapeType() != TopAbs_COMPOUND &&
       theShape.ShapeType() != TopAbs_COMPSOLID) {
@@ -483,7 +670,7 @@ void AddSimpleShapes (const TopoDS_Shape& theShape, TopTools_ListOfShape& theLis
 //function : CheckTriangulation
 //purpose  :
 //=======================================================================
-bool CheckTriangulation (const TopoDS_Shape& aShape)
+bool GEOMUtils::CheckTriangulation (const TopoDS_Shape& aShape)
 {
   bool isTriangulation = true;
 
@@ -533,7 +720,7 @@ bool CheckTriangulation (const TopoDS_Shape& aShape)
 //function : GetTypeOfSimplePart
 //purpose  :
 //=======================================================================
-TopAbs_ShapeEnum GetTypeOfSimplePart (const TopoDS_Shape& theShape)
+TopAbs_ShapeEnum GEOMUtils::GetTypeOfSimplePart (const TopoDS_Shape& theShape)
 {
   TopAbs_ShapeEnum aType = theShape.ShapeType();
   if      (aType == TopAbs_VERTEX)                             return TopAbs_VERTEX;
@@ -554,7 +741,7 @@ TopAbs_ShapeEnum GetTypeOfSimplePart (const TopoDS_Shape& theShape)
 //function : GetEdgeNearPoint
 //purpose  :
 //=======================================================================
-TopoDS_Shape GetEdgeNearPoint (const TopoDS_Shape& theShape,
+TopoDS_Shape GEOMUtils::GetEdgeNearPoint (const TopoDS_Shape& theShape,
                                           const TopoDS_Vertex& thePoint)
 {
   TopoDS_Shape aResult;
@@ -622,7 +809,7 @@ TopoDS_Shape GetEdgeNearPoint (const TopoDS_Shape& theShape,
 //function : PreciseBoundingBox
 //purpose  : 
 //=======================================================================
-Standard_Boolean PreciseBoundingBox
+Standard_Boolean GEOMUtils::PreciseBoundingBox
                           (const TopoDS_Shape &theShape, Bnd_Box &theBox)
 {
   Standard_Real aBound[6];
@@ -668,7 +855,7 @@ Standard_Boolean PreciseBoundingBox
 
     // Get minimal distance between planar face and shape.
     Standard_Real aMinDist =
-      GetMinDistance(aFace, theShape, aPMin[0], aPMin[1]);
+      GEOMUtils::GetMinDistance(aFace, theShape, aPMin[0], aPMin[1]);
 
     if (aMinDist < 0.) {
       return Standard_False;
@@ -684,128 +871,11 @@ Standard_Boolean PreciseBoundingBox
   return Standard_True;
 }
 
-//=======================================================================
-// function : ModifyShape
-// purpose  : This function constructs and returns modified shape 
-//            from the original one for singular cases. 
-//            It is used for the method GetMinDistanceSingular.
-//   
-//   \param theShape the original shape
-//   \param theModifiedShape output parameter. The modified shape.
-//   \param theAddDist output parameter. The added distance for modified shape.
-//   \retval true if the shape is modified; false otherwise.
-//   
-
-//=======================================================================
-Standard_Boolean ModifyShape(const TopoDS_Shape  &theShape,
-                                              TopoDS_Shape  &theModifiedShape,
-                                              Standard_Real &theAddDist)
-{
-  Standard_Boolean isModified = Standard_False;
-  TopExp_Explorer anExp;
-  int nbf = 0;
-
-  theAddDist = 0.;
-  theModifiedShape.Nullify();
-
-  for ( anExp.Init( theShape, TopAbs_FACE ); anExp.More(); anExp.Next() ) {
-    nbf++;
-    theModifiedShape = anExp.Current();
-  }
-  if(nbf==1) {
-    TopoDS_Shape sh = theShape;
-    while(sh.ShapeType()==TopAbs_COMPOUND) {
-      TopoDS_Iterator it(sh);
-      sh = it.Value();
-    }
-    Handle(Geom_Surface) S = BRep_Tool::Surface(TopoDS::Face(theModifiedShape));
-    if( S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ||
-        S->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)) ||
-        S->IsUPeriodic()) {
-      const Standard_Boolean isShell =
-        (sh.ShapeType()==TopAbs_SHELL || sh.ShapeType()==TopAbs_FACE);
-
-      if( isShell || S->IsUPeriodic() ) {
-        // non solid case or any periodic surface (Mantis 22454).
-        double U1,U2,V1,V2;
-        // changes for 0020677: EDF 1219 GEOM: MinDistance gives 0 instead of 20.88
-        //S->Bounds(U1,U2,V1,V2); changed by
-        ShapeAnalysis::GetFaceUVBounds(TopoDS::Face(theModifiedShape),U1,U2,V1,V2);
-        // end of changes for 020677 (dmv)
-        Handle(Geom_RectangularTrimmedSurface) TrS1 =
-          new Geom_RectangularTrimmedSurface(S,U1,(U1+U2)/2.,V1,V2);
-        Handle(Geom_RectangularTrimmedSurface) TrS2 =
-          new Geom_RectangularTrimmedSurface(S,(U1+U2)/2.,U2,V1,V2);
-        BRep_Builder B;
-        TopoDS_Face F1,F2;
-        TopoDS_Shape aMShape;
-
-        if (isShell) {
-          B.MakeCompound(TopoDS::Compound(aMShape));
-        } else {
-          B.MakeShell(TopoDS::Shell(aMShape));
-        }
-
-        B.MakeFace(F1,TrS1,1.e-7);
-        B.Add(aMShape,F1);
-        B.MakeFace(F2,TrS2,1.e-7);
-        B.Add(aMShape,F2);
-        Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape;
-
-        if (!isShell) {
-          // The original shape is a solid.
-          TopoDS_Solid aSolid;
-
-          B.MakeSolid(aSolid);
-          B.Add(aSolid, aMShape);
-          aMShape = aSolid;
-        }
-
-        sfs->Init(aMShape);
-        sfs->SetPrecision(1.e-6);
-        sfs->SetMaxTolerance(1.0);
-        sfs->Perform();
-        theModifiedShape = sfs->Shape();
-        isModified = Standard_True;
-      }
-      else {
-        if( S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ) {
-          Handle(Geom_SphericalSurface) SS = Handle(Geom_SphericalSurface)::DownCast(S);
-          gp_Pnt PC = SS->Location();
-          BRep_Builder B;
-          TopoDS_Vertex V;
-          B.MakeVertex(V,PC,1.e-7);
-          theModifiedShape = V;
-          theAddDist = SS->Radius();
-          isModified = Standard_True;
-        }
-        else {
-          Handle(Geom_ToroidalSurface) TS = Handle(Geom_ToroidalSurface)::DownCast(S);
-          gp_Ax3 ax3 = TS->Position();
-          Handle(Geom_Circle) C = new Geom_Circle(ax3.Ax2(),TS->MajorRadius());
-          BRep_Builder B;
-          TopoDS_Edge E;
-          B.MakeEdge(E,C,1.e-7);
-          theModifiedShape = E;
-          theAddDist = TS->MinorRadius();
-          isModified = Standard_True;
-        }
-      }
-    } else {
-      theModifiedShape = theShape;
-    }
-  }
-  else
-    theModifiedShape = theShape;
-
-  return isModified;
-}
-
 //=======================================================================
 //function : GetMinDistanceSingular
 //purpose  : 
 //=======================================================================
-double GetMinDistanceSingular(const TopoDS_Shape& aSh1,
+double GEOMUtils::GetMinDistanceSingular(const TopoDS_Shape& aSh1,
                                          const TopoDS_Shape& aSh2,
                                          gp_Pnt& Ptmp1, gp_Pnt& Ptmp2)
 {
@@ -874,7 +944,7 @@ double GetMinDistanceSingular(const TopoDS_Shape& aSh1,
 //function : GetMinDistance
 //purpose  : 
 //=======================================================================
-Standard_Real GetMinDistance
+Standard_Real GEOMUtils::GetMinDistance
                                (const TopoDS_Shape& theShape1,
                                 const TopoDS_Shape& theShape2,
                                 gp_Pnt& thePnt1, gp_Pnt& thePnt2)
@@ -910,7 +980,7 @@ Standard_Real GetMinDistance
 
   // skl 30.06.2008
   // additional workaround for bugs 19899, 19908 and 19910 from Mantis
-  double dist = GetMinDistanceSingular
+  double dist = GEOMUtils::GetMinDistanceSingular
       (theShape1, theShape2, thePnt1, thePnt2);
 
   if (dist > -1.0) {
@@ -941,7 +1011,7 @@ Standard_Real GetMinDistance
 // function : ConvertClickToPoint()
 // purpose  : Returns the point clicked in 3D view
 //=======================================================================
-gp_Pnt ConvertClickToPoint( int x, int y, Handle(V3d_View) aView )
+gp_Pnt GEOMUtils::ConvertClickToPoint( int x, int y, Handle(V3d_View) aView )
 {
   V3d_Coordinate XEye, YEye, ZEye, XAt, YAt, ZAt;
   aView->Eye( XEye, YEye, ZEye );
@@ -963,36 +1033,12 @@ gp_Pnt ConvertClickToPoint( int x, int y, Handle(V3d_View) aView )
   return ResultPoint;
 }
 
-void parseWard( const LevelsList &theLevelList, std::string &treeStr )
-{
-  treeStr.append( "{" );
-  for( LevelsList::const_iterator j = theLevelList.begin(); 
-       j != theLevelList.end(); ++j ) {
-    if ( j != theLevelList.begin() ) {
-      treeStr.append( ";" );
-    }
-    LevelInfo level = (*j);
-    LevelInfo::iterator upIter;
-    for ( upIter = level.begin(); upIter != level.end(); ++upIter ) {
-      if ( upIter != level.begin() ) {
-       treeStr.append( "," );
-      }
-      treeStr.append( upIter->first );
-      for ( std::vector<std::string>::iterator k = upIter->second.begin(); k != upIter->second.end(); ++k ) {
-       treeStr.append( "_" );
-       treeStr.append( *k );
-      }
-    }
-  }
-  treeStr.append( "}" );
-}
-
 //=======================================================================
 // function : ConvertTreeToString()
 // purpose  : Returns the string representation of dependency tree
 //=======================================================================
-void ConvertTreeToString( const TreeModel &tree,
-                         std::string &treeStr )
+void GEOMUtils::ConvertTreeToString( const TreeModel &tree,
+                                    std::string &treeStr )
 {
   TreeModel::const_iterator i;
   for ( i = tree.begin(); i != tree.end(); ++i ) {
@@ -1007,58 +1053,12 @@ void ConvertTreeToString( const TreeModel &tree,
   }
 }
 
-LevelsList parseWard( const std::string& theData, std::size_t& theCursor )
-{
-  std::size_t indexStart = theData.find( "{", theCursor ) + 1;
-  std::size_t indexEnd = theData.find( "}", indexStart );
-
-  std::string ward = theData.substr( indexStart, indexEnd - indexStart );
-  std::stringstream ss(ward);
-  std::string substr;
-  std::vector<std::string> levelsListStr;
-  while ( std::getline( ss, substr, ';' ) ) {
-    if ( !substr.empty() )
-      levelsListStr.push_back( substr );
-  }
-  LevelsList levelsListData;
-  for( int level = 0; level < levelsListStr.size(); level++ ) {
-    std::vector<std::string> namesListStr;
-    std::stringstream ss1( levelsListStr[level] );
-    while ( std::getline( ss1, substr, ',' ) ) {
-      if ( !substr.empty() )
-       namesListStr.push_back( substr );
-    }
-    LevelInfo levelInfoData;
-    for( int node = 0; node < namesListStr.size(); node++ ) {
-      std::vector<std::string> linksListStr;
-      std::stringstream ss2( namesListStr[node] );
-      while ( std::getline( ss2, substr, '_' ) ) {
-       if ( !substr.empty() )
-         linksListStr.push_back( substr );
-      }
-      std::string nodeItem = linksListStr[0];
-      if( !nodeItem.empty() ) {
-        NodeLinks linksListData;
-        for( int link = 1; link < linksListStr.size(); link++ ) {
-          std::string linkItem = linksListStr[link];
-          linksListData.push_back( linkItem );
-        }// Links
-        levelInfoData[nodeItem] = linksListData;
-      }
-    }// Level's objects
-    levelsListData.push_back(levelInfoData);
-  }// Levels
-
-  theCursor = indexEnd + 1;
-  return levelsListData;
-}
-
 //=======================================================================
 // function : ConvertStringToTree()
 // purpose  : Returns the dependency tree
 //=======================================================================
-void ConvertStringToTree( const std::string &theData,
-                         TreeModel &tree )
+void GEOMUtils::ConvertStringToTree( const std::string &theData,
+                                    TreeModel &tree )
 {
   std::size_t cursor = 0;
 
@@ -1077,5 +1077,3 @@ void ConvertStringToTree( const std::string &theData,
     tree[objectEntry] = std::pair<LevelsList,LevelsList>( upwardList, downwardList );
   }
 }
-
-} //namespace GEOMUtils
index b35495b62606dac7f5c3552df530cc4903a5aac6..95c0e7c0f0201531a4a10d9912e00fc8fb5913c9 100644 (file)
@@ -52,7 +52,8 @@ inline Standard_Boolean IsEqual (const TopoDS_Shape& S1, const TopoDS_Shape& S2)
   return S1.IsSame(S2);
 }
 
-namespace GEOMUtils {
+namespace GEOMUtils
+{
 
   typedef std::vector<std::string> NodeLinks;
   typedef std::map<std::string, NodeLinks> LevelInfo;
@@ -77,7 +78,7 @@ namespace GEOMUtils {
    *       extracted from a shape.
    */
   Standard_EXPORT gp_Vec GetVector (const TopoDS_Shape& theShape,
-                                           Standard_Boolean doConsiderOrientation);
+                                   Standard_Boolean doConsiderOrientation);
 
   /*!
    * \brief Sort shapes in the list by their coordinates.
@@ -99,7 +100,7 @@ namespace GEOMUtils {
    * \brief Sort shapes by their centers of mass, using formula X*999 + Y*99 + Z*0.9
    */
   Standard_EXPORT void SortShapes (TopTools_ListOfShape& SL,
-                                          const Standard_Boolean isOldSorting = Standard_True);
+                                  const Standard_Boolean isOldSorting = Standard_True);
 
   /*!
    * \brief Convert TopoDS_COMPSOLID to TopoDS_COMPOUND.
@@ -120,7 +121,7 @@ namespace GEOMUtils {
    * \param theList Output parameter.
    */
   Standard_EXPORT void AddSimpleShapes (const TopoDS_Shape& theShape,
-                                               TopTools_ListOfShape& theList);
+                                       TopTools_ListOfShape& theList);
 
   /*!
    * \brief Build a triangulation on \a theShape if it is absent.
@@ -128,7 +129,7 @@ namespace GEOMUtils {
    * \retval bool Returns false if the shape has no faces, i.e. impossible to build triangulation.
    */
   Standard_EXPORT bool CheckTriangulation (const TopoDS_Shape& theShape);
-
+  
   /*!
    * \brief Return type of shape for explode. In case of compound it will be a type of its first sub shape.
    * \param theShape The shape to get type of.
@@ -144,7 +145,7 @@ namespace GEOMUtils {
    * \retval TopoDS_Shape Returns the found edge or an empty shape if multiple edges found.
    */
   Standard_EXPORT TopoDS_Shape GetEdgeNearPoint (const TopoDS_Shape&  theShape,
-                                                        const TopoDS_Vertex& thePoint);
+                                                const TopoDS_Vertex& thePoint);
 
   /*!
    * \brief Compute precise bounding box of the shape based on the rough bounding box.
@@ -153,8 +154,7 @@ namespace GEOMUtils {
    * \param theBox rough bounding box on input; precise bounding box on output.
    * \retval Standard_True in case of success; Standard_False otherwise.
    */
-  Standard_EXPORT Standard_Boolean PreciseBoundingBox
-                          (const TopoDS_Shape &theShape, Bnd_Box &theBox);
+  Standard_EXPORT Standard_Boolean PreciseBoundingBox(const TopoDS_Shape &theShape, Bnd_Box &theBox);
 
   /*!
    * \brief Computes minumal distance between two shapes for singular cases
@@ -166,11 +166,10 @@ namespace GEOMUtils {
    * \param Ptmp2 the output result point on the second shape
    * \retval negative value if it is not a singular case; actual distance for singular case.
    */
-  Standard_EXPORT Standard_Real GetMinDistanceSingular
-                               (const TopoDS_Shape& aSh1,
-                                const TopoDS_Shape& aSh2,
-                                gp_Pnt& Ptmp1, gp_Pnt& Ptmp2);
-
+  Standard_EXPORT Standard_Real GetMinDistanceSingular(const TopoDS_Shape& aSh1,
+                                                      const TopoDS_Shape& aSh2,
+                                                      gp_Pnt& Ptmp1, gp_Pnt& Ptmp2);
+  
   /*!
    * \brief Computes minumal distance between two shapes.
    *
@@ -180,11 +179,10 @@ namespace GEOMUtils {
    * \param thePnt2 the output result point on the second shape
    * \retval negative value in case of failure; otherwise the real distance.
    */
-  Standard_EXPORT Standard_Real GetMinDistance
-                               (const TopoDS_Shape& theShape1,
-                                const TopoDS_Shape& theShape2,
-                                gp_Pnt& thePnt1, gp_Pnt& thePnt2);
-
+  Standard_EXPORT Standard_Real GetMinDistance(const TopoDS_Shape& theShape1,
+                                              const TopoDS_Shape& theShape2,
+                                              gp_Pnt& thePnt1, gp_Pnt& thePnt2);
+  
   /*!
    * \brief Returns the point clicked in 3D view.
    *
index be3500b2af50e9b48042ec3cf58929e5f4f1067a..7f0d5083bd5dd779f8297855cc868f1d82f669ca 100755 (executable)
@@ -46,7 +46,7 @@ static float         InfiniteValue        = 1e38;
 //function : GEOMUtils_Hatcher
 //purpose  :
 //=======================================================================
-GEOMUtils_Hatcher::GEOMUtils_Hatcher(const TopoDS_Face &theFace)
+GEOMUtils::Hatcher::Hatcher(const TopoDS_Face &theFace)
 : myHatcher(Geom2dHatch_Intersector (IntersectorConfusion, IntersectorTangency),
             HatcherConfusion2d, HatcherConfusion3d,
             Standard_True, Standard_False),
@@ -140,7 +140,7 @@ GEOMUtils_Hatcher::GEOMUtils_Hatcher(const TopoDS_Face &theFace)
 //function : Init
 //purpose  :
 //=======================================================================
-void GEOMUtils_Hatcher::Init(const Standard_Integer theNbIsos)
+void GEOMUtils::Hatcher::Init(const Standard_Integer theNbIsos)
 {
   Init(theNbIsos, theNbIsos);
 }
@@ -149,8 +149,8 @@ void GEOMUtils_Hatcher::Init(const Standard_Integer theNbIsos)
 //function : Init
 //purpose  :
 //=======================================================================
-void GEOMUtils_Hatcher::Init(const Standard_Integer theNbIsoU,
-                             const Standard_Integer theNbIsoV)
+void GEOMUtils::Hatcher::Init(const Standard_Integer theNbIsoU,
+                             const Standard_Integer theNbIsoV)
 {
   // Initialize data.
   Clear();
@@ -209,8 +209,8 @@ void GEOMUtils_Hatcher::Init(const Standard_Integer theNbIsoU,
 //function : Init
 //purpose  :
 //=======================================================================
-void GEOMUtils_Hatcher::Init(const GeomAbs_IsoType theIsoType,
-                             const Standard_Real   theParameter)
+void GEOMUtils::Hatcher::Init(const GeomAbs_IsoType theIsoType,
+                             const Standard_Real   theParameter)
 {
   // Initialize data.
   Clear();
@@ -249,7 +249,7 @@ void GEOMUtils_Hatcher::Init(const GeomAbs_IsoType theIsoType,
 //function : Perform
 //purpose  :
 //=======================================================================
-void GEOMUtils_Hatcher::Perform()
+void GEOMUtils::Hatcher::Perform()
 {
   myHatcher.Trim();
 
@@ -294,7 +294,7 @@ void GEOMUtils_Hatcher::Perform()
 //function : GetNbDomains
 //purpose  :
 //=======================================================================
-Standard_Integer GEOMUtils_Hatcher::GetNbDomains
+Standard_Integer GEOMUtils::Hatcher::GetNbDomains
               (const Standard_Integer theHatchingIndex) const
 {
   Standard_Integer aResult = -1;
@@ -310,7 +310,7 @@ Standard_Integer GEOMUtils_Hatcher::GetNbDomains
 //function : GetDomain
 //purpose  :
 //=======================================================================
-Standard_Boolean GEOMUtils_Hatcher::GetDomain
+Standard_Boolean GEOMUtils::Hatcher::GetDomain
                            (const Standard_Integer  theHatchingIndex,
                             const Standard_Integer  theDomainIndex,
                                   Standard_Real    &theParam1,
@@ -348,7 +348,7 @@ Standard_Boolean GEOMUtils_Hatcher::GetDomain
 //function : IsDomainInfinite
 //purpose  :
 //=======================================================================
-Standard_Boolean GEOMUtils_Hatcher::IsDomainInfinite
+Standard_Boolean GEOMUtils::Hatcher::IsDomainInfinite
                            (const Standard_Integer  theHatchingIndex,
                             const Standard_Integer  theDomainIndex) const
 {
@@ -374,7 +374,7 @@ Standard_Boolean GEOMUtils_Hatcher::IsDomainInfinite
 //function : GetHatching
 //purpose  :
 //=======================================================================
-const Handle(Geom2d_Curve) &GEOMUtils_Hatcher::GetHatching
+const Handle(Geom2d_Curve) &GEOMUtils::Hatcher::GetHatching
                       (const Standard_Integer theHatchingIndex) const
 {
   const Geom2dAdaptor_Curve &aGACurve =
@@ -387,7 +387,7 @@ const Handle(Geom2d_Curve) &GEOMUtils_Hatcher::GetHatching
 //function : Clear
 //purpose  :
 //=======================================================================
-void GEOMUtils_Hatcher::Clear()
+void GEOMUtils::Hatcher::Clear()
 {
   myIsDone = Standard_False;
   myUPrm.Nullify();
index adcc2a2589c507656f3686c671d2047d22864d28..845fa5dcceace26673f6efb43615bd4b09d6a1f7 100755 (executable)
 /*!
  * This class represents a hatcher for topological faces.
  */
-class GEOMUtils_Hatcher {
-
-public:
-
-  /**
-   * Constructor. Initializes the object with the face.
-   */
-  Standard_EXPORT GEOMUtils_Hatcher(const TopoDS_Face &theFace);
-
-  /**
-   * This method initializes the hatcher with hatchings.
-   *
-   * \param theNbIsos the number of U- and V-isolines.
-   */
-  Standard_EXPORT void Init(const Standard_Integer theNbIsos);
-
-  /**
-   * This method initializes the hatcher with hatchings.
-   *
-   * \param theNbIsoU the number of U-isolines.
-   * \param theNbIsoV the number of V-isolines.
-   */
-  Standard_EXPORT void Init(const Standard_Integer theNbIsoU,
-                            const Standard_Integer theNbIsoV);
-
-  /**
-   * This method initializes the hatcher with a hatching.
-   *
-   * \param theIsoType the isoline type.
-   * \param theParameter the isoline parameter.
-   */
-  Standard_EXPORT void Init(const GeomAbs_IsoType theIsoType,
-                            const Standard_Real   theParameter);
-
-  /**
-   * Compute hatching domatins.
-   */
-  Standard_EXPORT void Perform();
-
-  /**
-   * This method returns true if at least one hatching's domains
-   * are computed successfully.
-   *
-   * \return Standard_True is case of success.
-   */
-  Standard_Boolean IsDone() const
-  { return myIsDone; }
-
-  /**
-   * This method returns the initial face.
-   *
-   * \return the initial face.
-   */
-  const TopoDS_Face &GetFace() const
-  { return myFace; }
-
-  /**
-   * This method returns the number of domains for a particular hatching.
-   * If the operation is not done or there is no real hatching for
-   * a particular index a negative value is returned.
-   *
-   * \param theHatchingIndex the hatching index.
-   * \return the number of domains computed for the hatching.
-   */
-  Standard_EXPORT Standard_Integer GetNbDomains
-              (const Standard_Integer theHatchingIndex) const;
-
-  /**
-   * This method returns the domputed domain range computed for a particular
-   * hatching. theDomainIndex should be in the range [1..GetNbDomains].
-   *
-   * \param theHatchingIndex the hatching index.
-   * \param theDomainIndex the domain index for the particular hatching.
-   * \param theParam1 (output) the first parameter of the domain.
-   * \param theParam2 (output) the last parameter of the domain.
-   * \return Standard_True in case of success; Standard_False otherwise.
-   */
-  Standard_EXPORT Standard_Boolean GetDomain
-                           (const Standard_Integer  theHatchingIndex,
-                            const Standard_Integer  theDomainIndex,
-                                  Standard_Real    &theParam1,
-                                  Standard_Real    &theParam2) const;
-
-  /**
-   * This method returns Standard_True if a domain has infinite first
-   * or last parameter.
-   *
-   * \param theHatchingIndex the hatching index.
-   * \param theDomainIndex the domain index for the particular hatching.
-   * \return Standard_True if a domain is infinite; Standard_False otherwise.
-   */
-  Standard_EXPORT Standard_Boolean IsDomainInfinite
-                           (const Standard_Integer  theHatchingIndex,
-                            const Standard_Integer  theDomainIndex) const;
-
-  /**
-   * This method returns the reference to OCCT hatcher.
-   *
-   * \return the reference to OCCT hatcher.
-   */
-  Standard_EXPORT const Geom2dHatch_Hatcher &GetHatcher() const
-  { return myHatcher; }
-
-  /**
-   * This method returns the array of indices of U-isoline hatchings.
-   * Can be null if the object is initialized by 0 U-isolines.
-   *
-   * \return the array of U-isoline hatching indices.
-   */
-  Standard_EXPORT const Handle(TColStd_HArray1OfInteger) &GetUIndices() const
-  { return myUInd; }
-
-  /**
-   * This method returns the array of indices of V-isoline hatchings.
-   * Can be null if the object is initialized by 0 V-isolines.
-   *
-   * \return the array of V-isoline hatching indices.
-   */
-  Standard_EXPORT const Handle(TColStd_HArray1OfInteger) &GetVIndices() const
-  { return myVInd; }
-
-  /**
-   * This method returns the array of parameters of U-isoline hatchings.
-   * Can be null if the object is initialized by 0 U-isolines.
-   *
-   * \return the array of U-isoline hatching parameters.
-   */
-  Standard_EXPORT const Handle(TColStd_HArray1OfReal) &GetUParams() const
-  { return myUPrm; }
-
-  /**
-   * This method returns the array of parameters of V-isoline hatchings.
-   * Can be null if the object is initialized by 0 V-isolines.
-   *
-   * \return the array of V-isoline hatching parameters.
-   */
-  Standard_EXPORT const Handle(TColStd_HArray1OfReal) &GetVParams() const
-  { return myVPrm; }
-
-  /**
-   * This method returns a hatching curve by its index.
-   * If the curve is not found null handle is returned.
-   *
-   * \param theHatchingIndex the hatching curve index.
-   */
-  Standard_EXPORT const Handle(Geom2d_Curve) &GetHatching
-                      (const Standard_Integer theHatchingIndex) const;
-
-protected:
-
-  /**
-   * This method clears all hatchings data.
-   */
-  void Clear();
-
-private:
-
-  Geom2dHatch_Hatcher              myHatcher;
-  TopoDS_Face                      myFace;
-  Standard_Boolean                 myIsDone;
-  Standard_Real                    myUMin;
-  Standard_Real                    myUMax;
-  Standard_Real                    myVMin;
-  Standard_Real                    myVMax;
-  Handle(TColStd_HArray1OfReal)    myUPrm;
-  Handle(TColStd_HArray1OfReal)    myVPrm;
-  Handle(TColStd_HArray1OfInteger) myUInd;
-  Handle(TColStd_HArray1OfInteger) myVInd;
-
-};
+namespace GEOMUtils
+{
+  class Hatcher
+  {
+  public:
+    
+    /**
+     * Constructor. Initializes the object with the face.
+     */
+    Standard_EXPORT Hatcher(const TopoDS_Face &theFace);
+    
+    /**
+     * This method initializes the hatcher with hatchings.
+     *
+     * \param theNbIsos the number of U- and V-isolines.
+     */
+    Standard_EXPORT void Init(const Standard_Integer theNbIsos);
+    
+    /**
+     * This method initializes the hatcher with hatchings.
+     *
+     * \param theNbIsoU the number of U-isolines.
+     * \param theNbIsoV the number of V-isolines.
+     */
+    Standard_EXPORT void Init(const Standard_Integer theNbIsoU,
+                             const Standard_Integer theNbIsoV);
+    
+    /**
+     * This method initializes the hatcher with a hatching.
+     *
+     * \param theIsoType the isoline type.
+     * \param theParameter the isoline parameter.
+     */
+    Standard_EXPORT void Init(const GeomAbs_IsoType theIsoType,
+                             const Standard_Real   theParameter);
+
+    /**
+     * Compute hatching domatins.
+     */
+    Standard_EXPORT void Perform();
+
+    /**
+     * This method returns true if at least one hatching's domains
+     * are computed successfully.
+     *
+     * \return Standard_True is case of success.
+     */
+    Standard_Boolean IsDone() const
+    { return myIsDone; }
+
+    /**
+     * This method returns the initial face.
+     *
+     * \return the initial face.
+     */
+    const TopoDS_Face &GetFace() const
+    { return myFace; }
+
+    /**
+     * This method returns the number of domains for a particular hatching.
+     * If the operation is not done or there is no real hatching for
+     * a particular index a negative value is returned.
+     *
+     * \param theHatchingIndex the hatching index.
+     * \return the number of domains computed for the hatching.
+     */
+    Standard_EXPORT Standard_Integer GetNbDomains
+    (const Standard_Integer theHatchingIndex) const;
+
+    /**
+     * This method returns the domputed domain range computed for a particular
+     * hatching. theDomainIndex should be in the range [1..GetNbDomains].
+     *
+     * \param theHatchingIndex the hatching index.
+     * \param theDomainIndex the domain index for the particular hatching.
+     * \param theParam1 (output) the first parameter of the domain.
+     * \param theParam2 (output) the last parameter of the domain.
+     * \return Standard_True in case of success; Standard_False otherwise.
+     */
+    Standard_EXPORT Standard_Boolean GetDomain
+    (const Standard_Integer  theHatchingIndex,
+     const Standard_Integer  theDomainIndex,
+     Standard_Real    &theParam1,
+     Standard_Real    &theParam2) const;
+
+    /**
+     * This method returns Standard_True if a domain has infinite first
+     * or last parameter.
+     *
+     * \param theHatchingIndex the hatching index.
+     * \param theDomainIndex the domain index for the particular hatching.
+     * \return Standard_True if a domain is infinite; Standard_False otherwise.
+     */
+    Standard_EXPORT Standard_Boolean IsDomainInfinite
+    (const Standard_Integer  theHatchingIndex,
+     const Standard_Integer  theDomainIndex) const;
+
+    /**
+     * This method returns the reference to OCCT hatcher.
+     *
+     * \return the reference to OCCT hatcher.
+     */
+    Standard_EXPORT const Geom2dHatch_Hatcher &GetHatcher() const
+    { return myHatcher; }
+
+    /**
+     * This method returns the array of indices of U-isoline hatchings.
+     * Can be null if the object is initialized by 0 U-isolines.
+     *
+     * \return the array of U-isoline hatching indices.
+     */
+    Standard_EXPORT const Handle(TColStd_HArray1OfInteger) &GetUIndices() const
+    { return myUInd; }
+
+    /**
+     * This method returns the array of indices of V-isoline hatchings.
+     * Can be null if the object is initialized by 0 V-isolines.
+     *
+     * \return the array of V-isoline hatching indices.
+     */
+    Standard_EXPORT const Handle(TColStd_HArray1OfInteger) &GetVIndices() const
+    { return myVInd; }
+
+    /**
+     * This method returns the array of parameters of U-isoline hatchings.
+     * Can be null if the object is initialized by 0 U-isolines.
+     *
+     * \return the array of U-isoline hatching parameters.
+     */
+    Standard_EXPORT const Handle(TColStd_HArray1OfReal) &GetUParams() const
+    { return myUPrm; }
+
+    /**
+     * This method returns the array of parameters of V-isoline hatchings.
+     * Can be null if the object is initialized by 0 V-isolines.
+     *
+     * \return the array of V-isoline hatching parameters.
+     */
+    Standard_EXPORT const Handle(TColStd_HArray1OfReal) &GetVParams() const
+    { return myVPrm; }
+
+    /**
+     * This method returns a hatching curve by its index.
+     * If the curve is not found null handle is returned.
+     *
+     * \param theHatchingIndex the hatching curve index.
+     */
+    Standard_EXPORT const Handle(Geom2d_Curve) &GetHatching
+      (const Standard_Integer theHatchingIndex) const;
+
+  protected:
+
+    /**
+     * This method clears all hatchings data.
+     */
+    void Clear();
+
+  private:
+
+    Geom2dHatch_Hatcher              myHatcher;
+    TopoDS_Face                      myFace;
+    Standard_Boolean                 myIsDone;
+    Standard_Real                    myUMin;
+    Standard_Real                    myUMax;
+    Standard_Real                    myVMin;
+    Standard_Real                    myVMax;
+    Handle(TColStd_HArray1OfReal)    myUPrm;
+    Handle(TColStd_HArray1OfReal)    myVPrm;
+    Handle(TColStd_HArray1OfInteger) myUInd;
+    Handle(TColStd_HArray1OfInteger) myVInd;
+
+  };
+}
 
 #endif
diff --git a/src/GEOMUtils/GEOMUtils_XmlHandler.cxx b/src/GEOMUtils/GEOMUtils_XmlHandler.cxx
new file mode 100644 (file)
index 0000000..a05371b
--- /dev/null
@@ -0,0 +1,241 @@
+// 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, or (at your option) any 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 "GEOMUtils_XmlHandler.hxx"
+
+#include <libxml/parser.h>
+#include <algorithm>
+
+#ifdef WIN32
+#include <windows.h>
+#else
+#include <unistd.h>
+#endif
+
+//#define MYDEBUG
+
+namespace
+{
+  const char*    env_var     = "GEOM_PluginsList";
+  
+  const xmlChar* root_tag    = (xmlChar*)"geom-plugins";
+  const xmlChar* plugin_tag  = (xmlChar*)"geom-plugin";
+  const xmlChar* name_tag    = (xmlChar*)"name";
+  const xmlChar* server_tag  = (xmlChar*)"server-lib";
+  const xmlChar* gui_tag     = (xmlChar*)"gui-lib";
+  const xmlChar* actions_tag = (xmlChar*)"actions";
+  const xmlChar* action_tag  = (xmlChar*)"action";
+  const xmlChar* label_tag   = (xmlChar*)"label";
+  const xmlChar* icon_tag    = (xmlChar*)"icon";
+  const xmlChar* menu_tag    = (xmlChar*)"menu";
+  const xmlChar* tooltip_tag = (xmlChar*)"tooltip";
+  const xmlChar* status_tag  = (xmlChar*)"status-bar";
+  const xmlChar* accel_tag   = (xmlChar*)"accel";
+
+  std::string toUpper( const std::string& s )
+  {
+    std::string r = s;
+    std::transform( r.begin(), r.end(), r.begin(), toupper );
+    return r;
+  }
+
+  std::string toLower( const std::string& s )
+  {
+    std::string r = s;
+    std::transform( r.begin(), r.end(), r.begin(), tolower );
+    return r;
+  }
+
+  std::string readXmlAttribute(xmlNodePtr node, const xmlChar* attribute)
+  {
+    std::string result = "";
+    xmlChar* strAttr = xmlGetProp(node, attribute);
+    if (strAttr != NULL) {
+      result = (char*)strAttr;
+      xmlFree(strAttr);
+    }
+    return result;
+  }
+
+  std::list<std::string> getPluginXMLFiles()
+  {
+    std::list<std::string> xmlPaths;
+
+#ifdef WIN32
+    std::string sep = "\\";
+#else
+    std::string sep = "/";
+#endif
+
+    if ( const char* var = getenv( env_var ) )
+    {
+      std::string plugins = var;
+
+      std::string::size_type from = 0, pos;
+      while ( from < plugins.size() )
+      {
+       pos = plugins.find( ':', from );
+       std::string plugin;
+       if ( pos != std::string::npos )
+         plugin = plugins.substr( from, pos-from );
+       else
+         plugin = plugins.substr( from ), pos = plugins.size();
+       from = pos + 1;
+       
+       if ( plugin.size() == 0 ) continue;
+       
+       std::string pluginRoot    = toUpper( plugin+"_ROOT_DIR" );
+
+       const char* rootDirGeom   = getenv( "GEOM_ROOT_DIR" );
+       const char* rootDirPlugin = getenv( pluginRoot.c_str() );
+
+       bool fileOK = false;
+       if ( rootDirGeom ) {
+         std::string xmlPath = rootDirGeom;
+         if ( xmlPath[ xmlPath.size()-1 ] != sep[0] )
+           xmlPath += sep;
+         xmlPath += "share" + sep + "salome" + sep + "resources" + sep + "geom" + sep + plugin + ".xml";
+#ifdef WIN32
+         fileOK = (GetFileAttributes(xmlPath.c_str()) != INVALID_FILE_ATTRIBUTES);
+#else
+         fileOK = (access(xmlPath.c_str(), F_OK) == 0);
+#endif
+         if ( fileOK )
+           xmlPaths.push_back( xmlPath );
+       }
+       if ( !fileOK && rootDirPlugin ) {
+         std::string xmlPath = rootDirPlugin;
+         if ( xmlPath[ xmlPath.size()-1 ] != sep[0] )
+           xmlPath += sep;
+         xmlPath += "share" + sep + "salome" + sep + "resources" + sep + toLower(plugin) + sep + plugin + ".xml";
+#ifdef WIN32
+         fileOK = (GetFileAttributes(xmlPath.c_str()) != INVALID_FILE_ATTRIBUTES);
+#else
+         fileOK = (access(xmlPath.c_str(), F_OK) == 0);
+#endif
+         if ( fileOK )
+           xmlPaths.push_back( xmlPath );
+       }
+      }
+    }
+    return xmlPaths;
+  }
+
+  void dumpinfo(const GEOMUtils::PluginInfo& info)
+  {
+    printf("DUMPING PLUGIN INFO\n");
+    GEOMUtils::PluginInfo::const_iterator it;
+    for (it = info.begin(); it != info.end(); ++it) {
+      GEOMUtils::PluginData pdata = *it;
+      printf("Plugin: %s\n", pdata.name.c_str());
+      printf("  serverLib = %s\n", pdata.serverLib.c_str());
+      printf("  clientLib = %s\n", pdata.clientLib.c_str());
+      printf("  actions:\n");
+      std::list<GEOMUtils::ActionData>::const_iterator ait;
+      for (ait = pdata.actions.begin(); ait != pdata.actions.end(); ++ait) {
+       GEOMUtils::ActionData adata = *ait;
+       printf("     label      = %s\n", adata.label.c_str());
+       printf("     icon       = %s\n", adata.icon.c_str());
+       printf("     menuText   = %s\n", adata.menuText.c_str());
+       printf("     toolTip    = %s\n", adata.toolTip.c_str());
+       printf("     statusText = %s\n", adata.statusText.c_str());
+       printf("\n");
+      }
+      printf("-----\n");
+    }
+  }
+}
+
+namespace GEOMUtils
+{
+  PluginInfo ReadPluginInfo()
+  {
+    PluginInfo info;
+
+    std::list<std::string> xmlPaths = getPluginXMLFiles();
+
+    std::list<std::string>::const_iterator fit;
+
+    for ( fit = xmlPaths.begin(); fit != xmlPaths.end(); ++fit )
+    {
+      std::string fileName = *fit;
+      
+      int options = XML_PARSE_HUGE | XML_PARSE_NOCDATA;
+      xmlDocPtr doc = xmlReadFile( fileName.c_str(), NULL, options );
+      
+      if ( doc )
+      {
+       // get root node
+       xmlNodePtr root = xmlDocGetRootElement(doc);
+       
+       // check if it is plugins container node
+       if (xmlStrcmp(root->name, root_tag) == 0)
+       {
+         // iterate through children, to get plugins data
+         for (xmlNodePtr node = root->children; node; node = node->next)
+         {
+           if (xmlStrcmp(node->name, plugin_tag) == 0)
+           {
+             // plugin node
+             PluginData data;
+             data.name      = readXmlAttribute(node, name_tag);
+             data.serverLib = readXmlAttribute(node, server_tag);
+             data.clientLib = readXmlAttribute(node, gui_tag);
+             // iterate through children, to find actions container node
+             for (xmlNodePtr subnode = node->children; subnode; subnode = subnode->next)
+             {
+               if (xmlStrcmp(subnode->name, actions_tag) == 0)
+               {
+                 // actions container node
+                 // iterate through children, to get actions data
+                 for (xmlNodePtr subsubnode = subnode->children; subsubnode; subsubnode = subsubnode->next)
+                 {
+                   if (xmlStrcmp(subsubnode->name, action_tag) == 0)
+                   {
+                     // action node
+                     ActionData action;
+                     action.label      = readXmlAttribute(subsubnode, label_tag);
+                     action.icon       = readXmlAttribute(subsubnode, icon_tag);
+                     action.menuText   = readXmlAttribute(subsubnode, menu_tag);
+                     action.toolTip    = readXmlAttribute(subsubnode, tooltip_tag);
+                     action.statusText = readXmlAttribute(subsubnode, status_tag);
+                     action.accel      = readXmlAttribute(subsubnode, accel_tag);
+                     if (action.label != "")
+                       data.actions.push_back(action);
+                   } // end action node
+                 } // end iteration through actions container node children
+               } // end actions container node
+             } // end iterations through plugin node children
+             
+             if (data.name != "")
+               info.push_back(data);
+           } // end plugin node
+         } // end iterations through plugins container node children
+       } // end root node
+       
+       xmlFreeDoc(doc);
+       //xmlCleanupParser();//vsr: xmlCleanupParser should not be called from the application
+      } // end xml doc
+    }
+#ifdef MYDEBUG
+    dumpinfo(info);
+#endif
+    return info;
+  }
+}
diff --git a/src/GEOMUtils/GEOMUtils_XmlHandler.hxx b/src/GEOMUtils/GEOMUtils_XmlHandler.hxx
new file mode 100644 (file)
index 0000000..4617fe7
--- /dev/null
@@ -0,0 +1,56 @@
+// 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, or (at your option) any 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 _GEOMUtils_XmlHandler_HXX_
+#define _GEOMUtils_XmlHandler_HXX_
+
+#include <Standard_Macro.hxx>
+
+#include <string>
+#include <list>
+
+namespace GEOMUtils
+{
+  //! Plugin action data
+  struct Standard_EXPORT ActionData
+  {
+    std::string label;       //!< unique ID
+    std::string icon;        //!< icon
+    std::string menuText;    //!< menu text
+    std::string toolTip;     //!< tooltip
+    std::string statusText;  //!< status bar text
+    std::string accel;       //!< shortcut
+  };
+  
+  //! Plugin data
+  struct Standard_EXPORT PluginData
+  {
+    std::string name;              //!< plugin name
+    std::string serverLib;         //!< engine library
+    std::string clientLib;         //!< GUI library
+    std::list<ActionData> actions; //!< actions
+  };
+  
+  //! Plugins information
+  typedef std::list<PluginData> PluginInfo;
+
+  Standard_EXPORT PluginInfo ReadPluginInfo();
+}
+
+#endif // _GEOMUtils_XmlHandler_HXX_
index ca49d2acab8b04c96db456dc23af94af428797a3..d916ffe60b5febdab8b2c978b4641e183610a5ff 100755 (executable)
@@ -29,7 +29,6 @@ INCLUDE_DIRECTORIES(
   ${PROJECT_SOURCE_DIR}/src/GEOM
   ${PROJECT_SOURCE_DIR}/src/GEOMAlgo
   ${PROJECT_SOURCE_DIR}/src/GEOMUtils
-  ${PROJECT_SOURCE_DIR}/src/XAO
   ${PROJECT_BINARY_DIR}/idl
   ${CMAKE_CURRENT_SOURCE_DIR}
   ${PROJECT_BINARY_DIR}
@@ -45,6 +44,7 @@ ADD_DEFINITIONS(
 # libraries to link to
 SET(_link_LIBRARIES
   GEOMImpl
+  GEOMUtils
   SalomeIDLGEOM
   ${KERNEL_SALOMELocalTrace}
   ${KERNEL_SalomeGenericObj}
@@ -56,6 +56,8 @@ SET(_link_LIBRARIES
 # --- headers ---
 
 SET(GEOMEngine_HEADERS
+  GEOM_IFieldOperations_i.hh
+  GEOM_BaseObject_i.hh
   GEOM_Object_i.hh
   GEOM_IOperations_i.hh
   GEOM_IBasicOperations_i.hh
index a764d3aeb8f3ca67ffd09f83f3102f57e5fe5cb0..e939d30f10bea24a0f4868cc1e1709a9284b23e0 100755 (executable)
@@ -44,6 +44,7 @@
 #include "GEOMImpl_CopyDriver.hxx"
 #include "GEOMImpl_IInsertOperations.hxx"
 #include "GEOM_wrap.hxx"
+#include "GEOMUtils_XmlHandler.hxx"
 
 // Cascade headers
 #include <BRep_Builder.hxx>
@@ -121,6 +122,18 @@ GEOM_Gen_i::GEOM_Gen_i(CORBA::ORB_ptr            orb,
 #endif
     OSD::SetSignal( raiseFPE );
   }
+
+  GEOMUtils::PluginInfo plugins = GEOMUtils::ReadPluginInfo();
+  GEOMUtils::PluginInfo::const_iterator it;
+  for (it = plugins.begin(); it != plugins.end(); ++it)
+  {
+    try {
+      LoadPlugin((*it).serverLib);
+    }
+    catch (...)  {
+      MESSAGE("Warning: can't load plugin library " << (*it).serverLib);
+    }
+  }
 }
 
 //============================================================================
@@ -303,7 +316,26 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr   theStudy,
   } else if ( mytype == GEOM_MARKER ) {
     aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_LCS");
     aNamePrefix = "LocalCS_";
-  } else if ( mytype > ADVANCED_BASE ) {
+  }  else if ( mytype >= USER_TYPE_EX ) {
+      char buf[20];
+      sprintf( buf, "%d", aBaseObj->GetType() );
+      GEOM::CreationInformation_var info = aBaseObj->GetCreationInformation();
+      std::string plgId;
+      for ( size_t i = 0; i < info->params.length(); ++i ) {
+       std::string param_name = info->params[i].name.in();
+       std::string param_value = info->params[i].value.in();   
+       if( param_name == PLUGIN_NAME) {
+         plgId = param_value;
+         break;
+       }
+      }
+      if(plgId.length() > 0 ) {
+       plgId += "::";
+      }
+      plgId +="ICON_OBJBROWSER_"; 
+      plgId += buf;
+      aResultSO->SetAttrString("AttributePixMap",plgId.c_str());
+  } else if ( mytype > USER_TYPE ) {
     char buf[20];
     sprintf( buf, "%d", aBaseObj->GetType() );
     std::string advId = "ICON_OBJBROWSER_ADVANCED_"; advId += buf;
@@ -2405,74 +2437,84 @@ GEOM::GEOM_IOperations_ptr GEOM_Gen_i::GetPluginOperations(CORBA::Long theStudyI
                                                            const char* theLibName)
      throw ( SALOME::SALOME_Exception )
 {
-  std::string aPlatformLibName;
-#ifdef WIN32
-  aPlatformLibName = theLibName;
-  aPlatformLibName += ".dll" ;
-#else
-  aPlatformLibName = "lib";
-  aPlatformLibName += theLibName;
-  aPlatformLibName += ".so";
-#endif
-
   Unexpect aCatch(SALOME_SalomeException);
   MESSAGE( "GEOM_Gen_i::GetPluginOperations" );
 
   GEOM::GEOM_Gen_ptr engine = _this();
 
-  GEOM_IOperations_i* aServant = 0;
   GEOM::GEOM_IOperations_var operations;
 
-  try {
-    // check, if corresponding operations are already created
-    if (myOpCreatorMap.find(std::string(theLibName)) == myOpCreatorMap.end()) {
-      // load plugin library
-      LibHandle libHandle = LoadLib( aPlatformLibName.c_str()/*theLibName*/ );
-      if (!libHandle) {
-        // report any error, if occured
-#ifndef WIN32
-        const char* anError = dlerror();
-        throw(SALOME_Exception(anError));
-#else
-        throw(SALOME_Exception(LOCALIZED( "Can't load server geometry plugin library" )));
-#endif
-      }
-
-      // get method, returning operations creator
-      typedef GEOM_GenericOperationsCreator* (*GetOperationsCreator)();
-      GetOperationsCreator procHandle =
-        (GetOperationsCreator)GetProc( libHandle, "GetOperationsCreator" );
-      if (!procHandle) {
-        throw(SALOME_Exception(LOCALIZED("bad geometry plugin library")));
-        UnLoadLib(libHandle);
-      }
-
-      // get operations creator
-      GEOM_GenericOperationsCreator* aCreator = procHandle();
-      if (!aCreator) {
-        throw(SALOME_Exception(LOCALIZED("bad geometry plugin library implementation")));
-      }
-
-      // map operations creator to a plugin name
-      myOpCreatorMap[std::string(theLibName)] = aCreator;
-    }
+  std::string aLibName = theLibName;
 
+  try {
+    // load plugin library
+    LoadPlugin(aLibName);
     // create a new operations object, store its ref. in engine
-    aServant = myOpCreatorMap[std::string(theLibName)]->Create(_poa, theStudyID, engine, _impl);
-    //??? aServant->SetLibName(aPlatformLibName/*theLibName*/); // for persistency assurance
+    if ( myOpCreatorMap.find(aLibName) != myOpCreatorMap.end() ) {
+      GEOM_IOperations_i* aServant = 0;
+      aServant = myOpCreatorMap[aLibName]->Create(_poa, theStudyID, engine, _impl);
+      // activate the CORBA servant
+      if (aServant)
+       operations = aServant->_this();
+    }
   }
   catch (SALOME_Exception& S_ex) {
     THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
   }
 
-  if (!aServant)
-    return operations._retn();
-
-  // activate the CORBA servant
-  operations = GEOM::GEOM_IOperations::_narrow( aServant->_this() );
   return operations._retn();
 }
 
+//============================================================================
+// function : LoadPlugin
+// purpose  : load plugin library and retrieve an instance of operations creator
+//============================================================================
+void GEOM_Gen_i::LoadPlugin(const std::string& theLibName)
+{
+  std::string aPlatformLibName;
+#ifdef WIN32
+  aPlatformLibName = theLibName;
+  aPlatformLibName += ".dll" ;
+#else
+  aPlatformLibName = "lib";
+  aPlatformLibName += theLibName;
+  aPlatformLibName += ".so";
+#endif
+  
+  // check, if corresponding operations are already created
+  if (myOpCreatorMap.find(theLibName) == myOpCreatorMap.end()) {
+    // load plugin library
+    LibHandle libHandle = LoadLib( aPlatformLibName.c_str() );
+    if (!libHandle) {
+      // report any error, if occured
+#ifndef WIN32
+      throw(SALOME_Exception(dlerror()));
+#else
+      throw(SALOME_Exception(LOCALIZED( "Can't load server geometry plugin library" )));
+#endif
+    }
+    
+    // get method, returning operations creator
+    typedef GEOM_GenericOperationsCreator* (*GetOperationsCreator)();
+    GetOperationsCreator procHandle =
+      (GetOperationsCreator)GetProc( libHandle, "GetOperationsCreator" );
+    if (!procHandle) {
+      UnLoadLib(libHandle);
+      throw(SALOME_Exception(LOCALIZED("bad geometry plugin library")));
+    }
+    
+    // get operations creator
+    GEOM_GenericOperationsCreator* aCreator = procHandle();
+    if (aCreator) {
+      // map operations creator to a plugin name
+      myOpCreatorMap[theLibName] = aCreator;
+    }
+    else {
+      throw(SALOME_Exception(LOCALIZED("bad geometry plugin library implementation")));
+    }
+  }
+}
+
 //=============================================================================
 /*!
  *  AddSubShape
@@ -2925,30 +2967,26 @@ Engines::ListOfIdentifiers* GEOM_Gen_i::importData(
   aFile.write(aBuffer, aFileStream->length());
   aFile.close();
 
-  GEOM::GEOM_Object_var aShapeObj;
-  GEOM::ListOfGO_var aSubShape = new GEOM::ListOfGO;
-  GEOM::ListOfGO_var aGroups = new GEOM::ListOfGO;
-  GEOM::ListOfFields_var aFields = new GEOM::ListOfFields;
-
-  CORBA::Boolean isResultOK = aInsOp->ImportXAO(aFullPath.c_str(), aShapeObj.out(), aSubShape.out(), aGroups.out(), aFields.out());
-
-  if ( isResultOK && !aShapeObj->_is_nil() && aInsOp->IsDone() ) {
-    SALOMEDS::SObject_var aSO = PublishInStudy(aStudy, SALOMEDS::SObject::_nil(), aShapeObj, aShapeObj->GetName());
-    aResult->length(aGroups->length() + 1);
-    aResult[0] = aSO->GetID(); // unioque identifer of the object in GEOM is entry of SObject
-    //Iteration for objects of the group.
-    for (int i = 0; i < aGroups->length(); i++) {
-      SALOMEDS::SObject_var aSOChild = AddInStudy(aStudy, aGroups[i], aGroups[i]->GetName(), aShapeObj);
-      aResult[i+1] = aSOChild->GetID();
+  GEOM::ListOfGBO_var aObjects = aInsOp->ImportFile(aFullPath.c_str(), "XAO");
+
+  if ( aObjects->length() > 0 && aInsOp->IsDone() ) {
+    aResult->length(aObjects->length());
+    // publish main object (first in the list of returned geom objects)
+    CORBA::String_var aName = aObjects[0]->GetName();
+    SALOMEDS::SObject_var aSO = PublishInStudy(aStudy.in(), SALOMEDS::SObject::_nil(), aObjects[0].in(), aName.in());
+    aResult[0] = aSO->GetID();
+    // publish groups && fields
+    for (int i = 1; i < aObjects->length(); i++ ) {
+      aName = aObjects[i]->GetName();
+      aSO = AddInStudy(aStudy.in(), aObjects[0].in(), aName.in(), aObjects[0].in());
+      aResult[i] = aSO->GetID();
     }
   }
   else {
-    if (aShapeObj->_is_nil())
-      MESSAGE("Result of the import operation is incorrect for file "<<aFullPath.c_str());
+    if (aObjects->length() == 0)
+      MESSAGE("ImportXAO operation is failed for file "<<aFullPath.c_str());
     if (!aInsOp->IsDone())
       MESSAGE("Import operation is not done for file "<<aFullPath.c_str());
-    if (!isResultOK)
-      MESSAGE("ImportXAO operation is failed for file "<<aFullPath.c_str());
     return aResult._retn();
   }
 
@@ -2977,21 +3015,24 @@ Engines::ListOfData* GEOM_Gen_i::getModifiedData(CORBA::Long studyId)
 
   CORBA::Object_var aSMObject = name_service->Resolve("/myStudyManager");
   SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow( aSMObject );
+  if (CORBA::is_nil(aStudyManager))
+    return aResult._retn();
   SALOMEDS::Study_var aStudy = aStudyManager->GetStudyByID( studyId );
+  if (CORBA::is_nil(aStudy))
+    return aResult._retn();
   SALOMEDS::SComponent_var aComponent = aStudy->FindComponent("GEOM");
   if (CORBA::is_nil(aComponent))
     return aResult._retn();
   SALOMEDS::ChildIterator_var anIter = aStudy->NewChildIterator(aComponent); // check only published shapes
 
+  GEOM::GEOM_IInsertOperations_var aInsOp    = GetIInsertOperations(aStudy->StudyId());
+  if (aInsOp->_is_nil()) {
+    MESSAGE("No insert operations!");
+    return aResult._retn();
+  }
+
   GEOM::GEOM_Object_var shapeObj;
-  GEOM::ListOfGO_var groups = new GEOM::ListOfGO;
-  GEOM::ListOfFields_var fields = new GEOM::ListOfFields;
-  std::string anAuthorName = "SIMAN Author";
   
-  GEOM::GEOM_IShapesOperations_var  aShapesOp = GetIShapesOperations(aStudy->StudyId());
-  GEOM::GEOM_IInsertOperations_var aInsOp = GetIInsertOperations(aStudy->StudyId());
-
-  int aSeqLength = 0; // the sequence length
   for(; anIter->More(); anIter->Next()) {
     SALOMEDS::SObject_var aSO = anIter->Value();
     SALOMEDS::SObject_var aRefSO;
@@ -3006,13 +3047,7 @@ Engines::ListOfData* GEOM_Gen_i::getModifiedData(CORBA::Long studyId)
 
           GEOM::shape_type aCORBAShapeType = aCORBAMainShape->GetShapeType();
           if (!aMainShape.IsNull() && !(aCORBAShapeType == GEOM::VERTEX) && !(aCORBAShapeType == GEOM::EDGE)) {
-            aSeqLength++;
             shapeObj = aCORBAMainShape;
-            if (aShapesOp->_is_nil()) {
-              MESSAGE("No shapes operations!");
-              return aResult._retn();
-            }
-            groups = aShapesOp->GetExistingSubObjects(aCORBAMainShape, true);
             break;
           }
         }
@@ -3020,19 +3055,12 @@ Engines::ListOfData* GEOM_Gen_i::getModifiedData(CORBA::Long studyId)
     }
   }
 
-  if (aInsOp->_is_nil()) {
-    MESSAGE("No insert operations!");
-    return aResult._retn();
-  }
-
-  if (aSeqLength > 0) { // Shape is correct, write it to the temporary file
-
-    std::string aFullXaoPath = Kernel_Utils::GetTmpFileName() + ".xao";
-    CORBA::Boolean isResultOK = aInsOp->ExportXAO(shapeObj.in(), groups.in(), fields.in(), anAuthorName.c_str(), aFullXaoPath.c_str());
-
+  if (!CORBA::is_nil(shapeObj)) { // Shape is correct, write it to the temporary file
+    std::string aPath = Kernel_Utils::GetTmpFileName() + ".xao";
+    aInsOp->Export(shapeObj.in(), aPath.c_str(), "XAO");
     aResult->length(1);
     Engines::DataContainer_var aData = (new Engines_DataContainer_i(
-                    aFullXaoPath.c_str(), "", "", true))->_this();
+                    aPath.c_str(), "", "", true))->_this();
     aResult[0] = aData;
   } else {
     MESSAGE("No shapes to export");
index 5a2c0382b94f9bdb46aabdf5f9c27dd00bb9f5e4..5af30555178ee201fedc9816ade20dc8260cfee5 100644 (file)
@@ -404,6 +404,8 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
                         std::set<std::string>& aChildren, 
                         std::set<std::string>& anOthers);
 
+  void LoadPlugin(const std::string& theLibName);
+
  private:
 
    ::GEOMImpl_Gen* _impl;
index 2d1960361771dfc7e1e73452eb563bbcb212e107..ef874e8244c2efd72b8a6dfd793553a0d062db87 100644 (file)
@@ -261,6 +261,28 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeCylinderRH (CORBA::Double th
   return GetObject(anObject);
 }
 
+//=============================================================================
+/*!
+ *  MakeCylinderRHA
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeCylinderRHA (CORBA::Double theR,
+                                                                CORBA::Double theH,
+                                                                CORBA::Double theA)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Create the Cylinder
+  Handle(GEOM_Object) anObject = GetOperations()->MakeCylinderRHA(theR, theH, theA);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
 //=============================================================================
 /*!
  *  MakeCylinderPntVecRH
@@ -289,6 +311,34 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeCylinderPntVecRH
   return GetObject(anObject);
 }
 
+//=============================================================================
+/*!
+ *  MakeCylinderPntVecRHA
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeCylinderPntVecRHA
+                      (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theVec,
+                       CORBA::Double theR, CORBA::Double theH, CORBA::Double theA)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference points
+  Handle(GEOM_Object) aPnt = GetObjectImpl(thePnt);
+  Handle(GEOM_Object) aVec = GetObjectImpl(theVec);
+
+  if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
+
+  //Create the Cylinder
+  Handle(GEOM_Object) anObject = GetOperations()->MakeCylinderPntVecRHA(aPnt, aVec, theR, theH, theA);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
 //=============================================================================
 /*!
  *  MakeConeR1R2H
index a475188211fc0c9e1a2a98fd079abab87a13107c..56c1cbc7b9cc69c4d1af92195e0bfb6b117befcb 100644 (file)
@@ -75,6 +75,16 @@ class GEOM_I_EXPORT GEOM_I3DPrimOperations_i :
                                              GEOM::GEOM_Object_ptr theVec,
                                              CORBA::Double theR,
                                              CORBA::Double theH);
+                                             
+  GEOM::GEOM_Object_ptr MakeCylinderRHA (CORBA::Double theR,
+                                        CORBA::Double theH,
+                                        CORBA::Double theA);
+
+  GEOM::GEOM_Object_ptr MakeCylinderPntVecRHA (GEOM::GEOM_Object_ptr thePnt,
+                                              GEOM::GEOM_Object_ptr theVec,
+                                              CORBA::Double theR,
+                                              CORBA::Double theH,
+                                              CORBA::Double theA);                                           
 
   GEOM::GEOM_Object_ptr MakeConeR1R2H (CORBA::Double theR1,
                                       CORBA::Double theR2,
index 2bad79431f36c844d89c830874635a1b759b198b..ab79c87b68bc66e78e6f735cbdb68f93d5619f6c 100644 (file)
@@ -33,7 +33,7 @@
 #include "Utils_ExceptHandlers.hxx"
 
 #include "GEOM_Engine.hxx"
-#include "GEOM_Object.hxx"
+#include "GEOM_BaseObject.hxx"
 
 #include <Basics_OCCTVersion.hxx>
 
@@ -109,11 +109,7 @@ void GEOM_IInsertOperations_i::Export
   if (anOriginal.IsNull()) return;
 
   //Export the shape to the file
-  char* aFileName   = strdup(theFileName);
-  char* aFormatName = strdup(theFormatName);
-  GetOperations()->Export(anOriginal, aFileName, aFormatName);
-  free(aFileName);
-  free(aFormatName);
+  GetOperations()->Export(anOriginal, theFileName, theFormatName);
 }
 
 //=============================================================================
@@ -121,28 +117,17 @@ void GEOM_IInsertOperations_i::Export
  *  ImportFile
  */
 //=============================================================================
-GEOM::ListOfGO* GEOM_IInsertOperations_i::ImportFile
+GEOM::ListOfGBO* GEOM_IInsertOperations_i::ImportFile
                    (const char* theFileName,
                     const char* theFormatName)
 {
-  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+  GEOM::ListOfGBO_var aSeq = new GEOM::ListOfGBO;
 
   //Set a not done flag
   GetOperations()->SetNotDone();
 
   //Import the shape from the file
-  char* aFileName   = strdup(theFileName);
-  char* aFormatName = strdup(theFormatName);
-  Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->Import(aFileName, aFormatName);
-
-  if( strcmp(aFormatName,"IGES_UNIT")==0 && !aHSeq.IsNull() ) {
-    free(aFileName);
-    free(aFormatName);
-    return aSeq._retn();
-  }
-
-  free(aFileName);
-  free(aFormatName);
+  Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->Import(theFileName, theFormatName);
 
   if (!GetOperations()->IsDone() || aHSeq.IsNull()) {
     return aSeq._retn();
@@ -152,10 +137,8 @@ GEOM::ListOfGO* GEOM_IInsertOperations_i::ImportFile
   Standard_Integer aLength = aHSeq->Length();
 
   aSeq->length(aLength);
-
-  for (Standard_Integer i = 1; i <= aLength; i++) {
-    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
-  }
+  for (Standard_Integer i = 1; i <= aLength; i++)
+    aSeq[i-1] = GetBaseObject(Handle(GEOM_BaseObject)::DownCast(aHSeq->Value(i)));
 
   return aSeq._retn();
 }
@@ -172,90 +155,12 @@ char* GEOM_IInsertOperations_i::ReadValue(const char* theFileName,
   //Set a not done flag
   GetOperations()->SetNotDone();
 
-  char* aFileName      = strdup(theFileName);
-  char* aFormatName    = strdup(theFormatName);
-  char* aParameterName = strdup(theParameterName);
-
   TCollection_AsciiString aUnits = GetOperations()->ReadValue
-    (aFileName, aFormatName, aParameterName);
-
-  free(aFileName);
-  free(aFormatName);
-  free(aParameterName);
+    (theFileName, theFormatName, theParameterName);
 
   return CORBA::string_dup(aUnits.ToCString());
 }
 
-//=============================================================================
-/*!
- *  ImportTranslators
- */
-//=============================================================================
-void GEOM_IInsertOperations_i::ImportTranslators
-  (GEOM::string_array_out theFormats, GEOM::string_array_out thePatterns)
-{
-  // allocate the CORBA arrays
-  GEOM::string_array_var aFormatsArray  = new GEOM::string_array();
-  GEOM::string_array_var aPatternsArray = new GEOM::string_array();
-
-  // Get sequences of available formats
-  Handle(TColStd_HSequenceOfAsciiString) aFormats  = new TColStd_HSequenceOfAsciiString;
-  Handle(TColStd_HSequenceOfAsciiString) aPatterns = new TColStd_HSequenceOfAsciiString;
-  if (GetOperations()->ImportTranslators(aFormats, aPatterns)) {
-    const int formSize = aFormats->Length();
-    if (formSize == aPatterns->Length()) {
-      aFormatsArray->length(formSize);
-      aPatternsArray->length(formSize);
-
-      // fill the local CORBA arrays with values from sequences
-      CORBA::Long i = 1;
-      for (; i <= formSize; i++) {
-        aFormatsArray[i-1]  = CORBA::string_dup(aFormats->Value(i).ToCString());
-        aPatternsArray[i-1] = CORBA::string_dup(aPatterns->Value(i).ToCString());
-      }
-    }
-  }
-
-  // initialize out-parameters with local arrays
-  theFormats  = aFormatsArray._retn();
-  thePatterns = aPatternsArray._retn();
-}
-
-//=============================================================================
-/*!
- *  ExportTranslators
- */
-//=============================================================================
-void GEOM_IInsertOperations_i::ExportTranslators
-  (GEOM::string_array_out theFormats, GEOM::string_array_out thePatterns)
-{
-  // allocate the CORBA arrays
-  GEOM::string_array_var aFormatsArray  = new GEOM::string_array();
-  GEOM::string_array_var aPatternsArray = new GEOM::string_array();
-
-  // Get sequences of available formats
-  Handle(TColStd_HSequenceOfAsciiString) aFormats  = new TColStd_HSequenceOfAsciiString;
-  Handle(TColStd_HSequenceOfAsciiString) aPatterns = new TColStd_HSequenceOfAsciiString;
-  if (GetOperations()->ExportTranslators(aFormats, aPatterns)) {
-    const int formSize = aFormats->Length();
-    if (formSize == aPatterns->Length()) {
-      aFormatsArray->length(formSize);
-      aPatternsArray->length(formSize);
-
-      // fill the local CORBA arrays with values from sequences
-      CORBA::Long i = 1;
-      for (; i <= formSize; i++) {
-        aFormatsArray[i-1]  = CORBA::string_dup(aFormats->Value(i).ToCString());
-        aPatternsArray[i-1] = CORBA::string_dup(aPatterns->Value(i).ToCString());
-      }
-    }
-  }
-
-  // initialize out-parameters with local arrays
-  theFormats  = aFormatsArray._retn();
-  thePatterns = aPatternsArray._retn();
-}
-
 //=============================================================================
 /*!
  *  RestoreShape
@@ -354,121 +259,4 @@ GEOM::ListOfLong* GEOM_IInsertOperations_i::GetAllTextures()
   return anIDs._retn();
 }
 
-//=============================================================================
-/*!
- *  Export a shape to XAO format
- *  \param shape The shape to export
- *  \param groups The list of groups to export
- *  \param fields The list of fields to export
- *  \param author The author of the export
- *  \param fileName The name of the exported file
- *  \return boolean indicating if export was succeful.
- */
-//=============================================================================
-CORBA::Boolean GEOM_IInsertOperations_i::ExportXAO(GEOM::GEOM_Object_ptr shape,
-                                                   const GEOM::ListOfGO& groups,
-                                                   const GEOM::ListOfFields&  fields,
-                                                   const char* author,
-                                                   const char* fileName)
-{
-  bool isGood = false;
-  // Set a not done flag
-  GetOperations()->SetNotDone();
-  
-  // Get the reference shape
-  Handle(GEOM_Object) reference = GetObjectImpl(shape);
-  
-  // Get the reference groups
-  int ind = 0;
-  std::list<Handle(GEOM_Object)> groupsObj;
-  for (; ind < groups.length(); ind++)
-  {
-    Handle(GEOM_Object) gobj = GetObjectImpl(groups[ind]);
-    if (gobj.IsNull()) return false;
-    groupsObj.push_back(gobj);
-  }
 
-  // Get the reference fields
-  ind = 0;
-  std::list<Handle(GEOM_Field)> fieldsObj;
-  for (; ind < fields.length(); ind++)
-  {
-    Handle(GEOM_Field) fobj = Handle(GEOM_Field)::DownCast(GetBaseObjectImpl(fields[ind]));
-    if (fobj.IsNull()) return false;
-    fieldsObj.push_back(fobj);
-  }
-  
-  if (!reference.IsNull())
-  {
-    // Export XAO
-    isGood = GetOperations()->ExportXAO(reference, groupsObj, fieldsObj, author, fileName);
-  }
-  
-  return isGood;
-}
-
-//=============================================================================
-/*!
- *  Import a shape from XAO format
- *  \param fileName The name of the file to import
- *  \param shape The imported shape
- *  \param subShapes The list of imported subShapes
- *  \param groups The list of imported groups
- *  \param fields The list of imported fields
- *  \return boolean indicating if import was succeful.
- */
-//=============================================================================
-CORBA::Boolean GEOM_IInsertOperations_i::ImportXAO(const char* fileName,
-                                                   GEOM::GEOM_Object_out shape,
-                                                   GEOM::ListOfGO_out subShapes,
-                                                   GEOM::ListOfGO_out groups,
-                                                   GEOM::ListOfFields_out fields)
-{
-  GEOM::GEOM_Object_var vshape;
-  shape = vshape._retn();
-  
-  subShapes = new GEOM::ListOfGO;
-  groups = new GEOM::ListOfGO;
-  fields = new GEOM::ListOfFields;
-  
-  // Set a not done flag
-  GetOperations()->SetNotDone();
-  
-  Handle(TColStd_HSequenceOfTransient) importedSubShapes = new TColStd_HSequenceOfTransient();
-  Handle(TColStd_HSequenceOfTransient) importedGroups = new TColStd_HSequenceOfTransient();
-  Handle(TColStd_HSequenceOfTransient) importedFields = new TColStd_HSequenceOfTransient();
-  Handle(GEOM_Object) hshape;
-  bool res = GetOperations()->ImportXAO(fileName, hshape, importedSubShapes, importedGroups, importedFields);
-  
-  if (!GetOperations()->IsDone() || !res)
-    return false;
-  
-  // parse fields
-  int n = importedSubShapes->Length();
-  subShapes->length(n);
-  for (int i = 1; i <= n; i++)
-  {
-    (*subShapes)[i - 1] = GetObject(Handle(GEOM_Object)::DownCast(importedSubShapes->Value(i)));
-  }
-  
-  // parse groups
-  n = importedGroups->Length();
-  groups->length(n);
-  for (int i = 1; i <= n; i++)
-  {
-    (*groups)[i - 1] = GetObject(Handle(GEOM_Object)::DownCast(importedGroups->Value(i)));
-  }
-  
-  // parse fields
-  n = importedFields->Length();
-  fields->length(n);
-  for (int i = 1; i <= n; i++)
-  {
-        (*fields)[i - 1] = GEOM::GEOM_Field::_narrow(
-                GetBaseObject(Handle(GEOM_Field)::DownCast(importedFields->Value(i))));
-  }
-  
-  shape = GetObject(hshape);
-  
-  return res;
-}
index d36e0446d8813ab9067e7f5541cee394cfc5f755..4a2b4f2ccccd00f86ae6dc33752d50569e73de0b 100644 (file)
@@ -49,19 +49,13 @@ class GEOM_I_EXPORT GEOM_IInsertOperations_i :
                                 const char*           theFileName,
                                 const char*           theFormatName);
 
-  GEOM::ListOfGO* ImportFile (const char* theFileName,
-                              const char* theFormatName);
+  GEOM::ListOfGBO* ImportFile (const char* theFileName,
+                              const char* theFormatName);
 
   char* ReadValue (const char* theFileName,
                    const char* theFormatName,
                    const char* theParameterName);
 
-  void ImportTranslators (GEOM::string_array_out theFormats,
-                          GEOM::string_array_out thePatterns);
-
-  void ExportTranslators (GEOM::string_array_out theFormats,
-                          GEOM::string_array_out thePatterns);
-
   GEOM::GEOM_Object_ptr RestoreShape (const SALOMEDS::TMPFile& theStream);
 
   CORBA::Long LoadTexture(const char* theTextureFile);
@@ -73,18 +67,6 @@ class GEOM_I_EXPORT GEOM_IInsertOperations_i :
 
   GEOM::ListOfLong* GetAllTextures();
   
-  CORBA::Boolean ExportXAO (GEOM::GEOM_Object_ptr shape,
-                            const GEOM::ListOfGO& groups,
-                            const GEOM::ListOfFields&  fields,
-                            const char* author,
-                            const char* fileName);
-
-  CORBA::Boolean ImportXAO (const char* fileName,
-                            GEOM::GEOM_Object_out shape,
-                            GEOM::ListOfGO_out subShapes,
-                            GEOM::ListOfGO_out groups,
-                            GEOM::ListOfFields_out fields);
-  
   ::GEOMImpl_IInsertOperations* GetOperations()
   { return (::GEOMImpl_IInsertOperations*)GetImpl(); }
 };
index 181e7b18f4062b542b6db1f51b28c735874b7937..d4d99f776079fbfb6101764a3b5dc6e5c3303d2b 100644 (file)
@@ -60,7 +60,6 @@ namespace GEOM
   class GEOM_IInsertOperations;
   class GEOM_IMeasureOperations;
   class GEOM_IGroupOperations;
-  class GEOM_IAdvancedOperations;
   class GEOM_IFieldOperations;
   typedef SALOME::GenericObj_wrap< GEOM_IBasicOperations    > GEOM_IBasicOperations_wrap;
   typedef SALOME::GenericObj_wrap< GEOM_ITransformOperations> GEOM_ITransformOperations_wrap;
@@ -74,7 +73,6 @@ namespace GEOM
   typedef SALOME::GenericObj_wrap< GEOM_IInsertOperations   > GEOM_IInsertOperations_wrap;
   typedef SALOME::GenericObj_wrap< GEOM_IMeasureOperations  > GEOM_IMeasureOperations_wrap;
   typedef SALOME::GenericObj_wrap< GEOM_IGroupOperations    > GEOM_IGroupOperations_wrap;
-  typedef SALOME::GenericObj_wrap< GEOM_IAdvancedOperations > GEOM_IAdvancedOperations_wrap;
   typedef SALOME::GenericObj_wrap< GEOM_IFieldOperations    > GEOM_IFieldOperations_wrap;
 }
 
index 6fe8abeac12bc9339809e4bb80c5b6bd54788594..0d5323d4d0e0a6e05351a2e36481be2195fa0a9f 100755 (executable)
@@ -37,6 +37,14 @@ ADD_DEFINITIONS(
 # libraries to link to
 SET(_link_LIBRARIES
   SalomeIDLGEOM
+  SalomeIDLGEOMSuperv
+  SalomeIDLAdvancedGEOM
+  SalomeIDLBREPPlugin
+  SalomeIDLIGESPlugin
+  SalomeIDLSTEPPlugin
+  SalomeIDLSTLPlugin
+  SalomeIDLVTKPlugin
+  SalomeIDLXAOPlugin
   ${KERNEL_SALOMELocalTrace}
   ${KERNEL_SalomeDSClient}
   ${KERNEL_SalomeLifeCycleCORBA}
index 792cbe5ae2efbf0af16cd4296b45b7cd0359f332..867a5c6f7cea632c19746847fad64ae03b00bc4a 100644 (file)
@@ -394,13 +394,108 @@ void GEOM_Superv_i::getAdvancedOp()
 {
   if (CORBA::is_nil(myGeomEngine))
     setGeomEngine();
-  // get GEOM_IAdvancedOperations interface
+  // get GEOM::IAdvancedOperations interface
   if (CORBA::is_nil(myAdvancedOp) || isNewStudy(myLastStudyID,myStudyID)) {
     //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
     //     Try to get id of the study from the SALOME Session
     if(myStudyID < 0 ) SetStudyID(-1);
-    //myAdvancedOp = myGeomEngine->GetIAdvancedOperations(myStudyID);
-    myAdvancedOp = GEOM::GEOM_IAdvancedOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "AdvancedEngine"));
+    myAdvancedOp = GEOM::IAdvancedOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "AdvancedEngine"));
+  }
+}
+
+//=============================================================================
+//  getSTLPluginOp:
+//=============================================================================
+void GEOM_Superv_i::getSTLPluginOp()
+{
+  if (CORBA::is_nil(myGeomEngine))
+    setGeomEngine();
+  // get GEOM::ISTLOperations interface
+  if (CORBA::is_nil(mySTLOp) || isNewStudy(myLastStudyID,myStudyID)) {
+    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+    //     Try to get id of the study from the SALOME Session
+    if(myStudyID < 0 ) SetStudyID(-1);
+    mySTLOp = GEOM::ISTLOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "STLPluginEngine"));
+  }
+}
+
+//=============================================================================
+//  getBREPPluginOp:
+//=============================================================================
+void GEOM_Superv_i::getBREPPluginOp()
+{
+  if (CORBA::is_nil(myGeomEngine))
+    setGeomEngine();
+  // get GEOM:IBREPOperations interface
+  if (CORBA::is_nil(myBREPOp) || isNewStudy(myLastStudyID,myStudyID)) {
+    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+    //     Try to get id of the study from the SALOME Session
+    if(myStudyID < 0 ) SetStudyID(-1);
+    myBREPOp = GEOM::IBREPOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "BREPPluginEngine"));
+  }
+}
+
+//=============================================================================
+//  getSTEPPluginOp:
+//=============================================================================
+void GEOM_Superv_i::getSTEPPluginOp()
+{
+  if (CORBA::is_nil(myGeomEngine))
+    setGeomEngine();
+  // get GEOM::ISTEPOperations interface
+  if (CORBA::is_nil(mySTEPOp) || isNewStudy(myLastStudyID,myStudyID)) {
+    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+    //     Try to get id of the study from the SALOME Session
+    if(myStudyID < 0 ) SetStudyID(-1);
+    mySTEPOp = GEOM::ISTEPOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "STEPPluginEngine"));
+  }
+}
+
+//=============================================================================
+//  getIGESPluginOp:
+//=============================================================================
+void GEOM_Superv_i::getIGESPluginOp()
+{
+  if (CORBA::is_nil(myGeomEngine))
+    setGeomEngine();
+  // get GEOM::IIGESOperations interface
+  if (CORBA::is_nil(myIGESOp) || isNewStudy(myLastStudyID,myStudyID)) {
+    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+    //     Try to get id of the study from the SALOME Session
+    if(myStudyID < 0 ) SetStudyID(-1);
+    myIGESOp = GEOM::IIGESOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "IGESPluginEngine"));
+  }
+}
+
+//=============================================================================
+//  getXAOPluginOp:
+//=============================================================================
+void GEOM_Superv_i::getXAOPluginOp()
+{
+  if (CORBA::is_nil(myGeomEngine))
+    setGeomEngine();
+  // get GEOM::IXAOOperations interface
+  if (CORBA::is_nil(myXAOOp) || isNewStudy(myLastStudyID,myStudyID)) {
+    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+    //     Try to get id of the study from the SALOME Session
+    if(myStudyID < 0 ) SetStudyID(-1);
+    myXAOOp = GEOM::IXAOOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "XAOPluginEngine"));
+  }
+}
+
+//=============================================================================
+//  getVTKPluginOp:
+//=============================================================================
+void GEOM_Superv_i::getVTKPluginOp()
+{
+  if (CORBA::is_nil(myGeomEngine))
+    setGeomEngine();
+  // get GEOM::IVTKOperations interface
+  if (CORBA::is_nil(myVTKOp) || isNewStudy(myLastStudyID,myStudyID)) {
+    //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+    //     Try to get id of the study from the SALOME Session
+    if(myStudyID < 0 ) SetStudyID(-1);
+    myVTKOp = GEOM::IVTKOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "VTKPluginEngine"));
   }
 }
 
@@ -1073,6 +1168,38 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRH (CORBA::Double theR,
   return anObj;
 }
 
+//=============================================================================
+//  MakeCylinderPntVecRHA:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderPntVecRHA (GEOM::GEOM_Object_ptr thePnt,
+                                                           GEOM::GEOM_Object_ptr theAxis,
+                                                           CORBA::Double theRadius,
+                                                           CORBA::Double theHeight,
+                                                           CORBA::Double theAngle)
+{
+  beginService( " GEOM_Superv_i::MakeCylinderPntVecRHA" );
+  MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRHA");
+  get3DPrimOp();
+  GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderPntVecRHA(thePnt, theAxis, theRadius, theHeight, theAngle);
+  endService( " GEOM_Superv_i::MakeCylinderPntVecRHA" );
+  return anObj;
+}
+
+//=============================================================================
+//  MakeCylinderRHA:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRHA (CORBA::Double theR,
+                                                     CORBA::Double theH,
+                                                     CORBA::Double theA)
+{
+  beginService( " GEOM_Superv_i::MakeCylinderRHA" );
+  MESSAGE("GEOM_Superv_i::MakeCylinderRHA");
+  get3DPrimOp();
+  GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeCylinderRHA(theR, theH, theA);
+  endService( " GEOM_Superv_i::MakeCylinderRHA" );
+  return anObj;
+}
+
 //=============================================================================
 //  MakeSphere:
 //=============================================================================
@@ -1588,41 +1715,15 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportFile (const char* theFileName,
   beginService( " GEOM_Superv_i::ImportFile" );
   MESSAGE("GEOM_Superv_i::ImportFile");
   getInsOp();
-  GEOM::ListOfGO* aSeq = myInsOp->ImportFile(theFileName, theFormatName);
-  GEOM::GEOM_Object_ptr anObj;
+  GEOM::ListOfGBO_var aSeq = myInsOp->ImportFile(theFileName, theFormatName);
+  GEOM::GEOM_Object_var anObj;
   
   if (aSeq->length() > 0) {
-    anObj = aSeq->operator[](0);
+    anObj = GEOM::GEOM_Object::_narrow(aSeq[0]);
   }
 
   endService( " GEOM_Superv_i::ImportFile" );
-  return anObj;
-}
-
-//=============================================================================
-//  ImportTranslators:
-//=============================================================================
-void GEOM_Superv_i::ImportTranslators (GEOM::string_array_out theFormats,
-                                       GEOM::string_array_out thePatterns)
-{
-  beginService( " GEOM_Superv_i::ImportTranslators" );
-  MESSAGE("GEOM_Superv_i::ImportTranslators");
-  getInsOp();
-  myInsOp->ImportTranslators(theFormats, thePatterns);
-  endService( " GEOM_Superv_i::ImportTranslators" );
-}
-
-//=============================================================================
-//  ExportTranslators:
-//=============================================================================
-void GEOM_Superv_i::ExportTranslators (GEOM::string_array_out theFormats,
-                                       GEOM::string_array_out thePatterns)
-{
-  beginService( " GEOM_Superv_i::ExportTranslators" );
-  MESSAGE("GEOM_Superv_i::ExportTranslators");
-  getInsOp();
-  myInsOp->ExportTranslators(theFormats, thePatterns);
-  endService( " GEOM_Superv_i::ExportTranslators" );
+  return anObj._retn();
 }
 
 //============================= TransformOperations ===========================
@@ -3335,30 +3436,183 @@ GEOM::GEOM_List_ptr GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup)
   return aListPtr->_this();
 }
 
+//=============================== Import/Export Operations =============================
+//=============================================================================
+//  Export STL
+//=============================================================================
+void GEOM_Superv_i::ExportSTL( GEOM::GEOM_Object_ptr theObject,
+                               const char*           theFileName,
+                               const bool            theIsASCII,
+                               CORBA::Double         theDeflection,
+                               const bool            theIsRelative )
+{
+  beginService( " GEOM_Superv_i::ExportSTL" );
+  MESSAGE("GEOM_Superv_i::ExportSTL");
+  getSTLPluginOp();
+  mySTLOp->ExportSTL( theObject, theFileName, theIsASCII, theDeflection, theIsRelative );
+  endService( " GEOM_Superv_i::ExportSTL" );
+}
+
+//=============================================================================
+//  Import STL
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportSTL( const char* theFileName )
+{
+  beginService( " GEOM_Superv_i::ImportSTL" );
+  MESSAGE("GEOM_Superv_i::ImportSTL");
+  getSTLPluginOp();
+  GEOM::ListOfGO* aSeq = mySTLOp->ImportSTL(theFileName );
+  GEOM::GEOM_Object_ptr anObj;
+
+  if (aSeq->length() > 0) {
+    anObj = aSeq->operator[](0);
+  }
+
+  endService( " GEOM_Superv_i::ImportSTL" );
+  return anObj;
+}
+
+//=============================================================================
+//  Export BREP
+//=============================================================================
+void GEOM_Superv_i::ExportBREP( GEOM::GEOM_Object_ptr theObject,
+                                const char*           theFileName )
+{
+  beginService( " GEOM_Superv_i::ExportBREP" );
+  MESSAGE("GEOM_Superv_i::ExportBREP");
+  getBREPPluginOp();
+  myBREPOp->ExportBREP( theObject, theFileName );
+  endService( " GEOM_Superv_i::ExportBREP" );
+}
+
+//=============================================================================
+//  Import BREP
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportBREP( const char* theFileName )
+{
+  beginService( " GEOM_Superv_i::ImportBREP" );
+  MESSAGE("GEOM_Superv_i::ImportBREP");
+  getBREPPluginOp();
+  GEOM::ListOfGO* aSeq = myBREPOp->ImportBREP(theFileName );
+  GEOM::GEOM_Object_ptr anObj;
+
+  if (aSeq->length() > 0) {
+    anObj = aSeq->operator[](0);
+  }
+
+  endService( " GEOM_Superv_i::ImportBREP" );
+  return anObj;
+}
+
+//=============================================================================
+//  Export STEP
+//=============================================================================
+void GEOM_Superv_i::ExportSTEP( GEOM::GEOM_Object_ptr theObject,
+                                const char*           theFileName )
+{
+  beginService( " GEOM_Superv_i::ExportSTEP" );
+  MESSAGE("GEOM_Superv_i::ExportSTEP");
+  getSTEPPluginOp();
+  mySTEPOp->ExportSTEP( theObject, theFileName );
+  endService( " GEOM_Superv_i::ExportSTEP" );
+}
+
+//=============================================================================
+//  Import STEP
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportSTEP( const char* theFileName,
+                                                 const bool  theIsIgnoreUnits )
+{
+  beginService( " GEOM_Superv_i::ImportSTEP" );
+  MESSAGE("GEOM_Superv_i::ImportSTEP");
+  getSTEPPluginOp();
+  GEOM::ListOfGO* aSeq = mySTEPOp->ImportSTEP(theFileName, theIsIgnoreUnits );
+  GEOM::GEOM_Object_ptr anObj;
+
+  if (aSeq->length() > 0) {
+    anObj = aSeq->operator[](0);
+  }
+
+  endService( " GEOM_Superv_i::ImportSTEP" );
+  return anObj;
+}
+
+//=============================================================================
+//  Export IGES
+//=============================================================================
+void GEOM_Superv_i::ExportIGES( GEOM::GEOM_Object_ptr theObject,
+                                const char*           theFileName,
+                                const char*           theVersion )
+{
+  beginService( " GEOM_Superv_i::ExportIGES" );
+  MESSAGE("GEOM_Superv_i::ExportIGES");
+  getIGESPluginOp();
+  myIGESOp->ExportIGES( theObject, theFileName, theVersion );
+  endService( " GEOM_Superv_i::ExportIGES" );
+}
+
 //=============================================================================
-//  ExportXAO
+//  Import IGES
 //=============================================================================
-CORBA::Boolean GEOM_Superv_i::ExportXAO (GEOM::GEOM_Object_ptr shape,
-                                        const GEOM::ListOfGO& groups, const GEOM::ListOfFields& fields,
-                                        const char* author, const char* fileName)
+GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportIGES( const char* theFileName,
+                                                 const bool  theIsIgnoreUnits )
+{
+  beginService( " GEOM_Superv_i::ImportIGES" );
+  MESSAGE("GEOM_Superv_i::ImportIGES");
+  getIGESPluginOp();
+  GEOM::ListOfGO* aSeq = myIGESOp->ImportIGES(theFileName, theIsIgnoreUnits );
+  GEOM::GEOM_Object_ptr anObj;
+
+  if (aSeq->length() > 0) {
+    anObj = aSeq->operator[](0);
+  }
+
+  endService( " GEOM_Superv_i::ImportIGES" );
+  return anObj;
+}
+
+//=============================================================================
+//  Export XAO
+//=============================================================================
+CORBA::Boolean GEOM_Superv_i::ExportXAO( GEOM::GEOM_Object_ptr shape,
+                                         const GEOM::ListOfGO& groups,
+                                         const GEOM::ListOfFields& fields,
+                                         const char* author, const char* fileName )
 {
   beginService( " GEOM_Superv_i::ExportXAO" );
   MESSAGE("GEOM_Superv_i::ExportXAO");
-  getInsOp();
-  CORBA::Boolean isGood = myInsOp->ExportXAO(shape, groups, fields, author, fileName);
+  getXAOPluginOp();
+  CORBA::Boolean isGood = myXAOOp->ExportXAO( shape, groups, fields, author, fileName );
   endService( " GEOM_Superv_i::ExportXAO" );
   return isGood;
 }
 
 //=============================================================================
-//  ImportXAO
+//  Import XAO
 //=============================================================================
-CORBA::Boolean GEOM_Superv_i::ImportXAO (const char* fileName, GEOM::GEOM_Object_out shape, 
-                                        GEOM::ListOfGO_out subShapes, GEOM::ListOfGO_out groups, GEOM::ListOfFields_out fields)
+CORBA::Boolean GEOM_Superv_i::ImportXAO( const char* fileName,
+                                         GEOM::GEOM_Object_out shape,
+                                         GEOM::ListOfGO_out subShapes,
+                                         GEOM::ListOfGO_out groups,
+                                         GEOM::ListOfFields_out fields )
 {
   return false;
 }
 
+//=============================================================================
+//  Export VTK
+//=============================================================================
+void GEOM_Superv_i::ExportVTK(  GEOM::GEOM_Object_ptr theObject,
+                               const char*           theFileName,
+                               CORBA::Double         theDeflection )
+{
+  beginService( " GEOM_Superv_i::ExportVTK" );
+  MESSAGE("GEOM_Superv_i::ExportVTK");
+  getVTKPluginOp();
+  myVTKOp->ExportVTK( theObject, theFileName, theDeflection );
+  endService( " GEOM_Superv_i::ExportVTK" );
+}
+
 //=============================== Advanced Operations =============================
 //=============================================================================
 //  MakePipeTShape
index 8058cc132897ff35c06bdb77fd306d2d63a8663d..f33f4f8bb559de2a746bd1733e9e7e541ff0607f 100644 (file)
 // IDL headers
 #include <SALOMEconfig.h>
 #include CORBA_CLIENT_HEADER(GEOM_Gen)
+#include CORBA_CLIENT_HEADER(AdvancedGEOM)
+#include CORBA_CLIENT_HEADER(STLPlugin)
+#include CORBA_CLIENT_HEADER(BREPPlugin)
+#include CORBA_CLIENT_HEADER(STEPPlugin)
+#include CORBA_CLIENT_HEADER(IGESPlugin)
+#include CORBA_CLIENT_HEADER(XAOPlugin)
+#include CORBA_CLIENT_HEADER(VTKPlugin)
 #include CORBA_SERVER_HEADER(GEOM_Superv)
 
 #include "SALOME_Component_i.hxx"
@@ -61,6 +68,12 @@ public:
   void getLocalOp();
   void getGroupOp();
   void getAdvancedOp();
+  void getSTLPluginOp();
+  void getBREPPluginOp();
+  void getSTEPPluginOp();
+  void getIGESPluginOp();
+  void getXAOPluginOp();
+  void getVTKPluginOp();
 
   PortableServer::ServantBase_var GetServant(CORBA::Object_ptr       theObject,
                                              PortableServer::POA_ptr thePOA);
@@ -246,6 +259,14 @@ public:
                                               CORBA::Double theHeight);
   GEOM::GEOM_Object_ptr MakeCylinderRH (CORBA::Double theR,
                                         CORBA::Double theH);
+  GEOM::GEOM_Object_ptr MakeCylinderPntVecRHA (GEOM::GEOM_Object_ptr thePnt,
+                                              GEOM::GEOM_Object_ptr theAxis,
+                                              CORBA::Double theRadius,
+                                              CORBA::Double theHeight,
+                                              CORBA::Double theAngle);
+  GEOM::GEOM_Object_ptr MakeCylinderRHA (CORBA::Double theR,
+                                        CORBA::Double theH,
+                                        CORBA::Double theA);                                   
   GEOM::GEOM_Object_ptr MakeSphere (CORBA::Double theX,
                                     CORBA::Double theY,
                                     CORBA::Double theZ,
@@ -361,10 +382,6 @@ public:
                const char*           theFormatName);
   GEOM::GEOM_Object_ptr ImportFile (const char* theFileName,
                                     const char* theFormatName);
-  void ImportTranslators (GEOM::string_array_out theFormats,
-                          GEOM::string_array_out thePatterns);
-  void ExportTranslators (GEOM::string_array_out theFormats,
-                          GEOM::string_array_out thePatterns);
 
   //-----------------------------------------------------------//
   // TransformOperations                                       //
@@ -691,11 +708,47 @@ public:
   //-----------------------------------------------------------//
   // ImportExport Operations                                   //
   //-----------------------------------------------------------//
-  CORBA::Boolean ExportXAO(GEOM::GEOM_Object_ptr shape,
-                           const GEOM::ListOfGO& groups, const GEOM::ListOfFields& fields,
-                           const char* author, const char* fileName);
-  CORBA::Boolean ImportXAO(const char* fileName, GEOM::GEOM_Object_out shape, 
-                           GEOM::ListOfGO_out subShapes, GEOM::ListOfGO_out groups, GEOM::ListOfFields_out fields);
+
+  void ExportSTL( GEOM::GEOM_Object_ptr theObject,
+                  const char*           theFileName,
+                  const bool            theIsASCII,
+                  CORBA::Double         theDeflection,
+                  const bool            theIsRelative );
+
+  GEOM::GEOM_Object_ptr ImportSTL( const char* theFileName );
+
+  void ExportBREP( GEOM::GEOM_Object_ptr theObject,
+                   const char*           theFileName );
+
+  GEOM::GEOM_Object_ptr ImportBREP( const char* theFileName );
+
+  void ExportSTEP( GEOM::GEOM_Object_ptr theObject,
+                   const char*           theFileName );
+
+  GEOM::GEOM_Object_ptr ImportSTEP( const char* theFileName,
+                                    const bool  theIsIgnoreUnits );
+
+  void ExportIGES( GEOM::GEOM_Object_ptr theObject,
+                   const char*           theFileName,
+                   const char*           theVersion );
+
+  GEOM::GEOM_Object_ptr ImportIGES( const char* theFileName,
+                                    const bool  theIsIgnoreUnits );
+
+  CORBA::Boolean ExportXAO( GEOM::GEOM_Object_ptr shape,
+                            const GEOM::ListOfGO& groups,
+                            const GEOM::ListOfFields& fields,
+                            const char* author,
+                            const char* fileName);
+  CORBA::Boolean ImportXAO( const char* fileName,
+                            GEOM::GEOM_Object_out shape,
+                            GEOM::ListOfGO_out subShapes,
+                            GEOM::ListOfGO_out groups,
+                            GEOM::ListOfFields_out fields );
+
+  void ExportVTK( GEOM::GEOM_Object_ptr theObject,
+                  const char*           theFileName,
+                  CORBA::Double         theDeflection );
 
   //-----------------------------------------------------------//
   // Advanced Operations                                       //
@@ -746,7 +799,13 @@ private:
   GEOM::GEOM_ICurvesOperations_var    myCurvesOp;
   GEOM::GEOM_ILocalOperations_var     myLocalOp;
   GEOM::GEOM_IGroupOperations_var     myGroupOp;
-  GEOM::GEOM_IAdvancedOperations_var  myAdvancedOp;
+  GEOM::IAdvancedOperations_var       myAdvancedOp;
+  GEOM::ISTLOperations_var            mySTLOp;
+  GEOM::IBREPOperations_var           myBREPOp;
+  GEOM::ISTEPOperations_var           mySTEPOp;
+  GEOM::IIGESOperations_var           myIGESOp;
+  GEOM::IXAOOperations_var            myXAOOp;
+  GEOM::IVTKOperations_var            myVTKOp;
 };
 
 #endif
diff --git a/src/GEOM_SWIG/AdvancedGEOMBuilder.py b/src/GEOM_SWIG/AdvancedGEOMBuilder.py
new file mode 100644 (file)
index 0000000..4c9b16d
--- /dev/null
@@ -0,0 +1,572 @@
+#  -*- coding: iso-8859-1 -*-
+# 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, or (at your option) any 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
+#
+from GEOM import IAdvancedOperations
+
+# Engine Library Name
+__libraryName__ = "AdvancedEngine"
+
+def GetAdvancedOperations(self):
+    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    return anOp._narrow(IAdvancedOperations)
+
+## Create a T-shape object with specified caracteristics for the main
+#  and the incident pipes (radius, width, half-length).
+#  The extremities of the main pipe are located on junctions points P1 and P2.
+#  The extremity of the incident pipe is located on junction point P3.
+#  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
+#  the main plane of the T-shape is XOY.
+#
+#  @param theR1 Internal radius of main pipe
+#  @param theW1 Width of main pipe
+#  @param theL1 Half-length of main pipe
+#  @param theR2 Internal radius of incident pipe (R2 < R1)
+#  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
+#  @param theL2 Half-length of incident pipe
+#
+#  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
+#  @param theP1 1st junction point of main pipe
+#  @param theP2 2nd junction point of main pipe
+#  @param theP3 Junction point of incident pipe
+#
+#  @param theRL Internal radius of left thickness reduction
+#  @param theWL Width of left thickness reduction
+#  @param theLtransL Length of left transition part
+#  @param theLthinL Length of left thin part
+#
+#  @param theRR Internal radius of right thickness reduction
+#  @param theWR Width of right thickness reduction
+#  @param theLtransR Length of right transition part
+#  @param theLthinR Length of right thin part
+#
+#  @param theRI Internal radius of incident thickness reduction
+#  @param theWI Width of incident thickness reduction
+#  @param theLtransI Length of incident transition part
+#  @param theLthinI Length of incident thin part
+#
+#  @param theName Object name; when specified, this parameter is used
+# for result publication in the study. Otherwise, if automatic
+# publication is switched on, default value is used for result name.
+#
+#  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
+#
+#  @ref tui_creation_pipetshape "Example"
+#  @ingroup l4_advanced
+def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
+    theHexMesh=True, theP1=None, theP2=None, theP3=None,
+    theRL=0, theWL=0, theLtransL=0, theLthinL=0,
+    theRR=0, theWR=0, theLtransR=0, theLthinR=0,
+    theRI=0, theWI=0, theLtransI=0, theLthinI=0,
+    theName=None):
+    """
+    Create a T-shape object with specified caracteristics for the main
+    and the incident pipes (radius, width, half-length).
+    The extremities of the main pipe are located on junctions points P1 and P2.
+    The extremity of the incident pipe is located on junction point P3.
+    If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
+    the main plane of the T-shape is XOY.
+
+    Parameters:
+        theR1 Internal radius of main pipe
+        theW1 Width of main pipe
+        theL1 Half-length of main pipe
+        theR2 Internal radius of incident pipe (R2 < R1)
+        theW2 Width of incident pipe (R2+W2 < R1+W1)
+        theL2 Half-length of incident pipe
+        theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
+        theP1 1st junction point of main pipe
+        theP2 2nd junction point of main pipe
+        theP3 Junction point of incident pipe
+        
+        theRL Internal radius of left thickness reduction
+        theWL Width of left thickness reduction
+        theLtransL Length of left transition part
+        theLthinL Length of left thin part
+        
+        theRR Internal radius of right thickness reduction
+        theWR Width of right thickness reduction
+        theLtransR Length of right transition part
+        theLthinR Length of right thin part
+        
+        theRI Internal radius of incident thickness reduction
+        theWI Width of incident thickness reduction
+        theLtransI Length of incident transition part
+        theLthinI Length of incident thin part
+        
+        theName Object name; when specified, this parameter is used
+        for result publication in the study. Otherwise, if automatic
+        publication is switched on, default value is used for result name.
+    
+    Returns:
+    List of GEOM_Object, containing the created shape and propagation groups.
+    
+    Example of usage:
+    # create PipeTShape object
+    pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
+    # create PipeTShape object with position
+    pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
+    # create PipeTShape object with left thickness reduction
+    pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
+    """
+    from salome.geom.geomBuilder import ParseParameters, RaiseIfFailed, _toListOfNames
+    theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
+    anOp = GetAdvancedOperations(self)
+    if (theP1 and theP2 and theP3):
+        anObj = anOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
+                                                  theRL, theWL, theLtransL, theLthinL,
+                                                  theRR, theWR, theLtransR, theLthinR,
+                                                  theRI, theWI, theLtransI, theLthinI,
+                                                  theHexMesh, theP1, theP2, theP3)
+    else:
+        anObj = anOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
+                                      theRL, theWL, theLtransL, theLthinL,
+                                      theRR, theWR, theLtransR, theLthinR,
+                                      theRI, theWI, theLtransI, theLthinI,
+                                      theHexMesh)
+        pass
+    RaiseIfFailed("MakePipeTShape", anOp)
+    if Parameters: anObj[0].SetParameters(Parameters)
+    self.def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
+    self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), self.def_names)
+    anOp.UnRegister()
+    return anObj
+
+## Create a T-shape object with chamfer and with specified caracteristics for the main
+#  and the incident pipes (radius, width, half-length). The chamfer is
+#  created on the junction of the pipes.
+#  The extremities of the main pipe are located on junctions points P1 and P2.
+#  The extremity of the incident pipe is located on junction point P3.
+#  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
+#  the main plane of the T-shape is XOY.
+#  @param theR1 Internal radius of main pipe
+#  @param theW1 Width of main pipe
+#  @param theL1 Half-length of main pipe
+#  @param theR2 Internal radius of incident pipe (R2 < R1)
+#  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
+#  @param theL2 Half-length of incident pipe
+#  @param theH Height of the chamfer.
+#  @param theW Width of the chamfer.
+#  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
+#  @param theP1 1st junction point of main pipe
+#  @param theP2 2nd junction point of main pipe
+#  @param theP3 Junction point of incident pipe
+#
+#  @param theRL Internal radius of left thickness reduction
+#  @param theWL Width of left thickness reduction
+#  @param theLtransL Length of left transition part
+#  @param theLthinL Length of left thin part
+#
+#  @param theRR Internal radius of right thickness reduction
+#  @param theWR Width of right thickness reduction
+#  @param theLtransR Length of right transition part
+#  @param theLthinR Length of right thin part
+#
+#  @param theRI Internal radius of incident thickness reduction
+#  @param theWI Width of incident thickness reduction
+#  @param theLtransI Length of incident transition part
+#  @param theLthinI Length of incident thin part
+#
+#  @param theName Object name; when specified, this parameter is used
+#         for result publication in the study. Otherwise, if automatic
+#         publication is switched on, default value is used for result name.
+#
+#  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
+#
+#  @ref tui_creation_pipetshape "Example"
+#  @ingroup l4_advanced
+def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
+                           theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
+                           theRL=0, theWL=0, theLtransL=0, theLthinL=0,
+                           theRR=0, theWR=0, theLtransR=0, theLthinR=0,
+                           theRI=0, theWI=0, theLtransI=0, theLthinI=0,
+                           theName=None):
+    """
+    Create a T-shape object with chamfer and with specified caracteristics for the main
+    and the incident pipes (radius, width, half-length). The chamfer is
+    created on the junction of the pipes.
+    The extremities of the main pipe are located on junctions points P1 and P2.
+    The extremity of the incident pipe is located on junction point P3.
+    If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
+    the main plane of the T-shape is XOY.
+    
+    Parameters:
+        theR1 Internal radius of main pipe
+        theW1 Width of main pipe
+        theL1 Half-length of main pipe
+        theR2 Internal radius of incident pipe (R2 < R1)
+        theW2 Width of incident pipe (R2+W2 < R1+W1)
+        theL2 Half-length of incident pipe
+        theH Height of the chamfer.
+        theW Width of the chamfer.
+        theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
+        theP1 1st junction point of main pipe
+        theP2 2nd junction point of main pipe
+        theP3 Junction point of incident pipe
+        
+        theRL Internal radius of left thickness reduction
+        theWL Width of left thickness reduction
+        theLtransL Length of left transition part
+        theLthinL Length of left thin part
+        
+        theRR Internal radius of right thickness reduction
+        theWR Width of right thickness reduction
+        theLtransR Length of right transition part
+        theLthinR Length of right thin part
+        
+        theRI Internal radius of incident thickness reduction
+        theWI Width of incident thickness reduction
+        theLtransI Length of incident transition part
+        theLthinI Length of incident thin part
+        
+        theName Object name; when specified, this parameter is used
+        for result publication in the study. Otherwise, if automatic
+        publication is switched on, default value is used for result name.
+        
+        Returns:
+            List of GEOM_Object, containing the created shape and propagation groups.
+
+        Example of usage:
+            # create PipeTShape with chamfer object
+            pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
+            # create PipeTShape with chamfer object with position
+            pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
+            # create PipeTShape with chamfer object with left thickness reduction
+            pipetshapechamfer_thr = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
+    """
+    from salome.geom.geomBuilder import ParseParameters, RaiseIfFailed, _toListOfNames
+    theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
+    anOp = GetAdvancedOperations(self)
+    if (theP1 and theP2 and theP3):
+        anObj = anOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
+                                                         theRL, theWL, theLtransL, theLthinL,
+                                                         theRR, theWR, theLtransR, theLthinR,
+                                                         theRI, theWI, theLtransI, theLthinI,
+                                                         theH, theW, theHexMesh, theP1, theP2, theP3)
+    else:
+        anObj = anOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
+                                             theRL, theWL, theLtransL, theLthinL,
+                                             theRR, theWR, theLtransR, theLthinR,
+                                             theRI, theWI, theLtransI, theLthinI,
+                                             theH, theW, theHexMesh)
+    pass
+
+    RaiseIfFailed("MakePipeTShapeChamfer", anOp)
+    if Parameters: anObj[0].SetParameters(Parameters)
+    self.def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
+    self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), self.def_names)
+    anOp.UnRegister()
+    return anObj
+
+## Create a T-shape object with fillet and with specified caracteristics for the main
+#  and the incident pipes (radius, width, half-length). The fillet is
+#  created on the junction of the pipes.
+#  The extremities of the main pipe are located on junctions points P1 and P2.
+#  The extremity of the incident pipe is located on junction point P3.
+#  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
+#  the main plane of the T-shape is XOY.
+#  @param theR1 Internal radius of main pipe
+#  @param theW1 Width of main pipe
+#  @param theL1 Half-length of main pipe
+#  @param theR2 Internal radius of incident pipe (R2 < R1)
+#  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
+#  @param theL2 Half-length of incident pipe
+#  @param theRF Radius of curvature of fillet.
+#  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
+#  @param theP1 1st junction point of main pipe
+#  @param theP2 2nd junction point of main pipe
+#  @param theP3 Junction point of incident pipe
+#
+#  @param theRL Internal radius of left thickness reduction
+#  @param theWL Width of left thickness reduction
+#  @param theLtransL Length of left transition part
+#  @param theLthinL Length of left thin part
+#
+#  @param theRR Internal radius of right thickness reduction
+#  @param theWR Width of right thickness reduction
+#  @param theLtransR Length of right transition part
+#  @param theLthinR Length of right thin part
+#
+#  @param theRI Internal radius of incident thickness reduction
+#  @param theWI Width of incident thickness reduction
+#  @param theLtransI Length of incident transition part
+#  @param theLthinI Length of incident thin part
+#
+#  @param theName Object name; when specified, this parameter is used
+#         for result publication in the study. Otherwise, if automatic
+#         publication is switched on, default value is used for result name.
+#
+#  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
+#
+#  @ref tui_creation_pipetshape "Example"
+#  @ingroup l4_advanced
+def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
+                          theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
+                          theRL=0, theWL=0, theLtransL=0, theLthinL=0,
+                          theRR=0, theWR=0, theLtransR=0, theLthinR=0,
+                          theRI=0, theWI=0, theLtransI=0, theLthinI=0,
+                          theName=None):
+    """
+    Create a T-shape object with fillet and with specified caracteristics for the main
+    and the incident pipes (radius, width, half-length). The fillet is
+    created on the junction of the pipes.
+    The extremities of the main pipe are located on junctions points P1 and P2.
+    The extremity of the incident pipe is located on junction point P3.
+    
+    Parameters:
+        If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
+        the main plane of the T-shape is XOY.
+        theR1 Internal radius of main pipe
+        theW1 Width of main pipe
+        heL1 Half-length of main pipe
+        theR2 Internal radius of incident pipe (R2 < R1)
+        theW2 Width of incident pipe (R2+W2 < R1+W1)
+        theL2 Half-length of incident pipe
+        theRF Radius of curvature of fillet.
+        theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
+        theP1 1st junction point of main pipe
+        theP2 2nd junction point of main pipe
+        theP3 Junction point of incident pipe
+        
+        theRL Internal radius of left thickness reduction
+        theWL Width of left thickness reduction
+        theLtransL Length of left transition part
+        theLthinL Length of left thin part
+        
+        theRR Internal radius of right thickness reduction
+        theWR Width of right thickness reduction
+        theLtransR Length of right transition part
+        theLthinR Length of right thin part
+        
+        theRI Internal radius of incident thickness reduction
+        theWI Width of incident thickness reduction
+        theLtransI Length of incident transition part
+        theLthinI Length of incident thin part
+        
+        theName Object name; when specified, this parameter is used
+        for result publication in the study. Otherwise, if automatic
+        publication is switched on, default value is used for result name.
+                
+        Returns:
+            List of GEOM_Object, containing the created shape and propagation groups.
+                
+        Example of usage:
+            # create PipeTShape with fillet object
+            pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
+            # create PipeTShape with fillet object with position
+            pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
+            # create PipeTShape with fillet object with left thickness reduction
+            pipetshapefillet_thr = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
+    """
+    from salome.geom.geomBuilder import ParseParameters, RaiseIfFailed, _toListOfNames
+    theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
+    anOp = GetAdvancedOperations(self)    
+    if (theP1 and theP2 and theP3):
+        anObj = anOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
+                                                        theRL, theWL, theLtransL, theLthinL,
+                                                        theRR, theWR, theLtransR, theLthinR,
+                                                        theRI, theWI, theLtransI, theLthinI,
+                                                        theRF, theHexMesh, theP1, theP2, theP3)
+    else:
+        anObj = anOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
+                                                  theRL, theWL, theLtransL, theLthinL,
+                                                  theRR, theWR, theLtransR, theLthinR,
+                                                  theRI, theWI, theLtransI, theLthinI,
+                                                  theRF, theHexMesh)
+        pass
+    RaiseIfFailed("MakePipeTShapeFillet", anOp)
+    if Parameters: anObj[0].SetParameters(Parameters)
+    self.def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
+    self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), self.def_names)
+    anOp.UnRegister()
+    return anObj
+
+## This function allows creating a disk already divided into blocks. It
+#  can be used to create divided pipes for later meshing in hexaedra.
+#  @param theR Radius of the disk
+#  @param theOrientation Orientation of the plane on which the disk will be built
+#         1 = XOY, 2 = OYZ, 3 = OZX
+#  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
+#  @param theName Object name; when specified, this parameter is used
+#         for result publication in the study. Otherwise, if automatic
+#         publication is switched on, default value is used for result name.
+#
+#  @return New GEOM_Object, containing the created shape.
+#
+#  @ref tui_creation_divideddisk "Example"
+#  @ingroup l4_advanced
+def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
+    """
+    Creates a disk, divided into blocks. It can be used to create divided pipes
+    for later meshing in hexaedra.
+    
+    Parameters:
+        theR Radius of the disk
+        theOrientation Orientation of the plane on which the disk will be built:
+        1 = XOY, 2 = OYZ, 3 = OZX
+        thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
+        theName Object name; when specified, this parameter is used
+        for result publication in the study. Otherwise, if automatic
+        publication is switched on, default value is used for result name.
+        
+        Returns:
+            New GEOM_Object, containing the created shape.
+    """
+    from salome.geom.geomBuilder import ParseParameters, RaiseIfFailed, _toListOfNames
+    theR, Parameters = ParseParameters(theR)
+    anOp = GetAdvancedOperations(self)
+    anObj = anOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
+    RaiseIfFailed("MakeDividedDisk", anOp)
+    if Parameters: anObj.SetParameters(Parameters)
+    self._autoPublish(anObj, theName, "dividedDisk")
+    anOp.UnRegister()
+    return anObj
+            
+## This function allows creating a disk already divided into blocks. It
+#  can be used to create divided pipes for later meshing in hexaedra.
+#  @param theCenter Center of the disk
+#  @param theVector Normal vector to the plane of the created disk
+#  @param theRadius Radius of the disk
+#  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
+#  @param theName Object name; when specified, this parameter is used
+#         for result publication in the study. Otherwise, if automatic
+#         publication is switched on, default value is used for result name.
+#
+#  @return New GEOM_Object, containing the created shape.
+#
+#  @ref tui_creation_divideddisk "Example"
+#  @ingroup l4_advanced
+def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
+    """
+    Creates a disk already divided into blocks. It can be used to create divided pipes
+    for later meshing in hexaedra.
+    
+    Parameters:
+        theCenter Center of the disk
+        theVector Normal vector to the plane of the created disk
+        theRadius Radius of the disk
+        thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
+        theName Object name; when specified, this parameter is used
+        for result publication in the study. Otherwise, if automatic
+        publication is switched on, default value is used for result name.
+
+    Returns:
+        New GEOM_Object, containing the created shape.
+    """
+    from salome.geom.geomBuilder import ParseParameters, RaiseIfFailed, _toListOfNames
+    theRadius, Parameters = ParseParameters(theRadius)
+    anOp = GetAdvancedOperations(self)
+    anObj = anOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
+    RaiseIfFailed("MakeDividedDiskPntVecR", anOp)
+    if Parameters: anObj.SetParameters(Parameters)
+    self._autoPublish(anObj, theName, "dividedDisk")
+    anOp.UnRegister()
+    return anObj
+
+## Builds a cylinder prepared for hexa meshes
+#  @param theR Radius of the cylinder
+#  @param theH Height of the cylinder
+#  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
+#  @param theName Object name; when specified, this parameter is used
+#         for result publication in the study. Otherwise, if automatic
+#         publication is switched on, default value is used for result name.
+#
+#  @return New GEOM_Object, containing the created shape.
+#
+#  @ref tui_creation_dividedcylinder "Example"
+#  @ingroup l4_advanced
+def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
+    """
+    Builds a cylinder prepared for hexa meshes
+    
+    Parameters:
+        theR Radius of the cylinder
+        theH Height of the cylinder
+        thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
+        theName Object name; when specified, this parameter is used
+        for result publication in the study. Otherwise, if automatic
+        publication is switched on, default value is used for result name.
+        
+        Returns:
+        New GEOM_Object, containing the created shape.
+    """
+    from salome.geom.geomBuilder import ParseParameters, RaiseIfFailed, _toListOfNames
+    theR, theH, Parameters = ParseParameters(theR, theH)
+    anOp = GetAdvancedOperations(self)
+    anObj = anOp.MakeDividedCylinder(theR, theH, thePattern)
+    RaiseIfFailed("MakeDividedCylinder", anOp)
+    if Parameters: anObj.SetParameters(Parameters)
+    self._autoPublish(anObj, theName, "dividedCylinder")
+    anOp.UnRegister()
+    return anObj
+
+## Create a surface from a cloud of points
+#  @param thelPoints list of points. Compounds of points are
+#         accepted as well.
+#  @param theNbMax maximum number of Bezier pieces in the resulting
+#         surface.
+#  @param theDegMax maximum degree of the resulting BSpline surface.
+#  @param theDMax 3D tolerance of initial approximation.
+#  @param theName Object name; when specified, this parameter is used
+#         for result publication in the study. Otherwise, if automatic
+#         publication is switched on, default value is used for result name.
+#  @return New GEOM_Object, containing the created shape.
+#  @note 3D tolerance of initial approximation represents a tolerance of
+#        initial plate surface approximation. If this parameter is equal
+#        to 0 (default value) it is computed. In this case an error of
+#        initial plate surface computation is used as the approximation
+#        tolerance. This error represents a maximal distance between
+#        computed plate surface and given points.
+#
+#  @ref tui_creation_smoothingsurface "Example"
+#  @ingroup l4_advanced
+def MakeSmoothingSurface(self, thelPoints, theNbMax=2, theDegMax=8,
+                         theDMax=0.0, theName=None):
+    """
+    Create a surface from a cloud of points
+    
+    Parameters:
+        thelPoints list of points. Compounds of points are
+                   accepted as well.
+        theNbMax maximum number of Bezier pieces in the resulting
+                 surface.
+        theDegMax maximum degree of the resulting BSpline surface.
+        theDMax 3D tolerance of initial approximation.
+        theName Object name; when specified, this parameter is used
+                for result publication in the study. Otherwise, if automatic
+                publication is switched on, default value is used for result name.
+
+    Returns:
+        New GEOM_Object, containing the created shape.
+
+    Note:
+        3D tolerance of initial approximation represents a tolerance of
+        initial plate surface approximation. If this parameter is equal
+        to 0 (default value) it is computed. In this case an error of
+        initial plate surface computation is used as the approximation
+        tolerance. This error represents a maximal distance between
+        computed plate surface and given points.
+    """
+    from salome.geom.geomBuilder import RaiseIfFailed
+    anOp = GetAdvancedOperations(self)
+    anObj = anOp.MakeSmoothingSurface(thelPoints, theNbMax,
+                                      theDegMax, theDMax)
+    RaiseIfFailed("MakeSmoothingSurface", anOp)
+    self._autoPublish(anObj, theName, "smoothing")
+    anOp.UnRegister()
+    return anObj
diff --git a/src/GEOM_SWIG/BREPPluginBuilder.py b/src/GEOM_SWIG/BREPPluginBuilder.py
new file mode 100644 (file)
index 0000000..edaba77
--- /dev/null
@@ -0,0 +1,91 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 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, or (at your option) any 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
+#
+
+from GEOM import IBREPOperations
+
+# Engine Library Name
+__libraryName__ = "BREPPluginEngine"
+
+def GetBREPPluginOperations(self):
+    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    return anOp._narrow(IBREPOperations)
+
+## Export the given shape into a file with given name in BREP format.
+#  @param theObject Shape to be stored in the file.
+#  @param theFileName Name of the file to store the given shape in.
+#  @ingroup l2_import_export
+def ExportBREP(self, theObject, theFileName):
+    """
+    Export the given shape into a file with given name in BREP format.
+
+    Parameters: 
+        theObject Shape to be stored in the file.
+        theFileName Name of the file to store the given shape in.
+    """
+    anOp = GetBREPPluginOperations(self)
+    anOp.ExportBREP(theObject, theFileName)
+    if anOp.IsDone() == 0:
+        raise RuntimeError,  "Export : " + anOp.GetErrorCode()
+        pass
+    pass
+
+
+## Import a shape from the BREP file
+#  @param theFileName The file, containing the shape.
+#  @param theName Object name; when specified, this parameter is used
+#         for result publication in the study. Otherwise, if automatic
+#         publication is switched on, default value is used for result name.
+#
+#  @return New GEOM.GEOM_Object, containing the imported shape.
+#          If material names are imported it returns the list of
+#          objects. The first one is the imported object followed by
+#          material groups.
+#  @note Auto publishing is allowed for the shape itself. Imported
+#        material groups are not automatically published.
+#  @ingroup l2_import_export
+def ImportBREP(self, theFileName, theName=None):
+    """
+    Import a shape from the BREP file
+
+    Parameters: 
+        theFileName The file, containing the shape.
+        theName Object name; when specified, this parameter is used
+                for result publication in the study. Otherwise, if automatic
+                publication is switched on, default value is used for result name.
+
+    Returns:
+        New GEOM.GEOM_Object, containing the imported shape.
+        If material names are imported it returns the list of
+        objects. The first one is the imported object followed by
+        material groups.
+    Note:
+        Auto publishing is allowed for the shape itself. Imported
+        material groups are not automatically published.
+    """
+    from salome.geom.geomBuilder import RaiseIfFailed
+    anOp = GetBREPPluginOperations(self)
+    aListObj = anOp.ImportBREP(theFileName)
+    RaiseIfFailed("ImportBREP", anOp)
+    aNbObj = len(aListObj)
+    if aNbObj > 0:
+        self._autoPublish(aListObj[0], theName, "imported")
+    if aNbObj == 1:
+        return aListObj[0]
+    return aListObj
index e8460ba0a994e1cc37e24e8f84b3e423ff763911..02af16cdf4e8cf0b2313456579e65e22c9427bbf 100755 (executable)
@@ -64,6 +64,55 @@ SET(_python_SCRIPTS
   gsketcher.py
   )
 
+# Advanced scripts
+
+SET(_python_advanced_SCRIPTS
+  AdvancedGEOMBuilder.py
+  __init__.py
+)
+
+# STL plugin scripts
+
+SET(_python_STL_SCRIPTS
+  STLPluginBuilder.py
+  __init__.py
+)
+
+# BREP plugin scripts
+
+SET(_python_BREP_SCRIPTS
+  BREPPluginBuilder.py
+  __init__.py
+)
+
+# STEP plugin scripts
+
+SET(_python_STEP_SCRIPTS
+  STEPPluginBuilder.py
+  __init__.py
+)
+
+# IGES plugin scripts
+
+SET(_python_IGES_SCRIPTS
+  IGESPluginBuilder.py
+  __init__.py
+)
+
+# XAO plugin scripts
+
+SET(_python_XAO_SCRIPTS
+  XAOPluginBuilder.py
+  __init__.py
+)
+
+# VTK plugin scripts
+
+SET(_python_VTK_SCRIPTS
+  VTKPluginBuilder.py
+  __init__.py
+)
+
 # scripts / shared
 
 SET(_shared_SCRIPTS
@@ -75,3 +124,12 @@ SET(_shared_SCRIPTS
 SALOME_INSTALL_SCRIPTS("${_other_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_DATA} DEF_PERMS)
 SALOME_INSTALL_SCRIPTS("${_shared_SCRIPTS}" ${SALOME_INSTALL_PYTHON_SHARED} DEF_PERMS)
 SALOME_INSTALL_SCRIPTS("${_python_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/geom DEF_PERMS)
+
+# Install plugin scripts
+SALOME_INSTALL_SCRIPTS("${_python_advanced_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/AdvancedGEOM DEF_PERMS)
+SALOME_INSTALL_SCRIPTS("${_python_STL_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/STLPlugin DEF_PERMS)
+SALOME_INSTALL_SCRIPTS("${_python_BREP_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/BREPPlugin DEF_PERMS)
+SALOME_INSTALL_SCRIPTS("${_python_STEP_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/STEPPlugin DEF_PERMS)
+SALOME_INSTALL_SCRIPTS("${_python_IGES_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/IGESPlugin DEF_PERMS)
+SALOME_INSTALL_SCRIPTS("${_python_XAO_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/XAOPlugin DEF_PERMS)
+SALOME_INSTALL_SCRIPTS("${_python_VTK_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/VTKPlugin DEF_PERMS)
index 28635865cf607d8936076093e1cb7d7644fd05e6..b644c196b34bb146ac510209e1f4c5d7f2ae62e3 100644 (file)
@@ -147,18 +147,20 @@ def TestAll (geompy, math):
   tan_on_face = geompy.MakeTangentPlaneOnFace(tan_extrusion, 0.7, 0.5, 150)
 
   #Create base geometry 3D
-  Box      = geompy.MakeBoxTwoPnt(p0, p200)                   #(2 GEOM_Object)->GEOM_Object
-  Box1     = geompy.MakeBoxDXDYDZ(10, 20, 30)                 #(3 Doubles)->GEOM_Object
-  Box2     = geompy.MakeBox(10,20,30, 15,25,35)               #(6 Doubles)->GEOM_Object
-  Cylinder = geompy.MakeCylinder(p0, vz, radius1, height)     #(2 GEOM_Object, 2 Doubles)->GEOM_Object
-  Cyl1     = geompy.MakeCylinderRH(radius2, height)           #(2 Doubles)->GEOM_Object
-  Sphere   = geompy.MakeSpherePntR(p0, radius1)               #(GEOM_Object, Double)->GEOM_Object
-  Sphere1  = geompy.MakeSphereR(radius)                       #(Double)->GEOM_Object
-  Sphere2  = geompy.MakeSphere(50, 70, 30, radius)            #(4 Doubles)->GEOM_Object
-  Cone     = geompy.MakeCone(p0, vz, radius2, radius, height) #(2 GEOM_Object, 3 Doubles)->GEOM_Object
-  Cone1    = geompy.MakeConeR1R2H(radius1, radius, height)    #(3 Doubles)->GEOM_Object
-  Torus    = geompy.MakeTorus(p0, vz, radius2, radius)        #(2 GEOM_Object, 2 Doubles)->GEOM_Object
-  Torus1   = geompy.MakeTorusRR(radius2, radius1)             #(2 Doubles)->GEOM_Object
+  Box      = geompy.MakeBoxTwoPnt(p0, p200)                             #(2 GEOM_Object)->GEOM_Object
+  Box1     = geompy.MakeBoxDXDYDZ(10, 20, 30)                           #(3 Doubles)->GEOM_Object
+  Box2     = geompy.MakeBox(10,20,30, 15,25,35)                         #(6 Doubles)->GEOM_Object
+  Cylinder = geompy.MakeCylinder(p0, vz, radius1, height)               #(2 GEOM_Object, 2 Doubles)->GEOM_Object
+  Cyl1     = geompy.MakeCylinderRH(radius2, height)                     #(2 Doubles)->GEOM_Object
+  Cylinder1= geompy.MakeCylinderA(p0, vz, radius1, height, angle1)      #(2 GEOM_Object, 3 Doubles)->GEOM_Object
+  Cyl2     = geompy.MakeCylinderRHA(radius2, height, angle2)            #(3 Doubles)->GEOM_Object
+  Sphere   = geompy.MakeSpherePntR(p0, radius1)                         #(GEOM_Object, Double)->GEOM_Object
+  Sphere1  = geompy.MakeSphereR(radius)                                 #(Double)->GEOM_Object
+  Sphere2  = geompy.MakeSphere(50, 70, 30, radius)                      #(4 Doubles)->GEOM_Object
+  Cone     = geompy.MakeCone(p0, vz, radius2, radius, height)           #(2 GEOM_Object, 3 Doubles)->GEOM_Object
+  Cone1    = geompy.MakeConeR1R2H(radius1, radius, height)              #(3 Doubles)->GEOM_Object
+  Torus    = geompy.MakeTorus(p0, vz, radius2, radius)                  #(2 GEOM_Object, 2 Doubles)->GEOM_Object
+  Torus1   = geompy.MakeTorusRR(radius2, radius1)                       #(2 Doubles)->GEOM_Object
 
   #Boolean (Common, Cut, Fuse, Section)
   Common  = geompy.MakeBoolean(Box, Sphere, 1) #(2 GEOM_Object, Short)->GEOM_Object
@@ -372,6 +374,8 @@ def TestAll (geompy, math):
   id_Box2     = geompy.addToStudy(Box2,     "Box (10,20,30)-(15,25,35)")
   id_Cylinder = geompy.addToStudy(Cylinder, "Cylinder")
   id_Cyl1     = geompy.addToStudy(Cyl1,     "Cylinder RH")
+  id_Cylinder1= geompy.addToStudy(Cylinder1,"CylinderA")
+  id_Cyl2     = geompy.addToStudy(Cyl2,     "Cylinder RHA")
   id_Sphere   = geompy.addToStudy(Sphere,   "Sphere Pnt R")
   id_Sphere1  = geompy.addToStudy(Sphere1,  "Sphere R")
   id_Sphere2  = geompy.addToStudy(Sphere2,  "Sphere")
index 5f79ccd14d7383785c23037d83e05172e8348dc4..b2432f339e2d6127a61a0ec5160b0ec7ec06db6c 100644 (file)
@@ -113,6 +113,7 @@ if not isinstance(gg, type(salome_ComponentGUI)):
     gg.setDisplayMode(id_torus1,1)
     gg.setDisplayMode(id_torus2,1)
     gg.setVectorsMode(id_acyl,1,1)
+    gg.setVerticesMode(id_acyl,1,1)
     #gg.setDisplayMode(id_cage,1)
     
     gg.setColor(id_torus1,0,0,255)
diff --git a/src/GEOM_SWIG/IGESPluginBuilder.py b/src/GEOM_SWIG/IGESPluginBuilder.py
new file mode 100644 (file)
index 0000000..684b029
--- /dev/null
@@ -0,0 +1,132 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 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, or (at your option) any 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
+#
+
+from GEOM import IIGESOperations
+
+# Engine Library Name
+__libraryName__ = "IGESPluginEngine"
+
+def GetIGESPluginOperations(self):
+    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    return anOp._narrow(IIGESOperations)
+
+## Export the given shape into a file with given name in IGES format.
+#  @param theObject Shape to be stored in the file.
+#  @param theFileName Name of the file to store the given shape in.
+#  @param theVersion Version of IGES format which defines, whether to write 
+#                    only faces (5.1 IGES format) or shells and solids also (5.3 IGES format).
+#  @ingroup l2_import_export
+def ExportIGES(self, theObject, theFileName, theVersion="5.1"):
+    """
+    Export the given shape into a file with given name in IGES format.
+
+    Parameters: 
+        theObject Shape to be stored in the file.
+        theFileName Name of the file to store the given shape in.
+        theVersion Version of IGES format which defines, whether to write 
+        only faces (5.1 IGES format) or shells and solids also (5.3 IGES format).
+    """
+    anOp = GetIGESPluginOperations(self)
+    anOp.ExportIGES(theObject, theFileName, theVersion)
+    if anOp.IsDone() == 0:
+        raise RuntimeError,  "Export : " + anOp.GetErrorCode()
+        pass
+    pass
+
+## Import a shape from the IGES file with given name.
+#  @param theFileName The file, containing the shape.
+#  @param theIsIgnoreUnits If True, file length units will be ignored (set to 'meter')
+#         and result model will be scaled, if its units are not meters.
+#         If False (default), file length units will be taken into account.
+#  @param theName Object name; when specified, this parameter is used
+#         for result publication in the study. Otherwise, if automatic
+#         publication is switched on, default value is used for result name.
+#
+#  @return New GEOM.GEOM_Object, containing the imported shape.
+#          If material names are imported it returns the list of
+#          objects. The first one is the imported object followed by
+#          material groups.
+#  @note Auto publishing is allowed for the shape itself. Imported
+#        material groups are not automatically published.
+#
+#  @ref swig_Import_Export "Example"
+#  @ingroup l2_import_export
+def ImportIGES(self, theFileName, theIsIgnoreUnits = False, theName=None):
+    """
+    Import a shape from the IGES file with given name.
+
+    Parameters:
+        theFileName The file, containing the shape.
+        ignoreUnits If True, file length units will be ignored (set to 'meter')
+                    and result model will be scaled, if its units are not meters.
+                    If False (default), file length units will be taken into account.
+        theName Object name; when specified, this parameter is used
+                for result publication in the study. Otherwise, if automatic
+                publication is switched on, default value is used for result name.
+
+    Returns:
+        New GEOM.GEOM_Object, containing the imported shape.
+        If material names are imported it returns the list of
+        objects. The first one is the imported object followed by
+        material groups.
+    Note:
+        Auto publishing is allowed for the shape itself. Imported
+        material groups are not automatically published.
+    """
+    # Example: see GEOM_TestOthers.py
+    from salome.geom.geomBuilder import RaiseIfFailed
+    anOp = GetIGESPluginOperations(self)
+    
+    anIsIgnoreUnits = theIsIgnoreUnits
+    aName = theName
+    if isinstance( theIsIgnoreUnits, basestring ):
+        anIsIgnoreUnits = False
+        aName = theIsIgnoreUnits
+        pass
+
+    aListObj = anOp.ImportIGES(theFileName,anIsIgnoreUnits)
+    RaiseIfFailed("ImportIGES", anOp)
+    aNbObj = len(aListObj)
+    if aNbObj > 0:
+        self._autoPublish(aListObj[0], aName, "imported")
+    if aNbObj == 1:
+        return aListObj[0]
+    return aListObj
+
+## Return length unit from given IGES file
+#  @param theFileName The file, containing the shape.
+#  @return String, containing the units name.
+#
+#  @ref swig_Import_Export "Example"
+#  @ingroup l2_import_export
+def GetIGESUnit(self, theFileName):
+    """
+    Return length units from given IGES file
+
+    Parameters:
+        theFileName The file, containing the shape.
+
+    Returns:
+        String, containing the units name.
+    """
+    # Example: see GEOM_TestOthers.py
+    anOp = GetIGESPluginOperations(self)
+    aUnitName = anOp.ReadValue( theFileName, "LEN_UNITS")
+    return aUnitName
diff --git a/src/GEOM_SWIG/STEPPluginBuilder.py b/src/GEOM_SWIG/STEPPluginBuilder.py
new file mode 100644 (file)
index 0000000..1a12060
--- /dev/null
@@ -0,0 +1,128 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 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, or (at your option) any 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
+#
+
+from GEOM import ISTEPOperations
+
+# Engine Library Name
+__libraryName__ = "STEPPluginEngine"
+
+def GetSTEPPluginOperations(self):
+    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    return anOp._narrow(ISTEPOperations)
+
+## Export the given shape into a file with given name in STEP format.
+#  @param theObject Shape to be stored in the file.
+#  @param theFileName Name of the file to store the given shape in.
+#  @ingroup l2_import_export
+def ExportSTEP(self, theObject, theFileName):
+    """
+    Export the given shape into a file with given name in STEP format.
+
+    Parameters: 
+        theObject Shape to be stored in the file.
+        theFileName Name of the file to store the given shape in.
+    """
+    anOp = GetSTEPPluginOperations(self)
+    anOp.ExportSTEP(theObject, theFileName)
+    if anOp.IsDone() == 0:
+        raise RuntimeError,  "Export : " + anOp.GetErrorCode()
+        pass
+    pass
+
+## Import a shape from the STEP file with given name.
+#  @param theFileName The file, containing the shape.
+#  @param theIsIgnoreUnits If True, file length units will be ignored (set to 'meter')
+#         and result model will be scaled, if its units are not meters.
+#         If False (default), file length units will be taken into account.
+#  @param theName Object name; when specified, this parameter is used
+#         for result publication in the study. Otherwise, if automatic
+#         publication is switched on, default value is used for result name.
+#
+#  @return New GEOM.GEOM_Object, containing the imported shape.
+#          If material names are imported it returns the list of
+#          objects. The first one is the imported object followed by
+#          material groups.
+#  @note Auto publishing is allowed for the shape itself. Imported
+#        material groups are not automatically published.
+#
+#  @ref swig_Import_Export "Example"
+#  @ingroup l2_import_export
+def ImportSTEP(self, theFileName, theIsIgnoreUnits = False, theName=None):
+    """
+    Import a shape from the STEP file with given name.
+
+    Parameters:
+        theFileName The file, containing the shape.
+        ignoreUnits If True, file length units will be ignored (set to 'meter')
+                    and result model will be scaled, if its units are not meters.
+                    If False (default), file length units will be taken into account.
+        theName Object name; when specified, this parameter is used
+                for result publication in the study. Otherwise, if automatic
+                publication is switched on, default value is used for result name.
+
+    Returns:
+        New GEOM.GEOM_Object, containing the imported shape.
+        If material names are imported it returns the list of
+        objects. The first one is the imported object followed by
+        material groups.
+    Note:
+        Auto publishing is allowed for the shape itself. Imported
+        material groups are not automatically published.
+    """
+    # Example: see GEOM_TestOthers.py
+    from salome.geom.geomBuilder import RaiseIfFailed
+    anOp = GetSTEPPluginOperations(self)
+    
+    anIsIgnoreUnits = theIsIgnoreUnits
+    aName = theName
+    if isinstance( theIsIgnoreUnits, basestring ):
+        anIsIgnoreUnits = False
+        aName = theIsIgnoreUnits
+        pass
+
+    aListObj = anOp.ImportSTEP(theFileName,anIsIgnoreUnits)
+    RaiseIfFailed("ImportSTEP", anOp)
+    aNbObj = len(aListObj)
+    if aNbObj > 0:
+        self._autoPublish(aListObj[0], aName, "imported")
+    if aNbObj == 1:
+        return aListObj[0]
+    return aListObj
+
+## Return length unit from given STEP file
+#  @param theFileName The file, containing the shape.
+#  @return String, containing the units name.
+#
+#  @ref swig_Import_Export "Example"
+#  @ingroup l2_import_export
+def GetSTEPUnit(self, theFileName):
+    """
+    Return length units from given STEP file
+
+    Parameters:
+        theFileName The file, containing the shape.
+
+    Returns:
+        String, containing the units name.
+    """
+    # Example: see GEOM_TestOthers.py
+    anOp = GetSTEPPluginOperations(self)
+    aUnitName = anOp.ReadValue( theFileName, "LEN_UNITS")
+    return aUnitName
diff --git a/src/GEOM_SWIG/STLPluginBuilder.py b/src/GEOM_SWIG/STLPluginBuilder.py
new file mode 100644 (file)
index 0000000..3967442
--- /dev/null
@@ -0,0 +1,100 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 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, or (at your option) any 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
+#
+
+from GEOM import ISTLOperations
+
+# Engine Library Name
+__libraryName__ = "STLPluginEngine"
+
+def GetSTLPluginOperations(self):
+    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    return anOp._narrow(ISTLOperations)
+
+## Export the given shape into a file with given name in STL format.
+#  @param theObject Shape to be stored in the file.
+#  @param theFileName Name of the file to store the given shape in.
+#  @param theIsASCII The format of the exported file (ASCII or Binary)
+#  @param theDeflection Deflection of the given shape.
+#  @param theIsRelative If True (default value), the deflection 
+#         is calculated relatively to the size of the shape; 
+#         if False, the user defined deflection is used.
+#  @ingroup l2_import_export
+def ExportSTL(self, theObject, theFileName, theIsASCII = True, theDeflection = 0.001, theIsRelative = True ):
+    """
+    Export the given shape into a file with given name in STL format.
+
+    Parameters: 
+        theObject Shape to be stored in the file.
+        theFileName Name of the file to store the given shape in.
+        theIsASCII The format of the exported file (ASCII or Binary).
+        theDeflection Deflection of the given shape.
+        theRelative If True (default value), the deflection 
+        is calculated relatively to the size of the shape; 
+        if False, the user defined deflection is used.
+    """
+    anOp = GetSTLPluginOperations(self)
+    anOp.ExportSTL(theObject, theFileName, theIsASCII, theDeflection, theIsRelative )
+    if anOp.IsDone() == 0:
+        raise RuntimeError,  "Export : " + anOp.GetErrorCode()
+        pass
+    pass
+
+## Import a shape from the STL file
+#  @param theFileName The file, containing the shape.
+#  @param theName Object name; when specified, this parameter is used
+#         for result publication in the study. Otherwise, if automatic
+#         publication is switched on, default value is used for result name.
+#
+#  @return New GEOM.GEOM_Object, containing the imported shape.
+#          If material names are imported it returns the list of
+#          objects. The first one is the imported object followed by
+#          material groups.
+#  @note Auto publishing is allowed for the shape itself. Imported
+#        material groups are not automatically published.
+#  @ingroup l2_import_export
+def ImportSTL(self, theFileName, theName=None):
+    """
+    Import a shape from the STL file
+
+    Parameters: 
+        theFileName The file, containing the shape.
+        theName Object name; when specified, this parameter is used
+                for result publication in the study. Otherwise, if automatic
+                publication is switched on, default value is used for result name.
+
+    Returns:
+        New GEOM.GEOM_Object, containing the imported shape.
+        If material names are imported it returns the list of
+        objects. The first one is the imported object followed by
+        material groups.
+    Note:
+        Auto publishing is allowed for the shape itself. Imported
+        material groups are not automatically published.
+    """
+    from salome.geom.geomBuilder import RaiseIfFailed
+    anOp = GetSTLPluginOperations(self)
+    aListObj = anOp.ImportSTL(theFileName)
+    RaiseIfFailed("ImportSTL", anOp)
+    aNbObj = len(aListObj)
+    if aNbObj > 0:
+        self._autoPublish(aListObj[0], theName, "imported")
+    if aNbObj == 1:
+        return aListObj[0]
+    return aListObj
diff --git a/src/GEOM_SWIG/VTKPluginBuilder.py b/src/GEOM_SWIG/VTKPluginBuilder.py
new file mode 100644 (file)
index 0000000..3005357
--- /dev/null
@@ -0,0 +1,50 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 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, or (at your option) any 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
+#
+
+from GEOM import IVTKOperations
+
+# Engine Library Name
+__libraryName__ = "VTKPluginEngine"
+
+def GetVTKPluginOperations(self):
+    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    return anOp._narrow(IVTKOperations)
+
+## Export the given shape into a file with given name in VTK format.
+#  @param theObject Shape to be stored in the file.
+#  @param theFileName Name of the file to store the given shape in.
+#  @param theDeflection Deflection of the given shape.
+#  @ingroup l2_import_export
+def ExportVTK(self, theObject, theFileName, theDeflection=0.001):
+    """
+    Export the given shape into a file with given name in VTK format.
+
+    Parameters: 
+        theObject Shape to be stored in the file.
+        theFileName Name of the file to store the given shape in.
+        theIsASCII The format of the exported file (ASCII or Binary).
+        theDeflection Deflection of the given shape.
+    """
+    anOp = GetVTKPluginOperations(self)
+    anOp.ExportVTK(theObject, theFileName, theDeflection)
+    if anOp.IsDone() == 0:
+        raise RuntimeError,  "Export : " + anOp.GetErrorCode()
+        pass
+    pass
diff --git a/src/GEOM_SWIG/XAOPluginBuilder.py b/src/GEOM_SWIG/XAOPluginBuilder.py
new file mode 100644 (file)
index 0000000..aa9eef6
--- /dev/null
@@ -0,0 +1,61 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 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, or (at your option) any 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
+#
+
+from GEOM import IXAOOperations
+
+# Engine Library Name
+__libraryName__ = "XAOPluginEngine"
+
+def GetXAOPluginOperations(self):
+    anOp = self.GetPluginOperations(self.myStudyId, __libraryName__)
+    return anOp._narrow(IXAOOperations)
+
+## Export a shape to XAO format
+#  @param shape The shape to export
+#  @param groups The list of groups to export
+#  @param fields The list of fields to export
+#  @param author The author of the export
+#  @param fileName The name of the file to export
+#  @return boolean
+#
+#  @ingroup l2_import_export
+def ExportXAO(self, shape, groups, fields, author, fileName):
+    from salome.geom.geomBuilder import RaiseIfFailed
+    anOp = GetXAOPluginOperations(self)
+    res = anOp.ExportXAO(shape, groups, fields, author, fileName)
+    RaiseIfFailed("ExportXAO", anOp)
+    return res
+
+## Import a shape from XAO format
+#  @param fileName The name of the file to import
+#  @return tuple (res, shape, subShapes, groups, fields)
+#       res Flag indicating if the import was successful
+#       shape The imported shape
+#       subShapes The list of imported subShapes
+#       groups The list of imported groups
+#       fields The list of imported fields
+#
+#  @ingroup l2_import_export
+def ImportXAO(self, fileName):
+    from salome.geom.geomBuilder import RaiseIfFailed
+    anOp = GetXAOPluginOperations(self)
+    res = anOp.ImportXAO(fileName)
+    RaiseIfFailed("ImportXAO", anOp)
+    return res
index 925e2d72eb223e8e777b746b69427ae75a40e589..c0cd25a603a1e2946fdd62bc9c395b403650d9fe 100644 (file)
@@ -657,7 +657,6 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
               self.MeasuOp  = None
               self.BlocksOp = None
               self.GroupOp  = None
-              self.AdvOp    = None
               self.FieldOp  = None
             pass
 
@@ -774,14 +773,6 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             self.GroupOp  = self.GetIGroupOperations    (self.myStudyId)
             self.FieldOp  = self.GetIFieldOperations    (self.myStudyId)
 
-            # The below line is a right way to map all plugin functions to geomBuilder,
-            # but AdvancedOperations are already mapped, that is why this line is commented
-            # and presents here only as an axample
-            #self.AdvOp    = self.GetPluginOperations (self.myStudyId, "AdvancedEngine")
-
-            # self.AdvOp is used by functions MakePipeTShape*, MakeDividedDisk, etc.
-            self.AdvOp = GEOM._objref_GEOM_Gen.GetPluginOperations (self, self.myStudyId, "AdvancedEngine")
-
             # set GEOM as root in the use case tree
             self.myUseCaseBuilder = self.myStudy.GetUseCaseBuilder()
             self.myUseCaseBuilder.SetRootCurrent()
@@ -790,16 +781,6 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
 
         def GetPluginOperations(self, studyID, libraryName):
             op = GEOM._objref_GEOM_Gen.GetPluginOperations(self, studyID, libraryName)
-            if op:
-                # bind methods of operations to self
-                methods = op.__class__.__dict__['__methods__']
-                avoid_methods = self.BasicOp.__class__.__dict__['__methods__']
-                for meth_name in methods:
-                    if not meth_name in avoid_methods: # avoid basic methods
-                        function = getattr(op.__class__, meth_name)
-                        if callable(function):
-                            #self.__dict__[meth_name] = self.__PluginOperation(op, function)
-                            self.__dict__[meth_name] = PluginOperation(op, function)
             return op
 
         ## Enable / disable results auto-publishing
@@ -3005,6 +2986,50 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             anObj.SetParameters(Parameters)
             self._autoPublish(anObj, theName, "cylinder")
             return anObj
+            
+        ## Create a portion of cylinder with given base point, axis, radius, height and angle.
+        #  @param thePnt Central point of cylinder base.
+        #  @param theAxis Cylinder axis.
+        #  @param theR Cylinder radius.
+        #  @param theH Cylinder height.
+        #  @param theA Cylinder angle in radians.
+        #  @param theName Object name; when specified, this parameter is used
+        #         for result publication in the study. Otherwise, if automatic
+        #         publication is switched on, default value is used for result name.
+        #
+        #  @return New GEOM.GEOM_Object, containing the created cylinder.
+        #
+        #  @ref tui_creation_cylinder "Example"
+        @ManageTransactions("PrimOp")
+        def MakeCylinderA(self, thePnt, theAxis, theR, theH, theA, theName=None):
+            """
+            Create a a portion of cylinder with given base point, axis, radius, height and angle.
+
+            Parameters:
+                thePnt Central point of cylinder base.
+                theAxis Cylinder axis.
+                theR Cylinder radius.
+                theH Cylinder height.
+                theA Cylinder angle in radians.
+                theName Object name; when specified, this parameter is used
+                        for result publication in the study. Otherwise, if automatic
+                        publication is switched on, default value is used for result name.
+
+            Returns:
+                New GEOM.GEOM_Object, containing the created cylinder.
+            """
+            # Example: see GEOM_TestAll.py
+            flag = False
+            if isinstance(theA,str):
+                flag = True
+            theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
+           if flag:
+                theA = theA*math.pi/180.
+            anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
+            RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
+            anObj.SetParameters(Parameters)
+            self._autoPublish(anObj, theName, "cylinder")
+            return anObj
 
         ## Create a cylinder with given radius and height at
         #  the origin of coordinate system. Axis of the cylinder
@@ -3042,6 +3067,50 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             anObj.SetParameters(Parameters)
             self._autoPublish(anObj, theName, "cylinder")
             return anObj
+            
+        ## Create a portion of cylinder with given radius, height and angle at
+        #  the origin of coordinate system. Axis of the cylinder
+        #  will be collinear to the OZ axis of the coordinate system.
+        #  @param theR Cylinder radius.
+        #  @param theH Cylinder height.
+        #  @param theA Cylinder angle in radians.
+        #  @param theName Object name; when specified, this parameter is used
+        #         for result publication in the study. Otherwise, if automatic
+        #         publication is switched on, default value is used for result name.
+        #
+        #  @return New GEOM.GEOM_Object, containing the created cylinder.
+        #
+        #  @ref tui_creation_cylinder "Example"
+        @ManageTransactions("PrimOp")
+        def MakeCylinderRHA(self, theR, theH, theA, theName=None):
+            """
+            Create a portion of cylinder with given radius, height and angle at
+            the origin of coordinate system. Axis of the cylinder
+            will be collinear to the OZ axis of the coordinate system.
+
+            Parameters:
+                theR Cylinder radius.
+                theH Cylinder height.
+                theA Cylinder angle in radians.
+                theName Object name; when specified, this parameter is used
+                        for result publication in the study. Otherwise, if automatic
+                        publication is switched on, default value is used for result name.
+
+            Returns:
+                New GEOM.GEOM_Object, containing the created cylinder.
+            """
+            # Example: see GEOM_TestAll.py
+            flag = False
+            if isinstance(theA,str):
+                flag = True
+            theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
+            if flag:
+                theA = theA*math.pi/180.
+            anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
+            RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
+            anObj.SetParameters(Parameters)
+            self._autoPublish(anObj, theName, "cylinder")
+            return anObj
 
         ## Create a sphere with given center and radius.
         #  @param thePnt Sphere center.
@@ -7825,7 +7894,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             return anObj
 
         ## Rotate the given object around the given axis
-        #  on the given angle, creating its copy before the rotatation.
+        #  on the given angle, creating its copy before the rotation.
         #  @param theObject The object to be rotated.
         #  @param theAxis Rotation axis.
         #  @param theAngle Rotation angle in radians.
@@ -10618,8 +10687,12 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         ## @addtogroup l2_import_export
         ## @{
 
-        ## Import a shape from the BREP or IGES or STEP file
+        ## Import a shape from the BREP, IGES, STEP or other file
         #  (depends on given format) with given name.
+        #
+        #  Note: this function is deprecated, it is kept for backward compatibility only
+        #  Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
+        #
         #  @param theFileName The file, containing the shape.
         #  @param theFormatName Specify format for the file reading.
         #         Available formats can be obtained with InsertOp.ImportTranslators() method.
@@ -10641,10 +10714,13 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         @ManageTransactions("InsertOp")
         def ImportFile(self, theFileName, theFormatName, theName=None):
             """
-            Import a shape from the BREP or IGES or STEP file
+            Import a shape from the BREP, IGES, STEP or other file
             (depends on given format) with given name.
 
-            Parameters:
+            Note: this function is deprecated, it is kept for backward compatibility only
+            Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
+
+            Parameters: 
                 theFileName The file, containing the shape.
                 theFormatName Specify format for the file reading.
                     Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
@@ -10665,6 +10741,10 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 material groups are not automatically published.
             """
             # Example: see GEOM_TestOthers.py
+            print """
+            WARNING: Function ImportFile is deprecated, use Import<FormatName> instead,
+            where <FormatName> is a name of desirable format for importing.
+            """
             aListObj = self.InsertOp.ImportFile(theFileName, theFormatName)
             RaiseIfFailed("ImportFile", self.InsertOp)
             aNbObj = len(aListObj)
@@ -10679,159 +10759,9 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             """
             Deprecated analog of geompy.ImportFile, kept for backward compatibility only.
             """
-            print "WARNING: Function Import is deprecated, use ImportFile instead"
             # note: auto-publishing is done in self.ImportFile()
             return self.ImportFile(theFileName, theFormatName, theName)
 
-        ## Shortcut to ImportFile() for BREP format.
-        #  Import a shape from the BREP file with given name.
-        #  @param theFileName The file, containing the shape.
-        #  @param theName Object name; when specified, this parameter is used
-        #         for result publication in the study. Otherwise, if automatic
-        #         publication is switched on, default value is used for result name.
-        #
-        #  @return New GEOM.GEOM_Object, containing the imported shape.
-        #
-        #  @ref swig_Import_Export "Example"
-        def ImportBREP(self, theFileName, theName=None):
-            """
-            geompy.ImportFile(...) function for BREP format
-            Import a shape from the BREP file with given name.
-
-            Parameters:
-                theFileName The file, containing the shape.
-                theName Object name; when specified, this parameter is used
-                        for result publication in the study. Otherwise, if automatic
-                        publication is switched on, default value is used for result name.
-
-            Returns:
-                New GEOM.GEOM_Object, containing the imported shape.
-            """
-            # Example: see GEOM_TestOthers.py
-            # note: auto-publishing is done in self.ImportFile()
-            return self.ImportFile(theFileName, "BREP", theName)
-
-        ## Shortcut to ImportFile() for IGES format
-        #  Import a shape from the IGES file with given name.
-        #  @param theFileName The file, containing the shape.
-        #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
-        #                     and result model will be scaled, if its units are not meters.
-        #                     If False (default), file length units will be taken into account.
-        #  @param theName Object name; when specified, this parameter is used
-        #         for result publication in the study. Otherwise, if automatic
-        #         publication is switched on, default value is used for result name.
-        #
-        #  @return New GEOM.GEOM_Object, containing the imported shape.
-        #
-        #  @ref swig_Import_Export "Example"
-        def ImportIGES(self, theFileName, ignoreUnits = False, theName=None):
-            """
-            geompy.ImportFile(...) function for IGES format
-
-            Parameters:
-                theFileName The file, containing the shape.
-                ignoreUnits If True, file length units will be ignored (set to 'meter')
-                            and result model will be scaled, if its units are not meters.
-                            If False (default), file length units will be taken into account.
-                theName Object name; when specified, this parameter is used
-                        for result publication in the study. Otherwise, if automatic
-                        publication is switched on, default value is used for result name.
-
-            Returns:
-                New GEOM.GEOM_Object, containing the imported shape.
-            """
-            # Example: see GEOM_TestOthers.py
-            # note: auto-publishing is done in self.ImportFile()
-            if ignoreUnits:
-                return self.ImportFile(theFileName, "IGES_SCALE", theName)
-            return self.ImportFile(theFileName, "IGES", theName)
-
-        ## Return length unit from given IGES file
-        #  @param theFileName The file, containing the shape.
-        #  @return String, containing the units name.
-        #
-        #  @ref swig_Import_Export "Example"
-        @ManageTransactions("InsertOp")
-        def GetIGESUnit(self, theFileName):
-            """
-            Return length units from given IGES file
-
-            Parameters:
-                theFileName The file, containing the shape.
-
-            Returns:
-                String, containing the units name.
-            """
-            # Example: see GEOM_TestOthers.py
-            aUnitName = self.InsertOp.ReadValue(theFileName, "IGES", "LEN_UNITS")
-            return aUnitName
-
-        ## Shortcut to ImportFile() for STEP format
-        #  Import a shape from the STEP file with given name.
-        #  @param theFileName The file, containing the shape.
-        #  @param ignoreUnits If True, file length units will be ignored (set to 'meter')
-        #                     and result model will be scaled, if its units are not meters.
-        #                     If False (default), file length units will be taken into account.
-        #  @param theName Object name; when specified, this parameter is used
-        #         for result publication in the study. Otherwise, if automatic
-        #         publication is switched on, default value is used for result name.
-        #
-        #  @return New GEOM.GEOM_Object, containing the imported shape.
-        #          If material names are imported it returns the list of
-        #          objects. The first one is the imported object followed by
-        #          material groups.
-        #  @note Auto publishing is allowed for the shape itself. Imported
-        #        material groups are not automatically published.
-        #
-        #  @ref swig_Import_Export "Example"
-        def ImportSTEP(self, theFileName, ignoreUnits = False, theName=None):
-            """
-            geompy.ImportFile(...) function for STEP format
-
-            Parameters:
-                theFileName The file, containing the shape.
-                ignoreUnits If True, file length units will be ignored (set to 'meter')
-                            and result model will be scaled, if its units are not meters.
-                            If False (default), file length units will be taken into account.
-                theName Object name; when specified, this parameter is used
-                        for result publication in the study. Otherwise, if automatic
-                        publication is switched on, default value is used for result name.
-
-            Returns:
-                New GEOM.GEOM_Object, containing the imported shape.
-                If material names are imported it returns the list of
-                objects. The first one is the imported object followed by
-                material groups.
-            Note:
-                Auto publishing is allowed for the shape itself. Imported
-                material groups are not automatically published.
-            """
-            # Example: see GEOM_TestOthers.py
-            # note: auto-publishing is done in self.ImportFile()
-            if ignoreUnits:
-                return self.ImportFile(theFileName, "STEP_SCALE", theName)
-            return self.ImportFile(theFileName, "STEP", theName)
-
-        ## Return length unit from given IGES or STEP file
-        #  @param theFileName The file, containing the shape.
-        #  @return String, containing the units name.
-        #
-        #  @ref swig_Import_Export "Example"
-        @ManageTransactions("InsertOp")
-        def GetSTEPUnit(self, theFileName):
-            """
-            Return length units from given STEP file
-
-            Parameters:
-                theFileName The file, containing the shape.
-
-            Returns:
-                String, containing the units name.
-            """
-            # Example: see GEOM_TestOthers.py
-            aUnitName = self.InsertOp.ReadValue(theFileName, "STEP", "LEN_UNITS")
-            return aUnitName
-
         ## Read a shape from the binary stream, containing its bounding representation (BRep).
         #  @note This method will not be dumped to the python script by DumpStudy functionality.
         #  @note GEOM.GEOM_Object.GetShapeStream() method can be used to obtain the shape's BRep stream.
@@ -10867,6 +10797,10 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             return anObj
 
         ## Export the given shape into a file with given name.
+        #
+        #  Note: this function is deprecated, it is kept for backward compatibility only
+        #  Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
+        #
         #  @param theObject Shape to be stored in the file.
         #  @param theFileName Name of the file to store the given shape in.
         #  @param theFormatName Specify format for the shape storage.
@@ -10879,7 +10813,10 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             """
             Export the given shape into a file with given name.
 
-            Parameters:
+            Note: this function is deprecated, it is kept for backward compatibility only
+            Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
+            
+            Parameters: 
                 theObject Shape to be stored in the file.
                 theFileName Name of the file to store the given shape in.
                 theFormatName Specify format for the shape storage.
@@ -10887,42 +10824,16 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                               geompy.InsertOp.ExportTranslators()[0] method.
             """
             # Example: see GEOM_TestOthers.py
+            print """
+            WARNING: Function Export is deprecated, use Export<FormatName> instead,
+            where <FormatName> is a name of desirable format for exporting.
+            """
             self.InsertOp.Export(theObject, theFileName, theFormatName)
             if self.InsertOp.IsDone() == 0:
                 raise RuntimeError,  "Export : " + self.InsertOp.GetErrorCode()
                 pass
             pass
 
-        ## Shortcut to Export() for BREP format
-        #
-        #  @ref swig_Import_Export "Example"
-        def ExportBREP(self,theObject, theFileName):
-            """
-            geompy.Export(...) function for BREP format
-            """
-            # Example: see GEOM_TestOthers.py
-            return self.Export(theObject, theFileName, "BREP")
-
-        ## Shortcut to Export() for IGES format
-        #
-        #  @ref swig_Import_Export "Example"
-        def ExportIGES(self,theObject, theFileName):
-            """
-            geompy.Export(...) function for IGES format
-            """
-            # Example: see GEOM_TestOthers.py
-            return self.Export(theObject, theFileName, "IGES")
-
-        ## Shortcut to Export() for STEP format
-        #
-        #  @ref swig_Import_Export "Example"
-        def ExportSTEP(self,theObject, theFileName):
-            """
-            geompy.Export(...) function for STEP format
-            """
-            # Example: see GEOM_TestOthers.py
-            return self.Export(theObject, theFileName, "STEP")
-
         # end of l2_import_export
         ## @}
 
@@ -12557,566 +12468,8 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         # end of l3_groups
         ## @}
 
-        ## @addtogroup l4_advanced
-        ## @{
-
-        ## Create a T-shape object with specified caracteristics for the main
-        #  and the incident pipes (radius, width, half-length).
-        #  The extremities of the main pipe are located on junctions points P1 and P2.
-        #  The extremity of the incident pipe is located on junction point P3.
-        #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
-        #  the main plane of the T-shape is XOY.
-        #
-        #  @param theR1 Internal radius of main pipe
-        #  @param theW1 Width of main pipe
-        #  @param theL1 Half-length of main pipe
-        #  @param theR2 Internal radius of incident pipe (R2 < R1)
-        #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
-        #  @param theL2 Half-length of incident pipe
-        #
-        #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
-        #  @param theP1 1st junction point of main pipe
-        #  @param theP2 2nd junction point of main pipe
-        #  @param theP3 Junction point of incident pipe
-        #
-        #  @param theRL Internal radius of left thickness reduction
-        #  @param theWL Width of left thickness reduction
-        #  @param theLtransL Length of left transition part
-        #  @param theLthinL Length of left thin part
-        #
-        #  @param theRR Internal radius of right thickness reduction
-        #  @param theWR Width of right thickness reduction
-        #  @param theLtransR Length of right transition part
-        #  @param theLthinR Length of right thin part
-        #
-        #  @param theRI Internal radius of incident thickness reduction
-        #  @param theWI Width of incident thickness reduction
-        #  @param theLtransI Length of incident transition part
-        #  @param theLthinI Length of incident thin part
-        #
-        #  @param theName Object name; when specified, this parameter is used
-        #         for result publication in the study. Otherwise, if automatic
-        #         publication is switched on, default value is used for result name.
-        #
-        #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
-        #
-        #  @ref tui_creation_pipetshape "Example"
-        @ManageTransactions("AdvOp")
-        def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
-                            theHexMesh=True, theP1=None, theP2=None, theP3=None,
-                            theRL=0, theWL=0, theLtransL=0, theLthinL=0,
-                            theRR=0, theWR=0, theLtransR=0, theLthinR=0,
-                            theRI=0, theWI=0, theLtransI=0, theLthinI=0,
-                            theName=None):
-            """
-            Create a T-shape object with specified caracteristics for the main
-            and the incident pipes (radius, width, half-length).
-            The extremities of the main pipe are located on junctions points P1 and P2.
-            The extremity of the incident pipe is located on junction point P3.
-            If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
-            the main plane of the T-shape is XOY.
-
-            Parameters:
-                theR1 Internal radius of main pipe
-                theW1 Width of main pipe
-                theL1 Half-length of main pipe
-                theR2 Internal radius of incident pipe (R2 < R1)
-                theW2 Width of incident pipe (R2+W2 < R1+W1)
-                theL2 Half-length of incident pipe
-                theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
-                theP1 1st junction point of main pipe
-                theP2 2nd junction point of main pipe
-                theP3 Junction point of incident pipe
-
-                theRL Internal radius of left thickness reduction
-                theWL Width of left thickness reduction
-                theLtransL Length of left transition part
-                theLthinL Length of left thin part
-
-                theRR Internal radius of right thickness reduction
-                theWR Width of right thickness reduction
-                theLtransR Length of right transition part
-                theLthinR Length of right thin part
-
-                theRI Internal radius of incident thickness reduction
-                theWI Width of incident thickness reduction
-                theLtransI Length of incident transition part
-                theLthinI Length of incident thin part
-
-                theName Object name; when specified, this parameter is used
-                        for result publication in the study. Otherwise, if automatic
-                        publication is switched on, default value is used for result name.
-
-            Returns:
-                List of GEOM_Object, containing the created shape and propagation groups.
-
-            Example of usage:
-                # create PipeTShape object
-                pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
-                # create PipeTShape object with position
-                pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
-                # create PipeTShape object with left thickness reduction
-                pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
-            """
-            theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
-            if (theP1 and theP2 and theP3):
-                anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
-                                                                theRL, theWL, theLtransL, theLthinL,
-                                                                theRR, theWR, theLtransR, theLthinR,
-                                                                theRI, theWI, theLtransI, theLthinI,
-                                                                theHexMesh, theP1, theP2, theP3)
-            else:
-                anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
-                                                    theRL, theWL, theLtransL, theLthinL,
-                                                    theRR, theWR, theLtransR, theLthinR,
-                                                    theRI, theWI, theLtransI, theLthinI,
-                                                    theHexMesh)
-            RaiseIfFailed("MakePipeTShape", self.AdvOp)
-            if Parameters: anObj[0].SetParameters(Parameters)
-            def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
-            self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
-            return anObj
-
-        ## Create a T-shape object with chamfer and with specified caracteristics for the main
-        #  and the incident pipes (radius, width, half-length). The chamfer is
-        #  created on the junction of the pipes.
-        #  The extremities of the main pipe are located on junctions points P1 and P2.
-        #  The extremity of the incident pipe is located on junction point P3.
-        #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
-        #  the main plane of the T-shape is XOY.
-        #  @param theR1 Internal radius of main pipe
-        #  @param theW1 Width of main pipe
-        #  @param theL1 Half-length of main pipe
-        #  @param theR2 Internal radius of incident pipe (R2 < R1)
-        #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
-        #  @param theL2 Half-length of incident pipe
-        #  @param theH Height of the chamfer.
-        #  @param theW Width of the chamfer.
-        #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
-        #  @param theP1 1st junction point of main pipe
-        #  @param theP2 2nd junction point of main pipe
-        #  @param theP3 Junction point of incident pipe
-        #
-        #  @param theRL Internal radius of left thickness reduction
-        #  @param theWL Width of left thickness reduction
-        #  @param theLtransL Length of left transition part
-        #  @param theLthinL Length of left thin part
-        #
-        #  @param theRR Internal radius of right thickness reduction
-        #  @param theWR Width of right thickness reduction
-        #  @param theLtransR Length of right transition part
-        #  @param theLthinR Length of right thin part
-        #
-        #  @param theRI Internal radius of incident thickness reduction
-        #  @param theWI Width of incident thickness reduction
-        #  @param theLtransI Length of incident transition part
-        #  @param theLthinI Length of incident thin part
-        #
-        #  @param theName Object name; when specified, this parameter is used
-        #         for result publication in the study. Otherwise, if automatic
-        #         publication is switched on, default value is used for result name.
-        #
-        #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
-        #
-        #  @ref tui_creation_pipetshape "Example"
-        @ManageTransactions("AdvOp")
-        def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
-                                   theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
-                                   theRL=0, theWL=0, theLtransL=0, theLthinL=0,
-                                   theRR=0, theWR=0, theLtransR=0, theLthinR=0,
-                                   theRI=0, theWI=0, theLtransI=0, theLthinI=0,
-                                   theName=None):
-            """
-            Create a T-shape object with chamfer and with specified caracteristics for the main
-            and the incident pipes (radius, width, half-length). The chamfer is
-            created on the junction of the pipes.
-            The extremities of the main pipe are located on junctions points P1 and P2.
-            The extremity of the incident pipe is located on junction point P3.
-            If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
-            the main plane of the T-shape is XOY.
-
-            Parameters:
-                theR1 Internal radius of main pipe
-                theW1 Width of main pipe
-                theL1 Half-length of main pipe
-                theR2 Internal radius of incident pipe (R2 < R1)
-                theW2 Width of incident pipe (R2+W2 < R1+W1)
-                theL2 Half-length of incident pipe
-                theH Height of the chamfer.
-                theW Width of the chamfer.
-                theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
-                theP1 1st junction point of main pipe
-                theP2 2nd junction point of main pipe
-                theP3 Junction point of incident pipe
-
-                theRL Internal radius of left thickness reduction
-                theWL Width of left thickness reduction
-                theLtransL Length of left transition part
-                theLthinL Length of left thin part
-
-                theRR Internal radius of right thickness reduction
-                theWR Width of right thickness reduction
-                theLtransR Length of right transition part
-                theLthinR Length of right thin part
-
-                theRI Internal radius of incident thickness reduction
-                theWI Width of incident thickness reduction
-                theLtransI Length of incident transition part
-                theLthinI Length of incident thin part
-
-                theName Object name; when specified, this parameter is used
-                        for result publication in the study. Otherwise, if automatic
-                        publication is switched on, default value is used for result name.
-
-            Returns:
-                List of GEOM_Object, containing the created shape and propagation groups.
-
-            Example of usage:
-                # create PipeTShape with chamfer object
-                pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
-                # create PipeTShape with chamfer object with position
-                pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
-                # create PipeTShape with chamfer object with left thickness reduction
-                pipetshapechamfer_thr = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
-            """
-            theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
-            if (theP1 and theP2 and theP3):
-              anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
-                                                                     theRL, theWL, theLtransL, theLthinL,
-                                                                     theRR, theWR, theLtransR, theLthinR,
-                                                                     theRI, theWI, theLtransI, theLthinI,
-                                                                     theH, theW, theHexMesh, theP1, theP2, theP3)
-            else:
-              anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
-                                                         theRL, theWL, theLtransL, theLthinL,
-                                                         theRR, theWR, theLtransR, theLthinR,
-                                                         theRI, theWI, theLtransI, theLthinI,
-                                                         theH, theW, theHexMesh)
-            RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
-            if Parameters: anObj[0].SetParameters(Parameters)
-            def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
-            self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
-            return anObj
-
-        ## Create a T-shape object with fillet and with specified caracteristics for the main
-        #  and the incident pipes (radius, width, half-length). The fillet is
-        #  created on the junction of the pipes.
-        #  The extremities of the main pipe are located on junctions points P1 and P2.
-        #  The extremity of the incident pipe is located on junction point P3.
-        #  If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
-        #  the main plane of the T-shape is XOY.
-        #  @param theR1 Internal radius of main pipe
-        #  @param theW1 Width of main pipe
-        #  @param theL1 Half-length of main pipe
-        #  @param theR2 Internal radius of incident pipe (R2 < R1)
-        #  @param theW2 Width of incident pipe (R2+W2 < R1+W1)
-        #  @param theL2 Half-length of incident pipe
-        #  @param theRF Radius of curvature of fillet.
-        #  @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
-        #  @param theP1 1st junction point of main pipe
-        #  @param theP2 2nd junction point of main pipe
-        #  @param theP3 Junction point of incident pipe
-        #
-        #  @param theRL Internal radius of left thickness reduction
-        #  @param theWL Width of left thickness reduction
-        #  @param theLtransL Length of left transition part
-        #  @param theLthinL Length of left thin part
-        #
-        #  @param theRR Internal radius of right thickness reduction
-        #  @param theWR Width of right thickness reduction
-        #  @param theLtransR Length of right transition part
-        #  @param theLthinR Length of right thin part
-        #
-        #  @param theRI Internal radius of incident thickness reduction
-        #  @param theWI Width of incident thickness reduction
-        #  @param theLtransI Length of incident transition part
-        #  @param theLthinI Length of incident thin part
-        #
-        #  @param theName Object name; when specified, this parameter is used
-        #         for result publication in the study. Otherwise, if automatic
-        #         publication is switched on, default value is used for result name.
-        #
-        #  @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
-        #
-        #  @ref tui_creation_pipetshape "Example"
-        @ManageTransactions("AdvOp")
-        def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
-                                  theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
-                                  theRL=0, theWL=0, theLtransL=0, theLthinL=0,
-                                  theRR=0, theWR=0, theLtransR=0, theLthinR=0,
-                                  theRI=0, theWI=0, theLtransI=0, theLthinI=0,
-                                  theName=None):
-            """
-            Create a T-shape object with fillet and with specified caracteristics for the main
-            and the incident pipes (radius, width, half-length). The fillet is
-            created on the junction of the pipes.
-            The extremities of the main pipe are located on junctions points P1 and P2.
-            The extremity of the incident pipe is located on junction point P3.
-
-            Parameters:
-                If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
-                the main plane of the T-shape is XOY.
-                theR1 Internal radius of main pipe
-                theW1 Width of main pipe
-                heL1 Half-length of main pipe
-                theR2 Internal radius of incident pipe (R2 < R1)
-                theW2 Width of incident pipe (R2+W2 < R1+W1)
-                theL2 Half-length of incident pipe
-                theRF Radius of curvature of fillet.
-                theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
-                theP1 1st junction point of main pipe
-                theP2 2nd junction point of main pipe
-                theP3 Junction point of incident pipe
-
-                theRL Internal radius of left thickness reduction
-                theWL Width of left thickness reduction
-                theLtransL Length of left transition part
-                theLthinL Length of left thin part
-
-                theRR Internal radius of right thickness reduction
-                theWR Width of right thickness reduction
-                theLtransR Length of right transition part
-                theLthinR Length of right thin part
-
-                theRI Internal radius of incident thickness reduction
-                theWI Width of incident thickness reduction
-                theLtransI Length of incident transition part
-                theLthinI Length of incident thin part
-
-                theName Object name; when specified, this parameter is used
-                        for result publication in the study. Otherwise, if automatic
-                        publication is switched on, default value is used for result name.
-
-            Returns:
-                List of GEOM_Object, containing the created shape and propagation groups.
-
-            Example of usage:
-                # create PipeTShape with fillet object
-                pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
-                # create PipeTShape with fillet object with position
-                pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
-                # create PipeTShape with fillet object with left thickness reduction
-                pipetshapefillet_thr = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
-            """
-            theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
-            if (theP1 and theP2 and theP3):
-              anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
-                                                                    theRL, theWL, theLtransL, theLthinL,
-                                                                    theRR, theWR, theLtransR, theLthinR,
-                                                                    theRI, theWI, theLtransI, theLthinI,
-                                                                    theRF, theHexMesh, theP1, theP2, theP3)
-            else:
-              anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
-                                                        theRL, theWL, theLtransL, theLthinL,
-                                                        theRR, theWR, theLtransR, theLthinR,
-                                                        theRI, theWI, theLtransI, theLthinI,
-                                                        theRF, theHexMesh)
-            RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
-            if Parameters: anObj[0].SetParameters(Parameters)
-            def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
-            self._autoPublish(anObj, _toListOfNames(theName, len(anObj)), def_names)
-            return anObj
-
-        ## This function allows creating a disk already divided into blocks. It
-        #  can be used to create divided pipes for later meshing in hexaedra.
-        #  @param theR Radius of the disk
-        #  @param theOrientation Orientation of the plane on which the disk will be built
-        #         1 = XOY, 2 = OYZ, 3 = OZX
-        #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
-        #  @param theName Object name; when specified, this parameter is used
-        #         for result publication in the study. Otherwise, if automatic
-        #         publication is switched on, default value is used for result name.
-        #
-        #  @return New GEOM_Object, containing the created shape.
-        #
-        #  @ref tui_creation_divideddisk "Example"
-        @ManageTransactions("AdvOp")
-        def MakeDividedDisk(self, theR, theOrientation, thePattern, theName=None):
-            """
-            Creates a disk, divided into blocks. It can be used to create divided pipes
-            for later meshing in hexaedra.
-
-            Parameters:
-                theR Radius of the disk
-                theOrientation Orientation of the plane on which the disk will be built:
-                               1 = XOY, 2 = OYZ, 3 = OZX
-                thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
-                theName Object name; when specified, this parameter is used
-                        for result publication in the study. Otherwise, if automatic
-                        publication is switched on, default value is used for result name.
-
-            Returns:
-                New GEOM_Object, containing the created shape.
-            """
-            theR, Parameters = ParseParameters(theR)
-            anObj = self.AdvOp.MakeDividedDisk(theR, 67.0, theOrientation, thePattern)
-            RaiseIfFailed("MakeDividedDisk", self.AdvOp)
-            if Parameters: anObj.SetParameters(Parameters)
-            self._autoPublish(anObj, theName, "dividedDisk")
-            return anObj
-
-        ## This function allows creating a disk already divided into blocks. It
-        #  can be used to create divided pipes for later meshing in hexaedra.
-        #  @param theCenter Center of the disk
-        #  @param theVector Normal vector to the plane of the created disk
-        #  @param theRadius Radius of the disk
-        #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
-        #  @param theName Object name; when specified, this parameter is used
-        #         for result publication in the study. Otherwise, if automatic
-        #         publication is switched on, default value is used for result name.
-        #
-        #  @return New GEOM_Object, containing the created shape.
-        #
-        #  @ref tui_creation_divideddisk "Example"
-        @ManageTransactions("AdvOp")
-        def MakeDividedDiskPntVecR(self, theCenter, theVector, theRadius, thePattern, theName=None):
-            """
-            Creates a disk already divided into blocks. It can be used to create divided pipes
-            for later meshing in hexaedra.
-
-            Parameters:
-                theCenter Center of the disk
-                theVector Normal vector to the plane of the created disk
-                theRadius Radius of the disk
-                thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
-                theName Object name; when specified, this parameter is used
-                        for result publication in the study. Otherwise, if automatic
-                        publication is switched on, default value is used for result name.
-
-            Returns:
-                New GEOM_Object, containing the created shape.
-            """
-            theRadius, Parameters = ParseParameters(theRadius)
-            anObj = self.AdvOp.MakeDividedDiskPntVecR(theCenter, theVector, theRadius, 67.0, thePattern)
-            RaiseIfFailed("MakeDividedDiskPntVecR", self.AdvOp)
-            if Parameters: anObj.SetParameters(Parameters)
-            self._autoPublish(anObj, theName, "dividedDisk")
-            return anObj
-
-        ## Builds a cylinder prepared for hexa meshes
-        #  @param theR Radius of the cylinder
-        #  @param theH Height of the cylinder
-        #  @param thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
-        #  @param theName Object name; when specified, this parameter is used
-        #         for result publication in the study. Otherwise, if automatic
-        #         publication is switched on, default value is used for result name.
-        #
-        #  @return New GEOM_Object, containing the created shape.
-        #
-        #  @ref tui_creation_dividedcylinder "Example"
-        @ManageTransactions("AdvOp")
-        def MakeDividedCylinder(self, theR, theH, thePattern, theName=None):
-            """
-            Builds a cylinder prepared for hexa meshes
-
-            Parameters:
-                theR Radius of the cylinder
-                theH Height of the cylinder
-                thePattern Division pattern. It can be GEOM.SQUARE or GEOM.HEXAGON
-                theName Object name; when specified, this parameter is used
-                        for result publication in the study. Otherwise, if automatic
-                        publication is switched on, default value is used for result name.
-
-            Returns:
-                New GEOM_Object, containing the created shape.
-            """
-            theR, theH, Parameters = ParseParameters(theR, theH)
-            anObj = self.AdvOp.MakeDividedCylinder(theR, theH, thePattern)
-            RaiseIfFailed("MakeDividedCylinder", self.AdvOp)
-            if Parameters: anObj.SetParameters(Parameters)
-            self._autoPublish(anObj, theName, "dividedCylinder")
-            return anObj
-
-        ## Create a surface from a cloud of points
-        #  @param thelPoints list of points. Compounds of points are
-        #         accepted as well.
-        #  @param theNbMax maximum number of Bezier pieces in the resulting
-        #         surface.
-        #  @param theDegMax maximum degree of the resulting BSpline surface.
-        #  @param theDMax 3D tolerance of initial approximation.
-        #  @param theName Object name; when specified, this parameter is used
-        #         for result publication in the study. Otherwise, if automatic
-        #         publication is switched on, default value is used for result name.
-        #  @return New GEOM_Object, containing the created shape.
-        #  @note 3D tolerance of initial approximation represents a tolerance of
-        #        initial plate surface approximation. If this parameter is equal
-        #        to 0 (default value) it is computed. In this case an error of
-        #        initial plate surface computation is used as the approximation
-        #        tolerance. This error represents a maximal distance between
-        #        computed plate surface and given points.
-        #
-        #  @ref tui_creation_smoothingsurface "Example"
-        @ManageTransactions("AdvOp")
-        def MakeSmoothingSurface(self, thelPoints, theNbMax=2, theDegMax=8,
-                                 theDMax=0.0, theName=None):
-            """
-            Create a surface from a cloud of points
-
-            Parameters:
-                thelPoints list of points. Compounds of points are
-                           accepted as well.
-                theNbMax maximum number of Bezier pieces in the resulting
-                         surface.
-                theDegMax maximum degree of the resulting BSpline surface.
-                theDMax 3D tolerance of initial approximation.
-                theName Object name; when specified, this parameter is used
-                        for result publication in the study. Otherwise, if automatic
-                        publication is switched on, default value is used for result name.
-
-            Returns:
-                New GEOM_Object, containing the created shape.
-
-            Note:
-                3D tolerance of initial approximation represents a tolerance of
-                initial plate surface approximation. If this parameter is equal
-                to 0 (default value) it is computed. In this case an error of
-                initial plate surface computation is used as the approximation
-                tolerance. This error represents a maximal distance between
-                computed plate surface and given points.
-            """
-            anObj = self.AdvOp.MakeSmoothingSurface(thelPoints, theNbMax,
-                                                    theDegMax, theDMax)
-            RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
-            self._autoPublish(anObj, theName, "smoothing")
-            return anObj
-
-        ## Export a shape to XAO format
-        #  @param shape The shape to export
-        #  @param groups The list of groups to export
-        #  @param fields The list of fields to export
-        #  @param author The author of the export
-        #  @param fileName The name of the file to export
-        #  @return boolean
-        #
-        #  @ref tui_exportxao "Example"
-        @ManageTransactions("InsertOp")
-        def ExportXAO(self, shape, groups, fields, author, fileName):
-            res = self.InsertOp.ExportXAO(shape, groups, fields, author, fileName)
-            RaiseIfFailed("ExportXAO", self.InsertOp)
-            return res
-
-        ## Import a shape from XAO format
-        #  @param shape Shape to export
-        #  @param fileName The name of the file to import
-        #  @return tuple (res, shape, subShapes, groups, fields)
-        #       res Flag indicating if the import was successful
-        #       shape The imported shape
-        #       subShapes The list of imported subShapes
-        #       groups The list of imported groups
-        #       fields The list of imported fields
-        #
-        #  @ref tui_importxao "Example"
-        @ManageTransactions("InsertOp")
-        def ImportXAO(self, fileName):
-            res = self.InsertOp.ImportXAO(fileName)
-            RaiseIfFailed("ImportXAO", self.InsertOp)
-            return res
-
         #@@ insert new functions before this line @@ do not remove this line @@#
 
-        # end of l4_advanced
-        ## @}
-
         ## Create a copy of the given object
         #
         #  @param theOriginal geometry object for copy
@@ -13564,3 +12917,36 @@ def New( study, instance=None):
     assert isinstance(geom,geomBuilder), "Geom engine class is %s but should be geomBuilder.geomBuilder. Import geomBuilder before creating the instance."%geom.__class__
     geom.init_geom(study)
     return geom
+
+
+# Register methods from the plug-ins in the geomBuilder class 
+plugins_var = os.environ.get( "GEOM_PluginsList" )
+
+plugins = None
+if plugins_var is not None:
+    plugins = plugins_var.split( ":" )
+    plugins=filter(lambda x: len(x)>0, plugins)
+if plugins is not None:
+    for pluginName in plugins:
+        pluginBuilderName = pluginName + "Builder"
+        try:
+            exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName))
+        except Exception, e:
+            from salome_utils import verbose
+            print "Exception while loading %s: %s" % ( pluginBuilderName, e )
+            continue
+        exec( "from salome.%s import %s" % (pluginName, pluginBuilderName))
+        plugin = eval( pluginBuilderName )
+        
+        # add methods from plugin module to the geomBuilder class
+        for k in dir( plugin ):
+            if k[0] == '_': continue
+            method = getattr( plugin, k )
+            if type( method ).__name__ == 'function':
+                if not hasattr( geomBuilder, k ):
+                    setattr( geomBuilder, k, method )
+                pass
+            pass
+        del pluginName
+        pass
+    pass   
index 1fa77355deff84b4852ee6fc10d43f7e94282089..2b918cc1204ce29e42f9e38dd88694b1fcd44104 100644 (file)
@@ -391,6 +391,18 @@ void GEOM_Swig::setVectorsMode( const char* theEntry, bool theOn, bool theUpdate
                                            theOn, theUpdateViewer ) );
 }
 
+/*!
+  \brief Show / hide vertices for the presentation
+  \param theEntry geometry object's entry
+  \param theOn \c true to show vertices or \c false otherwise
+  \param theUpdateViewer \c true to update active view's contents
+*/
+void GEOM_Swig::setVerticesMode( const char* theEntry, bool theOn, bool theUpdateViewer )
+{
+  ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Vertices ), 
+                                           theOn, theUpdateViewer ) );
+}
+
 /*!
   \brief Change color of the presentation
   \param theEntry geometry object's entry
index 60cb10cfabe75d54aba2e910364d77a2aaed801a..1fd1d864e10ec59941e13c99985141579b748f17 100644 (file)
@@ -41,6 +41,7 @@ public:
 
   void setDisplayMode( const char* theEntry, int theMode, bool theUpdateViewer = true );
   void setVectorsMode( const char* theEntry, bool theOn, bool theUpdateViewer = true );
+  void setVerticesMode( const char* theEntry, bool theOn, bool theUpdateViewer = true );
   void setColor( const char* theEntry, int theRed, int theGreen, int theBlue, bool theUpdateViewer = true );
   void setTransparency( const char* theEntry, float theTransparency, bool theUpdateViewer = true );
   void setIsos( const char* theEntry, int theNbU, int theNbV, bool theUpdateViewer = true );
index 6d1050a98c7c42503bb0a7988978e417bc4ea8af..30f6065c7dcd919d6cf8a8316294d406b9200d19 100644 (file)
@@ -63,6 +63,7 @@ class GEOM_Swig
 
   void setDisplayMode( const char* theEntry, int theMode, bool theUpdateViewer = true );
   void setVectorsMode( const char* theEntry, bool theOn, bool theUpdateViewer = true );
+  void setVerticesMode( const char* theEntry, bool theOn, bool theUpdateViewer = true );
   void setColor( const char* theEntry, int theRed, int theGreen, int theBlue, bool theUpdateViewer = true );
   void setTransparency( const char* theEntry, float theTransparency, bool theUpdateViewer = true );
   void setIsos( const char* theEntry, int theNbU, int theNbV, bool theUpdateViewer = true );
index 8e264045e925c4f0c7acf0503ec0d9b126d2dc60..2068d5fda15525e577d7a98e5dba422cea20000c 100644 (file)
@@ -319,7 +319,6 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
     }
   }
   else if ( myEditCurrentArgument == GroupMakePoints->LineEdit1 ) {
-    myBaseObjects.clear();
     QList<TopAbs_ShapeEnum> types;
     types << TopAbs_EDGE << TopAbs_WIRE << TopAbs_FACE << TopAbs_SHELL;
     QList<GEOM::GeomObjPtr> objects = getSelected( types, -1 );
@@ -330,7 +329,6 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
     }
   }
   else if ( myEditCurrentArgument == GroupMakePoints->LineEdit2 ) {
-    myLocations.clear();
     localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
     QList<GEOM::GeomObjPtr> objects = getSelected( TopAbs_VERTEX, -1 );
     GEOMBase::Synchronize( myLocations, objects );
diff --git a/src/IGESExport/CMakeLists.txt b/src/IGESExport/CMakeLists.txt
deleted file mode 100755 (executable)
index 4ad448c..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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, or (at your option) any 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
-#
-
-# --- options ---
-
-# additional include directories
-INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
-  ${PTHREAD_INCLUDE_DIR}
-  ${KERNEL_INCLUDE_DIRS}
-  )
-
-# additional preprocessor / compiler flags
-ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
-  )
-
-# libraries to link to
-SET(_link_LIBRARIES
-  ${CAS_TKIGES}
-  ${KERNEL_SALOMELocalTrace}
-  )
-
-# --- sources ---
-
-SET(IGESExport_SOURCES
-  IGESExport.cxx
-  )
-
-# --- rules ---
-
-ADD_LIBRARY(IGESExport ${IGESExport_SOURCES})
-TARGET_LINK_LIBRARIES(IGESExport ${_link_LIBRARIES})
-INSTALL(TARGETS IGESExport EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-
-
diff --git a/src/IGESExport/IGESExport.cxx b/src/IGESExport/IGESExport.cxx
deleted file mode 100644 (file)
index 894c2a5..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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:        IGESExport.cxx
-// Created:     Wed May 19 14:49:45 2004
-// Author:      Pavel TELKOV
-
-#include "utilities.h"
-
-#include <Basics_Utils.hxx>
-
-#include <IGESControl_Controller.hxx>
-#include <IGESControl_Writer.hxx>
-#include <Interface_Static.hxx>
-
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Iterator.hxx>
-
-#include <TCollection_AsciiString.hxx>
-
-#include <Standard_Failure.hxx>
-
-#ifdef WIN32
-  #if defined IGESEXPORT_EXPORTS || defined IGESExport_EXPORTS
-    #define IGESEXPORT_EXPORT __declspec( dllexport )
-  #else
-    #define IGESEXPORT_EXPORT __declspec( dllimport )
-  #endif
-#else
-  #define IGESEXPORT_EXPORT
-#endif
-
-//=============================================================================
-/*!
- *  KindOfBRep
- *  \return 0 if theShape contains only simple entities (wires, edges and vertices),
- *          1 if theShape contains only complex entities (shells, solids and compsolids)
- *          2 if theShape contains only indifferent entities (faces)
- *         -1 if theShape contains both simple and complex entities (and in this case it
- *            cannot be saved without any loss neither in BRepMode == 0 nor in BRepMode == 1)
- */
-//=============================================================================
-int KindOfBRep (const TopoDS_Shape& theShape)
-{
-  int aKind = 2;
-
-  switch (theShape.ShapeType())
-  {
-  case TopAbs_COMPOUND:
-    {
-      bool isSimple = false;
-      bool isComplex = false;
-      TopoDS_Iterator anIt (theShape, Standard_True, Standard_True);
-      for (; anIt.More(); anIt.Next()) {
-        TopoDS_Shape aS = anIt.Value();
-        int aKindSub = KindOfBRep(aS);
-        if (aKindSub == 0)
-          isSimple = true;
-        else if (aKindSub == 1)
-          isComplex = true;
-        else if (aKindSub == -1) {
-          return -1; // heterogeneous
-        }
-      }
-      if (isSimple && isComplex)
-        aKind = -1; // heterogeneous
-      else if (isSimple)
-        aKind = 0;
-      else if (isComplex)
-        aKind = 1;
-    }
-    break;
-  case TopAbs_COMPSOLID:
-  case TopAbs_SOLID:
-  case TopAbs_SHELL:
-    aKind = 1;
-    break;
-  case TopAbs_WIRE:
-  case TopAbs_EDGE:
-  case TopAbs_VERTEX:
-    aKind = 0;
-    break;
-  default:
-    aKind = 2;
-  }
-
-  return aKind;
-}
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-extern "C"
-{
-IGESEXPORT_EXPORT
-  int Export( const TopoDS_Shape& theShape,
-              const TCollection_AsciiString& theFileName,
-              const TCollection_AsciiString& theFormatName )
-  {
-    bool ok = false;
-
-    // define, whether to write only faces (5.1 IGES format)
-    // or shells and solids also (5.3 IGES format)
-    int aBrepMode = 0;
-    if (theFormatName.IsEqual("IGES_5_3"))
-      aBrepMode = 1;
-
-    MESSAGE("Export IGES into file " << theFileName.ToCString());
-
-    // Mantis issue 0021350: check being exported shape, as some standalone
-    // entities (edges, wires and vertices) cannot be saved in BRepMode
-    if (aBrepMode == 1) {
-      int aKind = KindOfBRep(theShape);
-      if (aKind == -1)
-        Standard_Failure::Raise("EXPORT_IGES_HETEROGENEOUS_COMPOUND");
-      else if (aKind == 2)
-        aBrepMode = 1;
-      else
-        aBrepMode = aKind;
-    }
-
-    // commented for 0021350: Please don't catch exceptions silently and send an
-    // inappropriate error message instead, it is disturbing for the user and for us
-    //try
-    {
-      // Set "C" numeric locale to save numbers correctly
-      Kernel_Utils::Localizer loc;
-
-      // initialize writer
-      IGESControl_Controller::Init();
-      //IGESControl_Writer ICW (Interface_Static::CVal("write.iges.unit"),
-      //                        Interface_Static::IVal("write.iges.brep.mode"));
-      IGESControl_Writer ICW ("M", aBrepMode); // "write.iges.unit" ->> VSR 15.09.09: export explicitly in meters
-      Interface_Static::SetCVal("xstep.cascade.unit","M");
-
-      // 09.03.2010 skl for bug 0020726
-      // change default value "Average" to "Max"
-      Interface_Static::SetCVal("write.precision.mode","Max");
-
-      // perform shape writing
-      if (ICW.AddShape( theShape )) {
-        ICW.ComputeModel();
-        ok = ICW.Write( theFileName.ToCString() );
-      }
-    }
-    //catch(Standard_Failure)
-    //{
-    //}
-    return ok;
-  }
-}
diff --git a/src/IGESImport/CMakeLists.txt b/src/IGESImport/CMakeLists.txt
deleted file mode 100755 (executable)
index 61d020c..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-# 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, or (at your option) any 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
-#
-
-# --- options ---
-
-# additional include directories
-INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
-  ${PTHREAD_INCLUDE_DIR}
-  ${KERNEL_INCLUDE_DIRS}
-  )
-
-# additional preprocessor / compiler flags
-ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
-  )
-
-# libraries to link to
-SET(_link_LIBRARIES
-  ${CAS_TKIGES} ${CAS_TKCAF}
-  ${CAS_TKLCAF}
-  ${KERNEL_SALOMELocalTrace}
-  )
-
-# --- sources ---
-
-SET(IGESImport_SOURCES
-  IGESImport.cxx
-  )
-
-# --- rules ---
-
-ADD_LIBRARY(IGESImport ${IGESImport_SOURCES})
-TARGET_LINK_LIBRARIES(IGESImport ${_link_LIBRARIES})
-INSTALL(TARGETS IGESImport EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-
-
diff --git a/src/IGESImport/IGESImport.cxx b/src/IGESImport/IGESImport.cxx
deleted file mode 100644 (file)
index 711ccea..0000000
+++ /dev/null
@@ -1,250 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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:        IGESImport.cxx
-//  Created:     Wed May 19 14:36:35 2004
-//  Author:      Pavel TELKOV
-
-#include "utilities.h"
-
-#include <Basics_Utils.hxx>
-
-#include <IFSelect_ReturnStatus.hxx>
-#include <IGESControl_Reader.hxx>
-#include <IGESData_IGESModel.hxx>
-#include <IGESData_IGESEntity.hxx>
-
-#include <Interface_Static.hxx>
-#include <Interface_InterfaceModel.hxx>
-#include <XSControl_TransferReader.hxx>
-#include <XSControl_WorkSession.hxx>
-#include <Transfer_TransientProcess.hxx>
-#include <Transfer_Binder.hxx>
-#include <TransferBRep.hxx>
-
-#include <TNaming_Builder.hxx>
-#include <TDF_TagSource.hxx>
-#include <TDataStd_Name.hxx>
-#include <TDF_Label.hxx>
-
-#include <TCollection_HAsciiString.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <BRep_Builder.hxx>
-#include <gp_Pnt.hxx>
-
-#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
-
-#ifdef WIN32
-  #if defined IGESIMPORT_EXPORTS || defined IGESImport_EXPORTS
-    #define IGESIMPORT_EXPORT __declspec( dllexport )
-  #else
-    #define IGESIMPORT_EXPORT __declspec( dllimport )
-  #endif
-#else
-  #define IGESIMPORT_EXPORT
-#endif
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-extern "C"
-{
-  IGESIMPORT_EXPORT
-  Handle(TCollection_HAsciiString) GetValue (const TCollection_AsciiString& theFileName,
-                                             const TCollection_AsciiString& theParameterName,
-                                             TCollection_AsciiString&       theError)
-  {
-    Handle(TCollection_HAsciiString) aValue;
-
-    if (theParameterName != "LEN_UNITS") {
-      theError = theParameterName + " parameter reading is not supported by IGES plugin";
-      return aValue;
-    }
-
-    // Set "C" numeric locale to save numbers correctly
-    Kernel_Utils::Localizer loc;
-
-    IGESControl_Reader aReader;
-
-    Interface_Static::SetCVal("xstep.cascade.unit","M");
-
-    try {
-      OCC_CATCH_SIGNALS;
-
-      IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.ToCString());
-      if (status == IFSelect_RetDone) {
-        Handle(IGESData_IGESModel) aModel =
-          Handle(IGESData_IGESModel)::DownCast(aReader.Model());
-        if (!aModel.IsNull()) {
-          aValue = aModel->GlobalSection().UnitName();
-
-          //if (!aValue.IsNull()) {
-          //  Handle(TCollection_HAsciiString) aPrefix = new TCollection_HAsciiString ("UNIT_");
-          //  aValue->Prepend(aPrefix);
-          //}
-        }
-      }
-      else {
-        theError = theFileName + " reading failed";
-      }
-    }
-    catch (Standard_Failure) {
-      Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-      theError = aFail->GetMessageString();
-    }
-
-    return aValue;
-  }
-
-IGESIMPORT_EXPORT
-  TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
-                       const TCollection_AsciiString& theFormatName,
-                       TCollection_AsciiString&       theError,
-                       const TDF_Label&               theShapeLabel)
-  {
-    TopoDS_Shape aResShape;
-
-    // Set "C" numeric locale to save numbers correctly
-    Kernel_Utils::Localizer loc;
-
-    IGESControl_Reader aReader;
-
-    Interface_Static::SetCVal("xstep.cascade.unit","M");
-
-    try {
-      OCC_CATCH_SIGNALS;
-
-      IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.ToCString());
-
-      if (status == IFSelect_RetDone) {
-
-        // BEGIN: old code
-        if (theFormatName == "IGES_UNIT") {
-          Handle(IGESData_IGESModel) aModel =
-            Handle(IGESData_IGESModel)::DownCast(aReader.Model());
-          gp_Pnt P (1.0, 0.0, 0.0);
-          if (!aModel.IsNull()) {
-            Handle(TCollection_HAsciiString) aUnitName =
-              aModel->GlobalSection().UnitName();
-            if (!aUnitName.IsNull()) {
-              if (aUnitName->String()=="MM") {
-                P = gp_Pnt(0.001,0.0,0.0);
-              }
-              else if (aUnitName->String()=="CM") {
-                P = gp_Pnt(0.01,0.0,0.0);
-              }
-            }
-          }
-          BRep_Builder B;
-          TopoDS_Vertex V;
-          B.MakeVertex(V,P,1.e-7);
-          aResShape = V;
-          return aResShape;
-        }
-        // END: old code
-
-        if (theFormatName == "IGES_SCALE") {
-          //cout<<"need re-scale a model"<<endl;
-          // set UnitFlag to 'meter'
-          Handle(IGESData_IGESModel) aModel =
-            Handle(IGESData_IGESModel)::DownCast(aReader.Model());
-          if (!aModel.IsNull()) {
-            IGESData_GlobalSection aGS = aModel->GlobalSection();
-            aGS.SetUnitFlag(6);
-            aModel->SetGlobalSection(aGS);
-          }
-        }
-
-        MESSAGE("ImportIGES : all Geometry Transfer");
-        //OCC 5.1.2 porting
-        //     aReader.Clear();
-        //     aReader.TransferRoots(false);
-        aReader.ClearShapes();
-        aReader.TransferRoots();
-
-        MESSAGE("ImportIGES : count of shapes produced = " << aReader.NbShapes());
-        aResShape = aReader.OneShape();
-
-        // BEGIN: Store names of sub-shapes from file
-        Handle(Interface_InterfaceModel) Model = aReader.WS()->Model();
-        Handle(XSControl_TransferReader) TR = aReader.WS()->TransferReader();
-        if (!TR.IsNull()) {
-          Handle(Transfer_TransientProcess) TP = /*TransientProcess();*/TR->TransientProcess();
-          Standard_Integer nb = Model->NbEntities();
-          for (Standard_Integer i = 1; i <= nb; i++) {
-            Handle(IGESData_IGESEntity) ent = Handle(IGESData_IGESEntity)::DownCast(Model->Value(i));
-            if (ent.IsNull() || ! ent->HasName()) continue;
-
-            // find target shape
-            Handle(Transfer_Binder) binder = TP->Find(ent);
-            if (binder.IsNull()) continue;
-            TopoDS_Shape S = TransferBRep::ShapeResult(binder);
-            if (S.IsNull()) continue;
-
-            // create label and set shape
-            TDF_Label L;
-            TDF_TagSource aTag;
-            L = aTag.NewChild(theShapeLabel);
-            TNaming_Builder tnBuild (L);
-            tnBuild.Generated(S);
-
-            // set a name
-            TCollection_AsciiString string = ent->NameValue()->String();
-            string.LeftAdjust();
-            string.RightAdjust();
-            TCollection_ExtendedString str (string);
-            TDataStd_Name::Set(L, str);
-          }
-        }
-        // END: Store names
-      } else {
-//        switch (status) {
-//        case IFSelect_RetVoid:
-//          theError = "Nothing created or No data to process";
-//          break;
-//        case IFSelect_RetError:
-//          theError = "Error in command or input data";
-//          break;
-//        case IFSelect_RetFail:
-//          theError = "Execution was run, but has failed";
-//          break;
-//        case IFSelect_RetStop:
-//          theError = "Execution has been stopped. Quite possible, an exception was raised";
-//          break;
-//        default:
-//          break;
-//        }
-        theError = "Wrong format of the imported file. Can't import file.";
-        aResShape.Nullify();
-      }
-    }
-    catch(Standard_Failure) {
-      Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-      theError = aFail->GetMessageString();
-      aResShape.Nullify();
-    }
-    return aResShape;
-  }
-}
diff --git a/src/IGESPlugin/CMakeLists.txt b/src/IGESPlugin/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ee24084
--- /dev/null
@@ -0,0 +1,154 @@
+# Copyright (C) 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, or (at your option) any 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(SALOME_BUILD_GUI)
+  INCLUDE(UseQt4Ext)
+  INCLUDE(${QT_USE_FILE})
+ENDIF()
+
+# --- options ---
+
+# additional include directories
+INCLUDE_DIRECTORIES(
+  ${CAS_INCLUDE_DIRS}
+  ${KERNEL_INCLUDE_DIRS}
+  ${PROJECT_BINARY_DIR}/idl
+  ${PROJECT_SOURCE_DIR}/src/GEOMAlgo
+  ${PROJECT_SOURCE_DIR}/src/GEOM
+  ${PROJECT_SOURCE_DIR}/src/GEOMImpl
+  ${PROJECT_SOURCE_DIR}/src/GEOM_I
+  ${PROJECT_SOURCE_DIR}/src/GEOMClient
+  ${PROJECT_SOURCE_DIR}/src/GEOMUtils
+  )
+  
+IF(SALOME_BUILD_GUI)
+  INCLUDE_DIRECTORIES(
+    ${QT_INCLUDE_DIRS}
+    ${GUI_INCLUDE_DIRS}
+    ${PROJECT_SOURCE_DIR}/src/OBJECT
+    ${PROJECT_SOURCE_DIR}/src/GEOMGUI
+    ${PROJECT_SOURCE_DIR}/src/GEOMBase
+    )
+ENDIF()
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(
+  ${CAS_DEFINITIONS}
+  ${OMNIORB_DEFINITIONS}
+  )
+  
+IF(WIN32)
+  ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
+  
+IF(SALOME_BUILD_GUI)
+ADD_DEFINITIONS(
+  ${QT_DEFINITIONS}
+  )
+ENDIF()
+
+# libraries to link to
+SET(_link_engine_LIBRARIES
+  ${CAS_TKIGES}
+  ${KERNEL_SALOMELocalTrace}
+  ${KERNEL_OpUtil}
+  SalomeIDLGEOM
+  SalomeIDLIGESPlugin
+  GEOMEngine
+  GEOMClient
+  )
+  
+IF(SALOME_BUILD_GUI)
+  SET(_link_gui_LIBRARIES
+    SalomeIDLIGESPlugin
+    GEOMObject
+    GEOM
+    GEOMBase
+    )
+ENDIF()
+
+
+# --- headers ---
+
+SET(IGESPluginEngine_HEADERS
+  IGESPlugin_IOperations_i.hh
+  IGESPlugin_Engine.hxx
+  IGESPlugin_OperationsCreator.hxx
+  IGESPlugin_IOperations.hxx
+  IGESPlugin_IExport.hxx 
+  IGESPlugin_IImport.hxx
+  IGESPlugin_ImportDriver.hxx 
+  IGESPlugin_ExportDriver.hxx
+  IGESPlugin_IECallBack.hxx
+  )
+
+IF(SALOME_BUILD_GUI)  
+  # header files / to be processed by moc
+  SET(_moc_HEADERS
+    IGESPlugin_GUI.h
+    IGESPlugin_ExportDlg.h
+    )
+ENDIF()
+
+# --- sources ---
+
+IF(SALOME_BUILD_GUI)
+  # sources / moc wrappings
+  QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+
+  SET(IGESPluginGUI_SOURCES
+    IGESPlugin_GUI.cxx
+    IGESPlugin_ExportDlg.cxx
+    ${_moc_SOURCES}
+    )
+ENDIF()
+  
+SET(IGESPluginEngine_SOURCES
+  IGESPlugin_Engine.cxx
+  IGESPlugin_OperationsCreator.cxx
+  IGESPlugin_IOperations_i.cc
+  IGESPlugin_IOperations.cxx
+  IGESPlugin_ExportDriver.cxx
+  IGESPlugin_ImportDriver.cxx
+  IGESPlugin_IECallBack.cxx
+  )
+  
+# resource files / to be processed by lrelease
+SET(IGESPlugin_RESOURCES
+  IGESPlugin_msg_en.ts
+  IGESPlugin_msg_fr.ts
+  IGESPlugin_msg_ja.ts
+  )
+
+# --- rules ---
+
+ADD_LIBRARY(IGESPluginEngine ${IGESPluginEngine_SOURCES})
+TARGET_LINK_LIBRARIES(IGESPluginEngine ${_link_engine_LIBRARIES})
+INSTALL(TARGETS IGESPluginEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+IF(SALOME_BUILD_GUI)
+  ADD_LIBRARY(IGESPluginGUI ${IGESPluginGUI_SOURCES})
+  TARGET_LINK_LIBRARIES(IGESPluginGUI ${_link_gui_LIBRARIES})
+  INSTALL(TARGETS IGESPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+  
+  QT4_INSTALL_TS_RESOURCES("${IGESPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
+ENDIF()
+
+
+INSTALL(FILES ${IGESPluginEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
diff --git a/src/IGESPlugin/IGESPlugin_Engine.cxx b/src/IGESPlugin/IGESPlugin_Engine.cxx
new file mode 100644 (file)
index 0000000..6f0c726
--- /dev/null
@@ -0,0 +1,31 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "IGESPlugin_Engine.hxx"
+#include "IGESPlugin_OperationsCreator.hxx"
+
+extern "C"
+{
+  IGESPLUGINENGINE_EXPORT
+  GEOM_GenericOperationsCreator* GetOperationsCreator()
+  {
+    return new IGESPlugin_OperationsCreator();
+  }
+}
diff --git a/src/IGESPlugin/IGESPlugin_Engine.hxx b/src/IGESPlugin/IGESPlugin_Engine.hxx
new file mode 100755 (executable)
index 0000000..cb20e54
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 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, or (at your option) any 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 _GEOM_IGESPLUGIN_ENGINE_HXX_
+#define _GEOM_IGESPLUGIN_ENGINE_HXX_
+
+#ifdef WIN32
+ #if defined IGESPluginEngine_EXPORTS
+   #define IGESPLUGINENGINE_EXPORT __declspec( dllexport )
+ #else
+   #define IGESPLUGINENGINE_EXPORT __declspec( dllimport )
+ #endif 
+#else
+   #define IGESPLUGINENGINE_EXPORT
+#endif
+
+#endif
diff --git a/src/IGESPlugin/IGESPlugin_ExportDlg.cxx b/src/IGESPlugin/IGESPlugin_ExportDlg.cxx
new file mode 100644 (file)
index 0000000..1b21c2c
--- /dev/null
@@ -0,0 +1,88 @@
+// Copyright (C) 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, or (at your option) any 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 "IGESPlugin_ExportDlg.h"
+
+#include <QApplication>
+#include <QLabel>
+#include <QLayout>
+#include <QComboBox>
+
+//=================================================================================
+// Constructor
+//=================================================================================
+IGESPlugin_ExportDlg::IGESPlugin_ExportDlg( QWidget* parent )
+  : SUIT_FileDlg( parent, false, true, true )
+{
+  QLabel* versionLabel = new QLabel( tr( "IGES_VERSION" ), this );
+
+  myVersionCB = new QComboBox( this );
+  myVersionCB->addItem( tr( "5.1" ) );
+  myVersionCB->addItem( tr( "5.3" ) );
+
+  layout()->addWidget( versionLabel );
+  layout()->addWidget( myVersionCB );
+}
+
+//=================================================================================
+// Destructor
+//=================================================================================
+IGESPlugin_ExportDlg::~IGESPlugin_ExportDlg()
+{
+}
+
+//=================================================================================
+// getVersion
+//=================================================================================
+QString IGESPlugin_ExportDlg::getVersion() const
+{
+  return myVersionCB->currentText();
+}
+
+//=================================================================================
+// getFileName
+//=================================================================================
+QString IGESPlugin_ExportDlg::getFileName( const QString& initial, const QString& filters,
+                                          const QString& caption, QWidget* parent, QString& version )
+{
+  QStringList fls = filters.split( ";;", QString::SkipEmptyParts );
+
+  QString tmpfilename = initial;
+  tmpfilename = tmpfilename.simplified();
+  tmpfilename = tmpfilename.replace( QRegExp( "\\*" ), "" ).replace( QRegExp( "\\?" ), "" );
+
+  IGESPlugin_ExportDlg fd( parent );
+  fd.setFileMode( AnyFile );
+  fd.setFilters( fls );
+  fd.setWindowTitle( caption );
+  if ( !tmpfilename.isEmpty() )
+    fd.processPath( tmpfilename );
+
+  QString filename;
+
+  if ( fd.exec() == QDialog::Accepted ) {
+    filename = fd.selectedFile();
+    version = fd.getVersion();
+  }
+
+  QApplication::processEvents();
+
+  return filename;
+}
+  
diff --git a/src/IGESPlugin/IGESPlugin_ExportDlg.h b/src/IGESPlugin/IGESPlugin_ExportDlg.h
new file mode 100644 (file)
index 0000000..454b09a
--- /dev/null
@@ -0,0 +1,44 @@
+// Copyright (C) 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, or (at your option) any 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 IGESPlugin_ExportDlg_H
+#define IGESPlugin_ExportDlg_H
+
+#include <SUIT_FileDlg.h>
+
+class QComboBox;
+
+class IGESPlugin_ExportDlg: public SUIT_FileDlg
+{
+  Q_OBJECT
+
+public:
+  IGESPlugin_ExportDlg( QWidget* parent );
+  ~IGESPlugin_ExportDlg();
+
+  QString getVersion() const;
+  
+  static QString getFileName( const QString& initial, const QString& filters,
+                             const QString& caption, QWidget* parent, QString& version );
+  
+private:
+  QComboBox* myVersionCB;
+};
+
+#endif // IGESPlugin_ExportDlg_H
diff --git a/src/IGESPlugin/IGESPlugin_ExportDriver.cxx b/src/IGESPlugin/IGESPlugin_ExportDriver.cxx
new file mode 100644 (file)
index 0000000..29d1ea7
--- /dev/null
@@ -0,0 +1,198 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "IGESPlugin_ExportDriver.hxx"
+#include "IGESPlugin_IExport.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+#include <Basics_Utils.hxx>
+
+// GEOM includes
+#include "GEOM_Function.hxx"
+
+// OOCT includes
+#include <IGESControl_Controller.hxx>
+#include <IGESControl_Writer.hxx>
+#include <Interface_Static.hxx>
+
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Iterator.hxx>
+
+//=============================================================================
+/*!
+ *  KindOfBRep
+ *  \return 0 if theShape contains only simple entities (wires, edges and vertices),
+ *          1 if theShape contains only complex entities (shells, solids and compsolids)
+ *          2 if theShape contains only indifferent entities (faces)
+ *         -1 if theShape contains both simple and complex entities (and in this case it
+ *            cannot be saved without any loss neither in BRepMode == 0 nor in BRepMode == 1)
+ */
+//=============================================================================
+int KindOfBRep (const TopoDS_Shape& theShape)
+{
+  int aKind = 2;
+
+  switch (theShape.ShapeType())
+  {
+  case TopAbs_COMPOUND:
+    {
+      bool isSimple = false;
+      bool isComplex = false;
+      TopoDS_Iterator anIt (theShape, Standard_True, Standard_True);
+      for (; anIt.More(); anIt.Next()) {
+        TopoDS_Shape aS = anIt.Value();
+        int aKindSub = KindOfBRep(aS);
+        if (aKindSub == 0)
+          isSimple = true;
+        else if (aKindSub == 1)
+          isComplex = true;
+        else if (aKindSub == -1) {
+          return -1; // heterogeneous
+        }
+      }
+      if (isSimple && isComplex)
+        aKind = -1; // heterogeneous
+      else if (isSimple)
+        aKind = 0;
+      else if (isComplex)
+        aKind = 1;
+    }
+    break;
+  case TopAbs_COMPSOLID:
+  case TopAbs_SOLID:
+  case TopAbs_SHELL:
+    aKind = 1;
+    break;
+  case TopAbs_WIRE:
+  case TopAbs_EDGE:
+  case TopAbs_VERTEX:
+    aKind = 0;
+    break;
+  default:
+    aKind = 2;
+  }
+
+  return aKind;
+}
+
+//=======================================================================
+//function : GetID
+//purpose  :
+//=======================================================================
+const Standard_GUID& IGESPlugin_ExportDriver::GetID()
+{
+  static Standard_GUID aGUID("8fa4111a-24cb-4819-8f03-b0e2890d2a2a");
+  return aGUID;
+}
+
+//=======================================================================
+//function : IGESPlugin_ExportDriver
+//purpose  :
+//=======================================================================
+IGESPlugin_ExportDriver::IGESPlugin_ExportDriver()
+{
+}
+
+//=======================================================================
+//function : Execute
+//purpose  :
+//=======================================================================
+Standard_Integer IGESPlugin_ExportDriver::Execute( TFunction_Logbook& log ) const
+{
+  if (Label().IsNull()) return 0;
+  Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
+
+  IGESPlugin_IExport aData (aFunction);
+
+  // retrieve the being exported shape
+  TopoDS_Shape aShape;
+  Handle(GEOM_Function) aRefFunction = aData.GetOriginal();
+  if( aRefFunction.IsNull() ) return 0;
+  aShape = aRefFunction->GetValue();
+  if( aShape.IsNull() ) return 0;
+  // set the result of function to be used by next operations
+  aFunction->SetValue( aShape );
+
+  TCollection_AsciiString aFileName = aData.GetFileName();
+  TCollection_AsciiString aVersion = aData.GetVersion();
+  // define, whether to write only faces (5.1 IGES format)
+  // or shells and solids also (5.3 IGES format)
+  int aBrepMode = 0;
+  if( aVersion.IsEqual( "5.3" ) )
+    aBrepMode = 1;
+
+  MESSAGE("Export IGES into file " << aFileName.ToCString());
+
+  // Mantis issue 0021350: check being exported shape, as some standalone
+  // entities (edges, wires and vertices) cannot be saved in BRepMode
+  if( aBrepMode == 1 ) {
+    int aKind = KindOfBRep( aShape );
+    if( aKind == -1 )
+      Standard_Failure::Raise( "EXPORT_IGES_HETEROGENEOUS_COMPOUND" );
+    else if( aKind == 2 )
+      aBrepMode = 1;
+    else
+      aBrepMode = aKind;
+  }
+
+  // Set "C" numeric locale to save numbers correctly
+  Kernel_Utils::Localizer loc;
+
+  // initialize writer
+  IGESControl_Controller::Init();
+  IGESControl_Writer ICW( "M", aBrepMode ); // export explicitly in meters
+  Interface_Static::SetCVal( "xstep.cascade.unit", "M" );
+
+  // 09.03.2010 skl for bug 0020726
+  // change default value "Average" to "Max"
+  Interface_Static::SetCVal( "write.precision.mode", "Max" );
+
+  // perform shape writing
+  if( ICW.AddShape( aShape ) ) {
+    ICW.ComputeModel();
+    return ICW.Write( aFileName.ToCString() );
+  }
+  return 0;
+}
+
+//=======================================================================
+//function : MustExecute
+//purpose  :
+//=======================================================================
+Standard_Boolean IGESPlugin_ExportDriver::MustExecute( const TFunction_Logbook& ) const
+{
+  return Standard_True;
+}
+
+//================================================================================
+/*!
+ * \brief Returns a name of creation operation and names and values of creation parameters
+ */
+//================================================================================
+bool IGESPlugin_ExportDriver::
+GetCreationInformation( std::string&             theOperationName,
+                        std::vector<GEOM_Param>& theParams )
+{
+  return false;
+}
+
+IMPLEMENT_STANDARD_HANDLE( IGESPlugin_ExportDriver,GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( IGESPlugin_ExportDriver,GEOM_BaseDriver );
diff --git a/src/IGESPlugin/IGESPlugin_ExportDriver.hxx b/src/IGESPlugin/IGESPlugin_ExportDriver.hxx
new file mode 100644 (file)
index 0000000..53d9be6
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 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, or (at your option) any 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 _IGESPlugin_ExportDriver_HXX
+#define _IGESPlugin_ExportDriver_HXX
+
+// GEOM includes
+#include "GEOM_BaseDriver.hxx"
+
+// OCCT includes
+#include <TFunction_Logbook.hxx>
+
+DEFINE_STANDARD_HANDLE( IGESPlugin_ExportDriver, GEOM_BaseDriver );
+
+class IGESPlugin_ExportDriver : public GEOM_BaseDriver
+{
+public:
+  IGESPlugin_ExportDriver();
+  ~IGESPlugin_ExportDriver() {};
+
+  static const Standard_GUID& GetID();
+  virtual Standard_Integer    Execute( TFunction_Logbook& log ) const;
+  Standard_Boolean            MustExecute( const TFunction_Logbook& ) const;
+  virtual void                Validate( TFunction_Logbook& ) const {}
+
+  virtual bool                GetCreationInformation( std::string&             theOperationName,
+                                                     std::vector<GEOM_Param>& params );
+
+DEFINE_STANDARD_RTTI( IGESPlugin_ExportDriver )
+};
+
+#endif // _IGESPlugin_ExportDriver_HXX
diff --git a/src/IGESPlugin/IGESPlugin_GUI.cxx b/src/IGESPlugin/IGESPlugin_GUI.cxx
new file mode 100644 (file)
index 0000000..0dc2699
--- /dev/null
@@ -0,0 +1,305 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "IGESPlugin_GUI.h"
+#include "IGESPlugin_ExportDlg.h"
+
+// GUI includes
+#include <SUIT_Desktop.h>
+#include <SUIT_FileDlg.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_OverrideCursor.h>
+#include <SUIT_Tools.h>
+#include <LightApp_SelectionMgr.h>
+#include <SalomeApp_Application.h>
+#include <SalomeApp_Study.h>
+#include <SALOME_ListIteratorOfListIO.hxx>
+
+// GEOM includes
+#include "GeometryGUI.h"
+#include "GEOM_Operation.h"
+#include "GEOMBase.h"
+#include "GEOM_Displayer.h"
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(IGESPlugin)
+
+//=======================================================================
+// function : IGESPlugin_GUI()
+// purpose  : Constructor
+//=======================================================================
+IGESPlugin_GUI::IGESPlugin_GUI( GeometryGUI* parent ) : GEOMPluginGUI( parent )
+{
+}
+
+//=======================================================================
+// function : ~IGESPlugin_GUI
+// purpose  : Destructor
+//=======================================================================
+IGESPlugin_GUI::~IGESPlugin_GUI()
+{
+}
+
+//=======================================================================
+// function : OnGUIEvent()
+// purpose  : 
+//=======================================================================
+bool IGESPlugin_GUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
+{
+  QString cmd;
+  switch ( theCommandID ) {
+  case 1:
+    cmd = "Export_IGES"; break;
+  case 2:
+    cmd = "Import_IGES"; break;
+  default:
+    break;
+  }
+  return OnGUIEvent( cmd, parent );
+}
+
+//=======================================================================
+// function : OnGUIEvent()
+// purpose  :
+//=======================================================================
+bool IGESPlugin_GUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* parent )
+{
+  bool result = false;
+
+  if( theCommandID == "Export_IGES" ) {
+    result = exportIGES( parent );
+  }
+  else if (theCommandID == "Import_IGES") {
+    result = importIGES( parent );
+  }
+  else {
+    getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
+  }
+
+  return true;
+}
+
+//=======================================================================
+// function : importIGES
+// purpose  :
+//=======================================================================
+bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
+{
+  SalomeApp_Application* app = getGeometryGUI()->getApp();
+  if ( !app ) return false;
+  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
+  if ( !study ) return false;
+
+  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "IGESPluginEngine" );
+  GEOM::IIGESOperations_var igesOp = GEOM::IIGESOperations::_narrow( op );
+  if ( CORBA::is_nil( igesOp ) ) return false;
+
+  QStringList fileNames = app->getOpenFileNames( SUIT_FileDlg::getLastVisitedPath().isEmpty() ? QDir::currentPath() : QString(""),
+                                                tr( "IGES_FILES" ),
+                                                tr( "IMPORT_TITLE" ),
+                                                parent );
+  if ( fileNames.count() > 0 )
+  {
+    QStringList entryList;
+    QStringList errors;
+    SUIT_MessageBox::StandardButton igesAnswer = SUIT_MessageBox::NoButton;
+    
+    for ( int i = 0; i < fileNames.count(); i++ )
+    {
+      QString fileName = fileNames.at( i );
+      SUIT_OverrideCursor wc;
+      GEOM_Operation transaction( app, igesOp.in() );
+      bool ignoreUnits = false;
+      
+      try
+      {
+       app->putInfo( tr( "GEOM_PRP_LOADING" ).arg( SUIT_Tools::file( fileName, true ) ) );
+       transaction.start();
+       
+       CORBA::String_var units = igesOp->ReadValue( fileName.toUtf8().constData(), "LEN_UNITS" );
+       QString unitsStr( units.in() );
+       bool unitsOK = unitsStr.isEmpty() || unitsStr == "M" || unitsStr.toLower() == "metre";
+       
+       if ( !unitsOK )
+       {
+         if( igesAnswer == SUIT_MessageBox::NoToAll )
+         {
+           ignoreUnits = true;
+         }
+         else if( igesAnswer != SUIT_MessageBox::YesToAll )
+         {
+           SUIT_MessageBox::StandardButtons btns = SUIT_MessageBox::Yes | SUIT_MessageBox::No | SUIT_MessageBox::Cancel;
+           if ( i < fileNames.count()-1 ) btns = btns | SUIT_MessageBox::YesToAll | SUIT_MessageBox::NoToAll;
+           igesAnswer = SUIT_MessageBox::question( parent,
+                                                   tr( "WRN_WARNING" ),
+                                                   tr( "SCALE_DIMENSIONS" ).arg( unitsStr ),
+                                                   btns,
+                                                   SUIT_MessageBox::No );
+           switch ( igesAnswer )
+           {
+           case SUIT_MessageBox::Cancel:
+             return true;             // cancel (break) import operation
+           case SUIT_MessageBox::Yes:
+           case SUIT_MessageBox::YesToAll:
+             break;                   // scaling is confirmed
+           case SUIT_MessageBox::No:
+           case SUIT_MessageBox::NoAll:
+             ignoreUnits = true;      // scaling is rejected
+           default:
+             break;
+           }
+         }
+       }
+       
+       GEOM::ListOfGO_var result = igesOp->ImportIGES( fileName.toUtf8().constData(), ignoreUnits );
+       if ( result->length() > 0 && igesOp->IsDone() )
+       {
+         GEOM::GEOM_Object_var main = result[0];
+         QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
+         SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( dsStudy,
+                                                                               SALOMEDS::SObject::_nil(),
+                                                                               main.in(),
+                                                                               publishName.toUtf8().constData() );
+         
+         entryList.append( so->GetID() );
+         transaction.commit();
+         GEOM_Displayer( study ).Display( main.in() );
+       }
+       else
+       {
+         transaction.abort();
+         errors.append( QString( "%1 : %2" ).arg( fileName ).arg( igesOp->GetErrorCode() ) );
+       }
+      }
+      catch( const SALOME::SALOME_Exception& e )
+      {
+       transaction.abort();
+      }
+    }
+
+    getGeometryGUI()->updateObjBrowser( true );
+    app->browseObjects( entryList );
+          
+    if ( errors.count() > 0 )
+    {
+      SUIT_MessageBox::critical( parent,
+                                tr( "GEOM_ERROR" ),
+                                tr( "GEOM_IMPORT_ERRORS" ) + "\n" + errors.join( "\n" ) );
+    }
+  }
+  return fileNames.count() > 0;
+}
+
+//=======================================================================
+// function : exportIGES
+// purpose  :
+//=======================================================================
+bool IGESPlugin_GUI::exportIGES( SUIT_Desktop* parent )
+{
+  SalomeApp_Application* app = getGeometryGUI()->getApp();
+  if ( !app ) return false;
+  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
+  if ( !study ) return false;
+
+  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "IGESPluginEngine" );
+  GEOM::IIGESOperations_var igesOp = GEOM::IIGESOperations::_narrow( op );
+  if ( CORBA::is_nil( igesOp ) ) return false;
+
+  LightApp_SelectionMgr* sm = app->selectionMgr();
+  if ( !sm ) return false;
+  
+  SALOME_ListIO selectedObjects;
+  sm->selectedObjects( selectedObjects );
+  bool ok = false;
+  
+  SALOME_ListIteratorOfListIO it( selectedObjects );
+  for ( ; it.More(); it.Next() )
+  {
+    Handle(SALOME_InteractiveObject) io = it.Value();
+    GEOM::GEOM_Object_var obj = GEOMBase::ConvertIOinGEOMObject( io );
+    
+    if ( CORBA::is_nil( obj ) ) continue;
+
+    QString version;
+    QString fileName = IGESPlugin_ExportDlg::getFileName( QString( io->getName() ),
+                                                         tr( "IGES_FILES" ),
+                                                         tr( "EXPORT_TITLE" ),
+                                                         parent,
+                                                         version );
+    
+    if ( fileName.isEmpty() )
+      return false;
+    
+    SUIT_OverrideCursor wc;
+    
+    GEOM_Operation transaction( app, igesOp.in() );
+    
+    try
+    {
+      app->putInfo( tr( "GEOM_PRP_EXPORT" ).arg( fileName ) );
+      transaction.start();
+      
+      igesOp->ExportIGES( obj, fileName.toUtf8().constData(), version.toUtf8().constData() );
+      
+      if ( igesOp->IsDone() )
+      {
+       transaction.commit();
+      }
+      else
+      {
+       transaction.abort();
+       SUIT_MessageBox::critical( parent,
+                                  tr( "GEOM_ERROR" ),
+                                  tr( "GEOM_PRP_ABORT" ) + "\n" + tr( igesOp->GetErrorCode() ) );
+       return false;
+      }
+    }
+    catch ( const SALOME::SALOME_Exception& e )
+    {
+      transaction.abort();
+      return false;
+    }
+    ok = true;
+  }
+  
+  if ( !ok )
+  {
+    SUIT_MessageBox::warning( parent,
+                             tr( "WRN_WARNING" ),
+                             tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) );
+  }
+  return ok;
+}
+
+//=====================================================================================
+// EXPORTED METHODS
+//=====================================================================================
+extern "C"
+{
+#ifdef WIN32
+    __declspec( dllexport )
+#endif
+  GEOMGUI* GetLibGUI( GeometryGUI* parent )
+  {
+    return new IGESPlugin_GUI( parent );
+  }
+}
diff --git a/src/IGESPlugin/IGESPlugin_GUI.h b/src/IGESPlugin/IGESPlugin_GUI.h
new file mode 100644 (file)
index 0000000..58f6f9c
--- /dev/null
@@ -0,0 +1,40 @@
+// Copyright (C) 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, or (at your option) any 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 IGESPlugin_GUI_H
+#define IGESPlugin_GUI_H
+
+#include "GEOMPluginGUI.h"
+
+class IGESPlugin_GUI: public GEOMPluginGUI
+{
+  Q_OBJECT
+public:
+  IGESPlugin_GUI( GeometryGUI* parent );
+  ~IGESPlugin_GUI();
+
+  bool OnGUIEvent( int commandId, SUIT_Desktop* );
+  bool OnGUIEvent( const QString&, SUIT_Desktop* );
+
+private:
+  bool importIGES( SUIT_Desktop* );
+  bool exportIGES( SUIT_Desktop* );
+};
+
+#endif // IGESPlugin_GUI_H
diff --git a/src/IGESPlugin/IGESPlugin_IECallBack.cxx b/src/IGESPlugin/IGESPlugin_IECallBack.cxx
new file mode 100755 (executable)
index 0000000..85937db
--- /dev/null
@@ -0,0 +1,87 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "IGESPlugin_IECallBack.hxx"
+#include "IGESPlugin_IOperations.hxx"
+#include "IGESPlugin_OperationsCreator.hxx"
+
+//=============================================================================
+/*!
+ *  constructor
+ */
+//=============================================================================
+IGESPlugin_IECallBack::IGESPlugin_IECallBack()
+{
+}
+
+//=============================================================================
+/*!
+ *  destructor
+ */
+//=============================================================================
+IGESPlugin_IECallBack::~IGESPlugin_IECallBack()
+{
+}
+
+//=============================================================================
+/*!
+ *  Export
+ */
+//=============================================================================
+bool IGESPlugin_IECallBack::Export( int                            theDocId,
+                                   const Handle(GEOM_Object)      theOriginal,
+                                   const TCollection_AsciiString& theFileName,
+                                   const TCollection_AsciiString& theFormatName )
+{
+  IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  TCollection_AsciiString aVersion = ( theFormatName == "IGES_5_3" ) ? "5.3" : "5.1";
+  aPluginOperations->ExportIGES( theOriginal, theFileName, aVersion );
+  return true;
+}
+
+//=============================================================================
+/*!
+ *  Import
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+IGESPlugin_IECallBack::Import( int                            theDocId,
+                              const TCollection_AsciiString& theFormatName,
+                              const TCollection_AsciiString& theFileName )
+{
+  IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  bool anIsIgnoreUnits = ( theFormatName == "IGES_SCALE" ) ? true : false;
+  return aPluginOperations->ImportIGES( theFileName, anIsIgnoreUnits );
+}
+
+//=============================================================================
+/*!
+ *  ReadValue
+ */
+//=============================================================================
+TCollection_AsciiString
+IGESPlugin_IECallBack::ReadValue( int                            theDocId,
+                                 const TCollection_AsciiString& theFileName,
+                                 const TCollection_AsciiString& theFormatName,
+                                 const TCollection_AsciiString& theParameterName )
+{
+  IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  return aPluginOperations->ReadValue( theFileName, theParameterName );
+}
diff --git a/src/IGESPlugin/IGESPlugin_IECallBack.hxx b/src/IGESPlugin/IGESPlugin_IECallBack.hxx
new file mode 100644 (file)
index 0000000..49b1f14
--- /dev/null
@@ -0,0 +1,54 @@
+// Copyright (C) 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, or (at your option) any 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 _IGESPlugin_IECallBack_HXX_
+#define _IGESPlugin_IECallBack_HXX_
+
+// internal includes
+#include "IGESPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_Object.hxx"
+#include "GEOMImpl_IECallBack.hxx"
+
+// OCC includes
+#include <TCollection_AsciiString.hxx>
+
+class IGESPLUGINENGINE_EXPORT IGESPlugin_IECallBack : public GEOMImpl_IECallBack
+{
+public:
+  IGESPlugin_IECallBack();
+  ~IGESPlugin_IECallBack();
+  
+  bool         Export( int                            theDocId,
+                      const Handle(GEOM_Object)      theOriginal,
+                      const TCollection_AsciiString& theFileName,
+                      const TCollection_AsciiString& theFormatName );
+  
+  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
+                                              const TCollection_AsciiString& theFormatName,
+                                              const TCollection_AsciiString& theFileName );
+  
+  TCollection_AsciiString  ReadValue( int                            theDocId,
+                                     const TCollection_AsciiString& theFileName,
+                                      const TCollection_AsciiString& theFormatName,
+                                      const TCollection_AsciiString& theParameterName );
+};
+
+#endif
diff --git a/src/IGESPlugin/IGESPlugin_IExport.hxx b/src/IGESPlugin/IGESPlugin_IExport.hxx
new file mode 100644 (file)
index 0000000..2124801
--- /dev/null
@@ -0,0 +1,54 @@
+// Copyright (C) 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, or (at your option) any 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 _IGESPlugin_IExport_HXX_
+#define _IGESPlugin_IExport_HXX_
+
+#include "GEOM_Function.hxx"
+
+#define EXPORTIGES_ARG_ORIGINAL   1
+#define EXPORTIGES_ARG_FILENAME   2
+#define EXPORTIGES_ARG_VERSION    3
+
+class IGESPlugin_IExport
+{
+public:
+  IGESPlugin_IExport( Handle(GEOM_Function) theFunction )
+    : _func(theFunction) {}
+
+  void SetOriginal( Handle( GEOM_Function ) theOriginal)
+    { _func->SetReference( EXPORTIGES_ARG_ORIGINAL, theOriginal ); }
+  Handle( GEOM_Function ) GetOriginal()
+    { return _func->GetReference( EXPORTIGES_ARG_ORIGINAL ); }
+
+  void SetFileName( const TCollection_AsciiString& theFileName )
+    { _func->SetString( EXPORTIGES_ARG_FILENAME, theFileName ); }
+  TCollection_AsciiString GetFileName()
+    { return _func->GetString( EXPORTIGES_ARG_FILENAME ); }
+
+  void SetVersion( const TCollection_AsciiString& theVersion )
+    { _func->SetString( EXPORTIGES_ARG_VERSION, theVersion ); }
+  TCollection_AsciiString GetVersion()
+    { return _func->GetString( EXPORTIGES_ARG_VERSION ); }
+  
+private:
+  Handle(GEOM_Function) _func;
+};
+
+#endif // _IGESPlugin_IExport_HXX_
diff --git a/src/IGESPlugin/IGESPlugin_IImport.hxx b/src/IGESPlugin/IGESPlugin_IImport.hxx
new file mode 100644 (file)
index 0000000..da1953d
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 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, or (at your option) any 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 _IGESPlugin_IImport_HXX_
+#define _IGESPlugin_IImport_HXX_
+
+#include "GEOM_Function.hxx"
+
+#define IMPORTIGES_ARG_FILENAME     1
+#define IMPORTIGES_ARG_IGNORE_UNITS 2
+
+class IGESPlugin_IImport
+{
+public:
+  IGESPlugin_IImport( Handle(GEOM_Function) theFunction)
+    : _func(theFunction) {}
+
+  void SetFileName( const TCollection_AsciiString& theFileName )
+    { _func->SetString( IMPORTIGES_ARG_FILENAME, theFileName ); }
+  TCollection_AsciiString GetFileName()
+    { return _func->GetString( IMPORTIGES_ARG_FILENAME ); }
+  
+  void SetIsIgnoreUnits( bool theIsIgnoreUnits )
+    { _func->SetInteger( IMPORTIGES_ARG_IGNORE_UNITS, int( theIsIgnoreUnits ) ); }
+  bool GetIsIgnoreUnits()
+    { return bool( _func->GetInteger( IMPORTIGES_ARG_IGNORE_UNITS ) ); }
+
+private:
+  Handle(GEOM_Function) _func;
+};
+
+#endif // _IGESPlugin_IImport_HXX_
diff --git a/src/IGESPlugin/IGESPlugin_IOperations.cxx b/src/IGESPlugin/IGESPlugin_IOperations.cxx
new file mode 100644 (file)
index 0000000..7547da3
--- /dev/null
@@ -0,0 +1,206 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "IGESPlugin_IOperations.hxx"
+#include "IGESPlugin_ExportDriver.hxx"
+#include "IGESPlugin_ImportDriver.hxx"
+#include "IGESPlugin_IExport.hxx"
+#include "IGESPlugin_IImport.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+
+// GEOM includes
+#include "GEOM_PythonDump.hxx"
+#include "GEOMImpl_Types.hxx"
+
+#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
+
+//=============================================================================
+/*!
+ *  Constructor
+ */
+//=============================================================================
+IGESPlugin_IOperations::IGESPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
+: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+{
+  MESSAGE( "IGESPlugin_IOperations::IGESPlugin_IOperations" );
+}
+
+//=============================================================================
+/*!
+ *  Destructor
+ */
+//=============================================================================
+IGESPlugin_IOperations::~IGESPlugin_IOperations()
+{
+  MESSAGE( "IGESPlugin_IOperations::~IGESPlugin_IOperations" );
+}
+
+//=============================================================================
+/*!
+ *  ExportIGES
+ *  Export a shape to IGES format
+ *  \param theOriginal The shape to export
+ *  \param theFileName The name of the file to exported
+ *  \param theIsASCII The format of the exported file (ASCII or Binary)
+ *  \param theDeflection The deflection of the shape to exported
+ *  \param theVersion The version of IGES format which defines, whether to write
+ *                    only faces (5.1 IGES format) or shells and solids also (5.3 IGES format).
+ */
+//=============================================================================
+void IGESPlugin_IOperations::ExportIGES( const Handle(GEOM_Object)      theOriginal,
+                                                 const TCollection_AsciiString& theFileName,
+                                                 const TCollection_AsciiString& theVersion )
+{
+  SetErrorCode(KO);
+  if( theOriginal.IsNull() ) return;
+
+  Handle(GEOM_Function) aRefFunction = theOriginal->GetLastFunction();
+  if( aRefFunction.IsNull() ) return;  //There is no function which creates an object to be exported
+
+  //Add a new result object
+  Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
+
+  //Add an Export function
+  Handle(GEOM_Function) aFunction = result->AddFunction( IGESPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
+  if( aFunction.IsNull() ) return;
+
+  //Check if the function is set correctly
+  if( aFunction->GetDriverGUID() != IGESPlugin_ExportDriver::GetID() ) return;
+
+  //Set parameters
+  IGESPlugin_IExport aCI( aFunction );
+  aCI.SetOriginal( aRefFunction );
+  aCI.SetFileName( theFileName );
+  aCI.SetVersion( theVersion );
+
+  //Perform the Export
+  try {
+    OCC_CATCH_SIGNALS;
+    if( !GetSolver()->ComputeFunction( aFunction ) ) {
+      SetErrorCode( "Not enough space on disk, or you haven't permissions to write this directory" );
+      return;
+    }
+  }
+  catch( Standard_Failure ) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode( aFail->GetMessageString() );
+    return;
+  }
+
+  //Make a Python command
+  GEOM::TPythonDump(aFunction) << "geompy.ExportIGES(" << theOriginal << ", \""
+    << theFileName.ToCString() << "\", \"" << theVersion.ToCString() << "\" )";
+
+  SetErrorCode(OK);
+}
+
+//=============================================================================
+/*!
+ *  ImportIGES
+ *  Import a shape from IGES format
+ *  \param theFileName The name of the file to import
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+IGESPlugin_IOperations::ImportIGES( const TCollection_AsciiString& theFileName,
+                                            const bool theIsIgnoreUnits )
+{
+  SetErrorCode(KO);
+  if( theFileName.IsEmpty() ) return NULL;
+
+  //Add a new result object
+  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
+
+  //Add an Import function
+  Handle(GEOM_Function) aFunction =
+    anImported->AddFunction( IGESPlugin_ImportDriver::GetID(), IMPORT_SHAPE);
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != IGESPlugin_ImportDriver::GetID()) return NULL;
+
+  //Set parameters
+  IGESPlugin_IImport aCI( aFunction );
+  aCI.SetFileName( theFileName );
+  aCI.SetIsIgnoreUnits( theIsIgnoreUnits );
+
+  //Perform the Import
+  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
+
+  try {
+    OCC_CATCH_SIGNALS;
+    if( !GetSolver()->ComputeFunction( aFunction ) ) {
+      SetErrorCode( "Import driver failed" );
+      return NULL;
+    }
+    aSeq->Append(anImported);
+
+    // Greate material groups.
+    // MakeMaterialGroups( anImported, aSeq );
+  }
+  catch( Standard_Failure ) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode( aFail->GetMessageString() );
+    return NULL;
+  }
+
+  //Make a Python command
+  GEOM::TPythonDump pd (aFunction);
+  if( theIsIgnoreUnits )
+    pd << aSeq << " = geompy.ImportIGES(\"" << theFileName.ToCString() << "\", True)";
+  else
+    pd << aSeq << " = geompy.ImportIGES(\"" << theFileName.ToCString() << "\")";
+  SetErrorCode(OK);
+
+  return aSeq;
+}
+
+//=============================================================================
+/*!
+ *  ReadValue
+ */
+//=============================================================================
+TCollection_AsciiString IGESPlugin_IOperations::ReadValue
+                                 ( const TCollection_AsciiString& theFileName,
+                                   const TCollection_AsciiString& theParameterName )
+{
+  SetErrorCode(KO);
+
+  TCollection_AsciiString aValue, anError;
+
+  if (theFileName.IsEmpty() || theParameterName.IsEmpty()) return aValue;
+
+  aValue = IGESPlugin_ImportDriver::GetValue( theFileName, theParameterName, anError );
+
+  if( aValue.IsEmpty() ) {
+    if( anError.IsEmpty() )
+      anError = theFileName + " doesn't contain requested parameter";
+    return aValue;
+  }
+  if (anError.IsEmpty())
+    SetErrorCode(OK);
+  else
+    SetErrorCode(anError.ToCString());
+
+  return aValue;
+}
diff --git a/src/IGESPlugin/IGESPlugin_IOperations.hxx b/src/IGESPlugin/IGESPlugin_IOperations.hxx
new file mode 100644 (file)
index 0000000..a834f57
--- /dev/null
@@ -0,0 +1,47 @@
+// Copyright (C) 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, or (at your option) any 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 : IGESPlugin_IOperations.hxx
+
+#ifndef _IGESPlugin_IOperations_HXX_
+#define _IGESPlugin_IOperations_HXX_
+
+// internal includes
+#include "IGESPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOMImpl_IBaseIEOperations.hxx"
+
+class IGESPLUGINENGINE_EXPORT IGESPlugin_IOperations: public GEOMImpl_IBaseIEOperations
+{
+public:
+  IGESPlugin_IOperations( GEOM_Engine*, int );
+  ~IGESPlugin_IOperations();
+
+  void ExportIGES( const Handle(GEOM_Object),
+                  const TCollection_AsciiString&,
+                  const TCollection_AsciiString& );
+  
+  Handle(TColStd_HSequenceOfTransient) ImportIGES( const TCollection_AsciiString&,
+                                                  const bool );
+  
+  TCollection_AsciiString ReadValue( const TCollection_AsciiString&,
+                                    const TCollection_AsciiString& );
+};
+
+#endif
diff --git a/src/IGESPlugin/IGESPlugin_IOperations_i.cc b/src/IGESPlugin/IGESPlugin_IOperations_i.cc
new file mode 100644 (file)
index 0000000..0b87666
--- /dev/null
@@ -0,0 +1,130 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "IGESPlugin_IOperations_i.hh"
+#include "IGESPlugin_IOperations.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+
+//=============================================================================
+/*!
+ *   constructor:
+ */
+//=============================================================================
+IGESPlugin_IOperations_i::IGESPlugin_IOperations_i( PortableServer::POA_ptr thePOA,
+                                                   GEOM::GEOM_Gen_ptr theEngine,
+                                                   IGESPlugin_IOperations* theImpl )
+:GEOM_IOperations_i( thePOA, theEngine, theImpl )
+{
+  MESSAGE( "IGESPlugin_IOperations_i::IGESPlugin_IOperations_i" );
+}
+
+//=============================================================================
+/*!
+ *  destructor
+ */
+//=============================================================================
+IGESPlugin_IOperations_i::~IGESPlugin_IOperations_i()
+{
+  MESSAGE( "IGESPlugin_IOperations_i::~IGESPlugin_IOperations_i" );
+}
+
+//=============================================================================
+/*!
+ *  ExportIGES
+ *  Export a shape to IGES format
+ *  \param theOriginal The shape to export
+ *  \param theFileName The name of the exported file
+ *  \param theVersion  The version of IGES format which defines, whether to write
+ *                     only faces (5.1 IGES format) or shells and solids also (5.3 IGES format).
+ */
+//=============================================================================
+void IGESPlugin_IOperations_i::ExportIGES( GEOM::GEOM_Object_ptr theOriginal,
+                                          const char*           theFileName,
+                                          const char*           theVersion )
+{
+  // duplicate the original shape
+  GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate( theOriginal );
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference shape
+  Handle(GEOM_Object) anOriginal = GetObjectImpl( theOriginal );
+  if (anOriginal.IsNull()) return;
+
+  GetOperations()->ExportIGES( anOriginal, theFileName, theVersion );
+}
+
+//=============================================================================
+/*!
+ *  ImportIGES
+ *  Import a shape from IGES format
+ *  \param theFileName The name of the file to import
+ *  \param theIsIgnoreUnits If True, file length units will be ignored (set to 'meter')
+ *                          and result model will be scaled, if its units are not meters.
+ *                          If False (default), file length units will be taken into account.
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* IGESPlugin_IOperations_i::ImportIGES( const char* theFileName,
+                                                     const bool  theIsIgnoreUnits = false )
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Import the shape from the file
+  Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->ImportIGES( theFileName, theIsIgnoreUnits );
+
+  if( !GetOperations()->IsDone() || aHSeq.IsNull() )
+    return aSeq._retn();
+
+  // Copy created objects.
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length( aLength );
+  for( Standard_Integer i = 1; i <= aLength; i++ )
+    aSeq[i-1] = GetObject( Handle(GEOM_Object)::DownCast( aHSeq->Value(i) ) );
+
+  return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ *  ReadValue
+ */
+//=============================================================================
+char* IGESPlugin_IOperations_i::ReadValue( const char* theFileName,
+                                          const char* theParameterName )
+{
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  TCollection_AsciiString aParam = GetOperations()->ReadValue( theFileName, theParameterName );
+
+  return CORBA::string_dup( aParam.ToCString() );
+}
+
+IGESPlugin_IOperations* IGESPlugin_IOperations_i::GetOperations()
+{
+  return (IGESPlugin_IOperations*)GetImpl();
+}
diff --git a/src/IGESPlugin/IGESPlugin_IOperations_i.hh b/src/IGESPlugin/IGESPlugin_IOperations_i.hh
new file mode 100644 (file)
index 0000000..755b097
--- /dev/null
@@ -0,0 +1,53 @@
+// Copyright (C) 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, or (at your option) any 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 _IGESPlugin_IOperations_i_HeaderFile
+#define _IGESPlugin_IOperations_i_HeaderFile
+
+// idl includes
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER( GEOM_Gen )
+#include CORBA_SERVER_HEADER( IGESPlugin )
+
+// internal includes
+#include "IGESPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_IOperations_i.hh"
+
+class IGESPlugin_IOperations;
+
+class IGESPLUGINENGINE_EXPORT IGESPlugin_IOperations_i :
+      public virtual POA_GEOM::IIGESOperations,
+      public virtual GEOM_IOperations_i
+{
+public:
+  IGESPlugin_IOperations_i( PortableServer::POA_ptr thePOA,
+                           GEOM::GEOM_Gen_ptr theEngine,
+                           IGESPlugin_IOperations* theImpl );
+  ~IGESPlugin_IOperations_i();
+
+  void            ExportIGES( GEOM::GEOM_Object_ptr, const char*, const char* );
+  GEOM::ListOfGO* ImportIGES( const char*, const bool );
+  char*           ReadValue( const char*, const char* );
+
+  IGESPlugin_IOperations* GetOperations();
+};
+
+#endif
diff --git a/src/IGESPlugin/IGESPlugin_ImportDriver.cxx b/src/IGESPlugin/IGESPlugin_ImportDriver.cxx
new file mode 100644 (file)
index 0000000..4ae420e
--- /dev/null
@@ -0,0 +1,292 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "IGESPlugin_ImportDriver.hxx"
+#include "IGESPlugin_IImport.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+#include <Basics_Utils.hxx>
+
+// GEOM includes
+#include "GEOM_Function.hxx"
+#include "GEOMImpl_Types.hxx"
+
+// OOCT includes
+#include <IFSelect_ReturnStatus.hxx>
+#include <IGESControl_Reader.hxx>
+#include <IGESData_IGESModel.hxx>
+#include <IGESData_IGESEntity.hxx>
+
+#include <Interface_Static.hxx>
+#include <Interface_InterfaceModel.hxx>
+#include <XSControl_TransferReader.hxx>
+#include <XSControl_WorkSession.hxx>
+#include <Transfer_TransientProcess.hxx>
+#include <Transfer_Binder.hxx>
+#include <TransferBRep.hxx>
+
+#include <TNaming_Builder.hxx>
+#include <TDF_TagSource.hxx>
+#include <TDataStd_Name.hxx>
+#include <TDF_Label.hxx>
+
+#include <TCollection_HAsciiString.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <BRep_Builder.hxx>
+#include <gp_Pnt.hxx>
+
+#include <StdFail_NotDone.hxx>
+#include <Standard_Failure.hxx>
+#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
+
+//=======================================================================
+//function : GetID
+//purpose  :
+//=======================================================================
+const Standard_GUID& IGESPlugin_ImportDriver::GetID()
+{
+  static Standard_GUID aGUID("3dbb09b8-659f-4a0f-88b9-d9968c43a448");
+  return aGUID;
+}
+
+//=======================================================================
+//function : IGESPlugin_ImportDriver
+//purpose  :
+//=======================================================================
+IGESPlugin_ImportDriver::IGESPlugin_ImportDriver()
+{
+}
+
+//=======================================================================
+//function : Execute
+//purpose  :
+//=======================================================================
+Standard_Integer IGESPlugin_ImportDriver::Execute( TFunction_Logbook& log ) const
+{
+  if( Label().IsNull() ) return 0;
+  Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
+
+  IGESPlugin_IImport aData( aFunction );
+
+  TCollection_AsciiString aFileName = aData.GetFileName().ToCString();
+  bool anIsIgnoreUnits = aData.GetIsIgnoreUnits();
+  TDF_Label aShapeLabel = aFunction->GetNamingEntry();
+
+  TopoDS_Shape aResShape;
+  TCollection_AsciiString anError;
+
+  // Set "C" numeric locale to save numbers correctly
+  Kernel_Utils::Localizer loc;
+
+  IGESControl_Reader aReader;
+
+  Interface_Static::SetCVal( "xstep.cascade.unit", "M" );
+
+  try {
+    OCC_CATCH_SIGNALS;
+
+    IFSelect_ReturnStatus status = aReader.ReadFile( aFileName.ToCString() );
+
+    if (status == IFSelect_RetDone) {
+      if( anIsIgnoreUnits ) {
+        // need re-scale a model, set UnitFlag to 'meter'
+        Handle(IGESData_IGESModel) aModel =
+          Handle(IGESData_IGESModel)::DownCast( aReader.Model() );
+        if( !aModel.IsNull() ) {
+          IGESData_GlobalSection aGS = aModel->GlobalSection();
+          aGS.SetUnitFlag(6);
+          aModel->SetGlobalSection(aGS);
+        }
+      }
+
+      MESSAGE("ImportIGES : all Geometry Transfer");
+      //OCC 5.1.2 porting
+      //     aReader.Clear();
+      //     aReader.TransferRoots(false);
+      aReader.ClearShapes();
+      aReader.TransferRoots();
+
+      MESSAGE("ImportIGES : count of shapes produced = " << aReader.NbShapes());
+      aResShape = aReader.OneShape();
+
+      // BEGIN: Store names of sub-shapes from file
+      Handle(Interface_InterfaceModel) Model = aReader.WS()->Model();
+      Handle(XSControl_TransferReader) TR = aReader.WS()->TransferReader();
+      if (!TR.IsNull()) {
+        Handle(Transfer_TransientProcess) TP = /*TransientProcess();*/TR->TransientProcess();
+        Standard_Integer nb = Model->NbEntities();
+        for (Standard_Integer i = 1; i <= nb; i++) {
+          Handle(IGESData_IGESEntity) ent = Handle(IGESData_IGESEntity)::DownCast(Model->Value(i));
+          if (ent.IsNull() || ! ent->HasName()) continue;
+
+          // find target shape
+          Handle(Transfer_Binder) binder = TP->Find( ent );
+          if( binder.IsNull() ) continue;
+          TopoDS_Shape S = TransferBRep::ShapeResult( binder );
+          if( S.IsNull() ) continue;
+
+          // create label and set shape
+          TDF_Label L;
+          TDF_TagSource aTag;
+          L = aTag.NewChild( aShapeLabel );
+          TNaming_Builder tnBuild (L);
+          tnBuild.Generated(S);
+
+          // set a name
+          TCollection_AsciiString string = ent->NameValue()->String();
+          string.LeftAdjust();
+          string.RightAdjust();
+          TCollection_ExtendedString str (string);
+          TDataStd_Name::Set(L, str);
+        }
+      }
+      // END: Store names
+    }
+    else {
+      switch (status) {
+        case IFSelect_RetVoid:
+          anError = "Nothing created or No data to process";
+          break;
+        case IFSelect_RetError:
+          anError = "Error in command or input data";
+          break;
+        case IFSelect_RetFail:
+          anError = "Execution was run, but has failed";
+          break;
+        case IFSelect_RetStop:
+          anError = "Execution has been stopped. Quite possible, an exception was raised";
+          break;
+        default:
+          break;
+        }
+      anError = "Wrong format of the imported file. Can't import file.";
+      aResShape.Nullify();
+    }
+  }
+  catch( Standard_Failure ) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    anError = aFail->GetMessageString();
+    aResShape.Nullify();
+  }
+
+  if( aResShape.IsNull() ) {
+    StdFail_NotDone::Raise( anError.ToCString() );
+    return 0;
+  }
+
+  aFunction->SetValue( aResShape );
+
+  log.SetTouched( Label() );
+
+  return 1;
+}
+
+//=======================================================================
+//function : MustExecute
+//purpose  :
+//=======================================================================
+Standard_Boolean IGESPlugin_ImportDriver::MustExecute( const TFunction_Logbook& ) const
+{
+  return Standard_True;
+}
+
+//================================================================================
+/*!
+ * \brief Returns a name of creation operation and names and values of creation parameters
+ */
+//================================================================================
+
+bool IGESPlugin_ImportDriver::
+GetCreationInformation( std::string&             theOperationName,
+                        std::vector<GEOM_Param>& theParams )
+{
+  if( Label().IsNull() ) return 0;
+  Handle(GEOM_Function) function = GEOM_Function::GetFunction( Label() );
+
+  IGESPlugin_IImport aCI( function );
+  Standard_Integer aType = function->GetType();
+
+  theOperationName = "ImportIGES";
+
+  switch ( aType ) {
+  case IMPORT_SHAPE:
+    AddParam( theParams, "File name", aCI.GetFileName() );
+    if( aCI.GetIsIgnoreUnits() )
+      AddParam( theParams, "Format", "IGES_SCALE" );
+    break;
+  default:
+    return false;
+  }
+  return true;
+}
+
+TCollection_AsciiString
+IGESPlugin_ImportDriver::GetValue( const TCollection_AsciiString& theFileName,
+                                     const TCollection_AsciiString& theParameterName,
+                                     TCollection_AsciiString&       theError )
+{
+  Handle(TCollection_HAsciiString) aValue;
+
+  if (theParameterName != "LEN_UNITS") {
+    theError = theParameterName + " parameter reading is not supported by IGES plugin";
+    return TCollection_AsciiString();
+  }
+
+  // Set "C" numeric locale to save numbers correctly
+  Kernel_Utils::Localizer loc;
+
+  IGESControl_Reader aReader;
+
+  Interface_Static::SetCVal("xstep.cascade.unit","M");
+
+  try {
+    OCC_CATCH_SIGNALS;
+
+    IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.ToCString());
+    if (status == IFSelect_RetDone) {
+      Handle(IGESData_IGESModel) aModel =
+        Handle(IGESData_IGESModel)::DownCast(aReader.Model());
+      if (!aModel.IsNull()) {
+        aValue = aModel->GlobalSection().UnitName();
+        //if (!aValue.IsNull()) {
+        //  Handle(TCollection_HAsciiString) aPrefix = new TCollection_HAsciiString ("UNIT_");
+        //  aValue->Prepend(aPrefix);
+        //}
+      }
+    }
+    else {
+      theError = theFileName + " reading failed";
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    theError = aFail->GetMessageString();
+  }
+  if (!aValue.IsNull())
+    return aValue->String();
+  else
+    return TCollection_AsciiString();
+}
+
+
+IMPLEMENT_STANDARD_HANDLE( IGESPlugin_ImportDriver, GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( IGESPlugin_ImportDriver, GEOM_BaseDriver );
diff --git a/src/IGESPlugin/IGESPlugin_ImportDriver.hxx b/src/IGESPlugin/IGESPlugin_ImportDriver.hxx
new file mode 100644 (file)
index 0000000..0b12fa8
--- /dev/null
@@ -0,0 +1,53 @@
+// Copyright (C) 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, or (at your option) any 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 _IGESPlugin_ImportDriver_HXX
+#define _IGESPlugin_ImportDriver_HXX
+
+// GEOM includes
+#include "GEOM_BaseDriver.hxx"
+
+// OCCT includes
+#include <TFunction_Logbook.hxx>
+
+DEFINE_STANDARD_HANDLE( IGESPlugin_ImportDriver, GEOM_BaseDriver );
+
+class IGESPlugin_ImportDriver : public GEOM_BaseDriver
+{
+public:
+  IGESPlugin_ImportDriver();
+  ~IGESPlugin_ImportDriver() {};
+
+  static const Standard_GUID& GetID();
+  virtual Standard_Integer    Execute( TFunction_Logbook& log ) const;
+  Standard_Boolean            MustExecute( const TFunction_Logbook& ) const;
+  virtual void                Validate( TFunction_Logbook& ) const {}
+  virtual bool                GetCreationInformation( std::string&             theOperationName,
+                                                     std::vector<GEOM_Param>& params );
+
+  static
+  TCollection_AsciiString     GetValue( const TCollection_AsciiString&,
+                                       const TCollection_AsciiString&,
+                                       TCollection_AsciiString& );
+
+DEFINE_STANDARD_RTTI( IGESPlugin_ImportDriver )
+};
+
+#endif // _IGESPlugin_ImportDriver_HXX
diff --git a/src/IGESPlugin/IGESPlugin_OperationsCreator.cxx b/src/IGESPlugin/IGESPlugin_OperationsCreator.cxx
new file mode 100644 (file)
index 0000000..3ea6fc7
--- /dev/null
@@ -0,0 +1,72 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "IGESPlugin_OperationsCreator.hxx"
+#include "IGESPlugin_IOperations_i.hh"
+#include "IGESPlugin_IOperations.hxx"
+#include "IGESPlugin_ExportDriver.hxx"
+#include "IGESPlugin_ImportDriver.hxx"
+#include "IGESPlugin_IECallBack.hxx"
+
+// KERNEL includes
+#include <Utils_ExceptHandlers.hxx>
+#include <utilities.h>
+
+// OCCT includes
+#include <TFunction_DriverTable.hxx>
+
+std::map <int, IGESPlugin_IOperations*> IGESPlugin_OperationsCreator::_mapOfOperations;
+
+IGESPlugin_OperationsCreator::IGESPlugin_OperationsCreator()
+{
+  // Register drivers
+  TFunction_DriverTable::Get()->AddDriver( IGESPlugin_ExportDriver::GetID(),
+                                          new IGESPlugin_ExportDriver() );
+  TFunction_DriverTable::Get()->AddDriver( IGESPlugin_ImportDriver::GetID(),
+                                          new IGESPlugin_ImportDriver() );
+  
+  // Register callback
+  IGESPlugin_IECallBack* callback = new IGESPlugin_IECallBack();
+  GEOMImpl_IECallBack::Register( "IGES",       callback );
+  GEOMImpl_IECallBack::Register( "IGES_5_3",   callback );
+  GEOMImpl_IECallBack::Register( "IGES_SCALE", callback );
+}
+
+IGESPlugin_OperationsCreator::~IGESPlugin_OperationsCreator()
+{
+}
+
+GEOM_IOperations_i* IGESPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
+                                                          int                     theStudyId,
+                                                          GEOM::GEOM_Gen_ptr      theEngine,
+                                                          ::GEOMImpl_Gen*         theGenImpl )
+{
+  Unexpect aCatch( SALOME_SalomeException );
+  MESSAGE( "IGESPlugin_OperationsCreator::Create" );
+  return new IGESPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+}
+
+IGESPlugin_IOperations* IGESPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
+                                                          int             theStudyId )
+{
+  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
+    _mapOfOperations[theStudyId] = new IGESPlugin_IOperations( theGenImpl, theStudyId );
+  return _mapOfOperations[theStudyId];
+}
diff --git a/src/IGESPlugin/IGESPlugin_OperationsCreator.hxx b/src/IGESPlugin/IGESPlugin_OperationsCreator.hxx
new file mode 100755 (executable)
index 0000000..fa2eeb0
--- /dev/null
@@ -0,0 +1,57 @@
+// Copyright (C) 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, or (at your option) any 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 _GEOM_IGESPlugin_OperationsCreator_HXX_
+#define _GEOM_IGESPlugin_OperationsCreator_HXX_
+
+// internal includes
+#include "IGESPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_Gen_i.hh"
+
+// C++ includes
+#include <map>
+
+class IGESPlugin_IOperations;
+
+//=====================================================================
+// Operations creator
+//=====================================================================
+class IGESPLUGINENGINE_EXPORT IGESPlugin_OperationsCreator : public GEOM_GenericOperationsCreator
+{
+public:
+  IGESPlugin_OperationsCreator();
+  ~IGESPlugin_OperationsCreator();
+
+  GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
+                             int                     theStudyId,
+                             GEOM::GEOM_Gen_ptr      theEngine,
+                             ::GEOMImpl_Gen*         theGenImpl );
+private:
+  static IGESPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
+                                     int                     theStudyId );
+
+private:
+  static std::map <int, IGESPlugin_IOperations*>  _mapOfOperations;
+
+  friend class IGESPlugin_IECallBack;
+};
+
+#endif
diff --git a/src/IGESPlugin/IGESPlugin_msg_en.ts b/src/IGESPlugin/IGESPlugin_msg_en.ts
new file mode 100644 (file)
index 0000000..7e15866
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTIGES</source>
+        <translation>IGES</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTIGES</source>
+        <translation>Export IGES</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTIGES</source>
+        <translation>Export IGES</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTIGES</source>
+        <translation>IGES</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTIGES</source>
+        <translation>Import IGES</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTIGES</source>
+        <translation>Import IGES</translation>
+    </message>
+</context>
+<context>
+    <name>IGESPlugin_GUI</name>
+    <message>
+        <source>IGES_FILES</source>
+        <translation>IGES Files ( *.iges *.igs )</translation>
+    </message>
+    <message>
+        <source>EXPORT_TITLE</source>
+        <translation>Export IGES</translation>
+    </message>
+    <message>
+        <source>IMPORT_TITLE</source>
+        <translation>Import IGES</translation>
+    </message>
+    <message>
+        <source>SCALE_DIMENSIONS</source>
+        <translation>Take into account the units (%1) embedded to the file?
+Ignoring units will cause model scaling (as dimensions are supposed to be specified in meters).</translation>
+    </message>
+</context>
+<context>
+    <name>IGESPlugin_ExportDlg</name>
+    <message>
+        <source>IGES_VERSION</source>
+        <translation>Version</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/IGESPlugin/IGESPlugin_msg_fr.ts b/src/IGESPlugin/IGESPlugin_msg_fr.ts
new file mode 100644 (file)
index 0000000..f5b2630
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTIGES</source>
+        <translation>IGES</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTIGES</source>
+        <translation>Exporter IGES</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTIGES</source>
+        <translation>Exporter IGES</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTIGES</source>
+        <translation>IGES</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTIGES</source>
+        <translation>Importer IGES</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTIGES</source>
+        <translation>Importer IGES</translation>
+    </message>
+</context>
+<context>
+    <name>IGESPlugin_GUI</name>
+    <message>
+        <source>IGES_FILES</source>
+        <translation>IGES Fichiers ( *.iges *.igs )</translation>
+    </message>
+    <message>
+        <source>EXPORT_TITLE</source>
+        <translation>Exporter IGES</translation>
+    </message>
+    <message>
+        <source>IMPORT_TITLE</source>
+        <translation>Importer IGES</translation>
+    </message>
+    <message>
+        <source>SCALE_DIMENSIONS</source>
+        <translation>Voulez-vous prendre les unités du fichier (%1) en considération?
+Sinon le modèle sera mis à l&apos;échelle GEOM (unités interprétées comme des mètres).</translation>
+    </message>
+</context>
+<context>
+    <name>IGESPlugin_ExportDlg</name>
+    <message>
+        <source>IGES_VERSION</source>
+        <translation>Version</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/IGESPlugin/IGESPlugin_msg_ja.ts b/src/IGESPlugin/IGESPlugin_msg_ja.ts
new file mode 100644 (file)
index 0000000..5064dea
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ja" sourcelanguage="en">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTIGES</source>
+        <translation type="unfinished">IGES</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTIGES</source>
+        <translation type="unfinished">Export IGES</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTIGES</source>
+        <translation type="unfinished">Export IGES</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTIGES</source>
+        <translation type="unfinished">IGES</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTIGES</source>
+        <translation type="unfinished">Import IGES</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTIGES</source>
+        <translation type="unfinished">Import IGES</translation>
+    </message>
+</context>
+<context>
+    <name>IGESPlugin_GUI</name>
+    <message>
+        <source>IGES_FILES</source>
+        <translation type="unfinished">IGES Files ( *.iges *.igs )</translation>
+    </message>
+    <message>
+        <source>EXPORT_TITLE</source>
+        <translation type="unfinished">Export IGES</translation>
+    </message>
+    <message>
+        <source>IMPORT_TITLE</source>
+        <translation type="unfinished">Import IGES</translation>
+    </message>
+    <message>
+        <source>SCALE_DIMENSIONS</source>
+        <translation>インポートしたファイルの単位をミリメートルからメートルに変換しますか?いいえを選んだ場合、メートル単位として解釈します。</translation>
+    </message>
+</context>
+<context>
+    <name>IGESPlugin_ExportDlg</name>
+    <message>
+        <source>IGES_VERSION</source>
+        <translation type="unfinished">Version</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/ImportExportGUI/CMakeLists.txt b/src/ImportExportGUI/CMakeLists.txt
deleted file mode 100644 (file)
index f5d9416..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-# 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, or (at your option) any 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(UseQt4Ext)
-INCLUDE(${QT_USE_FILE})
-
-# --- options ---
-
-# additional include directories
-INCLUDE_DIRECTORIES(
-  ${QT_INCLUDE_DIRS}
-  ${PTHREAD_INCLUDE_DIR}
-  ${VTK_INCLUDE_DIRS}
-  ${OMNIORB_INCLUDE_DIR}
-  ${CAS_INCLUDE_DIRS}
-  ${KERNEL_INCLUDE_DIRS}
-  ${GUI_INCLUDE_DIRS}
-  ${PROJECT_BINARY_DIR}/idl
-  ${PROJECT_BINARY_DIR}
-  ${PROJECT_SOURCE_DIR}/src/OBJECT
-  ${PROJECT_SOURCE_DIR}/src/GEOMClient
-  ${PROJECT_SOURCE_DIR}/src/GEOMImpl
-  ${PROJECT_SOURCE_DIR}/src/GEOMGUI
-  ${PROJECT_SOURCE_DIR}/src/GEOMBase
-  ${PROJECT_SOURCE_DIR}/src/GEOM
-  ${PROJECT_SOURCE_DIR}/src/DlgRef
-  ${PROJECT_BINARY_DIR}/src/DlgRef
-  )
-
-# additional preprocessor / compiler flags
-ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
-  ${OMNIORB_DEFINITIONS}
-  ${QT_DEFINITIONS}
-  )
-
-# libraries to link to
-SET(_link_LIBRARIES
-  GEOMObject
-  GEOMClient
-  GEOMImpl
-  GEOMBase
-  GEOM
-  DlgRef
-  )
-
-# --- headers ---
-
-# header files / no moc processing
-SET(ImportExportGUI_HEADERS
-  ImportExportGUI.h
-  )
-
-# header files / to be processed by moc
-SET(_moc_HEADERS
-  ImportExportGUI_ExportXAODlg.h
-  ImportExportGUI_ImportXAODlg.h
-  )
-
-# --- sources ---
-
-# sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
-
-SET(ImportExportGUI_SOURCES
-  ImportExportGUI.cxx
-  ImportExportGUI_ExportXAODlg.cxx
-  ImportExportGUI_ImportXAODlg.cxx
-  ${_moc_SOURCES}
-  )
-
-# --- rules ---
-
-ADD_LIBRARY(ImportExportGUI ${ImportExportGUI_SOURCES})
-TARGET_LINK_LIBRARIES(ImportExportGUI ${_link_LIBRARIES})
-INSTALL(TARGETS ImportExportGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
diff --git a/src/ImportExportGUI/ImportExportGUI.cxx b/src/ImportExportGUI/ImportExportGUI.cxx
deleted file mode 100644 (file)
index 27de1ef..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-// 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, or (at your option) any 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 <iostream>
-#include <QDialog>
-
-#include "GeometryGUI.h"
-#include "GeometryGUI_Operations.h"
-
-#include <GEOMBase.h>
-#include <SUIT_Desktop.h>
-#include <SUIT_Desktop.h>
-#include <SUIT_MessageBox.h>
-#include <SalomeApp_Application.h>
-
-#include "ImportExportGUI_ExportXAODlg.h"
-#include "ImportExportGUI_ImportXAODlg.h"
-#include "ImportExportGUI.h"
-//@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
-
-
-//=======================================================================
-// function : ImportExportGUI()
-// purpose  : Constructor
-//=======================================================================
-ImportExportGUI::ImportExportGUI(GeometryGUI* parent) :
-        GEOMGUI(parent)
-{
-}
-
-//=======================================================================
-// function : ~ImportExportGUI
-// purpose  : Destructor
-//=======================================================================
-ImportExportGUI::~ImportExportGUI()
-{
-}
-
-//=======================================================================
-// function : OnGUIEvent()
-// purpose  : 
-//=======================================================================
-bool ImportExportGUI::OnGUIEvent(int commandId, SUIT_Desktop* parent)
-{
-    SalomeApp_Application* app = getGeometryGUI()->getApp();
-    if (!app) return false;
-
-    getGeometryGUI()->EmitSignalDeactivateDialog();
-
-    QDialog* dialog = NULL;
-    switch (commandId)
-    {
-        case GEOMOp::OpExportXAO:
-            dialog = new ImportExportGUI_ExportXAODlg(getGeometryGUI(), parent);
-            break;
-        case GEOMOp::OpImportXAO:
-            dialog = new ImportExportGUI_ImportXAODlg(getGeometryGUI(), parent);
-            break;
-            //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
-        default:
-            app->putInfo(tr("GEOM_PRP_COMMAND").arg(commandId));
-            break;
-    }
-
-    if (dialog != NULL)
-        dialog->show();
-
-    return true;
-}
-
-//=====================================================================================
-// EXPORTED METHODS
-//=====================================================================================
-extern "C"
-{
-#ifdef WIN32
-    __declspec( dllexport )
-#endif
-    GEOMGUI* GetLibGUI(GeometryGUI* parent)
-    {
-        return new ImportExportGUI(parent);
-    }
-}
diff --git a/src/ImportExportGUI/ImportExportGUI.h b/src/ImportExportGUI/ImportExportGUI.h
deleted file mode 100644 (file)
index 1c3864a..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// 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, or (at your option) any 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   : ImportExportGUI.h
-//  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
-//
-#ifndef IMPORTEXPORTGUI_H
-#define IMPORTEXPORTGUI_H
-
-#include "GEOMGUI.h"
-
-//=================================================================================
-// class    : ImportExportGUI
-// purpose  :
-//=================================================================================
-class ImportExportGUI: public GEOMGUI
-{
-public:
-    ImportExportGUI(GeometryGUI* parent);
-    ~ImportExportGUI();
-
-    bool OnGUIEvent(int commandId, SUIT_Desktop* parent);
-};
-
-#endif // IMPORTEXPORTGUI_H
diff --git a/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx b/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx
deleted file mode 100644 (file)
index e620fc8..0000000
+++ /dev/null
@@ -1,450 +0,0 @@
-// 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, or (at your option) any 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 <DlgRef.h>
-#include <GeometryGUI.h>
-#include <GEOMBase.h>
-
-#include <SUIT_Session.h>
-#include <SUIT_ResourceMgr.h>
-#include <SUIT_OverrideCursor.h>
-#include <SUIT_FileDlg.h>
-#include <SalomeApp_Application.h>
-#include <SalomeApp_Study.h>
-#include <SalomeApp_Tools.h>
-#include <LightApp_SelectionMgr.h>
-
-#include <QLabel>
-#include <QLineEdit>
-#include <QButtonGroup>
-#include <QListWidget>
-#include <QFileDialog>
-#include <QMap>
-
-// OCCT Includes
-#include <TopoDS_Shape.hxx>
-#include <TopoDS.hxx>
-#include <TopExp.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-
-#include <GEOMImpl_Types.hxx>
-#include "ImportExportGUI_ExportXAODlg.h"
-
-//=================================================================================
-// Constructor
-//=================================================================================
-ImportExportGUI_ExportXAODlg::ImportExportGUI_ExportXAODlg(GeometryGUI* geometryGUI, QWidget* parent)
-:
-        GEOMBase_Skeleton(geometryGUI, parent, false)
-{
-    m_mainObj = GEOM::GEOM_Object::_nil();
-
-    SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-    QPixmap imageOp(resMgr->loadPixmap("GEOM", tr("ICON_DLG_EXPORTXAO")));
-    QPixmap iconSelect(resMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
-
-    setWindowTitle(tr("GEOM_EXPORTXAO_TITLE"));
-
-    /***************************************************************/
-    mainFrame()->GroupConstructors->setTitle(tr("GEOM_EXPORTXAO_TITLE"));
-    mainFrame()->RadioButton1->setIcon(imageOp);
-    mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose);
-    mainFrame()->RadioButton2->close();
-    mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
-    mainFrame()->RadioButton3->close();
-
-    // hide name
-    mainFrame()->GroupBoxName->hide();
-
-    //****************************
-    // Selection Group box
-    QGroupBox* gbxExport = new QGroupBox(parent);
-
-    QGridLayout* gridLayoutExport = new QGridLayout(gbxExport);
-#ifndef Q_OS_MAC
-    gridLayoutExport->setSpacing(6);
-    gridLayoutExport->setContentsMargins(9, 9, 9, 9);
-#endif
-    gridLayoutExport->setObjectName(QString::fromUtf8("gridLayoutExport"));
-
-    // Line 0
-    QLabel* lblShape = new QLabel(tr("GEOM_EXPORTXAO_EXPORTINGSHAPE"), gbxExport);
-    btnShapeSelect = new QPushButton(gbxExport);
-    btnShapeSelect->setIcon(iconSelect);
-    ledShape = new QLineEdit(gbxExport);
-    ledShape->setMinimumSize(QSize(100, 0));
-
-    int line = 0, col = 0;
-    gridLayoutExport->addWidget(lblShape, line, col++, 1, 1);
-    gridLayoutExport->addWidget(btnShapeSelect, line, col++, 1, 1);
-    gridLayoutExport->addWidget(ledShape, line, col++, 1, 1);
-
-    // Line 1
-    QLabel* lblFileName = new QLabel(tr("GEOM_EXPORTXAO_FILENAME"), gbxExport);
-    btnFileSelect = new QPushButton(gbxExport);
-    ledFileName = new QLineEdit(gbxExport);
-    btnFileSelect->setText("...");
-
-    line++; col = 0;
-    gridLayoutExport->addWidget(lblFileName, line, col++, 1, 1);
-    gridLayoutExport->addWidget(btnFileSelect, line, col++, 1, 1);
-    gridLayoutExport->addWidget(ledFileName, line, col++, 1, 1);
-
-    // Line 2
-    QLabel* lblAuthor = new QLabel(tr("GEOM_EXPORTXAO_AUTHOR"), gbxExport);
-    ledAuthor = new QLineEdit(gbxExport);
-
-    line++; col = 0;
-    gridLayoutExport->addWidget(lblAuthor, line, col++, 2, 1);
-    col++; // span
-    gridLayoutExport->addWidget(ledAuthor, line, col++, 1, 1);
-
-    //****************************
-    // Filter Group box
-    QGroupBox* gbxFilter = new QGroupBox(parent);
-
-    QGridLayout* gridLayoutFilter = new QGridLayout(gbxFilter);
-#ifndef Q_OS_MAC
-    gridLayoutFilter->setSpacing(6);
-    gridLayoutFilter->setContentsMargins(9, 9, 9, 9);
-#endif
-    gridLayoutFilter->setObjectName(QString::fromUtf8("gbxFilter"));
-
-    // Line 0
-    QLabel* lblGroups = new QLabel(tr("GEOM_EXPORTXAO_LGROUPS"), gbxFilter);
-    QLabel* lblFields = new QLabel(tr("GEOM_EXPORTXAO_LFIELDS"), gbxFilter);
-
-    line = 0, col = 0;
-    gridLayoutFilter->addWidget(lblGroups, line, col++, 1, 1);
-    gridLayoutFilter->addWidget(lblFields, line, col++, 1, 1);
-
-    // Line 1
-    lstGroups = new QListWidget(gbxFilter);
-    lstGroups->setSelectionMode(QAbstractItemView::NoSelection);
-    lstFields = new QListWidget(gbxFilter);
-    lstFields->setSelectionMode(QAbstractItemView::NoSelection);
-
-    line++; col = 0;
-    gridLayoutFilter->addWidget(lstGroups, line, col++, 1, 1);
-    gridLayoutFilter->addWidget(lstFields, line, col++, 1, 1);
-
-    //****************************
-    QVBoxLayout* layout = new QVBoxLayout(centralWidget());
-    layout->setMargin(0);
-    layout->setSpacing(6);
-    layout->addWidget(gbxExport);
-    layout->addWidget(gbxFilter);
-
-    // set help
-    setHelpFileName("xao_format_page.html");
-
-    Init();
-}
-
-//=================================================================================
-// Destructor
-//=================================================================================
-ImportExportGUI_ExportXAODlg::~ImportExportGUI_ExportXAODlg()
-{
-    // no need to delete child widgets, Qt does it all for us
-}
-
-//=================================================================================
-// function : Init()
-// purpose  :
-//=================================================================================
-void ImportExportGUI_ExportXAODlg::Init()
-{
-    // Get setting of step value from file configuration
-    m_groups.clear();
-    m_fields.clear();
-
-    // Signal/slot connections
-    connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
-    connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
-
-    connect(btnShapeSelect, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
-    connect(((SalomeApp_Application*) (SUIT_Session::session()->activeApplication()))->selectionMgr(),
-            SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
-
-    connect(btnFileSelect, SIGNAL(clicked()), this, SLOT(btnFileSelectClicked()));
-
-    initName(tr("GEOM_EXPORTXAO"));
-    SelectionIntoArgument();
-}
-
-//=================================================================================
-// function : processObject()
-// purpose  : Fill dialog fields in accordance with myObj
-//=================================================================================
-void ImportExportGUI_ExportXAODlg::processObject()
-{
-    lstGroups->clear();
-    lstFields->clear();
-    m_groups.clear();
-    m_fields.clear();
-
-    if (m_mainObj->_is_nil())
-    {
-        ledShape->setText("");
-    }
-    else
-    {
-        ledShape->setText(GEOMBase::GetName(m_mainObj));
-        GEOM::GEOM_IShapesOperations_var shapeOp = getGeomEngine()->GetIShapesOperations(getStudyId());
-
-        // add groups names
-        GEOM::ListOfGO_var groups = shapeOp->GetExistingSubObjects(m_mainObj, true);
-        for (int i = 0, n = groups->length(); i < n; i++)
-        {
-            QListWidgetItem* item = new QListWidgetItem();
-            item->setData(Qt::UserRole, QVariant(i));
-            item->setText(GEOMBase::GetName(groups[i]));
-            item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
-            item->setCheckState(Qt::Checked);
-            lstGroups->addItem(item);
-            m_groups.append(GEOM::GeomObjPtr(groups[i].in()));
-        }
-        lstGroups->sortItems(Qt::AscendingOrder);
-
-        // add fields
-        GEOM::GEOM_IFieldOperations_var fieldOp = getGeomEngine()->GetIFieldOperations(getStudyId());
-
-        GEOM::ListOfFields_var fields = fieldOp->GetFields(m_mainObj);
-        for (int i = 0, n = fields->length(); i < n; i++)
-        {
-            QListWidgetItem* item = new QListWidgetItem();
-            item->setData(Qt::UserRole, QVariant(i));
-            item->setText(fields[i]->GetName());
-            item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
-            item->setCheckState(Qt::Checked);
-            lstFields->addItem(item);
-            m_fields.append(GEOM::GeomFieldPtr(fields[i].in()));
-        }
-        lstFields->sortItems(Qt::AscendingOrder);
-    }
-}
-
-//=================================================================================
-// function : ClickOnOk()
-// purpose  :
-//=================================================================================
-void ImportExportGUI_ExportXAODlg::ClickOnOk()
-{
-    setIsApplyAndClose(true);
-    if (ClickOnApply())
-        ClickOnCancel();
-    setIsApplyAndClose(false);
-}
-
-//=================================================================================
-// function : ClickOnApply()
-// purpose  :
-//=================================================================================
-bool ImportExportGUI_ExportXAODlg::ClickOnApply()
-{
-    if (!isApplyAndClose())
-    {
-        setIsDisableBrowsing(true);
-        setIsDisplayResult(false);
-    }
-
-    QString msg;
-    if (!isValid(msg))
-    {
-        showError(msg);
-        return false;
-    }
-    SUIT_OverrideCursor wc;
-    SUIT_Session::session()->activeApplication()->putInfo("");
-
-    try
-    {
-        if (openCommand())
-            if (!execute())
-            {
-                abortCommand();
-                showError();
-                return false;
-            }
-    }
-    catch (const SALOME::SALOME_Exception& e)
-    {
-        SalomeApp_Tools::QtCatchCorbaException(e);
-        abortCommand();
-        return false;
-    }
-    commitCommand();
-
-    if (!isApplyAndClose())
-    {
-        setIsDisableBrowsing(false);
-        setIsDisplayResult(true);
-    }
-
-    processObject();
-
-    return true;
-}
-
-//=================================================================================
-// function : SelectionIntoArgument()
-// purpose  : Called when selection as changed or other case
-//=================================================================================
-void ImportExportGUI_ExportXAODlg::SelectionIntoArgument()
-{
-    m_mainObj = GEOM::GEOM_Object::_nil();
-
-    LightApp_SelectionMgr* selMgr = myGeomGUI->getApp()->selectionMgr();
-    SALOME_ListIO selList;
-    selMgr->selectedObjects(selList);
-
-    if (selList.Extent() == 1)
-    {
-        m_mainObj = GEOMBase::ConvertIOinGEOMObject(selList.First());
-    }
-
-    processObject();
-}
-
-//=================================================================================
-// function : SetEditCurrentArgument()
-// purpose  :
-//=================================================================================
-void ImportExportGUI_ExportXAODlg::SetEditCurrentArgument()
-{
-    ledShape->setFocus();
-    myEditCurrentArgument = ledShape;
-    SelectionIntoArgument();
-}
-
-//=================================================================================
-// function : btnFileSelectClicked()
-// purpose  :
-//=================================================================================
-void ImportExportGUI_ExportXAODlg::btnFileSelectClicked()
-{
-  QString file = SUIT_FileDlg::getFileName(this, ledFileName->text(), 
-                                           tr("XAO_FILES"), 
-                                           tr("GEOM_SELECT_EXPORT_XAO"), false);
-  if ( !file.isEmpty() )
-    ledFileName->setText( file );
-}
-
-//=================================================================================
-// function : ActivateThisDialog()
-// purpose  :
-//=================================================================================
-void ImportExportGUI_ExportXAODlg::ActivateThisDialog()
-{
-    GEOMBase_Skeleton::ActivateThisDialog();
-}
-
-//=================================================================================
-// function : enterEvent [REDEFINED]
-// purpose  :
-//=================================================================================
-void ImportExportGUI_ExportXAODlg::enterEvent(QEvent*)
-{
-    if (!mainFrame()->GroupConstructors->isEnabled())
-        ActivateThisDialog();
-}
-
-//=================================================================================
-// function : createOperation
-// purpose  :
-//=================================================================================
-GEOM::GEOM_IOperations_ptr ImportExportGUI_ExportXAODlg::createOperation()
-{
-    return getGeomEngine()->GetIInsertOperations(getStudyId());
-}
-
-//=================================================================================
-// function : isValid
-// purpose  :
-//=================================================================================
-bool ImportExportGUI_ExportXAODlg::isValid(QString& msg)
-{
-    // check shape
-    if (ledShape->text().isEmpty())
-        return false;
-
-    // check file name
-    if (ledFileName->text().isEmpty())
-        return false;
-
-    return true;
-}
-
-//=================================================================================
-// function : execute
-// purpose  :
-//=================================================================================
-bool ImportExportGUI_ExportXAODlg::execute()
-{
-    bool res = false;
-
-    QString author = ledAuthor->text();
-    QString fileName = ledFileName->text();
-
-    // get selected groups
-    QList<QListWidgetItem*> selGroups;
-    for (int j = 0; j < lstGroups->count(); ++j)
-    {
-        if (lstGroups->item(j)->checkState() == Qt::Checked)
-            selGroups.append(lstGroups->item(j));
-    }
-
-    GEOM::ListOfGO_var groups = new GEOM::ListOfGO();
-    groups->length(selGroups.count());
-    int i = 0;
-    for (QList<QListWidgetItem*>::iterator it = selGroups.begin(); it != selGroups.end(); ++it)
-    {
-        QListWidgetItem* item = (*it);
-        int index = item->data(Qt::UserRole).toInt();
-        groups[i++] = m_groups[index].copy();
-    }
-
-    // get selected fields
-    QList<QListWidgetItem*> selFields;
-    for (int j = 0; j < lstFields->count(); ++j)
-    {
-        if (lstFields->item(j)->checkState() == Qt::Checked)
-            selFields.append(lstFields->item(j));
-    }
-
-    GEOM::ListOfFields_var fields = new GEOM::ListOfFields();
-    fields->length(selFields.count());
-    i = 0;
-    for (QList<QListWidgetItem*>::iterator it = selFields.begin(); it != selFields.end(); ++it)
-    {
-        QListWidgetItem* item = (*it);
-        int index = item->data(Qt::UserRole).toInt();
-        fields[i++] = m_fields[index].copy();
-    }
-
-    // call engine function
-    GEOM::GEOM_IInsertOperations_var ieOp = GEOM::GEOM_IInsertOperations::_narrow(getOperation());
-    res = ieOp->ExportXAO(m_mainObj, groups, fields,
-                          author.toStdString().c_str(),
-                          fileName.toStdString().c_str());
-
-    return res;
-}
diff --git a/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.h b/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.h
deleted file mode 100644 (file)
index 61ceffd..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-// 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, or (at your option) any 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 IMPORTEXPORTGUI_EXPORTXAODLG_H
-#define IMPORTEXPORTGUI_EXPORTXAODLG_H
-
-#include <GEOMBase_Skeleton.h>
-#include <GEOM_GenericObjPtr.h>
-
-class QLineEdit;
-class QButtonGroup;
-class QListWidget;
-
-//class ImportExportGUI_1Sel1LineEdit2ListWidget;
-
-//=================================================================================
-// class    : ImportExportGUI_ExportXAODlg
-// purpose  :
-//=================================================================================
-class ImportExportGUI_ExportXAODlg: public GEOMBase_Skeleton
-{
-    Q_OBJECT
-
-public:
-    ImportExportGUI_ExportXAODlg(GeometryGUI*, QWidget* = 0);
-    ~ImportExportGUI_ExportXAODlg();
-
-protected:
-    // redefined from GEOMBase_Helper
-    virtual GEOM::GEOM_IOperations_ptr createOperation();
-    virtual bool isValid(QString&);
-    virtual bool execute();
-
-private:
-    void Init();
-    void enterEvent(QEvent*);
-    void processObject();
-
-private:
-    GEOM::GEOM_Object_var m_mainObj;
-    QList<GEOM::GeomObjPtr> m_groups;
-    QList<GEOM::GeomFieldPtr> m_fields;
-    QLineEdit* ledShape;
-    QLineEdit* ledFileName;
-    QLineEdit* ledAuthor;
-    QListWidget* lstGroups;
-    QListWidget* lstFields;
-    QPushButton* btnShapeSelect;
-    QPushButton* btnFileSelect;
-
-private slots:
-    void ClickOnOk();
-    bool ClickOnApply();
-    void ActivateThisDialog();
-    void SelectionIntoArgument();
-    void SetEditCurrentArgument();
-    void btnFileSelectClicked();
-};
-
-#endif // IMPORTEXPORTGUI_EXPORTXAODLG_H
diff --git a/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx b/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx
deleted file mode 100644 (file)
index 5272fa7..0000000
+++ /dev/null
@@ -1,350 +0,0 @@
-// 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, or (at your option) any 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 <DlgRef.h>
-#include <GeometryGUI.h>
-#include <GEOMBase.h>
-#include <GEOM_Field.hxx>
-
-#include <SUIT_Session.h>
-#include <SUIT_ResourceMgr.h>
-#include <SUIT_OverrideCursor.h>
-#include <SUIT_FileDlg.h>
-#include <SalomeApp_Application.h>
-#include <SalomeApp_Study.h>
-#include <LightApp_SelectionMgr.h>
-#include <SalomeApp_Tools.h>
-
-#include <QLabel>
-#include <QLineEdit>
-#include <QButtonGroup>
-#include <QListWidget>
-#include <QFileDialog>
-#include <QMap>
-
-// OCCT Includes
-#include <TopoDS_Shape.hxx>
-#include <TopoDS.hxx>
-#include <TopExp.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-
-#include <GEOMImpl_Types.hxx>
-#include "ImportExportGUI_ImportXAODlg.h"
-
-#include <SALOMEDS_wrap.hxx>
-
-//=================================================================================
-// Constructor
-//=================================================================================
-ImportExportGUI_ImportXAODlg::ImportExportGUI_ImportXAODlg(GeometryGUI* geometryGUI, QWidget* parent)
-:
-        GEOMBase_Skeleton(geometryGUI, parent, false)
-{
-    SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-    QPixmap imageOp(resMgr->loadPixmap("GEOM", tr("ICON_DLG_IMPORTXAO")));
-    QPixmap iconSelect(resMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
-
-    setWindowTitle(tr("GEOM_IMPORTXAO_TITLE"));
-
-    /***************************************************************/
-    mainFrame()->GroupConstructors->setTitle(tr("GEOM_IMPORTXAO_TITLE"));
-    mainFrame()->RadioButton1->setIcon(imageOp);
-    mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose);
-    mainFrame()->RadioButton2->close();
-    mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
-    mainFrame()->RadioButton3->close();
-
-    // hide name
-    mainFrame()->GroupBoxName->hide();
-
-    //****************************
-    // Selection Group box
-    QGroupBox* gbxExport = new QGroupBox(parent);
-
-    QGridLayout* gridLayoutExport = new QGridLayout(gbxExport);
-#ifndef Q_OS_MAC
-    gridLayoutExport->setSpacing(6);
-    gridLayoutExport->setContentsMargins(9, 9, 9, 9);
-#endif
-    gridLayoutExport->setObjectName(QString::fromUtf8("gridLayoutExport"));
-
-    int line = 0, col = 0;
-    QLabel* lblFileName = new QLabel(tr("GEOM_IMPORTXAO_FILENAME"), gbxExport);
-    btnFileSelect = new QPushButton(gbxExport);
-    ledFileName = new QLineEdit(gbxExport);
-    btnFileSelect->setText("...");
-
-    line++; col = 0;
-    gridLayoutExport->addWidget(lblFileName, line, col++, 1, 1);
-    gridLayoutExport->addWidget(btnFileSelect, line, col++, 1, 1);
-    gridLayoutExport->addWidget(ledFileName, line, col++, 1, 1);
-
-    //****************************
-    QVBoxLayout* layout = new QVBoxLayout(centralWidget());
-    layout->setMargin(0);
-    layout->setSpacing(6);
-    layout->addWidget(gbxExport);
-
-    // set help
-    setHelpFileName("xao_format_page.html");
-
-    Init();
-}
-
-//=================================================================================
-// Destructor
-//=================================================================================
-ImportExportGUI_ImportXAODlg::~ImportExportGUI_ImportXAODlg()
-{
-    // no need to delete child widgets, Qt does it all for us
-}
-
-//=================================================================================
-// function : Init()
-// purpose  :
-//=================================================================================
-void ImportExportGUI_ImportXAODlg::Init()
-{
-    // Signal/slot connections
-    connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
-    connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
-
-    connect(btnFileSelect, SIGNAL(clicked()), this, SLOT(btnFileSelectClicked()));
-
-    initName(tr("GEOM_IMPORTXAO"));
-    //SelectionIntoArgument();
-}
-
-//=================================================================================
-// function : ClickOnOk()
-// purpose  :
-//=================================================================================
-void ImportExportGUI_ImportXAODlg::ClickOnOk()
-{
-    setIsApplyAndClose(true);
-    if (ClickOnApply())
-        ClickOnCancel();
-    setIsApplyAndClose(false);
-}
-
-//=================================================================================
-// function : ClickOnApply()
-// purpose  :
-//=================================================================================
-bool ImportExportGUI_ImportXAODlg::ClickOnApply()
-{
-  if(!isApplyAndClose()) {
-    setIsDisableBrowsing( true );
-    setIsDisplayResult( false );
-  }
-
-  QString msg;
-  if ( !isValid( msg ) ) {
-    showError( msg );
-    return false;
-  }
-  SUIT_OverrideCursor wc;
-  SUIT_Session::session()->activeApplication()->putInfo( "" );
-
-  try {
-    if ( openCommand() )
-      if (!execute (/*isApplyAndClose()*/))
-      {
-        abortCommand();
-        showError();
-        return false;
-      }
-  }
-  catch( const SALOME::SALOME_Exception& e ) {
-    SalomeApp_Tools::QtCatchCorbaException( e );
-    abortCommand();
-    return false;
-  }
-  commitCommand();
-
-  if(!isApplyAndClose()) {
-    setIsDisableBrowsing( false );
-    setIsDisplayResult( true );
-  }
-
-  return true;
-}
-
-//=================================================================================
-// function : btnFileSelectClicked()
-// purpose  :
-//=================================================================================
-void ImportExportGUI_ImportXAODlg::btnFileSelectClicked()
-{
-  QString file = SUIT_FileDlg::getFileName(this, ledFileName->text(), 
-                                           tr("XAO_FILES"), 
-                                           tr("GEOM_SELECT_IMPORT_XAO"));
-  if ( !file.isEmpty() )
-    ledFileName->setText( file );
-}
-
-//=================================================================================
-// function : ActivateThisDialog()
-// purpose  :
-//=================================================================================
-void ImportExportGUI_ImportXAODlg::ActivateThisDialog()
-{
-    GEOMBase_Skeleton::ActivateThisDialog();
-}
-
-//=================================================================================
-// function : enterEvent [REDEFINED]
-// purpose  :
-//=================================================================================
-void ImportExportGUI_ImportXAODlg::enterEvent(QEvent*)
-{
-    if (!mainFrame()->GroupConstructors->isEnabled())
-        ActivateThisDialog();
-}
-
-//=================================================================================
-// function : createOperation
-// purpose  :
-//=================================================================================
-GEOM::GEOM_IOperations_ptr ImportExportGUI_ImportXAODlg::createOperation()
-{
-    return getGeomEngine()->GetIInsertOperations(getStudyId());
-}
-
-//=================================================================================
-// function : isValid
-// purpose  :
-//=================================================================================
-bool ImportExportGUI_ImportXAODlg::isValid(QString& msg)
-{
-    // check file name
-    if (ledFileName->text().isEmpty())
-        return false;
-
-    return true;
-}
-
-//=================================================================================
-// function : execute
-// purpose  :
-//=================================================================================
-bool ImportExportGUI_ImportXAODlg::execute()
-{
-    bool res = false;
-
-    QString fileName = ledFileName->text();
-    GEOM::GEOM_Object_var shape;
-    GEOM::ListOfGO_var groups, subShapes;
-    GEOM::ListOfFields_var fields;
-
-    GEOM::GEOM_IInsertOperations_var ieOp = GEOM::GEOM_IInsertOperations::_narrow(getOperation());
-    res = ieOp->ImportXAO(fileName.toUtf8().constData(), shape, subShapes, groups, fields);
-
-    if (!shape->_is_nil())
-    {
-        m_mainShape = shape;
-    }
-    else
-    {
-        m_mainShape = NULL;
-    }
-
-    if (m_mainShape != NULL)
-    {
-        QStringList anEntryList;
-        anEntryList << addInStudy(m_mainShape, m_mainShape->GetName());
-
-        for (int i = 0; i < subShapes->length(); i++)
-        {
-            addInStudy(subShapes[i].in(), subShapes[i]->GetName());
-        }
-        for (int i = 0; i < groups->length(); i++)
-        {
-            addInStudy(groups[i].in(), groups[i]->GetName());
-        }
-        for (int i = 0; i < fields->length(); i++)
-        {
-            addFieldInStudy(fields[i].in(), m_mainShape);
-        }
-
-        updateObjBrowser();
-        if( SUIT_Application* anApp = SUIT_Session::session()->activeApplication() ) {
-          LightApp_Application* aLightApp = dynamic_cast<LightApp_Application*>( anApp );
-          aLightApp->browseObjects( anEntryList );
-        }
-    }
-
-    return res;
-}
-
-QString ImportExportGUI_ImportXAODlg::addFieldInStudy( GEOM::GEOM_Field_ptr theField, GEOM::GEOM_Object_ptr theFather)
-{
-  if ( !hasCommand() )
-    return QString();
-
-  _PTR(Study) aStudy = getStudy()->studyDS();
-  if ( !aStudy || theField->_is_nil() )
-    return QString();
-
-  SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy(aStudy);
-
-  SALOMEDS::SObject_var aSO =
-    getGeomEngine()->AddInStudy(aStudyDS, theField, theField->GetName(), theFather);
-
-  QString anEntry;
-  if ( !aSO->_is_nil() ) {
-    CORBA::String_var entry = aSO->GetID();
-    anEntry = entry.in();
-  }
-
-  // add steps
-  GEOM::ListOfLong_var steps = theField->GetSteps();
-  for (int i = 0; i < steps->length(); ++i)
-  {
-    GEOM::GEOM_FieldStep_ptr step = theField->GetStep(steps[i]);
-    QString stepName = (tr("STEP") + " %1 %2").arg( step->GetID() ).arg( step->GetStamp() );
-    SALOMEDS::SObject_wrap aSOField =
-      getGeomEngine()->AddInStudy( aStudyDS, step, stepName.toLatin1().constData(), theField );
-  }
-
-  aSO->UnRegister();
-
-  return anEntry;
-}
-
-GEOM::GEOM_Object_ptr ImportExportGUI_ImportXAODlg::getFather(GEOM::GEOM_Object_ptr object)
-{
-    GEOM::GEOM_Object_var fatherObj;
-    if (object->GetType() != GEOM_IMPORT && m_mainShape != NULL)
-    {
-        //GEOM::GEOM_IGroupOperations_var groupOper = getGeomEngine()->GetIGroupOperations(getStudyId());
-        //fatherObj = groupOper->GetMainShape(object);
-        fatherObj = m_mainShape;
-    }
-    return fatherObj._retn();
-}
-
-QString ImportExportGUI_ImportXAODlg::getObjectName(GEOM::GEOM_Object_ptr object) const
-{
-    if (object->_is_nil())
-        return QString::null;
-    return object->GetName();
-}
-
diff --git a/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.h b/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.h
deleted file mode 100644 (file)
index d241ace..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-// 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, or (at your option) any 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 IMPORTEXPORTGUI_IMPORTXAODLG_H
-#define IMPORTEXPORTGUI_IMPORTXAODLG_H
-
-#include <GEOMBase_Skeleton.h>
-#include <GEOM_GenericObjPtr.h>
-
-class QLineEdit;
-class QButtonGroup;
-class QListWidget;
-
-//=================================================================================
-// class    : ImportExportGUI_ImportXAODlg
-// purpose  :
-//=================================================================================
-class ImportExportGUI_ImportXAODlg: public GEOMBase_Skeleton
-{
-    Q_OBJECT
-
-public:
-    ImportExportGUI_ImportXAODlg(GeometryGUI*, QWidget* = 0);
-    ~ImportExportGUI_ImportXAODlg();
-
-protected:
-    // redefined from GEOMBase_Helper
-    virtual GEOM::GEOM_IOperations_ptr createOperation();
-    virtual bool isValid(QString&);
-    virtual bool execute();
-    virtual GEOM::GEOM_Object_ptr getFather(GEOM::GEOM_Object_ptr object);
-    virtual QString getObjectName(GEOM::GEOM_Object_ptr object) const;
-    virtual QString addFieldInStudy( GEOM::GEOM_Field_ptr theField, GEOM::GEOM_Object_ptr theFather );
-
-private:
-    void Init();
-    void enterEvent(QEvent*);
-
-private:
-    QLineEdit* ledFileName;
-    QPushButton* btnFileSelect;
-    GEOM::GEOM_Object_var m_mainShape;
-
-private slots:
-    void ClickOnOk();
-    bool ClickOnApply();
-    void ActivateThisDialog();
-//  void LineEditReturnPressed();
-    void btnFileSelectClicked();
-};
-
-#endif // IMPORTEXPORTGUI_EXPORTXAODLG_H
index 462eed0c24c5187b9046e1cac56ad8eae2ed0026..f75b7a6b7a0bfbeff1d0b86834be9c862071656e 100644 (file)
@@ -34,6 +34,8 @@
 #include "SALOME_InteractiveObject.hxx"
 #include "GEOM_AISVector.hxx"
 
+#include <Basics_OCCTVersion.hxx>
+
 // Open CASCADE Includes
 #include <AIS_Drawer.hxx>
 #include <AIS_InteractiveContext.hxx>
@@ -53,6 +55,9 @@
 #include <Prs3d_ShadingAspect.hxx>
 #include <Prs3d_Arrow.hxx>
 #include <Prs3d_IsoAspect.hxx>
+#if OCC_VERSION_LARGE > 0x06070200
+#include <Prs3d_VertexDrawMode.hxx>
+#endif
 
 #include <SelectBasics_SensitiveEntity.hxx>
 #include <SelectMgr_EntityOwner.hxx>
@@ -148,6 +153,7 @@ GEOM_AISShape::GEOM_AISShape(const TopoDS_Shape& shape,
   : SALOME_AISShape(shape),
     myName(aName),
     myDisplayVectors(false),
+    myDisplayVertices(false),
     myFieldDataType(GEOM::FDT_Double),
     myFieldDimension(0),
     myFieldStepRangeMin(0),
@@ -210,11 +216,20 @@ void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresent
   if (IsInfinite()) aPrs->SetInfiniteState(Standard_True); //pas de prise en compte lors du FITALL
 
   Handle(AIS_InteractiveContext) anIC = GetContext();
+  // AKL: use old behavior to avoid keeping object's wireframe
+  //      if to change shape properties (for example: 'Clear Top Level State','Color', 'Isos') 
+  //      calling popup menu over(!) the shape in OCC viewer.
+  anIC->SetToHilightSelected( false );
 
   bool anIsField = !myFieldStepData.isEmpty();
   bool anIsColorField = anIsField && myFieldDataType != GEOM::FDT_String;
   bool anIsTextField = anIsField && myFieldDataType == GEOM::FDT_String;
 
+#if OCC_VERSION_LARGE > 0x06070200
+  if (isShowVertices())
+    myDrawer->SetVertexDrawMode(Prs3d_VDM_All);
+#endif
+
   //   StdSelect_DisplayMode d = (StdSelect_DisplayMode) aMode;
   bool isTopLev = isTopLevel() && switchTopLevel();
   switch (aMode) {
@@ -359,6 +374,11 @@ void GEOM_AISShape::SetDisplayVectors(bool isDisplayed)
   myDisplayVectors = isDisplayed;
 }
 
+void GEOM_AISShape::SetDisplayVertices(bool isDisplayed)
+{
+  myDisplayVertices = isDisplayed;
+}
+
 void GEOM_AISShape::shadingMode(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
                                 const Handle(Prs3d_Presentation)& aPrs,
                                 const Standard_Integer aMode)
@@ -437,11 +457,11 @@ void GEOM_AISShape::setTopLevelDisplayMode(const GEOM_AISShape::TopLevelDispMode
 }
 
 Standard_Boolean GEOM_AISShape::switchTopLevel() {
-        return myTopLevelDm != TopShowAdditionalWActor;
+  return myTopLevelDm != TopShowAdditionalWActor;
 }
 
 Standard_Boolean GEOM_AISShape::toActivate() {
-        return Standard_True;
+  return ( myTopLevel && myTopLevelDm == TopShowAdditionalWActor ) ? false : true;
 }
 
 void GEOM_AISShape::setFieldStepInfo( const GEOM::field_data_type theFieldDataType,
index d744a791af5a7d1df8c0969edfd5177375f2c496..8a60ba952f059b78a70214971723020374f06b01 100644 (file)
@@ -124,12 +124,14 @@ public:
         void SetShadingColor(const Quantity_Color &aCol);
         void SetEdgesInShadingColor(const Quantity_Color &aCol);
         void SetDisplayVectors(bool isShow);
+        void SetDisplayVertices(bool isShow);
 
         virtual  void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
                                       const Handle(Prs3d_Presentation)& aPresentation,
                                       const Standard_Integer aMode = 0) ;
 
         virtual  bool isShowVectors () { return myDisplayVectors; }
+        virtual  bool isShowVertices () { return myDisplayVertices; }
                 virtual  Standard_Boolean switchTopLevel();
                 virtual  Standard_Boolean toActivate();
         
@@ -182,6 +184,7 @@ protected:
 private: 
   TCollection_AsciiString  myName;
   bool                     myDisplayVectors;
+  bool                     myDisplayVertices;
   Standard_Boolean         myTopLevel;
   Standard_Integer         myPrevDisplayMode;
 
index 47bc66b176d03b06d2c5c4c9ef2ea03f7a16e4fb..1b15c5640c22aff2c3c818de23fec8276ea4c033 100644 (file)
@@ -82,10 +82,14 @@ GEOM_Actor::GEOM_Actor():
   //  myDisplayMode(eWireframe), 
   myIsSelected(false), 
   myVectorMode(false),
+  myVerticesMode(false),
 
   myVertexActor(GEOM_DeviceActor::New(),true), 
   myVertexSource(GEOM_VertexSource::New(),true), 
  
+  myStandaloneVertexActor(GEOM_DeviceActor::New(),true), 
+  myStandaloneVertexSource(GEOM_VertexSource::New(),true), 
+
   myIsolatedEdgeActor(GEOM_DeviceActor::New(),true), 
   myIsolatedEdgeSource(GEOM_EdgeSource::New(),true), 
  
@@ -129,13 +133,13 @@ GEOM_Actor::GEOM_Actor():
   myHighlightProp->SetAmbientColor(1, 1, 1);
   myHighlightProp->SetDiffuseColor(1, 1, 1);
   myHighlightProp->SetSpecularColor(0.5, 0.5, 0.5);
-  myHighlightProp->SetPointSize(SALOME_POINT_SIZE);
+  myHighlightProp->SetPointSize(SALOME_POINT_SIZE+2);
   myHighlightActor->SetProperty(myHighlightProp.GetPointer());
 
   this->myHighlightActor->SetInput(myAppendFilter->GetOutputPort(),false);
 
   myPreHighlightProp->SetColor(0,1,1);
-  myPreHighlightProp->SetPointSize(SALOME_POINT_SIZE+2);
+  myPreHighlightProp->SetPointSize(SALOME_POINT_SIZE);
   myPreHighlightProp->SetLineWidth(SALOME_LINE_WIDTH+1);
   myPreHighlightProp->SetRepresentationToWireframe();
 
@@ -146,6 +150,13 @@ GEOM_Actor::GEOM_Actor():
   aProperty->SetPointSize(3); 
   aProperty->SetColor(1, 1, 0);
  
+  myAppendFilter->AddInputConnection(myStandaloneVertexSource->GetOutputPort()); 
+  myStandaloneVertexActor->SetInput(myStandaloneVertexSource->GetOutputPort(),false); 
+  aProperty = myStandaloneVertexActor->GetProperty(); 
+  aProperty->SetRepresentation(VTK_POINTS); 
+  aProperty->SetPointSize(3); 
+  aProperty->SetColor(1, 1, 0);
   myAppendFilter->AddInputConnection(myIsolatedEdgeSource->GetOutputPort());
   myIsolatedEdgeActor->SetInput(myIsolatedEdgeSource->GetOutputPort(),false); 
   aProperty = myIsolatedEdgeActor->GetProperty(); 
@@ -189,6 +200,7 @@ GEOM_Actor::GEOM_Actor():
   // Toggle display mode 
   setDisplayMode(0); // WIRE FRAME
   SetVectorMode(0);  //
+  SetVerticesMode(0);  //
 } 
  
  
@@ -227,6 +239,7 @@ GEOM_Actor::
 SetModified() 
 { 
   this->myVertexSource->Modified(); 
+  this->myStandaloneVertexSource->Modified(); 
   this->myIsolatedEdgeSource->Modified(); 
   this->myOneFaceEdgeSource->Modified(); 
   this->mySharedEdgeSource->Modified(); 
@@ -260,6 +273,7 @@ AddToRender(vtkRenderer* theRenderer)
   myIsolatedEdgeActor->AddToRender(theRenderer); 
  
   myVertexActor->AddToRender(theRenderer); 
+  myStandaloneVertexActor->AddToRender(theRenderer); 
 }
  
 void 
@@ -280,6 +294,7 @@ RemoveFromRender(vtkRenderer* theRenderer)
   myIsolatedEdgeActor->RemoveFromRender(theRenderer); 
  
   myVertexActor->RemoveFromRender(theRenderer);
+  myStandaloneVertexActor->RemoveFromRender(theRenderer);
 
   
   SetSelected(false);
@@ -355,7 +370,9 @@ SetVisibility(int theVisibility)
   myOneFaceEdgeActor->SetVisibility(theVisibility && (myDisplayMode == (int)eWireframe || myDisplayMode == (int)eShadingWithEdges) && !myIsSelected);
   myIsolatedEdgeActor->SetVisibility(theVisibility && !myIsSelected);
 
-  myVertexActor->SetVisibility(theVisibility && myDisplayMode == (int)eWireframe && !myIsSelected);// must be added new mode points
+  myVertexActor->SetVisibility(theVisibility && (isOnlyVertex || (myVerticesMode && (!myIsSelected && !myIsPreselected))));// must be added new mode points
+
+  myStandaloneVertexActor->SetVisibility(theVisibility);
 }
  
 
@@ -391,6 +408,26 @@ GEOM_Actor
   return myVectorMode;
 }
 
+void
+GEOM_Actor
+::SetVerticesMode(bool theMode)
+{
+  myVerticesMode = theMode;
+  if ( theMode || isOnlyVertex ) {
+    myAppendFilter->AddInputConnection(myVertexSource->GetOutputPort()); 
+  } else {
+    myAppendFilter->RemoveInputConnection(0, myVertexSource->GetOutputPort()); 
+  }
+  SetModified();
+}
+
+bool
+GEOM_Actor
+::GetVerticesMode()
+{
+  return myVerticesMode;
+}
+
 void  
 GEOM_Actor:: 
 SetDeflection(float theDeflection) 
@@ -412,6 +449,7 @@ void GEOM_Actor::SetShape (const TopoDS_Shape& theShape,
   myShape = theShape;
 
   myVertexSource->Clear();
+  myStandaloneVertexSource->Clear();
   myIsolatedEdgeSource->Clear();
   myOneFaceEdgeSource->Clear();
   mySharedEdgeSource->Clear();
@@ -432,6 +470,7 @@ void GEOM_Actor::SetShape (const TopoDS_Shape& theShape,
   TopExp::MapShapesAndAncestors(theShape,TopAbs_EDGE,TopAbs_FACE,anEdgeMap);
   
   GEOM::SetShape(theShape,anEdgeMap,theIsVector,
+                 myStandaloneVertexSource.Get(),
                  myIsolatedEdgeSource.Get(),
                  myOneFaceEdgeSource.Get(),
                  mySharedEdgeSource.Get(),
@@ -447,6 +486,7 @@ void GEOM_Actor::SetShape (const TopoDS_Shape& theShape,
   
   if((bool)myShape.Infinite() || isOnlyVertex ){
     myVertexActor->GetDeviceActor()->SetInfinitive(true);
+    myStandaloneVertexActor->GetDeviceActor()->SetInfinitive(true);
     myHighlightActor->GetDeviceActor()->SetInfinitive(true);
   }
 
@@ -502,6 +542,11 @@ vtkProperty* GEOM_Actor::GetVertexProperty()
   return myVertexActor->GetProperty();
 }
 
+vtkProperty* GEOM_Actor::GetStandaloneVertexProperty()
+{
+  return myStandaloneVertexActor->GetProperty();
+}
+
 vtkProperty* GEOM_Actor::GetSharedEdgeProperty()
 {
   return mySharedEdgeActor->GetProperty();
@@ -691,6 +736,7 @@ void GEOM_Actor::SetOpacity(double opa)
   myHighlightProp->SetOpacity(opa);
   myPreHighlightProp->SetOpacity(opa);
   myVertexActor->GetProperty()->SetOpacity(opa);
+  myStandaloneVertexActor->GetProperty()->SetOpacity(opa);
 }
 
 double GEOM_Actor::GetOpacity()
@@ -731,6 +777,7 @@ void GEOM_Actor::GetColor(double& r,double& g,double& b)
 void GEOM_Actor::SetPointColor(double r,  double g,  double b)
 {
   myVertexActor->GetProperty()->SetColor(r, g, b);
+  myStandaloneVertexActor->GetProperty()->SetColor(r, g, b);
 }
 
 /*!
@@ -794,6 +841,7 @@ void GEOM_Actor::SetMaterial(std::vector<vtkProperty*> theProps)
   aCoefnt = theProps[0]->GetAmbient();
   myShadingFaceProp->SetAmbient(aCoefnt);
   myVertexActor->GetProperty()->SetAmbient(aCoefnt);
+  myStandaloneVertexActor->GetProperty()->SetAmbient(aCoefnt);
   if ( aSize == 2 )
     aCoefnt = theProps[1]->GetAmbient();
   myShadingBackFaceProp->SetAmbient(aCoefnt);
@@ -802,6 +850,7 @@ void GEOM_Actor::SetMaterial(std::vector<vtkProperty*> theProps)
   aCoefnt = theProps[0]->GetDiffuse();
   myShadingFaceProp->SetDiffuse(aCoefnt);
   myVertexActor->GetProperty()->SetDiffuse(aCoefnt);
+  myStandaloneVertexActor->GetProperty()->SetDiffuse(aCoefnt);
   if ( aSize == 2 )
     aCoefnt = theProps[1]->GetDiffuse();
   myShadingBackFaceProp->SetDiffuse(aCoefnt);
@@ -810,6 +859,7 @@ void GEOM_Actor::SetMaterial(std::vector<vtkProperty*> theProps)
   aCoefnt = theProps[0]->GetSpecular();
   myShadingFaceProp->SetSpecular(aCoefnt);
   myVertexActor->GetProperty()->SetSpecular(aCoefnt);
+  myStandaloneVertexActor->GetProperty()->SetSpecular(aCoefnt);
   if ( aSize == 2 )
     aCoefnt = theProps[1]->GetSpecular();
   myShadingBackFaceProp->SetSpecular(aCoefnt);
@@ -821,6 +871,7 @@ void GEOM_Actor::SetMaterial(std::vector<vtkProperty*> theProps)
   aColor = theProps[0]->GetAmbientColor();
   myShadingFaceProp->SetAmbientColor(aColor[0], aColor[1], aColor[2]);
   myVertexActor->GetProperty()->SetAmbientColor(aColor[0], aColor[1], aColor[2]);
+  myStandaloneVertexActor->GetProperty()->SetAmbientColor(aColor[0], aColor[1], aColor[2]);
   if ( aSize == 2 )
     aColor = theProps[1]->GetAmbientColor();
   myShadingBackFaceProp->SetAmbientColor(aColor[0], aColor[1], aColor[2]);
@@ -829,6 +880,7 @@ void GEOM_Actor::SetMaterial(std::vector<vtkProperty*> theProps)
   aColor = theProps[0]->GetDiffuseColor();
   myShadingFaceProp->SetDiffuseColor(aColor[0], aColor[1], aColor[2]);
   myVertexActor->GetProperty()->SetDiffuseColor(aColor[0], aColor[1], aColor[2]);
+  myStandaloneVertexActor->GetProperty()->SetDiffuseColor(aColor[0], aColor[1], aColor[2]);
   if ( aSize == 2 )
     aColor = theProps[1]->GetDiffuseColor();
   myShadingBackFaceProp->SetDiffuseColor(aColor[0], aColor[1], aColor[2]);
@@ -837,6 +889,7 @@ void GEOM_Actor::SetMaterial(std::vector<vtkProperty*> theProps)
   aColor = theProps[0]->GetSpecularColor();
   myShadingFaceProp->SetSpecularColor(aColor[0], aColor[1], aColor[2]);
   myVertexActor->GetProperty()->SetSpecularColor(aColor[0], aColor[1], aColor[2]);
+  myStandaloneVertexActor->GetProperty()->SetSpecularColor(aColor[0], aColor[1], aColor[2]);
   if ( aSize == 2 )
     aColor = theProps[1]->GetSpecularColor();
   myShadingBackFaceProp->SetSpecularColor(aColor[0], aColor[1], aColor[2]);
@@ -845,6 +898,7 @@ void GEOM_Actor::SetMaterial(std::vector<vtkProperty*> theProps)
   aCoefnt = theProps[0]->GetSpecularPower();
   myShadingFaceProp->SetSpecularPower(aCoefnt);
   myVertexActor->GetProperty()->SetSpecularPower(aCoefnt);
+  myStandaloneVertexActor->GetProperty()->SetSpecularPower(aCoefnt);
   if ( aSize == 2 )
     aCoefnt = theProps[1]->GetSpecularPower();
   myShadingBackFaceProp->SetSpecularPower(aCoefnt);
index fa7193a0f4b2c9ccf54f19900cad11eaa6727705..117f1afcb378cfc7424a9a3c8bc935d2f2fcfed1 100644 (file)
@@ -89,6 +89,7 @@ public:
   vtkProperty* GetShadingProperty();
   vtkProperty* GetIsolatedEdgeProperty();
   vtkProperty* GetVertexProperty();
+  vtkProperty* GetStandaloneVertexProperty();
   vtkProperty* GetSharedEdgeProperty();
   vtkProperty* GetFaceEdgeProperty();
 
@@ -202,6 +203,15 @@ public:
   bool
   GetVectorMode();
 
+  //! Vertices mode management
+  virtual
+  void
+  SetVerticesMode(const bool theMode);
+
+  virtual
+  bool
+  GetVerticesMode();
+
 protected:
   void SetModified();
 
@@ -220,10 +230,14 @@ private:
   //  EDisplayMode myDisplayMode;
   bool myIsSelected;
   bool myVectorMode;
+  bool myVerticesMode;
 
   PDeviceActor myVertexActor;
   PVertexSource myVertexSource;
 
+  PDeviceActor myStandaloneVertexActor;
+  PVertexSource myStandaloneVertexSource;
+
   PDeviceActor myIsolatedEdgeActor;
   PEdgeSource myIsolatedEdgeSource;
 
index 7790adcba69a284b6afbd9d9ffe5477973c83337..0ccf2ed1ca9ed4fc3912032b7b4db6b7cc2a723a 100644 (file)
@@ -69,6 +69,8 @@ namespace GEOM
       "Color",           // COLOR_PROP
       // "show edges direction" flag
       "VectorMode",      // VECTOR_MODE_PROP
+      // "show vertices" flag
+      "VerticesMode",    // VERTICES_MODE_PROP
       // deflection coefficient
       "DeflectionCoeff", // DEFLECTION_COEFF_PROP
       // point marker data
index 17f65eb361d943a5081c3e5ecd77f7e22c4224e8..e314735f800ee042eaadafa3d7217d89868bb183 100644 (file)
@@ -39,6 +39,7 @@ namespace GEOM
     NbIsos,
     Color,
     EdgesDirection,
+    Vertices,
     Deflection,
     PointMarker,
     Material,
index 02e81bdf1a3ce4c3db526ee9ca9659bc2f77710c..61e7208b3c576e1dd1b038b6d7a792681282bf4d 100644 (file)
@@ -213,7 +213,7 @@ void GEOM_OCCReader::createISO (const TopoDS_Face      &TopologicalFace,
                                       vtkPoints        *Pts,
                                       vtkCellArray     *Cell)
 {
-  GEOMUtils_Hatcher aHatcher(TopologicalFace);
+  GEOMUtils::Hatcher aHatcher(TopologicalFace);
 
   aHatcher.Init(NbIsos);
   aHatcher.Perform();
@@ -231,7 +231,7 @@ void GEOM_OCCReader::createISO (const TopoDS_Face      &TopologicalFace,
 // Function : createIsos
 // Purpose  : Create isolines obtained from hatcher.
 //=======================================================================
-void GEOM_OCCReader::createIsos(const GEOMUtils_Hatcher &theHatcher,
+void GEOM_OCCReader::createIsos(const GEOMUtils::Hatcher &theHatcher,
                                 const Standard_Boolean   IsUIso,
                                       Standard_Integer  &pt_start_idx,
                                       vtkPoints         *Pts,
index ed47445a75b5e7a469ed5d7cb3770007cf4c9bbf..63b622fb8a4494733d8dc82fbd5814cdaebd1a9e 100644 (file)
 
 class vtkPoints;
 class vtkCellArray;
-class GEOMUtils_Hatcher;
+namespace GEOMUtils
+{
+  class Hatcher;
+}
 
 // OpenCASCADE
 #include <TopoDS_Edge.hxx>
@@ -100,12 +103,12 @@ class GEOM_OBJECT_EXPORT GEOM_OCCReader : public vtkAlgorithm {
                  vtkPoints* Pts,
                  vtkCellArray* Cells);
 
-  void createIsos(const GEOMUtils_Hatcher &theHatcher,
+  void createIsos(const GEOMUtils::Hatcher &theHatcher,
                   const Standard_Boolean   IsUIso,
-                        Standard_Integer  &pt_start_idx,
-                        vtkPoints         *Pts,
-                        vtkCellArray      *Cell);
-
+                 Standard_Integer  &pt_start_idx,
+                 vtkPoints         *Pts,
+                 vtkCellArray      *Cell);
+  
   void DrawIso(GeomAbs_IsoType aType,
                Standard_Real PParm,
                Standard_Real p1,
index 0cec60e0d91fbc17cf8f0e0b3086091dc76aef3a..2a2101fff01769492e1d10c4fb08dd3f842d202a 100755 (executable)
 #include <TopoDS_Shape.hxx>
 #include <Prs3d_IsoAspect.hxx>
 
-GEOM_TopWireframeShape::GEOM_TopWireframeShape(const TopoDS_Shape& shape)
-  : SALOME_AISShape(shape)
+GEOM_TopWireframeShape::GEOM_TopWireframeShape( const TopoDS_Shape& shape )
+  :SALOME_AISShape(shape)
 {
-      SetDisplayMode(AIS_WireFrame);                    
-          Handle(Prs3d_IsoAspect) anAspect = Attributes()->UIsoAspect();
-          anAspect->SetNumber( 0 );
-          Attributes()->SetUIsoAspect( anAspect );
-          anAspect = Attributes()->VIsoAspect();
-          anAspect->SetNumber( 0 );
-          Attributes()->SetVIsoAspect( anAspect ); 
-      SetColor(GEOM_AISShape::topLevelColor());
+  SetDisplayMode( AIS_WireFrame );
+  Handle(Prs3d_IsoAspect) anAspect = Attributes()->UIsoAspect();
+  anAspect->SetNumber( 0 );
+  Attributes()->SetUIsoAspect( anAspect );
+  anAspect = Attributes()->VIsoAspect();
+  anAspect->SetNumber( 0 );
+  Attributes()->SetVIsoAspect( anAspect );
+  SetColor( GEOM_AISShape::topLevelColor() );
 }
 
 GEOM_TopWireframeShape::~GEOM_TopWireframeShape()
 {
 }
 
-Handle(SALOME_InteractiveObject) GEOM_TopWireframeShape::getIO(){
+Handle(SALOME_InteractiveObject) GEOM_TopWireframeShape::getIO()
+{
   Handle(SALOME_InteractiveObject) IO;
   if ( !GetOwner().IsNull() )
     IO = Handle(SALOME_InteractiveObject)::DownCast( GetOwner() );
   return IO;
 }
 
-Standard_Boolean GEOM_TopWireframeShape::hasIO(){
+Standard_Boolean GEOM_TopWireframeShape::hasIO()
+{
   return !getIO().IsNull();
 }
 
-void GEOM_TopWireframeShape::setName(const Standard_CString /*aName*/)
+void GEOM_TopWireframeShape::setName( const Standard_CString /*aName*/ )
 {
 }
 
-Standard_CString GEOM_TopWireframeShape::getName(){
+Standard_CString GEOM_TopWireframeShape::getName()
+{
   return "";
 }
 
 
-void GEOM_TopWireframeShape::highlightSubShapes(const TColStd_IndexedMapOfInteger& /*aIndexMap*/, 
-                                       const Standard_Boolean /*aHighlight*/ )
+void GEOM_TopWireframeShape::highlightSubShapes( const TColStd_IndexedMapOfInteger& /*aIndexMap*/,
+                                                 const Standard_Boolean /*aHighlight*/ )
 {
 }
 
-Standard_Boolean GEOM_TopWireframeShape::isTopLevel() {
+Standard_Boolean GEOM_TopWireframeShape::isTopLevel()
+{
   return Standard_True;
 }
 
-void GEOM_TopWireframeShape::setTopLevel(Standard_Boolean /*f*/) {
-
+void GEOM_TopWireframeShape::setTopLevel( Standard_Boolean /*f*/ )
+{
 }
 
-Standard_Boolean GEOM_TopWireframeShape::toActivate() {
-        return Standard_False;
+Standard_Boolean GEOM_TopWireframeShape::toActivate()
+{
+  return Standard_True;
 }
 
-Standard_Boolean GEOM_TopWireframeShape::switchTopLevel() {
-        return Standard_True;
+Standard_Boolean GEOM_TopWireframeShape::switchTopLevel()
+{
+  return Standard_True;
 }
 
-void GEOM_TopWireframeShape::setIO(const Handle(SALOME_InteractiveObject)& io){
+void GEOM_TopWireframeShape::setIO( const Handle(SALOME_InteractiveObject)& io )
+{
   SetOwner( io );
 }
index 4627f7a48c4eacb4ac01e4fb804523d6eb107369..68d507657a14a697fc82a6a81785433ea699637e 100755 (executable)
@@ -1,4 +1,4 @@
-#include <TopTools_ShapeMapHasher.hxx>// Copyright (C) 2007-2014  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
index 8c94300f5247a473796c8eb6423c1f40b851bb16..f9d31608ee640171aa0abecf2afb9a51425b8e09 100755 (executable)
@@ -109,7 +109,7 @@ CreateIso(const TopoDS_Face& theFace,
           vtkPolyData* thePolyData,
           vtkPoints* thePts)
 {
-  GEOMUtils_Hatcher aHatcher(theFace);
+  GEOMUtils::Hatcher aHatcher(theFace);
 
   aHatcher.Init(theNbIso[0], theNbIso[1]);
   aHatcher.Perform();
@@ -125,11 +125,11 @@ CreateIso(const TopoDS_Face& theFace,
 
 void
 GEOM_WireframeFace::
-CreateIso(const GEOMUtils_Hatcher &theHatcher,
+CreateIso(const GEOMUtils::Hatcher &theHatcher,
           const Standard_Boolean   IsUIso,
           const int                theDiscret,
-          vtkPolyData       *thePolyData,
-          vtkPoints         *thePts)
+          vtkPolyData              *thePolyData,
+          vtkPoints                *thePts)
 {
   Handle(TColStd_HArray1OfInteger) anIndices;
   Handle(TColStd_HArray1OfReal)    aParams;
index 27947dd20ac3fcbb8f1a00e15276cb82f06e67eb..c4dcbc96b4834de7dc92a3e0bb7181b9a1cbeee7 100755 (executable)
 #include <BRepAdaptor_Surface.hxx>
  
 class vtkPolyData;
-class GEOMUtils_Hatcher;
+
+namespace GEOMUtils
+{
+  class Hatcher;
+}
 
 class OCC2VTK_EXPORT GEOM_WireframeFace: public GEOM_FaceSource 
 { 
@@ -67,11 +71,11 @@ protected:
 
   static
   void
-  CreateIso(const GEOMUtils_Hatcher &theHatcher,
-            const Standard_Boolean   IsUIso,
-            const int                theDiscret,
-                  vtkPolyData       *thePolyData,
-                  vtkPoints         *thePts);
+    CreateIso(const GEOMUtils::Hatcher &theHatcher,
+             const Standard_Boolean   IsUIso,
+             const int                theDiscret,
+             vtkPolyData              *thePolyData,
+             vtkPoints                *thePts);
 
   static  
   void 
index 8e325c88700f02a1e4fce053af5529ec4f7b8bce..e9b592035f70bb0d5e05d95d022dc54e8687c536 100755 (executable)
@@ -88,6 +88,7 @@ namespace GEOM
   void SetShape(const TopoDS_Shape& theShape,
                 const TopTools_IndexedDataMapOfShapeListOfShape& theEdgeMap,
                 bool theIsVector,
+                GEOM_VertexSource* theStandaloneVertexSource,
                 GEOM_EdgeSource* theIsolatedEdgeSource,
                 GEOM_EdgeSource* theOneFaceEdgeSource,
                 GEOM_EdgeSource* theSharedEdgeSource,
@@ -98,6 +99,7 @@ namespace GEOM
       TopoDS_Iterator anItr(theShape);
       for (; anItr.More(); anItr.Next()) {
         SetShape(anItr.Value(),theEdgeMap,theIsVector,
+                 theStandaloneVertexSource,
                  theIsolatedEdgeSource,
                  theOneFaceEdgeSource,
                  theSharedEdgeSource,
@@ -123,6 +125,10 @@ namespace GEOM
         break;
       }
       case TopAbs_VERTEX: {
+        if ( theStandaloneVertexSource ) {
+          const TopoDS_Vertex& aVertex = TopoDS::Vertex(theShape);
+          theStandaloneVertexSource->AddVertex(aVertex);
+        }
         break;
       }
       default: {
index c4fb478c6cca4fb5c073020115fc4d56392c1631..523ca14b945ffa3724dc6ad271cc3e7243f4730f 100755 (executable)
@@ -25,6 +25,7 @@
 #include <TopoDS_Shape.hxx>
 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
 
+class GEOM_VertexSource;
 class GEOM_EdgeSource;
 class GEOM_WireframeFace;
 class GEOM_ShadingFace;
@@ -40,6 +41,7 @@ namespace GEOM
   OCC2VTK_EXPORT void SetShape(const TopoDS_Shape& theShape,
                                const TopTools_IndexedDataMapOfShapeListOfShape& theEdgeMap,
                                bool theIsVector,
+                               GEOM_VertexSource* theStandaloneVertexSource,
                                GEOM_EdgeSource* theIsolatedEdgeSource,
                                GEOM_EdgeSource* theOneFaceEdgeSource,
                                GEOM_EdgeSource* theSharedEdgeSource,
index e27701c60b6598f9211bf500168b548c85b1935b..66333aa2466c12b9064fe82ffea0c274c04502a6 100644 (file)
@@ -70,19 +70,25 @@ PrimitiveGUI_CylinderDlg::PrimitiveGUI_CylinderDlg (GeometryGUI* theGeometryGUI,
   mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
   mainFrame()->RadioButton3->close();
 
-  GroupPoints = new DlgRef_2Sel2Spin(centralWidget());
+  GroupPoints = new DlgRef_2Sel3Spin1Check(centralWidget());
   GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
   GroupPoints->TextLabel1->setText(tr("GEOM_BASE_POINT"));
   GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR"));
   GroupPoints->TextLabel3->setText(tr("GEOM_RADIUS"));
   GroupPoints->TextLabel4->setText(tr("GEOM_HEIGHT"));
+  GroupPoints->TextLabel5->setText(tr("GEOM_ANGLE"));
+  GroupPoints->checkBox->setText(tr(""));
   GroupPoints->PushButton1->setIcon(image2);
   GroupPoints->PushButton2->setIcon(image2);
+  GroupPoints->SpinBox_DZ->setDisabled(true);
 
-  GroupDimensions = new DlgRef_2Spin(centralWidget());
+  GroupDimensions = new DlgRef_3Spin1CheckCyl(centralWidget());
   GroupDimensions->GroupBox1->setTitle(tr("GEOM_BOX_OBJ"));
   GroupDimensions->TextLabel1->setText(tr("GEOM_RADIUS"));
   GroupDimensions->TextLabel2->setText(tr("GEOM_HEIGHT"));
+  GroupDimensions->TextLabel3->setText(tr("GEOM_ANGLE"));
+  GroupDimensions->checkBox->setText(tr(""));
+  GroupDimensions->SpinBox_DZ->setDisabled(true);
 
   QVBoxLayout* layout = new QVBoxLayout(centralWidget());
   layout->setMargin(0); layout->setSpacing(6);
@@ -115,10 +121,14 @@ void PrimitiveGUI_CylinderDlg::Init()
   double step = resMgr->doubleValue("Geometry", "SettingsGeomStep", 100);
 
   // min, max, step and decimals for spin boxes & initial values
+  double SpecificStep = 5;
   initSpinBox(GroupPoints->SpinBox_DX, 0.00001, COORD_MAX, step, "length_precision" );
   initSpinBox(GroupPoints->SpinBox_DY, 0.00001, COORD_MAX, step, "length_precision" );
+  initSpinBox(GroupPoints->SpinBox_DZ, 0., 360., SpecificStep, "angle_precision" );
+
   initSpinBox(GroupDimensions->SpinBox_DX, 0.00001, COORD_MAX, step, "length_precision" );
   initSpinBox(GroupDimensions->SpinBox_DY, 0.00001, COORD_MAX, step, "length_precision" );
+  initSpinBox(GroupDimensions->SpinBox_DZ, 0., 360., SpecificStep, "angle_precision" );
 
   // init variables
   myEditCurrentArgument = GroupPoints->LineEdit1;
@@ -130,11 +140,13 @@ void PrimitiveGUI_CylinderDlg::Init()
   myPoint.nullify();
   myDir.nullify();
 
-  double aRadius(100.0), aHeight(300.0);
+  double aRadius(100.0), aHeight(300.0), aAngle(270.);
   GroupPoints->SpinBox_DX->setValue(aRadius);
   GroupPoints->SpinBox_DY->setValue(aHeight);
+  GroupPoints->SpinBox_DZ->setValue(aAngle);
   GroupDimensions->SpinBox_DX->setValue(aRadius);
   GroupDimensions->SpinBox_DY->setValue(aHeight);
+  GroupDimensions->SpinBox_DZ->setValue(aAngle);
 
   // signals and slots connections
   connect(buttonOk(),    SIGNAL(clicked()), this, SLOT(ClickOnOk()));
@@ -147,11 +159,16 @@ void PrimitiveGUI_CylinderDlg::Init()
 
   connect(GroupPoints->SpinBox_DX,     SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
   connect(GroupPoints->SpinBox_DY,     SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
+  connect(GroupPoints->SpinBox_DZ,     SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
   connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
   connect(GroupDimensions->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
+  connect(GroupDimensions->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
 
   connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), this, SLOT(SetDoubleSpinBoxStep(double)));
-
+  
+  connect(GroupPoints->checkBox,     SIGNAL(toggled(bool)), this, SLOT(ActivateAngle()));
+  connect(GroupDimensions->checkBox, SIGNAL(toggled(bool)), this, SLOT(ActivateAngle()));
+  
   initName(tr("GEOM_CYLINDER"));
 
   setConstructorId(1); // simplest constructor
@@ -201,7 +218,7 @@ void PrimitiveGUI_CylinderDlg::ConstructorsClicked (int constructorId)
   updateGeometry();
   resize(minimumSizeHint());
   SelectionIntoArgument();
-
+  
   displayPreview(true);
 }
 
@@ -281,7 +298,6 @@ void PrimitiveGUI_CylinderDlg::SelectionIntoArgument()
               this, SLOT(SelectionIntoArgument()));
     }
   }
-
   displayPreview(true);
 }
 
@@ -355,6 +371,11 @@ void PrimitiveGUI_CylinderDlg::enterEvent (QEvent*)
 //=================================================================================
 void PrimitiveGUI_CylinderDlg::ValueChangedInSpinBox()
 {
+  QString msg;
+  if (!isValid(msg)) {
+    erasePreview();
+    return;
+  }
   displayPreview(true);
 }
 
@@ -378,14 +399,27 @@ bool PrimitiveGUI_CylinderDlg::isValid (QString& msg)
   {
     ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() ) &&
          GroupPoints->SpinBox_DY->isValid( msg, !IsPreview() ) &&
+         ( !GroupPoints->checkBox->isChecked() || GroupPoints->SpinBox_DZ->isValid( msg, !IsPreview() ) ) &&
          myPoint && myDir;
+    if ( GroupPoints->checkBox->isChecked() && 
+        ( GroupPoints->SpinBox_DZ->value() <= 0. || GroupPoints->SpinBox_DZ->value() >= 360. ) ) {
+      msg += tr("GEOM_CYLINDER_ANGLE_ERR") + "\n";
+      ok = false;
+    }
   }
   else if( getConstructorId() == 1 )
   {
     ok = GroupDimensions->SpinBox_DX->isValid( msg, !IsPreview() ) &&
-         GroupDimensions->SpinBox_DY->isValid( msg, !IsPreview() );
+         GroupDimensions->SpinBox_DY->isValid( msg, !IsPreview() ) &&
+         ( GroupDimensions->checkBox->isChecked() || GroupDimensions->SpinBox_DZ->isValid( msg, !IsPreview() ) );
+    if ( GroupDimensions->checkBox->isChecked() &&
+        ( GroupDimensions->SpinBox_DZ->value() <= 0. || GroupDimensions->SpinBox_DZ->value() >= 360. ) ) {
+      msg += tr("GEOM_CYLINDER_ANGLE_ERR") + "\n";
+      ok = false;
+    }
   }
   ok = qAbs( getHeight() ) > Precision::Confusion() && ok;
+  ok = qAbs( getRadius() ) > Precision::Confusion() && ok;
   return ok;
 }
 
@@ -396,7 +430,7 @@ bool PrimitiveGUI_CylinderDlg::isValid (QString& msg)
 bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects)
 {
   bool res = false;
-
+  
   GEOM::GEOM_Object_var anObj;
 
   GEOM::GEOM_I3DPrimOperations_var anOper = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation());
@@ -404,27 +438,55 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects)
   switch (getConstructorId()) {
   case 0:
     if ( myPoint && myDir ) {
-      anObj = anOper->MakeCylinderPntVecRH(myPoint.get(), myDir.get(), getRadius(), getHeight());
+      if ( GroupPoints->checkBox->isChecked() ) {
+       anObj = anOper->MakeCylinderPntVecRHA(myPoint.get(), myDir.get(), getRadius(), getHeight(), getAngle()*M_PI/180.);
+       if (!anObj->_is_nil() && !IsPreview())
+       {
+         QStringList aParameters;
+         aParameters << GroupPoints->SpinBox_DX->text();
+         aParameters << GroupPoints->SpinBox_DY->text();
+         aParameters << GroupPoints->SpinBox_DZ->text();
+         anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+       }
+       res = true;
+      }
+      else {
+       anObj = anOper->MakeCylinderPntVecRH(myPoint.get(), myDir.get(), getRadius(), getHeight());
+       if (!anObj->_is_nil() && !IsPreview())
+       {
+         QStringList aParameters;
+         aParameters << GroupPoints->SpinBox_DX->text();
+         aParameters << GroupPoints->SpinBox_DY->text();
+         anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+       }
+       res = true;
+      }
+    }
+    break;
+  case 1:
+    if ( GroupDimensions->checkBox->isChecked() ) {
+      anObj = anOper->MakeCylinderRHA(getRadius(), getHeight(), getAngle()*M_PI/180.);
       if (!anObj->_is_nil() && !IsPreview())
       {
-        QStringList aParameters;
-        aParameters << GroupPoints->SpinBox_DX->text();
-        aParameters << GroupPoints->SpinBox_DY->text();
-        anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+       QStringList aParameters;
+       aParameters << GroupDimensions->SpinBox_DX->text();
+       aParameters << GroupDimensions->SpinBox_DY->text();
+       aParameters << GroupDimensions->SpinBox_DZ->text();
+       anObj->SetParameters(aParameters.join(":").toLatin1().constData());
       }
       res = true;
     }
-    break;
-  case 1:
-    anObj = anOper->MakeCylinderRH(getRadius(), getHeight());
-    if (!anObj->_is_nil() && !IsPreview())
-    {
-      QStringList aParameters;
-      aParameters << GroupDimensions->SpinBox_DX->text();
-      aParameters << GroupDimensions->SpinBox_DY->text();
-      anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+    else {
+      anObj = anOper->MakeCylinderRH(getRadius(), getHeight());
+      if (!anObj->_is_nil() && !IsPreview())
+      {
+       QStringList aParameters;
+       aParameters << GroupDimensions->SpinBox_DX->text();
+       aParameters << GroupDimensions->SpinBox_DY->text();
+       anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+      }
+      res = true;
     }
-    res = true;
     break;
   }
 
@@ -462,6 +524,20 @@ double PrimitiveGUI_CylinderDlg::getHeight() const
   return 0;
 }
 
+//=================================================================================
+// function : getAngle()
+// purpose  :
+//=================================================================================
+double PrimitiveGUI_CylinderDlg::getAngle() const
+{
+  int aConstructorId = getConstructorId();
+  if (aConstructorId == 0)
+    return GroupPoints->SpinBox_DZ->value();
+  else if (aConstructorId == 1)
+    return GroupDimensions->SpinBox_DZ->value();
+  return 0;
+}
+
 //=================================================================================
 // function : addSubshapeToStudy
 // purpose  : virtual method to add new SubObjects if local selection
@@ -473,3 +549,20 @@ void PrimitiveGUI_CylinderDlg::addSubshapesToStudy()
     GEOMBase::PublishSubObject( myDir.get() );
   }
 }
+
+//=================================================================================
+// function :  ActivateAngle()
+// purpose  : enable the 
+//=================================================================================
+void PrimitiveGUI_CylinderDlg::ActivateAngle()
+{
+  int aConstructorId = getConstructorId();
+  if (aConstructorId == 0){
+    GroupPoints->SpinBox_DZ->setEnabled( GroupPoints->checkBox->isChecked() );
+    processPreview();
+  }
+  else if (aConstructorId == 1){
+    GroupDimensions->SpinBox_DZ->setEnabled( GroupDimensions->checkBox->isChecked() );
+    processPreview();
+  }
+}
index 6514d87a82316b2c0d649048e8b2ba6812e09feb..1a5ccc46bd27a8e95025b9d0b2008be7e4231ef2 100644 (file)
@@ -30,8 +30,8 @@
 #include "GEOMBase_Skeleton.h"
 #include "GEOM_GenericObjPtr.h"
 
-class DlgRef_2Sel2Spin;
-class DlgRef_2Spin;
+class DlgRef_2Sel3Spin1Check;
+class DlgRef_3Spin1CheckCyl;
 
 //=================================================================================
 // class    : PrimitiveGUI_CylinderDlg
@@ -57,6 +57,7 @@ private:
   void                               enterEvent( QEvent* );
   double                             getRadius() const;
   double                             getHeight() const;
+  double                             getAngle() const;
   
 private:
   GEOM::GeomObjPtr                   myPoint, myDir;
@@ -64,8 +65,8 @@ private:
   // to initialize the first selection field with a selected object on the dialog creation
   bool                               myInitial;
   
-  DlgRef_2Sel2Spin*                  GroupPoints;
-  DlgRef_2Spin*                      GroupDimensions;
+  DlgRef_2Sel3Spin1Check*            GroupPoints;
+  DlgRef_3Spin1CheckCyl*             GroupDimensions;
 
 private slots:
   void                               ClickOnOk();
@@ -76,6 +77,7 @@ private slots:
   void                               ConstructorsClicked( int );
   void                               ValueChangedInSpinBox();
   void                               SetDoubleSpinBoxStep( double );
+  void                               ActivateAngle();
 };
 
 #endif // PRIMITIVEGUI_CYLINDERDLG_H
diff --git a/src/STEPExport/CMakeLists.txt b/src/STEPExport/CMakeLists.txt
deleted file mode 100755 (executable)
index 45965bf..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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, or (at your option) any 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
-#
-
-# --- options ---
-
-# additional include directories
-INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
-  ${PTHREAD_INCLUDE_DIR}
-  ${KERNEL_INCLUDE_DIRS}
-  )
-
-# additional preprocessor / compiler flags
-ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
-  )
-
-# libraries to link to
-SET(_link_LIBRARIES
-  ${CAS_TKSTEP}
-  ${KERNEL_SALOMELocalTrace}
-  )
-
-# --- sources ---
-
-SET(STEPExport_SOURCES
-  STEPExport.cxx
-  )
-
-# --- rules ---
-
-ADD_LIBRARY(STEPExport ${STEPExport_SOURCES})
-TARGET_LINK_LIBRARIES(STEPExport ${_link_LIBRARIES})
-INSTALL(TARGETS STEPExport EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-
-
diff --git a/src/STEPExport/STEPExport.cxx b/src/STEPExport/STEPExport.cxx
deleted file mode 100644 (file)
index 35f14f2..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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:        STEPExport.cxx
-// Created:     Wed May 19 14:53:52 2004
-// Author:      Pavel TELKOV
-
-#include "utilities.h"
-
-#include <Basics_Utils.hxx>
-
-#include <IFSelect_ReturnStatus.hxx>
-
-#include <STEPControl_Writer.hxx>
-#include <Interface_Static.hxx>
-
-#include <TCollection_AsciiString.hxx>
-#include <TopoDS_Shape.hxx>
-
-#ifdef WIN32
-  #if defined STEPEXPORT_EXPORTS || defined STEPExport_EXPORTS
-    #define STEPEXPORT_EXPORT __declspec( dllexport )
-  #else
-    #define STEPEXPORT_EXPORT __declspec( dllimport )     
-  #endif
-#else
-  #define STEPEXPORT_EXPORT
-#endif
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-extern "C"
-{
-  STEPEXPORT_EXPORT int Export (const TopoDS_Shape& theShape,
-                                const TCollection_AsciiString& theFileName,
-                                const TCollection_AsciiString& /*theFormatName*/)
-  {
-    MESSAGE("Export STEP into file " << theFileName.ToCString());
-
-    try 
-      {
-        // Set "C" numeric locale to save numbers correctly
-        Kernel_Utils::Localizer loc;
-
-        IFSelect_ReturnStatus status ;
-        //VRV: OCC 4.0 migration
-        STEPControl_Writer aWriter;
-        //VSR: 16/09/09: Convert to METERS
-        Interface_Static::SetCVal("xstep.cascade.unit","M");
-        Interface_Static::SetCVal("write.step.unit", "M");
-        Interface_Static::SetIVal("write.step.nonmanifold", 1);
-        //JFA: PAL6162      status = aWriter.Transfer( theShape, STEPControl_ManifoldSolidBrep );
-        status = aWriter.Transfer( theShape, STEPControl_AsIs );
-        //VRV: OCC 4.0 migration
-        if ( status == IFSelect_RetDone ) 
-          status = aWriter.Write( theFileName.ToCString() );
-
-        // Return previous locale
-        if ( status == IFSelect_RetDone ) 
-          return 1;
-      }
-    catch (Standard_Failure) 
-      {
-        //THROW_SALOME_CORBA_EXCEPTION("Exception catched in STEPExport", SALOME::BAD_PARAM);
-      }
-    return 0;
-  }
-}
diff --git a/src/STEPImport/CMakeLists.txt b/src/STEPImport/CMakeLists.txt
deleted file mode 100755 (executable)
index 47ebea3..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# 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, or (at your option) any 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
-#
-
-# --- options ---
-
-# additional include directories
-INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
-  ${PTHREAD_INCLUDE_DIR}
-  ${KERNEL_INCLUDE_DIRS}
-  )
-
-# additional preprocessor / compiler flags
-ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
-  )
-
-# libraries to link to
-SET(_link_LIBRARIES
-  ${CAS_TKSTEP} ${CAS_TKCAF}
-  ${CAS_TKLCAF}
-  ${CAS_TKSTEPBase}
-  ${KERNEL_SALOMELocalTrace}
-  )
-
-# --- sources ---
-
-SET(STEPImport_SOURCES
-  STEPImport.cxx
-  )
-
-# --- rules ---
-
-ADD_LIBRARY(STEPImport ${STEPImport_SOURCES})
-TARGET_LINK_LIBRARIES(STEPImport ${_link_LIBRARIES})
-INSTALL(TARGETS STEPImport EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-
-
diff --git a/src/STEPImport/STEPImport.cxx b/src/STEPImport/STEPImport.cxx
deleted file mode 100644 (file)
index f50d23b..0000000
+++ /dev/null
@@ -1,579 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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:        STEPImport.cxx
-//  Created:     Wed May 19 14:41:10 2004
-//  Author:      Pavel TELKOV
-
-#include "utilities.h"
-
-#include <Basics_Utils.hxx>
-#include <Basics_OCCTVersion.hxx>
-
-#include <TDF_ChildIDIterator.hxx>
-#include <TDF_Label.hxx>
-#include <TDataStd_Name.hxx>
-#include <TDataStd_Comment.hxx>
-#include <TNaming_Builder.hxx>
-#include <TNaming_NamedShape.hxx>
-
-#include <IFSelect_ReturnStatus.hxx>
-#include <Interface_EntityIterator.hxx>
-#include <Interface_Graph.hxx>
-#include <Interface_InterfaceModel.hxx>
-#include <Interface_Static.hxx>
-#include <STEPControl_Reader.hxx>
-#include <StepBasic_Product.hxx>
-#include <StepBasic_ProductDefinition.hxx>
-#include <StepBasic_ProductDefinitionFormation.hxx>
-#include <StepGeom_GeometricRepresentationItem.hxx>
-#include <StepShape_TopologicalRepresentationItem.hxx>
-#include <StepRepr_DescriptiveRepresentationItem.hxx>
-#include <StepRepr_ProductDefinitionShape.hxx>
-#include <StepRepr_PropertyDefinitionRepresentation.hxx>
-#include <StepRepr_Representation.hxx>
-#include <TransferBRep.hxx>
-#include <Transfer_Binder.hxx>
-#include <Transfer_TransientProcess.hxx>
-#include <XSControl_TransferReader.hxx>
-#include <XSControl_WorkSession.hxx>
-
-#include <BRep_Builder.hxx>
-
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopoDS_Compound.hxx>
-#include <TopoDS_Iterator.hxx>
-#include <TopoDS_Shape.hxx>
-
-#include <TCollection_AsciiString.hxx>
-#include <TColStd_SequenceOfAsciiString.hxx>
-
-#include <Standard_Failure.hxx>
-#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
-
-#ifdef WIN32
-  #if defined STEPIMPORT_EXPORTS || defined STEPImport_EXPORTS
-    #define STEPIMPORT_EXPORT __declspec( dllexport )
-  #else
-    #define STEPIMPORT_EXPORT __declspec( dllimport )
-  #endif
-#else
-  #define STEPIMPORT_EXPORT
-#endif
-
-
-//=============================================================================
-/*!
- *  GetShape()
- */
-//=============================================================================
-
-static TopoDS_Shape GetShape(const Handle(Standard_Transient)        &theEnti,
-                             const Handle(Transfer_TransientProcess) &theTP)
-{
-  TopoDS_Shape            aResult;
-  Handle(Transfer_Binder) aBinder = theTP->Find(theEnti);
-
-  if (aBinder.IsNull()) {
-    return aResult;
-  }
-
-  aResult = TransferBRep::ShapeResult(aBinder);
-
-  return aResult;
-}
-
-//=============================================================================
-/*!
- *  GetLabel()
- */
-//=============================================================================
-
-static TDF_Label GetLabel(const Handle(Standard_Transient) &theEnti,
-                          const TDF_Label                  &theShapeLabel,
-                          const TopoDS_Shape               &aShape)
-{
-  TDF_Label aResult;
-
-  if (theEnti->IsKind
-            (STANDARD_TYPE(StepGeom_GeometricRepresentationItem))) {
-    // check all named shapes using iterator
-    TDF_ChildIDIterator anIt
-      (theShapeLabel, TDataStd_Name::GetID(), Standard_True);
-
-    for (; anIt.More(); anIt.Next()) {
-      Handle(TDataStd_Name) nameAttr =
-        Handle(TDataStd_Name)::DownCast(anIt.Value());
-
-      if (nameAttr.IsNull()) {
-        continue;
-      }
-
-      TDF_Label aLab = nameAttr->Label();
-      Handle(TNaming_NamedShape) shAttr; 
-
-      if (aLab.FindAttribute(TNaming_NamedShape::GetID(), shAttr) &&
-          shAttr->Get().IsEqual(aShape)) {
-        aResult = aLab;
-      }
-    }
-  }
-
-  // create label and set shape
-  if (aResult.IsNull()) {
-    TDF_TagSource aTag;
-
-    aResult = aTag.NewChild(theShapeLabel);
-
-    TNaming_Builder tnBuild (aResult);
-
-    tnBuild.Generated(aShape);
-  }
-
-  return aResult;
-}
-
-//=============================================================================
-/*!
- *  StoreName()
- */
-//=============================================================================
-
-static void StoreName(const Handle(Standard_Transient)        &theEnti,
-                      const TopTools_IndexedMapOfShape        &theIndices,
-                      const Handle(Transfer_TransientProcess) &theTP,
-                      const TDF_Label                         &theShapeLabel)
-{
-  Handle(TCollection_HAsciiString) aName;
-
-  if (theEnti->IsKind(STANDARD_TYPE(StepShape_TopologicalRepresentationItem)) ||
-      theEnti->IsKind(STANDARD_TYPE(StepGeom_GeometricRepresentationItem))) {
-    aName = Handle(StepRepr_RepresentationItem)::DownCast(theEnti)->Name();
-  } else {
-    Handle(StepBasic_ProductDefinition) PD =
-      Handle(StepBasic_ProductDefinition)::DownCast(theEnti);
-
-    if (PD.IsNull() == Standard_False) {
-      Handle(StepBasic_Product) Prod = PD->Formation()->OfProduct();
-      aName = Prod->Name();
-    }
-  }
-
-  bool isValidName = false;
-
-  if (aName.IsNull() == Standard_False) {
-    isValidName = true;
-
-    if (aName->UsefullLength() < 1) {
-      isValidName = false;
-    } else if (aName->UsefullLength() == 4 &&
-               toupper (aName->Value(1)) == 'N' &&
-               toupper (aName->Value(2)) == 'O' &&
-               toupper (aName->Value(3)) == 'N' &&
-               toupper (aName->Value(4)) == 'E') {
-      // skip 'N0NE' name
-      isValidName = false;
-    } else {
-      // special check to pass names like "Open CASCADE STEP translator 6.3 1"
-      TCollection_AsciiString aSkipName ("Open CASCADE STEP translator");
-
-      if (aName->Length() >= aSkipName.Length()) {
-        if (aName->String().SubString
-                            (1, aSkipName.Length()).IsEqual(aSkipName)) {
-          isValidName = false;
-        }
-      }
-    }
-  }
-
-  if (isValidName) {
-    TCollection_ExtendedString aNameExt (aName->ToCString());
-
-    // find target shape
-    TopoDS_Shape S = GetShape(theEnti, theTP);
-
-    if (S.IsNull()) {
-      return;
-    }
-
-    // as PRODUCT can be included in the main shape
-    // several times, we look here for all iclusions.
-    Standard_Integer isub, nbSubs = theIndices.Extent();
-
-    for (isub = 1; isub <= nbSubs; isub++) {
-      TopoDS_Shape aSub = theIndices.FindKey(isub);
-
-      if (aSub.IsPartner(S)) {
-        TDF_Label L = GetLabel(theEnti, theShapeLabel, aSub);
-
-        // set a name
-        TDataStd_Name::Set(L, aNameExt);
-      }
-    }
-  }
-}
-
-//=============================================================================
-/*!
- *  StoreMaterial()
- */
-//=============================================================================
-
-static void StoreMaterial
-                    (const Handle(Standard_Transient)        &theEnti,
-                     const TopTools_IndexedMapOfShape        &theIndices,
-                     const Handle(Transfer_TransientProcess) &theTP,
-                     const TDF_Label                         &theShapeLabel)
-{
-  // Treat Product Definition Shape only.
-  Handle(StepRepr_ProductDefinitionShape) aPDS =
-      Handle(StepRepr_ProductDefinitionShape)::DownCast(theEnti);
-  Handle(StepBasic_ProductDefinition)     aProdDef;
-
-  if(aPDS.IsNull() == Standard_False) {
-    // Product Definition Shape ==> Product Definition
-    aProdDef = aPDS->Definition().ProductDefinition();
-  }
-
-  if (aProdDef.IsNull() == Standard_False) {
-    // Product Definition ==> Property Definition
-    const Interface_Graph    &aGraph = theTP->Graph();
-    Interface_EntityIterator  aSubs  = aGraph.Sharings(aProdDef);
-    TopoDS_Shape              aShape;
-
-    for(aSubs.Start(); aSubs.More(); aSubs.Next()) {
-      Handle(StepRepr_PropertyDefinition) aPropD =
-        Handle(StepRepr_PropertyDefinition)::DownCast(aSubs.Value());
-
-      if(aPropD.IsNull() == Standard_False) {
-        // Property Definition ==> Representation.
-        Interface_EntityIterator aSubs1 = aGraph.Sharings(aPropD);
-
-        for(aSubs1.Start(); aSubs1.More(); aSubs1.Next()) {
-          Handle(StepRepr_PropertyDefinitionRepresentation) aPDR =
-            Handle(StepRepr_PropertyDefinitionRepresentation)::
-              DownCast(aSubs1.Value());
-
-          if(aPDR.IsNull() == Standard_False) {
-            // Property Definition ==> Material Name.
-            Handle(StepRepr_Representation) aRepr = aPDR->UsedRepresentation();
-
-            if(aRepr.IsNull() == Standard_False) {
-              Standard_Integer ir;
-
-              for(ir = 1; ir <= aRepr->NbItems(); ir++) {
-                Handle(StepRepr_RepresentationItem) aRI = aRepr->ItemsValue(ir);
-                Handle(StepRepr_DescriptiveRepresentationItem) aDRI =
-                  Handle(StepRepr_DescriptiveRepresentationItem)::DownCast(aRI);
-
-                if(aDRI.IsNull() == Standard_False) {
-                  // Get shape from Product Definition
-                  Handle(TCollection_HAsciiString) aMatName = aDRI->Name();
-
-                  if(aMatName.IsNull() == Standard_False) {
-                    TCollection_ExtendedString
-                                 aMatNameExt (aMatName->ToCString());
-
-                    if (aShape.IsNull()) {
-                      // Get the shape.
-                      aShape = GetShape(aProdDef, theTP);
-
-                      if (aShape.IsNull()) {
-                        return;
-                      }
-                    }
-
-                    // as PRODUCT can be included in the main shape
-                    // several times, we look here for all iclusions.
-                    Standard_Integer isub, nbSubs = theIndices.Extent();
-
-                    for (isub = 1; isub <= nbSubs; isub++) {
-                      TopoDS_Shape aSub = theIndices.FindKey(isub);
-
-                      if (aSub.IsPartner(aShape)) {
-                        TDF_Label aLabel =
-                          GetLabel(aProdDef, theShapeLabel, aSub);
-
-                        // set a name
-                        TDataStd_Comment::Set(aLabel, aMatNameExt);
-                      }
-                    }
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-}
-
-//=============================================================================
-/*!
- *  Import()
- */
-//=============================================================================
-
-extern "C"
-{
-  STEPIMPORT_EXPORT
-  Handle(TCollection_HAsciiString) GetValue (const TCollection_AsciiString& theFileName,
-                                             const TCollection_AsciiString& theParameterName,
-                                             TCollection_AsciiString&       theError)
-  {
-    Handle(TCollection_HAsciiString) aValue;
-
-    if (theParameterName != "LEN_UNITS") {
-      theError = theParameterName + " parameter reading is not supported by STEP plugin";
-      return aValue;
-    }
-
-    // Set "C" numeric locale to save numbers correctly
-    Kernel_Utils::Localizer loc;
-
-    STEPControl_Reader aReader;
-
-    Interface_Static::SetCVal("xstep.cascade.unit","M");
-    Interface_Static::SetIVal("read.step.ideas", 1);
-    Interface_Static::SetIVal("read.step.nonmanifold", 1);
-
-    try {
-      OCC_CATCH_SIGNALS;
-      IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.ToCString());
-      if (status == IFSelect_RetDone) {
-        TColStd_SequenceOfAsciiString anUnitLengthNames;
-        TColStd_SequenceOfAsciiString anUnitAngleNames;
-        TColStd_SequenceOfAsciiString anUnitSolidAngleNames;
-        aReader.FileUnits(anUnitLengthNames, anUnitAngleNames, anUnitSolidAngleNames);
-        if (anUnitLengthNames.Length() > 0) {
-          aValue = new TCollection_HAsciiString( anUnitLengthNames.First() );
-          /*
-          TCollection_AsciiString aLenUnits = anUnitLengthNames.First();
-          if (aLenUnits == "millimetre")
-            aValue = new TCollection_HAsciiString ("MM");
-          else if (aLenUnits == "centimetre")
-            aValue = new TCollection_HAsciiString ("CM");
-          else if (aLenUnits == "metre")
-            aValue = new TCollection_HAsciiString ("M");
-          else if (aLenUnits == "INCH")
-            aValue = new TCollection_HAsciiString ("INCH");
-          // TODO (for other units than mm, cm, m or inch)
-          //else if (aLenUnits == "")
-          //  aValue = new TCollection_HAsciiString ("");
-
-          // tmp begin
-          //std::cout << "$$$ --- " << anUnitLengthNames.First();
-          //for (int ii = 2; ii <= anUnitLengthNames.Length(); ii++)
-          //  std::cout << ", " << anUnitLengthNames.Value(ii);
-          //std::cout << std::endl;
-          // tmp end
-          */
-        }
-      }
-      else {
-        theError = theFileName + " reading failed";
-      }
-    }
-    catch (Standard_Failure) {
-      Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-      theError = aFail->GetMessageString();
-    }
-
-    return aValue;
-  }
-
-  STEPIMPORT_EXPORT
-  TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
-                       const TCollection_AsciiString& theFormatName,
-                       TCollection_AsciiString&       theError,
-                       const TDF_Label&               theShapeLabel)
-  {
-    TopoDS_Shape aResShape;
-
-    // Set "C" numeric locale to save numbers correctly
-    Kernel_Utils::Localizer loc;
-
-    STEPControl_Reader aReader;
-
-    //VSR: 16/09/09: Convert to METERS
-    Interface_Static::SetCVal("xstep.cascade.unit","M");
-    Interface_Static::SetIVal("read.step.ideas", 1);
-    Interface_Static::SetIVal("read.step.nonmanifold", 1);
-
-    BRep_Builder B;
-    TopoDS_Compound compound;
-    B.MakeCompound(compound);
-
-    try {
-      OCC_CATCH_SIGNALS;
-
-      IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.ToCString());
-
-      if (status == IFSelect_RetDone) {
-
-        // Regard or not the model units
-        if (theFormatName == "STEP_SCALE") {
-          // set UnitFlag to units from file
-          TColStd_SequenceOfAsciiString anUnitLengthNames;
-          TColStd_SequenceOfAsciiString anUnitAngleNames;
-          TColStd_SequenceOfAsciiString anUnitSolidAngleNames;
-          aReader.FileUnits(anUnitLengthNames, anUnitAngleNames, anUnitSolidAngleNames);
-          if (anUnitLengthNames.Length() > 0) {
-            TCollection_AsciiString aLenUnits = anUnitLengthNames.First();
-            if (aLenUnits == "millimetre")
-              Interface_Static::SetCVal("xstep.cascade.unit", "MM");
-            else if (aLenUnits == "centimetre")
-              Interface_Static::SetCVal("xstep.cascade.unit", "CM");
-            else if (aLenUnits == "metre" || aLenUnits.IsEmpty())
-              Interface_Static::SetCVal("xstep.cascade.unit", "M");
-            else if (aLenUnits == "INCH")
-              Interface_Static::SetCVal("xstep.cascade.unit", "INCH");
-            else {
-              theError = "The file contains not supported units.";
-              return aResShape;
-            }
-            // TODO (for other units than mm, cm, m or inch)
-            //else if (aLenUnits == "")
-            //  Interface_Static::SetCVal("xstep.cascade.unit", "???");
-          }
-        }
-        else {
-          //cout<<"need re-scale a model"<<endl;
-          // set UnitFlag to 'meter'
-          Interface_Static::SetCVal("xstep.cascade.unit","M");
-        }
-
-        Standard_Boolean failsonly = Standard_False;
-        aReader.PrintCheckLoad(failsonly, IFSelect_ItemsByEntity);
-
-        /* Root transfers */
-        Standard_Integer nbr = aReader.NbRootsForTransfer();
-        aReader.PrintCheckTransfer(failsonly, IFSelect_ItemsByEntity);
-
-        for (Standard_Integer n = 1; n <= nbr; n++) {
-          Standard_Boolean ok = aReader.TransferRoot(n);
-          /* Collecting resulting entities */
-          Standard_Integer nbs = aReader.NbShapes();
-          if (!ok || nbs == 0)
-          {
-            // THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::ImportStep", SALOME::BAD_PARAM);
-            continue; // skip empty root
-          }
-          /* For a single entity */
-          else if (nbr == 1 && nbs == 1) {
-            aResShape = aReader.Shape(1);
-            // ATTENTION: this is a workaround for mantis issue 0020442 remark 0010776
-            // It should be removed after patching OCCT for bug OCC22436
-            // (fix for OCCT is expected in service pack next to OCCT6.3sp12)
-            if (aResShape.ShapeType() == TopAbs_COMPOUND) {
-              int nbSub1 = 0;
-              TopoDS_Shape currShape;
-              TopoDS_Iterator It (aResShape, Standard_True, Standard_True);
-              for (; It.More(); It.Next()) {
-                nbSub1++;
-                currShape = It.Value();
-              }
-              if (nbSub1 == 1)
-                aResShape = currShape;
-            }
-            // END workaround
-            break;
-          }
-
-          for (Standard_Integer i = 1; i <= nbs; i++) {
-            TopoDS_Shape aShape = aReader.Shape(i);
-            if (aShape.IsNull()) {
-              // THROW_SALOME_CORBA_EXCEPTION("Null shape in GEOM_Gen_i::ImportStep", SALOME::BAD_PARAM) ;
-              //return aResShape;
-              continue;
-            }
-            else {
-              B.Add(compound, aShape);
-            }
-          }
-        }
-        if (aResShape.IsNull())
-          aResShape = compound;
-
-        // Check if any BRep entity has been read, there must be at least a vertex
-        if ( !TopExp_Explorer( aResShape, TopAbs_VERTEX ).More() )
-        {
-          theError = "No geometrical data in the imported file.";
-          return TopoDS_Shape();
-        }
-
-        // BEGIN: Store names and materials of sub-shapes from file
-        TopTools_IndexedMapOfShape anIndices;
-        TopExp::MapShapes(aResShape, anIndices);
-
-        Handle(Interface_InterfaceModel) Model = aReader.WS()->Model();
-        Handle(XSControl_TransferReader) TR = aReader.WS()->TransferReader();
-        if (!TR.IsNull()) {
-          Handle(Transfer_TransientProcess) TP = TR->TransientProcess();
-
-          Standard_Integer nb = Model->NbEntities();
-
-          for (Standard_Integer ie = 1; ie <= nb; ie++) {
-            Handle(Standard_Transient) enti = Model->Value(ie);
-
-            // Store names.
-            StoreName(enti, anIndices, TP, theShapeLabel);
-
-            // Store materials.
-            StoreMaterial(enti, anIndices, TP, theShapeLabel);
-          }
-        }
-        // END: Store names and materials
-      }
-      else {
-//        switch (status) {
-//        case IFSelect_RetVoid:
-//          theError = "Nothing created or No data to process";
-//          break;
-//        case IFSelect_RetError:
-//          theError = "Error in command or input data";
-//          break;
-//        case IFSelect_RetFail:
-//          theError = "Execution was run, but has failed";
-//          break;
-//        case IFSelect_RetStop:
-//          theError = "Execution has been stopped. Quite possible, an exception was raised";
-//          break;
-//        default:
-//          break;
-//        }
-        theError = "Wrong format of the imported file. Can't import file.";
-        aResShape.Nullify();
-      }
-    }
-    catch (Standard_Failure) {
-      Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-      theError = aFail->GetMessageString();
-      aResShape.Nullify();
-    }
-    // Return previous locale
-    return aResShape;
-  }
-}
diff --git a/src/STEPPlugin/CMakeLists.txt b/src/STEPPlugin/CMakeLists.txt
new file mode 100644 (file)
index 0000000..4d4db72
--- /dev/null
@@ -0,0 +1,153 @@
+# Copyright (C) 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, or (at your option) any 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(SALOME_BUILD_GUI)
+  INCLUDE(UseQt4Ext)
+  INCLUDE(${QT_USE_FILE})
+ENDIF()
+
+# --- options ---
+
+# additional include directories
+INCLUDE_DIRECTORIES(
+  ${CAS_INCLUDE_DIRS}
+  ${KERNEL_INCLUDE_DIRS}
+  ${PROJECT_BINARY_DIR}/idl
+  ${PROJECT_SOURCE_DIR}/src/GEOMAlgo
+  ${PROJECT_SOURCE_DIR}/src/GEOM
+  ${PROJECT_SOURCE_DIR}/src/GEOMImpl
+  ${PROJECT_SOURCE_DIR}/src/GEOM_I
+  ${PROJECT_SOURCE_DIR}/src/GEOMClient
+  ${PROJECT_SOURCE_DIR}/src/GEOMUtils
+  )
+  
+IF(SALOME_BUILD_GUI)
+  INCLUDE_DIRECTORIES(
+    ${QT_INCLUDE_DIRS}
+    ${GUI_INCLUDE_DIRS}
+    ${PROJECT_SOURCE_DIR}/src/OBJECT
+    ${PROJECT_SOURCE_DIR}/src/GEOMGUI
+    ${PROJECT_SOURCE_DIR}/src/GEOMBase
+    )
+ENDIF()
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(
+  ${CAS_DEFINITIONS}
+  ${OMNIORB_DEFINITIONS}
+  )
+    
+IF(WIN32)
+  ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
+
+IF(SALOME_BUILD_GUI)
+ADD_DEFINITIONS(
+  ${QT_DEFINITIONS}
+  )
+ENDIF()
+
+# libraries to link to
+SET(_link_engine_LIBRARIES
+  ${CAS_TKSTEP}
+  ${CAS_TKSTEPBase}
+  ${KERNEL_SALOMELocalTrace}
+  ${KERNEL_OpUtil}
+  SalomeIDLGEOM
+  SalomeIDLSTEPPlugin
+  GEOMEngine
+  GEOMClient
+  )
+  
+IF(SALOME_BUILD_GUI)
+  SET(_link_gui_LIBRARIES
+    SalomeIDLSTEPPlugin
+    GEOMObject
+    GEOM
+    GEOMBase
+    )
+ENDIF()
+
+
+# --- headers ---
+
+SET(STEPPluginEngine_HEADERS
+  STEPPlugin_IOperations_i.hh
+  STEPPlugin_Engine.hxx
+  STEPPlugin_OperationsCreator.hxx
+  STEPPlugin_IOperations.hxx
+  STEPPlugin_IExport.hxx 
+  STEPPlugin_IImport.hxx
+  STEPPlugin_ImportDriver.hxx 
+  STEPPlugin_ExportDriver.hxx
+  STEPPlugin_IECallBack.hxx
+  )
+
+IF(SALOME_BUILD_GUI)  
+  # header files / to be processed by moc
+  SET(_moc_HEADERS
+    STEPPlugin_GUI.h
+    )
+ENDIF()
+
+# --- sources ---
+
+IF(SALOME_BUILD_GUI)
+  # sources / moc wrappings
+  QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+
+  SET(STEPPluginGUI_SOURCES
+    STEPPlugin_GUI.cxx
+    ${_moc_SOURCES}
+    )
+ENDIF()
+  
+SET(STEPPluginEngine_SOURCES
+  STEPPlugin_Engine.cxx
+  STEPPlugin_OperationsCreator.cxx
+  STEPPlugin_IOperations_i.cc
+  STEPPlugin_IOperations.cxx
+  STEPPlugin_ExportDriver.cxx
+  STEPPlugin_ImportDriver.cxx
+  STEPPlugin_IECallBack.cxx
+  )
+  
+# resource files / to be processed by lrelease
+SET(STEPPlugin_RESOURCES
+  STEPPlugin_msg_en.ts
+  STEPPlugin_msg_fr.ts
+  STEPPlugin_msg_ja.ts
+  )
+
+# --- rules ---
+
+ADD_LIBRARY(STEPPluginEngine ${STEPPluginEngine_SOURCES})
+TARGET_LINK_LIBRARIES(STEPPluginEngine ${_link_engine_LIBRARIES})
+INSTALL(TARGETS STEPPluginEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+IF(SALOME_BUILD_GUI)
+  ADD_LIBRARY(STEPPluginGUI ${STEPPluginGUI_SOURCES})
+  TARGET_LINK_LIBRARIES(STEPPluginGUI ${_link_gui_LIBRARIES})
+  INSTALL(TARGETS STEPPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+  QT4_INSTALL_TS_RESOURCES("${STEPPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
+ENDIF()
+
+
+INSTALL(FILES ${STEPPluginEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
diff --git a/src/STEPPlugin/STEPPlugin_Engine.cxx b/src/STEPPlugin/STEPPlugin_Engine.cxx
new file mode 100644 (file)
index 0000000..c171874
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STEPPlugin_Engine.hxx"
+#include "STEPPlugin_OperationsCreator.hxx"
+
+extern "C"
+{
+  STEPPLUGINENGINE_EXPORT
+  GEOM_GenericOperationsCreator* GetOperationsCreator()
+  {
+    STEPPlugin_OperationsCreator* aCreator = new STEPPlugin_OperationsCreator();
+    return aCreator;
+  }
+}
diff --git a/src/STEPPlugin/STEPPlugin_Engine.hxx b/src/STEPPlugin/STEPPlugin_Engine.hxx
new file mode 100755 (executable)
index 0000000..624eb22
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 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, or (at your option) any 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 _STEPPLUGIN_ENGINE_HXX_
+#define _STEPPLUGIN_ENGINE_HXX_
+
+#ifdef WIN32
+ #if defined STEPPLUGINENGINE_EXPORTS || defined STEPPluginEngine_EXPORTS
+   #define STEPPLUGINENGINE_EXPORT __declspec( dllexport )
+ #else
+   #define STEPPLUGINENGINE_EXPORT __declspec( dllimport )
+ #endif 
+#else
+   #define STEPPLUGINENGINE_EXPORT
+#endif
+
+#endif
diff --git a/src/STEPPlugin/STEPPlugin_ExportDriver.cxx b/src/STEPPlugin/STEPPlugin_ExportDriver.cxx
new file mode 100644 (file)
index 0000000..ba35ffb
--- /dev/null
@@ -0,0 +1,129 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STEPPlugin_ExportDriver.hxx"
+#include "STEPPlugin_IExport.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+#include <Basics_Utils.hxx>
+
+// GEOM includes
+#include "GEOM_Function.hxx"
+
+// OOCT includes
+#include <IFSelect_ReturnStatus.hxx>
+#include <STEPControl_Writer.hxx>
+#include <Interface_Static.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <TopoDS_Shape.hxx>
+
+//=======================================================================
+//function : GetID
+//purpose  :
+//=======================================================================
+const Standard_GUID& STEPPlugin_ExportDriver::GetID()
+{
+  static Standard_GUID aGUID("c47b9a61-c6a4-4335-8b13-6badb16b036f");
+  return aGUID;
+}
+
+//=======================================================================
+//function : STEPPlugin_ExportDriver
+//purpose  :
+//=======================================================================
+STEPPlugin_ExportDriver::STEPPlugin_ExportDriver()
+{
+}
+
+//=======================================================================
+//function : Execute
+//purpose  :
+//=======================================================================
+Standard_Integer STEPPlugin_ExportDriver::Execute( TFunction_Logbook& log ) const
+{
+  if (Label().IsNull()) return 0;
+  Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
+
+  STEPPlugin_IExport aData (aFunction);
+
+  // retrieve the being exported shape
+  TopoDS_Shape aShape;
+  Handle(GEOM_Function) aRefFunction = aData.GetOriginal();
+  if( aRefFunction.IsNull() ) return 0;
+  aShape = aRefFunction->GetValue();
+  if( aShape.IsNull() ) return 0;
+  // set the result of function to be used by next operations
+  aFunction->SetValue( aShape );
+
+  TCollection_AsciiString aFileName = aData.GetFileName();
+
+  MESSAGE("Export STEP into file " << aFileName.ToCString());
+
+  try
+  {
+    // Set "C" numeric locale to save numbers correctly
+    Kernel_Utils::Localizer loc;
+
+    IFSelect_ReturnStatus status ;
+    //VRV: OCC 4.0 migration
+    STEPControl_Writer aWriter;
+    Interface_Static::SetCVal("xstep.cascade.unit","M");
+    Interface_Static::SetCVal("write.step.unit", "M");
+    Interface_Static::SetIVal("write.step.nonmanifold", 1);
+    status = aWriter.Transfer( aShape, STEPControl_AsIs );
+    //VRV: OCC 4.0 migration
+    if( status == IFSelect_RetDone )
+      status = aWriter.Write( aFileName.ToCString() );
+
+    // Return previous locale
+    if( status == IFSelect_RetDone )
+      return 1;
+  }
+  catch (Standard_Failure)
+  {
+      //THROW_SALOME_CORBA_EXCEPTION("Exception catched in STEPExport", SALOME::BAD_PARAM);
+  }
+  return 0;
+}
+
+//=======================================================================
+//function : MustExecute
+//purpose  :
+//=======================================================================
+Standard_Boolean STEPPlugin_ExportDriver::MustExecute( const TFunction_Logbook& ) const
+{
+  return Standard_True;
+}
+
+//================================================================================
+/*!
+ * \brief Returns a name of creation operation and names and values of creation parameters
+ */
+//================================================================================
+bool STEPPlugin_ExportDriver::
+GetCreationInformation( std::string&             theOperationName,
+                        std::vector<GEOM_Param>& theParams )
+{
+  return false;
+}
+
+IMPLEMENT_STANDARD_HANDLE( STEPPlugin_ExportDriver,GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( STEPPlugin_ExportDriver,GEOM_BaseDriver );
diff --git a/src/STEPPlugin/STEPPlugin_ExportDriver.hxx b/src/STEPPlugin/STEPPlugin_ExportDriver.hxx
new file mode 100644 (file)
index 0000000..bf2acb8
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 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, or (at your option) any 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 _STEPPlugin_ExportDriver_HXX
+#define _STEPPlugin_ExportDriver_HXX
+
+// GEOM includes
+#include "GEOM_BaseDriver.hxx"
+
+// OCCT includes
+#include <TFunction_Logbook.hxx>
+
+DEFINE_STANDARD_HANDLE( STEPPlugin_ExportDriver, GEOM_BaseDriver );
+
+class STEPPlugin_ExportDriver : public GEOM_BaseDriver
+{
+public:
+  STEPPlugin_ExportDriver();
+  ~STEPPlugin_ExportDriver() {};
+
+  static const Standard_GUID& GetID();
+  virtual Standard_Integer    Execute( TFunction_Logbook& log ) const;
+  Standard_Boolean            MustExecute( const TFunction_Logbook& ) const;
+  virtual void                Validate( TFunction_Logbook& ) const {}
+
+  virtual bool                GetCreationInformation( std::string&             theOperationName,
+                                                     std::vector<GEOM_Param>& params );
+
+DEFINE_STANDARD_RTTI( STEPPlugin_ExportDriver )
+};
+
+#endif // _STEPPlugin_ExportDriver_HXX
diff --git a/src/STEPPlugin/STEPPlugin_GUI.cxx b/src/STEPPlugin/STEPPlugin_GUI.cxx
new file mode 100644 (file)
index 0000000..b43651a
--- /dev/null
@@ -0,0 +1,311 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STEPPlugin_GUI.h"
+
+// GUI includes
+#include <SUIT_Desktop.h>
+#include <SUIT_FileDlg.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_OverrideCursor.h>
+#include <SUIT_Tools.h>
+#include <LightApp_SelectionMgr.h>
+#include <SalomeApp_Application.h>
+#include <SalomeApp_Study.h>
+#include <SALOME_ListIteratorOfListIO.hxx>
+
+// GEOM includes
+#include "GeometryGUI.h"
+#include "GEOM_Operation.h"
+#include "GEOMBase.h"
+#include "GEOM_Displayer.h"
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(STEPPlugin)
+
+//=======================================================================
+// function : STEPPlugin_GUI()
+// purpose  : Constructor
+//=======================================================================
+STEPPlugin_GUI::STEPPlugin_GUI( GeometryGUI* parent ) : GEOMPluginGUI( parent )
+{
+}
+
+//=======================================================================
+// function : ~STEPPlugin_GUI
+// purpose  : Destructor
+//=======================================================================
+STEPPlugin_GUI::~STEPPlugin_GUI()
+{
+}
+
+//=======================================================================
+// function : OnGUIEvent()
+// purpose  : 
+//=======================================================================
+bool STEPPlugin_GUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
+{
+  QString cmd;
+  switch ( theCommandID ) {
+  case 1:
+    cmd = "Export_STEP"; break;
+  case 2:
+    cmd = "Import_STEP"; break;
+  default:
+    break;
+  }
+  return OnGUIEvent( cmd, parent );
+}
+
+//=======================================================================
+// function : OnGUIEvent()
+// purpose  :
+//=======================================================================
+bool STEPPlugin_GUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* parent )
+{
+  bool result = false;
+  
+  if ( theCommandID == "Export_STEP" )
+  {
+    result = exportSTEP( parent );
+  }
+  else if ( theCommandID == "Import_STEP" )
+  {
+    result = importSTEP( parent );
+  }
+  else
+  {
+    getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
+  }
+
+  return result;
+}
+
+//=======================================================================
+// function : importSTEP
+// purpose  :
+//=======================================================================
+bool STEPPlugin_GUI::importSTEP( SUIT_Desktop* parent )
+{
+  SalomeApp_Application* app = getGeometryGUI()->getApp();
+  if ( !app ) return false;
+  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
+  if ( !study ) return false;
+
+  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STEPPluginEngine" );
+  GEOM::ISTEPOperations_var stepOp = GEOM::ISTEPOperations::_narrow( op );
+  if ( CORBA::is_nil( stepOp ) ) return false;
+
+  QStringList fileNames = app->getOpenFileNames( SUIT_FileDlg::getLastVisitedPath().isEmpty() ? QDir::currentPath() : QString(""),
+                                                tr( "STEP_FILES" ),
+                                                tr( "IMPORT_TITLE" ),
+                                                parent );
+  if ( fileNames.count() > 0 )
+  {
+    QStringList entryList;
+    QStringList errors;
+    SUIT_MessageBox::StandardButton stepAnswer = SUIT_MessageBox::NoButton;
+    
+    for ( int i = 0; i < fileNames.count(); i++ )
+    {
+      QString fileName = fileNames.at( i );
+      SUIT_OverrideCursor wc;
+      GEOM_Operation transaction( app, stepOp.in() );
+      bool ignoreUnits = false;
+      
+      try
+      {
+       app->putInfo( tr( "GEOM_PRP_LOADING" ).arg( SUIT_Tools::file( fileName, true ) ) );
+       transaction.start();
+       
+       CORBA::String_var units = stepOp->ReadValue( fileName.toUtf8().constData(), "LEN_UNITS" );
+       QString unitsStr( units.in() );
+       bool unitsOK = unitsStr.isEmpty() || unitsStr == "M" || unitsStr.toLower() == "metre";
+       
+       if ( !unitsOK )
+       {
+         if( stepAnswer == SUIT_MessageBox::NoToAll )
+         {
+           ignoreUnits = true;
+         }
+         else if( stepAnswer != SUIT_MessageBox::YesToAll )
+         {
+           SUIT_MessageBox::StandardButtons btns = SUIT_MessageBox::Yes | SUIT_MessageBox::No | SUIT_MessageBox::Cancel;
+           if ( i < fileNames.count()-1 ) btns = btns | SUIT_MessageBox::YesToAll | SUIT_MessageBox::NoToAll;
+           stepAnswer = SUIT_MessageBox::question( parent,
+                                                   tr( "WRN_WARNING" ),
+                                                   tr( "SCALE_DIMENSIONS" ).arg( unitsStr ),
+                                                   btns,
+                                                   SUIT_MessageBox::No );
+           switch ( stepAnswer )
+           {
+           case SUIT_MessageBox::Cancel:
+             return true;             // cancel (break) import operation
+           case SUIT_MessageBox::Yes:
+           case SUIT_MessageBox::YesToAll:
+             break;                   // scaling is confirmed
+           case SUIT_MessageBox::No:
+           case SUIT_MessageBox::NoAll:
+             ignoreUnits = true;      // scaling is rejected
+           default:
+             break;
+           }
+         }
+       }
+       
+       GEOM::ListOfGO_var result = stepOp->ImportSTEP( fileName.toUtf8().constData(), ignoreUnits );
+       if ( result->length() > 0 && stepOp->IsDone() )
+       {
+         GEOM::GEOM_Object_var main = result[0];
+         QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
+         SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( dsStudy,
+                                                                               SALOMEDS::SObject::_nil(),
+                                                                               main.in(),
+                                                                               publishName.toUtf8().constData() );
+         
+         entryList.append( so->GetID() );
+         for ( int i = 1, n = result->length(); i < n; i++ ) {
+           GEOM::GEOM_Object_ptr group = result[i];
+           CORBA::String_var grpName = group->GetName();
+           GeometryGUI::GetGeomGen()->AddInStudy( dsStudy, group, grpName.in(), main );
+         }
+         transaction.commit();
+         GEOM_Displayer( study ).Display( main.in() );
+       }
+       else
+       {
+         transaction.abort();
+         errors.append( QString( "%1 : %2" ).arg( fileName ).arg( stepOp->GetErrorCode() ) );
+       }
+      }
+      catch( const SALOME::SALOME_Exception& e )
+      {
+       transaction.abort();
+      }
+    }
+
+    getGeometryGUI()->updateObjBrowser( true );
+    app->browseObjects( entryList );
+          
+    if ( errors.count() > 0 )
+    {
+      SUIT_MessageBox::critical( parent,
+                                tr( "GEOM_ERROR" ),
+                                tr( "GEOM_IMPORT_ERRORS" ) + "\n" + errors.join( "\n" ) );
+    }
+  }
+  return fileNames.count() > 0;
+}
+
+//=======================================================================
+// function : exportSTEP
+// purpose  :
+//=======================================================================
+bool STEPPlugin_GUI::exportSTEP( SUIT_Desktop* parent )
+{
+  SalomeApp_Application* app = getGeometryGUI()->getApp();
+  if ( !app ) return false;
+  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
+  if ( !study ) return false;
+
+  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STEPPluginEngine" );
+  GEOM::ISTEPOperations_var stepOp = GEOM::ISTEPOperations::_narrow( op );
+  if ( CORBA::is_nil( stepOp ) ) return false;
+
+  LightApp_SelectionMgr* sm = app->selectionMgr();
+  if ( !sm ) return false;
+  
+  SALOME_ListIO selectedObjects;
+  sm->selectedObjects( selectedObjects );
+  bool ok = false;
+  
+  SALOME_ListIteratorOfListIO it( selectedObjects );
+  for ( ; it.More(); it.Next() )
+  {
+    Handle(SALOME_InteractiveObject) io = it.Value();
+    GEOM::GEOM_Object_var obj = GEOMBase::ConvertIOinGEOMObject( io );
+    
+    if ( CORBA::is_nil( obj ) ) continue;
+    
+    QString fileName = app->getFileName( false,
+                                        QString( io->getName() ),
+                                        tr( "STEP_FILES" ),
+                                        tr( "EXPORT_TITLE" ),
+                                        parent );
+    
+    if ( fileName.isEmpty() )
+      return false;
+    
+    SUIT_OverrideCursor wc;
+    
+    GEOM_Operation transaction( app, stepOp.in() );
+    
+    try
+    {
+      app->putInfo( tr( "GEOM_PRP_EXPORT" ).arg( fileName ) );
+      transaction.start();
+      
+      stepOp->ExportSTEP( obj, fileName.toUtf8().constData() );
+      
+      if ( stepOp->IsDone() )
+      {
+       transaction.commit();
+      }
+      else
+      {
+       transaction.abort();
+       SUIT_MessageBox::critical( parent,
+                                  tr( "GEOM_ERROR" ),
+                                  tr( "GEOM_PRP_ABORT" ) + "\n" + tr( stepOp->GetErrorCode() ) );
+       return false;
+      }
+    }
+    catch ( const SALOME::SALOME_Exception& e )
+    {
+      transaction.abort();
+      return false;
+    }
+    ok = true;
+  }
+  
+  if ( !ok )
+  {
+    SUIT_MessageBox::warning( parent,
+                             tr( "WRN_WARNING" ),
+                             tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) );
+  }
+  return ok;
+}
+
+//=====================================================================================
+// EXPORTED METHODS
+//=====================================================================================
+extern "C"
+{
+#ifdef WIN32
+    __declspec( dllexport )
+#endif
+  GEOMGUI* GetLibGUI( GeometryGUI* parent )
+  {
+    return new STEPPlugin_GUI( parent );
+  }
+}
diff --git a/src/STEPPlugin/STEPPlugin_GUI.h b/src/STEPPlugin/STEPPlugin_GUI.h
new file mode 100644 (file)
index 0000000..05d9894
--- /dev/null
@@ -0,0 +1,40 @@
+// Copyright (C) 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, or (at your option) any 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 STEPPlugin_GUI_H
+#define STEPPlugin_GUI_H
+
+#include "GEOMPluginGUI.h"
+
+class STEPPlugin_GUI: public GEOMPluginGUI
+{
+  Q_OBJECT
+public:
+  STEPPlugin_GUI( GeometryGUI* parent );
+  ~STEPPlugin_GUI();
+
+  bool OnGUIEvent( int commandId, SUIT_Desktop* );
+  bool OnGUIEvent( const QString&, SUIT_Desktop* );
+
+private:
+  bool importSTEP( SUIT_Desktop* );
+  bool exportSTEP( SUIT_Desktop* );
+};
+
+#endif // STEPPlugin_GUI_H
diff --git a/src/STEPPlugin/STEPPlugin_IECallBack.cxx b/src/STEPPlugin/STEPPlugin_IECallBack.cxx
new file mode 100755 (executable)
index 0000000..6089df8
--- /dev/null
@@ -0,0 +1,87 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STEPPlugin_IECallBack.hxx"
+#include "STEPPlugin_IOperations.hxx"
+#include "STEPPlugin_OperationsCreator.hxx"
+
+//=============================================================================
+/*!
+ *  constructor
+ */
+//=============================================================================
+STEPPlugin_IECallBack::STEPPlugin_IECallBack()
+{
+}
+
+//=============================================================================
+/*!
+ *  destructor
+ */
+//=============================================================================
+STEPPlugin_IECallBack::~STEPPlugin_IECallBack()
+{
+}
+
+//=============================================================================
+/*!
+ *  Export
+ */
+//=============================================================================
+bool
+STEPPlugin_IECallBack::Export( int                            theDocId,
+                              const Handle(GEOM_Object)      theOriginal,
+                              const TCollection_AsciiString& theFileName,
+                              const TCollection_AsciiString& theFormatName )
+{
+  STEPPlugin_IOperations* aPluginOperations = STEPPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  aPluginOperations->ExportSTEP( theOriginal, theFileName );
+  return true;
+}
+
+//=============================================================================
+/*!
+ *  Import
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+STEPPlugin_IECallBack::Import( int                            theDocId,
+                              const TCollection_AsciiString& theFormatName,
+                              const TCollection_AsciiString& theFileName )
+{
+  STEPPlugin_IOperations* aPluginOperations = STEPPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  bool anIsIgnoreUnits = ( theFormatName == "STEP_SCALE" ) ? true : false;
+  return aPluginOperations->ImportSTEP( theFileName, anIsIgnoreUnits );
+}
+
+//=============================================================================
+/*!
+ *  ReadValue
+ */
+//=============================================================================
+TCollection_AsciiString
+STEPPlugin_IECallBack::ReadValue( int                            theDocId,
+                                 const TCollection_AsciiString& theFileName,
+                                 const TCollection_AsciiString& theFormatName,
+                                 const TCollection_AsciiString& theParameterName )
+{
+  STEPPlugin_IOperations* aPluginOperations = STEPPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  return aPluginOperations->ReadValue( theFileName, theParameterName );
+}
diff --git a/src/STEPPlugin/STEPPlugin_IECallBack.hxx b/src/STEPPlugin/STEPPlugin_IECallBack.hxx
new file mode 100644 (file)
index 0000000..4f6f571
--- /dev/null
@@ -0,0 +1,54 @@
+// Copyright (C) 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, or (at your option) any 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 _STEPPlugin_IECallBack_HXX_
+#define _STEPPlugin_IECallBack_HXX_
+
+// internal includes
+#include "STEPPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_Object.hxx"
+#include "GEOMImpl_IECallBack.hxx"
+
+// OCC includes
+#include <TCollection_AsciiString.hxx>
+
+class STEPPLUGINENGINE_EXPORT STEPPlugin_IECallBack : public GEOMImpl_IECallBack
+{
+public:
+  STEPPlugin_IECallBack();
+  ~STEPPlugin_IECallBack();
+  
+  bool         Export( int                            theDocId,
+                      const Handle(GEOM_Object)      theOriginal,
+                      const TCollection_AsciiString& theFileName,
+                      const TCollection_AsciiString& theFormatName );
+
+  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
+                                              const TCollection_AsciiString& theFormatName,
+                                              const TCollection_AsciiString& theFileName );
+
+  TCollection_AsciiString  ReadValue( int                            theDocId,
+                                     const TCollection_AsciiString& theFileName,
+                                      const TCollection_AsciiString& theFormatName,
+                                      const TCollection_AsciiString& theParameterName );
+};
+
+#endif
diff --git a/src/STEPPlugin/STEPPlugin_IExport.hxx b/src/STEPPlugin/STEPPlugin_IExport.hxx
new file mode 100644 (file)
index 0000000..70fc5da
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 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, or (at your option) any 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 _STEPPlugin_IExport_HXX_
+#define _STEPPlugin_IExport_HXX_
+
+#include "GEOM_Function.hxx"
+
+#define EXPORTSTEP_ARG_ORIGINAL   1
+#define EXPORTSTEP_ARG_FILENAME   2
+
+class STEPPlugin_IExport
+{
+public:
+  STEPPlugin_IExport( Handle(GEOM_Function) theFunction )
+    : _func(theFunction) {}
+
+  void SetOriginal( Handle( GEOM_Function ) theOriginal)
+    { _func->SetReference( EXPORTSTEP_ARG_ORIGINAL, theOriginal ); }
+  Handle( GEOM_Function ) GetOriginal()
+    { return _func->GetReference( EXPORTSTEP_ARG_ORIGINAL ); }
+
+  void SetFileName( const TCollection_AsciiString& theFileName )
+    { _func->SetString( EXPORTSTEP_ARG_FILENAME, theFileName ); }
+  TCollection_AsciiString GetFileName()
+    { return _func->GetString( EXPORTSTEP_ARG_FILENAME ); }
+  
+private:
+  Handle(GEOM_Function) _func;
+};
+
+#endif // _STEPPlugin_IExport_HXX_
diff --git a/src/STEPPlugin/STEPPlugin_IImport.hxx b/src/STEPPlugin/STEPPlugin_IImport.hxx
new file mode 100644 (file)
index 0000000..9c2679a
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 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, or (at your option) any 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 _STEPPlugin_IImport_HXX_
+#define _STEPPlugin_IImport_HXX_
+
+#include "GEOM_Function.hxx"
+
+#define IMPORTSTEP_ARG_FILENAME     1
+#define IMPORTSTEP_ARG_IGNORE_UNITS 2
+
+class STEPPlugin_IImport
+{
+public:
+  STEPPlugin_IImport( Handle(GEOM_Function) theFunction)
+    : _func(theFunction) {}
+
+  void SetFileName( const TCollection_AsciiString& theFileName )
+    { _func->SetString( IMPORTSTEP_ARG_FILENAME, theFileName ); }
+  TCollection_AsciiString GetFileName()
+    { return _func->GetString( IMPORTSTEP_ARG_FILENAME ); }
+  
+  void SetIsIgnoreUnits( bool theIsIgnoreUnits )
+    { _func->SetInteger( IMPORTSTEP_ARG_IGNORE_UNITS, int( theIsIgnoreUnits ) ); }
+  bool GetIsIgnoreUnits()
+    { return bool( _func->GetInteger( IMPORTSTEP_ARG_IGNORE_UNITS ) ); }
+
+private:
+  Handle(GEOM_Function) _func;
+};
+
+#endif // _STEPPlugin_IImport_HXX_
diff --git a/src/STEPPlugin/STEPPlugin_IOperations.cxx b/src/STEPPlugin/STEPPlugin_IOperations.cxx
new file mode 100644 (file)
index 0000000..e2fa9fa
--- /dev/null
@@ -0,0 +1,202 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STEPPlugin_IOperations.hxx"
+#include "STEPPlugin_ExportDriver.hxx"
+#include "STEPPlugin_ImportDriver.hxx"
+#include "STEPPlugin_IExport.hxx"
+#include "STEPPlugin_IImport.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+
+// GEOM includes
+#include "GEOM_PythonDump.hxx"
+#include "GEOMImpl_Types.hxx"
+
+#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
+
+//=============================================================================
+/*!
+ *  Constructor
+ */
+//=============================================================================
+STEPPlugin_IOperations::STEPPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
+: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+{
+  MESSAGE( "STEPPlugin_IOperations::STEPPlugin_IOperations" );
+}
+
+//=============================================================================
+/*!
+ *  Destructor
+ */
+//=============================================================================
+STEPPlugin_IOperations::~STEPPlugin_IOperations()
+{
+  MESSAGE( "STEPPlugin_IOperations::~STEPPlugin_IOperations" );
+}
+
+//=============================================================================
+/*!
+ *  ExportSTEP
+ *  Export a shape to STEP format
+ *  \param theOriginal The shape to export
+ *  \param theFileName The name of the file to exported
+ *  \param theIsASCII The format of the exported file (ASCII or Binary)
+ *  \param theDeflection The deflection of the shape to exported
+ */
+//=============================================================================
+void STEPPlugin_IOperations::ExportSTEP( const Handle(GEOM_Object)      theOriginal,
+                                        const TCollection_AsciiString& theFileName )
+{
+  SetErrorCode(KO);
+  if( theOriginal.IsNull() ) return;
+
+  Handle(GEOM_Function) aRefFunction = theOriginal->GetLastFunction();
+  if( aRefFunction.IsNull() ) return;  //There is no function which creates an object to be exported
+
+  //Add a new result object
+  Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
+
+  //Add an Export function
+  Handle(GEOM_Function) aFunction = result->AddFunction( STEPPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
+  if( aFunction.IsNull() ) return;
+
+  //Check if the function is set correctly
+  if( aFunction->GetDriverGUID() != STEPPlugin_ExportDriver::GetID() ) return;
+
+  //Set parameters
+  STEPPlugin_IExport aCI( aFunction );
+  aCI.SetOriginal( aRefFunction );
+  aCI.SetFileName( theFileName );
+
+  //Perform the Export
+  try {
+    OCC_CATCH_SIGNALS;
+    if( !GetSolver()->ComputeFunction( aFunction ) ) {
+      SetErrorCode( "Not enough space on disk, or you haven't permissions to write this directory" );
+      return;
+    }
+  }
+  catch( Standard_Failure ) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode( aFail->GetMessageString() );
+    return;
+  }
+
+  //Make a Python command
+  GEOM::TPythonDump(aFunction) << "geompy.ExportSTEP(" << theOriginal << ", \""
+    << theFileName.ToCString() << "\" )";
+
+  SetErrorCode(OK);
+}
+
+//=============================================================================
+/*!
+ *  ImportSTEP
+ *  Import a shape from STEP format
+ *  \param theFileName The name of the file to import
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+STEPPlugin_IOperations::ImportSTEP( const TCollection_AsciiString& theFileName,
+                                   const bool theIsIgnoreUnits )
+{
+  SetErrorCode(KO);
+  if( theFileName.IsEmpty() ) return NULL;
+
+  //Add a new result object
+  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
+
+  //Add an Import function
+  Handle(GEOM_Function) aFunction =
+    anImported->AddFunction( STEPPlugin_ImportDriver::GetID(), IMPORT_SHAPE);
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != STEPPlugin_ImportDriver::GetID()) return NULL;
+
+  //Set parameters
+  STEPPlugin_IImport aCI( aFunction );
+  aCI.SetFileName( theFileName );
+  aCI.SetIsIgnoreUnits( theIsIgnoreUnits );
+
+  //Perform the Import
+  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
+
+  try {
+    OCC_CATCH_SIGNALS;
+    if( !GetSolver()->ComputeFunction( aFunction ) ) {
+      SetErrorCode( "Import driver failed" );
+      return NULL;
+    }
+    aSeq->Append(anImported);
+
+    // Greate material groups.
+    MakeMaterialGroups( anImported, aSeq );
+  }
+  catch( Standard_Failure ) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode( aFail->GetMessageString() );
+    return NULL;
+  }
+
+  //Make a Python command
+  GEOM::TPythonDump pd (aFunction);
+  if( theIsIgnoreUnits )
+    pd << aSeq << " = geompy.ImportSTEP(\"" << theFileName.ToCString() << "\", True)";
+  else
+    pd << aSeq << " = geompy.ImportSTEP(\"" << theFileName.ToCString() << "\")";
+  SetErrorCode(OK);
+
+  return aSeq;
+}
+
+//=============================================================================
+/*!
+ *  ReadValue
+ */
+//=============================================================================
+TCollection_AsciiString
+STEPPlugin_IOperations::ReadValue( const TCollection_AsciiString& theFileName,
+                                  const TCollection_AsciiString& theParameterName )
+{
+  SetErrorCode(KO);
+
+  TCollection_AsciiString aValue, anError;
+
+  if (theFileName.IsEmpty() || theParameterName.IsEmpty()) return aValue;
+
+  aValue = STEPPlugin_ImportDriver::GetValue( theFileName, theParameterName, anError );
+
+  if( aValue.IsEmpty() ) {
+    if( anError.IsEmpty() )
+      anError = theFileName + " doesn't contain requested parameter";
+    return aValue;
+  }
+  if (anError.IsEmpty())
+    SetErrorCode(OK);
+  else
+    SetErrorCode(anError.ToCString());
+
+  return aValue;
+}
diff --git a/src/STEPPlugin/STEPPlugin_IOperations.hxx b/src/STEPPlugin/STEPPlugin_IOperations.hxx
new file mode 100644 (file)
index 0000000..6d49998
--- /dev/null
@@ -0,0 +1,46 @@
+// Copyright (C) 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, or (at your option) any 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 : STEPPlugin_IOperations.hxx
+
+#ifndef _STEPPlugin_IOperations_HXX_
+#define _STEPPlugin_IOperations_HXX_
+
+// internal includes
+#include "STEPPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOMImpl_IBaseIEOperations.hxx"
+
+class STEPPLUGINENGINE_EXPORT STEPPlugin_IOperations: public GEOMImpl_IBaseIEOperations
+{
+public:
+  STEPPlugin_IOperations( GEOM_Engine*, int );
+  ~STEPPlugin_IOperations();
+
+  void ExportSTEP( const Handle(GEOM_Object),
+                  const TCollection_AsciiString& );
+  
+  Handle(TColStd_HSequenceOfTransient) ImportSTEP( const TCollection_AsciiString&,
+                                                  const bool );
+  
+  TCollection_AsciiString ReadValue( const TCollection_AsciiString&,
+                                    const TCollection_AsciiString& );
+};
+
+#endif
diff --git a/src/STEPPlugin/STEPPlugin_IOperations_i.cc b/src/STEPPlugin/STEPPlugin_IOperations_i.cc
new file mode 100644 (file)
index 0000000..1f4ded4
--- /dev/null
@@ -0,0 +1,128 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STEPPlugin_IOperations_i.hh"
+#include "STEPPlugin_IOperations.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+
+//=============================================================================
+/*!
+ *   constructor:
+ */
+//=============================================================================
+STEPPlugin_IOperations_i::STEPPlugin_IOperations_i( PortableServer::POA_ptr thePOA,
+                                                   GEOM::GEOM_Gen_ptr theEngine,
+                                                   STEPPlugin_IOperations* theImpl )
+:GEOM_IOperations_i( thePOA, theEngine, theImpl )
+{
+  MESSAGE( "STEPPlugin_IOperations_i::STEPPlugin_IOperations_i" );
+}
+
+//=============================================================================
+/*!
+ *  destructor
+ */
+//=============================================================================
+STEPPlugin_IOperations_i::~STEPPlugin_IOperations_i()
+{
+  MESSAGE( "STEPPlugin_IOperations_i::~STEPPlugin_IOperations_i" );
+}
+
+//=============================================================================
+/*!
+ *  ExportSTEP
+ *  Export a shape to STEP format
+ *  \param theOriginal The shape to export
+ *  \param theFileName The name of the exported file
+ */
+//=============================================================================
+void STEPPlugin_IOperations_i::ExportSTEP( GEOM::GEOM_Object_ptr theOriginal,
+                                          const char*           theFileName )
+{
+  // duplicate the original shape
+  GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate( theOriginal );
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference shape
+  Handle(GEOM_Object) anOriginal = GetObjectImpl( theOriginal );
+  if (anOriginal.IsNull()) return;
+
+  //Export the shape to the file
+  GetOperations()->ExportSTEP( anOriginal, theFileName );
+}
+
+//=============================================================================
+/*!
+ *  ImportSTEP
+ *  Import a shape from STEP format
+ *  \param theFileName The name of the file to import
+ *  \param theIsIgnoreUnits If True, file length units will be ignored (set to 'meter')
+ *                          and result model will be scaled, if its units are not meters.
+ *                          If False (default), file length units will be taken into account.
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* STEPPlugin_IOperations_i::ImportSTEP( const char* theFileName,
+                                                     const bool  theIsIgnoreUnits = false )
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Import the shape from the file
+  Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->ImportSTEP( theFileName, theIsIgnoreUnits );
+
+  if( !GetOperations()->IsDone() || aHSeq.IsNull() )
+    return aSeq._retn();
+
+  // Copy created objects.
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length( aLength );
+  for( Standard_Integer i = 1; i <= aLength; i++ )
+    aSeq[i-1] = GetObject( Handle(GEOM_Object)::DownCast( aHSeq->Value(i) ) );
+
+  return aSeq._retn();
+}
+
+//=============================================================================
+/*!
+ *  ReadValue
+ */
+//=============================================================================
+char* STEPPlugin_IOperations_i::ReadValue( const char* theFileName,
+                                          const char* theParameterName )
+{
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  TCollection_AsciiString aParam = GetOperations()->ReadValue( theFileName, theParameterName );
+
+  return CORBA::string_dup( aParam.ToCString() );
+}
+
+STEPPlugin_IOperations* STEPPlugin_IOperations_i::GetOperations()
+{
+  return (STEPPlugin_IOperations*)GetImpl();
+}
diff --git a/src/STEPPlugin/STEPPlugin_IOperations_i.hh b/src/STEPPlugin/STEPPlugin_IOperations_i.hh
new file mode 100644 (file)
index 0000000..41833f8
--- /dev/null
@@ -0,0 +1,53 @@
+// Copyright (C) 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, or (at your option) any 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 _STEPPlugin_IOperations_i_HeaderFile
+#define _STEPPlugin_IOperations_i_HeaderFile
+
+// idl includes
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER( GEOM_Gen )
+#include CORBA_SERVER_HEADER( STEPPlugin )
+
+// internal includes
+#include "STEPPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_IOperations_i.hh"
+
+class STEPPlugin_IOperations;
+
+class STEPPLUGINENGINE_EXPORT STEPPlugin_IOperations_i :
+      public virtual POA_GEOM::ISTEPOperations,
+      public virtual GEOM_IOperations_i
+{
+public:
+  STEPPlugin_IOperations_i( PortableServer::POA_ptr thePOA,
+                           GEOM::GEOM_Gen_ptr theEngine,
+                           STEPPlugin_IOperations* theImpl );
+  ~STEPPlugin_IOperations_i();
+
+  void            ExportSTEP( GEOM::GEOM_Object_ptr, const char* );
+  GEOM::ListOfGO* ImportSTEP( const char*, const bool );
+  char*           ReadValue( const char*, const char* );
+
+  STEPPlugin_IOperations* GetOperations();
+};
+
+#endif
diff --git a/src/STEPPlugin/STEPPlugin_ImportDriver.cxx b/src/STEPPlugin/STEPPlugin_ImportDriver.cxx
new file mode 100644 (file)
index 0000000..dc26023
--- /dev/null
@@ -0,0 +1,612 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STEPPlugin_ImportDriver.hxx"
+#include "STEPPlugin_IImport.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+#include <Basics_Utils.hxx>
+
+// GEOM includes
+#include "GEOM_Function.hxx"
+#include "GEOMImpl_Types.hxx"
+
+// OOCT includes
+#include <TDF_ChildIDIterator.hxx>
+#include <TDF_Label.hxx>
+#include <TDataStd_Name.hxx>
+#include <TDataStd_Comment.hxx>
+#include <TNaming_Builder.hxx>
+#include <TNaming_NamedShape.hxx>
+#include <Interface_EntityIterator.hxx>
+#include <Interface_Graph.hxx>
+#include <Interface_InterfaceModel.hxx>
+#include <Interface_Static.hxx>
+#include <STEPControl_Reader.hxx>
+#include <StepBasic_Product.hxx>
+#include <StepBasic_ProductDefinition.hxx>
+#include <StepBasic_ProductDefinitionFormation.hxx>
+#include <StepGeom_GeometricRepresentationItem.hxx>
+#include <StepShape_TopologicalRepresentationItem.hxx>
+#include <StepRepr_DescriptiveRepresentationItem.hxx>
+#include <StepRepr_ProductDefinitionShape.hxx>
+#include <StepRepr_PropertyDefinitionRepresentation.hxx>
+#include <StepRepr_Representation.hxx>
+#include <TransferBRep.hxx>
+#include <Transfer_TransientProcess.hxx>
+#include <XSControl_TransferReader.hxx>
+#include <XSControl_WorkSession.hxx>
+#include <BRep_Builder.hxx>
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopoDS_Compound.hxx>
+#include <TopoDS_Iterator.hxx>
+#include <TColStd_SequenceOfAsciiString.hxx>
+
+#include <StdFail_NotDone.hxx>
+#include <Standard_Failure.hxx>
+#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
+
+//=============================================================================
+/*!
+ *  GetShape()
+ */
+//=============================================================================
+
+TopoDS_Shape GetShape(const Handle(Standard_Transient)        &theEnti,
+                     const Handle(Transfer_TransientProcess) &theTP)
+{
+  TopoDS_Shape            aResult;
+  Handle(Transfer_Binder) aBinder = theTP->Find(theEnti);
+
+  if (aBinder.IsNull()) {
+    return aResult;
+  }
+
+  aResult = TransferBRep::ShapeResult(aBinder);
+
+  return aResult;
+}
+
+//=============================================================================
+/*!
+ *  GetLabel()
+ */
+//=============================================================================
+
+TDF_Label GetLabel(const Handle(Standard_Transient) &theEnti,
+                  const TDF_Label                  &theShapeLabel,
+                  const TopoDS_Shape               &aShape)
+{
+  TDF_Label aResult;
+
+  if (theEnti->IsKind
+            (STANDARD_TYPE(StepGeom_GeometricRepresentationItem))) {
+    // check all named shapes using iterator
+    TDF_ChildIDIterator anIt
+      (theShapeLabel, TDataStd_Name::GetID(), Standard_True);
+
+    for (; anIt.More(); anIt.Next()) {
+      Handle(TDataStd_Name) nameAttr =
+        Handle(TDataStd_Name)::DownCast(anIt.Value());
+
+      if (nameAttr.IsNull()) {
+        continue;
+      }
+
+      TDF_Label aLab = nameAttr->Label();
+      Handle(TNaming_NamedShape) shAttr;
+
+      if (aLab.FindAttribute(TNaming_NamedShape::GetID(), shAttr) &&
+          shAttr->Get().IsEqual(aShape)) {
+        aResult = aLab;
+      }
+    }
+  }
+
+  // create label and set shape
+  if (aResult.IsNull()) {
+    TDF_TagSource aTag;
+
+    aResult = aTag.NewChild(theShapeLabel);
+
+    TNaming_Builder tnBuild (aResult);
+
+    tnBuild.Generated(aShape);
+  }
+
+  return aResult;
+}
+
+//=============================================================================
+/*!
+ *  StoreName()
+ */
+//=============================================================================
+
+void StoreName( const Handle(Standard_Transient)        &theEnti,
+                const TopTools_IndexedMapOfShape        &theIndices,
+                const Handle(Transfer_TransientProcess) &theTP,
+                const TDF_Label                         &theShapeLabel)
+{
+  Handle(TCollection_HAsciiString) aName;
+
+  if (theEnti->IsKind(STANDARD_TYPE(StepShape_TopologicalRepresentationItem)) ||
+      theEnti->IsKind(STANDARD_TYPE(StepGeom_GeometricRepresentationItem))) {
+    aName = Handle(StepRepr_RepresentationItem)::DownCast(theEnti)->Name();
+  } else {
+    Handle(StepBasic_ProductDefinition) PD =
+      Handle(StepBasic_ProductDefinition)::DownCast(theEnti);
+
+    if (PD.IsNull() == Standard_False) {
+      Handle(StepBasic_Product) Prod = PD->Formation()->OfProduct();
+      aName = Prod->Name();
+    }
+  }
+
+  bool isValidName = false;
+
+  if (aName.IsNull() == Standard_False) {
+    isValidName = true;
+
+    if (aName->UsefullLength() < 1) {
+      isValidName = false;
+    } else if (aName->UsefullLength() == 4 &&
+               toupper (aName->Value(1)) == 'N' &&
+               toupper (aName->Value(2)) == 'O' &&
+               toupper (aName->Value(3)) == 'N' &&
+               toupper (aName->Value(4)) == 'E') {
+      // skip 'N0NE' name
+      isValidName = false;
+    } else {
+      // special check to pass names like "Open CASCADE STEP translator 6.3 1"
+      TCollection_AsciiString aSkipName ("Open CASCADE STEP translator");
+
+      if (aName->Length() >= aSkipName.Length()) {
+        if (aName->String().SubString
+                            (1, aSkipName.Length()).IsEqual(aSkipName)) {
+          isValidName = false;
+        }
+      }
+    }
+  }
+
+  if (isValidName) {
+    TCollection_ExtendedString aNameExt (aName->ToCString());
+
+    // find target shape
+    TopoDS_Shape S = GetShape(theEnti, theTP);
+
+    if (S.IsNull()) {
+      return;
+    }
+
+    // as PRODUCT can be included in the main shape
+    // several times, we look here for all iclusions.
+    Standard_Integer isub, nbSubs = theIndices.Extent();
+
+    for (isub = 1; isub <= nbSubs; isub++) {
+      TopoDS_Shape aSub = theIndices.FindKey(isub);
+
+      if (aSub.IsPartner(S)) {
+        TDF_Label L = GetLabel(theEnti, theShapeLabel, aSub);
+
+        // set a name
+        TDataStd_Name::Set(L, aNameExt);
+      }
+    }
+  }
+}
+
+//=============================================================================
+/*!
+ *  StoreMaterial()
+ */
+//=============================================================================
+
+void StoreMaterial( const Handle(Standard_Transient)        &theEnti,
+                    const TopTools_IndexedMapOfShape        &theIndices,
+                    const Handle(Transfer_TransientProcess) &theTP,
+                    const TDF_Label                         &theShapeLabel )
+{
+  // Treat Product Definition Shape only.
+  Handle(StepRepr_ProductDefinitionShape) aPDS =
+      Handle(StepRepr_ProductDefinitionShape)::DownCast(theEnti);
+  Handle(StepBasic_ProductDefinition)     aProdDef;
+
+  if(aPDS.IsNull() == Standard_False) {
+    // Product Definition Shape ==> Product Definition
+    aProdDef = aPDS->Definition().ProductDefinition();
+  }
+
+  if (aProdDef.IsNull() == Standard_False) {
+    // Product Definition ==> Property Definition
+    const Interface_Graph    &aGraph = theTP->Graph();
+    Interface_EntityIterator  aSubs  = aGraph.Sharings(aProdDef);
+    TopoDS_Shape              aShape;
+
+    for(aSubs.Start(); aSubs.More(); aSubs.Next()) {
+      Handle(StepRepr_PropertyDefinition) aPropD =
+        Handle(StepRepr_PropertyDefinition)::DownCast(aSubs.Value());
+
+      if(aPropD.IsNull() == Standard_False) {
+        // Property Definition ==> Representation.
+        Interface_EntityIterator aSubs1 = aGraph.Sharings(aPropD);
+
+        for(aSubs1.Start(); aSubs1.More(); aSubs1.Next()) {
+          Handle(StepRepr_PropertyDefinitionRepresentation) aPDR =
+            Handle(StepRepr_PropertyDefinitionRepresentation)::
+              DownCast(aSubs1.Value());
+
+          if(aPDR.IsNull() == Standard_False) {
+            // Property Definition ==> Material Name.
+            Handle(StepRepr_Representation) aRepr = aPDR->UsedRepresentation();
+
+            if(aRepr.IsNull() == Standard_False) {
+              Standard_Integer ir;
+
+              for(ir = 1; ir <= aRepr->NbItems(); ir++) {
+                Handle(StepRepr_RepresentationItem) aRI = aRepr->ItemsValue(ir);
+                Handle(StepRepr_DescriptiveRepresentationItem) aDRI =
+                  Handle(StepRepr_DescriptiveRepresentationItem)::DownCast(aRI);
+
+                if(aDRI.IsNull() == Standard_False) {
+                  // Get shape from Product Definition
+                  Handle(TCollection_HAsciiString) aMatName = aDRI->Name();
+
+                  if(aMatName.IsNull() == Standard_False) {
+                    TCollection_ExtendedString
+                                 aMatNameExt (aMatName->ToCString());
+
+                    if (aShape.IsNull()) {
+                      // Get the shape.
+                      aShape = GetShape(aProdDef, theTP);
+
+                      if (aShape.IsNull()) {
+                        return;
+                      }
+                    }
+
+                    // as PRODUCT can be included in the main shape
+                    // several times, we look here for all iclusions.
+                    Standard_Integer isub, nbSubs = theIndices.Extent();
+
+                    for (isub = 1; isub <= nbSubs; isub++) {
+                      TopoDS_Shape aSub = theIndices.FindKey(isub);
+
+                      if (aSub.IsPartner(aShape)) {
+                        TDF_Label aLabel =
+                          GetLabel(aProdDef, theShapeLabel, aSub);
+
+                        // set a name
+                        TDataStd_Comment::Set(aLabel, aMatNameExt);
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}
+
+//=======================================================================
+//function : GetID
+//purpose  :
+//=======================================================================
+const Standard_GUID& STEPPlugin_ImportDriver::GetID()
+{
+  static Standard_GUID aGUID("a25f88df-461b-45c0-ab6b-a82101fe6ce7");
+  return aGUID;
+}
+
+//=======================================================================
+//function : STEPPlugin_ImportDriver
+//purpose  :
+//=======================================================================
+STEPPlugin_ImportDriver::STEPPlugin_ImportDriver()
+{
+}
+
+//=======================================================================
+//function : Execute
+//purpose  :
+//=======================================================================
+Standard_Integer STEPPlugin_ImportDriver::Execute( TFunction_Logbook& log ) const
+{
+  if( Label().IsNull() ) return 0;
+  Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
+
+  STEPPlugin_IImport aData( aFunction );
+
+  TCollection_AsciiString aFileName = aData.GetFileName().ToCString();
+  bool anIsIgnoreUnits = aData.GetIsIgnoreUnits();
+  TDF_Label aShapeLabel = aFunction->GetNamingEntry();
+
+  MESSAGE("Import STEP from file " << aFileName.ToCString() );
+
+  TopoDS_Shape aResShape;
+  TCollection_AsciiString anError;
+
+  // Set "C" numeric locale to save numbers correctly
+  Kernel_Utils::Localizer loc;
+
+  STEPControl_Reader aReader;
+
+  //VSR: 16/09/09: Convert to METERS
+  Interface_Static::SetCVal("xstep.cascade.unit","M");
+  Interface_Static::SetIVal("read.step.ideas", 1);
+  Interface_Static::SetIVal("read.step.nonmanifold", 1);
+
+  BRep_Builder B;
+  TopoDS_Compound compound;
+  B.MakeCompound(compound);
+
+  try
+  {
+    OCC_CATCH_SIGNALS;
+    IFSelect_ReturnStatus status = aReader.ReadFile(aFileName.ToCString());
+    if (status == IFSelect_RetDone) {
+      // Regard or not the model units
+      if( anIsIgnoreUnits ) {
+        // set UnitFlag to units from file
+        TColStd_SequenceOfAsciiString anUnitLengthNames;
+        TColStd_SequenceOfAsciiString anUnitAngleNames;
+        TColStd_SequenceOfAsciiString anUnitSolidAngleNames;
+        aReader.FileUnits(anUnitLengthNames, anUnitAngleNames, anUnitSolidAngleNames);
+        if (anUnitLengthNames.Length() > 0) {
+          TCollection_AsciiString aLenUnits = anUnitLengthNames.First();
+          if (aLenUnits == "millimetre")
+            Interface_Static::SetCVal("xstep.cascade.unit", "MM");
+          else if (aLenUnits == "centimetre")
+            Interface_Static::SetCVal("xstep.cascade.unit", "CM");
+          else if (aLenUnits == "metre" || aLenUnits.IsEmpty())
+            Interface_Static::SetCVal("xstep.cascade.unit", "M");
+          else if (aLenUnits == "INCH")
+            Interface_Static::SetCVal("xstep.cascade.unit", "INCH");
+          else {
+            anError = "The file contains not supported units.";
+          }
+          // TODO (for other units than mm, cm, m or inch)
+          // else if (aLenUnits == "")
+          // Interface_Static::SetCVal("xstep.cascade.unit", "???");
+        }
+      }
+      else {
+        // Need re-scale a model (set UnitFlag to 'meter')
+        Interface_Static::SetCVal("xstep.cascade.unit","M");
+      }
+
+      Standard_Boolean failsonly = Standard_False;
+      aReader.PrintCheckLoad(failsonly, IFSelect_ItemsByEntity);
+
+      // Root transfers
+      Standard_Integer nbr = aReader.NbRootsForTransfer();
+      aReader.PrintCheckTransfer(failsonly, IFSelect_ItemsByEntity);
+
+      for (Standard_Integer n = 1; n <= nbr; n++) {
+        Standard_Boolean ok = aReader.TransferRoot(n);
+        // Collecting resulting entities
+        Standard_Integer nbs = aReader.NbShapes();
+        if (!ok || nbs == 0)
+          continue; // skip empty root
+
+        // For a single entity
+        else if (nbr == 1 && nbs == 1) {
+          aResShape = aReader.Shape(1);
+          if (aResShape.ShapeType() == TopAbs_COMPOUND) {
+            int nbSub1 = 0;
+            TopoDS_Shape currShape;
+            TopoDS_Iterator It (aResShape, Standard_True, Standard_True);
+            for (; It.More(); It.Next()) {
+              nbSub1++;
+              currShape = It.Value();
+            }
+            if (nbSub1 == 1)
+              aResShape = currShape;
+          }
+          break;
+        }
+
+        for (Standard_Integer i = 1; i <= nbs; i++) {
+          TopoDS_Shape aShape = aReader.Shape(i);
+          if (aShape.IsNull())
+            continue;
+          else
+            B.Add(compound, aShape);
+        }
+      }
+      if( aResShape.IsNull() )
+        aResShape = compound;
+
+      // Check if any BRep entity has been read, there must be at least a vertex
+      if ( !TopExp_Explorer( aResShape, TopAbs_VERTEX ).More() )
+        anError = "No geometrical data in the imported file.";
+
+      // BEGIN: Store names and materials of sub-shapes from file
+      TopTools_IndexedMapOfShape anIndices;
+      TopExp::MapShapes(aResShape, anIndices);
+
+      Handle(Interface_InterfaceModel) Model = aReader.WS()->Model();
+      Handle(XSControl_TransferReader) TR = aReader.WS()->TransferReader();
+      if (!TR.IsNull()) {
+        Handle(Transfer_TransientProcess) TP = TR->TransientProcess();
+
+        Standard_Integer nb = Model->NbEntities();
+
+        for (Standard_Integer ie = 1; ie <= nb; ie++) {
+          Handle(Standard_Transient) enti = Model->Value(ie);
+
+          // Store names.
+          StoreName(enti, anIndices, TP, aShapeLabel);
+
+          // Store materials.
+          StoreMaterial(enti, anIndices, TP, aShapeLabel);
+        }
+      }
+      // END: Store names and materials
+    }
+    else {
+      switch (status) {
+        case IFSelect_RetVoid:
+          anError = "Nothing created or No data to process";
+          break;
+        case IFSelect_RetError:
+          anError = "Error in command or input data";
+          break;
+        case IFSelect_RetFail:
+          anError = "Execution was run, but has failed";
+          break;
+        case IFSelect_RetStop:
+          anError = "Execution has been stopped. Quite possible, an exception was raised";
+          break;
+        default:
+          break;
+      }
+      anError = "Wrong format of the imported file. Can't import file.";
+      aResShape.Nullify();
+    }
+  }
+  catch( Standard_Failure ) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    anError = aFail->GetMessageString();
+    aResShape.Nullify();
+  }
+
+  if( aResShape.IsNull() ) {
+    StdFail_NotDone::Raise( anError.ToCString() );
+    return 0;
+  }
+
+  aFunction->SetValue( aResShape );
+
+  log.SetTouched( Label() );
+
+  return 1;
+}
+
+//=======================================================================
+//function : MustExecute
+//purpose  :
+//=======================================================================
+Standard_Boolean STEPPlugin_ImportDriver::MustExecute( const TFunction_Logbook& ) const
+{
+  return Standard_True;
+}
+
+//================================================================================
+/*!
+ * \brief Returns a name of creation operation and names and values of creation parameters
+ */
+//================================================================================
+
+bool STEPPlugin_ImportDriver::
+GetCreationInformation( std::string&             theOperationName,
+                        std::vector<GEOM_Param>& theParams )
+{
+  if( Label().IsNull() ) return 0;
+  Handle(GEOM_Function) function = GEOM_Function::GetFunction( Label() );
+
+  STEPPlugin_IImport aCI( function );
+  Standard_Integer aType = function->GetType();
+
+  theOperationName = "ImportSTEP";
+
+  switch ( aType ) {
+  case IMPORT_SHAPE:
+    AddParam( theParams, "File name", aCI.GetFileName() );
+    if( aCI.GetIsIgnoreUnits() )
+      AddParam( theParams, "Format", "STEP_SCALE" );
+    break;
+  default:
+    return false;
+  }
+  return true;
+}
+
+TCollection_AsciiString
+STEPPlugin_ImportDriver::GetValue( const TCollection_AsciiString& theFileName,
+                                     const TCollection_AsciiString& theParameterName,
+                                     TCollection_AsciiString&       theError )
+{
+  Handle(TCollection_HAsciiString) aValue;
+
+  if (theParameterName != "LEN_UNITS") {
+    theError = theParameterName + " parameter reading is not supported by STEP plugin";
+    return TCollection_AsciiString();
+  }
+
+  // Set "C" numeric locale to save numbers correctly
+  Kernel_Utils::Localizer loc;
+
+  STEPControl_Reader aReader;
+
+  Interface_Static::SetCVal( "xstep.cascade.unit","M" );
+  Interface_Static::SetIVal( "read.step.ideas", 1 );
+  Interface_Static::SetIVal( "read.step.nonmanifold", 1 );
+
+  try {
+    OCC_CATCH_SIGNALS;
+    IFSelect_ReturnStatus status = aReader.ReadFile( theFileName.ToCString() );
+    if (status == IFSelect_RetDone) {
+      TColStd_SequenceOfAsciiString anUnitLengthNames;
+      TColStd_SequenceOfAsciiString anUnitAngleNames;
+      TColStd_SequenceOfAsciiString anUnitSolidAngleNames;
+      aReader.FileUnits(anUnitLengthNames, anUnitAngleNames, anUnitSolidAngleNames);
+      if (anUnitLengthNames.Length() > 0) {
+        aValue = new TCollection_HAsciiString( anUnitLengthNames.First() );
+        /*
+        TCollection_AsciiString aLenUnits = anUnitLengthNames.First();
+        if (aLenUnits == "millimetre")
+          aValue = new TCollection_HAsciiString ("MM");
+        else if (aLenUnits == "centimetre")
+          aValue = new TCollection_HAsciiString ("CM");
+        else if (aLenUnits == "metre")
+          aValue = new TCollection_HAsciiString ("M");
+        else if (aLenUnits == "INCH")
+          aValue = new TCollection_HAsciiString ("INCH");
+        // TODO (for other units than mm, cm, m or inch)
+        //else if (aLenUnits == "")
+        //  aValue = new TCollection_HAsciiString ("");
+        */
+      }
+    }
+    else {
+      theError = theFileName + " reading failed";
+    }
+  }
+  catch( Standard_Failure ) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    theError = aFail->GetMessageString();
+  }
+  if (!aValue.IsNull())
+    return aValue->String();
+  else
+    return TCollection_AsciiString();
+}
+
+
+IMPLEMENT_STANDARD_HANDLE( STEPPlugin_ImportDriver, GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( STEPPlugin_ImportDriver, GEOM_BaseDriver );
diff --git a/src/STEPPlugin/STEPPlugin_ImportDriver.hxx b/src/STEPPlugin/STEPPlugin_ImportDriver.hxx
new file mode 100644 (file)
index 0000000..40bb7b1
--- /dev/null
@@ -0,0 +1,53 @@
+// Copyright (C) 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, or (at your option) any 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 _STEPPlugin_ImportDriver_HXX
+#define _STEPPlugin_ImportDriver_HXX
+
+// GEOM includes
+#include "GEOM_BaseDriver.hxx"
+
+// OCCT includes
+#include <TFunction_Logbook.hxx>
+
+DEFINE_STANDARD_HANDLE( STEPPlugin_ImportDriver, GEOM_BaseDriver );
+
+class STEPPlugin_ImportDriver : public GEOM_BaseDriver
+{
+public:
+  STEPPlugin_ImportDriver();
+  ~STEPPlugin_ImportDriver() {};
+
+  static const Standard_GUID& GetID();
+  virtual Standard_Integer    Execute( TFunction_Logbook& log ) const;
+  Standard_Boolean            MustExecute( const TFunction_Logbook& ) const;
+  virtual void                Validate( TFunction_Logbook& ) const {}
+  virtual bool                GetCreationInformation( std::string&             theOperationName,
+                                                     std::vector<GEOM_Param>& params );
+  
+  static 
+  TCollection_AsciiString     GetValue( const TCollection_AsciiString&,
+                                       const TCollection_AsciiString&,
+                                       TCollection_AsciiString& );
+
+DEFINE_STANDARD_RTTI( STEPPlugin_ImportDriver )
+};
+
+#endif // _STEPPlugin_ImportDriver_HXX
diff --git a/src/STEPPlugin/STEPPlugin_OperationsCreator.cxx b/src/STEPPlugin/STEPPlugin_OperationsCreator.cxx
new file mode 100644 (file)
index 0000000..d3d31a1
--- /dev/null
@@ -0,0 +1,74 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STEPPlugin_OperationsCreator.hxx"
+#include "STEPPlugin_IOperations_i.hh"
+#include "STEPPlugin_IOperations.hxx"
+#include "STEPPlugin_ExportDriver.hxx"
+#include "STEPPlugin_ImportDriver.hxx"
+#include "STEPPlugin_IECallBack.hxx"
+
+// KERNEL includes
+#include <Utils_ExceptHandlers.hxx>
+#include <utilities.h>
+
+// GEOM includes
+#include "GEOMImpl_IECallBack.hxx"
+
+// OCCT includes
+#include <TFunction_DriverTable.hxx>
+
+std::map <int, STEPPlugin_IOperations*> STEPPlugin_OperationsCreator::_mapOfOperations;
+
+STEPPlugin_OperationsCreator::STEPPlugin_OperationsCreator()
+{
+  // Register drivers
+  TFunction_DriverTable::Get()->AddDriver( STEPPlugin_ExportDriver::GetID(),
+                                          new STEPPlugin_ExportDriver() );
+  TFunction_DriverTable::Get()->AddDriver( STEPPlugin_ImportDriver::GetID(),
+                                          new STEPPlugin_ImportDriver() );
+  
+  // Register callback
+  STEPPlugin_IECallBack* callback = new STEPPlugin_IECallBack();
+  GEOMImpl_IECallBack::Register( "STEP",       callback );
+  GEOMImpl_IECallBack::Register( "STEP_SCALE", callback );
+}
+
+STEPPlugin_OperationsCreator::~STEPPlugin_OperationsCreator()
+{
+}
+
+GEOM_IOperations_i* STEPPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
+                                                          int                     theStudyId,
+                                                          GEOM::GEOM_Gen_ptr      theEngine,
+                                                          ::GEOMImpl_Gen*         theGenImpl )
+{
+  Unexpect aCatch( SALOME_SalomeException );
+  MESSAGE( "STEPPlugin_OperationsCreator::Create" );
+  return new STEPPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+}
+
+STEPPlugin_IOperations* STEPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
+                                                          int             theStudyId )
+{
+  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
+    _mapOfOperations[theStudyId] = new STEPPlugin_IOperations( theGenImpl, theStudyId );
+  return _mapOfOperations[theStudyId];
+}
diff --git a/src/STEPPlugin/STEPPlugin_OperationsCreator.hxx b/src/STEPPlugin/STEPPlugin_OperationsCreator.hxx
new file mode 100755 (executable)
index 0000000..5e3cb95
--- /dev/null
@@ -0,0 +1,58 @@
+// Copyright (C) 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, or (at your option) any 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 _GEOM_STEPPlugin_OperationsCreator_HXX_
+#define _GEOM_STEPPlugin_OperationsCreator_HXX_
+
+// internal includes
+#include "STEPPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_Gen_i.hh"
+
+// C++ includes
+#include <map>
+
+class STEPPlugin_IOperations;
+
+//=====================================================================
+// Operations creator
+//=====================================================================
+class STEPPLUGINENGINE_EXPORT STEPPlugin_OperationsCreator : public GEOM_GenericOperationsCreator
+{
+public:
+  STEPPlugin_OperationsCreator();
+  ~STEPPlugin_OperationsCreator();
+
+  GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
+                             int                     theStudyId,
+                             GEOM::GEOM_Gen_ptr      theEngine,
+                             ::GEOMImpl_Gen*         theGenImpl );
+
+private:
+  static STEPPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
+                                     int                     theStudyId );
+
+private:
+  static std::map <int, STEPPlugin_IOperations*>  _mapOfOperations;
+
+  friend class STEPPlugin_IECallBack;
+};
+
+#endif
diff --git a/src/STEPPlugin/STEPPlugin_msg_en.ts b/src/STEPPlugin/STEPPlugin_msg_en.ts
new file mode 100644 (file)
index 0000000..d24fc90
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTSTEP</source>
+        <translation>STEP</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTSTEP</source>
+        <translation>Export STEP</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTSTEP</source>
+        <translation>Export STEP</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTSTEP</source>
+        <translation>STEP</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTSTEP</source>
+        <translation>Import STEP</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTSTEP</source>
+        <translation>Import STEP</translation>
+    </message>
+</context>
+<context>
+    <name>STEPPlugin_GUI</name>
+    <message>
+        <source>STEP_FILES</source>
+        <translation>STEP Files ( *.step *.stp )</translation>
+    </message>
+    <message>
+        <source>EXPORT_TITLE</source>
+        <translation>Export STEP</translation>
+    </message>
+    <message>
+        <source>IMPORT_TITLE</source>
+        <translation>Import STEP</translation>
+    </message>
+    <message>
+        <source>SCALE_DIMENSIONS</source>
+        <translation>Take into account the units (%1) embedded to the file?
+Ignoring units will cause model scaling (as dimensions are supposed to be specified in meters).</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/STEPPlugin/STEPPlugin_msg_fr.ts b/src/STEPPlugin/STEPPlugin_msg_fr.ts
new file mode 100644 (file)
index 0000000..077fc09
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTSTEP</source>
+        <translation>STEP</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTSTEP</source>
+        <translation>Exporter STEP</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTSTEP</source>
+        <translation>Exporter STEP</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTSTEP</source>
+        <translation>STEP</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTSTEP</source>
+        <translation>Importer STEP</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTSTEP</source>
+        <translation>Importer STEP</translation>
+    </message>
+</context>
+<context>
+    <name>STEPPlugin_GUI</name>
+    <message>
+        <source>STEP_FILES</source>
+        <translation>STEP Fichiers ( *.step *.stp )</translation>
+    </message>
+    <message>
+        <source>EXPORT_TITLE</source>
+        <translation>Exporter STEP</translation>
+    </message>
+    <message>
+        <source>IMPORT_TITLE</source>
+        <translation>Importer STEP</translation>
+    </message>
+    <message>
+        <source>SCALE_DIMENSIONS</source>
+        <translation>Voulez-vous prendre les unités du fichier (%1) en considération?
+Sinon le modèle sera mis à l&apos;échelle GEOM (unités interprétées comme des mètres).</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/STEPPlugin/STEPPlugin_msg_ja.ts b/src/STEPPlugin/STEPPlugin_msg_ja.ts
new file mode 100644 (file)
index 0000000..459ee34
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ja" sourcelanguage="en">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTSTEP</source>
+        <translation type="unfinished">STEP</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTSTEP</source>
+        <translation type="unfinished">Export STEP</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTSTEP</source>
+        <translation type="unfinished">Export STEP</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTSTEP</source>
+        <translation type="unfinished">STEP</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTSTEP</source>
+        <translation type="unfinished">Import STEP</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTSTEP</source>
+        <translation type="unfinished">Import STEP</translation>
+    </message>
+</context>
+<context>
+    <name>STEPPlugin_GUI</name>
+    <message>
+        <source>STEP_FILES</source>
+        <translation type="unfinished">STEP Files ( *.step *.stp )</translation>
+    </message>
+    <message>
+        <source>EXPORT_TITLE</source>
+        <translation type="unfinished">Export STEP</translation>
+    </message>
+    <message>
+        <source>IMPORT_TITLE</source>
+        <translation type="unfinished">Import STEP</translation>
+    </message>
+    <message>
+        <source>SCALE_DIMENSIONS</source>
+        <translation>インポートしたファイルの単位をミリメートルからメートルに変換しますか?いいえを選んだ場合、メートル単位として解釈します。</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/STLExport/CMakeLists.txt b/src/STLExport/CMakeLists.txt
deleted file mode 100755 (executable)
index ce8046f..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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, or (at your option) any 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
-#
-
-# --- options ---
-
-# additional include directories
-INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
-  ${PTHREAD_INCLUDE_DIR}
-  ${KERNEL_INCLUDE_DIRS}
-  )
-
-# additional preprocessor / compiler flags
-ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
-  )
-
-# libraries to link to
-SET(_link_LIBRARIES
-  ${CAS_TKSTL}
-  ${KERNEL_SALOMELocalTrace}
-  )
-
-# --- sources ---
-
-SET(STLExport_SOURCES
-  STLExport.cxx
-  )
-
-# --- rules ---
-
-ADD_LIBRARY(STLExport ${STLExport_SOURCES})
-TARGET_LINK_LIBRARIES(STLExport ${_link_LIBRARIES})
-INSTALL(TARGETS STLExport EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-
-
diff --git a/src/STLExport/STLExport.cxx b/src/STLExport/STLExport.cxx
deleted file mode 100644 (file)
index dc0dfb6..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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:        STLExport.cxx
-// Created:     Wed May 19 14:53:52 2004
-// Author:      Pavel TELKOV
-//              <ptv@mutex.nnov.opencascade.com>
-//
-#include "utilities.h"
-
-#include <StlAPI_Writer.hxx>
-
-#include <TCollection_AsciiString.hxx>
-#include <TopoDS_Shape.hxx>
-
-#ifdef WIN32
-# if defined STLEXPORT_EXPORTS || defined STLExport_EXPORTS
-#  define STLEXPORT_EXPORT __declspec( dllexport )
-# else
-#  define STLEXPORT_EXPORT __declspec( dllimport )
-# endif
-#else
-# define STLEXPORT_EXPORT
-#endif
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-extern "C"
-{
-  STLEXPORT_EXPORT
-  int Export(const TopoDS_Shape& theShape,
-             const TCollection_AsciiString& theFileName,
-             const TCollection_AsciiString& theFormatName)
-  {
-    MESSAGE("Export STL into file " << theFileName.ToCString());
-
-    try
-    {
-      StlAPI_Writer aWriter;
-      bool aIsASCIIMode;
-      aIsASCIIMode = (theFormatName.IsEqual("STL_ASCII")) ? true : false;
-      aWriter.ASCIIMode() = aIsASCIIMode;
-      aWriter.Write(theShape, theFileName.ToCString()) ;
-      return 1;
-    }
-    catch(Standard_Failure)
-    {
-      //THROW_SALOME_CORBA_EXCEPTION("Exception catched in STLExport", SALOME::BAD_PARAM);
-    }
-    return 0;
-  }
-}
diff --git a/src/STLImport/CMakeLists.txt b/src/STLImport/CMakeLists.txt
deleted file mode 100755 (executable)
index 54750b8..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-# 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, or (at your option) any 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
-#
-
-# --- options ---
-
-# additional include directories
-INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
-  ${PTHREAD_INCLUDE_DIR}
-  ${KERNEL_INCLUDE_DIRS}
-  )
-
-# additional preprocessor / compiler flags
-ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
-  )
-
-# libraries to link to
-SET(_link_LIBRARIES
-  ${CAS_TKSTL}
-  ${KERNEL_SALOMELocalTrace}
-  ${CAS_TKTopAlgo}
-  ${CAS_TKBRep}
-  ${CAS_TKG3d}
-  )
-
-# --- sources ---
-
-SET(STLImport_SOURCES
-  STLImport.cxx
-  )
-
-# --- rules ---
-
-ADD_LIBRARY(STLImport ${STLImport_SOURCES})
-TARGET_LINK_LIBRARIES(STLImport ${_link_LIBRARIES})
-INSTALL(TARGETS STLImport EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-
-
diff --git a/src/STLImport/STLImport.cxx b/src/STLImport/STLImport.cxx
deleted file mode 100755 (executable)
index 0b4189e..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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:        STLImport.cxx
-// Author:      Sergey KHROMOV
-
-
-#include "utilities.h"
-#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepClass3d_SolidClassifier.hxx>
-#include <Precision.hxx>
-#include <StlAPI_Reader.hxx>
-#include <TCollection_AsciiString.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <TopoDS.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TDF_Label.hxx>
-
-
-#ifdef WIN32
-  #if defined STLIMPORT_EXPORTS || defined STLImport_EXPORTS
-    #define STLIMPORT_EXPORT __declspec( dllexport )
-  #else
-    #define STLIMPORT_EXPORT __declspec( dllimport )
-  #endif
-#else
-  #define STLIMPORT_EXPORT
-#endif
-
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-extern "C"
-{
-STLIMPORT_EXPORT
-  TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
-                       const TCollection_AsciiString& /*theFormatName*/,
-                       TCollection_AsciiString&       theError,
-                       const TDF_Label&)
-  {
-    MESSAGE("Import STL from file " << theFileName.ToCString());
-
-    StlAPI_Reader aReader;
-    TopoDS_Shape aShape;
-
-    aReader.Read(aShape, theFileName.ToCString());
-
-    if (aShape.IsNull()) {
-      theError = "STL Import failed";
-    } else {
-      // Fix the orientation of closed shell or solid.
-      if (BRep_Tool::IsClosed(aShape)) {
-        TopAbs_ShapeEnum aType = aShape.ShapeType();
-
-        if (aType == TopAbs_SHELL || aType == TopAbs_SOLID) {
-          TopoDS_Solid aSolid;
-
-          if (aType == TopAbs_SHELL) {
-            // Create a solid.
-            BRep_Builder aBuilder;
-
-            aBuilder.MakeSolid(aSolid);
-            aBuilder.Add(aSolid, aShape);
-          } else {
-            aSolid = TopoDS::Solid(aShape);
-          }
-
-          // Classify infinite point against solid.
-          BRepClass3d_SolidClassifier aClassifier(aSolid);
-
-          aClassifier.PerformInfinitePoint(Precision::Confusion());
-
-          if (aClassifier.State() == TopAbs_IN) {
-            // The shape is inverted. Reverse it.
-            aShape.Reverse();
-          }
-        }
-      }
-    }
-
-    return aShape;
-  }
-}
diff --git a/src/STLPlugin/CMakeLists.txt b/src/STLPlugin/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b4688f6
--- /dev/null
@@ -0,0 +1,154 @@
+# Copyright (C) 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, or (at your option) any 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(SALOME_BUILD_GUI)
+  INCLUDE(UseQt4Ext)
+  INCLUDE(${QT_USE_FILE})
+ENDIF()
+
+# --- options ---
+
+# additional include directories
+INCLUDE_DIRECTORIES(
+  ${CAS_INCLUDE_DIRS}
+  ${KERNEL_INCLUDE_DIRS}
+  ${PROJECT_BINARY_DIR}/idl
+  ${PROJECT_SOURCE_DIR}/src/GEOMAlgo
+  ${PROJECT_SOURCE_DIR}/src/GEOM
+  ${PROJECT_SOURCE_DIR}/src/GEOMImpl
+  ${PROJECT_SOURCE_DIR}/src/GEOM_I
+  ${PROJECT_SOURCE_DIR}/src/GEOMClient
+  ${PROJECT_SOURCE_DIR}/src/GEOMUtils
+  )
+  
+IF(SALOME_BUILD_GUI)
+  INCLUDE_DIRECTORIES(
+    ${QT_INCLUDE_DIRS}
+    ${GUI_INCLUDE_DIRS}
+    ${PROJECT_SOURCE_DIR}/src/OBJECT
+    ${PROJECT_SOURCE_DIR}/src/GEOMGUI
+    ${PROJECT_SOURCE_DIR}/src/GEOMBase
+    )
+ENDIF()
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(
+  ${CAS_DEFINITIONS}
+  ${OMNIORB_DEFINITIONS}
+  )
+  
+IF(WIN32)
+  ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
+  
+IF(SALOME_BUILD_GUI)
+ADD_DEFINITIONS(
+  ${QT_DEFINITIONS}
+  )
+ENDIF()
+
+# libraries to link to
+SET(_link_engine_LIBRARIES
+  ${CAS_TKSTL}
+  ${KERNEL_SALOMELocalTrace}
+  ${KERNEL_OpUtil}
+  SalomeIDLGEOM
+  SalomeIDLSTLPlugin
+  GEOMEngine
+  GEOMClient
+  )
+  
+IF(SALOME_BUILD_GUI)
+  SET(_link_gui_LIBRARIES
+    SalomeIDLSTLPlugin
+    GEOMObject
+    GEOM
+    GEOMBase
+    )
+ENDIF()
+
+
+# --- headers ---
+
+SET(STLPluginEngine_HEADERS
+  STLPlugin_IOperations_i.hh
+  STLPlugin_Engine.hxx
+  STLPlugin_OperationsCreator.hxx
+  STLPlugin_IOperations.hxx
+  STLPlugin_IExport.hxx 
+  STLPlugin_IImport.hxx
+  STLPlugin_ImportDriver.hxx 
+  STLPlugin_ExportDriver.hxx
+  STLPlugin_IECallBack.hxx
+  )
+
+IF(SALOME_BUILD_GUI)  
+  # header files / to be processed by moc
+  SET(_moc_HEADERS
+    STLPlugin_GUI.h
+    STLPlugin_ExportDlg.h
+    )
+ENDIF()
+
+# --- sources ---
+
+IF(SALOME_BUILD_GUI)
+  # sources / moc wrappings
+  QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+
+  SET(STLPluginGUI_SOURCES
+    STLPlugin_GUI.cxx
+    STLPlugin_ExportDlg.cxx
+    ${_moc_SOURCES}
+    )
+ENDIF()
+  
+SET(STLPluginEngine_SOURCES
+  STLPlugin_Engine.cxx
+  STLPlugin_OperationsCreator.cxx
+  STLPlugin_IOperations_i.cc
+  STLPlugin_IOperations.cxx
+  STLPlugin_ExportDriver.cxx
+  STLPlugin_ImportDriver.cxx
+  STLPlugin_IECallBack.cxx
+  )
+  
+# resource files / to be processed by lrelease
+SET(STLPlugin_RESOURCES
+  STLPlugin_msg_en.ts
+  STLPlugin_msg_fr.ts
+  STLPlugin_msg_ja.ts
+  )
+
+# --- rules ---
+
+ADD_LIBRARY(STLPluginEngine ${STLPluginEngine_SOURCES})
+TARGET_LINK_LIBRARIES(STLPluginEngine ${_link_engine_LIBRARIES})
+INSTALL(TARGETS STLPluginEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+IF(SALOME_BUILD_GUI)
+  ADD_LIBRARY(STLPluginGUI ${STLPluginGUI_SOURCES})
+  TARGET_LINK_LIBRARIES(STLPluginGUI ${_link_gui_LIBRARIES})
+  INSTALL(TARGETS STLPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+  
+  QT4_INSTALL_TS_RESOURCES("${STLPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
+ENDIF()
+
+
+INSTALL(FILES ${STLPluginEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
diff --git a/src/STLPlugin/STLPlugin_Engine.cxx b/src/STLPlugin/STLPlugin_Engine.cxx
new file mode 100644 (file)
index 0000000..49fb94c
--- /dev/null
@@ -0,0 +1,31 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STLPlugin_Engine.hxx"
+#include "STLPlugin_OperationsCreator.hxx"
+
+extern "C"
+{
+  STLPLUGINENGINE_EXPORT
+  GEOM_GenericOperationsCreator* GetOperationsCreator()
+  {
+    return new STLPlugin_OperationsCreator();
+  }
+}
diff --git a/src/STLPlugin/STLPlugin_Engine.hxx b/src/STLPlugin/STLPlugin_Engine.hxx
new file mode 100755 (executable)
index 0000000..df3244f
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 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, or (at your option) any 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 _STLPLUGIN_ENGINE_HXX_
+#define _STLPLUGIN_ENGINE_HXX_
+
+#ifdef WIN32
+ #if defined STLPLUGINENGINE_EXPORTS || defined STLPluginEngine_EXPORTS
+   #define STLPLUGINENGINE_EXPORT __declspec( dllexport )
+ #else
+   #define STLPLUGINENGINE_EXPORT __declspec( dllimport )
+ #endif 
+#else
+   #define STLPLUGINENGINE_EXPORT
+#endif
+
+#endif
diff --git a/src/STLPlugin/STLPlugin_ExportDlg.cxx b/src/STLPlugin/STLPlugin_ExportDlg.cxx
new file mode 100644 (file)
index 0000000..8d16f23
--- /dev/null
@@ -0,0 +1,196 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STLPlugin_ExportDlg.h"
+
+// GUI includes
+#include <SUIT_Session.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_ViewManager.h>
+
+#include <SalomeApp_Application.h>
+#include <SalomeApp_DoubleSpinBox.h>
+#include <SalomeApp_Study.h>
+
+// GEOM includes
+#include "GEOMBase.h"
+#include "GEOM_Constants.h"
+
+// OCC includes
+#include <BRepBndLib.hxx>
+
+// QT includes
+#include <QApplication>
+#include <QLabel>
+#include <QLayout>
+#include <QComboBox>
+#include <QCheckBox>
+
+//=================================================================================
+// Constructor
+//=================================================================================
+STLPlugin_ExportDlg::STLPlugin_ExportDlg( const Handle(SALOME_InteractiveObject)& io, QWidget* parent )
+: SUIT_FileDlg( parent, false, true, true )
+{
+  SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+
+  QLabel* deflectionLabel = new QLabel( tr( "DEFLECTION" ), this );
+
+  QWidget* options = new QWidget( this );
+  QHBoxLayout* optionsLayout = new QHBoxLayout( options );
+  optionsLayout->setMargin( 0 );
+  optionsLayout->setSpacing( 5 );
+
+  myDeflectionSB = new SalomeApp_DoubleSpinBox( options );
+  int aPrecision = resMgr->integerValue( "Geometry", "parametric_precision", 6 );
+  myDeflectionSB->setAcceptNames( false );
+  myDeflectionSB->setPrecision( aPrecision );
+  myDeflectionSB->setDecimals( aPrecision );
+  myDeflectionSB->setRange( GEOM::minDeflection(), 1.0 );
+  myDeflectionSB->setSingleStep( 1.0e-04 );
+
+  myModeCB = new QCheckBox( tr( "RELATIVE" ), options );
+
+  myFormatCB = new QCheckBox( tr( "ASCII" ) );
+
+  optionsLayout->addWidget( myDeflectionSB );
+  optionsLayout->addWidget( myModeCB );
+  optionsLayout->addWidget( myFormatCB );
+
+  layout()->addWidget( deflectionLabel );
+  layout()->addWidget( options );
+
+  myShapeSize = getShapeSize( io );
+
+  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+  SalomeApp_Study* study = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
+  int mgrId = app->activeViewManager()->getGlobalId();
+  QVariant v = study->getObjectProperty( mgrId, io->getEntry(), GEOM::propertyName( GEOM::Deflection ), QVariant() );
+  double deflection =  v.isValid() ? v.toDouble() : SUIT_Session::session()->resourceMgr()->doubleValue( "Geometry", "deflection_coef", 0.001 );
+
+  myDeflectionSB->setValue( deflection );
+  myModeCB->setChecked( true );
+  myFormatCB->setChecked( true );
+
+  connect( myModeCB, SIGNAL( clicked ( bool ) ), this, SLOT( modeChanged() ) );
+}
+
+//=================================================================================
+// Destructor
+//=================================================================================
+STLPlugin_ExportDlg::~STLPlugin_ExportDlg()
+{
+}
+
+//=================================================================================
+// modeChanged
+//=================================================================================
+void STLPlugin_ExportDlg::modeChanged()
+{
+  if ( myModeCB->isChecked() ) {
+    double deflection = myDeflectionSB->value() / myShapeSize;
+    deflection = ( deflection > 1.0 ) ? 1.0 : deflection;
+    myDeflectionSB->setRange( GEOM::minDeflection(), 1.0 );
+    myDeflectionSB->setValue( deflection );
+  }
+  else {
+    double deflection = myDeflectionSB->value() * myShapeSize;
+    myDeflectionSB->setRange( GEOM::minDeflection(), 10000.0 );
+    myDeflectionSB->setValue( deflection );
+  }
+}
+
+//=================================================================================
+// getShapeSize
+//=================================================================================
+double STLPlugin_ExportDlg::getShapeSize( const Handle(SALOME_InteractiveObject)& io )
+{
+  TopoDS_Shape shape;
+  GEOM::GEOM_Object_var obj = GEOMBase::ConvertIOinGEOMObject( io );
+  GEOMBase::GetShape( obj, shape, TopAbs_SHAPE );
+  Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
+  Bnd_Box bnd;
+  BRepBndLib::Add( shape, bnd );
+  bnd.Get( xmin, ymin, zmin, xmax, ymax, zmax );
+  double xd = fabs( xmax-xmin );
+  double yd = fabs( ymax-ymin );
+  double zd = fabs( zmax-zmin ); 
+  return std::max( std::max ( xd, yd ), zd );
+}
+
+//=================================================================================
+// isAscii
+//=================================================================================
+bool STLPlugin_ExportDlg::isAscii() const
+{
+  return myFormatCB->isChecked();
+}
+
+//=================================================================================
+// getDeflection
+//=================================================================================
+double STLPlugin_ExportDlg::getDeflection() const
+{
+  return myDeflectionSB->value();
+}
+//=================================================================================
+// isDeflectionRelative
+//=================================================================================
+bool STLPlugin_ExportDlg::isDeflectionRelative() const
+{
+  return myModeCB->isChecked();
+}
+
+//=================================================================================
+// getFileName
+//=================================================================================
+QString STLPlugin_ExportDlg::getFileName( const Handle(SALOME_InteractiveObject)& io,
+                                         const QString& filters, const QString& caption,
+                                         QWidget* parent, bool& isAscii,
+                                         double& deflection, bool& isRelative )
+{
+  QStringList fls = filters.split( ";;", QString::SkipEmptyParts );
+
+  QString tmpfilename = io->getName();
+  tmpfilename = tmpfilename.simplified();
+  tmpfilename = tmpfilename.replace( QRegExp( "\\*" ), "" ).replace( QRegExp( "\\?" ), "" );
+
+  STLPlugin_ExportDlg fd( io, parent );
+  fd.setFileMode( AnyFile );
+  fd.setFilters( fls );
+  fd.setWindowTitle( caption );
+  if ( !tmpfilename.isEmpty() )
+    fd.processPath( tmpfilename );
+
+  QString filename;
+
+  if ( fd.exec() == QDialog::Accepted ) {
+    filename = fd.selectedFile();
+    isAscii = fd.isAscii();
+    deflection = fd.getDeflection();
+    isRelative = fd.isDeflectionRelative();
+  }
+
+  QApplication::processEvents();
+
+  return filename;
+}
+  
diff --git a/src/STLPlugin/STLPlugin_ExportDlg.h b/src/STLPlugin/STLPlugin_ExportDlg.h
new file mode 100644 (file)
index 0000000..e79722e
--- /dev/null
@@ -0,0 +1,62 @@
+// Copyright (C) 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, or (at your option) any 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 STLPlugin_ExportDlg_H
+#define STLPlugin_ExportDlg_H
+
+#include <SUIT_FileDlg.h>
+#include <SALOME_InteractiveObject.hxx>
+
+class QCheckBox;
+class SalomeApp_DoubleSpinBox;
+
+class STLPlugin_ExportDlg: public SUIT_FileDlg
+{
+  Q_OBJECT
+
+public:
+  STLPlugin_ExportDlg( const Handle(SALOME_InteractiveObject)& io, QWidget* parent );
+  ~STLPlugin_ExportDlg();
+
+  bool   isAscii() const;
+  double getDeflection() const;
+  bool   isDeflectionRelative() const;
+
+  static QString getFileName( const Handle(SALOME_InteractiveObject)& io,
+                             const QString& filters,
+                             const QString& caption,
+                             QWidget* parent,
+                             bool& isAscii,
+                             double& deflection,
+                             bool& isRelative );
+
+private slots:
+  void  modeChanged();
+
+private:
+  static double getShapeSize( const Handle(SALOME_InteractiveObject)& io );
+
+private:
+  SalomeApp_DoubleSpinBox*         myDeflectionSB;
+  QCheckBox*                       myModeCB;
+  QCheckBox*                       myFormatCB;
+  double                           myShapeSize;
+};
+
+#endif // STLPlugin_ExportDlg_H
diff --git a/src/STLPlugin/STLPlugin_ExportDriver.cxx b/src/STLPlugin/STLPlugin_ExportDriver.cxx
new file mode 100644 (file)
index 0000000..f800a7d
--- /dev/null
@@ -0,0 +1,128 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STLPlugin_ExportDriver.hxx"
+#include "STLPlugin_IExport.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+#include <Basics_Utils.hxx>
+
+// GEOM includes
+#include "GEOM_Function.hxx"
+
+// OOCT includes
+#include <BRepBuilderAPI_Copy.hxx>
+#include <StlAPI_Writer.hxx>
+#include <TopoDS_Shape.hxx>
+
+//=======================================================================
+//function : GetID
+//purpose  :
+//=======================================================================
+const Standard_GUID& STLPlugin_ExportDriver::GetID()
+{
+  static Standard_GUID aGUID("88678a6a-885c-477c-b90b-51934572c61d");
+  return aGUID;
+}
+
+//=======================================================================
+//function : STLPlugin_ExportDriver
+//purpose  :
+//=======================================================================
+STLPlugin_ExportDriver::STLPlugin_ExportDriver()
+{
+}
+
+//=======================================================================
+//function : Execute
+//purpose  :
+//=======================================================================
+Standard_Integer STLPlugin_ExportDriver::Execute( TFunction_Logbook& log ) const
+{
+  if (Label().IsNull()) return 0;
+  Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
+
+  STLPlugin_IExport aData (aFunction);
+
+  // retrieve the being exported shape
+  TopoDS_Shape aShape;
+  Handle(GEOM_Function) aRefFunction = aData.GetOriginal();
+  if( aRefFunction.IsNull() ) return 0;
+  aShape = aRefFunction->GetValue();
+  if( aShape.IsNull() ) return 0;
+  // set the result of function to be used by next operations
+  aFunction->SetValue( aShape );
+
+  TCollection_AsciiString aFileName = aData.GetFileName();
+  double aDeflection = aData.GetDeflection();
+  bool anIsASCII = aData.GetIsASCII();
+  bool anIsRelative = aData.GetIsRelative();
+
+  MESSAGE( "Export STL into file " << aFileName );
+
+  // Set "C" numeric locale to save numbers correctly
+  Kernel_Utils::Localizer loc;
+
+  try
+  {
+    StlAPI_Writer aWriter;
+    // set relative mode on false for using custom deflection coefficient
+    aWriter.RelativeMode( ) = anIsRelative;
+    aWriter.ASCIIMode() = anIsASCII;
+    if( anIsRelative )
+      aWriter.SetCoefficient( aDeflection );
+    else
+      aWriter.SetDeflection( aDeflection );
+    BRepBuilderAPI_Copy aCopy( aShape, Standard_False );
+    aWriter.Write( aCopy.Shape(), aFileName.ToCString() );
+    log.SetTouched( Label() );
+    return 1;
+  }
+  catch( Standard_Failure )
+  {
+    //THROW_SALOME_CORBA_EXCEPTION("Exception catched in ExportSTL", SALOME::BAD_PARAM);
+  }
+  return 0;
+}
+
+//=======================================================================
+//function : MustExecute
+//purpose  :
+//=======================================================================
+Standard_Boolean STLPlugin_ExportDriver::MustExecute( const TFunction_Logbook& ) const
+{
+  return Standard_True;
+}
+
+//================================================================================
+/*!
+ * \brief Returns a name of creation operation and names and values of creation parameters
+ */
+//================================================================================
+bool STLPlugin_ExportDriver::
+GetCreationInformation( std::string&             theOperationName,
+                        std::vector<GEOM_Param>& theParams )
+{
+  return false;
+}
+
+IMPLEMENT_STANDARD_HANDLE( STLPlugin_ExportDriver,GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( STLPlugin_ExportDriver,GEOM_BaseDriver );
diff --git a/src/STLPlugin/STLPlugin_ExportDriver.hxx b/src/STLPlugin/STLPlugin_ExportDriver.hxx
new file mode 100644 (file)
index 0000000..90eef7f
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 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, or (at your option) any 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 _STLPlugin_ExportDriver_HXX
+#define _STLPlugin_ExportDriver_HXX
+
+// GEOM includes
+#include "GEOM_BaseDriver.hxx"
+
+// OCCT includes
+#include <TFunction_Logbook.hxx>
+
+DEFINE_STANDARD_HANDLE( STLPlugin_ExportDriver, GEOM_BaseDriver );
+
+class STLPlugin_ExportDriver : public GEOM_BaseDriver
+{
+public:
+  STLPlugin_ExportDriver();
+  ~STLPlugin_ExportDriver() {};
+
+  static const Standard_GUID& GetID();
+  virtual Standard_Integer    Execute( TFunction_Logbook& log ) const;
+  Standard_Boolean            MustExecute( const TFunction_Logbook& ) const;
+  virtual void                Validate( TFunction_Logbook& ) const {}
+
+  virtual bool                GetCreationInformation( std::string&             theOperationName,
+                                                     std::vector<GEOM_Param>& params );
+
+DEFINE_STANDARD_RTTI( STLPlugin_ExportDriver )
+};
+
+#endif // _STLPlugin_ExportDriver_HXX
diff --git a/src/STLPlugin/STLPlugin_GUI.cxx b/src/STLPlugin/STLPlugin_GUI.cxx
new file mode 100644 (file)
index 0000000..d0ee88e
--- /dev/null
@@ -0,0 +1,269 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STLPlugin_GUI.h"
+#include "STLPlugin_ExportDlg.h"
+
+// GUI includes
+#include <SUIT_Desktop.h>
+#include <SUIT_FileDlg.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_OverrideCursor.h>
+#include <SUIT_Tools.h>
+#include <LightApp_SelectionMgr.h>
+#include <SalomeApp_Application.h>
+#include <SalomeApp_Study.h>
+#include <SALOME_ListIteratorOfListIO.hxx>
+
+// GEOM includes
+#include "GeometryGUI.h"
+#include "GEOM_Operation.h"
+#include "GEOMBase.h"
+#include "GEOM_Displayer.h"
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(STLPlugin)
+
+//=======================================================================
+// function : STLPlugin_GUI()
+// purpose  : Constructor
+//=======================================================================
+STLPlugin_GUI::STLPlugin_GUI( GeometryGUI* parent ) : GEOMPluginGUI( parent )
+{
+}
+
+//=======================================================================
+// function : ~STLPlugin_GUI
+// purpose  : Destructor
+//=======================================================================
+STLPlugin_GUI::~STLPlugin_GUI()
+{
+}
+
+//=======================================================================
+// function : OnGUIEvent()
+// purpose  : 
+//=======================================================================
+bool STLPlugin_GUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
+{
+  QString cmd;
+  switch ( theCommandID ) {
+  case 1:
+    cmd = "Export_STL"; break;
+  case 2:
+    cmd = "Import_STL"; break;
+  default:
+    break;
+  }
+  return OnGUIEvent( cmd, parent );
+}
+
+//=======================================================================
+// function : OnGUIEvent()
+// purpose  :
+//=======================================================================
+bool STLPlugin_GUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* parent )
+{
+  bool result = false;
+
+  if( theCommandID == "Export_STL" ) {
+    result = exportSTL( parent );
+  }
+  else if (theCommandID == "Import_STL") {
+    result = importSTL( parent );
+  }
+  else {
+    getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
+  }
+
+  return true;
+}
+
+//=======================================================================
+// function : importSTL
+// purpose  :
+//=======================================================================
+bool STLPlugin_GUI::importSTL( SUIT_Desktop* parent )
+{
+  SalomeApp_Application* app = getGeometryGUI()->getApp();
+  if ( !app ) return false;
+  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
+  if ( !study ) return false;
+
+  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STLPluginEngine" );
+  GEOM::ISTLOperations_var stlOp = GEOM::ISTLOperations::_narrow( op );
+  if ( CORBA::is_nil( stlOp ) ) return false;
+  
+  QStringList fileNames = app->getOpenFileNames( SUIT_FileDlg::getLastVisitedPath().isEmpty() ? QDir::currentPath() : QString(""),
+                                                tr( "STL_FILES" ),
+                                                tr( "IMPORT_TITLE" ),
+                                                parent );
+  if ( fileNames.count() > 0 )
+  {
+    QStringList entryList;
+    QStringList errors;
+    
+    foreach( QString fileName, fileNames )
+    {
+      SUIT_OverrideCursor wc;
+      GEOM_Operation transaction( app, stlOp.in() );
+      
+      try
+      {
+       app->putInfo( tr( "GEOM_PRP_LOADING" ).arg( fileName ) );
+       transaction.start();
+       GEOM::ListOfGO_var result = stlOp->ImportSTL( fileName.toUtf8().constData() );
+       if ( result->length() > 0 && stlOp->IsDone() )
+       {
+         GEOM::GEOM_Object_var main = result[0];
+         QString publishName = GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, true ) );
+         SALOMEDS::SObject_var so = GeometryGUI::GetGeomGen()->PublishInStudy( dsStudy,
+                                                                               SALOMEDS::SObject::_nil(),
+                                                                               main.in(),
+                                                                               publishName.toUtf8().constData() );
+         
+         entryList.append( so->GetID() );
+         transaction.commit();
+         GEOM_Displayer( study ).Display( main.in() );
+       }
+       else
+       {
+         transaction.abort();
+         errors.append( QString( "%1 : %2" ).arg( fileName ).arg( stlOp->GetErrorCode() ) );
+       }
+      }
+      catch( const SALOME::SALOME_Exception& e )
+      {
+       transaction.abort();
+      }
+    }
+    getGeometryGUI()->updateObjBrowser( true );
+    app->browseObjects( entryList );
+    
+    if ( errors.count() > 0 )
+    {
+      SUIT_MessageBox::critical( parent,
+                                tr( "GEOM_ERROR" ),
+                                tr( "GEOM_IMPORT_ERRORS" ) + "\n" + errors.join( "\n" ) );
+    }
+  }
+  return fileNames.count() > 0;
+}
+
+//=======================================================================
+// function : exportSTL
+// purpose  :
+//=======================================================================
+bool STLPlugin_GUI::exportSTL( SUIT_Desktop* parent )
+{
+  SalomeApp_Application* app = getGeometryGUI()->getApp();
+  if ( !app ) return false;
+  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
+  if ( !study ) return false;
+
+  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "STLPluginEngine" );
+  GEOM::ISTLOperations_var stlOp = GEOM::ISTLOperations::_narrow( op );
+  if ( CORBA::is_nil( stlOp ) ) return false;
+
+  LightApp_SelectionMgr* sm = app->selectionMgr();
+  if ( !sm ) return false;
+  
+  SALOME_ListIO selectedObjects;
+  sm->selectedObjects( selectedObjects );
+  bool ok = false;
+  
+  SALOME_ListIteratorOfListIO it( selectedObjects );
+  for ( ; it.More(); it.Next() )
+  {
+    Handle(SALOME_InteractiveObject) io = it.Value();
+    GEOM::GEOM_Object_var obj = GEOMBase::ConvertIOinGEOMObject( io );
+    
+    if ( CORBA::is_nil( obj ) ) continue;
+
+    bool isASCII = false;
+    double deflection = 0.;
+    bool isRelative = false;
+    QString fileName = STLPlugin_ExportDlg::getFileName( io,
+                                                        tr( "STL_FILES" ),
+                                                        tr( "EXPORT_TITLE" ),
+                                                        parent,
+                                                        isASCII,
+                                                        deflection,
+                                                        isRelative );
+
+    if ( fileName.isEmpty() )
+      return false;
+    
+    SUIT_OverrideCursor wc;
+    
+    GEOM_Operation transaction( app, stlOp.in() );
+    
+    try
+    {
+      app->putInfo( tr( "GEOM_PRP_EXPORT" ).arg( fileName ) );
+      transaction.start();
+      
+      stlOp->ExportSTL( obj, fileName.toUtf8().constData(), isASCII, deflection, isRelative  );
+      
+      if ( stlOp->IsDone() )
+      {
+       transaction.commit();
+      }
+      else
+      {
+       transaction.abort();
+       SUIT_MessageBox::critical( parent,
+                                  tr( "GEOM_ERROR" ),
+                                  tr( "GEOM_PRP_ABORT" ) + "\n" + tr( stlOp->GetErrorCode() ) );
+       return false;
+      }
+    }
+    catch ( const SALOME::SALOME_Exception& e )
+    {
+      transaction.abort();
+      return false;
+    }
+    ok = true;
+  }
+  
+  if ( !ok )
+  {
+    SUIT_MessageBox::warning( parent,
+                             tr( "WRN_WARNING" ),
+                             tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) );
+  }
+  return ok;
+}
+
+//=====================================================================================
+// EXPORTED METHODS
+//=====================================================================================
+extern "C"
+{
+#ifdef WIN32
+    __declspec( dllexport )
+#endif
+  GEOMGUI* GetLibGUI( GeometryGUI* parent )
+  {
+    return new STLPlugin_GUI( parent );
+  }
+}
diff --git a/src/STLPlugin/STLPlugin_GUI.h b/src/STLPlugin/STLPlugin_GUI.h
new file mode 100644 (file)
index 0000000..061afb9
--- /dev/null
@@ -0,0 +1,40 @@
+// Copyright (C) 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, or (at your option) any 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 STLPlugin_GUI_H
+#define STLPlugin_GUI_H
+
+#include "GEOMPluginGUI.h"
+
+class STLPlugin_GUI: public GEOMPluginGUI
+{
+  Q_OBJECT
+public:
+  STLPlugin_GUI( GeometryGUI* parent );
+  ~STLPlugin_GUI();
+
+  bool OnGUIEvent( int commandId, SUIT_Desktop* );
+  bool OnGUIEvent( const QString&, SUIT_Desktop* );
+
+private:
+  bool importSTL( SUIT_Desktop* );
+  bool exportSTL( SUIT_Desktop* );
+};
+
+#endif // STLPlugin_GUI_H
diff --git a/src/STLPlugin/STLPlugin_IECallBack.cxx b/src/STLPlugin/STLPlugin_IECallBack.cxx
new file mode 100755 (executable)
index 0000000..14d365c
--- /dev/null
@@ -0,0 +1,75 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STLPlugin_IECallBack.hxx"
+#include "STLPlugin_IOperations.hxx"
+#include "STLPlugin_OperationsCreator.hxx"
+
+//=============================================================================
+/*!
+ *  constructor
+ */
+//=============================================================================
+STLPlugin_IECallBack::STLPlugin_IECallBack()
+{
+}
+
+//=============================================================================
+/*!
+ *  destructor
+ */
+//=============================================================================
+STLPlugin_IECallBack::~STLPlugin_IECallBack()
+{
+}
+
+//=============================================================================
+/*!
+ *  Export
+ */
+//=============================================================================
+bool 
+STLPlugin_IECallBack::Export( int                            theDocId,
+                             const Handle(GEOM_Object)      theOriginal,
+                             const TCollection_AsciiString& theFileName,
+                             const TCollection_AsciiString& theFormatName )
+{
+  STLPlugin_IOperations* aPluginOperations = STLPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  bool anIsASCII = ( theFormatName == "STL_Bin") ? false : true;
+  const double aDeflection = 0.001;
+  const bool anIsRelative = true;
+  aPluginOperations->ExportSTL( theOriginal, theFileName, anIsASCII, aDeflection, anIsRelative );
+  return true;
+}
+
+//=============================================================================
+/*!
+ *  Import
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+STLPlugin_IECallBack::Import( int                            theDocId,
+                             const TCollection_AsciiString& theFormatName,
+                             const TCollection_AsciiString& theFileName )
+{
+  STLPlugin_IOperations* aPluginOperations = STLPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  return aPluginOperations->ImportSTL( theFileName );
+}
+
diff --git a/src/STLPlugin/STLPlugin_IECallBack.hxx b/src/STLPlugin/STLPlugin_IECallBack.hxx
new file mode 100644 (file)
index 0000000..a833ced
--- /dev/null
@@ -0,0 +1,50 @@
+// Copyright (C) 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, or (at your option) any 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 _STLPlugin_IECallBack_HXX_
+#define _STLPlugin_IECallBack_HXX_
+
+// internal includes
+#include "STLPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_Object.hxx"
+#include "GEOMImpl_IECallBack.hxx"
+
+// OCC includes
+#include <TCollection_AsciiString.hxx>
+
+class STLPLUGINENGINE_EXPORT STLPlugin_IECallBack : public GEOMImpl_IECallBack
+{
+public:
+  STLPlugin_IECallBack();
+  ~STLPlugin_IECallBack();
+  
+  virtual bool Export( int                            theDocId,
+                      const Handle(GEOM_Object)      theOriginal,
+                      const TCollection_AsciiString& theFileName,
+                      const TCollection_AsciiString& theFormatName );
+
+  virtual
+  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
+                                              const TCollection_AsciiString& theFormatName,
+                                              const TCollection_AsciiString& theFileName );
+};
+
+#endif
diff --git a/src/STLPlugin/STLPlugin_IExport.hxx b/src/STLPlugin/STLPlugin_IExport.hxx
new file mode 100644 (file)
index 0000000..8c2573d
--- /dev/null
@@ -0,0 +1,66 @@
+// Copyright (C) 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, or (at your option) any 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 _STLPlugin_IExport_HXX_
+#define _STLPlugin_IExport_HXX_
+
+#include "GEOM_Function.hxx"
+
+#define EXPORTSTL_ARG_ORIGINAL   1
+#define EXPORTSTL_ARG_FILENAME   2
+#define EXPORTSTL_ARG_DEFLECTION 3
+#define EXPORTSTL_ARG_ISASCII    4
+#define EXPORTSTL_ARG_ISRELATIVE 5
+
+class STLPlugin_IExport
+{
+public:
+  STLPlugin_IExport( Handle(GEOM_Function) theFunction )
+    : _func(theFunction) {}
+
+  void SetOriginal( Handle( GEOM_Function ) theOriginal)
+    { _func->SetReference( EXPORTSTL_ARG_ORIGINAL, theOriginal ); }
+  Handle( GEOM_Function ) GetOriginal()
+    { return _func->GetReference( EXPORTSTL_ARG_ORIGINAL ); }
+
+  void SetFileName( const TCollection_AsciiString& theFileName )
+    { _func->SetString( EXPORTSTL_ARG_FILENAME, theFileName ); }
+  TCollection_AsciiString GetFileName()
+    { return _func->GetString( EXPORTSTL_ARG_FILENAME ); }
+  
+  void SetIsASCII( bool theIsASCII )
+    { _func->SetInteger( EXPORTSTL_ARG_ISASCII, int( theIsASCII ) ); }
+  bool GetIsASCII()
+    { return bool( _func->GetInteger( EXPORTSTL_ARG_ISASCII ) ); }
+
+  void SetIsRelative( bool theIsRelative )
+    { _func->SetInteger( EXPORTSTL_ARG_ISRELATIVE, int( theIsRelative ) ); }
+  bool GetIsRelative()
+    { return bool( _func->GetInteger( EXPORTSTL_ARG_ISRELATIVE ) ); }
+
+  void SetDeflection( double theDeflection )
+    { _func->SetReal( EXPORTSTL_ARG_DEFLECTION, theDeflection ); }
+  double GetDeflection()
+    { return _func->GetReal( EXPORTSTL_ARG_DEFLECTION ); }
+  
+private:
+  Handle(GEOM_Function) _func;
+};
+
+#endif // _STLPlugin_IExport_HXX_
diff --git a/src/STLPlugin/STLPlugin_IImport.hxx b/src/STLPlugin/STLPlugin_IImport.hxx
new file mode 100644 (file)
index 0000000..247b1be
--- /dev/null
@@ -0,0 +1,42 @@
+// Copyright (C) 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, or (at your option) any 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 _STLPlugin_IImport_HXX_
+#define _STLPlugin_IImport_HXX_
+
+#include "GEOM_Function.hxx"
+
+#define IMPORTSTL_ARG_FILENAME 1
+
+class STLPlugin_IImport
+{
+public:
+  STLPlugin_IImport( Handle(GEOM_Function) theFunction)
+    : _func(theFunction) {}
+
+  void SetFileName( const TCollection_AsciiString& theFileName )
+    { _func->SetString( IMPORTSTL_ARG_FILENAME, theFileName ); }
+  TCollection_AsciiString GetFileName()
+    { return _func->GetString( IMPORTSTL_ARG_FILENAME ); }
+  
+private:
+  Handle(GEOM_Function) _func;
+};
+
+#endif // _STLPlugin_IImport_HXX_
diff --git a/src/STLPlugin/STLPlugin_IOperations.cxx b/src/STLPlugin/STLPlugin_IOperations.cxx
new file mode 100644 (file)
index 0000000..512b925
--- /dev/null
@@ -0,0 +1,177 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STLPlugin_IOperations.hxx"
+#include "STLPlugin_ExportDriver.hxx"
+#include "STLPlugin_ImportDriver.hxx"
+#include "STLPlugin_IExport.hxx"
+#include "STLPlugin_IImport.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+
+// GEOM includes
+#include "GEOM_PythonDump.hxx"
+#include "GEOMImpl_Types.hxx"
+
+#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
+
+//=============================================================================
+/*!
+ *  Constructor
+ */
+//=============================================================================
+STLPlugin_IOperations::STLPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
+: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+{
+  MESSAGE( "STLPlugin_IOperations::STLPlugin_IOperations" );
+}
+
+//=============================================================================
+/*!
+ *  Destructor
+ */
+//=============================================================================
+STLPlugin_IOperations::~STLPlugin_IOperations()
+{
+  MESSAGE( "STLPlugin_IOperations::~STLPlugin_IOperations" );
+}
+
+//=============================================================================
+/*!
+ *  ExportSTL
+ *  Export a shape to STL format
+ *  \param theOriginal The shape to export
+ *  \param theFileName The name of the file to exported
+ *  \param theIsASCII The format of the exported file (ASCII or Binary)
+ *  \param theDeflection The deflection of the shape to exported
+ *  \param theIsRelative The mode for writing the file. If True (default value),
+ *         the deflection is calculated relatively to the size of the shape;
+ *         if False, the user defined deflection is used.
+ */
+//=============================================================================
+void STLPlugin_IOperations::ExportSTL( const Handle(GEOM_Object)      theOriginal,
+                                      const TCollection_AsciiString& theFileName,
+                                      const bool                     theIsASCII,
+                                      const double                   theDeflection,
+                                      const bool                     theIsRelative )
+{
+  SetErrorCode(KO);
+  if( theOriginal.IsNull() ) return;
+
+  Handle(GEOM_Function) aRefFunction = theOriginal->GetLastFunction();
+  if( aRefFunction.IsNull() ) return;  //There is no function which creates an object to be exported
+
+  //Add a new result object
+  Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
+
+  //Add an Export function
+  Handle(GEOM_Function) aFunction = result->AddFunction( STLPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
+  if( aFunction.IsNull() ) return;
+
+  //Check if the function is set correctly
+  if( aFunction->GetDriverGUID() != STLPlugin_ExportDriver::GetID() ) return;
+
+  //Set parameters
+  STLPlugin_IExport aCI( aFunction );
+  aCI.SetOriginal( aRefFunction );
+  aCI.SetFileName( theFileName );
+  aCI.SetIsASCII( theIsASCII );
+  aCI.SetIsRelative( theIsRelative );
+  aCI.SetDeflection( theDeflection );
+
+  //Perform the Export
+  try {
+    OCC_CATCH_SIGNALS;
+    if( !GetSolver()->ComputeFunction( aFunction ) ) {
+      SetErrorCode( "Not enough space on disk, or you haven't permissions to write this directory" );
+      return;
+    }
+  }
+  catch( Standard_Failure ) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode( aFail->GetMessageString() );
+    return;
+  }
+
+  //Make a Python command
+  GEOM::TPythonDump(aFunction) << "geompy.ExportSTL(" << theOriginal << ", \""
+    << theFileName.ToCString() << "\", " << theIsASCII << ", " << theDeflection << ", "
+    << theIsRelative << ")";
+
+  SetErrorCode(OK);
+}
+
+//=============================================================================
+/*!
+ *  ImportSTL
+ *  Import a shape from STL format
+ *  \param theFileName The name of the file to import
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+STLPlugin_IOperations::ImportSTL( const TCollection_AsciiString& theFileName )
+{
+  SetErrorCode(KO);
+  if( theFileName.IsEmpty() ) return NULL;
+
+  //Add a new result object
+  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
+
+  //Add an Import function
+  Handle(GEOM_Function) aFunction =
+    anImported->AddFunction( STLPlugin_ImportDriver::GetID(), IMPORT_SHAPE);
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != STLPlugin_ImportDriver::GetID()) return NULL;
+
+  //Set parameters
+  STLPlugin_IImport aCI( aFunction );
+  aCI.SetFileName( theFileName );
+
+  //Perform the Import
+  Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient;
+
+  try {
+    OCC_CATCH_SIGNALS;
+    if( !GetSolver()->ComputeFunction( aFunction ) ) {
+      SetErrorCode( "Import driver failed" );
+      return NULL;
+    }
+    aSeq->Append(anImported);
+
+    // Greate material groups.
+    // MakeMaterialGroups( anImported, aSeq );
+  }
+  catch( Standard_Failure ) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode( aFail->GetMessageString() );
+    return NULL;
+  }
+
+  //Make a Python command
+  GEOM::TPythonDump pd (aFunction);
+  pd << aSeq << " = geompy.ImportSTL(\"" << theFileName.ToCString() << "\" )";
+  SetErrorCode(OK);
+
+  return aSeq;
+}
diff --git a/src/STLPlugin/STLPlugin_IOperations.hxx b/src/STLPlugin/STLPlugin_IOperations.hxx
new file mode 100644 (file)
index 0000000..c6c39da
--- /dev/null
@@ -0,0 +1,46 @@
+// Copyright (C) 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, or (at your option) any 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 : STLPlugin_IOperations.hxx
+
+#ifndef _STLPlugin_IOperations_HXX_
+#define _STLPlugin_IOperations_HXX_
+
+// internal includes
+#include "STLPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOMImpl_IBaseIEOperations.hxx"
+
+class STLPLUGINENGINE_EXPORT STLPlugin_IOperations: public GEOMImpl_IBaseIEOperations
+{
+public:
+  STLPlugin_IOperations( GEOM_Engine*, int );
+  ~STLPlugin_IOperations();
+
+  void ExportSTL( const Handle(GEOM_Object),
+                 const TCollection_AsciiString&,
+                 const bool,
+                 const double,
+                 const bool );
+
+  Handle(TColStd_HSequenceOfTransient)
+       ImportSTL( const TCollection_AsciiString& );
+};
+
+#endif
diff --git a/src/STLPlugin/STLPlugin_IOperations_i.cc b/src/STLPlugin/STLPlugin_IOperations_i.cc
new file mode 100644 (file)
index 0000000..ebb81ef
--- /dev/null
@@ -0,0 +1,112 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STLPlugin_IOperations_i.hh"
+#include "STLPlugin_IOperations.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+
+//=============================================================================
+/*!
+ *   constructor:
+ */
+//=============================================================================
+STLPlugin_IOperations_i::STLPlugin_IOperations_i( PortableServer::POA_ptr thePOA,
+                                                 GEOM::GEOM_Gen_ptr theEngine,
+                                                 STLPlugin_IOperations* theImpl )
+:GEOM_IOperations_i( thePOA, theEngine, theImpl )
+{
+  MESSAGE( "STLPlugin_IOperations_i::STLPlugin_IOperations_i" );
+}
+
+//=============================================================================
+/*!
+ *  destructor
+ */
+//=============================================================================
+STLPlugin_IOperations_i::~STLPlugin_IOperations_i()
+{
+  MESSAGE( "STLPlugin_IOperations_i::~STLPlugin_IOperations_i" );
+}
+
+//=============================================================================
+/*!
+ *  ExportSTL
+ *  Export a shape to STL format
+ *  \param theOriginal The shape to export
+ *  \param theIsASCII The format of the exported file (ASCII or Binary)
+ *  \param theFileName The name of the exported file
+ *  \param theDeflection The deflection of the exported shape
+ */
+//=============================================================================
+void STLPlugin_IOperations_i::ExportSTL( GEOM::GEOM_Object_ptr theOriginal,
+                                        const char*           theFileName,
+                                        const bool            theIsASCII,
+                                        const double          theDeflection,
+                                        const bool            theIsRelative )
+{
+  // duplicate the original shape
+  GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate( theOriginal );
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference shape
+  Handle(GEOM_Object) anOriginal = GetObjectImpl( theOriginal );
+  if (anOriginal.IsNull()) return;
+
+  GetOperations()->ExportSTL( anOriginal, theFileName, theIsASCII, theDeflection, theIsRelative );
+}
+
+//=============================================================================
+/*!
+ *  ImportSTL
+ *  Import a shape from STL format
+ *  \param theFileName The name of the file to import
+ *  \return List of GEOM_Objects, containing the created shape and propagation groups.
+ */
+//=============================================================================
+GEOM::ListOfGO* STLPlugin_IOperations_i::ImportSTL( const char* theFileName )
+{
+  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Import the shape from the file
+  Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->ImportSTL( theFileName );
+
+  if( !GetOperations()->IsDone() || aHSeq.IsNull() )
+    return aSeq._retn();
+
+  // Copy created objects.
+  Standard_Integer aLength = aHSeq->Length();
+  aSeq->length( aLength );
+  for( Standard_Integer i = 1; i <= aLength; i++ )
+    aSeq[i-1] = GetObject( Handle(GEOM_Object)::DownCast( aHSeq->Value(i) ) );
+
+  return aSeq._retn();
+}
+
+STLPlugin_IOperations* STLPlugin_IOperations_i::GetOperations()
+{
+  return (STLPlugin_IOperations*)GetImpl();
+}
diff --git a/src/STLPlugin/STLPlugin_IOperations_i.hh b/src/STLPlugin/STLPlugin_IOperations_i.hh
new file mode 100644 (file)
index 0000000..f0733e1
--- /dev/null
@@ -0,0 +1,52 @@
+// Copyright (C) 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, or (at your option) any 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 _STLPlugin_IOperations_i_HeaderFile
+#define _STLPlugin_IOperations_i_HeaderFile
+
+// idl includes
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER( GEOM_Gen )
+#include CORBA_SERVER_HEADER( STLPlugin )
+
+// internal includes
+#include "STLPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_IOperations_i.hh"
+
+class STLPlugin_IOperations;
+
+class STLPLUGINENGINE_EXPORT STLPlugin_IOperations_i :
+      public virtual POA_GEOM::ISTLOperations,
+      public virtual GEOM_IOperations_i
+{
+public:
+  STLPlugin_IOperations_i( PortableServer::POA_ptr thePOA,
+                          GEOM::GEOM_Gen_ptr theEngine,
+                          STLPlugin_IOperations* theImpl );
+  ~STLPlugin_IOperations_i();
+
+  void            ExportSTL( GEOM::GEOM_Object_ptr, const char*, const bool, const double, const bool );
+  GEOM::ListOfGO* ImportSTL( const char* );
+
+  STLPlugin_IOperations* GetOperations();
+};
+
+#endif
diff --git a/src/STLPlugin/STLPlugin_ImportDriver.cxx b/src/STLPlugin/STLPlugin_ImportDriver.cxx
new file mode 100644 (file)
index 0000000..40a96a8
--- /dev/null
@@ -0,0 +1,155 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STLPlugin_ImportDriver.hxx"
+#include "STLPlugin_IImport.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+#include <Basics_Utils.hxx>
+
+// GEOM includes
+#include "GEOM_Function.hxx"
+#include "GEOMImpl_Types.hxx"
+
+// OOCT includes
+#include <StlAPI_Reader.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Solid.hxx>
+#include <BRep_Tool.hxx>
+#include <BRep_Builder.hxx>
+#include <TopoDS.hxx>
+#include <Precision.hxx>
+#include <BRepClass3d_SolidClassifier.hxx>
+
+//=======================================================================
+//function : GetID
+//purpose  :
+//=======================================================================
+const Standard_GUID& STLPlugin_ImportDriver::GetID()
+{
+  static Standard_GUID aGUID("69e33dc7-9630-4a73-ac19-cc4da1f659b8");
+  return aGUID;
+}
+
+//=======================================================================
+//function : STLPlugin_ImportDriver
+//purpose  :
+//=======================================================================
+STLPlugin_ImportDriver::STLPlugin_ImportDriver()
+{
+}
+
+//=======================================================================
+//function : Execute
+//purpose  :
+//=======================================================================
+Standard_Integer STLPlugin_ImportDriver::Execute( TFunction_Logbook& log ) const
+{
+  if( Label().IsNull() ) return 0;
+  Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
+
+  STLPlugin_IImport aData( aFunction );
+
+  TCollection_AsciiString aFileName = aData.GetFileName().ToCString();
+
+  MESSAGE( "Import STL to file " << aFileName );
+
+  // Set "C" numeric locale to save numbers correctly
+  Kernel_Utils::Localizer loc;
+
+  StlAPI_Reader aReader;
+  TopoDS_Shape aShape;
+
+  aReader.Read( aShape, aData.GetFileName().ToCString() );
+
+  if( aShape.IsNull() ) return 0;
+
+  // Fix the orientation of closed shell or solid.
+  if( BRep_Tool::IsClosed( aShape ) ) {
+    TopAbs_ShapeEnum aType = aShape.ShapeType();
+    if( aType == TopAbs_SHELL || aType == TopAbs_SOLID ) {
+      TopoDS_Solid aSolid;
+      if( aType == TopAbs_SHELL ) {
+        // Create a solid.
+        BRep_Builder aBuilder;
+        aBuilder.MakeSolid( aSolid );
+        aBuilder.Add(aSolid, aShape );
+      }
+      else
+        aSolid = TopoDS::Solid( aShape );
+
+      // Classify infinite point against solid.
+      BRepClass3d_SolidClassifier aClassifier( aSolid );
+      aClassifier.PerformInfinitePoint(Precision::Confusion());
+
+      if( aClassifier.State() == TopAbs_IN ) {
+        // The shape is inverted. Reverse it.
+        aShape.Reverse();
+      }
+    }
+  }
+
+  aFunction->SetValue( aShape );
+
+  log.SetTouched( Label() );
+
+  return 1;
+}
+
+//=======================================================================
+//function : MustExecute
+//purpose  :
+//=======================================================================
+Standard_Boolean STLPlugin_ImportDriver::MustExecute( const TFunction_Logbook& ) const
+{
+  return Standard_True;
+}
+
+//================================================================================
+/*!
+ * \brief Returns a name of creation operation and names and values of creation parameters
+ */
+//================================================================================
+
+bool STLPlugin_ImportDriver::
+GetCreationInformation( std::string&             theOperationName,
+                        std::vector<GEOM_Param>& theParams )
+{
+  if( Label().IsNull() ) return 0;
+  Handle(GEOM_Function) function = GEOM_Function::GetFunction( Label() );
+
+  STLPlugin_IImport aCI( function );
+  Standard_Integer aType = function->GetType();
+
+  theOperationName = "ImportSTL";
+
+  switch ( aType ) {
+  case IMPORT_SHAPE:
+    AddParam( theParams, "File name", aCI.GetFileName() );
+    break;
+  default:
+    return false;
+  }
+  return true;
+}
+
+IMPLEMENT_STANDARD_HANDLE( STLPlugin_ImportDriver, GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( STLPlugin_ImportDriver, GEOM_BaseDriver );
diff --git a/src/STLPlugin/STLPlugin_ImportDriver.hxx b/src/STLPlugin/STLPlugin_ImportDriver.hxx
new file mode 100644 (file)
index 0000000..fb695b8
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 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, or (at your option) any 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 _STLPlugin_ImportDriver_HXX
+#define _STLPlugin_ImportDriver_HXX
+
+// GEOM includes
+#include "GEOM_BaseDriver.hxx"
+
+// OCCT includes
+#include <TFunction_Logbook.hxx>
+
+DEFINE_STANDARD_HANDLE( STLPlugin_ImportDriver, GEOM_BaseDriver );
+
+class STLPlugin_ImportDriver : public GEOM_BaseDriver
+{
+public:
+  STLPlugin_ImportDriver();
+  ~STLPlugin_ImportDriver() {};
+
+  static const Standard_GUID& GetID();
+  virtual Standard_Integer    Execute( TFunction_Logbook& log ) const;
+  Standard_Boolean            MustExecute( const TFunction_Logbook& ) const;
+  virtual void                Validate( TFunction_Logbook& ) const {}
+  virtual bool                GetCreationInformation( std::string&             theOperationName,
+                                                     std::vector<GEOM_Param>& params );
+  
+DEFINE_STANDARD_RTTI( STLPlugin_ImportDriver )
+};
+
+#endif // _STLPlugin_ImportDriver_HXX
diff --git a/src/STLPlugin/STLPlugin_OperationsCreator.cxx b/src/STLPlugin/STLPlugin_OperationsCreator.cxx
new file mode 100644 (file)
index 0000000..f2a47a0
--- /dev/null
@@ -0,0 +1,71 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "STLPlugin_OperationsCreator.hxx"
+#include "STLPlugin_IOperations_i.hh"
+#include "STLPlugin_IOperations.hxx"
+#include "STLPlugin_ExportDriver.hxx"
+#include "STLPlugin_ImportDriver.hxx"
+#include "STLPlugin_IECallBack.hxx"
+
+// KERNEL includes
+#include <Utils_ExceptHandlers.hxx>
+#include <utilities.h>
+
+// OCCT includes
+#include <TFunction_DriverTable.hxx>
+
+std::map <int, STLPlugin_IOperations*> STLPlugin_OperationsCreator::_mapOfOperations;
+
+STLPlugin_OperationsCreator::STLPlugin_OperationsCreator()
+{
+  // Register drivers
+  TFunction_DriverTable::Get()->AddDriver( STLPlugin_ExportDriver::GetID(),
+                                          new STLPlugin_ExportDriver() );
+  TFunction_DriverTable::Get()->AddDriver( STLPlugin_ImportDriver::GetID(),
+                                          new STLPlugin_ImportDriver() );
+  // Register callback
+  STLPlugin_IECallBack* callback = new STLPlugin_IECallBack();
+  GEOMImpl_IECallBack::Register( "STL",       callback );
+  GEOMImpl_IECallBack::Register( "STL_Bin",   callback );
+  GEOMImpl_IECallBack::Register( "STL_ASCII", callback );
+}
+
+STLPlugin_OperationsCreator::~STLPlugin_OperationsCreator()
+{
+}
+
+GEOM_IOperations_i* STLPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
+                                                         int                     theStudyId,
+                                                         GEOM::GEOM_Gen_ptr      theEngine,
+                                                         ::GEOMImpl_Gen*         theGenImpl )
+{
+  Unexpect aCatch( SALOME_SalomeException );
+  MESSAGE( "STLPlugin_OperationsCreator::Create" );
+  return new STLPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+}
+
+STLPlugin_IOperations* STLPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
+                                                        int             theStudyId )
+{
+  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
+    _mapOfOperations[theStudyId] = new STLPlugin_IOperations( theGenImpl, theStudyId );
+  return _mapOfOperations[theStudyId];
+}
diff --git a/src/STLPlugin/STLPlugin_OperationsCreator.hxx b/src/STLPlugin/STLPlugin_OperationsCreator.hxx
new file mode 100755 (executable)
index 0000000..6231432
--- /dev/null
@@ -0,0 +1,57 @@
+// Copyright (C) 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, or (at your option) any 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 _GEOM_STLPlugin_OperationsCreator_HXX_
+#define _GEOM_STLPlugin_OperationsCreator_HXX_
+
+// internal includes
+#include "STLPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_Gen_i.hh"
+
+// C++ includes
+#include <map>
+
+class STLPlugin_IOperations;
+
+//=====================================================================
+// Operations creator
+//=====================================================================
+class STLPLUGINENGINE_EXPORT STLPlugin_OperationsCreator : public GEOM_GenericOperationsCreator
+{
+public:
+  STLPlugin_OperationsCreator();
+  ~STLPlugin_OperationsCreator();
+
+  GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
+                             int                     theStudyId,
+                             GEOM::GEOM_Gen_ptr      theEngine,
+                             ::GEOMImpl_Gen*         theGenImpl );
+private:
+  static STLPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
+                                    int                     theStudyId );
+
+private:
+  static std::map <int, STLPlugin_IOperations*>  _mapOfOperations;
+
+  friend class STLPlugin_IECallBack;
+};
+
+#endif
diff --git a/src/STLPlugin/STLPlugin_msg_en.ts b/src/STLPlugin/STLPlugin_msg_en.ts
new file mode 100644 (file)
index 0000000..c8f10a2
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTSTL</source>
+        <translation>STL</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTSTL</source>
+        <translation>Export STL</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTSTL</source>
+        <translation>Export STL</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTSTL</source>
+        <translation>STL</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTSTL</source>
+        <translation>Import STL</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTSTL</source>
+        <translation>Import STL</translation>
+    </message>
+</context>
+<context>
+    <name>STLPlugin_GUI</name>
+    <message>
+        <source>STL_FILES</source>
+        <translation>STL files( *.stl )</translation>
+    </message>
+    <message>
+        <source>EXPORT_TITLE</source>
+        <translation>Export STL</translation>
+    </message>
+    <message>
+        <source>IMPORT_TITLE</source>
+        <translation>Import STL</translation>
+    </message>
+</context>
+<context>
+    <name>STLPlugin_ExportDlg</name>
+    <message>
+        <source>ASCII</source>
+        <translation>Save as ASCII</translation>
+    </message>
+    <message>
+        <source>RELATIVE</source>
+        <translation>Relative</translation>
+    </message>
+    <message>
+        <source>DEFLECTION</source>
+        <translation>Deflection</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/STLPlugin/STLPlugin_msg_fr.ts b/src/STLPlugin/STLPlugin_msg_fr.ts
new file mode 100644 (file)
index 0000000..e4347f8
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTSTL</source>
+        <translation>STL</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTSTL</source>
+        <translation>Exporter STL</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTSTL</source>
+        <translation>Exporter STL</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTSTL</source>
+        <translation>STL</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTSTL</source>
+        <translation>Importer STL</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTSTL</source>
+        <translation>Importer STL</translation>
+    </message>
+</context>
+<context>
+    <name>STLPlugin_GUI</name>
+    <message>
+        <source>STL_FILES</source>
+        <translation>STL fichiers( *.stl )</translation>
+    </message>
+    <message>
+        <source>EXPORT_TITLE</source>
+        <translation>Exporter STL</translation>
+    </message>
+    <message>
+        <source>IMPORT_TITLE</source>
+        <translation>Importer STL</translation>
+    </message>
+</context>
+<context>
+    <name>STLPlugin_ExportDlg</name>
+    <message>
+        <source>ASCII</source>
+        <translation type="unfinished">Save as ASCII</translation>
+    </message>
+    <message>
+        <source>RELATIVE</source>
+        <translation>Relative</translation>
+    </message>
+    <message>
+        <source>DEFLECTION</source>
+        <translation>Déflexion</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/STLPlugin/STLPlugin_msg_ja.ts b/src/STLPlugin/STLPlugin_msg_ja.ts
new file mode 100644 (file)
index 0000000..1c10df0
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ja" sourcelanguage="en">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTSTL</source>
+        <translation type="unfinished">STL</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTSTL</source>
+        <translation type="unfinished">Export STL</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTSTL</source>
+        <translation type="unfinished">Export STL</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTSTL</source>
+        <translation type="unfinished">STL</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTSTL</source>
+        <translation type="unfinished">Import STL</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTSTL</source>
+        <translation type="unfinished">Import STL</translation>
+    </message>
+</context>
+<context>
+    <name>STLPlugin_GUI</name>
+    <message>
+        <source>STL_FILES</source>
+        <translation type="unfinished">STL files( *.stl )</translation>
+    </message>
+    <message>
+        <source>EXPORT_TITLE</source>
+        <translation type="unfinished">Export STL</translation>
+    </message>
+    <message>
+        <source>IMPORT_TITLE</source>
+        <translation type="unfinished">Import STL</translation>
+    </message>
+</context>
+<context>
+    <name>STLPlugin_ExportDlg</name>
+    <message>
+        <source>ASCII</source>
+        <translation type="unfinished">Save as ASCII</translation>
+    </message>
+    <message>
+        <source>RELATIVE</source>
+        <translation type="unfinished">Relative</translation>
+    </message>
+    <message>
+        <source>DEFLECTION</source>
+        <translation type="unfinished">Deflection</translation>
+    </message>
+</context>
+</TS>
index b683c7c6958bb8e8f549f16c828cb4e6dc20f648..bb0a44ddb088496b491b83466905d08bda24aacb 100644 (file)
 // Qt
 #include <QRect>
 
-class ShapeRec_Parameters
+#ifdef WIN32
+  #if defined GEOM_SHAPEREC_EXPORTS || defined GEOMShapeRec_EXPORTS
+    #define GEOM_SHAPEREC_EXPORT __declspec( dllexport )
+  #else
+    #define GEOM_SHAPEREC_EXPORT __declspec( dllimport )
+  #endif
+#else
+   #define GEOM_SHAPEREC_EXPORT
+#endif
+
+class GEOM_SHAPEREC_EXPORT ShapeRec_Parameters
 {
 public:
   ShapeRec_Parameters();
@@ -42,7 +52,7 @@ public:
   int findContoursMethod;
 };
 
-class ShapeRec_CornersParameters : public ShapeRec_Parameters
+class GEOM_SHAPEREC_EXPORT ShapeRec_CornersParameters : public ShapeRec_Parameters
 {
 public:
   ShapeRec_CornersParameters();
@@ -55,7 +65,7 @@ public:
   double epsilon;
 };
 
-class ShapeRec_CannyParameters : public ShapeRec_Parameters
+class GEOM_SHAPEREC_EXPORT ShapeRec_CannyParameters : public ShapeRec_Parameters
 {
 public:
   ShapeRec_CannyParameters();
@@ -66,7 +76,7 @@ public:
   bool L2gradient;
 };
 
-class ShapeRec_ColorFilterParameters : public ShapeRec_Parameters
+class GEOM_SHAPEREC_EXPORT ShapeRec_ColorFilterParameters : public ShapeRec_Parameters
 {
 public:
   ShapeRec_ColorFilterParameters();
@@ -79,7 +89,7 @@ public:
   double maxThreshold;
 };
 
-class ShapeRec_FeatureDetector
+class GEOM_SHAPEREC_EXPORT ShapeRec_FeatureDetector
 {
 public:
   
diff --git a/src/VTKExport/CMakeLists.txt b/src/VTKExport/CMakeLists.txt
deleted file mode 100755 (executable)
index 04081e0..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-# 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, or (at your option) any 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
-#
-
-# --- options ---
-
-# additional include directories
-INCLUDE_DIRECTORIES(
-  ${CAS_INCLUDE_DIRS}
-  ${PTHREAD_INCLUDE_DIR}
-  ${KERNEL_INCLUDE_DIRS}
-  ${VTK_INCLUDE_DIRS}
-  ${PROJECT_SOURCE_DIR}/src/OCC2VTK
-  )
-
-# additional preprocessor / compiler flags
-ADD_DEFINITIONS(
-  ${CAS_DEFINITIONS}
-  )
-
-# libraries to link to
-SET(_link_LIBRARIES
-  vtkIOLegacy
-  OCC2VTK
-  ${KERNEL_SALOMELocalTrace}
-  )
-
-# --- sources ---
-
-SET(VTKExport_SOURCES
-  VTKExport.cxx
-  )
-
-# --- rules ---
-
-ADD_LIBRARY(VTKExport ${VTKExport_SOURCES})
-TARGET_LINK_LIBRARIES(VTKExport ${_link_LIBRARIES})
-INSTALL(TARGETS VTKExport EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-
-
diff --git a/src/VTKExport/VTKExport.cxx b/src/VTKExport/VTKExport.cxx
deleted file mode 100644 (file)
index bc342d3..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&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:        VTKExport.cxx
-// Author:      Oleg UVAROV
-//
-#include "utilities.h"
-
-#include <Basics_Utils.hxx>
-
-#include <OCC2VTK_Tools.h>
-
-#include <GEOM_VertexSource.h>
-#include <GEOM_EdgeSource.h>
-#include <GEOM_WireframeFace.h>
-#include <GEOM_ShadingFace.h>
-
-#include <vtkAppendPolyData.h>  
-#include <vtkPolyDataWriter.h>  
-
-#include <TCollection_AsciiString.hxx>
-#include <TopExp.hxx>
-#include <TopExp_Explorer.hxx>
-#include <TopoDS.hxx>
-#include <TopoDS_Shape.hxx>
-#include <Poly_Triangulation.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepTools.hxx>
-
-#ifdef WIN32
-# if defined VTKEXPORT_EXPORTS || defined VTKExport_EXPORTS
-#  define VTKEXPORT_EXPORT __declspec( dllexport )
-# else
-#  define VTKEXPORT_EXPORT __declspec( dllimport )
-# endif
-#else
-# define VTKEXPORT_EXPORT
-#endif
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-extern "C"
-{
-  VTKEXPORT_EXPORT
-  int Export(const TopoDS_Shape& theShape,
-             const TCollection_AsciiString& theFileName,
-             const TCollection_AsciiString& theFormatName)
-  {
-    MESSAGE("Export VTK into file " << theFileName.ToCString());
-
-    try
-    {
-      GEOM_VertexSource* myVertexSource = GEOM_VertexSource::New();
-      GEOM_EdgeSource* myIsolatedEdgeSource = GEOM_EdgeSource::New();
-      GEOM_EdgeSource* myOneFaceEdgeSource = GEOM_EdgeSource::New();
-      GEOM_EdgeSource* mySharedEdgeSource = GEOM_EdgeSource::New();
-      GEOM_WireframeFace* myWireframeFaceSource = GEOM_WireframeFace::New();
-      GEOM_ShadingFace* myShadingFaceSource = GEOM_ShadingFace::New();
-
-      vtkAppendPolyData* myAppendFilter = vtkAppendPolyData::New();
-      myAppendFilter->AddInputConnection( myVertexSource->GetOutputPort() );
-      myAppendFilter->AddInputConnection( myIsolatedEdgeSource->GetOutputPort() );
-      myAppendFilter->AddInputConnection( myOneFaceEdgeSource->GetOutputPort() );
-      myAppendFilter->AddInputConnection( mySharedEdgeSource->GetOutputPort() );
-      //myAppendFilter->AddInputConnection( myWireframeFaceSource->GetOutputPort() ); // iso-lines are unnecessary
-      myAppendFilter->AddInputConnection( myShadingFaceSource->GetOutputPort() );
-
-      float aDeflection = 0.001;
-      bool anIsVector = false;
-
-      // Is shape triangulated?
-      bool wasMeshed = true;
-      TopExp_Explorer ex;
-      TopLoc_Location aLoc;
-      for (ex.Init(theShape, TopAbs_FACE); ex.More(); ex.Next()) {
-        const TopoDS_Face& aFace = TopoDS::Face(ex.Current());
-        Handle(Poly_Triangulation) aPoly = BRep_Tool::Triangulation(aFace,aLoc);
-        if(aPoly.IsNull()) { 
-          wasMeshed = false;
-          break; 
-        }
-      }
-
-      GEOM::MeshShape( theShape, aDeflection );
-
-      TopExp_Explorer aVertexExp( theShape, TopAbs_VERTEX );
-      for( ; aVertexExp.More(); aVertexExp.Next() )
-      {
-        const TopoDS_Vertex& aVertex = TopoDS::Vertex( aVertexExp.Current() );
-        myVertexSource->AddVertex( aVertex );
-      }
-
-      TopTools_IndexedDataMapOfShapeListOfShape anEdgeMap;
-      TopExp::MapShapesAndAncestors( theShape, TopAbs_EDGE, TopAbs_FACE, anEdgeMap );
-  
-      GEOM::SetShape( theShape,
-                      anEdgeMap,
-                      anIsVector,
-                      myIsolatedEdgeSource,
-                      myOneFaceEdgeSource,
-                      mySharedEdgeSource,
-                      myWireframeFaceSource,
-                      myShadingFaceSource );
-
-      myAppendFilter->Update();
-
-      // Set "C" numeric locale to save numbers correctly
-      Kernel_Utils::Localizer loc;
-
-      vtkPolyDataWriter* aWriter = vtkPolyDataWriter::New(); 
-      aWriter->SetInputConnection( myAppendFilter->GetOutputPort() );
-      aWriter->SetFileName( theFileName.ToCString() );
-      aWriter->Write();
-      aWriter->Delete();
-
-      myVertexSource->Delete();
-      myIsolatedEdgeSource->Delete();
-      myOneFaceEdgeSource->Delete();
-      mySharedEdgeSource->Delete();
-      myWireframeFaceSource->Delete();
-      myShadingFaceSource->Delete();
-
-      myAppendFilter->Delete();
-
-      if(!wasMeshed)
-        BRepTools::Clean(theShape);
-
-      return 1;
-    }
-    catch(Standard_Failure)
-    {
-      //THROW_SALOME_CORBA_EXCEPTION("Exception catched in VTKExport", SALOME::BAD_PARAM);
-    }
-    return 0;
-  }
-}
diff --git a/src/VTKPlugin/CMakeLists.txt b/src/VTKPlugin/CMakeLists.txt
new file mode 100644 (file)
index 0000000..d14424a
--- /dev/null
@@ -0,0 +1,155 @@
+# Copyright (C) 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, or (at your option) any 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(SALOME_BUILD_GUI)
+  INCLUDE(UseQt4Ext)
+  INCLUDE(${QT_USE_FILE})
+ENDIF()
+
+# --- options ---
+
+# additional include directories
+INCLUDE_DIRECTORIES(
+  ${CAS_INCLUDE_DIRS}
+  ${VTK_INCLUDE_DIRS}
+  ${KERNEL_INCLUDE_DIRS}
+  ${PROJECT_BINARY_DIR}/idl
+  ${PROJECT_SOURCE_DIR}/src/GEOMAlgo
+  ${PROJECT_SOURCE_DIR}/src/GEOM
+  ${PROJECT_SOURCE_DIR}/src/GEOMImpl
+  ${PROJECT_SOURCE_DIR}/src/GEOM_I
+  ${PROJECT_SOURCE_DIR}/src/GEOMClient
+  ${PROJECT_SOURCE_DIR}/src/OCC2VTK
+  ${PROJECT_SOURCE_DIR}/src/GEOMUtils
+  )
+  
+IF(SALOME_BUILD_GUI)
+  INCLUDE_DIRECTORIES(
+    ${QT_INCLUDE_DIRS}
+    ${GUI_INCLUDE_DIRS}
+    ${PROJECT_SOURCE_DIR}/src/OBJECT
+    ${PROJECT_SOURCE_DIR}/src/GEOMGUI
+    ${PROJECT_SOURCE_DIR}/src/GEOMBase
+    )
+ENDIF()
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(
+  ${CAS_DEFINITIONS}
+  ${OMNIORB_DEFINITIONS}
+  )
+   
+IF(WIN32)
+  ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
+IF(SALOME_BUILD_GUI)
+ADD_DEFINITIONS(
+  ${QT_DEFINITIONS}
+  )
+ENDIF()
+
+# libraries to link to
+SET(_link_engine_LIBRARIES
+  ${CAS_TKVTK}
+  ${KERNEL_SALOMELocalTrace}
+  ${KERNEL_OpUtil}
+  SalomeIDLGEOM
+  SalomeIDLVTKPlugin
+  GEOMEngine
+  GEOMClient
+  vtkIOLegacy
+  OCC2VTK
+  )
+  
+IF(SALOME_BUILD_GUI)
+  SET(_link_gui_LIBRARIES
+    SalomeIDLVTKPlugin
+    GEOMObject
+    GEOM
+    GEOMBase
+    )
+ENDIF()
+
+
+# --- headers ---
+
+SET(VTKPluginEngine_HEADERS
+  VTKPlugin_IOperations_i.hh
+  VTKPlugin_Engine.hxx
+  VTKPlugin_OperationsCreator.hxx
+  VTKPlugin_IOperations.hxx
+  VTKPlugin_IExport.hxx 
+  VTKPlugin_ExportDriver.hxx
+  VTKPlugin_IECallBack.hxx
+  )
+
+IF(SALOME_BUILD_GUI)  
+  # header files / to be processed by moc
+  SET(_moc_HEADERS
+    VTKPlugin_GUI.h
+    VTKPlugin_ExportDlg.h
+    )
+ENDIF()
+
+# --- sources ---
+
+IF(SALOME_BUILD_GUI)
+  # sources / moc wrappings
+  QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+
+  SET(VTKPluginGUI_SOURCES
+    VTKPlugin_GUI.cxx
+    VTKPlugin_ExportDlg.cxx
+    ${_moc_SOURCES}
+    )
+ENDIF()
+  
+SET(VTKPluginEngine_SOURCES
+  VTKPlugin_Engine.cxx
+  VTKPlugin_OperationsCreator.cxx
+  VTKPlugin_IOperations_i.cc
+  VTKPlugin_IOperations.cxx
+  VTKPlugin_ExportDriver.cxx
+  VTKPlugin_IECallBack.cxx
+  )
+  
+# resource files / to be processed by lrelease
+SET(VTKPlugin_RESOURCES
+  VTKPlugin_msg_en.ts
+  VTKPlugin_msg_fr.ts
+  VTKPlugin_msg_ja.ts
+  )
+
+# --- rules ---
+
+ADD_LIBRARY(VTKPluginEngine ${VTKPluginEngine_SOURCES})
+TARGET_LINK_LIBRARIES(VTKPluginEngine ${_link_engine_LIBRARIES})
+INSTALL(TARGETS VTKPluginEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+IF(SALOME_BUILD_GUI)
+  ADD_LIBRARY(VTKPluginGUI ${VTKPluginGUI_SOURCES})
+  TARGET_LINK_LIBRARIES(VTKPluginGUI ${_link_gui_LIBRARIES})
+  INSTALL(TARGETS VTKPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+  
+  QT4_INSTALL_TS_RESOURCES("${VTKPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
+ENDIF()
+
+
+INSTALL(FILES ${VTKPluginEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
diff --git a/src/VTKPlugin/VTKPlugin_Engine.cxx b/src/VTKPlugin/VTKPlugin_Engine.cxx
new file mode 100644 (file)
index 0000000..5c0ed2e
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "VTKPlugin_Engine.hxx"
+#include "VTKPlugin_OperationsCreator.hxx"
+
+extern "C"
+{
+  VTKPLUGINENGINE_EXPORT
+  GEOM_GenericOperationsCreator* GetOperationsCreator()
+  {
+    VTKPlugin_OperationsCreator* aCreator = new VTKPlugin_OperationsCreator();
+    return aCreator;
+  }
+}
diff --git a/src/VTKPlugin/VTKPlugin_Engine.hxx b/src/VTKPlugin/VTKPlugin_Engine.hxx
new file mode 100755 (executable)
index 0000000..cd373e1
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 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, or (at your option) any 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 _VTKPLUGIN_ENGINE_HXX_
+#define _VTKPLUGIN_ENGINE_HXX_
+
+#ifdef WIN32
+ #if defined VTKPLUGINENGINE_EXPORTS || defined VTKPluginEngine_EXPORTS
+   #define VTKPLUGINENGINE_EXPORT __declspec( dllexport )
+ #else
+   #define VTKPLUGINENGINE_EXPORT __declspec( dllimport )
+ #endif 
+#else
+   #define VTKPLUGINENGINE_EXPORT
+#endif
+
+#endif
diff --git a/src/VTKPlugin/VTKPlugin_ExportDlg.cxx b/src/VTKPlugin/VTKPlugin_ExportDlg.cxx
new file mode 100644 (file)
index 0000000..9012215
--- /dev/null
@@ -0,0 +1,118 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "VTKPlugin_ExportDlg.h"
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(VTKPlugin)
+
+// GUI includes
+#include <SUIT_Session.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_ViewManager.h>
+
+#include <SalomeApp_Application.h>
+#include <SalomeApp_DoubleSpinBox.h>
+#include <SalomeApp_Study.h>
+
+// GEOM includes
+#include "GEOM_Constants.h"
+
+// QT includes
+#include <QApplication>
+#include <QLabel>
+#include <QLayout>
+
+//=================================================================================
+// Constructor
+//=================================================================================
+VTKPlugin_ExportDlg::VTKPlugin_ExportDlg( const Handle(SALOME_InteractiveObject)& io, QWidget* parent )
+: SUIT_FileDlg( parent, false, true, true )
+{
+  SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+
+  QLabel* deflectionLabel = new QLabel( tr( "DEFLECTION" ), this );
+
+  myDeflectionSB = new SalomeApp_DoubleSpinBox( this );
+  int aPrecision = resMgr->integerValue( "Geometry", "parametric_precision", 6 );
+  myDeflectionSB->setAcceptNames( false );
+  myDeflectionSB->setPrecision( aPrecision );
+  myDeflectionSB->setDecimals( aPrecision );
+  myDeflectionSB->setRange( GEOM::minDeflection(), 1.0 );
+  myDeflectionSB->setSingleStep( 1.0e-04 );
+
+  layout()->addWidget( deflectionLabel );
+  layout()->addWidget( myDeflectionSB );
+
+  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+  SalomeApp_Study* study = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
+  int mgrId = app->activeViewManager()->getGlobalId();
+  QVariant v = study->getObjectProperty( mgrId, io->getEntry(), GEOM::propertyName( GEOM::Deflection ), QVariant() );
+  double deflection =  v.isValid() ? v.toDouble() : SUIT_Session::session()->resourceMgr()->doubleValue( "Geometry", "deflection_coef", 0.001 );
+  myDeflectionSB->setValue( deflection );
+}
+
+//=================================================================================
+// Destructor
+//=================================================================================
+VTKPlugin_ExportDlg::~VTKPlugin_ExportDlg()
+{
+}
+
+//=================================================================================
+// getDeflection
+//=================================================================================
+double VTKPlugin_ExportDlg::getDeflection() const
+{
+  return myDeflectionSB->value();
+}
+//=================================================================================
+// getFileName
+//=================================================================================
+QString VTKPlugin_ExportDlg::getFileName( const Handle(SALOME_InteractiveObject)& io,
+                                         const QString& filters, const QString& caption,
+                                         QWidget* parent, double& deflection )
+{
+  QStringList fls = filters.split( ";;", QString::SkipEmptyParts );
+
+  QString tmpfilename = io->getName();
+  tmpfilename = tmpfilename.simplified();
+  tmpfilename = tmpfilename.replace( QRegExp( "\\*" ), "" ).replace( QRegExp( "\\?" ), "" );
+
+  VTKPlugin_ExportDlg fd( io, parent );
+  fd.setFileMode( AnyFile );
+  fd.setFilters( fls );
+  fd.setWindowTitle( caption );
+  if ( !tmpfilename.isEmpty() )
+    fd.processPath( tmpfilename );
+
+  QString filename;
+
+  if ( fd.exec() == QDialog::Accepted ) {
+    filename = fd.selectedFile();
+    deflection = fd.getDeflection();
+  }
+
+  QApplication::processEvents();
+
+  return filename;
+}
+  
diff --git a/src/VTKPlugin/VTKPlugin_ExportDlg.h b/src/VTKPlugin/VTKPlugin_ExportDlg.h
new file mode 100644 (file)
index 0000000..d8e4095
--- /dev/null
@@ -0,0 +1,50 @@
+// Copyright (C) 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, or (at your option) any 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 VTKPlugin_ExportDlg_H
+#define VTKPlugin_ExportDlg_H
+
+// GUI includes
+#include <SUIT_FileDlg.h>
+#include <SALOME_InteractiveObject.hxx>
+
+class SalomeApp_DoubleSpinBox;
+
+class VTKPlugin_ExportDlg: public SUIT_FileDlg
+{
+  Q_OBJECT
+
+public:
+  VTKPlugin_ExportDlg( const Handle(SALOME_InteractiveObject)&, QWidget* parent );
+  ~VTKPlugin_ExportDlg();
+
+  double getDeflection() const;
+
+  static QString getFileName( const Handle(SALOME_InteractiveObject)& io,
+                              const QString& filters,
+                              const QString& caption,
+                              QWidget* parent,
+                              double& deflection );
+
+private:
+  SalomeApp_DoubleSpinBox*         myDeflectionSB;
+  Handle(SALOME_InteractiveObject) myObject;
+};
+
+#endif // VTKPlugin_ExportDlg_H
diff --git a/src/VTKPlugin/VTKPlugin_ExportDriver.cxx b/src/VTKPlugin/VTKPlugin_ExportDriver.cxx
new file mode 100644 (file)
index 0000000..a778972
--- /dev/null
@@ -0,0 +1,200 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "VTKPlugin_ExportDriver.hxx"
+#include "VTKPlugin_IExport.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+#include <Basics_Utils.hxx>
+
+// GEOM includes
+#include "GEOM_Function.hxx"
+#include "OCC2VTK_Tools.h"
+#include "GEOM_VertexSource.h"
+#include "GEOM_EdgeSource.h"
+#include "GEOM_WireframeFace.h"
+#include "GEOM_ShadingFace.h"
+
+// OOCT includes
+#include <TCollection_AsciiString.hxx>
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Shape.hxx>
+#include <Poly_Triangulation.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepTools.hxx>
+
+// VTK includes
+#include <vtkAppendPolyData.h>
+#include <vtkPolyDataWriter.h>
+
+//=======================================================================
+//function : GetID
+//purpose  :
+//=======================================================================
+const Standard_GUID& VTKPlugin_ExportDriver::GetID()
+{
+  static Standard_GUID aGUID("0966443c-6f3c-4ebe-ba46-c0833786d817");
+  return aGUID;
+}
+
+//=======================================================================
+//function : VTKPlugin_ExportDriver
+//purpose  :
+//=======================================================================
+VTKPlugin_ExportDriver::VTKPlugin_ExportDriver()
+{
+}
+
+//=======================================================================
+//function : Execute
+//purpose  :
+//=======================================================================
+Standard_Integer VTKPlugin_ExportDriver::Execute( TFunction_Logbook& log ) const
+{
+  if (Label().IsNull()) return 0;
+  Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
+
+  VTKPlugin_IExport aData (aFunction);
+
+  // retrieve the being exported shape
+  TopoDS_Shape aShape;
+  Handle(GEOM_Function) aRefFunction = aData.GetOriginal();
+  if( aRefFunction.IsNull() ) return 0;
+  aShape = aRefFunction->GetValue();
+  if( aShape.IsNull() ) return 0;
+  // set the result of function to be used by next operations
+  aFunction->SetValue( aShape );
+
+  TCollection_AsciiString aFileName = aData.GetFileName();
+  float aDeflection = float( aData.GetDeflection() );
+
+  MESSAGE( "Export VTK into file " << aFileName );
+  try
+  {
+    GEOM_VertexSource* myVertexSource = GEOM_VertexSource::New();
+    GEOM_EdgeSource* myIsolatedEdgeSource = GEOM_EdgeSource::New();
+    GEOM_EdgeSource* myOneFaceEdgeSource = GEOM_EdgeSource::New();
+    GEOM_EdgeSource* mySharedEdgeSource = GEOM_EdgeSource::New();
+    GEOM_WireframeFace* myWireframeFaceSource = GEOM_WireframeFace::New();
+    GEOM_ShadingFace* myShadingFaceSource = GEOM_ShadingFace::New();
+
+    vtkAppendPolyData* myAppendFilter = vtkAppendPolyData::New();
+    myAppendFilter->AddInputConnection( myVertexSource->GetOutputPort() );
+    myAppendFilter->AddInputConnection( myIsolatedEdgeSource->GetOutputPort() );
+    myAppendFilter->AddInputConnection( myOneFaceEdgeSource->GetOutputPort() );
+    myAppendFilter->AddInputConnection( mySharedEdgeSource->GetOutputPort() );
+    //myAppendFilter->AddInputConnection( myWireframeFaceSource->GetOutputPort() ); // iso-lines are unnecessary
+    myAppendFilter->AddInputConnection( myShadingFaceSource->GetOutputPort() );
+
+    bool anIsVector = false;
+
+    // Is shape triangulated?
+    bool wasMeshed = true;
+    TopExp_Explorer ex;
+    TopLoc_Location aLoc;
+    for (ex.Init(aShape, TopAbs_FACE); ex.More(); ex.Next()) {
+      const TopoDS_Face& aFace = TopoDS::Face(ex.Current());
+      Handle(Poly_Triangulation) aPoly = BRep_Tool::Triangulation(aFace,aLoc);
+      if(aPoly.IsNull()) {
+        wasMeshed = false;
+        break;
+      }
+    }
+
+    GEOM::MeshShape( aShape, aDeflection );
+
+    TopExp_Explorer aVertexExp( aShape, TopAbs_VERTEX );
+    for( ; aVertexExp.More(); aVertexExp.Next() )
+    {
+      const TopoDS_Vertex& aVertex = TopoDS::Vertex( aVertexExp.Current() );
+      myVertexSource->AddVertex( aVertex );
+    }
+
+    TopTools_IndexedDataMapOfShapeListOfShape anEdgeMap;
+    TopExp::MapShapesAndAncestors( aShape, TopAbs_EDGE, TopAbs_FACE, anEdgeMap );
+
+    GEOM::SetShape( aShape,
+                   anEdgeMap,
+                   anIsVector,
+                   0,
+                   myIsolatedEdgeSource,
+                   myOneFaceEdgeSource,
+                   mySharedEdgeSource,
+                   myWireframeFaceSource,
+                   myShadingFaceSource );
+
+    myAppendFilter->Update();
+
+    // Set "C" numeric locale to save numbers correctly
+    Kernel_Utils::Localizer loc;
+
+    vtkPolyDataWriter* aWriter = vtkPolyDataWriter::New();
+    aWriter->SetInputConnection( myAppendFilter->GetOutputPort() );
+    aWriter->SetFileName( aFileName.ToCString() );
+    aWriter->Write();
+    aWriter->Delete();
+
+    myVertexSource->Delete();
+    myIsolatedEdgeSource->Delete();
+    myOneFaceEdgeSource->Delete();
+    mySharedEdgeSource->Delete();
+    myWireframeFaceSource->Delete();
+    myShadingFaceSource->Delete();
+
+    myAppendFilter->Delete();
+
+    if(!wasMeshed)
+      BRepTools::Clean(aShape);
+
+    return 1;
+  }
+  catch( Standard_Failure )
+  {
+    //THROW_SALOME_CORBA_EXCEPTION("Exception catched in ExportVTK", SALOME::BAD_PARAM);
+  }
+  return 0;
+}
+
+//=======================================================================
+//function : MustExecute
+//purpose  :
+//=======================================================================
+Standard_Boolean VTKPlugin_ExportDriver::MustExecute( const TFunction_Logbook& ) const
+{
+  return Standard_True;
+}
+
+//================================================================================
+/*!
+ * \brief Returns a name of creation operation and names and values of creation parameters
+ */
+//================================================================================
+bool VTKPlugin_ExportDriver::
+GetCreationInformation( std::string&             theOperationName,
+                        std::vector<GEOM_Param>& theParams )
+{
+  return false;
+}
+
+IMPLEMENT_STANDARD_HANDLE( VTKPlugin_ExportDriver,GEOM_BaseDriver );
+IMPLEMENT_STANDARD_RTTIEXT( VTKPlugin_ExportDriver,GEOM_BaseDriver );
diff --git a/src/VTKPlugin/VTKPlugin_ExportDriver.hxx b/src/VTKPlugin/VTKPlugin_ExportDriver.hxx
new file mode 100644 (file)
index 0000000..b147c97
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 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, or (at your option) any 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 _VTKPlugin_ExportDriver_HXX
+#define _VTKPlugin_ExportDriver_HXX
+
+// GEOM includes
+#include "GEOM_BaseDriver.hxx"
+
+// OCCT includes
+#include <TFunction_Logbook.hxx>
+
+DEFINE_STANDARD_HANDLE( VTKPlugin_ExportDriver, GEOM_BaseDriver );
+
+class VTKPlugin_ExportDriver : public GEOM_BaseDriver
+{
+public:
+  VTKPlugin_ExportDriver();
+  ~VTKPlugin_ExportDriver() {};
+  
+  static const Standard_GUID& GetID();
+  virtual Standard_Integer    Execute( TFunction_Logbook& log ) const;
+  Standard_Boolean            MustExecute( const TFunction_Logbook& ) const;
+  virtual void                Validate( TFunction_Logbook& ) const {}
+
+  virtual bool                GetCreationInformation( std::string&             theOperationName,
+                                                     std::vector<GEOM_Param>& params );
+  
+DEFINE_STANDARD_RTTI( VTKPlugin_ExportDriver )
+};
+
+#endif // _VTKPlugin_ExportDriver_HXX
diff --git a/src/VTKPlugin/VTKPlugin_GUI.cxx b/src/VTKPlugin/VTKPlugin_GUI.cxx
new file mode 100644 (file)
index 0000000..d5bec2d
--- /dev/null
@@ -0,0 +1,186 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "VTKPlugin_GUI.h"
+#include "VTKPlugin_ExportDlg.h"
+
+// GUI includes
+#include <SUIT_Desktop.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_OverrideCursor.h>
+#include <LightApp_SelectionMgr.h>
+#include <SalomeApp_Application.h>
+#include <SalomeApp_Study.h>
+#include <SALOME_ListIteratorOfListIO.hxx>
+
+// GEOM includes
+#include "GeometryGUI.h"
+#include "GEOM_Operation.h"
+#include "GEOMBase.h"
+#include "GEOM_Displayer.h"
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(VTKPlugin)
+
+//=======================================================================
+// function : VTKPlugin_GUI()
+// purpose  : Constructor
+//=======================================================================
+VTKPlugin_GUI::VTKPlugin_GUI( GeometryGUI* parent ) : GEOMPluginGUI( parent )
+{
+}
+
+//=======================================================================
+// function : ~VTKPlugin_GUI
+// purpose  : Destructor
+//=======================================================================
+VTKPlugin_GUI::~VTKPlugin_GUI()
+{
+}
+
+//=======================================================================
+// function : OnGUIEvent()
+// purpose  : 
+//=======================================================================
+bool VTKPlugin_GUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
+{
+  QString cmd;
+  switch ( theCommandID ) {
+  case 1:
+    cmd = "Export_VTK"; break;
+  default:
+    break;
+  }
+  return OnGUIEvent( cmd, parent );
+}
+
+//=======================================================================
+// function : OnGUIEvent()
+// purpose  :
+//=======================================================================
+bool VTKPlugin_GUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* parent )
+{
+  bool result = false;
+
+  if( theCommandID == "Export_VTK" ) {
+    result = exportVTK( parent );
+  }
+  else {
+    getGeometryGUI()->getApp()->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
+  }
+
+  return true;
+}
+
+//=======================================================================
+// function : exportVTK
+// purpose  :
+//=======================================================================
+bool VTKPlugin_GUI::exportVTK( SUIT_Desktop* parent )
+{
+  SalomeApp_Application* app = getGeometryGUI()->getApp();
+  if ( !app ) return false;
+  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
+  if ( !study ) return false;
+
+  SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
+  GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "VTKPluginEngine" );
+  GEOM::IVTKOperations_var stlOp = GEOM::IVTKOperations::_narrow( op );
+  if ( CORBA::is_nil( stlOp ) ) return false;
+
+  LightApp_SelectionMgr* sm = app->selectionMgr();
+  if ( !sm ) return false;
+  
+  SALOME_ListIO selectedObjects;
+  sm->selectedObjects( selectedObjects );
+  bool ok = false;
+  
+  SALOME_ListIteratorOfListIO it( selectedObjects );
+  for ( ; it.More(); it.Next() )
+  {
+    Handle(SALOME_InteractiveObject) io = it.Value();
+    GEOM::GEOM_Object_var obj = GEOMBase::ConvertIOinGEOMObject( io );
+    
+    if ( CORBA::is_nil( obj ) ) continue;
+
+    double deflection = 0.;
+    QString fileName = VTKPlugin_ExportDlg::getFileName( io,
+                                                        tr( "VTK_FILES" ),
+                                                        tr( "EXPORT_TITLE" ),
+                                                        parent,
+                                                        deflection );
+
+    if ( fileName.isEmpty() )
+      return false;
+    
+    SUIT_OverrideCursor wc;
+    
+    GEOM_Operation transaction( app, stlOp.in() );
+    
+    try
+    {
+      app->putInfo( tr( "GEOM_PRP_EXPORT" ).arg( fileName ) );
+      transaction.start();
+      
+      stlOp->ExportVTK( obj, fileName.toUtf8().constData(), deflection  );
+      
+      if ( stlOp->IsDone() )
+      {
+       transaction.commit();
+      }
+      else
+      {
+       transaction.abort();
+       SUIT_MessageBox::critical( parent,
+                                  tr( "GEOM_ERROR" ),
+                                  tr( "GEOM_PRP_ABORT" ) + "\n" + tr( stlOp->GetErrorCode() ) );
+       return false;
+      }
+    }
+    catch ( const SALOME::SALOME_Exception& e )
+    {
+      transaction.abort();
+      return false;
+    }
+    ok = true;
+  }
+  
+  if ( !ok )
+  {
+    SUIT_MessageBox::warning( parent,
+                             tr( "WRN_WARNING" ),
+                             tr( "GEOM_WRN_NO_APPROPRIATE_SELECTION" ) );
+  }
+  return ok;
+}
+
+//=====================================================================================
+// EXPORTED METHODS
+//=====================================================================================
+extern "C"
+{
+#ifdef WIN32
+    __declspec( dllexport )
+#endif
+  GEOMGUI* GetLibGUI( GeometryGUI* parent )
+  {
+    return new VTKPlugin_GUI( parent );
+  }
+}
diff --git a/src/VTKPlugin/VTKPlugin_GUI.h b/src/VTKPlugin/VTKPlugin_GUI.h
new file mode 100644 (file)
index 0000000..a24f5df
--- /dev/null
@@ -0,0 +1,39 @@
+// Copyright (C) 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, or (at your option) any 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 VTKPlugin_GUI_H
+#define VTKPlugin_GUI_H
+
+#include "GEOMPluginGUI.h"
+
+class VTKPlugin_GUI: public GEOMPluginGUI
+{
+  Q_OBJECT
+public:
+  VTKPlugin_GUI( GeometryGUI* parent );
+  ~VTKPlugin_GUI();
+
+  bool OnGUIEvent( int commandId, SUIT_Desktop* );
+  bool OnGUIEvent( const QString&, SUIT_Desktop* );
+
+private:
+  bool exportVTK( SUIT_Desktop* );
+};
+
+#endif // VTKPlugin_GUI_H
diff --git a/src/VTKPlugin/VTKPlugin_IECallBack.cxx b/src/VTKPlugin/VTKPlugin_IECallBack.cxx
new file mode 100755 (executable)
index 0000000..25f1658
--- /dev/null
@@ -0,0 +1,57 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "VTKPlugin_IECallBack.hxx"
+#include "VTKPlugin_IOperations.hxx"
+#include "VTKPlugin_OperationsCreator.hxx"
+
+//=============================================================================
+/*!
+ *  constructor
+ */
+//=============================================================================
+VTKPlugin_IECallBack::VTKPlugin_IECallBack()
+{
+}
+
+//=============================================================================
+/*!
+ *  destructor
+ */
+//=============================================================================
+VTKPlugin_IECallBack::~VTKPlugin_IECallBack()
+{
+}
+
+//=============================================================================
+/*!
+ *  Export
+ */
+//=============================================================================
+bool VTKPlugin_IECallBack::Export( int                            theDocId,
+                                  const Handle(GEOM_Object)      theOriginal,
+                                  const TCollection_AsciiString& theFileName,
+                                  const TCollection_AsciiString& theFormatName )
+{
+  VTKPlugin_IOperations* aPluginOperations = VTKPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  const double aDeflection = 0.001;
+  aPluginOperations->ExportVTK( theOriginal, theFileName, aDeflection );
+  return true;
+}
diff --git a/src/VTKPlugin/VTKPlugin_IECallBack.hxx b/src/VTKPlugin/VTKPlugin_IECallBack.hxx
new file mode 100644 (file)
index 0000000..a0e91f4
--- /dev/null
@@ -0,0 +1,45 @@
+// Copyright (C) 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, or (at your option) any 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 _VTKPlugin_IECallBack_HXX_
+#define _VTKPlugin_IECallBack_HXX_
+
+// internal includes
+#include "VTKPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_Object.hxx"
+#include "GEOMImpl_IECallBack.hxx"
+
+// OCC includes
+#include <TCollection_AsciiString.hxx>
+
+class VTKPLUGINENGINE_EXPORT VTKPlugin_IECallBack : public GEOMImpl_IECallBack
+{
+public:
+  VTKPlugin_IECallBack();
+  ~VTKPlugin_IECallBack();
+  
+  bool Export( int                            theDocId,
+              const Handle(GEOM_Object)      theOriginal,
+              const TCollection_AsciiString& theFileName,
+              const TCollection_AsciiString& theFormatName );
+};
+
+#endif
diff --git a/src/VTKPlugin/VTKPlugin_IExport.hxx b/src/VTKPlugin/VTKPlugin_IExport.hxx
new file mode 100644 (file)
index 0000000..5fe83e6
--- /dev/null
@@ -0,0 +1,54 @@
+// Copyright (C) 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, or (at your option) any 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 _VTKPlugin_IExport_HXX_
+#define _VTKPlugin_IExport_HXX_
+
+#include "GEOM_Function.hxx"
+
+#define EXPORTVTK_ARG_ORIGINAL   1
+#define EXPORTVTK_ARG_FILENAME   2
+#define EXPORTVTK_ARG_DEFLECTION 3
+
+class VTKPlugin_IExport
+{
+public:
+  VTKPlugin_IExport( Handle(GEOM_Function) theFunction )
+    : _func(theFunction) {}
+
+  void SetOriginal( Handle( GEOM_Function ) theOriginal)
+    { _func->SetReference( EXPORTVTK_ARG_ORIGINAL, theOriginal ); }
+  Handle( GEOM_Function ) GetOriginal()
+    { return _func->GetReference( EXPORTVTK_ARG_ORIGINAL ); }
+
+  void SetFileName( const TCollection_AsciiString& theFileName )
+    { _func->SetString( EXPORTVTK_ARG_FILENAME, theFileName ); }
+  TCollection_AsciiString GetFileName()
+    { return _func->GetString( EXPORTVTK_ARG_FILENAME ); }
+
+  void SetDeflection( double theDeflection )
+    { _func->SetReal( EXPORTVTK_ARG_DEFLECTION, theDeflection ); }
+  double GetDeflection()
+    { return _func->GetReal( EXPORTVTK_ARG_DEFLECTION ); }
+  
+private:
+  Handle(GEOM_Function) _func;
+};
+
+#endif // _VTKPlugin_IExport_HXX_
diff --git a/src/VTKPlugin/VTKPlugin_IOperations.cxx b/src/VTKPlugin/VTKPlugin_IOperations.cxx
new file mode 100644 (file)
index 0000000..cdb6fc8
--- /dev/null
@@ -0,0 +1,109 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "VTKPlugin_IOperations.hxx"
+#include "VTKPlugin_ExportDriver.hxx"
+#include "VTKPlugin_IExport.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+
+// GEOM includes
+#include "GEOM_PythonDump.hxx"
+#include "GEOMImpl_Types.hxx"
+
+#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
+
+//=============================================================================
+/*!
+ *  Constructor
+ */
+//=============================================================================
+VTKPlugin_IOperations::VTKPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
+: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+{
+  MESSAGE( "VTKPlugin_IOperations::VTKPlugin_IOperations" );
+}
+
+//=============================================================================
+/*!
+ *  Destructor
+ */
+//=============================================================================
+VTKPlugin_IOperations::~VTKPlugin_IOperations()
+{
+  MESSAGE( "VTKPlugin_IOperations::~VTKPlugin_IOperations" );
+}
+
+//=============================================================================
+/*!
+ *  ExportVTK
+ *  Export a shape to VTK format
+ *  \param theOriginal The shape to export
+ *  \param theFileName The name of the file to exported
+ *  \param theDeflection The deflection of the shape to exported
+ */
+//=============================================================================
+void VTKPlugin_IOperations::ExportVTK( const Handle(GEOM_Object)      theOriginal,
+                                      const TCollection_AsciiString& theFileName,
+                                      const double                   theDeflection )
+{
+  SetErrorCode(KO);
+  if( theOriginal.IsNull() ) return;
+
+  Handle(GEOM_Function) aRefFunction = theOriginal->GetLastFunction();
+  if( aRefFunction.IsNull() ) return;  //There is no function which creates an object to be exported
+
+  //Add a new result object
+  Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
+
+  //Add an Export function
+  Handle(GEOM_Function) aFunction = result->AddFunction( VTKPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
+  if( aFunction.IsNull() ) return;
+
+  //Check if the function is set correctly
+  if( aFunction->GetDriverGUID() != VTKPlugin_ExportDriver::GetID() ) return;
+
+  //Set parameters
+  VTKPlugin_IExport aCI( aFunction );
+  aCI.SetOriginal( aRefFunction );
+  aCI.SetFileName( theFileName );
+  aCI.SetDeflection( theDeflection );
+
+  //Perform the Export
+  try {
+    OCC_CATCH_SIGNALS;
+    if( !GetSolver()->ComputeFunction( aFunction ) ) {
+      SetErrorCode( "Not enough space on disk, or you haven't permissions to write this directory" );
+      return;
+    }
+  }
+  catch( Standard_Failure ) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode( aFail->GetMessageString() );
+    return;
+  }
+
+  //Make a Python command
+  GEOM::TPythonDump(aFunction) << "geompy.ExportVTK(" << theOriginal << ", \""
+    << theFileName.ToCString() << "\", " << theDeflection << ")";
+
+  SetErrorCode(OK);
+}
diff --git a/src/VTKPlugin/VTKPlugin_IOperations.hxx b/src/VTKPlugin/VTKPlugin_IOperations.hxx
new file mode 100644 (file)
index 0000000..dc7a617
--- /dev/null
@@ -0,0 +1,41 @@
+// Copyright (C) 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, or (at your option) any 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 : VTKPlugin_IOperations.hxx
+
+#ifndef _VTKPlugin_IOperations_HXX_
+#define _VTKPlugin_IOperations_HXX_
+
+// internal includes
+#include "VTKPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOMImpl_IBaseIEOperations.hxx"
+
+class VTKPLUGINENGINE_EXPORT VTKPlugin_IOperations: public GEOMImpl_IBaseIEOperations
+{
+public:
+  VTKPlugin_IOperations( GEOM_Engine*, int );
+  ~VTKPlugin_IOperations();
+
+  void ExportVTK( const Handle(GEOM_Object),
+                 const TCollection_AsciiString&,
+                 const double );
+};
+
+#endif
diff --git a/src/VTKPlugin/VTKPlugin_IOperations_i.cc b/src/VTKPlugin/VTKPlugin_IOperations_i.cc
new file mode 100644 (file)
index 0000000..f73c948
--- /dev/null
@@ -0,0 +1,80 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "VTKPlugin_IOperations_i.hh"
+#include "VTKPlugin_IOperations.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+
+//=============================================================================
+/*!
+ *   constructor:
+ */
+//=============================================================================
+VTKPlugin_IOperations_i::VTKPlugin_IOperations_i( PortableServer::POA_ptr thePOA,
+                                                 GEOM::GEOM_Gen_ptr theEngine,
+                                                 VTKPlugin_IOperations* theImpl )
+:GEOM_IOperations_i( thePOA, theEngine, theImpl )
+{
+  MESSAGE( "VTKPlugin_IOperations_i::VTKPlugin_IOperations_i" );
+}
+
+//=============================================================================
+/*!
+ *  destructor
+ */
+//=============================================================================
+VTKPlugin_IOperations_i::~VTKPlugin_IOperations_i()
+{
+  MESSAGE( "VTKPlugin_IOperations_i::~VTKPlugin_IOperations_i" );
+}
+
+//=============================================================================
+/*!
+ *  ExportVTK
+ *  Export a shape to VTK format
+ *  \param theOriginal The shape to export
+ *  \param theFileName The name of the exported file
+ *  \param theDeflection The deflection of the exported shape
+ */
+//=============================================================================
+void VTKPlugin_IOperations_i::ExportVTK( GEOM::GEOM_Object_ptr theOriginal,
+                                        const char*           theFileName,
+                                        const double          theDeflection )
+{
+  // duplicate the original shape
+  GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate( theOriginal );
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference shape
+  Handle(GEOM_Object) anOriginal = GetObjectImpl( theOriginal );
+  if (anOriginal.IsNull()) return;
+
+  //Export the shape to the file
+  GetOperations()->ExportVTK( anOriginal, theFileName, theDeflection );
+}
+
+VTKPlugin_IOperations* VTKPlugin_IOperations_i::GetOperations()
+{
+  return (VTKPlugin_IOperations*)GetImpl();
+}
diff --git a/src/VTKPlugin/VTKPlugin_IOperations_i.hh b/src/VTKPlugin/VTKPlugin_IOperations_i.hh
new file mode 100644 (file)
index 0000000..1a0d0ae
--- /dev/null
@@ -0,0 +1,51 @@
+// Copyright (C) 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, or (at your option) any 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 _VTKPlugin_IOperations_i_HeaderFile
+#define _VTKPlugin_IOperations_i_HeaderFile
+
+// idl includes
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER( GEOM_Gen )
+#include CORBA_SERVER_HEADER( VTKPlugin )
+
+// internal includes
+#include "VTKPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_IOperations_i.hh"
+
+class VTKPlugin_IOperations;
+
+class VTKPLUGINENGINE_EXPORT VTKPlugin_IOperations_i :
+      public virtual POA_GEOM::IVTKOperations,
+      public virtual GEOM_IOperations_i
+{
+public:
+  VTKPlugin_IOperations_i( PortableServer::POA_ptr thePOA,
+                          GEOM::GEOM_Gen_ptr theEngine,
+                          VTKPlugin_IOperations* theImpl );
+  ~VTKPlugin_IOperations_i();
+
+  void ExportVTK( GEOM::GEOM_Object_ptr, const char*, const double );
+
+  VTKPlugin_IOperations* GetOperations();
+};
+
+#endif
diff --git a/src/VTKPlugin/VTKPlugin_OperationsCreator.cxx b/src/VTKPlugin/VTKPlugin_OperationsCreator.cxx
new file mode 100644 (file)
index 0000000..c71ab52
--- /dev/null
@@ -0,0 +1,67 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "VTKPlugin_OperationsCreator.hxx"
+#include "VTKPlugin_IOperations_i.hh"
+#include "VTKPlugin_IOperations.hxx"
+#include "VTKPlugin_ExportDriver.hxx"
+#include "VTKPlugin_IECallBack.hxx"
+
+// KERNEL includes
+#include <Utils_ExceptHandlers.hxx>
+#include <utilities.h>
+
+// OCCT includes
+#include <TFunction_DriverTable.hxx>
+
+std::map <int, VTKPlugin_IOperations*> VTKPlugin_OperationsCreator::_mapOfOperations;
+
+VTKPlugin_OperationsCreator::VTKPlugin_OperationsCreator()
+{
+  // Register drivers
+  TFunction_DriverTable::Get()->AddDriver( VTKPlugin_ExportDriver::GetID(),
+                                          new VTKPlugin_ExportDriver() );
+  
+  // Register callback
+  VTKPlugin_IECallBack* callback = new VTKPlugin_IECallBack();
+  GEOMImpl_IECallBack::Register( "VTK", callback );
+}
+
+VTKPlugin_OperationsCreator::~VTKPlugin_OperationsCreator()
+{
+}
+
+GEOM_IOperations_i* VTKPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
+                                                         int                     theStudyId,
+                                                         GEOM::GEOM_Gen_ptr      theEngine,
+                                                         ::GEOMImpl_Gen*         theGenImpl )
+{
+  Unexpect aCatch( SALOME_SalomeException );
+  MESSAGE( "VTKPlugin_OperationsCreator::Create" );
+  return new VTKPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+}
+
+VTKPlugin_IOperations* VTKPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
+                                                        int             theStudyId )
+{
+  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
+    _mapOfOperations[theStudyId] = new VTKPlugin_IOperations( theGenImpl, theStudyId );
+  return _mapOfOperations[theStudyId];
+}
diff --git a/src/VTKPlugin/VTKPlugin_OperationsCreator.hxx b/src/VTKPlugin/VTKPlugin_OperationsCreator.hxx
new file mode 100755 (executable)
index 0000000..9d9b1ae
--- /dev/null
@@ -0,0 +1,57 @@
+// Copyright (C) 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, or (at your option) any 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 _GEOM_VTKPlugin_OperationsCreator_HXX_
+#define _GEOM_VTKPlugin_OperationsCreator_HXX_
+
+// internal includes
+#include "VTKPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_Gen_i.hh"
+
+// C++ includes
+#include <map>
+
+class VTKPlugin_IOperations;
+
+//=====================================================================
+// Operations creator
+//=====================================================================
+class VTKPLUGINENGINE_EXPORT VTKPlugin_OperationsCreator : public GEOM_GenericOperationsCreator
+{
+public:
+  VTKPlugin_OperationsCreator();
+  ~VTKPlugin_OperationsCreator();
+
+  GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
+                             int                     theStudyId,
+                             GEOM::GEOM_Gen_ptr      theEngine,
+                             ::GEOMImpl_Gen*         theGenImpl );
+private:
+  static VTKPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
+                                     int                     theStudyId );
+
+private:
+  static std::map <int, VTKPlugin_IOperations*>  _mapOfOperations;
+
+  friend class VTKPlugin_IECallBack;
+};
+
+#endif
diff --git a/src/VTKPlugin/VTKPlugin_msg_en.ts b/src/VTKPlugin/VTKPlugin_msg_en.ts
new file mode 100644 (file)
index 0000000..720bfca
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTVTK</source>
+        <translation>VTK</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTVTK</source>
+        <translation>Export VTK</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTVTK</source>
+        <translation>Export VTK</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTVTK</source>
+        <translation>VTK</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTVTK</source>
+        <translation>Import VTK</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTVTK</source>
+        <translation>Import VTK</translation>
+    </message>
+</context>
+<context>
+    <name>VTKPlugin_GUI</name>
+    <message>
+        <source>VTK_FILES</source>
+        <translation>VTK files( *.vtk )</translation>
+    </message>
+    <message>
+        <source>EXPORT_TITLE</source>
+        <translation>Export VTK</translation>
+    </message>
+</context>
+<context>
+    <name>VTKPlugin_ExportDlg</name>
+    <message>
+        <source>DEFLECTION</source>
+        <translation>Deflection</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/VTKPlugin/VTKPlugin_msg_fr.ts b/src/VTKPlugin/VTKPlugin_msg_fr.ts
new file mode 100644 (file)
index 0000000..276a5ab
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTVTK</source>
+        <translation>VTK</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTVTK</source>
+        <translation>Exporter VTK</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTVTK</source>
+        <translation>Exporter VTK</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTVTK</source>
+        <translation>VTK</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTVTK</source>
+        <translation>Importer VTK</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTVTK</source>
+        <translation>Importer VTK</translation>
+    </message>
+</context>
+<context>
+    <name>VTKPlugin_GUI</name>
+    <message>
+        <source>VTK_FILES</source>
+        <translation>VTK fichiers( *.vtk )</translation>
+    </message>
+    <message>
+        <source>EXPORT_TITLE</source>
+        <translation>Exporter VTK</translation>
+    </message>
+</context>
+<context>
+    <name>VTKPlugin_ExportDlg</name>
+    <message>
+        <source>DEFLECTION</source>
+        <translation>Déflexion</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/VTKPlugin/VTKPlugin_msg_ja.ts b/src/VTKPlugin/VTKPlugin_msg_ja.ts
new file mode 100644 (file)
index 0000000..8b0df3a
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ja" sourcelanguage="en">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTVTK</source>
+        <translation type="unfinished">VTK</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTVTK</source>
+        <translation type="unfinished">Export VTK</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTVTK</source>
+        <translation type="unfinished">Export VTK</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTVTK</source>
+        <translation type="unfinished">VTK</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTVTK</source>
+        <translation type="unfinished">Import VTK</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTVTK</source>
+        <translation type="unfinished">Import VTK</translation>
+    </message>
+</context>
+<context>
+    <name>VTKPlugin_GUI</name>
+    <message>
+        <source>VTK_FILES</source>
+        <translation type="unfinished">VTK files( *.vtk )</translation>
+    </message>
+    <message>
+        <source>EXPORT_TITLE</source>
+        <translation type="unfinished">Export VTK</translation>
+    </message>
+</context>
+<context>
+    <name>VTKPlugin_ExportDlg</name>
+    <message>
+        <source>DEFLECTION</source>
+        <translation type="unfinished">Deflection</translation>
+    </message>
+</context>
+</TS>
index 9bd59eafb131992297f1eecb34c6693271e7d0ed..f8229318a4a60b41a05d532f6eb893048a0597fe 100644 (file)
@@ -310,7 +310,7 @@ namespace {
     parseXaoNode(doc, root, xaoObject);
 
     xmlFreeDoc(doc);       // free document
-    xmlCleanupParser();    // free globals
+    //xmlCleanupParser();    // free globals //vsr: xmlCleanupParser should not be called from the application
   }
 
   void parseXaoNode(xmlDocPtr doc, xmlNodePtr xaoNode, Xao* xaoObject)
diff --git a/src/XAOPlugin/CMakeLists.txt b/src/XAOPlugin/CMakeLists.txt
new file mode 100644 (file)
index 0000000..910c45b
--- /dev/null
@@ -0,0 +1,156 @@
+# 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, or (at your option) any 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(SALOME_BUILD_GUI)
+  INCLUDE(UseQt4Ext)
+  INCLUDE(${QT_USE_FILE})
+ENDIF()
+
+# --- options ---
+
+# additional include directories
+INCLUDE_DIRECTORIES(
+  ${CAS_INCLUDE_DIRS}
+  ${KERNEL_INCLUDE_DIRS}
+  ${PROJECT_BINARY_DIR}/idl
+  ${PROJECT_SOURCE_DIR}/src/GEOMAlgo
+  ${PROJECT_SOURCE_DIR}/src/GEOM
+  ${PROJECT_SOURCE_DIR}/src/GEOMImpl
+  ${PROJECT_SOURCE_DIR}/src/GEOM_I
+  ${PROJECT_SOURCE_DIR}/src/GEOMClient
+  ${PROJECT_SOURCE_DIR}/src/GEOMUtils
+  ${PROJECT_SOURCE_DIR}/src/XAO
+  )
+  
+IF(SALOME_BUILD_GUI)
+  INCLUDE_DIRECTORIES(
+    ${QT_INCLUDE_DIRS}
+    ${GUI_INCLUDE_DIRS}
+    ${PROJECT_SOURCE_DIR}/src/OBJECT
+    ${PROJECT_SOURCE_DIR}/src/GEOMGUI
+    ${PROJECT_SOURCE_DIR}/src/GEOMBase
+    ${PROJECT_SOURCE_DIR}/src/DlgRef
+    )
+ENDIF()
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(
+  ${CAS_DEFINITIONS}
+  ${OMNIORB_DEFINITIONS}
+  )
+  
+IF(WIN32)
+  ADD_DEFINITIONS(-DNOGDI)
+ENDIF(WIN32)
+
+IF(SALOME_BUILD_GUI)
+ADD_DEFINITIONS(
+  ${QT_DEFINITIONS}
+  )
+ENDIF()
+
+# libraries to link to
+SET(_link_engine_LIBRARIES
+  ${CAS_TKXAO}
+  ${KERNEL_SALOMELocalTrace}
+  ${KERNEL_OpUtil}
+  SalomeIDLGEOM
+  SalomeIDLXAOPlugin
+  GEOMEngine
+  GEOMClient
+  XAO
+  )
+  
+IF(SALOME_BUILD_GUI)
+  SET(_link_gui_LIBRARIES
+    SalomeIDLXAOPlugin
+    DlgRef
+    GEOMObject
+    GEOM
+    GEOMBase
+    )
+ENDIF()
+
+# --- headers ---
+
+SET(XAOPluginEngine_HEADERS
+  XAOPlugin_IOperations_i.hh
+  XAOPlugin_Engine.hxx
+  XAOPlugin_OperationsCreator.hxx
+  XAOPlugin_IOperations.hxx
+  XAOPlugin_IImportExport.hxx 
+  XAOPlugin_Driver.hxx 
+  XAOPlugin_IECallBack.hxx
+  )
+
+IF(SALOME_BUILD_GUI) 
+  # header files / to be processed by moc
+  SET(_moc_HEADERS
+    XAOPlugin_ExportDlg.h
+    XAOPlugin_ImportDlg.h
+    )
+ENDIF()
+
+# --- sources ---
+
+IF(SALOME_BUILD_GUI)
+  # sources / moc wrappings
+  QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+
+  SET(XAOPluginGUI_SOURCES
+    XAOPlugin_GUI.cxx
+    XAOPlugin_ExportDlg.cxx
+    XAOPlugin_ImportDlg.cxx
+    ${_moc_SOURCES}
+    )
+ENDIF()
+  
+SET(XAOPluginEngine_SOURCES
+  XAOPlugin_Engine.cxx
+  XAOPlugin_OperationsCreator.cxx
+  XAOPlugin_IOperations_i.cc
+  XAOPlugin_IOperations.cxx
+  XAOPlugin_Driver.cxx
+  XAOPlugin_IECallBack.cxx
+  )
+  
+# resource files / to be processed by lrelease
+SET(XAOPlugin_RESOURCES
+  XAOPlugin_images.ts
+  XAOPlugin_msg_en.ts
+  XAOPlugin_msg_fr.ts
+  XAOPlugin_msg_ja.ts
+  )
+
+# --- rules ---
+
+ADD_LIBRARY(XAOPluginEngine ${XAOPluginEngine_SOURCES})
+TARGET_LINK_LIBRARIES(XAOPluginEngine ${_link_engine_LIBRARIES})
+INSTALL(TARGETS XAOPluginEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+IF(SALOME_BUILD_GUI)
+  ADD_LIBRARY(XAOPluginGUI ${XAOPluginGUI_SOURCES})
+  TARGET_LINK_LIBRARIES(XAOPluginGUI ${_link_gui_LIBRARIES})
+  INSTALL(TARGETS XAOPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+  
+  QT4_INSTALL_TS_RESOURCES("${XAOPlugin_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")
+ENDIF()
+
+
+INSTALL(FILES ${XAOPluginEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
diff --git a/src/XAOPlugin/XAOPlugin_Driver.cxx b/src/XAOPlugin/XAOPlugin_Driver.cxx
new file mode 100644 (file)
index 0000000..1c16ae7
--- /dev/null
@@ -0,0 +1,105 @@
+// 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, or (at your option) any 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
+//
+
+// internal includes
+#include "XAOPlugin_Driver.hxx"
+#include "XAOPlugin_IImportExport.hxx"
+
+// GEOM includes
+#include "GEOMImpl_Types.hxx"
+#include "GEOM_Function.hxx"
+
+#include <XAO_Xao.hxx>
+#include <XAO_Geometry.hxx>
+#include <XAO_Group.hxx>
+#include <XAO_XaoUtils.hxx>
+
+// OCC includes
+#include <Standard_Stream.hxx>
+#include <TFunction_Logbook.hxx>
+#include <StdFail_NotDone.hxx>
+
+//=======================================================================
+//function : GetID
+//purpose  :
+//=======================================================================
+const Standard_GUID& XAOPlugin_Driver::GetID()
+{
+    static Standard_GUID aGUID("FF1BBB71-5D14-4df2-980B-3A668264EA16");
+    return aGUID;
+}
+
+//=======================================================================
+//function : XAOPlugin_Driver
+//purpose  :
+//=======================================================================
+XAOPlugin_Driver::XAOPlugin_Driver()
+{
+}
+
+//=======================================================================
+//function : ~XAOPlugin_Driver
+//purpose  :
+//=======================================================================
+XAOPlugin_Driver::~XAOPlugin_Driver()
+{
+}
+
+Standard_Boolean XAOPlugin_Driver::MustExecute(const TFunction_Logbook&) const
+{
+  return Standard_True;
+}
+
+//=======================================================================
+//function : Execute
+//purpose  :
+//=======================================================================
+Standard_Integer XAOPlugin_Driver::Execute(TFunction_Logbook& log) const
+{
+  if (Label().IsNull()) return 0;
+  Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
+
+  XAOPlugin_IImportExport iexao(function);
+  TCollection_AsciiString xao   = iexao.GetData();
+
+  TopoDS_Shape shape;
+
+  Standard_Integer functionType = function->GetType();
+  if (functionType == EXPORT_SHAPE)
+  {
+  }
+  else if (functionType == IMPORT_SHAPE)
+  {
+  }
+  else
+  {
+    // other construction modes here
+  }
+
+  if (shape.IsNull()) return 0;
+  function->SetValue(shape);
+
+  log.SetTouched(Label());
+
+  return 1;
+}
+
+IMPLEMENT_STANDARD_HANDLE (XAOPlugin_Driver, TFunction_Driver);
+IMPLEMENT_STANDARD_RTTIEXT(XAOPlugin_Driver, TFunction_Driver);
diff --git a/src/XAOPlugin/XAOPlugin_Driver.hxx b/src/XAOPlugin/XAOPlugin_Driver.hxx
new file mode 100644 (file)
index 0000000..ea821cf
--- /dev/null
@@ -0,0 +1,45 @@
+// Copyright (C) 2013-2014  CEA/DEN, EDF R&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 _XAOPlugin_Driver_HXX
+#define _XAOPlugin_Driver_HXX
+
+// OCCT includes
+#include <TFunction_Driver.hxx>
+
+DEFINE_STANDARD_HANDLE(XAOPlugin_Driver, TFunction_Driver);
+
+class XAOPlugin_Driver: public TFunction_Driver
+{
+public:
+  XAOPlugin_Driver();
+  ~XAOPlugin_Driver();
+
+  static const Standard_GUID& GetID();
+  virtual Standard_Integer Execute(TFunction_Logbook& log) const;
+  Standard_Boolean MustExecute(const TFunction_Logbook&) const;
+  virtual void Validate(TFunction_Logbook&) const {}
+
+DEFINE_STANDARD_RTTI(XAOPlugin_Driver)
+};
+
+#endif // _XAOPlugin_Driver_HXX
diff --git a/src/XAOPlugin/XAOPlugin_Engine.cxx b/src/XAOPlugin/XAOPlugin_Engine.cxx
new file mode 100644 (file)
index 0000000..e78ce5a
--- /dev/null
@@ -0,0 +1,31 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "XAOPlugin_Engine.hxx"
+#include "XAOPlugin_OperationsCreator.hxx"
+
+extern "C"
+{
+  XAOPLUGINENGINE_EXPORT
+  GEOM_GenericOperationsCreator* GetOperationsCreator()
+  {
+    return new XAOPlugin_OperationsCreator();
+  }
+}
diff --git a/src/XAOPlugin/XAOPlugin_Engine.hxx b/src/XAOPlugin/XAOPlugin_Engine.hxx
new file mode 100755 (executable)
index 0000000..9dd44dc
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 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, or (at your option) any 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 _XAOPLUGIN_ENGINE_HXX_
+#define _XAOPLUGIN_ENGINE_HXX_
+
+#ifdef WIN32
+ #if defined XAOPLUGINENGINE_EXPORTS || defined XAOPluginEngine_EXPORTS
+   #define XAOPLUGINENGINE_EXPORT __declspec( dllexport )
+ #else
+   #define XAOPLUGINENGINE_EXPORT __declspec( dllimport )
+ #endif 
+#else
+   #define XAOPLUGINENGINE_EXPORT
+#endif
+
+#endif
diff --git a/src/XAOPlugin/XAOPlugin_ExportDlg.cxx b/src/XAOPlugin/XAOPlugin_ExportDlg.cxx
new file mode 100644 (file)
index 0000000..01e570f
--- /dev/null
@@ -0,0 +1,456 @@
+// 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, or (at your option) any 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
+//
+
+// internal includes
+#include "XAOPlugin_ExportDlg.h"
+#include "XAOPlugin_IOperations_i.hh"
+
+// GUI includes
+#include <SUIT_Session.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_OverrideCursor.h>
+#include <SUIT_FileDlg.h>
+
+#include <SalomeApp_Application.h>
+#include <SalomeApp_Study.h>
+#include <SalomeApp_Tools.h>
+#include <LightApp_SelectionMgr.h>
+
+// GEOM includes
+#include "GeometryGUI.h"
+#include "GEOMBase.h"
+#include "GEOMImpl_Types.hxx"
+
+// OCCT Includes
+#include <TopoDS_Shape.hxx>
+#include <TopoDS.hxx>
+#include <TopExp.hxx>
+#include <TColStd_IndexedMapOfInteger.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+
+// QT includes
+#include <QLabel>
+#include <QLineEdit>
+#include <QButtonGroup>
+#include <QListWidget>
+#include <QFileDialog>
+#include <QGroupBox>
+#include <QRadioButton>
+#include <QGridLayout>
+#include <QPushButton>
+#include <QMap>
+
+//=================================================================================
+// Constructor
+//=================================================================================
+XAOPlugin_ExportDlg::XAOPlugin_ExportDlg(GeometryGUI* geometryGUI, QWidget* parent)
+:
+        GEOMBase_Skeleton(geometryGUI, parent, false)
+{
+  m_mainObj = GEOM::GEOM_Object::_nil();
+
+  SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+  QPixmap imageOp(resMgr->loadPixmap("GEOM", tr("XAOPLUGIN_EXPORT_ICON")));
+  QPixmap iconSelect(resMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
+
+  setWindowTitle(tr("XAOPLUGIN_EXPORT_TITLE"));
+
+  /***************************************************************/
+  mainFrame()->GroupConstructors->setTitle(tr("XAOPLUGIN_EXPORT_TITLE"));
+  mainFrame()->RadioButton1->setIcon(imageOp);
+  mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose);
+  mainFrame()->RadioButton2->close();
+  mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
+  mainFrame()->RadioButton3->close();
+
+  // hide name
+  mainFrame()->GroupBoxName->hide();
+
+  //****************************
+  // Selection Group box
+  QGroupBox* gbxExport = new QGroupBox(parent);
+
+  QGridLayout* gridLayoutExport = new QGridLayout(gbxExport);
+#ifndef Q_OS_MAC
+  gridLayoutExport->setSpacing(6);
+  gridLayoutExport->setContentsMargins(9, 9, 9, 9);
+#endif
+  gridLayoutExport->setObjectName(QString::fromUtf8("gridLayoutExport"));
+
+  // Line 0
+  QLabel* lblShape = new QLabel(tr("XAOPLUGIN_EXPORT_INGSHAPE"), gbxExport);
+  btnShapeSelect = new QPushButton(gbxExport);
+  btnShapeSelect->setIcon(iconSelect);
+  ledShape = new QLineEdit(gbxExport);
+  ledShape->setMinimumSize(QSize(100, 0));
+
+  int line = 0, col = 0;
+  gridLayoutExport->addWidget(lblShape, line, col++, 1, 1);
+  gridLayoutExport->addWidget(btnShapeSelect, line, col++, 1, 1);
+  gridLayoutExport->addWidget(ledShape, line, col++, 1, 1);
+
+  // Line 1
+  QLabel* lblFileName = new QLabel(tr("XAOPLUGIN_EXPORT_FILENAME"), gbxExport);
+  btnFileSelect = new QPushButton(gbxExport);
+  ledFileName = new QLineEdit(gbxExport);
+  btnFileSelect->setText("...");
+
+  line++; col = 0;
+  gridLayoutExport->addWidget(lblFileName, line, col++, 1, 1);
+  gridLayoutExport->addWidget(btnFileSelect, line, col++, 1, 1);
+  gridLayoutExport->addWidget(ledFileName, line, col++, 1, 1);
+
+  // Line 2
+  QLabel* lblAuthor = new QLabel(tr("XAOPLUGIN_EXPORT_AUTHOR"), gbxExport);
+  ledAuthor = new QLineEdit(gbxExport);
+
+  line++; col = 0;
+  gridLayoutExport->addWidget(lblAuthor, line, col++, 2, 1);
+  col++; // span
+  gridLayoutExport->addWidget(ledAuthor, line, col++, 1, 1);
+
+  //****************************
+  // Filter Group box
+  QGroupBox* gbxFilter = new QGroupBox(parent);
+
+  QGridLayout* gridLayoutFilter = new QGridLayout(gbxFilter);
+#ifndef Q_OS_MAC
+  gridLayoutFilter->setSpacing(6);
+  gridLayoutFilter->setContentsMargins(9, 9, 9, 9);
+#endif
+  gridLayoutFilter->setObjectName(QString::fromUtf8("gbxFilter"));
+
+  // Line 0
+  QLabel* lblGroups = new QLabel(tr("XAOPLUGIN_EXPORT_LGROUPS"), gbxFilter);
+  QLabel* lblFields = new QLabel(tr("XAOPLUGIN_EXPORT_LFIELDS"), gbxFilter);
+
+  line = 0, col = 0;
+  gridLayoutFilter->addWidget(lblGroups, line, col++, 1, 1);
+  gridLayoutFilter->addWidget(lblFields, line, col++, 1, 1);
+
+  // Line 1
+  lstGroups = new QListWidget(gbxFilter);
+  lstGroups->setSelectionMode(QAbstractItemView::NoSelection);
+  lstFields = new QListWidget(gbxFilter);
+  lstFields->setSelectionMode(QAbstractItemView::NoSelection);
+
+  line++; col = 0;
+  gridLayoutFilter->addWidget(lstGroups, line, col++, 1, 1);
+  gridLayoutFilter->addWidget(lstFields, line, col++, 1, 1);
+
+  //****************************
+  QVBoxLayout* layout = new QVBoxLayout(centralWidget());
+  layout->setMargin(0);
+  layout->setSpacing(6);
+  layout->addWidget(gbxExport);
+  layout->addWidget(gbxFilter);
+
+  // set help
+  setHelpFileName("xao_format_page.html");
+
+  Init();
+}
+
+//=================================================================================
+// Destructor
+//=================================================================================
+XAOPlugin_ExportDlg::~XAOPlugin_ExportDlg()
+{
+  // no need to delete child widgets, Qt does it all for us
+}
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void XAOPlugin_ExportDlg::Init()
+{
+  // Get setting of step value from file configuration
+  m_groups.clear();
+  m_fields.clear();
+
+  // Signal/slot connections
+  connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+  connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+
+  connect(btnShapeSelect, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+  connect(((SalomeApp_Application*) (SUIT_Session::session()->activeApplication()))->selectionMgr(),
+          SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+  connect(btnFileSelect, SIGNAL(clicked()), this, SLOT(btnFileSelectClicked()));
+
+  initName(tr("XAOPLUGIN_EXPORTXAO"));
+  SelectionIntoArgument();
+}
+
+//=================================================================================
+// function : processObject()
+// purpose  : Fill dialog fields in accordance with myObj
+//=================================================================================
+void XAOPlugin_ExportDlg::processObject()
+{
+  lstGroups->clear();
+  lstFields->clear();
+  m_groups.clear();
+  m_fields.clear();
+
+  if (m_mainObj->_is_nil())
+  {
+    ledShape->setText("");
+  }
+  else
+  {
+    ledShape->setText(GEOMBase::GetName(m_mainObj));
+    GEOM::GEOM_IShapesOperations_var shapeOp = getGeomEngine()->GetIShapesOperations(getStudyId());
+
+    // add groups names
+    GEOM::ListOfGO_var groups = shapeOp->GetExistingSubObjects(m_mainObj, true);
+    for (int i = 0, n = groups->length(); i < n; i++)
+    {
+      QListWidgetItem* item = new QListWidgetItem();
+      item->setData(Qt::UserRole, QVariant(i));
+      item->setText(GEOMBase::GetName(groups[i]));
+      item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
+      item->setCheckState(Qt::Checked);
+      lstGroups->addItem(item);
+      m_groups.append(GEOM::GeomObjPtr(groups[i].in()));
+    }
+    lstGroups->sortItems(Qt::AscendingOrder);
+
+    // add fields
+    GEOM::GEOM_IFieldOperations_var fieldOp = getGeomEngine()->GetIFieldOperations(getStudyId());
+
+    GEOM::ListOfFields_var fields = fieldOp->GetFields(m_mainObj);
+    for (int i = 0, n = fields->length(); i < n; i++)
+    {
+      QListWidgetItem* item = new QListWidgetItem();
+      item->setData(Qt::UserRole, QVariant(i));
+      item->setText(fields[i]->GetName());
+      item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
+      item->setCheckState(Qt::Checked);
+      lstFields->addItem(item);
+      m_fields.append(GEOM::GeomFieldPtr(fields[i].in()));
+    }
+    lstFields->sortItems(Qt::AscendingOrder);
+  }
+}
+
+//=================================================================================
+// function : ClickOnOk()
+// purpose  :
+//=================================================================================
+void XAOPlugin_ExportDlg::ClickOnOk()
+{
+  setIsApplyAndClose(true);
+  if (ClickOnApply())
+    ClickOnCancel();
+  setIsApplyAndClose(false);
+}
+
+//=================================================================================
+// function : ClickOnApply()
+// purpose  :
+//=================================================================================
+bool XAOPlugin_ExportDlg::ClickOnApply()
+{
+  if (!isApplyAndClose())
+  {
+    setIsDisableBrowsing(true);
+    setIsDisplayResult(false);
+  }
+
+  QString msg;
+  if (!isValid(msg))
+  {
+    showError(msg);
+    return false;
+  }
+  SUIT_OverrideCursor wc;
+  SUIT_Session::session()->activeApplication()->putInfo("");
+
+  try
+  {
+    if (openCommand())
+      if (!execute())
+      {
+        abortCommand();
+        showError();
+        return false;
+      }
+  }
+  catch (const SALOME::SALOME_Exception& e)
+  {
+    SalomeApp_Tools::QtCatchCorbaException(e);
+    abortCommand();
+    return false;
+  }
+  commitCommand();
+
+  if (!isApplyAndClose())
+  {
+    setIsDisableBrowsing(false);
+    setIsDisplayResult(true);
+  }
+
+  processObject();
+  return true;
+}
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose  : Called when selection as changed or other case
+//=================================================================================
+void XAOPlugin_ExportDlg::SelectionIntoArgument()
+{
+  m_mainObj = GEOM::GEOM_Object::_nil();
+  LightApp_SelectionMgr* selMgr = myGeomGUI->getApp()->selectionMgr();
+  SALOME_ListIO selList;
+  selMgr->selectedObjects(selList);
+
+  if (selList.Extent() == 1)
+  {
+    m_mainObj = GEOMBase::ConvertIOinGEOMObject(selList.First());
+  }
+
+  processObject();
+}
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose  :
+//=================================================================================
+void XAOPlugin_ExportDlg::SetEditCurrentArgument()
+{
+  ledShape->setFocus();
+  myEditCurrentArgument = ledShape;
+  SelectionIntoArgument();
+}
+
+//=================================================================================
+// function : btnFileSelectClicked()
+// purpose  :
+//=================================================================================
+void XAOPlugin_ExportDlg::btnFileSelectClicked()
+{
+  QString file = SUIT_FileDlg::getFileName(this, ledFileName->text(), 
+                                           tr("XAOPLUGIN_FILES"),
+                                           tr("XAOPLUGIN_EXPORT_SELECT"), false);
+  if ( !file.isEmpty() )
+    ledFileName->setText( file );
+}
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose  :
+//=================================================================================
+void XAOPlugin_ExportDlg::ActivateThisDialog()
+{
+  GEOMBase_Skeleton::ActivateThisDialog();
+}
+
+//=================================================================================
+// function : enterEvent [REDEFINED]
+// purpose  :
+//=================================================================================
+void XAOPlugin_ExportDlg::enterEvent(QEvent*)
+{
+  if (!mainFrame()->GroupConstructors->isEnabled())
+    ActivateThisDialog();
+}
+
+//=================================================================================
+// function : createOperation
+// purpose  :
+//=================================================================================
+GEOM::GEOM_IOperations_ptr XAOPlugin_ExportDlg::createOperation()
+{
+  return getGeomEngine()->GetPluginOperations( getStudyId(), "XAOPluginEngine" );
+}
+
+//=================================================================================
+// function : isValid
+// purpose  :
+//=================================================================================
+bool XAOPlugin_ExportDlg::isValid(QString& msg)
+{
+  // check shape
+  if (ledShape->text().isEmpty())
+    return false;
+
+  // check file name
+  if (ledFileName->text().isEmpty())
+    return false;
+
+  return true;
+}
+
+//=================================================================================
+// function : execute
+// purpose  :
+//=================================================================================
+bool XAOPlugin_ExportDlg::execute()
+{
+  bool res = false;
+
+  QString author = ledAuthor->text();
+  QString fileName = ledFileName->text();
+
+  // get selected groups
+  QList<QListWidgetItem*> selGroups;
+  for (int j = 0; j < lstGroups->count(); ++j)
+  {
+    if (lstGroups->item(j)->checkState() == Qt::Checked)
+      selGroups.append(lstGroups->item(j));
+  }
+
+  GEOM::ListOfGO_var groups = new GEOM::ListOfGO();
+  groups->length(selGroups.count());
+  int i = 0;
+  for (QList<QListWidgetItem*>::iterator it = selGroups.begin(); it != selGroups.end(); ++it)
+  {
+    QListWidgetItem* item = (*it);
+    int index = item->data(Qt::UserRole).toInt();
+    groups[i++] = m_groups[index].copy();
+  }
+
+  // get selected fields
+  QList<QListWidgetItem*> selFields;
+  for (int j = 0; j < lstFields->count(); ++j)
+  {
+    if (lstFields->item(j)->checkState() == Qt::Checked)
+      selFields.append(lstFields->item(j));
+  }
+
+  GEOM::ListOfFields_var fields = new GEOM::ListOfFields();
+  fields->length(selFields.count());
+  i = 0;
+  for (QList<QListWidgetItem*>::iterator it = selFields.begin(); it != selFields.end(); ++it)
+  {
+    QListWidgetItem* item = (*it);
+    int index = item->data(Qt::UserRole).toInt();
+    fields[i++] = m_fields[index].copy();
+  }
+
+  // call engine function
+  GEOM::IXAOOperations_var aXAOOp = GEOM::IXAOOperations::_narrow( getOperation() );
+  res = aXAOOp->ExportXAO(m_mainObj, groups, fields,
+                          author.toStdString().c_str(),
+                          fileName.toStdString().c_str());
+  return res;
+}
diff --git a/src/XAOPlugin/XAOPlugin_ExportDlg.h b/src/XAOPlugin/XAOPlugin_ExportDlg.h
new file mode 100644 (file)
index 0000000..a2338e2
--- /dev/null
@@ -0,0 +1,75 @@
+// 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, or (at your option) any 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 XAOPlugin_ExportDlg_H
+#define XAOPlugin_ExportDlg_H
+
+// GEOM includes
+#include "GEOMBase_Skeleton.h"
+
+class QLineEdit;
+class QButtonGroup;
+class QListWidget;
+class QPushButton;
+
+//=================================================================================
+// class    : XAOPlugin_ExportDlg
+// purpose  :
+//=================================================================================
+class XAOPlugin_ExportDlg: public GEOMBase_Skeleton
+{
+  Q_OBJECT
+
+public:
+  XAOPlugin_ExportDlg(GeometryGUI*, QWidget* = 0);
+  ~XAOPlugin_ExportDlg();
+
+protected:
+  // redefined from GEOMBase_Helper
+  virtual GEOM::GEOM_IOperations_ptr createOperation();
+  virtual bool isValid(QString&);
+  virtual bool execute();
+
+private:
+  void Init();
+  void enterEvent(QEvent*);
+  void processObject();
+
+private:
+  GEOM::GEOM_Object_var m_mainObj;
+  QList<GEOM::GeomObjPtr> m_groups;
+  QList<GEOM::GeomFieldPtr> m_fields;
+  QLineEdit* ledShape;
+  QLineEdit* ledFileName;
+  QLineEdit* ledAuthor;
+  QListWidget* lstGroups;
+  QListWidget* lstFields;
+  QPushButton* btnShapeSelect;
+  QPushButton* btnFileSelect;
+
+private slots:
+  void ClickOnOk();
+  bool ClickOnApply();
+  void ActivateThisDialog();
+  void SelectionIntoArgument();
+  void SetEditCurrentArgument();
+  void btnFileSelectClicked();
+};
+
+#endif // XAOPlugin_ExportDlg_H
diff --git a/src/XAOPlugin/XAOPlugin_GUI.cxx b/src/XAOPlugin/XAOPlugin_GUI.cxx
new file mode 100644 (file)
index 0000000..6bb8164
--- /dev/null
@@ -0,0 +1,102 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "XAOPlugin_GUI.h"
+#include "XAOPlugin_ExportDlg.h"
+#include "XAOPlugin_ImportDlg.h"
+
+// GUI includes
+#include <SUIT_Desktop.h>
+#include <SalomeApp_Application.h>
+
+// GEOM includes
+#include "GeometryGUI.h"
+
+//=======================================================================
+// function : XAOPlugin_GUI()
+// purpose  : Constructor
+//=======================================================================
+XAOPlugin_GUI::XAOPlugin_GUI( GeometryGUI* parent ) : GEOMPluginGUI( parent )
+{
+}
+
+//=======================================================================
+// function : ~XAOPlugin_GUI
+// purpose  : Destructor
+//=======================================================================
+XAOPlugin_GUI::~XAOPlugin_GUI()
+{
+}
+
+//=======================================================================
+// function : OnGUIEvent()
+// purpose  : 
+//=======================================================================
+bool XAOPlugin_GUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
+{
+  switch ( theCommandID ) {
+  case 1:
+    return OnGUIEvent("Export_XAO", parent);
+  case 2:
+    return OnGUIEvent("Import_XAO", parent);
+  default:
+    return OnGUIEvent("", parent);
+  }
+  return false;
+}
+
+//=======================================================================
+// function : OnGUIEvent()
+// purpose  :
+//=======================================================================
+bool XAOPlugin_GUI::OnGUIEvent( const QString& theCommandID, SUIT_Desktop* parent )
+{
+  SalomeApp_Application* app = getGeometryGUI()->getApp();
+  if (!app) return false;
+
+  getGeometryGUI()->EmitSignalDeactivateDialog();
+
+  QDialog* dialog = NULL;
+  if( theCommandID == "Export_XAO" )
+    dialog = new XAOPlugin_ExportDlg(getGeometryGUI(), parent);
+  else if( theCommandID == "Import_XAO" )
+    dialog = new XAOPlugin_ImportDlg(getGeometryGUI(), parent);
+  else
+    app->putInfo( tr("GEOM_PRP_COMMAND").arg( theCommandID ) );
+
+  if (dialog != NULL)
+    dialog->show();
+
+  return true;
+}
+
+//=====================================================================================
+// EXPORTED METHODS
+//=====================================================================================
+extern "C"
+{
+#ifdef WIN32
+    __declspec( dllexport )
+#endif
+  GEOMGUI* GetLibGUI(GeometryGUI* parent)
+  {
+    return new XAOPlugin_GUI(parent);
+  }
+}
diff --git a/src/XAOPlugin/XAOPlugin_GUI.h b/src/XAOPlugin/XAOPlugin_GUI.h
new file mode 100644 (file)
index 0000000..bbd83db
--- /dev/null
@@ -0,0 +1,39 @@
+// Copyright (C) 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, or (at your option) any 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 XAOPlugin_GUI_H
+#define XAOPlugin_GUI_H
+
+#include "GEOMPluginGUI.h"
+
+//=================================================================================
+// class    : XAOPlugin_GUI
+// purpose  :
+//=================================================================================
+class XAOPlugin_GUI: public GEOMPluginGUI
+{
+public:
+  XAOPlugin_GUI(GeometryGUI* parent);
+  ~XAOPlugin_GUI();
+
+  bool OnGUIEvent( int commandId, SUIT_Desktop* );
+  bool OnGUIEvent( const QString&, SUIT_Desktop* );
+};
+
+#endif // XAOPlugin_GUI_H
diff --git a/src/XAOPlugin/XAOPlugin_IECallBack.cxx b/src/XAOPlugin/XAOPlugin_IECallBack.cxx
new file mode 100644 (file)
index 0000000..f6b19e5
--- /dev/null
@@ -0,0 +1,97 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "XAOPlugin_IECallBack.hxx"
+#include "XAOPlugin_IOperations.hxx"
+#include "XAOPlugin_OperationsCreator.hxx"
+#include "GEOMImpl_IShapesOperations.hxx"
+
+//=============================================================================
+/*!
+ *  constructor
+ */
+//=============================================================================
+XAOPlugin_IECallBack::XAOPlugin_IECallBack()
+{
+}
+
+//=============================================================================
+/*!
+ *  destructor
+ */
+//=============================================================================
+XAOPlugin_IECallBack::~XAOPlugin_IECallBack()
+{
+}
+
+//=============================================================================
+/*!
+ *  Export
+ */
+//=============================================================================
+bool
+XAOPlugin_IECallBack::Export( int                            theDocId,
+                             const Handle(GEOM_Object)      theOriginal,
+                             const TCollection_AsciiString& theFileName,
+                             const TCollection_AsciiString& theFormatName )
+{
+  XAOPlugin_IOperations* aPluginOperations = XAOPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  GEOMImpl_IShapesOperations* aShapesOperations = GetEngine()->GetIShapesOperations( theDocId );
+
+  Handle(TColStd_HSequenceOfTransient) groups = aShapesOperations->GetExistingSubObjects( theOriginal, GEOMImpl_IShapesOperations::Groups );
+  Handle(TColStd_HSequenceOfTransient) fields = aShapesOperations->GetExistingSubObjects( theOriginal, GEOMImpl_IShapesOperations::Fields );
+  std::list<Handle(GEOM_Object)> lgroups;
+  std::list<Handle(GEOM_Field)> lfields;
+  for (int i = 1; i <= groups->Length(); i++)
+    lgroups.push_back( Handle(GEOM_Object)::DownCast( groups->Value(i) ) );
+  for (int i = 1; i <= fields->Length(); i++)
+    lfields.push_back( Handle(GEOM_Field)::DownCast( fields->Value(i) ) );
+  aPluginOperations->ExportXAO( theOriginal, lgroups, lfields, "SIMAN Author", theFileName.ToCString() );
+  return true;
+}
+
+//=============================================================================
+/*!
+ *  Import
+ */
+//=============================================================================
+Handle(TColStd_HSequenceOfTransient)
+XAOPlugin_IECallBack::Import( int                            theDocId,
+                             const TCollection_AsciiString& theFormatName,
+                             const TCollection_AsciiString& theFileName )
+{
+  XAOPlugin_IOperations* aPluginOperations = XAOPlugin_OperationsCreator::get( GetEngine(), theDocId );
+
+  Handle(TColStd_HSequenceOfTransient) result = new TColStd_HSequenceOfTransient();
+  Handle(TColStd_HSequenceOfTransient) subshapes = new TColStd_HSequenceOfTransient();
+  Handle(TColStd_HSequenceOfTransient) groups = new TColStd_HSequenceOfTransient();
+  Handle(TColStd_HSequenceOfTransient) fields = new TColStd_HSequenceOfTransient();
+  Handle(GEOM_Object) shape;
+
+  bool ok = aPluginOperations->ImportXAO( theFileName.ToCString(), shape, subshapes, groups, fields );
+  if ( ok ) {
+    result->Append( shape );
+    for ( int i = 1; i <= groups->Length(); i++ )
+      result->Append( groups->Value(i) );
+    for ( int i = 1; i <= fields->Length(); i++ )
+      result->Append( fields->Value(i) );
+  }
+  return result;
+}
diff --git a/src/XAOPlugin/XAOPlugin_IECallBack.hxx b/src/XAOPlugin/XAOPlugin_IECallBack.hxx
new file mode 100644 (file)
index 0000000..50168ea
--- /dev/null
@@ -0,0 +1,50 @@
+// Copyright (C) 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, or (at your option) any 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 _XAOPlugin_IECallBack_HXX_
+#define _XAOPlugin_IECallBack_HXX_
+
+// internal includes
+#include "XAOPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_Object.hxx"
+#include "GEOMImpl_IECallBack.hxx"
+
+// OCC includes
+#include <TCollection_AsciiString.hxx>
+
+class XAOPLUGINENGINE_EXPORT XAOPlugin_IECallBack : public GEOMImpl_IECallBack
+{
+public:
+  XAOPlugin_IECallBack();
+  ~XAOPlugin_IECallBack();
+  
+  virtual bool Export( int                            theDocId,
+                      const Handle(GEOM_Object)      theOriginal,
+                      const TCollection_AsciiString& theFileName,
+                      const TCollection_AsciiString& theFormatName );
+
+  virtual
+  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
+                                              const TCollection_AsciiString& theFormatName,
+                                              const TCollection_AsciiString& theFileName );
+};
+
+#endif
diff --git a/src/XAOPlugin/XAOPlugin_IImportExport.hxx b/src/XAOPlugin/XAOPlugin_IImportExport.hxx
new file mode 100644 (file)
index 0000000..4f57275
--- /dev/null
@@ -0,0 +1,39 @@
+// 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, or (at your option) any 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 _XAOPlugin_IImportExport_HXX_
+#define _XAOPlugin_IImportExport_HXX_
+
+#include "GEOM_Function.hxx"
+
+#define IMPORTEXPORTXAO_ARG_DATA   1
+
+class XAOPlugin_IImportExport
+{
+public:
+  XAOPlugin_IImportExport(Handle(GEOM_Function) theFunction): _func(theFunction) {}
+
+  void SetData(const TCollection_AsciiString& data) { _func->SetString(IMPORTEXPORTXAO_ARG_DATA, data); }
+  const TCollection_AsciiString GetData() { return _func->GetString(IMPORTEXPORTXAO_ARG_DATA); }
+
+private:
+  Handle(GEOM_Function) _func;
+};
+
+#endif // _XAOPlugin_IImportExport_HXX_
diff --git a/src/XAOPlugin/XAOPlugin_IOperations.cxx b/src/XAOPlugin/XAOPlugin_IOperations.cxx
new file mode 100644 (file)
index 0000000..2e0f4d1
--- /dev/null
@@ -0,0 +1,666 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "XAOPlugin_IOperations.hxx"
+#include "XAOPlugin_Driver.hxx"
+#include "XAOPlugin_IImportExport.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+#include <Utils_SALOME_Exception.hxx>
+
+// GEOM includes
+#include "GEOM_PythonDump.hxx"
+#include "GEOMImpl_Types.hxx"
+#include "GEOMImpl_IGroupOperations.hxx"
+#include "GEOMImpl_IShapesOperations.hxx"
+#include "GEOMImpl_IFieldOperations.hxx"
+#include "GEOM_ISubShape.hxx"
+
+#include <XAO_Geometry.hxx>
+#include <XAO_BrepGeometry.hxx>
+#include <XAO_Xao.hxx>
+#include <XAO_Group.hxx>
+#include <XAO_Field.hxx>
+#include <XAO_BooleanField.hxx>
+#include <XAO_IntegerField.hxx>
+#include <XAO_DoubleField.hxx>
+#include <XAO_StringField.hxx>
+#include <XAO_DoubleStep.hxx>
+#include <XAO_StringStep.hxx>
+
+#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
+
+// OCC includes
+#include <TColStd_HArray1OfByte.hxx>
+#include <TColStd_HArray1OfReal.hxx>
+#include <TDataStd_Integer.hxx>
+
+
+XAO::Dimension shapeEnumToDimension(const TopAbs_ShapeEnum& shape)
+{
+  XAO::Dimension dim;
+  switch( shape ) {
+  case TopAbs_VERTEX:
+    dim = XAO::VERTEX; break;
+  case TopAbs_EDGE:
+    dim = XAO::EDGE; break;
+  case TopAbs_FACE:
+    dim = XAO::FACE; break;
+  case TopAbs_SOLID:
+    dim = XAO::SOLID; break;
+  default:
+    throw SALOME_Exception("Bad type"); // TODO
+  }
+  return dim;
+}
+
+TopAbs_ShapeEnum getGroupDimension(XAO::Group* group)
+{
+  XAO::Dimension dim = group->getDimension();
+  TopAbs_ShapeEnum rdim;
+  switch ( dim )
+  {
+  case XAO::VERTEX:
+    rdim = TopAbs_VERTEX; break;
+  case XAO::EDGE:
+    rdim = TopAbs_EDGE; break;
+  case XAO::FACE:
+    rdim = TopAbs_FACE; break;
+  case XAO::SOLID:
+    rdim = TopAbs_SOLID; break;
+  default:
+    rdim = TopAbs_COMPOUND; break;
+  }
+  return rdim;
+}
+
+//=============================================================================
+/*!
+ *  Constructor
+ */
+//=============================================================================
+XAOPlugin_IOperations::XAOPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
+: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+{
+  MESSAGE( "XAOPlugin_IOperations::XAOPlugin_IOperations" );
+}
+
+//=============================================================================
+/*!
+ *  Destructor
+ */
+//=============================================================================
+XAOPlugin_IOperations::~XAOPlugin_IOperations()
+{
+  MESSAGE( "XAOPlugin_IOperations::~XAOPlugin_IOperations" );
+}
+
+void XAOPlugin_IOperations::exportGroups( std::list<Handle(GEOM_Object)> groupList,
+                                                  XAO::Xao* xaoObject,
+                                                  XAO::BrepGeometry* geometry )
+{
+  // add the groups
+  std::list<Handle(GEOM_Object)>::iterator groupIterator = groupList.begin();
+  while (groupIterator != groupList.end())
+  {
+    Handle(GEOM_Object) currGroup = (*groupIterator++);
+    Handle(TColStd_HArray1OfInteger) groupIds = myGroupOperations->GetObjects(currGroup);
+
+    TopAbs_ShapeEnum shapeGroup = myGroupOperations->GetType(currGroup);
+    XAO::Dimension dim = shapeEnumToDimension(shapeGroup);
+    XAO::Group* group = xaoObject->addGroup(dim, currGroup->GetName().ToCString());
+
+    switch (shapeGroup)
+    {
+    case TopAbs_VERTEX:
+      for (int i = 1; i <= groupIds->Length(); i++)
+      {
+        std::string ref = XAO::XaoUtils::intToString(groupIds->Value(i));
+        int index = geometry->getVertexIndexByReference(ref);
+        group->add(index);
+      }
+      break;
+    case TopAbs_EDGE:
+      for (int i = 1; i <= groupIds->Length(); i++)
+      {
+        std::string ref = XAO::XaoUtils::intToString(groupIds->Value(i));
+        int index = geometry->getEdgeIndexByReference(ref);
+        group->add(index);
+      }
+      break;
+    case TopAbs_FACE:
+      for (int i = 1; i <= groupIds->Length(); i++)
+      {
+        std::string ref = XAO::XaoUtils::intToString(groupIds->Value(i));
+        int index = geometry->getFaceIndexByReference(ref);
+        group->add(index);
+      }
+      break;
+    case TopAbs_SOLID:
+      for (int i = 1; i <= groupIds->Length(); i++)
+      {
+        std::string ref = XAO::XaoUtils::intToString(groupIds->Value(i));
+        int index = geometry->getSolidIndexByReference(ref);
+        group->add(index);
+      }
+      break;
+    }
+  }
+}
+
+void XAOPlugin_IOperations::exportFields( std::list<Handle(GEOM_Field)> fieldList,
+                                                  XAO::Xao* xaoObject,
+                                                  XAO::BrepGeometry* geometry )
+{
+  std::list<Handle(GEOM_Field)>::iterator fieldIterator = fieldList.begin();
+  while (fieldIterator != fieldList.end())
+  {
+    Handle(GEOM_Field) currField = (*fieldIterator++);
+
+    int fdim = currField->GetDimension();
+    int ftype = currField->GetDataType();
+    int nbComponents = currField->GetNbComponents();
+    std::string name = currField->GetName().ToCString();
+
+    XAO::Field* field = xaoObject->addField((XAO::Type)ftype, (XAO::Dimension)fdim, nbComponents, name);
+
+    Handle(TColStd_HArray1OfExtendedString) components = currField->GetComponents();
+    for (int i = components->Lower(), j = 0; i <= components->Upper(); ++i, ++j)
+    {
+      field->setComponentName(j, TCollection_AsciiString(components->Value(i)).ToCString());
+    }
+
+    std::list< Handle(GEOM_FieldStep)> steps = currField->GetSteps();
+    std::list<Handle(GEOM_FieldStep)>::iterator stepIterator = steps.begin();
+    while (stepIterator != steps.end())
+    {
+      Handle(GEOM_FieldStep) currStep = (*stepIterator++);
+
+      XAO::Step* step = field->addNewStep(currStep->GetID());
+      step->setStamp(currStep->GetStamp());
+
+      switch (ftype)
+      {
+        case 0: // bool
+        {
+          XAO::BooleanStep* bs = (XAO::BooleanStep*)step;
+          Handle(TColStd_HArray1OfInteger) bvalues = currStep->GetIntValues();
+          std::vector<bool> bv;
+          bv.reserve(bvalues->Upper());
+          for ( int i = bvalues->Lower(), nb = bvalues->Upper(); i <= nb; ++i )
+          {
+            bv.push_back(bvalues->Value(i) != 0);
+          }
+          bs->setValues(bv);
+          break;
+        }
+        case 1: // integer
+        {
+          XAO::IntegerStep* is = (XAO::IntegerStep*)step;
+          Handle(TColStd_HArray1OfInteger) ivalues = currStep->GetIntValues();
+          std::vector<int> iv;
+          iv.reserve(ivalues->Upper());
+          for ( int i = ivalues->Lower(), nb = ivalues->Upper(); i <= nb; ++i )
+          {
+            iv.push_back(ivalues->Value(i));
+          }
+          is->setValues(iv);
+          break;
+        }
+        case 2: // double
+        {
+          XAO::DoubleStep* ds = (XAO::DoubleStep*)step;
+          Handle(TColStd_HArray1OfReal) dvalues = currStep->GetDoubleValues();
+          std::vector<double> dv;
+          dv.reserve(dvalues->Upper());
+          for ( int i = dvalues->Lower(), nb = dvalues->Upper(); i <= nb; ++i )
+          {
+            dv.push_back(dvalues->Value(i));
+          }
+          ds->setValues(dv);
+            break;
+        }
+        case 3: // string
+        {
+          XAO::StringStep* ss = (XAO::StringStep*)step;
+          Handle(TColStd_HArray1OfExtendedString) svalues = currStep->GetStringValues();
+          std::vector<std::string> sv;
+          sv.reserve(svalues->Upper());
+          for ( int i = svalues->Lower(), nb = svalues->Upper(); i <= nb; ++i )
+          {
+            sv.push_back(TCollection_AsciiString(svalues->Value(i)).ToCString());
+          }
+          ss->setValues(sv);
+          break;
+        }
+      }
+    }
+  }
+}
+
+void XAOPlugin_IOperations::exportSubshapes( const Handle(GEOM_Object)& shape, XAO::BrepGeometry* geometry )
+{
+  Handle(TColStd_HSequenceOfTransient) subObjects = myShapesOperations->GetExistingSubObjects( shape, false );
+  int nbSubObjects = subObjects->Length();
+  // set the names of the sub shapes
+  for (int i = 1; i <= nbSubObjects; i++)
+  {
+    Handle(Standard_Transient) transientSubObject = subObjects->Value(i);
+    if (transientSubObject.IsNull())
+      continue;
+
+    Handle(GEOM_Object) subObject = Handle(GEOM_Object)::DownCast( transientSubObject );
+    if (subObject->GetType() != GEOM_GROUP)
+    {
+      int subIndex = myShapesOperations->GetSubShapeIndex( shape, subObject );
+      switch (subObject->GetValue().ShapeType())
+      {
+      case TopAbs_VERTEX:
+        geometry->changeVertexName(subIndex, subObject->GetName().ToCString());
+        break;
+      case TopAbs_EDGE:
+        geometry->changeEdgeName(subIndex, subObject->GetName().ToCString());
+        break;
+      case TopAbs_FACE:
+        geometry->changeFaceName(subIndex, subObject->GetName().ToCString());
+        break;
+      case TopAbs_SOLID:
+        geometry->changeSolidName(subIndex, subObject->GetName().ToCString());
+        break;
+      }
+    }
+  }
+}
+
+//=============================================================================
+/*!
+ *  Export a shape to XAO format
+ *  \param shape The shape to export
+ *  \param groups The list of groups to export
+ *  \param fields The list of fields to export
+ *  \param fileName The name of the file to exported
+ *  \return boolean indicating if export was succeful.
+ */
+//=============================================================================
+bool XAOPlugin_IOperations::ExportXAO( Handle(GEOM_Object) shape,
+                                      std::list<Handle(GEOM_Object)> groupList,
+                                      std::list<Handle(GEOM_Field)> fieldList,
+                                      const char* author,
+                                      const char* fileName )
+{
+  SetErrorCode(KO);
+
+  if (shape.IsNull()) return false;
+
+  // add a new shape function with parameters
+  Handle(GEOM_Function) lastFunction = shape->GetLastFunction();
+  if (lastFunction.IsNull()) return false;
+
+  // add a new result object
+  Handle(GEOM_Object) result = GetEngine()->AddObject(GetDocID(), GEOM_IMPORT);
+
+  // add an Export function
+  Handle(GEOM_Function) exportFunction = result->AddFunction(XAOPlugin_Driver::GetID(), EXPORT_SHAPE);
+  if (exportFunction.IsNull()) return false;
+  if (exportFunction->GetDriverGUID() != XAOPlugin_Driver::GetID()) return false;
+
+  // create the XAO object
+  XAO::Xao* xaoObject = new XAO::Xao();
+  xaoObject->setAuthor(author);
+
+  // add the geometry
+  XAO::BrepGeometry* geometry = (XAO::BrepGeometry*)XAO::Geometry::createGeometry(XAO::BREP);
+  TopoDS_Shape topoShape = shape->GetValue();
+  exportFunction->SetValue(topoShape);
+  XAO::BrepGeometry* brep = (XAO::BrepGeometry*)geometry;
+  brep->setTopoDS_Shape(topoShape);
+
+  geometry->setName(shape->GetName().ToCString());
+  exportSubshapes(shape, geometry);
+  xaoObject->setGeometry(geometry);
+
+  exportGroups(groupList, xaoObject, geometry);
+  exportFields(fieldList, xaoObject, geometry);
+
+  // export the XAO to the file
+  xaoObject->exportXAO(fileName);
+
+  // make a Python command
+  GEOM::TPythonDump pd(exportFunction);
+  pd << "exported = geompy.ExportXAO(" << shape;
+
+  // list of groups
+  pd << ", [";
+  if (groupList.size() > 0)
+  {
+    std::list<Handle(GEOM_Object)>::iterator itGroup = groupList.begin();
+    pd << (*itGroup++);
+    while (itGroup != groupList.end())
+    {
+      pd << ", " << (*itGroup++);
+    }
+  }
+
+  // list of fields
+  pd << "], [";
+  if (fieldList.size() > 0)
+  {
+    std::list<Handle(GEOM_Field)>::iterator itField = fieldList.begin();
+    pd << (*itField++);
+    while (itField != fieldList.end())
+    {
+      pd << ", " << (*itField++);
+    }
+  }
+  pd << "], ";
+  pd << "\"" << author << "\", \"" << fileName << "\")";
+
+  SetErrorCode(OK);
+  delete xaoObject;
+
+  return true;
+}
+
+void XAOPlugin_IOperations::importSubShapes( XAO::Geometry* xaoGeometry,
+                                                     Handle(GEOM_Function) function, int shapeType, int dim,
+                                                     Handle(TColStd_HSequenceOfTransient)& subShapeList )
+{
+  Handle(GEOM_Object) subShape;
+  Handle(GEOM_Function) aFunction;
+  Handle(TColStd_HArray1OfInteger) anArray;
+
+  XAO::GeometricElementList::iterator elementIterator = xaoGeometry->begin((XAO::Dimension)dim);
+  for (; elementIterator != xaoGeometry->end((XAO::Dimension)dim); elementIterator++)
+  {
+    XAO::GeometricElement element = elementIterator->second;
+    if (!element.hasName())
+      continue;
+
+    std::string name = element.getName();
+    std::string ref = element.getReference();
+    int iref = XAO::XaoUtils::stringToInt(ref);
+
+    anArray = new TColStd_HArray1OfInteger(1, 1);
+    anArray->SetValue(1, iref);
+
+    subShape = GetEngine()->AddObject(GetDocID(), GEOM_SUBSHAPE);
+    Handle(GEOM_Function) aFunction = subShape->AddFunction(GEOM_Object::GetSubShapeID(), 1);
+    if (aFunction.IsNull())
+      return;
+
+    subShape->SetName(name.c_str());
+    subShape->SetType(shapeType);
+
+    GEOM_ISubShape aSSI(aFunction);
+    aSSI.SetMainShape(function);
+    aSSI.SetIndices(anArray);
+
+    //aFunction->SetValue(aValue);
+    subShapeList->Append(subShape);
+
+    // Put this subshape in the list of sub-shapes of theMainShape
+    function->AddSubShapeReference(aFunction);
+  }
+}
+
+//=============================================================================
+/*!
+ *  Import a shape from XAO format
+ *  \param fileName The name of the file to import
+ *  \param shape The imported shape
+ *  \param subShapes The list of imported groups
+ *  \param groups The list of imported groups
+ *  \param fields The list of imported fields
+ *  \return boolean indicating if import was succeful.
+ */
+//=============================================================================
+bool XAOPlugin_IOperations::ImportXAO( const char* fileName,
+                                               Handle(GEOM_Object)& shape,
+                                               Handle(TColStd_HSequenceOfTransient)& subShapes,
+                                               Handle(TColStd_HSequenceOfTransient)& groups,
+                                               Handle(TColStd_HSequenceOfTransient)& fields )
+{
+  SetErrorCode(KO);
+
+  if (fileName == NULL || groups.IsNull() || fields.IsNull())
+    return false;
+
+  // Read the XAO
+  XAO::Xao* xaoObject = new XAO::Xao();
+  try
+  {
+    xaoObject->importXAO(fileName);
+  }
+  catch (XAO::XAO_Exception& exc)
+  {
+    delete xaoObject;
+    SetErrorCode(exc.what());
+    return false;
+  }
+
+  XAO::Geometry* xaoGeometry = xaoObject->getGeometry();
+  if (xaoGeometry == NULL)
+  {
+    delete xaoObject;
+    SetErrorCode("Cannot import XAO: geometry format not supported.");
+    return false;
+  }
+
+  // create the shape
+  shape = GetEngine()->AddObject(GetDocID(), GEOM_IMPORT);
+  Handle(GEOM_Function) function = shape->AddFunction(XAOPlugin_Driver::GetID(), IMPORT_SHAPE);
+  if (function.IsNull()) return false;
+  if (function->GetDriverGUID() != XAOPlugin_Driver::GetID()) return false;
+
+  // set the geometry
+  if (xaoGeometry->getFormat() == XAO::BREP)
+  {
+    XAO::BrepGeometry* brep = (XAO::BrepGeometry*)xaoGeometry;
+    TopoDS_Shape geomShape = brep->getTopoDS_Shape();
+    function->SetValue(geomShape);
+    shape->SetName(xaoGeometry->getName().c_str());
+  }
+  else
+  {
+    delete xaoObject;
+    SetErrorCode("Cannot import XAO: geometry format not supported.");
+    return false;
+  }
+
+  // create sub shapes with names
+  importSubShapes(xaoGeometry, function, GEOM_POINT, XAO::VERTEX, subShapes);
+  importSubShapes(xaoGeometry, function, GEOM_EDGE, XAO::EDGE, subShapes);
+  importSubShapes(xaoGeometry, function, GEOM_FACE, XAO::FACE, subShapes);
+  importSubShapes(xaoGeometry, function, GEOM_SOLID, XAO::SOLID, subShapes);
+
+  // create groups
+  int nbGroups = xaoObject->countGroups();
+  for (int i = 0; i < nbGroups; ++i)
+  {
+    XAO::Group* xaoGroup = xaoObject->getGroup(i);
+
+    // build an array with the indexes of the sub shapes
+    int nbElt = xaoGroup->count();
+    Handle(TColStd_HArray1OfInteger) array = new TColStd_HArray1OfInteger(1, nbElt);
+    int j = 0;
+    for (std::set<int>::iterator it = xaoGroup->begin(); it != xaoGroup->end(); ++it)
+    {
+      int index = (*it);
+      std::string ref = xaoGeometry->getElementReference(xaoGroup->getDimension(), index);
+      array->SetValue(++j, XAO::XaoUtils::stringToInt(ref));
+    }
+
+    // create the group with the array of sub shapes indexes
+    Handle(GEOM_Object) group = GetEngine()->AddSubShape(shape, array);
+    group->SetType(GEOM_GROUP);
+    group->SetName(xaoGroup->getName().c_str());
+
+    // Set a sub-shape type
+    TDF_Label freeLabel = group->GetFreeLabel();
+    TDataStd_Integer::Set(freeLabel, (Standard_Integer) getGroupDimension(xaoGroup));
+    groups->Append(group);
+
+    function = group->GetLastFunction();
+  }
+
+  // create the fields
+  int nbFields = xaoObject->countFields();
+  for (int i = 0; i < nbFields; ++i)
+  {
+    XAO::Field* xaoField = xaoObject->getField(i);
+
+    Handle(TColStd_HArray1OfExtendedString) components = new TColStd_HArray1OfExtendedString(0, xaoField->countComponents()-1);
+    for (int j = 0; j < xaoField->countComponents(); ++j)
+    {
+        components->SetValue(j, (TCollection_ExtendedString)xaoField->getComponentName(j).c_str());
+    }
+
+    Handle(GEOM_Field) field = myFieldOperations->CreateField(shape,
+                 xaoField->getName().c_str(),
+                 (int)xaoField->getType(),
+                 (int)xaoField->getDimension(),
+                 components);
+
+    switch (xaoField->getType())
+    {
+        case XAO::BOOLEAN:
+        {
+            XAO::BooleanField* bfield = (XAO::BooleanField*)xaoField;
+            for (int j = 0; j < xaoField->countSteps(); ++j)
+            {
+                XAO::BooleanStep* bstep = bfield->getStep(j);
+                Handle(GEOM_FieldStep) step = field->AddStep(bstep->getStep(), bstep->getStamp());
+
+                Handle(TColStd_HArray1OfInteger) values = new TColStd_HArray1OfInteger(0, bstep->countValues()-1);
+                std::vector<bool> bvalues = bstep->getValues();
+                for (int k = 0; k < bstep->countValues(); ++k)
+                {
+                    values->SetValue(k, bvalues[k] ? 1 : 0);
+                }
+                step->SetValues(values);
+            }
+            break;
+        }
+        case XAO::INTEGER:
+        {
+            XAO::IntegerField* ifield = (XAO::IntegerField*)xaoField;
+            for (int j = 0; j < xaoField->countSteps(); ++j)
+            {
+                XAO::IntegerStep* istep = ifield->getStep(j);
+                Handle(GEOM_FieldStep) step = field->AddStep(istep->getStep(), istep->getStamp());
+
+                Handle(TColStd_HArray1OfInteger) values = new TColStd_HArray1OfInteger(0, istep->countValues()-1);
+                std::vector<int> ivalues = istep->getValues();
+                for (int k = 0; k < istep->countValues(); ++k)
+                {
+                    values->SetValue(k, ivalues[k]);
+                }
+                step->SetValues(values);
+            }
+            break;
+        }
+        case XAO::DOUBLE:
+        {
+            XAO::DoubleField* dfield = (XAO::DoubleField*)xaoField;
+            for (int j = 0; j < xaoField->countSteps(); ++j)
+            {
+                XAO::DoubleStep* dstep = dfield->getStep(j);
+                Handle(GEOM_FieldStep) step = field->AddStep(dstep->getStep(), dstep->getStamp());
+
+                Handle(TColStd_HArray1OfReal) values = new TColStd_HArray1OfReal(0, dstep->countValues()-1);
+                std::vector<double> dvalues = dstep->getValues();
+                for (int k = 0; k < dstep->countValues(); ++k)
+                {
+                    values->SetValue(k, dvalues[k]);
+                }
+                step->SetValues(values);
+            }
+            break;
+        }
+        case XAO::STRING:
+        {
+            XAO::StringField* sfield = (XAO::StringField*)xaoField;
+            for (int j = 0; j < xaoField->countSteps(); ++j)
+            {
+                XAO::StringStep* sstep = sfield->getStep(j);
+                Handle(GEOM_FieldStep) step = field->AddStep(sstep->getStep(), sstep->getStamp());
+
+                Handle(TColStd_HArray1OfExtendedString) values = new TColStd_HArray1OfExtendedString(0, sstep->countValues()-1);
+                std::vector<std::string> svalues = sstep->getValues();
+                for (int k = 0; k < sstep->countValues(); ++k)
+                {
+                    values->SetValue(k, TCollection_ExtendedString(svalues[k].c_str()));
+                }
+                step->SetValues(values);
+            }
+            break;
+        }
+    }
+
+    fields->Append(field);
+  }
+
+  // make a Python command
+  GEOM::TPythonDump pd(function);
+  pd << "(imported, " << shape << ", ";
+
+  // list of sub shapes
+  pd << "[";
+  int nbSubshapes = subShapes->Length();
+  if (nbSubshapes > 0)
+  {
+    for (int i = 1; i <= nbSubshapes; i++)
+    {
+      Handle(GEOM_Object) obj = Handle(GEOM_Object)::DownCast(subShapes->Value(i));
+      pd << obj << ((i < nbSubshapes) ? ", " : "");
+    }
+  }
+  pd << "], [";
+
+  // list of groups
+  if (nbGroups > 0)
+  {
+    for (int i = 1; i <= nbGroups; i++)
+    {
+      Handle(GEOM_Object) obj = Handle(GEOM_Object)::DownCast(groups->Value(i));
+      pd << obj << ((i < nbGroups) ? ", " : "");
+    }
+  }
+
+  pd << "], [";
+
+  // list of fields
+  if (nbFields > 0)
+  {
+    for (int i = 1; i <= nbFields; i++)
+    {
+      Handle(GEOM_Field) obj = Handle(GEOM_Field)::DownCast(fields->Value(i));
+      pd << obj << ((i < nbFields) ? ", " : "");
+    }
+  }
+  pd << "]";
+  pd << ") = geompy.ImportXAO(\"" << fileName << "\")";
+
+  delete xaoObject;
+  SetErrorCode(OK);
+
+  return true;
+}
diff --git a/src/XAOPlugin/XAOPlugin_IOperations.hxx b/src/XAOPlugin/XAOPlugin_IOperations.hxx
new file mode 100644 (file)
index 0000000..34e17b2
--- /dev/null
@@ -0,0 +1,74 @@
+// Copyright (C) 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, or (at your option) any 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 : XAOPlugin_IOperations.hxx
+
+#ifndef _XAOPlugin_IOperations_HXX_
+#define _XAOPlugin_IOperations_HXX_
+
+// internal includes
+#include "XAOPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOMImpl_IBaseIEOperations.hxx"
+#include "GEOM_Object.hxx"
+#include "GEOM_Field.hxx"
+
+#include <list>
+
+namespace XAO {
+  class Geometry;
+  class BrepGeometry;
+  class Xao;
+}
+
+class XAOPLUGINENGINE_EXPORT XAOPlugin_IOperations: public GEOMImpl_IBaseIEOperations
+{
+public:
+  XAOPlugin_IOperations( GEOM_Engine*, int );
+  ~XAOPlugin_IOperations();
+
+  bool ExportXAO( Handle(GEOM_Object) shape,
+                 std::list<Handle(GEOM_Object)> groupList,
+                 std::list<Handle(GEOM_Field)> fieldList,
+                 const char* author,
+                 const char* fileName );
+  
+  bool ImportXAO( const char* fileName,
+                 Handle(GEOM_Object)& shape,
+                 Handle(TColStd_HSequenceOfTransient)& subShapes,
+                 Handle(TColStd_HSequenceOfTransient)& groups,
+                 Handle(TColStd_HSequenceOfTransient)& fields );
+
+private:
+  void            importSubShapes( XAO::Geometry* xaoGeometry,
+                                  Handle(GEOM_Function) function,
+                                  int shapeType,
+                                  int dim,
+                                  Handle(TColStd_HSequenceOfTransient)& subshapeList );
+  void            exportSubshapes( const Handle(GEOM_Object)& shape,
+                                  XAO::BrepGeometry* geometry );
+  void            exportFields( std::list<Handle(GEOM_Field)> fieldList,
+                               XAO::Xao* xaoObject,
+                               XAO::BrepGeometry* geometry );
+  void            exportGroups( std::list<Handle(GEOM_Object)> groupList,
+                               XAO::Xao* xaoObject,
+                               XAO::BrepGeometry* geometry );
+};
+
+#endif
diff --git a/src/XAOPlugin/XAOPlugin_IOperations_i.cc b/src/XAOPlugin/XAOPlugin_IOperations_i.cc
new file mode 100644 (file)
index 0000000..cbda713
--- /dev/null
@@ -0,0 +1,172 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "XAOPlugin_IOperations_i.hh"
+#include "XAOPlugin_IOperations.hxx"
+
+// KERNEL includes
+#include <utilities.h>
+
+//=============================================================================
+/*!
+ *   constructor:
+ */
+//=============================================================================
+XAOPlugin_IOperations_i::XAOPlugin_IOperations_i( PortableServer::POA_ptr thePOA,
+                                                 GEOM::GEOM_Gen_ptr theEngine,
+                                                 XAOPlugin_IOperations* theImpl )
+:GEOM_IOperations_i( thePOA, theEngine, theImpl )
+{
+  MESSAGE( "XAOPlugin_IOperations_i::XAOPlugin_IOperations_i" );
+}
+
+//=============================================================================
+/*!
+ *  destructor
+ */
+//=============================================================================
+XAOPlugin_IOperations_i::~XAOPlugin_IOperations_i()
+{
+  MESSAGE( "XAOPlugin_IOperations_i::~XAOPlugin_IOperations_i" );
+}
+
+//=============================================================================
+/*!
+ *  Export a shape to XAO format
+ *  \param shape The shape to export
+ *  \param groups The list of groups to export
+ *  \param fields The list of fields to export
+ *  \param author The author of the export
+ *  \param fileName The name of the exported file
+ *  \return boolean indicating if export was succeful.
+ */
+//=============================================================================
+CORBA::Boolean XAOPlugin_IOperations_i::ExportXAO( GEOM::GEOM_Object_ptr shape,
+                                                  const GEOM::ListOfGO& groups,
+                                                  const GEOM::ListOfFields& fields,
+                                                  const char* author,
+                                                  const char* fileName)
+{
+  bool isGood = false;
+  // Set a not done flag
+  GetOperations()->SetNotDone();
+
+  // Get the reference shape
+  Handle(GEOM_Object) reference = GetObjectImpl( shape );
+
+  // Get the reference groups
+  int ind = 0;
+  std::list<Handle(GEOM_Object)> groupsObj;
+  for (; ind < groups.length(); ind++)
+  {
+    Handle(GEOM_Object) gobj = GetObjectImpl( groups[ind] );
+    if (gobj.IsNull()) return false;
+    groupsObj.push_back(gobj);
+  }
+
+  // Get the reference fields
+  ind = 0;
+  std::list<Handle(GEOM_Field)> fieldsObj;
+  for( ; ind < fields.length(); ind++ )
+  {
+    Handle(GEOM_Field) fobj = Handle(GEOM_Field)::DownCast( GetBaseObjectImpl( fields[ind] ) );
+    if( fobj.IsNull() ) return false;
+    fieldsObj.push_back(fobj);
+  }
+
+  if( !reference.IsNull() )
+  {
+    // Export XAO
+    isGood = GetOperations()->ExportXAO( reference, groupsObj, fieldsObj, author, fileName );
+  }
+
+  return isGood;
+}
+
+//=============================================================================
+/*!
+ *  Import a shape from XAO format
+ *  \param fileName The name of the file to import
+ *  \param shape The imported shape
+ *  \param subShapes The list of imported subShapes
+ *  \param groups The list of imported groups
+ *  \param fields The list of imported fields
+ *  \return boolean indicating if import was succeful.
+ */
+//=============================================================================
+CORBA::Boolean XAOPlugin_IOperations_i::ImportXAO( const char* fileName,
+                                                  GEOM::GEOM_Object_out shape,
+                                                  GEOM::ListOfGO_out subShapes,
+                                                  GEOM::ListOfGO_out groups,
+                                                  GEOM::ListOfFields_out fields)
+{
+  GEOM::GEOM_Object_var vshape;
+  shape = vshape._retn();
+
+  subShapes = new GEOM::ListOfGO;
+  groups = new GEOM::ListOfGO;
+  fields = new GEOM::ListOfFields;
+
+  // Set a not done flag
+  GetOperations()->SetNotDone();
+
+  Handle(TColStd_HSequenceOfTransient) importedSubShapes = new TColStd_HSequenceOfTransient();
+  Handle(TColStd_HSequenceOfTransient) importedGroups = new TColStd_HSequenceOfTransient();
+  Handle(TColStd_HSequenceOfTransient) importedFields = new TColStd_HSequenceOfTransient();
+  Handle(GEOM_Object) hshape;
+  bool res = GetOperations()->ImportXAO( fileName, hshape, importedSubShapes, importedGroups, importedFields );
+
+  if( !GetOperations()->IsDone() || !res )
+    return false;
+
+  // parse fields
+  int n = importedSubShapes->Length();
+  subShapes->length(n);
+  for( int i = 1; i <= n; i++ )
+  {
+    (*subShapes)[i - 1] = GetObject( Handle(GEOM_Object)::DownCast( importedSubShapes->Value(i) ) );
+  }
+
+  // parse groups
+  n = importedGroups->Length();
+  groups->length(n);
+  for( int i = 1; i <= n; i++ )
+  {
+    (*groups)[i - 1] = GetObject( Handle(GEOM_Object)::DownCast( importedGroups->Value(i) ) );
+  }
+
+  // parse fields
+  n = importedFields->Length();
+  fields->length(n);
+  for( int i = 1; i <= n; i++ )
+  {
+    (*fields)[i - 1] = GEOM::GEOM_Field::_narrow(
+      GetBaseObject( Handle(GEOM_Field)::DownCast( importedFields->Value(i) ) ) );
+  }
+
+  shape = GetObject( hshape );
+
+  return res;
+}
+
+XAOPlugin_IOperations* XAOPlugin_IOperations_i::GetOperations()
+{
+  return (XAOPlugin_IOperations*)GetImpl();
+}
diff --git a/src/XAOPlugin/XAOPlugin_IOperations_i.hh b/src/XAOPlugin/XAOPlugin_IOperations_i.hh
new file mode 100644 (file)
index 0000000..6e7b89c
--- /dev/null
@@ -0,0 +1,61 @@
+// Copyright (C) 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, or (at your option) any 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 _XAOPlugin_IOperations_i_HeaderFile
+#define _XAOPlugin_IOperations_i_HeaderFile
+
+// idl includes
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER( GEOM_Gen )
+#include CORBA_SERVER_HEADER( XAOPlugin )
+
+// internal includes
+#include "XAOPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_IOperations_i.hh"
+
+class XAOPlugin_IOperations;
+
+class XAOPLUGINENGINE_EXPORT XAOPlugin_IOperations_i :
+      public virtual POA_GEOM::IXAOOperations,
+      public virtual GEOM_IOperations_i
+{
+public:
+  XAOPlugin_IOperations_i( PortableServer::POA_ptr thePOA,
+                          GEOM::GEOM_Gen_ptr theEngine,
+                          XAOPlugin_IOperations* theImpl );
+  ~XAOPlugin_IOperations_i();
+
+  CORBA::Boolean ExportXAO( GEOM::GEOM_Object_ptr shape,
+                            const GEOM::ListOfGO& groups,
+                            const GEOM::ListOfFields& fields,
+                            const char* author,
+                            const char* fileName );
+
+  CORBA::Boolean ImportXAO( const char* fileName,
+                            GEOM::GEOM_Object_out shape,
+                            GEOM::ListOfGO_out subShapes,
+                            GEOM::ListOfGO_out groups,
+                            GEOM::ListOfFields_out fields );
+
+  XAOPlugin_IOperations* GetOperations();
+};
+
+#endif
diff --git a/src/XAOPlugin/XAOPlugin_ImportDlg.cxx b/src/XAOPlugin/XAOPlugin_ImportDlg.cxx
new file mode 100644 (file)
index 0000000..6acce2f
--- /dev/null
@@ -0,0 +1,359 @@
+// 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, or (at your option) any 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
+//
+
+// internal includes
+#include "XAOPlugin_ImportDlg.h"
+#include "XAOPlugin_IOperations_i.hh"
+
+// KERNEL includes
+#include <SALOMEDS_wrap.hxx>
+
+// GUI includes
+#include <SUIT_Session.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_OverrideCursor.h>
+#include <SUIT_FileDlg.h>
+
+#include <SalomeApp_Application.h>
+#include <SalomeApp_Study.h>
+#include <LightApp_SelectionMgr.h>
+#include <SalomeApp_Tools.h>
+
+// GEOM includes
+#include "GeometryGUI.h"
+#include "GEOMBase.h"
+#include "GEOM_Field.hxx"
+#include "GEOMImpl_Types.hxx"
+
+// OCCT Includes
+#include <TopoDS_Shape.hxx>
+#include <TopoDS.hxx>
+#include <TopExp.hxx>
+#include <TColStd_IndexedMapOfInteger.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+
+// QT includes
+#include <QLabel>
+#include <QLineEdit>
+#include <QButtonGroup>
+#include <QListWidget>
+#include <QFileDialog>
+#include <QRadioButton>
+#include <QGroupBox>
+#include <QGridLayout>
+#include <QPushButton>
+#include <QMap>
+
+//=================================================================================
+// Constructor
+//=================================================================================
+XAOPlugin_ImportDlg::XAOPlugin_ImportDlg(GeometryGUI* geometryGUI, QWidget* parent)
+:
+        GEOMBase_Skeleton(geometryGUI, parent, false)
+{
+    SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+    QPixmap imageOp(resMgr->loadPixmap("GEOM", tr("XAOPLUGIN_IMPORT_ICON")));
+    QPixmap iconSelect(resMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
+
+    setWindowTitle(tr("XAOPLUGIN_IMPORT_TITLE"));
+
+    /***************************************************************/
+    mainFrame()->GroupConstructors->setTitle(tr("XAOPLUGIN_IMPORT_TITLE"));
+    mainFrame()->RadioButton1->setIcon(imageOp);
+    mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose);
+    mainFrame()->RadioButton2->close();
+    mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
+    mainFrame()->RadioButton3->close();
+
+    // hide name
+    mainFrame()->GroupBoxName->hide();
+
+    //****************************
+    // Selection Group box
+    QGroupBox* gbxExport = new QGroupBox(parent);
+
+    QGridLayout* gridLayoutExport = new QGridLayout(gbxExport);
+#ifndef Q_OS_MAC
+    gridLayoutExport->setSpacing(6);
+    gridLayoutExport->setContentsMargins(9, 9, 9, 9);
+#endif
+    gridLayoutExport->setObjectName(QString::fromUtf8("gridLayoutExport"));
+
+    int line = 0, col = 0;
+    QLabel* lblFileName = new QLabel(tr("XAOPLUGIN_IMPORT_FILENAME"), gbxExport);
+    btnFileSelect = new QPushButton(gbxExport);
+    ledFileName = new QLineEdit(gbxExport);
+    btnFileSelect->setText("...");
+
+    line++; col = 0;
+    gridLayoutExport->addWidget(lblFileName, line, col++, 1, 1);
+    gridLayoutExport->addWidget(btnFileSelect, line, col++, 1, 1);
+    gridLayoutExport->addWidget(ledFileName, line, col++, 1, 1);
+
+    //****************************
+    QVBoxLayout* layout = new QVBoxLayout(centralWidget());
+    layout->setMargin(0);
+    layout->setSpacing(6);
+    layout->addWidget(gbxExport);
+
+    // set help
+    setHelpFileName("xao_format_page.html");
+
+    Init();
+}
+
+//=================================================================================
+// Destructor
+//=================================================================================
+XAOPlugin_ImportDlg::~XAOPlugin_ImportDlg()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void XAOPlugin_ImportDlg::Init()
+{
+    // Signal/slot connections
+    connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+    connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+
+    connect(btnFileSelect, SIGNAL(clicked()), this, SLOT(btnFileSelectClicked()));
+
+    initName(tr("XAOPLUGIN_IMPORTXAO"));
+    //SelectionIntoArgument();
+}
+
+//=================================================================================
+// function : ClickOnOk()
+// purpose  :
+//=================================================================================
+void XAOPlugin_ImportDlg::ClickOnOk()
+{
+    setIsApplyAndClose(true);
+    if (ClickOnApply())
+        ClickOnCancel();
+    setIsApplyAndClose(false);
+}
+
+//=================================================================================
+// function : ClickOnApply()
+// purpose  :
+//=================================================================================
+bool XAOPlugin_ImportDlg::ClickOnApply()
+{
+  if(!isApplyAndClose()) {
+    setIsDisableBrowsing( true );
+    setIsDisplayResult( false );
+  }
+
+  QString msg;
+  if ( !isValid( msg ) ) {
+    showError( msg );
+    return false;
+  }
+  SUIT_OverrideCursor wc;
+  SUIT_Session::session()->activeApplication()->putInfo( "" );
+
+  try {
+    if ( openCommand() )
+      if (!execute (/*isApplyAndClose()*/))
+      {
+        abortCommand();
+        showError();
+        return false;
+      }
+  }
+  catch( const SALOME::SALOME_Exception& e ) {
+    SalomeApp_Tools::QtCatchCorbaException( e );
+    abortCommand();
+    return false;
+  }
+  commitCommand();
+
+  if(!isApplyAndClose()) {
+    setIsDisableBrowsing( false );
+    setIsDisplayResult( true );
+  }
+
+  return true;
+}
+
+//=================================================================================
+// function : btnFileSelectClicked()
+// purpose  :
+//=================================================================================
+void XAOPlugin_ImportDlg::btnFileSelectClicked()
+{
+  QString file = SUIT_FileDlg::getFileName(this, ledFileName->text(), 
+                                           tr("XAOPLUGIN_FILES"),
+                                           tr("XAOPLUGIN_IMPORT_SELECT"));
+  if ( !file.isEmpty() )
+    ledFileName->setText( file );
+}
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose  :
+//=================================================================================
+void XAOPlugin_ImportDlg::ActivateThisDialog()
+{
+  GEOMBase_Skeleton::ActivateThisDialog();
+}
+
+//=================================================================================
+// function : enterEvent [REDEFINED]
+// purpose  :
+//=================================================================================
+void XAOPlugin_ImportDlg::enterEvent(QEvent*)
+{
+  if (!mainFrame()->GroupConstructors->isEnabled())
+    ActivateThisDialog();
+}
+
+//=================================================================================
+// function : createOperation
+// purpose  :
+//=================================================================================
+GEOM::GEOM_IOperations_ptr XAOPlugin_ImportDlg::createOperation()
+{
+  return getGeomEngine()->GetPluginOperations( getStudyId(), "XAOPluginEngine" );
+}
+
+//=================================================================================
+// function : isValid
+// purpose  :
+//=================================================================================
+bool XAOPlugin_ImportDlg::isValid(QString& msg)
+{
+  // check file name
+  if (ledFileName->text().isEmpty())
+    return false;
+
+  return true;
+}
+
+//=================================================================================
+// function : execute
+// purpose  :
+//=================================================================================
+bool XAOPlugin_ImportDlg::execute()
+{
+  bool res = false;
+
+  QString fileName = ledFileName->text();
+  GEOM::GEOM_Object_var shape;
+  GEOM::ListOfGO_var groups, subShapes;
+  GEOM::ListOfFields_var fields;
+
+  GEOM::IXAOOperations_var ieOp = GEOM::IXAOOperations::_narrow(getOperation());
+  res = ieOp->ImportXAO(fileName.toUtf8().constData(), shape, subShapes, groups, fields);
+
+  if (!shape->_is_nil())
+  {
+    m_mainShape = shape;
+  }
+  else
+  {
+    m_mainShape = NULL;
+  }
+
+  if (m_mainShape != NULL)
+  {
+    QStringList anEntryList;
+    anEntryList << addInStudy(m_mainShape, m_mainShape->GetName());
+    for (int i = 0; i < subShapes->length(); i++)
+    {
+      addInStudy(subShapes[i].in(), subShapes[i]->GetName());
+    }
+    for (int i = 0; i < groups->length(); i++)
+    {
+      addInStudy(groups[i].in(), groups[i]->GetName());
+    }
+    for (int i = 0; i < fields->length(); i++)
+    {
+      addFieldInStudy(fields[i].in(), m_mainShape);
+    }
+
+    updateObjBrowser();
+    if( SUIT_Application* anApp = SUIT_Session::session()->activeApplication() ) {
+      LightApp_Application* aLightApp = dynamic_cast<LightApp_Application*>( anApp );
+      aLightApp->browseObjects( anEntryList );
+    }
+  }
+
+  return res;
+}
+
+QString XAOPlugin_ImportDlg::addFieldInStudy( GEOM::GEOM_Field_ptr theField, GEOM::GEOM_Object_ptr theFather)
+{
+  if ( !hasCommand() )
+    return QString();
+
+  _PTR(Study) aStudy = getStudy()->studyDS();
+  if ( !aStudy || theField->_is_nil() )
+    return QString();
+
+  SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy(aStudy);
+
+  SALOMEDS::SObject_var aSO =
+    getGeomEngine()->AddInStudy(aStudyDS, theField, theField->GetName(), theFather);
+
+  QString anEntry;
+  if ( !aSO->_is_nil() ) {
+    CORBA::String_var entry = aSO->GetID();
+    anEntry = entry.in();
+  }
+
+  // add steps
+  GEOM::ListOfLong_var steps = theField->GetSteps();
+  for (int i = 0; i < steps->length(); ++i)
+  {
+    GEOM::GEOM_FieldStep_ptr step = theField->GetStep(steps[i]);
+    QString stepName = (tr("XAOPLUGIN_STEP") + " %1 %2").arg( step->GetID() ).arg( step->GetStamp() );
+    SALOMEDS::SObject_wrap aSOField =
+      getGeomEngine()->AddInStudy( aStudyDS, step, stepName.toLatin1().constData(), theField );
+  }
+
+  aSO->UnRegister();
+
+  return anEntry;
+}
+
+GEOM::GEOM_Object_ptr XAOPlugin_ImportDlg::getFather(GEOM::GEOM_Object_ptr object)
+{
+  GEOM::GEOM_Object_var fatherObj;
+  if (object->GetType() != GEOM_IMPORT && m_mainShape != NULL)
+  {
+    //GEOM::GEOM_IGroupOperations_var groupOper = getGeomEngine()->GetIGroupOperations(getStudyId());
+    //fatherObj = groupOper->GetMainShape(object);
+    fatherObj = m_mainShape;
+  }
+  return fatherObj._retn();
+}
+
+QString XAOPlugin_ImportDlg::getObjectName(GEOM::GEOM_Object_ptr object) const
+{
+  if (object->_is_nil())
+    return QString::null;
+  return object->GetName();
+}
+
diff --git a/src/XAOPlugin/XAOPlugin_ImportDlg.h b/src/XAOPlugin/XAOPlugin_ImportDlg.h
new file mode 100644 (file)
index 0000000..2f32db0
--- /dev/null
@@ -0,0 +1,68 @@
+// 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, or (at your option) any 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 XAOPlugin_ImportDlg_H
+#define XAOPlugin_ImportDlg_H
+
+// GEOM includes
+#include "GEOMBase_Skeleton.h"
+
+class QLineEdit;
+class QButtonGroup;
+class QListWidget;
+
+//=================================================================================
+// class    : XAOPlugin_ImportDlg
+// purpose  :
+//=================================================================================
+class XAOPlugin_ImportDlg: public GEOMBase_Skeleton
+{
+  Q_OBJECT
+
+public:
+  XAOPlugin_ImportDlg(GeometryGUI*, QWidget* = 0);
+  ~XAOPlugin_ImportDlg();
+
+protected:
+  // redefined from GEOMBase_Helper
+  virtual GEOM::GEOM_IOperations_ptr createOperation();
+  virtual bool                       isValid( QString& );
+  virtual bool                       execute();
+  virtual GEOM::GEOM_Object_ptr      getFather( GEOM::GEOM_Object_ptr object );
+  virtual QString                    getObjectName( GEOM::GEOM_Object_ptr object ) const;
+  virtual QString                    addFieldInStudy( GEOM::GEOM_Field_ptr theField,
+                                                      GEOM::GEOM_Object_ptr theFather );
+
+private:
+  void Init();
+  void enterEvent(QEvent*);
+
+private:
+  QLineEdit*            ledFileName;
+  QPushButton*          btnFileSelect;
+  GEOM::GEOM_Object_var m_mainShape;
+
+private slots:
+  void ClickOnOk();
+  bool ClickOnApply();
+  void ActivateThisDialog();
+  void btnFileSelectClicked();
+};
+
+#endif // XAOPlugin_ImportDlg_H
diff --git a/src/XAOPlugin/XAOPlugin_OperationsCreator.cxx b/src/XAOPlugin/XAOPlugin_OperationsCreator.cxx
new file mode 100644 (file)
index 0000000..21827c0
--- /dev/null
@@ -0,0 +1,66 @@
+// Copyright (C) 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, or (at your option) any 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
+//
+
+// internal includes
+#include "XAOPlugin_OperationsCreator.hxx"
+#include "XAOPlugin_IOperations_i.hh"
+#include "XAOPlugin_IOperations.hxx"
+#include "XAOPlugin_Driver.hxx"
+#include "XAOPlugin_IECallBack.hxx"
+
+// KERNEL includes
+#include <Utils_ExceptHandlers.hxx>
+#include <utilities.h>
+
+// OCCT includes
+#include <TFunction_DriverTable.hxx>
+
+std::map <int, XAOPlugin_IOperations*> XAOPlugin_OperationsCreator::_mapOfOperations;
+
+XAOPlugin_OperationsCreator::XAOPlugin_OperationsCreator()
+{
+  // Register drivers
+  TFunction_DriverTable::Get()->AddDriver( XAOPlugin_Driver::GetID(),
+                                          new XAOPlugin_Driver() );
+  
+  // Register callback
+  GEOMImpl_IECallBack::Register( "XAO", new XAOPlugin_IECallBack() );
+}
+
+XAOPlugin_OperationsCreator::~XAOPlugin_OperationsCreator()
+{
+}
+
+GEOM_IOperations_i* XAOPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
+                                                         int                     theStudyId,
+                                                         GEOM::GEOM_Gen_ptr      theEngine,
+                                                         ::GEOMImpl_Gen*         theGenImpl )
+{
+  Unexpect aCatch( SALOME_SalomeException );
+  MESSAGE( "XAOPlugin_OperationsCreator::Create" );
+  return new XAOPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+}
+
+XAOPlugin_IOperations* XAOPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
+                                                        int             theStudyId )
+{
+  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
+    _mapOfOperations[theStudyId] = new XAOPlugin_IOperations( theGenImpl, theStudyId );
+  return _mapOfOperations[theStudyId];
+}
diff --git a/src/XAOPlugin/XAOPlugin_OperationsCreator.hxx b/src/XAOPlugin/XAOPlugin_OperationsCreator.hxx
new file mode 100755 (executable)
index 0000000..d90589d
--- /dev/null
@@ -0,0 +1,57 @@
+// Copyright (C) 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, or (at your option) any 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 _GEOM_XAOPlugin_OperationsCreator_HXX_
+#define _GEOM_XAOPlugin_OperationsCreator_HXX_
+
+// internal includes
+#include "XAOPlugin_Engine.hxx"
+
+// GEOM includes
+#include "GEOM_Gen_i.hh"
+
+// C++ includes
+#include <map>
+
+class XAOPlugin_IOperations;
+
+//=====================================================================
+// Operations creator
+//=====================================================================
+class XAOPLUGINENGINE_EXPORT XAOPlugin_OperationsCreator : public GEOM_GenericOperationsCreator
+{
+public:
+  XAOPlugin_OperationsCreator();
+  ~XAOPlugin_OperationsCreator();
+
+  GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
+                             int                     theStudyId,
+                             GEOM::GEOM_Gen_ptr      theEngine,
+                             ::GEOMImpl_Gen*         theGenImpl );
+private:
+  static XAOPlugin_IOperations* get( ::GEOMImpl_Gen*         theGenImpl,
+                                    int                     theStudyId );
+  
+private:
+  static std::map <int, XAOPlugin_IOperations*>  _mapOfOperations;
+
+  friend class XAOPlugin_IECallBack;
+};
+
+#endif
diff --git a/src/XAOPlugin/XAOPlugin_images.ts b/src/XAOPlugin/XAOPlugin_images.ts
new file mode 100644 (file)
index 0000000..48e672f
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+    <context>
+        <name>@default</name>
+        <message>
+            <source>XAOPLUGIN_EXPORT_ICON</source>
+            <translation>exportxao.png</translation>
+        </message>
+        <message>
+            <source>XAOPLUGIN_IMPORT_ICON</source>
+            <translation>importxao.png</translation>
+        </message>
+       <!-- @@ insert new functions before this line @@ do not remove this line @@ -->
+    </context>
+</TS>
diff --git a/src/XAOPlugin/XAOPlugin_msg_en.ts b/src/XAOPlugin/XAOPlugin_msg_en.ts
new file mode 100644 (file)
index 0000000..c37ffd6
--- /dev/null
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTXAO</source>
+        <translation>XAO</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTXAO</source>
+        <translation>Export XAO</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTXAO</source>
+        <translation>Export XAO</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTXAO</source>
+        <translation>XAO</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTXAO</source>
+        <translation>Import XAO</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTXAO</source>
+        <translation>Import XAO</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_IMPORT_SELECT</source>
+        <translation>Import from XAO</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_EXPORT_SELECT</source>
+        <translation>Export to XAO</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_FILES</source>
+        <translation>XAO files (*.xao)</translation>
+    </message>
+</context>
+<context>
+    <name>XAOPlugin_ExportDlg</name>
+    <message>
+        <source>XAOPLUGIN_EXPORT_TITLE</source>
+        <translation>Export XAO</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_EXPORTXAO</source>
+        <translation>Export XAO</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_EXPORT_INGSHAPE</source>
+        <translation>Shape</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_EXPORT_FILENAME</source>
+        <translation>File Name</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_EXPORT_AUTHOR</source>
+        <translation>Author</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_EXPORT_LGROUPS</source>
+        <translation>Groups</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_EXPORT_LFIELDS</source>
+        <translation>Fields</translation>
+    </message>
+</context>
+<context>
+    <name>XAOPlugin_ImportDlg</name>
+    <message>
+        <source>XAOPLUGIN_IMPORT_TITLE</source>
+        <translation>Import XAO</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_IMPORTXAO</source>
+        <translation>Import XAO</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_IMPORT_INGSHAPE</source>
+        <translation>Shape</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_IMPORT_FILENAME</source>
+        <translation>File Name</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_IMPORT_LGROUPS</source>
+        <translation>Groups</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_IMPORT_LFIELDS</source>
+        <translation>Fields</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_STEP</source>
+        <translation>Step</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/XAOPlugin/XAOPlugin_msg_fr.ts b/src/XAOPlugin/XAOPlugin_msg_fr.ts
new file mode 100644 (file)
index 0000000..7d3a6de
--- /dev/null
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_EXPORTXAO</source>
+        <translation>XAO</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTXAO</source>
+        <translation>Exporter XAO</translation>
+    </message>
+    <message>
+        <source>STB_EXPORTXAO</source>
+        <translation>Exporter XAO</translation>
+    </message>
+    <message>
+        <source>MEN_IMPORTXAO</source>
+        <translation>XAO</translation>
+    </message>
+    <message>
+        <source>TOP_IMPORTXAO</source>
+        <translation>Importer XAO</translation>
+    </message>
+    <message>
+        <source>STB_IMPORTXAO</source>
+        <translation>Importer XAO</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_IMPORT_SELECT</source>
+        <translation>Import XAO</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_EXPORT_SELECT</source>
+        <translation>Export XAO</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_FILES</source>
+        <translation>Fichiers XAO (*.xao)</translation>
+    </message>
+</context>
+<context>
+    <name>XAOPlugin_ExportDlg</name>
+    <message>
+        <source>XAOPLUGIN_EXPORT_TITLE</source>
+        <translation>Export XAO</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_EXPORTXAO</source>
+        <translation>Export XAO</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_EXPORT_INGSHAPE</source>
+        <translation>Objet</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_EXPORT_FILENAME</source>
+        <translation>Fichier</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_EXPORT_AUTHOR</source>
+        <translation>Auteur</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_EXPORT_LGROUPS</source>
+        <translation>Groupes</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_EXPORT_LFIELDS</source>
+        <translation>Champs</translation>
+    </message>
+</context>
+<context>
+    <name>XAOPlugin_ImportDlg</name>
+    <message>
+        <source>XAOPLUGIN_IMPORT_TITLE</source>
+        <translation>Import XAO</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_IMPORTXAO</source>
+        <translation>Import XAO</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_IMPORT_INGSHAPE</source>
+        <translation>Objet</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_IMPORT_FILENAME</source>
+        <translation>Fichier</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_IMPORT_LGROUPS</source>
+        <translation>Groupes</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_IMPORT_LFIELDS</source>
+        <translation>Champs</translation>
+    </message>
+    <message>
+        <source>XAOPLUGIN_STEP</source>
+        <translation>Pas</translation>
+    </message>
+</context>
+</TS>
\ No newline at end of file
diff --git a/src/XAOPlugin/XAOPlugin_msg_ja.ts b/src/XAOPlugin/XAOPlugin_msg_ja.ts
new file mode 100644 (file)
index 0000000..307f014
--- /dev/null
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ja" sourcelanguage="en">
+<context>
+    <name>@default</name>
+    <message>
+      <source>MEN_EXPORTXAO</source>
+      <translation>エクスポートしました。</translation>
+    </message>
+    <message>
+        <source>TOP_EXPORTXAO</source>
+        <translation>エクスポートしました。</translation>
+    </message>
+    <message>
+      <source>STB_EXPORTXAO</source>
+      <translation>ソテーした形式でフォームをエクスポートします。</translation>
+    </message>
+    <message>
+      <source>MEN_IMPORTXAO</source>
+      <translation>インポートしました。</translation>
+    </message>
+    <message>
+      <source>TOP_IMPORTXAO</source>
+      <translation>インポートしました。</translation>
+    </message>
+    <message>
+      <source>STB_IMPORTXAO</source>
+      <translation>ソテーしたフォームをインポートします。</translation>
+    </message>
+    <message>
+      <source>XAOPLUGIN_IMPORT_SELECT</source>
+      <translation>XAOからインポート</translation>
+    </message>
+    <message>
+      <source>XAOPLUGIN_EXPORT_SELECT</source>
+      <translation>エクスポートしました。</translation>
+    </message>
+    <message>
+      <source>XAOPLUGIN_FILES</source>
+      <translation>ファイルした (*.xao)</translation>
+    </message>
+</context>
+<context>
+    <name>XAOPlugin_ExportDlg</name>
+    <message>
+      <source>XAOPLUGIN_EXPORT_TITLE</source>
+      <translation>エクスポートしました。</translation>
+    </message>
+    <message>
+      <source>XAOPLUGIN_EXPORTXAO</source>
+      <translation>エクスポートしました。</translation>
+    </message>
+    <message>
+      <source>XAOPLUGIN_EXPORT_INGSHAPE</source>
+      <translation>オブジェクト</translation>
+    </message>
+    <message>
+      <source>XAOPLUGIN_EXPORT_FILENAME</source>
+      <translation>ファイル</translation>
+    </message>
+    <message>
+      <source>XAOPLUGIN_EXPORT_AUTHOR</source>
+      <translation>作成者</translation>
+    </message>
+    <message>
+      <source>XAOPLUGIN_EXPORT_LGROUPS</source>
+      <translation>グループ</translation>
+    </message>
+    <message>
+      <source>XAOPLUGIN_EXPORT_LFIELDS</source>
+      <translation>フィールド</translation>
+    </message>
+</context>
+<context>
+    <name>XAOPlugin_ImportDlg</name>
+    <message>
+      <source>XAOPLUGIN_IMPORT_TITLE</source>
+      <translation>インポートしました。</translation>
+    </message>
+    <message>
+      <source>XAOPLUGIN_IMPORTXAO</source>
+      <translation>インポートしました。</translation>
+    </message>
+    <message>
+      <source>XAOPLUGIN_IMPORT_INGSHAPE</source>
+      <translation>オブジェクト</translation>
+    </message>
+    <message>
+      <source>XAOPLUGIN_IMPORT_FILENAME</source>
+      <translation>ファイル</translation>
+    </message>
+    <message>
+      <source>XAOPLUGIN_IMPORT_LGROUPS</source>
+      <translation>グループ</translation>
+    </message>
+    <message>
+      <source>XAOPLUGIN_IMPORT_LFIELDS</source>
+      <translation>フィールド</translation>
+    </message>
+    <message>
+      <source>XAOPLUGIN_STEP</source>
+      <translation>Step</translation>
+    </message>
+</context>
+</TS>
\ No newline at end of file