From aeddae77192d933be1aee8855d8f7c525878cad9 Mon Sep 17 00:00:00 2001 From: rnv Date: Wed, 4 Jun 2014 15:17:38 +0400 Subject: [PATCH] 0022616: [CEA 1038] Improve the quality of stl and vtk exports --- CMakeLists.txt | 12 +- SalomeGEOMConfig.cmake.in | 30 +- adm_local/cmake_files/FindGEOM.cmake | 28 +- bin/geom_setenv.py | 107 +- doc/salome/examples/import_export.py | 2 +- doc/salome/gui/GEOM/CMakeLists.txt | 15 +- doc/salome/gui/GEOM/collect_geom_methods.py | 148 + doc/salome/gui/GEOM/doxyfile_py.in | 9 +- doc/salome/gui/GEOM/images/exportxao_dlg.png | Bin 9423 -> 16652 bytes doc/salome/gui/GEOM/images/geomexport.png | Bin 29200 -> 33999 bytes doc/salome/gui/GEOM/images/geomimport.png | Bin 22327 -> 28994 bytes doc/salome/gui/GEOM/images/importxao_dlg.png | Bin 0 -> 8640 bytes .../gui/GEOM/images/sat_named_shapes.png | Bin 7159 -> 0 bytes doc/salome/gui/GEOM/input/import_export.doc | 96 +- doc/salome/gui/GEOM/input/index.doc | 2 +- .../GEOM/input/tui_importexport_geom_objs.doc | 2 +- doc/salome/gui/GEOM/input/xao_format.doc | 24 - idl/AdvancedGEOM.idl | 479 + idl/BREPPlugin.idl | 51 + idl/CMakeLists.txt | 63 + idl/GEOM_Gen.idl | 511 +- idl/GEOM_Superv.idl | 50 +- idl/IGESPlugin.idl | 67 + idl/STEPPlugin.idl | 66 + idl/STLPlugin.idl | 59 + idl/VTKPlugin.idl | 45 + idl/XAOPlugin.idl | 64 + .../{GEOMActions.xml => AdvancedGEOM.xml} | 2 +- resources/BREPPlugin.xml | 45 + resources/CMakeLists.txt | 9 +- resources/GEOMCatalog.xml.in | 12617 +++++++++------- resources/IGESPlugin.xml | 43 + resources/ImportExport | 30 - resources/STEPPlugin.xml | 43 + resources/STLPlugin.xml | 43 + resources/SalomeApp.xml.in | 8 +- resources/VTKPlugin.xml | 39 + resources/XAOPlugin.xml | 43 + src/AdvancedEngine/AdvancedEngine.cxx | 19 +- ..._AdvancedEngine.hxx => AdvancedEngine.hxx} | 0 ...x => AdvancedEngine_DividedDiskDriver.cxx} | 37 +- ...x => AdvancedEngine_DividedDiskDriver.hxx} | 38 +- ...sk.hxx => AdvancedEngine_IDividedDisk.hxx} | 10 +- ...ons.cxx => AdvancedEngine_IOperations.cxx} | 205 +- ...ons.hxx => AdvancedEngine_IOperations.hxx} | 72 +- ...s_i.cc => AdvancedEngine_IOperations_i.cc} | 73 +- ...s_i.hh => AdvancedEngine_IOperations_i.hh} | 32 +- ...ape.hxx => AdvancedEngine_IPipeTShape.hxx} | 10 +- ...x => AdvancedEngine_ISmoothingSurface.hxx} | 10 +- .../AdvancedEngine_OperationsCreator.cc | 73 - .../AdvancedEngine_OperationsCreator.cxx | 69 + ...h => AdvancedEngine_OperationsCreator.hxx} | 31 +- ...xx => AdvancedEngine_PipeTShapeDriver.cxx} | 72 +- ...xx => AdvancedEngine_PipeTShapeDriver.hxx} | 46 +- ...AdvancedEngine_SmoothingSurfaceDriver.cxx} | 31 +- ...AdvancedEngine_SmoothingSurfaceDriver.hxx} | 49 +- src/AdvancedEngine/AdvancedEngine_Types.hxx | 14 +- src/AdvancedEngine/CMakeLists.txt | 37 +- ...edGUI_images.ts => AdvancedGEOM_images.ts} | 0 ...edGUI_msg_en.ts => AdvancedGEOM_msg_en.ts} | 0 ...edGUI_msg_fr.ts => AdvancedGEOM_msg_fr.ts} | 0 ...edGUI_msg_ja.ts => AdvancedGEOM_msg_ja.ts} | 0 .../AdvancedGUI_DividedCylinderDlg.cxx | 3 +- .../AdvancedGUI_DividedCylinderDlg.h | 3 + .../AdvancedGUI_DividedDiskDlg.cxx | 4 +- src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.h | 3 + src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx | 6 +- .../AdvancedGUI_SmoothingSurfaceDlg.cxx | 6 +- src/AdvancedGUI/CMakeLists.txt | 13 +- src/BREPExport/BREPExport.cxx | 64 - src/BREPExport/CMakeLists.txt | 52 - src/BREPImport/BREPImport.cxx | 70 - src/BREPImport/CMakeLists.txt | 52 - src/BREPPlugin/BREPPlugin_Engine.cxx | 31 + src/BREPPlugin/BREPPlugin_Engine.hxx | 33 + src/BREPPlugin/BREPPlugin_ExportDriver.cxx | 108 + src/BREPPlugin/BREPPlugin_ExportDriver.hxx | 51 + src/BREPPlugin/BREPPlugin_GUI.cxx | 266 + src/BREPPlugin/BREPPlugin_GUI.h | 40 + src/BREPPlugin/BREPPlugin_IECallBack.cxx | 72 + src/BREPPlugin/BREPPlugin_IECallBack.hxx | 49 + src/BREPPlugin/BREPPlugin_IExport.hxx | 48 + src/BREPPlugin/BREPPlugin_IImport.hxx | 42 + src/BREPPlugin/BREPPlugin_IOperations.cxx | 171 + src/BREPPlugin/BREPPlugin_IOperations.hxx | 42 + src/BREPPlugin/BREPPlugin_IOperations_i.cc | 108 + src/BREPPlugin/BREPPlugin_IOperations_i.hh | 52 + src/BREPPlugin/BREPPlugin_ImportDriver.cxx | 122 + src/BREPPlugin/BREPPlugin_ImportDriver.hxx | 51 + .../BREPPlugin_OperationsCreator.cxx | 69 + .../BREPPlugin_OperationsCreator.hxx | 57 + src/BREPPlugin/BREPPlugin_msg_en.ts | 46 + src/BREPPlugin/BREPPlugin_msg_fr.ts | 46 + src/BREPPlugin/BREPPlugin_msg_ja.ts | 46 + src/BREPPlugin/CMakeLists.txt | 147 + src/CMakeLists.txt | 10 +- src/DlgRef/CMakeLists.txt | 1 - src/DlgRef/DlgRef.cxx | 14 - src/DlgRef/DlgRef.h | 16 - src/GEOM/CMakeLists.txt | 1 + src/GEOM/GEOM_BaseDriver.cxx | 16 + src/GEOM/GEOM_BaseDriver.hxx | 4 +- src/GEOMBase/CMakeLists.txt | 3 + src/GEOMBase/GEOMBase_DlgSkeleton.cxx | 168 + src/GEOMBase/GEOMBase_DlgSkeleton.h | 75 + src/GEOMBase/GEOMBase_Skeleton.cxx | 14 +- src/GEOMBase/GEOMBase_Skeleton.h | 11 +- src/GEOMBase/GEOM_GenericObjPtr.h | 1 - src/GEOMGUI/CMakeLists.txt | 3 - src/GEOMGUI/GEOMGUI_CreationInfoWdg.cxx | 1 - src/GEOMGUI/GEOMGUI_XmlHandler.cxx | 158 - src/GEOMGUI/GEOMGUI_XmlHandler.h | 90 - src/GEOMGUI/GEOM_images.ts | 20 - src/GEOMGUI/GEOM_msg_en.ts | 147 +- src/GEOMGUI/GEOM_msg_fr.ts | 147 +- src/GEOMGUI/GEOM_msg_ja.ts | 146 +- src/GEOMGUI/GeometryGUI.cxx | 231 +- src/GEOMGUI/GeometryGUI_Operations.h | 5 - src/GEOMImpl/CMakeLists.txt | 7 +- src/GEOMImpl/GEOMImpl_ExportDriver.cxx | 69 +- src/GEOMImpl/GEOMImpl_ExportDriver.hxx | 17 - src/GEOMImpl/GEOMImpl_Gen.cxx | 4 - src/GEOMImpl/GEOMImpl_IBaseIEOperations.cxx | 230 + src/GEOMImpl/GEOMImpl_IBaseIEOperations.hxx | 53 + src/GEOMImpl/GEOMImpl_IECallBack.cxx | 115 + src/GEOMImpl/GEOMImpl_IECallBack.hxx | 67 + src/GEOMImpl/GEOMImpl_IInsertOperations.cxx | 1177 +- src/GEOMImpl/GEOMImpl_IInsertOperations.hxx | 51 - src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx | 2 +- src/GEOMImpl/GEOMImpl_IShapesOperations.cxx | 58 +- src/GEOMImpl/GEOMImpl_IShapesOperations.hxx | 18 +- src/GEOMImpl/GEOMImpl_ImportDriver.cxx | 138 +- src/GEOMImpl/GEOMImpl_ImportDriver.hxx | 23 - src/GEOMImpl/GEOMImpl_ShapeDriver.cxx | 2 +- src/GEOMImpl/GEOMImpl_Types.hxx | 15 +- src/GEOMImpl/GEOMImpl_XAODriver.cxx | 129 - src/GEOMImpl/GEOMImpl_XAODriver.hxx | 148 - src/GEOMImpl/GUID.txt | 2 - src/GEOMToolsGUI/GEOMToolsGUI.cxx | 475 - src/GEOMToolsGUI/GEOMToolsGUI.h | 3 - src/GEOMUtils/CMakeLists.txt | 5 + src/GEOMUtils/GEOMUtils.cxx | 496 +- src/GEOMUtils/GEOMUtils.hxx | 34 +- src/GEOMUtils/GEOMUtils_Hatcher.cxx | 24 +- src/GEOMUtils/GEOMUtils_Hatcher.hxx | 343 +- src/GEOMUtils/GEOMUtils_XmlHandler.cxx | 235 + src/GEOMUtils/GEOMUtils_XmlHandler.hxx | 56 + src/GEOM_I/CMakeLists.txt | 4 +- src/GEOM_I/GEOM_Gen_i.cc | 218 +- src/GEOM_I/GEOM_Gen_i.hh | 2 + src/GEOM_I/GEOM_IInsertOperations_i.cc | 220 +- src/GEOM_I/GEOM_IInsertOperations_i.hh | 18 - src/GEOM_I/GEOM_wrap.hxx | 2 - src/GEOM_I_Superv/CMakeLists.txt | 8 + src/GEOM_I_Superv/GEOM_Superv_i.cc | 298 +- src/GEOM_I_Superv/GEOM_Superv_i.hh | 71 +- src/GEOM_SWIG/AdvancedGEOMBuilder.py | 572 + src/GEOM_SWIG/BREPPluginBuilder.py | 91 + src/GEOM_SWIG/CMakeLists.txt | 58 + src/GEOM_SWIG/IGESPluginBuilder.py | 132 + src/GEOM_SWIG/STEPPluginBuilder.py | 128 + src/GEOM_SWIG/STLPluginBuilder.py | 100 + src/GEOM_SWIG/VTKPluginBuilder.py | 50 + src/GEOM_SWIG/XAOPluginBuilder.py | 61 + src/GEOM_SWIG/geomBuilder.py | 820 +- src/IGESExport/CMakeLists.txt | 52 - src/IGESExport/IGESExport.cxx | 173 - src/IGESImport/CMakeLists.txt | 53 - src/IGESImport/IGESImport.cxx | 250 - src/IGESPlugin/CMakeLists.txt | 149 + src/IGESPlugin/IGESPlugin_Engine.cxx | 31 + src/IGESPlugin/IGESPlugin_Engine.hxx | 33 + src/IGESPlugin/IGESPlugin_ExportDlg.cxx | 88 + src/IGESPlugin/IGESPlugin_ExportDlg.h | 44 + src/IGESPlugin/IGESPlugin_ExportDriver.cxx | 198 + src/IGESPlugin/IGESPlugin_ExportDriver.hxx | 51 + src/IGESPlugin/IGESPlugin_GUI.cxx | 305 + src/IGESPlugin/IGESPlugin_GUI.h | 40 + src/IGESPlugin/IGESPlugin_IECallBack.cxx | 87 + src/IGESPlugin/IGESPlugin_IECallBack.hxx | 54 + src/IGESPlugin/IGESPlugin_IExport.hxx | 54 + src/IGESPlugin/IGESPlugin_IImport.hxx | 48 + src/IGESPlugin/IGESPlugin_IOperations.cxx | 210 + src/IGESPlugin/IGESPlugin_IOperations.hxx | 47 + src/IGESPlugin/IGESPlugin_IOperations_i.cc | 130 + src/IGESPlugin/IGESPlugin_IOperations_i.hh | 53 + src/IGESPlugin/IGESPlugin_ImportDriver.cxx | 292 + src/IGESPlugin/IGESPlugin_ImportDriver.hxx | 56 + .../IGESPlugin_OperationsCreator.cxx | 72 + .../IGESPlugin_OperationsCreator.hxx | 57 + src/IGESPlugin/IGESPlugin_msg_en.ts | 58 + src/IGESPlugin/IGESPlugin_msg_fr.ts | 58 + src/IGESPlugin/IGESPlugin_msg_ja.ts | 57 + src/ImportExportGUI/CMakeLists.txt | 92 - .../ImportExportGUI_ExportXAODlg.cxx | 450 - src/OBJECT/GEOM_OCCReader.cxx | 4 +- src/OBJECT/GEOM_OCCReader.h | 15 +- src/OCC2VTK/GEOM_FaceSource.h | 2 +- src/OCC2VTK/GEOM_WireframeFace.cxx | 8 +- src/OCC2VTK/GEOM_WireframeFace.h | 16 +- src/STEPExport/CMakeLists.txt | 52 - src/STEPExport/STEPExport.cxx | 91 - src/STEPImport/CMakeLists.txt | 54 - src/STEPImport/STEPImport.cxx | 581 - src/STEPPlugin/CMakeLists.txt | 147 + src/STEPPlugin/STEPPlugin_Engine.cxx | 32 + src/STEPPlugin/STEPPlugin_Engine.hxx | 33 + src/STEPPlugin/STEPPlugin_ExportDriver.cxx | 129 + src/STEPPlugin/STEPPlugin_ExportDriver.hxx | 51 + src/STEPPlugin/STEPPlugin_GUI.cxx | 311 + src/STEPPlugin/STEPPlugin_GUI.h | 40 + src/STEPPlugin/STEPPlugin_IECallBack.cxx | 87 + src/STEPPlugin/STEPPlugin_IECallBack.hxx | 54 + src/STEPPlugin/STEPPlugin_IExport.hxx | 48 + src/STEPPlugin/STEPPlugin_IImport.hxx | 48 + src/STEPPlugin/STEPPlugin_IOperations.cxx | 206 + src/STEPPlugin/STEPPlugin_IOperations.hxx | 46 + src/STEPPlugin/STEPPlugin_IOperations_i.cc | 128 + src/STEPPlugin/STEPPlugin_IOperations_i.hh | 53 + src/STEPPlugin/STEPPlugin_ImportDriver.cxx | 614 + src/STEPPlugin/STEPPlugin_ImportDriver.hxx | 56 + .../STEPPlugin_OperationsCreator.cxx | 74 + .../STEPPlugin_OperationsCreator.hxx | 58 + src/STEPPlugin/STEPPlugin_msg_en.ts | 51 + src/STEPPlugin/STEPPlugin_msg_fr.ts | 51 + src/STEPPlugin/STEPPlugin_msg_ja.ts | 50 + src/STLExport/CMakeLists.txt | 52 - src/STLExport/STLExport.cxx | 75 - src/STLImport/CMakeLists.txt | 55 - src/STLImport/STLImport.cxx | 107 - src/STLPlugin/CMakeLists.txt | 149 + src/STLPlugin/STLPlugin_Engine.cxx | 31 + src/STLPlugin/STLPlugin_Engine.hxx | 33 + src/STLPlugin/STLPlugin_ExportDlg.cxx | 196 + src/STLPlugin/STLPlugin_ExportDlg.h | 62 + src/STLPlugin/STLPlugin_ExportDriver.cxx | 128 + src/STLPlugin/STLPlugin_ExportDriver.hxx | 51 + src/STLPlugin/STLPlugin_GUI.cxx | 269 + src/STLPlugin/STLPlugin_GUI.h | 40 + src/STLPlugin/STLPlugin_IECallBack.cxx | 75 + src/STLPlugin/STLPlugin_IECallBack.hxx | 50 + src/STLPlugin/STLPlugin_IExport.hxx | 66 + src/STLPlugin/STLPlugin_IImport.hxx | 42 + src/STLPlugin/STLPlugin_IOperations.cxx | 181 + src/STLPlugin/STLPlugin_IOperations.hxx | 46 + src/STLPlugin/STLPlugin_IOperations_i.cc | 112 + src/STLPlugin/STLPlugin_IOperations_i.hh | 52 + src/STLPlugin/STLPlugin_ImportDriver.cxx | 155 + src/STLPlugin/STLPlugin_ImportDriver.hxx | 51 + src/STLPlugin/STLPlugin_OperationsCreator.cxx | 71 + src/STLPlugin/STLPlugin_OperationsCreator.hxx | 57 + src/STLPlugin/STLPlugin_msg_en.ts | 61 + src/STLPlugin/STLPlugin_msg_fr.ts | 61 + src/STLPlugin/STLPlugin_msg_ja.ts | 61 + src/VTKExport/CMakeLists.txt | 55 - src/VTKExport/VTKExport.cxx | 160 - src/VTKPlugin/CMakeLists.txt | 149 + src/VTKPlugin/VTKPlugin_Engine.cxx | 32 + src/VTKPlugin/VTKPlugin_Engine.hxx | 33 + src/VTKPlugin/VTKPlugin_ExportDlg.cxx | 118 + src/VTKPlugin/VTKPlugin_ExportDlg.h | 50 + src/VTKPlugin/VTKPlugin_ExportDriver.cxx | 200 + src/VTKPlugin/VTKPlugin_ExportDriver.hxx | 51 + src/VTKPlugin/VTKPlugin_GUI.cxx | 186 + src/VTKPlugin/VTKPlugin_GUI.h | 39 + src/VTKPlugin/VTKPlugin_IECallBack.cxx | 57 + src/VTKPlugin/VTKPlugin_IECallBack.hxx | 45 + src/VTKPlugin/VTKPlugin_IExport.hxx | 54 + src/VTKPlugin/VTKPlugin_IOperations.cxx | 111 + src/VTKPlugin/VTKPlugin_IOperations.hxx | 41 + src/VTKPlugin/VTKPlugin_IOperations_i.cc | 80 + src/VTKPlugin/VTKPlugin_IOperations_i.hh | 51 + src/VTKPlugin/VTKPlugin_OperationsCreator.cxx | 67 + src/VTKPlugin/VTKPlugin_OperationsCreator.hxx | 57 + src/VTKPlugin/VTKPlugin_msg_en.ts | 49 + src/VTKPlugin/VTKPlugin_msg_fr.ts | 49 + src/VTKPlugin/VTKPlugin_msg_ja.ts | 49 + src/XAOPlugin/CMakeLists.txt | 151 + src/XAOPlugin/XAOPlugin_Driver.cxx | 105 + src/XAOPlugin/XAOPlugin_Driver.hxx | 48 + src/XAOPlugin/XAOPlugin_Engine.cxx | 31 + src/XAOPlugin/XAOPlugin_Engine.hxx | 33 + src/XAOPlugin/XAOPlugin_ExportDlg.cxx | 456 + .../XAOPlugin_ExportDlg.h} | 61 +- .../XAOPlugin_GUI.cxx} | 91 +- .../XAOPlugin_GUI.h} | 24 +- src/XAOPlugin/XAOPlugin_IECallBack.cxx | 97 + src/XAOPlugin/XAOPlugin_IECallBack.hxx | 50 + .../XAOPlugin_IImportExport.hxx} | 10 +- src/XAOPlugin/XAOPlugin_IOperations.cxx | 670 + src/XAOPlugin/XAOPlugin_IOperations.hxx | 74 + src/XAOPlugin/XAOPlugin_IOperations_i.cc | 172 + src/XAOPlugin/XAOPlugin_IOperations_i.hh | 61 + .../XAOPlugin_ImportDlg.cxx} | 189 +- .../XAOPlugin_ImportDlg.h} | 62 +- src/XAOPlugin/XAOPlugin_OperationsCreator.cxx | 66 + src/XAOPlugin/XAOPlugin_OperationsCreator.hxx | 57 + src/XAOPlugin/XAOPlugin_images.ts | 16 + src/XAOPlugin/XAOPlugin_msg_en.ts | 105 + src/XAOPlugin/XAOPlugin_msg_fr.ts | 105 + src/XAOPlugin/XAOPlugin_msg_ja.ts | 105 + 301 files changed, 25220 insertions(+), 14207 deletions(-) create mode 100644 doc/salome/gui/GEOM/collect_geom_methods.py create mode 100644 doc/salome/gui/GEOM/images/importxao_dlg.png delete mode 100644 doc/salome/gui/GEOM/images/sat_named_shapes.png delete mode 100644 doc/salome/gui/GEOM/input/xao_format.doc create mode 100644 idl/AdvancedGEOM.idl create mode 100644 idl/BREPPlugin.idl create mode 100644 idl/IGESPlugin.idl create mode 100644 idl/STEPPlugin.idl create mode 100644 idl/STLPlugin.idl create mode 100644 idl/VTKPlugin.idl create mode 100644 idl/XAOPlugin.idl rename resources/{GEOMActions.xml => AdvancedGEOM.xml} (98%) create mode 100644 resources/BREPPlugin.xml create mode 100644 resources/IGESPlugin.xml delete mode 100644 resources/ImportExport create mode 100644 resources/STEPPlugin.xml create mode 100644 resources/STLPlugin.xml create mode 100644 resources/VTKPlugin.xml create mode 100644 resources/XAOPlugin.xml rename src/AdvancedEngine/{GEOM_AdvancedEngine.hxx => AdvancedEngine.hxx} (100%) rename src/AdvancedEngine/{GEOMImpl_DividedDiskDriver.cxx => AdvancedEngine_DividedDiskDriver.cxx} (92%) rename src/AdvancedEngine/{GEOMImpl_DividedDiskDriver.hxx => AdvancedEngine_DividedDiskDriver.hxx} (63%) rename src/AdvancedEngine/{GEOMImpl_IDividedDisk.hxx => AdvancedEngine_IDividedDisk.hxx} (90%) rename src/AdvancedEngine/{GEOMImpl_IAdvancedOperations.cxx => AdvancedEngine_IOperations.cxx} (93%) rename src/AdvancedEngine/{GEOMImpl_IAdvancedOperations.hxx => AdvancedEngine_IOperations.hxx} (81%) rename src/AdvancedEngine/{GEOM_IAdvancedOperations_i.cc => AdvancedEngine_IOperations_i.cc} (92%) rename src/AdvancedEngine/{GEOM_IAdvancedOperations_i.hh => AdvancedEngine_IOperations_i.hh} (91%) rename src/AdvancedEngine/{GEOMImpl_IPipeTShape.hxx => AdvancedEngine_IPipeTShape.hxx} (93%) rename src/AdvancedEngine/{GEOMImpl_ISmoothingSurface.hxx => AdvancedEngine_ISmoothingSurface.hxx} (89%) delete mode 100644 src/AdvancedEngine/AdvancedEngine_OperationsCreator.cc create mode 100644 src/AdvancedEngine/AdvancedEngine_OperationsCreator.cxx rename src/AdvancedEngine/{AdvancedEngine_OperationsCreator.hh => AdvancedEngine_OperationsCreator.hxx} (72%) rename src/AdvancedEngine/{GEOMImpl_PipeTShapeDriver.cxx => AdvancedEngine_PipeTShapeDriver.cxx} (93%) rename src/AdvancedEngine/{GEOMImpl_PipeTShapeDriver.hxx => AdvancedEngine_PipeTShapeDriver.hxx} (79%) rename src/AdvancedEngine/{GEOMImpl_SmoothingSurfaceDriver.cxx => AdvancedEngine_SmoothingSurfaceDriver.cxx} (90%) rename src/AdvancedEngine/{GEOMImpl_SmoothingSurfaceDriver.hxx => AdvancedEngine_SmoothingSurfaceDriver.hxx} (55%) rename src/AdvancedGUI/{AdvancedGUI_images.ts => AdvancedGEOM_images.ts} (100%) rename src/AdvancedGUI/{AdvancedGUI_msg_en.ts => AdvancedGEOM_msg_en.ts} (100%) rename src/AdvancedGUI/{AdvancedGUI_msg_fr.ts => AdvancedGEOM_msg_fr.ts} (100%) rename src/AdvancedGUI/{AdvancedGUI_msg_ja.ts => AdvancedGEOM_msg_ja.ts} (100%) delete mode 100644 src/BREPExport/BREPExport.cxx delete mode 100755 src/BREPExport/CMakeLists.txt delete mode 100644 src/BREPImport/BREPImport.cxx delete mode 100755 src/BREPImport/CMakeLists.txt create mode 100644 src/BREPPlugin/BREPPlugin_Engine.cxx create mode 100755 src/BREPPlugin/BREPPlugin_Engine.hxx create mode 100644 src/BREPPlugin/BREPPlugin_ExportDriver.cxx create mode 100644 src/BREPPlugin/BREPPlugin_ExportDriver.hxx create mode 100644 src/BREPPlugin/BREPPlugin_GUI.cxx create mode 100644 src/BREPPlugin/BREPPlugin_GUI.h create mode 100755 src/BREPPlugin/BREPPlugin_IECallBack.cxx create mode 100644 src/BREPPlugin/BREPPlugin_IECallBack.hxx create mode 100644 src/BREPPlugin/BREPPlugin_IExport.hxx create mode 100644 src/BREPPlugin/BREPPlugin_IImport.hxx create mode 100644 src/BREPPlugin/BREPPlugin_IOperations.cxx create mode 100644 src/BREPPlugin/BREPPlugin_IOperations.hxx create mode 100644 src/BREPPlugin/BREPPlugin_IOperations_i.cc create mode 100644 src/BREPPlugin/BREPPlugin_IOperations_i.hh create mode 100644 src/BREPPlugin/BREPPlugin_ImportDriver.cxx create mode 100644 src/BREPPlugin/BREPPlugin_ImportDriver.hxx create mode 100644 src/BREPPlugin/BREPPlugin_OperationsCreator.cxx create mode 100755 src/BREPPlugin/BREPPlugin_OperationsCreator.hxx create mode 100644 src/BREPPlugin/BREPPlugin_msg_en.ts create mode 100644 src/BREPPlugin/BREPPlugin_msg_fr.ts create mode 100644 src/BREPPlugin/BREPPlugin_msg_ja.ts create mode 100644 src/BREPPlugin/CMakeLists.txt create mode 100644 src/GEOMBase/GEOMBase_DlgSkeleton.cxx create mode 100644 src/GEOMBase/GEOMBase_DlgSkeleton.h delete mode 100644 src/GEOMGUI/GEOMGUI_XmlHandler.cxx delete mode 100644 src/GEOMGUI/GEOMGUI_XmlHandler.h create mode 100755 src/GEOMImpl/GEOMImpl_IBaseIEOperations.cxx create mode 100644 src/GEOMImpl/GEOMImpl_IBaseIEOperations.hxx create mode 100755 src/GEOMImpl/GEOMImpl_IECallBack.cxx create mode 100644 src/GEOMImpl/GEOMImpl_IECallBack.hxx delete mode 100644 src/GEOMImpl/GEOMImpl_XAODriver.cxx delete mode 100644 src/GEOMImpl/GEOMImpl_XAODriver.hxx create mode 100644 src/GEOMUtils/GEOMUtils_XmlHandler.cxx create mode 100644 src/GEOMUtils/GEOMUtils_XmlHandler.hxx create mode 100644 src/GEOM_SWIG/AdvancedGEOMBuilder.py create mode 100644 src/GEOM_SWIG/BREPPluginBuilder.py create mode 100644 src/GEOM_SWIG/IGESPluginBuilder.py create mode 100644 src/GEOM_SWIG/STEPPluginBuilder.py create mode 100644 src/GEOM_SWIG/STLPluginBuilder.py create mode 100644 src/GEOM_SWIG/VTKPluginBuilder.py create mode 100644 src/GEOM_SWIG/XAOPluginBuilder.py delete mode 100755 src/IGESExport/CMakeLists.txt delete mode 100644 src/IGESExport/IGESExport.cxx delete mode 100755 src/IGESImport/CMakeLists.txt delete mode 100644 src/IGESImport/IGESImport.cxx create mode 100644 src/IGESPlugin/CMakeLists.txt create mode 100644 src/IGESPlugin/IGESPlugin_Engine.cxx create mode 100755 src/IGESPlugin/IGESPlugin_Engine.hxx create mode 100644 src/IGESPlugin/IGESPlugin_ExportDlg.cxx create mode 100644 src/IGESPlugin/IGESPlugin_ExportDlg.h create mode 100644 src/IGESPlugin/IGESPlugin_ExportDriver.cxx create mode 100644 src/IGESPlugin/IGESPlugin_ExportDriver.hxx create mode 100644 src/IGESPlugin/IGESPlugin_GUI.cxx create mode 100644 src/IGESPlugin/IGESPlugin_GUI.h create mode 100755 src/IGESPlugin/IGESPlugin_IECallBack.cxx create mode 100644 src/IGESPlugin/IGESPlugin_IECallBack.hxx create mode 100644 src/IGESPlugin/IGESPlugin_IExport.hxx create mode 100644 src/IGESPlugin/IGESPlugin_IImport.hxx create mode 100644 src/IGESPlugin/IGESPlugin_IOperations.cxx create mode 100644 src/IGESPlugin/IGESPlugin_IOperations.hxx create mode 100644 src/IGESPlugin/IGESPlugin_IOperations_i.cc create mode 100644 src/IGESPlugin/IGESPlugin_IOperations_i.hh create mode 100644 src/IGESPlugin/IGESPlugin_ImportDriver.cxx create mode 100644 src/IGESPlugin/IGESPlugin_ImportDriver.hxx create mode 100644 src/IGESPlugin/IGESPlugin_OperationsCreator.cxx create mode 100755 src/IGESPlugin/IGESPlugin_OperationsCreator.hxx create mode 100644 src/IGESPlugin/IGESPlugin_msg_en.ts create mode 100644 src/IGESPlugin/IGESPlugin_msg_fr.ts create mode 100644 src/IGESPlugin/IGESPlugin_msg_ja.ts delete mode 100644 src/ImportExportGUI/CMakeLists.txt delete mode 100644 src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx delete mode 100755 src/STEPExport/CMakeLists.txt delete mode 100644 src/STEPExport/STEPExport.cxx delete mode 100755 src/STEPImport/CMakeLists.txt delete mode 100644 src/STEPImport/STEPImport.cxx create mode 100644 src/STEPPlugin/CMakeLists.txt create mode 100644 src/STEPPlugin/STEPPlugin_Engine.cxx create mode 100755 src/STEPPlugin/STEPPlugin_Engine.hxx create mode 100644 src/STEPPlugin/STEPPlugin_ExportDriver.cxx create mode 100644 src/STEPPlugin/STEPPlugin_ExportDriver.hxx create mode 100644 src/STEPPlugin/STEPPlugin_GUI.cxx create mode 100644 src/STEPPlugin/STEPPlugin_GUI.h create mode 100755 src/STEPPlugin/STEPPlugin_IECallBack.cxx create mode 100644 src/STEPPlugin/STEPPlugin_IECallBack.hxx create mode 100644 src/STEPPlugin/STEPPlugin_IExport.hxx create mode 100644 src/STEPPlugin/STEPPlugin_IImport.hxx create mode 100644 src/STEPPlugin/STEPPlugin_IOperations.cxx create mode 100644 src/STEPPlugin/STEPPlugin_IOperations.hxx create mode 100644 src/STEPPlugin/STEPPlugin_IOperations_i.cc create mode 100644 src/STEPPlugin/STEPPlugin_IOperations_i.hh create mode 100644 src/STEPPlugin/STEPPlugin_ImportDriver.cxx create mode 100644 src/STEPPlugin/STEPPlugin_ImportDriver.hxx create mode 100644 src/STEPPlugin/STEPPlugin_OperationsCreator.cxx create mode 100755 src/STEPPlugin/STEPPlugin_OperationsCreator.hxx create mode 100644 src/STEPPlugin/STEPPlugin_msg_en.ts create mode 100644 src/STEPPlugin/STEPPlugin_msg_fr.ts create mode 100644 src/STEPPlugin/STEPPlugin_msg_ja.ts delete mode 100755 src/STLExport/CMakeLists.txt delete mode 100644 src/STLExport/STLExport.cxx delete mode 100755 src/STLImport/CMakeLists.txt delete mode 100755 src/STLImport/STLImport.cxx create mode 100644 src/STLPlugin/CMakeLists.txt create mode 100644 src/STLPlugin/STLPlugin_Engine.cxx create mode 100755 src/STLPlugin/STLPlugin_Engine.hxx create mode 100644 src/STLPlugin/STLPlugin_ExportDlg.cxx create mode 100644 src/STLPlugin/STLPlugin_ExportDlg.h create mode 100644 src/STLPlugin/STLPlugin_ExportDriver.cxx create mode 100644 src/STLPlugin/STLPlugin_ExportDriver.hxx create mode 100644 src/STLPlugin/STLPlugin_GUI.cxx create mode 100644 src/STLPlugin/STLPlugin_GUI.h create mode 100755 src/STLPlugin/STLPlugin_IECallBack.cxx create mode 100644 src/STLPlugin/STLPlugin_IECallBack.hxx create mode 100644 src/STLPlugin/STLPlugin_IExport.hxx create mode 100644 src/STLPlugin/STLPlugin_IImport.hxx create mode 100644 src/STLPlugin/STLPlugin_IOperations.cxx create mode 100644 src/STLPlugin/STLPlugin_IOperations.hxx create mode 100644 src/STLPlugin/STLPlugin_IOperations_i.cc create mode 100644 src/STLPlugin/STLPlugin_IOperations_i.hh create mode 100644 src/STLPlugin/STLPlugin_ImportDriver.cxx create mode 100644 src/STLPlugin/STLPlugin_ImportDriver.hxx create mode 100644 src/STLPlugin/STLPlugin_OperationsCreator.cxx create mode 100755 src/STLPlugin/STLPlugin_OperationsCreator.hxx create mode 100644 src/STLPlugin/STLPlugin_msg_en.ts create mode 100644 src/STLPlugin/STLPlugin_msg_fr.ts create mode 100644 src/STLPlugin/STLPlugin_msg_ja.ts delete mode 100755 src/VTKExport/CMakeLists.txt delete mode 100644 src/VTKExport/VTKExport.cxx create mode 100644 src/VTKPlugin/CMakeLists.txt create mode 100644 src/VTKPlugin/VTKPlugin_Engine.cxx create mode 100755 src/VTKPlugin/VTKPlugin_Engine.hxx create mode 100644 src/VTKPlugin/VTKPlugin_ExportDlg.cxx create mode 100644 src/VTKPlugin/VTKPlugin_ExportDlg.h create mode 100644 src/VTKPlugin/VTKPlugin_ExportDriver.cxx create mode 100644 src/VTKPlugin/VTKPlugin_ExportDriver.hxx create mode 100644 src/VTKPlugin/VTKPlugin_GUI.cxx create mode 100644 src/VTKPlugin/VTKPlugin_GUI.h create mode 100755 src/VTKPlugin/VTKPlugin_IECallBack.cxx create mode 100644 src/VTKPlugin/VTKPlugin_IECallBack.hxx create mode 100644 src/VTKPlugin/VTKPlugin_IExport.hxx create mode 100644 src/VTKPlugin/VTKPlugin_IOperations.cxx create mode 100644 src/VTKPlugin/VTKPlugin_IOperations.hxx create mode 100644 src/VTKPlugin/VTKPlugin_IOperations_i.cc create mode 100644 src/VTKPlugin/VTKPlugin_IOperations_i.hh create mode 100644 src/VTKPlugin/VTKPlugin_OperationsCreator.cxx create mode 100755 src/VTKPlugin/VTKPlugin_OperationsCreator.hxx create mode 100644 src/VTKPlugin/VTKPlugin_msg_en.ts create mode 100644 src/VTKPlugin/VTKPlugin_msg_fr.ts create mode 100644 src/VTKPlugin/VTKPlugin_msg_ja.ts create mode 100644 src/XAOPlugin/CMakeLists.txt create mode 100644 src/XAOPlugin/XAOPlugin_Driver.cxx create mode 100644 src/XAOPlugin/XAOPlugin_Driver.hxx create mode 100644 src/XAOPlugin/XAOPlugin_Engine.cxx create mode 100755 src/XAOPlugin/XAOPlugin_Engine.hxx create mode 100644 src/XAOPlugin/XAOPlugin_ExportDlg.cxx rename src/{ImportExportGUI/ImportExportGUI_ImportXAODlg.h => XAOPlugin/XAOPlugin_ExportDlg.h} (52%) rename src/{ImportExportGUI/ImportExportGUI.cxx => XAOPlugin/XAOPlugin_GUI.cxx} (53%) rename src/{ImportExportGUI/ImportExportGUI.h => XAOPlugin/XAOPlugin_GUI.h} (68%) create mode 100644 src/XAOPlugin/XAOPlugin_IECallBack.cxx create mode 100644 src/XAOPlugin/XAOPlugin_IECallBack.hxx rename src/{GEOMImpl/GEOMImpl_IImportExportXAO.hxx => XAOPlugin/XAOPlugin_IImportExport.hxx} (83%) create mode 100644 src/XAOPlugin/XAOPlugin_IOperations.cxx create mode 100644 src/XAOPlugin/XAOPlugin_IOperations.hxx create mode 100644 src/XAOPlugin/XAOPlugin_IOperations_i.cc create mode 100644 src/XAOPlugin/XAOPlugin_IOperations_i.hh rename src/{ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx => XAOPlugin/XAOPlugin_ImportDlg.cxx} (67%) rename src/{ImportExportGUI/ImportExportGUI_ExportXAODlg.h => XAOPlugin/XAOPlugin_ImportDlg.h} (50%) create mode 100644 src/XAOPlugin/XAOPlugin_OperationsCreator.cxx create mode 100755 src/XAOPlugin/XAOPlugin_OperationsCreator.hxx create mode 100644 src/XAOPlugin/XAOPlugin_images.ts create mode 100644 src/XAOPlugin/XAOPlugin_msg_en.ts create mode 100644 src/XAOPlugin/XAOPlugin_msg_fr.ts create mode 100644 src/XAOPlugin/XAOPlugin_msg_ja.ts diff --git a/CMakeLists.txt b/CMakeLists.txt index 856676c05..d741a55cc 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/SalomeGEOMConfig.cmake.in b/SalomeGEOMConfig.cmake.in index c72af1a38..43660c4f8 100644 --- a/SalomeGEOMConfig.cmake.in +++ b/SalomeGEOMConfig.cmake.in @@ -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) diff --git a/adm_local/cmake_files/FindGEOM.cmake b/adm_local/cmake_files/FindGEOM.cmake index 69722aa4e..0d408449a 100644 --- a/adm_local/cmake_files/FindGEOM.cmake +++ b/adm_local/cmake_files/FindGEOM.cmake @@ -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,14 @@ 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_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 +59,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) diff --git a/bin/geom_setenv.py b/bin/geom_setenv.py index 35f9a0ef1..b4e8b747a 100644 --- a/bin/geom_setenv.py +++ b/bin/geom_setenv.py @@ -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 diff --git a/doc/salome/examples/import_export.py b/doc/salome/examples/import_export.py index 158fc6375..3b5f7df60 100644 --- a/doc/salome/examples/import_export.py +++ b/doc/salome/examples/import_export.py @@ -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) diff --git a/doc/salome/gui/GEOM/CMakeLists.txt b/doc/salome/gui/GEOM/CMakeLists.txt index 1b8fbf299..3584bc193 100644 --- a/doc/salome/gui/GEOM/CMakeLists.txt +++ b/doc/salome/gui/GEOM/CMakeLists.txt @@ -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 index 000000000..482f5f3fd --- /dev/null +++ b/doc/salome/gui/GEOM/collect_geom_methods.py @@ -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 +# where +# 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() diff --git a/doc/salome/gui/GEOM/doxyfile_py.in b/doc/salome/gui/GEOM/doxyfile_py.in index 493b7c65c..f3ad68298 100755 --- a/doc/salome/gui/GEOM/doxyfile_py.in +++ b/doc/salome/gui/GEOM/doxyfile_py.in @@ -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 diff --git a/doc/salome/gui/GEOM/images/exportxao_dlg.png b/doc/salome/gui/GEOM/images/exportxao_dlg.png index a7171c748f9dd15e590580136760a2fe9116901a..d273b9d7813f84277ae841f0385a0177bc6fbc64 100644 GIT binary patch literal 16652 zcmeHvXH-<(w&g)S6DmO@NEDGQpyUi9K?=z^izOggat0L;kR&;0$w_jiR3zsd3Mi4B zb1bUp&As>a>;B$*V|0)H(SII;v1?S-K8JI5SZl61=OIX0QT7fV1s()JcjR73sY1{d zJ_y1&yKx14l0+Ku1iajQ_d>@3g7ANVK0!D`^&c*KvpGs@J4%^2!0pZ7IhxzrKw9QD zZ){y2Jhw7-a1eT+;>hmc^xF8{J1cXz@#Xgcn$jxZFv82j)Xg2OOdx63ceeJ9544{t z?SCp1grEnIoYXUQ*W}F^7uS2EKihXJlJHjPq5~!F!mea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UsaKef!I^UaaJA@{aIq(6P;B1R zCU7mgcv4mDwCt|De!KFL(!#HPVQZvICDRXl2a9{}2Cv{s4hCo0_$qdDE@bjwEa)^B zN&6r=WKw6wg0xbMr<>UHBE2Z|kxx*50eHd6mGZ?VWu1U#ylVAjI{F~FFJx@SZy=y% zLZ@Lg-^G0z=Qm(@P=;K*-u}Al^(}B3H2NsB109unBjL?UGOIyuWv?n>G6~xW=a4Rj zvX%3`GHjl}2#hWdl&w_Jc;RM~ZTBG%x{I4+bOjnC1`c;lSpEc$o^>~(5(#FG1o6dB zPT4Un6$2$JmYu${{Xsc-Bf8nHuL{8xKofkJ@_ROVk4Cgy=V)&I5toeFakx-}Tz4SP z<)ly@tx(O*Gqive6MexLdPYO^d%?ve)#&bMT0`F0%Y>;0>F%U_HiASDm% zHpS_=c`=Mh+%)NFCAq_ZZZz9#obI$ppP0IAK&F)m6 z0Tn6lkb)bHR)(HYl7n5?E$dp&G1Jc!#nMHQ-q8?S0fbmluwBj<0cv@`lpdq1AfE0l zIk#sc)8hh}wQhCJsWM@O(_ms~udld<;v3jd)sC>V(q9Io`7|{Z2!3D1=E+Iqep6MFtJ4*(=zE~bBiJ{WoolZn52MrBGI2=DzHs0Q)= zv!&z`BT7kGsT(ZI3q%;ZDZU!(6$OBE(vO+{@`CD5pdFsSJTEc?GSVqdAUvu^$ diff --git a/doc/salome/gui/GEOM/images/geomexport.png b/doc/salome/gui/GEOM/images/geomexport.png index 4d4d3fb33f2fe4764a890952fd2b58159067525b..b8c181e7332e68e877fa4f688f365b4019b9d658 100755 GIT binary patch literal 33999 zcmeEuby!s2yYCnngoqLX0!m8?!hobmgMie~Dc#-i6{SmBS_$dyR*^1gX^`&jx-Y+b z&w1{7&N+YFKkt3+esEA`53^_OwchtrOaHghqFCre=m-P?OI%Dy4uQC?gFsxXzH=RZ z(&KZ>9KPMP5>v57Anw^;{kc~4PL>scc!CfY5>RkTSetNk!yTNwwKdgg)Wtzi+RkD8g0RZ}v-he$JmM{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(m46Bv1Y7HnQF!o@OG@OHyZ4->`M}r6^PXil-}cV@c|vP4nh8U~{A{b#YPh zCkSR9Xe9}no87p=^$7x#cu_`0{1!(AQhbjv!$N4RP+~U~U-?WfRz|a3-$)IEy9Ll= zAtQE`dvG0)4eHm~BI65OlOZkHaj&2NrDk0*DR$`N25)n@3|w(gfK>ca|eIC|oqMQZWEWFngR75olu63J@}s^V^21oOta zZQI#(+lPfy-BMw~A^JQFt2d3aFB&>kdEvRD=IHuRu^jWeCVa@uuO#oPgc;yRI)*Lt zmMjZvmC1SR=Gbo__)}Q4X=(q+Dce`|fRckjzhCm3qRJO)s*B30-#BwhfcPeFH~;;& zq`_=^^si%GR^0zSa(sFJM20$um?LBlEzMx!NiYjU)2$80`uxYLz))J~TGv+S0y@l> zyb#0n+rR)DMPlTkbd%Rn?j4gEJ5qJS6GDj3JX_B;^5t9W^K#$o_=%VpiP@PsdIZ<4S1E$4YL!kUq6^nPeDZ>rYL_TU>>H#Vv&DJGa^^cu1s&CRVBBc+*HIp25jqCTb(q9TE3$7k$VCLMZI!9B-FFn#}p3*s)t!f$Ye*o+t Br1$^; diff --git a/doc/salome/gui/GEOM/images/geomimport.png b/doc/salome/gui/GEOM/images/geomimport.png index d194ec5b6aa426ddbc996f9d6949df5258a558d0..c25ded6104e78dc9fdfd0aca08be14f47e9d54a4 100755 GIT binary patch literal 28994 zcmeFZWmuG9v^F{>Dvg04-I7W-A_EeV(kTidN8lxco4EdQ=@^fnH_3O&%x5)fHiDf(_kF)eeWTzwtg=@AuQTH4*BzE3rDS8$29tAP`k=@5nF(yj&Xa zb*!oK2$b`1$9CnT^Z#q>&$m26j_z@n5+^V@d+R3|o=z+SBUFWXFP8ZR?V=Ix#hB6e zw5PMeJQKovrOxPz;9?tGg0MnSdbYvi*3Zb7)AV|zyL+Ygxm(xsVHm%YhUqDL8utt* zd63`U*|)Zdxr?^zAv-UB)${(nnqwOa!^s)iN@WLY>@xykZT0#gRVsxZuBbiN_*HkI z9)hP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n#Q9x5cm4I z@0T)+L=doQi+3lNI}^{GpH)y&dOT&v8D6wV0F?BJ5aOC|y@3P{>UKc*m2E`mZmc$P$#7@nq`Wv(z7@3hb~S8}gUrF_`x26?9Ux;!BxGxHV;FPmn% z0bl5;NKCC|e9*SpyH8%3|6wULpJf>`HVe~xGZEZ=CF`7m3Zvy_w(_g1eho`Mjc_Bi zagP+$)pT@-*{{Sk_`Df?Sjtpb0QUD|Q7cH0LJm&O)(ammsPQC#{b{AX5yQ)w9D5kd z0oylN+;+%T)NZ4k>UqHIf9)^gyWebe%G{iTvPi&lfn@9dG43hK4 z%;qXw85R=Rj5dOlvVmU&6lv5zhD`{@ZMY|`78VvdlzW^!h#5FqrJZqHL6BKP&3_BC z&~*Cs+*QXva16S?SU#zqg3Vl*pReyxW|f^9tgNn%QOpoINF`&@CNU;4#F5F?)b(2* zP8t`-=tk^}_>03gPW}R1-w%WcMn-J@xl{jy$)n7PK1B zr^T65fR!8@e1g4+@VJsnAO@-)`*aRHypL=HKK5JWos|zWSD-*-hKpyj?vzEm`@i4s zj=GT1vote*dBH~Z#b+toUq9NdK2?~U_qun87p8AHNY!LHnOU&PCZ?iq@ctcch>ic? z{0g^>0cw^?dg&Wqrsh{@dEggQGv^yLG%2ej+a4V1{68o@#+1#R^kt}01JM^ zFP4`obl1=fz)I0+)N9>5d8$v+i15dZ#a%`>b2PCoGoS-6>l zbZLE;FV5cV=|B7&YE1c8sDGsnFuwJ3Q5waw#=b%M4u>of5t*EvTpKbM(^b diff --git a/doc/salome/gui/GEOM/images/importxao_dlg.png b/doc/salome/gui/GEOM/images/importxao_dlg.png new file mode 100644 index 0000000000000000000000000000000000000000..0ffda51242774adcc81d3ef2915088ad76eb5778 GIT binary patch literal 8640 zcma)ibzIZY-|tWn1PKvDNkIW=krI$pN~B}tke03?j24EZpa{|+9b?qUk&@CKqY;qU z7`@Tl`MQ5S&wYOP-tQmV_jPv8=NsqqdB@p_)Y4Ffd%2~j+=^+Cjda%N$3+vG=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ZKs{|6cSxTd!SG`kH4DRBukmwx&4#u zXWJ*E3*h^B3`!g_b}K5UJ1q9{aCpXj6_jn~cQ|;xiAE1+ih6EVye|+YBj=7Xu73~e z-1f>w^^u4_t=UTgoFj|AxVT(~C{tcP<%t(~ z_v(Ao^=@dtjHx_fUDv!iisjLdv^bV`1_&_)(bXlLlC6I!ie@Y*ftv%B&O~iz7k|}k z1&Ut&`0&IxZ7;38VB#ta$Hc_ZNOmsL7db@}`Q?jxv(>>mYXH-|%CX^TWzO#nes?WFlVf8)`nf;J zJx=OR1Ce(uF5)i2)H*)j7Q+}fGi1^=m!_(iiKUEeY0rle}J>T2RmDdL=ELTr-jJNoXSjd1+l4&1u9O)H~6Q;rOhr&yvftqJFy&#Itep;OX6s1G>r zX+9(K%yGfYjJltLOq+NT-(KDf(TUfUHNGP9Ox3brlU~`{a{2IV44pIG)0@4*-A0wf z4u^sh=iI%SNlpUR?M;5J;!5aS1I%frS`Qp28XJc7!~zL`9N%*p*WvJwN%?Lp{EahKupBfCQkiS8xKrVMhJPC#?!`lJKb-p)?RSoq^v zlrfU833VTLE$$p;Ov$OJ9UjNzh)dxArw_`v@8hllLl^xWJt}G+5;h^+|F;)FV{JRp zRKKW<-Jtvs&p2`PN^B~ADc75la!*(NyB;^2P;a;K*wL%aKs&6AUwRn*Wj^K}Y}#Ev z8)KD4J%z}hVtRary)>TUsk65k@&pxH(W0DvENZNHRX9q~S_n6QlkpsJ|xrcB{| G$o~RebR~5F literal 0 HcmV?d00001 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 index cb3bca6609e041665b8783cfc5c06422a218710e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7159 zcmc(EXIK+kwDu%{gc6F>5NbdL=}qY+2I*3c2nYxXMFFW&rAROmq)1Z)DH=ot6*xgr zK#GI_0*ZtpqM#I|gMcVq_=a=zobx^R&;57vJd>H(vuEwS*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}%ug(;XyjBB5Ebnj9iMN`$i1%lfma%)8@E$H>ud_2mY;sR|nZQBzYEoKw^X3Wr5hf`a#34R&^RoUt(+ch*6gUggs_Dn}y( z)I|M|#a%e1MPD3wA!KA^ggR(h&?F%%t6kRj0aWz*Z$%lUEeQOTzTx2l+J`oDjHS;p zFJ{u+yZZ-4!BP*&n#79ai0yF4)BXeRp?vEI>wH#^-d;T?mx9c5)zRn;<=+N}7iS2-RD3o1CZ1pV9$ zBZCE}%J;Q3HB&P)m8xgY(pFoFR*Bw>>9+azPiP#Hxv0mwr4gLIBAB&aljyyj2K;Xb z?^)RU7LPh&N1TPQ8WJ3$lAD*O`Z`yIgpt!>cPS!G24eM0!@|PA?5a^EW@q~*_B2j3 z_2gSSA=yqj_*>mMVpmdef|u(>F`UC$!C?;FdR=64axyY{bsl8+gU<{;50fKRCaHX+ z2ZUP1@F5TUUXMI@3R#o3x?}S6#giwz^~X9#y2a~l*!y+3SXl5jAbq~RJ)?%hVj(rE zXV090zk1i-pUPR{!D?ZGFd^55OsdBG+~ijr7#L`?ad3F4?9;m+P9PA-X=!OaW8XnH zy7Ui-rjxiB+|u3&-^b{Qw)0aH6JFlFzRk177z}19XcHf7ph7THswS|%0zq-727B^k zHeuu21PmQsOrI&n%RqjuI?z-zx-CBLewR*ezkaVqSCpUOe^%2RN=;ap4%(DKng4b` zA9!Cvt!`;+`9=G{-txZWzfV%|`^)VAhywR=n(61&{Y>`Y{`~iQ`aVWNxlE{KO06>cu^YR{f7ZSUFzxJ%iG5`yu$2{iW zzDi3V{J4$3EqBN+!zz;Lq%sl~Kh}{H6Z~dH9MJ diff --git a/doc/salome/gui/GEOM/input/import_export.doc b/doc/salome/gui/GEOM/input/import_export.doc index 50b792030..93ddcc384 100644 --- a/doc/salome/gui/GEOM/input/import_export.doc +++ b/doc/salome/gui/GEOM/input/import_export.doc @@ -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. -To import geometrical objects from a BREP, IGES, STEP, ACIS or STL file: +Our TUI Scripts provide you with useful examples of the use of +\ref tui_import_export_page + +\section io_import Import file + +To import geometrical objects from a BREP, IGES, STEP or STL file: \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 Import/, where is a name +of desirable format. In the Import 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 Object Browser. + +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 Object Browser. +\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 Reload From Disk in the context menu of the imported @@ -55,21 +56,52 @@ as before this operation. \image html geomimport_reopen.png -\n To export geometrical objects into a BREP, IGES, STEP, ACIS or STL +\section io_export Export file + +\n To export geometrical objects into a BREP, IGES, STEP, STL or VTK file: \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. +Export/, where is a name of desirable format. +In the Export 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 TUI Scripts 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. + +To import a shape in the \b XAO format: + +\par +In the \b File menu select Import/XAO. + +\image html importxao_dlg.png + +\par + +To export a shape in the \b XAO format: + +\par +In the \b File menu select Export/XAO. +\image html exportxao_dlg.png + +In this dialog: +- Click the arrow button and select in the Object Browser or in the Viewer the Shape to be exported. +- Input the File name 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: geompy.ExportXAO(Shape, FileName, Groups, Fields) + +*/ diff --git a/doc/salome/gui/GEOM/input/index.doc b/doc/salome/gui/GEOM/input/index.doc index b3e02ee68..df3131feb 100644 --- a/doc/salome/gui/GEOM/input/index.doc +++ b/doc/salome/gui/GEOM/input/index.doc @@ -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 diff --git a/doc/salome/gui/GEOM/input/tui_importexport_geom_objs.doc b/doc/salome/gui/GEOM/input/tui_importexport_geom_objs.doc index b4dc9afa0..59587b825 100644 --- a/doc/salome/gui/GEOM/input/tui_importexport_geom_objs.doc +++ b/doc/salome/gui/GEOM/input/tui_importexport_geom_objs.doc @@ -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 index 00d810973..000000000 --- a/doc/salome/gui/GEOM/input/xao_format.doc +++ /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 Main Menu select New Entity -> -Import / Export -> Import XAO. - -To export a shape in the \b XAO format, in the Main Menu select New Entity -> -Import / Export -> Export XAO. - -\image html exportxao_dlg.png - -In this dialog: -- Click the arrow button and select in the Object Browser or in the Viewer the Shape to be exported. -- Input the File name 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: geompy.MakeExportXAO(Shape, FileName, Groups, Fields) - -*/ diff --git a/idl/AdvancedGEOM.idl b/idl/AdvancedGEOM.idl new file mode 100644 index 000000000..c82edf11f --- /dev/null +++ b/idl/AdvancedGEOM.idl @@ -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 index 000000000..c5e59715f --- /dev/null +++ b/idl/BREPPlugin.idl @@ -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__ diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt index bdc32d9cf..e8ebb6082 100755 --- a/idl/CMakeLists.txt +++ b/idl/CMakeLists.txt @@ -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}) diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl index 86b959374..149bf9674 100644 --- a/idl/GEOM_Gen.idl +++ b/idl/GEOM_Gen.idl @@ -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 */ @@ -3710,20 +3697,24 @@ module GEOM GEOM_Object MakeCopy (in GEOM_Object theOriginal); /*! + * \brief Deprecated method. Use Export (from the + * corresponding plugin) instead; here 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 ImportTranslators() 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 (from the + * corresponding plugin) instead; here 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 ImportTranslators() 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. @@ -3732,34 +3723,17 @@ module GEOM ListOfGO 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 ImportTranslators() 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. @@ -3798,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: @@ -4391,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. */ diff --git a/idl/GEOM_Superv.idl b/idl/GEOM_Superv.idl index 7787ff4cc..3bf0fea3f 100644 --- a/idl/GEOM_Superv.idl +++ b/idl/GEOM_Superv.idl @@ -26,6 +26,7 @@ #define __GEOM_SUPERV__ #include "GEOM_Gen.idl" +#include "AdvancedGEOM.idl" module GEOM { @@ -272,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 // @@ -643,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 index 000000000..e7d858b95 --- /dev/null +++ b/idl/IGESPlugin.idl @@ -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 index 000000000..8021e6664 --- /dev/null +++ b/idl/STEPPlugin.idl @@ -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 index 000000000..7c8f82531 --- /dev/null +++ b/idl/STLPlugin.idl @@ -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 index 000000000..2b5aa47de --- /dev/null +++ b/idl/VTKPlugin.idl @@ -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 index 000000000..c382fd3d9 --- /dev/null +++ b/idl/XAOPlugin.idl @@ -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/GEOMActions.xml b/resources/AdvancedGEOM.xml similarity index 98% rename from resources/GEOMActions.xml rename to resources/AdvancedGEOM.xml index 7dc5adee6..1d6fda98d 100644 --- a/resources/GEOMActions.xml +++ b/resources/AdvancedGEOM.xml @@ -28,7 +28,7 @@ - diff --git a/resources/BREPPlugin.xml b/resources/BREPPlugin.xml new file mode 100644 index 000000000..5b7c97167 --- /dev/null +++ b/resources/BREPPlugin.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt index 6097008d8..1fa4e9d9d 100755 --- a/resources/CMakeLists.txt +++ b/resources/CMakeLists.txt @@ -23,12 +23,17 @@ # 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/GEOMCatalog.xml.in b/resources/GEOMCatalog.xml.in index 7ac41f313..bb07e4de7 100644 --- a/resources/GEOMCatalog.xml.in +++ b/resources/GEOMCatalog.xml.in @@ -26,5477 +26,7164 @@ - + + + - - + + + + + + + GEOM/GEOM_BaseObject + + + GEOM/GEOM_BaseObject + + + GEOM/GEOM_BaseObject + + + GEOM/GEOM_FieldStep + + + GEOM/GEOM_FieldStep + + + GEOM/GEOM_FieldStep + + + GEOM/GEOM_FieldStep + + + + GEOM/GEOM_IOperations + + + GEOM/GEOM_IOperations + + + GEOM/GEOM_IOperations + + + GEOM/GEOM_IOperations + + + GEOM/GEOM_IOperations + + + GEOM/GEOM_IOperations + + + GEOM/GEOM_IOperations + + + GEOM/GEOM_IOperations + + + GEOM/GEOM_IOperations + + + GEOM/GEOM_IOperations + + + GEOM/GEOM_IOperations + + + GEOM/GEOM_IOperations + + + GEOM/GEOM_IOperations + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - GEOM - Geometry - Geom - NRI - @SALOMEGEOM_VERSION@ - Geometry component - 1 - ModuleGeom.png - 1 + + + + + + + + + + + + - - - - GEOM - No comment + + - - - - - Undo - - - - 1 - - - - theStudyID - long - - - - - - - - - Redo - - - - 1 - - - - theStudyID - long - - - - - - - - - AddInStudy - - - - 1 - - - - theStudy - Study - - - - theObject - GEOM_Object - - - - theName - string - - - - theFather - GEOM_Object - - - - - - return - SObject - - - - - - - - GetIBasicOperations - - - - 1 - - - - theStudyID - long - - - - - - return - GEOM_IBasicOperations - - - - - - - - GetITransformOperations - - - - 1 - - - - theStudyID - long - - - - - - return - GEOM_ITransformOperations - - - - - - - - GetI3DPrimOperations - - - - 1 - - - - theStudyID - long - - - - - - return - GEOM_I3DPrimOperations - - - - - - - - GetIShapesOperations - - - - 1 - - - - theStudyID - long - - - - - - return - GEOM_IShapesOperations - - - - - - - - GetIBooleanOperations - - - - 1 - - - - theStudyID - long - - - - - - return - GEOM_IBooleanOperations - - - - - - - - GetICurvesOperations - - - - 1 - - - - theStudyID - long - - - - - - return - GEOM_ICurvesOperations - - - - - - - - GetILocalOperations - - - - 1 - - - - theStudyID - long - - - - - - return - GEOM_ILocalOperations - - - - - - - - GetIHealingOperations - - - - 1 - - - - theStudyID - long - - - - - - return - GEOM_IHealingOperations - - - - - - - - GetIInsertOperations - - - - 1 - - - - theStudyID - long - - - - - - return - GEOM_IInsertOperations - - - - - - - - GetIMeasureOperations - - - - 1 - - - - theStudyID - long - - - - - - return - GEOM_IMeasureOperations - - - - - - - - GetIBlocksOperations - - - - 1 - - - - theStudyID - long - - - - - - return - GEOM_IBlocksOperations - - - - - - - - GetIGroupOperations - - - - 1 - - - - theStudyID - long - - - - - - return - GEOM_IGroupOperations - - - - - - - - GetIAdvancedOperations - - - - 1 - - - - theStudyID - long - - - - - - return - GEOM_IAdvancedOperations - - - - - - - - RemoveObject - - - - 1 - - - - theObject - GEOM_Object - - - - - - - - - GetObject - - - - 1 - - - - theStudyID - long - - - - theEntry - string - - - - - - return - GEOM_Object - - - - - - - - AddSubShape - - - - 1 - - - - theMainShape - GEOM_Object - - - - theIndices - ListOfLong - - - - - - return - GEOM_Object - - - - - - - - GetIORFromString - - - - 1 - - - - ior - string - - - - - - return - GEOM_Object - - - - - - - - GetStringFromIOR - - - - 1 - - - - theObject - GEOM_Object - - - - - - return - string - - - - - - - GetDumpName - - - unknown - 0 - - - theStudyEntry - string - unknown - - - - - return - string - unknown - - - - - - GetAllDumpNames - - - unknown - 0 - - - - return - string_array - unknown - - - - - - - hostname = localhost + + + + + + + + + + + + + GEOM + Geometry + GEOM + SALOME team + @SALOMEGEOM_VERSION@ + CAD modeler + 1 + ModuleGeom.png + 1 + + + + + GEOM/GEOM_Gen + GEOM module engine + + + + Undo + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + + + Redo + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + + + AddInStudy + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudy + Study + unknown + + + theObject + GEOM/GEOM_BaseObject + unknown + + + theName + string + unknown + + + theFather + GEOM/GEOM_BaseObject + unknown + + + + + return + SObject + unknown + + + + + + RestoreSubShapesO + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudy + Study + unknown + + + theObject + GEOM/GEOM_Object + unknown + + + theArgs + GEOM/ListOfGO + unknown + + + theFindMethod + GEOM/find_shape_method + unknown + + + theInheritFirstArg + boolean + unknown + + + theAddPrefix + boolean + unknown + + + + + return + GEOM/ListOfGO + unknown + + + + + + RestoreGivenSubShapesO + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudy + Study + unknown + + + theObject + GEOM/GEOM_Object + unknown + + + theArgs + GEOM/ListOfGO + unknown + + + theFindMethod + GEOM/find_shape_method + unknown + + + theInheritFirstArg + boolean + unknown + + + theAddPrefix + boolean + unknown + + + + + return + GEOM/ListOfGO + unknown + + + + + + RestoreSubShapesSO + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudy + Study + unknown + + + theSObject + SObject + unknown + + + theArgs + GEOM/ListOfGO + unknown + + + theFindMethod + GEOM/find_shape_method + unknown + + + theInheritFirstArg + boolean + unknown + + + theAddPrefix + boolean + unknown + + + + + return + GEOM/ListOfGO + unknown + + + + + + GetIBasicOperations + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + return + GEOM/GEOM_IBasicOperations + unknown + + + + + + GetITransformOperations + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + return + GEOM/GEOM_ITransformOperations + unknown + + + + + + GetI3DPrimOperations + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + return + GEOM/GEOM_I3DPrimOperations + unknown + + + + + + GetIShapesOperations + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + return + GEOM/GEOM_IShapesOperations + unknown + + + + + + GetIBooleanOperations + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + return + GEOM/GEOM_IBooleanOperations + unknown + + + + + + GetICurvesOperations + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + return + GEOM/GEOM_ICurvesOperations + unknown + + + + + + GetILocalOperations + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + return + GEOM/GEOM_ILocalOperations + unknown + + + + + + GetIHealingOperations + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + return + GEOM/GEOM_IHealingOperations + unknown + + + + + + GetIInsertOperations + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + return + GEOM/GEOM_IInsertOperations + unknown + + + + + + GetIMeasureOperations + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + return + GEOM/GEOM_IMeasureOperations + unknown + + + + + + GetIBlocksOperations + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + return + GEOM/GEOM_IBlocksOperations + unknown + + + + + + GetIGroupOperations + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + return + GEOM/GEOM_IGroupOperations + unknown + + + + + + GetIFieldOperations + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + return + GEOM/GEOM_IFieldOperations + unknown + + + + + + GetPluginOperations + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + theLibName + string + unknown + + + + + return + GEOM/GEOM_IOperations + unknown + + + + + + RemoveObject + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_BaseObject + unknown + + + + + + + GetObject + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + theEntry + string + unknown + + + + + return + GEOM/GEOM_BaseObject + unknown + + + + + + AddSubShape + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theMainShape + GEOM/GEOM_Object + unknown + + + theIndices + GEOM/ListOfLong + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetIORFromString + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theIOR + string + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetStringFromIOR + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + + + return + string + unknown + + + + + + GetDumpName + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyEntry + string + unknown + + + + + return + string + unknown + + + + + + GetAllDumpNames + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + + return + GEOM/string_array + unknown + + + + + + PublishNamedShapesInStudy + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudy + Study + unknown + + + theObject + Object + unknown + + + + + return + GEOM/ListOfGO + unknown + + + + + + CreateFolder + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theName + string + unknown + + + theFather + SObject + unknown + + + + + return + SObject + unknown + + + + + + MoveToFolder + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theFolder + SObject + unknown + + + + + + + MoveListToFolder + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theListOfGO + GEOM/ListOfGO + unknown + + + theFolder + SObject + unknown + + + + + + + Move + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + what + GEOM/object_list + unknown + + + where + SObject + unknown + + + row + long + unknown + + + + + + + - + - GEOM_Superv - GEOM_Superv - OTHER - - @SALOMEGEOM_VERSION@ - Supervision wrapper for Geometry component - 1 - 1 - - - - GEOM_Superv - unknown - - - SetStudyID - - - unknown - 0 - - - theStudyID - long - unknown - - - - - - - CreateListOfGO - - - unknown - 0 - - - - return - GEOM_List - unknown - - - - - - AddItemToListOfGO - - - unknown - 0 - - - theList - GEOM_List - unknown - - - theObject - GEOM_Object - unknown - - - - - theList - GEOM_List - unknown - - - - - - CreateListOfLong - - - unknown - 0 - - - - return - GEOM_List - unknown - - - - - - AddItemToListOfLong - - - unknown - 0 - - - theList - GEOM_List - unknown - - - theObject - long - unknown - - - - - theList - GEOM_List - unknown - - - - - - CreateListOfDouble - - - unknown - 0 - - - - return - GEOM_List - unknown - - - - - - AddItemToListOfDouble - - - unknown - 0 - - - theList - GEOM_List - unknown - - - theObject - double - unknown - - - - - theList - GEOM_List - unknown - - - - - - MakePointXYZ - - - unknown - 0 - - - theX - double - unknown - - - theY - double - unknown - - - theZ - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakePointWithReference - - - unknown - 0 - - - theReference - GEOM_Object - unknown - - - theX - double - unknown - - - theY - double - unknown - - - theZ - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakePointOnCurve - - - unknown - 0 - - - theRefCurve - GEOM_Object - unknown - - - theParameter - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeTangentOnCurve - - - unknown - 0 - - - theRefCurve - GEOM_Object - unknown - - - theParameter - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeVectorDXDYDZ - - - unknown - 0 - - - theDX - double - unknown - - - theDY - double - unknown - - - theDZ - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeVectorTwoPnt - - - unknown - 0 - - - thePnt1 - GEOM_Object - unknown - - - thePnt2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeLineTwoPnt - - - unknown - 0 - - - thePnt1 - GEOM_Object - unknown - - - thePnt2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakePlaneThreePnt - - - unknown - 0 - - - thePnt1 - GEOM_Object - unknown - - - thePnt2 - GEOM_Object - unknown - - - thePnt3 - GEOM_Object - unknown - - - theTrimSize - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakePlanePntVec - - - unknown - 0 - - - thePnt - GEOM_Object - unknown - - - theVec - GEOM_Object - unknown - - - theTrimSize - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakePlaneFace - - - unknown - 0 - - - theFace - GEOM_Object - unknown - - - theTrimSize - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeMarker - - - unknown - 0 - - - theOX - double - unknown - - - theOY - double - unknown - - - theOZ - double - unknown - - - theXDX - double - unknown - - - theXDY - double - unknown - - - theXDZ - double - unknown - - - theYDX - double - unknown - - - theYDY - double - unknown - - - theYDZ - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeTangentPlaneOnFace - - - unknown - 0 - - - theFace - GEOM_Object - unknown - - - theParameterU - double - unknown - - - theParameterV - double - unknown - - - theTrimSize - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeBox - - - unknown - 0 - - - theX1 - double - unknown - - - theY1 - double - unknown - - - theZ1 - double - unknown - - - theX2 - double - unknown - - - theY2 - double - unknown - - - theZ2 - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeBoxDXDYDZ - - - unknown - 0 - - - theDX - double - unknown - - - theDY - double - unknown - - - theDZ - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeBoxTwoPnt - - - unknown - 0 - - - thePnt1 - GEOM_Object - unknown - - - thePnt2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeCylinderPntVecRH - - - unknown - 0 - - - thePnt - GEOM_Object - unknown - - - theAxis - GEOM_Object - unknown - - - theRadius - double - unknown - - - theHeight - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeCylinderRH - - - unknown - 0 - - - theR - double - unknown - - - theH - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeCylinderPntVecRHA - - - unknown - 0 - - - thePnt - GEOM_Object - unknown - - - theAxis - GEOM_Object - unknown - - - theRadius - double - unknown - - - theHeight - double - unknown - - - theAngle - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeCylinderRHA - - - unknown - 0 - - - theR - double - unknown - - - theH - double - unknown - - - theA - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeSphere - - - unknown - 0 - - - theX - double - unknown - - - theY - double - unknown - - - theZ - double - unknown - - - theRadius - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeSphereR - - - unknown - 0 - - - theR - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeSpherePntR - - - unknown - 0 - - - thePnt - GEOM_Object - unknown - - - theR - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeTorusPntVecRR - - - unknown - 0 - - - thePnt - GEOM_Object - unknown - - - theVec - GEOM_Object - unknown - - - theRMajor - double - unknown - - - theRMinor - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeTorusRR - - - unknown - 0 - - - theRMajor - double - unknown - - - theRMinor - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeConePntVecR1R2H - - - unknown - 0 - - - thePnt - GEOM_Object - unknown - - - theAxis - GEOM_Object - unknown - - - theR1 - double - unknown - - - theR2 - double - unknown - - - theHeight - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeConeR1R2H - - - unknown - 0 - - - theR1 - double - unknown - - - theR2 - double - unknown - - - theHeight - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakePrismVecH - - - unknown - 0 - - - theBase - GEOM_Object - unknown - - - theVec - GEOM_Object - unknown - - - theH - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakePrismTwoPnt - - - unknown - 0 - - - theBase - GEOM_Object - unknown - - - thePoint1 - GEOM_Object - unknown - - - thePoint2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakePipe - - - unknown - 0 - - - theBase - GEOM_Object - unknown - - - thePath - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeRevolutionAxisAngle - - - unknown - 0 - - - theBase - GEOM_Object - unknown - - - theAxis - GEOM_Object - unknown - - - theAngle - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeFilling - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - theMinDeg - long - unknown - - - theMaxDeg - long - unknown - - - theTol2D - double - unknown - - - theTol3D - double - unknown - - - theNbIter - long - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeThruSections - - - unknown - 0 - - - theSeqSections - ListOfGO - unknown - - - theModeSolid - boolean - unknown - - - thePreci - double - unknown - - - theRuled - boolean - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakePipeWithDifferentSections - - - unknown - 0 - - - theSeqBases - ListOfGO - unknown - - - theLocations - ListOfGO - unknown - - - thePath - GEOM_Object - unknown - - - theWithContact - boolean - unknown - - - theWithCorrection - boolean - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakePipeWithShellSections - - - unknown - 0 - - - theSeqBases - ListOfGO - unknown - - - theSeqSubBases - ListOfGO - unknown - - - theLocations - ListOfGO - unknown - - - thePath - GEOM_Object - unknown - - - theWithContact - boolean - unknown - - - theWithCorrection - boolean - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeBoolean - - - unknown - 0 - - - theShape1 - GEOM_Object - unknown - - - theShape2 - GEOM_Object - unknown - - - theOperation - long - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeFuse - - - unknown - 0 - - - theShape1 - GEOM_Object - unknown - - - theShape2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeCut - - - unknown - 0 - - - theShape1 - GEOM_Object - unknown - - - theShape2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeCommon - - - unknown - 0 - - - theShape1 - GEOM_Object - unknown - - - theShape2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeSection - - - unknown - 0 - - - theShape1 - GEOM_Object - unknown - - - theShape2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakePartition - - - unknown - 0 - - - theShapes - GEOM_List - unknown - - - theTools - GEOM_List - unknown - - - theKeepInside - GEOM_List - unknown - - - theRemoveInside - GEOM_List - unknown - - - theLimit - short - unknown - - - theRemoveWebs - boolean - unknown - - - theMaterials - GEOM_List - unknown - - - theKeepNonlimitShapes - short - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeHalfPartition - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - thePlane - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeCopy - - - unknown - 0 - - - theOriginal - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - Export - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theFileName - string - unknown - - - theFormatName - string - unknown - - - - - - - Import - - - unknown - 0 - - - theFileName - string - unknown - - - theFormatName - string - unknown - - - - - return - GEOM_Object - unknown - - - - - - ImportTranslators - - - unknown - 0 - - - - theFormats - string_array - unknown - - - thePatterns - string_array - unknown - - - - - - ExportTranslators - - - unknown - 0 - - - - theFormats - string_array - unknown - - - thePatterns - string_array - unknown - - - - - - TranslateTwoPoints - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - thePoint1 - GEOM_Object - unknown - - - thePoint2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - TranslateTwoPointsCopy - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - thePoint1 - GEOM_Object - unknown - - - thePoint2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - TranslateDXDYDZ - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theDX - double - unknown - - - theDY - double - unknown - - - theDZ - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - TranslateDXDYDZCopy - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theDX - double - unknown - - - theDY - double - unknown - - - theDZ - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - TranslateVector - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theVector - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - TranslateVectorCopy - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theVector - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MultiTranslate1D - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theVector - GEOM_Object - unknown - - - theStep - double - unknown - - - theNbTimes - long - unknown - - - - - return - GEOM_Object - unknown - - - - - - MultiTranslate2D - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theVector1 - GEOM_Object - unknown - - - theStep1 - double - unknown - - - theNbTimes1 - long - unknown - - - theVector2 - GEOM_Object - unknown - - - theStep2 - double - unknown - - - theNbTimes2 - long - unknown - - - - - return - GEOM_Object - unknown - - - - - - Rotate - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theAxis - GEOM_Object - unknown - - - theAngle - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - RotateCopy - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theAxis - GEOM_Object - unknown - - - theAngle - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - RotateThreePoints - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theCentPoint - GEOM_Object - unknown - - - thePoint1 - GEOM_Object - unknown - - - thePoint2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - RotateThreePointsCopy - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theCentPoint - GEOM_Object - unknown - - - thePoint1 - GEOM_Object - unknown - - - thePoint2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MultiRotate1D - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theAxis - GEOM_Object - unknown - - - theNbTimes - long - unknown - - - - - return - GEOM_Object - unknown - - - - - - MultiRotate2D - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theAxis - GEOM_Object - unknown - - - theAngle - double - unknown - - - theNbTimes1 - long - unknown - - - theStep - double - unknown - - - theNbTimes2 - long - unknown - - - - - return - GEOM_Object - unknown - - - - - - MirrorPlane - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - thePlane - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MirrorPlaneCopy - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - thePlane - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MirrorAxis - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theAxis - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MirrorAxisCopy - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theAxis - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MirrorPoint - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - thePoint - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MirrorPointCopy - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - thePoint - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - OffsetShape - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theOffset - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - OffsetShapeCopy - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theOffset - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - ScaleShape - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - thePoint - GEOM_Object - unknown - - - theFactor - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - ScaleShapeCopy - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - thePoint - GEOM_Object - unknown - - - theFactor - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - PositionShape - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theStartLCS - GEOM_Object - unknown - - - theEndLCS - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - PositionShapeCopy - - - unknown - 0 - - - theObject - GEOM_Object - unknown - - - theStartLCS - GEOM_Object - unknown - - - theEndLCS - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeEdge - - - unknown - 0 - - - thePnt1 - GEOM_Object - unknown - - - thePnt2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeWire - - - unknown - 0 - - - theEdgesAndWires - GEOM_List - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeFace - - - unknown - 0 - - - theWire - GEOM_Object - unknown - - - isPlanarWanted - boolean - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeFaceWires - - - unknown - 0 - - - theWires - GEOM_List - unknown - - - isPlanarWanted - boolean - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeShell - - - unknown - 0 - - - theFacesAndShells - GEOM_List - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeSolidShell - - - unknown - 0 - - - theShell - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeSolidShells - - - unknown - 0 - - - theShells - GEOM_List - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeCompound - - - unknown - 0 - - - theShapes - GEOM_List - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeGlueFaces - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - theTolerance - double - unknown - - - doKeepNonSolids - boolean - unknown - - - - - return - GEOM_Object - unknown - - - - - - GetGlueFaces - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - theTolerance - double - unknown - - - - - return - GEOM_List - unknown - - - - - - MakeGlueFacesByList - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - theTolerance - double - unknown - - - theFaces - ListOfGO - unknown - - - doKeepNonSolids - boolean - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeExplode - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - theShapeType - long - unknown - - - isSorted - boolean - unknown - - - - - return - GEOM_List - unknown - - - - - - NumberOfFaces - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - - - return - long - unknown - - - - - - NumberOfEdges - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - - - return - long - unknown - - - - - - ChangeOrientation - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeQuad4Vertices - - - unknown - 0 - - - thePnt1 - GEOM_Object - unknown - - - thePnt2 - GEOM_Object - unknown - - - thePnt3 - GEOM_Object - unknown - - - thePnt4 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeQuad - - - unknown - 0 - - - theEdge1 - GEOM_Object - unknown - - - theEdge2 - GEOM_Object - unknown - - - theEdge3 - GEOM_Object - unknown - - - theEdge4 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeQuad2Edges - - - unknown - 0 - - - theEdge1 - GEOM_Object - unknown - - - theEdge2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeHexa - - - unknown - 0 - - - theFace1 - GEOM_Object - unknown - - - theFace2 - GEOM_Object - unknown - - - theFace3 - GEOM_Object - unknown - - - theFace4 - GEOM_Object - unknown - - - theFace5 - GEOM_Object - unknown - - - theFace6 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeHexa2Faces - - - unknown - 0 - - - theFace1 - GEOM_Object - unknown - - - theFace2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - GetPoint - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - theX - double - unknown - - - theY - double - unknown - - - theZ - double - unknown - - - theEpsilon - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - GetEdge - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - thePoint1 - GEOM_Object - unknown - - - thePoint2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - GetEdgeNearPoint - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - thePoint - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - GetFaceByPoints - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - thePoint1 - GEOM_Object - unknown - - - thePoint2 - GEOM_Object - unknown - - - thePoint3 - GEOM_Object - unknown - - - thePoint4 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - GetFaceByEdges - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - theEdge1 - GEOM_Object - unknown - - - theEdge2 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - GetOppositeFace - - - unknown - 0 - - - theBlock - GEOM_Object - unknown - - - theFace - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - GetFaceNearPoint - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - thePoint - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - GetFaceByNormale - - - unknown - 0 - - - theBlock - GEOM_Object - unknown - - - theVector - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - IsCompoundOfBlocks - - - unknown - 0 - - - theCompound - GEOM_Object - unknown - - - theMinNbFaces - long - unknown - - - theMaxNbFaces - long - unknown - - - - - return - boolean - unknown - - - theNbBlocks - long - unknown - - - - - - CheckCompoundOfBlocks - - - unknown - 0 - - - theCompound - GEOM_Object - unknown - - - - - return - boolean - unknown - - - theErrors - BCErrors - unknown - - - - - - PrintBCErrors - - - unknown - 0 - - - theCompound - GEOM_Object - unknown - - - theErrors - BCErrors - unknown - - - - - return - string - unknown - - - - - - ExplodeCompoundOfBlocks - - - unknown - 0 - - - theCompound - GEOM_Object - unknown - - - theMinNbFaces - long - unknown - - - theMaxNbFaces - long - unknown - - - - - return - GEOM_List - unknown - - - - - - GetBlockNearPoint - - - unknown - 0 - - - theCompound - GEOM_Object - unknown - - - thePoint - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - GetBlockByParts - - - unknown - 0 - - - theCompound - GEOM_Object - unknown - - - theParts - GEOM_List - unknown - - - - - return - GEOM_Object - unknown - - - - - - GetBlocksByParts - - - unknown - 0 - - - theCompound - GEOM_Object - unknown - - - theParts - GEOM_List - unknown - - - - - return - GEOM_List - unknown - - - - - - MakeMultiTransformation1D - - - unknown - 0 - - - theBlock - GEOM_Object - unknown - - - theDirFace1 - long - unknown - - - theDirFace2 - long - unknown - - - theNbTimes - long - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeMultiTransformation2D - - - unknown - 0 - - - theBlock - GEOM_Object - unknown - - - theDirFace1U - long - unknown - - - theDirFace2U - long - unknown - - - theNbTimesU - long - unknown - - - theDirFace1V - long - unknown - - - theDirFace2V - long - unknown - - - theNbTimesV - long - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeCirclePntVecR - - - unknown - 0 - - - thePnt - GEOM_Object - unknown - - - theVec - GEOM_Object - unknown - - - theR - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeCircleThreePnt - - - unknown - 0 - - - thePnt1 - GEOM_Object - unknown - - - thePnt2 - GEOM_Object - unknown - - - thePnt3 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeEllipse - - - unknown - 0 - - - thePnt - GEOM_Object - unknown - - - theVec - GEOM_Object - unknown - - - theRMajor - double - unknown - - - theRMinor - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeEllipseVec - - - unknown - 0 - - - thePnt - GEOM_Object - unknown - - - theVec - GEOM_Object - unknown - - - theRMajor - double - unknown - - - theRMinor - double - unknown - - - theVecMaj - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeArc - - - unknown - 0 - - - thePnt1 - GEOM_Object - unknown - - - thePnt2 - GEOM_Object - unknown - - - thePnt3 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeArcCenter - - - unknown - 0 - - - theCenter - GEOM_Object - unknown - - - thePnt1 - GEOM_Object - unknown - - - thePnt2 - GEOM_Object - unknown - - - theSense - boolean - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeArcOfEllipse - - - unknown - 0 - - - thePnt1 - GEOM_Object - unknown - - - thePnt2 - GEOM_Object - unknown - - - thePnt3 - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakePolyline - - - unknown - 0 - - - thePoints - GEOM_List - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeSplineBezier - - - unknown - 0 - - - thePoints - GEOM_List - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeSplineInterpolation - - - unknown - 0 - - - thePoints - GEOM_List - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeSketcher - - - unknown - 0 - - - theCommand - string - unknown - - - theWorkingPlane - GEOM_List - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeFilletAll - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - theR - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeFilletEdges - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - theR - double - unknown - - - theEdges - GEOM_List - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeFilletFaces - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - theR - double - unknown - - - theFaces - GEOM_List - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeChamferAll - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - theD - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeChamferEdge - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - theD1 - double - unknown - - - theD2 - double - unknown - - - theFace1 - long - unknown - - - theFace2 - long - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeChamferFaces - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - theD1 - double - unknown - - - theD2 - double - unknown - - - theFaces - GEOM_List - unknown - - - - - return - GEOM_Object - unknown - - - - - - MakeArchimede - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - theWeight - double - unknown - - - theWaterDensity - double - unknown - - - theMeshDeflection - double - unknown - - - - - return - GEOM_Object - unknown - - - - - - GetSubShapeIndex - - - unknown - 0 - - - theShape - GEOM_Object - unknown - - - theSubShape - GEOM_Object - unknown - - - - - return - long - unknown - - - - - - CreateGroup - - - unknown - 0 - - - theMainShape - GEOM_Object - unknown - - - theShapeType - long - unknown - - - - - return - GEOM_Object - unknown - - - - - - AddObject - - - unknown - 0 - - - theGroup - GEOM_Object - unknown - - - theSubShapeId - long - unknown - - - - - - - RemoveObject - - - unknown - 0 - - - theGroup - GEOM_Object - unknown - - - theSubShapeId - long - unknown - - - - - - - GetType - - - unknown - 0 - - - theGroup - GEOM_Object - unknown - - - - - return - long - unknown - - - - - - GetMainShape - - - unknown - 0 - - - theGroup - GEOM_Object - unknown - - - - - return - GEOM_Object - unknown - - - - - - GetObjects - - - unknown - 0 - - - theGroup - GEOM_Object - unknown - - - - - return - GEOM_List - unknown - - - - - - - MakePipeTShape - - - unknown - 0 - - - theR1 - double - unknown - - - theW1 - double - unknown - - - theL1 - double - unknown - - - theR2 - double - unknown - - - theW2 - double - unknown - - - theL2 - double - unknown - - - theHewMesh - boolean - unknown - - - - - return - GEOM_List - unknown - - - - - - MakePipeTShapeWithPosition - - - unknown - 0 - - - theR1 - double - unknown - - - theW1 - double - unknown - - - theL1 - double - unknown - - - theR2 - double - unknown - - - theW2 - double - unknown - - - theL2 - double - unknown - - - theHewMesh - boolean - unknown - - - theP1 - GEOM_Object - unknown - - - theP2 - GEOM_Object - unknown - - - theP3 - GEOM_Object - unknown - - - - - return - GEOM_List - unknown - - - - - - MakePipeTShapeChamfer - - - unknown - 0 - - - theR1 - double - unknown - - - theW1 - double - unknown - - - theL1 - double - unknown - - - theR2 - double - unknown - - - theW2 - double - unknown - - - theL2 - double - unknown - - - theH - double - unknown - - - theR - double - unknown - - - theHewMesh - boolean - unknown - - - - - return - GEOM_List - unknown - - - - - - MakePipeTShapeChamferWithPosition - - - unknown - 0 - - - theR1 - double - unknown - - - theW1 - double - unknown - - - theL1 - double - unknown - - - theR2 - double - unknown - - - theW2 - double - unknown - - - theL2 - double - unknown - - - theH - double - unknown - - - theR - double - unknown - - - theHewMesh - boolean - unknown - - - theP1 - GEOM_Object - unknown - - - theP2 - GEOM_Object - unknown - - - theP3 - GEOM_Object - unknown - - - - - return - GEOM_List - unknown - - - - - - - - MakePipeTShapeFillet - - - unknown - 0 - - - theR1 - double - unknown - - - theW1 - double - unknown - - - theL1 - double - unknown - - - theR2 - double - unknown - - - theW2 - double - unknown - - - theL2 - double - unknown - - - theRF - double - unknown - - - theHewMesh - boolean - unknown - - - - - return - GEOM_List - unknown - - - - - - MakePipeTShapeFilletWithPosition - - - unknown - 0 - - - theR1 - double - unknown - - - theW1 - double - unknown - - - theL1 - double - unknown - - - theR2 - double - unknown - - - theW2 - double - unknown - - - theL2 - double - unknown - - - theRF - double - unknown - - - theHewMesh - boolean - unknown - - - theP1 - GEOM_Object - unknown - - - theP2 - GEOM_Object - unknown - - - theP3 - GEOM_Object - unknown - - - - - return - GEOM_List - unknown - - - - - - MakeDividedDisk - - - unknown - 0 - - - theR - double - Radius of the disk - - - theRatio - double - Relative size of the central square diagonal against the disk diameter - - - - - return - GEOM_Object - Result object - - - - - - MakeDividedCylinder - - - unknown - 0 - - - theR - double - Radius of the cylinder - - - theH - double - Height of the cylinder - - - - - return - GEOM_Object - Result object - - - - - - MakeSmoothingSurface - - - unknown - 0 - - - thelPoints - double - list of points - - - - - return - GEOM_Object - Result object - - - - - - MakeExportXAO - - - unknown - 0 - - - theFileName - string - The name of the exported file - - - theExportingShape - GEOM_Object - Shape to export - - - thelGroups - GEOM_List - List of groups to export - - - thelFields - GEOM_List - List of fields to export - - - - - return - bool - Result object - - - - - - - + + + GEOM_Superv + GEOM_Superv + GEOM + + @SALOMEGEOM_VERSION@ + Supervision helper for Geometry component + 1 + 1 + + + + + + GEOM/GEOM_Superv + unknown + + + + SetStudyID + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theStudyID + long + unknown + + + + + + + CreateListOfGO + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + + return + GEOM/GEOM_List + unknown + + + + + + AddItemToListOfGO + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theList + GEOM/GEOM_List + unknown + + + theObject + GEOM/GEOM_Object + unknown + + + + + theList + GEOM/GEOM_List + unknown + + + + + + CreateListOfLong + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + + return + GEOM/GEOM_List + unknown + + + + + + AddItemToListOfLong + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theList + GEOM/GEOM_List + unknown + + + theObject + long + unknown + + + + + theList + GEOM/GEOM_List + unknown + + + + + + CreateListOfDouble + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + + return + GEOM/GEOM_List + unknown + + + + + + AddItemToListOfDouble + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theList + GEOM/GEOM_List + unknown + + + theObject + double + unknown + + + + + theList + GEOM/GEOM_List + unknown + + + + + + MakePointXYZ + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theX + double + unknown + + + theY + double + unknown + + + theZ + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePointWithReference + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theReference + GEOM/GEOM_Object + unknown + + + theX + double + unknown + + + theY + double + unknown + + + theZ + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePointOnCurve + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theRefCurve + GEOM/GEOM_Object + unknown + + + theParameter + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePointOnCurveByLength + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theRefCurve + GEOM/GEOM_Object + unknown + + + theLength + double + unknown + + + theStartPoint + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeTangentOnCurve + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theRefCurve + GEOM/GEOM_Object + unknown + + + theParameter + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeVectorDXDYDZ + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theDX + double + unknown + + + theDY + double + unknown + + + theDZ + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeVectorTwoPnt + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt1 + GEOM/GEOM_Object + unknown + + + thePnt2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeLineTwoPnt + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt1 + GEOM/GEOM_Object + unknown + + + thePnt2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeLineTwoFaces + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theFace1 + GEOM/GEOM_Object + unknown + + + theFace2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePlaneThreePnt + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt1 + GEOM/GEOM_Object + unknown + + + thePnt2 + GEOM/GEOM_Object + unknown + + + thePnt3 + GEOM/GEOM_Object + unknown + + + theTrimSize + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePlanePntVec + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt + GEOM/GEOM_Object + unknown + + + theVec + GEOM/GEOM_Object + unknown + + + theTrimSize + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePlaneFace + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theFace + GEOM/GEOM_Object + unknown + + + theTrimSize + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePlane2Vec + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theVec1 + GEOM/GEOM_Object + unknown + + + theVec2 + GEOM/GEOM_Object + unknown + + + theTrimSize + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePlaneLCS + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theLCS + GEOM/GEOM_Object + unknown + + + theTrimSize + double + unknown + + + theOrientation + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeMarker + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theOX + double + unknown + + + theOY + double + unknown + + + theOZ + double + unknown + + + theXDX + double + unknown + + + theXDY + double + unknown + + + theXDZ + double + unknown + + + theYDX + double + unknown + + + theYDY + double + unknown + + + theYDZ + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeMarkerFromShape + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeMarkerPntTwoVec + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theOrigin + GEOM/GEOM_Object + unknown + + + theXVec + GEOM/GEOM_Object + unknown + + + theYVec + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeTangentPlaneOnFace + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theFace + GEOM/GEOM_Object + unknown + + + theParameterU + double + unknown + + + theParameterV + double + unknown + + + theTrimSize + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeBox + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theX1 + double + unknown + + + theY1 + double + unknown + + + theZ1 + double + unknown + + + theX2 + double + unknown + + + theY2 + double + unknown + + + theZ2 + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeBoxDXDYDZ + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theDX + double + unknown + + + theDY + double + unknown + + + theDZ + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeBoxTwoPnt + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt1 + GEOM/GEOM_Object + unknown + + + thePnt2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeFaceHW + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theH + double + unknown + + + theW + double + unknown + + + theOrientation + short + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeFaceObjHW + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObj + GEOM/GEOM_Object + unknown + + + theH + double + unknown + + + theW + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeDiskPntVecR + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt + GEOM/GEOM_Object + unknown + + + theVec + GEOM/GEOM_Object + unknown + + + theR + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeDiskThreePnt + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt1 + GEOM/GEOM_Object + unknown + + + thePnt2 + GEOM/GEOM_Object + unknown + + + thePnt3 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeDiskR + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theR + double + unknown + + + theOrientation + short + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeCylinderPntVecRH + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt + GEOM/GEOM_Object + unknown + + + theAxis + GEOM/GEOM_Object + unknown + + + theRadius + double + unknown + + + theHeight + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeCylinderRH + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theR + double + unknown + + + theH + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeCylinderPntVecRHA + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt + GEOM/GEOM_Object + unknown + + + theAxis + GEOM/GEOM_Object + unknown + + + theRadius + double + unknown + + + theHeight + double + unknown + + + theAngle + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeCylinderRHA + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theR + double + unknown + + + theH + double + unknown + + + theA + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeSphere + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theX + double + unknown + + + theY + double + unknown + + + theZ + double + unknown + + + theRadius + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeSphereR + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theR + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeSpherePntR + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt + GEOM/GEOM_Object + unknown + + + theR + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeTorusPntVecRR + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt + GEOM/GEOM_Object + unknown + + + theVec + GEOM/GEOM_Object + unknown + + + theRMajor + double + unknown + + + theRMinor + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeTorusRR + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theRMajor + double + unknown + + + theRMinor + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeConePntVecR1R2H + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt + GEOM/GEOM_Object + unknown + + + theAxis + GEOM/GEOM_Object + unknown + + + theR1 + double + unknown + + + theR2 + double + unknown + + + theHeight + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeConeR1R2H + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theR1 + double + unknown + + + theR2 + double + unknown + + + theHeight + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePrismVecH + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theBase + GEOM/GEOM_Object + unknown + + + theVec + GEOM/GEOM_Object + unknown + + + theH + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePrismVecH2Ways + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theBase + GEOM/GEOM_Object + unknown + + + theVec + GEOM/GEOM_Object + unknown + + + theH + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePrismTwoPnt + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theBase + GEOM/GEOM_Object + unknown + + + thePoint1 + GEOM/GEOM_Object + unknown + + + thePoint2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePrismTwoPnt2Ways + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theBase + GEOM/GEOM_Object + unknown + + + thePoint1 + GEOM/GEOM_Object + unknown + + + thePoint2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePipe + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theBase + GEOM/GEOM_Object + unknown + + + thePath + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeRevolutionAxisAngle + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theBase + GEOM/GEOM_Object + unknown + + + theAxis + GEOM/GEOM_Object + unknown + + + theAngle + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeRevolutionAxisAngle2Ways + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theBase + GEOM/GEOM_Object + unknown + + + theAxis + GEOM/GEOM_Object + unknown + + + theAngle + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeFilling + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theMinDeg + long + unknown + + + theMaxDeg + long + unknown + + + theTol2D + double + unknown + + + theTol3D + double + unknown + + + theNbIter + long + unknown + + + theMethod + GEOM/filling_oper_method + unknown + + + theApprox + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeThruSections + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theSeqSections + GEOM/ListOfGO + unknown + + + theModeSolid + boolean + unknown + + + thePreci + double + unknown + + + theRuled + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePipeWithDifferentSections + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theSeqBases + GEOM/ListOfGO + unknown + + + theLocations + GEOM/ListOfGO + unknown + + + thePath + GEOM/GEOM_Object + unknown + + + theWithContact + boolean + unknown + + + theWithCorrection + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePipeWithShellSections + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theSeqBases + GEOM/ListOfGO + unknown + + + theSeqSubBases + GEOM/ListOfGO + unknown + + + theLocations + GEOM/ListOfGO + unknown + + + thePath + GEOM/GEOM_Object + unknown + + + theWithContact + boolean + unknown + + + theWithCorrection + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePipeShellsWithoutPath + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theSeqBases + GEOM/ListOfGO + unknown + + + theLocations + GEOM/ListOfGO + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePipeBiNormalAlongVector + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theBase + GEOM/GEOM_Object + unknown + + + thePath + GEOM/GEOM_Object + unknown + + + theVec + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeBoolean + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape1 + GEOM/GEOM_Object + unknown + + + theShape2 + GEOM/GEOM_Object + unknown + + + theOperation + long + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeFuse + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape1 + GEOM/GEOM_Object + unknown + + + theShape2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeCommon + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape1 + GEOM/GEOM_Object + unknown + + + theShape2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeCut + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape1 + GEOM/GEOM_Object + unknown + + + theShape2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeSection + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape1 + GEOM/GEOM_Object + unknown + + + theShape2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePartition + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShapes + GEOM/GEOM_List + unknown + + + theTools + GEOM/GEOM_List + unknown + + + theKeepInside + GEOM/GEOM_List + unknown + + + theRemoveInside + GEOM/GEOM_List + unknown + + + theLimit + short + unknown + + + theRemoveWebs + boolean + unknown + + + theMaterials + GEOM/GEOM_List + unknown + + + theKeepNonlimitShapes + short + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeHalfPartition + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + thePlane + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeCopy + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theOriginal + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + Export + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theFileName + string + unknown + + + theFormatName + string + unknown + + + + + + + ImportFile + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theFileName + string + unknown + + + theFormatName + string + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + TranslateTwoPoints + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + thePoint1 + GEOM/GEOM_Object + unknown + + + thePoint2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + TranslateTwoPointsCopy + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + thePoint1 + GEOM/GEOM_Object + unknown + + + thePoint2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + TranslateDXDYDZ + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theDX + double + unknown + + + theDY + double + unknown + + + theDZ + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + TranslateDXDYDZCopy + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theDX + double + unknown + + + theDY + double + unknown + + + theDZ + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + TranslateVector + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theVector + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + TranslateVectorCopy + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theVector + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + TranslateVectorDistance + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theVector + GEOM/GEOM_Object + unknown + + + theDistance + double + unknown + + + theCopy + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MultiTranslate1D + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theVector + GEOM/GEOM_Object + unknown + + + theStep + double + unknown + + + theNbTimes + long + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MultiTranslate2D + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theVector1 + GEOM/GEOM_Object + unknown + + + theStep1 + double + unknown + + + theNbTimes1 + long + unknown + + + theVector2 + GEOM/GEOM_Object + unknown + + + theStep2 + double + unknown + + + theNbTimes2 + long + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + Rotate + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theAxis + GEOM/GEOM_Object + unknown + + + theAngle + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + RotateCopy + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theAxis + GEOM/GEOM_Object + unknown + + + theAngle + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + RotateThreePoints + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theCentPoint + GEOM/GEOM_Object + unknown + + + thePoint1 + GEOM/GEOM_Object + unknown + + + thePoint2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + RotateThreePointsCopy + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theCentPoint + GEOM/GEOM_Object + unknown + + + thePoint1 + GEOM/GEOM_Object + unknown + + + thePoint2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MultiRotate1D + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theAxis + GEOM/GEOM_Object + unknown + + + theNbTimes + long + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MultiRotate2D + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theAxis + GEOM/GEOM_Object + unknown + + + theAngle + double + unknown + + + theNbTimes1 + long + unknown + + + theStep + double + unknown + + + theNbTimes2 + long + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MirrorPlane + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + thePlane + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MirrorPlaneCopy + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + thePlane + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MirrorAxis + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theAxis + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MirrorAxisCopy + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theAxis + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MirrorPoint + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + thePoint + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MirrorPointCopy + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + thePoint + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + OffsetShape + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theOffset + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + OffsetShapeCopy + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theOffset + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + ScaleShape + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + thePoint + GEOM/GEOM_Object + unknown + + + theFactor + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + ScaleShapeCopy + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + thePoint + GEOM/GEOM_Object + unknown + + + theFactor + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + ScaleShapeAlongAxes + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + thePoint + GEOM/GEOM_Object + unknown + + + theFactorX + double + unknown + + + theFactorY + double + unknown + + + theFactorZ + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + ScaleShapeAlongAxesCopy + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + thePoint + GEOM/GEOM_Object + unknown + + + theFactorX + double + unknown + + + theFactorY + double + unknown + + + theFactorZ + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + PositionShape + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theStartLCS + GEOM/GEOM_Object + unknown + + + theEndLCS + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + PositionShapeCopy + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theStartLCS + GEOM/GEOM_Object + unknown + + + theEndLCS + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + PositionAlongPath + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + thePath + GEOM/GEOM_Object + unknown + + + theDistance + double + unknown + + + theCopy + boolean + unknown + + + theReverse + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeEdge + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt1 + GEOM/GEOM_Object + unknown + + + thePnt2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeEdgeOnCurveByLength + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theRefCurve + GEOM/GEOM_Object + unknown + + + theLength + double + unknown + + + theStartPoint + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeWire + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theEdgesAndWires + GEOM/GEOM_List + unknown + + + theTolerance + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeFace + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theWire + GEOM/GEOM_Object + unknown + + + isPlanarWanted + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeFaceWires + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theWires + GEOM/GEOM_List + unknown + + + isPlanarWanted + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeShell + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theFacesAndShells + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeSolidShell + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShell + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeSolidShells + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShells + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeCompound + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShapes + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeGlueFaces + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theTolerance + double + unknown + + + doKeepNonSolids + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetGlueFaces + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theTolerance + double + unknown + + + + + return + GEOM/GEOM_List + unknown + + + + + + MakeGlueFacesByList + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theTolerance + double + unknown + + + theFaces + GEOM/ListOfGO + unknown + + + doKeepNonSolids + boolean + unknown + + + doGlueAllEdges + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeExplode + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theShapeType + long + unknown + + + isSorted + boolean + unknown + + + + + return + GEOM/GEOM_List + unknown + + + + + + NumberOfFaces + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + + + return + long + unknown + + + + + + NumberOfEdges + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + + + return + long + unknown + + + + + + ChangeOrientation + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetShapesOnShape + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theCheckShape + GEOM/GEOM_Object + unknown + + + theShape + GEOM/GEOM_Object + unknown + + + theShapeType + short + unknown + + + theState + GEOM/shape_state + unknown + + + + + return + GEOM/GEOM_List + unknown + + + + + + GetShapesOnShapeAsCompound + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theCheckShape + GEOM/GEOM_Object + unknown + + + theShape + GEOM/GEOM_Object + unknown + + + theShapeType + short + unknown + + + theState + GEOM/shape_state + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeQuad4Vertices + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt1 + GEOM/GEOM_Object + unknown + + + thePnt2 + GEOM/GEOM_Object + unknown + + + thePnt3 + GEOM/GEOM_Object + unknown + + + thePnt4 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeQuad + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theEdge1 + GEOM/GEOM_Object + unknown + + + theEdge2 + GEOM/GEOM_Object + unknown + + + theEdge3 + GEOM/GEOM_Object + unknown + + + theEdge4 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeQuad2Edges + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theEdge1 + GEOM/GEOM_Object + unknown + + + theEdge2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeHexa + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theFace1 + GEOM/GEOM_Object + unknown + + + theFace2 + GEOM/GEOM_Object + unknown + + + theFace3 + GEOM/GEOM_Object + unknown + + + theFace4 + GEOM/GEOM_Object + unknown + + + theFace5 + GEOM/GEOM_Object + unknown + + + theFace6 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeHexa2Faces + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theFace1 + GEOM/GEOM_Object + unknown + + + theFace2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetPoint + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theX + double + unknown + + + theY + double + unknown + + + theZ + double + unknown + + + theEpsilon + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetEdge + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + thePoint1 + GEOM/GEOM_Object + unknown + + + thePoint2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetEdgeNearPoint + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + thePoint + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetFaceByPoints + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + thePoint1 + GEOM/GEOM_Object + unknown + + + thePoint2 + GEOM/GEOM_Object + unknown + + + thePoint3 + GEOM/GEOM_Object + unknown + + + thePoint4 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetFaceByEdges + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theEdge1 + GEOM/GEOM_Object + unknown + + + theEdge2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetOppositeFace + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theBlock + GEOM/GEOM_Object + unknown + + + theFace + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetFaceNearPoint + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + thePoint + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetFaceByNormale + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theBlock + GEOM/GEOM_Object + unknown + + + theVector + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + IsCompoundOfBlocks + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theCompound + GEOM/GEOM_Object + unknown + + + theMinNbFaces + long + unknown + + + theMaxNbFaces + long + unknown + + + + + return + boolean + unknown + + + theNbBlocks + long + unknown + + + + + + CheckCompoundOfBlocks + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theCompound + GEOM/GEOM_Object + unknown + + + + + return + boolean + unknown + + + theErrors + GEOM/BCErrors + unknown + + + + + + PrintBCErrors + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theCompound + GEOM/GEOM_Object + unknown + + + theErrors + GEOM/BCErrors + unknown + + + + + return + string + unknown + + + + + + ExplodeCompoundOfBlocks + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theCompound + GEOM/GEOM_Object + unknown + + + theMinNbFaces + long + unknown + + + theMaxNbFaces + long + unknown + + + + + return + GEOM/GEOM_List + unknown + + + + + + GetBlockNearPoint + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theCompound + GEOM/GEOM_Object + unknown + + + thePoint + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetBlockByParts + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theCompound + GEOM/GEOM_Object + unknown + + + theParts + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetBlocksByParts + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theCompound + GEOM/GEOM_Object + unknown + + + theParts + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_List + unknown + + + + + + MakeMultiTransformation1D + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theBlock + GEOM/GEOM_Object + unknown + + + theDirFace1 + long + unknown + + + theDirFace2 + long + unknown + + + theNbTimes + long + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeMultiTransformation2D + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theBlock + GEOM/GEOM_Object + unknown + + + theDirFace1U + long + unknown + + + theDirFace2U + long + unknown + + + theNbTimesU + long + unknown + + + theDirFace1V + long + unknown + + + theDirFace2V + long + unknown + + + theNbTimesV + long + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeCirclePntVecR + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt + GEOM/GEOM_Object + unknown + + + theVec + GEOM/GEOM_Object + unknown + + + theR + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeCircleThreePnt + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt1 + GEOM/GEOM_Object + unknown + + + thePnt2 + GEOM/GEOM_Object + unknown + + + thePnt3 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeCircleCenter2Pnt + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt1 + GEOM/GEOM_Object + unknown + + + thePnt2 + GEOM/GEOM_Object + unknown + + + thePnt3 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeEllipse + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt + GEOM/GEOM_Object + unknown + + + theVec + GEOM/GEOM_Object + unknown + + + theRMajor + double + unknown + + + theRMinor + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeEllipseVec + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt + GEOM/GEOM_Object + unknown + + + theVec + GEOM/GEOM_Object + unknown + + + theRMajor + double + unknown + + + theRMinor + double + unknown + + + theVecMaj + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeArc + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePnt1 + GEOM/GEOM_Object + unknown + + + thePnt2 + GEOM/GEOM_Object + unknown + + + thePnt3 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeArcCenter + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theCenter + GEOM/GEOM_Object + unknown + + + thePnt1 + GEOM/GEOM_Object + unknown + + + thePnt2 + GEOM/GEOM_Object + unknown + + + theSense + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeArcOfEllipse + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theCenter + GEOM/GEOM_Object + unknown + + + thePnt1 + GEOM/GEOM_Object + unknown + + + thePnt2 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakePolyline + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePoints + GEOM/GEOM_List + unknown + + + theIsClosed + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeSplineBezier + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePoints + GEOM/GEOM_List + unknown + + + theIsClosed + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeSplineInterpolation + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thePoints + GEOM/GEOM_List + unknown + + + theIsClosed + boolean + unknown + + + theDoReordering + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeSketcher + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theCommand + string + unknown + + + theWorkingPlane + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeFilletAll + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theR + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeFilletEdges + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theR + double + unknown + + + theEdges + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeFilletEdgesR1R2 + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theR1 + double + unknown + + + theR2 + double + unknown + + + theEdges + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeFilletFaces + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theR + double + unknown + + + theFaces + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeFilletFacesR1R2 + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theR1 + double + unknown + + + theR2 + double + unknown + + + theFaces + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeFillet2D + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theR + double + unknown + + + theVertexes + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeChamferAll + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theD + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeChamferEdge + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theD1 + double + unknown + + + theD2 + double + unknown + + + theFace1 + long + unknown + + + theFace2 + long + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeChamferEdgeAD + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theD + double + unknown + + + theAngle + double + unknown + + + theFace1 + long + unknown + + + theFace2 + long + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeChamferFaces + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theD1 + double + unknown + + + theD2 + double + unknown + + + theFaces + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeChamferFacesAD + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theD + double + unknown + + + theAngle + double + unknown + + + theFaces + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeChamferEdges + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theD1 + double + unknown + + + theD2 + double + unknown + + + theEdges + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeChamferEdgesAD + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theD + double + unknown + + + theAngle + double + unknown + + + theEdges + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeArchimede + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theWeight + double + unknown + + + theWaterDensity + double + unknown + + + theMeshDeflection + double + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetSubShapeIndex + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theShape + GEOM/GEOM_Object + unknown + + + theSubShape + GEOM/GEOM_Object + unknown + + + + + return + long + unknown + + + + + + CreateGroup + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theMainShape + GEOM/GEOM_Object + unknown + + + theShapeType + long + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + AddObject + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theGroup + GEOM/GEOM_Object + unknown + + + theSubShapeId + long + unknown + + + + + + + RemoveObject + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theGroup + GEOM/GEOM_Object + unknown + + + theSubShapeId + long + unknown + + + + + + + GetType + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theGroup + GEOM/GEOM_Object + unknown + + + + + return + long + unknown + + + + + + GetMainShape + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theGroup + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + GetObjects + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theGroup + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_List + unknown + + + + + + MakePipeTShape + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theR1 + double + unknown + + + theW1 + double + unknown + + + theL1 + double + unknown + + + theR2 + double + unknown + + + theW2 + double + unknown + + + theL2 + double + unknown + + + theHexMesh + boolean + unknown + + + + + return + GEOM/GEOM_List + unknown + + + + + + MakePipeTShapeWithPosition + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theR1 + double + unknown + + + theW1 + double + unknown + + + theL1 + double + unknown + + + theR2 + double + unknown + + + theW2 + double + unknown + + + theL2 + double + unknown + + + theHexMesh + boolean + unknown + + + theP1 + GEOM/GEOM_Object + unknown + + + theP2 + GEOM/GEOM_Object + unknown + + + theP3 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_List + unknown + + + + + + MakePipeTShapeChamfer + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theR1 + double + unknown + + + theW1 + double + unknown + + + theL1 + double + unknown + + + theR2 + double + unknown + + + theW2 + double + unknown + + + theL2 + double + unknown + + + theH + double + unknown + + + theW + double + unknown + + + theHexMesh + boolean + unknown + + + + + return + GEOM/GEOM_List + unknown + + + + + + MakePipeTShapeChamferWithPosition + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theR1 + double + unknown + + + theW1 + double + unknown + + + theL1 + double + unknown + + + theR2 + double + unknown + + + theW2 + double + unknown + + + theL2 + double + unknown + + + theH + double + unknown + + + theW + double + unknown + + + theHexMesh + boolean + unknown + + + theP1 + GEOM/GEOM_Object + unknown + + + theP2 + GEOM/GEOM_Object + unknown + + + theP3 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_List + unknown + + + + + + MakePipeTShapeFillet + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theR1 + double + unknown + + + theW1 + double + unknown + + + theL1 + double + unknown + + + theR2 + double + unknown + + + theW2 + double + unknown + + + theL2 + double + unknown + + + theRF + double + unknown + + + theHexMesh + boolean + unknown + + + + + return + GEOM/GEOM_List + unknown + + + + + + MakePipeTShapeFilletWithPosition + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theR1 + double + unknown + + + theW1 + double + unknown + + + theL1 + double + unknown + + + theR2 + double + unknown + + + theW2 + double + unknown + + + theL2 + double + unknown + + + theRF + double + unknown + + + theHexMesh + boolean + unknown + + + theP1 + GEOM/GEOM_Object + unknown + + + theP2 + GEOM/GEOM_Object + unknown + + + theP3 + GEOM/GEOM_Object + unknown + + + + + return + GEOM/GEOM_List + unknown + + + + + + MakeDividedDisk + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theR + double + unknown + + + theRatio + double + unknown + + + theOrientation + short + unknown + + + thePattern + GEOM/pattern + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeDividedCylinder + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theR + double + unknown + + + theH + double + unknown + + + thePattern + GEOM/pattern + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + MakeSmoothingSurface + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + thelPoints + GEOM/GEOM_List + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + ExportSTL + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theFileName + string + unknown + + + theIsASCII + boolean + unknown + + + theDeflection + double + unknown + + + theIsRelative + boolean + unknown + + + + + + + ImportSTL + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theFileName + string + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + ExportBREP + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theFileName + string + unknown + + + + + + + ImportBREP + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theFileName + string + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + ExportSTEP + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theFileName + string + unknown + + + + + + + ImportSTEP + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theFileName + string + unknown + + + theIsIgnoreUnits + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + ExportIGES + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theFileName + string + unknown + + + theVersion + string + unknown + + + + + + + ImportIGES + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theFileName + string + unknown + + + theIsIgnoreUnits + boolean + unknown + + + + + return + GEOM/GEOM_Object + unknown + + + + + + ExportXAO + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + shape + GEOM/GEOM_Object + unknown + + + groups + GEOM/ListOfGO + unknown + + + fields + GEOM/ListOfFields + unknown + + + author + string + unknown + + + fileName + string + unknown + + + + + return + boolean + unknown + + + + + + ImportXAO + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + fileName + string + unknown + + + + + return + boolean + unknown + + + shape + GEOM/GEOM_Object + unknown + + + subShapes + GEOM/ListOfGO + unknown + + + groups + GEOM/ListOfGO + unknown + + + fields + GEOM/ListOfFields + unknown + + + + + + ExportVTK + SALOME team + @SALOMEGEOM_VERSION@ + unknown + 0 + + + theObject + GEOM/GEOM_Object + unknown + + + theFileName + string + unknown + + + theDeflection + double + unknown + + + + + + + + - + + diff --git a/resources/IGESPlugin.xml b/resources/IGESPlugin.xml new file mode 100644 index 000000000..0810a4a0c --- /dev/null +++ b/resources/IGESPlugin.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + diff --git a/resources/ImportExport b/resources/ImportExport deleted file mode 100644 index fae46daf3..000000000 --- a/resources/ImportExport +++ /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 index 000000000..0af939973 --- /dev/null +++ b/resources/STEPPlugin.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + diff --git a/resources/STLPlugin.xml b/resources/STLPlugin.xml new file mode 100644 index 000000000..81dd11bb6 --- /dev/null +++ b/resources/STLPlugin.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in index eb36582fa..82a6f2b6c 100644 --- a/resources/SalomeApp.xml.in +++ b/resources/SalomeApp.xml.in @@ -37,8 +37,14 @@

- + + + + + + +
diff --git a/resources/VTKPlugin.xml b/resources/VTKPlugin.xml new file mode 100644 index 000000000..de58fd01b --- /dev/null +++ b/resources/VTKPlugin.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + diff --git a/resources/XAOPlugin.xml b/resources/XAOPlugin.xml new file mode 100644 index 000000000..c00137121 --- /dev/null +++ b/resources/XAOPlugin.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/AdvancedEngine/AdvancedEngine.cxx b/src/AdvancedEngine/AdvancedEngine.cxx index 270b1e60d..8745b3c3e 100644 --- a/src/AdvancedEngine/AdvancedEngine.cxx +++ b/src/AdvancedEngine/AdvancedEngine.cxx @@ -20,25 +20,14 @@ // 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/GEOM_AdvancedEngine.hxx b/src/AdvancedEngine/AdvancedEngine.hxx similarity index 100% rename from src/AdvancedEngine/GEOM_AdvancedEngine.hxx rename to src/AdvancedEngine/AdvancedEngine.hxx diff --git a/src/AdvancedEngine/GEOMImpl_DividedDiskDriver.cxx b/src/AdvancedEngine/AdvancedEngine_DividedDiskDriver.cxx similarity index 92% rename from src/AdvancedEngine/GEOMImpl_DividedDiskDriver.cxx rename to src/AdvancedEngine/AdvancedEngine_DividedDiskDriver.cxx index 24876c489..d1391bc13 100644 --- a/src/AdvancedEngine/GEOMImpl_DividedDiskDriver.cxx +++ b/src/AdvancedEngine/AdvancedEngine_DividedDiskDriver.cxx @@ -22,12 +22,11 @@ #include +#include "AdvancedEngine_DividedDiskDriver.hxx" +#include "AdvancedEngine_IDividedDisk.hxx" #include "AdvancedEngine_Types.hxx" -#include -#include -#include -#include +#include "GEOM_Function.hxx" // OCCT includes #include @@ -56,28 +55,28 @@ #include #include -//@@ include required header files here @@// enum { SQUARE, HEXAGON }; + //======================================================================= //function : GetID //purpose : //======================================================================= -const Standard_GUID& GEOMImpl_DividedDiskDriver::GetID() +const Standard_GUID& AdvancedEngine_DividedDiskDriver::GetID() { static Standard_GUID aGUID("0b01da9a-c5da-11e1-8d80-78e7d1879630"); return aGUID; } //======================================================================= -//function : GEOMImpl_DividedDiskDriver +//function : AdvancedEngine_DividedDiskDriver //purpose : //======================================================================= -GEOMImpl_DividedDiskDriver::GEOMImpl_DividedDiskDriver() +AdvancedEngine_DividedDiskDriver::AdvancedEngine_DividedDiskDriver() { } @@ -85,12 +84,12 @@ GEOMImpl_DividedDiskDriver::GEOMImpl_DividedDiskDriver() //function : Execute //purpose : //======================================================================= -Standard_Integer GEOMImpl_DividedDiskDriver::Execute(TFunction_Logbook& log) const +Standard_Integer AdvancedEngine_DividedDiskDriver::Execute(TFunction_Logbook& log) const { if (Label().IsNull()) return 0; Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); - GEOMImpl_IDividedDisk aData (aFunction); + AdvancedEngine_IDividedDisk aData (aFunction); Standard_Integer aType = aFunction->GetType(); TopoDS_Shape aShape; @@ -150,7 +149,7 @@ Standard_Integer GEOMImpl_DividedDiskDriver::Execute(TFunction_Logbook& log) con //function : MakeDiskHexagon //purpose : //======================================================================= -TopoDS_Shell GEOMImpl_DividedDiskDriver::MakeDiskHexagon(double R, double Ratio) const +TopoDS_Shell AdvancedEngine_DividedDiskDriver::MakeDiskHexagon(double R, double Ratio) const { // Geometry gp_Dir ZDir(0,0,1); @@ -312,7 +311,7 @@ TopoDS_Shell GEOMImpl_DividedDiskDriver::MakeDiskHexagon(double R, double Ratio) //function : MakeDiskSquare //purpose : //======================================================================= -TopoDS_Shape GEOMImpl_DividedDiskDriver::MakeDiskSquare(double R, double Ratio) const +TopoDS_Shape AdvancedEngine_DividedDiskDriver::MakeDiskSquare(double R, double Ratio) const { // Geometry gp_Dir ZDir(0,0,1); @@ -430,7 +429,7 @@ TopoDS_Shape GEOMImpl_DividedDiskDriver::MakeDiskSquare(double R, double Ratio) //purpose : Perform shape transformation accordingly with specified // orientation //======================================================================= -TopoDS_Shape GEOMImpl_DividedDiskDriver::TransformShape(TopoDS_Shape theShape, int theOrientation) const +TopoDS_Shape AdvancedEngine_DividedDiskDriver::TransformShape(TopoDS_Shape theShape, int theOrientation) const { gp_Dir N, Vx; gp_Pnt theOrigin = gp::Origin(); @@ -467,7 +466,7 @@ TopoDS_Shape GEOMImpl_DividedDiskDriver::TransformShape(TopoDS_Shape theShape, i //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 +TopoDS_Shape AdvancedEngine_DividedDiskDriver::TransformShape(TopoDS_Shape theShape, gp_Pnt P, gp_Dir V) const { gp_Ax3 aWPlane( P, V ); return WPlaneTransform(theShape, aWPlane); @@ -478,7 +477,7 @@ TopoDS_Shape GEOMImpl_DividedDiskDriver::TransformShape(TopoDS_Shape theShape, g //purpose : Perform shape transformation accordingly with the given // Working Plane //======================================================================= -TopoDS_Shape GEOMImpl_DividedDiskDriver::WPlaneTransform(TopoDS_Shape theShape, gp_Ax3 theWPlane) const +TopoDS_Shape AdvancedEngine_DividedDiskDriver::WPlaneTransform(TopoDS_Shape theShape, gp_Ax3 theWPlane) const { gp_Trsf aTrans; aTrans.SetTransformation(theWPlane); @@ -493,14 +492,14 @@ TopoDS_Shape GEOMImpl_DividedDiskDriver::WPlaneTransform(TopoDS_Shape theShape, */ //================================================================================ -bool GEOMImpl_DividedDiskDriver:: +bool AdvancedEngine_DividedDiskDriver:: GetCreationInformation(std::string& theOperationName, std::vector& theParams) { if (Label().IsNull()) return 0; Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label()); - GEOMImpl_IDividedDisk aCI( function ); + AdvancedEngine_IDividedDisk aCI( function ); Standard_Integer aType = function->GetType(); theOperationName = "DIVIDEDDISK"; @@ -525,5 +524,5 @@ GetCreationInformation(std::string& theOperationName, return true; } -IMPLEMENT_STANDARD_HANDLE (GEOMImpl_DividedDiskDriver,GEOM_BaseDriver); -IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_DividedDiskDriver,GEOM_BaseDriver); +IMPLEMENT_STANDARD_HANDLE (AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver); +IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver); diff --git a/src/AdvancedEngine/GEOMImpl_DividedDiskDriver.hxx b/src/AdvancedEngine/AdvancedEngine_DividedDiskDriver.hxx similarity index 63% rename from src/AdvancedEngine/GEOMImpl_DividedDiskDriver.hxx rename to src/AdvancedEngine/AdvancedEngine_DividedDiskDriver.hxx index 9b774c5df..f35b2811a 100644 --- a/src/AdvancedEngine/GEOMImpl_DividedDiskDriver.hxx +++ b/src/AdvancedEngine/AdvancedEngine_DividedDiskDriver.hxx @@ -20,40 +20,40 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef _GEOMImpl_DividedDiskDriver_HXX -#define _GEOMImpl_DividedDiskDriver_HXX +#ifndef _AdvancedEngine_DividedDiskDriver_HXX +#define _AdvancedEngine_DividedDiskDriver_HXX + +#include "AdvancedEngine.hxx" + +#include "GEOM_BaseDriver.hxx" #include -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 ); +DEFINE_STANDARD_HANDLE( AdvancedEngine_DividedDiskDriver, GEOM_BaseDriver ); -class GEOMImpl_DividedDiskDriver : public GEOM_BaseDriver { +class ADVANCEDENGINE_EXPORT AdvancedEngine_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 + 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; } - Standard_EXPORT static const Standard_GUID& GetID(); - Standard_EXPORT ~GEOMImpl_DividedDiskDriver() {}; + static const Standard_GUID& GetID(); + ~AdvancedEngine_DividedDiskDriver() {}; - Standard_EXPORT virtual - bool GetCreationInformation(std::string& theOperationName, - std::vector& params); + virtual bool GetCreationInformation(std::string& theOperationName, + std::vector& params); private: TopoDS_Shape TransformShape (TopoDS_Shape aShape, int theOrientation) const; TopoDS_Shape TransformShape (TopoDS_Shape aShape, gp_Pnt P, gp_Dir V) const; @@ -61,7 +61,7 @@ private: TopoDS_Shell MakeDiskHexagon (double R, double Ratio) const; TopoDS_Shape MakeDiskSquare (double R, double Ratio) const; - DEFINE_STANDARD_RTTI( GEOMImpl_DividedDiskDriver ) + DEFINE_STANDARD_RTTI( AdvancedEngine_DividedDiskDriver ) }; -#endif // _GEOMImpl_DividedDiskDriver_HXX +#endif // _AdvancedEngine_DividedDiskDriver_HXX diff --git a/src/AdvancedEngine/GEOMImpl_IDividedDisk.hxx b/src/AdvancedEngine/AdvancedEngine_IDividedDisk.hxx similarity index 90% rename from src/AdvancedEngine/GEOMImpl_IDividedDisk.hxx rename to src/AdvancedEngine/AdvancedEngine_IDividedDisk.hxx index 88a9944d9..c0f7e9c40 100644 --- a/src/AdvancedEngine/GEOMImpl_IDividedDisk.hxx +++ b/src/AdvancedEngine/AdvancedEngine_IDividedDisk.hxx @@ -20,8 +20,8 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef _GEOMImpl_IDividedDisk_HXX_ -#define _GEOMImpl_IDividedDisk_HXX_ +#ifndef _AdvancedEngine_IDividedDisk_HXX_ +#define _AdvancedEngine_IDividedDisk_HXX_ #include "GEOM_Function.hxx" @@ -34,10 +34,10 @@ #define DIVIDEDDISK_ARG_TYPE 6 -class GEOMImpl_IDividedDisk +class AdvancedEngine_IDividedDisk { public: - GEOMImpl_IDividedDisk(Handle(GEOM_Function) theFunction): _func(theFunction) {} + 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); } @@ -61,4 +61,4 @@ private: Handle(GEOM_Function) _func; }; -#endif // _GEOMImpl_IDividedDisk_HXX_ +#endif // _AdvancedEngine_IDividedDisk_HXX_ diff --git a/src/AdvancedEngine/GEOMImpl_IAdvancedOperations.cxx b/src/AdvancedEngine/AdvancedEngine_IOperations.cxx similarity index 93% rename from src/AdvancedEngine/GEOMImpl_IAdvancedOperations.cxx rename to src/AdvancedEngine/AdvancedEngine_IOperations.cxx index 59c4d95f8..079466a57 100644 --- a/src/AdvancedEngine/GEOMImpl_IAdvancedOperations.cxx +++ b/src/AdvancedEngine/AdvancedEngine_IOperations.cxx @@ -16,10 +16,16 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File : GEOMImpl_IAdvancedOperations.cxx +// File : AdvancedEngine_IOperations.cxx // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) -#include "GEOMImpl_IAdvancedOperations.hxx" +#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 @@ -45,15 +51,7 @@ #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 -#include -/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/ #include #include @@ -116,10 +114,10 @@ * Constructor */ //============================================================================= -GEOMImpl_IAdvancedOperations::GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID) : +AdvancedEngine_IOperations::AdvancedEngine_IOperations(GEOM_Engine* theEngine, int theDocID) : GEOM_IOperations(theEngine, theDocID) { - MESSAGE("GEOMImpl_IAdvancedOperations::GEOMImpl_IAdvancedOperations"); + MESSAGE("AdvancedEngine_IOperations::AdvancedEngine_IOperations"); myBasicOperations = new GEOMImpl_IBasicOperations(GetEngine(), GetDocID()); myBooleanOperations = new GEOMImpl_IBooleanOperations(GetEngine(), GetDocID()); myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine(), GetDocID()); @@ -136,9 +134,9 @@ GEOMImpl_IAdvancedOperations::GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngin * Destructor */ //============================================================================= -GEOMImpl_IAdvancedOperations::~GEOMImpl_IAdvancedOperations() +AdvancedEngine_IOperations::~AdvancedEngine_IOperations() { - MESSAGE("GEOMImpl_IAdvancedOperations::~GEOMImpl_IAdvancedOperations"); + MESSAGE("AdvancedEngine_IOperations::~AdvancedEngine_IOperations"); delete myBasicOperations; delete myBooleanOperations; delete myShapesOperations; @@ -155,10 +153,10 @@ GEOMImpl_IAdvancedOperations::~GEOMImpl_IAdvancedOperations() * SetPosition */ //============================================================================= -gp_Trsf GEOMImpl_IAdvancedOperations::GetPositionTrsf(double theL1, double theL2, - Handle(GEOM_Object) theP1, - Handle(GEOM_Object) theP2, - Handle(GEOM_Object) theP3) +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); @@ -196,11 +194,11 @@ gp_Trsf GEOMImpl_IAdvancedOperations::GetPositionTrsf(double theL1, double theL2 * */ //============================================================================= -bool GEOMImpl_IAdvancedOperations::CheckCompatiblePosition(double& theL1, double& theL2, - Handle(GEOM_Object) theP1, - Handle(GEOM_Object) theP2, - Handle(GEOM_Object) theP3, - double theTolerance) +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())); @@ -267,12 +265,12 @@ bool GEOMImpl_IAdvancedOperations::CheckCompatiblePosition(double& theL1, double * 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) +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); @@ -807,7 +805,7 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(Handle(GEOM_Object) theShape, int * Return faces that are laying on surface. */ //============================================================================= -bool GEOMImpl_IAdvancedOperations::GetFacesOnSurf +bool AdvancedEngine_IOperations::GetFacesOnSurf (const TopoDS_Shape &theShape, const Handle_Geom_Surface& theSurface, const Standard_Real theTolerance, @@ -863,7 +861,7 @@ bool GEOMImpl_IAdvancedOperations::GetFacesOnSurf * Creates and returns conical face. */ //============================================================================= -TopoDS_Shape GEOMImpl_IAdvancedOperations::MakeConicalFace +TopoDS_Shape AdvancedEngine_IOperations::MakeConicalFace (const gp_Ax2 &theAxis, const double theRadius, const double theRadiusThin, @@ -902,7 +900,7 @@ TopoDS_Shape GEOMImpl_IAdvancedOperations::MakeConicalFace * Generate the internal group of a Pipe T-Shape */ //============================================================================= -bool GEOMImpl_IAdvancedOperations::MakeInternalGroup +bool AdvancedEngine_IOperations::MakeInternalGroup (const Handle(GEOM_Object) &theShape, const double theR1, const double theLen1, const double theR2, const double theLen2, @@ -1074,7 +1072,7 @@ bool GEOMImpl_IAdvancedOperations::MakeInternalGroup Handle(GEOM_Object) aCone = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE); Handle(GEOM_Function) aFunction = - aCone->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_BASIC); + aCone->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC); TopTools_ListIteratorOfListOfShape aFIter(aConicalFaces); Handle(GEOM_Object) aConeFromShape; @@ -1133,11 +1131,11 @@ bool GEOMImpl_IAdvancedOperations::MakeInternalGroup 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) +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); @@ -1617,9 +1615,9 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(Handle(GEOM_Object) t } // Mirror and glue faces -bool GEOMImpl_IAdvancedOperations::MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape, - double theR1, double theW1, double theL1, - double theR2, double theW2, double theL2) +bool AdvancedEngine_IOperations::MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape, + double theR1, double theW1, double theL1, + double theR2, double theW2, double theL2) { SetErrorCode(KO); @@ -1726,7 +1724,7 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapeMirrorAndGlue(Handle(GEOM_Objec //purpose : Static method. Add thiskness reduction elements at the three // open ends of the T-Shape. //======================================================================= -TopoDS_Shape GEOMImpl_IAdvancedOperations::MakePipeTShapeThicknessReduction +TopoDS_Shape AdvancedEngine_IOperations::MakePipeTShapeThicknessReduction (TopoDS_Shape theShape, double r1, double w1, double l1, double r2, double w2, double l2, @@ -1757,7 +1755,7 @@ TopoDS_Shape GEOMImpl_IAdvancedOperations::MakePipeTShapeThicknessReduction 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 + TopoDS_Shape aReductionLeft = AdvancedEngine_IOperations::MakeThicknessReduction (anAxesLeft, r1, w1, rL, wL, ltransL, lthinL, fuseReductions); if (fuseReductions) { @@ -1780,7 +1778,7 @@ TopoDS_Shape GEOMImpl_IAdvancedOperations::MakePipeTShapeThicknessReduction 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 + TopoDS_Shape aReductionRight = AdvancedEngine_IOperations::MakeThicknessReduction (anAxesRight, r1, w1, rR, wR, ltransR, lthinR, fuseReductions); if (fuseReductions) { @@ -1803,7 +1801,7 @@ TopoDS_Shape GEOMImpl_IAdvancedOperations::MakePipeTShapeThicknessReduction 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 + TopoDS_Shape aReductionInci = AdvancedEngine_IOperations::MakeThicknessReduction (anAxesInci, r2, w2, rI, wI, ltransI, lthinI, fuseReductions); if (fuseReductions) { @@ -1848,11 +1846,11 @@ TopoDS_Shape GEOMImpl_IAdvancedOperations::MakePipeTShapeThicknessReduction //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) +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) { @@ -1956,26 +1954,26 @@ TopoDS_Shape GEOMImpl_IAdvancedOperations::MakeThicknessReduction (gp_Ax2 theAxe */ //============================================================================= 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) + 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("GEOMImpl_IAdvancedOperations::MakePipeTShape"); + 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(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_BASIC); + 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() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL; + if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL; - GEOMImpl_IPipeTShape aData (aFunction); + AdvancedEngine_IPipeTShape aData (aFunction); aData.SetR1(theR1); aData.SetW1(theW1); @@ -2110,7 +2108,7 @@ Handle(TColStd_HSequenceOfTransient) */ //============================================================================= Handle(TColStd_HSequenceOfTransient) -GEOMImpl_IAdvancedOperations::MakePipeTShapeWithPosition +AdvancedEngine_IOperations::MakePipeTShapeWithPosition (double theR1, double theW1, double theL1, double theR2, double theW2, double theL2, double theRL, double theWL, double theLtransL, double theLthinL, @@ -2128,18 +2126,18 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeWithPosition // TSHAPE CODE ///////////////// //Add a new shape function with parameters - Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_PipeTShapeDriver::GetID(), TSHAPE_BASIC); + 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() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL; + if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL; // Check new position if (!CheckCompatiblePosition(theL1, theL2, theP1, theP2, theP3, 0.01)) { return NULL; } - GEOMImpl_IPipeTShape aData(aFunction); + AdvancedEngine_IPipeTShape aData(aFunction); aData.SetR1(theR1); aData.SetW1(theW1); @@ -2282,7 +2280,7 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeWithPosition */ //============================================================================= Handle(TColStd_HSequenceOfTransient) -GEOMImpl_IAdvancedOperations::MakePipeTShapeChamfer +AdvancedEngine_IOperations::MakePipeTShapeChamfer (double theR1, double theW1, double theL1, double theR2, double theW2, double theL2, double theRL, double theWL, double theLtransL, double theLthinL, @@ -2295,13 +2293,13 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeChamfer //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); + 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() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL; + if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL; - GEOMImpl_IPipeTShape aData(aFunction); + AdvancedEngine_IPipeTShape aData(aFunction); aData.SetR1(theR1); aData.SetW1(theW1); @@ -2513,7 +2511,7 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeChamfer */ //============================================================================= Handle(TColStd_HSequenceOfTransient) -GEOMImpl_IAdvancedOperations::MakePipeTShapeChamferWithPosition +AdvancedEngine_IOperations::MakePipeTShapeChamferWithPosition (double theR1, double theW1, double theL1, double theR2, double theW2, double theL2, double theRL, double theWL, double theLtransL, double theLthinL, @@ -2529,18 +2527,18 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeChamferWithPosition //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); + 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() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL; + if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL; // Check new position if (!CheckCompatiblePosition(theL1, theL2, theP1, theP2, theP3, 0.01)) { return NULL; } - GEOMImpl_IPipeTShape aData(aFunction); + AdvancedEngine_IPipeTShape aData(aFunction); aData.SetR1(theR1); aData.SetW1(theW1); @@ -2752,7 +2750,7 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeChamferWithPosition */ //============================================================================= Handle(TColStd_HSequenceOfTransient) -GEOMImpl_IAdvancedOperations::MakePipeTShapeFillet +AdvancedEngine_IOperations::MakePipeTShapeFillet (double theR1, double theW1, double theL1, double theR2, double theW2, double theL2, double theRL, double theWL, double theLtransL, double theLthinL, @@ -2764,13 +2762,13 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeFillet //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); + 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() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL; + if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL; - GEOMImpl_IPipeTShape aData(aFunction); + AdvancedEngine_IPipeTShape aData(aFunction); aData.SetR1(theR1); aData.SetW1(theW1); @@ -2994,7 +2992,7 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeFillet */ //============================================================================= Handle(TColStd_HSequenceOfTransient) -GEOMImpl_IAdvancedOperations::MakePipeTShapeFilletWithPosition +AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition (double theR1, double theW1, double theL1, double theR2, double theW2, double theL2, double theRL, double theWL, double theLtransL, double theLthinL, @@ -3009,18 +3007,18 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeFilletWithPosition //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); + 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() != GEOMImpl_PipeTShapeDriver::GetID()) return NULL; + if (aFunction->GetDriverGUID() != AdvancedEngine_PipeTShapeDriver::GetID()) return NULL; // Check new position if (!CheckCompatiblePosition(theL1, theL2, theP1, theP2, theP3, 0.01)) { return NULL; } - GEOMImpl_IPipeTShape aData(aFunction); + AdvancedEngine_IPipeTShape aData(aFunction); aData.SetR1(theR1); aData.SetW1(theW1); @@ -3238,8 +3236,8 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeFilletWithPosition * \return New GEOM_Object, containing the created shape. */ //============================================================================= -Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDisk (double theR, double theRatio, - int theOrientation, int thePattern) +Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDisk (double theR, double theRatio, + int theOrientation, int thePattern) { SetErrorCode(KO); @@ -3254,13 +3252,13 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDisk (double theR, 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); + 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() != GEOMImpl_DividedDiskDriver::GetID()) return NULL; + if (aFunction->GetDriverGUID() != AdvancedEngine_DividedDiskDriver::GetID()) return NULL; - GEOMImpl_IDividedDisk aData (aFunction); + AdvancedEngine_IDividedDisk aData (aFunction); aData.SetR(theR); aData.SetRatio(theRatio); @@ -3312,11 +3310,11 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDisk (double theR, * \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) +Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDiskPntVecR (Handle(GEOM_Object) thePnt, + Handle(GEOM_Object) theVec, + double theR, + double theRatio, + int thePattern) { SetErrorCode(KO); @@ -3324,13 +3322,13 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDiskPntVecR (Handle 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); + 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() != GEOMImpl_DividedDiskDriver::GetID()) return NULL; + if (aFunction->GetDriverGUID() != AdvancedEngine_DividedDiskDriver::GetID()) return NULL; - GEOMImpl_IDividedDisk aData (aFunction); + AdvancedEngine_IDividedDisk aData (aFunction); Handle(GEOM_Function) aRefPnt = thePnt->GetLastFunction(); Handle(GEOM_Function) aRefVec = theVec->GetLastFunction(); @@ -3389,9 +3387,9 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDiskPntVecR (Handle * \return New GEOM_Object, containing the created shape. */ //============================================================================= -Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedCylinder (double theR, - double theH, - int thePattern) +Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedCylinder (double theR, + double theH, + int thePattern) { SetErrorCode(KO); @@ -3436,10 +3434,10 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedCylinder (double th * \return New GEOM_Object, containing the created shape. */ //============================================================================= -Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeSmoothingSurface (std::list thelPoints, - int theNbMax, - int theDegMax, - double theDMax) +Handle(GEOM_Object) AdvancedEngine_IOperations::MakeSmoothingSurface (std::list thelPoints, + int theNbMax, + int theDegMax, + double theDMax) { SetErrorCode(KO); @@ -3447,13 +3445,13 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeSmoothingSurface (std::lis 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); + 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() != GEOMImpl_SmoothingSurfaceDriver::GetID()) return NULL; + if (aFunction->GetDriverGUID() != AdvancedEngine_SmoothingSurfaceDriver::GetID()) return NULL; - GEOMImpl_ISmoothingSurface aData (aFunction); + AdvancedEngine_ISmoothingSurface aData (aFunction); int aLen = thelPoints.size(); aData.SetLength(aLen); @@ -3505,4 +3503,3 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeSmoothingSurface (std::lis 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/AdvancedEngine_IOperations.hxx similarity index 81% rename from src/AdvancedEngine/GEOMImpl_IAdvancedOperations.hxx rename to src/AdvancedEngine/AdvancedEngine_IOperations.hxx index 8f59a9590..939dd0171 100644 --- a/src/AdvancedEngine/GEOMImpl_IAdvancedOperations.hxx +++ b/src/AdvancedEngine/AdvancedEngine_IOperations.hxx @@ -16,13 +16,14 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File : GEOMImpl_IAdvancedOperations.hxx +// File : AdvancedEngine_IOperations.hxx // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) -#ifndef _GEOMImpl_IAdvancedOperations_HXX_ -#define _GEOMImpl_IAdvancedOperations_HXX_ +#ifndef _AdvancedEngine_IOperations_HXX_ +#define _AdvancedEngine_IOperations_HXX_ + +#include "AdvancedEngine.hxx" -#include #include "GEOM_IOperations.hxx" #include "GEOM_Engine.hxx" #include "GEOM_Object.hxx" @@ -42,7 +43,8 @@ class GEOMImpl_IGroupOperations; class Handle_Geom_Surface; class TopTools_ListOfShape; -class GEOMImpl_IAdvancedOperations: public GEOM_IOperations { +class ADVANCEDENGINE_EXPORT AdvancedEngine_IOperations: public GEOM_IOperations +{ private: bool MakePipeTShapePartition(Handle(GEOM_Object) theShape, double theR1, double theW1, double theL1, @@ -129,7 +131,7 @@ public: * false to obtain parts, useful for hexameshing) * \retval TopoDS_Shape - Resulting shape */ - Standard_EXPORT static TopoDS_Shape MakePipeTShapeThicknessReduction + static TopoDS_Shape MakePipeTShapeThicknessReduction (TopoDS_Shape theShape, double r1, double w1, double l1, double r2, double w2, double l2, @@ -155,17 +157,17 @@ public: * 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); - + 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(); + AdvancedEngine_IOperations(GEOM_Engine* theEngine, int theDocID); + ~AdvancedEngine_IOperations(); - Standard_EXPORT Handle(TColStd_HSequenceOfTransient) + Handle(TColStd_HSequenceOfTransient) MakePipeTShape(double theR1, double theW1, double theL1, double theR2, double theW2, double theL2, double theRL, double theWL, double theLtransL, double theLthinL, @@ -173,7 +175,7 @@ public: double theRI, double theWI, double theLtransI, double theLthinI, bool theHexMesh = true); - Standard_EXPORT Handle(TColStd_HSequenceOfTransient) + Handle(TColStd_HSequenceOfTransient) MakePipeTShapeWithPosition(double theR1, double theW1, double theL1, double theR2, double theW2, double theL2, double theRL, double theWL, double theLtransL, double theLthinL, @@ -184,7 +186,7 @@ public: Handle(GEOM_Object) P2 = 0, Handle(GEOM_Object) P3 = 0); - Standard_EXPORT Handle(TColStd_HSequenceOfTransient) + Handle(TColStd_HSequenceOfTransient) MakePipeTShapeChamfer(double theR1, double theW1, double theL1, double theR2, double theW2, double theL2, double theRL, double theWL, double theLtransL, double theLthinL, @@ -193,7 +195,7 @@ public: double theH, double theW, bool theHexMesh = true); - Standard_EXPORT Handle(TColStd_HSequenceOfTransient) + Handle(TColStd_HSequenceOfTransient) MakePipeTShapeChamferWithPosition(double theR1, double theW1, double theL1, double theR2, double theW2, double theL2, double theH, double theW, @@ -205,7 +207,7 @@ public: Handle(GEOM_Object) P2 = 0, Handle(GEOM_Object) P3 = 0); - Standard_EXPORT Handle(TColStd_HSequenceOfTransient) + Handle(TColStd_HSequenceOfTransient) MakePipeTShapeFillet(double theR1, double theW1, double theL1, double theR2, double theW2, double theL2, double theRL, double theWL, double theLtransL, double theLthinL, @@ -213,7 +215,7 @@ public: double theRI, double theWI, double theLtransI, double theLthinI, double theRF, bool theHexMesh = true); - Standard_EXPORT Handle(TColStd_HSequenceOfTransient) + Handle(TColStd_HSequenceOfTransient) MakePipeTShapeFilletWithPosition(double theR1, double theW1, double theL1, double theR2, double theW2, double theL2, double theRL, double theWL, double theLtransL, double theLthinL, @@ -224,22 +226,22 @@ public: 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); + 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); - Standard_EXPORT Handle(GEOM_Object) MakeDividedCylinder (double theR, - double theH, - int thePattern); + Handle(GEOM_Object) MakeDividedCylinder (double theR, + double theH, + int thePattern); - Standard_EXPORT Handle(GEOM_Object) MakeSmoothingSurface (std::list thelPoints, - int theNbMax, - int theDegMax, - double theDMax); - /*@@ insert new functions before this line @@ do not remove this line @@*/ + Handle(GEOM_Object) MakeSmoothingSurface (std::list thelPoints, + int theNbMax, + int theDegMax, + double theDMax); }; + #endif diff --git a/src/AdvancedEngine/GEOM_IAdvancedOperations_i.cc b/src/AdvancedEngine/AdvancedEngine_IOperations_i.cc similarity index 92% rename from src/AdvancedEngine/GEOM_IAdvancedOperations_i.cc rename to src/AdvancedEngine/AdvancedEngine_IOperations_i.cc index 7ff12c39d..5afb75b59 100644 --- a/src/AdvancedEngine/GEOM_IAdvancedOperations_i.cc +++ b/src/AdvancedEngine/AdvancedEngine_IOperations_i.cc @@ -22,7 +22,8 @@ #include -#include "GEOM_IAdvancedOperations_i.hh" +#include "AdvancedEngine_IOperations_i.hh" +#include "AdvancedEngine_IOperations.hxx" #include #include @@ -36,10 +37,10 @@ * constructor: */ //============================================================================= -GEOM_IAdvancedOperations_i::GEOM_IAdvancedOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOMImpl_IAdvancedOperations* theImpl) +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("GEOM_IAdvancedOperations_i::GEOM_IAdvancedOperations_i"); + MESSAGE("AdvancedEngine_IOperations_i::AdvancedEngine_IOperations_i"); } //============================================================================= @@ -47,9 +48,9 @@ GEOM_IAdvancedOperations_i::GEOM_IAdvancedOperations_i(PortableServer::POA_ptr t * destructor */ //============================================================================= -GEOM_IAdvancedOperations_i::~GEOM_IAdvancedOperations_i() +AdvancedEngine_IOperations_i::~AdvancedEngine_IOperations_i() { - MESSAGE("GEOM_IAdvancedOperations_i::~GEOM_IAdvancedOperations_i"); + MESSAGE("AdvancedEngine_IOperations_i::~AdvancedEngine_IOperations_i"); } //============================================================================= @@ -68,7 +69,7 @@ GEOM_IAdvancedOperations_i::~GEOM_IAdvancedOperations_i() * \return List of GEOM_Objects, containing the created shape and propagation groups. */ //============================================================================= -GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape +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) @@ -114,7 +115,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape * \return List of GEOM_Objects, containing the created shape and propagation groups. */ //============================================================================= -GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition +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, @@ -166,7 +167,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition * \return List of GEOM_Objects, containing the created shape and propagation groups. */ //============================================================================= -GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer +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) @@ -215,7 +216,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer * \return List of GEOM_Objects, containing the created shape and propagation groups. */ //============================================================================= -GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition +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, @@ -265,7 +266,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition * \return List of GEOM_Objects, containing the created shape and propagation groups. */ //============================================================================= -GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet +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) @@ -313,7 +314,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet * \return List of GEOM_Objects, containing the created shape and propagation groups. */ //============================================================================= -GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition +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, @@ -361,7 +362,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition * \return List of GEOM_Objects, containing the created shape and propagation groups. */ //============================================================================= -GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTR +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, @@ -412,7 +413,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTR * \return List of GEOM_Objects, containing the created shape and propagation groups. */ //============================================================================= -GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRWithPosition +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, @@ -469,7 +470,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRWithPosition * \return List of GEOM_Objects, containing the created shape and propagation groups. */ //============================================================================= -GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRChamfer +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, @@ -523,7 +524,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRChamfer * \return List of GEOM_Objects, containing the created shape and propagation groups. */ //============================================================================= -GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRChamferWithPosition +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, @@ -578,7 +579,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRChamferWithPosition * \return List of GEOM_Objects, containing the created shape and propagation groups. */ //============================================================================= -GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRFillet +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, @@ -631,7 +632,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRFillet * \return List of GEOM_Objects, containing the created shape and propagation groups. */ //============================================================================= -GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRFilletWithPosition +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, @@ -677,10 +678,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRFilletWithPosition * \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_ptr AdvancedEngine_IOperations_i::MakeDividedDisk (CORBA::Double theR, + CORBA::Double theRatio, + CORBA::Short theOrientation, + GEOM::pattern thePattern) { GEOM::GEOM_Object_var aGEOMObject; @@ -700,11 +701,11 @@ GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDisk (CORBA::Double * 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_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; @@ -734,9 +735,9 @@ GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDiskPntVecR (GEOM:: * \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_ptr AdvancedEngine_IOperations_i::MakeDividedCylinder (CORBA::Double theR, + CORBA::Double theH, + GEOM::pattern thePattern) { GEOM::GEOM_Object_var aGEOMObject; @@ -761,10 +762,10 @@ GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedCylinder (CORBA::Do * \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_ptr AdvancedEngine_IOperations_i::MakeSmoothingSurface (const GEOM::ListOfGO& thelPoints, + CORBA::Long theNbMax, + CORBA::Long theDegMax, + CORBA::Double theDMax) { GEOM::GEOM_Object_var aGEOMObject; @@ -789,4 +790,8 @@ GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeSmoothingSurface (const GE return GetObject(anObject); } -/*@@ insert new functions before this line @@ do not remove this line @@*/ +AdvancedEngine_IOperations* AdvancedEngine_IOperations_i::GetOperations() +{ + return (AdvancedEngine_IOperations*)GetImpl(); +} + diff --git a/src/AdvancedEngine/GEOM_IAdvancedOperations_i.hh b/src/AdvancedEngine/AdvancedEngine_IOperations_i.hh similarity index 91% rename from src/AdvancedEngine/GEOM_IAdvancedOperations_i.hh rename to src/AdvancedEngine/AdvancedEngine_IOperations_i.hh index 7f700132d..0711b6ab0 100644 --- a/src/AdvancedEngine/GEOM_IAdvancedOperations_i.hh +++ b/src/AdvancedEngine/AdvancedEngine_IOperations_i.hh @@ -17,31 +17,31 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File : GEOM_IAdvancedOperations.hh +// File : AdvancedEngine_IOperations_i.hh // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) -#ifndef _GEOM_IAdvancedOperations_i_HeaderFile -#define _GEOM_IAdvancedOperations_i_HeaderFile +#ifndef _AdvancedEngine_IOperations_i_HeaderFile +#define _AdvancedEngine_IOperations_i_HeaderFile -#include "GEOMImpl_Gen.hxx" +#include "AdvancedEngine.hxx" -#include - -#include CORBA_SERVER_HEADER(GEOM_Gen) #include "GEOM_IOperations_i.hh" #include "GEOM_Object_i.hh" -#include "GEOM_AdvancedEngine.hxx" -#include "GEOMImpl_IAdvancedOperations.hxx" +#include +#include CORBA_SERVER_HEADER(GEOM_Gen) +#include CORBA_SERVER_HEADER(AdvancedGEOM) + +class AdvancedEngine_IOperations; -class ADVANCEDENGINE_EXPORT GEOM_IAdvancedOperations_i : - public virtual POA_GEOM::GEOM_IAdvancedOperations, +class ADVANCEDENGINE_EXPORT AdvancedEngine_IOperations_i : + public virtual POA_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(); + 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, @@ -131,10 +131,8 @@ class ADVANCEDENGINE_EXPORT GEOM_IAdvancedOperations_i : 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(); } + AdvancedEngine_IOperations* GetOperations(); }; #endif diff --git a/src/AdvancedEngine/GEOMImpl_IPipeTShape.hxx b/src/AdvancedEngine/AdvancedEngine_IPipeTShape.hxx similarity index 93% rename from src/AdvancedEngine/GEOMImpl_IPipeTShape.hxx rename to src/AdvancedEngine/AdvancedEngine_IPipeTShape.hxx index 430856921..b4a26fe9a 100644 --- a/src/AdvancedEngine/GEOMImpl_IPipeTShape.hxx +++ b/src/AdvancedEngine/AdvancedEngine_IPipeTShape.hxx @@ -17,17 +17,17 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef _GEOMImpl_IPipeTShape_HXX_ -#define _GEOMImpl_IPipeTShape_HXX_ +#ifndef _AdvancedEngine_IPipeTShape_HXX_ +#define _AdvancedEngine_IPipeTShape_HXX_ #include "GEOM_Function.hxx" #include -class GEOMImpl_IPipeTShape +class AdvancedEngine_IPipeTShape { public: - GEOMImpl_IPipeTShape(Handle(GEOM_Function) theFunction): _func(theFunction) {} + 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); } @@ -100,4 +100,4 @@ private: Handle(GEOM_Function) _func; }; -#endif // _GEOMImpl_IPipeTShape_HXX_ +#endif // _AdvancedEngine_IPipeTShape_HXX_ diff --git a/src/AdvancedEngine/GEOMImpl_ISmoothingSurface.hxx b/src/AdvancedEngine/AdvancedEngine_ISmoothingSurface.hxx similarity index 89% rename from src/AdvancedEngine/GEOMImpl_ISmoothingSurface.hxx rename to src/AdvancedEngine/AdvancedEngine_ISmoothingSurface.hxx index ec3cf1a24..3ee9bde3e 100644 --- a/src/AdvancedEngine/GEOMImpl_ISmoothingSurface.hxx +++ b/src/AdvancedEngine/AdvancedEngine_ISmoothingSurface.hxx @@ -20,8 +20,8 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef _GEOMImpl_ISmoothingSurface_HXX_ -#define _GEOMImpl_ISmoothingSurface_HXX_ +#ifndef _AdvancedEngine_ISmoothingSurface_HXX_ +#define _AdvancedEngine_ISmoothingSurface_HXX_ #include "GEOM_Function.hxx" @@ -31,10 +31,10 @@ #define SMOOTHINGSURFACE_ARG_DEG_MAX 4 #define SMOOTHINGSURFACE_ARG_D_MAX 5 -class GEOMImpl_ISmoothingSurface +class AdvancedEngine_ISmoothingSurface { public: - GEOMImpl_ISmoothingSurface(Handle(GEOM_Function) theFunction): _func(theFunction) {} + 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); } @@ -55,4 +55,4 @@ private: Handle(GEOM_Function) _func; }; -#endif // _GEOMImpl_ISmoothingSurface_HXX_ +#endif // _AdvancedEngine_ISmoothingSurface_HXX_ diff --git a/src/AdvancedEngine/AdvancedEngine_OperationsCreator.cc b/src/AdvancedEngine/AdvancedEngine_OperationsCreator.cc deleted file mode 100644 index cf9bf8cea..000000000 --- a/src/AdvancedEngine/AdvancedEngine_OperationsCreator.cc +++ /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 -#include -// #include -#include -/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/ - -#include -#include - -#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 index 000000000..4ca0a05c5 --- /dev/null +++ b/src/AdvancedEngine/AdvancedEngine_OperationsCreator.cxx @@ -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 +#include +#include + +#include +#include + +#include "Utils_ExceptHandlers.hxx" +#include "utilities.h" + +std::map 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.hxx similarity index 72% rename from src/AdvancedEngine/AdvancedEngine_OperationsCreator.hh rename to src/AdvancedEngine/AdvancedEngine_OperationsCreator.hxx index 261721eee..1264035ca 100755 --- a/src/AdvancedEngine/AdvancedEngine_OperationsCreator.hh +++ b/src/AdvancedEngine/AdvancedEngine_OperationsCreator.hxx @@ -23,30 +23,33 @@ #ifndef _GEOM_ADVANCEDENGINE_OPERATIONSCREATOR_HXX_ #define _GEOM_ADVANCEDENGINE_OPERATIONSCREATOR_HXX_ -#include "GEOM_AdvancedEngine.hxx" +#include "AdvancedEngine.hxx" #include "GEOM_Gen_i.hh" -#include "GEOMImpl_IAdvancedOperations.hxx" - #include +class AdvancedEngine_IOperations; + //===================================================================== // 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 _mapOfOperations; +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 _mapOfOperations; }; #endif diff --git a/src/AdvancedEngine/GEOMImpl_PipeTShapeDriver.cxx b/src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.cxx similarity index 93% rename from src/AdvancedEngine/GEOMImpl_PipeTShapeDriver.cxx rename to src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.cxx index 613806b16..7551b43f7 100644 --- a/src/AdvancedEngine/GEOMImpl_PipeTShapeDriver.cxx +++ b/src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.cxx @@ -17,36 +17,29 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include - -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include - -#include -#include - -// Partition includes -#include -#include - +#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 #include #include #include #include #include - +#include +#include #include #include #include @@ -69,25 +62,22 @@ #include #include -//@@ include required header files here @@// - -#include "AdvancedEngine_Types.hxx" //======================================================================= //function : GetID //purpose : //======================================================================= -const Standard_GUID& GEOMImpl_PipeTShapeDriver::GetID() +const Standard_GUID& AdvancedEngine_PipeTShapeDriver::GetID() { static Standard_GUID aGUID("1C3A0F3F-729D-4E83-8232-78E74FC5637C"); return aGUID; } //======================================================================= -//function : GEOMImpl_PipeTShapeDriver +//function : AdvancedEngine_PipeTShapeDriver //purpose : //======================================================================= -GEOMImpl_PipeTShapeDriver::GEOMImpl_PipeTShapeDriver() +AdvancedEngine_PipeTShapeDriver::AdvancedEngine_PipeTShapeDriver() { } @@ -103,7 +93,7 @@ GEOMImpl_PipeTShapeDriver::GEOMImpl_PipeTShapeDriver() */ //======================================================================= Handle(TColStd_HSequenceOfInteger) -GEOMImpl_PipeTShapeDriver::GetShapesOnBoxIDs(const TopoDS_Shape& aBox, +AdvancedEngine_PipeTShapeDriver::GetShapesOnBoxIDs(const TopoDS_Shape& aBox, const TopoDS_Shape& aShape, const Standard_Integer theShapeType, GEOMAlgo_State theState) const @@ -176,7 +166,7 @@ GEOMImpl_PipeTShapeDriver::GetShapesOnBoxIDs(const TopoDS_Shape& aBox, */ //======================================================================= Handle(TColStd_HSequenceOfInteger) - GEOMImpl_PipeTShapeDriver::GetShapesOnSurfaceIDs(const Handle(Geom_Surface)& theSurface, + AdvancedEngine_PipeTShapeDriver::GetShapesOnSurfaceIDs(const Handle(Geom_Surface)& theSurface, const TopoDS_Shape& theShape, TopAbs_ShapeEnum theShapeType, GEOMAlgo_State theState) const @@ -255,7 +245,7 @@ Handle(TColStd_HSequenceOfInteger) //purpose : return the common shapes between 2 cylindrical surfaces // along OX and OZ //======================================================================= -void GEOMImpl_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& theShape, +void AdvancedEngine_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& theShape, TopAbs_ShapeEnum theShapeType, double r1, double r2, @@ -308,7 +298,7 @@ void GEOMImpl_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& t //function : MakePipeTShape //purpose : //======================================================================= -TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape (const double r1, const double w1, const double l1, +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; @@ -358,7 +348,7 @@ TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape (const double r1, const d //function : MakeQuarterPipeTShape //purpose : //======================================================================= -TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakeQuarterPipeTShape (const double r1, const double w1, const double l1, +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); @@ -390,12 +380,12 @@ TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakeQuarterPipeTShape (const double r1, //function : Execute //purpose : //======================================================================= -Standard_Integer GEOMImpl_PipeTShapeDriver::Execute (TFunction_Logbook& log) const +Standard_Integer AdvancedEngine_PipeTShapeDriver::Execute (TFunction_Logbook& log) const { if (Label().IsNull()) return 0; Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); - GEOMImpl_IPipeTShape aData (aFunction); + AdvancedEngine_IPipeTShape aData (aFunction); Standard_Integer aType = aFunction->GetType(); TopoDS_Shape aShape, Te4, Te4Part; @@ -624,14 +614,14 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute (TFunction_Logbook& log) con */ //================================================================================ -bool GEOMImpl_PipeTShapeDriver:: +bool AdvancedEngine_PipeTShapeDriver:: GetCreationInformation(std::string& theOperationName, std::vector& theParams) { if (Label().IsNull()) return 0; Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label()); - GEOMImpl_IPipeTShape aCI( function ); + AdvancedEngine_IPipeTShape aCI( function ); Standard_Integer aType = function->GetType(); theOperationName = "PIPETSHAPE"; @@ -674,5 +664,5 @@ GetCreationInformation(std::string& theOperationName, return true; } -IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PipeTShapeDriver,GEOM_BaseDriver); -IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PipeTShapeDriver,GEOM_BaseDriver); +IMPLEMENT_STANDARD_HANDLE (AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver); +IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver); diff --git a/src/AdvancedEngine/GEOMImpl_PipeTShapeDriver.hxx b/src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.hxx similarity index 79% rename from src/AdvancedEngine/GEOMImpl_PipeTShapeDriver.hxx rename to src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.hxx index 3bcdd5574..cba5d1492 100644 --- a/src/AdvancedEngine/GEOMImpl_PipeTShapeDriver.hxx +++ b/src/AdvancedEngine/AdvancedEngine_PipeTShapeDriver.hxx @@ -17,51 +17,41 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef _GEOMImpl_PipeTShapeDriver_HXX -#define _GEOMImpl_PipeTShapeDriver_HXX +#ifndef _AdvancedEngine_PipeTShapeDriver_HXX +#define _AdvancedEngine_PipeTShapeDriver_HXX -#include +#include "AdvancedEngine.hxx" +#include "GEOM_BaseDriver.hxx" #include "GEOMAlgo_State.hxx" #include -#include #include -#include #include -#include - -#include - -class Handle_Standard_Type; -class GEOMImpl_PipeTShapeDriver; - - - -#include "GEOM_BaseDriver.hxx" +#include -DEFINE_STANDARD_HANDLE( GEOMImpl_PipeTShapeDriver, GEOM_BaseDriver ); +DEFINE_STANDARD_HANDLE( AdvancedEngine_PipeTShapeDriver, GEOM_BaseDriver ); -class GEOMImpl_PipeTShapeDriver : public GEOM_BaseDriver { +class ADVANCEDENGINE_EXPORT AdvancedEngine_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 + 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; } - Standard_EXPORT static const Standard_GUID& GetID(); - Standard_EXPORT ~GEOMImpl_PipeTShapeDriver() {}; + static const Standard_GUID& GetID(); + ~AdvancedEngine_PipeTShapeDriver() {}; - Standard_EXPORT virtual - bool GetCreationInformation(std::string& theOperationName, - std::vector& params); + virtual bool GetCreationInformation(std::string& theOperationName, + std::vector& params); // Type management // -DEFINE_STANDARD_RTTI( GEOMImpl_PipeTShapeDriver ) +DEFINE_STANDARD_RTTI( AdvancedEngine_PipeTShapeDriver ) private: @@ -131,4 +121,4 @@ private: }; -#endif // _GEOMImpl_PipeTShapeDriver_HXX +#endif // _AdvancedEngine_PipeTShapeDriver_HXX diff --git a/src/AdvancedEngine/GEOMImpl_SmoothingSurfaceDriver.cxx b/src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.cxx similarity index 90% rename from src/AdvancedEngine/GEOMImpl_SmoothingSurfaceDriver.cxx rename to src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.cxx index 2b0345522..19fef9c52 100644 --- a/src/AdvancedEngine/GEOMImpl_SmoothingSurfaceDriver.cxx +++ b/src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.cxx @@ -19,17 +19,15 @@ #include +#include "AdvancedEngine_SmoothingSurfaceDriver.hxx" +#include "AdvancedEngine_ISmoothingSurface.hxx" #include "AdvancedEngine_Types.hxx" -#include -#include -#include -#include +#include "GEOM_Function.hxx" #include #include -//@@ include required header files here @@// #include #include #include @@ -76,21 +74,22 @@ #include #include + //======================================================================= //function : GetID //purpose : //======================================================================= -const Standard_GUID& GEOMImpl_SmoothingSurfaceDriver::GetID() +const Standard_GUID& AdvancedEngine_SmoothingSurfaceDriver::GetID() { static Standard_GUID aGUID("1C3A0F30-729D-4E83-8232-78E74FC5637C"); return aGUID; } //======================================================================= -//function : GEOMImpl_SmoothingSurfaceDriver +//function : AdvancedEngine_SmoothingSurfaceDriver //purpose : //======================================================================= -GEOMImpl_SmoothingSurfaceDriver::GEOMImpl_SmoothingSurfaceDriver() +AdvancedEngine_SmoothingSurfaceDriver::AdvancedEngine_SmoothingSurfaceDriver() { } @@ -98,7 +97,7 @@ GEOMImpl_SmoothingSurfaceDriver::GEOMImpl_SmoothingSurfaceDriver() //function : MakeSmoothingSurfaceUnClosed //purpose : //======================================================================= -TopoDS_Shape GEOMImpl_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed +TopoDS_Shape AdvancedEngine_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed (const Handle_TColgp_HArray1OfPnt &theListOfPoints, const Standard_Integer theNbMax, const Standard_Integer theDegMax, @@ -166,7 +165,7 @@ TopoDS_Shape GEOMImpl_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed //function : Execute //purpose : //======================================================================= -Standard_Integer GEOMImpl_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log) const +Standard_Integer AdvancedEngine_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log) const { if (Label().IsNull()) return 0; Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); @@ -177,7 +176,7 @@ Standard_Integer GEOMImpl_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log if (aType != SMOOTHINGSURFACE_LPOINTS) return 0; // cout << "Youhou : " << aType << endl; - GEOMImpl_ISmoothingSurface aData (aFunction); + AdvancedEngine_ISmoothingSurface aData (aFunction); // Fill the map of vertices. Standard_Integer aNbShapes = aData.GetLength(); @@ -217,7 +216,7 @@ Standard_Integer GEOMImpl_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log const Standard_Real aDMax = aData.GetDMax(); // Make smoothing surface. - TopoDS_Shape aShape = GEOMImpl_SmoothingSurfaceDriver:: + TopoDS_Shape aShape = AdvancedEngine_SmoothingSurfaceDriver:: MakeSmoothingSurfaceUnClosed(anArrayofPnt, aNbMax, aDegMax, aDMax); if (aShape.IsNull()) return 0; @@ -235,14 +234,14 @@ Standard_Integer GEOMImpl_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log */ //================================================================================ -bool GEOMImpl_SmoothingSurfaceDriver:: +bool AdvancedEngine_SmoothingSurfaceDriver:: GetCreationInformation(std::string& theOperationName, std::vector& theParams) { if (Label().IsNull()) return 0; Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label()); - GEOMImpl_ISmoothingSurface aCI( function ); + AdvancedEngine_ISmoothingSurface aCI( function ); Standard_Integer aType = function->GetType(); theOperationName = "SMOOTHINGSURFACE"; @@ -272,5 +271,5 @@ GetCreationInformation(std::string& theOperationName, return true; } -IMPLEMENT_STANDARD_HANDLE (GEOMImpl_SmoothingSurfaceDriver,GEOM_BaseDriver); -IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SmoothingSurfaceDriver,GEOM_BaseDriver); +IMPLEMENT_STANDARD_HANDLE (AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver); +IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver); diff --git a/src/AdvancedEngine/GEOMImpl_SmoothingSurfaceDriver.hxx b/src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.hxx similarity index 55% rename from src/AdvancedEngine/GEOMImpl_SmoothingSurfaceDriver.hxx rename to src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.hxx index 6a22f65dc..fd5f28bec 100644 --- a/src/AdvancedEngine/GEOMImpl_SmoothingSurfaceDriver.hxx +++ b/src/AdvancedEngine/AdvancedEngine_SmoothingSurfaceDriver.hxx @@ -17,50 +17,39 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef _GEOMImpl_SmoothingSurfaceDriver_HXX -#define _GEOMImpl_SmoothingSurfaceDriver_HXX +#ifndef _AdvancedEngine_SmoothingSurfaceDriver_HXX +#define _AdvancedEngine_SmoothingSurfaceDriver_HXX + +#include "AdvancedEngine.hxx" + +#include "GEOM_BaseDriver.hxx" -#ifndef _TFunction_Driver_HeaderFile -#include -#endif -#ifndef _TFunction_Logbook_HeaderFile #include -#endif -#ifndef _Standard_CString_HeaderFile -#include -#endif #include #include -class Handle_Standard_Type; -class GEOMImpl_SmoothingSurfaceDriver; - - - -#include "GEOM_BaseDriver.hxx" - -DEFINE_STANDARD_HANDLE( GEOMImpl_SmoothingSurfaceDriver, GEOM_BaseDriver ); +DEFINE_STANDARD_HANDLE( AdvancedEngine_SmoothingSurfaceDriver, GEOM_BaseDriver ); -class GEOMImpl_SmoothingSurfaceDriver : public GEOM_BaseDriver { +class ADVANCEDENGINE_EXPORT AdvancedEngine_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 + 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; } - Standard_EXPORT static const Standard_GUID& GetID(); - Standard_EXPORT ~GEOMImpl_SmoothingSurfaceDriver() {}; + static const Standard_GUID& GetID(); + ~AdvancedEngine_SmoothingSurfaceDriver() {}; - Standard_EXPORT virtual - bool GetCreationInformation(std::string& theOperationName, - std::vector& params); + virtual bool GetCreationInformation(std::string& theOperationName, + std::vector& params); // Type management // -DEFINE_STANDARD_RTTI( GEOMImpl_SmoothingSurfaceDriver ) +DEFINE_STANDARD_RTTI( AdvancedEngine_SmoothingSurfaceDriver ) private: TopoDS_Shape MakeSmoothingSurfaceUnClosed @@ -70,4 +59,4 @@ private: const Standard_Real theDMax) const; }; -#endif // _GEOMImpl_SmoothingSurfaceDriver_HXX +#endif // _AdvancedEngine_SmoothingSurfaceDriver_HXX diff --git a/src/AdvancedEngine/AdvancedEngine_Types.hxx b/src/AdvancedEngine/AdvancedEngine_Types.hxx index aa552a15d..63ee5b5ca 100644 --- a/src/AdvancedEngine/AdvancedEngine_Types.hxx +++ b/src/AdvancedEngine/AdvancedEngine_Types.hxx @@ -20,13 +20,14 @@ // 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 @@*/ diff --git a/src/AdvancedEngine/CMakeLists.txt b/src/AdvancedEngine/CMakeLists.txt index b6073f353..7a2c8e13a 100755 --- a/src/AdvancedEngine/CMakeLists.txt +++ b/src/AdvancedEngine/CMakeLists.txt @@ -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/AdvancedGUI/AdvancedGUI_images.ts b/src/AdvancedGUI/AdvancedGEOM_images.ts similarity index 100% rename from src/AdvancedGUI/AdvancedGUI_images.ts rename to src/AdvancedGUI/AdvancedGEOM_images.ts diff --git a/src/AdvancedGUI/AdvancedGUI_msg_en.ts b/src/AdvancedGUI/AdvancedGEOM_msg_en.ts similarity index 100% rename from src/AdvancedGUI/AdvancedGUI_msg_en.ts rename to src/AdvancedGUI/AdvancedGEOM_msg_en.ts diff --git a/src/AdvancedGUI/AdvancedGUI_msg_fr.ts b/src/AdvancedGUI/AdvancedGEOM_msg_fr.ts similarity index 100% rename from src/AdvancedGUI/AdvancedGUI_msg_fr.ts rename to src/AdvancedGUI/AdvancedGEOM_msg_fr.ts diff --git a/src/AdvancedGUI/AdvancedGUI_msg_ja.ts b/src/AdvancedGUI/AdvancedGEOM_msg_ja.ts similarity index 100% rename from src/AdvancedGUI/AdvancedGUI_msg_ja.ts rename to src/AdvancedGUI/AdvancedGEOM_msg_ja.ts diff --git a/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.cxx b/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.cxx index 4b1a9f288..721667206 100644 --- a/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.cxx +++ b/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.cxx @@ -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(); diff --git a/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.h b/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.h index 3fef245e9..bc1760cae 100644 --- a/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.h +++ b/src/AdvancedGUI/AdvancedGUI_DividedCylinderDlg.h @@ -25,6 +25,9 @@ #include +#include +#include CORBA_SERVER_HEADER(AdvancedGEOM) + class DlgRef_2Spin; class DlgRef_3Radio; diff --git a/src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.cxx b/src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.cxx index 974a66a89..2b409e91f 100644 --- a/src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.cxx +++ b/src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.cxx @@ -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; diff --git a/src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.h b/src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.h index aac6532cb..60ce1fc07 100644 --- a/src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.h +++ b/src/AdvancedGUI/AdvancedGUI_DividedDiskDlg.h @@ -25,6 +25,9 @@ #include +#include +#include CORBA_SERVER_HEADER(AdvancedGEOM) + class DlgRef_1Spin; class DlgRef_3Radio; class DlgRef_2Sel1Spin; diff --git a/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx b/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx index 1eac6f55f..ee07a99cd 100644 --- a/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx +++ b/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx @@ -19,6 +19,9 @@ #include "AdvancedGUI_PipeTShapeDlg.h" +#include +#include CORBA_SERVER_HEADER(AdvancedGEOM) + #include #include #include @@ -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(); diff --git a/src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx b/src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx index 151af6348..89c5f68ce 100644 --- a/src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx +++ b/src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx @@ -19,6 +19,9 @@ #include "AdvancedGUI_SmoothingSurfaceDlg.h" +#include +#include CORBA_SERVER_HEADER(AdvancedGEOM) + #include #include #include @@ -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/CMakeLists.txt b/src/AdvancedGUI/CMakeLists.txt index 74fe3dc94..1051f2b19 100755 --- a/src/AdvancedGUI/CMakeLists.txt +++ b/src/AdvancedGUI/CMakeLists.txt @@ -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 index 2d468398a..000000000 --- a/src/BREPExport/BREPExport.cxx +++ /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 -// -// -#include "utilities.h" - -#include - -#include -#include - -#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 index 2dbaedad8..000000000 --- a/src/BREPExport/CMakeLists.txt +++ /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 index 4d2545167..000000000 --- a/src/BREPImport/BREPImport.cxx +++ /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 -// -// -#include "utilities.h" - -#include -#include - -#include -#include -#include - -#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 index 459deb5df..000000000 --- a/src/BREPImport/CMakeLists.txt +++ /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 index 000000000..03f57d63a --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_Engine.cxx @@ -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 index 000000000..e37624924 --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_Engine.hxx @@ -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 || 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 index 000000000..2af1fbbef --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_ExportDriver.cxx @@ -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 +#include + +// GEOM includes +#include "GEOM_Function.hxx" + +// OOCT includes +#include +#include + +//======================================================================= +//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& 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 index 000000000..fbd7dd8f5 --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_ExportDriver.hxx @@ -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_ExportDriver_HXX +#define _BREPPlugin_ExportDriver_HXX + +// internal includes +#include "BREPPlugin_Engine.hxx" + +// GEOM includes +#include "GEOM_BaseDriver.hxx" + +// OCCT includes +#include + +DEFINE_STANDARD_HANDLE( BREPPlugin_ExportDriver, GEOM_BaseDriver ); + +class BREPPLUGINENGINE_EXPORT 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& 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 index 000000000..e6430947a --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_GUI.cxx @@ -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 +#include +#include +#include +#include +#include +#include +#include +#include + +// GEOM includes +#include "GeometryGUI.h" +#include "GEOM_Operation.h" +#include "GEOMBase.h" +#include "GEOM_Displayer.h" + +#include +#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 ( 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 ( 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 index 000000000..89ec7ebc2 --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_GUI.h @@ -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 index 000000000..83e1cbbb8 --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_IECallBack.cxx @@ -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 index 000000000..dfa66b06b --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_IECallBack.hxx @@ -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 + +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 index 000000000..28b00e780 --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_IExport.hxx @@ -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 index 000000000..1eac3d403 --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_IImport.hxx @@ -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 index 000000000..dc90c9990 --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_IOperations.cxx @@ -0,0 +1,171 @@ +// 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 + +// GEOM includes +#include "GEOM_PythonDump.hxx" +#include "GEOMImpl_Types.hxx" + +#include // 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 { +#if OCC_VERSION_LARGE > 0x06010000 + OCC_CATCH_SIGNALS; +#endif + 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 { +#if OCC_VERSION_LARGE > 0x06010000 + OCC_CATCH_SIGNALS; +#endif + 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 index 000000000..b5950e7cd --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_IOperations.hxx @@ -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 index 000000000..aee5e9eb0 --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_IOperations_i.cc @@ -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 + +//============================================================================= +/*! + * 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 index 000000000..02f9d8138 --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_IOperations_i.hh @@ -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 +#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 index 000000000..3f24fea44 --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_ImportDriver.cxx @@ -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 +#include + +// GEOM includes +#include "GEOM_Function.hxx" +#include "GEOMImpl_Types.hxx" + +// OOCT includes +#include +#include + +//======================================================================= +//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& 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 index 000000000..1f043659b --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_ImportDriver.hxx @@ -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_ImportDriver_HXX +#define _BREPPlugin_ImportDriver_HXX + +// internal includes +#include "BREPPlugin_Engine.hxx" + +// GEOM includes +#include "GEOM_BaseDriver.hxx" + +// OCCT includes +#include + +DEFINE_STANDARD_HANDLE( BREPPlugin_ImportDriver, GEOM_BaseDriver ); + +class BREPPLUGINENGINE_EXPORT 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& 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 index 000000000..27808c748 --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_OperationsCreator.cxx @@ -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 +#include + +// OCCT includes +#include + +std::map 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 index 000000000..687014436 --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_OperationsCreator.hxx @@ -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 + +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 _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 index 000000000..6ca54d154 --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_msg_en.ts @@ -0,0 +1,46 @@ + + + + + @default + + MEN_EXPORTBREP + BREP + + + TOP_EXPORTBREP + Export BREP + + + STB_EXPORTBREP + Export BREP + + + MEN_IMPORTBREP + BREP + + + TOP_IMPORTBREP + Import BREP + + + STB_IMPORTBREP + Import BREP + + + + BREPPlugin_GUI + + BREP_FILES + BREP files( *.brep ) + + + EXPORT_TITLE + Export BREP + + + IMPORT_TITLE + Import BREP + + + diff --git a/src/BREPPlugin/BREPPlugin_msg_fr.ts b/src/BREPPlugin/BREPPlugin_msg_fr.ts new file mode 100644 index 000000000..ff0cd50e2 --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_msg_fr.ts @@ -0,0 +1,46 @@ + + + + + @default + + MEN_EXPORTBREP + BREP + + + TOP_EXPORTBREP + Exporter BREP + + + STB_EXPORTBREP + Exporter BREP + + + MEN_IMPORTBREP + BREP + + + TOP_IMPORTBREP + Importer BREP + + + STB_IMPORTBREP + Importer BREP + + + + BREPPlugin_GUI + + BREP_FILES + BREP Fichiers( *.brep ) + + + EXPORT_TITLE + Exporter BREP + + + IMPORT_TITLE + Importer BREP + + + diff --git a/src/BREPPlugin/BREPPlugin_msg_ja.ts b/src/BREPPlugin/BREPPlugin_msg_ja.ts new file mode 100644 index 000000000..4a23773a3 --- /dev/null +++ b/src/BREPPlugin/BREPPlugin_msg_ja.ts @@ -0,0 +1,46 @@ + + + + + @default + + MEN_EXPORTBREP + BREP + + + TOP_EXPORTBREP + Export BREP + + + STB_EXPORTBREP + Export BREP + + + MEN_IMPORTBREP + BREP + + + TOP_IMPORTBREP + Import BREP + + + STB_IMPORTBREP + Import BREP + + + + BREPPlugin_GUI + + BREP_FILES + BREP files( *.brep ) + + + EXPORT_TITLE + Export BREP + + + IMPORT_TITLE + Import BREP + + + diff --git a/src/BREPPlugin/CMakeLists.txt b/src/BREPPlugin/CMakeLists.txt new file mode 100644 index 000000000..b9e443dc8 --- /dev/null +++ b/src/BREPPlugin/CMakeLists.txt @@ -0,0 +1,147 @@ +# 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} + ) + +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}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 641853c22..7c10ef0d4 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,10 +21,10 @@ # 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() diff --git a/src/DlgRef/CMakeLists.txt b/src/DlgRef/CMakeLists.txt index 61e6a2dfa..29874d83c 100755 --- a/src/DlgRef/CMakeLists.txt +++ b/src/DlgRef/CMakeLists.txt @@ -101,7 +101,6 @@ SET(_uic_files DlgRef_4Sel1Spin3Check_QTD.ui DlgRef_4Spin_QTD.ui DlgRef_6Sel_QTD.ui - DlgRef_Skeleton_QTD.ui ) # --- headers --- diff --git a/src/DlgRef/DlgRef.cxx b/src/DlgRef/DlgRef.cxx index efeefa4c2..1e242cb95 100644 --- a/src/DlgRef/DlgRef.cxx +++ b/src/DlgRef/DlgRef.cxx @@ -898,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 ////////////////////////////////////////// diff --git a/src/DlgRef/DlgRef.h b/src/DlgRef/DlgRef.h index fb3c8e047..918183677 100644 --- a/src/DlgRef/DlgRef.h +++ b/src/DlgRef/DlgRef.h @@ -972,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/GEOM/CMakeLists.txt b/src/GEOM/CMakeLists.txt index 067056152..92dd5f5c4 100755 --- a/src/GEOM/CMakeLists.txt +++ b/src/GEOM/CMakeLists.txt @@ -65,6 +65,7 @@ SET(GEOM_HEADERS GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx GEOM_DataMapOfAsciiStringTransient.hxx Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx + GEOM_BaseObject.hxx ) # --- sources --- diff --git a/src/GEOM/GEOM_BaseDriver.cxx b/src/GEOM/GEOM_BaseDriver.cxx index 2097da593..2ace1ce54 100644 --- a/src/GEOM/GEOM_BaseDriver.cxx +++ b/src/GEOM/GEOM_BaseDriver.cxx @@ -28,13 +28,29 @@ #include "GEOM_Function.hxx" #include "GEOM_Object.hxx" +#include "GEOM_Engine.hxx" #include #include +#include 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; +} //================================================================================ /*! diff --git a/src/GEOM/GEOM_BaseDriver.hxx b/src/GEOM/GEOM_BaseDriver.hxx index a90dd6813..7313ea602 100644 --- a/src/GEOM/GEOM_BaseDriver.hxx +++ b/src/GEOM/GEOM_BaseDriver.hxx @@ -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) diff --git a/src/GEOMBase/CMakeLists.txt b/src/GEOMBase/CMakeLists.txt index b29c2204b..5c5f3c885 100755 --- a/src/GEOMBase/CMakeLists.txt +++ b/src/GEOMBase/CMakeLists.txt @@ -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 index 000000000..ab464279f --- /dev/null +++ b/src/GEOMBase/GEOMBase_DlgSkeleton.cxx @@ -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 +#include +#include +#include +#include +#include +#include + + +/*! + 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 index 000000000..2b4db808d --- /dev/null +++ b/src/GEOMBase/GEOMBase_DlgSkeleton.h @@ -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 +#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 diff --git a/src/GEOMBase/GEOMBase_Skeleton.cxx b/src/GEOMBase/GEOMBase_Skeleton.cxx index b49649447..7ed88f0b0 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.cxx +++ b/src/GEOMBase/GEOMBase_Skeleton.cxx @@ -25,6 +25,7 @@ // Author : Damien COQUERET, Open CASCADE S.A.S. #include "GEOMBase_Skeleton.h" +#include "GEOMBase_DlgSkeleton.h" #include "GEOMBase.h" #include @@ -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; } diff --git a/src/GEOMBase/GEOMBase_Skeleton.h b/src/GEOMBase/GEOMBase_Skeleton.h index e4f5f4d94..b41b5d875 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.h +++ b/src/GEOMBase/GEOMBase_Skeleton.h @@ -28,13 +28,14 @@ #define GEOMBASE_SKELETON_H #include "GEOM_GEOMBase.hxx" +#include "GEOMBase_DlgSkeleton.h" #include "GEOMBase_Helper.h" #include 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 ); diff --git a/src/GEOMBase/GEOM_GenericObjPtr.h b/src/GEOMBase/GEOM_GenericObjPtr.h index 552e3143d..ce5fb31bf 100644 --- a/src/GEOMBase/GEOM_GenericObjPtr.h +++ b/src/GEOMBase/GEOM_GenericObjPtr.h @@ -229,7 +229,6 @@ namespace GEOM typedef GenericObjPtr InsertOpPtr; typedef GenericObjPtr MeasureOpPtr; typedef GenericObjPtr GroupOpPtr; - typedef GenericObjPtr AdvancedOpPtr; template<> bool GEOMBASE_EXPORT GenericObjPtr::isSame( GEOM::GEOM_Object_ptr theLeft, GEOM::GEOM_Object_ptr theRight ); } diff --git a/src/GEOMGUI/CMakeLists.txt b/src/GEOMGUI/CMakeLists.txt index c5dc25f8a..74e2f4f0f 100755 --- a/src/GEOMGUI/CMakeLists.txt +++ b/src/GEOMGUI/CMakeLists.txt @@ -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 diff --git a/src/GEOMGUI/GEOMGUI_CreationInfoWdg.cxx b/src/GEOMGUI/GEOMGUI_CreationInfoWdg.cxx index 6bf1369e3..bd319bfab 100644 --- a/src/GEOMGUI/GEOMGUI_CreationInfoWdg.cxx +++ b/src/GEOMGUI/GEOMGUI_CreationInfoWdg.cxx @@ -77,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")); diff --git a/src/GEOMGUI/GEOMGUI_XmlHandler.cxx b/src/GEOMGUI/GEOMGUI_XmlHandler.cxx deleted file mode 100644 index db66695a7..000000000 --- a/src/GEOMGUI/GEOMGUI_XmlHandler.cxx +++ /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 - -/*! - * 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 index dc1b64dbe..000000000 --- a/src/GEOMGUI/GEOMGUI_XmlHandler.h +++ /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 -#include -#include - -//GUI includes -#include - -//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 myListOfActions; - QList 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 diff --git a/src/GEOMGUI/GEOM_images.ts b/src/GEOMGUI/GEOM_images.ts index 467cc55de..115e51e67 100644 --- a/src/GEOMGUI/GEOM_images.ts +++ b/src/GEOMGUI/GEOM_images.ts @@ -1315,26 +1315,6 @@ ICON_DLG_SCALE_ALONG_AXES scale_along_axes.png - - ICON_DLG_EXPORTXAO - exportxao.png - - - ICO_EXPORTXAO - exportxao.png - - - ICON_DLG_IMPORTXAO - importxao.png - - - ICO_IMPORTXAO - importxao.png - - - ICON_OBJBROWSER_IMPORTEXPORT_204 - tree_exportxao.png - diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index 13449596d..89480676b 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -1012,14 +1012,6 @@ Please, select face, shell or solid and try again GEOM_MEN_ENTER_ANGLE Enter An Angle In Degrees - - GEOM_MEN_EXPORT - Export - - - GEOM_MEN_IMPORT - Import - GEOM_MEN_ISOS Select Number Of Isos @@ -2594,7 +2586,7 @@ Please, select face, shell or solid and try again MEN_EXPORT - Export... + Export MEN_EXTRUSION @@ -2702,7 +2694,7 @@ Please, select face, shell or solid and try again MEN_IMPORT - Import... + Import MEN_INERTIA @@ -3544,10 +3536,6 @@ Please, select face, shell or solid and try again STB_EXPLODE_BLOCKS Explode on Blocks - - STB_EXPORT - Export geometry to BREP file - STB_EXTRUSION Create an extrusion @@ -3632,10 +3620,6 @@ Please, select face, shell or solid and try again STB_HEX_SOLID Hexahedral Solid - - STB_IMPORT - Import geometry from BREP file - STB_INERTIA Compute moments of intertia of the shape @@ -4152,10 +4136,6 @@ Please, select face, shell or solid and try again TOP_EXPLODE_BLOCKS Explode on Blocks - - TOP_EXPORT - Export geometry to BREP file - TOP_EXTRUSION Create an extrusion @@ -4232,10 +4212,6 @@ Please, select face, shell or solid and try again TOP_HEX_SOLID Hexahedral Solid - - TOP_IMPORT - Import geometry from BREP file - TOP_INERTIA Moments of intertia @@ -5095,11 +5071,6 @@ shells and solids on the other hand. GEOM_PUBLISH_NAMED_SHAPES Create groups for named shapes (if there are any)? - - GEOM_SCALE_DIMENSIONS - 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). - GEOM_PRECISION_HINT Input value precision can be adjusted using @@ -5129,54 +5100,6 @@ Ignoring units will cause model scaling (as dimensions are supposed to be specif GEOM_SELECT_IMAGE Select image... - - MEN_IMPORTEXPORT - Import / Export XAO - - - TOP_EXPORTXAO - Export to XAO - - - MEN_EXPORTXAO - Export XAO - - - STB_EXPORTXAO - Export shape to XAO format - - - TOP_IMPORTXAO - Import from XAO - - - MEN_IMPORTXAO - Import XAO - - - STB_IMPORTXAO - Import shape from XAO format - - - GEOM_IMPORTEXPORT_204 - Export XAO - - - GEOM_SELECT_IMPORT_XAO - Import from XAO - - - GEOM_SELECT_EXPORT_XAO - Export to XAO - - - XAO_FILES - XAO files (*.xao) - - - TOOLS_IMPORTEXPORT - Import / Export - CC_PNT_ITEM_X_Y X=%1, Y=%2 @@ -7009,72 +6932,6 @@ Do you want to create new material? (No info available) - - ImportExportGUI_ExportXAODlg - - GEOM_EXPORTXAO_TITLE - Export XAO - - - GEOM_EXPORTXAO - Export XAO - - - GEOM_EXPORTXAO_EXPORTINGSHAPE - Shape - - - GEOM_EXPORTXAO_FILENAME - File Name - - - GEOM_EXPORTXAO_AUTHOR - Author - - - GEOM_EXPORTXAO_LGROUPS - Groups - - - GEOM_EXPORTXAO_LFIELDS - Fields - - - EXPORT_DLG_ACCEPT - OK - - - - ImportExportGUI_ImportXAODlg - - GEOM_IMPORTXAO_TITLE - Import XAO - - - GEOM_IMPORTXAO - Import XAO - - - GEOM_IMPORTXAO_IMPORTINGSHAPE - Shape - - - GEOM_IMPORTXAO_FILENAME - File Name - - - GEOM_IMPORTXAO_LGROUPS - Groups - - - GEOM_IMPORTXAO_LFIELDS - Fields - - - STEP - Step - - EntityGUI_IsolineDlg diff --git a/src/GEOMGUI/GEOM_msg_fr.ts b/src/GEOMGUI/GEOM_msg_fr.ts index 8f0b1cf93..07c02e244 100644 --- a/src/GEOMGUI/GEOM_msg_fr.ts +++ b/src/GEOMGUI/GEOM_msg_fr.ts @@ -1024,14 +1024,6 @@ Choisissez une face, une coque ou un solide et essayez de nouveau GEOM_MEN_ENTER_ANGLE Indiquez l'angle en degrés - - GEOM_MEN_EXPORT - Exporter - - - GEOM_MEN_IMPORT - Importer - GEOM_MEN_ISOS Choisir le nombre d'isolignes @@ -2602,7 +2594,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau MEN_EXPORT - Exporter... + Exporter MEN_EXTRUSION @@ -2710,7 +2702,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau MEN_IMPORT - Importer... + Importer MEN_INERTIA @@ -3548,10 +3540,6 @@ Choisissez une face, une coque ou un solide et essayez de nouveau STB_EXPLODE_BLOCKS Eclater en blocs - - STB_EXPORT - Exporter la géométrie au fichier BREP - STB_EXTRUSION Créer une extrusion @@ -3636,10 +3624,6 @@ Choisissez une face, une coque ou un solide et essayez de nouveau STB_HEX_SOLID Solide hexaédrique - - STB_IMPORT - Importer une géométrie d'un fichier BREP - STB_INERTIA Calculer les moments d'inertie de l'objet @@ -4156,10 +4140,6 @@ Choisissez une face, une coque ou un solide et essayez de nouveau TOP_EXPLODE_BLOCKS Eclater en blocs - - TOP_EXPORT - Exporter une géométrie au format BREP - TOP_EXTRUSION Créer une extrusion @@ -4236,10 +4216,6 @@ Choisissez une face, une coque ou un solide et essayez de nouveau TOP_HEX_SOLID Solide hexaédrique - - TOP_IMPORT - Importer une géométrie d'un fichier BREP - TOP_INERTIA Moments d'inertie @@ -5095,11 +5071,6 @@ les coques et solides d'un autre. GEOM_PUBLISH_NAMED_SHAPES Créer des groupes pour les objets indiqués (s'ils existent)? - - GEOM_SCALE_DIMENSIONS - Voulez-vous prendre les unités du fichier (%1) en considération? -Sinon le modèle sera mis à l'échelle GEOM (unités interprétées comme des mètres). - GEOM_PRECISION_HINT Il est possible d'ajuster la précision de la valeur d'entrée avec @@ -5129,54 +5100,6 @@ le paramètre '%1' aux préférences du module Géométrie.GEOM_SELECT_IMAGE Sélectionner une image... - - MEN_IMPORTEXPORT - Import / Export XAO - - - TOP_EXPORTXAO - Export XAO - - - MEN_EXPORTXAO - Export XAO - - - STB_EXPORTXAO - Exporter une forme au format XAO - - - TOP_IMPORTXAO - Import XAO - - - MEN_IMPORTXAO - Import XAO - - - STB_IMPORTXAO - Importer une forme au format XAO - - - GEOM_IMPORTEXPORT_204 - Export XAO - - - GEOM_SELECT_IMPORT_XAO - Import XAO - - - GEOM_SELECT_EXPORT_XAO - Export XAO - - - XAO_FILES - Fichiers XAO (*.xao) - - - TOOLS_IMPORTEXPORT - Import / Export XAO - CC_PNT_ITEM_X_Y X=%1, Y=%2 @@ -7009,72 +6932,6 @@ Voulez-vous en créer un nouveau ? (aucune information disponible) - - ImportExportGUI_ExportXAODlg - - GEOM_EXPORTXAO_TITLE - Export XAO - - - GEOM_EXPORTXAO - Export XAO - - - GEOM_EXPORTXAO_EXPORTINGSHAPE - Objet - - - GEOM_EXPORTXAO_FILENAME - Fichier - - - GEOM_EXPORTXAO_AUTHOR - Auteur - - - GEOM_EXPORTXAO_LGROUPS - Groupes - - - GEOM_EXPORTXAO_LFIELDS - Champs - - - EXPORT_DLG_ACCEPT - OK - - - - ImportExportGUI_ImportXAODlg - - GEOM_IMPORTXAO_TITLE - Import XAO - - - GEOM_IMPORTXAO - Import XAO - - - GEOM_IMPORTXAO_IMPORTINGSHAPE - Objet - - - GEOM_IMPORTXAO_FILENAME - Fichier - - - GEOM_IMPORTXAO_LGROUPS - Groupes - - - GEOM_IMPORTXAO_LFIELDS - Champs - - - STEP - Pas - - EntityGUI_IsolineDlg diff --git a/src/GEOMGUI/GEOM_msg_ja.ts b/src/GEOMGUI/GEOM_msg_ja.ts index 11b374459..8d7cd8e2d 100644 --- a/src/GEOMGUI/GEOM_msg_ja.ts +++ b/src/GEOMGUI/GEOM_msg_ja.ts @@ -1003,14 +1003,6 @@ GEOM_MEN_ENTER_ANGLE 角度を度数で指定します - - GEOM_MEN_EXPORT - エクスポート - - - GEOM_MEN_IMPORT - インポート - GEOM_MEN_ISOS 輪郭線の数を選択します。 @@ -1465,7 +1457,7 @@ GEOM_PRP_EXPORT - ジオメトリを %1 にエクスポート... + ジオメトリを %1 にエクスポート GEOM_PRP_LOADING @@ -2693,7 +2685,7 @@ MEN_IMPORT - インポート... + インポート MEN_INERTIA @@ -3535,10 +3527,6 @@ STB_EXPLODE_BLOCKS ブロックで展開 - - STB_EXPORT - ジオメトリをBREPファイルにエクスポート - STB_EXTRUSION 押し出しを作成 @@ -3623,10 +3611,6 @@ STB_HEX_SOLID Hexahedral_Solid - - STB_IMPORT - BREPファイルをジオメトリにインポート - STB_INERTIA オブジェクトの慣性モーメントを計算します。 @@ -4143,10 +4127,6 @@ TOP_EXPLODE_BLOCKS ブロックで展開 - - TOP_EXPORT - ジオメトリをBREPファイルでエクスポート - TOP_EXTRUSION 押し出しを作成 @@ -4223,10 +4203,6 @@ TOP_HEX_SOLID Hexahedral_Solid - - TOP_IMPORT - BREPファイルをジオメトリにインポート - TOP_INERTIA 慣性モーメント @@ -5083,10 +5059,6 @@ GEOM_PUBLISH_NAMED_SHAPES 指定したオブジェクトのグループ(存在する場合)を作成しますか? - - GEOM_SCALE_DIMENSIONS - インポートしたファイルの単位をミリメートルからメートルに変換しますか?いいえを選んだ場合、メートル単位として解釈します。 - GEOM_PRECISION_HINT パラメーターの入力値の精度を調整することは '%1' の好みにジオメトリ モジュールの。 @@ -5115,54 +5087,6 @@ GEOM_SELECT_IMAGE イメージの選択. - - MEN_IMPORTEXPORT - インポート/エクスポート - - - TOP_EXPORTXAO - エクスポートしました。 - - - MEN_EXPORTXAO - エクスポートしました。 - - - STB_EXPORTXAO - ソテーした形式でフォームをエクスポートします。 - - - TOP_IMPORTXAO - インポートしました。 - - - MEN_IMPORTXAO - インポートしました。 - - - STB_IMPORTXAO - ソテーしたフォームをインポートします。 - - - GEOM_IMPORTEXPORT_204 - エクスポートしました。 - - - GEOM_SELECT_IMPORT_XAO - XAOからインポート - - - GEOM_SELECT_EXPORT_XAO - エクスポートしました。 - - - XAO_FILES - ファイルした (*.xao) - - - TOOLS_IMPORTEXPORT - インポート/エクスポート - CC_PNT_ITEM_X_Y X=%1, Y=%2 @@ -6985,72 +6909,6 @@ (有効情報なし) - - ImportExportGUI_ExportXAODlg - - GEOM_EXPORTXAO_TITLE - エクスポートしました。 - - - GEOM_EXPORTXAO - エクスポートしました。 - - - GEOM_EXPORTXAO_EXPORTINGSHAPE - オブジェクト - - - GEOM_EXPORTXAO_FILENAME - ファイル - - - GEOM_EXPORTXAO_AUTHOR - 作成者 - - - GEOM_EXPORTXAO_LGROUPS - グループ - - - GEOM_EXPORTXAO_LFIELDS - フィールド - - - EXPORT_DLG_ACCEPT - OK - - - - ImportExportGUI_ImportXAODlg - - GEOM_IMPORTXAO_TITLE - インポートしました。 - - - GEOM_IMPORTXAO - インポートしました。 - - - GEOM_IMPORTXAO_IMPORTINGSHAPE - オブジェクト - - - GEOM_IMPORTXAO_FILENAME - ファイル - - - GEOM_IMPORTXAO_LGROUPS - グループ - - - GEOM_IMPORTXAO_LFIELDS - フィールド - - - STEP - Step - - EntityGUI_IsolineDlg diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index 044f0692f..e5ec40e37 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -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" @@ -467,8 +467,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 @@ -665,10 +663,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 @@ -901,9 +895,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" ); @@ -1103,10 +1094,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" ); @@ -1116,13 +1103,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 ); @@ -1458,11 +1438,7 @@ void GeometryGUI::initialize( CAM_Application* app ) createTool( GEOMOp::OpFeatureDetect, picturesTbId ); #endif - int impexpTbId = createTool( tr( "TOOL_IMPORTEXPORT" ), QString( "GEOMImportExportXAO" ) ); - createTool( GEOMOp::OpExportXAO, impexpTbId ); - createTool( GEOMOp::OpImportXAO, impexpTbId ); - - //int advancedTbId = createTool( tr( "TOOL_ADVANCED" ), QString( "GEOMAdvanced" ) ); + //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 @@// @@ -1667,131 +1643,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"), QString( "Advanced" )); - int id = GEOMOp::OpLastOperationID; // TODO? + SalomeApp_Study* appStudy = dynamic_cast( 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 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()), 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 actions = (*it).actions; + std::list::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++; + } } } @@ -1832,8 +1754,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; @@ -1922,8 +1842,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); @@ -2099,15 +2017,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() ); } } } diff --git a/src/GEOMGUI/GeometryGUI_Operations.h b/src/GEOMGUI/GeometryGUI_Operations.h index 4a109372a..f392e4df6 100644 --- a/src/GEOMGUI/GeometryGUI_Operations.h +++ b/src/GEOMGUI/GeometryGUI_Operations.h @@ -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 @@ -209,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 diff --git a/src/GEOMImpl/CMakeLists.txt b/src/GEOMImpl/CMakeLists.txt index 854c54755..0fb145931 100755 --- a/src/GEOMImpl/CMakeLists.txt +++ b/src/GEOMImpl/CMakeLists.txt @@ -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 --- diff --git a/src/GEOMImpl/GEOMImpl_ExportDriver.cxx b/src/GEOMImpl/GEOMImpl_ExportDriver.cxx index 84ad697e4..8e177e9a6 100644 --- a/src/GEOMImpl/GEOMImpl_ExportDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ExportDriver.cxx @@ -20,39 +20,19 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include +// internal includes +#include "GEOMImpl_ExportDriver.hxx" +#include "GEOMImpl_IImportExport.hxx" +#include "GEOMImpl_IECallBack.hxx" +#include "GEOMImpl_Types.hxx" -#include -#include -#include +// GEOM includes #include +// OCC includes +#include #include -#include - -#include - -#ifdef WIN32 -#include -#else -#include -#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; } //================================================================================ diff --git a/src/GEOMImpl/GEOMImpl_ExportDriver.hxx b/src/GEOMImpl/GEOMImpl_ExportDriver.hxx index d14f51be2..62933b053 100644 --- a/src/GEOMImpl/GEOMImpl_ExportDriver.hxx +++ b/src/GEOMImpl/GEOMImpl_ExportDriver.hxx @@ -26,23 +26,6 @@ #ifndef _GEOMImpl_ExportDriver_HeaderFile #define _GEOMImpl_ExportDriver_HeaderFile -#ifndef _TColStd_SequenceOfExtendedString_HeaderFile -#include -#endif -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif #ifndef _Standard_GUID_HeaderFile #include #endif diff --git a/src/GEOMImpl/GEOMImpl_Gen.cxx b/src/GEOMImpl/GEOMImpl_Gen.cxx index ae1418e27..081bf2125 100644 --- a/src/GEOMImpl/GEOMImpl_Gen.cxx +++ b/src/GEOMImpl/GEOMImpl_Gen.cxx @@ -83,7 +83,6 @@ #include #include #include -#include //============================================================================= /*! @@ -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); diff --git a/src/GEOMImpl/GEOMImpl_IBaseIEOperations.cxx b/src/GEOMImpl/GEOMImpl_IBaseIEOperations.cxx new file mode 100755 index 000000000..0f494319a --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IBaseIEOperations.cxx @@ -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 +#include +#include +#include +#include +#include + +typedef NCollection_DataMap< TCollection_ExtendedString, NCollection_List > + 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 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 &aShList = aMapIter.ChangeValue(); + NCollection_List::Iterator aShIter(aShList); + NCollection_List 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 &theShapes) +{ + Handle(GEOM_Object) aGroup; + TopTools_IndexedMapOfShape anIndices; + Handle(TColStd_HSequenceOfInteger) aSeqIDs = new TColStd_HSequenceOfInteger; + NCollection_List::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 index 000000000..c5c751b32 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IBaseIEOperations.hxx @@ -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 + +// OCC includes +#include + +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: + 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 &theShapes); +protected: + GEOMImpl_IGroupOperations* myGroupOperations; + GEOMImpl_IFieldOperations* myFieldOperations; + GEOMImpl_IShapesOperations* myShapesOperations; +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_IECallBack.cxx b/src/GEOMImpl/GEOMImpl_IECallBack.cxx new file mode 100755 index 000000000..1cd65c135 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IECallBack.cxx @@ -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 GEOMImpl_IECallBack::myCallBacks; + +//============================================================================= +/*! + * constructor + */ +//============================================================================= +GEOMImpl_IECallBack::GEOMImpl_IECallBack() +{ +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOMImpl_IECallBack::~GEOMImpl_IECallBack() +{ +} + +//============================================================================= +/*! + * GetEngine + */ +//============================================================================= +GEOMImpl_Gen* GEOMImpl_IECallBack::GetEngine() +{ + return dynamic_cast( 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 index 000000000..890e879d2 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IECallBack.hxx @@ -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 + +// C++ includes +#include + +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 ); + + static void Register( const TCollection_AsciiString& theFormatName, GEOMImpl_IECallBack* theCallBack ); + + static GEOMImpl_IECallBack* GetCallBack( const TCollection_AsciiString& theFormatName ); + +protected: + GEOMImpl_Gen* GetEngine(); + +private: + static std::map myCallBacks; +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx b/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx index 86e7566d5..7e7606700 100755 --- a/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx @@ -33,28 +33,12 @@ #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 #include #include "GEOM_ISubShape.hxx" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include #include "utilities.h" @@ -89,15 +73,6 @@ #include #include // 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 @@ -189,52 +164,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)) { - 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 { -#if OCC_VERSION_LARGE > 0x06010000 - OCC_CATCH_SIGNALS; -#endif - 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()); + if ( !GEOMImpl_IECallBack::GetCallBack( theFormatName )->Export( GetDocID(), theOriginal, theFileName, theFormatName ) ) return; - } - - //Make a Python command - GEOM::TPythonDump(aFunction) << "geompy.Export(" << theOriginal << ", \"" - << theFileName.ToCString() << "\", \"" << theFormatName.ToCString() << "\")"; - SetErrorCode(OK); } @@ -251,91 +182,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 { -#if OCC_VERSION_LARGE > 0x06010000 - OCC_CATCH_SIGNALS; -#endif - 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 = "<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 @@ -769,763 +366,3 @@ std::list 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 groupList, - XAO::Xao* xaoObject, - XAO::BrepGeometry* geometry) -{ - // add the groups - std::list::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 fieldList, - XAO::Xao* xaoObject, - XAO::BrepGeometry* geometry) -{ - std::list::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::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 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 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 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 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 groupList, - std::list 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::iterator itGroup = groupList.begin(); - pd << (*itGroup++); - while (itGroup != groupList.end()) - { - pd << ", " << (*itGroup++); - } - } - - // list of fields - pd << "], ["; - if (fieldList.size() > 0) - { - std::list::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::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 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 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 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 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 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 &aShList = aMapIter.ChangeValue(); - NCollection_List::Iterator aShIter(aShList); - NCollection_List 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 &theShapes) -{ - Handle(GEOM_Object) aGroup; - TopTools_IndexedMapOfShape anIndices; - Handle(TColStd_HSequenceOfInteger) aSeqIDs = new TColStd_HSequenceOfInteger; - NCollection_List::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_IInsertOperations.hxx b/src/GEOMImpl/GEOMImpl_IInsertOperations.hxx index c3c982fec..e205f024a 100644 --- a/src/GEOMImpl/GEOMImpl_IInsertOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IInsertOperations.hxx @@ -51,15 +51,6 @@ class Handle_TColStd_HArray1OfByte; class Handle_TDataStd_HArray1OfByte; #endif -namespace XAO { - class Geometry; - class BrepGeometry; - class Xao; -} - -typedef NCollection_DataMap > - DataMapOfStringListOfShape; - class GEOMImpl_IInsertOperations : public GEOM_IOperations { public: Standard_EXPORT GEOMImpl_IInsertOperations(GEOM_Engine* theEngine, int theDocID); @@ -80,16 +71,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); @@ -110,38 +91,6 @@ class GEOMImpl_IInsertOperations : public GEOM_IOperations { Standard_EXPORT std::list GetAllTextures(); - Standard_EXPORT bool ExportXAO(Handle(GEOM_Object) shape, - std::list groupList, - std::list 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 fieldList, XAO::Xao* xaoObject, - XAO::BrepGeometry* geometry); - void exportGroups(std::list 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 &theShapes); - private: std::vector myResMgrList; GEOMImpl_IShapesOperations* myShapesOperations; diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx index 31233a94f..d9bbe3062 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -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; } diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx index efb82f39b..548ee1050 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx @@ -1151,9 +1151,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); @@ -1171,8 +1200,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(); @@ -1180,13 +1207,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; @@ -1197,14 +1225,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; diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx index e620817fe..d12642a36 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx @@ -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 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, diff --git a/src/GEOMImpl/GEOMImpl_ImportDriver.cxx b/src/GEOMImpl/GEOMImpl_ImportDriver.cxx index 768690584..86b3f32e6 100644 --- a/src/GEOMImpl/GEOMImpl_ImportDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ImportDriver.cxx @@ -20,49 +20,19 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include +// internal includes +#include "GEOMImpl_ImportDriver.hxx" +#include "GEOMImpl_IImportExport.hxx" +#include "GEOMImpl_IECallBack.hxx" +#include "GEOMImpl_Types.hxx" -#include -#include -#include +// GEOM includes #include +// OCC includes +#include #include -#include - -#include "utilities.h" - -#include -#include - -#ifdef WIN32 -#include -#else -#include -#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& theParams) diff --git a/src/GEOMImpl/GEOMImpl_ImportDriver.hxx b/src/GEOMImpl/GEOMImpl_ImportDriver.hxx index 47dbb356f..c6e4b7b68 100644 --- a/src/GEOMImpl/GEOMImpl_ImportDriver.hxx +++ b/src/GEOMImpl/GEOMImpl_ImportDriver.hxx @@ -26,23 +26,7 @@ #ifndef _GEOMImpl_ImportDriver_HeaderFile #define _GEOMImpl_ImportDriver_HeaderFile -#ifndef _TColStd_SequenceOfExtendedString_HeaderFile -#include -#endif -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif #ifndef _Standard_GUID_HeaderFile #include #endif @@ -82,13 +66,6 @@ Standard_EXPORT ~GEOMImpl_ImportDriver() {}; Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName, std::vector& 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 ) }; diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index ffc758bcb..037e62900 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -1153,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); diff --git a/src/GEOMImpl/GEOMImpl_Types.hxx b/src/GEOMImpl/GEOMImpl_Types.hxx index b57080a9c..0bc7505c1 100755 --- a/src/GEOMImpl/GEOMImpl_Types.hxx +++ b/src/GEOMImpl/GEOMImpl_Types.hxx @@ -109,8 +109,6 @@ #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 @@ -118,8 +116,8 @@ #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 @@ -363,9 +361,10 @@ #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 index 4a7e7dfcf..000000000 --- a/src/GEOMImpl/GEOMImpl_XAODriver.cxx +++ /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 - -#include -#include -#include -#include - -#include -#include - -#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 index c67b6909a..000000000 --- a/src/GEOMImpl/GEOMImpl_XAODriver.hxx +++ /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 - -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 diff --git a/src/GEOMImpl/GUID.txt b/src/GEOMImpl/GUID.txt index 34a83e707..d11591d0f 100755 --- a/src/GEOMImpl/GUID.txt +++ b/src/GEOMImpl/GUID.txt @@ -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 diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index 0c514cb78..950b181c5 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -62,116 +62,6 @@ typedef QMap FilterMap; static QString lastUsedFilter; -//======================================================================= -// function : getFileName -// purpose : Selection of a file name for Import/Export. Returns also -// the selected file type code through 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 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 ( 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 ( 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 diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.h b/src/GEOMToolsGUI/GEOMToolsGUI.h index 4ed7f9495..a79c7d30c 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI.h @@ -61,9 +61,6 @@ public: enum ActionType { SHOWDLG, INCR, DECR }; private: - // Import and export topology methods - bool Import(); - bool Export(); void OnEditDelete(); void OnCheckGeometry(); diff --git a/src/GEOMUtils/CMakeLists.txt b/src/GEOMUtils/CMakeLists.txt index b4969f0d9..fdd98a686 100755 --- a/src/GEOMUtils/CMakeLists.txt +++ b/src/GEOMUtils/CMakeLists.txt @@ -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 --- diff --git a/src/GEOMUtils/GEOMUtils.cxx b/src/GEOMUtils/GEOMUtils.cxx index 89b13d96b..aa8c3d7a3 100644 --- a/src/GEOMUtils/GEOMUtils.cxx +++ b/src/GEOMUtils/GEOMUtils.cxx @@ -95,13 +95,240 @@ #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 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::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 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 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 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 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::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 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 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 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( upwardList, downwardList ); } } - -} //namespace GEOMUtils diff --git a/src/GEOMUtils/GEOMUtils.hxx b/src/GEOMUtils/GEOMUtils.hxx index b35495b62..95c0e7c0f 100644 --- a/src/GEOMUtils/GEOMUtils.hxx +++ b/src/GEOMUtils/GEOMUtils.hxx @@ -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 NodeLinks; typedef std::map 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. * diff --git a/src/GEOMUtils/GEOMUtils_Hatcher.cxx b/src/GEOMUtils/GEOMUtils_Hatcher.cxx index be3500b2a..7f0d5083b 100755 --- a/src/GEOMUtils/GEOMUtils_Hatcher.cxx +++ b/src/GEOMUtils/GEOMUtils_Hatcher.cxx @@ -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(); diff --git a/src/GEOMUtils/GEOMUtils_Hatcher.hxx b/src/GEOMUtils/GEOMUtils_Hatcher.hxx index adcc2a258..845fa5dcc 100755 --- a/src/GEOMUtils/GEOMUtils_Hatcher.hxx +++ b/src/GEOMUtils/GEOMUtils_Hatcher.hxx @@ -34,175 +34,178 @@ /*! * 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 index 000000000..00ad15878 --- /dev/null +++ b/src/GEOMUtils/GEOMUtils_XmlHandler.cxx @@ -0,0 +1,235 @@ +// 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 +#include + +//#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 getPluginXMLFiles() + { + std::list 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::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 xmlPaths = getPluginXMLFiles(); + + std::list::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(); + } // 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 index 000000000..e5952cff0 --- /dev/null +++ b/src/GEOMUtils/GEOMUtils_XmlHandler.hxx @@ -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 +// + +#include + +#ifndef _GEOMUtils_XmlHandler_HXX_ +#define _GEOMUtils_XmlHandler_HXX_ + +#include +#include + +namespace GEOMUtils +{ + //! Plugin action data + struct 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 PluginData + { + std::string name; //!< plugin name + std::string serverLib; //!< engine library + std::string clientLib; //!< GUI library + std::list actions; //!< actions + }; + + //! Plugins information + typedef std::list PluginInfo; + + PluginInfo ReadPluginInfo(); +} + +#endif // _GEOMUtils_XmlHandler_HXX_ diff --git a/src/GEOM_I/CMakeLists.txt b/src/GEOM_I/CMakeLists.txt index ca49d2aca..d916ffe60 100755 --- a/src/GEOM_I/CMakeLists.txt +++ b/src/GEOM_I/CMakeLists.txt @@ -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 diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index a764d3aeb..8069f40fe 100755 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -44,6 +44,7 @@ #include "GEOMImpl_CopyDriver.hxx" #include "GEOMImpl_IInsertOperations.hxx" #include "GEOM_wrap.hxx" +#include "GEOMUtils_XmlHandler.hxx" // Cascade headers #include @@ -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::ListOfGO_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 "<length() == 0) + MESSAGE("ImportXAO operation is failed for file "<IsDone()) MESSAGE("Import operation is not done for file "<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"); diff --git a/src/GEOM_I/GEOM_Gen_i.hh b/src/GEOM_I/GEOM_Gen_i.hh index 5a2c0382b..5af305551 100644 --- a/src/GEOM_I/GEOM_Gen_i.hh +++ b/src/GEOM_I/GEOM_Gen_i.hh @@ -404,6 +404,8 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi std::set& aChildren, std::set& anOthers); + void LoadPlugin(const std::string& theLibName); + private: ::GEOMImpl_Gen* _impl; diff --git a/src/GEOM_I/GEOM_IInsertOperations_i.cc b/src/GEOM_I/GEOM_IInsertOperations_i.cc index 3d8f79751..476e29ad7 100644 --- a/src/GEOM_I/GEOM_IInsertOperations_i.cc +++ b/src/GEOM_I/GEOM_IInsertOperations_i.cc @@ -113,11 +113,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); } //============================================================================= @@ -135,18 +131,7 @@ GEOM::ListOfGO* GEOM_IInsertOperations_i::ImportFile 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(); @@ -156,10 +141,8 @@ GEOM::ListOfGO* GEOM_IInsertOperations_i::ImportFile Standard_Integer aLength = aHSeq->Length(); aSeq->length(aLength); - - for (Standard_Integer i = 1; i <= aLength; i++) { + for (Standard_Integer i = 1; i <= aLength; i++) aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i))); - } return aSeq._retn(); } @@ -176,90 +159,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 @@ -370,121 +275,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 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 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; -} diff --git a/src/GEOM_I/GEOM_IInsertOperations_i.hh b/src/GEOM_I/GEOM_IInsertOperations_i.hh index d36e0446d..e06ffa08e 100644 --- a/src/GEOM_I/GEOM_IInsertOperations_i.hh +++ b/src/GEOM_I/GEOM_IInsertOperations_i.hh @@ -56,12 +56,6 @@ class GEOM_I_EXPORT GEOM_IInsertOperations_i : 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(); } }; diff --git a/src/GEOM_I/GEOM_wrap.hxx b/src/GEOM_I/GEOM_wrap.hxx index 181e7b18f..d4d99f776 100644 --- a/src/GEOM_I/GEOM_wrap.hxx +++ b/src/GEOM_I/GEOM_wrap.hxx @@ -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; } diff --git a/src/GEOM_I_Superv/CMakeLists.txt b/src/GEOM_I_Superv/CMakeLists.txt index 6fe8abeac..0d5323d4d 100755 --- a/src/GEOM_I_Superv/CMakeLists.txt +++ b/src/GEOM_I_Superv/CMakeLists.txt @@ -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} diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc index de9ef8b3d..9070d8e9b 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.cc +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -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")); } } @@ -1631,32 +1726,6 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportFile (const char* theFileName, 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" ); -} - //============================= TransformOperations =========================== //============================================================================= // TranslateTwoPoints: @@ -3367,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 diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.hh b/src/GEOM_I_Superv/GEOM_Superv_i.hh index 708a0dab6..f33f4f8bb 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.hh +++ b/src/GEOM_I_Superv/GEOM_Superv_i.hh @@ -28,6 +28,13 @@ // IDL headers #include #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); @@ -369,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 // @@ -699,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 // @@ -754,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 index 000000000..4c9b16dbf --- /dev/null +++ b/src/GEOM_SWIG/AdvancedGEOMBuilder.py @@ -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 index 000000000..edaba77a0 --- /dev/null +++ b/src/GEOM_SWIG/BREPPluginBuilder.py @@ -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 diff --git a/src/GEOM_SWIG/CMakeLists.txt b/src/GEOM_SWIG/CMakeLists.txt index e8460ba0a..02af16cdf 100755 --- a/src/GEOM_SWIG/CMakeLists.txt +++ b/src/GEOM_SWIG/CMakeLists.txt @@ -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) diff --git a/src/GEOM_SWIG/IGESPluginBuilder.py b/src/GEOM_SWIG/IGESPluginBuilder.py new file mode 100644 index 000000000..684b0296f --- /dev/null +++ b/src/GEOM_SWIG/IGESPluginBuilder.py @@ -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 index 000000000..1a12060dd --- /dev/null +++ b/src/GEOM_SWIG/STEPPluginBuilder.py @@ -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 index 000000000..39674429f --- /dev/null +++ b/src/GEOM_SWIG/STLPluginBuilder.py @@ -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 index 000000000..300535737 --- /dev/null +++ b/src/GEOM_SWIG/VTKPluginBuilder.py @@ -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 index 000000000..aa9eef681 --- /dev/null +++ b/src/GEOM_SWIG/XAOPluginBuilder.py @@ -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 diff --git a/src/GEOM_SWIG/geomBuilder.py b/src/GEOM_SWIG/geomBuilder.py index c64bd6f40..c0cd25a60 100644 --- a/src/GEOM_SWIG/geomBuilder.py +++ b/src/GEOM_SWIG/geomBuilder.py @@ -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 @@ -10706,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 instead, where 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. @@ -10729,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 instead, where 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. @@ -10753,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 instead, + where is a name of desirable format for importing. + """ aListObj = self.InsertOp.ImportFile(theFileName, theFormatName) RaiseIfFailed("ImportFile", self.InsertOp) aNbObj = len(aListObj) @@ -10767,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. @@ -10955,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 instead, where 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. @@ -10967,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 instead, where 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. @@ -10975,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 instead, + where 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 ## @} @@ -12645,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 @@ -13652,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 diff --git a/src/IGESExport/CMakeLists.txt b/src/IGESExport/CMakeLists.txt deleted file mode 100755 index 4ad448cbd..000000000 --- a/src/IGESExport/CMakeLists.txt +++ /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 index 894c2a5ba..000000000 --- a/src/IGESExport/IGESExport.cxx +++ /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 - -#include -#include -#include - -#include -#include - -#include - -#include - -#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 index 61d020ced..000000000 --- a/src/IGESImport/CMakeLists.txt +++ /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 index 711cceabb..000000000 --- a/src/IGESImport/IGESImport.cxx +++ /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 - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include // 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"<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 index 000000000..caa229704 --- /dev/null +++ b/src/IGESPlugin/CMakeLists.txt @@ -0,0 +1,149 @@ +# 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} + ) + +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 index 000000000..6f0c726ee --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_Engine.cxx @@ -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 index 000000000..5d01abe8c --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_Engine.hxx @@ -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 || 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 index 000000000..1b21c2c30 --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_ExportDlg.cxx @@ -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 +#include +#include +#include + +//================================================================================= +// 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 index 000000000..454b09a2a --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_ExportDlg.h @@ -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 + +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 index 000000000..29d1ea789 --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_ExportDriver.cxx @@ -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 +#include + +// GEOM includes +#include "GEOM_Function.hxx" + +// OOCT includes +#include +#include +#include + +#include +#include + +//============================================================================= +/*! + * 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& 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 index 000000000..353324deb --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_ExportDriver.hxx @@ -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 _IGESPlugin_ExportDriver_HXX +#define _IGESPlugin_ExportDriver_HXX + +// internal includes +#include "IGESPlugin_Engine.hxx" + +// GEOM includes +#include "GEOM_BaseDriver.hxx" + +// OCCT includes +#include + +DEFINE_STANDARD_HANDLE( IGESPlugin_ExportDriver, GEOM_BaseDriver ); + +class IGESPLUGINENGINE_EXPORT 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& 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 index 000000000..0dc269914 --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_GUI.cxx @@ -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 +#include +#include +#include +#include +#include +#include +#include +#include + +// GEOM includes +#include "GeometryGUI.h" +#include "GEOM_Operation.h" +#include "GEOMBase.h" +#include "GEOM_Displayer.h" + +#include +#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 ( 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 ( 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 index 000000000..58f6f9ccd --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_GUI.h @@ -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 index 000000000..85937db65 --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_IECallBack.cxx @@ -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 index 000000000..49b1f14e1 --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_IECallBack.hxx @@ -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 + +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 index 000000000..212480193 --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_IExport.hxx @@ -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 index 000000000..da1953d80 --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_IImport.hxx @@ -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 index 000000000..a6af6a7aa --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_IOperations.cxx @@ -0,0 +1,210 @@ +// 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 + +// GEOM includes +#include "GEOM_PythonDump.hxx" +#include "GEOMImpl_Types.hxx" + +#include // 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 { +#if OCC_VERSION_LARGE > 0x06010000 + OCC_CATCH_SIGNALS; +#endif + 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 { +#if OCC_VERSION_LARGE > 0x06010000 + OCC_CATCH_SIGNALS; +#endif + 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 index 000000000..a834f5765 --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_IOperations.hxx @@ -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 index 000000000..0b8766629 --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_IOperations_i.cc @@ -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 + +//============================================================================= +/*! + * 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 index 000000000..755b09769 --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_IOperations_i.hh @@ -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 +#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 index 000000000..4ae420e9b --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_ImportDriver.cxx @@ -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 +#include + +// GEOM includes +#include "GEOM_Function.hxx" +#include "GEOMImpl_Types.hxx" + +// OOCT includes +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include // 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& 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 index 000000000..2ab850f85 --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_ImportDriver.hxx @@ -0,0 +1,56 @@ +// 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 + +// internal includes +#include "IGESPlugin_Engine.hxx" + +// GEOM includes +#include "GEOM_BaseDriver.hxx" + +// OCCT includes +#include + +DEFINE_STANDARD_HANDLE( IGESPlugin_ImportDriver, GEOM_BaseDriver ); + +class IGESPLUGINENGINE_EXPORT 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& 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 index 000000000..3ea6fc73d --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_OperationsCreator.cxx @@ -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 +#include + +// OCCT includes +#include + +std::map 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 index 000000000..fa2eeb014 --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_OperationsCreator.hxx @@ -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 + +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 _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 index 000000000..7e1586624 --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_msg_en.ts @@ -0,0 +1,58 @@ + + + + + @default + + MEN_EXPORTIGES + IGES + + + TOP_EXPORTIGES + Export IGES + + + STB_EXPORTIGES + Export IGES + + + MEN_IMPORTIGES + IGES + + + TOP_IMPORTIGES + Import IGES + + + STB_IMPORTIGES + Import IGES + + + + IGESPlugin_GUI + + IGES_FILES + IGES Files ( *.iges *.igs ) + + + EXPORT_TITLE + Export IGES + + + IMPORT_TITLE + Import IGES + + + SCALE_DIMENSIONS + 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). + + + + IGESPlugin_ExportDlg + + IGES_VERSION + Version + + + diff --git a/src/IGESPlugin/IGESPlugin_msg_fr.ts b/src/IGESPlugin/IGESPlugin_msg_fr.ts new file mode 100644 index 000000000..f5b26302c --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_msg_fr.ts @@ -0,0 +1,58 @@ + + + + + @default + + MEN_EXPORTIGES + IGES + + + TOP_EXPORTIGES + Exporter IGES + + + STB_EXPORTIGES + Exporter IGES + + + MEN_IMPORTIGES + IGES + + + TOP_IMPORTIGES + Importer IGES + + + STB_IMPORTIGES + Importer IGES + + + + IGESPlugin_GUI + + IGES_FILES + IGES Fichiers ( *.iges *.igs ) + + + EXPORT_TITLE + Exporter IGES + + + IMPORT_TITLE + Importer IGES + + + SCALE_DIMENSIONS + Voulez-vous prendre les unités du fichier (%1) en considération? +Sinon le modèle sera mis à l'échelle GEOM (unités interprétées comme des mètres). + + + + IGESPlugin_ExportDlg + + IGES_VERSION + Version + + + diff --git a/src/IGESPlugin/IGESPlugin_msg_ja.ts b/src/IGESPlugin/IGESPlugin_msg_ja.ts new file mode 100644 index 000000000..5064dead2 --- /dev/null +++ b/src/IGESPlugin/IGESPlugin_msg_ja.ts @@ -0,0 +1,57 @@ + + + + + @default + + MEN_EXPORTIGES + IGES + + + TOP_EXPORTIGES + Export IGES + + + STB_EXPORTIGES + Export IGES + + + MEN_IMPORTIGES + IGES + + + TOP_IMPORTIGES + Import IGES + + + STB_IMPORTIGES + Import IGES + + + + IGESPlugin_GUI + + IGES_FILES + IGES Files ( *.iges *.igs ) + + + EXPORT_TITLE + Export IGES + + + IMPORT_TITLE + Import IGES + + + SCALE_DIMENSIONS + インポートしたファイルの単位をミリメートルからメートルに変換しますか?いいえを選んだ場合、メートル単位として解釈します。 + + + + IGESPlugin_ExportDlg + + IGES_VERSION + Version + + + diff --git a/src/ImportExportGUI/CMakeLists.txt b/src/ImportExportGUI/CMakeLists.txt deleted file mode 100644 index f5d9416af..000000000 --- a/src/ImportExportGUI/CMakeLists.txt +++ /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_ExportXAODlg.cxx b/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx deleted file mode 100644 index e620fc8c6..000000000 --- a/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx +++ /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 -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -// OCCT Includes -#include -#include -#include -#include -#include - -#include -#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 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::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 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::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/OBJECT/GEOM_OCCReader.cxx b/src/OBJECT/GEOM_OCCReader.cxx index 02e81bdf1..61e7208b3 100644 --- a/src/OBJECT/GEOM_OCCReader.cxx +++ b/src/OBJECT/GEOM_OCCReader.cxx @@ -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, diff --git a/src/OBJECT/GEOM_OCCReader.h b/src/OBJECT/GEOM_OCCReader.h index ed47445a7..63b622fb8 100644 --- a/src/OBJECT/GEOM_OCCReader.h +++ b/src/OBJECT/GEOM_OCCReader.h @@ -39,7 +39,10 @@ class vtkPoints; class vtkCellArray; -class GEOMUtils_Hatcher; +namespace GEOMUtils +{ + class Hatcher; +} // OpenCASCADE #include @@ -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, diff --git a/src/OCC2VTK/GEOM_FaceSource.h b/src/OCC2VTK/GEOM_FaceSource.h index 4627f7a48..68d507657 100755 --- a/src/OCC2VTK/GEOM_FaceSource.h +++ b/src/OCC2VTK/GEOM_FaceSource.h @@ -1,4 +1,4 @@ -#include // 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 diff --git a/src/OCC2VTK/GEOM_WireframeFace.cxx b/src/OCC2VTK/GEOM_WireframeFace.cxx index 8c94300f5..f9d31608e 100755 --- a/src/OCC2VTK/GEOM_WireframeFace.cxx +++ b/src/OCC2VTK/GEOM_WireframeFace.cxx @@ -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; diff --git a/src/OCC2VTK/GEOM_WireframeFace.h b/src/OCC2VTK/GEOM_WireframeFace.h index 27947dd20..c4dcbc96b 100755 --- a/src/OCC2VTK/GEOM_WireframeFace.h +++ b/src/OCC2VTK/GEOM_WireframeFace.h @@ -27,7 +27,11 @@ #include 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 diff --git a/src/STEPExport/CMakeLists.txt b/src/STEPExport/CMakeLists.txt deleted file mode 100755 index 45965bf43..000000000 --- a/src/STEPExport/CMakeLists.txt +++ /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 index 35f14f27b..000000000 --- a/src/STEPExport/STEPExport.cxx +++ /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 - -#include - -#include -#include - -#include -#include - -#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 index 47ebea3e1..000000000 --- a/src/STEPImport/CMakeLists.txt +++ /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 index 0dc8d7057..000000000 --- a/src/STEPImport/STEPImport.cxx +++ /dev/null @@ -1,581 +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 -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include // 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 { -#if OCC_VERSION_LARGE > 0x06010000 - OCC_CATCH_SIGNALS; -#endif - 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"<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 index 000000000..71c1097dc --- /dev/null +++ b/src/STEPPlugin/CMakeLists.txt @@ -0,0 +1,147 @@ +# 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} + ) + +IF(SALOME_BUILD_GUI) +ADD_DEFINITIONS( + ${QT_DEFINITIONS} + ) +ENDIF() + +# libraries to link to +SET(_link_engine_LIBRARIES + ${CAS_TKSTEP} + ${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 index 000000000..c1718744a --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_Engine.cxx @@ -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 index 000000000..624eb2210 --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_Engine.hxx @@ -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 index 000000000..ba35ffbe3 --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_ExportDriver.cxx @@ -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 +#include + +// GEOM includes +#include "GEOM_Function.hxx" + +// OOCT includes +#include +#include +#include +#include +#include + +//======================================================================= +//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& 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 index 000000000..000226491 --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_ExportDriver.hxx @@ -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 _STEPPlugin_ExportDriver_HXX +#define _STEPPlugin_ExportDriver_HXX + +// internal includes +#include "STEPPlugin_Engine.hxx" + +// GEOM includes +#include "GEOM_BaseDriver.hxx" + +// OCCT includes +#include + +DEFINE_STANDARD_HANDLE( STEPPlugin_ExportDriver, GEOM_BaseDriver ); + +class STEPPLUGINENGINE_EXPORT 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& 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 index 000000000..b43651a15 --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_GUI.cxx @@ -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 +#include +#include +#include +#include +#include +#include +#include +#include + +// GEOM includes +#include "GeometryGUI.h" +#include "GEOM_Operation.h" +#include "GEOMBase.h" +#include "GEOM_Displayer.h" + +#include +#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 ( 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 ( 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 index 000000000..05d989474 --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_GUI.h @@ -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 index 000000000..6089df832 --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_IECallBack.cxx @@ -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 index 000000000..4f6f571c3 --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_IECallBack.hxx @@ -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 + +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 index 000000000..70fc5da19 --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_IExport.hxx @@ -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 index 000000000..9c2679a0c --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_IImport.hxx @@ -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 index 000000000..7a0de8b8e --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_IOperations.cxx @@ -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 "STEPPlugin_IOperations.hxx" +#include "STEPPlugin_ExportDriver.hxx" +#include "STEPPlugin_ImportDriver.hxx" +#include "STEPPlugin_IExport.hxx" +#include "STEPPlugin_IImport.hxx" + +// KERNEL includes +#include + +// GEOM includes +#include "GEOM_PythonDump.hxx" +#include "GEOMImpl_Types.hxx" + +#include // 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 { +#if OCC_VERSION_LARGE > 0x06010000 + OCC_CATCH_SIGNALS; +#endif + 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 { +#if OCC_VERSION_LARGE > 0x06010000 + OCC_CATCH_SIGNALS; +#endif + 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 index 000000000..6d4999815 --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_IOperations.hxx @@ -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 index 000000000..1f4ded47a --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_IOperations_i.cc @@ -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 + +//============================================================================= +/*! + * 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 index 000000000..41833f822 --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_IOperations_i.hh @@ -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 +#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 index 000000000..3fb26c5cf --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_ImportDriver.cxx @@ -0,0 +1,614 @@ +// 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 +#include + +// GEOM includes +#include "GEOM_Function.hxx" +#include "GEOMImpl_Types.hxx" + +// OOCT includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include // 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& 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 { +#if OCC_VERSION_LARGE > 0x06010000 + OCC_CATCH_SIGNALS; +#endif + 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 index 000000000..a8c2b0cf0 --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_ImportDriver.hxx @@ -0,0 +1,56 @@ +// 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 + +// internal includes +#include "STEPPlugin_Engine.hxx" + +// GEOM includes +#include "GEOM_BaseDriver.hxx" + +// OCCT includes +#include + +DEFINE_STANDARD_HANDLE( STEPPlugin_ImportDriver, GEOM_BaseDriver ); + +class STEPPLUGINENGINE_EXPORT 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& 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 index 000000000..d3d31a18d --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_OperationsCreator.cxx @@ -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 +#include + +// GEOM includes +#include "GEOMImpl_IECallBack.hxx" + +// OCCT includes +#include + +std::map 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 index 000000000..5e3cb9575 --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_OperationsCreator.hxx @@ -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 + +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 _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 index 000000000..d24fc9014 --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_msg_en.ts @@ -0,0 +1,51 @@ + + + + + @default + + MEN_EXPORTSTEP + STEP + + + TOP_EXPORTSTEP + Export STEP + + + STB_EXPORTSTEP + Export STEP + + + MEN_IMPORTSTEP + STEP + + + TOP_IMPORTSTEP + Import STEP + + + STB_IMPORTSTEP + Import STEP + + + + STEPPlugin_GUI + + STEP_FILES + STEP Files ( *.step *.stp ) + + + EXPORT_TITLE + Export STEP + + + IMPORT_TITLE + Import STEP + + + SCALE_DIMENSIONS + 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). + + + diff --git a/src/STEPPlugin/STEPPlugin_msg_fr.ts b/src/STEPPlugin/STEPPlugin_msg_fr.ts new file mode 100644 index 000000000..077fc096f --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_msg_fr.ts @@ -0,0 +1,51 @@ + + + + + @default + + MEN_EXPORTSTEP + STEP + + + TOP_EXPORTSTEP + Exporter STEP + + + STB_EXPORTSTEP + Exporter STEP + + + MEN_IMPORTSTEP + STEP + + + TOP_IMPORTSTEP + Importer STEP + + + STB_IMPORTSTEP + Importer STEP + + + + STEPPlugin_GUI + + STEP_FILES + STEP Fichiers ( *.step *.stp ) + + + EXPORT_TITLE + Exporter STEP + + + IMPORT_TITLE + Importer STEP + + + SCALE_DIMENSIONS + Voulez-vous prendre les unités du fichier (%1) en considération? +Sinon le modèle sera mis à l'échelle GEOM (unités interprétées comme des mètres). + + + diff --git a/src/STEPPlugin/STEPPlugin_msg_ja.ts b/src/STEPPlugin/STEPPlugin_msg_ja.ts new file mode 100644 index 000000000..459ee3442 --- /dev/null +++ b/src/STEPPlugin/STEPPlugin_msg_ja.ts @@ -0,0 +1,50 @@ + + + + + @default + + MEN_EXPORTSTEP + STEP + + + TOP_EXPORTSTEP + Export STEP + + + STB_EXPORTSTEP + Export STEP + + + MEN_IMPORTSTEP + STEP + + + TOP_IMPORTSTEP + Import STEP + + + STB_IMPORTSTEP + Import STEP + + + + STEPPlugin_GUI + + STEP_FILES + STEP Files ( *.step *.stp ) + + + EXPORT_TITLE + Export STEP + + + IMPORT_TITLE + Import STEP + + + SCALE_DIMENSIONS + インポートしたファイルの単位をミリメートルからメートルに変換しますか?いいえを選んだ場合、メートル単位として解釈します。 + + + diff --git a/src/STLExport/CMakeLists.txt b/src/STLExport/CMakeLists.txt deleted file mode 100755 index ce8046fb7..000000000 --- a/src/STLExport/CMakeLists.txt +++ /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 index dc0dfb631..000000000 --- a/src/STLExport/STLExport.cxx +++ /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 -// -// -#include "utilities.h" - -#include - -#include -#include - -#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 index 54750b83d..000000000 --- a/src/STLImport/CMakeLists.txt +++ /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 index 0b4189e0a..000000000 --- a/src/STLImport/STLImport.cxx +++ /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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#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 index 000000000..0b9420c3f --- /dev/null +++ b/src/STLPlugin/CMakeLists.txt @@ -0,0 +1,149 @@ +# 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} + ) + +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 index 000000000..49fb94c80 --- /dev/null +++ b/src/STLPlugin/STLPlugin_Engine.cxx @@ -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 index 000000000..df3244fa2 --- /dev/null +++ b/src/STLPlugin/STLPlugin_Engine.hxx @@ -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 index 000000000..8d16f234e --- /dev/null +++ b/src/STLPlugin/STLPlugin_ExportDlg.cxx @@ -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 +#include +#include + +#include +#include +#include + +// GEOM includes +#include "GEOMBase.h" +#include "GEOM_Constants.h" + +// OCC includes +#include + +// QT includes +#include +#include +#include +#include +#include + +//================================================================================= +// 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 index 000000000..e79722e1a --- /dev/null +++ b/src/STLPlugin/STLPlugin_ExportDlg.h @@ -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 +#include + +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 index 000000000..f800a7d0b --- /dev/null +++ b/src/STLPlugin/STLPlugin_ExportDriver.cxx @@ -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 +#include + +// GEOM includes +#include "GEOM_Function.hxx" + +// OOCT includes +#include +#include +#include + +//======================================================================= +//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& 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 index 000000000..4726a16d3 --- /dev/null +++ b/src/STLPlugin/STLPlugin_ExportDriver.hxx @@ -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 _STLPlugin_ExportDriver_HXX +#define _STLPlugin_ExportDriver_HXX + +// internal includes +#include "STLPlugin_Engine.hxx" + +// GEOM includes +#include "GEOM_BaseDriver.hxx" + +// OCCT includes +#include + +DEFINE_STANDARD_HANDLE( STLPlugin_ExportDriver, GEOM_BaseDriver ); + +class STLPLUGINENGINE_EXPORT 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& 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 index 000000000..d0ee88ef8 --- /dev/null +++ b/src/STLPlugin/STLPlugin_GUI.cxx @@ -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 +#include +#include +#include +#include +#include +#include +#include +#include + +// GEOM includes +#include "GeometryGUI.h" +#include "GEOM_Operation.h" +#include "GEOMBase.h" +#include "GEOM_Displayer.h" + +#include +#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 ( 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 ( 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 index 000000000..061afb986 --- /dev/null +++ b/src/STLPlugin/STLPlugin_GUI.h @@ -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 index 000000000..14d365cc1 --- /dev/null +++ b/src/STLPlugin/STLPlugin_IECallBack.cxx @@ -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 index 000000000..a833ced7f --- /dev/null +++ b/src/STLPlugin/STLPlugin_IECallBack.hxx @@ -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 + +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 index 000000000..8c2573d82 --- /dev/null +++ b/src/STLPlugin/STLPlugin_IExport.hxx @@ -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 index 000000000..247b1be10 --- /dev/null +++ b/src/STLPlugin/STLPlugin_IImport.hxx @@ -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 index 000000000..f089fdc29 --- /dev/null +++ b/src/STLPlugin/STLPlugin_IOperations.cxx @@ -0,0 +1,181 @@ +// 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 + +// GEOM includes +#include "GEOM_PythonDump.hxx" +#include "GEOMImpl_Types.hxx" + +#include // 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 { +#if OCC_VERSION_LARGE > 0x06010000 + OCC_CATCH_SIGNALS; +#endif + 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 { +#if OCC_VERSION_LARGE > 0x06010000 + OCC_CATCH_SIGNALS; +#endif + 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 index 000000000..c6c39daaa --- /dev/null +++ b/src/STLPlugin/STLPlugin_IOperations.hxx @@ -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 index 000000000..ebb81ef06 --- /dev/null +++ b/src/STLPlugin/STLPlugin_IOperations_i.cc @@ -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 + +//============================================================================= +/*! + * 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 index 000000000..f0733e1e0 --- /dev/null +++ b/src/STLPlugin/STLPlugin_IOperations_i.hh @@ -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 +#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 index 000000000..40a96a889 --- /dev/null +++ b/src/STLPlugin/STLPlugin_ImportDriver.cxx @@ -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 +#include + +// GEOM includes +#include "GEOM_Function.hxx" +#include "GEOMImpl_Types.hxx" + +// OOCT includes +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//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& 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 index 000000000..8373e59d7 --- /dev/null +++ b/src/STLPlugin/STLPlugin_ImportDriver.hxx @@ -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 _STLPlugin_ImportDriver_HXX +#define _STLPlugin_ImportDriver_HXX + +// internal includes +#include "STLPlugin_Engine.hxx" + +// GEOM includes +#include "GEOM_BaseDriver.hxx" + +// OCCT includes +#include + +DEFINE_STANDARD_HANDLE( STLPlugin_ImportDriver, GEOM_BaseDriver ); + +class STLPLUGINENGINE_EXPORT 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& 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 index 000000000..f2a47a07b --- /dev/null +++ b/src/STLPlugin/STLPlugin_OperationsCreator.cxx @@ -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 +#include + +// OCCT includes +#include + +std::map 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 index 000000000..62314324e --- /dev/null +++ b/src/STLPlugin/STLPlugin_OperationsCreator.hxx @@ -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 + +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 _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 index 000000000..c8f10a272 --- /dev/null +++ b/src/STLPlugin/STLPlugin_msg_en.ts @@ -0,0 +1,61 @@ + + + + + @default + + MEN_EXPORTSTL + STL + + + TOP_EXPORTSTL + Export STL + + + STB_EXPORTSTL + Export STL + + + MEN_IMPORTSTL + STL + + + TOP_IMPORTSTL + Import STL + + + STB_IMPORTSTL + Import STL + + + + STLPlugin_GUI + + STL_FILES + STL files( *.stl ) + + + EXPORT_TITLE + Export STL + + + IMPORT_TITLE + Import STL + + + + STLPlugin_ExportDlg + + ASCII + Save as ASCII + + + RELATIVE + Relative + + + DEFLECTION + Deflection + + + diff --git a/src/STLPlugin/STLPlugin_msg_fr.ts b/src/STLPlugin/STLPlugin_msg_fr.ts new file mode 100644 index 000000000..e4347f829 --- /dev/null +++ b/src/STLPlugin/STLPlugin_msg_fr.ts @@ -0,0 +1,61 @@ + + + + + @default + + MEN_EXPORTSTL + STL + + + TOP_EXPORTSTL + Exporter STL + + + STB_EXPORTSTL + Exporter STL + + + MEN_IMPORTSTL + STL + + + TOP_IMPORTSTL + Importer STL + + + STB_IMPORTSTL + Importer STL + + + + STLPlugin_GUI + + STL_FILES + STL fichiers( *.stl ) + + + EXPORT_TITLE + Exporter STL + + + IMPORT_TITLE + Importer STL + + + + STLPlugin_ExportDlg + + ASCII + Save as ASCII + + + RELATIVE + Relative + + + DEFLECTION + Déflexion + + + diff --git a/src/STLPlugin/STLPlugin_msg_ja.ts b/src/STLPlugin/STLPlugin_msg_ja.ts new file mode 100644 index 000000000..1c10df04f --- /dev/null +++ b/src/STLPlugin/STLPlugin_msg_ja.ts @@ -0,0 +1,61 @@ + + + + + @default + + MEN_EXPORTSTL + STL + + + TOP_EXPORTSTL + Export STL + + + STB_EXPORTSTL + Export STL + + + MEN_IMPORTSTL + STL + + + TOP_IMPORTSTL + Import STL + + + STB_IMPORTSTL + Import STL + + + + STLPlugin_GUI + + STL_FILES + STL files( *.stl ) + + + EXPORT_TITLE + Export STL + + + IMPORT_TITLE + Import STL + + + + STLPlugin_ExportDlg + + ASCII + Save as ASCII + + + RELATIVE + Relative + + + DEFLECTION + Deflection + + + diff --git a/src/VTKExport/CMakeLists.txt b/src/VTKExport/CMakeLists.txt deleted file mode 100755 index 04081e0a3..000000000 --- a/src/VTKExport/CMakeLists.txt +++ /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 index ab853c4af..000000000 --- a/src/VTKExport/VTKExport.cxx +++ /dev/null @@ -1,160 +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 - -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#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, - 0, // all vertices were added above - 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 index 000000000..afab5da2f --- /dev/null +++ b/src/VTKPlugin/CMakeLists.txt @@ -0,0 +1,149 @@ +# 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/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} + ) + +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 index 000000000..5c0ed2e53 --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_Engine.cxx @@ -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 index 000000000..cd373e1d7 --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_Engine.hxx @@ -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 index 000000000..901221594 --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_ExportDlg.cxx @@ -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 +#include CORBA_SERVER_HEADER(VTKPlugin) + +// GUI includes +#include +#include +#include + +#include +#include +#include + +// GEOM includes +#include "GEOM_Constants.h" + +// QT includes +#include +#include +#include + +//================================================================================= +// 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 index 000000000..d8e4095d4 --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_ExportDlg.h @@ -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 +#include + +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 index 000000000..a77897278 --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_ExportDriver.cxx @@ -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 +#include + +// 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 +#include +#include +#include +#include +#include +#include +#include + +// VTK includes +#include +#include + +//======================================================================= +//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& 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 index 000000000..cc055b9d9 --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_ExportDriver.hxx @@ -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_ExportDriver_HXX +#define _VTKPlugin_ExportDriver_HXX + +// internal includes +#include "VTKPlugin_Engine.hxx" + +// GEOM includes +#include "GEOM_BaseDriver.hxx" + +// OCCT includes +#include + +DEFINE_STANDARD_HANDLE( VTKPlugin_ExportDriver, GEOM_BaseDriver ); + +class VTKPLUGINENGINE_EXPORT 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& 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 index 000000000..d5bec2d72 --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_GUI.cxx @@ -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 +#include +#include +#include +#include +#include +#include + +// GEOM includes +#include "GeometryGUI.h" +#include "GEOM_Operation.h" +#include "GEOMBase.h" +#include "GEOM_Displayer.h" + +#include +#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 ( 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 index 000000000..a24f5dfdc --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_GUI.h @@ -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 index 000000000..25f1658f4 --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_IECallBack.cxx @@ -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 index 000000000..a0e91f4a4 --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_IECallBack.hxx @@ -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 + +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 index 000000000..5fe83e646 --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_IExport.hxx @@ -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 index 000000000..6e18dd154 --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_IOperations.cxx @@ -0,0 +1,111 @@ +// 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 + +// GEOM includes +#include "GEOM_PythonDump.hxx" +#include "GEOMImpl_Types.hxx" + +#include // 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 { +#if OCC_VERSION_LARGE > 0x06010000 + OCC_CATCH_SIGNALS; +#endif + 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 index 000000000..dc7a6174c --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_IOperations.hxx @@ -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 index 000000000..f73c9486b --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_IOperations_i.cc @@ -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 + +//============================================================================= +/*! + * 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 index 000000000..1a0d0aec6 --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_IOperations_i.hh @@ -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 +#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 index 000000000..c71ab52ed --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_OperationsCreator.cxx @@ -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 +#include + +// OCCT includes +#include + +std::map 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 index 000000000..9d9b1aeaf --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_OperationsCreator.hxx @@ -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 + +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 _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 index 000000000..720bfcac1 --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_msg_en.ts @@ -0,0 +1,49 @@ + + + + + @default + + MEN_EXPORTVTK + VTK + + + TOP_EXPORTVTK + Export VTK + + + STB_EXPORTVTK + Export VTK + + + MEN_IMPORTVTK + VTK + + + TOP_IMPORTVTK + Import VTK + + + STB_IMPORTVTK + Import VTK + + + + VTKPlugin_GUI + + VTK_FILES + VTK files( *.vtk ) + + + EXPORT_TITLE + Export VTK + + + + VTKPlugin_ExportDlg + + DEFLECTION + Deflection + + + diff --git a/src/VTKPlugin/VTKPlugin_msg_fr.ts b/src/VTKPlugin/VTKPlugin_msg_fr.ts new file mode 100644 index 000000000..276a5ab48 --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_msg_fr.ts @@ -0,0 +1,49 @@ + + + + + @default + + MEN_EXPORTVTK + VTK + + + TOP_EXPORTVTK + Exporter VTK + + + STB_EXPORTVTK + Exporter VTK + + + MEN_IMPORTVTK + VTK + + + TOP_IMPORTVTK + Importer VTK + + + STB_IMPORTVTK + Importer VTK + + + + VTKPlugin_GUI + + VTK_FILES + VTK fichiers( *.vtk ) + + + EXPORT_TITLE + Exporter VTK + + + + VTKPlugin_ExportDlg + + DEFLECTION + Déflexion + + + diff --git a/src/VTKPlugin/VTKPlugin_msg_ja.ts b/src/VTKPlugin/VTKPlugin_msg_ja.ts new file mode 100644 index 000000000..8b0df3ae8 --- /dev/null +++ b/src/VTKPlugin/VTKPlugin_msg_ja.ts @@ -0,0 +1,49 @@ + + + + + @default + + MEN_EXPORTVTK + VTK + + + TOP_EXPORTVTK + Export VTK + + + STB_EXPORTVTK + Export VTK + + + MEN_IMPORTVTK + VTK + + + TOP_IMPORTVTK + Import VTK + + + STB_IMPORTVTK + Import VTK + + + + VTKPlugin_GUI + + VTK_FILES + VTK files( *.vtk ) + + + EXPORT_TITLE + Export VTK + + + + VTKPlugin_ExportDlg + + DEFLECTION + Deflection + + + diff --git a/src/XAOPlugin/CMakeLists.txt b/src/XAOPlugin/CMakeLists.txt new file mode 100644 index 000000000..7d24c4345 --- /dev/null +++ b/src/XAOPlugin/CMakeLists.txt @@ -0,0 +1,151 @@ +# 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} + ) + +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 index 000000000..1c16ae792 --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_Driver.cxx @@ -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 +#include +#include +#include + +// OCC includes +#include +#include +#include + +//======================================================================= +//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 index 000000000..855b533d1 --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_Driver.hxx @@ -0,0 +1,48 @@ +// 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 + +// internal includes +#include "XAOPlugin_Engine.hxx" + +// OCCT includes +#include + +DEFINE_STANDARD_HANDLE(XAOPlugin_Driver, TFunction_Driver); + +class XAOPLUGINENGINE_EXPORT 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 index 000000000..e78ce5a47 --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_Engine.cxx @@ -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 index 000000000..9dd44dce1 --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_Engine.hxx @@ -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 index 000000000..01e570f64 --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_ExportDlg.cxx @@ -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 +#include +#include +#include + +#include +#include +#include +#include + +// GEOM includes +#include "GeometryGUI.h" +#include "GEOMBase.h" +#include "GEOMImpl_Types.hxx" + +// OCCT Includes +#include +#include +#include +#include +#include + +// QT includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//================================================================================= +// 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 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::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 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::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/ImportExportGUI/ImportExportGUI_ImportXAODlg.h b/src/XAOPlugin/XAOPlugin_ExportDlg.h similarity index 52% rename from src/ImportExportGUI/ImportExportGUI_ImportXAODlg.h rename to src/XAOPlugin/XAOPlugin_ExportDlg.h index d241ace6b..a2338e2e5 100644 --- a/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.h +++ b/src/XAOPlugin/XAOPlugin_ExportDlg.h @@ -17,52 +17,59 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef IMPORTEXPORTGUI_IMPORTXAODLG_H -#define IMPORTEXPORTGUI_IMPORTXAODLG_H +#ifndef XAOPlugin_ExportDlg_H +#define XAOPlugin_ExportDlg_H -#include -#include +// GEOM includes +#include "GEOMBase_Skeleton.h" class QLineEdit; class QButtonGroup; class QListWidget; +class QPushButton; //================================================================================= -// class : ImportExportGUI_ImportXAODlg +// class : XAOPlugin_ExportDlg // purpose : //================================================================================= -class ImportExportGUI_ImportXAODlg: public GEOMBase_Skeleton +class XAOPlugin_ExportDlg: public GEOMBase_Skeleton { - Q_OBJECT + Q_OBJECT public: - ImportExportGUI_ImportXAODlg(GeometryGUI*, QWidget* = 0); - ~ImportExportGUI_ImportXAODlg(); + 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(); - 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 ); + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid(QString&); + virtual bool execute(); private: - void Init(); - void enterEvent(QEvent*); + void Init(); + void enterEvent(QEvent*); + void processObject(); private: - QLineEdit* ledFileName; - QPushButton* btnFileSelect; - GEOM::GEOM_Object_var m_mainShape; + GEOM::GEOM_Object_var m_mainObj; + QList m_groups; + QList 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 LineEditReturnPressed(); - void btnFileSelectClicked(); + void ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); + void btnFileSelectClicked(); }; -#endif // IMPORTEXPORTGUI_EXPORTXAODLG_H +#endif // XAOPlugin_ExportDlg_H diff --git a/src/ImportExportGUI/ImportExportGUI.cxx b/src/XAOPlugin/XAOPlugin_GUI.cxx similarity index 53% rename from src/ImportExportGUI/ImportExportGUI.cxx rename to src/XAOPlugin/XAOPlugin_GUI.cxx index 27de1ef59..6bb816445 100644 --- a/src/ImportExportGUI/ImportExportGUI.cxx +++ b/src/XAOPlugin/XAOPlugin_GUI.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2013-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// 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 @@ -17,38 +17,31 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include -#include +// internal includes +#include "XAOPlugin_GUI.h" +#include "XAOPlugin_ExportDlg.h" +#include "XAOPlugin_ImportDlg.h" -#include "GeometryGUI.h" -#include "GeometryGUI_Operations.h" - -#include -#include +// GUI includes #include -#include #include -#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 @@// - +// GEOM includes +#include "GeometryGUI.h" //======================================================================= -// function : ImportExportGUI() +// function : XAOPlugin_GUI() // purpose : Constructor //======================================================================= -ImportExportGUI::ImportExportGUI(GeometryGUI* parent) : - GEOMGUI(parent) +XAOPlugin_GUI::XAOPlugin_GUI( GeometryGUI* parent ) : GEOMPluginGUI( parent ) { } //======================================================================= -// function : ~ImportExportGUI +// function : ~XAOPlugin_GUI // purpose : Destructor //======================================================================= -ImportExportGUI::~ImportExportGUI() +XAOPlugin_GUI::~XAOPlugin_GUI() { } @@ -56,32 +49,42 @@ ImportExportGUI::~ImportExportGUI() // function : OnGUIEvent() // purpose : //======================================================================= -bool ImportExportGUI::OnGUIEvent(int commandId, SUIT_Desktop* parent) +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; + SalomeApp_Application* app = getGeometryGUI()->getApp(); + if (!app) return false; - getGeometryGUI()->EmitSignalDeactivateDialog(); + 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; - } + 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(); + if (dialog != NULL) + dialog->show(); - return true; + return true; } //===================================================================================== @@ -92,8 +95,8 @@ extern "C" #ifdef WIN32 __declspec( dllexport ) #endif - GEOMGUI* GetLibGUI(GeometryGUI* parent) - { - return new ImportExportGUI(parent); - } + GEOMGUI* GetLibGUI(GeometryGUI* parent) + { + return new XAOPlugin_GUI(parent); + } } diff --git a/src/ImportExportGUI/ImportExportGUI.h b/src/XAOPlugin/XAOPlugin_GUI.h similarity index 68% rename from src/ImportExportGUI/ImportExportGUI.h rename to src/XAOPlugin/XAOPlugin_GUI.h index 1c3864a27..bbd83db36 100644 --- a/src/ImportExportGUI/ImportExportGUI.h +++ b/src/XAOPlugin/XAOPlugin_GUI.h @@ -1,4 +1,4 @@ -// Copyright (C) 2013-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// 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 @@ -17,25 +17,23 @@ // 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 +#ifndef XAOPlugin_GUI_H +#define XAOPlugin_GUI_H -#include "GEOMGUI.h" +#include "GEOMPluginGUI.h" //================================================================================= -// class : ImportExportGUI +// class : XAOPlugin_GUI // purpose : //================================================================================= -class ImportExportGUI: public GEOMGUI +class XAOPlugin_GUI: public GEOMPluginGUI { public: - ImportExportGUI(GeometryGUI* parent); - ~ImportExportGUI(); + XAOPlugin_GUI(GeometryGUI* parent); + ~XAOPlugin_GUI(); - bool OnGUIEvent(int commandId, SUIT_Desktop* parent); + bool OnGUIEvent( int commandId, SUIT_Desktop* ); + bool OnGUIEvent( const QString&, SUIT_Desktop* ); }; -#endif // IMPORTEXPORTGUI_H +#endif // XAOPlugin_GUI_H diff --git a/src/XAOPlugin/XAOPlugin_IECallBack.cxx b/src/XAOPlugin/XAOPlugin_IECallBack.cxx new file mode 100644 index 000000000..f6b19e580 --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_IECallBack.cxx @@ -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 lgroups; + std::list 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 index 000000000..50168eac9 --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_IECallBack.hxx @@ -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 + +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/GEOMImpl/GEOMImpl_IImportExportXAO.hxx b/src/XAOPlugin/XAOPlugin_IImportExport.hxx similarity index 83% rename from src/GEOMImpl/GEOMImpl_IImportExportXAO.hxx rename to src/XAOPlugin/XAOPlugin_IImportExport.hxx index bcbd4de28..4f5727536 100644 --- a/src/GEOMImpl/GEOMImpl_IImportExportXAO.hxx +++ b/src/XAOPlugin/XAOPlugin_IImportExport.hxx @@ -17,17 +17,17 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef _GEOMImpl_IImportExportXAO_HXX_ -#define _GEOMImpl_IImportExportXAO_HXX_ +#ifndef _XAOPlugin_IImportExport_HXX_ +#define _XAOPlugin_IImportExport_HXX_ #include "GEOM_Function.hxx" #define IMPORTEXPORTXAO_ARG_DATA 1 -class GEOMImpl_IImportExportXAO +class XAOPlugin_IImportExport { public: - GEOMImpl_IImportExportXAO(Handle(GEOM_Function) theFunction): _func(theFunction) {} + 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); } @@ -36,4 +36,4 @@ private: Handle(GEOM_Function) _func; }; -#endif // _GEOMImpl_IExportXAO_HXX_ +#endif // _XAOPlugin_IImportExport_HXX_ diff --git a/src/XAOPlugin/XAOPlugin_IOperations.cxx b/src/XAOPlugin/XAOPlugin_IOperations.cxx new file mode 100644 index 000000000..a2eae44db --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_IOperations.cxx @@ -0,0 +1,670 @@ +// 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 +#include + +// 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +// OCC includes +#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 +#include +#include +#else +#include +#endif +#include + + +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 groupList, + XAO::Xao* xaoObject, + XAO::BrepGeometry* geometry ) +{ + // add the groups + std::list::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 fieldList, + XAO::Xao* xaoObject, + XAO::BrepGeometry* geometry ) +{ + std::list::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::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 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 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 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 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 groupList, + std::list 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::iterator itGroup = groupList.begin(); + pd << (*itGroup++); + while (itGroup != groupList.end()) + { + pd << ", " << (*itGroup++); + } + } + + // list of fields + pd << "], ["; + if (fieldList.size() > 0) + { + std::list::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::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 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 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 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 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 index 000000000..34e17b2c5 --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_IOperations.hxx @@ -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 + +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 groupList, + std::list 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 fieldList, + XAO::Xao* xaoObject, + XAO::BrepGeometry* geometry ); + void exportGroups( std::list 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 index 000000000..cbda713a9 --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_IOperations_i.cc @@ -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 + +//============================================================================= +/*! + * 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 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 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 index 000000000..6e7b89cda --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_IOperations_i.hh @@ -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 +#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/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx b/src/XAOPlugin/XAOPlugin_ImportDlg.cxx similarity index 67% rename from src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx rename to src/XAOPlugin/XAOPlugin_ImportDlg.cxx index 5272fa788..6acce2f5e 100644 --- a/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx +++ b/src/XAOPlugin/XAOPlugin_ImportDlg.cxx @@ -17,26 +17,29 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include -#include -#include -#include +// internal includes +#include "XAOPlugin_ImportDlg.h" +#include "XAOPlugin_IOperations_i.hh" +// KERNEL includes +#include + +// GUI includes #include #include #include #include + #include #include #include #include -#include -#include -#include -#include -#include -#include +// GEOM includes +#include "GeometryGUI.h" +#include "GEOMBase.h" +#include "GEOM_Field.hxx" +#include "GEOMImpl_Types.hxx" // OCCT Includes #include @@ -45,26 +48,33 @@ #include #include -#include -#include "ImportExportGUI_ImportXAODlg.h" - -#include +// QT includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include //================================================================================= // Constructor //================================================================================= -ImportExportGUI_ImportXAODlg::ImportExportGUI_ImportXAODlg(GeometryGUI* geometryGUI, QWidget* parent) +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("ICON_DLG_IMPORTXAO"))); + QPixmap imageOp(resMgr->loadPixmap("GEOM", tr("XAOPLUGIN_IMPORT_ICON"))); QPixmap iconSelect(resMgr->loadPixmap("GEOM", tr("ICON_SELECT"))); - setWindowTitle(tr("GEOM_IMPORTXAO_TITLE")); + setWindowTitle(tr("XAOPLUGIN_IMPORT_TITLE")); /***************************************************************/ - mainFrame()->GroupConstructors->setTitle(tr("GEOM_IMPORTXAO_TITLE")); + mainFrame()->GroupConstructors->setTitle(tr("XAOPLUGIN_IMPORT_TITLE")); mainFrame()->RadioButton1->setIcon(imageOp); mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose); mainFrame()->RadioButton2->close(); @@ -86,7 +96,7 @@ ImportExportGUI_ImportXAODlg::ImportExportGUI_ImportXAODlg(GeometryGUI* geometry gridLayoutExport->setObjectName(QString::fromUtf8("gridLayoutExport")); int line = 0, col = 0; - QLabel* lblFileName = new QLabel(tr("GEOM_IMPORTXAO_FILENAME"), gbxExport); + QLabel* lblFileName = new QLabel(tr("XAOPLUGIN_IMPORT_FILENAME"), gbxExport); btnFileSelect = new QPushButton(gbxExport); ledFileName = new QLineEdit(gbxExport); btnFileSelect->setText("..."); @@ -111,7 +121,7 @@ ImportExportGUI_ImportXAODlg::ImportExportGUI_ImportXAODlg(GeometryGUI* geometry //================================================================================= // Destructor //================================================================================= -ImportExportGUI_ImportXAODlg::~ImportExportGUI_ImportXAODlg() +XAOPlugin_ImportDlg::~XAOPlugin_ImportDlg() { // no need to delete child widgets, Qt does it all for us } @@ -120,7 +130,7 @@ ImportExportGUI_ImportXAODlg::~ImportExportGUI_ImportXAODlg() // function : Init() // purpose : //================================================================================= -void ImportExportGUI_ImportXAODlg::Init() +void XAOPlugin_ImportDlg::Init() { // Signal/slot connections connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); @@ -128,7 +138,7 @@ void ImportExportGUI_ImportXAODlg::Init() connect(btnFileSelect, SIGNAL(clicked()), this, SLOT(btnFileSelectClicked())); - initName(tr("GEOM_IMPORTXAO")); + initName(tr("XAOPLUGIN_IMPORTXAO")); //SelectionIntoArgument(); } @@ -136,7 +146,7 @@ void ImportExportGUI_ImportXAODlg::Init() // function : ClickOnOk() // purpose : //================================================================================= -void ImportExportGUI_ImportXAODlg::ClickOnOk() +void XAOPlugin_ImportDlg::ClickOnOk() { setIsApplyAndClose(true); if (ClickOnApply()) @@ -148,7 +158,7 @@ void ImportExportGUI_ImportXAODlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -bool ImportExportGUI_ImportXAODlg::ClickOnApply() +bool XAOPlugin_ImportDlg::ClickOnApply() { if(!isApplyAndClose()) { setIsDisableBrowsing( true ); @@ -191,11 +201,11 @@ bool ImportExportGUI_ImportXAODlg::ClickOnApply() // function : btnFileSelectClicked() // purpose : //================================================================================= -void ImportExportGUI_ImportXAODlg::btnFileSelectClicked() +void XAOPlugin_ImportDlg::btnFileSelectClicked() { QString file = SUIT_FileDlg::getFileName(this, ledFileName->text(), - tr("XAO_FILES"), - tr("GEOM_SELECT_IMPORT_XAO")); + tr("XAOPLUGIN_FILES"), + tr("XAOPLUGIN_IMPORT_SELECT")); if ( !file.isEmpty() ) ledFileName->setText( file ); } @@ -204,97 +214,96 @@ void ImportExportGUI_ImportXAODlg::btnFileSelectClicked() // function : ActivateThisDialog() // purpose : //================================================================================= -void ImportExportGUI_ImportXAODlg::ActivateThisDialog() +void XAOPlugin_ImportDlg::ActivateThisDialog() { - GEOMBase_Skeleton::ActivateThisDialog(); + GEOMBase_Skeleton::ActivateThisDialog(); } //================================================================================= // function : enterEvent [REDEFINED] // purpose : //================================================================================= -void ImportExportGUI_ImportXAODlg::enterEvent(QEvent*) +void XAOPlugin_ImportDlg::enterEvent(QEvent*) { - if (!mainFrame()->GroupConstructors->isEnabled()) - ActivateThisDialog(); + if (!mainFrame()->GroupConstructors->isEnabled()) + ActivateThisDialog(); } //================================================================================= // function : createOperation // purpose : //================================================================================= -GEOM::GEOM_IOperations_ptr ImportExportGUI_ImportXAODlg::createOperation() +GEOM::GEOM_IOperations_ptr XAOPlugin_ImportDlg::createOperation() { - return getGeomEngine()->GetIInsertOperations(getStudyId()); + return getGeomEngine()->GetPluginOperations( getStudyId(), "XAOPluginEngine" ); } //================================================================================= // function : isValid // purpose : //================================================================================= -bool ImportExportGUI_ImportXAODlg::isValid(QString& msg) +bool XAOPlugin_ImportDlg::isValid(QString& msg) { - // check file name - if (ledFileName->text().isEmpty()) - return false; + // check file name + if (ledFileName->text().isEmpty()) + return false; - return true; + return true; } //================================================================================= // function : execute // purpose : //================================================================================= -bool ImportExportGUI_ImportXAODlg::execute() +bool XAOPlugin_ImportDlg::execute() { - bool res = false; + bool res = false; - QString fileName = ledFileName->text(); - GEOM::GEOM_Object_var shape; - GEOM::ListOfGO_var groups, subShapes; - GEOM::ListOfFields_var fields; + 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); + GEOM::IXAOOperations_var ieOp = GEOM::IXAOOperations::_narrow(getOperation()); + res = ieOp->ImportXAO(fileName.toUtf8().constData(), shape, subShapes, groups, fields); - if (!shape->_is_nil()) + 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++) { - m_mainShape = shape; + addInStudy(subShapes[i].in(), subShapes[i]->GetName()); } - else + for (int i = 0; i < groups->length(); i++) { - m_mainShape = NULL; + addInStudy(groups[i].in(), groups[i]->GetName()); } - - if (m_mainShape != NULL) + for (int i = 0; i < fields->length(); i++) { - 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( anApp ); - aLightApp->browseObjects( anEntryList ); - } + addFieldInStudy(fields[i].in(), m_mainShape); + } + + updateObjBrowser(); + if( SUIT_Application* anApp = SUIT_Session::session()->activeApplication() ) { + LightApp_Application* aLightApp = dynamic_cast( anApp ); + aLightApp->browseObjects( anEntryList ); } + } - return res; + return res; } -QString ImportExportGUI_ImportXAODlg::addFieldInStudy( GEOM::GEOM_Field_ptr theField, GEOM::GEOM_Object_ptr theFather) +QString XAOPlugin_ImportDlg::addFieldInStudy( GEOM::GEOM_Field_ptr theField, GEOM::GEOM_Object_ptr theFather) { if ( !hasCommand() ) return QString(); @@ -319,7 +328,7 @@ QString ImportExportGUI_ImportXAODlg::addFieldInStudy( GEOM::GEOM_Field_ptr theF 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() ); + 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 ); } @@ -329,22 +338,22 @@ QString ImportExportGUI_ImportXAODlg::addFieldInStudy( GEOM::GEOM_Field_ptr theF return anEntry; } -GEOM::GEOM_Object_ptr ImportExportGUI_ImportXAODlg::getFather(GEOM::GEOM_Object_ptr object) +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(); + 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 +QString XAOPlugin_ImportDlg::getObjectName(GEOM::GEOM_Object_ptr object) const { - if (object->_is_nil()) - return QString::null; - return object->GetName(); + if (object->_is_nil()) + return QString::null; + return object->GetName(); } diff --git a/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.h b/src/XAOPlugin/XAOPlugin_ImportDlg.h similarity index 50% rename from src/ImportExportGUI/ImportExportGUI_ExportXAODlg.h rename to src/XAOPlugin/XAOPlugin_ImportDlg.h index 61ceffda1..2f32db08a 100644 --- a/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.h +++ b/src/XAOPlugin/XAOPlugin_ImportDlg.h @@ -17,60 +17,52 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef IMPORTEXPORTGUI_EXPORTXAODLG_H -#define IMPORTEXPORTGUI_EXPORTXAODLG_H +#ifndef XAOPlugin_ImportDlg_H +#define XAOPlugin_ImportDlg_H -#include -#include +// GEOM includes +#include "GEOMBase_Skeleton.h" class QLineEdit; class QButtonGroup; class QListWidget; -//class ImportExportGUI_1Sel1LineEdit2ListWidget; - //================================================================================= -// class : ImportExportGUI_ExportXAODlg +// class : XAOPlugin_ImportDlg // purpose : //================================================================================= -class ImportExportGUI_ExportXAODlg: public GEOMBase_Skeleton +class XAOPlugin_ImportDlg: public GEOMBase_Skeleton { - Q_OBJECT + Q_OBJECT public: - ImportExportGUI_ExportXAODlg(GeometryGUI*, QWidget* = 0); - ~ImportExportGUI_ExportXAODlg(); + 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(); + // 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*); - void processObject(); + void Init(); + void enterEvent(QEvent*); private: - GEOM::GEOM_Object_var m_mainObj; - QList m_groups; - QList m_fields; - QLineEdit* ledShape; - QLineEdit* ledFileName; - QLineEdit* ledAuthor; - QListWidget* lstGroups; - QListWidget* lstFields; - QPushButton* btnShapeSelect; - QPushButton* btnFileSelect; + QLineEdit* ledFileName; + QPushButton* btnFileSelect; + GEOM::GEOM_Object_var m_mainShape; private slots: - void ClickOnOk(); - bool ClickOnApply(); - void ActivateThisDialog(); - void SelectionIntoArgument(); - void SetEditCurrentArgument(); - void btnFileSelectClicked(); + void ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); + void btnFileSelectClicked(); }; -#endif // IMPORTEXPORTGUI_EXPORTXAODLG_H +#endif // XAOPlugin_ImportDlg_H diff --git a/src/XAOPlugin/XAOPlugin_OperationsCreator.cxx b/src/XAOPlugin/XAOPlugin_OperationsCreator.cxx new file mode 100644 index 000000000..21827c0be --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_OperationsCreator.cxx @@ -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 +#include + +// OCCT includes +#include + +std::map 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 index 000000000..d90589d52 --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_OperationsCreator.hxx @@ -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 + +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 _mapOfOperations; + + friend class XAOPlugin_IECallBack; +}; + +#endif diff --git a/src/XAOPlugin/XAOPlugin_images.ts b/src/XAOPlugin/XAOPlugin_images.ts new file mode 100644 index 000000000..48e672f7f --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_images.ts @@ -0,0 +1,16 @@ + + + + + @default + + XAOPLUGIN_EXPORT_ICON + exportxao.png + + + XAOPLUGIN_IMPORT_ICON + importxao.png + + + + diff --git a/src/XAOPlugin/XAOPlugin_msg_en.ts b/src/XAOPlugin/XAOPlugin_msg_en.ts new file mode 100644 index 000000000..c37ffd620 --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_msg_en.ts @@ -0,0 +1,105 @@ + + + + + @default + + MEN_EXPORTXAO + XAO + + + TOP_EXPORTXAO + Export XAO + + + STB_EXPORTXAO + Export XAO + + + MEN_IMPORTXAO + XAO + + + TOP_IMPORTXAO + Import XAO + + + STB_IMPORTXAO + Import XAO + + + XAOPLUGIN_IMPORT_SELECT + Import from XAO + + + XAOPLUGIN_EXPORT_SELECT + Export to XAO + + + XAOPLUGIN_FILES + XAO files (*.xao) + + + + XAOPlugin_ExportDlg + + XAOPLUGIN_EXPORT_TITLE + Export XAO + + + XAOPLUGIN_EXPORTXAO + Export XAO + + + XAOPLUGIN_EXPORT_INGSHAPE + Shape + + + XAOPLUGIN_EXPORT_FILENAME + File Name + + + XAOPLUGIN_EXPORT_AUTHOR + Author + + + XAOPLUGIN_EXPORT_LGROUPS + Groups + + + XAOPLUGIN_EXPORT_LFIELDS + Fields + + + + XAOPlugin_ImportDlg + + XAOPLUGIN_IMPORT_TITLE + Import XAO + + + XAOPLUGIN_IMPORTXAO + Import XAO + + + XAOPLUGIN_IMPORT_INGSHAPE + Shape + + + XAOPLUGIN_IMPORT_FILENAME + File Name + + + XAOPLUGIN_IMPORT_LGROUPS + Groups + + + XAOPLUGIN_IMPORT_LFIELDS + Fields + + + XAOPLUGIN_STEP + Step + + + diff --git a/src/XAOPlugin/XAOPlugin_msg_fr.ts b/src/XAOPlugin/XAOPlugin_msg_fr.ts new file mode 100644 index 000000000..7d3a6deec --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_msg_fr.ts @@ -0,0 +1,105 @@ + + + + + @default + + MEN_EXPORTXAO + XAO + + + TOP_EXPORTXAO + Exporter XAO + + + STB_EXPORTXAO + Exporter XAO + + + MEN_IMPORTXAO + XAO + + + TOP_IMPORTXAO + Importer XAO + + + STB_IMPORTXAO + Importer XAO + + + XAOPLUGIN_IMPORT_SELECT + Import XAO + + + XAOPLUGIN_EXPORT_SELECT + Export XAO + + + XAOPLUGIN_FILES + Fichiers XAO (*.xao) + + + + XAOPlugin_ExportDlg + + XAOPLUGIN_EXPORT_TITLE + Export XAO + + + XAOPLUGIN_EXPORTXAO + Export XAO + + + XAOPLUGIN_EXPORT_INGSHAPE + Objet + + + XAOPLUGIN_EXPORT_FILENAME + Fichier + + + XAOPLUGIN_EXPORT_AUTHOR + Auteur + + + XAOPLUGIN_EXPORT_LGROUPS + Groupes + + + XAOPLUGIN_EXPORT_LFIELDS + Champs + + + + XAOPlugin_ImportDlg + + XAOPLUGIN_IMPORT_TITLE + Import XAO + + + XAOPLUGIN_IMPORTXAO + Import XAO + + + XAOPLUGIN_IMPORT_INGSHAPE + Objet + + + XAOPLUGIN_IMPORT_FILENAME + Fichier + + + XAOPLUGIN_IMPORT_LGROUPS + Groupes + + + XAOPLUGIN_IMPORT_LFIELDS + Champs + + + XAOPLUGIN_STEP + Pas + + + \ 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 index 000000000..307f0146b --- /dev/null +++ b/src/XAOPlugin/XAOPlugin_msg_ja.ts @@ -0,0 +1,105 @@ + + + + + @default + + MEN_EXPORTXAO + エクスポートしました。 + + + TOP_EXPORTXAO + エクスポートしました。 + + + STB_EXPORTXAO + ソテーした形式でフォームをエクスポートします。 + + + MEN_IMPORTXAO + インポートしました。 + + + TOP_IMPORTXAO + インポートしました。 + + + STB_IMPORTXAO + ソテーしたフォームをインポートします。 + + + XAOPLUGIN_IMPORT_SELECT + XAOからインポート + + + XAOPLUGIN_EXPORT_SELECT + エクスポートしました。 + + + XAOPLUGIN_FILES + ファイルした (*.xao) + + + + XAOPlugin_ExportDlg + + XAOPLUGIN_EXPORT_TITLE + エクスポートしました。 + + + XAOPLUGIN_EXPORTXAO + エクスポートしました。 + + + XAOPLUGIN_EXPORT_INGSHAPE + オブジェクト + + + XAOPLUGIN_EXPORT_FILENAME + ファイル + + + XAOPLUGIN_EXPORT_AUTHOR + 作成者 + + + XAOPLUGIN_EXPORT_LGROUPS + グループ + + + XAOPLUGIN_EXPORT_LFIELDS + フィールド + + + + XAOPlugin_ImportDlg + + XAOPLUGIN_IMPORT_TITLE + インポートしました。 + + + XAOPLUGIN_IMPORTXAO + インポートしました。 + + + XAOPLUGIN_IMPORT_INGSHAPE + オブジェクト + + + XAOPLUGIN_IMPORT_FILENAME + ファイル + + + XAOPLUGIN_IMPORT_LGROUPS + グループ + + + XAOPLUGIN_IMPORT_LFIELDS + フィールド + + + XAOPLUGIN_STEP + Step + + + \ No newline at end of file -- 2.39.2